From a2638072efc3506c854a7967a5282fc13e8d8473 Mon Sep 17 00:00:00 2001 From: Gavin Lin Date: Tue, 7 Aug 2018 00:51:35 -0700 Subject: [PATCH] init commit --- gmsv/autil.c | 550 ++ gmsv/battle/battle.c | 9437 ++++++++++++++++++++++++ gmsv/battle/battle.c.bak | 9437 ++++++++++++++++++++++++ gmsv/battle/battle_ai.c | 533 ++ gmsv/battle/battle_command.c | 1087 +++ gmsv/battle/battle_event.c | 10231 ++++++++++++++++++++++++++ gmsv/battle/battle_item.c | 1137 +++ gmsv/battle/battle_magic.c | 5627 ++++++++++++++ gmsv/battle/makefile | 376 + gmsv/battle/makefile.bak | 281 + gmsv/battle/pet_skill.c | 2462 +++++++ gmsv/battle/profession_skill.c | 1295 ++++ gmsv/buf.c | 195 + gmsv/callfromac.c | 1854 +++++ gmsv/callfromcli.c | 2139 ++++++ gmsv/char/addressbook.c | 907 +++ gmsv/char/char.c | 8706 ++++++++++++++++++++++ gmsv/char/char.c.bak | 8701 ++++++++++++++++++++++ gmsv/char/char_angel.c | 685 ++ gmsv/char/char_base.c | 3884 ++++++++++ gmsv/char/char_base.c.bak | 3654 +++++++++ gmsv/char/char_data.c | 1908 +++++ gmsv/char/char_data.c.bak | 1915 +++++ gmsv/char/char_event.c | 564 ++ gmsv/char/char_item.c | 2355 ++++++ gmsv/char/char_item.c.bak | 2355 ++++++ gmsv/char/char_party.c | 635 ++ gmsv/char/char_talk.c | 1561 ++++ gmsv/char/char_walk.c | 1308 ++++ gmsv/char/chatmagic.c | 5828 +++++++++++++++ gmsv/char/chatmagic.c.bak | 5592 ++++++++++++++ gmsv/char/chatroom.c | 903 +++ gmsv/char/deathcontend.c | 2022 +++++ gmsv/char/defaultGroundEnemy.h | 158 + gmsv/char/defaultPlayer.h | 372 + gmsv/char/defend.c | 29 + gmsv/char/encount.c | 597 ++ gmsv/char/enemy.c | 2567 +++++++ gmsv/char/event.c | 100 + gmsv/char/family.c | 3012 ++++++++ gmsv/char/family.c.bak | 3048 ++++++++ gmsv/char/ls2data.h | 13 + gmsv/char/makefile | 1043 +++ gmsv/char/makefile.bak | 727 ++ gmsv/char/pet.c | 627 ++ gmsv/char/pet_event.c | 938 +++ gmsv/char/petmail.c | 1125 +++ gmsv/char/skill.c | 645 ++ gmsv/char/title.c | 1083 +++ gmsv/char/trade.c | 1942 +++++ gmsv/configfile.c | 2676 +++++++ gmsv/function.c | 793 ++ gmsv/genver.h | 10 + gmsv/genver.sh | 9 + gmsv/handletime.c | 381 + gmsv/include/addressbook.h | 45 + gmsv/include/anim_tbl.h | 1006 +++ gmsv/include/autil.h | 55 + gmsv/include/battle.h | 683 ++ gmsv/include/battle_ai.h | 10 + gmsv/include/battle_command.h | 27 + gmsv/include/battle_event.h | 383 + gmsv/include/battle_item.h | 36 + gmsv/include/battle_magic.h | 341 + gmsv/include/buf.h | 11 + gmsv/include/char.h | 771 ++ gmsv/include/char_base.h | 1783 +++++ gmsv/include/char_data.h | 120 + gmsv/include/char_event.h | 31 + gmsv/include/char_talk.h | 24 + gmsv/include/chatmagic.h | 256 + gmsv/include/chatroom.h | 57 + gmsv/include/common.h | 65 + gmsv/include/configfile.h | 276 + gmsv/include/correct_bug.h | 31 + gmsv/include/deathcontend.h | 192 + gmsv/include/defend.h | 4 + gmsv/include/encount.h | 40 + gmsv/include/enemy.h | 253 + gmsv/include/enemyexptbl.h | 207 + gmsv/include/event.h | 9 + gmsv/include/family.h | 255 + gmsv/include/function.h | 5 + gmsv/include/handletime.h | 57 + gmsv/include/init.h | 17 + gmsv/include/item.h | 443 ++ gmsv/include/item_event.h | 241 + gmsv/include/item_gen.h | 22 + gmsv/include/item_trade.h | 52 + gmsv/include/levelup.h | 17 + gmsv/include/link.h | 22 + gmsv/include/log.h | 353 + gmsv/include/lssproto_serv.h | 375 + gmsv/include/lssproto_util.h | 110 + gmsv/include/magic.h | 67 + gmsv/include/magic_base.h | 142 + gmsv/include/magic_field.h | 10 + gmsv/include/map_deal.h | 11 + gmsv/include/map_util.h | 7 + gmsv/include/map_warppoint.h | 21 + gmsv/include/mclient.h | 82 + gmsv/include/msignal.h | 8 + gmsv/include/net.h | 346 + gmsv/include/npc_Dengon.h | 10 + gmsv/include/npc_action.h | 12 + gmsv/include/npc_airplane.h | 12 + gmsv/include/npc_alldoman.h | 10 + gmsv/include/npc_auctioneer.h | 35 + gmsv/include/npc_bankman.h | 12 + gmsv/include/npc_bigsmallmaster.h | 4 + gmsv/include/npc_bigsmallpet.h | 4 + gmsv/include/npc_blackmarket.h | 11 + gmsv/include/npc_bodylan.h | 16 + gmsv/include/npc_bus.h | 12 + gmsv/include/npc_charm.h | 11 + gmsv/include/npc_checkman.h | 11 + gmsv/include/npc_door.h | 31 + gmsv/include/npc_doorman.h | 9 + gmsv/include/npc_duelranking.h | 15 + gmsv/include/npc_eventaction.h | 123 + gmsv/include/npc_exchangeman.h | 22 + gmsv/include/npc_familyman.h | 13 + gmsv/include/npc_fmdengon.h | 10 + gmsv/include/npc_fmhealer.h | 9 + gmsv/include/npc_fmletter.h | 13 + gmsv/include/npc_fmpkcallman.h | 10 + gmsv/include/npc_fmpkman.h | 10 + gmsv/include/npc_fmwarpman.h | 30 + gmsv/include/npc_freepetskillshop.h | 10 + gmsv/include/npc_gamblebank.h | 9 + gmsv/include/npc_gamblemaster.h | 9 + gmsv/include/npc_gambleroulette.h | 9 + gmsv/include/npc_healer.h | 10 + gmsv/include/npc_itemchange.h | 12 + gmsv/include/npc_itemshop.h | 12 + gmsv/include/npc_janken.h | 10 + gmsv/include/npc_luckyman.h | 10 + gmsv/include/npc_makepair.h | 22 + gmsv/include/npc_manorsman.h | 19 + gmsv/include/npc_mic.h | 9 + gmsv/include/npc_msg.h | 9 + gmsv/include/npc_mtradenpcman.h | 10 + gmsv/include/npc_newnpcman.h | 8 + gmsv/include/npc_npcenemy.h | 17 + gmsv/include/npc_oldman.h | 12 + gmsv/include/npc_pauctionman.h | 17 + gmsv/include/npc_petfusion.h | 11 + gmsv/include/npc_petmaker.h | 9 + gmsv/include/npc_petracemaster.h | 10 + gmsv/include/npc_petracepet.h | 9 + gmsv/include/npc_petshop.h | 12 + gmsv/include/npc_petskillshop.h | 13 + gmsv/include/npc_pettransman.h | 11 + gmsv/include/npc_pkpetshop.h | 16 + gmsv/include/npc_poolitemshop.h | 14 + gmsv/include/npc_quiz.h | 29 + gmsv/include/npc_raceman.h | 45 + gmsv/include/npc_riderman.h | 12 + gmsv/include/npc_roomadminnew.h | 48 + gmsv/include/npc_sample.h | 8 + gmsv/include/npc_savepoint.h | 14 + gmsv/include/npc_scheduleman.h | 82 + gmsv/include/npc_scheduleman.h.bak | 82 + gmsv/include/npc_sellsthman.h | 9 + gmsv/include/npc_signboard.h | 11 + gmsv/include/npc_simpleshop.h | 10 + gmsv/include/npc_stoneserviceman.h | 20 + gmsv/include/npc_storyteller.h | 8 + gmsv/include/npc_sysinfo.h | 7 + gmsv/include/npc_timeman.h | 13 + gmsv/include/npc_townpeople.h | 7 + gmsv/include/npc_transerman.h | 9 + gmsv/include/npc_transmigration.h | 11 + gmsv/include/npc_verywelfare.h | 8 + gmsv/include/npc_warp.h | 10 + gmsv/include/npc_warpman.h | 13 + gmsv/include/npc_welfare.h | 10 + gmsv/include/npc_welfare2.h | 9 + gmsv/include/npc_windowhealer.h | 11 + gmsv/include/npc_windowman.h | 16 + gmsv/include/npccreate.h | 93 + gmsv/include/npcgen.h | 13 + gmsv/include/npcserver.h | 38 + gmsv/include/npcshandle.h | 29 + gmsv/include/npctemplate.h | 111 + gmsv/include/npcutil.h | 89 + gmsv/include/object.h | 80 + gmsv/include/pet.h | 32 + gmsv/include/pet_event.h | 18 + gmsv/include/pet_skill.h | 546 ++ gmsv/include/pet_skillinfo.h | 139 + gmsv/include/petmail.h | 57 + gmsv/include/profession_skill.h | 169 + gmsv/include/readmap.h | 130 + gmsv/include/readnpc.h | 6 + gmsv/include/saacproto_cli.h | 383 + gmsv/include/saacproto_util.h | 114 + gmsv/include/skill.h | 121 + gmsv/include/sndcnf.h | 147 + gmsv/include/title.h | 21 + gmsv/include/trade.h | 18 + gmsv/include/util.h | 136 + gmsv/include/version.h | 574 ++ gmsv/include/version.h.bak | 570 ++ gmsv/include/version_pk.h | 9 + gmsv/include/vssver.scc | Bin 0 -> 685 bytes gmsv/init.c | 723 ++ gmsv/item/item.c | 2327 ++++++ gmsv/item/item_contract.c | 251 + gmsv/item/item_event.c | 4612 ++++++++++++ gmsv/item/item_event.c.bak | 4635 ++++++++++++ gmsv/item/item_gen.c | 1889 +++++ gmsv/item/item_trade.c | 477 ++ gmsv/item/makefile | 249 + gmsv/item/makefile.bak | 183 + gmsv/link.c | 153 + gmsv/log.c | 926 +++ gmsv/log/log.cf | 11 + gmsv/log/vssver.scc | Bin 0 -> 48 bytes gmsv/ls2data.dat | 13 + gmsv/ls2data.h | 13 + gmsv/lssproto_serv.c | 3073 ++++++++ gmsv/lssproto_util.c | 1475 ++++ gmsv/magic/magic.c | 846 +++ gmsv/magic/magic_base.c | 521 ++ gmsv/magic/magic_field.c | 149 + gmsv/magic/makefile | 145 + gmsv/magic/makefile.bak | 121 + gmsv/main.c | 379 + gmsv/makefile | 940 +++ gmsv/map/makefile | 175 + gmsv/map/map_deal.c | 318 + gmsv/map/map_util.c | 35 + gmsv/map/map_warppoint.c | 283 + gmsv/map/readmap.c | 1453 ++++ gmsv/mclient.c | 677 ++ gmsv/msignal.c | 118 + gmsv/net.c | 3751 ++++++++++ gmsv/npc/11npc_action.c | 137 + gmsv/npc/makefile | 3103 ++++++++ gmsv/npc/makefile.bak | 2525 +++++++ gmsv/npc/npc_action.c | 137 + gmsv/npc/npc_airplane.c | 879 +++ gmsv/npc/npc_alldoman.c | 497 ++ gmsv/npc/npc_auctioneer.c | 17 + gmsv/npc/npc_bankman.c | 585 ++ gmsv/npc/npc_bigsmallmaster.c | 13 + gmsv/npc/npc_bigsmallpet.c | 11 + gmsv/npc/npc_blackmarket.c | 69 + gmsv/npc/npc_bodylan.c | 487 ++ gmsv/npc/npc_bus.c | 761 ++ gmsv/npc/npc_charm.c | 285 + gmsv/npc/npc_checkman.c | 472 ++ gmsv/npc/npc_dengon.c | 248 + gmsv/npc/npc_door.c | 529 ++ gmsv/npc/npc_doorman.c | 215 + gmsv/npc/npc_duelranking.c | 895 +++ gmsv/npc/npc_eventaction.c | 3252 ++++++++ gmsv/npc/npc_exchangeman.c | 4348 +++++++++++ gmsv/npc/npc_familyman.c | 681 ++ gmsv/npc/npc_fmchallenge.c | 776 ++ gmsv/npc/npc_fmdengon.c | 1529 ++++ gmsv/npc/npc_fmhealer.c | 144 + gmsv/npc/npc_fmletter.c | 679 ++ gmsv/npc/npc_fmpkcallman.c | 392 + gmsv/npc/npc_fmpkman.c | 301 + gmsv/npc/npc_fmwarpman.c | 1272 ++++ gmsv/npc/npc_freepetskillshop.c | 561 ++ gmsv/npc/npc_gamblebank.c | 519 ++ gmsv/npc/npc_gamblemaster.c | 600 ++ gmsv/npc/npc_gambleroulette.c | 474 ++ gmsv/npc/npc_healer.c | 181 + gmsv/npc/npc_itemchange.c | 259 + gmsv/npc/npc_itemshop.c | 1385 ++++ gmsv/npc/npc_janken.c | 517 ++ gmsv/npc/npc_luckyman.c | 239 + gmsv/npc/npc_makepair.c | 542 ++ gmsv/npc/npc_manorsman.c | 1244 ++++ gmsv/npc/npc_mic.c | 163 + gmsv/npc/npc_msg.c | 46 + gmsv/npc/npc_mtradenpcman.c | 238 + gmsv/npc/npc_newnpcman.c | 1182 +++ gmsv/npc/npc_npcenemy.c | 1120 +++ gmsv/npc/npc_oldman.c | 152 + gmsv/npc/npc_pauctionman.c | 530 ++ gmsv/npc/npc_petfusion.c | 253 + gmsv/npc/npc_petmaker.c | 144 + gmsv/npc/npc_petracemaster.c | 582 ++ gmsv/npc/npc_petracepet.c | 274 + gmsv/npc/npc_petshop.c | 1481 ++++ gmsv/npc/npc_petskillshop.c | 243 + gmsv/npc/npc_pkpetshop.c | 1533 ++++ gmsv/npc/npc_pkpetshop.c.bak | 1539 ++++ gmsv/npc/npc_poolitemshop.c | 882 +++ gmsv/npc/npc_quiz.c | 1426 ++++ gmsv/npc/npc_raceman.c | 2255 ++++++ gmsv/npc/npc_riderman.c | 1146 +++ gmsv/npc/npc_roomadminnew.c | 1093 +++ gmsv/npc/npc_sample.c | 99 + gmsv/npc/npc_savepoint.c | 561 ++ gmsv/npc/npc_savepoint.c.bak | 562 ++ gmsv/npc/npc_scheduleman.c | 823 +++ gmsv/npc/npc_sellsthman.c | 711 ++ gmsv/npc/npc_signboard.c | 128 + gmsv/npc/npc_simpleshop.c | 785 ++ gmsv/npc/npc_stoneserviceman.c | 1042 +++ gmsv/npc/npc_storyteller.c | 68 + gmsv/npc/npc_sysinfo.c | 875 +++ gmsv/npc/npc_sysinfo.c.bak | 876 +++ gmsv/npc/npc_timeman.c | 231 + gmsv/npc/npc_townpeople.c | 72 + gmsv/npc/npc_transerman.c | 201 + gmsv/npc/npc_transmigration.c | 1783 +++++ gmsv/npc/npc_verywelfare.c | 100 + gmsv/npc/npc_warp.c | 380 + gmsv/npc/npc_warpman.c | 1134 +++ gmsv/npc/npc_welfare.c | 390 + gmsv/npc/npc_welfare2.c | 278 + gmsv/npc/npc_windowhealer.c | 731 ++ gmsv/npc/npc_windowman.c | 559 ++ gmsv/npc/npccreate.c | 626 ++ gmsv/npc/npcgen.c | 387 + gmsv/npc/npctemplate.c | 1131 +++ gmsv/npc/npcutil.c | 1736 +++++ gmsv/npc/readnpc.c | 20 + gmsv/npcserver.c | 407 + gmsv/npcshandle.c | 322 + gmsv/object.c | 483 ++ gmsv/saacproto_cli.c | 2166 ++++++ gmsv/saacproto_util.c | 1484 ++++ gmsv/util.c | 1758 +++++ gmsv2.28_code.rar | Bin 0 -> 1471457 bytes saac/acfamily.c | 4094 +++++++++++ saac/acfamily.h | 296 + saac/auction.c | 98 + saac/auction.h | 35 + saac/char.c | 1350 ++++ saac/char.h | 106 + saac/chatroom.c | 505 ++ saac/chatroom.h | 48 + saac/db.c | 1483 ++++ saac/db.h | 19 + saac/deathcontend.c | 1127 +++ saac/deathcontend.h | 73 + saac/defend.c | 415 ++ saac/defend.h | 53 + saac/lock.c | 448 ++ saac/lock.h | 70 + saac/mail.c | 504 ++ saac/mail.h | 13 + saac/main.c | 2169 ++++++ saac/main.h | 213 + saac/makefile | 711 ++ saac/recv.c | 3266 ++++++++ saac/recv.h | 145 + saac/saacproto_lserver.c | 769 ++ saac/saacproto_lserver.h | 113 + saac/saacproto_oac.c | 338 + saac/saacproto_oac.h | 44 + saac/saacproto_serv.c | 2348 ++++++ saac/saacproto_serv.h | 401 + saac/saacproto_util.c | 1589 ++++ saac/saacproto_util.h | 142 + saac/saacproto_work.c | 242 + saac/saacproto_work.h | 36 + saac/sasql.c | 303 + saac/sasql.h | 34 + saac/tcpip_util.c | 473 ++ saac/tcpip_util.h | 33 + saac/util.c | 396 + saac/util.h | 30 + saac/version.h | 163 + saac/wk/TCPIP.c | 144 + saac/wk/TCPIP.h | 8 + saac/wk/TCPIP.o | Bin 0 -> 3432 bytes saac/wk/error.c | 70 + saac/wk/error.h | 19 + saac/wk/error.o | Bin 0 -> 1860 bytes saac/wk/makefile | 14 + saac/wk/makefile.bak | 22 + saac/wk/tools.c | 296 + saac/wk/tools.h | 51 + saac/wk/tools.o | Bin 0 -> 5296 bytes saac/wk/version.h | 19 + saac/wk/wk.c | 873 +++ saac2.27_code.rar | Bin 0 -> 164095 bytes 386 files changed, 264400 insertions(+) create mode 100644 gmsv/autil.c create mode 100644 gmsv/battle/battle.c create mode 100644 gmsv/battle/battle.c.bak create mode 100644 gmsv/battle/battle_ai.c create mode 100644 gmsv/battle/battle_command.c create mode 100644 gmsv/battle/battle_event.c create mode 100644 gmsv/battle/battle_item.c create mode 100644 gmsv/battle/battle_magic.c create mode 100644 gmsv/battle/makefile create mode 100644 gmsv/battle/makefile.bak create mode 100644 gmsv/battle/pet_skill.c create mode 100644 gmsv/battle/profession_skill.c create mode 100644 gmsv/buf.c create mode 100644 gmsv/callfromac.c create mode 100644 gmsv/callfromcli.c create mode 100644 gmsv/char/addressbook.c create mode 100644 gmsv/char/char.c create mode 100644 gmsv/char/char.c.bak create mode 100644 gmsv/char/char_angel.c create mode 100644 gmsv/char/char_base.c create mode 100644 gmsv/char/char_base.c.bak create mode 100644 gmsv/char/char_data.c create mode 100644 gmsv/char/char_data.c.bak create mode 100644 gmsv/char/char_event.c create mode 100644 gmsv/char/char_item.c create mode 100644 gmsv/char/char_item.c.bak create mode 100644 gmsv/char/char_party.c create mode 100644 gmsv/char/char_talk.c create mode 100644 gmsv/char/char_walk.c create mode 100644 gmsv/char/chatmagic.c create mode 100644 gmsv/char/chatmagic.c.bak create mode 100644 gmsv/char/chatroom.c create mode 100644 gmsv/char/deathcontend.c create mode 100644 gmsv/char/defaultGroundEnemy.h create mode 100644 gmsv/char/defaultPlayer.h create mode 100644 gmsv/char/defend.c create mode 100644 gmsv/char/encount.c create mode 100644 gmsv/char/enemy.c create mode 100644 gmsv/char/event.c create mode 100644 gmsv/char/family.c create mode 100644 gmsv/char/family.c.bak create mode 100644 gmsv/char/ls2data.h create mode 100644 gmsv/char/makefile create mode 100644 gmsv/char/makefile.bak create mode 100644 gmsv/char/pet.c create mode 100644 gmsv/char/pet_event.c create mode 100644 gmsv/char/petmail.c create mode 100644 gmsv/char/skill.c create mode 100644 gmsv/char/title.c create mode 100644 gmsv/char/trade.c create mode 100644 gmsv/configfile.c create mode 100644 gmsv/function.c create mode 100644 gmsv/genver.h create mode 100644 gmsv/genver.sh create mode 100644 gmsv/handletime.c create mode 100644 gmsv/include/addressbook.h create mode 100644 gmsv/include/anim_tbl.h create mode 100644 gmsv/include/autil.h create mode 100644 gmsv/include/battle.h create mode 100644 gmsv/include/battle_ai.h create mode 100644 gmsv/include/battle_command.h create mode 100644 gmsv/include/battle_event.h create mode 100644 gmsv/include/battle_item.h create mode 100644 gmsv/include/battle_magic.h create mode 100644 gmsv/include/buf.h create mode 100644 gmsv/include/char.h create mode 100644 gmsv/include/char_base.h create mode 100644 gmsv/include/char_data.h create mode 100644 gmsv/include/char_event.h create mode 100644 gmsv/include/char_talk.h create mode 100644 gmsv/include/chatmagic.h create mode 100644 gmsv/include/chatroom.h create mode 100644 gmsv/include/common.h create mode 100644 gmsv/include/configfile.h create mode 100644 gmsv/include/correct_bug.h create mode 100644 gmsv/include/deathcontend.h create mode 100644 gmsv/include/defend.h create mode 100644 gmsv/include/encount.h create mode 100644 gmsv/include/enemy.h create mode 100644 gmsv/include/enemyexptbl.h create mode 100644 gmsv/include/event.h create mode 100644 gmsv/include/family.h create mode 100644 gmsv/include/function.h create mode 100644 gmsv/include/handletime.h create mode 100644 gmsv/include/init.h create mode 100644 gmsv/include/item.h create mode 100644 gmsv/include/item_event.h create mode 100644 gmsv/include/item_gen.h create mode 100644 gmsv/include/item_trade.h create mode 100644 gmsv/include/levelup.h create mode 100644 gmsv/include/link.h create mode 100644 gmsv/include/log.h create mode 100644 gmsv/include/lssproto_serv.h create mode 100644 gmsv/include/lssproto_util.h create mode 100644 gmsv/include/magic.h create mode 100644 gmsv/include/magic_base.h create mode 100644 gmsv/include/magic_field.h create mode 100644 gmsv/include/map_deal.h create mode 100644 gmsv/include/map_util.h create mode 100644 gmsv/include/map_warppoint.h create mode 100644 gmsv/include/mclient.h create mode 100644 gmsv/include/msignal.h create mode 100644 gmsv/include/net.h create mode 100644 gmsv/include/npc_Dengon.h create mode 100644 gmsv/include/npc_action.h create mode 100644 gmsv/include/npc_airplane.h create mode 100644 gmsv/include/npc_alldoman.h create mode 100644 gmsv/include/npc_auctioneer.h create mode 100644 gmsv/include/npc_bankman.h create mode 100644 gmsv/include/npc_bigsmallmaster.h create mode 100644 gmsv/include/npc_bigsmallpet.h create mode 100644 gmsv/include/npc_blackmarket.h create mode 100644 gmsv/include/npc_bodylan.h create mode 100644 gmsv/include/npc_bus.h create mode 100644 gmsv/include/npc_charm.h create mode 100644 gmsv/include/npc_checkman.h create mode 100644 gmsv/include/npc_door.h create mode 100644 gmsv/include/npc_doorman.h create mode 100644 gmsv/include/npc_duelranking.h create mode 100644 gmsv/include/npc_eventaction.h create mode 100644 gmsv/include/npc_exchangeman.h create mode 100644 gmsv/include/npc_familyman.h create mode 100644 gmsv/include/npc_fmdengon.h create mode 100644 gmsv/include/npc_fmhealer.h create mode 100644 gmsv/include/npc_fmletter.h create mode 100644 gmsv/include/npc_fmpkcallman.h create mode 100644 gmsv/include/npc_fmpkman.h create mode 100644 gmsv/include/npc_fmwarpman.h create mode 100644 gmsv/include/npc_freepetskillshop.h create mode 100644 gmsv/include/npc_gamblebank.h create mode 100644 gmsv/include/npc_gamblemaster.h create mode 100644 gmsv/include/npc_gambleroulette.h create mode 100644 gmsv/include/npc_healer.h create mode 100644 gmsv/include/npc_itemchange.h create mode 100644 gmsv/include/npc_itemshop.h create mode 100644 gmsv/include/npc_janken.h create mode 100644 gmsv/include/npc_luckyman.h create mode 100644 gmsv/include/npc_makepair.h create mode 100644 gmsv/include/npc_manorsman.h create mode 100644 gmsv/include/npc_mic.h create mode 100644 gmsv/include/npc_msg.h create mode 100644 gmsv/include/npc_mtradenpcman.h create mode 100644 gmsv/include/npc_newnpcman.h create mode 100644 gmsv/include/npc_npcenemy.h create mode 100644 gmsv/include/npc_oldman.h create mode 100644 gmsv/include/npc_pauctionman.h create mode 100644 gmsv/include/npc_petfusion.h create mode 100644 gmsv/include/npc_petmaker.h create mode 100644 gmsv/include/npc_petracemaster.h create mode 100644 gmsv/include/npc_petracepet.h create mode 100644 gmsv/include/npc_petshop.h create mode 100644 gmsv/include/npc_petskillshop.h create mode 100644 gmsv/include/npc_pettransman.h create mode 100644 gmsv/include/npc_pkpetshop.h create mode 100644 gmsv/include/npc_poolitemshop.h create mode 100644 gmsv/include/npc_quiz.h create mode 100644 gmsv/include/npc_raceman.h create mode 100644 gmsv/include/npc_riderman.h create mode 100644 gmsv/include/npc_roomadminnew.h create mode 100644 gmsv/include/npc_sample.h create mode 100644 gmsv/include/npc_savepoint.h create mode 100644 gmsv/include/npc_scheduleman.h create mode 100644 gmsv/include/npc_scheduleman.h.bak create mode 100644 gmsv/include/npc_sellsthman.h create mode 100644 gmsv/include/npc_signboard.h create mode 100644 gmsv/include/npc_simpleshop.h create mode 100644 gmsv/include/npc_stoneserviceman.h create mode 100644 gmsv/include/npc_storyteller.h create mode 100644 gmsv/include/npc_sysinfo.h create mode 100644 gmsv/include/npc_timeman.h create mode 100644 gmsv/include/npc_townpeople.h create mode 100644 gmsv/include/npc_transerman.h create mode 100644 gmsv/include/npc_transmigration.h create mode 100644 gmsv/include/npc_verywelfare.h create mode 100644 gmsv/include/npc_warp.h create mode 100644 gmsv/include/npc_warpman.h create mode 100644 gmsv/include/npc_welfare.h create mode 100644 gmsv/include/npc_welfare2.h create mode 100644 gmsv/include/npc_windowhealer.h create mode 100644 gmsv/include/npc_windowman.h create mode 100644 gmsv/include/npccreate.h create mode 100644 gmsv/include/npcgen.h create mode 100644 gmsv/include/npcserver.h create mode 100644 gmsv/include/npcshandle.h create mode 100644 gmsv/include/npctemplate.h create mode 100644 gmsv/include/npcutil.h create mode 100644 gmsv/include/object.h create mode 100644 gmsv/include/pet.h create mode 100644 gmsv/include/pet_event.h create mode 100644 gmsv/include/pet_skill.h create mode 100644 gmsv/include/pet_skillinfo.h create mode 100644 gmsv/include/petmail.h create mode 100644 gmsv/include/profession_skill.h create mode 100644 gmsv/include/readmap.h create mode 100644 gmsv/include/readnpc.h create mode 100644 gmsv/include/saacproto_cli.h create mode 100644 gmsv/include/saacproto_util.h create mode 100644 gmsv/include/skill.h create mode 100644 gmsv/include/sndcnf.h create mode 100644 gmsv/include/title.h create mode 100644 gmsv/include/trade.h create mode 100644 gmsv/include/util.h create mode 100644 gmsv/include/version.h create mode 100644 gmsv/include/version.h.bak create mode 100644 gmsv/include/version_pk.h create mode 100644 gmsv/include/vssver.scc create mode 100644 gmsv/init.c create mode 100644 gmsv/item/item.c create mode 100644 gmsv/item/item_contract.c create mode 100644 gmsv/item/item_event.c create mode 100644 gmsv/item/item_event.c.bak create mode 100644 gmsv/item/item_gen.c create mode 100644 gmsv/item/item_trade.c create mode 100644 gmsv/item/makefile create mode 100644 gmsv/item/makefile.bak create mode 100644 gmsv/link.c create mode 100644 gmsv/log.c create mode 100644 gmsv/log/log.cf create mode 100644 gmsv/log/vssver.scc create mode 100644 gmsv/ls2data.dat create mode 100644 gmsv/ls2data.h create mode 100644 gmsv/lssproto_serv.c create mode 100644 gmsv/lssproto_util.c create mode 100644 gmsv/magic/magic.c create mode 100644 gmsv/magic/magic_base.c create mode 100644 gmsv/magic/magic_field.c create mode 100644 gmsv/magic/makefile create mode 100644 gmsv/magic/makefile.bak create mode 100644 gmsv/main.c create mode 100644 gmsv/makefile create mode 100644 gmsv/map/makefile create mode 100644 gmsv/map/map_deal.c create mode 100644 gmsv/map/map_util.c create mode 100644 gmsv/map/map_warppoint.c create mode 100644 gmsv/map/readmap.c create mode 100644 gmsv/mclient.c create mode 100644 gmsv/msignal.c create mode 100644 gmsv/net.c create mode 100644 gmsv/npc/11npc_action.c create mode 100644 gmsv/npc/makefile create mode 100644 gmsv/npc/makefile.bak create mode 100644 gmsv/npc/npc_action.c create mode 100644 gmsv/npc/npc_airplane.c create mode 100644 gmsv/npc/npc_alldoman.c create mode 100644 gmsv/npc/npc_auctioneer.c create mode 100644 gmsv/npc/npc_bankman.c create mode 100644 gmsv/npc/npc_bigsmallmaster.c create mode 100644 gmsv/npc/npc_bigsmallpet.c create mode 100644 gmsv/npc/npc_blackmarket.c create mode 100644 gmsv/npc/npc_bodylan.c create mode 100644 gmsv/npc/npc_bus.c create mode 100644 gmsv/npc/npc_charm.c create mode 100644 gmsv/npc/npc_checkman.c create mode 100644 gmsv/npc/npc_dengon.c create mode 100644 gmsv/npc/npc_door.c create mode 100644 gmsv/npc/npc_doorman.c create mode 100644 gmsv/npc/npc_duelranking.c create mode 100644 gmsv/npc/npc_eventaction.c create mode 100644 gmsv/npc/npc_exchangeman.c create mode 100644 gmsv/npc/npc_familyman.c create mode 100644 gmsv/npc/npc_fmchallenge.c create mode 100644 gmsv/npc/npc_fmdengon.c create mode 100644 gmsv/npc/npc_fmhealer.c create mode 100644 gmsv/npc/npc_fmletter.c create mode 100644 gmsv/npc/npc_fmpkcallman.c create mode 100644 gmsv/npc/npc_fmpkman.c create mode 100644 gmsv/npc/npc_fmwarpman.c create mode 100644 gmsv/npc/npc_freepetskillshop.c create mode 100644 gmsv/npc/npc_gamblebank.c create mode 100644 gmsv/npc/npc_gamblemaster.c create mode 100644 gmsv/npc/npc_gambleroulette.c create mode 100644 gmsv/npc/npc_healer.c create mode 100644 gmsv/npc/npc_itemchange.c create mode 100644 gmsv/npc/npc_itemshop.c create mode 100644 gmsv/npc/npc_janken.c create mode 100644 gmsv/npc/npc_luckyman.c create mode 100644 gmsv/npc/npc_makepair.c create mode 100644 gmsv/npc/npc_manorsman.c create mode 100644 gmsv/npc/npc_mic.c create mode 100644 gmsv/npc/npc_msg.c create mode 100644 gmsv/npc/npc_mtradenpcman.c create mode 100644 gmsv/npc/npc_newnpcman.c create mode 100644 gmsv/npc/npc_npcenemy.c create mode 100644 gmsv/npc/npc_oldman.c create mode 100644 gmsv/npc/npc_pauctionman.c create mode 100644 gmsv/npc/npc_petfusion.c create mode 100644 gmsv/npc/npc_petmaker.c create mode 100644 gmsv/npc/npc_petracemaster.c create mode 100644 gmsv/npc/npc_petracepet.c create mode 100644 gmsv/npc/npc_petshop.c create mode 100644 gmsv/npc/npc_petskillshop.c create mode 100644 gmsv/npc/npc_pkpetshop.c create mode 100644 gmsv/npc/npc_pkpetshop.c.bak create mode 100644 gmsv/npc/npc_poolitemshop.c create mode 100644 gmsv/npc/npc_quiz.c create mode 100644 gmsv/npc/npc_raceman.c create mode 100644 gmsv/npc/npc_riderman.c create mode 100644 gmsv/npc/npc_roomadminnew.c create mode 100644 gmsv/npc/npc_sample.c create mode 100644 gmsv/npc/npc_savepoint.c create mode 100644 gmsv/npc/npc_savepoint.c.bak create mode 100644 gmsv/npc/npc_scheduleman.c create mode 100644 gmsv/npc/npc_sellsthman.c create mode 100644 gmsv/npc/npc_signboard.c create mode 100644 gmsv/npc/npc_simpleshop.c create mode 100644 gmsv/npc/npc_stoneserviceman.c create mode 100644 gmsv/npc/npc_storyteller.c create mode 100644 gmsv/npc/npc_sysinfo.c create mode 100644 gmsv/npc/npc_sysinfo.c.bak create mode 100644 gmsv/npc/npc_timeman.c create mode 100644 gmsv/npc/npc_townpeople.c create mode 100644 gmsv/npc/npc_transerman.c create mode 100644 gmsv/npc/npc_transmigration.c create mode 100644 gmsv/npc/npc_verywelfare.c create mode 100644 gmsv/npc/npc_warp.c create mode 100644 gmsv/npc/npc_warpman.c create mode 100644 gmsv/npc/npc_welfare.c create mode 100644 gmsv/npc/npc_welfare2.c create mode 100644 gmsv/npc/npc_windowhealer.c create mode 100644 gmsv/npc/npc_windowman.c create mode 100644 gmsv/npc/npccreate.c create mode 100644 gmsv/npc/npcgen.c create mode 100644 gmsv/npc/npctemplate.c create mode 100644 gmsv/npc/npcutil.c create mode 100644 gmsv/npc/readnpc.c create mode 100644 gmsv/npcserver.c create mode 100644 gmsv/npcshandle.c create mode 100644 gmsv/object.c create mode 100644 gmsv/saacproto_cli.c create mode 100644 gmsv/saacproto_util.c create mode 100644 gmsv/util.c create mode 100644 gmsv2.28_code.rar create mode 100644 saac/acfamily.c create mode 100644 saac/acfamily.h create mode 100644 saac/auction.c create mode 100644 saac/auction.h create mode 100644 saac/char.c create mode 100644 saac/char.h create mode 100644 saac/chatroom.c create mode 100644 saac/chatroom.h create mode 100644 saac/db.c create mode 100644 saac/db.h create mode 100644 saac/deathcontend.c create mode 100644 saac/deathcontend.h create mode 100644 saac/defend.c create mode 100644 saac/defend.h create mode 100644 saac/lock.c create mode 100644 saac/lock.h create mode 100644 saac/mail.c create mode 100644 saac/mail.h create mode 100644 saac/main.c create mode 100644 saac/main.h create mode 100644 saac/makefile create mode 100644 saac/recv.c create mode 100644 saac/recv.h create mode 100644 saac/saacproto_lserver.c create mode 100644 saac/saacproto_lserver.h create mode 100644 saac/saacproto_oac.c create mode 100644 saac/saacproto_oac.h create mode 100644 saac/saacproto_serv.c create mode 100644 saac/saacproto_serv.h create mode 100644 saac/saacproto_util.c create mode 100644 saac/saacproto_util.h create mode 100644 saac/saacproto_work.c create mode 100644 saac/saacproto_work.h create mode 100644 saac/sasql.c create mode 100644 saac/sasql.h create mode 100644 saac/tcpip_util.c create mode 100644 saac/tcpip_util.h create mode 100644 saac/util.c create mode 100644 saac/util.h create mode 100644 saac/version.h create mode 100644 saac/wk/TCPIP.c create mode 100644 saac/wk/TCPIP.h create mode 100644 saac/wk/TCPIP.o create mode 100644 saac/wk/error.c create mode 100644 saac/wk/error.h create mode 100644 saac/wk/error.o create mode 100644 saac/wk/makefile create mode 100644 saac/wk/makefile.bak create mode 100644 saac/wk/tools.c create mode 100644 saac/wk/tools.h create mode 100644 saac/wk/tools.o create mode 100644 saac/wk/version.h create mode 100644 saac/wk/wk.c create mode 100644 saac2.27_code.rar diff --git a/gmsv/autil.c b/gmsv/autil.c new file mode 100644 index 0000000..dbc7fd3 --- /dev/null +++ b/gmsv/autil.c @@ -0,0 +1,550 @@ +// Arminius' protocol utilities ver 0.1 +// +// Any questions and bugs, mailto: arminius@mail.hwaei.com.tw + +// ------------------------------------------------------------------- +// The following definitions is to define game-dependent codes. +// Before compiling, remove the "//". +#define __STONEAGE +#include "version.h" +#include +#include +#include "autil.h" +#include "char.h" +#ifdef __STONEAGE +#include "lssproto_util.h" +#include "common.h" +#endif + + +// Nuke 0701 fix +char *MesgSlice[SLICE_MAX]; +int SliceCount; + +char PersonalKey[4096]; + +// ------------------------------------------------------------------- +// Initialize utilities +// +BOOL util_Init( void) +{ + int i; + + for (i=0; i=0)) { + ptr[0] = '\0'; + if (strlen(head) func(%d)\n", file, line, func); + return; + } + + // Robin adjust + //sprintf(t1, "&;%d%s;#;", func, buffer); + sprintf(t1, "&;%d%s;#;", func+23, buffer); + util_EncodeMessage(t2, t1); +#ifdef _CHECK_BATTLE_IO + if( InBattleLoop) { + battle_write_cnt++; + battle_write += strlen( buffer); + } + else { + other_write += strlen( buffer); + other_write_cnt++; + } +#endif +#ifdef __STONEAGE + lssproto_Send(fd, t2); +#endif +} + +int util_256to64(char *dst, char *src, int len, char *table) +{ + unsigned int dw,dwcounter,i; + + if (!dst || !src || !table) return 0; + dw=0; + dwcounter=0; + for (i=0; i> 6 ); + if (i%3==2) { + dst[ dwcounter++ ] = table[ dw & 0x3f ]; + dw = 0; + } + } + if (dw) dst[ dwcounter++ ] = table[ dw ]; + dst[ dwcounter ] = '\0'; + return dwcounter; +} + +// ------------------------------------------------------------------- +// Convert 6-bit strings into 8-bit strings, buffers that store these strings +// must have enough space. +// +// arg: dst=6-bit string; src=8-bit string; table=mapping table +// ret: 0=failed >0=bytes converted +int util_64to256(char *dst, char *src, char *table) +{ + unsigned int dw,dwcounter,i; + char *ptr = NULL; + + dw=0; + dwcounter=0; + if (!dst || !src || !table) return 0; + for (i=0; i> 8; + } else { + dw = (unsigned int)(ptr-table) & 0x3f; + } + } + if (dw) dst[ dwcounter++ ] = dw & 0xff; + dst[ dwcounter ] = '\0'; + return dwcounter; +} + +// ------------------------------------------------------------------- +// This basically is a 256to64 encoder. But it shifts the result by key. +// +// arg: dst=6-bit string; src=8-bit string; len=src strlen; +// table=mapping table; key=rotate key; +// ret: 0=failed >0=bytes converted +int util_256to64_shr(char *dst, char *src, int len, char *table, char *key) +{ + unsigned int dw,dwcounter,i,j; + + if (!dst || !src || !table || !key) return 0; + if (strlen(key)<1) return 0; // key can't be empty. + dw=0; + dwcounter=0; + j=0; + for (i=0; i> 6 ); + if (i%3==2) { + dst[ dwcounter++ ] = table[ ((dw & 0x3f) + key[j]) % 64 ];// check! + j++; if (!key[j]) j=0; + dw = 0; + } + } + if (dw) dst[ dwcounter++ ] = table[ (dw + key[j]) % 64 ]; // check! + dst[ dwcounter ] = '\0'; + return dwcounter; +} + +// ------------------------------------------------------------------- +// Decoding function of util_256to64_shr. +// +// arg: dst=8-bit string; src=6-bit string; table=mapping table; +// key=rotate key; +// ret: 0=failed >0=bytes converted +int util_shl_64to256(char *dst, char *src, char *table, char *key) +{ + unsigned int dw,dwcounter,i,j; + char *ptr = NULL; + + if (!key || (strlen(key)<1)) return 0; // must have key + + dw=0; + dwcounter=0; + j=0; + if (!dst || !src || !table) return 0; + for (i=0; i> 8; + } else { + // check! + dw = (((unsigned int)(ptr-table) & 0x3f) + 64 - key[j]) % 64; + j++; if (!key[j]) j=0; + } + } + if (dw) dst[ dwcounter++ ] = dw & 0xff; + dst[ dwcounter ] = '\0'; + return dwcounter; +} + +// ------------------------------------------------------------------- +// This basically is a 256to64 encoder. But it shifts the result by key. +// +// arg: dst=6-bit string; src=8-bit string; len=src strlen; +// table=mapping table; key=rotate key; +// ret: 0=failed >0=bytes converted +int util_256to64_shl(char *dst, char *src, int len, char *table, char *key) +{ + unsigned int dw,dwcounter,i,j; + + if (!dst || !src || !table || !key) return 0; + if (strlen(key)<1) return 0; // key can't be empty. + dw=0; + dwcounter=0; + j=0; + for (i=0; i> 6 ); + if (i%3==2) { + dst[ dwcounter++ ] = table[ ((dw & 0x3f) + 64 - key[j]) % 64 ]; // check! + j++; if (!key[j]) j=0; + dw = 0; + } + } + if (dw) dst[ dwcounter++ ] = table[ (dw + 64 - key[j]) % 64 ]; // check! + dst[ dwcounter ] = '\0'; + return dwcounter; +} + +// ------------------------------------------------------------------- +// Decoding function of util_256to64_shl. +// +// arg: dst=8-bit string; src=6-bit string; table=mapping table; +// key=rotate key; +// ret: 0=failed >0=bytes converted +int util_shr_64to256(char *dst, char *src, char *table, char *key) +{ + unsigned int dw,dwcounter,i,j; + char *ptr = NULL; + + if (!key || (strlen(key)<1)) return 0; // must have key + + dw=0; + dwcounter=0; + j=0; + if (!dst || !src || !table) return 0; + for (i=0; i> 8; + } else { + // check! + dw = (((unsigned int)(ptr-table) & 0x3f) + key[j]) % 64; + j++; if (!key[j]) j=0; + } + } + if (dw) dst[ dwcounter++ ] = dw & 0xff; + dst[ dwcounter ] = '\0'; + return dwcounter; +} + +// ------------------------------------------------------------------- +// Swap a integer (4 byte). +// The value "rule" indicates the swaping rule. It's a 4 byte string +// such as "1324" or "2431". +// +void util_swapint(int *dst, int *src, char *rule) +{ + char *ptr, *qtr; + int i; + + ptr = (char *) src; + qtr = (char *) dst; + for (i=0; i<4; i++) qtr[rule[i]-'1']=ptr[i]; +} + +// ------------------------------------------------------------------- +// Xor a string. Be careful that your string contains '0xff'. Your +// data may lose. +// +void util_xorstring(char *dst, char *src) +{ + int i; + if (strlen(src)>65500) return; + +DebugPoint=100000; + + for (i=0; i +#include +#include +#include "buf.h" +#include"object.h" +#include"char.h" +#include"char_base.h" +#include"char_data.h" +#include"battle.h" +#include"battle_event.h" +#include"battle_command.h" +#include"battle_ai.h" +#include"configfile.h" +#include"lssproto_serv.h" +#include"encount.h" +#include"enemy.h" +#include"handletime.h" +#include"readmap.h" +#include"pet_skill.h" +#include "npcutil.h" +#include "magic.h" +#include "npc_npcenemy.h" +#include "log.h" +#include "pet_skillinfo.h" +#include "anim_tbl.h" +#include "common.h" +#include "battle_magic.h" +#ifdef _Item_ReLifeAct +#include "item.h" +#endif +#include "correct_bug.h" + +#ifdef _DEATH_CONTEND +#include "deathcontend.h" +#endif + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 +#include "profession_skill.h" +#include "skill.h" +#endif + +//#define DANTAI +static int Total_BattleNum=0; +BATTLE *BattleArray; +int BATTLE_battlenum; +static int BATTLE_searchCnt = 0; + +#ifdef _PET_LIMITLEVEL //ANDY_ADD + void Pet_Check_Die( int petindex); +#endif +static int BATTLE_SearchTask( void ); +static int BATTLE_Battling( int battleindex ); + +#ifdef _Item_ReLifeAct + BOOL CHECK_ITEM_RELIFE( int battleindex, int toindex); +#endif +#ifdef _LOSE_FINCH_ + BOOL CHECK_PET_RELIFE( int battleindex, int petindex); +#endif +char szAllBattleString[BATTLE_STRING_MAX]; +#ifdef _OTHER_MAGICSTAUTS +void BATTLE_MagicStatusSeq( int charaindex ); +#endif + +//Terry 2001/11/28 +char szBattleString[512]; +char *pszBattleTop, + *pszBattleLast; + +char szBadStatusString[1024]; + +int gWeponType; +float gDamageDiv; +int gItemCrushRate = 400000; + +int BoomerangVsTbl[4][5] = { + { 4+5*0,2+5*0,0+5*0,1+5*0,3+5*0 }, + { 4+5*1,2+5*1,0+5*1,1+5*1,3+5*1 }, + { 4+5*2,2+5*2,0+5*2,1+5*2,3+5*2 }, + { 4+5*3,2+5*3,0+5*3,1+5*3,3+5*3 }, + +}; + +void BATTLE_BadStatusAllClr( int charaindex ) +{ + int i ; + for( i = 1; i < BATTLE_ST_END; i ++ ){ + CHAR_setWorkInt( charaindex, StatusTbl[i], 0 ); + } +#ifdef _OTHER_MAGICSTAUTS + for( i = 1; i < MAXSTATUSTYPE; i++ ){ + CHAR_setWorkInt( charaindex, MagicTbl[i], 0); + CHAR_setWorkInt( charaindex, CHAR_OTHERSTATUSNUMS, 0); + } +#endif +#ifdef _IMPRECATE_ITEM + for( i=0; i<3; i++) { + CHAR_setWorkInt( charaindex, CHAR_WORKIMPRECATENUM1+i, 0 ); + } +#endif + +#ifdef _PETSKILL_SETDUCK + CHAR_setWorkInt( charaindex, CHAR_MYSKILLDUCK, 0); + CHAR_setWorkInt( charaindex, CHAR_MYSKILLDUCKPOWER, 0 ); +#ifdef _MAGICPET_SKILL + CHAR_setWorkInt( charaindex, CHAR_MYSKILLSTR, 0); + CHAR_setWorkInt( charaindex, CHAR_MYSKILLSTRPOWER, 0 ); + CHAR_setWorkInt( charaindex, CHAR_MYSKILLTGH, 0); + CHAR_setWorkInt( charaindex, CHAR_MYSKILLTGHPOWER, 0 ); + CHAR_setWorkInt( charaindex, CHAR_MYSKILLDEX, 0); + CHAR_setWorkInt( charaindex, CHAR_MYSKILLDEXPOWER, 0 ); + CHAR_setWorkInt( charaindex, CHAR_MAGICPETMP, 0 ); +#endif +#endif + + CHAR_setFlg( charaindex, CHAR_ISDIE, 0 ); + +#ifdef _BATTLE_PROPERTY + { + Char *ch; + ch = CHAR_getCharPointer( charaindex); + if( ch == NULL ) return; + strcpysafe( ch->charfunctable[CHAR_BATTLEPROPERTY].string, + sizeof( ch->charfunctable[CHAR_BATTLEPROPERTY]), "");//战斗 + CHAR_constructFunctable( charaindex); + } +#endif + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + CHAR_setWorkInt( charaindex, CHAR_MYSKILLHIT, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORK_P_DUCK, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORKMOD_P_DUCK, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORK_WEAPON, 0 ); // 武器专精 + + // 火冰电抗性 + for( i=0; i<3; i++) + CHAR_setWorkInt( charaindex, CHAR_WORK_F_RESIST+i, 0/*CHAR_getInt( charaindex, PROFESSION_FIRE_R+i )*/ ); + +#endif + +#ifdef _PETSKILL_BECOMEPIG + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ) + { + for( i =0; i < CHAR_MAXPETHAVE; i++){ + int pindex = CHAR_getCharPet( charaindex, i ); + if( !CHAR_CHECKINDEX( pindex ) ) + continue; + CHAR_setInt( pindex, CHAR_BECOMEPIG, -1 ); + } + } +#endif + +} + +int BATTLE_getTopBattle( int battleindex ) +{ + + BATTLE *pBattleTop; + + if( BATTLE_CHECKINDEX( battleindex ) == FALSE ) return -1; + + pBattleTop = &BattleArray[battleindex]; + + while( pBattleTop != NULL ){ + pBattleTop = BattleArray[battleindex].pBefore; + } + + if( BATTLE_CHECKINDEX( pBattleTop->battleindex ) == FALSE ){ + return -1; + }else{ + return pBattleTop->battleindex; + } +} + +static int BATTLE_getBattleFieldNo( int floor, int x, int y ) +{ + int tile[2], map[3], iRet; + if( !MAP_getTileAndObjData( floor, x, y, &tile[0], &tile[1] ) ) + return FALSE; + map[0] = MAP_getImageInt( tile[0], MAP_BATTLEMAP ); + map[1] = MAP_getImageInt( tile[0], MAP_BATTLEMAP2 ); + map[2] = MAP_getImageInt( tile[0], MAP_BATTLEMAP3 ); + iRet = map[RAND( 0, 2 )]; + return iRet; +} + +void BATTLE_BadStatusString( int defNo, int status ) +{ + char szWork[256]; + if( status < 1 || status >= BATTLE_ST_END ){ + status = 0; + } + sprintf( szWork, "BM|%X|%X|", defNo, status ); + strncat( szBadStatusString, szWork, sizeof( szBadStatusString ) ); +} + + + +#ifdef __ATTACK_MAGIC + +static int CharTableIdx[20][2] = +{ + { 3 , 2 } , { 3 , 1 } , { 3 , 3 } , { 3 , 0 } , { 3 , 4 } , + { 2 , 2 } , { 2 , 1 } , { 2 , 3 } , { 2 , 0 } , { 2 , 4 } , + { 0 , 2 } , { 0 , 1 } , { 0 , 3 } , { 0 , 0 } , { 0 , 4 } , + { 1 , 2 } , { 1 , 1 } , { 1 , 3 } , { 1 , 0 } , { 1 , 4 } + +}; + +typedef int ( *FUNCSORTLOC )( const void* , const void* ); + +static int SortLoc( const int *pEle1 , const int *pEle2 ) +{ + int ele1basex , ele1basey; + int ele2basex , ele2basey; + + ele1basex = CharTableIdx[*pEle1][1]; + ele1basey = CharTableIdx[*pEle1][0]; + ele2basex = CharTableIdx[*pEle2][1]; + ele2basey = CharTableIdx[*pEle2][0]; + + if( *pEle1 >= 10 ){ + if( ele1basey != ele2basey ) + return ( ele1basey - ele2basey ); + return ( ele1basex - ele2basex ); + }else{ // 右下方 + if( ele1basey != ele2basey ) + return ( ele2basey - ele1basey ); + return ( ele2basex - ele1basey ); + } + return 0; +} +#endif + +int BATTLE_MultiList( int battleindex, int toNo, int ToList[] ) +{ + int j , i , cnt=0,nLife = 0,nLifeArea[10]; +#ifdef __ATTACK_MAGIC + // 单人攻击 + if(0 <= toNo && toNo <= 19){ + memset(nLifeArea,-1,sizeof(nLifeArea)); + // 如果被攻击者是右下方的人 + if(toNo >= 0 && toNo <= 9){ + for(i=0;i<10;i++){ + // 确定活着的人数,并记录活着的人的号码 + if(BATTLE_TargetCheck(battleindex,i) == TRUE) nLifeArea[nLife++] = i; + } + } + // 如果被攻击者是左上方的人 + if(toNo >= 10 && toNo <= 19){ + for(i=10;i<20;i++){ + // 确定活着的人数,并记录活着的人的号码 + if(BATTLE_TargetCheck(battleindex,i) == TRUE) nLifeArea[nLife++] = i; + } + } + + // 全死(虽然不太可能,但..) + if(nLife == 0){ + print("\nAll die!!"); + return -1; + }else{ + // 被攻击的对象已经死亡或不在战场上 + if(BATTLE_TargetCheck(battleindex,toNo) == FALSE) + // 随机找一只来打 + while((toNo = nLifeArea[rand()%10]) == -1); + } + ToList[0] = toNo; + ToList[1] = -1; + cnt = 1; + } + // 右下後一列攻击 + else if( TARGET_SIDE_0_B_ROW == toNo ){ + for( j = 0 , i = 0 ; i < SIDE_OFFSET / 2 ; i++ ){ + if( TRUE == BATTLE_TargetCheck( battleindex , i ) ){ + ToList[j] = i; + j++; + } + } + ToList[j] = -1; + cnt = j; + // 如果这一排都没有人可以打 + if(j == 0){ + // 换前一排 + for( j = 0 , i = SIDE_OFFSET / 2 ; i < SIDE_OFFSET ; i++ ){ + if( TRUE == BATTLE_TargetCheck( battleindex , i ) ){ + ToList[j] = i; + j++; + } + } + ToList[j] = -1; + cnt = j; + // 如果全死 + if(j == 0) return -1; + toNo = TARGET_SIDE_0_F_ROW; + } + } + // 右下前一列攻击 + else if( TARGET_SIDE_0_F_ROW == toNo ) + { + for( j = 0 , i = SIDE_OFFSET / 2 ; i < SIDE_OFFSET ; i++ ) + { + if( TRUE == BATTLE_TargetCheck( battleindex , i ) ) + { + ToList[j] = i; + j++; + } + } + ToList[j] = -1; + cnt = j; + // 如果这一排都没有人可以打 + if(j == 0) + { + // 换後一排 + for( j = 0 , i = 0 ; i < SIDE_OFFSET / 2 ; i++ ) + { + if( TRUE == BATTLE_TargetCheck( battleindex , i ) ) + { + ToList[j] = i; + j++; + } + } + ToList[j] = -1; + cnt = j; + // 如果全死 + if(j == 0) return -1; + toNo = TARGET_SIDE_0_B_ROW; + } + } + // 左下後一列攻击 + else if( TARGET_SIDE_1_B_ROW == toNo ) + { + for( j = 0 , i = SIDE_OFFSET ; i < SIDE_OFFSET + SIDE_OFFSET / 2 ; i++ ) + { + if( TRUE == BATTLE_TargetCheck( battleindex , i ) ) + { + ToList[j] = i; + j++; + } + } + ToList[j] = -1; + cnt = j; + // 如果这一排都没有人可以打 + if(j == 0) + { + // 换前一排 + for( j = 0 , i = SIDE_OFFSET + SIDE_OFFSET / 2 ; i < SIDE_OFFSET * 2 ; i++ ) + { + if( TRUE == BATTLE_TargetCheck( battleindex , i ) ) + { + ToList[j] = i; + j++; + } + } + ToList[j] = -1; + cnt = j; + // 如果全死 + if(j == 0) return -1; + toNo = TARGET_SIDE_1_F_ROW; + } + } + // 左上前一列攻击 + else if( TARGET_SIDE_1_F_ROW == toNo ) + { + for( j = 0 , i = SIDE_OFFSET + SIDE_OFFSET / 2 ; i < SIDE_OFFSET * 2 ; i++ ) + { + if( TRUE == BATTLE_TargetCheck( battleindex , i ) ) + { + ToList[j] = i; + j++; + } + } + ToList[j] = -1; + cnt = j; + // 如果这一排都没有人可以打 + if(j == 0) + { + // 换後一排 + for( j = 0 , i = SIDE_OFFSET ; i < SIDE_OFFSET + SIDE_OFFSET / 2 ; i++ ) + { + if( TRUE == BATTLE_TargetCheck( battleindex , i ) ) + { + ToList[j] = i; + j++; + } + } + ToList[j] = -1; + cnt = j; + // 如果全死 + if(j == 0) return -1; + toNo = TARGET_SIDE_1_B_ROW; + } + } + // 右下方所有攻击 + else if( TARGET_SIDE_0 == toNo ) + { + //print("BATTLE_MultiList(20)toNo->%d\n",toNo); + for( j = 0 , i = 0 ; i < SIDE_OFFSET ; i++ ) + { + if( TRUE == BATTLE_TargetCheck( battleindex , i ) ) + { + ToList[j] = i; + j++; + } + } + + ToList[j] = -1; + cnt = j; + } + // 左上方所有攻击 + else if( toNo == TARGET_SIDE_1 ) + { + for( j = 0 , i = SIDE_OFFSET ; i < SIDE_OFFSET * 2 ; i++ ) + { + if( TRUE == BATTLE_TargetCheck( battleindex , i ) ) + { + ToList[j] = i; + j++; + } + } + + ToList[j] = -1; + cnt = j; + } + // 所有人攻击 + else if( toNo == TARGET_ALL ){ +#ifdef _FIX_ARRAYBUG + for( j = 0 , i = 0 ; i < SIDE_OFFSET * 2 ; i++ ){ +#else + for( j = 0 , i = 0 ; i < SIDE_OFFSET * 2 ; i++ , j++ ) { +#endif + if( TRUE == BATTLE_TargetCheck( battleindex , i ) ){ + ToList[j] = i; + j++; + } + } + ToList[i] = -1; + cnt = j; + // won add 前後排攻击 + }else if( toNo == TARGER_THROUGH ){ + int toNo2=-1, count=0; + + if(BATTLE_TargetCheck(battleindex,toNo) != FALSE){ + ToList[count] = toNo; + count++; + cnt = count; + } + + if( toNo < (SIDE_OFFSET/2) ) toNo2= toNo + (SIDE_OFFSET/2); + else if( toNo < (SIDE_OFFSET) ) toNo2= toNo - (SIDE_OFFSET/2); + else if( toNo < (SIDE_OFFSET*1.5) ) toNo2= toNo + (SIDE_OFFSET/2); + else if( toNo < (SIDE_OFFSET*2) ) toNo2= toNo - (SIDE_OFFSET/2); + + if(BATTLE_TargetCheck(battleindex,toNo2) != FALSE){ + ToList[count] = toNo2; + count++; + cnt = count; + } + }else{ + ToList[0] = toNo; + ToList[1] = -1; + cnt = 1; + } + + if( cnt > 1 ) qsort( ToList , cnt , sizeof( ToList[0] ) , ( FUNCSORTLOC )SortLoc ); + return toNo; + +#else + if( 0 <= toNo && toNo <= 19 ) + { + if( BATTLE_TargetCheck( battleindex, toNo ) == TRUE ) + { + ToList[0] = toNo; + ToList[1] = -1; + cnt = 1; + } + else + { + ToList[0] = -1; + ToList[1] = -1; + cnt = 0; + } + } + else if( toNo == TARGET_SIDE_0 ) + { + for( j = 0, i = 0; i < SIDE_OFFSET; i ++) + { + if( BATTLE_TargetCheck( battleindex, i ) == TRUE ) + { + ToList[j] = i; + j ++ ; + } + } + ToList[j] = -1; + cnt = j; + } + else if( toNo == TARGET_SIDE_1 ) + { + for( j = 0, i = SIDE_OFFSET; i < SIDE_OFFSET*2; i ++ ) + { + if( BATTLE_TargetCheck( battleindex, i ) == TRUE ) + { + ToList[j] = i; + j ++ ; + } + } + ToList[j] = -1; + cnt = j; + } + else if( toNo == TARGET_ALL ){ + for( j = 0, i = 0; i < SIDE_OFFSET*2; i ++, j ++ ){ + if( BATTLE_TargetCheck( battleindex, i ) == TRUE ){ + ToList[j] = i; + j ++ ; + } + } + ToList[i] = -1; + cnt = j; + } + else + { + ToList[0] = toNo; + ToList[1] = -1; + cnt = 1; + } + + return 1; +#endif +} + +void BATTLE_MultiListDead( int battleindex, int toNo, int ToList[] ) +{ + int j, i; + if( 0 <= toNo && toNo <= 19 ){ + if( BATTLE_TargetCheckDead( battleindex, toNo ) == TRUE ){ + ToList[0] = toNo; + ToList[1] = -1; + }else{ + ToList[0] = -1; + ToList[1] = -1; + } + }else + if( toNo == TARGET_SIDE_0 ){ + for( j = 0, i = 0; i < SIDE_OFFSET; i ++){ + if( BATTLE_TargetCheckDead( battleindex, i ) == TRUE ){ + ToList[j] = i; + j ++ ; + } + } + ToList[j] = -1; + }else + if( toNo == TARGET_SIDE_1 ){ + for( j = 0, i = SIDE_OFFSET; i < SIDE_OFFSET*2; i ++ ){ + if( BATTLE_TargetCheckDead( battleindex, i ) == TRUE ){ + ToList[j] = i; + j ++ ; + } + } + ToList[j] = -1; + }else{ + if( toNo == TARGET_ALL ){ +#ifdef _FIX_ARRAYBUG + for( j = 0, i = 0; i < SIDE_OFFSET*2; i ++){ +#else + for( j = 0, i = 0; i < SIDE_OFFSET*2; i ++, j ++ ){ +#endif + if( BATTLE_TargetCheckDead( battleindex, i ) == TRUE ){ + ToList[j] = i; + j ++ ; + } + } +#ifdef _FIX_ITEMRELIFE // WON ADD 修正替身娃娃问题 + ToList[j] = -1; +#else + ToList[i] = -1; +#endif + }else{ + ToList[0] = toNo; + ToList[1] = -1; + } + } +} + +BOOL BATTLE_IsThrowWepon( int itemindex){ + int itemtype; + if( ITEM_CHECKINDEX( itemindex ) == FALSE ){ + return FALSE; + } + itemtype = ITEM_getInt( itemindex, ITEM_TYPE ); + if( itemtype == ITEM_BOOMERANG + || itemtype == ITEM_BOW + || itemtype == ITEM_BREAKTHROW + || itemtype == ITEM_BOUNDTHROW ){ + return TRUE; + }else{ + return FALSE; + } +} + +int BATTLE_ClearGetExp( int charaindex ) +{ + int i, pindex; + + if( CHAR_CHECKINDEX( charaindex ) == FALSE ){ + return BATTLE_ERR_CHARAINDEX; + } + CHAR_setWorkInt( charaindex, CHAR_WORKGETEXP, 0 ); + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ){ + pindex = CHAR_getCharPet( charaindex, i ); + if( CHAR_CHECKINDEX( pindex ) == FALSE )continue; + CHAR_setWorkInt( pindex, CHAR_WORKGETEXP, 0 ); + } + + return 0; +} + +INLINE void _BATTLE_ExitAll( char *file, int line, int battleindex) +{ + int j,i, charaindex; + for( j = 0; j < 2; j ++ ){ + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + charaindex = BattleArray[battleindex].Side[j].Entry[i].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )continue; + BATTLE_Exit( charaindex, battleindex ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, + BATTLE_CHARMODE_NONE ); + } + } +} + +void BATTLE_AllCharaFinishSet( int battleindex ) +{ + int j,i, charaindex; + for( j = 0; j < 2; j ++ ){ + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + charaindex = BattleArray[battleindex].Side[j].Entry[i].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )continue; + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, + BATTLE_CHARMODE_FINAL ); + } + } +} + +BOOL BATTLE_IsCharge( int charaindex ) +{ + int com; + com = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ); + if( com == BATTLE_COM_S_CHARGE + || com == BATTLE_COM_S_EARTHROUND1 + || com == BATTLE_COM_S_EARTHROUND0 +#ifdef _PROFESSION_ADDSKILL + || CHAR_getWorkInt( charaindex, CHAR_DOOMTIME ) > 0 +#endif + ){ + return TRUE; + } + return FALSE; +} + +void BATTLE_AllCharaCWaitSet( int battleindex ) +{ + int j,i, charaindex; + for( j = 0; j < 2; j ++ ){ + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + charaindex = BattleArray[battleindex].Side[j].Entry[i].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )continue; + + if( BATTLE_IsCharge( charaindex ) == TRUE ){ + }else{ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, + BATTLE_COM_NONE ); + } + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, + BATTLE_CHARMODE_C_WAIT ); + } + } +} + +void BATTLE_AllCharaWatchWaitSet( int battleindex ) +{ + int i, charaindex; + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + charaindex = BattleArray[battleindex].Side[0].Entry[i].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )continue; + + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ) + != BATTLE_CHARMODE_WATCHINIT + ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, + BATTLE_CHARMODE_C_WAIT ); + } + } +} + +void BATTLE_SurpriseSet( + int battleindex, + int side +) +{ + BATTLE_ENTRY *pEntry; + int i, charaindex; + + pEntry = BattleArray[battleindex].Side[side].Entry; + + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + charaindex = pEntry[i].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )continue; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + } + } + + +} + +BOOL BATTLE_initBattleArray( + int battlenum +) +{ + + int i; + BATTLE_battlenum = battlenum; + + BattleArray = allocateMemory( sizeof( BATTLE ) * BATTLE_battlenum ); + if( BattleArray == NULL ) return FALSE; + for( i = 0 ; i < BATTLE_battlenum ; i ++ ){ + memset( &BattleArray[i], 0 , sizeof( BATTLE )); + } + return TRUE; + +} + +static void EntryInit( BATTLE_ENTRY *pEntry ){ + int i; + pEntry->charaindex = -1; + pEntry->bid = -1; + pEntry->escape = 0; + for( i = 0; i < GETITEM_MAX; i ++ ){ + pEntry->getitem[i] = -1; + } +} + +int BATTLE_CreateBattle( void ) +{ + int battleindex, i, j; + BATTLE *pBattle; + battleindex = BATTLE_SearchTask( ); + // NUKE 0701 + if( battleindex < 0 )return -1; + pBattle = &BattleArray[battleindex]; + // NUKE 0701 + if (pBattle==NULL) return -1; + pBattle->use = TRUE; + pBattle->mode = BATTLE_MODE_INIT; + pBattle->turn = 0; + pBattle->dpbattle = 0; + pBattle->norisk = 0; + pBattle->flg = 0; + pBattle->field_att = BATTLE_ATTR_NONE; + pBattle->att_count = 0; + for( j = 0; j < 2; j ++ ){ + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + EntryInit( &pBattle->Side[j].Entry[i] ); + } + } + for( i = 0; i < BATTLE_ENTRY_MAX*2; i ++ ){ + pBattle->iEntryBack[i] = -1; + pBattle->iEntryBack2[i] = -1; + } + pBattle->WinFunc = NULL; +#ifdef _DEATH_CONTEND//计算胜败func + pBattle->PkFunc = NULL; + pBattle->battlemap = -1; +#endif + pBattle->pNext = NULL; + pBattle->pBefore = NULL; + pBattle->battleindex = battleindex; + Total_BattleNum ++; +#ifdef _BATTLECOMMAND_TIME + pBattle->PartTime = 0; +#endif +#ifdef _PROFESSION_ADDSKILL + //冰爆术存放 +/* pBattle->ice_count = 0; + for( i = 0; i < 20; i ++ ){ + pBattle->ice_bout[i]=0; + pBattle->ice_use[i]=FALSE; + pBattle->ice_toNo[i]=0; + pBattle->ice_level[i]=0; + pBattle->ice_array[i]=0; + pBattle->ice_attackNo[i]=0; + pBattle->ice_charaindex[i]=-1; + }*/ +#endif + return battleindex; +} + +static int BATTLE_SearchTask( void ) +{ + int i, j; + i = BATTLE_searchCnt; + for( j = 0; j < BATTLE_battlenum; j ++ ){ + if( i >= BATTLE_battlenum ) i = 0; + if( BattleArray[i].use == FALSE ){ + BATTLE_searchCnt = i + 1; + return i; + } + i ++; + } + return -1; +} + +void BATTLE_DeleteItem( int battleindex ) +{ + int i, j, k; + BATTLE_ENTRY *pEntry; + + for( j = 0; j < 2; j ++ ){ + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + pEntry = &BattleArray[battleindex].Side[j].Entry[i]; + for( k = 0; k < GETITEM_MAX; k ++ ){ + if( pEntry->getitem[k] >= 0 ){ + print( "// 找寻(消去)道具(%d),(%s)\n", + pEntry->getitem[k], + ITEM_getAppropriateName(pEntry->getitem[k]) ); + ITEM_endExistItemsOne( pEntry->getitem[k] ); + } + } + } + } +} + + +int BATTLE_DeleteBattle( + int battleindex +) +{ + int i, j; + BATTLE *pBattle; + if( BATTLE_CHECKINDEX( battleindex ) == FALSE ){ + fprint( "err:battle index error\n" ); + return BATTLE_ERR_BATTLEINDEX; + } + if( BATTLE_WatchUnLink( battleindex ) == FALSE ){ + fprint( "err:battle link 不脱离\n" ); + } + + pBattle = &BattleArray[battleindex]; + pBattle->use = FALSE; + pBattle->mode = BATTLE_MODE_NONE; + BATTLE_DeleteItem( battleindex ); + for( j = 0; j < 2; j ++ ){ + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + EntryInit( &pBattle->Side[j].Entry[i] ); + } + } + Total_BattleNum--; + return 0; +} + + +int BATTLE_No2Index( + int battleindex, + int bid +) +{ + BATTLE_ENTRY *pEntry; + + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return -1; + if( BATTLE_CHECKNO( bid ) == FALSE )return -1; + + if( bid >= 10 ){ + pEntry = BattleArray[battleindex].Side[1].Entry; + bid -= SIDE_OFFSET; + }else{ + pEntry = BattleArray[battleindex].Side[0].Entry; + } + if( CHAR_CHECKINDEX( pEntry[bid].charaindex ) == FALSE )return -1; + + return pEntry[bid].charaindex; + +} +#ifdef _Item_ReLifeAct +int BATTLE_getBattleDieIndex( int battleindex, int bid ) +{ + BATTLE_ENTRY *pEntry; + + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return -1; + if( BATTLE_CHECKNO( bid ) == FALSE )return -1; + + if( bid >= 10 ){ + pEntry = BattleArray[battleindex].Side[1].Entry; + bid -= SIDE_OFFSET; + }else{ + pEntry = BattleArray[battleindex].Side[0].Entry; + } + if( CHAR_CHECKINDEX( pEntry[bid].charaindex ) == FALSE )return -1; + if( pEntry[bid].flg & BENT_FLG_ULTIMATE ) return -1; + + return pEntry[bid].charaindex; + +} +#endif + +#ifdef _PROFESSION_ADDSKILL +BOOL BATTLE_BattleUltimate( int battleindex, int bid ) //检查此位 上是否被打飞 +{ + BATTLE_ENTRY *pEntry; + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return FALSE; + if( BATTLE_CHECKNO( bid ) == FALSE )return FALSE; + if( bid >= 10 ){ + pEntry = BattleArray[battleindex].Side[1].Entry; + bid -= SIDE_OFFSET; + }else{ + pEntry = BattleArray[battleindex].Side[0].Entry; + } + if( pEntry[bid].flg & BENT_FLG_ULTIMATE ) return TRUE; + else return TRUE; +} +#endif + +int BATTLE_Index2No( + int battleindex, + int charaindex +) +{ + BATTLE_ENTRY *pEntry; + int i, j; + + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return -1; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return -1; + + for( j = 0; j < 2; j ++ ){ + pEntry = BattleArray[battleindex].Side[j].Entry; + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + if( pEntry[i].charaindex == charaindex ){ + return i + j * SIDE_OFFSET; + } + } + } + + return -1; + +} + + +char *BATTLE_CharTitle( int charaindex ) +{ + char *pName; + static char Len0Buff[2] = ""; + + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET ){ + pName = Len0Buff; + }else{ + pName = CHAR_getChar( charaindex, CHAR_OWNTITLE ); + if( pName[0] == 0 ){ + pName = Len0Buff; + } + } + return pName; +} + + +int BATTLE_CharaBackUp( int battleindex ) +{ + int i, j, k, charaindex; + BATTLE *pBattle; + + if( BATTLE_CHECKINDEX( battleindex ) == FALSE ){ + return BATTLE_ERR_BATTLEINDEX; + } + + pBattle = &BattleArray[battleindex]; + k = 0; + + for( j = 0; j < 2; j ++ ){ + k = j * SIDE_OFFSET; + for( i = 0; i < BATTLE_ENTRY_MAX/2; i ++ ){ + charaindex = pBattle->Side[j].Entry[i].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == TRUE + && CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER + ){ + pBattle->iEntryBack[k] = pBattle->Side[j].Entry[i].charaindex; + pBattle->iEntryBack2[k] = pBattle->Side[j].Entry[i].charaindex; + }else{ + pBattle->iEntryBack[k] = -1; + pBattle->iEntryBack2[k] = -1; + } + k ++; + } + } + + return 0; +} + + + + +int BATTLE_NewEntry( + int charaindex, + int battleindex, + int side +) +{ + BATTLE_ENTRY *pEntry; + BATTLE *pBattle; + int i, iEntryMax, iEntryFirst; + + if( BATTLE_CHECKSIDE( side ) == FALSE )return BATTLE_ERR_PARAM; + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return BATTLE_ERR_CHARAINDEX; + + pBattle = &BattleArray[battleindex]; + + if( pBattle->use == FALSE )return BATTLE_ERR_NOUSE; + + if( side < 0 || side > 1 ){ + return BATTLE_ERR_PARAM; + } + + switch( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) ){ + int work; + + case CHAR_TYPEPLAYER: + if( pBattle->Side[side].type != BATTLE_S_TYPE_PLAYER ){ + return BATTLE_ERR_TYPE; + } + iEntryFirst = 0; + iEntryMax = BATTLE_PLAYER_MAX; + break; + case CHAR_TYPEENEMY: + if( pBattle->Side[side].type != BATTLE_S_TYPE_ENEMY ){ + return BATTLE_ERR_TYPE; + } + iEntryFirst = 0; + iEntryMax = BATTLE_ENTRY_MAX; + break; + case CHAR_TYPEPET: + if( pBattle->Side[side].type != BATTLE_S_TYPE_PLAYER ){ + return BATTLE_ERR_TYPE; + } + + work = CHAR_getWorkInt( charaindex, CHAR_WORKPLAYERINDEX ); + pEntry = pBattle->Side[side].Entry; + + work = BATTLE_Index2No( battleindex, work ); + work -= side * SIDE_OFFSET; + work += 5; + iEntryFirst = work; + iEntryMax = work+1; + break; + default: + print( "不明(%s)(%d)\n", + CHAR_getUseName( charaindex ), + CHAR_getInt( charaindex, CHAR_WHICHTYPE ) ); + return BATTLE_ERR_TYPE; + } + + + pEntry = pBattle->Side[side].Entry; + + for( i = iEntryFirst; i < iEntryMax; i ++ ){ + if( pEntry[i].charaindex == -1 )break; + } + + if( i == iEntryMax ){ + return BATTLE_ERR_ENTRYMAX; + } + + EntryInit( &pEntry[i] ); + + pEntry[i].charaindex = charaindex; + + pEntry[i].bid = i + side * SIDE_OFFSET; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEINDEX, + battleindex ); + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, + BATTLE_CHARMODE_INIT ); + // shan 2001/12/27 Begin + { + int fd; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE)==CHAR_TYPEPLAYER ){ + fd = CHAR_getWorkInt( charaindex, CHAR_WORKFD); + CONNECT_SetBattleRecvTime( fd, &NowTime); + } + } + // End + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLESIDE, side ); + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEFLG, 0 ); + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, -1 ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, -1 ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM3, -1 ); + + CHAR_setWorkInt( charaindex, CHAR_WORKMODATTACK, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORKMODDEFENCE, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORKMODQUICK, 0 ); + + CHAR_setWorkInt( charaindex, CHAR_WORKDAMAGEABSROB, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORKDAMAGEREFLEC, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORKDAMAGEVANISH, 0 ); + + + CHAR_setWorkInt( charaindex, CHAR_WORKMODCAPTURE, 0 ); + + CHAR_setFlg( charaindex, CHAR_ISATTACKED, 1 ); + + BATTLE_BadStatusAllClr( charaindex ); + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEWATCH, 0 ); + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + CHAR_setWorkInt( charaindex, CHAR_WORKTRAP, 0 ); //陷阱 + BATTLE_ProfessionStatus_init( battleindex, charaindex ); +#endif + +#ifdef _PETSKILL_ACUPUNCTURE + CHAR_setWorkInt( charaindex, CHAR_WORKACUPUNCTURE, 0 );//针刺外皮 +#endif + +#ifdef _PETSKILL_RETRACE + CHAR_setWorkInt( charaindex, CHAR_WORKRETRACE, 0 );//追迹攻击 +#endif + +#ifdef _PETSKILL_BECOMEFOX //将媚惑术中招时间清除为-1 + CHAR_setWorkInt( charaindex, CHAR_WORKFOXROUND, -1 ); +#endif +#ifdef _PROFESSION_ADDSKILL + //结界清除 + CHAR_setWorkInt( charaindex, CHAR_WORKFIXEARTHAT_BOUNDARY, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORKFIXWATERAT_BOUNDARY, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORKFIXFIREAT_BOUNDARY, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORKFIXWINDAT_BOUNDARY, 0 ); + CHAR_setWorkInt( charaindex, CHAR_DOOMTIME, 0 );//世界末日集气 + CHAR_setWorkInt( charaindex, CHAR_WORK_com1, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORK_toNo, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORK_mode, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORK_skill_level, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORK_array, 0 ); +#endif + return 0; +} + +INLINE int _BATTLE_Exit( char *file, int line, int charaindex ,int battleindex) +{ + BATTLE_ENTRY *pEntry; + int i, j, k; + BATTLE *pBattle; + char szPet[32]; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return BATTLE_ERR_CHARAINDEX; + if( BATTLE_CHECKINDEX( battleindex ) == FALSE ){ + return BATTLE_ERR_BATTLEINDEX; + } +#ifdef _PROFESSION_ADDSKILL + CHAR_setWorkInt( charaindex, CHAR_DOOMTIME, 0 );//世界末日集气 +#endif +#ifdef _PETSKILL_BECOMEFOX // 离开战斗时将媚惑术造成的变身效果清除 + //print("\n检查图号:%s,%d", CHAR_getChar( charaindex, CHAR_NAME), CHAR_getInt( charaindex, CHAR_BASEIMAGENUMBER)); + + if( CHAR_getInt( charaindex, CHAR_BASEIMAGENUMBER)==101749 + || CHAR_getWorkInt( charaindex, CHAR_WORKFOXROUND ) != -1 ){ //变成小狐狸 + CHAR_setInt( charaindex, CHAR_BASEIMAGENUMBER, CHAR_getInt( charaindex, CHAR_BASEBASEIMAGENUMBER) ); + CHAR_setWorkInt( charaindex, CHAR_WORKFOXROUND, -1); + //print("\n变回去:%d",CHAR_getInt( charaindex, CHAR_BASEIMAGENUMBER)); + } +#endif + +#ifdef _PETSKILL_BECOMEPIG + if( CHAR_getInt( charaindex, CHAR_BECOMEPIG) > -1 + && CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + CHAR_setInt( charaindex, CHAR_BASEIMAGENUMBER, CHAR_getInt( charaindex, CHAR_BECOMEPIG_BBI ) ); + CHAR_complianceParameter( charaindex ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( charaindex , CHAR_WORKOBJINDEX )); + CHAR_send_P_StatusString( charaindex , CHAR_P_STRING_BASEBASEIMAGENUMBER); + } +#endif + + +#ifdef _MAGIC_NOCAST // 精灵:沉默 + // WON ADD + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ) + lssproto_NC_send( getfdFromCharaIndex( charaindex ), 0);//复原 +#endif + pBattle = &BattleArray[battleindex]; + if( pBattle->use == FALSE ) + return BATTLE_ERR_NOUSE; + + for( j = 0; j < 2; j ++ ){ + pEntry = pBattle->Side[j].Entry; + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + if( pEntry[i].charaindex != charaindex ) + continue; + pEntry[i].charaindex = -1; + pEntry[i].escape = 0; + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_FINAL ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEINDEX, -1 ); +#ifdef _LOSE_FINCH_ + CHAR_setWorkInt( charaindex, CHAR_WORKSPETRELIFE, 0); +#endif + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEENEMY ){ + CHAR_endCharOneArray( charaindex ); + }else if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + int petindex = pEntry[i+5].charaindex; + if( CHAR_getFlg( charaindex, CHAR_ISDIE ) == TRUE + || CHAR_getInt( charaindex, CHAR_HP ) == TRUE ) + { + +#ifdef _ACTION_BULLSCR +#ifndef _BULL_CUTBULLSCR + { + if( CHAR_getInt( charaindex, CHAR_ABULLSTART) == 10 ){ + char buf[256]; + sprintf( buf, "因战斗中倒地,活动积分不予计算。"); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + } + } +#endif +#endif + +#ifdef _FIX_SPEED_UPLEVEL // WON ADD 修正加速 + // Robin cancel + //if( CHAR_getFlg( charaindex, CHAR_ISDIE ) == TRUE ){ + //}else + { + // Robin cancel + //if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1) != BATTLE_COM_ESCAPE ) + { + unsigned int Dtimes; + unsigned int battletime; + int fd = getfdFromCharaIndex( charaindex ); + Dtimes = BattleArray[battleindex].CreateTime; + battletime = (unsigned int)(BattleArray[battleindex].flgTime/100); + + //if( CHAR_getWorkInt( charaindex, CHAR_WORKFLG) & WORKFLG_DEBUGMODE ){ + //}else + { + CheckDefBTime( charaindex, fd, Dtimes, battletime, 10);//lowTime延迟时间 + } + } + } +#endif + CHAR_setFlg( charaindex, CHAR_ISDIE, 0 ); + CHAR_setInt( charaindex, CHAR_HP, 1 ); + // CoolFish: Faily PK 2001/8/3 + CHAR_setWorkInt(charaindex, CHAR_WORKFMPKFLAG, -1); + + }else { +#ifdef _BATTLE_TIMESPEED + // Robin cancel + //if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1) != BATTLE_COM_ESCAPE ) + { + unsigned int Dtimes; + unsigned int battletime; + + int fd = getfdFromCharaIndex( charaindex ); + Dtimes = BattleArray[battleindex].CreateTime; + battletime = (unsigned int)(BattleArray[battleindex].flgTime/100); + //if( CHAR_getWorkInt( charaindex, CHAR_WORKFLG) & WORKFLG_DEBUGMODE ) { + //}else + { + CheckDefBTime( charaindex, fd, Dtimes, battletime, 0);//lowTime延迟时间 + } + } +#endif +#ifdef _ACTION_BULLSCR +#ifndef _BULL_CUTBULLSCR + + if( CHAR_getInt( charaindex, CHAR_ABULLSTART) == 10 && + BattleArray[battleindex].CreateTime > 0 ) { + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1) != BATTLE_COM_ESCAPE && + CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEWATCH ) != 1 ) { + char buf[256]; + unsigned int Dtimes; + int ntime, deftime=0,Scount=0; + int nowtime = (unsigned int)time(NULL);//CHAR_BULLSHOWCOUNT + Scount = CHAR_getWorkInt( charaindex, CHAR_BULLSHOWCOUNT); + if( Scount < 0 ) Scount = 0; + ntime = CHAR_getInt( charaindex, CHAR_ABULLTIME); + Dtimes = BattleArray[battleindex].CreateTime; + deftime = (nowtime - (int)Dtimes)-5; + if( ntime < 0 ) ntime = 0; + if( deftime > (60*60) ) deftime = (60*60); + if( deftime < 0 ) deftime = 0; + + if( CHAR_getWorkInt( charaindex, CHAR_WORKGETEXP) > + (BattleArray[battleindex].enemynum * 2) || + BattleArray[battleindex].type == BATTLE_TYPE_P_vs_P){ + ntime = (ntime + deftime); + Scount += deftime; + if( Scount >= (5*60) ){ + Scount = 0; + sprintf( buf, "战斗时间已累积%d分%d秒。", ntime/60, ntime%60); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + } + CHAR_setWorkInt( charaindex, CHAR_BULLSHOWCOUNT, Scount); + CHAR_setInt( charaindex, CHAR_ABULLTIME, ntime); + if( ntime >= (60*60) ){//活动一小时 + //if( ntime > 10 ){//测试加快 //CHAR_setWorkInt( charaindex, CHAR_WORKGETEXP, 0 ); + int nScore = CHAR_getInt( charaindex, CHAR_ABULLSCORE); + ntime = ntime - (60*60); + ntime = ( ntime<0)?0:ntime; + CHAR_setInt( charaindex, CHAR_ABULLTIME, ntime); + CHAR_setInt( charaindex, CHAR_ABULLSCORE, nScore+10 ); + sprintf( buf, "战斗满1小时时间取得10分,总共取得%d绩分。", nScore+10); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + } + }else{ + sprintf( buf, "因此场战斗取得经验值不足,活动积分不予计算。"); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + } + }else{ + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1) == BATTLE_COM_ESCAPE){ + char buf[256]; + sprintf( buf, "因战斗逃跑,活动积分不予计算。"); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + } + } + } + //BattleArray[battleindex].CreateTime = 0; +#endif +#endif + } + if( CHAR_CHECKINDEX( petindex ) == TRUE ){ + pEntry[i+5].charaindex = -1; + CHAR_setWorkInt( petindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_NONE ); + CHAR_setWorkInt( petindex, CHAR_WORKBATTLEINDEX, -1 ); + } + BATTLE_BadStatusAllClr( charaindex ); + CHAR_complianceParameter( charaindex ); + CHAR_Skillupsend( charaindex ); + // Robin 0730 + if( CHAR_getWorkInt( charaindex, CHAR_WORKPETFALL) ) + { + CHAR_setWorkInt( charaindex, CHAR_WORKPETFALL, 0 ); + CHAR_setInt( charaindex, CHAR_RIDEPET, -2 ); + } + CHAR_send_P_StatusString( charaindex , + CHAR_P_STRING_HP|CHAR_P_STRING_EXP| + CHAR_P_STRING_MP|CHAR_P_STRING_DUELPOINT| + CHAR_P_STRING_CHARM | + CHAR_P_STRING_EARTH | + CHAR_P_STRING_WATER | + CHAR_P_STRING_FIRE | + CHAR_P_STRING_WIND | + CHAR_P_STRING_RIDEPET + ); + // Robin 0730 + if( CHAR_getInt( charaindex, CHAR_RIDEPET ) == -2 ){ + CHAR_setInt( charaindex, CHAR_RIDEPET, -1 ); + } + for( k = 0; k < CHAR_MAXPETHAVE; k ++ ){ + petindex = CHAR_getCharPet( charaindex, k ); + if( CHAR_CHECKINDEX( petindex ) == FALSE )continue; + if( CHAR_getInt( petindex, CHAR_MAILMODE) != CHAR_PETMAIL_NONE ) continue; + if( CHAR_getFlg( petindex, CHAR_ISDIE ) == TRUE + || CHAR_getInt( petindex, CHAR_HP ) <= 0 ){ + CHAR_setFlg( petindex, CHAR_ISDIE, 0 ); + CHAR_setInt( petindex, CHAR_HP, 1 ); + } + CHAR_setWorkInt( petindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_NONE ); +#ifdef _LOSE_FINCH_ + CHAR_setWorkInt( charaindex, CHAR_WORKSPETRELIFE, 0); +#endif +#ifdef _VARY_WOLF + if( CHAR_getInt( petindex, CHAR_BASEBASEIMAGENUMBER) != CHAR_getInt( petindex, CHAR_BASEIMAGENUMBER) ) // Robin fix + { + CHAR_setInt( petindex, CHAR_BASEIMAGENUMBER, CHAR_getInt( petindex, CHAR_BASEBASEIMAGENUMBER)); + sprintf( szPet, "K%d", k); + CHAR_sendStatusString( charaindex , szPet); + } +#endif +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + // 遗忘 + if( CHAR_getWorkInt( petindex, CHAR_WORKOBLIVION ) > 0 ) // Robin fix + { + int pet_no = CHAR_getInt( charaindex, CHAR_DEFAULTPET ); + CHAR_setWorkInt( petindex, CHAR_WORKOBLIVION, 0 ); + // 宠物编号 + sprintf( szPet, "W%d", pet_no); + CHAR_sendStatusString( charaindex , szPet); + } +#endif + BATTLE_BadStatusAllClr( petindex ); + CHAR_complianceParameter( petindex ); + CHAR_send_K_StatusString( charaindex , k, + CHAR_K_STRING_HP|CHAR_K_STRING_EXP| + CHAR_K_STRING_AI| CHAR_K_STRING_MP | + CHAR_K_STRING_ATK | CHAR_K_STRING_DEF | + CHAR_K_STRING_QUICK | + CHAR_K_STRING_EARTH | + CHAR_K_STRING_WATER | + CHAR_K_STRING_FIRE | + CHAR_K_STRING_WIND + ); + } + if( BattleArray[battleindex].type == BATTLE_TYPE_P_vs_P ){ + int flg = 0; + CHAR_setFlg( charaindex, CHAR_ISDUEL, 0); + if( CHAR_getFlg( charaindex, CHAR_ISPARTY)) flg |= CHAR_FS_PARTY; + if( CHAR_getFlg( charaindex, CHAR_ISDUEL)) flg |= CHAR_FS_DUEL; + if( CHAR_getFlg( charaindex, CHAR_ISPARTYCHAT)) flg |= CHAR_FS_PARTYCHAT; + if( CHAR_getFlg( charaindex, CHAR_ISTRADECARD)) flg |= CHAR_FS_TRADECARD; +#ifdef _CHANNEL_MODIFY + if( CHAR_getFlg( charaindex, CHAR_ISTELL)) flg |= CHAR_FS_TELL; + if( CHAR_getFlg( charaindex, CHAR_ISFM)) flg |= CHAR_FS_FM; + if( CHAR_getFlg( charaindex, CHAR_ISOCC)) flg |= CHAR_FS_OCC; + if( CHAR_getFlg( charaindex, CHAR_ISCHAT)) flg |= CHAR_FS_CHAT; + if( CHAR_getFlg( charaindex, CHAR_ISSAVE)) flg |= CHAR_FS_SAVE; +#endif + lssproto_FS_send( getfdFromCharaIndex(charaindex), flg); + } + + lssproto_XYD_send( getfdFromCharaIndex(charaindex), + CHAR_getInt( charaindex, CHAR_X ), + CHAR_getInt( charaindex, CHAR_Y ), + CHAR_getInt( charaindex, CHAR_DIR ) ); + } + break; + } + } + CHAR_PartyUpdate( charaindex, CHAR_N_STRING_HP ); + +#ifdef _TIME_TICKET + { + int nowtime = time(NULL); + int tickettime = CHAR_getWorkInt( charaindex, CHAR_WORKTICKETTIME); + int totaltime; + char msg[1024]; + if( tickettime > 0 && tickettime < nowtime ) { + //int floor, x, y; + CHAR_talkToCli( charaindex, -1, "谢谢光顾。", CHAR_COLORYELLOW); + if( CHAR_getWorkInt( charaindex, CHAR_WORKTICKETTIMESTART) > 0 ) { + totaltime = nowtime - CHAR_getWorkInt( charaindex, CHAR_WORKTICKETTIMESTART); + sprintf( msg, "总入场时间%d分%d秒。", totaltime/60, totaltime%60); + CHAR_talkToCli( charaindex, -1, msg, CHAR_COLORYELLOW); + } + CHAR_setWorkInt( charaindex, CHAR_WORKTICKETTIME, 0); + CHAR_setWorkInt( charaindex, CHAR_WORKTICKETTIMESTART, 0); + /*if( CHAR_getElderPosition( CHAR_getInt( charaindex, CHAR_LASTTALKELDER), &floor, &x, &y ) != TRUE ) { + CHAR_warpToSpecificPoint( charaindex, 1006, 15, 15); + } + else { + CHAR_warpToSpecificPoint( charaindex, floor, x, y); + }*/ + CHAR_warpToSpecificPoint( charaindex, 7001, 41, 6); + } + } +#endif + + return BATTLE_ERR_NONE; +} + + +int BATTLE_PetDefaultExit( + int charaindex, + int battleindex +) +{ + int pno, pindex, iRet; + + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return BATTLE_ERR_CHARAINDEX; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER) return 0; + pno = CHAR_getInt( charaindex, CHAR_DEFAULTPET ); + if( pno < 0 )return 0; + pindex = CHAR_getCharPet( charaindex, pno ); + + iRet = BATTLE_Exit( pindex, battleindex ); + + if( iRet ){ + iRet *= -1; + }else{ + return 1; + } + + return iRet; +} + + +int BATTLE_PetDefaultEntry( + int charaindex, + int battleindex, + int side +) +{ + int pindex; + +#if 1 + int pno; + + int ret = 0; + + pno = CHAR_getInt( charaindex, CHAR_DEFAULTPET ); + if( pno == -1 ) return 0; + pindex = CHAR_getCharPet( charaindex, pno ); + + if( CHAR_CHECKINDEX( pindex ) && + + !CHAR_getFlg( pindex, CHAR_ISDIE ) && + CHAR_getInt( pindex, CHAR_HP ) > 0 ) + { + if( BATTLE_NewEntry( pindex, battleindex, side ) ){ + }else{ + ret = 0; + } + } + else { + CHAR_setInt( charaindex, CHAR_DEFAULTPET, -1 ); + } + + return ret; +#else + + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ){ + pindex = CHAR_getCharPet( charaindex, i ); + + if( CHAR_CHECKINDEX( pindex ) == FALSE )continue; + + if( CHAR_getFlg( pindex, CHAR_ISDIE ) == TRUE )continue; + if( CHAR_getInt( pindex, CHAR_HP ) <= 0 )continue; + + if( BATTLE_NewEntry( pindex, battleindex, side ) ){ + }else{ + CHAR_setInt( charaindex, CHAR_DEFAULTPET, i ); + break; + } + } + + if( i == CHAR_MAXPETHAVE ){ + CHAR_setInt( charaindex, CHAR_DEFAULTPET, -1 ); + } + return 0; +#endif +} + +int BATTLE_RescueEntry( int charaindex, int toindex ) +{ + int iRet = 0, battleindex, fd, pindex; + char szBuffer[256]=""; + +#ifdef _BATTLE_TIMESPEED + fd = getfdFromCharaIndex( charaindex); + if( CONNECT_getBDTime( fd) > time( NULL) ) { + return 1; + } +#endif + + battleindex = CHAR_getWorkInt( toindex, CHAR_WORKBATTLEINDEX ); + if( !BATTLE_CHECKINDEX( battleindex) ) return 1; + if( ( fd = getfdFromCharaIndex(charaindex) ) < 0 ) return 1; + + if( CHAR_getWorkInt( toindex, CHAR_WORKBATTLEMODE ) == BATTLE_CHARMODE_FINAL + || CHAR_getWorkInt( toindex, CHAR_WORKBATTLEINDEX ) == -1 ){ + iRet = 1; + } + + if( BattleArray[battleindex].type == BATTLE_TYPE_P_vs_P ){ + iRet = 1; + }else{ + iRet = BATTLE_NewEntry( + charaindex, + battleindex, + CHAR_getWorkInt( toindex, CHAR_WORKBATTLESIDE ) ); + } + + if( iRet == 0 ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_RESCUE ); + iRet = BATTLE_PetDefaultEntry( + charaindex, + battleindex, + CHAR_getWorkInt( toindex, CHAR_WORKBATTLESIDE ) + ); + } + + + + if( iRet == 0 ){ + int flg; + if( CHAR_getInt( charaindex, CHAR_DEFAULTPET ) >= 0 ){ + pindex = CHAR_getCharPet( charaindex, CHAR_getInt( charaindex, CHAR_DEFAULTPET ) ); + CHAR_setWorkInt( pindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_RESCUE ); + } + //snprintf( szBuffer, sizeof( szBuffer ), "(%s)加入作战。", + // CHAR_getUseName( charaindex ) ); + //BATTLE_BroadCast( battleindex, szBuffer, CHAR_COLORYELLOW ); + if( ( fd = getfdFromCharaIndex(charaindex) ) != -1 ){ + lssproto_EN_send( fd, BattleArray[battleindex].type, BattleArray[battleindex].field_no ); + } + flg = (BattleArray[battleindex].Side[ + CHAR_getWorkInt( toindex, CHAR_WORKBATTLESIDE)].flg + & BSIDE_FLG_HELP_OK)? TRUE:FALSE; + lssproto_HL_send( fd, flg); + sprintf( szBuffer, "BP|%X|%X|%X", + BATTLE_Index2No( battleindex, charaindex ), BP_FLG_JOIN, CHAR_getInt(charaindex, CHAR_MP ) ); + BATTLE_CommandSend( charaindex, szBuffer ); + }else{ + snprintf( szBuffer, sizeof( szBuffer ), "无法参战。" ); + CHAR_talkToCli( charaindex, -1, szBuffer, CHAR_COLORYELLOW); + if( ( fd = getfdFromCharaIndex(charaindex) ) != -1 ){ + lssproto_EN_send( fd, FALSE, BattleArray[battleindex].field_no ); + } + } + BATTLE_ClearGetExp( charaindex ); + return iRet; +} + +BOOL BATTLE_RescueTry( int charaindex) +{ + int x,y; + OBJECT object; + int pfound = FALSE; + int result = FALSE; + int fd; + int i; + int cnt; + + fd = getfdFromCharaIndex( charaindex); + if( fd == -1 ) return FALSE; +#if 1 // 修正利用参战重复加入战斗 Robin + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE) { + CHAR_talkToCli( charaindex, -1, " 重复加入战斗! ", CHAR_COLORRED); + print("\n 改封包!!重复加入战斗!:%s ", CHAR_getChar( charaindex, CHAR_CDKEY) ); + //lssproto_EN_send( fd, FALSE, 0 ); + return FALSE; + } +#endif + if( CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE ) { + lssproto_EN_send( fd, FALSE, 0 ); + return FALSE; + } +#ifdef _BATTLE_TIMESPEED + if( CONNECT_getBDTime( fd) > time( NULL) ) { + return FALSE; + } +#endif + for( i = 0; i < CONNECT_WINDOWBUFSIZE; i ++ ) { + CONNECT_setBattlecharaindex(fd,i,-1); + } + CHAR_getCoordinationDir( CHAR_getInt( charaindex, CHAR_DIR ) , + CHAR_getInt( charaindex , CHAR_X ), + CHAR_getInt( charaindex , CHAR_Y ) , + 1 , &x , &y ); + + cnt = 0; + for( object = MAP_getTopObj( CHAR_getInt( charaindex, CHAR_FLOOR),x,y) ; + object ; + object = NEXT_OBJECT(object ) ) + { + int toindex; + int objindex = GET_OBJINDEX(object); + if( OBJECT_getType( objindex) != OBJTYPE_CHARA) continue; + toindex = OBJECT_getIndex( objindex); + if( CHAR_getInt( toindex, CHAR_WHICHTYPE) != CHAR_TYPEPLAYER ) continue; + pfound = TRUE; + if( CHAR_getWorkInt( toindex, CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE ){ + continue; + } + if( BattleArray[ CHAR_getWorkInt( toindex, CHAR_WORKBATTLEINDEX)].type + != BATTLE_TYPE_P_vs_E ){ + continue; + } + if( !(BattleArray[CHAR_getWorkInt( toindex,CHAR_WORKBATTLEINDEX)].Side[ + CHAR_getWorkInt( toindex, CHAR_WORKBATTLESIDE)].flg + & BSIDE_FLG_HELP_OK)){ + continue; + } + CONNECT_setBattlecharaindex( fd, cnt, toindex ); + cnt++; + if( cnt == CONNECT_WINDOWBUFSIZE ) break; + } + if( cnt == 0 ) { + if( pfound == FALSE ) { + CHAR_talkToCli( charaindex, -1, "那里没有任何人。", + CHAR_COLORYELLOW); + } + lssproto_EN_send( fd, FALSE, 0 ); + }else if( cnt == 1 ) { + if( BATTLE_RescueEntry( charaindex, + CONNECT_getBattlecharaindex(fd,0) ) ){ + CHAR_talkToCli( charaindex, -1, "无法参战。", CHAR_COLORYELLOW); + }else { + result = TRUE; + } + }else if( cnt > 1 ) { + int strlength; + char msgbuf[1024]; + char escapebuf[2048]; + strcpy( msgbuf, "1\n加入谁的战斗呢?\n"); + strlength = strlen( msgbuf); + for( i = 0; + CONNECT_getBattlecharaindex( fd,i ) != -1 + && i< CONNECT_WINDOWBUFSIZE; i ++ ){ + char *a = CHAR_getChar( CONNECT_getBattlecharaindex(fd,i), CHAR_NAME); + char buf[256]; + snprintf( buf, sizeof( buf),"%s\n", a); + if( strlength + strlen( buf) > arraysizeof( msgbuf)){ + print( "\nerr:%s:%d 视窗的讯息缓冲不足\n", + __FILE__,__LINE__); + break; + } + strcpy( &msgbuf[strlength], buf); + strlength += strlen(buf); + } + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_SELECT, + WINDOW_BUTTONTYPE_CANCEL, + CHAR_WINDOWTYPE_SELECTBATTLE, + -1, + makeEscapeString( msgbuf, escapebuf, sizeof(escapebuf))); + + } + + return result; +} + + + + +BOOL BATTLE_RescueParentTry( int charaindex, int pindex) +{ + int result = FALSE; + if( CHAR_getFlg( charaindex, CHAR_ISDIE)) return FALSE; + if( CHAR_getWorkInt( charaindex, CHAR_WORKPARTYINDEX1) != pindex ) return FALSE; + if( CHAR_getWorkInt( pindex, CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE ){ + return FALSE; + } + if( BATTLE_RescueEntry( charaindex, pindex ) ){ + result = FALSE; + }else{ + result = TRUE; + } + if( result == FALSE ) { + CHAR_talkToCli( charaindex, -1, "无法参战。", CHAR_COLORYELLOW); + } + return result; +} + +int BATTLE_PartyNewEntry( + int charaindex, + int battleindex, + int side +) +{ + int iRet = 0, i, work; +#if 1 + + iRet = BATTLE_NewEntry( charaindex, battleindex, side ); + if( iRet )return iRet; + CAflush( charaindex ); + CDflush( charaindex ); + iRet = BATTLE_PetDefaultEntry( charaindex, battleindex, side ); + if( iRet )return iRet; + BATTLE_ClearGetExp( charaindex ); +#endif + + for( i = 1; i < CHAR_PARTYMAX; i ++ ){ + work = CHAR_getWorkInt( charaindex, i + CHAR_WORKPARTYINDEX1 ); + if( CHAR_CHECKINDEX( work ) == FALSE )continue; + if( CHAR_getWorkInt( work, CHAR_WORKBATTLEMODE ) != 0 ){ + continue; + } + iRet = BATTLE_NewEntry( work, battleindex, side ); + if( iRet )break; + CAflush( work ); + CDflush( work ); + iRet = BATTLE_PetDefaultEntry( work, battleindex, side ); + if( iRet )return iRet; + BATTLE_ClearGetExp( work ); + } + return iRet; +} + + + + + + + + + + + + + + +#if 1 + +int BATTLE_WatchNewEntry( + int charaindex, + int battleindex, + int side +) +{ + BATTLE_ENTRY *pEntry; + BATTLE *pBattle; + int iEntryFirst = 0, iEntryMax = BATTLE_ENTRY_MAX, i; + + if( BATTLE_CHECKSIDE( side ) == FALSE )return BATTLE_ERR_PARAM; + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return BATTLE_ERR_CHARAINDEX; + + pBattle = &BattleArray[battleindex]; + + if( pBattle->use == FALSE )return BATTLE_ERR_NOUSE; + + if( side < 0 || side > 1 ){ + return BATTLE_ERR_PARAM; + } + + switch( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) ){ + + + case CHAR_TYPEPLAYER: + if( pBattle->Side[side].type != BATTLE_S_TYPE_PLAYER ){ + return BATTLE_ERR_TYPE; + } + iEntryFirst = 0; + iEntryMax = BATTLE_PLAYER_MAX; + break; + default: + print( "不明(%s)(%d)\n", + CHAR_getUseName( charaindex ), + CHAR_getInt( charaindex, CHAR_WHICHTYPE ) ); + return BATTLE_ERR_TYPE; + } + + + pEntry = pBattle->Side[side].Entry; + + for( i = iEntryFirst; i < iEntryMax; i ++ ){ + if( pEntry[i].charaindex == -1 )break; + } + + if( i == iEntryMax ){ + return BATTLE_ERR_ENTRYMAX; + } + + EntryInit( &pEntry[i] ); + + pEntry[i].charaindex = charaindex; + + pEntry[i].bid = i + side * SIDE_OFFSET; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEINDEX, + battleindex ); + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, + BATTLE_CHARMODE_WATCHINIT ); + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLESIDE, side ); + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEFLG, 0 ); + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, -1 ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, -1 ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM3, -1 ); + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEWATCH, 1 ); + + return 0; +} + + +int BATTLE_WatchPartyNewEntry( + int charaindex, + int battleindex, + int side +) +{ + int iRet = 0, i, work; +#if 1 + + iRet = BATTLE_WatchNewEntry( charaindex, battleindex, side ); + if( iRet )return iRet; + + CAflush( charaindex ); + + CDflush( charaindex ); + +#endif + + for( i = 1; i < CHAR_PARTYMAX; i ++ ){ + + work = CHAR_getWorkInt( charaindex, i + CHAR_WORKPARTYINDEX1 ); + if( CHAR_CHECKINDEX( work ) == FALSE )continue; + + if( CHAR_getWorkInt( work, CHAR_WORKBATTLEMODE ) != 0 ){ + continue; + } + + iRet = BATTLE_WatchNewEntry( work, battleindex, side ); + + if( iRet )break; + + CAflush( work ); + CDflush( work ); + } + return iRet; + +} + + + + +int BATTLE_CreateForWatcher( int charaindex, int topbattleindex ); + +int BATTLE_WatchEntry( + int charaindex, + int toindex + ) +{ + int iRet = 0, battleindex, fd; + char szBuffer[256]=""; + + battleindex = CHAR_getWorkInt( toindex, CHAR_WORKBATTLEINDEX ); + + if( CHAR_getWorkInt( toindex, CHAR_WORKBATTLEMODE ) == BATTLE_CHARMODE_FINAL + || CHAR_getWorkInt( toindex, CHAR_WORKBATTLEMODE ) == BATTLE_CHARMODE_NONE + || CHAR_getWorkInt( toindex, CHAR_WORKBATTLEINDEX ) == -1 + ){ + iRet = 1; + } + + if( iRet == 0 ){ + iRet = BATTLE_CreateForWatcher( charaindex, battleindex ); + } + if( iRet == 0 ){ + //snprintf( szBuffer, sizeof( szBuffer ), "(%s)开始观战。", + // CHAR_getUseName( charaindex ) ); + + //BATTLE_BroadCast( battleindex, szBuffer, CHAR_COLORYELLOW ); + if( ( fd = getfdFromCharaIndex(charaindex) ) != -1 ){ + lssproto_EN_send( fd, BattleArray[battleindex].type, BattleArray[battleindex].field_no ); + } + + sprintf( szBuffer, "BP|%X|%X|%X", + 20, BP_FLG_JOIN, CHAR_getInt(charaindex, CHAR_MP ) ); + BATTLE_CommandSend( charaindex, szBuffer ); + + }else{ + snprintf( szBuffer, sizeof( szBuffer ), "无法观战。" ); + CHAR_talkToCli( charaindex, -1, szBuffer, CHAR_COLORYELLOW); + + if( ( fd = getfdFromCharaIndex(charaindex) ) != -1 ){ + lssproto_EN_send( fd, FALSE, 0 ); + } + } + + return iRet; +} + + + +BOOL BATTLE_WatchTry( int charaindex ) +{ + int x,y; + OBJECT object; + int pfound = FALSE; + int result = FALSE; + int fd; + int i; + int cnt; + + + fd = getfdFromCharaIndex( charaindex); + if( fd == -1 )return FALSE; + + for( i = 0; i < CONNECT_WINDOWBUFSIZE ; i ++ ) { + CONNECT_setBattlecharaindex( fd,i,-1); + } + /* 及蟆及甄 毛 月 */ + CHAR_getCoordinationDir( CHAR_getInt( charaindex, CHAR_DIR ) , + CHAR_getInt( charaindex , CHAR_X ), + CHAR_getInt( charaindex , CHAR_Y ) , + 1 , &x , &y ); + + cnt = 0; + /*愤坌及 及蟆及平乓仿毛潸 允月 */ + for( object = MAP_getTopObj( CHAR_getInt( charaindex, CHAR_FLOOR),x,y) ; + object ; + object = NEXT_OBJECT(object ) ) + { + int toindex; + int objindex = GET_OBJINDEX(object); + /* 平乓仿弁正□元扎卅中 */ + if( OBJECT_getType( objindex) != OBJTYPE_CHARA) continue; + toindex = OBJECT_getIndex( objindex); + /* 皿伊奶乩□元扎卅中 */ + if( CHAR_getInt( toindex, CHAR_WHICHTYPE) != CHAR_TYPEPLAYER ) continue; + pfound = TRUE; + /* 爵 匹卅中卅日戚尺 */ + if( CHAR_getWorkInt( toindex, CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE ){ + continue; + } + + CONNECT_setBattlecharaindex( fd,cnt, toindex ); + cnt++; + if( cnt == CONNECT_WINDOWBUFSIZE ) break; + } + if( cnt == 0 ) { + if( pfound == FALSE ) { + CHAR_talkToCli( charaindex, -1, "那里没有任何人。", + CHAR_COLORYELLOW); + } + // 分木手中卅仁化棋爵撩 + lssproto_EN_send( fd, FALSE, 0 ); + } + /* ㄠ谛仄井中卅中桦宁反巨件玄伉□今六月 */ + else if( cnt == 1 ) { + if( BATTLE_WatchEntry( charaindex,CONNECT_getBattlecharaindex(fd,0)) ) + { + result = FALSE; + } else { + result = TRUE; + } + } + /* 醒谛中凶日它奴件玉它毛请仄化 中宁歹六月 */ + else if( cnt > 1 ) { + int strlength; + char msgbuf[1024]; + char escapebuf[2048]; + strcpy( msgbuf, "1\n观看谁的战斗呢?\n"); + strlength = strlen( msgbuf); + /* 它奴件玉它及丢永本□斥综岳[ + * 爵 及平乓仿及域 + */ + for( i = 0; + CONNECT_getBattlecharaindex( fd,i ) != -1 + && i< CONNECT_WINDOWBUFSIZE; + i ++ ) + { + char *a = CHAR_getChar( CONNECT_getBattlecharaindex(fd,i), + CHAR_NAME); + char buf[256]; + snprintf( buf, sizeof( buf),"%s\n", a); + if( strlength + strlen( buf) > arraysizeof( msgbuf)){ + print( "\nerr:%s:%d 视窗的讯息缓冲不足\n", + __FILE__,__LINE__); + break; + } + strcpy( &msgbuf[strlength], buf); + strlength += strlen(buf); + } + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_SELECT, + WINDOW_BUTTONTYPE_CANCEL, + CHAR_WINDOWTYPE_SELECTBATTLEWATCH, + -1, + makeEscapeString( msgbuf, escapebuf, sizeof(escapebuf))); + } + + return result; +} + + +#endif + + + + + + + +#define MAX_DOUJYOUENEMY 64 +static int DoujyouEnemyTbl[10]; // ㄠㄟ手中日氏仃升 +/*************************************************************** + * 桦乒□玉迕卞衬平乓仿潸 + ***************************************************************/ +int *Doujyou_GetEnemy( int meindex, int charaindex ) +{ + int i; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[1024]; + int ret; + int insert; + int WorkEnemyTbl[MAX_DOUJYOUENEMY]; + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + + /* 赓渝祭 */ + for( i = 0; i < arraysizeof(WorkEnemyTbl); i ++ ) { + WorkEnemyTbl[i] = -1; + } + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "enemyno", buf, sizeof( buf)) + == NULL ) + { + return NULL; + } + + insert = 0; + /* 娄醒卞踏中化丐月衬毛巨件玄伉□今六月 */ + for( i = 0; i < MAX_DOUJYOUENEMY; i ++ ) { + int curEnemy; + char data[128]; + + ret = getStringFromIndexWithDelim( buf,",", i + 1,data, sizeof(data)); + if( ret == FALSE) { + break; + } + + curEnemy = ENEMY_getEnemyArrayFromId( atoi( data)); + if( !ENEMY_CHECKINDEX( curEnemy) ) continue; + WorkEnemyTbl[insert] = curEnemy; + insert ++; + } + // 分木手中卅井匀凶日巨仿□ + if( insert <= 0 )return NULL; + + // ㄠ 仿件母丞涩烂 + DoujyouEnemyTbl[0] = WorkEnemyTbl[RAND( 0, insert-1 )]; + + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "enemypetno", buf, sizeof( buf)) + == NULL ) + { + // 中卅井匀凶日窒手踏井卅中 + DoujyouEnemyTbl[1] = -1; + }else{ + insert = 0; + /* 娄醒卞踏中化丐月衬毛巨件玄伉□今六月 */ + for( i = 0; i < MAX_DOUJYOUENEMY; i ++ ) { + int curEnemy; + char data[128]; + + ret = getStringFromIndexWithDelim( buf,",", i + 1,data, sizeof(data)); + if( ret == FALSE) { + break; + } + + curEnemy = ENEMY_getEnemyArrayFromId( atoi( data)); + if( !ENEMY_CHECKINDEX( curEnemy) ) continue; + WorkEnemyTbl[insert] = curEnemy; + insert ++; + } + // ㄡ 仿件母丞涩烂 + DoujyouEnemyTbl[1] = WorkEnemyTbl[RAND( 0, insert-1 )]; + } + + // ㄢ 仄 + DoujyouEnemyTbl[2] = -1; + + return DoujyouEnemyTbl; +} + + + +static int DoujyouWeponTbl[] = { + -1, + ITEM_FIST, + ITEM_AXE, + ITEM_CLUB, + ITEM_SPEAR, + ITEM_BOW, + ITEM_BOOMERANG, + ITEM_BOUNDTHROW, + ITEM_BREAKTHROW, +}; +int DoujyouRandomWeponSet( int charaindex ){ + int wepon = -1, itemindex; + int work = RAND( 0, arraysizeof( DoujyouWeponTbl ) - 1 ); + switch( DoujyouWeponTbl[work] ){ + case ITEM_AXE: wepon = 0;break; + case ITEM_CLUB: wepon = 100;break; + case ITEM_SPEAR: wepon = 200;break; + case ITEM_BOW: wepon = 2498;break; + case ITEM_BOOMERANG:wepon = 500;break; + case ITEM_BOUNDTHROW:wepon = 600;break; + case ITEM_BREAKTHROW:wepon = 700;break; + } + itemindex = CHAR_getItemIndex( charaindex, CHAR_ARM ); + if( ITEM_CHECKINDEX( itemindex ) == TRUE ){ + ITEM_endExistItemsOne( itemindex ); + } + + if( wepon >= 0 ){ + itemindex = ITEM_makeItemAndRegist( wepon ) ; + CHAR_setItemIndex( charaindex, CHAR_ARM, itemindex ); + ITEM_setWorkInt( itemindex, ITEM_WORKCHARAINDEX, charaindex ); + ITEM_setWorkInt( itemindex, ITEM_WORKOBJINDEX, -1 ); + } + switch( DoujyouWeponTbl[work] ){ + case -1: + case ITEM_AXE: + case ITEM_CLUB: + case ITEM_SPEAR: + return 0; + } + return 1; + +} + +static int BattleERSkill1[]={ +3, 10, 11, 12, 30, 31, 40, 41, 50, 51, 52, 60, 61, 80, 90, 110, 120, 150, 210, +303, 309, 315, 321, 503, 504, 506, 507, 541, 542, 543, 544, 545, 546, 547, 575, 579, 580, +606, 613, 615 }; + +static int BattleERSkill2[]={ +12, 13, 20, 41, 52, 152, 210, 306, 312, 318, 324, 325, 500, 501, 502, 505, +508, 541, 542, 543, 544, 545, 546, 547, 576, 580, 594, 606, 613, 616 }; + +void BATTLE_EnemyRandowSetSkill( int enemyindex, int skillType) +{ + int i; + switch( skillType){ + case 1: + for( i=0; i<7; i++){ + int skillarray, skillID, Ri; + Ri = RAND( 0, arraysizeof( BattleERSkill1) - 1 ); + skillID = BattleERSkill1[Ri]; + skillarray = PETSKILL_getPetskillArray( skillID); + if( PETSKILL_CHECKINDEX( skillarray) == FALSE ){ + CHAR_setPetSkill( enemyindex, i, 1); + //andy_log + print("ANDY EnemyRandowSetSkill( ) skillID:%d array:%d err \n", + skillID, skillarray ); + continue; + } + CHAR_setPetSkill( enemyindex, i, skillID); + } + break; + case 2: + for( i=0; i<7; i++){ + int skillarray, skillID, Ri; + Ri = RAND( 0, arraysizeof( BattleERSkill2) - 1 ); + skillID = BattleERSkill2[Ri]; + skillarray = PETSKILL_getPetskillArray( skillID); + if( PETSKILL_CHECKINDEX( skillarray) == FALSE ){ + CHAR_setPetSkill( enemyindex, i, 1); + //andy_log + print("ANDY *EnemyRandowSetSkill( ) skillID:%d array:%d err \n", + skillID, skillarray ); + continue; + } + CHAR_setPetSkill( enemyindex, i, skillID); + } + break; + default : return; + break; + } + +} + +int BATTLE_CreateVsEnemy( int charaindex, int mode, int npcindex ) +{ + int battleindex, iRet = 0, enemyindex, i, pindex; + int *enemytable = NULL, fd, field_no, baselevel = 0; + int skillType=0; + int EnemyList[20]; + + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return BATTLE_ERR_CHARAINDEX; + +#ifdef _STREET_VENDOR + // 摆摊中不可进入战斗 + if( CHAR_getWorkInt(charaindex,CHAR_WORKSTREETVENDOR) > -1) return BATTLE_ERR_END; +#endif + +#ifdef _ANGEL_SUMMON // 装备使者信物不遇敌 + if( CHAR_getWorkInt(charaindex,CHAR_WORKANGELMODE) == TRUE ) return BATTLE_ERR_END; +#endif + + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ) != BATTLE_CHARMODE_NONE ){ + CHAR_talkToCli( charaindex, -1, "二重遭遇。", CHAR_COLORYELLOW ); + return BATTLE_ERR_ALREADYBATTLE; + } + battleindex = BATTLE_CreateBattle( ); + if( battleindex < 0 )return BATTLE_ERR_NOTASK; + + if( CHAR_CHECKINDEX( npcindex) ){ + skillType = CHAR_getWorkInt( npcindex, CHAR_NPCWORKINT11); + } + + field_no = BATTLE_getBattleFieldNo( + CHAR_getInt( charaindex, CHAR_FLOOR ) , + CHAR_getInt( charaindex, CHAR_X ) , + CHAR_getInt( charaindex, CHAR_Y ) ); + if( field_no > BATTLE_MAP_MAX || field_no < 0 ){ + field_no = RAND( 0, BATTLE_MAP_MAX ); + } + + BattleArray[battleindex].Side[0].type = BATTLE_S_TYPE_PLAYER; + BattleArray[battleindex].Side[1].type = BATTLE_S_TYPE_ENEMY; + BattleArray[battleindex].leaderindex = charaindex; + BattleArray[battleindex].type = BATTLE_TYPE_P_vs_E; + BattleArray[battleindex].createindex = npcindex; + BattleArray[battleindex].field_no = field_no; + //andy_edit 2002/10/23 + /* + if( (iRet = BATTLE_PartyNewEntry( charaindex, battleindex, 0 ) ) ){ + goto BATTLE_CreateVsEnemy_End; + } + */ + BattleArray[battleindex].Side[0].flg &= ~BSIDE_FLG_HELP_OK; + if( mode == 0 ) { + enemytable = ENEMY_getEnemy( charaindex, + CHAR_getInt( charaindex, CHAR_X), + CHAR_getInt( charaindex, CHAR_Y)); + }else if( mode == 1 ) { + enemytable = NPC_Util_getEnemy( npcindex, charaindex); + }else if( mode == 2 ) { + enemytable = Doujyou_GetEnemy( npcindex, charaindex ); + baselevel = CHAR_getInt( npcindex, CHAR_LV ); + BattleArray[battleindex].norisk = 1; + } + if( enemytable == NULL ) { + iRet = BATTLE_ERR_NOENEMY; + goto BATTLE_CreateVsEnemy_End; + } + + for( i = 0; *(enemytable+i)!= -1 && i < arraysizeof( EnemyList )-1; i ++ ){ + EnemyList[i] = *(enemytable+i); + } + EnemyList[i] = -1; + +#ifdef _BATTLE_TIMESPEED + fd = getfdFromCharaIndex( charaindex ); + BattleArray[battleindex].CreateTime = time(NULL); + BattleArray[battleindex].flgTime = 200; // 1/100 sec +#endif + +#ifdef _ACTION_BULLSCR +#ifndef _BULL_CUTBULLSCR + BattleArray[battleindex].enemynum=0; +#endif +#endif + for( i = 0; EnemyList[i] != -1; i ++ ){ + int work; + enemyindex = ENEMY_createEnemy( EnemyList[i], baselevel ); +#ifdef _ACTION_BULLSCR +#ifndef _BULL_CUTBULLSCR + BattleArray[battleindex].enemynum++; +#endif +#endif + if( skillType > 0 ){ + //int ENEMY_RandomChange( int enemyindex, int tempno ){ + BATTLE_EnemyRandowSetSkill( enemyindex, skillType); + } + if( enemyindex < 0 ){ + iRet = BATTLE_ERR_NOENEMY; + goto BATTLE_CreateVsEnemy_End; + } + + if( mode == 2 ){ + if( i == 0 ){ + CHAR_setInt( enemyindex, CHAR_BASEBASEIMAGENUMBER, + CHAR_getInt( npcindex, CHAR_BASEBASEIMAGENUMBER ) ); + CHAR_setInt( enemyindex, CHAR_BASEIMAGENUMBER, + CHAR_getInt( npcindex, CHAR_BASEBASEIMAGENUMBER ) ); + CHAR_setChar( enemyindex, CHAR_NAME, + CHAR_getChar( npcindex, CHAR_NAME ) ); + CHAR_complianceParameter( enemyindex ); + } + } + if( ( iRet = BATTLE_NewEntry( enemyindex, battleindex, 1 ) ) ){ + goto BATTLE_CreateVsEnemy_End; + } + if( CHAR_getInt( enemyindex, CHAR_DUELPOINT ) > 0 ){ + BattleArray[battleindex].dpbattle = 1; + } + work = CHAR_getInt( enemyindex, CHAR_BASEBASEIMAGENUMBER ); + if( 100466 <= work && work <= 100471 ){ + CHAR_setWorkInt( enemyindex, CHAR_WORKBATTLEFLG, + CHAR_getWorkInt( enemyindex, CHAR_WORKBATTLEFLG ) | CHAR_BATTLEFLG_ABIO ); + print( "(%s)无生物\n", CHAR_getUseName( enemyindex ) ); + } + } + //andy_edit 2002/10/23 + if( (iRet = BATTLE_PartyNewEntry( charaindex, battleindex, 0 ) ) ){ + goto BATTLE_CreateVsEnemy_End; + } + { + BATTLE_ENTRY *pEntry, EntryWork; + pEntry = BattleArray[battleindex].Side[1].Entry; + for( i = 0; i < 5; i ++ ){ + EntryWork = pEntry[i]; + pEntry[i] = pEntry[i+5]; + pEntry[i+5] = EntryWork; + pEntry[i].bid = i + SIDE_OFFSET; + pEntry[i+5].bid = i + 5 + SIDE_OFFSET; + } + } + +BATTLE_CreateVsEnemy_End:; + fd = getfdFromCharaIndex( charaindex); + + if( iRet ){ + BATTLE_ExitAll( battleindex ); + BATTLE_DeleteBattle( battleindex ); + if( fd != -1 )lssproto_EN_send( fd, FALSE, field_no ); + }else{ + if( fd != -1 ){ + if( BattleArray[battleindex].dpbattle ){ + lssproto_EN_send( fd, BATTLE_TYPE_DP_BATTLE, field_no ); + }else{ + if( mode == 1 ){ + lssproto_EN_send( fd, BATTLE_TYPE_BOSS_BATTLE, field_no ); + }else{ + lssproto_EN_send( fd, BattleArray[battleindex].type, field_no ); + } + } + }else { + BATTLE_ExitAll( battleindex ); + BATTLE_DeleteBattle( battleindex ); + return iRet; + } + + for( i = 1; i < CHAR_PARTYMAX; i ++ ){ + pindex = CHAR_getWorkInt( charaindex, i + CHAR_WORKPARTYINDEX1 ); + if( CHAR_CHECKINDEX( pindex ) == FALSE )continue; + if( CHAR_getWorkInt( pindex, CHAR_WORKBATTLEMODE ) == + BATTLE_CHARMODE_FINAL ) continue; + fd = getfdFromCharaIndex(pindex); + if( fd != -1 ){ + if( mode == 1 ){ + lssproto_EN_send( fd, BATTLE_TYPE_BOSS_BATTLE, field_no ); + }else{ + lssproto_EN_send( fd, BattleArray[battleindex].type, field_no ); + } + } + } + if( CHAR_getWorkInt( charaindex, CHAR_WORKACTION) != -1 ) { + CHAR_sendWatchEvent( + CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX), + CHAR_ACTSTAND, + NULL, 0, FALSE); + CHAR_setWorkInt( charaindex, CHAR_WORKACTION, -1); + } + CHAR_sendBattleEffect( charaindex, ON); + for( i = 1; i < CHAR_PARTYMAX; i ++ ){ + pindex = CHAR_getWorkInt( charaindex, i + CHAR_WORKPARTYINDEX1 ); + if( CHAR_CHECKINDEX( pindex ) == FALSE )continue; + if( CHAR_getWorkInt( pindex, CHAR_WORKACTION) != -1 ) { + CHAR_sendWatchEvent( + CHAR_getWorkInt( pindex, CHAR_WORKOBJINDEX), + CHAR_ACTSTAND, + NULL, 0, FALSE); + CHAR_setWorkInt( pindex, CHAR_WORKACTION, -1); + } + CHAR_sendBattleEffect( pindex, ON); + } + } + return iRet; +} + +int BATTLE_CreateVsPlayer( int charaindex0, int charaindex1 ) +{ + int battleindex, pindex, field_no, + i, j, charaindex[2], + parent[2], fd, + iRet = 0; + + if( CHAR_CHECKINDEX( charaindex0 ) == FALSE )return BATTLE_ERR_CHARAINDEX; + if( CHAR_CHECKINDEX( charaindex1 ) == FALSE )return BATTLE_ERR_CHARAINDEX; + + if( CHAR_getWorkInt( charaindex0, CHAR_WORKBATTLEMODE ) != BATTLE_CHARMODE_NONE ){ + CHAR_talkToCli( charaindex0, -1, "二重遭遇。", CHAR_COLORYELLOW ); + CHAR_talkToCli( charaindex1, -1, "二重遭遇。", CHAR_COLORYELLOW ); + return BATTLE_ERR_ALREADYBATTLE; + } + if( CHAR_getWorkInt( charaindex1, CHAR_WORKBATTLEMODE ) != BATTLE_CHARMODE_NONE ){ + CHAR_talkToCli( charaindex0, -1, "二重遭遇。", CHAR_COLORYELLOW ); + CHAR_talkToCli( charaindex1, -1, "二重遭遇。", CHAR_COLORYELLOW ); + return BATTLE_ERR_ALREADYBATTLE; + } +#ifdef _DEATH_CONTEND + if( CHAR_getInt( charaindex0, CHAR_FLOOR) == 8250 || + CHAR_getInt( charaindex0, CHAR_PKLISTLEADER) != 1 || + CHAR_getInt( charaindex0, CHAR_PKLISTTEAMNUM) == -1 || +// CHAR_getWorkInt( charaindex0, CHAR_WORKPARTYMODE ) != CHAR_PARTY_LEADER || + CHAR_getInt( charaindex1, CHAR_PKLISTLEADER) != 1 || + CHAR_getInt( charaindex1, CHAR_PKLISTTEAMNUM) == -1 //|| +// CHAR_getWorkInt( charaindex1, CHAR_WORKPARTYMODE ) != CHAR_PARTY_LEADER + + ){ + + + CHAR_talkToCli( charaindex0, -1, "无效战斗。", CHAR_COLORYELLOW ); + CHAR_talkToCli( charaindex1, -1, "无效战斗。", CHAR_COLORYELLOW ); + return BATTLE_ERR_ALREADYBATTLE; + } +/* + + if( PKLIST_CheckPKReapetTeam( + CHAR_getInt( charaindex0, CHAR_PKLISTTEAMNUM), + CHAR_getInt( charaindex1, CHAR_PKLISTTEAMNUM) ) == FALSE ){ + CHAR_talkToCli( charaindex0, -1, "重复战斗。", CHAR_COLORYELLOW ); + CHAR_talkToCli( charaindex1, -1, "重复战斗。", CHAR_COLORYELLOW ); + return BATTLE_ERR_ALREADYBATTLE; + } +*/ +#endif + + field_no = BATTLE_getBattleFieldNo( + CHAR_getInt( charaindex0, CHAR_FLOOR ) , + CHAR_getInt( charaindex0, CHAR_X ), + CHAR_getInt( charaindex0, CHAR_Y ) ); + + charaindex[0] = charaindex0; + charaindex[1] = charaindex1; + for( j = 0; j < 2; j ++ ){ + if( CHAR_getWorkInt( charaindex[j], CHAR_WORKBATTLEMODE ) != 0 ){ + return BATTLE_ERR_ALREADYBATTLE; + } + } + for( j = 0; j < 2; j ++ ){ + if( CHAR_getWorkInt( charaindex[j], CHAR_WORKPARTYMODE ) == CHAR_PARTY_LEADER ){ + parent[j] = charaindex[j]; + }else + if( CHAR_getWorkInt( charaindex[j], CHAR_WORKPARTYMODE ) == CHAR_PARTY_CLIENT ){ + parent[j] = CHAR_getWorkInt( charaindex[j], CHAR_WORKPARTYINDEX1 ); + }else{ + parent[j] = -1; + } + } + if( parent[0] != -1 && parent[0] == parent[1] ){ + return BATTLE_ERR_SAMEPARTY; + } + battleindex = BATTLE_CreateBattle( ); + if( battleindex < 0 )return BATTLE_ERR_NOTASK; + + BattleArray[battleindex].Side[0].type = BATTLE_S_TYPE_PLAYER; + BattleArray[battleindex].Side[1].type = BATTLE_S_TYPE_PLAYER; + BattleArray[battleindex].leaderindex = charaindex0; + BattleArray[battleindex].type = BATTLE_TYPE_P_vs_P; + BattleArray[battleindex].dpbattle = 1; + BattleArray[battleindex].field_no = field_no; +#ifdef _BATTLE_TIMESPEED + BattleArray[battleindex].CreateTime = time(NULL); +#endif + +#ifdef _DEATH_CONTEND//计算胜败func + BattleArray[battleindex].PkFunc = NPC_PKLIST_Finish_Exit; + //winside = 0 + BattleArray[battleindex].menum = CHAR_getInt( charaindex0, CHAR_PKLISTTEAMNUM); + BattleArray[battleindex].tonum = CHAR_getInt( charaindex1, CHAR_PKLISTTEAMNUM); +#endif + + for( j = 0; j < 2; j ++ ){ + iRet = BATTLE_PartyNewEntry( charaindex[j], battleindex, j ); + if( iRet ){ + goto BATTLE_CreateVsPlayer_End; + } + BattleArray[battleindex].Side[j].flg &= ~BSIDE_FLG_HELP_OK; + } +BATTLE_CreateVsPlayer_End:; + if( iRet ){ + BATTLE_ExitAll( battleindex ); + BATTLE_DeleteBattle( battleindex ); + fd = getfdFromCharaIndex(charaindex[0]); + if( fd != -1 )lssproto_EN_send( fd, FALSE, field_no ); + }else{ + for( j = 0; j < 2; j ++ ){ + fd = getfdFromCharaIndex(charaindex[j]); + if( fd != -1 )lssproto_EN_send( fd, BattleArray[battleindex].type, field_no ); + if( CHAR_getWorkInt( charaindex[j], CHAR_WORKACTION) != -1 ) { + CHAR_sendWatchEvent( + CHAR_getWorkInt( charaindex[j], CHAR_WORKOBJINDEX), + CHAR_ACTSTAND, + NULL, 0, FALSE); + CHAR_setWorkInt( charaindex[j], CHAR_WORKACTION, -1); + + } + CHAR_sendBattleEffect( charaindex[j], ON); + for( i = 1; i < CHAR_PARTYMAX; i ++ ){ + pindex = CHAR_getWorkInt( charaindex[j], i + CHAR_WORKPARTYINDEX1 ); + if( CHAR_CHECKINDEX( pindex ) == FALSE )continue; + if( CHAR_getWorkInt( pindex, CHAR_WORKBATTLEMODE ) == + BATTLE_CHARMODE_FINAL ) continue; + + fd = getfdFromCharaIndex(pindex); + if( fd != -1 )lssproto_EN_send( fd, BattleArray[battleindex].type, field_no ); + if( CHAR_getWorkInt( pindex, CHAR_WORKACTION) != -1 ) { + CHAR_sendWatchEvent( + CHAR_getWorkInt( pindex, CHAR_WORKOBJINDEX), + CHAR_ACTSTAND, + NULL, 0, FALSE); + CHAR_setWorkInt( pindex, CHAR_WORKACTION, -1); + + } + CHAR_sendBattleEffect( pindex, ON ); + } + } + } + return iRet; +} + + +//********************************************************* +// +// 棋爵迕田玄伙正旦弁毛馨笛[玄永皿及戚卞涩烂允月 +// +int BATTLE_WatchLink( int topbattleindex, int battleindex ) +// +// +//********************************************************* +{ + BATTLE *pWork, *pTop; + + if( BATTLE_CHECKINDEX( battleindex ) == FALSE ){ + fprint( "err:battle index 奇怪(%d)\n", battleindex ); + return FALSE; + } + if( BATTLE_CHECKINDEX( topbattleindex ) == FALSE ){ + fprint( "err:battle index 奇怪(%d)\n", topbattleindex ); + return FALSE; + } + + pTop = &BattleArray[topbattleindex]; + + if( BATTLE_CHECKADDRESS( pTop ) == FALSE ){ + fprint( "err:battle address 奇怪(%p)\n", pTop ); + return FALSE; + } + + + pWork = pTop->pNext; // 田永弁失永皿 + + if( pWork ){ + if( BATTLE_CHECKADDRESS( pWork ) == FALSE ){ + fprint( "err:battle address 奇怪(%p)\n", pWork ); + return FALSE; + } + } + + // 愤坌毛蟆及戚卞允月 + pTop->pNext = &BattleArray[battleindex]; + // 愤坌及蟆田玄伙毛涩烂 + BattleArray[battleindex].pBefore = pTop; + // 愤坌及戚田玄伙毛涩烂 + BattleArray[battleindex].pNext = pWork; + // 戚及蟆反愤坌 + if( pWork ){ + pWork->pBefore = &BattleArray[battleindex]; + } + return TRUE; +} + +//********************************************************* +// +// 棋爵迕田玄伙正旦弁毛夫午勾 仁 +// +int BATTLE_WatchUnLink( int battleindex ) +// +// +//********************************************************* +{ + BATTLE *pTop; + + if( BATTLE_CHECKINDEX( battleindex ) == FALSE ){ + fprint( "err:battle index 奇怪(%d)\n", battleindex ); + return FALSE; + } + + // 愤坌毛蟆及田玄伙 + pTop = BattleArray[battleindex].pBefore; + + if( pTop ){ + if( BATTLE_CHECKADDRESS( pTop ) == FALSE ){ + fprint( "err:battle address 奇怪(%p)\n", pTop ); + }else{ + // 勾卅亢卅云仄 + pTop->pNext = BattleArray[battleindex].pNext; + } + } + if( BattleArray[battleindex].pNext ){ + if( BATTLE_CHECKADDRESS( BattleArray[battleindex].pNext ) == FALSE ){ + fprint( "err:battle address 奇怪(%p)\n", BattleArray[battleindex].pNext ); + }else{ + BattleArray[battleindex].pNext->pBefore = pTop; + } + } + // 愤坌及蟆田玄伙毛涩烂 + BattleArray[battleindex].pBefore = NULL; + // 愤坌及戚田玄伙反 仄 + BattleArray[battleindex].pNext = NULL; + + return TRUE; + +} + + +//********************************************************* +// +// 棋爵迕卞田玄伙正旦弁毛综岳允月 +// +int BATTLE_CreateForWatcher( int charaindex, int topbattleindex ) +// +// 曰袄 BATTLE_ERR +// +//********************************************************* +{ + int battleindex, field_no , pindex, + i, fd, + iRet = 0; + + // 由仿丢□正民尼永弁 + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return BATTLE_ERR_CHARAINDEX; + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ) != BATTLE_CHARMODE_NONE ){ + CHAR_talkToCli( charaindex, -1, "二重遭遇。", CHAR_COLORYELLOW ); + return BATTLE_ERR_ALREADYBATTLE; + } + + // 允匹卞爵 匹卅中井 + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ) != 0 ){ + return BATTLE_ERR_ALREADYBATTLE; + } + + // 爵 正旦弁毛综岳允月 + battleindex = BATTLE_CreateBattle( ); + if( battleindex < 0 )return BATTLE_ERR_NOTASK;// 正旦弁 苇匹五卅井匀凶巨仿□ + + // 仇切日及讽采反皿伊奶乩□讽采匹丐月午烂聒允月[ + BattleArray[battleindex].Side[0].type = BATTLE_S_TYPE_PLAYER; + // 轾仇丹础及讽采手皿伊奶乩□讽采匹丐月午烂聒允月[ + BattleArray[battleindex].Side[1].type = BATTLE_S_TYPE_PLAYER; + // 伉□母□毛忡绣 + BattleArray[battleindex].leaderindex = charaindex; + // 爵 及正奶皿 + BattleArray[battleindex].type = BATTLE_TYPE_WATCH; + BattleArray[battleindex].mode = BATTLE_MODE_WATCHBC; + // 田玄伙白奴□伙玉 寞 + field_no = BattleArray[battleindex].field_no = BattleArray[topbattleindex].field_no; + BattleArray[battleindex].turn = BattleArray[topbattleindex].turn; + + // 伉件弁今六月 + if( BATTLE_WatchLink( topbattleindex, battleindex ) == FALSE ){ + fprint( "err:battle link error(%d),(%d)\n", + topbattleindex, battleindex ); + // 巨仿□质 匹及 GOTO + goto BATTLE_CreateForWatcher_End; + } + + // 由□ 奴仍午巨件玄伉□ + iRet = BATTLE_WatchPartyNewEntry( charaindex, battleindex, 0 ); + if( iRet ){ + // 巨仿□质 匹及 GOTO + goto BATTLE_CreateForWatcher_End; + } + + +// 巨仿□及桦宁反允什卞戊戊卞 月 +BATTLE_CreateForWatcher_End:; + + if( iRet ){ // 巨仿□互丐匀凶日正旦弁 滋 + // 蝈够 仃月 + BATTLE_ExitAll( battleindex ); + //{爵 正旦弁绰轮 + BATTLE_DeleteBattle( battleindex ); + fd = getfdFromCharaIndex( charaindex ); + if( fd != -1 )lssproto_EN_send( fd, FALSE, field_no ); + }else{ + fd = getfdFromCharaIndex( charaindex ); + /* 巨件市它件玄岳 毛项尹月 */ + if( fd != -1 )lssproto_EN_send( fd, BattleArray[battleindex].type, field_no ); + /* 切禾□术霜月 */ + if( CHAR_getWorkInt( charaindex, CHAR_WORKACTION) != -1 ) { + CHAR_sendWatchEvent( + CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX), + CHAR_ACTSTAND, + NULL, 0, FALSE); + CHAR_setWorkInt( charaindex, CHAR_WORKACTION, -1); + } + /* 爵 失奶戊件 憎CA霜耨 */ + CHAR_sendBattleWatch( CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX ), ON); + + // 醮棉卞手项尹月 + for( i = 1; i < CHAR_PARTYMAX; i ++ ){ + pindex = CHAR_getWorkInt( charaindex, i + CHAR_WORKPARTYINDEX1 ); + if( CHAR_CHECKINDEX( pindex ) == FALSE )continue; + // 切扎氏午巨件市它件玄匹五化卅中卅日霜日卅中 + // FINAL 分匀凶日蟆及爵 苇化中月 + if( CHAR_getWorkInt( pindex, CHAR_WORKBATTLEMODE ) == + BATTLE_CHARMODE_FINAL ) continue; + + fd = getfdFromCharaIndex(pindex); + /* 巨件市它件玄岳 */ + if( fd != -1 )lssproto_EN_send( fd, BattleArray[battleindex].type, field_no ); + /* 切禾□术霜月 */ + if( CHAR_getWorkInt( pindex, CHAR_WORKACTION) != -1 ) { + CHAR_sendWatchEvent( + CHAR_getWorkInt( pindex, CHAR_WORKOBJINDEX), + CHAR_ACTSTAND, + NULL, 0, FALSE); + CHAR_setWorkInt( pindex, CHAR_WORKACTION, -1); + } + /* 爵 失奶戊件 憎CA霜耨 */ + CHAR_sendBattleWatch( CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX ), ON); + } +/* + print( "以(%s)为领队与敌军交手。", + CHAR_getChar( charaindex, CHAR_NAME ) ); +*/ + } + + + return iRet; +} + + + + + + +/*------------------------------------------------------------ + * 爵 毛 蝇允月 + ------------------------------------------------------------*/ +void BATTLE_WatchStop( int charaindex ) +{ + int battleindex; + + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return; + // 平乓仿弁正互中凶日 仃今六月 + BATTLE_Exit( charaindex, battleindex ); + // 由□ 奴 仃月 + CHAR_DischargePartyNoMsg( charaindex ); + + CHAR_talkToCli( charaindex, -1, + "战斗中止。", CHAR_COLORYELLOW ); + + lssproto_B_send( getfdFromCharaIndex( charaindex ), "BU" ); + +} + + + + + + + + + +//************************************************************* +// +// 正□件备潘热诸匹 蛹仄凶由仿丢□正毛俅孺仄化中仁 +// +void BATTLE_TurnParam( + int charaindex, + int fixkind, + int mod, + int last +) +// +// +//************************************************************* +{ + int modparam, fixparam, lastparam; + + if( fixkind == -1 ){ + fixparam = 0; // 葭互 中桦宁反ㄟ + }else{ + fixparam = CHAR_getWorkInt( charaindex, fixkind ); + } + if( last == -1 ){ + lastparam = 0; + }else{ + lastparam = CHAR_getWorkInt( charaindex, last ); + } + modparam = CHAR_getWorkInt( charaindex, mod ); + // 仇仇匹 ≈ 午 及 毛苇化} + // 及袄毛俅孺仄化中仁 + + // 漆反 MODPARAM 毛ㄡㄟ⊙蛹仄化中仁 + modparam *= 0.8; + CHAR_setWorkInt( charaindex, mod, modparam ); + + // 卞笛尹月 + if( last != -1 ){ + CHAR_setWorkInt( + charaindex, + last, + lastparam + modparam * 0.01 ); + } + +} + +void BATTLE_AttReverse( int charaindex ) +{ + int earth, water, fire, wind; + //ttom start because the second had this + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEFLG ) & CHAR_BATTLEFLG_REVERSE ){ + // 鳖仄化月卅日戚尺 + }else{ + // 鳖仄化卅中及匹伉正□件 + return; + } + //ttom end + earth = CHAR_getWorkInt( charaindex, CHAR_WORKFIXEARTHAT ); + water = CHAR_getWorkInt( charaindex, CHAR_WORKFIXWATERAT ); + fire = CHAR_getWorkInt( charaindex, CHAR_WORKFIXFIREAT ); + wind = CHAR_getWorkInt( charaindex, CHAR_WORKFIXWINDAT ); + + CHAR_setWorkInt( charaindex, CHAR_WORKFIXEARTHAT, fire ); + CHAR_setWorkInt( charaindex, CHAR_WORKFIXWATERAT, wind ); + CHAR_setWorkInt( charaindex, CHAR_WORKFIXFIREAT, earth ); + CHAR_setWorkInt( charaindex, CHAR_WORKFIXWINDAT, water ); + +} + +void BATTLE_PreCommandSeq( int battleindex ) +{ + BATTLE_ENTRY *pEntry; + BATTLE *pBattle; + int i, j, charaindex; + BATTLE_CharSendAll( battleindex ); + BATTLE_CharaBackUp( battleindex ); + BattleArray[battleindex].timer = NowTime.tv_sec; + BATTLE_AllCharaCWaitSet( battleindex ); + BATTLE_ActSettingSend( battleindex ); + BattleArray[battleindex].flg |= BATTLE_FLG_FREEDP; + pBattle = &BattleArray[battleindex]; + for( j = 0; j < 2; j ++ ){ + int flg; + pEntry = pBattle->Side[j].Entry; + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + pEntry[i].guardian = -1; + charaindex = pEntry[i].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )continue; + flg = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEFLG ); +//ttom the second only one //flg &= ~CHAR_BATTLEFLG_GUARDIAN; + flg &= ~CHAR_BATTLEFLG_GUARDIAN; + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEFLG, flg ); + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_EARTHROUND0 ) continue; + + CHAR_complianceParameter( charaindex ); + BATTLE_TurnParam( charaindex, + CHAR_WORKFIXSTR, // 猾 + CHAR_WORKMODATTACK, + CHAR_WORKATTACKPOWER + ); + BATTLE_TurnParam( charaindex, + CHAR_WORKFIXTOUGH, // 潮 + CHAR_WORKMODDEFENCE, + CHAR_WORKDEFENCEPOWER + ); + BATTLE_TurnParam( charaindex, + CHAR_WORKFIXDEX, // 豳镀今 + CHAR_WORKMODQUICK, + CHAR_WORKQUICK + ); + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + BATTLE_TurnParam( charaindex, + -1, + CHAR_WORKMODCHARM, // + CHAR_WORKFIXCHARM + ); + } + BATTLE_TurnParam( charaindex, + -1, // 凯 + CHAR_WORKMODCHARM, + -1 + ); + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEFLG ) & CHAR_BATTLEFLG_REVERSE ){ + BATTLE_AttReverse( charaindex ); + } + } + } +} + + +//************************************************** +// +// 棋爵及桦宁及戊穴件玉谨切尺 月凛及域 及 木 +// +void BATTLE_PreWatchWaitSeq( int battleindex ) +// +// +//************************************************** +{ + // 仇及凛鳔匹凛对忡绣 + BattleArray[battleindex].timer = NowTime.tv_sec; + // 蝈够及乒□玉毛戊穴件玉 蟆卞允月 + BATTLE_AllCharaWatchWaitSet( battleindex ); +} +static int BATTLE_Init( int battleindex ) +{ + BATTLE *pBattle; + int iRet = 0; + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX; + pBattle = &BattleArray[battleindex]; + pBattle->mode = BATTLE_MODE_BATTLE; + iRet = BATTLE_SurpriseCheck( battleindex ); + if( iRet == 0 ){ + }else + if( iRet == 1 ){ + BattleArray[battleindex].Side[1].flg |= BSIDE_FLG_SURPRISE; + }else + if( iRet == 2 ){ + BattleArray[battleindex].Side[0].flg |= BSIDE_FLG_SURPRISE; + } + BATTLE_PreCommandSeq( battleindex ); + return 0; +} +int BATTLE_CountEntry( + int battleindex, + int side +) +{ + int i; + BATTLE_ENTRY *pEntry; + int cnt = 0; + + // 由仿丢□正民尼永弁 + if( BATTLE_CHECKSIDE( side ) == FALSE )return -BATTLE_ERR_PARAM; + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return -BATTLE_ERR_BATTLEINDEX; + + // 巨件玄伉□ + pEntry = BattleArray[battleindex].Side[side].Entry; + + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + if( pEntry[i].charaindex != -1 ){ // 平乓仿互中凶日醒尹月 + cnt ++; + } + } + return cnt; +} + +static BOOL BATTLE_CommandWait( int battleindex, int side) +{ + int i, charaindex, BeOk=0; + BATTLE_ENTRY *pEntry; + BOOL iRet = TRUE; + BOOL TimeOut = FALSE; + if( BATTLE_CHECKSIDE( side ) == FALSE )return TRUE;//检查值是否在合法 围 + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return TRUE; + if( BattleArray[battleindex].Side[side].type == BATTLE_S_TYPE_ENEMY ) return TRUE; + pEntry = BattleArray[battleindex].Side[side].Entry; + +#ifdef _BATTLECOMMAND_TIME + if( BattleArray[battleindex].PartTime > 1 && + BattleArray[battleindex].PartTime < time(NULL) ){ + TimeOut = TRUE; + } +#endif + + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + charaindex = pEntry[i].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )continue; + if( CHAR_getFlg( charaindex, CHAR_ISDIE ) == TRUE ){ + continue; + } + switch ( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ) ){ + case BATTLE_CHARMODE_C_OK: + BeOk++; + case BATTLE_CHARMODE_INIT: + case BATTLE_CHARMODE_RESCUE: + case BATTLE_CHARMODE_WATCHINIT: + break; + case BATTLE_CHARMODE_C_WAIT: + { +#ifdef _BATTLECOMMAND_TIME + if( TimeOut == TRUE ){ + //andy_log + print("ANDY TimeOut Exit:%d-[%s|%s]\n", + charaindex, CHAR_getUseName( charaindex), + CHAR_getChar( charaindex, CHAR_CDKEY) ); + + CHAR_talkToCli( charaindex, -1, "超过时间未下指令,强迫离开战斗!", CHAR_COLORYELLOW); + + CHAR_DischargeParty( charaindex, 0);//解散团队 + CHAR_setWorkInt(charaindex, CHAR_WORKFMPKFLAG, -1); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_COMPELESCAPE ); + BATTLE_Exit( charaindex, battleindex ); + lssproto_B_send( getfdFromCharaIndex( charaindex ), "BU" ); +// CONNECT_setCloseRequest( getfdFromCharaIndex( charaindex) , 1 ); + break; + } +#endif + iRet = FALSE; + } + break; + default : + BATTLE_Exit( charaindex, battleindex ); + break; + } + } + + if( BeOk > 0 ){ +#ifdef _BATTLECOMMAND_TIME + if( BattleArray[ battleindex].PartTime <= 0 ){ + //如果战役中有任一人执行指令, 则延迟时间设为120秒 + BattleArray[battleindex].PartTime = (int)time(NULL) + 120; + } +#endif + } + return iRet; +} + + +#ifdef _ITEM_ADDEXP //vincent 经验提升 +#ifdef _ITEM_ADDEQUIPEXP +int BATTLE_GetExp( int charaindex, int midx ) +#else +int BATTLE_GetExp( int charaindex ) +#endif +{ + int addexp,i; + int modexp=0, getexp=0; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return 0; + + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE) == CHAR_TYPEPET) { + int ownerindex = CHAR_getWorkInt( charaindex, CHAR_WORKPLAYERINDEX); + if( CHAR_CHECKINDEX( ownerindex) && CHAR_getWorkInt( ownerindex, CHAR_WORKITEM_ADDEXP) > 0){ + modexp = CHAR_getWorkInt( ownerindex, CHAR_WORKITEM_ADDEXP); + } + }else if(CHAR_getWorkInt(charaindex,CHAR_WORKITEM_ADDEXP) > 0){ + modexp = CHAR_getWorkInt(charaindex,CHAR_WORKITEM_ADDEXP); + } + + getexp = CHAR_getWorkInt( charaindex, CHAR_WORKGETEXP ); +#ifdef _NEWOPEN_MAXEXP + if( getexp > 1000000000 ) getexp = 1000000000; +#endif + if( getexp < 0 ) getexp = 0; + addexp = getexp+((getexp*modexp)/100); +#ifdef _GET_BATTLE_EXP + addexp*=getBattleexp(); +#endif +#ifdef _ITEM_ADDEQUIPEXP + if( CHAR_CHECKINDEX( midx ) ){ + for( i = 0 ; i < CHAR_EQUIPPLACENUM ; i ++ ){ + int id = CHAR_getItemIndex(midx,i);//道具id + if( ITEM_CHECKINDEX(id) ){ + char *arg,*P; + arg = ITEM_getChar(id, ITEM_ARGUMENT );//道具参数 + if( (P = strstr( arg, "EXPUP" )) ){ + if( (P = strstr( arg, "人" )) ){//只对人有效 + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER ) + addexp += getexp*atoi(P+=2)*0.01; + } + else if( (P = strstr( arg, "宠" )) ){//只对宠有效 + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE) == CHAR_TYPEPET + && (CHAR_getInt( midx, CHAR_RIDEPET) != charaindex ) ) + addexp += getexp*atoi(P+=2)*0.01; + } + else if( (P = strstr( arg, "骑" )) ){//只对骑宠有效 + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE) == CHAR_TYPEPET + && (CHAR_getInt( midx, CHAR_RIDEPET) == charaindex ) ) + addexp += getexp*atoi(P+=2)*0.01; + } + else{ + P = strstr( arg, "EXPUP" ); + addexp += getexp*atoi(P+=5)*0.01; + } + } + } + } + } +#endif +#ifdef _ITEM_ADDPETEXP + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE) == CHAR_TYPEPET ) + if( CHAR_getInt( charaindex, CHAR_PETID) == 1163 ) + addexp = 0; + +#endif + addexp = (addexp<0)?0:addexp; + if( CHAR_getInt( charaindex, CHAR_LV) >= CHAR_MAXUPLEVEL ) addexp = 0; + CHAR_setWorkInt( charaindex, CHAR_WORKGETEXP, addexp );//回存CHAR_WORKGETEXP + + CHAR_AddMaxExp( charaindex, addexp); + + return addexp; +} +#else + +#ifdef _ITEM_ADDEQUIPEXP +int BATTLE_GetExp( int charaindex, int midx ) +#else +int BATTLE_GetExp( int charaindex ) +#endif +{ + int addexp, nowexp; + + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return 0; + nowexp = CHAR_getInt( charaindex, CHAR_EXP ); + addexp = CHAR_getWorkInt( charaindex, CHAR_WORKGETEXP ); + // shan 11/27 10^9 1224160000 + CHAR_AddMaxExp( charaindex, addexp); + return addexp; +} +#endif + +int BATTLE_DpCalc( int battleindex ) +{ + BATTLE_ENTRY *pLooseEntry, *pWinEntry; + int winside, looseside, i, charaindex, dpadd, dpall, num = 0; + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX; + + winside = BattleArray[battleindex].winside; + looseside = 1 - winside; + if( winside != 0 && winside != 1 )return BATTLE_ERR_PARAM; + + // 宁煌袄赓渝祭 + dpall = 0; + + // 仃凶 井日 毛畴丹 + pLooseEntry = BattleArray[battleindex].Side[looseside].Entry; + for( i = 0 ; i < BATTLE_ENTRY_MAX; i ++ ){ + charaindex = pLooseEntry[i].charaindex; + // 皿伊奶乩□动陆反饬 仄 + if( CHAR_CHECKINDEX( charaindex ) == FALSE )continue; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER )continue; + // ㄠㄟ坌及ㄠ手日尹月 + dpadd = CHAR_getInt( charaindex, CHAR_DUELPOINT ) * DUELPOINT_RATE; + // 仃凶 卞反 毛穴奶瓜旦涩烂 + CHAR_setWorkInt( charaindex, CHAR_WORKGETEXP, + CHAR_getWorkInt( charaindex, CHAR_WORKGETEXP) - dpadd ); + // 宁煌袄卞笛遥 + dpall += dpadd; + } + + // 今日卞 仆凶曰仄凶谛迕及 毛笛遥 + dpall += BattleArray[battleindex].Side[winside].common_dp; + + pWinEntry = BattleArray[battleindex].Side[winside].Entry; + for( num = 0,i = 0 ; i < BATTLE_ENTRY_MAX; i ++ ){ + charaindex = pWinEntry[i].charaindex; + // 皿伊奶乩□动陆反饬 仄 + if( CHAR_CHECKINDEX( charaindex ) == FALSE )continue; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER )continue; + num++; + } + // 卅兮井 匀凶幻丹卞簿手中卅中 + if( num <= 0 )return BATTLE_ERR_BATTLEINDEX; + dpadd = dpall / num; + if( dpadd <= 0 )dpadd = 1; // 斓匹手ㄠ反芨尹月 + + for( num = 0,i = 0 ; i < BATTLE_ENTRY_MAX; i ++ ){ + charaindex = pWinEntry[i].charaindex; + // 皿伊奶乩□动陆反饬 仄 + if( CHAR_CHECKINDEX( charaindex ) == FALSE )continue; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER )continue; + + // 匀凶 卞反 毛涩烂 + CHAR_setWorkInt( charaindex, CHAR_WORKGETEXP, + CHAR_getWorkInt( charaindex, CHAR_WORKGETEXP) + dpadd ); + } + + return 0; +} + +//#define RS_LIST_MAX 4 // 凛卞窒谛爵 瑛绊霜月井 +#define RS_LIST_MAX 5 +typedef struct{ + int num; + int exp; + int levelup; +}RS_LIST; + +int BATTLE_GetDuelPoint( + int battleindex, // 爵 奶件犯永弁旦 + int side, // 扔奶玉 ㄟ ㄠ + int num // 愤坌反 及窒 及平乓仿井 +) +{ + char szBuffer[1024]=""; + int charaindex; + int dpnow, dpadd; + int fd; + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX; + if( BATTLE_CHECKSIDE( side ) == FALSE )return BATTLE_ERR_PARAM; + if( num < 0 || num >= BATTLE_ENTRY_MAX )return BATTLE_ERR_PARAM; + charaindex = BattleArray[battleindex].Side[side].Entry[num].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return BATTLE_ERR_PARAM; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET ){ + return 0; + } + if( BattleArray[battleindex].Side[side].type != BATTLE_S_TYPE_PLAYER ){ + return 0; + } + dpadd = CHAR_getWorkInt( charaindex, CHAR_WORKGETEXP ); + if( dpadd == 0 ){ + dpadd = 0; // 仇及桦宁反ㄟ + }else + if( dpadd < 0 ){ + dpadd = min( -1, dpadd ); // 剂卅仁午手ㄠ反手日丹 + }else{ + dpadd = max( 1, dpadd ); // 剂卅仁午手ㄠ反手日丹 + } + dpnow = CHAR_getInt( charaindex, CHAR_DUELPOINT ) + dpadd; + dpnow = max( dpnow, 0 ); + + CHAR_setInt( charaindex, CHAR_DUELPOINT, min( dpnow, CHAR_MAXDUELPOINT ) ); + + szBuffer[0] = 0; + { + char szAdd[64], szNow[64]; + cnv10to62( dpadd, szAdd, sizeof( szAdd ) ); + cnv10to62( dpnow, szNow, sizeof( szNow ) ); + snprintf( szBuffer, sizeof( szBuffer ), + "%s|%s|", szAdd, szNow ); + } + + fd = getfdFromCharaIndex( charaindex ); + lssproto_RD_send( fd, szBuffer ); + + CHAR_send_DpDBUpdate( charaindex ); +#ifndef _NET_REDUCESEND + CHAR_send_DpDBUpdate_AddressBook( charaindex, TRUE ); +#endif + return 0; +} + +int BATTLE_GetExpGold( + int battleindex, // 爵 奶件犯永弁旦 + int side, // 扔奶玉 ㄟ ㄠ + int num // 愤坌反 及窒 及平乓仿井 +) +{ + BATTLE_ENTRY *pEntryChara; + char szBuffer[1024]="", szItemString[512], szEscItemString[256]; + int charaindex, UpLevel, petindex, i, j, itemindex = -1; + int rsCnt = 0; + RS_LIST aRsList[RS_LIST_MAX]; + int itemgroup[CHAR_MAXITEMHAVE-CHAR_STARTITEMARRAY]; + int itemnum = 0; + memset( aRsList, 0, sizeof( aRsList ) ); + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX; + if( BATTLE_CHECKSIDE( side ) == FALSE )return BATTLE_ERR_PARAM; + if( num < 0 || num >= BATTLE_ENTRY_MAX )return BATTLE_ERR_PARAM; + charaindex = BattleArray[battleindex].Side[side].Entry[num].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return BATTLE_ERR_PARAM; + if( CHAR_getFlg( charaindex, CHAR_ISDIE ) == TRUE ){ + return 0; + } + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET ){ + return 0; + } + if( BattleArray[battleindex].Side[side].type != BATTLE_S_TYPE_PLAYER ){ + return 0; + } + pEntryChara = &BattleArray[battleindex].Side[side].Entry[num]; + if( CHAR_getFlg( charaindex, CHAR_ISDIE ) == FALSE ){ +#ifdef _ITEM_ADDEQUIPEXP + BATTLE_GetExp( charaindex , charaindex ); +#else + BATTLE_GetExp( charaindex ); +#endif + if( getBattleDebugMsg( ) != 0 ){ + snprintf( szBuffer, sizeof(szBuffer), + "(%s) 得到 EXP %d", + CHAR_getUseName( charaindex ), + CHAR_getWorkInt( charaindex, CHAR_WORKGETEXP ) + ); + BATTLE_talkToCli( charaindex, szBuffer, CHAR_COLORYELLOW ); + } + + } + UpLevel = CHAR_LevelUpCheck( charaindex , -1); + if( UpLevel > 0 ){ + aRsList[rsCnt].levelup = 1; + }else{ + aRsList[rsCnt].levelup = 0; + } + aRsList[rsCnt].num = -2; + aRsList[rsCnt].exp = CHAR_getWorkInt( charaindex, CHAR_WORKGETEXP ); + rsCnt ++; + if( UpLevel > 0 ){ + int work; + + if( getBattleDebugMsg( ) != 0 ){ + snprintf( szBuffer, sizeof(szBuffer), + "(%s) 升级至 %d", + CHAR_getUseName( charaindex ), + CHAR_getInt( charaindex, CHAR_LV ) + ); + BATTLE_talkToCli( charaindex, szBuffer, CHAR_COLORYELLOW ); + } + CHAR_setInt( charaindex, CHAR_SKILLUPPOINT, + CHAR_getInt( charaindex, CHAR_SKILLUPPOINT) + UpLevel*3 ); + work = CHAR_getInt( charaindex, CHAR_CHARM ); + work += CH_FIX_PLAYERLEVELUP; + CHAR_setInt( charaindex, CHAR_CHARM, min( 100, work ) ); + CHAR_complianceParameter( charaindex ); + CHAR_send_P_StatusString( charaindex , + CHAR_P_STRING_LV|CHAR_P_STRING_NEXTEXP|CHAR_P_STRING_DUELPOINT + ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX ) ); + CHAR_PartyUpdate( charaindex, CHAR_N_STRING_LV ); +#ifndef _NET_REDUCESEND + CHAR_send_DpDBUpdate_AddressBook( charaindex, TRUE ); +#endif + } + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ){ + petindex = CHAR_getCharPet( charaindex, i ); + if( CHAR_CHECKINDEX( petindex ) == FALSE )continue; + if( CHAR_getFlg( petindex, CHAR_ISDIE ) == TRUE )continue; + if( CHAR_getWorkInt( petindex, CHAR_WORKGETEXP ) <= 0 ){ + CHAR_complianceParameter( petindex ); + sprintf( szBuffer, "K%d", i ); + CHAR_sendStatusString( charaindex , szBuffer ); + + continue; + } +#ifdef _ITEM_ADDEQUIPEXP + BATTLE_GetExp( petindex, charaindex ); +#else + BATTLE_GetExp( petindex ); +#endif + if( getBattleDebugMsg( ) != 0 ){ + snprintf( szBuffer, sizeof(szBuffer), + "(%s) 得到 EXP %d", + CHAR_getUseName( petindex ), + CHAR_getWorkInt( petindex, CHAR_WORKGETEXP ) + ); + BATTLE_talkToCli( charaindex, szBuffer, CHAR_COLORYELLOW ); + } + UpLevel = CHAR_LevelUpCheck( petindex , charaindex); + if( UpLevel > 0 ){ + if( getBattleDebugMsg( ) != 0 ){ + snprintf( szBuffer, sizeof(szBuffer), + "(%s) 升级至 %d", + CHAR_getUseName( petindex ), + CHAR_getInt( petindex, CHAR_LV ) + ); + BATTLE_talkToCli( charaindex, szBuffer, CHAR_COLORYELLOW ); + } + for( j = 0; j < UpLevel; j ++ ){ + CHAR_PetLevelUp( petindex ); + CHAR_PetAddVariableAi( petindex, AI_FIX_PETLEVELUP ); + } + aRsList[rsCnt].levelup = 1; + }else{ + aRsList[rsCnt].levelup = 0; + } + aRsList[rsCnt].num = i; + aRsList[rsCnt].exp = CHAR_getWorkInt( petindex, CHAR_WORKGETEXP ); + rsCnt ++; + CHAR_complianceParameter( petindex ); + if( UpLevel > 0 ){ + sprintf( szBuffer, "K%d", i ); + CHAR_sendStatusString( charaindex , szBuffer ); + + } + + } + szItemString[0] = 0; + if( CHAR_getFlg( charaindex, CHAR_ISDIE ) == FALSE ){ + for( i = 0; i < GETITEM_MAX; i ++ ){ + int ItemGet = FALSE; + szEscItemString[0] = 0; + itemindex = pEntryChara->getitem[i]; + if( itemindex < 0 ){ + itemindex = -1; + }else + if( CHAR_findEmptyItemBox( charaindex ) >= 0 ){ + int ret; + ret = CHAR_addItemSpecificItemIndex(charaindex,itemindex); + if( 0 <= ret && ret < CHAR_EQUIPPLACENUM ){ + print( "itemget err: 在这里不能取得item(%s)(%d)(%s)\n", + CHAR_getUseName( charaindex ), + ret, + ITEM_getAppropriateName(itemindex) + ); + } + if( !CHAR_CHECKITEMINDEX( charaindex, ret) ){ + ItemGet = FALSE; + }else{ + ItemGet = TRUE; + itemgroup[itemnum] = ret; + itemnum ++; + } + } + if( ItemGet == TRUE ){ + if( getBattleDebugMsg( ) != 0 ){ + snprintf( szBuffer, sizeof(szBuffer), + "拾获(%s)", + ITEM_getAppropriateName(itemindex) ); + BATTLE_talkToCli( charaindex, szBuffer, CHAR_COLORYELLOW ); + } + + LogItem( + CHAR_getChar( charaindex, CHAR_NAME ), + CHAR_getChar( charaindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), /* 失奶 丞 寞 */ +#endif + "BattleGet(战斗後所得的道具)", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + ITEM_getChar(itemindex, ITEM_UNIQUECODE),// shan 2001/12/14 + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + makeEscapeString( ITEM_getAppropriateName(itemindex), + szEscItemString, + sizeof( szEscItemString ) ); + strncat( szItemString, szEscItemString, sizeof( szItemString ) ); + pEntryChara->getitem[i] = -1; + }else{ + if( itemindex >= 0 ){ + ITEM_endExistItemsOne(itemindex); + }else{ + } + pEntryChara->getitem[i] = -1; + } + strncat( szItemString, "|", sizeof( szItemString ) ); + + } + } + + szBuffer[0] = 0; + for( i = 0; i < RS_LIST_MAX; i ++ ){ + char szWork[256], sz62[64]; + szWork[0] = 0; + if( aRsList[i].exp > 0 || i == 0 ){ + cnv10to62( aRsList[i].exp, sz62, sizeof( sz62 ) ); + snprintf( szWork, sizeof( szWork ), + "%d|%d|%s", aRsList[i].num, + aRsList[i].levelup, + sz62 + ); + } + strncat( szBuffer, szWork, sizeof( szBuffer ) ); + strncat( szBuffer, ",", sizeof( szBuffer ) ); + } + strncat( szBuffer, szItemString, sizeof( szBuffer ) ); + { + int fd; + fd = getfdFromCharaIndex( charaindex ); + lssproto_RS_send( fd, szBuffer ); + } + if( itemnum > 0 ){ + int inum, ie; + for( inum = 0; inum < itemnum; inum ++ ){ + ie = CHAR_getItemIndex( charaindex, itemgroup[inum] ); + } + CHAR_sendItemData( charaindex, itemgroup, itemnum); + } + return 0; +} + +int BATTLE_GetProfit( int battleindex, int side, int num ) +{ + if( BattleArray[battleindex].dpbattle == 1 ){ + return BATTLE_GetDuelPoint( battleindex, side, num ); + }else{ + return BATTLE_GetExpGold( battleindex, side, num ); + } + +} + +int BATTLE_FinishSet( battleindex ) +{ + + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX; + BattleArray[battleindex].mode = BATTLE_MODE_FINISH; + return 0; +} + +static int BATTLE_Finish( int battleindex ) +{ + BATTLE *pBattle; + BATTLE_ENTRY *pEntry; + int i, charaindex, j; + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX; + if( BattleArray[battleindex].winside == 0 + && BattleArray[battleindex].type == BATTLE_TYPE_P_vs_E + && BattleArray[battleindex].WinFunc != NULL){ + BattleArray[battleindex].WinFunc( battleindex, + BattleArray[battleindex].createindex ); + } + +#ifdef _DEATH_CONTEND + if( BattleArray[battleindex].type == BATTLE_TYPE_P_vs_P && + BattleArray[battleindex].PkFunc != NULL ){ + BattleArray[battleindex].PkFunc( + BattleArray[battleindex].menum, BattleArray[battleindex].tonum, + BattleArray[battleindex].winside, BattleArray[battleindex].battlemap ); // winside 0 menum 1 tonum + } +#endif + +#ifdef DANTAI + if( BattleArray[battleindex].type == BATTLE_TYPE_P_vs_P ){ + BATTLE_DpCalc( battleindex ); + } +#endif + + for( j = 0; j < 2; j ++ ){ + pEntry = BattleArray[battleindex].Side[j].Entry; +#ifdef _PET_TALK + for( i = 0 ; i < BATTLE_ENTRY_MAX ; i ++ ){ +#else + for( i = BATTLE_ENTRY_MAX-1; i >= 0 ; i -- ){ +#endif + charaindex = pEntry[i].charaindex; + + if( CHAR_CHECKINDEX( charaindex ) == FALSE ) + continue; + + BATTLE_GetProfit( battleindex, j, i ); //包括取得经验值 + BATTLE_Exit( charaindex, battleindex ); + } + } + if( BattleArray[battleindex].type == BATTLE_TYPE_WATCH ){ + }else{ + pBattle = BattleArray[battleindex].pNext; + for( ;pBattle; pBattle = pBattle->pNext ){ + if( BATTLE_CHECKADDRESS( pBattle ) == FALSE ){ + fprint( "err:battle address 奇怪(%p)\n", pBattle ); + break; + } + for( i = BATTLE_ENTRY_MAX-1; i >= 0 ; i -- ){ + charaindex = pBattle->Side[0].Entry[i].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )continue; + BATTLE_Exit( charaindex, pBattle->battleindex ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_FINAL ); + } + } + pBattle = BattleArray[battleindex].pNext; + for( ;pBattle; pBattle = pBattle->pNext ){ + if( BATTLE_CHECKADDRESS( pBattle ) == FALSE ){ + fprint( "err:battle address 奇怪(%p)\n", pBattle ); + break; + } + BATTLE_DeleteBattle( pBattle->battleindex ); + } + } + BATTLE_DeleteBattle( battleindex ); + return 0; +} + +int BATTLE_StopSet( battleindex ) +{ + + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX; + BattleArray[battleindex].mode = BATTLE_MODE_STOP; + + return 0; +} + +static int BATTLE_Stop( int battleindex ) +{ + BATTLE_ENTRY *pEntry; + int i, charaindex, j; + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX; + + for( j = 0; j < 2; j ++ ){ + pEntry = BattleArray[battleindex].Side[j].Entry; + for( i = BATTLE_ENTRY_MAX-1; i >= 0 ; i -- ){ + charaindex = pEntry[i].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE ) + continue; + BATTLE_GetProfit( battleindex, j, i ); + BATTLE_Exit( charaindex, battleindex ); + } + } + + BATTLE_DeleteBattle( battleindex ); + return 0; +} + +int BATTLE_DefaultAttacker( int battleindex, int side ) +{ + int i, rnd, cnt; + int CharaTbl[BATTLE_ENTRY_MAX]; + + BATTLE_ENTRY *pEntry; + + pEntry = BattleArray[battleindex].Side[side].Entry; + cnt = 0; + + for( i = 0 ; i < BATTLE_ENTRY_MAX; i ++ ){ + CharaTbl[i] = -1; + if( CHAR_CHECKINDEX( pEntry[i].charaindex ) == FALSE ){ + continue; + } + + if( CHAR_getWorkInt( pEntry[i].charaindex, CHAR_WORKBATTLEMODE ) + == BATTLE_CHARMODE_RESCUE ){ + continue; + } + + if( BATTLE_TargetCheck( battleindex, i + side * SIDE_OFFSET ) == FALSE )continue; + + CharaTbl[cnt] = i + side * SIDE_OFFSET; + cnt ++; + } + + if( cnt == 0 ){ + return -1; + } + + rnd = RAND( 0, cnt-1 ); + return CharaTbl[rnd]; + +} + +#if 0 +//********************************************************* +// +// 衬平乓仿卞爵 戊穴件玉毛 木月 + +static int BATTLE_EnemyCommand( int battleindex, int side ) +// +// 曰袄 BATTLE_ERR +// +//********************************************************* +{ + int i, charaindex; + BATTLE_ENTRY *pEntry; + + // 由仿丢□正民尼永弁 + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX; + if( BATTLE_CHECKSIDE( side ) == FALSE )return BATTLE_ERR_PARAM; + + // 及扔奶玉隋垫丹 + // 衬平乓仿动陆反 仃月 + if( BattleArray[battleindex].Side[side].type != BATTLE_S_TYPE_ENEMY ) return 0; + + pEntry = BattleArray[battleindex].Side[side].Entry; + + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + charaindex = pEntry[i].charaindex; + // 平乓仿弁正银匀化卅井匀凶日戚尺 + if( CHAR_CHECKINDEX( charaindex ) == FALSE )continue; + // 衬平乓仿元扎卅井匀凶日戚尺 + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) != CHAR_TYPEENEMY ){ + continue; + } + // 反仇仇匹檗 午井卞杀元化戊穴件玉毛 尹月互} + // 漆反爵丹及心午允月[ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_ATTACK ); + // 锹澎反赝癫 + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, BATTLE_DefaultAttacker( battleindex, 0 ) ); + // 戊穴件玉 OK 午仄化云仁 + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + + } + + return 0; +} +#endif + +//********************************************************* +// +// 爵 丐月扔奶玉及戏五酸曰皿伊奶乩□卞 毛笛遥 +// +int BATTLE_AddDpAlive( + int battleindex, // 田玄伙奶件犯永弁旦 + int side, // 扔奶玉( 0 or 1 ) + int dp +) +// +// 曰袄“{戏五酸匀化中月皿伊奶乩□及醒 +//{{{{{ 爵 互垫歹木化中卅仃木壬 及袄 +// +//********************************************************* +{ + int i, charaindex; + BATTLE_ENTRY *pEntry; + int cnt = 0; + + // 由仿丢□正民尼永弁 + if( BATTLE_CHECKSIDE( side ) == FALSE )return -BATTLE_ERR_PARAM; + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return -BATTLE_ERR_BATTLEINDEX; + + // 巨件玄伉□ + pEntry = BattleArray[battleindex].Side[side].Entry; + + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + charaindex = pEntry[i].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE ) continue; + // 矢永玄反仇及端楮溢卅中 + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET ) continue; + // 戏五化中引允[笛遥 + if( CHAR_getFlg( charaindex, CHAR_ISDIE ) == FALSE ){ + CHAR_setWorkInt( charaindex, CHAR_WORKGETEXP, + CHAR_getWorkInt( charaindex, CHAR_WORKGETEXP) + dp ); + } + } + + return cnt; +} + +#if 1 +//********************************************************* +// +// 爵 }皿伊奶乩□互戏五酸匀化中月井譬屯月 +// +int BATTLE_CountAlive( + int battleindex, // 田玄伙奶件犯永弁旦 + int side // 扔奶玉( 0 or 1 ) +) +// +// 曰袄“{戏五酸匀化中月皿伊奶乩□及醒 +//{{{{{ 爵 互垫歹木化中卅仃木壬 及袄 +// +//********************************************************* +{ + int i, charaindex; + BATTLE_ENTRY *pEntry; + int cnt = 0; + + // 由仿丢□正民尼永弁 + if( BATTLE_CHECKSIDE( side ) == FALSE )return -BATTLE_ERR_PARAM; + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return -BATTLE_ERR_BATTLEINDEX; + + // 巨件玄伉□ + pEntry = BattleArray[battleindex].Side[side].Entry; + + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + charaindex = pEntry[i].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE ) continue; + // 矢永玄反仇及端楮溢卅中 + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET ) continue; + // 戏五化中引允[ + if( CHAR_getFlg( charaindex, CHAR_ISDIE ) == FALSE ){ + cnt ++; + } + } + + return cnt; +} +#endif + + +//********************************************************* +// +// 爵 }辅爵仄凶化皿伊奶乩□及心互戏五化中月橇谪井毛民尼永弁 +// +int BATTLE_OnlyRescue( + int battleindex, // 田玄伙奶件犯永弁旦 + int side, // 扔奶玉( 0 or 1 ) + int *pOnlyFlg +) +// +// 曰袄“{戏五酸匀化中月皿伊奶乩□及醒 +//{{{{{ 爵 互垫歹木化中卅仃木壬 及袄 +// +//********************************************************* +{ + int i, charaindex; + BATTLE_ENTRY *pEntry; + int cnt = 0, OnlyRescue = 1; + + (*pOnlyFlg) = 0; + + // 由仿丢□正民尼永弁 + if( BATTLE_CHECKSIDE( side ) == FALSE )return -BATTLE_ERR_PARAM; + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return -BATTLE_ERR_BATTLEINDEX; + + // 巨件玄伉□ + pEntry = BattleArray[battleindex].Side[side].Entry; + + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + charaindex = pEntry[i].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE ){ + continue; + } + // 矢永玄反仇及端楮溢卅中 + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET ) continue; + // 戏五化中引允[ + if( CHAR_getFlg( charaindex, CHAR_ISDIE ) == FALSE ){ + cnt ++; + // 戏五化中月支勾反辅爵 井" + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ) == BATTLE_CHARMODE_RESCUE ){ + }else{ + OnlyRescue = 0; + } + } +#ifdef _PETSKILL_LER + if(CHAR_getWorkInt(charaindex,CHAR_WORK_RELIFE) > 0) cnt++; +#endif + } + + // 戏五化中月支勾互中化公中勾反辅爵 分匀凶日 + if( cnt > 0 && OnlyRescue ){ + // 白仿弘毛 化月 + (*pOnlyFlg) = 1; + }else{ + // 切互匀凶日ㄟ卞允月 + (*pOnlyFlg) = 0; + } + + return cnt; +} + +static BOOL BATTLE_TimeOutCheck( int battleindex ) +{ + int i, j, charaindex; + BATTLE *pBattle; + BATTLE_ENTRY *pEntry; + pBattle = &BattleArray[battleindex]; + + if( NowTime.tv_sec > pBattle->timer + BATTLE_TIME_LIMIT ){ + }else{ + return FALSE; + } + //BATTLE_BroadCast( battleindex, "server时间已到。", CHAR_COLORYELLOW ); + for( j = 0; j < 2; j ++ ){ + pEntry = pBattle->Side[j].Entry; + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + charaindex = pEntry[i].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE ) + continue; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEENEMY ){ + continue; + } + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ) + == BATTLE_CHARMODE_C_WAIT ){ + BATTLE_Exit( charaindex, battleindex ); + CHAR_DischargePartyNoMsg( charaindex ); + CHAR_talkToCli( charaindex, -1, + "时间到,结束战斗。", CHAR_COLORYELLOW ); + BATTLE_CommandSend( charaindex, "BU" ); + } + } + } + + return TRUE; +} + +int BATTLE_WatchWait( int battleindex ) +{ + BATTLE *pBattle; + BOOL commandflg = TRUE; + + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX; + pBattle = &BattleArray[battleindex]; + if( BATTLE_TimeOutCheck( battleindex ) == TRUE ){ + commandflg = TRUE; + } + if( commandflg == FALSE ){ + return 0; + } + pBattle->mode = BATTLE_MODE_WATCHMOVIE; + pBattle->turn ++; + return 0; +} + +int BATTLE_WatchMovie( int battleindex ) +{ + return 0; + +} + +int BATTLE_WatchAfter( int battleindex ) +{ + BattleArray[battleindex].mode = BATTLE_MODE_WATCHPRE; + + return 0; + +} + +int BATTLE_WatchBC( int battleindex ) +{ + return 0; +} + +int BATTLE_WatchPre( int battleindex ) +{ + // 戊穴件玉谨切尺 月凛及域 及 木 + BATTLE_PreWatchWaitSeq( battleindex ); + BattleArray[battleindex].mode = BATTLE_MODE_WATCHWAIT; + return 0; +} + +static int BATTLE_Command( int battleindex ) +{ + BATTLE *pBattle, *pWatchBattle; + BOOL commandflg = TRUE, iFinish = FALSE; + int OnlyRescue[2], i, j, charaindex; + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX; + pBattle = &BattleArray[battleindex]; + + if( BATTLE_CommandWait( battleindex, 0) == FALSE ){ + commandflg = FALSE; + } + if( BATTLE_CommandWait( battleindex, 1) == FALSE ){ + commandflg = FALSE; + } + pWatchBattle = pBattle->pNext; + for( ; pWatchBattle ; pWatchBattle = pWatchBattle->pNext ){ + if( BATTLE_CHECKADDRESS( pWatchBattle ) == FALSE ){ + fprint( "err:观战battle address错误(%p)\n", pWatchBattle ); + break; + } + + if( pWatchBattle->mode == BATTLE_MODE_WATCHBC ){ + + BATTLE_MakeCharaString( battleindex, szAllBattleString, + sizeof(szAllBattleString) ); + BATTLE_BpSendToWatch( pWatchBattle, szAllBattleString ); + + pWatchBattle->mode = BATTLE_MODE_WATCHPRE; + commandflg = FALSE; + + }else if( pWatchBattle->mode != BATTLE_MODE_WATCHMOVIE ){ + commandflg = FALSE; + } + } + if( BATTLE_TimeOutCheck( battleindex ) == TRUE ){ + commandflg = TRUE; + } + if( commandflg == FALSE ){ + return 0; + } +#ifdef _BATTLECOMMAND_TIME + BattleArray[battleindex].PartTime = 0; +#endif + + + pBattle->turn ++;//自己回合数增加 + BATTLE_ai_all( battleindex, 0, 0); + BATTLE_ai_all( battleindex, 1, 0); + BATTLE_Battling( battleindex );//处理战斗 + pBattle->Side[0].flg &= ~BSIDE_FLG_SURPRISE; + pBattle->Side[1].flg &= ~BSIDE_FLG_SURPRISE; + if( BATTLE_OnlyRescue( battleindex, 0, &OnlyRescue[0] ) == 0 ){ + pBattle->winside = 1; + iFinish = TRUE; + }else + if( BATTLE_OnlyRescue( battleindex, 1, &OnlyRescue[1] ) == 0 ){ + pBattle->winside = 0; + iFinish = TRUE; + } + for( j = 0; j < 2; j ++ ){ + if( OnlyRescue[j] != 1 )continue; + for( i = 0; i < BATTLE_ENTRY_MAX/2; i ++ ){ + charaindex = pBattle->Side[j].Entry[i].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE ) + continue; + if( CHAR_getInt( charaindex, CHAR_HP ) <= 0 ){ + BATTLE_Exit( charaindex, battleindex ); + } + } + } + BATTLE_PreCommandSeq( battleindex ); + if( iFinish == TRUE ){ + BATTLE_FinishSet( battleindex ); + } + return 0; +} + +#ifdef _CHECK_BATTLE_IO +extern int InBattleLoop; +extern int battle_write; +extern int other_write; +extern int battle_write_cnt; +extern int other_write_cnt; +#endif + +extern void BATTLE_changeRideImage( int index ); + +int BATTLE_Loop( void ) +{ + int i, cnt = 0; + +#ifdef _CHECK_BATTLE_IO + InBattleLoop = TRUE; +#endif + + rand(); + for( i = 0; i < BATTLE_battlenum; i ++ ){//最多战斗场数 + if( BattleArray[i].use == FALSE )continue; + if( BattleArray[i].type == BATTLE_TYPE_WATCH ){//若是观战模式 + if( BATTLE_CountAlive( i, 0 ) == 0 ){ + BATTLE_FinishSet( i ); + } + } + + switch( BattleArray[i].mode ){ + case BATTLE_MODE_NONE://未战斗 + break; + case BATTLE_MODE_INIT://战斗初始化 + BATTLE_Init( i ); + break; + case BATTLE_MODE_BATTLE://Server内部战斗中 + BATTLE_Command( i ); + break; + case BATTLE_MODE_FINISH://战斗结束 + BATTLE_Finish( i ); + break; + case BATTLE_MODE_STOP://战斗中断 + BATTLE_Stop( i ); + break; + case BATTLE_MODE_WATCHBC://观战中... + BATTLE_WatchBC( i ); + break; + + case BATTLE_MODE_WATCHPRE: + BATTLE_WatchPre( i ); + break; + case BATTLE_MODE_WATCHWAIT: + BATTLE_WatchWait( i ); + break; + + case BATTLE_MODE_WATCHMOVIE: + BATTLE_WatchMovie( i ); + break; + + case BATTLE_MODE_WATCHAFTER: + BATTLE_WatchAfter( i ); + break; + } + cnt ++; + } + +#ifdef _CHECK_BATTLE_IO + InBattleLoop = FALSE; +#endif + + return cnt; +} + + + + + +typedef struct { + int charaindex; // 平乓仿弁正奶件犯永弁旦 + int side; // 扔奶玉 + int dex; // 豳镀今 + int num; // 巨件玄伉□ 寞 + int combo; // 宁 猾允月谛棉井" +#ifdef _EQUIT_SEQUENCE + int sequence; +#endif +}BATTLE_CHARLIST; + + +typedef int (*FUNC)( const void *, const void * ); + +//************************************************************ +// +// 爵 及豳镀今 胜楮醒 +// +// 豳镀今反袄互 五中 互穸木化中月[嫦赐末□玄匹丐月[ +// +static int EsCmp( + const BATTLE_CHARLIST *pC1, + const BATTLE_CHARLIST *pC2 +) +{ +#ifdef _EQUIT_SEQUENCE + return( (pC2->dex+pC2->sequence) - (pC1->dex+pC1->sequence) ); +#else + return( pC2->dex - pC1->dex ); +#endif +} + +#ifdef _EQUIT_SEQUENCE +void Replacement_Entry( BATTLE_CHARLIST *temp1, BATTLE_CHARLIST *temp2) +{ + temp1->charaindex = temp2->charaindex; + temp1->combo = temp2->combo; + temp1->dex = temp2->dex; + temp1->num = temp2->num; + temp1->sequence = temp2->sequence; + temp1->side = temp2->side; +} +#endif +static void EntrySort( BATTLE_CHARLIST *EntryList, int listsize) +{ +#ifdef _EQUIT_SEQUENCE +// int i, j; + qsort( EntryList, listsize, sizeof( BATTLE_CHARLIST ), (FUNC)EsCmp ); +/* + for( i=0; i 0 ){ + int maxcheck, now; + BATTLE_CHARLIST temp; + + maxcheck = EntryList[i].sequence/8; + maxcheck = RAND( 1, maxcheck); + maxcheck = ( maxcheck>=i )?(i/3):maxcheck; + maxcheck = ( maxcheck<0)?0:maxcheck; + now = i; + for( j=0; j0; j++){ + if( EntryList[now].sequence > (EntryList[now-1].sequence *0.9) ){ + + Replacement_Entry( &temp, &EntryList[now]); + Replacement_Entry( &EntryList[now], &EntryList[now-1]); + Replacement_Entry( &EntryList[now-1], &temp); + now = now-1; + + +// temp = &EntryList[now]; +// EntryList[now] = EntryList[now-1]; +// EntryList[now-1] = *temp; +// temp = NULL; + + } + } + } + } +*/ +#else + qsort( EntryList, listsize, sizeof( BATTLE_CHARLIST ), (FUNC)EsCmp ); +#endif +} + + + +//************************************************************ +// +// 豳镀今毛煌遥允月[ +// +static int BATTLE_DexCalc( + int charaindex +) +// +// 曰袄 豳镀今 +// +//************************************************************ +{ + int dex = 0; + int work, COM; + int petindex = BATTLE_getRidePet( charaindex ); + + // 戊穴件玉潸 + COM = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ); + +#ifdef _PETSKILL_BECOMEFOX // 攻击顺序中的敏捷降下20% + if( CHAR_getWorkInt( charaindex, CHAR_WORKFOXROUND ) != -1 ){ + work = CHAR_getWorkInt( charaindex, CHAR_WORKQUICK )+20; + dex = work *0.8;//敏降20% + } +#endif +#ifdef _PROFESSION_ADDSKILL + if( CHAR_getWorkInt( charaindex, CHAR_WORKFEAR ) > 0 ){ + work = CHAR_getWorkInt( charaindex, CHAR_WORKQUICK )+20; + dex = work*0.8;//敏降20% + } +#endif + // 骚橘 猾及桦宁 + switch( COM ){ +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + case BATTLE_COM_S_BLOOD: // 嗜血成性 + case BATTLE_COM_S_BLOOD_WORMS: // 嗜血蛊 + case BATTLE_COM_S_SIGN: // 一针见血 +#endif + +#ifdef _BATTLE_NEWPOWER + case BATTLE_COM_JYUJYUTU: + case BATTLE_COM_S_ATTACK_MAGIC: + work = CHAR_getWorkInt( charaindex, CHAR_WORKQUICK )+20; + dex = work - RAND( 0, work * 0.3 ); + break; +#endif + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + case BATTLE_COM_S_FIRE_ENCLOSE: // 火附体 + case BATTLE_COM_S_ICE_ENCLOSE: // 冰附体 + case BATTLE_COM_S_THUNDER_ENCLOSE: // 雷附体 + work = CHAR_getWorkInt( charaindex, CHAR_WORKQUICK )+20; + dex = work - RAND( work * 0.3, work * 0.5 ); + break; + case BATTLE_COM_S_VOLCANO_SPRINGS:// 火山泉 + case BATTLE_COM_S_SUMMON_THUNDER: // 召雷术 + case BATTLE_COM_S_ICE_ARROW: // 冰箭术 + work = CHAR_getWorkInt( charaindex, CHAR_WORKQUICK )+20; + dex = work - RAND( 0, work * 0.2 ); + break; + case BATTLE_COM_S_CURRENT: // 电流术 + case BATTLE_COM_S_FIRE_BALL:// 火星球 + case BATTLE_COM_S_ICE_CRACK: // 冰爆术 + work = CHAR_getWorkInt( charaindex, CHAR_WORKQUICK )+20; + dex = work - RAND( 0, work * 0.5 ); + break; + case BATTLE_COM_S_FIRE_SPEAR:// 火龙枪 + case BATTLE_COM_S_STORM: // 暴风雨 + case BATTLE_COM_S_ICE_MIRROR: // 冰镜术 + case BATTLE_COM_S_ENCLOSE: // 附身术 + case BATTLE_COM_S_TRANSPOSE: // 移形换位 + work = CHAR_getWorkInt( charaindex, CHAR_WORKQUICK )+20; + dex = work - RAND( work * 0.2, work * 0.5 ); + break; + + case BATTLE_COM_S_DOOM: // 世界末日 + work = CHAR_getWorkInt( charaindex, CHAR_WORKQUICK )+20; + dex = work - RAND( 0.3, work * 0.6 ); + break; +#endif + +#ifdef _SKILL_SPEEDY_ATT //vincent 宠技:疾速攻击 + case BATTLE_COM_S_SPEEDYATTACK: + work = CHAR_getWorkInt( charaindex, CHAR_WORKQUICK )+20; + dex = work + work*0.3;//敏加30% + break; +#endif +#ifdef _PETSKILL_DAMAGETOHP //宠技:暗月狂狼(嗜血技的变体) + case BATTLE_COM_S_DAMAGETOHP2: + work = CHAR_getWorkInt( charaindex, CHAR_WORKQUICK )+20; + dex = work + work*0.2;//敏加20% + break; +#endif + + case BATTLE_COM_ITEM: // 失奶 丞毛银丹桦宁 + work = CHAR_getWorkInt( charaindex, CHAR_WORKQUICK )+20; + dex = work - RAND( 0, work * 0.3 ) + work * 0.15; + break; + default: // 骚橘 爵丹卅升) + // Robin 0727 ride pet + if( petindex == -1 ) + work = CHAR_getWorkInt( charaindex, CHAR_WORKQUICK )+20; + else + work = BATTLE_adjustRidePet3A( charaindex, petindex, CHAR_WORKQUICK, ATTACKSIDE )+20; + dex = work - RAND( 0, work * 0.3 ); + break; + } + + // 穴奶瓜旦卞卅匀化仄引匀凶日" + if( dex <= 0 )dex = 1; + + return dex; +} + + + + + + +//************************************************************* +// +// 戊件申生□扑亦件互丐月井升丹井民尼永弁 +// +static void ComboCheck( + BATTLE_CHARLIST *pEntryList, + int entrynum +) +// +//************************************************************* +{ + + int i, + charaindex, + com, + enemy, + side, + oldside = -3, // 赝癫卞丐曰尹卅中袄 + oldenemy = -3, // 赝癫卞丐曰尹卅中袄 + armtype, + move, + per, + ComboId = 1, // 戊件示 + start = -1; +#ifdef _ITEM_ADDCOMBO + int j; +#endif + + for( i = 0; i < entrynum; i ++ ){ + + charaindex = pEntryList[i].charaindex; + com = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ); + enemy = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); + side = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLESIDE ); + armtype = 0; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEENEMY ){ + per = 20; // 衬反ㄡㄟ⊙ + }else{ + per = 50; // 愤坌反ㄤㄟ⊙ +#ifdef _ITEM_ADDCOMBO + for( j = 0 ; j < CHAR_EQUIPPLACENUM ; j ++ ){ + int id = CHAR_getItemIndex(charaindex,j);//道具id + if( ITEM_CHECKINDEX(id) ){ + char *arg; + arg = ITEM_getChar(id, ITEM_ARGUMENT );//道具参数 + if( strstr( arg, "合击" ) ){ + int k,battleindex,lr; + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX );//战场编号 + lr = BATTLE_Index2No( battleindex, charaindex );//所站位置 + for( k = 0; k < entrynum; k ++ ){//战场上所有人回圈 + if( BATTLE_TargetCheck(battleindex, pEntryList[k].charaindex ) ){//活着 + if( ( lr < 10 + && BATTLE_Index2No( battleindex, pEntryList[k].charaindex ) < 10 ) + || ( lr >= 10 + && BATTLE_Index2No( battleindex, pEntryList[k].charaindex ) >= 10 ) ){//同一队 + int l; + for( l = 0 ; l < CHAR_EQUIPPLACENUM ; l ++ ){ + int lid = CHAR_getItemIndex(charaindex,l);//道具id + if( ITEM_CHECKINDEX(lid) ){ + arg = ITEM_getChar(lid, ITEM_ARGUMENT );//道具参数 + if( strstr( arg, "合击" ) ){//同一队有2个人以上有载此道具 + int add=0; + sscanf( arg+4, "%d", &add );//取得追加的%数 + per += add; + break; + } + } + } + } + } + } + break; + } + } + } +#endif + } + + // 互ㄟ井 仃卅井匀凶日 + if( CHAR_getInt( charaindex, CHAR_HP ) <= 0 + || BATTLE_CanMoveCheck( charaindex ) == FALSE + ){ + move = 0; + }else{ + move = 1; + } + + // 猾础及 湛毛潸 [髑仆烟卅日母丢 + // 髑仆烟卅日母丢 + if( BATTLE_IsThrowWepon( + CHAR_getItemIndex( charaindex, CHAR_ARM ) ) == TRUE + ){ + armtype = 1; + } + + pEntryList[i].combo = 0; // 赓渝祭 + + if( start != -1 ){ // 宁 猾 + if( com != BATTLE_COM_ATTACK // 猾戊穴件玉匹卅中 + || enemy != oldenemy // 谎匀化月衬互 元匹卅中 + || side != oldside // 扔奶玉互啜丹 + || armtype == 1 // 髑仆烟匹丐月 + || move == 0 // 仃卅中 + ){ + start = -1; // 蔽 + oldside = side; // 扔奶玉创尹月 + }else{ + // 戊件示涩烂 + CHAR_setWorkInt( pEntryList[i].charaindex, + CHAR_WORKBATTLECOM1,BATTLE_COM_COMBO ); + pEntryList[i].combo = ComboId; + // 赓及谛手域杀涩烂 + CHAR_setWorkInt( pEntryList[start].charaindex, + CHAR_WORKBATTLECOM1,BATTLE_COM_COMBO ); + pEntryList[start].combo = ComboId; + } + } + if( start == -1 ){// 宁 猾 仄化中卅中桦宁 + if( com == BATTLE_COM_ATTACK + && armtype != 1 // 髑仆烟匹卅中 + && move == 1 // 仃月 + && RAND( 1, 100 ) <= per + ){ // 骚橘 猾 匹丐月 + start = i; + oldenemy = enemy; // 谎匀化月衬毛创尹月 + oldside = side; // 扔奶玉创尹月 + ComboId ++; + } + } + + } + +} + +//************************************************************* +// +// 戊件申生□扑亦件互 癫卞匹五月井民尼永弁 +//{戚及谛互戊件示匹五月橇谪元扎卅井匀凶日 FALSE +// +static BOOL ComboCheck2( + BATTLE_CHARLIST *pEntryList, // 巨件玄伉□伉旦玄 + int nownum, // 蜇箕及赐 + int entrynum // 巨件玄伉□ 醒 +) +// +// 戊件示匹五月 TRUE +// 匹五卅中 FALSE +// +//************************************************************* +{ + + int i, + iRet = FALSE, + ComboId, + charaindex; + + // 戊件示 忡绣 + ComboId = pEntryList[nownum].combo; + + charaindex = pEntryList[nownum].charaindex; + + // 愤坌互镝擦蘸撩 仄化中凶日撩 + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEFLG) & CHAR_BATTLEFLG_AIBAD ) + { +// print( "由於忠诚度不足使用必杀技失败( %s )\n",CHAR_getUseName( charaindex ) ); + return FALSE; + } + + // 戚及谛互戊件示卞辅笛匹五月井割 + for( i = nownum+1; i < entrynum; i ++ ){ + charaindex = pEntryList[i].charaindex; + + // 戊件示 啜丹午镀仁手撩 + if( ComboId != pEntryList[i].combo )break; + + // 爵 卞辅笛仄化中卅井匀凶日戚尺 + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE) == 0 ) break; + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_FINAL ) break; + + if( CHAR_getInt( charaindex, CHAR_HP ) <= 0 + || BATTLE_CanMoveCheck( charaindex ) == FALSE + ){ + }else{ + iRet = TRUE; + break; + } + } +/* + if( iRet == FALSE ){ + print( "必杀技失败( %s )\n", + CHAR_getUseName( pEntryList[nownum].charaindex ) ); + } +*/ + return iRet; + +} + + +void BATTLE_UltimateExtra( + int battleindex, + int charaindex, + int enemyindex +) +{ + char szBuffer[256]=""; + int pindex, pno; +#ifndef _DEATH_CONTEND + int floor=0, x=0, y=0; +#endif + szBuffer[0] = 0; + + if( CHAR_getInt( enemyindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + BATTLE_PetDefaultExit( enemyindex, battleindex ); + + if( BattleArray[battleindex].type != BATTLE_TYPE_P_vs_P ){ + int levelflg = 1; + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)被击飞至远方。", + // CHAR_getUseName( enemyindex ) ); + if( CHAR_getInt( enemyindex, CHAR_LV ) <= 10 ){ + levelflg = 2; + } + + if( BattleArray[battleindex].norisk == 0 ){; + CHAR_AddCharm( enemyindex, CH_FIX_PLAYEULTIMATE/levelflg ); + pno = CHAR_getInt( enemyindex, CHAR_DEFAULTPET ); + if( 0 <= pno && pno < CHAR_MAXPETHAVE ){ + pindex = CHAR_getCharPet( enemyindex, pno ); + if( CHAR_CHECKINDEX( pindex ) == TRUE ){ + CHAR_PetAddVariableAi( pindex, AI_FIX_PLAYERULTIMATE/levelflg ); + } + } + } +#ifdef _DEATH_CONTEND + CHAR_warpToSpecificPoint( enemyindex, 8250, 22, 22 ); +#else +#ifdef _BAD_PLAYER // WON ADD 送坏玩家去关 + if( NPC_EventCheckFlg( enemyindex, 135 ) ){ + CHAR_warpToSpecificPoint( enemyindex, 887, 56, 14 ); + }else{ +#endif + if( CHAR_getElderPosition( + CHAR_getInt( enemyindex, CHAR_LASTTALKELDER), &floor, &x, &y ) + != TRUE + ){ + }else{ + CHAR_warpToSpecificPoint( enemyindex, floor, x, y ); + } +#ifdef _BAD_PLAYER + } +#endif +#endif + } + BATTLE_Exit( enemyindex, battleindex ); + CHAR_DischargePartyNoMsg( enemyindex ); + if( getBattleDebugMsg( ) != 0 ){ + BATTLE_talkToCli( enemyindex, szBuffer, CHAR_COLORYELLOW ); + } + + }else + // 矢永玄卅日 + if( CHAR_getInt( enemyindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET ){ + int levelflg = 1; + int playerindex = CHAR_getWorkInt( enemyindex, CHAR_WORKPLAYERINDEX ); + + // 伊矛伙互斓中桦宁反 蛹月 坌 + if( CHAR_getInt( playerindex, CHAR_LV ) <= 10 ){ + levelflg = 2; + } + + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)被击飞。", + // CHAR_getUseName( enemyindex ) ); + + // 潜谛及犯白巧伙玄井日反内允 + CHAR_setInt( playerindex, CHAR_DEFAULTPET, -1 ); + + // 犯亘巨伙动陆反镝擦艘毛票仆月 + if( BattleArray[battleindex].type != BATTLE_TYPE_P_vs_P ){ + // 伉旦弁及 中田玄伙井"丐月卅日镝擦 毛票仆月 + if( BattleArray[battleindex].norisk == 0 ){; + CHAR_PetAddVariableAi( enemyindex, AI_FIX_PETULTIMATE/levelflg ); + } + // 潜谛及矢永玄韶氏分荚醒毛市它件玄允月 + CHAR_setInt( playerindex, CHAR_DEADPETCOUNT, + CHAR_getInt( playerindex, CHAR_DEADPETCOUNT ) + 1 ); + } +/* + // 矢永玄互中凶日爵 井日厄仃今六月[ + BATTLE_PetDefaultExit( enemyindex, battleindex ); +*/ + + // 愤坌手 仃月 + BATTLE_Exit( enemyindex, battleindex ); + + }else{ + int flg; + // 公木动陆匹失伙 奴丢永玄韶 + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)被击飞。", + // CHAR_getUseName( enemyindex ) ); + // 衬平乓仿反扔□田□卞酸仄化云仁 +// BATTLE_Exit( enemyindex, battleindex ); + flg = CHAR_getWorkInt( enemyindex, CHAR_WORKBATTLEFLG ); + flg |= CHAR_BATTLEFLG_ULTIMATE; // 失伙 奴丢永玄熬仃凶 + CHAR_setWorkInt( enemyindex, CHAR_WORKBATTLEFLG, flg ); + BATTLE_Exit( enemyindex, battleindex ); + } + + // 须 煤 + //BATTLE_BroadCast( battleindex, szBuffer, CHAR_COLORYELLOW ); + +} + + +//************************************************************* +// +// 骚橘卞竣濮今六凶桦宁及 溃质 +// +void BATTLE_NormalDeadExtra( + int battleindex, // 爵 奶件犯永弁旦 + int charaindex, // 诮仄凶平乓仿及奶件犯永弁旦 + int enemyindex // 诮今木凶平乓仿及奶件犯永弁旦 +) +// +// +//************************************************************* +{ + int pindex, pno; + char szBuffer[256]=""; + + szBuffer[0] = 0; + + // 皿伊奶乩□匹 + // 衬午及爵 分匀凶日 + // 伉旦弁及 中田玄伙卅日 + if( CHAR_getInt( enemyindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER + && BattleArray[battleindex].type == BATTLE_TYPE_P_vs_E + && BattleArray[battleindex].norisk == 0 + ){ + int levelflg = 1; + // 愤坌及 毛票仆月 + // 伊矛伙ㄠㄟ动票及谛反 坌分仃票互月 + if( CHAR_getInt( enemyindex, CHAR_LV ) <= 10 ){ + levelflg = 2; + } + CHAR_AddCharm( enemyindex, CH_FIX_PLAYERDEAD/levelflg ); + // 爵 卞辅笛仄化中凶矢永玄及 毛票仆月 + pno = CHAR_getInt( enemyindex, CHAR_DEFAULTPET ); + if( 0 <= pno && pno < CHAR_MAXPETHAVE ){ + // 矢永玄及奶件犯永弁旦 + pindex = CHAR_getCharPet( enemyindex, pno ); + if( CHAR_CHECKINDEX( pindex ) == TRUE ){ + CHAR_PetAddVariableAi( pindex, AI_FIX_PLAYERDEAD/levelflg ); + } + } + // 韶氏分平乓仿及戊穴件玉反侉木月 + CHAR_setWorkInt( enemyindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + }else + // 矢永玄卅日 + if( CHAR_getInt( enemyindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET + && BattleArray[battleindex].type == BATTLE_TYPE_P_vs_E + && BattleArray[battleindex].norisk == 0 + ){ + int levelflg = 1; + int playerindex = CHAR_getWorkInt( enemyindex, CHAR_WORKPLAYERINDEX ); + + // 潜谛及伊矛伙ㄠㄟ动票及谛反 坌分仃票互月 + if( CHAR_getInt( playerindex, CHAR_LV ) <= 10 ){ + levelflg = 2; + } + // 愤坌及镝擦艘毛票仆月 + CHAR_PetAddVariableAi( enemyindex, AI_FIX_PETDEAD/levelflg ); + // 潜谛及矢永玄韶氏分荚醒毛市它件玄允月 + CHAR_setInt( playerindex, CHAR_DEADPETCOUNT, + CHAR_getInt( playerindex, CHAR_DEADPETCOUNT ) + 1 ); + + // 韶氏分平乓仿及戊穴件玉反侉木月 + CHAR_setWorkInt( enemyindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + + }else{ + // 公木动陆 + } + + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)失去意识。", + // CHAR_getUseName( enemyindex ) ); + + //BATTLE_BroadCast( battleindex, szBuffer, CHAR_COLORYELLOW ); + +} + +#ifndef DANTAI +void BATTLE_EscapeDpSend( int battleindex, int charaindex ) +{ + + int enemyside, cnt, dpadd; + BATTLE_ENTRY *pEntry; + + if( BATTLE_CHECKINDEX( battleindex ) == FALSE ){ + return; + } + + if( BattleArray[battleindex].type != BATTLE_TYPE_P_vs_P ){ + return; + } + if( BattleArray[battleindex].flg & BATTLE_FLG_FREEDP ){ + CHAR_setWorkInt( charaindex, CHAR_WORKGETEXP, 0 ); + return ; + } + BattleArray[battleindex].flg |= BATTLE_FLG_CHARALOST; + enemyside = 1 - CHAR_getWorkInt( charaindex, CHAR_WORKBATTLESIDE ); + pEntry = BattleArray[battleindex].Side[enemyside].Entry; + cnt = BATTLE_CountAlive( battleindex, enemyside ); + if( cnt == 0 )return; + dpadd = CHAR_getInt( charaindex, CHAR_DUELPOINT ) * DUELPOINT_RATE; + if( dpadd < 1 )dpadd = 1; + CHAR_setWorkInt( charaindex, CHAR_WORKGETEXP, -dpadd*2 ); + dpadd /= cnt; + if( dpadd < 1 )dpadd = 1; + BATTLE_AddDpAlive( battleindex, enemyside, dpadd ); +} +#else +void BATTLE_EscapeDpSend( int battleindex, int charaindex ) +{ + + int enemyside, dpadd; + BATTLE_ENTRY *pEntry; + + // Nuke 0725: Avoid too large number + if ((battleindex<0)||(battleindex>getBattlenum())) return; + // 动陆反 仃月 + if( BattleArray[battleindex].type != BATTLE_TYPE_P_vs_P ){ + return; + } + + // 锹澎扔奶玉 + enemyside = 1 - CHAR_getWorkInt( charaindex, CHAR_WORKBATTLESIDE ); + + pEntry = BattleArray[battleindex].Side[enemyside].Entry; + + // 锹澎础卞中月谛醒毛醒尹月 + dpadd = CHAR_getInt( charaindex, CHAR_DUELPOINT ) * DUELPOINT_RATE; + if( dpadd < 1 )dpadd = 1; // 斓匹手ㄠ + + // 谛井日娄中化云仁 + CHAR_setWorkInt( charaindex, CHAR_WORKGETEXP, -dpadd*2 ); + + // 锹澎础卞反箫允 + BattleArray[battleindex].Side[enemyside].common_dp += dpadd; + + +} +#endif + + +#ifndef DANTAI +int BATTLE_AddDuelPoint( int battleindex, int *pBidList ) +{ + int enemyindex, i, side, num, j, k, + charaindex[BATTLE_ENTRY_MAX+1]; + BATTLE_ENTRY + *pEntryEnemy; + int allnum = 0; + int bid = pBidList[0]; + + if( pBidList < 0 )return BATTLE_ERR_PARAM; + if( bid >= SIDE_OFFSET ){ + num = bid - SIDE_OFFSET; + side = 1; + }else{ + num = bid ; + side = 0; + } + + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX; + if( BATTLE_CHECKSIDE( side ) == FALSE )return BATTLE_ERR_PARAM; + if( num < 0 || num >= BATTLE_ENTRY_MAX )return BATTLE_ERR_PARAM; + + for( i = 0; i < BATTLE_ENTRY_MAX + 1 ; i ++ ){ + charaindex[i] = -1; + } + + for( i = 0; i < BATTLE_ENTRY_MAX && pBidList[i] != -1 ; i ++ ){ + int work; + work = BATTLE_No2Index( battleindex, pBidList[i] ); + if( work < 0 )return BATTLE_ERR_PARAM; + if( CHAR_getInt( work, CHAR_WHICHTYPE ) == CHAR_TYPEENEMY ){ + continue; + } + if( CHAR_getInt( work, CHAR_WHICHTYPE ) == CHAR_TYPEPET ){ + work = CHAR_getWorkInt( work, CHAR_WORKPLAYERINDEX ); + } + if( work < 0 )return BATTLE_ERR_PARAM; + for( k = 0; k < allnum; k ++ ){ + if( charaindex[i] == work )break; + } + if( i < allnum )continue; + charaindex[i] = work; + allnum ++; + } + charaindex[i] = -1; + + for( j = 0; j < 2; j ++ ){ + pEntryEnemy = BattleArray[battleindex].Side[j].Entry; + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + int enemytype = 0; + enemyindex = pEntryEnemy[i].charaindex; + if( CHAR_CHECKINDEX( enemyindex ) == FALSE )continue; + if( CHAR_getInt( enemyindex, CHAR_HP ) <= 0 + && CHAR_getFlg( enemyindex, CHAR_ISDIE ) == FALSE){ + }else{ + continue; + } + enemytype = CHAR_getInt( enemyindex, CHAR_WHICHTYPE ); + if( enemytype == CHAR_TYPEPLAYER ){ + BattleArray[battleindex].flg |= BATTLE_FLG_CHARALOST; + } + if( enemytype == CHAR_TYPEPLAYER || enemytype == CHAR_TYPEENEMY ){ + int dpadd, dpnow; + dpnow = CHAR_getInt( enemyindex, CHAR_DUELPOINT ); + dpadd = dpnow * DUELPOINT_RATE; + dpnow -= dpadd; + CHAR_setWorkInt( enemyindex, CHAR_WORKGETEXP, + CHAR_getWorkInt( enemyindex, CHAR_WORKGETEXP) - dpadd ); + + if( side != j ){ + for( k = 0; charaindex[k] != -1; k ++ ); + if( k <= 0 )k = 1; + dpadd /= k; + if( dpadd <= 0 ) dpadd = 1; + for( k = 0; charaindex[k] != -1; k ++ ){ + CHAR_setWorkInt( charaindex[k], CHAR_WORKGETEXP, + CHAR_getWorkInt( charaindex[k], CHAR_WORKGETEXP ) + dpadd ); + } + }else{ + int dpdiv = dpadd, alive; + alive = BATTLE_CountAlive( battleindex, 1-j ); + if( alive <= 0 )alive = 1; + dpdiv /= alive; + if( dpdiv <= 0 )dpdiv = 1; + BATTLE_AddDpAlive( battleindex, 1-j, dpdiv ); + } + } + CHAR_setFlg( enemyindex, CHAR_ISDIE, 1 ); + CHAR_setInt( enemyindex, CHAR_DEADCOUNT, + CHAR_getInt( enemyindex, CHAR_DEADCOUNT ) + 1 ); + + if( pEntryEnemy[i].flg & BENT_FLG_ULTIMATE ){ + BATTLE_GetProfit( battleindex, j, i ); + BATTLE_UltimateExtra( battleindex, charaindex[0], enemyindex ); + }else{ + BATTLE_NormalDeadExtra( battleindex, charaindex[0], enemyindex ); + } + } + } + return 0; +} +#else + +int BATTLE_AddDuelPoint( + int battleindex, + int *pBidList ) +{ + int enemyindex, i, otherside, j, + charaindex[BATTLE_ENTRY_MAX+1]; + BATTLE_ENTRY + *pEntryEnemy; + if( pBidList < 0 )return BATTLE_ERR_PARAM; + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX; + for( j = 0; j < 2; j ++ ){ + pEntryEnemy = BattleArray[battleindex].Side[j].Entry; + otherside = 1 - j; + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + enemyindex = pEntryEnemy[i].charaindex; + if( CHAR_CHECKINDEX( enemyindex ) == FALSE )continue; + if( CHAR_getInt( enemyindex, CHAR_HP ) <= 0 + && CHAR_getFlg( enemyindex, CHAR_ISDIE ) == FALSE){ + }else{ + continue; + } + + CHAR_setFlg( enemyindex, CHAR_ISDIE, 1 ); + CHAR_setInt( enemyindex, CHAR_DEADCOUNT, + CHAR_getInt( enemyindex, CHAR_DEADCOUNT ) + 1 ); + if( pEntryEnemy[i].flg & BENT_FLG_ULTIMATE ){ + if( CHAR_getInt( enemyindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + int dpadd, dpnow; + dpnow = CHAR_getInt( enemyindex, CHAR_DUELPOINT ); + dpadd = dpnow * DUELPOINT_RATE; // ㄠㄟ坌及ㄠ手日尹月 + dpnow -= dpadd; + CHAR_setWorkInt( enemyindex, CHAR_WORKGETEXP, + CHAR_getWorkInt( enemyindex, CHAR_WORKGETEXP) - dpadd ); + BattleArray[battleindex].Side[otherside].common_dp += dpadd; + BATTLE_GetProfit( battleindex, j, i ); + } + BATTLE_UltimateExtra( battleindex, charaindex[0], enemyindex ); + }else{ + BATTLE_NormalDeadExtra( battleindex, charaindex[0], enemyindex ); + } + } + } + return 0; +} +#endif + +int BATTLE_ItemDelCheck( int itemindex ) +{ int icnt, jcnt, playernum; + playernum = getFdnum(); + for( icnt = 0; icnt < playernum; icnt ++ ) { + if( CHAR_CHECKINDEX( icnt ) ) { + for( jcnt = 0; jcnt < CHAR_MAXITEMHAVE; jcnt ++ ) { + if( CHAR_getItemIndex( icnt, jcnt ) == itemindex ) { + print( "err:战利品奇怪的item处理(%s)(%s)index(%d)\n", + CHAR_getUseName(icnt),ITEM_getAppropriateName(itemindex), + itemindex ); + return FALSE; + } + } + } + } + return TRUE; +} + +int BATTLE_AddExpItem( int battleindex, int *pBidList ) +{ + int enemyindex, i, side, num, proflg = 1, j, exp, k, enemylevel, + charaindex[BATTLE_ENTRY_MAX+1]; + BATTLE_ENTRY + *pEntryEnemy, + *pEntryChara[BATTLE_ENTRY_MAX+1], + *pEntryPlayer[BATTLE_ENTRY_MAX+1]; + int item=0,itemindex,itemloop,allnum = 0; + int bid = pBidList[0]; + if( pBidList[0] < 0 )return BATTLE_ERR_PARAM; + if( bid >= SIDE_OFFSET ){ + num = bid - SIDE_OFFSET; + side = 1; + }else{ + num = bid ; + side = 0; + } + if( BATTLE_CHECKSIDE( side ) == FALSE )return BATTLE_ERR_PARAM; + if( num < 0 || num >= BATTLE_ENTRY_MAX )return BATTLE_ERR_PARAM; + for( i = 0; i < BATTLE_ENTRY_MAX + 1 ; i ++ ){ + charaindex[i] = -1; + pEntryPlayer[i] = NULL; + } + if( BattleArray[battleindex].Side[side].type != BATTLE_S_TYPE_PLAYER + || BattleArray[battleindex].Side[1-side].type == BATTLE_S_TYPE_PLAYER){ + proflg = 0; + } + for( i = 0; i < BATTLE_ENTRY_MAX && pBidList[i] != -1 ; i ++ ){ + int subnum; + charaindex[i] = BATTLE_No2Index( battleindex, pBidList[i] ); + if( charaindex[i] < 0 )return BATTLE_ERR_PARAM; + subnum = pBidList[i]-side*SIDE_OFFSET; + pEntryChara[i] = &BattleArray[battleindex].Side[side].Entry[subnum]; + if( CHAR_getInt( charaindex[i], CHAR_WHICHTYPE ) == CHAR_TYPEPET ){ + pEntryPlayer[i] = &BattleArray[battleindex].Side[side].Entry[subnum-5]; + }else{ + pEntryPlayer[i] = pEntryChara[i]; + } + } + charaindex[i] = -1; + allnum = i; + for( j = 0; j < 2; j ++ ){ + pEntryEnemy = BattleArray[battleindex].Side[j].Entry; + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + enemyindex = pEntryEnemy[i].charaindex; + if( CHAR_CHECKINDEX( enemyindex ) == FALSE )continue; + + if( CHAR_getInt( enemyindex, CHAR_HP ) <= 0 + && CHAR_getFlg( enemyindex, CHAR_ISDIE ) == FALSE ){ + }else{ + continue; + } + if( proflg == 1 && side != j ){ + if( CHAR_getInt( enemyindex, CHAR_WHICHTYPE ) != CHAR_TYPEENEMY ){ + print( "\nerr: 夺取敌人以外的战利品(%s:%d)\n", + __FILE__, __LINE__ ); + } + for(item=CHAR_STARTITEMARRAY; item < CHAR_STARTITEMARRAY+10; item++){ + itemindex = CHAR_getItemIndex( enemyindex, item ); + if(ITEM_CHECKINDEX( itemindex ) == FALSE ){ + continue; + } + if( ITEM_getWorkInt( itemindex, ITEM_WORKCHARAINDEX ) <= getFdnum() ){ + print( "\nerr: 将玩家的item当做战利品(%s:%d)\n", + __FILE__, __LINE__ ); + continue; + } + CHAR_setItemIndex( enemyindex, item, -1 ); + k = RAND( 0, (allnum-1) ); + for(itemloop=0;itemloop<3;itemloop++){ + if(pEntryPlayer[k]->getitem[itemloop]==-1){ + pEntryPlayer[k]->getitem[itemloop]=itemindex; + break; + } + } + if( itemloop >= 3 ){ + if( RAND( 0, 1 ) ) { + int olditem; + int randwork = RAND( 0, 2 ); + olditem = pEntryPlayer[k]->getitem[randwork]; + pEntryPlayer[k]->getitem[randwork]=itemindex; + if( BATTLE_ItemDelCheck( olditem ) == TRUE ){ + ITEM_endExistItemsOne(olditem); + } + }else { + ITEM_endExistItemsOne(itemindex); + } + } + + } + +#define EXPGET_MAXLEVEL 5 +#define EXPGET_DIV 15 + exp = CHAR_getInt( enemyindex, CHAR_EXP ); + enemylevel = CHAR_getInt( enemyindex, CHAR_LV ); + for( k = 0; charaindex[k] != -1; k ++ ){ + int nowexp, b_level; + int ridepet; + b_level = CHAR_getInt( charaindex[k], CHAR_LV ) - enemylevel; + if( b_level <= EXPGET_MAXLEVEL ){//如 人物大怪物5以下 或怪物大於人物 + nowexp = exp; + }else{//如果人物大於怪物5以上 + b_level = EXPGET_MAXLEVEL+EXPGET_DIV - b_level; + if( b_level > EXPGET_DIV ) b_level = EXPGET_DIV; + if( b_level <= 0 ){ + nowexp = 1; + }else{ + nowexp = exp * b_level / EXPGET_DIV; + } + if( nowexp < 1 ) nowexp = 1; + } + CHAR_setWorkInt( charaindex[k], CHAR_WORKGETEXP, + CHAR_getWorkInt( charaindex[k], CHAR_WORKGETEXP ) + nowexp ); + CHAR_setInt( charaindex[k], CHAR_KILLPETCOUNT, + CHAR_getInt( charaindex[k], CHAR_KILLPETCOUNT ) + 1 ); + ridepet = BATTLE_getRidePet( charaindex[k] ); + //andy_edit + if( CHAR_CHECKINDEX( ridepet) ){ + int nowexp, b_level; + b_level = CHAR_getInt( ridepet, CHAR_LV ) - enemylevel; + if( b_level <= EXPGET_MAXLEVEL ){ + nowexp = exp; + }else{ + b_level = EXPGET_MAXLEVEL+EXPGET_DIV - b_level; + if( b_level > EXPGET_DIV ) b_level = EXPGET_DIV; + if( b_level <= 0 ){ + nowexp = 1; + }else{ + nowexp = exp * b_level / EXPGET_DIV; + } + if( nowexp < 1 ) nowexp = 1; + } + nowexp *= 0.6; + CHAR_setWorkInt( ridepet, CHAR_WORKGETEXP, + CHAR_getWorkInt( ridepet, CHAR_WORKGETEXP ) + nowexp ); + CHAR_setInt( ridepet, CHAR_KILLPETCOUNT, + CHAR_getInt( ridepet, CHAR_KILLPETCOUNT ) + 1 ); + } + if( BattleArray[battleindex].norisk == 0 + && CHAR_getInt( charaindex[k], CHAR_WHICHTYPE ) == CHAR_TYPEPET){ + if( CHAR_getInt( enemyindex, CHAR_LV ) > CHAR_getInt( charaindex[k], CHAR_LV ) ){ + CHAR_PetAddVariableAi( charaindex[k], AI_FIX_PETGOLDWIN ); + }else{ + CHAR_PetAddVariableAi( charaindex[k], AI_FIX_PETWIN ); + } + } + } + CHAR_setMaxExp( enemyindex, 0); + } + CHAR_setFlg( enemyindex, CHAR_ISDIE, 1 ); +#ifdef _PET_LIMITLEVEL + Pet_Check_Die( enemyindex ); +#endif + CHAR_setInt( enemyindex, CHAR_DEADCOUNT, + CHAR_getInt( enemyindex, CHAR_DEADCOUNT ) + 1 ); + if( pEntryEnemy[i].flg & BENT_FLG_ULTIMATE ){ + BATTLE_UltimateExtra( battleindex, charaindex[0], enemyindex ); + }else{ + BATTLE_NormalDeadExtra( battleindex, charaindex[0], enemyindex ); + } + } + } + return 0; +} + +#ifdef _PET_LIMITLEVEL +void Pet_Check_Die( int petindex ) +{ + + int LevelUpPoint; + int vital, str, tgh, dex; + float modai; + +#define RAND(x,y) ((x-1)+1+ (int)( (double)(y-(x-1))*rand()/(RAND_MAX+1.0)) ) + //玛宠死亡 扣基本属性及忠诚 + if( CHAR_getInt( petindex, CHAR_PETID) == 718 ) { + LevelUpPoint = CHAR_getInt( petindex, CHAR_ALLOCPOINT ); + vital = (( LevelUpPoint >> 24 ) & 0xff); + str = (( LevelUpPoint >> 16 ) & 0xff); + tgh = (( LevelUpPoint >> 8 ) & 0xff); + dex = (( LevelUpPoint >> 0 ) & 0xff); +// enemyindex = pEntryEnemy[i].charaindex; + + print("\n lvup <<%d %d %d %d>>", vital, str, tgh, dex ); + + vital = vital - RAND( 1, 8); + str = str - RAND( 1, 4); + tgh = tgh - RAND( 1, 4); + dex = dex - RAND( 1, 4); + print("\n lvup <<%d %d %d %d>>", vital, str, tgh, dex ); + + if( vital < 0 ) vital = 0; + if( str < 0 ) str = 0; + if( tgh < 0 ) tgh = 0; + if( dex < 0 ) dex = 0; + + if( vital > 50 ) vital = 50; + if( str > 50 ) str = 50; + if( tgh > 50 ) tgh = 50; + if( dex > 50 ) dex = 50; + LevelUpPoint = ( vital << 24 ) + ( str << 16 ) + ( tgh << 8 ) + ( dex << 0 ); + CHAR_setInt( petindex, CHAR_ALLOCPOINT , LevelUpPoint ); + print("\n lvup <<%d %d %d %d>>", vital, str, tgh, dex ); + modai = CHAR_getInt( petindex, CHAR_MODAI ); + modai = modai - ( (modai * 5) / 100 ); + CHAR_setInt( petindex, CHAR_MODAI, modai); + + LogPetPointChange( + CHAR_getChar( petindex, CHAR_OWNERCHARANAME), + CHAR_getChar( petindex, CHAR_OWNERCDKEY), + CHAR_getChar( petindex, CHAR_NAME), + petindex, 2, + CHAR_getInt( petindex, CHAR_LV), + "battle_die(战斗死亡)", + CHAR_getInt( petindex,CHAR_FLOOR), + 0, + 0 + ); + } + return; + +} +#endif + +int BATTLE_AddProfit( int battleindex, int *pBidList) +{ + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX; + + if( BattleArray[battleindex].dpbattle == 1 ){ + return BATTLE_AddDuelPoint( battleindex, pBidList ); + }else{ + return BATTLE_AddExpItem( battleindex, pBidList ); + } + +} + +int BATTLE_TargetCheck( + int battleindex, + int defNo +) +{ + int defindex = BATTLE_No2Index( battleindex, defNo ); + + if( CHAR_CHECKINDEX( defindex ) == FALSE + || CHAR_getWorkInt( defindex, CHAR_WORKBATTLEMODE ) == 0 + || CHAR_getFlg( defindex, CHAR_ISDIE ) == TRUE + || CHAR_getInt( defindex, CHAR_HP ) <= 0 + || CHAR_getFlg( defindex, CHAR_ISATTACKED ) == FALSE + || CHAR_getWorkInt( defindex, CHAR_WORKBATTLEMODE ) == BATTLE_CHARMODE_RESCUE + ){ + return FALSE; + } + return TRUE; +} + +int BATTLE_TargetCheckDead( + int battleindex, + int defNo +) +{ + int defindex = BATTLE_No2Index( battleindex, defNo ); + if( CHAR_CHECKINDEX( defindex ) == FALSE + || CHAR_getWorkInt( defindex, CHAR_WORKBATTLEMODE ) == 0 + || CHAR_getWorkInt( defindex, CHAR_WORKBATTLEMODE ) == BATTLE_CHARMODE_RESCUE + || CHAR_getFlg( defindex, CHAR_ISATTACKED ) == FALSE + || CHAR_getFlg( defindex, CHAR_ISDIE ) == FALSE ){ + //BATTLE_CHARMODE_RESCUE 5 + print("\n [ %d, %d, %d, %d]", + CHAR_getWorkInt( defindex, CHAR_WORKBATTLEMODE ), + CHAR_getWorkInt( defindex, CHAR_WORKBATTLEMODE ), + CHAR_getFlg( defindex, CHAR_ISATTACKED ), + CHAR_getFlg( defindex, CHAR_ISDIE )); + return FALSE; + } + return TRUE; +} + + + + +int BATTLE_TargetAdjust( int battleindex, int charaindex, int myside ) +{ + int defNo; + + defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); + + if( BATTLE_TargetCheck( battleindex, defNo ) == FALSE ){ + defNo = BATTLE_DefaultAttacker( battleindex, 1 - myside ); + } + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, defNo ); + + return defNo; +} + +void Compute_Down( int charaindex, int rideindex, int *down1, int *down2, int flg) +{ + int hp=0, pethp=0; + int downs = 0; + + *down1 = 0; + *down2 = 0; + //人物 + downs = + CHAR_getInt( charaindex, CHAR_VITAL ) + + CHAR_getInt( charaindex, CHAR_STR ) + + CHAR_getInt( charaindex, CHAR_DEX ) + + CHAR_getInt( charaindex, CHAR_TOUGH ); + if( (downs = (((downs/100)-20)/4)) < 1 ) + downs = 1; + hp = CHAR_getInt( charaindex, CHAR_HP ); + if( hp <= downs ) downs = hp - 1; + if( downs >= 0 ){ + hp = ((hp-downs)<1)?1:(hp-downs); + CHAR_setInt( charaindex, CHAR_HP, hp ); + *down1 = downs; + } + if( flg == -1 ) { + }else {//骑乘宠物 + if( !CHAR_CHECKINDEX( rideindex)) return; + downs = + CHAR_getInt( rideindex, CHAR_VITAL ) + + CHAR_getInt( rideindex, CHAR_STR ) + + CHAR_getInt( rideindex, CHAR_DEX ) + + CHAR_getInt( rideindex, CHAR_TOUGH ); + if( (downs = (((downs/100)-20)/4)) < 1 ) + downs = 1; + pethp = CHAR_getInt( rideindex, CHAR_HP ); + if( pethp <= downs ) downs = pethp - 1; + if( downs >= 0 ){ + pethp = ((pethp-downs)<1)?1:(pethp-downs); + + CHAR_setInt( rideindex, CHAR_HP, pethp); + *down2 = downs; + } + } +} + +#ifdef _PET_SKILL_SARS // WON ADD 毒煞蔓延 +void Compute_Down_SARS( int charaindex, int rideindex, int *down1, int *down2, int flg) +{ + int hp=0, pethp=0; + int downs = 0; + + *down1 = 0; + *down2 = 0; + //人物 +/* + downs = + CHAR_getInt( charaindex, CHAR_VITAL ) + + CHAR_getInt( charaindex, CHAR_STR ) + + CHAR_getInt( charaindex, CHAR_DEX ) + + CHAR_getInt( charaindex, CHAR_TOUGH ); + if( (downs = (((downs/100)-20)/4)) < 1 ) + downs = 1; +*/ + + hp = CHAR_getInt( charaindex, CHAR_HP ); + downs = hp * 10 / 100; + + if( hp <= downs ) downs = hp - 1; + if( downs >= 0 ){ + hp = ((hp-downs)<1)?1:(hp-downs); + CHAR_setInt( charaindex, CHAR_HP, hp ); + *down1 = downs; + } + if( flg == -1 ) { + }else {//骑乘宠物 + if( !CHAR_CHECKINDEX( rideindex)) return; + downs = + CHAR_getInt( rideindex, CHAR_VITAL ) + + CHAR_getInt( rideindex, CHAR_STR ) + + CHAR_getInt( rideindex, CHAR_DEX ) + + CHAR_getInt( rideindex, CHAR_TOUGH ); + if( (downs = (((downs/100)-20)/4)) < 1 ) + downs = 1; + pethp = CHAR_getInt( rideindex, CHAR_HP ); + if( pethp <= downs ) downs = pethp - 1; + if( downs >= 0 ){ + pethp = ((pethp-downs)<1)?1:(pethp-downs); + + CHAR_setInt( rideindex, CHAR_HP, pethp); + *down2 = downs; + } + } +} +#endif + +#ifdef _PROFESSION_ADDSKILL +void WorkIceCrackPlay(int charaindex, int cnt, int workicecracknum ) +{ + char szBuffer[256]=""; + int i,value=0; + int battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + int defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 );//defNo = BATTLE_Index2No( battleindex, charaindex ); + int ridepet = BATTLE_getRidePet( charaindex ); + int bid = BATTLE_Index2No( battleindex, charaindex ); + value = CHAR_getWorkInt( charaindex, workicecracknum ); + + if( cnt <= 0 && value > 0 ){ + int damage=0, petdamage=0; + + int ToList[SIDE_OFFSET*2+1]; + memset( ToList, -1, sizeof( ToList)); + BATTLE_MultiList( battleindex, TARGET_SIDE_1, ToList ); + // 将魔法参数代入动画 + analysis_profession_parameter( 2, 4, defNo, charaindex ); + PROFESSION_MAGIC_ATTAIC_Effect( battleindex, bid, ToList, 2); + + if( defNo == 20 || defNo == 25 || defNo == 26 )//右 + bid = 0; + else + bid = 10; + + + for( i = bid ; i < bid+10 ; i++ ) { + int defType, charaidx, petidx; + charaidx = BATTLE_No2Index( battleindex , i); + if( CHAR_CHECKINDEX( charaidx ) ){ + if( CHAR_getInt( charaidx, CHAR_HP ) > 0 ){ + int hp,pethp = 0; + petidx = BATTLE_getRidePet( charaidx ); + defType = CHAR_getInt(charaidx, CHAR_WHICHTYPE); + CHAR_setWorkInt( charaidx, workicecracknum, 0 ); + + damage = value; + + hp = CHAR_getInt( charaidx, CHAR_HP ); + if( petidx == -1 ) { + hp -= damage; + if( hp < 0 ) hp = 0; + }else { + int defquick=0, petquick=0, playerdamage=0; + pethp = CHAR_getInt( petidx, CHAR_HP ); + defquick = CHAR_getWorkInt( charaidx, CHAR_WORKDEFENCEPOWER ); + petquick = CHAR_getWorkInt( petidx, CHAR_WORKDEFENCEPOWER ); + if( pethp > 0 ){ + playerdamage = (damage*petquick)/(defquick+petquick) +1; + petdamage = damage - playerdamage +1 ; + hp -= playerdamage; + pethp -= petdamage; + }else{ + hp -= damage; + } + if( hp < 0 ) hp = 0; + if( pethp < 0 ) pethp = 0; + CHAR_setInt( petidx, CHAR_HP, pethp ); + } + + CHAR_setInt( charaidx, CHAR_HP, hp ); + + if( hp <= 0 ){ + CHAR_setFlg( charaidx, CHAR_ISDIE, 1 ); + CHAR_setWorkInt( charaidx, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + } + if( pethp <= 0 ){ + CHAR_setFlg( petidx, CHAR_ISDIE, 1 ); + CHAR_setWorkInt( ridepet, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + } + + + if( damage >= 0 ){ + sprintf( szBuffer , "%X|%X|%X|%X|" , i , i ,(int)(damage) , (int)(petdamage)); + BATTLESTR_ADD( szBuffer ); + } + if( petidx != -1 && petdamage >= 0 ){ + + } + } + } + } + sprintf( szBuffer , "%X|" , 0x5711438 ); + BATTLESTR_ADD( szBuffer ); + } +} +#endif + +static int BATTLE_StatusSeq( int charaindex ) +{ + int cnt, i, bid, battleindex, down; + char szBuffer[256]=""; +#ifdef _MAGIC_DEEPPOISON + int defNo,defindex=0; + char szCommand[1024]; +#endif + int ridepet = BATTLE_getRidePet( charaindex ); + int hp=0, pethp=0; + + + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + +#ifdef _MAGIC_DEEPPOISON + defNo = BATTLE_Index2No( battleindex, charaindex ); + defindex = BATTLE_No2Index( battleindex, defNo ); +#endif + bid = BATTLE_Index2No( battleindex, charaindex ); + if( BATTLE_CanMoveCheck( charaindex ) == FALSE ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + } + + for( i = 1; i < BATTLE_ST_END; i++ ){ + if( ( cnt = CHAR_getWorkInt( charaindex, StatusTbl[i] )) <= 0 )continue; + CHAR_setWorkInt( charaindex, StatusTbl[i], --cnt ); +#ifdef _MAGIC_WEAKEN // 虚弱 + if(CHAR_getWorkInt(charaindex,CHAR_WORKWEAKEN) > 0) + CHAR_setWorkInt( charaindex, StatusTbl[i], cnt+1 ); +#endif +#ifdef _MAGIC_BARRIER// vincent 精灵:魔障 + if(CHAR_getWorkInt(charaindex,CHAR_WORKBARRIER) > 0) + CHAR_setWorkInt( charaindex, StatusTbl[i], cnt+1 ); +#endif + + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + if( cnt <= 0 && ( StatusTbl[i] != CHAR_WORKICECRACK ) +#ifdef _PROFESSION_ADDSKILL + && ( StatusTbl[i] != CHAR_WORKICECRACK2 ) + && ( StatusTbl[i] != CHAR_WORKICECRACK3 ) + && ( StatusTbl[i] != CHAR_WORKICECRACK4 ) + && ( StatusTbl[i] != CHAR_WORKICECRACK5 ) + && ( StatusTbl[i] != CHAR_WORKICECRACK6 ) + && ( StatusTbl[i] != CHAR_WORKICECRACK7 ) + && ( StatusTbl[i] != CHAR_WORKICECRACK8 ) + && ( StatusTbl[i] != CHAR_WORKICECRACK9 ) + && ( StatusTbl[i] != CHAR_WORKICECRACK10 ) +#endif + ){ // 冰爆术 +#else + if( cnt <= 0 ){ +#endif + BATTLE_BadStatusString( bid, 0 ); + //snprintf( szBuffer, sizeof( szBuffer ), "(%s)将(%s)修理完毕。", + // CHAR_getUseName( charaindex ), aszStatusFull[i] ); + // BATTLE_BroadCast( battleindex, szBuffer, + // (bid >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; +//Terry del +// sprintf( szBuffer, "BM|%X|%X|", bid, 0 ); +// BATTLESTR_ADD( szBuffer ); +#ifdef _MAGIC_NOCAST + if( StatusTbl[i] == CHAR_WORKNOCAST ){ + lssproto_NC_send( getfdFromCharaIndex( charaindex ), 0);//复原 + } +#endif + if( StatusTbl[i] == CHAR_WORKDRUNK ){ + if( ridepet != -1 ){ + CHAR_setWorkInt( charaindex, CHAR_WORKQUICK, + CHAR_getWorkInt( charaindex, CHAR_WORKQUICK ) + + CHAR_getWorkInt( ridepet, CHAR_WORKQUICK ) ); + }else{ + CHAR_setWorkInt( charaindex, CHAR_WORKQUICK, + CHAR_getWorkInt( charaindex, CHAR_WORKQUICK ) * 2 ); + } + } + continue; + } + + switch( StatusTbl[i] ){ + + case CHAR_WORKPOISON: + { + int petdown=-1; + Compute_Down( charaindex, ridepet, &down, &petdown, ridepet); + if( down >= 0 ){ + //snprintf( szBuffer, sizeof( szBuffer ), + // "(%s)因(%s)受到(%d)的损伤。", + // CHAR_getUseName( charaindex ), + // aszStatusFull[i], + // down ); + //BATTLE_BroadCast( battleindex, szBuffer, + // (bid >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + +#ifdef _NOTRIDE_ + sprintf( szBuffer, "BD|r%X|0|0|%X|", bid, (int)(down) ); + BATTLESTR_ADD( szBuffer ); +#else + sprintf( szBuffer, "BD|r%X|0|0|%X|p%X|", bid, (int)(down), (int)(petdown) ); + BATTLESTR_ADD( szBuffer ); +#endif + } + if( ridepet != -1 && petdown >= 0 ){ + //snprintf( szBuffer, sizeof( szBuffer ), + // "(%s的骑宠)因(%s)受到(%d)的损伤。", + // CHAR_getUseName( charaindex ), + // aszStatusFull[i], petdown ); + //BATTLE_BroadCast( battleindex, szBuffer, + // (bid >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + } + } + break; +#ifdef _MAGIC_DEEPPOISON + case CHAR_WORKDEEPPOISON: + if(CHAR_getInt( defindex, CHAR_HP ) <= 1){ + snprintf( szCommand, sizeof( szCommand ),"Bd|a%X|r%X|f%X|d%X|p%X|FF|",defNo,defNo,BCF_NORMAL,1, 0 ); + BATTLESTR_ADD( szCommand ); + CHAR_setInt( defindex, CHAR_HP,0); + CHAR_setWorkInt( defindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + CHAR_setFlg( defindex, CHAR_ISDIE, 1 ); + break; + } + + if(CHAR_getWorkInt( defindex, CHAR_WORKDEEPPOISON) <= 1){ + snprintf( szCommand, sizeof( szCommand ),"Bd|a%X|r%X|f%X|d%X|p%X|FF|",defNo,defNo,BCF_NORMAL,CHAR_getInt( charaindex, CHAR_HP), 0 ); + BATTLESTR_ADD( szCommand ); + CHAR_setInt( defindex, CHAR_HP,0); + CHAR_setFlg( defindex, CHAR_ISDIE, 1 ); + CHAR_setWorkInt( defindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + sprintf(szBuffer, "%s身中剧毒未解而阵亡了!!", CHAR_getChar( defindex, CHAR_NAME )); + if( CHAR_getInt( defindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET ){ + CHAR_talkToCli( CHAR_getWorkInt(defindex, CHAR_WORKPLAYERINDEX), -1, szBuffer, CHAR_COLORYELLOW); + }else{ + CHAR_talkToCli( defindex, -1, szBuffer, CHAR_COLORYELLOW); + } + break; + } + if( ridepet == -1 ){// Robin 0728 ride Pet + down = + CHAR_getInt( charaindex, CHAR_VITAL ) + + CHAR_getInt( charaindex, CHAR_STR ) + + CHAR_getInt( charaindex, CHAR_DEX ) + + CHAR_getInt( charaindex, CHAR_TOUGH ); + down = ( down / 100 - 20 ) / 4; + if( down < 1 ) down = 1; + hp = CHAR_getInt( charaindex, CHAR_HP ); + if( hp <= down ) down = hp - 1; + if( down >= 0 ){ + CHAR_setInt( charaindex, CHAR_HP, hp - down ); + //snprintf( szBuffer, sizeof( szBuffer ), + // "(%s)因(%s)受到(%d)的损伤。", + // CHAR_getUseName( charaindex ), + // aszStatusFull[i], + // down ); + //BATTLE_BroadCast( battleindex, szBuffer, + // (bid >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; +#ifdef _NOTRIDE_ + sprintf( szBuffer, "BD|r%X|0|0|%X|", bid, (int)(down) ); + BATTLESTR_ADD( szBuffer ); +#else + sprintf( szBuffer, "BD|r%X|0|0|%X|p%X|", bid, (int)(down), 0 ); + BATTLESTR_ADD( szBuffer ); +#endif + } + break; + }else { + int petdown; + down = + CHAR_getInt( charaindex, CHAR_VITAL ) + + CHAR_getInt( charaindex, CHAR_STR ) + + CHAR_getInt( charaindex, CHAR_DEX ) + + CHAR_getInt( charaindex, CHAR_TOUGH ); + petdown = + CHAR_getInt( ridepet, CHAR_VITAL ) + + CHAR_getInt( ridepet, CHAR_STR ) + + CHAR_getInt( ridepet, CHAR_DEX ) + + CHAR_getInt( ridepet, CHAR_TOUGH ); + down = ( down / 100 - 20 ) / 4; + petdown = ( petdown / 100 - 20 ) /4; + if( down < 1 ) down = 1; + if( petdown < 1 ) petdown = 1; + hp = CHAR_getInt( charaindex, CHAR_HP ); + pethp = CHAR_getInt( ridepet, CHAR_HP ); + if( hp <= down ) down = hp - 1; + if( pethp <= petdown ) petdown = pethp - 1; + if( down >= 0 ){ + CHAR_setInt( charaindex, CHAR_HP, hp - down ); + //snprintf( szBuffer, sizeof( szBuffer ), + // "(%s)因(%s)受到(%d)的损伤。", + // CHAR_getUseName( charaindex ), + // aszStatusFull[i], + // down ); + //BATTLE_BroadCast( battleindex, szBuffer, + // (bid >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + #ifdef _NOTRIDE_ + sprintf( szBuffer, "BD|r%X|0|0|%X|", bid, (int)(down) ); + BATTLESTR_ADD( szBuffer ); + #else + sprintf( szBuffer, "BD|r%X|0|0|%X|p%X|", bid, (int)(down), (int)(petdown) ); + BATTLESTR_ADD( szBuffer ); + #endif + } + if( petdown >= 0 ){ + CHAR_setInt( ridepet, CHAR_HP, pethp - petdown ); + //snprintf( szBuffer, sizeof( szBuffer ), + // "(%s的骑宠)因(%s)受到(%d)的损伤。", + // CHAR_getUseName( charaindex ), + // aszStatusFull[i], + // petdown ); + //BATTLE_BroadCast( battleindex, szBuffer, + // (bid >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + } + break; + } +#endif +#ifdef _MAGIC_NOCAST // 精灵:沉默 + case CHAR_WORKNOCAST: + lssproto_NC_send( getfdFromCharaIndex( charaindex ), 1);//沉默 + break; +#endif + case CHAR_WORKCONFUSION: + { int side, pos, defNo, lop; + if( RAND( 1, 100 ) > 80 ){ + break; + } + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_ATTACK ); + side = RAND( 0, 1 ); + pos = RAND( 0, 9 ); + for( lop = 0; lop < SIDE_OFFSET; lop ++ ){ + if( ++pos >= SIDE_OFFSET )pos = 0; + defNo = side * SIDE_OFFSET + pos; + if( defNo == bid ) continue; + if( BATTLE_TargetCheck( battleindex, defNo ) == TRUE ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, defNo ); + break; + } + } + if( lop >= SIDE_OFFSET ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, -1 ); + } + } + break; +#ifdef _PROFESSION_ADDSKILL + case CHAR_WORKANNEX://附身术 + { int side, pos, defNo, lop; + + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_ATTACK ); + side = RAND( 0, 1 ); + pos = RAND( 0, 9 ); + for( lop = 0; lop < SIDE_OFFSET; lop ++ ){ + if( ++pos >= SIDE_OFFSET )pos = 0; + defNo = side * SIDE_OFFSET + pos; + if( defNo == bid ) continue; + if( BATTLE_TargetCheck( battleindex, defNo ) == TRUE ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, defNo ); + break; + } + } + if( lop >= SIDE_OFFSET ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, -1 ); + } + + } + break; +#endif + case CHAR_WORKDRUNK: + break; + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + case CHAR_WORKOBLIVION: // 遗忘 + { + // 恢复技能 + if( cnt <= 1 ){ + int defNo = BATTLE_Index2No( battleindex, charaindex ); + int toNo = defNo - 5; + int toNoindex = -1, pet_no = -1; + char msg[20]; + + memset( msg, -1, sizeof(msg) ); + + // 主人index + toNoindex = BATTLE_No2Index( battleindex, toNo ); + CHAR_setWorkInt(charaindex, StatusTbl[BATTLE_ST_OBLIVION], 0 ); + + // 宠物编号 + pet_no = CHAR_getInt( toNoindex, CHAR_DEFAULTPET ); + sprintf( msg, "W%d", pet_no ); + + CHAR_sendStatusString( toNoindex, msg ); + + + BATTLE_BadStatusString( bid, 0 ); + sprintf( szBuffer, "BM|%X|%X|", bid, 0 ); + BATTLESTR_ADD( szBuffer ); + } + break; + } + case CHAR_WORK_F_ENCLOSE: // 火附体 + { + int ToList[SIDE_OFFSET*2+1]; + int defNo = BATTLE_Index2No( battleindex, charaindex ); + int old_hp = CHAR_getInt( charaindex, CHAR_HP ); + int dec_hp = 0, hp = 0; + int DAMAGE = 50; + + memset( ToList, -1, sizeof( ToList)); + BATTLE_MultiList( battleindex, defNo, ToList ); + BATTLE_MagicEffect( battleindex, defNo, ToList, 101699, 101699 ); + + // 取魔法伤害值 + DAMAGE = DAMAGE * cnt; +#ifdef _PROFESSION_ADDSKILL + dec_hp = PROFESSION_MAGIC_GET_DAMAGE( charaindex, charaindex, 1, DAMAGE, 0); +#else + dec_hp = PROFESSION_MAGIC_GET_DAMAGE( charaindex, charaindex, 1, DAMAGE ); +#endif + hp = old_hp - dec_hp; + + if( hp <= 0 ){ + CHAR_setInt( charaindex, CHAR_HP, 0 ); + CHAR_setFlg( charaindex, CHAR_ISDIE, 1 ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + }else{ + CHAR_setInt( charaindex, CHAR_HP, hp ); + } + + sprintf( szCommand, "BD|r%X|0|0|%X|", defNo, dec_hp ); + BATTLESTR_ADD( szCommand ); + + break; + } + case CHAR_WORK_I_ENCLOSE: // 冰附体 + { + int old_dex = CHAR_getInt( charaindex, CHAR_DEX ); + int dex = 0; + int ToList[SIDE_OFFSET*2+1]; + int defNo = BATTLE_Index2No( battleindex, charaindex ); + + memset( ToList, -1, sizeof( ToList)); + BATTLE_MultiList( battleindex, defNo, ToList ); + BATTLE_MagicEffect( battleindex, defNo, ToList, 27692, 101700 ); + + dex = old_dex * 0.9; + CHAR_setWorkInt(charaindex,CHAR_WORKFIXDEX, dex ); + sprintf( szCommand, "BD|r%X|0|6|%X|", defNo, (-1) * (int)((old_dex * 0.1) / 100) ); + BATTLESTR_ADD( szCommand ); + + break; + } + case CHAR_WORKRESIST_F: // 火抗性提升 + { + // 恢复抗性 + if( cnt <= 1 ){ + int add_value = 0; + int old_value = 0; + old_value = CHAR_getWorkInt( charaindex, CHAR_WORK_F_RESIST ); + add_value = CHAR_getWorkInt( charaindex, CHAR_WORKMODRESIST_F ); + + CHAR_setWorkInt( charaindex, CHAR_WORK_F_RESIST, old_value - add_value ); + CHAR_talkToCli( charaindex, -1 , "火抗性恢复" , CHAR_COLORYELLOW ); + } + break; + } + case CHAR_WORKRESIST_I: // 冰抗性提升 + { + // 恢复抗性 + if( cnt <= 1 ){ + int add_value = 0; + int old_value = 0; + old_value = CHAR_getWorkInt( charaindex, CHAR_WORK_I_RESIST ); + add_value = CHAR_getWorkInt( charaindex, CHAR_WORKMODRESIST_I ); + + CHAR_setWorkInt( charaindex, CHAR_WORK_I_RESIST, old_value - add_value ); + CHAR_talkToCli( charaindex, -1 , "冰抗性恢复" , CHAR_COLORYELLOW ); + } + + break; + } + case CHAR_WORKRESIST_T: // 雷抗性提升 + { + // 恢复抗性 + if( cnt <= 1 ){ + int add_value = 0; + int old_value = 0; + old_value = CHAR_getWorkInt( charaindex, CHAR_WORK_T_RESIST ); + add_value = CHAR_getWorkInt( charaindex, CHAR_WORKMODRESIST_T ); + + CHAR_setWorkInt( charaindex, CHAR_WORK_T_RESIST, old_value - add_value ); + CHAR_talkToCli( charaindex, -1 , "雷抗性恢复" , CHAR_COLORYELLOW ); + } + + break; + } +#ifdef _PROFESSION_ADDSKILL +/* case CHAR_WORKERSIST_F_I_T: // 提升火冰雷抗性 + { + // 恢复抗性 + if( cnt <= 1 ){ + int add_value = 0; + int old_value = 0; + old_value = CHAR_getWorkInt( charaindex, CHAR_WORK_F_RESIST ); + add_value = CHAR_getWorkInt( charaindex, CHAR_WORKMODRESIST_F ); + CHAR_setWorkInt( charaindex, CHAR_WORK_F_RESIST, old_value - add_value ); + CHAR_talkToCli( charaindex, -1 , "火抗性恢复" , CHAR_COLORYELLOW ); + + old_value = CHAR_getWorkInt( charaindex, CHAR_WORK_I_RESIST ); + add_value = CHAR_getWorkInt( charaindex, CHAR_WORKMODRESIST_I ); + CHAR_setWorkInt( charaindex, CHAR_WORK_I_RESIST, old_value - add_value ); + CHAR_talkToCli( charaindex, -1 , "冰抗性恢复" , CHAR_COLORYELLOW ); + + old_value = CHAR_getWorkInt( charaindex, CHAR_WORK_T_RESIST ); + add_value = CHAR_getWorkInt( charaindex, CHAR_WORKMODRESIST_T ); + CHAR_setWorkInt( charaindex, CHAR_WORK_T_RESIST, old_value - add_value ); + CHAR_talkToCli( charaindex, -1 , "雷抗性恢复" , CHAR_COLORYELLOW ); + } + + break; + }*/ + case CHAR_WORKFEAR: + if( cnt <= 0 ) + CHAR_talkToCli( charaindex, -1 , "攻、防、敏恢复" , CHAR_COLORYELLOW ); + break; +#endif + case CHAR_WORKINSTIGATE: // 挑拨 + { + int side, pos, defNo, lop, rate=0; + if( RAND( 1, 100 ) > 80 ){ + break; + } + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_ATTACK ); + side = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLESIDE ); + + rate = CHAR_getWorkInt( charaindex, CHAR_WORKMODINSTIGATE); + + CHAR_setWorkInt( charaindex, CHAR_WORKFIXSTR, (CHAR_getWorkInt( charaindex, CHAR_WORKFIXSTR) * (100 - rate) /100 )); + CHAR_setWorkInt( charaindex, CHAR_WORKFIXTOUGH, (CHAR_getWorkInt( charaindex, CHAR_WORKFIXTOUGH) * (100 - rate) /100 )); + CHAR_setWorkInt( charaindex, CHAR_WORKFIXDEX, (CHAR_getWorkInt( charaindex, CHAR_WORKFIXDEX) * (100 - rate) /100 )); + + pos = RAND( 0, 9 ); + for( lop = 0; lop < SIDE_OFFSET; lop ++ ){ + if( ++pos >= SIDE_OFFSET )pos = 0; + defNo = side * SIDE_OFFSET + pos; + if( defNo == bid ) continue; + if( BATTLE_TargetCheck( battleindex, defNo ) == TRUE ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, defNo ); + break; + } + } + if( lop >= SIDE_OFFSET ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, -1 ); + } + break; + } +/* + case CHAR_WORK_FOCUS: // 专注战斗 + { + if( cnt <= 1 ){ + int atk_to_index = CHAR_getWorkInt( charaindex, CHAR_WORKMOD_FOCUS ); + int atk_to_no = BATTLE_Index2No( battleindex, atk_to_index ); + + if( BATTLE_TargetCheck( battleindex, atk_to_no ) != TRUE ) break; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_ATTACK ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, atk_to_no ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, 1 ); + } + break; + } +*/ + case CHAR_WORKSIGN: // 一针见血 + { + // 吸血 + int skill_level = CHAR_getWorkInt( charaindex, CHAR_WORKMODSIGN ); + int old_hp = CHAR_getInt( charaindex, CHAR_HP ); + int old_mp = CHAR_getInt( charaindex, CHAR_MP ); + int to_index = CHAR_getWorkInt( charaindex, CHAR_WORKSIGNID ); + int to_old_hp = CHAR_getInt( to_index, CHAR_HP ); + int to_old_mp = CHAR_getInt( to_index, CHAR_MP ); + int dec_hp=0, dec_mp=0, rate=0, hp=0, mp=0, add_hp=0, add_mp=0; + + if( old_hp <= 0 ) break; + +#ifdef _PROFESSION_ADDSKILL + if( skill_level >= 10 ){ + dec_hp = 200; + dec_mp = 30; + }else if( skill_level > 6 ){ + dec_hp = 150; + dec_mp = 20; + }else if( skill_level > 3 ){ + dec_hp = 100; + dec_mp = 15; + }else{ + dec_hp = 50; + dec_mp = 10; + } + // 增加hp + if( skill_level > 8 ) rate = 100; + else if( skill_level > 7 ) rate = 50; + else rate = 0; + add_hp = dec_hp * rate / 100; + + // 增加mp + if( skill_level > 8 ) rate = 100; + else rate = 0; + add_mp = dec_mp * rate / 100; + +#else + if( skill_level >= 10 ){ + dec_hp = 300; + dec_mp = 70; + }else if( skill_level >= 9 ){ + dec_hp = 200; + dec_mp = 50; + }else if( skill_level >= 7 ){ + dec_hp = 150; + dec_mp = 30; + }else if( skill_level >= 4 ){ + dec_hp = 100; + dec_mp = 20; + }else{ + dec_hp = 50; + dec_mp = 10; + } + // 增加hp + if( skill_level >= 9 ) rate = 80; + else if( skill_level >= 7 ) rate = (skill_level - 1 ) * 10; + else if( skill_level >= 4 ) rate = (skill_level - 2 ) * 10; + else rate = skill_level * 10; + add_hp = dec_hp * rate / 100; + + // 增加mp + if( skill_level >= 9 ) rate = 100; + else if( skill_level >= 7 ) rate = (skill_level - 1 ) * 10; + else if( skill_level >= 4 ) rate = (skill_level - 2 ) * 10; + else rate = skill_level * 10; + add_mp = dec_mp * rate / 100; +#endif + + // 中嗜血蛊的人减 HP + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + mp = old_mp - dec_mp; + if( mp < 0 ){ + mp = 0; + add_mp=0; + } + CHAR_setInt(charaindex, CHAR_MP, mp); + } + + // 中嗜血蛊的人减 HP + if( ridepet == -1 ) { + hp = old_hp - dec_hp; + if( hp < 0 ) hp = 0; + CHAR_setInt(charaindex, CHAR_HP, hp); + sprintf( szCommand, "BD|r%X|0|0|%X|m%X|", bid, dec_hp, dec_mp ); + }else{ + int pet_old_hp = CHAR_getInt( ridepet, CHAR_HP ); + int pet_hp=0; + + dec_hp /= 2; + hp = old_hp - dec_hp; + pet_hp = pet_old_hp - dec_hp; + + if( hp < 0 ) hp = 0; + if( pet_hp < 0 ) pet_hp = 0; + + CHAR_setInt(charaindex, CHAR_HP, hp); + CHAR_setInt(ridepet, CHAR_HP, pet_hp); + if( pet_hp <= 0 ){ + CHAR_setFlg( ridepet, CHAR_ISDIE, 1 ); + CHAR_setWorkInt( ridepet, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + } + sprintf( szCommand, "BD|r%X|0|0|%X|m%X|p%X|", bid, dec_hp, dec_mp, dec_hp ); + } + + if( hp <= 0 ){ + CHAR_setFlg( charaindex, CHAR_ISDIE, 1 ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + } + + BATTLESTR_ADD( szCommand ); + + // 使用嗜血蛊的人加 HP、MP + if( (add_hp > 0) && (to_old_hp > 0) ){ + int to_bid=0, to_hp=0, to_mp=0; + + to_bid = BATTLE_Index2No( battleindex, to_index ); + sprintf( szCommand, "BD|r%X|0|1|%X|m%X|", to_bid, add_hp, add_mp ); + BATTLESTR_ADD( szCommand ); + + to_hp = to_old_hp + add_hp; + if( to_hp > CHAR_getWorkInt( to_index , CHAR_WORKMAXHP ) ) + to_hp = CHAR_getWorkInt( to_index , CHAR_WORKMAXHP ); + + to_mp = to_old_mp + add_mp; + if( to_mp > CHAR_getWorkInt( to_index , CHAR_WORKMAXMP ) ) + to_mp = CHAR_getWorkInt( to_index , CHAR_WORKMAXMP ); + + CHAR_setInt(to_index, CHAR_HP, to_hp); + CHAR_setInt(to_index, CHAR_MP, to_mp); + } + + break; + } + case CHAR_WORKBLOODWORMS: // 嗜血蛊 + { + // 吸血 + int skill_level = CHAR_getWorkInt( charaindex, CHAR_WORKMODBLOODWORMS ); + int old_hp = CHAR_getInt( charaindex, CHAR_HP ); + int to_index = CHAR_getWorkInt( charaindex, CHAR_WORKBLOODWORMSID ); + int to_old_hp = CHAR_getInt( to_index, CHAR_HP ); + int dec_hp=0, rate=0, hp=0, add_hp=0; + + skill_level = PROFESSION_CHANGE_SKILL_LEVEL_M( skill_level ); + + if( old_hp <= 0 ) break; + + dec_hp = skill_level * 10 + 30; + if( skill_level >= 10 ) rate = 20; + else if( skill_level >= 7 ) rate = 15; + else if( skill_level >= 5 ) rate = 10; + else rate = 5; + + add_hp = dec_hp * rate / 100; + + // 中嗜血蛊的人减 HP + if( ridepet == -1 ) { + hp = old_hp - dec_hp; + if( hp < 0 ) hp = 0; + + CHAR_setInt(charaindex, CHAR_HP, hp); + sprintf( szCommand, "BD|r%X|0|0|%X|", bid, dec_hp ); + }else{ + int pet_old_hp = CHAR_getInt( ridepet, CHAR_HP ); + int pet_hp=0; + + dec_hp /= 2; + hp = old_hp - dec_hp; + pet_hp = pet_old_hp - dec_hp; + + if( hp < 0 ) hp = 0; + if( pet_hp < 0 ) pet_hp = 0; + + CHAR_setInt(charaindex, CHAR_HP, hp); + CHAR_setInt(ridepet, CHAR_HP, pet_hp); + if( pet_hp == 0 ){ + CHAR_setFlg( ridepet, CHAR_ISDIE, 1 ); + CHAR_setWorkInt( ridepet, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + } + sprintf( szCommand, "BD|r%X|0|0|%X|p%X|", bid, dec_hp, dec_hp ); + } + + if( hp <= 0 ){ + CHAR_setFlg( charaindex, CHAR_ISDIE, 1 ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + } + + BATTLESTR_ADD( szCommand ); + + // 使用嗜血蛊的人加 HP + if( (add_hp > 0) && (to_old_hp > 0) ){ + int to_bid=0, to_hp=0; + + to_bid = BATTLE_Index2No( battleindex, to_index ); + sprintf( szCommand, "BD|r%X|0|1|%X|", to_bid, add_hp ); + BATTLESTR_ADD( szCommand ); + + to_hp = to_old_hp + add_hp; + if( to_hp > CHAR_getWorkInt( to_index , CHAR_WORKMAXHP ) ) + to_hp = CHAR_getWorkInt( to_index , CHAR_WORKMAXHP ); + + CHAR_setInt(to_index, CHAR_HP, to_hp); + } + + break; + } + case CHAR_WORKICEARROW: // 冰箭 + { + // 减敏 + int dec_dex = CHAR_getWorkInt( charaindex, CHAR_WORKMODICEARROW ); + int old_dex = CHAR_getWorkInt( charaindex, CHAR_WORKFIXDEX ); + int dex=0; + + dex = old_dex * ( 100 - dec_dex ) / 100; + CHAR_setWorkInt(charaindex,CHAR_WORKFIXDEX, dex); + sprintf( szCommand, "BD|r%X|0|6|%X|", bid, (-1) * dec_dex ); + + BATTLESTR_ADD( szCommand ); + + break; + } + case CHAR_WORKICECRACK: // 冰爆术 + { + int value=0; + int defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 );//defNo = BATTLE_Index2No( battleindex, charaindex ); + + value = CHAR_getWorkInt( charaindex, CHAR_WORKMODICECRACK ); + + if( cnt <= 0 && value > 0 ){ + int damage=0, petdamage=0; + + int ToList[SIDE_OFFSET*2+1]; + memset( ToList, -1, sizeof( ToList)); + BATTLE_MultiList( battleindex, TARGET_SIDE_1, ToList ); + // 将魔法参数代入动画 + analysis_profession_parameter( 2, 4, defNo, charaindex ); + PROFESSION_MAGIC_ATTAIC_Effect( battleindex, bid, ToList, 2); + + if( defNo == 20 || defNo == 25 || defNo == 26 )//右 + bid = 0; + else + bid = 10; + + + for( i = bid ; i < bid+10 ; i++ ) { + int defType, charaidx, petidx; + charaidx = BATTLE_No2Index( battleindex , i); + if( CHAR_CHECKINDEX( charaidx ) ){ + if( CHAR_getInt( charaidx, CHAR_HP ) > 0 ){ + petidx = BATTLE_getRidePet( charaidx ); + defType = CHAR_getInt(charaidx, CHAR_WHICHTYPE); + CHAR_setWorkInt( charaidx, CHAR_WORKICECRACK, 0 ); + //BATTLE_BadStatusString( bid, 0 ); + //snprintf( szBuffer, sizeof( szBuffer ), "(%s)将(%s)修理完毕。", + // CHAR_getUseName( charaindex ), aszStatusFull[i] ); + // BATTLE_BroadCast( battleindex, szBuffer, + // (bid >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + //sprintf( szBuffer, "BM|%X|%X|", bid, 0 ); + //BATTLESTR_ADD( szBuffer ); + + damage = value; + + hp = CHAR_getInt( charaidx, CHAR_HP ); + if( petidx == -1 ) { + hp -= damage; + if( hp < 0 ) hp = 0; + } + else{ + int defquick=0, petquick=0, playerdamage=0; + pethp = CHAR_getInt( petidx, CHAR_HP ); + defquick = CHAR_getWorkInt( charaidx, CHAR_WORKDEFENCEPOWER ); + petquick = CHAR_getWorkInt( petidx, CHAR_WORKDEFENCEPOWER ); + if( pethp > 0 ){ + playerdamage = (damage*petquick)/(defquick+petquick) +1; + petdamage = damage - playerdamage +1 ; + hp -= playerdamage; + pethp -= petdamage; + } + else{ + hp -= damage; + } + if( hp < 0 ) hp = 0; + if( pethp < 0 ) pethp = 0; + CHAR_setInt( petidx, CHAR_HP, pethp ); + } + + CHAR_setInt( charaidx, CHAR_HP, hp ); + + if( hp <= 0 ){ + CHAR_setFlg( charaidx, CHAR_ISDIE, 1 ); + CHAR_setWorkInt( charaidx, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + } + if( pethp <= 0 ){ + CHAR_setFlg( petidx, CHAR_ISDIE, 1 ); + CHAR_setWorkInt( ridepet, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + } + + if( damage >= 0 ){ + //snprintf( szBuffer, sizeof( szBuffer ), + // "(%s)因(%s)受到(%d)的损伤。", + // CHAR_getUseName( charaindex ), + // aszStatusFull[i], + // damage ); + //BATTLE_BroadCast( battleindex, szBuffer, + // (bid >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + + sprintf( szBuffer , "%X|%X|%X|%X|" , i , i ,(int)(damage) , (int)(petdamage)); + + //sprintf( szBuffer, "BD|r%X|0|0|%X|p%X|", i, (int)(damage), (int)(petdamage) ); + BATTLESTR_ADD( szBuffer ); + } + if( petidx != -1 && petdamage >= 0 ){ + //snprintf( szBuffer, sizeof( szBuffer ), + // "(%s的骑宠)因(%s)受到(%d)的损伤。", + // CHAR_getUseName( charaindex ), + // aszStatusFull[i], petdamage ); + //BATTLE_BroadCast( battleindex, szBuffer, + // (bid >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + } + } + } + } + sprintf( szBuffer , "%X|" , 0x5711438 ); + BATTLESTR_ADD( szBuffer ); + } + } + print("\n冰爆术"); + break; +#ifdef _PROFESSION_ADDSKILL + case CHAR_WORKICECRACK2: // 冰爆术2 + WorkIceCrackPlay( charaindex, cnt, CHAR_WORKICECRACK2 );print("\n冰爆术2");break; + case CHAR_WORKICECRACK3: // 冰爆术3 + WorkIceCrackPlay( charaindex, cnt, CHAR_WORKICECRACK3 );print("\n冰爆术3");break; + case CHAR_WORKICECRACK4: // 冰爆术4 + WorkIceCrackPlay( charaindex, cnt, CHAR_WORKICECRACK4 );print("\n冰爆术4");break; + case CHAR_WORKICECRACK5: // 冰爆术5 + WorkIceCrackPlay( charaindex, cnt, CHAR_WORKICECRACK5 );print("\n冰爆术5");break; + case CHAR_WORKICECRACK6: // 冰爆术6 + WorkIceCrackPlay( charaindex, cnt, CHAR_WORKICECRACK6 );print("\n冰爆术6");break; + case CHAR_WORKICECRACK7: // 冰爆术7 + WorkIceCrackPlay( charaindex, cnt, CHAR_WORKICECRACK7 );print("\n冰爆术7");break; + case CHAR_WORKICECRACK8: // 冰爆术8 + WorkIceCrackPlay( charaindex, cnt, CHAR_WORKICECRACK8 );print("\n冰爆术8");break; + case CHAR_WORKICECRACK9: // 冰爆术9 + WorkIceCrackPlay( charaindex, cnt, CHAR_WORKICECRACK9 );print("\n冰爆术9");break; + case CHAR_WORKICECRACK10: // 冰爆术10 + WorkIceCrackPlay( charaindex, cnt, CHAR_WORKICECRACK10 );print("\n冰爆术10");break; +#endif //_PROFESSION_ADDSKILL + +#endif + +#ifdef _PET_SKILL_SARS // WON ADD 毒煞蔓延 + case CHAR_WORKSARS: + { + int j; + int rate = 60; // 传染 SARS 机率 + + // 受传染的人受伤 + { + int petdown=-1; + int dec_mp = 0; + + Compute_Down_SARS( charaindex, ridepet, &down, &petdown, ridepet); + if( down >= 0 ){ + //snprintf( szBuffer, sizeof( szBuffer ), + // "(%s)因(%s)受到(%d)的损伤。", + // CHAR_getUseName( charaindex ), + // aszStatusFull[i], + // down ); + //BATTLE_BroadCast( battleindex, szBuffer, + // (bid >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + + // 如果是玩家扣 MP + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + int old_mp = CHAR_getInt( charaindex, CHAR_MP ); + dec_mp = old_mp / 10 ; + if( dec_mp < 0 ) dec_mp = 0; + CHAR_setInt( charaindex, CHAR_MP, old_mp - dec_mp ); + sprintf( szBuffer, "BD|r%X|0|0|%X|p%X|m%X|", bid, (int)(down), (int)(petdown), dec_mp ); + }else + sprintf( szBuffer, "BD|r%X|0|0|%X|p%X|", bid, (int)(down), (int)(petdown) ); + + BATTLESTR_ADD( szBuffer ); + } + if( ridepet != -1 && petdown >= 0 ){ + //snprintf( szBuffer, sizeof( szBuffer ), + // "(%s的骑宠)因(%s)受到(%d)的损伤。", + // CHAR_getUseName( charaindex ), + // aszStatusFull[i], petdown ); + //BATTLE_BroadCast( battleindex, szBuffer, + // (bid >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + } + } + + // 主传染者传SARS + if( CHAR_getWorkInt( charaindex, CHAR_WORKMODSARS ) > 0 ){ + int buf2[5], ti=0; + int tibuf[10]={ + 3,1,0,2,4, + 8,6,5,7,9 }; + + memset( buf2, -1, sizeof(buf2)); + + if( defNo > 9 ){ + for( j=0; j<10; j++ ){ + tibuf[j] += 10; + } + } + + for( j=0; j<10; j++){ + if( tibuf[j] != defNo ) continue; + if( j > 4 ){ + if( (j+1) < 10 ) buf2[ti++]=tibuf[j+1]; + if( (j-1) > 4 ) buf2[ti++]=tibuf[j-1]; + //不等边 + if( (j-5+1) < 5 ) buf2[ti++]=tibuf[j-5+1]; + if( (j-5-1) >= 0 ) buf2[ti++]=tibuf[j-5-1]; + if( (j-5) >= 0 ) buf2[ti++]=tibuf[j-5]; + }else{ + if( (j+1) < 5 ) buf2[ti++]=tibuf[j+1]; + if( (j-1) >= 0 ) buf2[ti++]=tibuf[j-1]; + //不等边 + if( (j+5+1) < 10 ) buf2[ti++]=tibuf[j+5+1]; + if( (j+5-1) > 4 ) buf2[ti++]=tibuf[j+5-1]; + if( (j+5) < 10 ) buf2[ti++]=tibuf[j+5]; + } + break; + } + + print("buf2[%d,%d,%d,%d,%d]\n", buf2[0], buf2[1], buf2[2], buf2[3], buf2[4]); + + for( j=0; j<5; j++ ){ + + int toindex = 0; + if( buf2[j] == -1 ) continue; + + toindex = BATTLE_No2Index( battleindex, buf2[j] ); + + // 得到sars的离开 + if( CHAR_getWorkInt( toindex,CHAR_WORKSARS ) > 0 ) continue; + + if( RAND( 1, 100 ) <= rate ){ // 中 SARS + if( toindex == charaindex ) continue; + if( CHAR_getInt( toindex, CHAR_HP ) <= 0 ) continue; + + CHAR_setWorkInt( toindex,CHAR_WORKSARS, 3 ); + } + } + } + } + break; +#endif + + default : + //snprintf( szBuffer, sizeof( szBuffer ), + // "(%s)是(%s)", CHAR_getUseName( charaindex ), + // aszStatusFull[i] ); + //BATTLE_BroadCast( battleindex, szBuffer, + // (bid >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + break; + } + } + +#ifdef _SUIT_ITEM + { + int defCode; + int AddHp=0, AddMp=0; +#ifdef _IMPRECATE_ITEM + int nums1, nums2, nums3, delMp=0; +#endif + if( (defCode=CHAR_getWorkInt( charaindex, CHAR_WORKSUITITEM)) > 0){ + AddHp = CHAR_getWorkInt( charaindex, CHAR_WORKROUNDHP); + AddMp = CHAR_getWorkInt( charaindex, CHAR_WORKROUNDMP); + } + +#ifdef _IMPRECATE_ITEM + if( (nums1 = CHAR_getWorkInt( charaindex, CHAR_WORKIMPRECATENUM1)) > 0 ){ + delMp = CHAR_getWorkInt( charaindex, CHAR_WORKHURTMP); + CHAR_setWorkInt( charaindex, CHAR_WORKIMPRECATENUM1, nums1-1); + } + if( (nums2 = CHAR_getWorkInt( charaindex, CHAR_WORKIMPRECATENUM2)) > 0 ){ + AddHp += CHAR_getWorkInt( charaindex, CHAR_WORKWISHESHP); + CHAR_setWorkInt( charaindex, CHAR_WORKIMPRECATENUM2, nums2-1); + } + if( (nums3 = CHAR_getWorkInt( charaindex, CHAR_WORKIMPRECATENUM3)) > 0 ){ + AddMp += CHAR_getWorkInt( charaindex, CHAR_WORKWISHESMP); + CHAR_setWorkInt( charaindex, CHAR_WORKIMPRECATENUM3, nums3-1); + } + AddMp = AddMp - delMp; +#endif + if( AddHp != 0 || AddMp != 0 ) { + int AddPHp=0; + + +#ifdef _TYPE_TOXICATION + if( AddHp != 0 && CHAR_CanCureFlg( charaindex, "FALSE") != FALSE ){ +#else + if( AddHp != 0 ) { +#endif + int MyHp = CHAR_getInt( charaindex, CHAR_HP); + int MaxHp = CHAR_getWorkInt( charaindex, CHAR_WORKMAXHP); + MyHp = ((MyHp+AddHp)>=MaxHp)?MaxHp:(MyHp+AddHp); + MyHp = (MyHp<= 1 )?1:MyHp; + CHAR_setInt( charaindex, CHAR_HP, MyHp); + //snprintf( szBuffer, sizeof( szBuffer ), "(%s)增加(%d)的HP。", + // CHAR_getUseName( charaindex ), AddHp ); + //BATTLE_BroadCast( battleindex, szBuffer, + // (bid >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + if( ridepet != -1 ){ + int PetMaxHp = CHAR_getWorkInt( ridepet, CHAR_WORKMAXHP); + int PetHp = CHAR_getInt( ridepet, CHAR_HP); + AddPHp = AddHp; + PetHp = ((PetHp+AddPHp)>=PetMaxHp)?PetMaxHp:(PetHp+AddPHp); + PetHp = (PetHp<=1)?1:PetHp; + CHAR_setInt( ridepet, CHAR_HP, PetHp); + } + } + if( AddMp != 0 ) { + int MyMp = CHAR_getInt( charaindex, CHAR_MP); + int MaxMp = CHAR_getWorkInt( charaindex, CHAR_WORKMAXMP); + MyMp = ((MyMp+AddMp)>MaxMp)?MaxMp:(MyMp+AddMp); + MyMp = (MyMp<0)?0:MyMp; + CHAR_setInt( charaindex, CHAR_MP, MyMp); +/* +#ifdef _FIXITEMANISHOW + sprintf( szBuffer, "BD|r%X|0|1|%X|p%X|m%X|", bid, AddHp, AddPHp, AddMp); + }else { + sprintf( szBuffer, "BD|r%X|0|1|%X|p%X|", bid, AddHp, AddPHp ); +#else +*/ + sprintf( szBuffer, "BD|r%X|0|2|%X|p%X|m%X|", bid, AddHp, AddPHp, AddMp); + }else { + sprintf( szBuffer, "BD|r%X|0|2|%X|p%X|", bid, AddHp, AddPHp ); +//#endif + } + BATTLESTR_ADD( szBuffer ); + } + } +#endif +#ifdef _PETSKILL_SETDUCK + { + int turns=0, nums=0; + if( (turns=CHAR_getWorkInt( charaindex, CHAR_MYSKILLDUCK)) > 0 ){ + turns--; + if( turns == 0 ){ + nums = CHAR_getWorkInt( charaindex, CHAR_MYSKILLDUCKPOWER); + sprintf( szBuffer, "BD|r%X|0|3|%X|", bid, nums*(-1)); + BATTLESTR_ADD( szBuffer ); + } + CHAR_setWorkInt( charaindex, CHAR_MYSKILLDUCK, turns); + } +#ifdef _MAGICPET_SKILL + if( (turns=CHAR_getWorkInt( charaindex, CHAR_MYSKILLSTR)) > 0 ){ + turns--; + if( turns == 0 ){ + nums = CHAR_getWorkInt( charaindex, CHAR_MYSKILLSTRPOWER); + sprintf( szBuffer, "BD|r%X|0|4|%X|", bid, nums*(-1)); + BATTLESTR_ADD( szBuffer ); + } + CHAR_setWorkInt( charaindex, CHAR_MYSKILLSTR, turns); + } + if( (turns=CHAR_getWorkInt( charaindex, CHAR_MYSKILLTGH)) > 0 ){ + turns--; + if( turns == 0 ){ + nums = CHAR_getWorkInt( charaindex, CHAR_MYSKILLTGHPOWER); + sprintf( szBuffer, "BD|r%X|0|5|%X|", bid, nums*(-1)); + BATTLESTR_ADD( szBuffer ); + } + CHAR_setWorkInt( charaindex, CHAR_MYSKILLTGH, turns); + } + if( (turns=CHAR_getWorkInt( charaindex, CHAR_MYSKILLDEX)) > 0 ){ + turns--; + if( turns == 0 ){ + nums = CHAR_getWorkInt( charaindex, CHAR_MYSKILLDEXPOWER); + sprintf( szBuffer, "BD|r%X|0|6|%X|", bid, nums*(-1)); + BATTLESTR_ADD( szBuffer ); + } + CHAR_setWorkInt( charaindex, CHAR_MYSKILLDEX, turns); + } +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + if( (turns=CHAR_getWorkInt( charaindex, CHAR_MYSKILLHIT)) > 0 ){ + turns--; + if( turns == 0 ){ + int dec_num = CHAR_getWorkInt( charaindex, CHAR_MYSKILLHIT_NUM); + nums = CHAR_getWorkInt( charaindex, CHAR_WORKHITRIGHT); + nums -= dec_num; + CHAR_setWorkInt( charaindex, CHAR_WORKHITRIGHT, nums); + + CHAR_talkToCli( charaindex, -1, "恢复命中率", CHAR_COLORYELLOW); + //sprintf( szBuffer, "BD|r%X|0|6|%X|", bid, dec_num*(-1)); + //BATTLESTR_ADD( szBuffer ); + } + CHAR_setWorkInt( charaindex, CHAR_MYSKILLHIT, turns); + } +#endif + +#endif + } +#endif + return 0; + +} + + +BOOL BATTLE_CanMoveCheck( int charaindex ) +{ + + // + if( CHAR_getWorkInt( charaindex, CHAR_WORKPARALYSIS ) > 0 ){ + return FALSE; + } + + // 檗祭 + if( CHAR_getWorkInt( charaindex, CHAR_WORKSTONE ) > 0 ){ + return FALSE; + } + // 戽曰 + if( CHAR_getWorkInt( charaindex, CHAR_WORKSLEEP ) > 0 ){ + return FALSE; + } +#ifdef _MAGIC_BARRIER + if( CHAR_getWorkInt( charaindex, CHAR_WORKBARRIER ) > 0 ){ + return FALSE; + } +#endif + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + // 晕眩 + if( CHAR_getWorkInt( charaindex, CHAR_WORKDIZZY ) > 0 ){ + return FALSE; + } + // 天罗地网 + if( CHAR_getWorkInt( charaindex, CHAR_WORKDRAGNET ) > 0 ){ + return FALSE; + } +/* + // 冰箭术 + if( CHAR_getWorkInt( charaindex, CHAR_WORKICEARROW ) > 0 ){ + return FALSE; + } +*/ +/* + // 专注战斗 + if( CHAR_getWorkInt( charaindex, CHAR_WORK_FOCUS ) > 0 ){ + return FALSE; + } +*/ + // 雷附体 + if( CHAR_getWorkInt( charaindex, CHAR_WORK_T_ENCLOSE ) > 0 ){ + return FALSE; + } +#endif +#ifdef _PROFESSION_ADDSKILL + if( CHAR_getWorkInt( charaindex, CHAR_DOOMTIME ) > 0 ){ + return FALSE; + } +#endif + return TRUE; +} + +#ifdef _ITEM_EQUITSPACE +int BATTLE_GetEqShield( int charaindex ) +{ + int iRet = ITEM_FIST, itemindex; + + itemindex = CHAR_getItemIndex( charaindex, CHAR_EQSHIELD ); + if( ITEM_CHECKINDEX( itemindex ) == FALSE ){ + iRet = ITEM_FIST; + }else{ + iRet = ITEM_getInt( itemindex, ITEM_TYPE ); + } + return iRet; +} +#endif + +int BATTLE_GetWepon( int charaindex ) //取得角色手持武器 +{ + int iRet = ITEM_FIST, itemindex; + + itemindex = CHAR_getItemIndex( charaindex, CHAR_ARM ); + if( ITEM_CHECKINDEX( itemindex ) == FALSE ){ + iRet = ITEM_FIST; + }else{ + iRet = ITEM_getInt( itemindex, ITEM_TYPE ); + } + + return iRet; +} + +static int aBowW[50] = +{ + 0, 2, 1, 4, 3, 0, 1, 2, 3, 4, + 1, 0, 3, 2, 4, 1, 3, 0, 2, 4, + 2, 4, 0, 1, 3, 2, 0, 4, 1, 3, + 3, 1, 0, 2, 4, 3, 1, 0, 2, 4, + 4, 2, 0, 1, 3, 4, 2, 0, 1, 3, +}; + +void BATTLE_TargetListSet( int charaindex, int attackNo, int *pList) +{ + int i, j=0, defNo, battleindex=-1; + defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + +#ifdef _SKILLLIMIT // (可开放) Syu ADD 不得攻击我方限制 + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_FALLRIDE || // 落马 + CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_WILDVIOLENTATTACK || //狂暴攻击 + CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_TIMID || // 怯战 + CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_MPDAMAGE || // MP攻击 + CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_WEAKEN || // 虚弱 + CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_DAMAGETOHP || // 嗜血 + CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_STEALMONEY ) { // 捐献 + if( BATTLE_CheckSameSide( charaindex, defNo) == 1 ) { + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); +// BATTLE_NoAction( battleindex, attackNo ); + return; + } + } +#endif + + for( i = 0; i < BATTLE_ENTRY_MAX*2; i ++ ){ + pList[i] = defNo; + } +#ifdef _BATTLE_ATTCRAZED // ANDY 疯狂暴走 +#ifdef _SHOOTCHESTNUT // Syu ADD 宠技:丢栗子 + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_ATTCRAZED || + CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_ATTSHOOT ){ +#else + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_ATTCRAZED ){ +#endif + int deftop,defsub; + int plive[10]; + int n = CHAR_GETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3); + + +#ifdef _SHOOTCHESTNUT // Syu ADD 宠技:丢栗子 + if( BATTLE_CheckSameSide( charaindex, defNo) == 1 ) { + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + BATTLE_NoAction( battleindex, attackNo ); + return; + } +#endif + if( 0 <= defNo && defNo <= 9 ){ + defsub = 0; + deftop = 9; + }else if( 10 <= defNo && defNo <= 19 ){ + defsub = 10; + deftop = 19; + }else{ + pList[1] = -1; + return; + } + for( i = defsub; i < deftop; i ++ ){ + if( BATTLE_TargetCheck( battleindex, i) == FALSE ) continue; + plive[j++] = i; + } + if( j == 0 ) return; + for( i=0; i= CHAR_MAXPETSKILLHAVE ) i = 0; + + if( CHAR_getCharHaveSkill( charaindex, i ) == NULL ){ + continue; + } + + pskill_array = PETSKILL_GetArray( charaindex, i ); + skill_type = PETSKILL_getInt( pskill_array, PETSKILL_FIELD ); + + + if( skill_type == PETSKILL_FIELD_BATTLE + || skill_type == PETSKILL_FIELD_ALL + ){ + }else{ + continue; + } + + if( j < iNum ){ + j++; + continue; + } + + if( PETSKILL_Use( charaindex, iNum, toNo, NULL ) == TRUE ){ + + }else{ + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + } + break; + } + + if( k >= PETSKILLSERCHTIME ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + } + return 0; +} + + +enum{ + PETAI_MODE_NORMAL, + PETAI_MODE_TARGETRANDOM, + PETAI_MODE_RANDOMACT, + PETAI_MODE_OWNERATTACK, + PETAI_MODE_ENEMYATTACK, + PETAI_MODE_ESCAPE, + PETAI_MODE_NOACT, + PETAI_MODE_END +}; + +static int BATTLE_PetLoyalCheck( int battleindex, int bid, int charaindex ) +{ + int ai, toNo, mode = 0, type, Rand, toSide = 1, flg, i; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) != CHAR_TYPEPET ){ + return 0; + } + if( CHAR_getFlg( charaindex, CHAR_ISDIE ) == TRUE ) + return 0; + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_WAIT ){ + return 0; + } + flg = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEFLG ); + flg &= ~CHAR_BATTLEFLG_AIBAD; + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEFLG, flg ); + if( BATTLE_CanMoveCheck( charaindex ) == FALSE ){ + return 0; + } + toNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); + toSide = ( 0 <= toNo && toNo < BATTLE_ENTRY_MAX )?(0):(1); + ai = CHAR_getWorkInt( charaindex, CHAR_WORKFIXAI ); + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_GUARD + || bid == toNo + ){ + type = 1; + }else{ + type = 0; + } + + Rand = RAND( 1, 100 ); + + mode = 0; // 恳仄中垫 + if( ai >= 80 ){ // 镝擦蘸ㄧㄟ⊙动晓 + mode = PETAI_MODE_NORMAL; // 濮覆岳 + }else + if( ai >= 70 ){ // 镝擦蘸ㄦㄟ⊙动晓 + if( Rand < 10 )mode = PETAI_MODE_TARGETRANDOM; // 正□必永玄 + }else + if( ai >= 60 ){ + if( Rand < 20 )mode = PETAI_MODE_TARGETRANDOM; // 正□必永玄 + }else + if( ai >= 50 ){ + if( Rand < 35 )mode = PETAI_MODE_TARGETRANDOM; // 正□必永玄 + }else + if( ai >= 40 ){ + if( Rand < 50 )mode = PETAI_MODE_TARGETRANDOM; // 正□必永玄 + }else + if( ai >= 30 ){ + if( Rand < 70 )mode = PETAI_MODE_RANDOMACT; // 垫 仿件母丞 + }else + if( ai >= 20 ){ + if( Rand < 70 )mode = PETAI_MODE_RANDOMACT; // 垫 仿件母丞 + }else + if( ai >= 10 ){ + if( Rand < 80 ){ + mode = PETAI_MODE_OWNERATTACK; // 潜谛 猾 + }else{ + mode = PETAI_MODE_ENEMYATTACK; // 衬 猾 + } + }else{ + if( Rand < 60 ){ + mode = PETAI_MODE_OWNERATTACK; // 潜谛 猾 + }else{ + mode = PETAI_MODE_ESCAPE; // 仆月 + } + } + + + if( mode == PETAI_MODE_NORMAL )return 0; + + for( i = 0; i < CHAR_MAXPETSKILLHAVE;i ++ ){ + if( CHAR_getCharHaveSkill( charaindex, i ) ){ + break; + } + } + if( i >= CHAR_MAXPETSKILLHAVE ){ + mode = PETAI_MODE_NOACT; + } + flg = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEFLG ); + flg |= CHAR_BATTLEFLG_AIBAD; + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEFLG, flg ); + + + switch( mode ){ + case PETAI_MODE_NOACT: + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, + BATTLE_COM_NONE ); + break; + case PETAI_MODE_TARGETRANDOM: + if( type == 1 ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, + BATTLE_COM_NONE ); + }else{ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, + BATTLE_DefaultAttacker( battleindex, toSide ) ); + + } + break; + case PETAI_MODE_RANDOMACT: // 垫 互仿件母丞 + // 哗萄ㄠ葱 猾蟆反濮覆井尹切扎母丢 + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_EARTHROUND0 ){ + return 0; + } + + // 布□犯奴失件白仿弘毛反内允 + flg = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEFLG ); + flg &= ~CHAR_BATTLEFLG_GUARDIAN; + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEFLG, flg ); + + if( toNo == bid ){ // 愤坌毛蓟氏匹仄引匀凶日 + // 窒手匹五卅中仇午卞允月 + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + }else{ + // 仿件母丞卞檗 毛本永玄 + BATTLE_PetRandomSkill( battleindex, charaindex ); + } + break; + + case PETAI_MODE_OWNERATTACK: // 潜谛 猾 + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_ATTACK ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, bid-5 ); + break; + + case PETAI_MODE_ENEMYATTACK: // 衬 猾 + { int myside = 0; + if( bid >= BATTLE_ENTRY_MAX ) myside = 1; + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_ATTACK ); + // 锹澎扔奶玉卞 + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, + BATTLE_DefaultAttacker( battleindex, 1 - myside ) ); + } + break; + + case PETAI_MODE_ESCAPE: // 仆月公及 夫旦玄 + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_LOSTESCAPE ); + break; + + } + + return 1; + +} + +#ifdef __ATTACK_MAGIC + +#define MAX_MAGIC_NUMBER 25 + +// 每一种魔法的攻击 围 (id,area) +int TargetIndex[MAX_MAGIC_NUMBER][2] = +{ + {301,-1},{302,-1},{303,26},{304,-1},{305,20},{306,20}, + {307,-1},{308,-1},{309,-1},{310,-1},{311,26},{312,20}, + {313,-1},{314,-1},{315,-1},{316,-1},{317,26},{318,20}, + {319,-1},{320,-1},{321,26},{322,-1},{323,26},{324,20},{325,20} +}; + +int magic,toindex,magic_count; + +#endif + + + +static int BATTLE_Battling( int battleindex ) +{ + BATTLE *pBattle, *pWatchBattle; + BATTLE_ENTRY *pEntry[2]; + char *aszFieldAttr[] = { "无", "地", "水", "火", "风" }, + szBuffer[256]="", + szWork[256]; + int i,j,k, + len, + entrynum, + charaindex, + attackNo, + defNo=-1, + aAttackList[BATTLE_ENTRY_MAX*2+1], + aDefList[BATTLE_ENTRY_MAX*2+1], + ComboId, + itemindex, + AllSize = 0; + BATTLE_CHARLIST EntryList[40]; + int ContFlg, attackNoSub, defNoSub; + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX; + pBattle = &BattleArray[battleindex]; + pEntry[0] = pBattle->Side[0].Entry; + pEntry[1] = pBattle->Side[1].Entry; + + for( i = 0; i < arraysizeof(EntryList); i ++ ){ + EntryList[i].charaindex = -1; + EntryList[i].combo = 0; + } + + sprintf( szBuffer, "战役 %d 转换 %d 属性 %s", + battleindex, pBattle->turn, + aszFieldAttr[pBattle->field_att] + ); + + entrynum = 0; + + for( j = 0; j < 2; j ++ ){ + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + pEntry[j][i].flg &= ~BENT_FLG_ULTIMATE; + if( pEntry[j][i].charaindex == -1 )continue; + EntryList[entrynum].charaindex = pEntry[j][i].charaindex; + EntryList[entrynum].side = j; + EntryList[entrynum].num = pEntry[j][i].bid; + EntryList[entrynum].dex = BATTLE_DexCalc( pEntry[j][i].charaindex ); +#ifdef _EQUIT_SEQUENCE + EntryList[entrynum].sequence = CHAR_getWorkInt( pEntry[j][i].charaindex, CHAR_WORKSEQUENCEPOWER); +#endif + BATTLE_talkToCli( pEntry[j][i].charaindex, szBuffer, CHAR_COLORYELLOW ); + entrynum ++; + } + } + szAllBattleString[0] = 0; + k = 0; + for( j = 0; j < 2; j ++ ){ + k = j * SIDE_OFFSET; + for( i = 0; i < BATTLE_ENTRY_MAX/2; i ++ ){ + szBattleString[0] = 0; + if( pBattle->iEntryBack[k] >= 0 + && pBattle->Side[j].Entry[i].charaindex == -1){ + if( pBattle->iEntryBack2[k] >= 0 ){ + sprintf( szBattleString, "BE|et%X|f1|", k ); + //BATTLE_BroadCast( battleindex, "突然有人不见了。", CHAR_COLORYELLOW ); + }else{ + print( "应是输入ID不正确出现的error。\n" ); + //BATTLE_BroadCast( battleindex, "ID错误的error。", CHAR_COLORYELLOW ); + } + } + k ++; + strcat( szAllBattleString, szBattleString ); + } + } + len = strlen( szAllBattleString ); + AllSize += len; + EntrySort( EntryList, entrynum ); + ComboCheck( EntryList, entrynum ); + for( i = 0; i < entrynum; i ++ ){ + int COM, myside, otherside, bi, + attack_flg = 1, + attack_max = 1, + attack_count = 0; + + charaindex = EntryList[i].charaindex; + myside = EntryList[i].side; + otherside = 1-myside; + attackNo = EntryList[i].num; + bi = attackNo - myside * SIDE_OFFSET; + + aAttackList[0] = attackNo; + aAttackList[1] = -1; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )continue; + if( CHAR_getFlg( charaindex, CHAR_ISDIE ) == TRUE )continue; + szBadStatusString[0] = 0; + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ) + != BATTLE_CHARMODE_C_OK ){ + //sprintf( szBuffer, "指令输入不完全。(%s)", CHAR_getUseName( charaindex ) ); + //BATTLE_BroadCast( battleindex, szBuffer, CHAR_COLORYELLOW ); + continue; + } + if( CHAR_getInt( charaindex, CHAR_HP ) <= 0 )continue; + +#ifdef _CHECK_BATTLETIME + check_battle_com_begin(); +#endif + + szBattleString[0] = 0; + pszBattleTop = szBattleString; + pszBattleLast = szBattleString+arraysizeof(szBattleString); + + // WON ADD + if( CHAR_getFlg( charaindex, CHAR_ISDIE ) != TRUE ) + BATTLE_StatusSeq( charaindex ); + +#ifdef _OTHER_MAGICSTAUTS + BATTLE_MagicStatusSeq( charaindex ); +#endif + +#ifdef _MAGIC_DEEPPOISON // 剧毒 + if( CHAR_getFlg( charaindex, CHAR_ISDIE ) == TRUE ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + } +#endif + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + BATTLE_ProfessionStatusSeq( battleindex, charaindex); +#endif + + + if( BATTLE_CanMoveCheck( charaindex ) == FALSE ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + } + gBattleDamageModyfy = 1.0; + gBattleDuckModyfy = 0; + gBattleStausChange = -1; + gBattleStausTurn = 0; + gWeponType = ITEM_FIST; + gWeponType = BATTLE_GetWepon( charaindex ); +#ifdef _PETSKILL_BECOMEFOX + if( CHAR_getWorkInt( charaindex, CHAR_WORKFOXROUND ) != -1 //若是变成小狐狸 + || CHAR_getInt( charaindex, CHAR_BASEIMAGENUMBER)==101749) + { + int COM = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ); + + gWeponType = ITEM_FIST; + + if( !(COM == BATTLE_COM_ATTACK + || COM == BATTLE_COM_GUARD + || COM == BATTLE_COM_NONE) ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + CHAR_talkToCli( charaindex, -1, "变成小狐狸後只能攻击、防御和待机!", CHAR_COLORYELLOW ); + } + } +#endif +#ifdef _PETSKILL_BECOMEPIG + if( CHAR_getInt( charaindex, CHAR_BECOMEPIG) > -1 //变成乌力了 + && (CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER) ) + { + int COM = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ); + + gWeponType = ITEM_FIST; + //CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_ATTACK ); + if( !(COM == BATTLE_COM_ATTACK + || COM == BATTLE_COM_GUARD + || COM == BATTLE_COM_NONE + || COM == BATTLE_COM_ITEM + || COM == BATTLE_COM_ESCAPE + || COM == BATTLE_COM_CAPTURE + || COM == BATTLE_COM_WAIT + || COM == BATTLE_COM_PETIN + || COM == BATTLE_COM_PETOUT) ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_GUARD ); + //CHAR_talkToCli( charaindex, -1, "变成乌力後只能攻击、防御、待机、逃跑和使用道具!", CHAR_COLORYELLOW ); + CHAR_talkToCli( charaindex, -1, "变成乌力後不能使用咒术和职业技能!", CHAR_COLORYELLOW ); + } + } +#endif + gDamageDiv = 1.0; + attack_max = BATTLE_GetAttackCount( charaindex ); + if( attack_max <= 0 ){ + int work, randwork; + work = CHAR_getInt( charaindex, CHAR_LV ); + if( work < 10 || CHAR_getInt( charaindex, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ){ + attack_max = 1; + }else{ + int luckwork = CHAR_getInt( charaindex, CHAR_LUCK )*5; + if( luckwork > 5*5 ){ + print( "\nerr:运气奇怪(%s)(%d)\n", + CHAR_getUseName( charaindex ), + CHAR_getInt( charaindex, CHAR_LUCK ) ); + luckwork = 5*5; + } + randwork = RAND( 1, 1000 ); + if( randwork <= 10 + luckwork){ + attack_max = RAND( 5, 10 ); + }else + if( randwork <= 30 + luckwork ){ + attack_max = 3; + }else + if( randwork <= 70 + luckwork ){ + attack_max = 2; + }else{ + attack_max = 1; + } + } + }else{ + if( gWeponType == ITEM_FIST )gDamageDiv = attack_max; + } + if( gWeponType == ITEM_BREAKTHROW ){ + gBattleStausChange = BATTLE_ST_PARALYSIS; + gBattleStausTurn = 1-1; + }else{ + } + + if( BattleArray[battleindex].Side[myside].flg & BSIDE_FLG_SURPRISE ){ + }else{ + if( BATTLE_PetLoyalCheck( battleindex, attackNo, charaindex ) ) { +#ifdef _FIXWOLF // Syu ADD 修正狼人变身Bug + if ( CHAR_getInt ( charaindex , CHAR_BASEIMAGENUMBER) == 101428 ) { + if( CHAR_getWorkInt ( charaindex , CHAR_WORKTURN ) == 0){ + CHAR_setInt( charaindex, CHAR_BASEIMAGENUMBER, CHAR_getInt( charaindex , CHAR_BASEBASEIMAGENUMBER)); + CHAR_setWorkInt( charaindex, CHAR_WORKATTACKPOWER, CHAR_getWorkInt( charaindex , CHAR_WORKFIXSTR)); + CHAR_setWorkInt( charaindex, CHAR_WORKQUICK, CHAR_getWorkInt( charaindex , CHAR_WORKFIXDEX)); + } + } +#endif + sprintf( szWork, "BX|%X|", attackNo); + BATTLESTR_ADD( szWork ); + } + } + +#ifdef _PROFESSION_ADDSKILL + if( CHAR_getWorkInt( charaindex, CHAR_DOOMTIME ) > 0 ){ + CHAR_setWorkInt( charaindex, CHAR_DOOMTIME, CHAR_getWorkInt( charaindex, CHAR_DOOMTIME) - 1 ); + } + if( CHAR_getWorkInt( charaindex, CHAR_DOOMTIME ) == 0 + && ( CHAR_getWorkInt( charaindex, CHAR_WORK_com1 ) == BATTLE_COM_S_FIRE_SPEAR + || CHAR_getWorkInt( charaindex, CHAR_WORK_com1 ) == BATTLE_COM_S_DOOM ) ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, CHAR_getWorkInt( charaindex, CHAR_WORK_com1 ) ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, CHAR_getWorkInt( charaindex, CHAR_WORK_toNo ) ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, CHAR_getWorkInt( charaindex, CHAR_WORK_mode ) ); + CHAR_SETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3, CHAR_getWorkInt( charaindex, CHAR_WORK_skill_level ) ); + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, CHAR_getWorkInt( charaindex, CHAR_WORK_array ) ); + CHAR_setWorkInt( charaindex, CHAR_WORK_com1, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORK_toNo, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORK_mode, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORK_skill_level, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORK_array, 0 ); + } + +#endif + COM = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ); + + switch( COM ){ + case BATTLE_COM_ATTACK: + if( gWeponType == ITEM_BOOMERANG ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_BOOMERANG ); + +#ifdef _PETSKILL_BECOMEFOX + if( CHAR_getInt( charaindex, CHAR_BASEIMAGENUMBER)==101749 + || CHAR_getWorkInt( charaindex, CHAR_WORKFOXROUND ) != -1 ){ //若是变成小狐狸不可以使用回力标 + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + } +#endif +#ifdef _PETSKILL_BECOMEPIG + if( CHAR_getInt( charaindex, CHAR_BECOMEPIG) > -1 ){//变成乌力了 + gWeponType = ITEM_FIST; + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_ATTACK ); + } +#endif + } + break; + case BATTLE_COM_COMBO: + if( ComboCheck2( EntryList, i, entrynum ) == FALSE ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_ATTACK ); + } + break; + + case BATTLE_COM_S_STATUSCHANGE: + gBattleStausChange = CHAR_GETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3 ); + gBattleStausTurn = CHAR_GETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3 ); + break; + +#ifdef _PETSKILL_HECTOR + case BATTLE_COM_S_HECTOR: + gBattleStausChange = CHAR_GETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3 ); + gBattleStausTurn = CHAR_GETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3 ); + break; +#endif + +#ifdef _PET_SKILL_SARS // WON ADD 毒煞蔓延 + case BATTLE_COM_S_SARS: + gBattleStausChange = CHAR_GETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3 ); + gBattleStausTurn = CHAR_GETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3 ); + break; +#endif + + case BATTLE_COM_S_CHARGE: + BATTLE_Charge( battleindex, attackNo ); + break; + case BATTLE_COM_S_RENZOKU: + attack_max = CHAR_GETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3 ); + gDamageDiv = attack_max; + break; +#ifdef _VARY_WOLF + case BATTLE_COM_S_VARY: + // 先用不到 + break; +#endif +#ifdef _SKILL_WILDVIOLENT_ATT + //狂暴攻击 vincent add 2002/05/16 + case BATTLE_COM_S_WILDVIOLENTATTACK: + attack_max = RAND(3,10);//攻击次数 + gDamageDiv = attack_max;//每次攻击造成伤害 + gBattleDuckModyfy = CHAR_GETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3 );//命中率 + break; +#endif + case BATTLE_COM_S_EARTHROUND0: + gBattleDamageModyfy = 1.0 + 0.01 * CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM3 ); + break; +#ifdef _BATTLE_ATTCRAZED + case BATTLE_COM_S_ATTCRAZED: + attack_max = CHAR_GETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3); + break; +#endif +#ifdef _SHOOTCHESTNUT // Syu ADD 宠技:丢栗子 + case BATTLE_COM_S_ATTSHOOT: + attack_max = CHAR_GETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3); + gDamageDiv = attack_max;//每次攻击造成伤害 + break; +#endif + case BATTLE_COM_S_MIGHTY: + gBattleDamageModyfy = CHAR_GETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3 ) * 0.01; + gBattleDuckModyfy = CHAR_GETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3 ); // 歹今木膜恳骚橘尺 + break; + } + + BATTLE_TargetListSet( charaindex, attackNo, aDefList ); + COM = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ); + + ContFlg = FALSE; + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEFLG ) & CHAR_BATTLEFLG_AIBAD + && COM == BATTLE_COM_COMBO ){ + print( "由於忠诚度不足使用必杀技失败(%s)\n", CHAR_getUseName( charaindex ) ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_ATTACK ); + } +#ifdef _BATTLE_TIMESPEED//动画播放速度 + { + int flgtime = 0; + switch( COM ){ +#ifdef _BATTLE_ATTCRAZED + case BATTLE_COM_S_ATTCRAZED: + flgtime = 200*3; + break; +#endif +#ifdef _SHOOTCHESTNUT // Syu ADD 宠技:丢栗子 + case BATTLE_COM_S_ATTSHOOT: + flgtime = 80*attack_max; + break; +#endif + case BATTLE_COM_JYUJYUTU: + case BATTLE_COM_S_ATTACK_MAGIC: + flgtime = 260; // 1/100sec + break; + case BATTLE_COM_COMBO: + flgtime = 200; // 1/100sec + break; + case BATTLE_COM_GUARD: + break; + case BATTLE_COM_WAIT: + default : + flgtime = 150; // 1/100sec + break; + } + BattleArray[battleindex].flgTime += flgtime; + } +#endif + +#ifdef _PETSKILL_BECOMEFOX // 中了媚惑术後攻防敏能力各降 20% + if( CHAR_getWorkInt( charaindex, CHAR_WORKFOXROUND ) != -1 ){ //变成小狐狸 + CHAR_setWorkInt( charaindex, CHAR_WORKATTACKPOWER, CHAR_getWorkInt( charaindex, CHAR_WORKFIXSTR)*0.8);//攻降20% + CHAR_setWorkInt( charaindex, CHAR_WORKDEFENCEPOWER, CHAR_getWorkInt( charaindex, CHAR_WORKFIXTOUGH)*0.8);//防降20% + CHAR_setWorkInt( charaindex, CHAR_WORKQUICK, CHAR_getWorkInt( charaindex, CHAR_WORKFIXDEX)*0.8);//敏降20% + } +#endif + switch( COM ){//处理攻击 + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + //==== 直接攻击系 =============================================================== + case BATTLE_COM_S_BRUST: // 爆击 + case BATTLE_COM_S_CHAIN_ATK: // 连环攻击 + case BATTLE_COM_S_CHAIN_ATK_2: // 双重攻击 + case BATTLE_COM_S_CAVALRY: // 座骑攻击 + case BATTLE_COM_S_DEAD_ATTACK: // 濒死攻击 + case BATTLE_COM_S_ATTACK_WEAK: // 弱点攻击 + case BATTLE_COM_S_PLUNDER: // 体掠夺 + case BATTLE_COM_S_CHAOS: // 混乱攻击 + { + // 防止同队互打 + defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); + if( BATTLE_CheckSameSide( charaindex, defNo) == 1 ){ + BATTLE_NoAction( battleindex, attackNo ); break; + } + } + case BATTLE_COM_S_ENRAGE_PET: // 激怒宠物 + { + CHAR_setFlg( charaindex, CHAR_ISATTACKED, 1 ); + defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); + battle_profession_attack_fun(battleindex, attackNo, defNo, charaindex); + //change fix 修正使用职业得不到道具 + //BATTLE_AddProfit( battleindex, aAttackList); + } + break; + //==== 魔法攻击系 ================================================================ + case BATTLE_COM_S_VOLCANO_SPRINGS: // 火山泉 + case BATTLE_COM_S_FIRE_BALL: // 火星球 + case BATTLE_COM_S_FIRE_SPEAR: // 火龙枪 + case BATTLE_COM_S_SUMMON_THUNDER: // 召雷术 + case BATTLE_COM_S_CURRENT: // 电流术 + case BATTLE_COM_S_STORM: // 暴风雨 + case BATTLE_COM_S_ICE_ARROW: // 冰箭 + case BATTLE_COM_S_ICE_CRACK: // 冰爆术 + case BATTLE_COM_S_ICE_MIRROR: // 冰镜术 + case BATTLE_COM_S_DOOM: // 世界末日 + case BATTLE_COM_S_BLOOD_WORMS: // 嗜血蛊 + case BATTLE_COM_S_SIGN: // 一针见血 + case BATTLE_COM_S_ENCLOSE: // 附身术 + case BATTLE_COM_S_THROUGH_ATTACK: // 贯穿攻击 + case BATTLE_COM_S_CONVOLUTE: // 回旋攻击 + { +#ifdef _PROFESSION_ADDSKILL + /* if( COM == BATTLE_COM_S_DOOM //世界末日集气 + || COM == BATTLE_COM_S_FIRE_SPEAR){ + if( CHAR_getWorkInt( charaindex, CHAR_DOOMTIME ) > 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + sprintf( szWork, "bt|%x|", attackNo ); + BATTLESTR_ADD( szWork ); + break; + } + }*/ +#endif + // 防止同队互打 + defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); + if( BATTLE_CheckSameSide( charaindex, defNo) == 1 ){ + BATTLE_NoAction( battleindex, attackNo ); break; + } + } + case BATTLE_COM_S_BLOOD: // 嗜血成性 + { + CHAR_setFlg( charaindex, CHAR_ISATTACKED, 1 ); + defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); +#if 1 // Robin fix 修正嗜血吸别人的血 + if( defNo != attackNo && COM == BATTLE_COM_S_BLOOD ){ + print("\n 改封包!嗜血吸别人的血!!:%s ", CHAR_getChar( charaindex, CHAR_CDKEY) ); + defNo = attackNo; + + CHAR_talkToCli( charaindex, -1, "因封包异常而断线。", CHAR_COLORYELLOW); + CONNECT_setCloseRequest( CHAR_getWorkInt( charaindex, CHAR_WORKFD ) , 1 ); + break; + } +#endif +#ifdef _PROFESSION_ADDSKILL + if( COM == BATTLE_COM_S_ICE_CRACK ){ + if( pBattle->ice_count >= 20 ) + pBattle->ice_count = 0; + pBattle->ice_use[pBattle->ice_count] = TRUE; + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + pBattle->ice_level[pBattle->ice_count] = CHAR_GETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3); + pBattle->ice_bout[pBattle->ice_count] = 2; + pBattle->ice_toNo[pBattle->ice_count] = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); + pBattle->ice_array[pBattle->ice_count] = CHAR_GETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3); + pBattle->ice_charaindex[pBattle->ice_count] = charaindex; + pBattle->ice_attackNo[pBattle->ice_count] = attackNo; + ++pBattle->ice_count; + BATTLE_NoAction( battleindex, attackNo ); + print("\n进入冰爆"); + break; + } +#endif + battle_profession_attack_magic_fun(battleindex, attackNo, defNo, charaindex); + //change fix 修正使用职业得不到道具 + //BATTLE_AddProfit( battleindex, aAttackList); + break; + } + //==== 提升自已能力系 ==================================================================== + case BATTLE_COM_S_FOCUS: // 专注战斗 + case BATTLE_COM_S_AVOID: // 回避 + case BATTLE_COM_S_RECOVERY: // 补血 + case BATTLE_COM_S_SCAPEGOAT: // 舍已为友 + case BATTLE_COM_S_ENRAGE: // 激化攻击 + case BATTLE_COM_S_COLLECT: // 能量聚集 + case BATTLE_COM_S_TRAP: // 陷阱 + case BATTLE_COM_S_TRANSPOSE: // 移形换位 + case BATTLE_COM_S_DOCILE: // 驯伏宠物 +#ifdef _PROFESSION_ADDSKILL + case BATTLE_COM_S_CALL_NATURE: // 号召自然 +#endif + { + CHAR_setFlg( charaindex, CHAR_ISATTACKED, 1 ); + defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); + battle_profession_assist_fun(battleindex, attackNo, defNo, charaindex); + break; + } + //==== 击中改变状态系 ==================================================================== + case BATTLE_COM_S_SHIELD_ATTACK: // 盾击 + case BATTLE_COM_S_ENTWINE: // 树根缠绕 + case BATTLE_COM_S_DRAGNET: // 天罗地网 + case BATTLE_COM_S_TOXIN_WEAPON: // 毒素武器 + case BATTLE_COM_S_INSTIGATE: // 挑拨 + case BATTLE_COM_S_OBLIVION: // 遗忘 + { + // 防止同队互打 + defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); + if( BATTLE_CheckSameSide( charaindex, defNo) == 1 ){ + BATTLE_NoAction( battleindex, attackNo ); + if( COM == BATTLE_COM_S_TOXIN_WEAPON ) + printf("\nbug-同队互打"); + break; + } + } + case BATTLE_COM_S_RESIST_FIRE: // 火抗性提升 + case BATTLE_COM_S_RESIST_ICE: // 冰抗性提升 + case BATTLE_COM_S_RESIST_THUNDER: // 雷抗性提升 +#ifdef _PROFESSION_ADDSKILL + case BATTLE_COM_S_RESIST_F_I_T: // 自然威能 + case BATTLE_COM_S_BOUNDARY: // 四属性结界 +#endif + case BATTLE_COM_S_FIRE_ENCLOSE: // 火附体 + case BATTLE_COM_S_ICE_ENCLOSE: // 冰附体 + case BATTLE_COM_S_THUNDER_ENCLOSE: // 雷附体 + { + + CHAR_setFlg( charaindex, CHAR_ISATTACKED, 1 ); + defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); + battle_profession_status_chang_fun(battleindex, attackNo, defNo, charaindex); + + if( COM == BATTLE_COM_S_TOXIN_WEAPON ) + printf("\nbug-毒素武器处理结束"); + break; + } + //==================================================================================== +#endif + +#ifdef _PETSKILL_ACUPUNCTURE + case BATTLE_COM_S_ACUPUNCTURE: //针刺外皮 + CHAR_setWorkInt( charaindex, CHAR_WORKACUPUNCTURE, 1); + //print("\n针刺:%s",CHAR_getChar(charaindex,CHAR_NAME)); +#endif + case BATTLE_COM_S_CHARGE_OK: + case BATTLE_COM_S_POWERBALANCE: + case BATTLE_COM_S_STATUSCHANGE: + case BATTLE_COM_S_EARTHROUND0: + case BATTLE_COM_S_MIGHTY: + case BATTLE_COM_S_GUARDIAN_ATTACK: + case BATTLE_COM_S_RENZOKU: +#ifdef _BATTLE_ATTCRAZED // ANDY 疯狂暴走 + case BATTLE_COM_S_ATTCRAZED: +#endif +#ifdef _SHOOTCHESTNUT // Syu ADD 宠技:丢栗子 + case BATTLE_COM_S_ATTSHOOT: +#endif +#ifdef _SKILL_WILDVIOLENT_ATT + case BATTLE_COM_S_WILDVIOLENTATTACK://狂暴攻击 vincent add 2002/05/16 +#endif + +#ifdef _SKILL_SPEEDY_ATT + case BATTLE_COM_S_SPEEDYATTACK: //疾速攻击 vincent add 2002/05/20 +#endif + case BATTLE_COM_ATTACK: +#ifdef _PET_SKILL_SARS // WON ADD 毒煞蔓延 + case BATTLE_COM_S_SARS: +#endif + +#ifdef _PETSKILL_BECOMEFOX + case BATTLE_COM_S_BECOMEFOX: +#endif + +#ifdef _PETSKILL_BECOMEPIG + case BATTLE_COM_S_BECOMEPIG: +#endif + +#ifdef _PETSKILL_SHOWMERCY + case BATTLE_COM_S_SHOWMERCY: +#endif + +#ifdef _PETSKILL_GYRATE + case BATTLE_COM_S_GYRATE: + if( COM == BATTLE_COM_S_GYRATE ){ + int i,j=0,f_num,temp[5]={0}; + char szWork[256]; + defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); + if(defNo < 5) + f_num = 0; + else if(defNo >=5 && defNo < 10) + f_num = 5; + else if(defNo >=10 && defNo < 15) + f_num = 10; + else + f_num = 15; + + // 取出战场上存活的人 + for( i=f_num; i= 10 ){ + BATTLE_NoAction( battleindex, attackNo ); + break; + } + defNo = aDefList[0]; + }else + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 + || defNo == attackNo){ + BATTLE_NoAction( battleindex, attackNo ); + break; + } + if( COM == BATTLE_COM_S_EARTHROUND0 ){ + sprintf( szWork, "BI|a%X|", attackNo ); + }else { +#ifdef _FIXBUG_ATTACKBOW + if( CHAR_getWorkInt( charaindex, CHAR_WORKITEMMETAMO) > 0 || + CHAR_getWorkInt( charaindex, CHAR_WORKNPCMETAMO) > 0 + || CHAR_getWorkInt( charaindex, CHAR_WORKFOXROUND ) != -1 ){ //若是变成小狐狸 + + if( gWeponType == ITEM_BOW || gWeponType == ITEM_BOUNDTHROW || + gWeponType == ITEM_BREAKTHROW || gWeponType == ITEM_BOOMERANG) { + CHAR_talkToCli( charaindex, -1, "变身中无法使用远距离武器!!", CHAR_COLORYELLOW); + continue; + } + + } +#endif + + if( gWeponType == ITEM_BOW ) sprintf( szWork, "BB|a%X|w0|", attackNo ); + else if( gWeponType == ITEM_BOUNDTHROW ) //若是丢斧头 + sprintf( szWork, "BB|a%X|w1|", attackNo ); + else if( gWeponType == ITEM_BREAKTHROW ) + sprintf( szWork, "BB|a%X|w2|", attackNo ); + else sprintf( szWork, "BH|a%X|", attackNo ); + } + +#ifdef _SHOOTCHESTNUT // Syu ADD 宠技:丢栗子 + if ( COM == BATTLE_COM_S_ATTSHOOT ) + sprintf( szWork, "BB|a%X|w0|", attackNo ); +#endif + + BATTLESTR_ADD( szWork ); + if( COM == BATTLE_COM_S_CHARGE_OK || + COM == BATTLE_COM_S_EARTHROUND0 ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + }else{ + +#ifdef _SHOOTCHESTNUT // Syu ADD 宠技:丢栗子 + if ( CHAR_getWorkInt(charaindex, CHAR_WORKBATTLECOM1) != BATTLE_COM_S_ATTSHOOT) +#endif +#ifdef _PETSKILL_SHOWMERCY + if( CHAR_getWorkInt(charaindex, CHAR_WORKBATTLECOM1) != BATTLE_COM_S_SHOWMERCY) +#endif + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1,BATTLE_COM_ATTACK ); + } + for( attack_count = 0, k = 0;; ){ + if( gWeponType == ITEM_BOW ){ + if( BATTLE_TargetCheck( battleindex, defNo ) == FALSE ){ + attack_flg = 0; + }else{ + attack_flg = 1; + } + } + + + if( attack_flg ){ + + + ContFlg = BATTLE_Attack( battleindex, attackNo, defNo ); +#ifdef _PETSKILL_RETRACE + if( Battle_Attack_ReturnData_x.Battle_Attack_ReturnData == BATTLE_RET_DODGE + && COM == BATTLE_COM_S_RETRACE ){ + if( RAND(1,100) < 80 ){ //80%机率发动2次攻击 + //攻+20% + + CHAR_setWorkInt( BATTLE_No2Index( battleindex, attackNo ), + CHAR_WORKATTACKPOWER, + ( CHAR_getWorkInt( BATTLE_No2Index( battleindex, attackNo ), CHAR_WORKFIXSTR) + ( CHAR_getWorkInt( BATTLE_No2Index( battleindex, attackNo ), CHAR_WORKFIXSTR) * 0.2 ) ) ); + + BATTLE_Attack( battleindex, attackNo, defNo ); + + } + Battle_Attack_ReturnData_x.Battle_Attack_ReturnData = 0; + } +#endif + BATTLE_AddProfit( battleindex, aAttackList); + if( ++attack_count >= attack_max ) break; + if( CHAR_getInt( charaindex, CHAR_HP ) <= 0 ) { + ContFlg = FALSE; + break; + } + } + defNo = aDefList[++k]; + if( defNo < 0 ) break; + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, defNo ); + if( gWeponType == ITEM_BOW ){ + }else + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + break; + } + if( BATTLE_CountAlive( battleindex, 0) == 0 || BATTLE_CountAlive( battleindex, 1) == 0) { + break; + } + } + gBattleDamageModyfy = 1.0; + gBattleDuckModyfy = 0; + + for( k = 0; k < 5 && ContFlg == TRUE; k ++ ){ + if( ( k & 1 ) == 1 ){ + attackNoSub = attackNo; + defNoSub = defNo; + }else{ + defNoSub = attackNo; + attackNoSub = defNo; + } + + ContFlg = BATTLE_Counter(battleindex, attackNoSub, defNoSub ); + + aAttackList[0] = attackNoSub; + aAttackList[1] = -1; + BATTLE_AddProfit( battleindex, aAttackList); + } + aAttackList[0] = -1; + BATTLESTR_ADD( "FF|" ); + +#ifdef _PETSKILL_BECOMEFOX // 向对方使用媚惑术 + if ( (COM == BATTLE_COM_S_BECOMEFOX ) + && (Battle_Attack_ReturnData_x.Battle_Attack_ReturnData != BATTLE_RET_MISS) //没有miss + && (Battle_Attack_ReturnData_x.Battle_Attack_ReturnData != BATTLE_RET_DODGE) //没有闪避过 + && (Battle_Attack_ReturnData_x.Battle_Attack_ReturnData != BATTLE_RET_ALLGUARD) + && (Battle_Attack_ReturnData_x.Battle_Attack_ReturnData != BATTLE_RET_ARRANGE) + && (BATTLE_TargetCheck( battleindex, defNo )) //还活着 + && (rand()%100 < 31) + && (CHAR_getInt( BATTLE_No2Index( battleindex, defNo ), CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER) //只有宠物(CHAR_TYPEPET)才可以被媚惑 + && (CHAR_getWorkInt( BATTLE_No2Index( battleindex, defNo ), CHAR_WORK_PETFLG ) != 0 ) +#ifdef _PETSKILL_BECOMEPIG + && (CHAR_getInt( charaindex, CHAR_BECOMEPIG) == -1)//没有处於乌力化 +#endif + ) + { + int ToList[SIDE_OFFSET*2+1]; + int defindex = BATTLE_No2Index( battleindex, defNo ); + + BATTLE_MultiList( battleindex, defNo, ToList ); + BATTLE_MagicEffect( battleindex, defNo, ToList, 101120, 101750); + + CHAR_setWorkInt( defindex, CHAR_WORKFOXROUND, pBattle->turn ); + + if( CHAR_getInt( defindex, CHAR_RIDEPET) != -1 ) { //骑宠就要让他落马 + CHAR_setInt( defindex, CHAR_RIDEPET, -1 ); + BATTLE_changeRideImage( defindex ); + CHAR_setWorkInt( defindex, CHAR_WORKPETFALL, 1 ); + } + + CHAR_setInt( defindex, CHAR_BASEIMAGENUMBER, 101749); + } +#endif +#ifdef _PETSKILL_BECOMEPIG // 向对方使用乌力化 + if ( (COM == BATTLE_COM_S_BECOMEPIG ) + && (Battle_Attack_ReturnData_x.Battle_Attack_ReturnData != BATTLE_RET_MISS) //没有miss + && (Battle_Attack_ReturnData_x.Battle_Attack_ReturnData != BATTLE_RET_DODGE) //没有闪避过 + && (Battle_Attack_ReturnData_x.Battle_Attack_ReturnData != BATTLE_RET_ALLGUARD) + && (Battle_Attack_ReturnData_x.Battle_Attack_ReturnData != BATTLE_RET_ARRANGE) + && (BATTLE_TargetCheck( battleindex, defNo )) //还活着 + && (CHAR_getInt( BATTLE_No2Index( battleindex, defNo ), CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER) //只有玩家才可以被乌力化 + && (BATTLE_CheckSameSide( charaindex, defNo) != 1 ) // 防止同队互打 + && CHAR_getInt( BATTLE_No2Index( battleindex, defNo ), CHAR_BECOMEPIG) < 2000000000 ) //防止破表 + { + char temp[64]; + int ToList[SIDE_OFFSET*2+1], compute,petrate,pettime,pigbbi=100250; + char *pszOption=NULL; + int defindex = BATTLE_No2Index( battleindex, defNo ); + pszOption = PETSKILL_getChar( CHAR_GETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3 ), PETSKILL_OPTION ); + if( pszOption ) + sscanf( pszOption, "%d %d %d", &petrate, &pettime, &pigbbi); + else + petrate = 100, pettime = 60, pigbbi = 100250; + + if( rand()%100 < petrate ){ + CHAR_setWorkInt( defindex, CHAR_WORKITEMMETAMO, 0);//道具变身取消 + CHAR_setWorkInt( defindex, CHAR_WORKNPCMETAMO, 0 );//NPC变身取消 + CHAR_setWorkInt( defindex, CHAR_WORKFOXROUND, -1);//媚惑术变身取消 + + BATTLE_MultiList( battleindex, defNo, ToList ); + BATTLE_MagicEffect( battleindex, defNo, ToList, 101120, 101750); + + if( CHAR_getInt( defindex, CHAR_RIDEPET) != -1 ){ //骑宠就要让他落马 + CHAR_setInt( defindex, CHAR_RIDEPET, -1 ); + BATTLE_changeRideImage( defindex ); + CHAR_setWorkInt( defindex, CHAR_WORKPETFALL, 1 ); + } + + CHAR_setInt( defindex, CHAR_BECOMEPIG_BBI, pigbbi ); + + compute = CHAR_getInt( defindex, CHAR_BECOMEPIG); + CHAR_setInt( defindex, CHAR_BASEIMAGENUMBER, CHAR_getInt( defindex, CHAR_BECOMEPIG_BBI ) ); + if( compute == -1 )//第一次中 + CHAR_setInt( defindex, CHAR_BECOMEPIG, pettime + 1 + compute ); //乌力化时间(单位:秒) + else + CHAR_setInt( defindex, CHAR_BECOMEPIG, pettime + compute ); + sprintf(temp, "乌力时间:%d秒", CHAR_getInt( defindex, CHAR_BECOMEPIG) ); + CHAR_talkToCli( defindex, -1, temp, CHAR_COLORYELLOW); + + print("\n乌力化开始0:%s,round:%d", CHAR_getChar( defindex, CHAR_NAME), CHAR_getWorkInt( defindex, CHAR_WORKFOXROUND)); + } + } +#endif + break; +//以下处理特殊攻击 + case BATTLE_COM_BOOMERANG: + gBattleDamageModyfy = 0.3; + defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); + if( defNo < 0 ){ + defNo = BATTLE_DefaultAttacker( battleindex, 1 - myside ); + } + if( 0 <= defNo && defNo <= 19 ){ + defNo /= 5; // + }else{ + BATTLE_NoAction( battleindex, attackNo ); + break; + } + if( (int)(attackNo / 5 ) == defNo ){ + BATTLE_NoAction( battleindex, attackNo ); + break; + } + { + int *pBoomerangTbl = BoomerangVsTbl[defNo]; + for( k = 0; k < 5; k ++ ){ + if( BATTLE_TargetCheck( battleindex, pBoomerangTbl[k] ) == FALSE ){ + continue; + }else{ + break; + } + } + if( k == 5 ){ + defNo = BATTLE_DefaultAttacker( battleindex, 1 - myside ); + if( 0 <= defNo && defNo <= 19 ){ + defNo /= 5; + }else{ + BATTLE_NoAction( battleindex, attackNo ); + break; + } + } + } + sprintf( szWork, "BO|a%X|", attackNo ); + BATTLESTR_ADD( szWork ); + { + int *pBoomerangTbl = BoomerangVsTbl[defNo]; + if( myside == 1 ){ + k = 4; j = -1; + }else{ + k = 0; j = 1; + } + for( ; ; k += j ){ + if( j > 0 && k > 4 )break; + if( j < 0 && k < 0 )break; + defNo = pBoomerangTbl[k]; + if( BATTLE_TargetCheck( battleindex, defNo ) == FALSE ){ + continue; + } + BATTLE_Attack( battleindex, attackNo, defNo ); + } + } + gBattleDamageModyfy = 1.0; + gBattleDuckModyfy = 0; + BATTLESTR_ADD( "FF|" ); + break; + + //--------------------------------------------- + case BATTLE_COM_CAPTURE: + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + break; + } + BATTLE_Capture( battleindex, attackNo, defNo ); + break; + + //--------------------------------------------- +#ifdef _VARY_WOLF + case BATTLE_COM_S_VARY: + { + int ToList[SIDE_OFFSET*2+1]; + int bk_amn = 0; + + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + break; + } + bk_amn = (CHAR_getInt( charaindex, CHAR_BASEBASEIMAGENUMBER) + 5) + (myside*4); + BATTLE_MultiList( battleindex, defNo, ToList ); + BATTLE_MagicEffect( battleindex, attackNo, ToList, 101120, bk_amn); + } + break; +#endif + case BATTLE_COM_GUARD: + BATTLE_Guard( battleindex, attackNo ); + + break; + case BATTLE_COM_ESCAPE: + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) != CHAR_TYPEPET ){ + if (BATTLE_Escape(battleindex, attackNo, 0) == TRUE) + { + if (CHAR_getWorkInt(charaindex, CHAR_WORKFMPKFLAG) == 1) + CHAR_setWorkInt(charaindex, CHAR_WORKFMPKFLAG, -1); +#ifdef _ESCAPE_RESET // 恶宝中纪录逃跑时间 + if( getStayEncount( getfdFromCharaIndex(charaindex) ) ) { + CHAR_setWorkInt( charaindex, CHAR_WORKLASTESCAPE, time(NULL)); + //print(" 逃了 "); + } +#endif + } + } + break; + case BATTLE_COM_COMPELESCAPE: //强制离开 + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) != CHAR_TYPEPET ){ + BATTLE_Escape( battleindex, attackNo, 1); + if (CHAR_getWorkInt(charaindex, CHAR_WORKFMPKFLAG) == 1) + CHAR_setWorkInt(charaindex, CHAR_WORKFMPKFLAG, -1); + } + break; + + case BATTLE_COM_PETIN: + if( CHAR_getInt( charaindex, CHAR_DEFAULTPET ) == -1 ){ + BATTLE_NoAction( battleindex, attackNo ); + break; + } + { + char szWork[256]; + snprintf( szWork, sizeof( szWork ), "K%d", CHAR_getInt( charaindex, CHAR_DEFAULTPET ) ); + CHAR_sendStatusString( charaindex, szWork ); + + } + BATTLE_PetIn( battleindex, attackNo ); + lssproto_KS_send( + getfdFromCharaIndex( charaindex ), + CHAR_getInt( charaindex, CHAR_DEFAULTPET ), 1 ); + break; + case BATTLE_COM_PETOUT: + if( CHAR_getInt( charaindex, CHAR_DEFAULTPET ) != -1 ){ + lssproto_KS_send( + getfdFromCharaIndex( charaindex ), + CHAR_getInt( charaindex, CHAR_DEFAULTPET ), 1 ); + { + char szWork[256]; + snprintf( szWork, sizeof( szWork ), "K%d", CHAR_getInt( charaindex, CHAR_DEFAULTPET ) ); + CHAR_sendStatusString( charaindex, szWork ); + + } + BATTLE_PetIn( battleindex, attackNo ); + } + // shan 2002/01/14 Begin 五只宠 + { + int attackindex, petNo; + + attackindex = BATTLE_No2Index( battleindex, attackNo ); + petNo = CHAR_getWorkInt( attackindex, CHAR_WORKBATTLECOM2 ); + if( CHAR_getWorkInt(charaindex, CHAR_WORK_PET0_STAT+petNo) != PET_STAT_SELECT) + break; + } + // shan End + BATTLE_PetOut( battleindex, attackNo ); + lssproto_KS_send( + getfdFromCharaIndex( charaindex ), + CHAR_getInt( charaindex, CHAR_DEFAULTPET ), 1 ); + break; +// Terry add 2001/11/05 +#ifdef __ATTACK_MAGIC + case BATTLE_COM_S_ATTACK_MAGIC: // 宠物魔法 + magic = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + toindex = CHAR_getWorkInt(charaindex,CHAR_WORKBATTLECOM2); +// print("magic->%d,toindex->%d\n",magic,toindex); + // 判断攻 围 + for(magic_count=0;magic_count= 0 && toindex <= 4) + toindex = TargetIndex[magic_count][1]; + // 打右下的前面那一排 + else + toindex = TargetIndex[magic_count][1]-1; + } + break; + } + } +// print("toindex->%d\n",toindex); + MAGIC_DirectUse(charaindex,magic,toindex,CHAR_GETWORKINT_HIGH(charaindex,CHAR_WORKBATTLECOM3)); + BATTLE_AddProfit( battleindex, aAttackList ); + break; +#endif + case BATTLE_COM_JYUJYUTU: + MAGIC_DirectUse( + charaindex, + CHAR_GETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3 ), + CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ), + CHAR_GETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3 ) + ); + break; + + case BATTLE_COM_ITEM: + itemindex = CHAR_getItemIndex(charaindex, + CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM3 )); + if( ITEM_CHECKINDEX( itemindex ) == FALSE ){ + print( "\nerr:要使用的item位置奇怪(%s)(%d)\n", + CHAR_getUseName( charaindex ), CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM3 ) ); + break; + } + +#if 1 // Robin fix 战斗不可换防具饰品 + { + int itemtype = ITEM_getInt( itemindex, ITEM_TYPE ); + if( itemtype == ITEM_HELM + || itemtype == ITEM_ARMOUR + || itemtype == ITEM_BRACELET + //|| itemtype == ITEM_MUSIC + || itemtype == ITEM_NECKLACE + || itemtype == ITEM_RING + || itemtype == ITEM_BELT + || itemtype == ITEM_EARRING + || itemtype == ITEM_NOSERING + || itemtype == ITEM_AMULET + //|| itemtype == CHAR_HEAD + ) + { + print("\n 改封包!战斗不可换防具!!:%s ", CHAR_getChar( charaindex, CHAR_CDKEY) ); + break; + } + } +#endif + +#ifdef _FIXBUG_ATTACKBOW + { + if( CHAR_getWorkInt( charaindex, CHAR_WORKITEMMETAMO) > 0 || + CHAR_getWorkInt( charaindex, CHAR_WORKNPCMETAMO) > 0 + || CHAR_getWorkInt( charaindex, CHAR_WORKFOXROUND ) != -1 ){ //若是变成小狐狸 + + int armtype; + int itemindex = CHAR_getItemIndex( charaindex, CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM3 )); + if( !ITEM_CHECKINDEX(itemindex) ) break; + armtype = ITEM_getInt( itemindex, ITEM_TYPE ); + + if( armtype == ITEM_BOW || armtype == ITEM_BOUNDTHROW || + armtype == ITEM_BREAKTHROW || armtype == ITEM_BOOMERANG) { + CHAR_talkToCli( charaindex, -1, "变身无法使用远距离武器!", CHAR_COLORYELLOW ); + break; + } + } + } +#endif + + CHAR_ItemUse( + charaindex, + CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ), + CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM3 ) + ); + + + if( ITEM_getEquipPlace( charaindex, itemindex ) == CHAR_ARM ){ + sprintf( szWork, "BN|a%X|%X|", attackNo, + CHAR_getInt( charaindex, CHAR_BASEIMAGENUMBER ) ); + BATTLESTR_ADD( szWork ); + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + // 武器专精 + BATTLE_ProfessionStatus_init( battleindex, charaindex ); +#endif + + }else{ + } + + break; + +#ifdef _PSKILL_FALLGROUND + case BATTLE_COM_S_FALLRIDE://落马术 + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + print("\n BATTLE_NoAction()"); + break; + } + ContFlg = BATTLE_S_FallGround( battleindex, attackNo, defNo, BATTLE_COM_S_FALLRIDE); + break; + +#endif +#ifdef _PETSKILL_EXPLODE + case BATTLE_COM_S_EXPLODE: + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + print("\n BATTLE_NoAction()"); + break; + } + ContFlg = BATTLE_S_Explode( battleindex, attackNo, defNo, BATTLE_COM_S_EXPLODE); + break; +#endif + +#ifdef _PETSKILL_TIMID + case BATTLE_COM_S_TIMID: + { + int skill; + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + print("\n BATTLE_NoAction()"); + break; + } + skill = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + ContFlg = BATTLE_S_AttackDamage( battleindex, attackNo, defNo, BATTLE_COM_S_TIMID, skill); + } + break; +#endif +#ifdef _PETSKILL_2TIMID + case BATTLE_COM_S_2TIMID: + { + int skill; + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + print("\n BATTLE_NoAction()"); + break; + } + skill = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + ContFlg = BATTLE_S_AttackDamage( battleindex, attackNo, defNo, BATTLE_COM_S_2TIMID, skill); + } + break; +#endif + +#ifdef _PETSKILL_PROPERTY + case BATTLE_COM_S_PROPERTYSKILL: + { + int skill; + skill = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + BATTLE_S_PetSkillProperty( battleindex, attackNo, COM, skill); + BATTLE_NoAction( battleindex, attackNo ); + } + break; +#endif + +#ifdef _BATTLE_LIGHTTAKE + case BATTLE_COM_S_LIGHTTAKE: + { + int skill; + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + print("\n BATTLE_NoAction()"); + break; + } + skill = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + ContFlg = BATTLE_S_AttackDamage( battleindex, attackNo, defNo, BATTLE_COM_S_LIGHTTAKE, skill); + } + break; +#endif + +#ifdef _SKILL_DAMAGETOHP + case BATTLE_COM_S_DAMAGETOHP: //嗜血技 + { + int skill; + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + print("\n BATTLE_NoAction()"); + break; + } + skill = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + ContFlg = BATTLE_S_AttackDamage( battleindex, attackNo, defNo, BATTLE_COM_S_DAMAGETOHP, skill); + } + break; +#endif + +#ifdef _PETSKILL_DAMAGETOHP + case BATTLE_COM_S_DAMAGETOHP2: //暗月狂狼(嗜血技的变体) + { + int skill,attackidxtemp; + attackidxtemp = BATTLE_No2Index( battleindex, attackNo ); + + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + print("\n BATTLE_NoAction()"); + break; + } + skill = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + ContFlg = BATTLE_S_AttackDamage( battleindex, attackNo, defNo, BATTLE_COM_S_DAMAGETOHP2, skill); + + } + break; +#endif + +#ifdef _Skill_MPDAMAGE + case BATTLE_COM_S_MPDAMAGE: //MP伤害 + { + int skill; + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + print("\n BATTLE_NoAction()"); + break; + } + skill = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + ContFlg = BATTLE_S_AttackDamage( battleindex, attackNo, defNo, BATTLE_COM_S_MPDAMAGE, skill); + break; + } + break; +#endif +#ifdef _SKILL_TOOTH + case BATTLE_COM_S_TOOTHCRUSHE: + { + int skill; + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + print("\n BATTLE_NoAction()"); + break; + } + skill = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + ContFlg = BATTLE_S_AttackDamage( battleindex, attackNo, defNo, BATTLE_COM_S_TOOTHCRUSHE, skill); + break; + } + break; +#endif +#ifdef _PSKILL_MODIFY + case BATTLE_COM_S_MODIFYATT: + { + int skill; + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + print("\n BATTLE_NoAction()"); + break; + } + skill = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + ContFlg = BATTLE_S_AttackDamage( battleindex, attackNo, defNo, BATTLE_COM_S_MODIFYATT, skill); + } + break; +#endif +#ifdef _PSKILL_MDFYATTACK + case BATTLE_COM_S_MDFYATTACK: + { + int skill; + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + print("\n BATTLE_NoAction()"); + break; + } + skill = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + ContFlg = BATTLE_S_AttackDamage( battleindex, attackNo, defNo, BATTLE_COM_S_MDFYATTACK, skill); + } + break; +#endif + +#ifdef _PETSKILL_TEAR + case BATTLE_COM_S_PETSKILLTEAR: + { + int skill; + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + print("\n BATTLE_NoAction()"); + break; + } + skill = CHAR_GETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3); + ContFlg = BATTLE_S_AttackDamage( battleindex, attackNo, defNo, BATTLE_COM_S_PETSKILLTEAR, skill); + } + break; +#endif + +#ifdef _SONIC_ATTACK // WON ADD 音波攻击 + case BATTLE_COM_S_SONIC: + { + int skill, defNo2=-1, index2=-1; + + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + print("\n BATTLE_NoAction()"); + break; + } + skill = CHAR_GETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3); + + if( defNo >= 15 && defNo < 20 ) defNo2 = defNo - 5; + else if( defNo >= 5 && defNo < 10 ) defNo2 = defNo - 5; + else defNo2 = -1; + + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + index2 = BATTLE_No2Index( battleindex, defNo2 ); + + ContFlg = BATTLE_S_AttackDamage( battleindex, attackNo, defNo, BATTLE_COM_S_SONIC, skill ); + + if( index2 >= 0 ){ + if( defNo2 >= 0 ){ + ContFlg = BATTLE_S_AttackDamage( battleindex, attackNo, defNo2, BATTLE_COM_S_SONIC2, skill ); + } + } + + } + break; +#endif + +#ifdef _PETSKILL_REGRET + case BATTLE_COM_S_REGRET: + { + int skill, defNo2=-1, index2=-1; + + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + print("\n BATTLE_NoAction()"); + break; + } + skill = CHAR_GETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3); + + if( defNo >= 15 && defNo < 20 ) defNo2 = defNo - 5; + else if( defNo >= 5 && defNo < 10 ) defNo2 = defNo - 5; + else defNo2 = -1; + + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + index2 = BATTLE_No2Index( battleindex, defNo2 ); + + ContFlg = BATTLE_S_AttackDamage( battleindex, attackNo, defNo, BATTLE_COM_S_REGRET, skill ); + if( index2 >= 0 ){ + if( defNo2 >= 0 ){ + ContFlg = BATTLE_S_AttackDamage( battleindex, attackNo, defNo2, BATTLE_COM_S_REGRET2, skill ); + } + } + + } + break; +#endif + +#ifdef _MAGIC_SUPERWALL + case BATTLE_COM_S_SUPERWALL: + { + int skill; + defNo = CHAR_getWorkInt(charaindex,CHAR_WORKBATTLECOM2); + skill = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + ContFlg = PETSKILL_MagicStatusChange_Battle( battleindex, attackNo, defNo, skill); + } + break; +#endif +#ifdef _PETSKILL_SETDUCK + case BATTLE_COM_S_SETDUCK: + { + int skill; + defNo = CHAR_getWorkInt(charaindex,CHAR_WORKBATTLECOM2); + skill = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + ContFlg = PETSKILL_SetDuckChange_Battle( battleindex, attackNo, defNo, skill); + break; + } +#endif +#ifdef _MAGICPET_SKILL + case BATTLE_COM_S_SETMAGICPET: + { + int skill; + defNo = CHAR_getWorkInt(charaindex,CHAR_WORKBATTLECOM2); + skill = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + ContFlg = PETSKILL_SetMagicPet_Battle( battleindex, attackNo, defNo, skill); + break; + } +#endif +#ifdef _PRO_BATTLEENEMYSKILL + case BATTLE_COM_S_ENEMYRELIFE: + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + print("\n BATTLE_NoAction()"); + break; + } + + ContFlg =BATTLE_E_ENEMYREFILE( battleindex, attackNo, defNo, BATTLE_COM_S_ENEMYRELIFE); + if( ContFlg == FALSE ) { + CHAR_setFlg( charaindex, CHAR_ISATTACKED, 1 ); + ContFlg = BATTLE_Attack( battleindex, attackNo, defNo ); + BATTLE_AddProfit( battleindex, aAttackList ); + } + BATTLE_AddProfit( battleindex, aAttackList ); + break; + + case BATTLE_COM_S_ENEMYREHP: + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + print("\n BATTLE_NoAction()"); + break; + } + ContFlg =BATTLE_E_ENEMYREHP( battleindex, attackNo, defNo, BATTLE_COM_S_ENEMYREHP); + if( ContFlg == FALSE ) { + CHAR_setFlg( charaindex, CHAR_ISATTACKED, 1 ); + ContFlg = BATTLE_Attack( battleindex, attackNo, defNo ); + BATTLE_AddProfit( battleindex, aAttackList ); + } + BATTLE_AddProfit( battleindex, aAttackList ); + break; + + case BATTLE_COM_S_ENEMYHELP: + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + print("\n BATTLE_NoAction()"); + break; + } + ContFlg =BATTLE_E_ENEMYHELP( battleindex, attackNo, defNo, BATTLE_COM_S_ENEMYREHP); + if( ContFlg == FALSE ) { + CHAR_setFlg( charaindex, CHAR_ISATTACKED, 1 ); + ContFlg = BATTLE_Attack( battleindex, attackNo, defNo ); + BATTLE_AddProfit( battleindex, aAttackList ); + } + BATTLE_AddProfit( battleindex, aAttackList ); + break; +#endif + case BATTLE_COM_S_GBREAK: //破除防御 + + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + break; + } + ContFlg = BATTLE_S_GBreak( battleindex, attackNo, defNo ); + break; +#ifdef _SKILL_GUARDBREAK2//破除防御2 vincent add 2002/05/20 + case BATTLE_COM_S_GBREAK2: + //确定攻击对象 + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + break; + } + ContFlg = BATTLE_S_GBreak2( battleindex, attackNo, defNo ); + break; +#endif + +#ifdef _SKILL_SACRIFICE + case BATTLE_COM_S_SACRIFICE://救援 vincent add 2002/05/30 + //确定攻击对象 + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + break; + } + ContFlg = BATTLE_S_Sacrifice( battleindex, attackNo, defNo ); + + break; +#endif + +#ifdef _SKILL_REFRESH + case BATTLE_COM_S_REFRESH://状态回复 vincent add 2002/08/08 + { + int array; + array = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); +// print("\n vincent--case BATTLE_COM_S_REFRESH:-->defNo:%d",defNo); + ContFlg = BATTLE_S_Refresh( battleindex, attackNo, defNo ,array); + } + break; +#endif + +#ifdef _SKILL_WEAKEN //vincent宠技:虚弱 + case BATTLE_COM_S_WEAKEN: + { + int array; + array = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); + //print("\n vincent--case BATTLE_COM_S_WEAKEN:-->defNo:%d",defNo); + ContFlg = BATTLE_S_Weaken( battleindex, attackNo, defNo ,array); + } + break; +#endif + +#ifdef _SKILL_DEEPPOISON //vincent宠技:剧毒 + case BATTLE_COM_S_DEEPPOISON: + { + int array; + array = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); + ContFlg = BATTLE_S_Deeppoison( battleindex, attackNo, defNo ,array); + } + break; +#endif + +#ifdef _SKILL_BARRIER //vincent宠技:魔障 + case BATTLE_COM_S_BARRIER: + { + int array; + array = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); + ContFlg = BATTLE_S_Barrier( battleindex, attackNo, defNo ,array); + } + break; +#endif + +#ifdef _SKILL_NOCAST //vincent宠技:沉默 + case BATTLE_COM_S_NOCAST: + { + int array; + array = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); + ContFlg = BATTLE_S_Nocast( battleindex, attackNo, defNo ,array); + } + break; +#endif + +#ifdef _SKILL_ROAR //vincent宠技:大吼 + case BATTLE_COM_S_ROAR: + { + int array; + //确定攻击对象 + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + break; + } + array = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + ContFlg = BATTLE_S_Roar( battleindex, attackNo, defNo ,array); + } + break; +#endif + case BATTLE_COM_S_ABDUCT: + { + int array; + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + break; + } + array = CHAR_GETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3); + BATTLE_Abduct( battleindex, attackNo, defNo, array); + } + break; + case BATTLE_COM_COMBO: + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + break; + } + gDamageDiv = 1.0; + ComboId = EntryList[i].combo; + aAttackList[0] = EntryList[i].num; // 伉旦玄卞笛尹月 + i ++; // 戚及谛井日 + k = 1; + for( ; EntryList[i].combo == ComboId && i < entrynum; i ++ ){ + int charmode; + // 绣箕允月井民尼永弁 + if( CHAR_CHECKINDEX( EntryList[i].charaindex ) == FALSE )continue; + + // 爵 卞辅笛仄化中卅中桦宁反戚尺 + charmode = CHAR_getWorkInt( EntryList[i].charaindex, CHAR_WORKBATTLEMODE ); + if( charmode == 0 || charmode == BATTLE_CHARMODE_FINAL ){ + continue; + } + + // 旦 □正旦唱橘荚汊↓ 质 + BATTLE_StatusSeq( EntryList[i].charaindex ); +#ifdef _OTHER_MAGICSTAUTS + BATTLE_MagicStatusSeq( EntryList[i].charaindex ); +#endif + // 仃卅井匀凶桦宁 + if( BATTLE_CanMoveCheck( EntryList[i].charaindex ) == FALSE ){ + continue; + } + if( CHAR_getInt( EntryList[i].charaindex, CHAR_HP ) <= 0 ){ + continue; + } + aAttackList[k++] = EntryList[i].num; + } + aAttackList[k] = -1; + i--; + if( k == 1 ){ + print( "\nerr:一人combo bug\n" ); + } + sprintf( szWork, "BY|r%X|", defNo ); + BATTLESTR_ADD( szWork ); + BATTLE_Combo( battleindex, aAttackList, defNo ); + +#ifdef _Item_ReLifeAct + BATTLE_AddProfit( battleindex, aAttackList ); +#endif + // 反 FF 毛仁匀勾仃月 + BATTLESTR_ADD( "FF|" ); + break; + + //--------------------------------------------- + case BATTLE_COM_WAIT: + case BATTLE_COM_NONE: + BATTLE_NoAction( battleindex, attackNo ); + break; + + //--------------------------------------------- + case BATTLE_COM_S_EARTHROUND1: + BATTLE_EarthRoundHide( battleindex, attackNo ); + break; + + //--------------------------------------------- + case BATTLE_COM_S_LOSTESCAPE: + BATTLE_LostEscape( battleindex, attackNo ); + break; + + case BATTLE_COM_S_STEAL: + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + break; + } + BATTLE_Steal( battleindex, attackNo, defNo ); + break; + +#ifdef _BATTLESTEAL_FIX + case BATTLE_COM_S_STEALMONEY: + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + break; + } + BATTLE_StealMoney( battleindex, attackNo, defNo) ; + break; +#endif + case BATTLE_COM_S_NOGUARD: + BATTLE_NoAction( battleindex, attackNo ); + break; + case BATTLE_COM_S_CHARGE: + sprintf( szWork, "bt|%x|", attackNo ); + BATTLESTR_ADD( szWork ); + break; +#ifdef _PETSKILL_LER + case BATTLE_COM_S_BAT_FLY: + { + if((defNo = BATTLE_TargetAdjust(battleindex,charaindex,myside)) < 0){ + BATTLE_NoAction(battleindex,attackNo); + break; + } + + BATTLE_BatFly(battleindex,attackNo,myside); + } + break; + case BATTLE_COM_S_DIVIDE_ATTACK: + { + if((defNo = BATTLE_TargetAdjust(battleindex,charaindex,myside)) < 0){ + BATTLE_NoAction(battleindex,attackNo); + break; + } + + BATTLE_DivideAttack(battleindex,attackNo,myside); + } + break; +#endif +#ifdef _PETSKILL_BATTLE_MODEL + case BATTLE_COM_S_BATTLE_MODEL: + BATTLE_BattleModel(battleindex,attackNo,myside); + break; +#endif + //--------------------------------------------- + default: + print( "\nerr:奇怪的命令(%d:%d:%s)\n", charaindex, COM, + CHAR_getUseName( charaindex ) ); + sprintf( szWork, "bg|%x|", attackNo ); + BATTLESTR_ADD( szWork ); + break; + } +#ifdef _VARY_WOLF + if(CHAR_getInt( charaindex, CHAR_BASEIMAGENUMBER)==101428) + { + if(CHAR_getWorkInt( charaindex, CHAR_WORKTURN)==0) + CHAR_setWorkInt( charaindex, CHAR_WORKTURN, 1); + else + CHAR_setWorkInt( charaindex, CHAR_WORKTURN, CHAR_getWorkInt( charaindex, CHAR_WORKTURN)+1); + + if(CHAR_getWorkInt( charaindex, CHAR_WORKTURN)>5) + { + CHAR_setInt( charaindex, CHAR_BASEIMAGENUMBER, CHAR_getInt( charaindex, CHAR_BASEBASEIMAGENUMBER)); + CHAR_setWorkInt( charaindex, CHAR_WORKATTACKPOWER, CHAR_getWorkInt( charaindex, CHAR_WORKFIXSTR)); + CHAR_setWorkInt( charaindex, CHAR_WORKQUICK, CHAR_getWorkInt( charaindex, CHAR_WORKFIXDEX)); + CHAR_setWorkInt( charaindex, CHAR_WORKTURN, 0); + } + } +#endif + +#ifdef _PETSKILL_BECOMEFOX // 判断中了媚惑术後是否已到恢复的回合数 + //if(CHAR_getInt( charaindex, CHAR_BASEIMAGENUMBER)==101749) //用图号判断的话,若是人变身时,会被自动改回去 + if( CHAR_getWorkInt( charaindex, CHAR_WORKFOXROUND ) != -1 ) //若是变成小狐狸 + { + if(CHAR_getInt( charaindex, CHAR_BASEIMAGENUMBER)!=101749) + CHAR_setInt( charaindex, CHAR_BASEIMAGENUMBER, 101749 ); + + if(pBattle->turn - CHAR_getWorkInt( charaindex, CHAR_WORKFOXROUND) > 2) + { + int defNo = BATTLE_Index2No( battleindex, charaindex ); + int toNo = defNo - 5;//主人的编号 + //print("\n变身人物回复:%s,round:%d", CHAR_getChar( charaindex, CHAR_NAME), CHAR_getWorkInt( charaindex, CHAR_WORKFOXROUND)); + + CHAR_setInt( charaindex, CHAR_BASEIMAGENUMBER, CHAR_getInt( charaindex, CHAR_BASEBASEIMAGENUMBER)); + + CHAR_setWorkInt( charaindex, CHAR_WORKATTACKPOWER, CHAR_getWorkInt( charaindex, CHAR_WORKFIXSTR)); + CHAR_setWorkInt( charaindex, CHAR_WORKDEFENCEPOWER, CHAR_getWorkInt( charaindex, CHAR_WORKFIXTOUGH)); + CHAR_setWorkInt( charaindex, CHAR_WORKQUICK, CHAR_getWorkInt( charaindex, CHAR_WORKFIXDEX)); + CHAR_setWorkInt( charaindex, CHAR_WORKFOXROUND, -1); + + //Change fix 回复宠物忘掉的技能 + sprintf( szWork, "W%d", CHAR_getInt( BATTLE_No2Index( battleindex, toNo ), CHAR_DEFAULTPET ) ); + CHAR_sendStatusString( BATTLE_No2Index( battleindex, toNo ), szWork ); + } + } +#endif +#ifdef _PETSKILL_BECOMEPIG + if( CHAR_getInt( charaindex, CHAR_BECOMEPIG) > -1 + && (CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER) ) + { + char pigbuffer[128]; + CHAR_setInt( charaindex, CHAR_BASEIMAGENUMBER, CHAR_getInt( charaindex, CHAR_BECOMEPIG_BBI ) ); + if( CHAR_getInt( charaindex, CHAR_BECOMEPIG) > 0 ){ + sprintf(pigbuffer, "乌力时间:%d秒", CHAR_getInt( charaindex, CHAR_BECOMEPIG )); + CHAR_talkToCli( charaindex,-1,pigbuffer,CHAR_COLORWHITE); + } + else{ + sprintf(pigbuffer, " 乌力时间结束,离开战斗後可解除乌力化:%d ", CHAR_getInt( charaindex, CHAR_BECOMEPIG )); + CHAR_talkToCli( charaindex,-1,pigbuffer,CHAR_COLORWHITE); + } + } +#endif + +#ifdef _PROFESSION_ADDSKILL + { +/* for(i=0;i<20;i++){ + if( pBattle->ice_use[i] ){//冰爆准备中 + print("\n冰爆准备中"); + if( pBattle->ice_bout[i] > 0 ){//冰爆倒数 + print("\n冰爆倒数"); + if( --pBattle->ice_bout[i] == 0 ){//放冰爆 + print("\n放冰爆"); + pBattle->ice_use[i] = FALSE; + if( CHAR_CHECKINDEX(pBattle->ice_charaindex[i]) ){ + int battlecom = CHAR_getWorkInt( pBattle->ice_charaindex[i], CHAR_WORKBATTLECOM1 ); + print("\n冰爆"); + print("\nbattlecom:%d",battlecom); + CHAR_setWorkInt( pBattle->ice_charaindex[i], CHAR_WORKBATTLECOM1, BATTLE_COM_S_ICE_CRACK ); + CHAR_SETWORKINT_HIGH( pBattle->ice_charaindex[i], CHAR_WORKBATTLECOM3, pBattle->ice_level[i] ); + CHAR_setWorkInt( pBattle->ice_charaindex[i], CHAR_WORKBATTLECOM2, pBattle->ice_toNo[i] ); + CHAR_SETWORKINT_HIGH( pBattle->ice_charaindex[i], CHAR_WORKBATTLECOM3, pBattle->ice_level[i] ); + CHAR_SETWORKINT_LOW( pBattle->ice_charaindex[i], CHAR_WORKBATTLECOM3, pBattle->ice_array[i] ); + battle_profession_attack_magic_fun(battleindex, pBattle->ice_attackNo[i], pBattle->ice_toNo[i], pBattle->ice_charaindex[i]); + CHAR_setWorkInt( pBattle->ice_charaindex[i], CHAR_WORKBATTLECOM1, battlecom ); + } + } + } + } + }*/ + } + { + int earth_boundary = GETHIGHVALUE( CHAR_getWorkInt( charaindex, CHAR_WORKFIXEARTHAT_BOUNDARY ) ); + int water_boundary = GETHIGHVALUE( CHAR_getWorkInt( charaindex, CHAR_WORKFIXWATERAT_BOUNDARY ) ); + int fire_boundary = GETHIGHVALUE( CHAR_getWorkInt( charaindex, CHAR_WORKFIXFIREAT_BOUNDARY ) ); + int wind_boundary = GETHIGHVALUE( CHAR_getWorkInt( charaindex, CHAR_WORKFIXWINDAT_BOUNDARY ) ); + int boundary_turn=0; + BOOL boundaryclear = FALSE; + if( earth_boundary > 0 ){//地结界 + boundary_turn = GETLOWVALUE( CHAR_getWorkInt( charaindex, CHAR_WORKFIXEARTHAT_BOUNDARY ) ) - 1; +print("\n地:%d ",boundary_turn ); + if( boundary_turn <= -1 ) + CHAR_setWorkInt( charaindex, CHAR_WORKFIXEARTHAT_BOUNDARY, 0 ),boundaryclear = TRUE; + else + CHAR_setWorkInt( charaindex, CHAR_WORKFIXEARTHAT_BOUNDARY, MAKE2VALUE(earth_boundary,boundary_turn) ); + + } + if( water_boundary > 0 ){//水结界 + boundary_turn = GETLOWVALUE( CHAR_getWorkInt( charaindex, CHAR_WORKFIXWATERAT_BOUNDARY ) ) - 1; +print("\n水:%d ",boundary_turn ); + + if( boundary_turn <= -1 ) + CHAR_setWorkInt( charaindex, CHAR_WORKFIXWATERAT_BOUNDARY, 0 ),boundaryclear = TRUE; + else + CHAR_setWorkInt( charaindex, CHAR_WORKFIXWATERAT_BOUNDARY, MAKE2VALUE(water_boundary,boundary_turn) ); + + } + if( fire_boundary > 0 ){//火结界 + boundary_turn = GETLOWVALUE( CHAR_getWorkInt( charaindex, CHAR_WORKFIXFIREAT_BOUNDARY ) ) - 1; +print("\n火:%d ",boundary_turn ); + + if( boundary_turn <= -1 ) + CHAR_setWorkInt( charaindex, CHAR_WORKFIXFIREAT_BOUNDARY, 0 ),boundaryclear = TRUE; + else + CHAR_setWorkInt( charaindex, CHAR_WORKFIXFIREAT_BOUNDARY, MAKE2VALUE(fire_boundary,boundary_turn) ); + + } + if( wind_boundary > 0 ){//风结界 + boundary_turn = GETLOWVALUE( CHAR_getWorkInt( charaindex, CHAR_WORKFIXWINDAT_BOUNDARY ) ) - 1; +print("\n风:%d ",boundary_turn ); + + if( boundary_turn <= -1 ) + CHAR_setWorkInt( charaindex, CHAR_WORKFIXWINDAT_BOUNDARY, 0 ),boundaryclear = TRUE; + else + CHAR_setWorkInt( charaindex, CHAR_WORKFIXWINDAT_BOUNDARY, MAKE2VALUE(wind_boundary,boundary_turn) ); + + } + if( GETHIGHVALUE( CHAR_getWorkInt( charaindex, CHAR_WORKFIXEARTHAT_BOUNDARY ) ) == 0 + && GETHIGHVALUE( CHAR_getWorkInt( charaindex, CHAR_WORKFIXWATERAT_BOUNDARY ) ) == 0 + && GETHIGHVALUE( CHAR_getWorkInt( charaindex, CHAR_WORKFIXFIREAT_BOUNDARY ) ) == 0 + && GETHIGHVALUE( CHAR_getWorkInt( charaindex, CHAR_WORKFIXWINDAT_BOUNDARY ) ) == 0 + && boundaryclear ){ + int toNo = BATTLE_Index2No( battleindex, charaindex ); + if( toNo < 10 )//右方 + snprintf( szWork, sizeof( szWork ), "Ba|%X|%X|", 0,1 ); + else + snprintf( szWork, sizeof( szWork ), "Ba|%X|%X|", 0,0 ); + BATTLESTR_ADD( szWork ); + BATTLESTR_ADD( "FF|" ); + } + } +#endif + +#ifdef _Item_ReLifeAct + { + //pEntry + int k, userindex=-1; + // if( BattleArray[ battleindex].type != BATTLE_TYPE_P_vs_P){ + for( k=0; k<20; k++) { + userindex = BATTLE_getBattleDieIndex( battleindex, k); + if( !CHAR_CHECKINDEX( userindex) ) continue; + //Change fix CHECK_ITEM_RELIFE里面有检查了,这里不用 + //if( CHAR_getFlg( userindex, CHAR_ISDIE ) == FALSE ) + // continue; + if( CHAR_getInt( userindex, CHAR_HP) > 0 ) + continue; + if( CHAR_getInt( userindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ) { + CHECK_ITEM_RELIFE( battleindex, userindex); + } +#ifdef _LOSE_FINCH_ + else if( CHAR_getInt( userindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET ){ + CHECK_PET_RELIFE( battleindex, userindex); + } +#endif + } + } +#endif + BATTLESTR_ADD( szBadStatusString ); + BATTLE_AddProfit( battleindex, aAttackList );//取得经验值 + len = pszBattleTop - szBattleString; + if( AllSize + len >= sizeof( szAllBattleString ) - 1 ){ + // 引匹中匀凶井日窒手仄卅中 + }else{ + memcpy( szAllBattleString+AllSize, szBattleString, len ); + szAllBattleString[AllSize+len] = 0;// NULL 毛本永玄 + AllSize += len; + } + +#ifdef _CHECK_BATTLETIME + check_battle_com_end( COM); +#endif + + if( BATTLE_CountAlive( battleindex, 0 ) == 0 || BATTLE_CountAlive( battleindex, 1 ) == 0 ) { + break; + } + } +#ifdef _PETSKILL_LER + { + register int i,dieindex; + for(i=0;i<20;i++){ + dieindex = BATTLE_getBattleDieIndex(battleindex,i); + if(!CHAR_CHECKINDEX(dieindex)) continue; + if(CHAR_getFlg(dieindex,CHAR_ISDIE) == FALSE) continue; + if(CHAR_getInt(dieindex,CHAR_HP) > 0) continue; + // 雷尔死亡,变身 + if(CHAR_getInt(dieindex,CHAR_BASEBASEIMAGENUMBER) == 101813 || + CHAR_getInt(dieindex,CHAR_BASEBASEIMAGENUMBER) == 101814) + BATTLE_LerChange(battleindex,dieindex,i); + } + } +#endif + + szBattleString[0] = 0; + pszBattleTop = szBattleString; + pszBattleLast = szBattleString+arraysizeof(szBattleString); + if( pBattle->field_att != BATTLE_ATTR_NONE ){ + pBattle->att_count--; + if( pBattle->att_count <= 0 ){ + pBattle->field_att = BATTLE_ATTR_NONE; + //snprintf( szBuffer, sizeof(szBuffer), + // "field回复成无属性。" + //); + //BATTLE_BroadCast( battleindex, szBuffer, CHAR_COLORYELLOW ); + BATTLESTR_ADD( "BV|15|0|" ); + } + } + + strncat( szAllBattleString, szBattleString, sizeof( szAllBattleString ) ); + for( i = 0; i < entrynum; i ++ ){ + charaindex = EntryList[i].charaindex; + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ) == BATTLE_CHARMODE_RESCUE ) + continue; + + if( BATTLE_CommandSend( charaindex, szAllBattleString ) == TRUE ){ + } + } + pWatchBattle = pBattle->pNext; + for( ; pWatchBattle ; pWatchBattle = pWatchBattle->pNext ){ + if( BATTLE_CHECKADDRESS( pWatchBattle ) == FALSE ){ + print( "err:观战battle address错误(%p)\n", pWatchBattle ); + break; + } + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + charaindex = pWatchBattle->Side[0].Entry[i].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )continue; + BATTLE_CommandSend( charaindex, szAllBattleString ); + } + pWatchBattle->mode = BATTLE_MODE_WATCHAFTER; + } + + return 0; +} + +#ifdef _Item_ReLifeAct +BOOL CHECK_ITEM_RELIFE( int battleindex, int toindex) +{ + int i, itemindex; + CHAR_EquipPlace ep; + typedef void (*DIERELIFEFUNC)(int,int,int); + DIERELIFEFUNC Drf; + + if( CHAR_getInt( toindex, CHAR_HP) > 0 ) + return FALSE; + +#ifdef _DUMMYDIE + if( CHAR_getFlg( toindex, CHAR_ISDIE ) == FALSE && CHAR_getFlg( toindex, CHAR_ISDUMMYDIE ) == FALSE ) +#else + if( CHAR_getFlg( toindex, CHAR_ISDIE ) == FALSE ) +#endif + return FALSE; + + for( i = 0 ; i < 5 ; i++ ){ + itemindex = CHAR_getItemIndex( toindex , i ); + if( !ITEM_CHECKINDEX( itemindex)) + continue; + ep = ITEM_getEquipPlace( toindex, itemindex ); + if( ep == -1 ) + continue; + Drf=(DIERELIFEFUNC)ITEM_getFunctionPointer(itemindex, ITEM_DIERELIFEFUNC); + if( Drf ) { + Drf( toindex, itemindex, i); + return TRUE; + } + } + + return FALSE; + +} +#endif + +#ifdef _LOSE_FINCH_ +BOOL CHECK_PET_RELIFE( int battleindex, int petindex) +{ + int ReceveEffect=-1; + int toNo; + int attackNo=-1; + int WORK_HP=1; + int i; + struct _RePet{ + int petid; + int Effect; + int Addhp; +//Syu Mod +// }rePet[]={{1,SPR_fukkatu3,100},{-1,0,0}}; + }rePet[]={{-1,0,0}}; + + if( BATTLE_CHECKINDEX( battleindex ) == FALSE ) { + return FALSE; + } + if( CHAR_CHECKINDEX( petindex) == FALSE ) + return FALSE; + + if( CHAR_getFlg( petindex, CHAR_ISDIE) == FALSE ) { + print("\n PET_RELIFE:[ %d, CHAR_ISDIE FALSE] return !", petindex); + return FALSE; + } + if( CHAR_getWorkInt( petindex, CHAR_WORKSPETRELIFE) != 0 ) + return FALSE; + for( i=0;iskill, SKILL_LEVEL); + skill_level = PROFESSION_CHANGE_SKILL_LEVEL_M( skill_level ); + + if( skill_level >= 6 ) add_practice = (skill_level-5) * 3 + 10; + else add_practice = skill_level * 2; + if( add_practice > 25 ) add_practice = 25; + + add_practice += old_practice; + // 因为old_practice=0所以add_practice为2~25 + + CHAR_setWorkInt( charaindex, CHAR_WORK_F_PROFICIENCY, add_practice ); + + }else + // 冰熟练度 + if( (strcmp( skill_name , "PROFESSION_ICE_PRACTICE" )) == 0 ){ + int old_practice = CHAR_getInt( charaindex, PROFESSION_ICE_P ); + int add_practice = 0; + int skill_level = 0; + + // 技能等级 + hskill = CHAR_getCharHaveSkill( charaindex, i ); + skill_level = SKILL_getInt( &hskill->skill, SKILL_LEVEL); + skill_level = PROFESSION_CHANGE_SKILL_LEVEL_M( skill_level ); + + if( skill_level >= 6 ) add_practice = (skill_level-5) * 3 + 10; + else add_practice = skill_level * 2; + if( add_practice > 25 ) add_practice = 25; + + add_practice += old_practice; + + CHAR_setWorkInt( charaindex, CHAR_WORK_I_PROFICIENCY, add_practice ); + + }else + // 雷熟练度 + if( (strcmp( skill_name , "PROFESSION_THUNDER_PRACTICE" )) == 0 ){ + int old_practice = CHAR_getInt( charaindex, PROFESSION_THUNDER_P ); + int add_practice = 0; + int skill_level = 0; + + // 技能等级 + hskill = CHAR_getCharHaveSkill( charaindex, i ); + skill_level = SKILL_getInt( &hskill->skill, SKILL_LEVEL); + skill_level = PROFESSION_CHANGE_SKILL_LEVEL_M( skill_level ); + + if( skill_level >= 6 ) add_practice = (skill_level-5) * 3 + 10; + else add_practice = skill_level * 2; + if( add_practice > 25 ) add_practice = 25; + + add_practice += old_practice; + + CHAR_setWorkInt( charaindex, CHAR_WORK_T_PROFICIENCY, add_practice ); + + }else + // 回避 + if( (strcmp( skill_name , "PROFESSION_AVOID" )) == 0 ){ + int skill_level = 0; + + if( profession_class != PROFESSION_SKILL_getInt( Pskillid, PROFESSION_SKILL_PROFESSION_CLASS) ) return; + + // 技能等级 + hskill = CHAR_getCharHaveSkill( charaindex, i ); + skill_level = SKILL_getInt( &hskill->skill, SKILL_LEVEL); + skill_level = PROFESSION_CHANGE_SKILL_LEVEL_A( skill_level ); + + if( skill_level <=5 ) + value = skill_level * 2; + else + value = (skill_level-5) * 3; + if( value > 25 ) value = 25; + + CHAR_setWorkInt( charaindex, CHAR_WORK_P_DUCK, 1); + CHAR_setWorkInt( charaindex, CHAR_WORKMOD_P_DUCK, value ); + + }else + // 格档 + if( (strcmp( skill_name , "PROFESSION_DEFLECT" )) == 0 ){ + int skill_level = 0; + int old_value = 0, add_value = 0; + + if( profession_class != PROFESSION_SKILL_getInt( Pskillid, PROFESSION_SKILL_PROFESSION_CLASS) ) return; + + // 技能等级 + hskill = CHAR_getCharHaveSkill( charaindex, i ); + skill_level = SKILL_getInt( &hskill->skill, SKILL_LEVEL); + skill_level = PROFESSION_CHANGE_SKILL_LEVEL_A( skill_level ); + + old_value = CHAR_getWorkInt( charaindex, CHAR_WORKFIXARRANGE ); + add_value = old_value + skill_level + 10; + + CHAR_setWorkInt( charaindex, CHAR_WORKFIXARRANGE, add_value ); + CHAR_complianceParameter( charaindex ); + + }else + // 武器专精 + if( (strcmp( skill_name , "PROFESSION_WEAPON_FOCUS" )) == 0 ){ + int skill_level = 0; + + rate = 0; + if( profession_class != PROFESSION_SKILL_getInt( Pskillid, PROFESSION_SKILL_PROFESSION_CLASS) ) continue; + + // 技能等级 + hskill = CHAR_getCharHaveSkill( charaindex, i ); + skill_level = SKILL_getInt( &hskill->skill, SKILL_LEVEL); + skill_level = PROFESSION_CHANGE_SKILL_LEVEL_A( skill_level ); + + // 技能参数 + pszOption = PROFESSION_SKILL_getChar( Pskillid, PROFESSION_SKILL_OPTION); + if( pszOption == NULL ) continue; + + // 装备武器 + WeaponType = BATTLE_GetWepon( charaindex ); + + switch( WeaponType ){ + case ITEM_AXE: + if( (pszP=strstr( pszOption, "斧" ))!=NULL) rate = 1; break; + case ITEM_CLUB: + if( (pszP=strstr( pszOption, "棍" ))!=NULL) rate = 1; break; + case ITEM_SPEAR: + if( (pszP=strstr( pszOption, "枪" ))!=NULL) rate = 1; break; + case ITEM_BOW: + if( (pszP=strstr( pszOption, "弓" ))!=NULL) rate = 1; break; + case ITEM_BOOMERANG: // 回旋标 + if( (pszP=strstr( pszOption, "镖" ))!=NULL) rate = 1; break; + case ITEM_BOUNDTHROW: // 投掷斧头 + if( (pszP=strstr( pszOption, "投" ))!=NULL) rate = 1; break; + case ITEM_BREAKTHROW: // 投掷石 + if( (pszP=strstr( pszOption, "石" ))!=NULL) rate = 1; break; + default: rate = 0; break; + } + + if( rate == 1 ){ + old_value = CHAR_getWorkInt( charaindex, CHAR_MYSKILLSTRPOWER); + + if( skill_level <=5 ) + value = skill_level * 2 + old_value; + else + value = (skill_level-5) * 3 + 10 + old_value; + + if( value > 25 ) value = 25; + + CHAR_setWorkInt( charaindex, CHAR_WORK_WEAPON, 1 ); + CHAR_setWorkInt( charaindex, CHAR_WORKMOD_WEAPON, value ); + } + } + } + } + return; +} + + +void BATTLE_ProfessionStatusSeq( int battleindex, int charaindex ) +{ + int profession_class=0, i=0, j=0, Pskillid=-1, skillid=-1; + int skill_level=0, value=0, old_value=0; + int bid=-1, hp=0, flag=0; + char *skill_name, szcommand[256]; + CHAR_HaveSkill* hskill; + + + int status_table[9]={ 2, //麻痹 + 3, //睡眠 + 4, //石化 + 12, //晕眩 + 13, //缠绕 + 14, //天罗 + 15, //冰暴 + 17, //冰箭 + 23, }; //雷附体 + +#ifdef _PETSKILL_DAMAGETOHP +/* { + char msg[32]={0}; + int pet,pindex; + pet = CHAR_getInt( charaindex, CHAR_DEFAULTPET ); + if( pet >= 0 ){ + sprintf( msg, "o%d", pet ); + //if(CHAR_getInt( petindex, CHAR_PETID) == "狼" //宠物ID + // && CHAR_getInt( petindex, CHAR_HP) ) + CHAR_sendStatusString( charaindex, msg ); + pindex = CHAR_getCharPet( charaindex, pet ); + print("\n宠物名:%s",CHAR_getChar( pindex, CHAR_NAME)); + } + else + print("\无宠物"); + + } */ +#endif + + if ( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) return; + + profession_class=CHAR_getInt( charaindex, PROFESSION_CLASS); + if( profession_class <= PROFESSION_CLASS_NONE ) return; + + for( i=0; i 0 ){ + flag=1; + break; + } + } + + if( flag > 0 ){ + // 技能等级 + hskill = CHAR_getCharHaveSkill( charaindex, i ); + skill_level = SKILL_getInt( &hskill->skill, SKILL_LEVEL); + skill_level = PROFESSION_CHANGE_SKILL_LEVEL_M( skill_level ); + + value = skill_level * 2; + if( value > 20 ) value = 20; + + old_value = CHAR_getWorkInt( charaindex, CHAR_WORKMAXHP); + + value = old_value * value / 100 ; + + hp = CHAR_getInt( charaindex, CHAR_HP); + + if( value + hp > old_value ) + value = old_value - hp; + + if( value < 0 ) value = 0; + + CHAR_setInt( charaindex, CHAR_HP, value + hp ); + + bid = BATTLE_Index2No( battleindex, charaindex ); + sprintf( szcommand, "BD|r%X|0|1|%X|", bid, value ); + BATTLESTR_ADD( szcommand ); + + PROFESSION_SKILL_LVEVEL_UP( charaindex, "PROFESSION_REBACK" ); + } + } + + // 陷阱 + if( (strcmp( skill_name , "PROFESSION_TRAP" )) == 0 ){ + int count=0; + + count = CHAR_getWorkInt( charaindex, CHAR_WORKTRAP); + if( count > 0 ){ + count--; + CHAR_setWorkInt( charaindex, CHAR_WORKTRAP, count ); + }else if( count == 0 ){ + CHAR_setWorkInt( charaindex, CHAR_WORKTRAP, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORKMODTRAP, 0 ); + } + } + } + + return; +} + +#endif diff --git a/gmsv/battle/battle.c.bak b/gmsv/battle/battle.c.bak new file mode 100644 index 0000000..f7e0f27 --- /dev/null +++ b/gmsv/battle/battle.c.bak @@ -0,0 +1,9437 @@ +#include "version.h" +#include +#include +#include +#include "buf.h" +#include"object.h" +#include"char.h" +#include"char_base.h" +#include"char_data.h" +#include"battle.h" +#include"battle_event.h" +#include"battle_command.h" +#include"battle_ai.h" +#include"configfile.h" +#include"lssproto_serv.h" +#include"encount.h" +#include"enemy.h" +#include"handletime.h" +#include"readmap.h" +#include"pet_skill.h" +#include "npcutil.h" +#include "magic.h" +#include "npc_npcenemy.h" +#include "log.h" +#include "pet_skillinfo.h" +#include "anim_tbl.h" +#include "common.h" +#include "battle_magic.h" +#ifdef _Item_ReLifeAct +#include "item.h" +#endif +#include "correct_bug.h" + +#ifdef _DEATH_CONTEND +#include "deathcontend.h" +#endif + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 +#include "profession_skill.h" +#include "skill.h" +#endif + +//#define DANTAI +static int Total_BattleNum=0; +BATTLE *BattleArray; +int BATTLE_battlenum; +static int BATTLE_searchCnt = 0; + +#ifdef _PET_LIMITLEVEL //ANDY_ADD + void Pet_Check_Die( int petindex); +#endif +static int BATTLE_SearchTask( void ); +static int BATTLE_Battling( int battleindex ); + +#ifdef _Item_ReLifeAct + BOOL CHECK_ITEM_RELIFE( int battleindex, int toindex); +#endif +#ifdef _LOSE_FINCH_ + BOOL CHECK_PET_RELIFE( int battleindex, int petindex); +#endif +char szAllBattleString[BATTLE_STRING_MAX]; +#ifdef _OTHER_MAGICSTAUTS +void BATTLE_MagicStatusSeq( int charaindex ); +#endif + +//Terry 2001/11/28 +char szBattleString[512]; +char *pszBattleTop, + *pszBattleLast; + +char szBadStatusString[1024]; + +int gWeponType; +float gDamageDiv; +int gItemCrushRate = 400000; + +int BoomerangVsTbl[4][5] = { + { 4+5*0,2+5*0,0+5*0,1+5*0,3+5*0 }, + { 4+5*1,2+5*1,0+5*1,1+5*1,3+5*1 }, + { 4+5*2,2+5*2,0+5*2,1+5*2,3+5*2 }, + { 4+5*3,2+5*3,0+5*3,1+5*3,3+5*3 }, + +}; + +void BATTLE_BadStatusAllClr( int charaindex ) +{ + int i ; + for( i = 1; i < BATTLE_ST_END; i ++ ){ + CHAR_setWorkInt( charaindex, StatusTbl[i], 0 ); + } +#ifdef _OTHER_MAGICSTAUTS + for( i = 1; i < MAXSTATUSTYPE; i++ ){ + CHAR_setWorkInt( charaindex, MagicTbl[i], 0); + CHAR_setWorkInt( charaindex, CHAR_OTHERSTATUSNUMS, 0); + } +#endif +#ifdef _IMPRECATE_ITEM + for( i=0; i<3; i++) { + CHAR_setWorkInt( charaindex, CHAR_WORKIMPRECATENUM1+i, 0 ); + } +#endif + +#ifdef _PETSKILL_SETDUCK + CHAR_setWorkInt( charaindex, CHAR_MYSKILLDUCK, 0); + CHAR_setWorkInt( charaindex, CHAR_MYSKILLDUCKPOWER, 0 ); +#ifdef _MAGICPET_SKILL + CHAR_setWorkInt( charaindex, CHAR_MYSKILLSTR, 0); + CHAR_setWorkInt( charaindex, CHAR_MYSKILLSTRPOWER, 0 ); + CHAR_setWorkInt( charaindex, CHAR_MYSKILLTGH, 0); + CHAR_setWorkInt( charaindex, CHAR_MYSKILLTGHPOWER, 0 ); + CHAR_setWorkInt( charaindex, CHAR_MYSKILLDEX, 0); + CHAR_setWorkInt( charaindex, CHAR_MYSKILLDEXPOWER, 0 ); + CHAR_setWorkInt( charaindex, CHAR_MAGICPETMP, 0 ); +#endif +#endif + + CHAR_setFlg( charaindex, CHAR_ISDIE, 0 ); + +#ifdef _BATTLE_PROPERTY + { + Char *ch; + ch = CHAR_getCharPointer( charaindex); + if( ch == NULL ) return; + strcpysafe( ch->charfunctable[CHAR_BATTLEPROPERTY].string, + sizeof( ch->charfunctable[CHAR_BATTLEPROPERTY]), "");//战斗 + CHAR_constructFunctable( charaindex); + } +#endif + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + CHAR_setWorkInt( charaindex, CHAR_MYSKILLHIT, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORK_P_DUCK, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORKMOD_P_DUCK, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORK_WEAPON, 0 ); // 武器专精 + + // 火冰电抗性 + for( i=0; i<3; i++) + CHAR_setWorkInt( charaindex, CHAR_WORK_F_RESIST+i, 0/*CHAR_getInt( charaindex, PROFESSION_FIRE_R+i )*/ ); + +#endif + +#ifdef _PETSKILL_BECOMEPIG + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ) + { + for( i =0; i < CHAR_MAXPETHAVE; i++){ + int pindex = CHAR_getCharPet( charaindex, i ); + if( !CHAR_CHECKINDEX( pindex ) ) + continue; + CHAR_setInt( pindex, CHAR_BECOMEPIG, -1 ); + } + } +#endif + +} + +int BATTLE_getTopBattle( int battleindex ) +{ + + BATTLE *pBattleTop; + + if( BATTLE_CHECKINDEX( battleindex ) == FALSE ) return -1; + + pBattleTop = &BattleArray[battleindex]; + + while( pBattleTop != NULL ){ + pBattleTop = BattleArray[battleindex].pBefore; + } + + if( BATTLE_CHECKINDEX( pBattleTop->battleindex ) == FALSE ){ + return -1; + }else{ + return pBattleTop->battleindex; + } +} + +static int BATTLE_getBattleFieldNo( int floor, int x, int y ) +{ + int tile[2], map[3], iRet; + if( !MAP_getTileAndObjData( floor, x, y, &tile[0], &tile[1] ) ) + return FALSE; + map[0] = MAP_getImageInt( tile[0], MAP_BATTLEMAP ); + map[1] = MAP_getImageInt( tile[0], MAP_BATTLEMAP2 ); + map[2] = MAP_getImageInt( tile[0], MAP_BATTLEMAP3 ); + iRet = map[RAND( 0, 2 )]; + return iRet; +} + +void BATTLE_BadStatusString( int defNo, int status ) +{ + char szWork[256]; + if( status < 1 || status >= BATTLE_ST_END ){ + status = 0; + } + sprintf( szWork, "BM|%X|%X|", defNo, status ); + strncat( szBadStatusString, szWork, sizeof( szBadStatusString ) ); +} + + + +#ifdef __ATTACK_MAGIC + +static int CharTableIdx[20][2] = +{ + { 3 , 2 } , { 3 , 1 } , { 3 , 3 } , { 3 , 0 } , { 3 , 4 } , + { 2 , 2 } , { 2 , 1 } , { 2 , 3 } , { 2 , 0 } , { 2 , 4 } , + { 0 , 2 } , { 0 , 1 } , { 0 , 3 } , { 0 , 0 } , { 0 , 4 } , + { 1 , 2 } , { 1 , 1 } , { 1 , 3 } , { 1 , 0 } , { 1 , 4 } + +}; + +typedef int ( *FUNCSORTLOC )( const void* , const void* ); + +static int SortLoc( const int *pEle1 , const int *pEle2 ) +{ + int ele1basex , ele1basey; + int ele2basex , ele2basey; + + ele1basex = CharTableIdx[*pEle1][1]; + ele1basey = CharTableIdx[*pEle1][0]; + ele2basex = CharTableIdx[*pEle2][1]; + ele2basey = CharTableIdx[*pEle2][0]; + + if( *pEle1 >= 10 ){ + if( ele1basey != ele2basey ) + return ( ele1basey - ele2basey ); + return ( ele1basex - ele2basex ); + }else{ // 右下方 + if( ele1basey != ele2basey ) + return ( ele2basey - ele1basey ); + return ( ele2basex - ele1basey ); + } + return 0; +} +#endif + +int BATTLE_MultiList( int battleindex, int toNo, int ToList[] ) +{ + int j , i , cnt=0,nLife = 0,nLifeArea[10]; +#ifdef __ATTACK_MAGIC + // 单人攻击 + if(0 <= toNo && toNo <= 19){ + memset(nLifeArea,-1,sizeof(nLifeArea)); + // 如果被攻击者是右下方的人 + if(toNo >= 0 && toNo <= 9){ + for(i=0;i<10;i++){ + // 确定活着的人数,并记录活着的人的号码 + if(BATTLE_TargetCheck(battleindex,i) == TRUE) nLifeArea[nLife++] = i; + } + } + // 如果被攻击者是左上方的人 + if(toNo >= 10 && toNo <= 19){ + for(i=10;i<20;i++){ + // 确定活着的人数,并记录活着的人的号码 + if(BATTLE_TargetCheck(battleindex,i) == TRUE) nLifeArea[nLife++] = i; + } + } + + // 全死(虽然不太可能,但..) + if(nLife == 0){ + print("\nAll die!!"); + return -1; + }else{ + // 被攻击的对象已经死亡或不在战场上 + if(BATTLE_TargetCheck(battleindex,toNo) == FALSE) + // 随机找一只来打 + while((toNo = nLifeArea[rand()%10]) == -1); + } + ToList[0] = toNo; + ToList[1] = -1; + cnt = 1; + } + // 右下後一列攻击 + else if( TARGET_SIDE_0_B_ROW == toNo ){ + for( j = 0 , i = 0 ; i < SIDE_OFFSET / 2 ; i++ ){ + if( TRUE == BATTLE_TargetCheck( battleindex , i ) ){ + ToList[j] = i; + j++; + } + } + ToList[j] = -1; + cnt = j; + // 如果这一排都没有人可以打 + if(j == 0){ + // 换前一排 + for( j = 0 , i = SIDE_OFFSET / 2 ; i < SIDE_OFFSET ; i++ ){ + if( TRUE == BATTLE_TargetCheck( battleindex , i ) ){ + ToList[j] = i; + j++; + } + } + ToList[j] = -1; + cnt = j; + // 如果全死 + if(j == 0) return -1; + toNo = TARGET_SIDE_0_F_ROW; + } + } + // 右下前一列攻击 + else if( TARGET_SIDE_0_F_ROW == toNo ) + { + for( j = 0 , i = SIDE_OFFSET / 2 ; i < SIDE_OFFSET ; i++ ) + { + if( TRUE == BATTLE_TargetCheck( battleindex , i ) ) + { + ToList[j] = i; + j++; + } + } + ToList[j] = -1; + cnt = j; + // 如果这一排都没有人可以打 + if(j == 0) + { + // 换後一排 + for( j = 0 , i = 0 ; i < SIDE_OFFSET / 2 ; i++ ) + { + if( TRUE == BATTLE_TargetCheck( battleindex , i ) ) + { + ToList[j] = i; + j++; + } + } + ToList[j] = -1; + cnt = j; + // 如果全死 + if(j == 0) return -1; + toNo = TARGET_SIDE_0_B_ROW; + } + } + // 左下後一列攻击 + else if( TARGET_SIDE_1_B_ROW == toNo ) + { + for( j = 0 , i = SIDE_OFFSET ; i < SIDE_OFFSET + SIDE_OFFSET / 2 ; i++ ) + { + if( TRUE == BATTLE_TargetCheck( battleindex , i ) ) + { + ToList[j] = i; + j++; + } + } + ToList[j] = -1; + cnt = j; + // 如果这一排都没有人可以打 + if(j == 0) + { + // 换前一排 + for( j = 0 , i = SIDE_OFFSET + SIDE_OFFSET / 2 ; i < SIDE_OFFSET * 2 ; i++ ) + { + if( TRUE == BATTLE_TargetCheck( battleindex , i ) ) + { + ToList[j] = i; + j++; + } + } + ToList[j] = -1; + cnt = j; + // 如果全死 + if(j == 0) return -1; + toNo = TARGET_SIDE_1_F_ROW; + } + } + // 左上前一列攻击 + else if( TARGET_SIDE_1_F_ROW == toNo ) + { + for( j = 0 , i = SIDE_OFFSET + SIDE_OFFSET / 2 ; i < SIDE_OFFSET * 2 ; i++ ) + { + if( TRUE == BATTLE_TargetCheck( battleindex , i ) ) + { + ToList[j] = i; + j++; + } + } + ToList[j] = -1; + cnt = j; + // 如果这一排都没有人可以打 + if(j == 0) + { + // 换後一排 + for( j = 0 , i = SIDE_OFFSET ; i < SIDE_OFFSET + SIDE_OFFSET / 2 ; i++ ) + { + if( TRUE == BATTLE_TargetCheck( battleindex , i ) ) + { + ToList[j] = i; + j++; + } + } + ToList[j] = -1; + cnt = j; + // 如果全死 + if(j == 0) return -1; + toNo = TARGET_SIDE_1_B_ROW; + } + } + // 右下方所有攻击 + else if( TARGET_SIDE_0 == toNo ) + { + //print("BATTLE_MultiList(20)toNo->%d\n",toNo); + for( j = 0 , i = 0 ; i < SIDE_OFFSET ; i++ ) + { + if( TRUE == BATTLE_TargetCheck( battleindex , i ) ) + { + ToList[j] = i; + j++; + } + } + + ToList[j] = -1; + cnt = j; + } + // 左上方所有攻击 + else if( toNo == TARGET_SIDE_1 ) + { + for( j = 0 , i = SIDE_OFFSET ; i < SIDE_OFFSET * 2 ; i++ ) + { + if( TRUE == BATTLE_TargetCheck( battleindex , i ) ) + { + ToList[j] = i; + j++; + } + } + + ToList[j] = -1; + cnt = j; + } + // 所有人攻击 + else if( toNo == TARGET_ALL ){ +#ifdef _FIX_ARRAYBUG + for( j = 0 , i = 0 ; i < SIDE_OFFSET * 2 ; i++ ){ +#else + for( j = 0 , i = 0 ; i < SIDE_OFFSET * 2 ; i++ , j++ ) { +#endif + if( TRUE == BATTLE_TargetCheck( battleindex , i ) ){ + ToList[j] = i; + j++; + } + } + ToList[i] = -1; + cnt = j; + // won add 前後排攻击 + }else if( toNo == TARGER_THROUGH ){ + int toNo2=-1, count=0; + + if(BATTLE_TargetCheck(battleindex,toNo) != FALSE){ + ToList[count] = toNo; + count++; + cnt = count; + } + + if( toNo < (SIDE_OFFSET/2) ) toNo2= toNo + (SIDE_OFFSET/2); + else if( toNo < (SIDE_OFFSET) ) toNo2= toNo - (SIDE_OFFSET/2); + else if( toNo < (SIDE_OFFSET*1.5) ) toNo2= toNo + (SIDE_OFFSET/2); + else if( toNo < (SIDE_OFFSET*2) ) toNo2= toNo - (SIDE_OFFSET/2); + + if(BATTLE_TargetCheck(battleindex,toNo2) != FALSE){ + ToList[count] = toNo2; + count++; + cnt = count; + } + }else{ + ToList[0] = toNo; + ToList[1] = -1; + cnt = 1; + } + + if( cnt > 1 ) qsort( ToList , cnt , sizeof( ToList[0] ) , ( FUNCSORTLOC )SortLoc ); + return toNo; + +#else + if( 0 <= toNo && toNo <= 19 ) + { + if( BATTLE_TargetCheck( battleindex, toNo ) == TRUE ) + { + ToList[0] = toNo; + ToList[1] = -1; + cnt = 1; + } + else + { + ToList[0] = -1; + ToList[1] = -1; + cnt = 0; + } + } + else if( toNo == TARGET_SIDE_0 ) + { + for( j = 0, i = 0; i < SIDE_OFFSET; i ++) + { + if( BATTLE_TargetCheck( battleindex, i ) == TRUE ) + { + ToList[j] = i; + j ++ ; + } + } + ToList[j] = -1; + cnt = j; + } + else if( toNo == TARGET_SIDE_1 ) + { + for( j = 0, i = SIDE_OFFSET; i < SIDE_OFFSET*2; i ++ ) + { + if( BATTLE_TargetCheck( battleindex, i ) == TRUE ) + { + ToList[j] = i; + j ++ ; + } + } + ToList[j] = -1; + cnt = j; + } + else if( toNo == TARGET_ALL ){ + for( j = 0, i = 0; i < SIDE_OFFSET*2; i ++, j ++ ){ + if( BATTLE_TargetCheck( battleindex, i ) == TRUE ){ + ToList[j] = i; + j ++ ; + } + } + ToList[i] = -1; + cnt = j; + } + else + { + ToList[0] = toNo; + ToList[1] = -1; + cnt = 1; + } + + return 1; +#endif +} + +void BATTLE_MultiListDead( int battleindex, int toNo, int ToList[] ) +{ + int j, i; + if( 0 <= toNo && toNo <= 19 ){ + if( BATTLE_TargetCheckDead( battleindex, toNo ) == TRUE ){ + ToList[0] = toNo; + ToList[1] = -1; + }else{ + ToList[0] = -1; + ToList[1] = -1; + } + }else + if( toNo == TARGET_SIDE_0 ){ + for( j = 0, i = 0; i < SIDE_OFFSET; i ++){ + if( BATTLE_TargetCheckDead( battleindex, i ) == TRUE ){ + ToList[j] = i; + j ++ ; + } + } + ToList[j] = -1; + }else + if( toNo == TARGET_SIDE_1 ){ + for( j = 0, i = SIDE_OFFSET; i < SIDE_OFFSET*2; i ++ ){ + if( BATTLE_TargetCheckDead( battleindex, i ) == TRUE ){ + ToList[j] = i; + j ++ ; + } + } + ToList[j] = -1; + }else{ + if( toNo == TARGET_ALL ){ +#ifdef _FIX_ARRAYBUG + for( j = 0, i = 0; i < SIDE_OFFSET*2; i ++){ +#else + for( j = 0, i = 0; i < SIDE_OFFSET*2; i ++, j ++ ){ +#endif + if( BATTLE_TargetCheckDead( battleindex, i ) == TRUE ){ + ToList[j] = i; + j ++ ; + } + } +#ifdef _FIX_ITEMRELIFE // WON ADD 修正替身娃娃问题 + ToList[j] = -1; +#else + ToList[i] = -1; +#endif + }else{ + ToList[0] = toNo; + ToList[1] = -1; + } + } +} + +BOOL BATTLE_IsThrowWepon( int itemindex){ + int itemtype; + if( ITEM_CHECKINDEX( itemindex ) == FALSE ){ + return FALSE; + } + itemtype = ITEM_getInt( itemindex, ITEM_TYPE ); + if( itemtype == ITEM_BOOMERANG + || itemtype == ITEM_BOW + || itemtype == ITEM_BREAKTHROW + || itemtype == ITEM_BOUNDTHROW ){ + return TRUE; + }else{ + return FALSE; + } +} + +int BATTLE_ClearGetExp( int charaindex ) +{ + int i, pindex; + + if( CHAR_CHECKINDEX( charaindex ) == FALSE ){ + return BATTLE_ERR_CHARAINDEX; + } + CHAR_setWorkInt( charaindex, CHAR_WORKGETEXP, 0 ); + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ){ + pindex = CHAR_getCharPet( charaindex, i ); + if( CHAR_CHECKINDEX( pindex ) == FALSE )continue; + CHAR_setWorkInt( pindex, CHAR_WORKGETEXP, 0 ); + } + + return 0; +} + +INLINE void _BATTLE_ExitAll( char *file, int line, int battleindex) +{ + int j,i, charaindex; + for( j = 0; j < 2; j ++ ){ + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + charaindex = BattleArray[battleindex].Side[j].Entry[i].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )continue; + BATTLE_Exit( charaindex, battleindex ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, + BATTLE_CHARMODE_NONE ); + } + } +} + +void BATTLE_AllCharaFinishSet( int battleindex ) +{ + int j,i, charaindex; + for( j = 0; j < 2; j ++ ){ + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + charaindex = BattleArray[battleindex].Side[j].Entry[i].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )continue; + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, + BATTLE_CHARMODE_FINAL ); + } + } +} + +BOOL BATTLE_IsCharge( int charaindex ) +{ + int com; + com = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ); + if( com == BATTLE_COM_S_CHARGE + || com == BATTLE_COM_S_EARTHROUND1 + || com == BATTLE_COM_S_EARTHROUND0 +#ifdef _PROFESSION_ADDSKILL + || CHAR_getWorkInt( charaindex, CHAR_DOOMTIME ) > 0 +#endif + ){ + return TRUE; + } + return FALSE; +} + +void BATTLE_AllCharaCWaitSet( int battleindex ) +{ + int j,i, charaindex; + for( j = 0; j < 2; j ++ ){ + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + charaindex = BattleArray[battleindex].Side[j].Entry[i].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )continue; + + if( BATTLE_IsCharge( charaindex ) == TRUE ){ + }else{ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, + BATTLE_COM_NONE ); + } + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, + BATTLE_CHARMODE_C_WAIT ); + } + } +} + +void BATTLE_AllCharaWatchWaitSet( int battleindex ) +{ + int i, charaindex; + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + charaindex = BattleArray[battleindex].Side[0].Entry[i].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )continue; + + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ) + != BATTLE_CHARMODE_WATCHINIT + ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, + BATTLE_CHARMODE_C_WAIT ); + } + } +} + +void BATTLE_SurpriseSet( + int battleindex, + int side +) +{ + BATTLE_ENTRY *pEntry; + int i, charaindex; + + pEntry = BattleArray[battleindex].Side[side].Entry; + + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + charaindex = pEntry[i].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )continue; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + } + } + + +} + +BOOL BATTLE_initBattleArray( + int battlenum +) +{ + + int i; + BATTLE_battlenum = battlenum; + + BattleArray = allocateMemory( sizeof( BATTLE ) * BATTLE_battlenum ); + if( BattleArray == NULL ) return FALSE; + for( i = 0 ; i < BATTLE_battlenum ; i ++ ){ + memset( &BattleArray[i], 0 , sizeof( BATTLE )); + } + return TRUE; + +} + +static void EntryInit( BATTLE_ENTRY *pEntry ){ + int i; + pEntry->charaindex = -1; + pEntry->bid = -1; + pEntry->escape = 0; + for( i = 0; i < GETITEM_MAX; i ++ ){ + pEntry->getitem[i] = -1; + } +} + +int BATTLE_CreateBattle( void ) +{ + int battleindex, i, j; + BATTLE *pBattle; + battleindex = BATTLE_SearchTask( ); + // NUKE 0701 + if( battleindex < 0 )return -1; + pBattle = &BattleArray[battleindex]; + // NUKE 0701 + if (pBattle==NULL) return -1; + pBattle->use = TRUE; + pBattle->mode = BATTLE_MODE_INIT; + pBattle->turn = 0; + pBattle->dpbattle = 0; + pBattle->norisk = 0; + pBattle->flg = 0; + pBattle->field_att = BATTLE_ATTR_NONE; + pBattle->att_count = 0; + for( j = 0; j < 2; j ++ ){ + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + EntryInit( &pBattle->Side[j].Entry[i] ); + } + } + for( i = 0; i < BATTLE_ENTRY_MAX*2; i ++ ){ + pBattle->iEntryBack[i] = -1; + pBattle->iEntryBack2[i] = -1; + } + pBattle->WinFunc = NULL; +#ifdef _DEATH_CONTEND//计算胜败func + pBattle->PkFunc = NULL; + pBattle->battlemap = -1; +#endif + pBattle->pNext = NULL; + pBattle->pBefore = NULL; + pBattle->battleindex = battleindex; + Total_BattleNum ++; +#ifdef _BATTLECOMMAND_TIME + pBattle->PartTime = 0; +#endif +#ifdef _PROFESSION_ADDSKILL + //冰爆术存放 +/* pBattle->ice_count = 0; + for( i = 0; i < 20; i ++ ){ + pBattle->ice_bout[i]=0; + pBattle->ice_use[i]=FALSE; + pBattle->ice_toNo[i]=0; + pBattle->ice_level[i]=0; + pBattle->ice_array[i]=0; + pBattle->ice_attackNo[i]=0; + pBattle->ice_charaindex[i]=-1; + }*/ +#endif + return battleindex; +} + +static int BATTLE_SearchTask( void ) +{ + int i, j; + i = BATTLE_searchCnt; + for( j = 0; j < BATTLE_battlenum; j ++ ){ + if( i >= BATTLE_battlenum ) i = 0; + if( BattleArray[i].use == FALSE ){ + BATTLE_searchCnt = i + 1; + return i; + } + i ++; + } + return -1; +} + +void BATTLE_DeleteItem( int battleindex ) +{ + int i, j, k; + BATTLE_ENTRY *pEntry; + + for( j = 0; j < 2; j ++ ){ + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + pEntry = &BattleArray[battleindex].Side[j].Entry[i]; + for( k = 0; k < GETITEM_MAX; k ++ ){ + if( pEntry->getitem[k] >= 0 ){ + print( "// 找寻(消去)道具(%d),(%s)\n", + pEntry->getitem[k], + ITEM_getAppropriateName(pEntry->getitem[k]) ); + ITEM_endExistItemsOne( pEntry->getitem[k] ); + } + } + } + } +} + + +int BATTLE_DeleteBattle( + int battleindex +) +{ + int i, j; + BATTLE *pBattle; + if( BATTLE_CHECKINDEX( battleindex ) == FALSE ){ + fprint( "err:battle index error\n" ); + return BATTLE_ERR_BATTLEINDEX; + } + if( BATTLE_WatchUnLink( battleindex ) == FALSE ){ + fprint( "err:battle link 不脱离\n" ); + } + + pBattle = &BattleArray[battleindex]; + pBattle->use = FALSE; + pBattle->mode = BATTLE_MODE_NONE; + BATTLE_DeleteItem( battleindex ); + for( j = 0; j < 2; j ++ ){ + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + EntryInit( &pBattle->Side[j].Entry[i] ); + } + } + Total_BattleNum--; + return 0; +} + + +int BATTLE_No2Index( + int battleindex, + int bid +) +{ + BATTLE_ENTRY *pEntry; + + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return -1; + if( BATTLE_CHECKNO( bid ) == FALSE )return -1; + + if( bid >= 10 ){ + pEntry = BattleArray[battleindex].Side[1].Entry; + bid -= SIDE_OFFSET; + }else{ + pEntry = BattleArray[battleindex].Side[0].Entry; + } + if( CHAR_CHECKINDEX( pEntry[bid].charaindex ) == FALSE )return -1; + + return pEntry[bid].charaindex; + +} +#ifdef _Item_ReLifeAct +int BATTLE_getBattleDieIndex( int battleindex, int bid ) +{ + BATTLE_ENTRY *pEntry; + + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return -1; + if( BATTLE_CHECKNO( bid ) == FALSE )return -1; + + if( bid >= 10 ){ + pEntry = BattleArray[battleindex].Side[1].Entry; + bid -= SIDE_OFFSET; + }else{ + pEntry = BattleArray[battleindex].Side[0].Entry; + } + if( CHAR_CHECKINDEX( pEntry[bid].charaindex ) == FALSE )return -1; + if( pEntry[bid].flg & BENT_FLG_ULTIMATE ) return -1; + + return pEntry[bid].charaindex; + +} +#endif + +#ifdef _PROFESSION_ADDSKILL +BOOL BATTLE_BattleUltimate( int battleindex, int bid ) //检查此位 上是否被打飞 +{ + BATTLE_ENTRY *pEntry; + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return FALSE; + if( BATTLE_CHECKNO( bid ) == FALSE )return FALSE; + if( bid >= 10 ){ + pEntry = BattleArray[battleindex].Side[1].Entry; + bid -= SIDE_OFFSET; + }else{ + pEntry = BattleArray[battleindex].Side[0].Entry; + } + if( pEntry[bid].flg & BENT_FLG_ULTIMATE ) return TRUE; + else return TRUE; +} +#endif + +int BATTLE_Index2No( + int battleindex, + int charaindex +) +{ + BATTLE_ENTRY *pEntry; + int i, j; + + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return -1; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return -1; + + for( j = 0; j < 2; j ++ ){ + pEntry = BattleArray[battleindex].Side[j].Entry; + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + if( pEntry[i].charaindex == charaindex ){ + return i + j * SIDE_OFFSET; + } + } + } + + return -1; + +} + + +char *BATTLE_CharTitle( int charaindex ) +{ + char *pName; + static char Len0Buff[2] = ""; + + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET ){ + pName = Len0Buff; + }else{ + pName = CHAR_getChar( charaindex, CHAR_OWNTITLE ); + if( pName[0] == 0 ){ + pName = Len0Buff; + } + } + return pName; +} + + +int BATTLE_CharaBackUp( int battleindex ) +{ + int i, j, k, charaindex; + BATTLE *pBattle; + + if( BATTLE_CHECKINDEX( battleindex ) == FALSE ){ + return BATTLE_ERR_BATTLEINDEX; + } + + pBattle = &BattleArray[battleindex]; + k = 0; + + for( j = 0; j < 2; j ++ ){ + k = j * SIDE_OFFSET; + for( i = 0; i < BATTLE_ENTRY_MAX/2; i ++ ){ + charaindex = pBattle->Side[j].Entry[i].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == TRUE + && CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER + ){ + pBattle->iEntryBack[k] = pBattle->Side[j].Entry[i].charaindex; + pBattle->iEntryBack2[k] = pBattle->Side[j].Entry[i].charaindex; + }else{ + pBattle->iEntryBack[k] = -1; + pBattle->iEntryBack2[k] = -1; + } + k ++; + } + } + + return 0; +} + + + + +int BATTLE_NewEntry( + int charaindex, + int battleindex, + int side +) +{ + BATTLE_ENTRY *pEntry; + BATTLE *pBattle; + int i, iEntryMax, iEntryFirst; + + if( BATTLE_CHECKSIDE( side ) == FALSE )return BATTLE_ERR_PARAM; + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return BATTLE_ERR_CHARAINDEX; + + pBattle = &BattleArray[battleindex]; + + if( pBattle->use == FALSE )return BATTLE_ERR_NOUSE; + + if( side < 0 || side > 1 ){ + return BATTLE_ERR_PARAM; + } + + switch( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) ){ + int work; + + case CHAR_TYPEPLAYER: + if( pBattle->Side[side].type != BATTLE_S_TYPE_PLAYER ){ + return BATTLE_ERR_TYPE; + } + iEntryFirst = 0; + iEntryMax = BATTLE_PLAYER_MAX; + break; + case CHAR_TYPEENEMY: + if( pBattle->Side[side].type != BATTLE_S_TYPE_ENEMY ){ + return BATTLE_ERR_TYPE; + } + iEntryFirst = 0; + iEntryMax = BATTLE_ENTRY_MAX; + break; + case CHAR_TYPEPET: + if( pBattle->Side[side].type != BATTLE_S_TYPE_PLAYER ){ + return BATTLE_ERR_TYPE; + } + + work = CHAR_getWorkInt( charaindex, CHAR_WORKPLAYERINDEX ); + pEntry = pBattle->Side[side].Entry; + + work = BATTLE_Index2No( battleindex, work ); + work -= side * SIDE_OFFSET; + work += 5; + iEntryFirst = work; + iEntryMax = work+1; + break; + default: + print( "不明(%s)(%d)\n", + CHAR_getUseName( charaindex ), + CHAR_getInt( charaindex, CHAR_WHICHTYPE ) ); + return BATTLE_ERR_TYPE; + } + + + pEntry = pBattle->Side[side].Entry; + + for( i = iEntryFirst; i < iEntryMax; i ++ ){ + if( pEntry[i].charaindex == -1 )break; + } + + if( i == iEntryMax ){ + return BATTLE_ERR_ENTRYMAX; + } + + EntryInit( &pEntry[i] ); + + pEntry[i].charaindex = charaindex; + + pEntry[i].bid = i + side * SIDE_OFFSET; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEINDEX, + battleindex ); + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, + BATTLE_CHARMODE_INIT ); + // shan 2001/12/27 Begin + { + int fd; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE)==CHAR_TYPEPLAYER ){ + fd = CHAR_getWorkInt( charaindex, CHAR_WORKFD); + CONNECT_SetBattleRecvTime( fd, &NowTime); + } + } + // End + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLESIDE, side ); + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEFLG, 0 ); + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, -1 ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, -1 ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM3, -1 ); + + CHAR_setWorkInt( charaindex, CHAR_WORKMODATTACK, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORKMODDEFENCE, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORKMODQUICK, 0 ); + + CHAR_setWorkInt( charaindex, CHAR_WORKDAMAGEABSROB, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORKDAMAGEREFLEC, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORKDAMAGEVANISH, 0 ); + + + CHAR_setWorkInt( charaindex, CHAR_WORKMODCAPTURE, 0 ); + + CHAR_setFlg( charaindex, CHAR_ISATTACKED, 1 ); + + BATTLE_BadStatusAllClr( charaindex ); + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEWATCH, 0 ); + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + CHAR_setWorkInt( charaindex, CHAR_WORKTRAP, 0 ); //陷阱 + BATTLE_ProfessionStatus_init( battleindex, charaindex ); +#endif + +#ifdef _PETSKILL_ACUPUNCTURE + CHAR_setWorkInt( charaindex, CHAR_WORKACUPUNCTURE, 0 );//针刺外皮 +#endif + +#ifdef _PETSKILL_RETRACE + CHAR_setWorkInt( charaindex, CHAR_WORKRETRACE, 0 );//追迹攻击 +#endif + +#ifdef _PETSKILL_BECOMEFOX //将媚惑术中招时间清除为-1 + CHAR_setWorkInt( charaindex, CHAR_WORKFOXROUND, -1 ); +#endif +#ifdef _PROFESSION_ADDSKILL + //结界清除 + CHAR_setWorkInt( charaindex, CHAR_WORKFIXEARTHAT_BOUNDARY, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORKFIXWATERAT_BOUNDARY, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORKFIXFIREAT_BOUNDARY, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORKFIXWINDAT_BOUNDARY, 0 ); + CHAR_setWorkInt( charaindex, CHAR_DOOMTIME, 0 );//世界末日集气 + CHAR_setWorkInt( charaindex, CHAR_WORK_com1, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORK_toNo, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORK_mode, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORK_skill_level, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORK_array, 0 ); +#endif + return 0; +} + +INLINE int _BATTLE_Exit( char *file, int line, int charaindex ,int battleindex) +{ + BATTLE_ENTRY *pEntry; + int i, j, k; + BATTLE *pBattle; + char szPet[32]; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return BATTLE_ERR_CHARAINDEX; + if( BATTLE_CHECKINDEX( battleindex ) == FALSE ){ + return BATTLE_ERR_BATTLEINDEX; + } +#ifdef _PROFESSION_ADDSKILL + CHAR_setWorkInt( charaindex, CHAR_DOOMTIME, 0 );//世界末日集气 +#endif +#ifdef _PETSKILL_BECOMEFOX // 离开战斗时将媚惑术造成的变身效果清除 + //print("\n检查图号:%s,%d", CHAR_getChar( charaindex, CHAR_NAME), CHAR_getInt( charaindex, CHAR_BASEIMAGENUMBER)); + + if( CHAR_getInt( charaindex, CHAR_BASEIMAGENUMBER)==101749 + || CHAR_getWorkInt( charaindex, CHAR_WORKFOXROUND ) != -1 ){ //变成小狐狸 + CHAR_setInt( charaindex, CHAR_BASEIMAGENUMBER, CHAR_getInt( charaindex, CHAR_BASEBASEIMAGENUMBER) ); + CHAR_setWorkInt( charaindex, CHAR_WORKFOXROUND, -1); + //print("\n变回去:%d",CHAR_getInt( charaindex, CHAR_BASEIMAGENUMBER)); + } +#endif + +#ifdef _PETSKILL_BECOMEPIG + if( CHAR_getInt( charaindex, CHAR_BECOMEPIG) > -1 + && CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + CHAR_setInt( charaindex, CHAR_BASEIMAGENUMBER, CHAR_getInt( charaindex, CHAR_BECOMEPIG_BBI ) ); + CHAR_complianceParameter( charaindex ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( charaindex , CHAR_WORKOBJINDEX )); + CHAR_send_P_StatusString( charaindex , CHAR_P_STRING_BASEBASEIMAGENUMBER); + } +#endif + + +#ifdef _MAGIC_NOCAST // 精灵:沉默 + // WON ADD + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ) + lssproto_NC_send( getfdFromCharaIndex( charaindex ), 0);//复原 +#endif + pBattle = &BattleArray[battleindex]; + if( pBattle->use == FALSE ) + return BATTLE_ERR_NOUSE; + + for( j = 0; j < 2; j ++ ){ + pEntry = pBattle->Side[j].Entry; + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + if( pEntry[i].charaindex != charaindex ) + continue; + pEntry[i].charaindex = -1; + pEntry[i].escape = 0; + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_FINAL ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEINDEX, -1 ); +#ifdef _LOSE_FINCH_ + CHAR_setWorkInt( charaindex, CHAR_WORKSPETRELIFE, 0); +#endif + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEENEMY ){ + CHAR_endCharOneArray( charaindex ); + }else if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + int petindex = pEntry[i+5].charaindex; + if( CHAR_getFlg( charaindex, CHAR_ISDIE ) == TRUE + || CHAR_getInt( charaindex, CHAR_HP ) == TRUE ) + { + +#ifdef _ACTION_BULLSCR +#ifndef _BULL_CUTBULLSCR + { + if( CHAR_getInt( charaindex, CHAR_ABULLSTART) == 10 ){ + char buf[256]; + sprintf( buf, "因战斗中倒地,活动积分不予计算。"); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + } + } +#endif +#endif + +#ifdef _FIX_SPEED_UPLEVEL // WON ADD 修正加速 + // Robin cancel + //if( CHAR_getFlg( charaindex, CHAR_ISDIE ) == TRUE ){ + //}else + { + // Robin cancel + //if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1) != BATTLE_COM_ESCAPE ) + { + unsigned int Dtimes; + unsigned int battletime; + int fd = getfdFromCharaIndex( charaindex ); + Dtimes = BattleArray[battleindex].CreateTime; + battletime = (unsigned int)(BattleArray[battleindex].flgTime/100); + + //if( CHAR_getWorkInt( charaindex, CHAR_WORKFLG) & WORKFLG_DEBUGMODE ){ + //}else + { + CheckDefBTime( charaindex, fd, Dtimes, battletime, 10);//lowTime延迟时间 + } + } + } +#endif + CHAR_setFlg( charaindex, CHAR_ISDIE, 0 ); + CHAR_setInt( charaindex, CHAR_HP, 1 ); + // CoolFish: Faily PK 2001/8/3 + CHAR_setWorkInt(charaindex, CHAR_WORKFMPKFLAG, -1); + + }else { +#ifdef _BATTLE_TIMESPEED + // Robin cancel + //if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1) != BATTLE_COM_ESCAPE ) + { + unsigned int Dtimes; + unsigned int battletime; + + int fd = getfdFromCharaIndex( charaindex ); + Dtimes = BattleArray[battleindex].CreateTime; + battletime = (unsigned int)(BattleArray[battleindex].flgTime/100); + //if( CHAR_getWorkInt( charaindex, CHAR_WORKFLG) & WORKFLG_DEBUGMODE ) { + //}else + { + CheckDefBTime( charaindex, fd, Dtimes, battletime, 0);//lowTime延迟时间 + } + } +#endif +#ifdef _ACTION_BULLSCR +#ifndef _BULL_CUTBULLSCR + + if( CHAR_getInt( charaindex, CHAR_ABULLSTART) == 10 && + BattleArray[battleindex].CreateTime > 0 ) { + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1) != BATTLE_COM_ESCAPE && + CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEWATCH ) != 1 ) { + char buf[256]; + unsigned int Dtimes; + int ntime, deftime=0,Scount=0; + int nowtime = (unsigned int)time(NULL);//CHAR_BULLSHOWCOUNT + Scount = CHAR_getWorkInt( charaindex, CHAR_BULLSHOWCOUNT); + if( Scount < 0 ) Scount = 0; + ntime = CHAR_getInt( charaindex, CHAR_ABULLTIME); + Dtimes = BattleArray[battleindex].CreateTime; + deftime = (nowtime - (int)Dtimes)-5; + if( ntime < 0 ) ntime = 0; + if( deftime > (60*60) ) deftime = (60*60); + if( deftime < 0 ) deftime = 0; + + if( CHAR_getWorkInt( charaindex, CHAR_WORKGETEXP) > + (BattleArray[battleindex].enemynum * 2) || + BattleArray[battleindex].type == BATTLE_TYPE_P_vs_P){ + ntime = (ntime + deftime); + Scount += deftime; + if( Scount >= (5*60) ){ + Scount = 0; + sprintf( buf, "战斗时间已累积%d分%d秒。", ntime/60, ntime%60); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + } + CHAR_setWorkInt( charaindex, CHAR_BULLSHOWCOUNT, Scount); + CHAR_setInt( charaindex, CHAR_ABULLTIME, ntime); + if( ntime >= (60*60) ){//活动一小时 + //if( ntime > 10 ){//测试加快 //CHAR_setWorkInt( charaindex, CHAR_WORKGETEXP, 0 ); + int nScore = CHAR_getInt( charaindex, CHAR_ABULLSCORE); + ntime = ntime - (60*60); + ntime = ( ntime<0)?0:ntime; + CHAR_setInt( charaindex, CHAR_ABULLTIME, ntime); + CHAR_setInt( charaindex, CHAR_ABULLSCORE, nScore+10 ); + sprintf( buf, "战斗满1小时时间取得10分,总共取得%d绩分。", nScore+10); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + } + }else{ + sprintf( buf, "因此场战斗取得经验值不足,活动积分不予计算。"); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + } + }else{ + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1) == BATTLE_COM_ESCAPE){ + char buf[256]; + sprintf( buf, "因战斗逃跑,活动积分不予计算。"); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + } + } + } + //BattleArray[battleindex].CreateTime = 0; +#endif +#endif + } + if( CHAR_CHECKINDEX( petindex ) == TRUE ){ + pEntry[i+5].charaindex = -1; + CHAR_setWorkInt( petindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_NONE ); + CHAR_setWorkInt( petindex, CHAR_WORKBATTLEINDEX, -1 ); + } + BATTLE_BadStatusAllClr( charaindex ); + CHAR_complianceParameter( charaindex ); + CHAR_Skillupsend( charaindex ); + // Robin 0730 + if( CHAR_getWorkInt( charaindex, CHAR_WORKPETFALL) ) + { + CHAR_setWorkInt( charaindex, CHAR_WORKPETFALL, 0 ); + CHAR_setInt( charaindex, CHAR_RIDEPET, -2 ); + } + CHAR_send_P_StatusString( charaindex , + CHAR_P_STRING_HP|CHAR_P_STRING_EXP| + CHAR_P_STRING_MP|CHAR_P_STRING_DUELPOINT| + CHAR_P_STRING_CHARM | + CHAR_P_STRING_EARTH | + CHAR_P_STRING_WATER | + CHAR_P_STRING_FIRE | + CHAR_P_STRING_WIND | + CHAR_P_STRING_RIDEPET + ); + // Robin 0730 + if( CHAR_getInt( charaindex, CHAR_RIDEPET ) == -2 ){ + CHAR_setInt( charaindex, CHAR_RIDEPET, -1 ); + } + for( k = 0; k < CHAR_MAXPETHAVE; k ++ ){ + petindex = CHAR_getCharPet( charaindex, k ); + if( CHAR_CHECKINDEX( petindex ) == FALSE )continue; + if( CHAR_getInt( petindex, CHAR_MAILMODE) != CHAR_PETMAIL_NONE ) continue; + if( CHAR_getFlg( petindex, CHAR_ISDIE ) == TRUE + || CHAR_getInt( petindex, CHAR_HP ) <= 0 ){ + CHAR_setFlg( petindex, CHAR_ISDIE, 0 ); + CHAR_setInt( petindex, CHAR_HP, 1 ); + } + CHAR_setWorkInt( petindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_NONE ); +#ifdef _LOSE_FINCH_ + CHAR_setWorkInt( charaindex, CHAR_WORKSPETRELIFE, 0); +#endif +#ifdef _VARY_WOLF + if( CHAR_getInt( petindex, CHAR_BASEBASEIMAGENUMBER) != CHAR_getInt( petindex, CHAR_BASEIMAGENUMBER) ) // Robin fix + { + CHAR_setInt( petindex, CHAR_BASEIMAGENUMBER, CHAR_getInt( petindex, CHAR_BASEBASEIMAGENUMBER)); + sprintf( szPet, "K%d", k); + CHAR_sendStatusString( charaindex , szPet); + } +#endif +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + // 遗忘 + if( CHAR_getWorkInt( petindex, CHAR_WORKOBLIVION ) > 0 ) // Robin fix + { + int pet_no = CHAR_getInt( charaindex, CHAR_DEFAULTPET ); + CHAR_setWorkInt( petindex, CHAR_WORKOBLIVION, 0 ); + // 宠物编号 + sprintf( szPet, "W%d", pet_no); + CHAR_sendStatusString( charaindex , szPet); + } +#endif + BATTLE_BadStatusAllClr( petindex ); + CHAR_complianceParameter( petindex ); + CHAR_send_K_StatusString( charaindex , k, + CHAR_K_STRING_HP|CHAR_K_STRING_EXP| + CHAR_K_STRING_AI| CHAR_K_STRING_MP | + CHAR_K_STRING_ATK | CHAR_K_STRING_DEF | + CHAR_K_STRING_QUICK | + CHAR_K_STRING_EARTH | + CHAR_K_STRING_WATER | + CHAR_K_STRING_FIRE | + CHAR_K_STRING_WIND + ); + } + if( BattleArray[battleindex].type == BATTLE_TYPE_P_vs_P ){ + int flg = 0; + CHAR_setFlg( charaindex, CHAR_ISDUEL, 0); + if( CHAR_getFlg( charaindex, CHAR_ISPARTY)) flg |= CHAR_FS_PARTY; + if( CHAR_getFlg( charaindex, CHAR_ISDUEL)) flg |= CHAR_FS_DUEL; + if( CHAR_getFlg( charaindex, CHAR_ISPARTYCHAT)) flg |= CHAR_FS_PARTYCHAT; + if( CHAR_getFlg( charaindex, CHAR_ISTRADECARD)) flg |= CHAR_FS_TRADECARD; +#ifdef _CHANNEL_MODIFY + if( CHAR_getFlg( charaindex, CHAR_ISTELL)) flg |= CHAR_FS_TELL; + if( CHAR_getFlg( charaindex, CHAR_ISFM)) flg |= CHAR_FS_FM; + if( CHAR_getFlg( charaindex, CHAR_ISOCC)) flg |= CHAR_FS_OCC; + if( CHAR_getFlg( charaindex, CHAR_ISCHAT)) flg |= CHAR_FS_CHAT; + if( CHAR_getFlg( charaindex, CHAR_ISSAVE)) flg |= CHAR_FS_SAVE; +#endif + lssproto_FS_send( getfdFromCharaIndex(charaindex), flg); + } + + lssproto_XYD_send( getfdFromCharaIndex(charaindex), + CHAR_getInt( charaindex, CHAR_X ), + CHAR_getInt( charaindex, CHAR_Y ), + CHAR_getInt( charaindex, CHAR_DIR ) ); + } + break; + } + } + CHAR_PartyUpdate( charaindex, CHAR_N_STRING_HP ); + +#ifdef _TIME_TICKET + { + int nowtime = time(NULL); + int tickettime = CHAR_getWorkInt( charaindex, CHAR_WORKTICKETTIME); + int totaltime; + char msg[1024]; + if( tickettime > 0 && tickettime < nowtime ) { + //int floor, x, y; + CHAR_talkToCli( charaindex, -1, "谢谢光顾。", CHAR_COLORYELLOW); + if( CHAR_getWorkInt( charaindex, CHAR_WORKTICKETTIMESTART) > 0 ) { + totaltime = nowtime - CHAR_getWorkInt( charaindex, CHAR_WORKTICKETTIMESTART); + sprintf( msg, "总入场时间%d分%d秒。", totaltime/60, totaltime%60); + CHAR_talkToCli( charaindex, -1, msg, CHAR_COLORYELLOW); + } + CHAR_setWorkInt( charaindex, CHAR_WORKTICKETTIME, 0); + CHAR_setWorkInt( charaindex, CHAR_WORKTICKETTIMESTART, 0); + /*if( CHAR_getElderPosition( CHAR_getInt( charaindex, CHAR_LASTTALKELDER), &floor, &x, &y ) != TRUE ) { + CHAR_warpToSpecificPoint( charaindex, 1006, 15, 15); + } + else { + CHAR_warpToSpecificPoint( charaindex, floor, x, y); + }*/ + CHAR_warpToSpecificPoint( charaindex, 7001, 41, 6); + } + } +#endif + + return BATTLE_ERR_NONE; +} + + +int BATTLE_PetDefaultExit( + int charaindex, + int battleindex +) +{ + int pno, pindex, iRet; + + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return BATTLE_ERR_CHARAINDEX; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER) return 0; + pno = CHAR_getInt( charaindex, CHAR_DEFAULTPET ); + if( pno < 0 )return 0; + pindex = CHAR_getCharPet( charaindex, pno ); + + iRet = BATTLE_Exit( pindex, battleindex ); + + if( iRet ){ + iRet *= -1; + }else{ + return 1; + } + + return iRet; +} + + +int BATTLE_PetDefaultEntry( + int charaindex, + int battleindex, + int side +) +{ + int pindex; + +#if 1 + int pno; + + int ret = 0; + + pno = CHAR_getInt( charaindex, CHAR_DEFAULTPET ); + if( pno == -1 ) return 0; + pindex = CHAR_getCharPet( charaindex, pno ); + + if( CHAR_CHECKINDEX( pindex ) && + + !CHAR_getFlg( pindex, CHAR_ISDIE ) && + CHAR_getInt( pindex, CHAR_HP ) > 0 ) + { + if( BATTLE_NewEntry( pindex, battleindex, side ) ){ + }else{ + ret = 0; + } + } + else { + CHAR_setInt( charaindex, CHAR_DEFAULTPET, -1 ); + } + + return ret; +#else + + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ){ + pindex = CHAR_getCharPet( charaindex, i ); + + if( CHAR_CHECKINDEX( pindex ) == FALSE )continue; + + if( CHAR_getFlg( pindex, CHAR_ISDIE ) == TRUE )continue; + if( CHAR_getInt( pindex, CHAR_HP ) <= 0 )continue; + + if( BATTLE_NewEntry( pindex, battleindex, side ) ){ + }else{ + CHAR_setInt( charaindex, CHAR_DEFAULTPET, i ); + break; + } + } + + if( i == CHAR_MAXPETHAVE ){ + CHAR_setInt( charaindex, CHAR_DEFAULTPET, -1 ); + } + return 0; +#endif +} + +int BATTLE_RescueEntry( int charaindex, int toindex ) +{ + int iRet = 0, battleindex, fd, pindex; + char szBuffer[256]=""; + +#ifdef _BATTLE_TIMESPEED + fd = getfdFromCharaIndex( charaindex); + if( CONNECT_getBDTime( fd) > time( NULL) ) { + return 1; + } +#endif + + battleindex = CHAR_getWorkInt( toindex, CHAR_WORKBATTLEINDEX ); + if( !BATTLE_CHECKINDEX( battleindex) ) return 1; + if( ( fd = getfdFromCharaIndex(charaindex) ) < 0 ) return 1; + + if( CHAR_getWorkInt( toindex, CHAR_WORKBATTLEMODE ) == BATTLE_CHARMODE_FINAL + || CHAR_getWorkInt( toindex, CHAR_WORKBATTLEINDEX ) == -1 ){ + iRet = 1; + } + + if( BattleArray[battleindex].type == BATTLE_TYPE_P_vs_P ){ + iRet = 1; + }else{ + iRet = BATTLE_NewEntry( + charaindex, + battleindex, + CHAR_getWorkInt( toindex, CHAR_WORKBATTLESIDE ) ); + } + + if( iRet == 0 ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_RESCUE ); + iRet = BATTLE_PetDefaultEntry( + charaindex, + battleindex, + CHAR_getWorkInt( toindex, CHAR_WORKBATTLESIDE ) + ); + } + + + + if( iRet == 0 ){ + int flg; + if( CHAR_getInt( charaindex, CHAR_DEFAULTPET ) >= 0 ){ + pindex = CHAR_getCharPet( charaindex, CHAR_getInt( charaindex, CHAR_DEFAULTPET ) ); + CHAR_setWorkInt( pindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_RESCUE ); + } + //snprintf( szBuffer, sizeof( szBuffer ), "(%s)加入作战。", + // CHAR_getUseName( charaindex ) ); + //BATTLE_BroadCast( battleindex, szBuffer, CHAR_COLORYELLOW ); + if( ( fd = getfdFromCharaIndex(charaindex) ) != -1 ){ + lssproto_EN_send( fd, BattleArray[battleindex].type, BattleArray[battleindex].field_no ); + } + flg = (BattleArray[battleindex].Side[ + CHAR_getWorkInt( toindex, CHAR_WORKBATTLESIDE)].flg + & BSIDE_FLG_HELP_OK)? TRUE:FALSE; + lssproto_HL_send( fd, flg); + sprintf( szBuffer, "BP|%X|%X|%X", + BATTLE_Index2No( battleindex, charaindex ), BP_FLG_JOIN, CHAR_getInt(charaindex, CHAR_MP ) ); + BATTLE_CommandSend( charaindex, szBuffer ); + }else{ + snprintf( szBuffer, sizeof( szBuffer ), "无法参战。" ); + CHAR_talkToCli( charaindex, -1, szBuffer, CHAR_COLORYELLOW); + if( ( fd = getfdFromCharaIndex(charaindex) ) != -1 ){ + lssproto_EN_send( fd, FALSE, BattleArray[battleindex].field_no ); + } + } + BATTLE_ClearGetExp( charaindex ); + return iRet; +} + +BOOL BATTLE_RescueTry( int charaindex) +{ + int x,y; + OBJECT object; + int pfound = FALSE; + int result = FALSE; + int fd; + int i; + int cnt; + + fd = getfdFromCharaIndex( charaindex); + if( fd == -1 ) return FALSE; +#if 1 // 修正利用参战重复加入战斗 Robin + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE) { + CHAR_talkToCli( charaindex, -1, " 重复加入战斗! ", CHAR_COLORRED); + print("\n 改封包!!重复加入战斗!:%s ", CHAR_getChar( charaindex, CHAR_CDKEY) ); + //lssproto_EN_send( fd, FALSE, 0 ); + return FALSE; + } +#endif + if( CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE ) { + lssproto_EN_send( fd, FALSE, 0 ); + return FALSE; + } +#ifdef _BATTLE_TIMESPEED + if( CONNECT_getBDTime( fd) > time( NULL) ) { + return FALSE; + } +#endif + for( i = 0; i < CONNECT_WINDOWBUFSIZE; i ++ ) { + CONNECT_setBattlecharaindex(fd,i,-1); + } + CHAR_getCoordinationDir( CHAR_getInt( charaindex, CHAR_DIR ) , + CHAR_getInt( charaindex , CHAR_X ), + CHAR_getInt( charaindex , CHAR_Y ) , + 1 , &x , &y ); + + cnt = 0; + for( object = MAP_getTopObj( CHAR_getInt( charaindex, CHAR_FLOOR),x,y) ; + object ; + object = NEXT_OBJECT(object ) ) + { + int toindex; + int objindex = GET_OBJINDEX(object); + if( OBJECT_getType( objindex) != OBJTYPE_CHARA) continue; + toindex = OBJECT_getIndex( objindex); + if( CHAR_getInt( toindex, CHAR_WHICHTYPE) != CHAR_TYPEPLAYER ) continue; + pfound = TRUE; + if( CHAR_getWorkInt( toindex, CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE ){ + continue; + } + if( BattleArray[ CHAR_getWorkInt( toindex, CHAR_WORKBATTLEINDEX)].type + != BATTLE_TYPE_P_vs_E ){ + continue; + } + if( !(BattleArray[CHAR_getWorkInt( toindex,CHAR_WORKBATTLEINDEX)].Side[ + CHAR_getWorkInt( toindex, CHAR_WORKBATTLESIDE)].flg + & BSIDE_FLG_HELP_OK)){ + continue; + } + CONNECT_setBattlecharaindex( fd, cnt, toindex ); + cnt++; + if( cnt == CONNECT_WINDOWBUFSIZE ) break; + } + if( cnt == 0 ) { + if( pfound == FALSE ) { + CHAR_talkToCli( charaindex, -1, "那里没有任何人。", + CHAR_COLORYELLOW); + } + lssproto_EN_send( fd, FALSE, 0 ); + }else if( cnt == 1 ) { + if( BATTLE_RescueEntry( charaindex, + CONNECT_getBattlecharaindex(fd,0) ) ){ + CHAR_talkToCli( charaindex, -1, "无法参战。", CHAR_COLORYELLOW); + }else { + result = TRUE; + } + }else if( cnt > 1 ) { + int strlength; + char msgbuf[1024]; + char escapebuf[2048]; + strcpy( msgbuf, "1\n加入谁的战斗呢?\n"); + strlength = strlen( msgbuf); + for( i = 0; + CONNECT_getBattlecharaindex( fd,i ) != -1 + && i< CONNECT_WINDOWBUFSIZE; i ++ ){ + char *a = CHAR_getChar( CONNECT_getBattlecharaindex(fd,i), CHAR_NAME); + char buf[256]; + snprintf( buf, sizeof( buf),"%s\n", a); + if( strlength + strlen( buf) > arraysizeof( msgbuf)){ + print( "\nerr:%s:%d 视窗的讯息缓冲不足\n", + __FILE__,__LINE__); + break; + } + strcpy( &msgbuf[strlength], buf); + strlength += strlen(buf); + } + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_SELECT, + WINDOW_BUTTONTYPE_CANCEL, + CHAR_WINDOWTYPE_SELECTBATTLE, + -1, + makeEscapeString( msgbuf, escapebuf, sizeof(escapebuf))); + + } + + return result; +} + + + + +BOOL BATTLE_RescueParentTry( int charaindex, int pindex) +{ + int result = FALSE; + if( CHAR_getFlg( charaindex, CHAR_ISDIE)) return FALSE; + if( CHAR_getWorkInt( charaindex, CHAR_WORKPARTYINDEX1) != pindex ) return FALSE; + if( CHAR_getWorkInt( pindex, CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE ){ + return FALSE; + } + if( BATTLE_RescueEntry( charaindex, pindex ) ){ + result = FALSE; + }else{ + result = TRUE; + } + if( result == FALSE ) { + CHAR_talkToCli( charaindex, -1, "无法参战。", CHAR_COLORYELLOW); + } + return result; +} + +int BATTLE_PartyNewEntry( + int charaindex, + int battleindex, + int side +) +{ + int iRet = 0, i, work; +#if 1 + + iRet = BATTLE_NewEntry( charaindex, battleindex, side ); + if( iRet )return iRet; + CAflush( charaindex ); + CDflush( charaindex ); + iRet = BATTLE_PetDefaultEntry( charaindex, battleindex, side ); + if( iRet )return iRet; + BATTLE_ClearGetExp( charaindex ); +#endif + + for( i = 1; i < CHAR_PARTYMAX; i ++ ){ + work = CHAR_getWorkInt( charaindex, i + CHAR_WORKPARTYINDEX1 ); + if( CHAR_CHECKINDEX( work ) == FALSE )continue; + if( CHAR_getWorkInt( work, CHAR_WORKBATTLEMODE ) != 0 ){ + continue; + } + iRet = BATTLE_NewEntry( work, battleindex, side ); + if( iRet )break; + CAflush( work ); + CDflush( work ); + iRet = BATTLE_PetDefaultEntry( work, battleindex, side ); + if( iRet )return iRet; + BATTLE_ClearGetExp( work ); + } + return iRet; +} + + + + + + + + + + + + + + +#if 1 + +int BATTLE_WatchNewEntry( + int charaindex, + int battleindex, + int side +) +{ + BATTLE_ENTRY *pEntry; + BATTLE *pBattle; + int iEntryFirst = 0, iEntryMax = BATTLE_ENTRY_MAX, i; + + if( BATTLE_CHECKSIDE( side ) == FALSE )return BATTLE_ERR_PARAM; + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return BATTLE_ERR_CHARAINDEX; + + pBattle = &BattleArray[battleindex]; + + if( pBattle->use == FALSE )return BATTLE_ERR_NOUSE; + + if( side < 0 || side > 1 ){ + return BATTLE_ERR_PARAM; + } + + switch( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) ){ + + + case CHAR_TYPEPLAYER: + if( pBattle->Side[side].type != BATTLE_S_TYPE_PLAYER ){ + return BATTLE_ERR_TYPE; + } + iEntryFirst = 0; + iEntryMax = BATTLE_PLAYER_MAX; + break; + default: + print( "不明(%s)(%d)\n", + CHAR_getUseName( charaindex ), + CHAR_getInt( charaindex, CHAR_WHICHTYPE ) ); + return BATTLE_ERR_TYPE; + } + + + pEntry = pBattle->Side[side].Entry; + + for( i = iEntryFirst; i < iEntryMax; i ++ ){ + if( pEntry[i].charaindex == -1 )break; + } + + if( i == iEntryMax ){ + return BATTLE_ERR_ENTRYMAX; + } + + EntryInit( &pEntry[i] ); + + pEntry[i].charaindex = charaindex; + + pEntry[i].bid = i + side * SIDE_OFFSET; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEINDEX, + battleindex ); + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, + BATTLE_CHARMODE_WATCHINIT ); + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLESIDE, side ); + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEFLG, 0 ); + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, -1 ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, -1 ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM3, -1 ); + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEWATCH, 1 ); + + return 0; +} + + +int BATTLE_WatchPartyNewEntry( + int charaindex, + int battleindex, + int side +) +{ + int iRet = 0, i, work; +#if 1 + + iRet = BATTLE_WatchNewEntry( charaindex, battleindex, side ); + if( iRet )return iRet; + + CAflush( charaindex ); + + CDflush( charaindex ); + +#endif + + for( i = 1; i < CHAR_PARTYMAX; i ++ ){ + + work = CHAR_getWorkInt( charaindex, i + CHAR_WORKPARTYINDEX1 ); + if( CHAR_CHECKINDEX( work ) == FALSE )continue; + + if( CHAR_getWorkInt( work, CHAR_WORKBATTLEMODE ) != 0 ){ + continue; + } + + iRet = BATTLE_WatchNewEntry( work, battleindex, side ); + + if( iRet )break; + + CAflush( work ); + CDflush( work ); + } + return iRet; + +} + + + + +int BATTLE_CreateForWatcher( int charaindex, int topbattleindex ); + +int BATTLE_WatchEntry( + int charaindex, + int toindex + ) +{ + int iRet = 0, battleindex, fd; + char szBuffer[256]=""; + + battleindex = CHAR_getWorkInt( toindex, CHAR_WORKBATTLEINDEX ); + + if( CHAR_getWorkInt( toindex, CHAR_WORKBATTLEMODE ) == BATTLE_CHARMODE_FINAL + || CHAR_getWorkInt( toindex, CHAR_WORKBATTLEMODE ) == BATTLE_CHARMODE_NONE + || CHAR_getWorkInt( toindex, CHAR_WORKBATTLEINDEX ) == -1 + ){ + iRet = 1; + } + + if( iRet == 0 ){ + iRet = BATTLE_CreateForWatcher( charaindex, battleindex ); + } + if( iRet == 0 ){ + //snprintf( szBuffer, sizeof( szBuffer ), "(%s)开始观战。", + // CHAR_getUseName( charaindex ) ); + + //BATTLE_BroadCast( battleindex, szBuffer, CHAR_COLORYELLOW ); + if( ( fd = getfdFromCharaIndex(charaindex) ) != -1 ){ + lssproto_EN_send( fd, BattleArray[battleindex].type, BattleArray[battleindex].field_no ); + } + + sprintf( szBuffer, "BP|%X|%X|%X", + 20, BP_FLG_JOIN, CHAR_getInt(charaindex, CHAR_MP ) ); + BATTLE_CommandSend( charaindex, szBuffer ); + + }else{ + snprintf( szBuffer, sizeof( szBuffer ), "无法观战。" ); + CHAR_talkToCli( charaindex, -1, szBuffer, CHAR_COLORYELLOW); + + if( ( fd = getfdFromCharaIndex(charaindex) ) != -1 ){ + lssproto_EN_send( fd, FALSE, 0 ); + } + } + + return iRet; +} + + + +BOOL BATTLE_WatchTry( int charaindex ) +{ + int x,y; + OBJECT object; + int pfound = FALSE; + int result = FALSE; + int fd; + int i; + int cnt; + + + fd = getfdFromCharaIndex( charaindex); + if( fd == -1 )return FALSE; + + for( i = 0; i < CONNECT_WINDOWBUFSIZE ; i ++ ) { + CONNECT_setBattlecharaindex( fd,i,-1); + } + /* 及蟆及甄 毛 月 */ + CHAR_getCoordinationDir( CHAR_getInt( charaindex, CHAR_DIR ) , + CHAR_getInt( charaindex , CHAR_X ), + CHAR_getInt( charaindex , CHAR_Y ) , + 1 , &x , &y ); + + cnt = 0; + /*愤坌及 及蟆及平乓仿毛潸 允月 */ + for( object = MAP_getTopObj( CHAR_getInt( charaindex, CHAR_FLOOR),x,y) ; + object ; + object = NEXT_OBJECT(object ) ) + { + int toindex; + int objindex = GET_OBJINDEX(object); + /* 平乓仿弁正□元扎卅中 */ + if( OBJECT_getType( objindex) != OBJTYPE_CHARA) continue; + toindex = OBJECT_getIndex( objindex); + /* 皿伊奶乩□元扎卅中 */ + if( CHAR_getInt( toindex, CHAR_WHICHTYPE) != CHAR_TYPEPLAYER ) continue; + pfound = TRUE; + /* 爵 匹卅中卅日戚尺 */ + if( CHAR_getWorkInt( toindex, CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE ){ + continue; + } + + CONNECT_setBattlecharaindex( fd,cnt, toindex ); + cnt++; + if( cnt == CONNECT_WINDOWBUFSIZE ) break; + } + if( cnt == 0 ) { + if( pfound == FALSE ) { + CHAR_talkToCli( charaindex, -1, "那里没有任何人。", + CHAR_COLORYELLOW); + } + // 分木手中卅仁化棋爵撩 + lssproto_EN_send( fd, FALSE, 0 ); + } + /* ㄠ谛仄井中卅中桦宁反巨件玄伉□今六月 */ + else if( cnt == 1 ) { + if( BATTLE_WatchEntry( charaindex,CONNECT_getBattlecharaindex(fd,0)) ) + { + result = FALSE; + } else { + result = TRUE; + } + } + /* 醒谛中凶日它奴件玉它毛请仄化 中宁歹六月 */ + else if( cnt > 1 ) { + int strlength; + char msgbuf[1024]; + char escapebuf[2048]; + strcpy( msgbuf, "1\n观看谁的战斗呢?\n"); + strlength = strlen( msgbuf); + /* 它奴件玉它及丢永本□斥综岳[ + * 爵 及平乓仿及域 + */ + for( i = 0; + CONNECT_getBattlecharaindex( fd,i ) != -1 + && i< CONNECT_WINDOWBUFSIZE; + i ++ ) + { + char *a = CHAR_getChar( CONNECT_getBattlecharaindex(fd,i), + CHAR_NAME); + char buf[256]; + snprintf( buf, sizeof( buf),"%s\n", a); + if( strlength + strlen( buf) > arraysizeof( msgbuf)){ + print( "\nerr:%s:%d 视窗的讯息缓冲不足\n", + __FILE__,__LINE__); + break; + } + strcpy( &msgbuf[strlength], buf); + strlength += strlen(buf); + } + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_SELECT, + WINDOW_BUTTONTYPE_CANCEL, + CHAR_WINDOWTYPE_SELECTBATTLEWATCH, + -1, + makeEscapeString( msgbuf, escapebuf, sizeof(escapebuf))); + } + + return result; +} + + +#endif + + + + + + + +#define MAX_DOUJYOUENEMY 64 +static int DoujyouEnemyTbl[10]; // ㄠㄟ手中日氏仃升 +/*************************************************************** + * 桦乒□玉迕卞衬平乓仿潸 + ***************************************************************/ +int *Doujyou_GetEnemy( int meindex, int charaindex ) +{ + int i; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[1024]; + int ret; + int insert; + int WorkEnemyTbl[MAX_DOUJYOUENEMY]; + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + + /* 赓渝祭 */ + for( i = 0; i < arraysizeof(WorkEnemyTbl); i ++ ) { + WorkEnemyTbl[i] = -1; + } + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "enemyno", buf, sizeof( buf)) + == NULL ) + { + return NULL; + } + + insert = 0; + /* 娄醒卞踏中化丐月衬毛巨件玄伉□今六月 */ + for( i = 0; i < MAX_DOUJYOUENEMY; i ++ ) { + int curEnemy; + char data[128]; + + ret = getStringFromIndexWithDelim( buf,",", i + 1,data, sizeof(data)); + if( ret == FALSE) { + break; + } + + curEnemy = ENEMY_getEnemyArrayFromId( atoi( data)); + if( !ENEMY_CHECKINDEX( curEnemy) ) continue; + WorkEnemyTbl[insert] = curEnemy; + insert ++; + } + // 分木手中卅井匀凶日巨仿□ + if( insert <= 0 )return NULL; + + // ㄠ 仿件母丞涩烂 + DoujyouEnemyTbl[0] = WorkEnemyTbl[RAND( 0, insert-1 )]; + + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "enemypetno", buf, sizeof( buf)) + == NULL ) + { + // 中卅井匀凶日窒手踏井卅中 + DoujyouEnemyTbl[1] = -1; + }else{ + insert = 0; + /* 娄醒卞踏中化丐月衬毛巨件玄伉□今六月 */ + for( i = 0; i < MAX_DOUJYOUENEMY; i ++ ) { + int curEnemy; + char data[128]; + + ret = getStringFromIndexWithDelim( buf,",", i + 1,data, sizeof(data)); + if( ret == FALSE) { + break; + } + + curEnemy = ENEMY_getEnemyArrayFromId( atoi( data)); + if( !ENEMY_CHECKINDEX( curEnemy) ) continue; + WorkEnemyTbl[insert] = curEnemy; + insert ++; + } + // ㄡ 仿件母丞涩烂 + DoujyouEnemyTbl[1] = WorkEnemyTbl[RAND( 0, insert-1 )]; + } + + // ㄢ 仄 + DoujyouEnemyTbl[2] = -1; + + return DoujyouEnemyTbl; +} + + + +static int DoujyouWeponTbl[] = { + -1, + ITEM_FIST, + ITEM_AXE, + ITEM_CLUB, + ITEM_SPEAR, + ITEM_BOW, + ITEM_BOOMERANG, + ITEM_BOUNDTHROW, + ITEM_BREAKTHROW, +}; +int DoujyouRandomWeponSet( int charaindex ){ + int wepon = -1, itemindex; + int work = RAND( 0, arraysizeof( DoujyouWeponTbl ) - 1 ); + switch( DoujyouWeponTbl[work] ){ + case ITEM_AXE: wepon = 0;break; + case ITEM_CLUB: wepon = 100;break; + case ITEM_SPEAR: wepon = 200;break; + case ITEM_BOW: wepon = 2498;break; + case ITEM_BOOMERANG:wepon = 500;break; + case ITEM_BOUNDTHROW:wepon = 600;break; + case ITEM_BREAKTHROW:wepon = 700;break; + } + itemindex = CHAR_getItemIndex( charaindex, CHAR_ARM ); + if( ITEM_CHECKINDEX( itemindex ) == TRUE ){ + ITEM_endExistItemsOne( itemindex ); + } + + if( wepon >= 0 ){ + itemindex = ITEM_makeItemAndRegist( wepon ) ; + CHAR_setItemIndex( charaindex, CHAR_ARM, itemindex ); + ITEM_setWorkInt( itemindex, ITEM_WORKCHARAINDEX, charaindex ); + ITEM_setWorkInt( itemindex, ITEM_WORKOBJINDEX, -1 ); + } + switch( DoujyouWeponTbl[work] ){ + case -1: + case ITEM_AXE: + case ITEM_CLUB: + case ITEM_SPEAR: + return 0; + } + return 1; + +} + +static int BattleERSkill1[]={ +3, 10, 11, 12, 30, 31, 40, 41, 50, 51, 52, 60, 61, 80, 90, 110, 120, 150, 210, +303, 309, 315, 321, 503, 504, 506, 507, 541, 542, 543, 544, 545, 546, 547, 575, 579, 580, +606, 613, 615 }; + +static int BattleERSkill2[]={ +12, 13, 20, 41, 52, 152, 210, 306, 312, 318, 324, 325, 500, 501, 502, 505, +508, 541, 542, 543, 544, 545, 546, 547, 576, 580, 594, 606, 613, 616 }; + +void BATTLE_EnemyRandowSetSkill( int enemyindex, int skillType) +{ + int i; + switch( skillType){ + case 1: + for( i=0; i<7; i++){ + int skillarray, skillID, Ri; + Ri = RAND( 0, arraysizeof( BattleERSkill1) - 1 ); + skillID = BattleERSkill1[Ri]; + skillarray = PETSKILL_getPetskillArray( skillID); + if( PETSKILL_CHECKINDEX( skillarray) == FALSE ){ + CHAR_setPetSkill( enemyindex, i, 1); + //andy_log + print("ANDY EnemyRandowSetSkill( ) skillID:%d array:%d err \n", + skillID, skillarray ); + continue; + } + CHAR_setPetSkill( enemyindex, i, skillID); + } + break; + case 2: + for( i=0; i<7; i++){ + int skillarray, skillID, Ri; + Ri = RAND( 0, arraysizeof( BattleERSkill2) - 1 ); + skillID = BattleERSkill2[Ri]; + skillarray = PETSKILL_getPetskillArray( skillID); + if( PETSKILL_CHECKINDEX( skillarray) == FALSE ){ + CHAR_setPetSkill( enemyindex, i, 1); + //andy_log + print("ANDY *EnemyRandowSetSkill( ) skillID:%d array:%d err \n", + skillID, skillarray ); + continue; + } + CHAR_setPetSkill( enemyindex, i, skillID); + } + break; + default : return; + break; + } + +} + +int BATTLE_CreateVsEnemy( int charaindex, int mode, int npcindex ) +{ + int battleindex, iRet = 0, enemyindex, i, pindex; + int *enemytable = NULL, fd, field_no, baselevel = 0; + int skillType=0; + int EnemyList[20]; + + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return BATTLE_ERR_CHARAINDEX; + +#ifdef _STREET_VENDOR + // 摆摊中不可进入战斗 + if( CHAR_getWorkInt(charaindex,CHAR_WORKSTREETVENDOR) > -1) return BATTLE_ERR_END; +#endif + +#ifdef _ANGEL_SUMMON // 装备使者信物不遇敌 + if( CHAR_getWorkInt(charaindex,CHAR_WORKANGELMODE) == TRUE ) return BATTLE_ERR_END; +#endif + + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ) != BATTLE_CHARMODE_NONE ){ + CHAR_talkToCli( charaindex, -1, "二重遭遇。", CHAR_COLORYELLOW ); + return BATTLE_ERR_ALREADYBATTLE; + } + battleindex = BATTLE_CreateBattle( ); + if( battleindex < 0 )return BATTLE_ERR_NOTASK; + + if( CHAR_CHECKINDEX( npcindex) ){ + skillType = CHAR_getWorkInt( npcindex, CHAR_NPCWORKINT11); + } + + field_no = BATTLE_getBattleFieldNo( + CHAR_getInt( charaindex, CHAR_FLOOR ) , + CHAR_getInt( charaindex, CHAR_X ) , + CHAR_getInt( charaindex, CHAR_Y ) ); + if( field_no > BATTLE_MAP_MAX || field_no < 0 ){ + field_no = RAND( 0, BATTLE_MAP_MAX ); + } + + BattleArray[battleindex].Side[0].type = BATTLE_S_TYPE_PLAYER; + BattleArray[battleindex].Side[1].type = BATTLE_S_TYPE_ENEMY; + BattleArray[battleindex].leaderindex = charaindex; + BattleArray[battleindex].type = BATTLE_TYPE_P_vs_E; + BattleArray[battleindex].createindex = npcindex; + BattleArray[battleindex].field_no = field_no; + //andy_edit 2002/10/23 + /* + if( (iRet = BATTLE_PartyNewEntry( charaindex, battleindex, 0 ) ) ){ + goto BATTLE_CreateVsEnemy_End; + } + */ + BattleArray[battleindex].Side[0].flg &= ~BSIDE_FLG_HELP_OK; + if( mode == 0 ) { + enemytable = ENEMY_getEnemy( charaindex, + CHAR_getInt( charaindex, CHAR_X), + CHAR_getInt( charaindex, CHAR_Y)); + }else if( mode == 1 ) { + enemytable = NPC_Util_getEnemy( npcindex, charaindex); + }else if( mode == 2 ) { + enemytable = Doujyou_GetEnemy( npcindex, charaindex ); + baselevel = CHAR_getInt( npcindex, CHAR_LV ); + BattleArray[battleindex].norisk = 1; + } + if( enemytable == NULL ) { + iRet = BATTLE_ERR_NOENEMY; + goto BATTLE_CreateVsEnemy_End; + } + + for( i = 0; *(enemytable+i)!= -1 && i < arraysizeof( EnemyList )-1; i ++ ){ + EnemyList[i] = *(enemytable+i); + } + EnemyList[i] = -1; + +#ifdef _BATTLE_TIMESPEED + fd = getfdFromCharaIndex( charaindex ); + BattleArray[battleindex].CreateTime = time(NULL); + BattleArray[battleindex].flgTime = 200; // 1/100 sec +#endif + +#ifdef _ACTION_BULLSCR +#ifndef _BULL_CUTBULLSCR + BattleArray[battleindex].enemynum=0; +#endif +#endif + for( i = 0; EnemyList[i] != -1; i ++ ){ + int work; + enemyindex = ENEMY_createEnemy( EnemyList[i], baselevel ); +#ifdef _ACTION_BULLSCR +#ifndef _BULL_CUTBULLSCR + BattleArray[battleindex].enemynum++; +#endif +#endif + if( skillType > 0 ){ + //int ENEMY_RandomChange( int enemyindex, int tempno ){ + BATTLE_EnemyRandowSetSkill( enemyindex, skillType); + } + if( enemyindex < 0 ){ + iRet = BATTLE_ERR_NOENEMY; + goto BATTLE_CreateVsEnemy_End; + } + + if( mode == 2 ){ + if( i == 0 ){ + CHAR_setInt( enemyindex, CHAR_BASEBASEIMAGENUMBER, + CHAR_getInt( npcindex, CHAR_BASEBASEIMAGENUMBER ) ); + CHAR_setInt( enemyindex, CHAR_BASEIMAGENUMBER, + CHAR_getInt( npcindex, CHAR_BASEBASEIMAGENUMBER ) ); + CHAR_setChar( enemyindex, CHAR_NAME, + CHAR_getChar( npcindex, CHAR_NAME ) ); + CHAR_complianceParameter( enemyindex ); + } + } + if( ( iRet = BATTLE_NewEntry( enemyindex, battleindex, 1 ) ) ){ + goto BATTLE_CreateVsEnemy_End; + } + if( CHAR_getInt( enemyindex, CHAR_DUELPOINT ) > 0 ){ + BattleArray[battleindex].dpbattle = 1; + } + work = CHAR_getInt( enemyindex, CHAR_BASEBASEIMAGENUMBER ); + if( 100466 <= work && work <= 100471 ){ + CHAR_setWorkInt( enemyindex, CHAR_WORKBATTLEFLG, + CHAR_getWorkInt( enemyindex, CHAR_WORKBATTLEFLG ) | CHAR_BATTLEFLG_ABIO ); + print( "(%s)无生物\n", CHAR_getUseName( enemyindex ) ); + } + } + //andy_edit 2002/10/23 + if( (iRet = BATTLE_PartyNewEntry( charaindex, battleindex, 0 ) ) ){ + goto BATTLE_CreateVsEnemy_End; + } + { + BATTLE_ENTRY *pEntry, EntryWork; + pEntry = BattleArray[battleindex].Side[1].Entry; + for( i = 0; i < 5; i ++ ){ + EntryWork = pEntry[i]; + pEntry[i] = pEntry[i+5]; + pEntry[i+5] = EntryWork; + pEntry[i].bid = i + SIDE_OFFSET; + pEntry[i+5].bid = i + 5 + SIDE_OFFSET; + } + } + +BATTLE_CreateVsEnemy_End:; + fd = getfdFromCharaIndex( charaindex); + + if( iRet ){ + BATTLE_ExitAll( battleindex ); + BATTLE_DeleteBattle( battleindex ); + if( fd != -1 )lssproto_EN_send( fd, FALSE, field_no ); + }else{ + if( fd != -1 ){ + if( BattleArray[battleindex].dpbattle ){ + lssproto_EN_send( fd, BATTLE_TYPE_DP_BATTLE, field_no ); + }else{ + if( mode == 1 ){ + lssproto_EN_send( fd, BATTLE_TYPE_BOSS_BATTLE, field_no ); + }else{ + lssproto_EN_send( fd, BattleArray[battleindex].type, field_no ); + } + } + }else { + BATTLE_ExitAll( battleindex ); + BATTLE_DeleteBattle( battleindex ); + return iRet; + } + + for( i = 1; i < CHAR_PARTYMAX; i ++ ){ + pindex = CHAR_getWorkInt( charaindex, i + CHAR_WORKPARTYINDEX1 ); + if( CHAR_CHECKINDEX( pindex ) == FALSE )continue; + if( CHAR_getWorkInt( pindex, CHAR_WORKBATTLEMODE ) == + BATTLE_CHARMODE_FINAL ) continue; + fd = getfdFromCharaIndex(pindex); + if( fd != -1 ){ + if( mode == 1 ){ + lssproto_EN_send( fd, BATTLE_TYPE_BOSS_BATTLE, field_no ); + }else{ + lssproto_EN_send( fd, BattleArray[battleindex].type, field_no ); + } + } + } + if( CHAR_getWorkInt( charaindex, CHAR_WORKACTION) != -1 ) { + CHAR_sendWatchEvent( + CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX), + CHAR_ACTSTAND, + NULL, 0, FALSE); + CHAR_setWorkInt( charaindex, CHAR_WORKACTION, -1); + } + CHAR_sendBattleEffect( charaindex, ON); + for( i = 1; i < CHAR_PARTYMAX; i ++ ){ + pindex = CHAR_getWorkInt( charaindex, i + CHAR_WORKPARTYINDEX1 ); + if( CHAR_CHECKINDEX( pindex ) == FALSE )continue; + if( CHAR_getWorkInt( pindex, CHAR_WORKACTION) != -1 ) { + CHAR_sendWatchEvent( + CHAR_getWorkInt( pindex, CHAR_WORKOBJINDEX), + CHAR_ACTSTAND, + NULL, 0, FALSE); + CHAR_setWorkInt( pindex, CHAR_WORKACTION, -1); + } + CHAR_sendBattleEffect( pindex, ON); + } + } + return iRet; +} + +int BATTLE_CreateVsPlayer( int charaindex0, int charaindex1 ) +{ + int battleindex, pindex, field_no, + i, j, charaindex[2], + parent[2], fd, + iRet = 0; + + if( CHAR_CHECKINDEX( charaindex0 ) == FALSE )return BATTLE_ERR_CHARAINDEX; + if( CHAR_CHECKINDEX( charaindex1 ) == FALSE )return BATTLE_ERR_CHARAINDEX; + + if( CHAR_getWorkInt( charaindex0, CHAR_WORKBATTLEMODE ) != BATTLE_CHARMODE_NONE ){ + CHAR_talkToCli( charaindex0, -1, "二重遭遇。", CHAR_COLORYELLOW ); + CHAR_talkToCli( charaindex1, -1, "二重遭遇。", CHAR_COLORYELLOW ); + return BATTLE_ERR_ALREADYBATTLE; + } + if( CHAR_getWorkInt( charaindex1, CHAR_WORKBATTLEMODE ) != BATTLE_CHARMODE_NONE ){ + CHAR_talkToCli( charaindex0, -1, "二重遭遇。", CHAR_COLORYELLOW ); + CHAR_talkToCli( charaindex1, -1, "二重遭遇。", CHAR_COLORYELLOW ); + return BATTLE_ERR_ALREADYBATTLE; + } +#ifdef _DEATH_CONTEND + if( CHAR_getInt( charaindex0, CHAR_FLOOR) == 8250 || + CHAR_getInt( charaindex0, CHAR_PKLISTLEADER) != 1 || + CHAR_getInt( charaindex0, CHAR_PKLISTTEAMNUM) == -1 || +// CHAR_getWorkInt( charaindex0, CHAR_WORKPARTYMODE ) != CHAR_PARTY_LEADER || + CHAR_getInt( charaindex1, CHAR_PKLISTLEADER) != 1 || + CHAR_getInt( charaindex1, CHAR_PKLISTTEAMNUM) == -1 //|| +// CHAR_getWorkInt( charaindex1, CHAR_WORKPARTYMODE ) != CHAR_PARTY_LEADER + + ){ + + + CHAR_talkToCli( charaindex0, -1, "无效战斗。", CHAR_COLORYELLOW ); + CHAR_talkToCli( charaindex1, -1, "无效战斗。", CHAR_COLORYELLOW ); + return BATTLE_ERR_ALREADYBATTLE; + } +/* + + if( PKLIST_CheckPKReapetTeam( + CHAR_getInt( charaindex0, CHAR_PKLISTTEAMNUM), + CHAR_getInt( charaindex1, CHAR_PKLISTTEAMNUM) ) == FALSE ){ + CHAR_talkToCli( charaindex0, -1, "重复战斗。", CHAR_COLORYELLOW ); + CHAR_talkToCli( charaindex1, -1, "重复战斗。", CHAR_COLORYELLOW ); + return BATTLE_ERR_ALREADYBATTLE; + } +*/ +#endif + + field_no = BATTLE_getBattleFieldNo( + CHAR_getInt( charaindex0, CHAR_FLOOR ) , + CHAR_getInt( charaindex0, CHAR_X ), + CHAR_getInt( charaindex0, CHAR_Y ) ); + + charaindex[0] = charaindex0; + charaindex[1] = charaindex1; + for( j = 0; j < 2; j ++ ){ + if( CHAR_getWorkInt( charaindex[j], CHAR_WORKBATTLEMODE ) != 0 ){ + return BATTLE_ERR_ALREADYBATTLE; + } + } + for( j = 0; j < 2; j ++ ){ + if( CHAR_getWorkInt( charaindex[j], CHAR_WORKPARTYMODE ) == CHAR_PARTY_LEADER ){ + parent[j] = charaindex[j]; + }else + if( CHAR_getWorkInt( charaindex[j], CHAR_WORKPARTYMODE ) == CHAR_PARTY_CLIENT ){ + parent[j] = CHAR_getWorkInt( charaindex[j], CHAR_WORKPARTYINDEX1 ); + }else{ + parent[j] = -1; + } + } + if( parent[0] != -1 && parent[0] == parent[1] ){ + return BATTLE_ERR_SAMEPARTY; + } + battleindex = BATTLE_CreateBattle( ); + if( battleindex < 0 )return BATTLE_ERR_NOTASK; + + BattleArray[battleindex].Side[0].type = BATTLE_S_TYPE_PLAYER; + BattleArray[battleindex].Side[1].type = BATTLE_S_TYPE_PLAYER; + BattleArray[battleindex].leaderindex = charaindex0; + BattleArray[battleindex].type = BATTLE_TYPE_P_vs_P; + BattleArray[battleindex].dpbattle = 1; + BattleArray[battleindex].field_no = field_no; +#ifdef _BATTLE_TIMESPEED + BattleArray[battleindex].CreateTime = time(NULL); +#endif + +#ifdef _DEATH_CONTEND//计算胜败func + BattleArray[battleindex].PkFunc = NPC_PKLIST_Finish_Exit; + //winside = 0 + BattleArray[battleindex].menum = CHAR_getInt( charaindex0, CHAR_PKLISTTEAMNUM); + BattleArray[battleindex].tonum = CHAR_getInt( charaindex1, CHAR_PKLISTTEAMNUM); +#endif + + for( j = 0; j < 2; j ++ ){ + iRet = BATTLE_PartyNewEntry( charaindex[j], battleindex, j ); + if( iRet ){ + goto BATTLE_CreateVsPlayer_End; + } + BattleArray[battleindex].Side[j].flg &= ~BSIDE_FLG_HELP_OK; + } +BATTLE_CreateVsPlayer_End:; + if( iRet ){ + BATTLE_ExitAll( battleindex ); + BATTLE_DeleteBattle( battleindex ); + fd = getfdFromCharaIndex(charaindex[0]); + if( fd != -1 )lssproto_EN_send( fd, FALSE, field_no ); + }else{ + for( j = 0; j < 2; j ++ ){ + fd = getfdFromCharaIndex(charaindex[j]); + if( fd != -1 )lssproto_EN_send( fd, BattleArray[battleindex].type, field_no ); + if( CHAR_getWorkInt( charaindex[j], CHAR_WORKACTION) != -1 ) { + CHAR_sendWatchEvent( + CHAR_getWorkInt( charaindex[j], CHAR_WORKOBJINDEX), + CHAR_ACTSTAND, + NULL, 0, FALSE); + CHAR_setWorkInt( charaindex[j], CHAR_WORKACTION, -1); + + } + CHAR_sendBattleEffect( charaindex[j], ON); + for( i = 1; i < CHAR_PARTYMAX; i ++ ){ + pindex = CHAR_getWorkInt( charaindex[j], i + CHAR_WORKPARTYINDEX1 ); + if( CHAR_CHECKINDEX( pindex ) == FALSE )continue; + if( CHAR_getWorkInt( pindex, CHAR_WORKBATTLEMODE ) == + BATTLE_CHARMODE_FINAL ) continue; + + fd = getfdFromCharaIndex(pindex); + if( fd != -1 )lssproto_EN_send( fd, BattleArray[battleindex].type, field_no ); + if( CHAR_getWorkInt( pindex, CHAR_WORKACTION) != -1 ) { + CHAR_sendWatchEvent( + CHAR_getWorkInt( pindex, CHAR_WORKOBJINDEX), + CHAR_ACTSTAND, + NULL, 0, FALSE); + CHAR_setWorkInt( pindex, CHAR_WORKACTION, -1); + + } + CHAR_sendBattleEffect( pindex, ON ); + } + } + } + return iRet; +} + + +//********************************************************* +// +// 棋爵迕田玄伙正旦弁毛馨笛[玄永皿及戚卞涩烂允月 +// +int BATTLE_WatchLink( int topbattleindex, int battleindex ) +// +// +//********************************************************* +{ + BATTLE *pWork, *pTop; + + if( BATTLE_CHECKINDEX( battleindex ) == FALSE ){ + fprint( "err:battle index 奇怪(%d)\n", battleindex ); + return FALSE; + } + if( BATTLE_CHECKINDEX( topbattleindex ) == FALSE ){ + fprint( "err:battle index 奇怪(%d)\n", topbattleindex ); + return FALSE; + } + + pTop = &BattleArray[topbattleindex]; + + if( BATTLE_CHECKADDRESS( pTop ) == FALSE ){ + fprint( "err:battle address 奇怪(%p)\n", pTop ); + return FALSE; + } + + + pWork = pTop->pNext; // 田永弁失永皿 + + if( pWork ){ + if( BATTLE_CHECKADDRESS( pWork ) == FALSE ){ + fprint( "err:battle address 奇怪(%p)\n", pWork ); + return FALSE; + } + } + + // 愤坌毛蟆及戚卞允月 + pTop->pNext = &BattleArray[battleindex]; + // 愤坌及蟆田玄伙毛涩烂 + BattleArray[battleindex].pBefore = pTop; + // 愤坌及戚田玄伙毛涩烂 + BattleArray[battleindex].pNext = pWork; + // 戚及蟆反愤坌 + if( pWork ){ + pWork->pBefore = &BattleArray[battleindex]; + } + return TRUE; +} + +//********************************************************* +// +// 棋爵迕田玄伙正旦弁毛夫午勾 仁 +// +int BATTLE_WatchUnLink( int battleindex ) +// +// +//********************************************************* +{ + BATTLE *pTop; + + if( BATTLE_CHECKINDEX( battleindex ) == FALSE ){ + fprint( "err:battle index 奇怪(%d)\n", battleindex ); + return FALSE; + } + + // 愤坌毛蟆及田玄伙 + pTop = BattleArray[battleindex].pBefore; + + if( pTop ){ + if( BATTLE_CHECKADDRESS( pTop ) == FALSE ){ + fprint( "err:battle address 奇怪(%p)\n", pTop ); + }else{ + // 勾卅亢卅云仄 + pTop->pNext = BattleArray[battleindex].pNext; + } + } + if( BattleArray[battleindex].pNext ){ + if( BATTLE_CHECKADDRESS( BattleArray[battleindex].pNext ) == FALSE ){ + fprint( "err:battle address 奇怪(%p)\n", BattleArray[battleindex].pNext ); + }else{ + BattleArray[battleindex].pNext->pBefore = pTop; + } + } + // 愤坌及蟆田玄伙毛涩烂 + BattleArray[battleindex].pBefore = NULL; + // 愤坌及戚田玄伙反 仄 + BattleArray[battleindex].pNext = NULL; + + return TRUE; + +} + + +//********************************************************* +// +// 棋爵迕卞田玄伙正旦弁毛综岳允月 +// +int BATTLE_CreateForWatcher( int charaindex, int topbattleindex ) +// +// 曰袄 BATTLE_ERR +// +//********************************************************* +{ + int battleindex, field_no , pindex, + i, fd, + iRet = 0; + + // 由仿丢□正民尼永弁 + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return BATTLE_ERR_CHARAINDEX; + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ) != BATTLE_CHARMODE_NONE ){ + CHAR_talkToCli( charaindex, -1, "二重遭遇。", CHAR_COLORYELLOW ); + return BATTLE_ERR_ALREADYBATTLE; + } + + // 允匹卞爵 匹卅中井 + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ) != 0 ){ + return BATTLE_ERR_ALREADYBATTLE; + } + + // 爵 正旦弁毛综岳允月 + battleindex = BATTLE_CreateBattle( ); + if( battleindex < 0 )return BATTLE_ERR_NOTASK;// 正旦弁 苇匹五卅井匀凶巨仿□ + + // 仇切日及讽采反皿伊奶乩□讽采匹丐月午烂聒允月[ + BattleArray[battleindex].Side[0].type = BATTLE_S_TYPE_PLAYER; + // 轾仇丹础及讽采手皿伊奶乩□讽采匹丐月午烂聒允月[ + BattleArray[battleindex].Side[1].type = BATTLE_S_TYPE_PLAYER; + // 伉□母□毛忡绣 + BattleArray[battleindex].leaderindex = charaindex; + // 爵 及正奶皿 + BattleArray[battleindex].type = BATTLE_TYPE_WATCH; + BattleArray[battleindex].mode = BATTLE_MODE_WATCHBC; + // 田玄伙白奴□伙玉 寞 + field_no = BattleArray[battleindex].field_no = BattleArray[topbattleindex].field_no; + BattleArray[battleindex].turn = BattleArray[topbattleindex].turn; + + // 伉件弁今六月 + if( BATTLE_WatchLink( topbattleindex, battleindex ) == FALSE ){ + fprint( "err:battle link error(%d),(%d)\n", + topbattleindex, battleindex ); + // 巨仿□质 匹及 GOTO + goto BATTLE_CreateForWatcher_End; + } + + // 由□ 奴仍午巨件玄伉□ + iRet = BATTLE_WatchPartyNewEntry( charaindex, battleindex, 0 ); + if( iRet ){ + // 巨仿□质 匹及 GOTO + goto BATTLE_CreateForWatcher_End; + } + + +// 巨仿□及桦宁反允什卞戊戊卞 月 +BATTLE_CreateForWatcher_End:; + + if( iRet ){ // 巨仿□互丐匀凶日正旦弁 滋 + // 蝈够 仃月 + BATTLE_ExitAll( battleindex ); + //{爵 正旦弁绰轮 + BATTLE_DeleteBattle( battleindex ); + fd = getfdFromCharaIndex( charaindex ); + if( fd != -1 )lssproto_EN_send( fd, FALSE, field_no ); + }else{ + fd = getfdFromCharaIndex( charaindex ); + /* 巨件市它件玄岳 毛项尹月 */ + if( fd != -1 )lssproto_EN_send( fd, BattleArray[battleindex].type, field_no ); + /* 切禾□术霜月 */ + if( CHAR_getWorkInt( charaindex, CHAR_WORKACTION) != -1 ) { + CHAR_sendWatchEvent( + CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX), + CHAR_ACTSTAND, + NULL, 0, FALSE); + CHAR_setWorkInt( charaindex, CHAR_WORKACTION, -1); + } + /* 爵 失奶戊件 憎CA霜耨 */ + CHAR_sendBattleWatch( CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX ), ON); + + // 醮棉卞手项尹月 + for( i = 1; i < CHAR_PARTYMAX; i ++ ){ + pindex = CHAR_getWorkInt( charaindex, i + CHAR_WORKPARTYINDEX1 ); + if( CHAR_CHECKINDEX( pindex ) == FALSE )continue; + // 切扎氏午巨件市它件玄匹五化卅中卅日霜日卅中 + // FINAL 分匀凶日蟆及爵 苇化中月 + if( CHAR_getWorkInt( pindex, CHAR_WORKBATTLEMODE ) == + BATTLE_CHARMODE_FINAL ) continue; + + fd = getfdFromCharaIndex(pindex); + /* 巨件市它件玄岳 */ + if( fd != -1 )lssproto_EN_send( fd, BattleArray[battleindex].type, field_no ); + /* 切禾□术霜月 */ + if( CHAR_getWorkInt( pindex, CHAR_WORKACTION) != -1 ) { + CHAR_sendWatchEvent( + CHAR_getWorkInt( pindex, CHAR_WORKOBJINDEX), + CHAR_ACTSTAND, + NULL, 0, FALSE); + CHAR_setWorkInt( pindex, CHAR_WORKACTION, -1); + } + /* 爵 失奶戊件 憎CA霜耨 */ + CHAR_sendBattleWatch( CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX ), ON); + } +/* + print( "以(%s)为领队与敌军交手。", + CHAR_getChar( charaindex, CHAR_NAME ) ); +*/ + } + + + return iRet; +} + + + + + + +/*------------------------------------------------------------ + * 爵 毛 蝇允月 + ------------------------------------------------------------*/ +void BATTLE_WatchStop( int charaindex ) +{ + int battleindex; + + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return; + // 平乓仿弁正互中凶日 仃今六月 + BATTLE_Exit( charaindex, battleindex ); + // 由□ 奴 仃月 + CHAR_DischargePartyNoMsg( charaindex ); + + CHAR_talkToCli( charaindex, -1, + "战斗中止。", CHAR_COLORYELLOW ); + + lssproto_B_send( getfdFromCharaIndex( charaindex ), "BU" ); + +} + + + + + + + + + +//************************************************************* +// +// 正□件备潘热诸匹 蛹仄凶由仿丢□正毛俅孺仄化中仁 +// +void BATTLE_TurnParam( + int charaindex, + int fixkind, + int mod, + int last +) +// +// +//************************************************************* +{ + int modparam, fixparam, lastparam; + + if( fixkind == -1 ){ + fixparam = 0; // 葭互 中桦宁反ㄟ + }else{ + fixparam = CHAR_getWorkInt( charaindex, fixkind ); + } + if( last == -1 ){ + lastparam = 0; + }else{ + lastparam = CHAR_getWorkInt( charaindex, last ); + } + modparam = CHAR_getWorkInt( charaindex, mod ); + // 仇仇匹 ≈ 午 及 毛苇化} + // 及袄毛俅孺仄化中仁 + + // 漆反 MODPARAM 毛ㄡㄟ⊙蛹仄化中仁 + modparam *= 0.8; + CHAR_setWorkInt( charaindex, mod, modparam ); + + // 卞笛尹月 + if( last != -1 ){ + CHAR_setWorkInt( + charaindex, + last, + lastparam + modparam * 0.01 ); + } + +} + +void BATTLE_AttReverse( int charaindex ) +{ + int earth, water, fire, wind; + //ttom start because the second had this + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEFLG ) & CHAR_BATTLEFLG_REVERSE ){ + // 鳖仄化月卅日戚尺 + }else{ + // 鳖仄化卅中及匹伉正□件 + return; + } + //ttom end + earth = CHAR_getWorkInt( charaindex, CHAR_WORKFIXEARTHAT ); + water = CHAR_getWorkInt( charaindex, CHAR_WORKFIXWATERAT ); + fire = CHAR_getWorkInt( charaindex, CHAR_WORKFIXFIREAT ); + wind = CHAR_getWorkInt( charaindex, CHAR_WORKFIXWINDAT ); + + CHAR_setWorkInt( charaindex, CHAR_WORKFIXEARTHAT, fire ); + CHAR_setWorkInt( charaindex, CHAR_WORKFIXWATERAT, wind ); + CHAR_setWorkInt( charaindex, CHAR_WORKFIXFIREAT, earth ); + CHAR_setWorkInt( charaindex, CHAR_WORKFIXWINDAT, water ); + +} + +void BATTLE_PreCommandSeq( int battleindex ) +{ + BATTLE_ENTRY *pEntry; + BATTLE *pBattle; + int i, j, charaindex; + BATTLE_CharSendAll( battleindex ); + BATTLE_CharaBackUp( battleindex ); + BattleArray[battleindex].timer = NowTime.tv_sec; + BATTLE_AllCharaCWaitSet( battleindex ); + BATTLE_ActSettingSend( battleindex ); + BattleArray[battleindex].flg |= BATTLE_FLG_FREEDP; + pBattle = &BattleArray[battleindex]; + for( j = 0; j < 2; j ++ ){ + int flg; + pEntry = pBattle->Side[j].Entry; + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + pEntry[i].guardian = -1; + charaindex = pEntry[i].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )continue; + flg = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEFLG ); +//ttom the second only one //flg &= ~CHAR_BATTLEFLG_GUARDIAN; + flg &= ~CHAR_BATTLEFLG_GUARDIAN; + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEFLG, flg ); + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_EARTHROUND0 ) continue; + + CHAR_complianceParameter( charaindex ); + BATTLE_TurnParam( charaindex, + CHAR_WORKFIXSTR, // 猾 + CHAR_WORKMODATTACK, + CHAR_WORKATTACKPOWER + ); + BATTLE_TurnParam( charaindex, + CHAR_WORKFIXTOUGH, // 潮 + CHAR_WORKMODDEFENCE, + CHAR_WORKDEFENCEPOWER + ); + BATTLE_TurnParam( charaindex, + CHAR_WORKFIXDEX, // 豳镀今 + CHAR_WORKMODQUICK, + CHAR_WORKQUICK + ); + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + BATTLE_TurnParam( charaindex, + -1, + CHAR_WORKMODCHARM, // + CHAR_WORKFIXCHARM + ); + } + BATTLE_TurnParam( charaindex, + -1, // 凯 + CHAR_WORKMODCHARM, + -1 + ); + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEFLG ) & CHAR_BATTLEFLG_REVERSE ){ + BATTLE_AttReverse( charaindex ); + } + } + } +} + + +//************************************************** +// +// 棋爵及桦宁及戊穴件玉谨切尺 月凛及域 及 木 +// +void BATTLE_PreWatchWaitSeq( int battleindex ) +// +// +//************************************************** +{ + // 仇及凛鳔匹凛对忡绣 + BattleArray[battleindex].timer = NowTime.tv_sec; + // 蝈够及乒□玉毛戊穴件玉 蟆卞允月 + BATTLE_AllCharaWatchWaitSet( battleindex ); +} +static int BATTLE_Init( int battleindex ) +{ + BATTLE *pBattle; + int iRet = 0; + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX; + pBattle = &BattleArray[battleindex]; + pBattle->mode = BATTLE_MODE_BATTLE; + iRet = BATTLE_SurpriseCheck( battleindex ); + if( iRet == 0 ){ + }else + if( iRet == 1 ){ + BattleArray[battleindex].Side[1].flg |= BSIDE_FLG_SURPRISE; + }else + if( iRet == 2 ){ + BattleArray[battleindex].Side[0].flg |= BSIDE_FLG_SURPRISE; + } + BATTLE_PreCommandSeq( battleindex ); + return 0; +} +int BATTLE_CountEntry( + int battleindex, + int side +) +{ + int i; + BATTLE_ENTRY *pEntry; + int cnt = 0; + + // 由仿丢□正民尼永弁 + if( BATTLE_CHECKSIDE( side ) == FALSE )return -BATTLE_ERR_PARAM; + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return -BATTLE_ERR_BATTLEINDEX; + + // 巨件玄伉□ + pEntry = BattleArray[battleindex].Side[side].Entry; + + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + if( pEntry[i].charaindex != -1 ){ // 平乓仿互中凶日醒尹月 + cnt ++; + } + } + return cnt; +} + +static BOOL BATTLE_CommandWait( int battleindex, int side) +{ + int i, charaindex, BeOk=0; + BATTLE_ENTRY *pEntry; + BOOL iRet = TRUE; + BOOL TimeOut = FALSE; + if( BATTLE_CHECKSIDE( side ) == FALSE )return TRUE;//检查值是否在合法 围 + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return TRUE; + if( BattleArray[battleindex].Side[side].type == BATTLE_S_TYPE_ENEMY ) return TRUE; + pEntry = BattleArray[battleindex].Side[side].Entry; + +#ifdef _BATTLECOMMAND_TIME + if( BattleArray[battleindex].PartTime > 1 && + BattleArray[battleindex].PartTime < time(NULL) ){ + TimeOut = TRUE; + } +#endif + + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + charaindex = pEntry[i].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )continue; + if( CHAR_getFlg( charaindex, CHAR_ISDIE ) == TRUE ){ + continue; + } + switch ( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ) ){ + case BATTLE_CHARMODE_C_OK: + BeOk++; + case BATTLE_CHARMODE_INIT: + case BATTLE_CHARMODE_RESCUE: + case BATTLE_CHARMODE_WATCHINIT: + break; + case BATTLE_CHARMODE_C_WAIT: + { +#ifdef _BATTLECOMMAND_TIME + if( TimeOut == TRUE ){ + //andy_log + print("ANDY TimeOut Exit:%d-[%s|%s]\n", + charaindex, CHAR_getUseName( charaindex), + CHAR_getChar( charaindex, CHAR_CDKEY) ); + + CHAR_talkToCli( charaindex, -1, "超过时间未下指令,强迫离开战斗!", CHAR_COLORYELLOW); + + CHAR_DischargeParty( charaindex, 0);//解散团队 + CHAR_setWorkInt(charaindex, CHAR_WORKFMPKFLAG, -1); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_COMPELESCAPE ); + BATTLE_Exit( charaindex, battleindex ); + lssproto_B_send( getfdFromCharaIndex( charaindex ), "BU" ); +// CONNECT_setCloseRequest( getfdFromCharaIndex( charaindex) , 1 ); + break; + } +#endif + iRet = FALSE; + } + break; + default : + BATTLE_Exit( charaindex, battleindex ); + break; + } + } + + if( BeOk > 0 ){ +#ifdef _BATTLECOMMAND_TIME + if( BattleArray[ battleindex].PartTime <= 0 ){ + //如果战役中有任一人执行指令, 则延迟时间设为120秒 + BattleArray[battleindex].PartTime = (int)time(NULL) + 120; + } +#endif + } + return iRet; +} + + +#ifdef _ITEM_ADDEXP //vincent 经验提升 +#ifdef _ITEM_ADDEQUIPEXP +int BATTLE_GetExp( int charaindex, int midx ) +#else +int BATTLE_GetExp( int charaindex ) +#endif +{ + int addexp,i; + int modexp=0, getexp=0; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return 0; + + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE) == CHAR_TYPEPET) { + int ownerindex = CHAR_getWorkInt( charaindex, CHAR_WORKPLAYERINDEX); + if( CHAR_CHECKINDEX( ownerindex) && CHAR_getWorkInt( ownerindex, CHAR_WORKITEM_ADDEXP) > 0){ + modexp = CHAR_getWorkInt( ownerindex, CHAR_WORKITEM_ADDEXP); + } + }else if(CHAR_getWorkInt(charaindex,CHAR_WORKITEM_ADDEXP) > 0){ + modexp = CHAR_getWorkInt(charaindex,CHAR_WORKITEM_ADDEXP); + } + + getexp = CHAR_getWorkInt( charaindex, CHAR_WORKGETEXP ); +#ifdef _NEWOPEN_MAXEXP + if( getexp > 1000000000 ) getexp = 1000000000; +#endif + if( getexp < 0 ) getexp = 0; + addexp = getexp+((getexp*modexp)/100); +#ifdef _GET_BATTLE_EXP + addexp*=getBattleexp(); +#endif +#ifdef _ITEM_ADDEQUIPEXP + if( CHAR_CHECKINDEX( midx ) ){ + for( i = 0 ; i < CHAR_EQUIPPLACENUM ; i ++ ){ + int id = CHAR_getItemIndex(midx,i);//道具id + if( ITEM_CHECKINDEX(id) ){ + char *arg,*P; + arg = ITEM_getChar(id, ITEM_ARGUMENT );//道具参数 + if( (P = strstr( arg, "EXPUP" )) ){ + if( (P = strstr( arg, "人" )) ){//只对人有效 + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER ) + addexp += getexp*atoi(P+=2)*0.01; + } + else if( (P = strstr( arg, "宠" )) ){//只对宠有效 + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE) == CHAR_TYPEPET + && (CHAR_getInt( midx, CHAR_RIDEPET) != charaindex ) ) + addexp += getexp*atoi(P+=2)*0.01; + } + else if( (P = strstr( arg, "骑" )) ){//只对骑宠有效 + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE) == CHAR_TYPEPET + && (CHAR_getInt( midx, CHAR_RIDEPET) == charaindex ) ) + addexp += getexp*atoi(P+=2)*0.01; + } + else{ + P = strstr( arg, "EXPUP" ); + addexp += getexp*atoi(P+=5)*0.01; + } + } + } + } + } +#endif +#ifdef _ITEM_ADDPETEXP + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE) == CHAR_TYPEPET ) + if( CHAR_getInt( charaindex, CHAR_PETID) == 1163 ) + addexp = 0; + +#endif + addexp = (addexp<0)?0:addexp; + if( CHAR_getInt( charaindex, CHAR_LV) >= CHAR_MAXUPLEVEL ) addexp = 0; + CHAR_setWorkInt( charaindex, CHAR_WORKGETEXP, addexp );//回存CHAR_WORKGETEXP + + CHAR_AddMaxExp( charaindex, addexp); + + return addexp; +} +#else + +#ifdef _ITEM_ADDEQUIPEXP +int BATTLE_GetExp( int charaindex, int midx ) +#else +int BATTLE_GetExp( int charaindex ) +#endif +{ + int addexp, nowexp; + + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return 0; + nowexp = CHAR_getInt( charaindex, CHAR_EXP ); + addexp = CHAR_getWorkInt( charaindex, CHAR_WORKGETEXP ); + // shan 11/27 10^9 1224160000 + CHAR_AddMaxExp( charaindex, addexp); + return addexp; +} +#endif + +int BATTLE_DpCalc( int battleindex ) +{ + BATTLE_ENTRY *pLooseEntry, *pWinEntry; + int winside, looseside, i, charaindex, dpadd, dpall, num = 0; + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX; + + winside = BattleArray[battleindex].winside; + looseside = 1 - winside; + if( winside != 0 && winside != 1 )return BATTLE_ERR_PARAM; + + // 宁煌袄赓渝祭 + dpall = 0; + + // 仃凶 井日 毛畴丹 + pLooseEntry = BattleArray[battleindex].Side[looseside].Entry; + for( i = 0 ; i < BATTLE_ENTRY_MAX; i ++ ){ + charaindex = pLooseEntry[i].charaindex; + // 皿伊奶乩□动陆反饬 仄 + if( CHAR_CHECKINDEX( charaindex ) == FALSE )continue; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER )continue; + // ㄠㄟ坌及ㄠ手日尹月 + dpadd = CHAR_getInt( charaindex, CHAR_DUELPOINT ) * DUELPOINT_RATE; + // 仃凶 卞反 毛穴奶瓜旦涩烂 + CHAR_setWorkInt( charaindex, CHAR_WORKGETEXP, + CHAR_getWorkInt( charaindex, CHAR_WORKGETEXP) - dpadd ); + // 宁煌袄卞笛遥 + dpall += dpadd; + } + + // 今日卞 仆凶曰仄凶谛迕及 毛笛遥 + dpall += BattleArray[battleindex].Side[winside].common_dp; + + pWinEntry = BattleArray[battleindex].Side[winside].Entry; + for( num = 0,i = 0 ; i < BATTLE_ENTRY_MAX; i ++ ){ + charaindex = pWinEntry[i].charaindex; + // 皿伊奶乩□动陆反饬 仄 + if( CHAR_CHECKINDEX( charaindex ) == FALSE )continue; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER )continue; + num++; + } + // 卅兮井 匀凶幻丹卞簿手中卅中 + if( num <= 0 )return BATTLE_ERR_BATTLEINDEX; + dpadd = dpall / num; + if( dpadd <= 0 )dpadd = 1; // 斓匹手ㄠ反芨尹月 + + for( num = 0,i = 0 ; i < BATTLE_ENTRY_MAX; i ++ ){ + charaindex = pWinEntry[i].charaindex; + // 皿伊奶乩□动陆反饬 仄 + if( CHAR_CHECKINDEX( charaindex ) == FALSE )continue; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER )continue; + + // 匀凶 卞反 毛涩烂 + CHAR_setWorkInt( charaindex, CHAR_WORKGETEXP, + CHAR_getWorkInt( charaindex, CHAR_WORKGETEXP) + dpadd ); + } + + return 0; +} + +//#define RS_LIST_MAX 4 // 凛卞窒谛爵 瑛绊霜月井 +#define RS_LIST_MAX 5 +typedef struct{ + int num; + int exp; + int levelup; +}RS_LIST; + +int BATTLE_GetDuelPoint( + int battleindex, // 爵 奶件犯永弁旦 + int side, // 扔奶玉 ㄟ ㄠ + int num // 愤坌反 及窒 及平乓仿井 +) +{ + char szBuffer[1024]=""; + int charaindex; + int dpnow, dpadd; + int fd; + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX; + if( BATTLE_CHECKSIDE( side ) == FALSE )return BATTLE_ERR_PARAM; + if( num < 0 || num >= BATTLE_ENTRY_MAX )return BATTLE_ERR_PARAM; + charaindex = BattleArray[battleindex].Side[side].Entry[num].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return BATTLE_ERR_PARAM; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET ){ + return 0; + } + if( BattleArray[battleindex].Side[side].type != BATTLE_S_TYPE_PLAYER ){ + return 0; + } + dpadd = CHAR_getWorkInt( charaindex, CHAR_WORKGETEXP ); + if( dpadd == 0 ){ + dpadd = 0; // 仇及桦宁反ㄟ + }else + if( dpadd < 0 ){ + dpadd = min( -1, dpadd ); // 剂卅仁午手ㄠ反手日丹 + }else{ + dpadd = max( 1, dpadd ); // 剂卅仁午手ㄠ反手日丹 + } + dpnow = CHAR_getInt( charaindex, CHAR_DUELPOINT ) + dpadd; + dpnow = max( dpnow, 0 ); + + CHAR_setInt( charaindex, CHAR_DUELPOINT, min( dpnow, CHAR_MAXDUELPOINT ) ); + + szBuffer[0] = 0; + { + char szAdd[64], szNow[64]; + cnv10to62( dpadd, szAdd, sizeof( szAdd ) ); + cnv10to62( dpnow, szNow, sizeof( szNow ) ); + snprintf( szBuffer, sizeof( szBuffer ), + "%s|%s|", szAdd, szNow ); + } + + fd = getfdFromCharaIndex( charaindex ); + lssproto_RD_send( fd, szBuffer ); + + CHAR_send_DpDBUpdate( charaindex ); +#ifndef _NET_REDUCESEND + CHAR_send_DpDBUpdate_AddressBook( charaindex, TRUE ); +#endif + return 0; +} + +int BATTLE_GetExpGold( + int battleindex, // 爵 奶件犯永弁旦 + int side, // 扔奶玉 ㄟ ㄠ + int num // 愤坌反 及窒 及平乓仿井 +) +{ + BATTLE_ENTRY *pEntryChara; + char szBuffer[1024]="", szItemString[512], szEscItemString[256]; + int charaindex, UpLevel, petindex, i, j, itemindex = -1; + int rsCnt = 0; + RS_LIST aRsList[RS_LIST_MAX]; + int itemgroup[CHAR_MAXITEMHAVE-CHAR_STARTITEMARRAY]; + int itemnum = 0; + memset( aRsList, 0, sizeof( aRsList ) ); + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX; + if( BATTLE_CHECKSIDE( side ) == FALSE )return BATTLE_ERR_PARAM; + if( num < 0 || num >= BATTLE_ENTRY_MAX )return BATTLE_ERR_PARAM; + charaindex = BattleArray[battleindex].Side[side].Entry[num].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return BATTLE_ERR_PARAM; + if( CHAR_getFlg( charaindex, CHAR_ISDIE ) == TRUE ){ + return 0; + } + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET ){ + return 0; + } + if( BattleArray[battleindex].Side[side].type != BATTLE_S_TYPE_PLAYER ){ + return 0; + } + pEntryChara = &BattleArray[battleindex].Side[side].Entry[num]; + if( CHAR_getFlg( charaindex, CHAR_ISDIE ) == FALSE ){ +#ifdef _ITEM_ADDEQUIPEXP + BATTLE_GetExp( charaindex , charaindex ); +#else + BATTLE_GetExp( charaindex ); +#endif + if( getBattleDebugMsg( ) != 0 ){ + snprintf( szBuffer, sizeof(szBuffer), + "(%s) 得到 EXP %d", + CHAR_getUseName( charaindex ), + CHAR_getWorkInt( charaindex, CHAR_WORKGETEXP ) + ); + BATTLE_talkToCli( charaindex, szBuffer, CHAR_COLORYELLOW ); + } + + } + UpLevel = CHAR_LevelUpCheck( charaindex , -1); + if( UpLevel > 0 ){ + aRsList[rsCnt].levelup = 1; + }else{ + aRsList[rsCnt].levelup = 0; + } + aRsList[rsCnt].num = -2; + aRsList[rsCnt].exp = CHAR_getWorkInt( charaindex, CHAR_WORKGETEXP ); + rsCnt ++; + if( UpLevel > 0 ){ + int work; + + if( getBattleDebugMsg( ) != 0 ){ + snprintf( szBuffer, sizeof(szBuffer), + "(%s) 升级至 %d", + CHAR_getUseName( charaindex ), + CHAR_getInt( charaindex, CHAR_LV ) + ); + BATTLE_talkToCli( charaindex, szBuffer, CHAR_COLORYELLOW ); + } + CHAR_setInt( charaindex, CHAR_SKILLUPPOINT, + CHAR_getInt( charaindex, CHAR_SKILLUPPOINT) + UpLevel*3 ); + work = CHAR_getInt( charaindex, CHAR_CHARM ); + work += CH_FIX_PLAYERLEVELUP; + CHAR_setInt( charaindex, CHAR_CHARM, min( 100, work ) ); + CHAR_complianceParameter( charaindex ); + CHAR_send_P_StatusString( charaindex , + CHAR_P_STRING_LV|CHAR_P_STRING_NEXTEXP|CHAR_P_STRING_DUELPOINT + ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX ) ); + CHAR_PartyUpdate( charaindex, CHAR_N_STRING_LV ); +#ifndef _NET_REDUCESEND + CHAR_send_DpDBUpdate_AddressBook( charaindex, TRUE ); +#endif + } + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ){ + petindex = CHAR_getCharPet( charaindex, i ); + if( CHAR_CHECKINDEX( petindex ) == FALSE )continue; + if( CHAR_getFlg( petindex, CHAR_ISDIE ) == TRUE )continue; + if( CHAR_getWorkInt( petindex, CHAR_WORKGETEXP ) <= 0 ){ + CHAR_complianceParameter( petindex ); + sprintf( szBuffer, "K%d", i ); + CHAR_sendStatusString( charaindex , szBuffer ); + + continue; + } +#ifdef _ITEM_ADDEQUIPEXP + BATTLE_GetExp( petindex, charaindex ); +#else + BATTLE_GetExp( petindex ); +#endif + if( getBattleDebugMsg( ) != 0 ){ + snprintf( szBuffer, sizeof(szBuffer), + "(%s) 得到 EXP %d", + CHAR_getUseName( petindex ), + CHAR_getWorkInt( petindex, CHAR_WORKGETEXP ) + ); + BATTLE_talkToCli( charaindex, szBuffer, CHAR_COLORYELLOW ); + } + UpLevel = CHAR_LevelUpCheck( petindex , charaindex); + if( UpLevel > 0 ){ + if( getBattleDebugMsg( ) != 0 ){ + snprintf( szBuffer, sizeof(szBuffer), + "(%s) 升级至 %d", + CHAR_getUseName( petindex ), + CHAR_getInt( petindex, CHAR_LV ) + ); + BATTLE_talkToCli( charaindex, szBuffer, CHAR_COLORYELLOW ); + } + for( j = 0; j < UpLevel; j ++ ){ + CHAR_PetLevelUp( petindex ); + CHAR_PetAddVariableAi( petindex, AI_FIX_PETLEVELUP ); + } + aRsList[rsCnt].levelup = 1; + }else{ + aRsList[rsCnt].levelup = 0; + } + aRsList[rsCnt].num = i; + aRsList[rsCnt].exp = CHAR_getWorkInt( petindex, CHAR_WORKGETEXP ); + rsCnt ++; + CHAR_complianceParameter( petindex ); + if( UpLevel > 0 ){ + sprintf( szBuffer, "K%d", i ); + CHAR_sendStatusString( charaindex , szBuffer ); + + } + + } + szItemString[0] = 0; + if( CHAR_getFlg( charaindex, CHAR_ISDIE ) == FALSE ){ + for( i = 0; i < GETITEM_MAX; i ++ ){ + int ItemGet = FALSE; + szEscItemString[0] = 0; + itemindex = pEntryChara->getitem[i]; + if( itemindex < 0 ){ + itemindex = -1; + }else + if( CHAR_findEmptyItemBox( charaindex ) >= 0 ){ + int ret; + ret = CHAR_addItemSpecificItemIndex(charaindex,itemindex); + if( 0 <= ret && ret < CHAR_EQUIPPLACENUM ){ + print( "itemget err: 在这里不能取得item(%s)(%d)(%s)\n", + CHAR_getUseName( charaindex ), + ret, + ITEM_getAppropriateName(itemindex) + ); + } + if( !CHAR_CHECKITEMINDEX( charaindex, ret) ){ + ItemGet = FALSE; + }else{ + ItemGet = TRUE; + itemgroup[itemnum] = ret; + itemnum ++; + } + } + if( ItemGet == TRUE ){ + if( getBattleDebugMsg( ) != 0 ){ + snprintf( szBuffer, sizeof(szBuffer), + "拾获(%s)", + ITEM_getAppropriateName(itemindex) ); + BATTLE_talkToCli( charaindex, szBuffer, CHAR_COLORYELLOW ); + } + + LogItem( + CHAR_getChar( charaindex, CHAR_NAME ), + CHAR_getChar( charaindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), /* 失奶 丞 寞 */ +#endif + "BattleGet(战斗後所得的道具)", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + ITEM_getChar(itemindex, ITEM_UNIQUECODE),// shan 2001/12/14 + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + makeEscapeString( ITEM_getAppropriateName(itemindex), + szEscItemString, + sizeof( szEscItemString ) ); + strncat( szItemString, szEscItemString, sizeof( szItemString ) ); + pEntryChara->getitem[i] = -1; + }else{ + if( itemindex >= 0 ){ + ITEM_endExistItemsOne(itemindex); + }else{ + } + pEntryChara->getitem[i] = -1; + } + strncat( szItemString, "|", sizeof( szItemString ) ); + + } + } + + szBuffer[0] = 0; + for( i = 0; i < RS_LIST_MAX; i ++ ){ + char szWork[256], sz62[64]; + szWork[0] = 0; + if( aRsList[i].exp > 0 || i == 0 ){ + cnv10to62( aRsList[i].exp, sz62, sizeof( sz62 ) ); + snprintf( szWork, sizeof( szWork ), + "%d|%d|%s", aRsList[i].num, + aRsList[i].levelup, + sz62 + ); + } + strncat( szBuffer, szWork, sizeof( szBuffer ) ); + strncat( szBuffer, ",", sizeof( szBuffer ) ); + } + strncat( szBuffer, szItemString, sizeof( szBuffer ) ); + { + int fd; + fd = getfdFromCharaIndex( charaindex ); + lssproto_RS_send( fd, szBuffer ); + } + if( itemnum > 0 ){ + int inum, ie; + for( inum = 0; inum < itemnum; inum ++ ){ + ie = CHAR_getItemIndex( charaindex, itemgroup[inum] ); + } + CHAR_sendItemData( charaindex, itemgroup, itemnum); + } + return 0; +} + +int BATTLE_GetProfit( int battleindex, int side, int num ) +{ + if( BattleArray[battleindex].dpbattle == 1 ){ + return BATTLE_GetDuelPoint( battleindex, side, num ); + }else{ + return BATTLE_GetExpGold( battleindex, side, num ); + } + +} + +int BATTLE_FinishSet( battleindex ) +{ + + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX; + BattleArray[battleindex].mode = BATTLE_MODE_FINISH; + return 0; +} + +static int BATTLE_Finish( int battleindex ) +{ + BATTLE *pBattle; + BATTLE_ENTRY *pEntry; + int i, charaindex, j; + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX; + if( BattleArray[battleindex].winside == 0 + && BattleArray[battleindex].type == BATTLE_TYPE_P_vs_E + && BattleArray[battleindex].WinFunc != NULL){ + BattleArray[battleindex].WinFunc( battleindex, + BattleArray[battleindex].createindex ); + } + +#ifdef _DEATH_CONTEND + if( BattleArray[battleindex].type == BATTLE_TYPE_P_vs_P && + BattleArray[battleindex].PkFunc != NULL ){ + BattleArray[battleindex].PkFunc( + BattleArray[battleindex].menum, BattleArray[battleindex].tonum, + BattleArray[battleindex].winside, BattleArray[battleindex].battlemap ); // winside 0 menum 1 tonum + } +#endif + +#ifdef DANTAI + if( BattleArray[battleindex].type == BATTLE_TYPE_P_vs_P ){ + BATTLE_DpCalc( battleindex ); + } +#endif + + for( j = 0; j < 2; j ++ ){ + pEntry = BattleArray[battleindex].Side[j].Entry; +#ifdef _PET_TALK + for( i = 0 ; i < BATTLE_ENTRY_MAX ; i ++ ){ +#else + for( i = BATTLE_ENTRY_MAX-1; i >= 0 ; i -- ){ +#endif + charaindex = pEntry[i].charaindex; + + if( CHAR_CHECKINDEX( charaindex ) == FALSE ) + continue; + + BATTLE_GetProfit( battleindex, j, i ); //包括取得经验值 + BATTLE_Exit( charaindex, battleindex ); + } + } + if( BattleArray[battleindex].type == BATTLE_TYPE_WATCH ){ + }else{ + pBattle = BattleArray[battleindex].pNext; + for( ;pBattle; pBattle = pBattle->pNext ){ + if( BATTLE_CHECKADDRESS( pBattle ) == FALSE ){ + fprint( "err:battle address 奇怪(%p)\n", pBattle ); + break; + } + for( i = BATTLE_ENTRY_MAX-1; i >= 0 ; i -- ){ + charaindex = pBattle->Side[0].Entry[i].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )continue; + BATTLE_Exit( charaindex, pBattle->battleindex ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_FINAL ); + } + } + pBattle = BattleArray[battleindex].pNext; + for( ;pBattle; pBattle = pBattle->pNext ){ + if( BATTLE_CHECKADDRESS( pBattle ) == FALSE ){ + fprint( "err:battle address 奇怪(%p)\n", pBattle ); + break; + } + BATTLE_DeleteBattle( pBattle->battleindex ); + } + } + BATTLE_DeleteBattle( battleindex ); + return 0; +} + +int BATTLE_StopSet( battleindex ) +{ + + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX; + BattleArray[battleindex].mode = BATTLE_MODE_STOP; + + return 0; +} + +static int BATTLE_Stop( int battleindex ) +{ + BATTLE_ENTRY *pEntry; + int i, charaindex, j; + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX; + + for( j = 0; j < 2; j ++ ){ + pEntry = BattleArray[battleindex].Side[j].Entry; + for( i = BATTLE_ENTRY_MAX-1; i >= 0 ; i -- ){ + charaindex = pEntry[i].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE ) + continue; + BATTLE_GetProfit( battleindex, j, i ); + BATTLE_Exit( charaindex, battleindex ); + } + } + + BATTLE_DeleteBattle( battleindex ); + return 0; +} + +int BATTLE_DefaultAttacker( int battleindex, int side ) +{ + int i, rnd, cnt; + int CharaTbl[BATTLE_ENTRY_MAX]; + + BATTLE_ENTRY *pEntry; + + pEntry = BattleArray[battleindex].Side[side].Entry; + cnt = 0; + + for( i = 0 ; i < BATTLE_ENTRY_MAX; i ++ ){ + CharaTbl[i] = -1; + if( CHAR_CHECKINDEX( pEntry[i].charaindex ) == FALSE ){ + continue; + } + + if( CHAR_getWorkInt( pEntry[i].charaindex, CHAR_WORKBATTLEMODE ) + == BATTLE_CHARMODE_RESCUE ){ + continue; + } + + if( BATTLE_TargetCheck( battleindex, i + side * SIDE_OFFSET ) == FALSE )continue; + + CharaTbl[cnt] = i + side * SIDE_OFFSET; + cnt ++; + } + + if( cnt == 0 ){ + return -1; + } + + rnd = RAND( 0, cnt-1 ); + return CharaTbl[rnd]; + +} + +#if 0 +//********************************************************* +// +// 衬平乓仿卞爵 戊穴件玉毛 木月 + +static int BATTLE_EnemyCommand( int battleindex, int side ) +// +// 曰袄 BATTLE_ERR +// +//********************************************************* +{ + int i, charaindex; + BATTLE_ENTRY *pEntry; + + // 由仿丢□正民尼永弁 + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX; + if( BATTLE_CHECKSIDE( side ) == FALSE )return BATTLE_ERR_PARAM; + + // 及扔奶玉隋垫丹 + // 衬平乓仿动陆反 仃月 + if( BattleArray[battleindex].Side[side].type != BATTLE_S_TYPE_ENEMY ) return 0; + + pEntry = BattleArray[battleindex].Side[side].Entry; + + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + charaindex = pEntry[i].charaindex; + // 平乓仿弁正银匀化卅井匀凶日戚尺 + if( CHAR_CHECKINDEX( charaindex ) == FALSE )continue; + // 衬平乓仿元扎卅井匀凶日戚尺 + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) != CHAR_TYPEENEMY ){ + continue; + } + // 反仇仇匹檗 午井卞杀元化戊穴件玉毛 尹月互} + // 漆反爵丹及心午允月[ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_ATTACK ); + // 锹澎反赝癫 + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, BATTLE_DefaultAttacker( battleindex, 0 ) ); + // 戊穴件玉 OK 午仄化云仁 + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + + } + + return 0; +} +#endif + +//********************************************************* +// +// 爵 丐月扔奶玉及戏五酸曰皿伊奶乩□卞 毛笛遥 +// +int BATTLE_AddDpAlive( + int battleindex, // 田玄伙奶件犯永弁旦 + int side, // 扔奶玉( 0 or 1 ) + int dp +) +// +// 曰袄“{戏五酸匀化中月皿伊奶乩□及醒 +//{{{{{ 爵 互垫歹木化中卅仃木壬 及袄 +// +//********************************************************* +{ + int i, charaindex; + BATTLE_ENTRY *pEntry; + int cnt = 0; + + // 由仿丢□正民尼永弁 + if( BATTLE_CHECKSIDE( side ) == FALSE )return -BATTLE_ERR_PARAM; + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return -BATTLE_ERR_BATTLEINDEX; + + // 巨件玄伉□ + pEntry = BattleArray[battleindex].Side[side].Entry; + + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + charaindex = pEntry[i].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE ) continue; + // 矢永玄反仇及端楮溢卅中 + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET ) continue; + // 戏五化中引允[笛遥 + if( CHAR_getFlg( charaindex, CHAR_ISDIE ) == FALSE ){ + CHAR_setWorkInt( charaindex, CHAR_WORKGETEXP, + CHAR_getWorkInt( charaindex, CHAR_WORKGETEXP) + dp ); + } + } + + return cnt; +} + +#if 1 +//********************************************************* +// +// 爵 }皿伊奶乩□互戏五酸匀化中月井譬屯月 +// +int BATTLE_CountAlive( + int battleindex, // 田玄伙奶件犯永弁旦 + int side // 扔奶玉( 0 or 1 ) +) +// +// 曰袄“{戏五酸匀化中月皿伊奶乩□及醒 +//{{{{{ 爵 互垫歹木化中卅仃木壬 及袄 +// +//********************************************************* +{ + int i, charaindex; + BATTLE_ENTRY *pEntry; + int cnt = 0; + + // 由仿丢□正民尼永弁 + if( BATTLE_CHECKSIDE( side ) == FALSE )return -BATTLE_ERR_PARAM; + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return -BATTLE_ERR_BATTLEINDEX; + + // 巨件玄伉□ + pEntry = BattleArray[battleindex].Side[side].Entry; + + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + charaindex = pEntry[i].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE ) continue; + // 矢永玄反仇及端楮溢卅中 + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET ) continue; + // 戏五化中引允[ + if( CHAR_getFlg( charaindex, CHAR_ISDIE ) == FALSE ){ + cnt ++; + } + } + + return cnt; +} +#endif + + +//********************************************************* +// +// 爵 }辅爵仄凶化皿伊奶乩□及心互戏五化中月橇谪井毛民尼永弁 +// +int BATTLE_OnlyRescue( + int battleindex, // 田玄伙奶件犯永弁旦 + int side, // 扔奶玉( 0 or 1 ) + int *pOnlyFlg +) +// +// 曰袄“{戏五酸匀化中月皿伊奶乩□及醒 +//{{{{{ 爵 互垫歹木化中卅仃木壬 及袄 +// +//********************************************************* +{ + int i, charaindex; + BATTLE_ENTRY *pEntry; + int cnt = 0, OnlyRescue = 1; + + (*pOnlyFlg) = 0; + + // 由仿丢□正民尼永弁 + if( BATTLE_CHECKSIDE( side ) == FALSE )return -BATTLE_ERR_PARAM; + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return -BATTLE_ERR_BATTLEINDEX; + + // 巨件玄伉□ + pEntry = BattleArray[battleindex].Side[side].Entry; + + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + charaindex = pEntry[i].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE ){ + continue; + } + // 矢永玄反仇及端楮溢卅中 + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET ) continue; + // 戏五化中引允[ + if( CHAR_getFlg( charaindex, CHAR_ISDIE ) == FALSE ){ + cnt ++; + // 戏五化中月支勾反辅爵 井" + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ) == BATTLE_CHARMODE_RESCUE ){ + }else{ + OnlyRescue = 0; + } + } +#ifdef _PETSKILL_LER + if(CHAR_getWorkInt(charaindex,CHAR_WORK_RELIFE) > 0) cnt++; +#endif + } + + // 戏五化中月支勾互中化公中勾反辅爵 分匀凶日 + if( cnt > 0 && OnlyRescue ){ + // 白仿弘毛 化月 + (*pOnlyFlg) = 1; + }else{ + // 切互匀凶日ㄟ卞允月 + (*pOnlyFlg) = 0; + } + + return cnt; +} + +static BOOL BATTLE_TimeOutCheck( int battleindex ) +{ + int i, j, charaindex; + BATTLE *pBattle; + BATTLE_ENTRY *pEntry; + pBattle = &BattleArray[battleindex]; + + if( NowTime.tv_sec > pBattle->timer + BATTLE_TIME_LIMIT ){ + }else{ + return FALSE; + } + //BATTLE_BroadCast( battleindex, "server时间已到。", CHAR_COLORYELLOW ); + for( j = 0; j < 2; j ++ ){ + pEntry = pBattle->Side[j].Entry; + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + charaindex = pEntry[i].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE ) + continue; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEENEMY ){ + continue; + } + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ) + == BATTLE_CHARMODE_C_WAIT ){ + BATTLE_Exit( charaindex, battleindex ); + CHAR_DischargePartyNoMsg( charaindex ); + CHAR_talkToCli( charaindex, -1, + "时间到,结束战斗。", CHAR_COLORYELLOW ); + BATTLE_CommandSend( charaindex, "BU" ); + } + } + } + + return TRUE; +} + +int BATTLE_WatchWait( int battleindex ) +{ + BATTLE *pBattle; + BOOL commandflg = TRUE; + + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX; + pBattle = &BattleArray[battleindex]; + if( BATTLE_TimeOutCheck( battleindex ) == TRUE ){ + commandflg = TRUE; + } + if( commandflg == FALSE ){ + return 0; + } + pBattle->mode = BATTLE_MODE_WATCHMOVIE; + pBattle->turn ++; + return 0; +} + +int BATTLE_WatchMovie( int battleindex ) +{ + return 0; + +} + +int BATTLE_WatchAfter( int battleindex ) +{ + BattleArray[battleindex].mode = BATTLE_MODE_WATCHPRE; + + return 0; + +} + +int BATTLE_WatchBC( int battleindex ) +{ + return 0; +} + +int BATTLE_WatchPre( int battleindex ) +{ + // 戊穴件玉谨切尺 月凛及域 及 木 + BATTLE_PreWatchWaitSeq( battleindex ); + BattleArray[battleindex].mode = BATTLE_MODE_WATCHWAIT; + return 0; +} + +static int BATTLE_Command( int battleindex ) +{ + BATTLE *pBattle, *pWatchBattle; + BOOL commandflg = TRUE, iFinish = FALSE; + int OnlyRescue[2], i, j, charaindex; + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX; + pBattle = &BattleArray[battleindex]; + + if( BATTLE_CommandWait( battleindex, 0) == FALSE ){ + commandflg = FALSE; + } + if( BATTLE_CommandWait( battleindex, 1) == FALSE ){ + commandflg = FALSE; + } + pWatchBattle = pBattle->pNext; + for( ; pWatchBattle ; pWatchBattle = pWatchBattle->pNext ){ + if( BATTLE_CHECKADDRESS( pWatchBattle ) == FALSE ){ + fprint( "err:观战battle address错误(%p)\n", pWatchBattle ); + break; + } + + if( pWatchBattle->mode == BATTLE_MODE_WATCHBC ){ + + BATTLE_MakeCharaString( battleindex, szAllBattleString, + sizeof(szAllBattleString) ); + BATTLE_BpSendToWatch( pWatchBattle, szAllBattleString ); + + pWatchBattle->mode = BATTLE_MODE_WATCHPRE; + commandflg = FALSE; + + }else if( pWatchBattle->mode != BATTLE_MODE_WATCHMOVIE ){ + commandflg = FALSE; + } + } + if( BATTLE_TimeOutCheck( battleindex ) == TRUE ){ + commandflg = TRUE; + } + if( commandflg == FALSE ){ + return 0; + } +#ifdef _BATTLECOMMAND_TIME + BattleArray[battleindex].PartTime = 0; +#endif + + + pBattle->turn ++;//自己回合数增加 + BATTLE_ai_all( battleindex, 0, 0); + BATTLE_ai_all( battleindex, 1, 0); + BATTLE_Battling( battleindex );//处理战斗 + pBattle->Side[0].flg &= ~BSIDE_FLG_SURPRISE; + pBattle->Side[1].flg &= ~BSIDE_FLG_SURPRISE; + if( BATTLE_OnlyRescue( battleindex, 0, &OnlyRescue[0] ) == 0 ){ + pBattle->winside = 1; + iFinish = TRUE; + }else + if( BATTLE_OnlyRescue( battleindex, 1, &OnlyRescue[1] ) == 0 ){ + pBattle->winside = 0; + iFinish = TRUE; + } + for( j = 0; j < 2; j ++ ){ + if( OnlyRescue[j] != 1 )continue; + for( i = 0; i < BATTLE_ENTRY_MAX/2; i ++ ){ + charaindex = pBattle->Side[j].Entry[i].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE ) + continue; + if( CHAR_getInt( charaindex, CHAR_HP ) <= 0 ){ + BATTLE_Exit( charaindex, battleindex ); + } + } + } + BATTLE_PreCommandSeq( battleindex ); + if( iFinish == TRUE ){ + BATTLE_FinishSet( battleindex ); + } + return 0; +} + +#ifdef _CHECK_BATTLE_IO +extern int InBattleLoop; +extern int battle_write; +extern int other_write; +extern int battle_write_cnt; +extern int other_write_cnt; +#endif + +extern void BATTLE_changeRideImage( int index ); + +int BATTLE_Loop( void ) +{ + int i, cnt = 0; + +#ifdef _CHECK_BATTLE_IO + InBattleLoop = TRUE; +#endif + + rand(); + for( i = 0; i < BATTLE_battlenum; i ++ ){//最多战斗场数 + if( BattleArray[i].use == FALSE )continue; + if( BattleArray[i].type == BATTLE_TYPE_WATCH ){//若是观战模式 + if( BATTLE_CountAlive( i, 0 ) == 0 ){ + BATTLE_FinishSet( i ); + } + } + + switch( BattleArray[i].mode ){ + case BATTLE_MODE_NONE://未战斗 + break; + case BATTLE_MODE_INIT://战斗初始化 + BATTLE_Init( i ); + break; + case BATTLE_MODE_BATTLE://Server内部战斗中 + BATTLE_Command( i ); + break; + case BATTLE_MODE_FINISH://战斗结束 + BATTLE_Finish( i ); + break; + case BATTLE_MODE_STOP://战斗中断 + BATTLE_Stop( i ); + break; + case BATTLE_MODE_WATCHBC://观战中... + BATTLE_WatchBC( i ); + break; + + case BATTLE_MODE_WATCHPRE: + BATTLE_WatchPre( i ); + break; + case BATTLE_MODE_WATCHWAIT: + BATTLE_WatchWait( i ); + break; + + case BATTLE_MODE_WATCHMOVIE: + BATTLE_WatchMovie( i ); + break; + + case BATTLE_MODE_WATCHAFTER: + BATTLE_WatchAfter( i ); + break; + } + cnt ++; + } + +#ifdef _CHECK_BATTLE_IO + InBattleLoop = FALSE; +#endif + + return cnt; +} + + + + + +typedef struct { + int charaindex; // 平乓仿弁正奶件犯永弁旦 + int side; // 扔奶玉 + int dex; // 豳镀今 + int num; // 巨件玄伉□ 寞 + int combo; // 宁 猾允月谛棉井" +#ifdef _EQUIT_SEQUENCE + int sequence; +#endif +}BATTLE_CHARLIST; + + +typedef int (*FUNC)( const void *, const void * ); + +//************************************************************ +// +// 爵 及豳镀今 胜楮醒 +// +// 豳镀今反袄互 五中 互穸木化中月[嫦赐末□玄匹丐月[ +// +static int EsCmp( + const BATTLE_CHARLIST *pC1, + const BATTLE_CHARLIST *pC2 +) +{ +#ifdef _EQUIT_SEQUENCE + return( (pC2->dex+pC2->sequence) - (pC1->dex+pC1->sequence) ); +#else + return( pC2->dex - pC1->dex ); +#endif +} + +#ifdef _EQUIT_SEQUENCE +void Replacement_Entry( BATTLE_CHARLIST *temp1, BATTLE_CHARLIST *temp2) +{ + temp1->charaindex = temp2->charaindex; + temp1->combo = temp2->combo; + temp1->dex = temp2->dex; + temp1->num = temp2->num; + temp1->sequence = temp2->sequence; + temp1->side = temp2->side; +} +#endif +static void EntrySort( BATTLE_CHARLIST *EntryList, int listsize) +{ +#ifdef _EQUIT_SEQUENCE +// int i, j; + qsort( EntryList, listsize, sizeof( BATTLE_CHARLIST ), (FUNC)EsCmp ); +/* + for( i=0; i 0 ){ + int maxcheck, now; + BATTLE_CHARLIST temp; + + maxcheck = EntryList[i].sequence/8; + maxcheck = RAND( 1, maxcheck); + maxcheck = ( maxcheck>=i )?(i/3):maxcheck; + maxcheck = ( maxcheck<0)?0:maxcheck; + now = i; + for( j=0; j0; j++){ + if( EntryList[now].sequence > (EntryList[now-1].sequence *0.9) ){ + + Replacement_Entry( &temp, &EntryList[now]); + Replacement_Entry( &EntryList[now], &EntryList[now-1]); + Replacement_Entry( &EntryList[now-1], &temp); + now = now-1; + + +// temp = &EntryList[now]; +// EntryList[now] = EntryList[now-1]; +// EntryList[now-1] = *temp; +// temp = NULL; + + } + } + } + } +*/ +#else + qsort( EntryList, listsize, sizeof( BATTLE_CHARLIST ), (FUNC)EsCmp ); +#endif +} + + + +//************************************************************ +// +// 豳镀今毛煌遥允月[ +// +static int BATTLE_DexCalc( + int charaindex +) +// +// 曰袄 豳镀今 +// +//************************************************************ +{ + int dex = 0; + int work, COM; + int petindex = BATTLE_getRidePet( charaindex ); + + // 戊穴件玉潸 + COM = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ); + +#ifdef _PETSKILL_BECOMEFOX // 攻击顺序中的敏捷降下20% + if( CHAR_getWorkInt( charaindex, CHAR_WORKFOXROUND ) != -1 ){ + work = CHAR_getWorkInt( charaindex, CHAR_WORKQUICK )+20; + dex = work *0.8;//敏降20% + } +#endif +#ifdef _PROFESSION_ADDSKILL + if( CHAR_getWorkInt( charaindex, CHAR_WORKFEAR ) > 0 ){ + work = CHAR_getWorkInt( charaindex, CHAR_WORKQUICK )+20; + dex = work*0.8;//敏降20% + } +#endif + // 骚橘 猾及桦宁 + switch( COM ){ +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + case BATTLE_COM_S_BLOOD: // 嗜血成性 + case BATTLE_COM_S_BLOOD_WORMS: // 嗜血蛊 + case BATTLE_COM_S_SIGN: // 一针见血 +#endif + +#ifdef _BATTLE_NEWPOWER + case BATTLE_COM_JYUJYUTU: + case BATTLE_COM_S_ATTACK_MAGIC: + work = CHAR_getWorkInt( charaindex, CHAR_WORKQUICK )+20; + dex = work - RAND( 0, work * 0.3 ); + break; +#endif + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + case BATTLE_COM_S_FIRE_ENCLOSE: // 火附体 + case BATTLE_COM_S_ICE_ENCLOSE: // 冰附体 + case BATTLE_COM_S_THUNDER_ENCLOSE: // 雷附体 + work = CHAR_getWorkInt( charaindex, CHAR_WORKQUICK )+20; + dex = work - RAND( work * 0.3, work * 0.5 ); + break; + case BATTLE_COM_S_VOLCANO_SPRINGS:// 火山泉 + case BATTLE_COM_S_SUMMON_THUNDER: // 召雷术 + case BATTLE_COM_S_ICE_ARROW: // 冰箭术 + work = CHAR_getWorkInt( charaindex, CHAR_WORKQUICK )+20; + dex = work - RAND( 0, work * 0.2 ); + break; + case BATTLE_COM_S_CURRENT: // 电流术 + case BATTLE_COM_S_FIRE_BALL:// 火星球 + case BATTLE_COM_S_ICE_CRACK: // 冰爆术 + work = CHAR_getWorkInt( charaindex, CHAR_WORKQUICK )+20; + dex = work - RAND( 0, work * 0.5 ); + break; + case BATTLE_COM_S_FIRE_SPEAR:// 火龙枪 + case BATTLE_COM_S_STORM: // 暴风雨 + case BATTLE_COM_S_ICE_MIRROR: // 冰镜术 + case BATTLE_COM_S_ENCLOSE: // 附身术 + case BATTLE_COM_S_TRANSPOSE: // 移形换位 + work = CHAR_getWorkInt( charaindex, CHAR_WORKQUICK )+20; + dex = work - RAND( work * 0.2, work * 0.5 ); + break; + + case BATTLE_COM_S_DOOM: // 世界末日 + work = CHAR_getWorkInt( charaindex, CHAR_WORKQUICK )+20; + dex = work - RAND( 0.3, work * 0.6 ); + break; +#endif + +#ifdef _SKILL_SPEEDY_ATT //vincent 宠技:疾速攻击 + case BATTLE_COM_S_SPEEDYATTACK: + work = CHAR_getWorkInt( charaindex, CHAR_WORKQUICK )+20; + dex = work + work*0.3;//敏加30% + break; +#endif +#ifdef _PETSKILL_DAMAGETOHP //宠技:暗月狂狼(嗜血技的变体) + case BATTLE_COM_S_DAMAGETOHP2: + work = CHAR_getWorkInt( charaindex, CHAR_WORKQUICK )+20; + dex = work + work*0.2;//敏加20% + break; +#endif + + case BATTLE_COM_ITEM: // 失奶 丞毛银丹桦宁 + work = CHAR_getWorkInt( charaindex, CHAR_WORKQUICK )+20; + dex = work - RAND( 0, work * 0.3 ) + work * 0.15; + break; + default: // 骚橘 爵丹卅升) + // Robin 0727 ride pet + if( petindex == -1 ) + work = CHAR_getWorkInt( charaindex, CHAR_WORKQUICK )+20; + else + work = BATTLE_adjustRidePet3A( charaindex, petindex, CHAR_WORKQUICK, ATTACKSIDE )+20; + dex = work - RAND( 0, work * 0.3 ); + break; + } + + // 穴奶瓜旦卞卅匀化仄引匀凶日" + if( dex <= 0 )dex = 1; + + return dex; +} + + + + + + +//************************************************************* +// +// 戊件申生□扑亦件互丐月井升丹井民尼永弁 +// +static void ComboCheck( + BATTLE_CHARLIST *pEntryList, + int entrynum +) +// +//************************************************************* +{ + + int i, + charaindex, + com, + enemy, + side, + oldside = -3, // 赝癫卞丐曰尹卅中袄 + oldenemy = -3, // 赝癫卞丐曰尹卅中袄 + armtype, + move, + per, + ComboId = 1, // 戊件示 + start = -1; +#ifdef _ITEM_ADDCOMBO + int j; +#endif + + for( i = 0; i < entrynum; i ++ ){ + + charaindex = pEntryList[i].charaindex; + com = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ); + enemy = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); + side = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLESIDE ); + armtype = 0; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEENEMY ){ + per = 20; // 衬反ㄡㄟ⊙ + }else{ + per = 50; // 愤坌反ㄤㄟ⊙ +#ifdef _ITEM_ADDCOMBO + for( j = 0 ; j < CHAR_EQUIPPLACENUM ; j ++ ){ + int id = CHAR_getItemIndex(charaindex,j);//道具id + if( ITEM_CHECKINDEX(id) ){ + char *arg; + arg = ITEM_getChar(id, ITEM_ARGUMENT );//道具参数 + if( strstr( arg, "合击" ) ){ + int k,battleindex,lr; + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX );//战场编号 + lr = BATTLE_Index2No( battleindex, charaindex );//所站位置 + for( k = 0; k < entrynum; k ++ ){//战场上所有人回圈 + if( BATTLE_TargetCheck(battleindex, pEntryList[k].charaindex ) ){//活着 + if( ( lr < 10 + && BATTLE_Index2No( battleindex, pEntryList[k].charaindex ) < 10 ) + || ( lr >= 10 + && BATTLE_Index2No( battleindex, pEntryList[k].charaindex ) >= 10 ) ){//同一队 + int l; + for( l = 0 ; l < CHAR_EQUIPPLACENUM ; l ++ ){ + int lid = CHAR_getItemIndex(charaindex,l);//道具id + if( ITEM_CHECKINDEX(lid) ){ + arg = ITEM_getChar(lid, ITEM_ARGUMENT );//道具参数 + if( strstr( arg, "合击" ) ){//同一队有2个人以上有载此道具 + int add=0; + sscanf( arg+4, "%d", &add );//取得追加的%数 + per += add; + break; + } + } + } + } + } + } + break; + } + } + } +#endif + } + + // 互ㄟ井 仃卅井匀凶日 + if( CHAR_getInt( charaindex, CHAR_HP ) <= 0 + || BATTLE_CanMoveCheck( charaindex ) == FALSE + ){ + move = 0; + }else{ + move = 1; + } + + // 猾础及 湛毛潸 [髑仆烟卅日母丢 + // 髑仆烟卅日母丢 + if( BATTLE_IsThrowWepon( + CHAR_getItemIndex( charaindex, CHAR_ARM ) ) == TRUE + ){ + armtype = 1; + } + + pEntryList[i].combo = 0; // 赓渝祭 + + if( start != -1 ){ // 宁 猾 + if( com != BATTLE_COM_ATTACK // 猾戊穴件玉匹卅中 + || enemy != oldenemy // 谎匀化月衬互 元匹卅中 + || side != oldside // 扔奶玉互啜丹 + || armtype == 1 // 髑仆烟匹丐月 + || move == 0 // 仃卅中 + ){ + start = -1; // 蔽 + oldside = side; // 扔奶玉创尹月 + }else{ + // 戊件示涩烂 + CHAR_setWorkInt( pEntryList[i].charaindex, + CHAR_WORKBATTLECOM1,BATTLE_COM_COMBO ); + pEntryList[i].combo = ComboId; + // 赓及谛手域杀涩烂 + CHAR_setWorkInt( pEntryList[start].charaindex, + CHAR_WORKBATTLECOM1,BATTLE_COM_COMBO ); + pEntryList[start].combo = ComboId; + } + } + if( start == -1 ){// 宁 猾 仄化中卅中桦宁 + if( com == BATTLE_COM_ATTACK + && armtype != 1 // 髑仆烟匹卅中 + && move == 1 // 仃月 + && RAND( 1, 100 ) <= per + ){ // 骚橘 猾 匹丐月 + start = i; + oldenemy = enemy; // 谎匀化月衬毛创尹月 + oldside = side; // 扔奶玉创尹月 + ComboId ++; + } + } + + } + +} + +//************************************************************* +// +// 戊件申生□扑亦件互 癫卞匹五月井民尼永弁 +//{戚及谛互戊件示匹五月橇谪元扎卅井匀凶日 FALSE +// +static BOOL ComboCheck2( + BATTLE_CHARLIST *pEntryList, // 巨件玄伉□伉旦玄 + int nownum, // 蜇箕及赐 + int entrynum // 巨件玄伉□ 醒 +) +// +// 戊件示匹五月 TRUE +// 匹五卅中 FALSE +// +//************************************************************* +{ + + int i, + iRet = FALSE, + ComboId, + charaindex; + + // 戊件示 忡绣 + ComboId = pEntryList[nownum].combo; + + charaindex = pEntryList[nownum].charaindex; + + // 愤坌互镝擦蘸撩 仄化中凶日撩 + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEFLG) & CHAR_BATTLEFLG_AIBAD ) + { +// print( "由於忠诚度不足使用必杀技失败( %s )\n",CHAR_getUseName( charaindex ) ); + return FALSE; + } + + // 戚及谛互戊件示卞辅笛匹五月井割 + for( i = nownum+1; i < entrynum; i ++ ){ + charaindex = pEntryList[i].charaindex; + + // 戊件示 啜丹午镀仁手撩 + if( ComboId != pEntryList[i].combo )break; + + // 爵 卞辅笛仄化中卅井匀凶日戚尺 + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE) == 0 ) break; + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_FINAL ) break; + + if( CHAR_getInt( charaindex, CHAR_HP ) <= 0 + || BATTLE_CanMoveCheck( charaindex ) == FALSE + ){ + }else{ + iRet = TRUE; + break; + } + } +/* + if( iRet == FALSE ){ + print( "必杀技失败( %s )\n", + CHAR_getUseName( pEntryList[nownum].charaindex ) ); + } +*/ + return iRet; + +} + + +void BATTLE_UltimateExtra( + int battleindex, + int charaindex, + int enemyindex +) +{ + char szBuffer[256]=""; + int pindex, pno; +#ifndef _DEATH_CONTEND + int floor=0, x=0, y=0; +#endif + szBuffer[0] = 0; + + if( CHAR_getInt( enemyindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + BATTLE_PetDefaultExit( enemyindex, battleindex ); + + if( BattleArray[battleindex].type != BATTLE_TYPE_P_vs_P ){ + int levelflg = 1; + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)被击飞至远方。", + // CHAR_getUseName( enemyindex ) ); + if( CHAR_getInt( enemyindex, CHAR_LV ) <= 10 ){ + levelflg = 2; + } + + if( BattleArray[battleindex].norisk == 0 ){; + CHAR_AddCharm( enemyindex, CH_FIX_PLAYEULTIMATE/levelflg ); + pno = CHAR_getInt( enemyindex, CHAR_DEFAULTPET ); + if( 0 <= pno && pno < CHAR_MAXPETHAVE ){ + pindex = CHAR_getCharPet( enemyindex, pno ); + if( CHAR_CHECKINDEX( pindex ) == TRUE ){ + CHAR_PetAddVariableAi( pindex, AI_FIX_PLAYERULTIMATE/levelflg ); + } + } + } +#ifdef _DEATH_CONTEND + CHAR_warpToSpecificPoint( enemyindex, 8250, 22, 22 ); +#else +#ifdef _BAD_PLAYER // WON ADD 送坏玩家去关 + if( NPC_EventCheckFlg( enemyindex, 135 ) ){ + CHAR_warpToSpecificPoint( enemyindex, 887, 56, 14 ); + }else{ +#endif + if( CHAR_getElderPosition( + CHAR_getInt( enemyindex, CHAR_LASTTALKELDER), &floor, &x, &y ) + != TRUE + ){ + }else{ + CHAR_warpToSpecificPoint( enemyindex, floor, x, y ); + } +#ifdef _BAD_PLAYER + } +#endif +#endif + } + BATTLE_Exit( enemyindex, battleindex ); + CHAR_DischargePartyNoMsg( enemyindex ); + if( getBattleDebugMsg( ) != 0 ){ + BATTLE_talkToCli( enemyindex, szBuffer, CHAR_COLORYELLOW ); + } + + }else + // 矢永玄卅日 + if( CHAR_getInt( enemyindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET ){ + int levelflg = 1; + int playerindex = CHAR_getWorkInt( enemyindex, CHAR_WORKPLAYERINDEX ); + + // 伊矛伙互斓中桦宁反 蛹月 坌 + if( CHAR_getInt( playerindex, CHAR_LV ) <= 10 ){ + levelflg = 2; + } + + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)被击飞。", + // CHAR_getUseName( enemyindex ) ); + + // 潜谛及犯白巧伙玄井日反内允 + CHAR_setInt( playerindex, CHAR_DEFAULTPET, -1 ); + + // 犯亘巨伙动陆反镝擦艘毛票仆月 + if( BattleArray[battleindex].type != BATTLE_TYPE_P_vs_P ){ + // 伉旦弁及 中田玄伙井"丐月卅日镝擦 毛票仆月 + if( BattleArray[battleindex].norisk == 0 ){; + CHAR_PetAddVariableAi( enemyindex, AI_FIX_PETULTIMATE/levelflg ); + } + // 潜谛及矢永玄韶氏分荚醒毛市它件玄允月 + CHAR_setInt( playerindex, CHAR_DEADPETCOUNT, + CHAR_getInt( playerindex, CHAR_DEADPETCOUNT ) + 1 ); + } +/* + // 矢永玄互中凶日爵 井日厄仃今六月[ + BATTLE_PetDefaultExit( enemyindex, battleindex ); +*/ + + // 愤坌手 仃月 + BATTLE_Exit( enemyindex, battleindex ); + + }else{ + int flg; + // 公木动陆匹失伙 奴丢永玄韶 + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)被击飞。", + // CHAR_getUseName( enemyindex ) ); + // 衬平乓仿反扔□田□卞酸仄化云仁 +// BATTLE_Exit( enemyindex, battleindex ); + flg = CHAR_getWorkInt( enemyindex, CHAR_WORKBATTLEFLG ); + flg |= CHAR_BATTLEFLG_ULTIMATE; // 失伙 奴丢永玄熬仃凶 + CHAR_setWorkInt( enemyindex, CHAR_WORKBATTLEFLG, flg ); + BATTLE_Exit( enemyindex, battleindex ); + } + + // 须 煤 + //BATTLE_BroadCast( battleindex, szBuffer, CHAR_COLORYELLOW ); + +} + + +//************************************************************* +// +// 骚橘卞竣濮今六凶桦宁及 溃质 +// +void BATTLE_NormalDeadExtra( + int battleindex, // 爵 奶件犯永弁旦 + int charaindex, // 诮仄凶平乓仿及奶件犯永弁旦 + int enemyindex // 诮今木凶平乓仿及奶件犯永弁旦 +) +// +// +//************************************************************* +{ + int pindex, pno; + char szBuffer[256]=""; + + szBuffer[0] = 0; + + // 皿伊奶乩□匹 + // 衬午及爵 分匀凶日 + // 伉旦弁及 中田玄伙卅日 + if( CHAR_getInt( enemyindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER + && BattleArray[battleindex].type == BATTLE_TYPE_P_vs_E + && BattleArray[battleindex].norisk == 0 + ){ + int levelflg = 1; + // 愤坌及 毛票仆月 + // 伊矛伙ㄠㄟ动票及谛反 坌分仃票互月 + if( CHAR_getInt( enemyindex, CHAR_LV ) <= 10 ){ + levelflg = 2; + } + CHAR_AddCharm( enemyindex, CH_FIX_PLAYERDEAD/levelflg ); + // 爵 卞辅笛仄化中凶矢永玄及 毛票仆月 + pno = CHAR_getInt( enemyindex, CHAR_DEFAULTPET ); + if( 0 <= pno && pno < CHAR_MAXPETHAVE ){ + // 矢永玄及奶件犯永弁旦 + pindex = CHAR_getCharPet( enemyindex, pno ); + if( CHAR_CHECKINDEX( pindex ) == TRUE ){ + CHAR_PetAddVariableAi( pindex, AI_FIX_PLAYERDEAD/levelflg ); + } + } + // 韶氏分平乓仿及戊穴件玉反侉木月 + CHAR_setWorkInt( enemyindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + }else + // 矢永玄卅日 + if( CHAR_getInt( enemyindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET + && BattleArray[battleindex].type == BATTLE_TYPE_P_vs_E + && BattleArray[battleindex].norisk == 0 + ){ + int levelflg = 1; + int playerindex = CHAR_getWorkInt( enemyindex, CHAR_WORKPLAYERINDEX ); + + // 潜谛及伊矛伙ㄠㄟ动票及谛反 坌分仃票互月 + if( CHAR_getInt( playerindex, CHAR_LV ) <= 10 ){ + levelflg = 2; + } + // 愤坌及镝擦艘毛票仆月 + CHAR_PetAddVariableAi( enemyindex, AI_FIX_PETDEAD/levelflg ); + // 潜谛及矢永玄韶氏分荚醒毛市它件玄允月 + CHAR_setInt( playerindex, CHAR_DEADPETCOUNT, + CHAR_getInt( playerindex, CHAR_DEADPETCOUNT ) + 1 ); + + // 韶氏分平乓仿及戊穴件玉反侉木月 + CHAR_setWorkInt( enemyindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + + }else{ + // 公木动陆 + } + + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)失去意识。", + // CHAR_getUseName( enemyindex ) ); + + //BATTLE_BroadCast( battleindex, szBuffer, CHAR_COLORYELLOW ); + +} + +#ifndef DANTAI +void BATTLE_EscapeDpSend( int battleindex, int charaindex ) +{ + + int enemyside, cnt, dpadd; + BATTLE_ENTRY *pEntry; + + if( BATTLE_CHECKINDEX( battleindex ) == FALSE ){ + return; + } + + if( BattleArray[battleindex].type != BATTLE_TYPE_P_vs_P ){ + return; + } + if( BattleArray[battleindex].flg & BATTLE_FLG_FREEDP ){ + CHAR_setWorkInt( charaindex, CHAR_WORKGETEXP, 0 ); + return ; + } + BattleArray[battleindex].flg |= BATTLE_FLG_CHARALOST; + enemyside = 1 - CHAR_getWorkInt( charaindex, CHAR_WORKBATTLESIDE ); + pEntry = BattleArray[battleindex].Side[enemyside].Entry; + cnt = BATTLE_CountAlive( battleindex, enemyside ); + if( cnt == 0 )return; + dpadd = CHAR_getInt( charaindex, CHAR_DUELPOINT ) * DUELPOINT_RATE; + if( dpadd < 1 )dpadd = 1; + CHAR_setWorkInt( charaindex, CHAR_WORKGETEXP, -dpadd*2 ); + dpadd /= cnt; + if( dpadd < 1 )dpadd = 1; + BATTLE_AddDpAlive( battleindex, enemyside, dpadd ); +} +#else +void BATTLE_EscapeDpSend( int battleindex, int charaindex ) +{ + + int enemyside, dpadd; + BATTLE_ENTRY *pEntry; + + // Nuke 0725: Avoid too large number + if ((battleindex<0)||(battleindex>getBattlenum())) return; + // 动陆反 仃月 + if( BattleArray[battleindex].type != BATTLE_TYPE_P_vs_P ){ + return; + } + + // 锹澎扔奶玉 + enemyside = 1 - CHAR_getWorkInt( charaindex, CHAR_WORKBATTLESIDE ); + + pEntry = BattleArray[battleindex].Side[enemyside].Entry; + + // 锹澎础卞中月谛醒毛醒尹月 + dpadd = CHAR_getInt( charaindex, CHAR_DUELPOINT ) * DUELPOINT_RATE; + if( dpadd < 1 )dpadd = 1; // 斓匹手ㄠ + + // 谛井日娄中化云仁 + CHAR_setWorkInt( charaindex, CHAR_WORKGETEXP, -dpadd*2 ); + + // 锹澎础卞反箫允 + BattleArray[battleindex].Side[enemyside].common_dp += dpadd; + + +} +#endif + + +#ifndef DANTAI +int BATTLE_AddDuelPoint( int battleindex, int *pBidList ) +{ + int enemyindex, i, side, num, j, k, + charaindex[BATTLE_ENTRY_MAX+1]; + BATTLE_ENTRY + *pEntryEnemy; + int allnum = 0; + int bid = pBidList[0]; + + if( pBidList < 0 )return BATTLE_ERR_PARAM; + if( bid >= SIDE_OFFSET ){ + num = bid - SIDE_OFFSET; + side = 1; + }else{ + num = bid ; + side = 0; + } + + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX; + if( BATTLE_CHECKSIDE( side ) == FALSE )return BATTLE_ERR_PARAM; + if( num < 0 || num >= BATTLE_ENTRY_MAX )return BATTLE_ERR_PARAM; + + for( i = 0; i < BATTLE_ENTRY_MAX + 1 ; i ++ ){ + charaindex[i] = -1; + } + + for( i = 0; i < BATTLE_ENTRY_MAX && pBidList[i] != -1 ; i ++ ){ + int work; + work = BATTLE_No2Index( battleindex, pBidList[i] ); + if( work < 0 )return BATTLE_ERR_PARAM; + if( CHAR_getInt( work, CHAR_WHICHTYPE ) == CHAR_TYPEENEMY ){ + continue; + } + if( CHAR_getInt( work, CHAR_WHICHTYPE ) == CHAR_TYPEPET ){ + work = CHAR_getWorkInt( work, CHAR_WORKPLAYERINDEX ); + } + if( work < 0 )return BATTLE_ERR_PARAM; + for( k = 0; k < allnum; k ++ ){ + if( charaindex[i] == work )break; + } + if( i < allnum )continue; + charaindex[i] = work; + allnum ++; + } + charaindex[i] = -1; + + for( j = 0; j < 2; j ++ ){ + pEntryEnemy = BattleArray[battleindex].Side[j].Entry; + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + int enemytype = 0; + enemyindex = pEntryEnemy[i].charaindex; + if( CHAR_CHECKINDEX( enemyindex ) == FALSE )continue; + if( CHAR_getInt( enemyindex, CHAR_HP ) <= 0 + && CHAR_getFlg( enemyindex, CHAR_ISDIE ) == FALSE){ + }else{ + continue; + } + enemytype = CHAR_getInt( enemyindex, CHAR_WHICHTYPE ); + if( enemytype == CHAR_TYPEPLAYER ){ + BattleArray[battleindex].flg |= BATTLE_FLG_CHARALOST; + } + if( enemytype == CHAR_TYPEPLAYER || enemytype == CHAR_TYPEENEMY ){ + int dpadd, dpnow; + dpnow = CHAR_getInt( enemyindex, CHAR_DUELPOINT ); + dpadd = dpnow * DUELPOINT_RATE; + dpnow -= dpadd; + CHAR_setWorkInt( enemyindex, CHAR_WORKGETEXP, + CHAR_getWorkInt( enemyindex, CHAR_WORKGETEXP) - dpadd ); + + if( side != j ){ + for( k = 0; charaindex[k] != -1; k ++ ); + if( k <= 0 )k = 1; + dpadd /= k; + if( dpadd <= 0 ) dpadd = 1; + for( k = 0; charaindex[k] != -1; k ++ ){ + CHAR_setWorkInt( charaindex[k], CHAR_WORKGETEXP, + CHAR_getWorkInt( charaindex[k], CHAR_WORKGETEXP ) + dpadd ); + } + }else{ + int dpdiv = dpadd, alive; + alive = BATTLE_CountAlive( battleindex, 1-j ); + if( alive <= 0 )alive = 1; + dpdiv /= alive; + if( dpdiv <= 0 )dpdiv = 1; + BATTLE_AddDpAlive( battleindex, 1-j, dpdiv ); + } + } + CHAR_setFlg( enemyindex, CHAR_ISDIE, 1 ); + CHAR_setInt( enemyindex, CHAR_DEADCOUNT, + CHAR_getInt( enemyindex, CHAR_DEADCOUNT ) + 1 ); + + if( pEntryEnemy[i].flg & BENT_FLG_ULTIMATE ){ + BATTLE_GetProfit( battleindex, j, i ); + BATTLE_UltimateExtra( battleindex, charaindex[0], enemyindex ); + }else{ + BATTLE_NormalDeadExtra( battleindex, charaindex[0], enemyindex ); + } + } + } + return 0; +} +#else + +int BATTLE_AddDuelPoint( + int battleindex, + int *pBidList ) +{ + int enemyindex, i, otherside, j, + charaindex[BATTLE_ENTRY_MAX+1]; + BATTLE_ENTRY + *pEntryEnemy; + if( pBidList < 0 )return BATTLE_ERR_PARAM; + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX; + for( j = 0; j < 2; j ++ ){ + pEntryEnemy = BattleArray[battleindex].Side[j].Entry; + otherside = 1 - j; + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + enemyindex = pEntryEnemy[i].charaindex; + if( CHAR_CHECKINDEX( enemyindex ) == FALSE )continue; + if( CHAR_getInt( enemyindex, CHAR_HP ) <= 0 + && CHAR_getFlg( enemyindex, CHAR_ISDIE ) == FALSE){ + }else{ + continue; + } + + CHAR_setFlg( enemyindex, CHAR_ISDIE, 1 ); + CHAR_setInt( enemyindex, CHAR_DEADCOUNT, + CHAR_getInt( enemyindex, CHAR_DEADCOUNT ) + 1 ); + if( pEntryEnemy[i].flg & BENT_FLG_ULTIMATE ){ + if( CHAR_getInt( enemyindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + int dpadd, dpnow; + dpnow = CHAR_getInt( enemyindex, CHAR_DUELPOINT ); + dpadd = dpnow * DUELPOINT_RATE; // ㄠㄟ坌及ㄠ手日尹月 + dpnow -= dpadd; + CHAR_setWorkInt( enemyindex, CHAR_WORKGETEXP, + CHAR_getWorkInt( enemyindex, CHAR_WORKGETEXP) - dpadd ); + BattleArray[battleindex].Side[otherside].common_dp += dpadd; + BATTLE_GetProfit( battleindex, j, i ); + } + BATTLE_UltimateExtra( battleindex, charaindex[0], enemyindex ); + }else{ + BATTLE_NormalDeadExtra( battleindex, charaindex[0], enemyindex ); + } + } + } + return 0; +} +#endif + +int BATTLE_ItemDelCheck( int itemindex ) +{ int icnt, jcnt, playernum; + playernum = getFdnum(); + for( icnt = 0; icnt < playernum; icnt ++ ) { + if( CHAR_CHECKINDEX( icnt ) ) { + for( jcnt = 0; jcnt < CHAR_MAXITEMHAVE; jcnt ++ ) { + if( CHAR_getItemIndex( icnt, jcnt ) == itemindex ) { + print( "err:战利品奇怪的item处理(%s)(%s)index(%d)\n", + CHAR_getUseName(icnt),ITEM_getAppropriateName(itemindex), + itemindex ); + return FALSE; + } + } + } + } + return TRUE; +} + +int BATTLE_AddExpItem( int battleindex, int *pBidList ) +{ + int enemyindex, i, side, num, proflg = 1, j, exp, k, enemylevel, + charaindex[BATTLE_ENTRY_MAX+1]; + BATTLE_ENTRY + *pEntryEnemy, + *pEntryChara[BATTLE_ENTRY_MAX+1], + *pEntryPlayer[BATTLE_ENTRY_MAX+1]; + int item=0,itemindex,itemloop,allnum = 0; + int bid = pBidList[0]; + if( pBidList[0] < 0 )return BATTLE_ERR_PARAM; + if( bid >= SIDE_OFFSET ){ + num = bid - SIDE_OFFSET; + side = 1; + }else{ + num = bid ; + side = 0; + } + if( BATTLE_CHECKSIDE( side ) == FALSE )return BATTLE_ERR_PARAM; + if( num < 0 || num >= BATTLE_ENTRY_MAX )return BATTLE_ERR_PARAM; + for( i = 0; i < BATTLE_ENTRY_MAX + 1 ; i ++ ){ + charaindex[i] = -1; + pEntryPlayer[i] = NULL; + } + if( BattleArray[battleindex].Side[side].type != BATTLE_S_TYPE_PLAYER + || BattleArray[battleindex].Side[1-side].type == BATTLE_S_TYPE_PLAYER){ + proflg = 0; + } + for( i = 0; i < BATTLE_ENTRY_MAX && pBidList[i] != -1 ; i ++ ){ + int subnum; + charaindex[i] = BATTLE_No2Index( battleindex, pBidList[i] ); + if( charaindex[i] < 0 )return BATTLE_ERR_PARAM; + subnum = pBidList[i]-side*SIDE_OFFSET; + pEntryChara[i] = &BattleArray[battleindex].Side[side].Entry[subnum]; + if( CHAR_getInt( charaindex[i], CHAR_WHICHTYPE ) == CHAR_TYPEPET ){ + pEntryPlayer[i] = &BattleArray[battleindex].Side[side].Entry[subnum-5]; + }else{ + pEntryPlayer[i] = pEntryChara[i]; + } + } + charaindex[i] = -1; + allnum = i; + for( j = 0; j < 2; j ++ ){ + pEntryEnemy = BattleArray[battleindex].Side[j].Entry; + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + enemyindex = pEntryEnemy[i].charaindex; + if( CHAR_CHECKINDEX( enemyindex ) == FALSE )continue; + + if( CHAR_getInt( enemyindex, CHAR_HP ) <= 0 + && CHAR_getFlg( enemyindex, CHAR_ISDIE ) == FALSE ){ + }else{ + continue; + } + if( proflg == 1 && side != j ){ + if( CHAR_getInt( enemyindex, CHAR_WHICHTYPE ) != CHAR_TYPEENEMY ){ + print( "\nerr: 夺取敌人以外的战利品(%s:%d)\n", + __FILE__, __LINE__ ); + } + for(item=CHAR_STARTITEMARRAY; item < CHAR_STARTITEMARRAY+10; item++){ + itemindex = CHAR_getItemIndex( enemyindex, item ); + if(ITEM_CHECKINDEX( itemindex ) == FALSE ){ + continue; + } + if( ITEM_getWorkInt( itemindex, ITEM_WORKCHARAINDEX ) <= getFdnum() ){ + print( "\nerr: 将玩家的item当做战利品(%s:%d)\n", + __FILE__, __LINE__ ); + continue; + } + CHAR_setItemIndex( enemyindex, item, -1 ); + k = RAND( 0, (allnum-1) ); + for(itemloop=0;itemloop<3;itemloop++){ + if(pEntryPlayer[k]->getitem[itemloop]==-1){ + pEntryPlayer[k]->getitem[itemloop]=itemindex; + break; + } + } + if( itemloop >= 3 ){ + if( RAND( 0, 1 ) ) { + int olditem; + int randwork = RAND( 0, 2 ); + olditem = pEntryPlayer[k]->getitem[randwork]; + pEntryPlayer[k]->getitem[randwork]=itemindex; + if( BATTLE_ItemDelCheck( olditem ) == TRUE ){ + ITEM_endExistItemsOne(olditem); + } + }else { + ITEM_endExistItemsOne(itemindex); + } + } + + } + +#define EXPGET_MAXLEVEL 5 +#define EXPGET_DIV 15 + exp = CHAR_getInt( enemyindex, CHAR_EXP ); + enemylevel = CHAR_getInt( enemyindex, CHAR_LV ); + for( k = 0; charaindex[k] != -1; k ++ ){ + int nowexp, b_level; + int ridepet; + b_level = CHAR_getInt( charaindex[k], CHAR_LV ) - enemylevel; + if( b_level <= EXPGET_MAXLEVEL ){//如 人物大怪物5以下 或怪物大於人物 + nowexp = exp; + }else{//如果人物大於怪物5以上 + b_level = EXPGET_MAXLEVEL+EXPGET_DIV - b_level; + if( b_level > EXPGET_DIV ) b_level = EXPGET_DIV; + if( b_level <= 0 ){ + nowexp = 1; + }else{ + nowexp = exp * b_level / EXPGET_DIV; + } + if( nowexp < 1 ) nowexp = 1; + } + CHAR_setWorkInt( charaindex[k], CHAR_WORKGETEXP, + CHAR_getWorkInt( charaindex[k], CHAR_WORKGETEXP ) + nowexp ); + CHAR_setInt( charaindex[k], CHAR_KILLPETCOUNT, + CHAR_getInt( charaindex[k], CHAR_KILLPETCOUNT ) + 1 ); + ridepet = BATTLE_getRidePet( charaindex[k] ); + //andy_edit + if( CHAR_CHECKINDEX( ridepet) ){ + int nowexp, b_level; + b_level = CHAR_getInt( ridepet, CHAR_LV ) - enemylevel; + if( b_level <= EXPGET_MAXLEVEL ){ + nowexp = exp; + }else{ + b_level = EXPGET_MAXLEVEL+EXPGET_DIV - b_level; + if( b_level > EXPGET_DIV ) b_level = EXPGET_DIV; + if( b_level <= 0 ){ + nowexp = 1; + }else{ + nowexp = exp * b_level / EXPGET_DIV; + } + if( nowexp < 1 ) nowexp = 1; + } + nowexp *= 0.6; + CHAR_setWorkInt( ridepet, CHAR_WORKGETEXP, + CHAR_getWorkInt( ridepet, CHAR_WORKGETEXP ) + nowexp ); + CHAR_setInt( ridepet, CHAR_KILLPETCOUNT, + CHAR_getInt( ridepet, CHAR_KILLPETCOUNT ) + 1 ); + } + if( BattleArray[battleindex].norisk == 0 + && CHAR_getInt( charaindex[k], CHAR_WHICHTYPE ) == CHAR_TYPEPET){ + if( CHAR_getInt( enemyindex, CHAR_LV ) > CHAR_getInt( charaindex[k], CHAR_LV ) ){ + CHAR_PetAddVariableAi( charaindex[k], AI_FIX_PETGOLDWIN ); + }else{ + CHAR_PetAddVariableAi( charaindex[k], AI_FIX_PETWIN ); + } + } + } + CHAR_setMaxExp( enemyindex, 0); + } + CHAR_setFlg( enemyindex, CHAR_ISDIE, 1 ); +#ifdef _PET_LIMITLEVEL + Pet_Check_Die( enemyindex ); +#endif + CHAR_setInt( enemyindex, CHAR_DEADCOUNT, + CHAR_getInt( enemyindex, CHAR_DEADCOUNT ) + 1 ); + if( pEntryEnemy[i].flg & BENT_FLG_ULTIMATE ){ + BATTLE_UltimateExtra( battleindex, charaindex[0], enemyindex ); + }else{ + BATTLE_NormalDeadExtra( battleindex, charaindex[0], enemyindex ); + } + } + } + return 0; +} + +#ifdef _PET_LIMITLEVEL +void Pet_Check_Die( int petindex ) +{ + + int LevelUpPoint; + int vital, str, tgh, dex; + float modai; + +#define RAND(x,y) ((x-1)+1+ (int)( (double)(y-(x-1))*rand()/(RAND_MAX+1.0)) ) + //玛宠死亡 扣基本属性及忠诚 + if( CHAR_getInt( petindex, CHAR_PETID) == 718 ) { + LevelUpPoint = CHAR_getInt( petindex, CHAR_ALLOCPOINT ); + vital = (( LevelUpPoint >> 24 ) & 0xff); + str = (( LevelUpPoint >> 16 ) & 0xff); + tgh = (( LevelUpPoint >> 8 ) & 0xff); + dex = (( LevelUpPoint >> 0 ) & 0xff); +// enemyindex = pEntryEnemy[i].charaindex; + + print("\n lvup <<%d %d %d %d>>", vital, str, tgh, dex ); + + vital = vital - RAND( 1, 8); + str = str - RAND( 1, 4); + tgh = tgh - RAND( 1, 4); + dex = dex - RAND( 1, 4); + print("\n lvup <<%d %d %d %d>>", vital, str, tgh, dex ); + + if( vital < 0 ) vital = 0; + if( str < 0 ) str = 0; + if( tgh < 0 ) tgh = 0; + if( dex < 0 ) dex = 0; + + if( vital > 50 ) vital = 50; + if( str > 50 ) str = 50; + if( tgh > 50 ) tgh = 50; + if( dex > 50 ) dex = 50; + LevelUpPoint = ( vital << 24 ) + ( str << 16 ) + ( tgh << 8 ) + ( dex << 0 ); + CHAR_setInt( petindex, CHAR_ALLOCPOINT , LevelUpPoint ); + print("\n lvup <<%d %d %d %d>>", vital, str, tgh, dex ); + modai = CHAR_getInt( petindex, CHAR_MODAI ); + modai = modai - ( (modai * 5) / 100 ); + CHAR_setInt( petindex, CHAR_MODAI, modai); + + LogPetPointChange( + CHAR_getChar( petindex, CHAR_OWNERCHARANAME), + CHAR_getChar( petindex, CHAR_OWNERCDKEY), + CHAR_getChar( petindex, CHAR_NAME), + petindex, 2, + CHAR_getInt( petindex, CHAR_LV), + "battle_die(战斗死亡)", + CHAR_getInt( petindex,CHAR_FLOOR), + 0, + 0 + ); + } + return; + +} +#endif + +int BATTLE_AddProfit( int battleindex, int *pBidList) +{ + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX; + + if( BattleArray[battleindex].dpbattle == 1 ){ + return BATTLE_AddDuelPoint( battleindex, pBidList ); + }else{ + return BATTLE_AddExpItem( battleindex, pBidList ); + } + +} + +int BATTLE_TargetCheck( + int battleindex, + int defNo +) +{ + int defindex = BATTLE_No2Index( battleindex, defNo ); + + if( CHAR_CHECKINDEX( defindex ) == FALSE + || CHAR_getWorkInt( defindex, CHAR_WORKBATTLEMODE ) == 0 + || CHAR_getFlg( defindex, CHAR_ISDIE ) == TRUE + || CHAR_getInt( defindex, CHAR_HP ) <= 0 + || CHAR_getFlg( defindex, CHAR_ISATTACKED ) == FALSE + || CHAR_getWorkInt( defindex, CHAR_WORKBATTLEMODE ) == BATTLE_CHARMODE_RESCUE + ){ + return FALSE; + } + return TRUE; +} + +int BATTLE_TargetCheckDead( + int battleindex, + int defNo +) +{ + int defindex = BATTLE_No2Index( battleindex, defNo ); + if( CHAR_CHECKINDEX( defindex ) == FALSE + || CHAR_getWorkInt( defindex, CHAR_WORKBATTLEMODE ) == 0 + || CHAR_getWorkInt( defindex, CHAR_WORKBATTLEMODE ) == BATTLE_CHARMODE_RESCUE + || CHAR_getFlg( defindex, CHAR_ISATTACKED ) == FALSE + || CHAR_getFlg( defindex, CHAR_ISDIE ) == FALSE ){ + //BATTLE_CHARMODE_RESCUE 5 + print("\n [ %d, %d, %d, %d]", + CHAR_getWorkInt( defindex, CHAR_WORKBATTLEMODE ), + CHAR_getWorkInt( defindex, CHAR_WORKBATTLEMODE ), + CHAR_getFlg( defindex, CHAR_ISATTACKED ), + CHAR_getFlg( defindex, CHAR_ISDIE )); + return FALSE; + } + return TRUE; +} + + + + +int BATTLE_TargetAdjust( int battleindex, int charaindex, int myside ) +{ + int defNo; + + defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); + + if( BATTLE_TargetCheck( battleindex, defNo ) == FALSE ){ + defNo = BATTLE_DefaultAttacker( battleindex, 1 - myside ); + } + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, defNo ); + + return defNo; +} + +void Compute_Down( int charaindex, int rideindex, int *down1, int *down2, int flg) +{ + int hp=0, pethp=0; + int downs = 0; + + *down1 = 0; + *down2 = 0; + //人物 + downs = + CHAR_getInt( charaindex, CHAR_VITAL ) + + CHAR_getInt( charaindex, CHAR_STR ) + + CHAR_getInt( charaindex, CHAR_DEX ) + + CHAR_getInt( charaindex, CHAR_TOUGH ); + if( (downs = (((downs/100)-20)/4)) < 1 ) + downs = 1; + hp = CHAR_getInt( charaindex, CHAR_HP ); + if( hp <= downs ) downs = hp - 1; + if( downs >= 0 ){ + hp = ((hp-downs)<1)?1:(hp-downs); + CHAR_setInt( charaindex, CHAR_HP, hp ); + *down1 = downs; + } + if( flg == -1 ) { + }else {//骑乘宠物 + if( !CHAR_CHECKINDEX( rideindex)) return; + downs = + CHAR_getInt( rideindex, CHAR_VITAL ) + + CHAR_getInt( rideindex, CHAR_STR ) + + CHAR_getInt( rideindex, CHAR_DEX ) + + CHAR_getInt( rideindex, CHAR_TOUGH ); + if( (downs = (((downs/100)-20)/4)) < 1 ) + downs = 1; + pethp = CHAR_getInt( rideindex, CHAR_HP ); + if( pethp <= downs ) downs = pethp - 1; + if( downs >= 0 ){ + pethp = ((pethp-downs)<1)?1:(pethp-downs); + + CHAR_setInt( rideindex, CHAR_HP, pethp); + *down2 = downs; + } + } +} + +#ifdef _PET_SKILL_SARS // WON ADD 毒煞蔓延 +void Compute_Down_SARS( int charaindex, int rideindex, int *down1, int *down2, int flg) +{ + int hp=0, pethp=0; + int downs = 0; + + *down1 = 0; + *down2 = 0; + //人物 +/* + downs = + CHAR_getInt( charaindex, CHAR_VITAL ) + + CHAR_getInt( charaindex, CHAR_STR ) + + CHAR_getInt( charaindex, CHAR_DEX ) + + CHAR_getInt( charaindex, CHAR_TOUGH ); + if( (downs = (((downs/100)-20)/4)) < 1 ) + downs = 1; +*/ + + hp = CHAR_getInt( charaindex, CHAR_HP ); + downs = hp * 10 / 100; + + if( hp <= downs ) downs = hp - 1; + if( downs >= 0 ){ + hp = ((hp-downs)<1)?1:(hp-downs); + CHAR_setInt( charaindex, CHAR_HP, hp ); + *down1 = downs; + } + if( flg == -1 ) { + }else {//骑乘宠物 + if( !CHAR_CHECKINDEX( rideindex)) return; + downs = + CHAR_getInt( rideindex, CHAR_VITAL ) + + CHAR_getInt( rideindex, CHAR_STR ) + + CHAR_getInt( rideindex, CHAR_DEX ) + + CHAR_getInt( rideindex, CHAR_TOUGH ); + if( (downs = (((downs/100)-20)/4)) < 1 ) + downs = 1; + pethp = CHAR_getInt( rideindex, CHAR_HP ); + if( pethp <= downs ) downs = pethp - 1; + if( downs >= 0 ){ + pethp = ((pethp-downs)<1)?1:(pethp-downs); + + CHAR_setInt( rideindex, CHAR_HP, pethp); + *down2 = downs; + } + } +} +#endif + +#ifdef _PROFESSION_ADDSKILL +void WorkIceCrackPlay(int charaindex, int cnt, int workicecracknum ) +{ + char szBuffer[256]=""; + int i,value=0; + int battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + int defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 );//defNo = BATTLE_Index2No( battleindex, charaindex ); + int ridepet = BATTLE_getRidePet( charaindex ); + int bid = BATTLE_Index2No( battleindex, charaindex ); + value = CHAR_getWorkInt( charaindex, workicecracknum ); + + if( cnt <= 0 && value > 0 ){ + int damage=0, petdamage=0; + + int ToList[SIDE_OFFSET*2+1]; + memset( ToList, -1, sizeof( ToList)); + BATTLE_MultiList( battleindex, TARGET_SIDE_1, ToList ); + // 将魔法参数代入动画 + analysis_profession_parameter( 2, 4, defNo, charaindex ); + PROFESSION_MAGIC_ATTAIC_Effect( battleindex, bid, ToList, 2); + + if( defNo == 20 || defNo == 25 || defNo == 26 )//右 + bid = 0; + else + bid = 10; + + + for( i = bid ; i < bid+10 ; i++ ) { + int defType, charaidx, petidx; + charaidx = BATTLE_No2Index( battleindex , i); + if( CHAR_CHECKINDEX( charaidx ) ){ + if( CHAR_getInt( charaidx, CHAR_HP ) > 0 ){ + int hp,pethp = 0; + petidx = BATTLE_getRidePet( charaidx ); + defType = CHAR_getInt(charaidx, CHAR_WHICHTYPE); + CHAR_setWorkInt( charaidx, workicecracknum, 0 ); + + damage = value; + + hp = CHAR_getInt( charaidx, CHAR_HP ); + if( petidx == -1 ) { + hp -= damage; + if( hp < 0 ) hp = 0; + }else { + int defquick=0, petquick=0, playerdamage=0; + pethp = CHAR_getInt( petidx, CHAR_HP ); + defquick = CHAR_getWorkInt( charaidx, CHAR_WORKDEFENCEPOWER ); + petquick = CHAR_getWorkInt( petidx, CHAR_WORKDEFENCEPOWER ); + if( pethp > 0 ){ + playerdamage = (damage*petquick)/(defquick+petquick) +1; + petdamage = damage - playerdamage +1 ; + hp -= playerdamage; + pethp -= petdamage; + }else{ + hp -= damage; + } + if( hp < 0 ) hp = 0; + if( pethp < 0 ) pethp = 0; + CHAR_setInt( petidx, CHAR_HP, pethp ); + } + + CHAR_setInt( charaidx, CHAR_HP, hp ); + + if( hp <= 0 ){ + CHAR_setFlg( charaidx, CHAR_ISDIE, 1 ); + CHAR_setWorkInt( charaidx, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + } + if( pethp <= 0 ){ + CHAR_setFlg( petidx, CHAR_ISDIE, 1 ); + CHAR_setWorkInt( ridepet, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + } + + + if( damage >= 0 ){ + sprintf( szBuffer , "%X|%X|%X|%X|" , i , i ,(int)(damage) , (int)(petdamage)); + BATTLESTR_ADD( szBuffer ); + } + if( petidx != -1 && petdamage >= 0 ){ + + } + } + } + } + sprintf( szBuffer , "%X|" , 0x5711438 ); + BATTLESTR_ADD( szBuffer ); + } +} +#endif + +static int BATTLE_StatusSeq( int charaindex ) +{ + int cnt, i, bid, battleindex, down; + char szBuffer[256]=""; +#ifdef _MAGIC_DEEPPOISON + int defNo,defindex=0; + char szCommand[1024]; +#endif + int ridepet = BATTLE_getRidePet( charaindex ); + int hp=0, pethp=0; + + + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + +#ifdef _MAGIC_DEEPPOISON + defNo = BATTLE_Index2No( battleindex, charaindex ); + defindex = BATTLE_No2Index( battleindex, defNo ); +#endif + bid = BATTLE_Index2No( battleindex, charaindex ); + if( BATTLE_CanMoveCheck( charaindex ) == FALSE ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + } + + for( i = 1; i < BATTLE_ST_END; i++ ){ + if( ( cnt = CHAR_getWorkInt( charaindex, StatusTbl[i] )) <= 0 )continue; + CHAR_setWorkInt( charaindex, StatusTbl[i], --cnt ); +#ifdef _MAGIC_WEAKEN // 虚弱 + if(CHAR_getWorkInt(charaindex,CHAR_WORKWEAKEN) > 0) + CHAR_setWorkInt( charaindex, StatusTbl[i], cnt+1 ); +#endif +#ifdef _MAGIC_BARRIER// vincent 精灵:魔障 + if(CHAR_getWorkInt(charaindex,CHAR_WORKBARRIER) > 0) + CHAR_setWorkInt( charaindex, StatusTbl[i], cnt+1 ); +#endif + + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + if( cnt <= 0 && ( StatusTbl[i] != CHAR_WORKICECRACK ) +#ifdef _PROFESSION_ADDSKILL + && ( StatusTbl[i] != CHAR_WORKICECRACK2 ) + && ( StatusTbl[i] != CHAR_WORKICECRACK3 ) + && ( StatusTbl[i] != CHAR_WORKICECRACK4 ) + && ( StatusTbl[i] != CHAR_WORKICECRACK5 ) + && ( StatusTbl[i] != CHAR_WORKICECRACK6 ) + && ( StatusTbl[i] != CHAR_WORKICECRACK7 ) + && ( StatusTbl[i] != CHAR_WORKICECRACK8 ) + && ( StatusTbl[i] != CHAR_WORKICECRACK9 ) + && ( StatusTbl[i] != CHAR_WORKICECRACK10 ) +#endif + ){ // 冰爆术 +#else + if( cnt <= 0 ){ +#endif + BATTLE_BadStatusString( bid, 0 ); + //snprintf( szBuffer, sizeof( szBuffer ), "(%s)将(%s)修理完毕。", + // CHAR_getUseName( charaindex ), aszStatusFull[i] ); + // BATTLE_BroadCast( battleindex, szBuffer, + // (bid >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; +//Terry del +// sprintf( szBuffer, "BM|%X|%X|", bid, 0 ); +// BATTLESTR_ADD( szBuffer ); +#ifdef _MAGIC_NOCAST + if( StatusTbl[i] == CHAR_WORKNOCAST ){ + lssproto_NC_send( getfdFromCharaIndex( charaindex ), 0);//复原 + } +#endif + if( StatusTbl[i] == CHAR_WORKDRUNK ){ + if( ridepet != -1 ){ + CHAR_setWorkInt( charaindex, CHAR_WORKQUICK, + CHAR_getWorkInt( charaindex, CHAR_WORKQUICK ) + + CHAR_getWorkInt( ridepet, CHAR_WORKQUICK ) ); + }else{ + CHAR_setWorkInt( charaindex, CHAR_WORKQUICK, + CHAR_getWorkInt( charaindex, CHAR_WORKQUICK ) * 2 ); + } + } + continue; + } + + switch( StatusTbl[i] ){ + + case CHAR_WORKPOISON: + { + int petdown=-1; + Compute_Down( charaindex, ridepet, &down, &petdown, ridepet); + if( down >= 0 ){ + //snprintf( szBuffer, sizeof( szBuffer ), + // "(%s)因(%s)受到(%d)的损伤。", + // CHAR_getUseName( charaindex ), + // aszStatusFull[i], + // down ); + //BATTLE_BroadCast( battleindex, szBuffer, + // (bid >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + +#ifdef _NOTRIDE_ + sprintf( szBuffer, "BD|r%X|0|0|%X|", bid, (int)(down) ); + BATTLESTR_ADD( szBuffer ); +#else + sprintf( szBuffer, "BD|r%X|0|0|%X|p%X|", bid, (int)(down), (int)(petdown) ); + BATTLESTR_ADD( szBuffer ); +#endif + } + if( ridepet != -1 && petdown >= 0 ){ + //snprintf( szBuffer, sizeof( szBuffer ), + // "(%s的骑宠)因(%s)受到(%d)的损伤。", + // CHAR_getUseName( charaindex ), + // aszStatusFull[i], petdown ); + //BATTLE_BroadCast( battleindex, szBuffer, + // (bid >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + } + } + break; +#ifdef _MAGIC_DEEPPOISON + case CHAR_WORKDEEPPOISON: + if(CHAR_getInt( defindex, CHAR_HP ) <= 1){ + snprintf( szCommand, sizeof( szCommand ),"Bd|a%X|r%X|f%X|d%X|p%X|FF|",defNo,defNo,BCF_NORMAL,1, 0 ); + BATTLESTR_ADD( szCommand ); + CHAR_setInt( defindex, CHAR_HP,0); + CHAR_setWorkInt( defindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + CHAR_setFlg( defindex, CHAR_ISDIE, 1 ); + break; + } + + if(CHAR_getWorkInt( defindex, CHAR_WORKDEEPPOISON) <= 1){ + snprintf( szCommand, sizeof( szCommand ),"Bd|a%X|r%X|f%X|d%X|p%X|FF|",defNo,defNo,BCF_NORMAL,CHAR_getInt( charaindex, CHAR_HP), 0 ); + BATTLESTR_ADD( szCommand ); + CHAR_setInt( defindex, CHAR_HP,0); + CHAR_setFlg( defindex, CHAR_ISDIE, 1 ); + CHAR_setWorkInt( defindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + sprintf(szBuffer, "%s身中剧毒未解而阵亡了!!", CHAR_getChar( defindex, CHAR_NAME )); + if( CHAR_getInt( defindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET ){ + CHAR_talkToCli( CHAR_getWorkInt(defindex, CHAR_WORKPLAYERINDEX), -1, szBuffer, CHAR_COLORYELLOW); + }else{ + CHAR_talkToCli( defindex, -1, szBuffer, CHAR_COLORYELLOW); + } + break; + } + if( ridepet == -1 ){// Robin 0728 ride Pet + down = + CHAR_getInt( charaindex, CHAR_VITAL ) + + CHAR_getInt( charaindex, CHAR_STR ) + + CHAR_getInt( charaindex, CHAR_DEX ) + + CHAR_getInt( charaindex, CHAR_TOUGH ); + down = ( down / 100 - 20 ) / 4; + if( down < 1 ) down = 1; + hp = CHAR_getInt( charaindex, CHAR_HP ); + if( hp <= down ) down = hp - 1; + if( down >= 0 ){ + CHAR_setInt( charaindex, CHAR_HP, hp - down ); + //snprintf( szBuffer, sizeof( szBuffer ), + // "(%s)因(%s)受到(%d)的损伤。", + // CHAR_getUseName( charaindex ), + // aszStatusFull[i], + // down ); + //BATTLE_BroadCast( battleindex, szBuffer, + // (bid >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; +#ifdef _NOTRIDE_ + sprintf( szBuffer, "BD|r%X|0|0|%X|", bid, (int)(down) ); + BATTLESTR_ADD( szBuffer ); +#else + sprintf( szBuffer, "BD|r%X|0|0|%X|p%X|", bid, (int)(down), 0 ); + BATTLESTR_ADD( szBuffer ); +#endif + } + break; + }else { + int petdown; + down = + CHAR_getInt( charaindex, CHAR_VITAL ) + + CHAR_getInt( charaindex, CHAR_STR ) + + CHAR_getInt( charaindex, CHAR_DEX ) + + CHAR_getInt( charaindex, CHAR_TOUGH ); + petdown = + CHAR_getInt( ridepet, CHAR_VITAL ) + + CHAR_getInt( ridepet, CHAR_STR ) + + CHAR_getInt( ridepet, CHAR_DEX ) + + CHAR_getInt( ridepet, CHAR_TOUGH ); + down = ( down / 100 - 20 ) / 4; + petdown = ( petdown / 100 - 20 ) /4; + if( down < 1 ) down = 1; + if( petdown < 1 ) petdown = 1; + hp = CHAR_getInt( charaindex, CHAR_HP ); + pethp = CHAR_getInt( ridepet, CHAR_HP ); + if( hp <= down ) down = hp - 1; + if( pethp <= petdown ) petdown = pethp - 1; + if( down >= 0 ){ + CHAR_setInt( charaindex, CHAR_HP, hp - down ); + //snprintf( szBuffer, sizeof( szBuffer ), + // "(%s)因(%s)受到(%d)的损伤。", + // CHAR_getUseName( charaindex ), + // aszStatusFull[i], + // down ); + //BATTLE_BroadCast( battleindex, szBuffer, + // (bid >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + #ifdef _NOTRIDE_ + sprintf( szBuffer, "BD|r%X|0|0|%X|", bid, (int)(down) ); + BATTLESTR_ADD( szBuffer ); + #else + sprintf( szBuffer, "BD|r%X|0|0|%X|p%X|", bid, (int)(down), (int)(petdown) ); + BATTLESTR_ADD( szBuffer ); + #endif + } + if( petdown >= 0 ){ + CHAR_setInt( ridepet, CHAR_HP, pethp - petdown ); + //snprintf( szBuffer, sizeof( szBuffer ), + // "(%s的骑宠)因(%s)受到(%d)的损伤。", + // CHAR_getUseName( charaindex ), + // aszStatusFull[i], + // petdown ); + //BATTLE_BroadCast( battleindex, szBuffer, + // (bid >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + } + break; + } +#endif +#ifdef _MAGIC_NOCAST // 精灵:沉默 + case CHAR_WORKNOCAST: + lssproto_NC_send( getfdFromCharaIndex( charaindex ), 1);//沉默 + break; +#endif + case CHAR_WORKCONFUSION: + { int side, pos, defNo, lop; + if( RAND( 1, 100 ) > 80 ){ + break; + } + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_ATTACK ); + side = RAND( 0, 1 ); + pos = RAND( 0, 9 ); + for( lop = 0; lop < SIDE_OFFSET; lop ++ ){ + if( ++pos >= SIDE_OFFSET )pos = 0; + defNo = side * SIDE_OFFSET + pos; + if( defNo == bid ) continue; + if( BATTLE_TargetCheck( battleindex, defNo ) == TRUE ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, defNo ); + break; + } + } + if( lop >= SIDE_OFFSET ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, -1 ); + } + } + break; +#ifdef _PROFESSION_ADDSKILL + case CHAR_WORKANNEX://附身术 + { int side, pos, defNo, lop; + + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_ATTACK ); + side = RAND( 0, 1 ); + pos = RAND( 0, 9 ); + for( lop = 0; lop < SIDE_OFFSET; lop ++ ){ + if( ++pos >= SIDE_OFFSET )pos = 0; + defNo = side * SIDE_OFFSET + pos; + if( defNo == bid ) continue; + if( BATTLE_TargetCheck( battleindex, defNo ) == TRUE ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, defNo ); + break; + } + } + if( lop >= SIDE_OFFSET ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, -1 ); + } + + } + break; +#endif + case CHAR_WORKDRUNK: + break; + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + case CHAR_WORKOBLIVION: // 遗忘 + { + // 恢复技能 + if( cnt <= 1 ){ + int defNo = BATTLE_Index2No( battleindex, charaindex ); + int toNo = defNo - 5; + int toNoindex = -1, pet_no = -1; + char msg[20]; + + memset( msg, -1, sizeof(msg) ); + + // 主人index + toNoindex = BATTLE_No2Index( battleindex, toNo ); + CHAR_setWorkInt(charaindex, StatusTbl[BATTLE_ST_OBLIVION], 0 ); + + // 宠物编号 + pet_no = CHAR_getInt( toNoindex, CHAR_DEFAULTPET ); + sprintf( msg, "W%d", pet_no ); + + CHAR_sendStatusString( toNoindex, msg ); + + + BATTLE_BadStatusString( bid, 0 ); + sprintf( szBuffer, "BM|%X|%X|", bid, 0 ); + BATTLESTR_ADD( szBuffer ); + } + break; + } + case CHAR_WORK_F_ENCLOSE: // 火附体 + { + int ToList[SIDE_OFFSET*2+1]; + int defNo = BATTLE_Index2No( battleindex, charaindex ); + int old_hp = CHAR_getInt( charaindex, CHAR_HP ); + int dec_hp = 0, hp = 0; + int DAMAGE = 50; + + memset( ToList, -1, sizeof( ToList)); + BATTLE_MultiList( battleindex, defNo, ToList ); + BATTLE_MagicEffect( battleindex, defNo, ToList, 101699, 101699 ); + + // 取魔法伤害值 + DAMAGE = DAMAGE * cnt; +#ifdef _PROFESSION_ADDSKILL + dec_hp = PROFESSION_MAGIC_GET_DAMAGE( charaindex, charaindex, 1, DAMAGE, 0); +#else + dec_hp = PROFESSION_MAGIC_GET_DAMAGE( charaindex, charaindex, 1, DAMAGE ); +#endif + hp = old_hp - dec_hp; + + if( hp <= 0 ){ + CHAR_setInt( charaindex, CHAR_HP, 0 ); + CHAR_setFlg( charaindex, CHAR_ISDIE, 1 ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + }else{ + CHAR_setInt( charaindex, CHAR_HP, hp ); + } + + sprintf( szCommand, "BD|r%X|0|0|%X|", defNo, dec_hp ); + BATTLESTR_ADD( szCommand ); + + break; + } + case CHAR_WORK_I_ENCLOSE: // 冰附体 + { + int old_dex = CHAR_getInt( charaindex, CHAR_DEX ); + int dex = 0; + int ToList[SIDE_OFFSET*2+1]; + int defNo = BATTLE_Index2No( battleindex, charaindex ); + + memset( ToList, -1, sizeof( ToList)); + BATTLE_MultiList( battleindex, defNo, ToList ); + BATTLE_MagicEffect( battleindex, defNo, ToList, 27692, 101700 ); + + dex = old_dex * 0.9; + CHAR_setWorkInt(charaindex,CHAR_WORKFIXDEX, dex ); + sprintf( szCommand, "BD|r%X|0|6|%X|", defNo, (-1) * (int)((old_dex * 0.1) / 100) ); + BATTLESTR_ADD( szCommand ); + + break; + } + case CHAR_WORKRESIST_F: // 火抗性提升 + { + // 恢复抗性 + if( cnt <= 1 ){ + int add_value = 0; + int old_value = 0; + old_value = CHAR_getWorkInt( charaindex, CHAR_WORK_F_RESIST ); + add_value = CHAR_getWorkInt( charaindex, CHAR_WORKMODRESIST_F ); + + CHAR_setWorkInt( charaindex, CHAR_WORK_F_RESIST, old_value - add_value ); + CHAR_talkToCli( charaindex, -1 , "火抗性恢复" , CHAR_COLORYELLOW ); + } + break; + } + case CHAR_WORKRESIST_I: // 冰抗性提升 + { + // 恢复抗性 + if( cnt <= 1 ){ + int add_value = 0; + int old_value = 0; + old_value = CHAR_getWorkInt( charaindex, CHAR_WORK_I_RESIST ); + add_value = CHAR_getWorkInt( charaindex, CHAR_WORKMODRESIST_I ); + + CHAR_setWorkInt( charaindex, CHAR_WORK_I_RESIST, old_value - add_value ); + CHAR_talkToCli( charaindex, -1 , "冰抗性恢复" , CHAR_COLORYELLOW ); + } + + break; + } + case CHAR_WORKRESIST_T: // 雷抗性提升 + { + // 恢复抗性 + if( cnt <= 1 ){ + int add_value = 0; + int old_value = 0; + old_value = CHAR_getWorkInt( charaindex, CHAR_WORK_T_RESIST ); + add_value = CHAR_getWorkInt( charaindex, CHAR_WORKMODRESIST_T ); + + CHAR_setWorkInt( charaindex, CHAR_WORK_T_RESIST, old_value - add_value ); + CHAR_talkToCli( charaindex, -1 , "雷抗性恢复" , CHAR_COLORYELLOW ); + } + + break; + } +#ifdef _PROFESSION_ADDSKILL +/* case CHAR_WORKERSIST_F_I_T: // 提升火冰雷抗性 + { + // 恢复抗性 + if( cnt <= 1 ){ + int add_value = 0; + int old_value = 0; + old_value = CHAR_getWorkInt( charaindex, CHAR_WORK_F_RESIST ); + add_value = CHAR_getWorkInt( charaindex, CHAR_WORKMODRESIST_F ); + CHAR_setWorkInt( charaindex, CHAR_WORK_F_RESIST, old_value - add_value ); + CHAR_talkToCli( charaindex, -1 , "火抗性恢复" , CHAR_COLORYELLOW ); + + old_value = CHAR_getWorkInt( charaindex, CHAR_WORK_I_RESIST ); + add_value = CHAR_getWorkInt( charaindex, CHAR_WORKMODRESIST_I ); + CHAR_setWorkInt( charaindex, CHAR_WORK_I_RESIST, old_value - add_value ); + CHAR_talkToCli( charaindex, -1 , "冰抗性恢复" , CHAR_COLORYELLOW ); + + old_value = CHAR_getWorkInt( charaindex, CHAR_WORK_T_RESIST ); + add_value = CHAR_getWorkInt( charaindex, CHAR_WORKMODRESIST_T ); + CHAR_setWorkInt( charaindex, CHAR_WORK_T_RESIST, old_value - add_value ); + CHAR_talkToCli( charaindex, -1 , "雷抗性恢复" , CHAR_COLORYELLOW ); + } + + break; + }*/ + case CHAR_WORKFEAR: + if( cnt <= 0 ) + CHAR_talkToCli( charaindex, -1 , "攻、防、敏恢复" , CHAR_COLORYELLOW ); + break; +#endif + case CHAR_WORKINSTIGATE: // 挑拨 + { + int side, pos, defNo, lop, rate=0; + if( RAND( 1, 100 ) > 80 ){ + break; + } + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_ATTACK ); + side = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLESIDE ); + + rate = CHAR_getWorkInt( charaindex, CHAR_WORKMODINSTIGATE); + + CHAR_setWorkInt( charaindex, CHAR_WORKFIXSTR, (CHAR_getWorkInt( charaindex, CHAR_WORKFIXSTR) * (100 - rate) /100 )); + CHAR_setWorkInt( charaindex, CHAR_WORKFIXTOUGH, (CHAR_getWorkInt( charaindex, CHAR_WORKFIXTOUGH) * (100 - rate) /100 )); + CHAR_setWorkInt( charaindex, CHAR_WORKFIXDEX, (CHAR_getWorkInt( charaindex, CHAR_WORKFIXDEX) * (100 - rate) /100 )); + + pos = RAND( 0, 9 ); + for( lop = 0; lop < SIDE_OFFSET; lop ++ ){ + if( ++pos >= SIDE_OFFSET )pos = 0; + defNo = side * SIDE_OFFSET + pos; + if( defNo == bid ) continue; + if( BATTLE_TargetCheck( battleindex, defNo ) == TRUE ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, defNo ); + break; + } + } + if( lop >= SIDE_OFFSET ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, -1 ); + } + break; + } +/* + case CHAR_WORK_FOCUS: // 专注战斗 + { + if( cnt <= 1 ){ + int atk_to_index = CHAR_getWorkInt( charaindex, CHAR_WORKMOD_FOCUS ); + int atk_to_no = BATTLE_Index2No( battleindex, atk_to_index ); + + if( BATTLE_TargetCheck( battleindex, atk_to_no ) != TRUE ) break; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_ATTACK ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, atk_to_no ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, 1 ); + } + break; + } +*/ + case CHAR_WORKSIGN: // 一针见血 + { + // 吸血 + int skill_level = CHAR_getWorkInt( charaindex, CHAR_WORKMODSIGN ); + int old_hp = CHAR_getInt( charaindex, CHAR_HP ); + int old_mp = CHAR_getInt( charaindex, CHAR_MP ); + int to_index = CHAR_getWorkInt( charaindex, CHAR_WORKSIGNID ); + int to_old_hp = CHAR_getInt( to_index, CHAR_HP ); + int to_old_mp = CHAR_getInt( to_index, CHAR_MP ); + int dec_hp=0, dec_mp=0, rate=0, hp=0, mp=0, add_hp=0, add_mp=0; + + if( old_hp <= 0 ) break; + +#ifdef _PROFESSION_ADDSKILL + if( skill_level >= 10 ){ + dec_hp = 200; + dec_mp = 30; + }else if( skill_level > 6 ){ + dec_hp = 150; + dec_mp = 20; + }else if( skill_level > 3 ){ + dec_hp = 100; + dec_mp = 15; + }else{ + dec_hp = 50; + dec_mp = 10; + } + // 增加hp + if( skill_level > 8 ) rate = 100; + else if( skill_level > 7 ) rate = 50; + else rate = 0; + add_hp = dec_hp * rate / 100; + + // 增加mp + if( skill_level > 8 ) rate = 100; + else rate = 0; + add_mp = dec_mp * rate / 100; + +#else + if( skill_level >= 10 ){ + dec_hp = 300; + dec_mp = 70; + }else if( skill_level >= 9 ){ + dec_hp = 200; + dec_mp = 50; + }else if( skill_level >= 7 ){ + dec_hp = 150; + dec_mp = 30; + }else if( skill_level >= 4 ){ + dec_hp = 100; + dec_mp = 20; + }else{ + dec_hp = 50; + dec_mp = 10; + } + // 增加hp + if( skill_level >= 9 ) rate = 80; + else if( skill_level >= 7 ) rate = (skill_level - 1 ) * 10; + else if( skill_level >= 4 ) rate = (skill_level - 2 ) * 10; + else rate = skill_level * 10; + add_hp = dec_hp * rate / 100; + + // 增加mp + if( skill_level >= 9 ) rate = 100; + else if( skill_level >= 7 ) rate = (skill_level - 1 ) * 10; + else if( skill_level >= 4 ) rate = (skill_level - 2 ) * 10; + else rate = skill_level * 10; + add_mp = dec_mp * rate / 100; +#endif + + // 中嗜血蛊的人减 HP + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + mp = old_mp - dec_mp; + if( mp < 0 ){ + mp = 0; + add_mp=0; + } + CHAR_setInt(charaindex, CHAR_MP, mp); + } + + // 中嗜血蛊的人减 HP + if( ridepet == -1 ) { + hp = old_hp - dec_hp; + if( hp < 0 ) hp = 0; + CHAR_setInt(charaindex, CHAR_HP, hp); + sprintf( szCommand, "BD|r%X|0|0|%X|m%X|", bid, dec_hp, dec_mp ); + }else{ + int pet_old_hp = CHAR_getInt( ridepet, CHAR_HP ); + int pet_hp=0; + + dec_hp /= 2; + hp = old_hp - dec_hp; + pet_hp = pet_old_hp - dec_hp; + + if( hp < 0 ) hp = 0; + if( pet_hp < 0 ) pet_hp = 0; + + CHAR_setInt(charaindex, CHAR_HP, hp); + CHAR_setInt(ridepet, CHAR_HP, pet_hp); + if( pet_hp <= 0 ){ + CHAR_setFlg( ridepet, CHAR_ISDIE, 1 ); + CHAR_setWorkInt( ridepet, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + } + sprintf( szCommand, "BD|r%X|0|0|%X|m%X|p%X|", bid, dec_hp, dec_mp, dec_hp ); + } + + if( hp <= 0 ){ + CHAR_setFlg( charaindex, CHAR_ISDIE, 1 ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + } + + BATTLESTR_ADD( szCommand ); + + // 使用嗜血蛊的人加 HP、MP + if( (add_hp > 0) && (to_old_hp > 0) ){ + int to_bid=0, to_hp=0, to_mp=0; + + to_bid = BATTLE_Index2No( battleindex, to_index ); + sprintf( szCommand, "BD|r%X|0|1|%X|m%X|", to_bid, add_hp, add_mp ); + BATTLESTR_ADD( szCommand ); + + to_hp = to_old_hp + add_hp; + if( to_hp > CHAR_getWorkInt( to_index , CHAR_WORKMAXHP ) ) + to_hp = CHAR_getWorkInt( to_index , CHAR_WORKMAXHP ); + + to_mp = to_old_mp + add_mp; + if( to_mp > CHAR_getWorkInt( to_index , CHAR_WORKMAXMP ) ) + to_mp = CHAR_getWorkInt( to_index , CHAR_WORKMAXMP ); + + CHAR_setInt(to_index, CHAR_HP, to_hp); + CHAR_setInt(to_index, CHAR_MP, to_mp); + } + + break; + } + case CHAR_WORKBLOODWORMS: // 嗜血蛊 + { + // 吸血 + int skill_level = CHAR_getWorkInt( charaindex, CHAR_WORKMODBLOODWORMS ); + int old_hp = CHAR_getInt( charaindex, CHAR_HP ); + int to_index = CHAR_getWorkInt( charaindex, CHAR_WORKBLOODWORMSID ); + int to_old_hp = CHAR_getInt( to_index, CHAR_HP ); + int dec_hp=0, rate=0, hp=0, add_hp=0; + + skill_level = PROFESSION_CHANGE_SKILL_LEVEL_M( skill_level ); + + if( old_hp <= 0 ) break; + + dec_hp = skill_level * 10 + 30; + if( skill_level >= 10 ) rate = 20; + else if( skill_level >= 7 ) rate = 15; + else if( skill_level >= 5 ) rate = 10; + else rate = 5; + + add_hp = dec_hp * rate / 100; + + // 中嗜血蛊的人减 HP + if( ridepet == -1 ) { + hp = old_hp - dec_hp; + if( hp < 0 ) hp = 0; + + CHAR_setInt(charaindex, CHAR_HP, hp); + sprintf( szCommand, "BD|r%X|0|0|%X|", bid, dec_hp ); + }else{ + int pet_old_hp = CHAR_getInt( ridepet, CHAR_HP ); + int pet_hp=0; + + dec_hp /= 2; + hp = old_hp - dec_hp; + pet_hp = pet_old_hp - dec_hp; + + if( hp < 0 ) hp = 0; + if( pet_hp < 0 ) pet_hp = 0; + + CHAR_setInt(charaindex, CHAR_HP, hp); + CHAR_setInt(ridepet, CHAR_HP, pet_hp); + if( pet_hp == 0 ){ + CHAR_setFlg( ridepet, CHAR_ISDIE, 1 ); + CHAR_setWorkInt( ridepet, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + } + sprintf( szCommand, "BD|r%X|0|0|%X|p%X|", bid, dec_hp, dec_hp ); + } + + if( hp <= 0 ){ + CHAR_setFlg( charaindex, CHAR_ISDIE, 1 ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + } + + BATTLESTR_ADD( szCommand ); + + // 使用嗜血蛊的人加 HP + if( (add_hp > 0) && (to_old_hp > 0) ){ + int to_bid=0, to_hp=0; + + to_bid = BATTLE_Index2No( battleindex, to_index ); + sprintf( szCommand, "BD|r%X|0|1|%X|", to_bid, add_hp ); + BATTLESTR_ADD( szCommand ); + + to_hp = to_old_hp + add_hp; + if( to_hp > CHAR_getWorkInt( to_index , CHAR_WORKMAXHP ) ) + to_hp = CHAR_getWorkInt( to_index , CHAR_WORKMAXHP ); + + CHAR_setInt(to_index, CHAR_HP, to_hp); + } + + break; + } + case CHAR_WORKICEARROW: // 冰箭 + { + // 减敏 + int dec_dex = CHAR_getWorkInt( charaindex, CHAR_WORKMODICEARROW ); + int old_dex = CHAR_getWorkInt( charaindex, CHAR_WORKFIXDEX ); + int dex=0; + + dex = old_dex * ( 100 - dec_dex ) / 100; + CHAR_setWorkInt(charaindex,CHAR_WORKFIXDEX, dex); + sprintf( szCommand, "BD|r%X|0|6|%X|", bid, (-1) * dec_dex ); + + BATTLESTR_ADD( szCommand ); + + break; + } + case CHAR_WORKICECRACK: // 冰爆术 + { + int value=0; + int defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 );//defNo = BATTLE_Index2No( battleindex, charaindex ); + + value = CHAR_getWorkInt( charaindex, CHAR_WORKMODICECRACK ); + + if( cnt <= 0 && value > 0 ){ + int damage=0, petdamage=0; + + int ToList[SIDE_OFFSET*2+1]; + memset( ToList, -1, sizeof( ToList)); + BATTLE_MultiList( battleindex, TARGET_SIDE_1, ToList ); + // 将魔法参数代入动画 + analysis_profession_parameter( 2, 4, defNo, charaindex ); + PROFESSION_MAGIC_ATTAIC_Effect( battleindex, bid, ToList, 2); + + if( defNo == 20 || defNo == 25 || defNo == 26 )//右 + bid = 0; + else + bid = 10; + + + for( i = bid ; i < bid+10 ; i++ ) { + int defType, charaidx, petidx; + charaidx = BATTLE_No2Index( battleindex , i); + if( CHAR_CHECKINDEX( charaidx ) ){ + if( CHAR_getInt( charaidx, CHAR_HP ) > 0 ){ + petidx = BATTLE_getRidePet( charaidx ); + defType = CHAR_getInt(charaidx, CHAR_WHICHTYPE); + CHAR_setWorkInt( charaidx, CHAR_WORKICECRACK, 0 ); + //BATTLE_BadStatusString( bid, 0 ); + //snprintf( szBuffer, sizeof( szBuffer ), "(%s)将(%s)修理完毕。", + // CHAR_getUseName( charaindex ), aszStatusFull[i] ); + // BATTLE_BroadCast( battleindex, szBuffer, + // (bid >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + //sprintf( szBuffer, "BM|%X|%X|", bid, 0 ); + //BATTLESTR_ADD( szBuffer ); + + damage = value; + + hp = CHAR_getInt( charaidx, CHAR_HP ); + if( petidx == -1 ) { + hp -= damage; + if( hp < 0 ) hp = 0; + } + else{ + int defquick=0, petquick=0, playerdamage=0; + pethp = CHAR_getInt( petidx, CHAR_HP ); + defquick = CHAR_getWorkInt( charaidx, CHAR_WORKDEFENCEPOWER ); + petquick = CHAR_getWorkInt( petidx, CHAR_WORKDEFENCEPOWER ); + if( pethp > 0 ){ + playerdamage = (damage*petquick)/(defquick+petquick) +1; + petdamage = damage - playerdamage +1 ; + hp -= playerdamage; + pethp -= petdamage; + } + else{ + hp -= damage; + } + if( hp < 0 ) hp = 0; + if( pethp < 0 ) pethp = 0; + CHAR_setInt( petidx, CHAR_HP, pethp ); + } + + CHAR_setInt( charaidx, CHAR_HP, hp ); + + if( hp <= 0 ){ + CHAR_setFlg( charaidx, CHAR_ISDIE, 1 ); + CHAR_setWorkInt( charaidx, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + } + if( pethp <= 0 ){ + CHAR_setFlg( petidx, CHAR_ISDIE, 1 ); + CHAR_setWorkInt( ridepet, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + } + + if( damage >= 0 ){ + //snprintf( szBuffer, sizeof( szBuffer ), + // "(%s)因(%s)受到(%d)的损伤。", + // CHAR_getUseName( charaindex ), + // aszStatusFull[i], + // damage ); + //BATTLE_BroadCast( battleindex, szBuffer, + // (bid >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + + sprintf( szBuffer , "%X|%X|%X|%X|" , i , i ,(int)(damage) , (int)(petdamage)); + + //sprintf( szBuffer, "BD|r%X|0|0|%X|p%X|", i, (int)(damage), (int)(petdamage) ); + BATTLESTR_ADD( szBuffer ); + } + if( petidx != -1 && petdamage >= 0 ){ + //snprintf( szBuffer, sizeof( szBuffer ), + // "(%s的骑宠)因(%s)受到(%d)的损伤。", + // CHAR_getUseName( charaindex ), + // aszStatusFull[i], petdamage ); + //BATTLE_BroadCast( battleindex, szBuffer, + // (bid >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + } + } + } + } + sprintf( szBuffer , "%X|" , 0x5711438 ); + BATTLESTR_ADD( szBuffer ); + } + } + print("\n冰爆术"); + break; +#ifdef _PROFESSION_ADDSKILL + case CHAR_WORKICECRACK2: // 冰爆术2 + WorkIceCrackPlay( charaindex, cnt, CHAR_WORKICECRACK2 );print("\n冰爆术2");break; + case CHAR_WORKICECRACK3: // 冰爆术3 + WorkIceCrackPlay( charaindex, cnt, CHAR_WORKICECRACK3 );print("\n冰爆术3");break; + case CHAR_WORKICECRACK4: // 冰爆术4 + WorkIceCrackPlay( charaindex, cnt, CHAR_WORKICECRACK4 );print("\n冰爆术4");break; + case CHAR_WORKICECRACK5: // 冰爆术5 + WorkIceCrackPlay( charaindex, cnt, CHAR_WORKICECRACK5 );print("\n冰爆术5");break; + case CHAR_WORKICECRACK6: // 冰爆术6 + WorkIceCrackPlay( charaindex, cnt, CHAR_WORKICECRACK6 );print("\n冰爆术6");break; + case CHAR_WORKICECRACK7: // 冰爆术7 + WorkIceCrackPlay( charaindex, cnt, CHAR_WORKICECRACK7 );print("\n冰爆术7");break; + case CHAR_WORKICECRACK8: // 冰爆术8 + WorkIceCrackPlay( charaindex, cnt, CHAR_WORKICECRACK8 );print("\n冰爆术8");break; + case CHAR_WORKICECRACK9: // 冰爆术9 + WorkIceCrackPlay( charaindex, cnt, CHAR_WORKICECRACK9 );print("\n冰爆术9");break; + case CHAR_WORKICECRACK10: // 冰爆术10 + WorkIceCrackPlay( charaindex, cnt, CHAR_WORKICECRACK10 );print("\n冰爆术10");break; +#endif //_PROFESSION_ADDSKILL + +#endif + +#ifdef _PET_SKILL_SARS // WON ADD 毒煞蔓延 + case CHAR_WORKSARS: + { + int j; + int rate = 60; // 传染 SARS 机率 + + // 受传染的人受伤 + { + int petdown=-1; + int dec_mp = 0; + + Compute_Down_SARS( charaindex, ridepet, &down, &petdown, ridepet); + if( down >= 0 ){ + //snprintf( szBuffer, sizeof( szBuffer ), + // "(%s)因(%s)受到(%d)的损伤。", + // CHAR_getUseName( charaindex ), + // aszStatusFull[i], + // down ); + //BATTLE_BroadCast( battleindex, szBuffer, + // (bid >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + + // 如果是玩家扣 MP + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + int old_mp = CHAR_getInt( charaindex, CHAR_MP ); + dec_mp = old_mp / 10 ; + if( dec_mp < 0 ) dec_mp = 0; + CHAR_setInt( charaindex, CHAR_MP, old_mp - dec_mp ); + sprintf( szBuffer, "BD|r%X|0|0|%X|p%X|m%X|", bid, (int)(down), (int)(petdown), dec_mp ); + }else + sprintf( szBuffer, "BD|r%X|0|0|%X|p%X|", bid, (int)(down), (int)(petdown) ); + + BATTLESTR_ADD( szBuffer ); + } + if( ridepet != -1 && petdown >= 0 ){ + //snprintf( szBuffer, sizeof( szBuffer ), + // "(%s的骑宠)因(%s)受到(%d)的损伤。", + // CHAR_getUseName( charaindex ), + // aszStatusFull[i], petdown ); + //BATTLE_BroadCast( battleindex, szBuffer, + // (bid >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + } + } + + // 主传染者传SARS + if( CHAR_getWorkInt( charaindex, CHAR_WORKMODSARS ) > 0 ){ + int buf2[5], ti=0; + int tibuf[10]={ + 3,1,0,2,4, + 8,6,5,7,9 }; + + memset( buf2, -1, sizeof(buf2)); + + if( defNo > 9 ){ + for( j=0; j<10; j++ ){ + tibuf[j] += 10; + } + } + + for( j=0; j<10; j++){ + if( tibuf[j] != defNo ) continue; + if( j > 4 ){ + if( (j+1) < 10 ) buf2[ti++]=tibuf[j+1]; + if( (j-1) > 4 ) buf2[ti++]=tibuf[j-1]; + //不等边 + if( (j-5+1) < 5 ) buf2[ti++]=tibuf[j-5+1]; + if( (j-5-1) >= 0 ) buf2[ti++]=tibuf[j-5-1]; + if( (j-5) >= 0 ) buf2[ti++]=tibuf[j-5]; + }else{ + if( (j+1) < 5 ) buf2[ti++]=tibuf[j+1]; + if( (j-1) >= 0 ) buf2[ti++]=tibuf[j-1]; + //不等边 + if( (j+5+1) < 10 ) buf2[ti++]=tibuf[j+5+1]; + if( (j+5-1) > 4 ) buf2[ti++]=tibuf[j+5-1]; + if( (j+5) < 10 ) buf2[ti++]=tibuf[j+5]; + } + break; + } + + print("buf2[%d,%d,%d,%d,%d]\n", buf2[0], buf2[1], buf2[2], buf2[3], buf2[4]); + + for( j=0; j<5; j++ ){ + + int toindex = 0; + if( buf2[j] == -1 ) continue; + + toindex = BATTLE_No2Index( battleindex, buf2[j] ); + + // 得到sars的离开 + if( CHAR_getWorkInt( toindex,CHAR_WORKSARS ) > 0 ) continue; + + if( RAND( 1, 100 ) <= rate ){ // 中 SARS + if( toindex == charaindex ) continue; + if( CHAR_getInt( toindex, CHAR_HP ) <= 0 ) continue; + + CHAR_setWorkInt( toindex,CHAR_WORKSARS, 3 ); + } + } + } + } + break; +#endif + + default : + //snprintf( szBuffer, sizeof( szBuffer ), + // "(%s)是(%s)", CHAR_getUseName( charaindex ), + // aszStatusFull[i] ); + //BATTLE_BroadCast( battleindex, szBuffer, + // (bid >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + break; + } + } + +#ifdef _SUIT_ITEM + { + int defCode; + int AddHp=0, AddMp=0; +#ifdef _IMPRECATE_ITEM + int nums1, nums2, nums3, delMp=0; +#endif + if( (defCode=CHAR_getWorkInt( charaindex, CHAR_WORKSUITITEM)) > 0){ + AddHp = CHAR_getWorkInt( charaindex, CHAR_WORKROUNDHP); + AddMp = CHAR_getWorkInt( charaindex, CHAR_WORKROUNDMP); + } + +#ifdef _IMPRECATE_ITEM + if( (nums1 = CHAR_getWorkInt( charaindex, CHAR_WORKIMPRECATENUM1)) > 0 ){ + delMp = CHAR_getWorkInt( charaindex, CHAR_WORKHURTMP); + CHAR_setWorkInt( charaindex, CHAR_WORKIMPRECATENUM1, nums1-1); + } + if( (nums2 = CHAR_getWorkInt( charaindex, CHAR_WORKIMPRECATENUM2)) > 0 ){ + AddHp += CHAR_getWorkInt( charaindex, CHAR_WORKWISHESHP); + CHAR_setWorkInt( charaindex, CHAR_WORKIMPRECATENUM2, nums2-1); + } + if( (nums3 = CHAR_getWorkInt( charaindex, CHAR_WORKIMPRECATENUM3)) > 0 ){ + AddMp += CHAR_getWorkInt( charaindex, CHAR_WORKWISHESMP); + CHAR_setWorkInt( charaindex, CHAR_WORKIMPRECATENUM3, nums3-1); + } + AddMp = AddMp - delMp; +#endif + if( AddHp != 0 || AddMp != 0 ) { + int AddPHp=0; + + +#ifdef _TYPE_TOXICATION + if( AddHp != 0 && CHAR_CanCureFlg( charaindex, "FALSE") != FALSE ){ +#else + if( AddHp != 0 ) { +#endif + int MyHp = CHAR_getInt( charaindex, CHAR_HP); + int MaxHp = CHAR_getWorkInt( charaindex, CHAR_WORKMAXHP); + MyHp = ((MyHp+AddHp)>=MaxHp)?MaxHp:(MyHp+AddHp); + MyHp = (MyHp<= 1 )?1:MyHp; + CHAR_setInt( charaindex, CHAR_HP, MyHp); + //snprintf( szBuffer, sizeof( szBuffer ), "(%s)增加(%d)的HP。", + // CHAR_getUseName( charaindex ), AddHp ); + //BATTLE_BroadCast( battleindex, szBuffer, + // (bid >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + if( ridepet != -1 ){ + int PetMaxHp = CHAR_getWorkInt( ridepet, CHAR_WORKMAXHP); + int PetHp = CHAR_getInt( ridepet, CHAR_HP); + AddPHp = AddHp; + PetHp = ((PetHp+AddPHp)>=PetMaxHp)?PetMaxHp:(PetHp+AddPHp); + PetHp = (PetHp<=1)?1:PetHp; + CHAR_setInt( ridepet, CHAR_HP, PetHp); + } + } + if( AddMp != 0 ) { + int MyMp = CHAR_getInt( charaindex, CHAR_MP); + int MaxMp = CHAR_getWorkInt( charaindex, CHAR_WORKMAXMP); + MyMp = ((MyMp+AddMp)>MaxMp)?MaxMp:(MyMp+AddMp); + MyMp = (MyMp<0)?0:MyMp; + CHAR_setInt( charaindex, CHAR_MP, MyMp); +/* +#ifdef _FIXITEMANISHOW + sprintf( szBuffer, "BD|r%X|0|1|%X|p%X|m%X|", bid, AddHp, AddPHp, AddMp); + }else { + sprintf( szBuffer, "BD|r%X|0|1|%X|p%X|", bid, AddHp, AddPHp ); +#else +*/ + sprintf( szBuffer, "BD|r%X|0|2|%X|p%X|m%X|", bid, AddHp, AddPHp, AddMp); + }else { + sprintf( szBuffer, "BD|r%X|0|2|%X|p%X|", bid, AddHp, AddPHp ); +//#endif + } + BATTLESTR_ADD( szBuffer ); + } + } +#endif +#ifdef _PETSKILL_SETDUCK + { + int turns=0, nums=0; + if( (turns=CHAR_getWorkInt( charaindex, CHAR_MYSKILLDUCK)) > 0 ){ + turns--; + if( turns == 0 ){ + nums = CHAR_getWorkInt( charaindex, CHAR_MYSKILLDUCKPOWER); + sprintf( szBuffer, "BD|r%X|0|3|%X|", bid, nums*(-1)); + BATTLESTR_ADD( szBuffer ); + } + CHAR_setWorkInt( charaindex, CHAR_MYSKILLDUCK, turns); + } +#ifdef _MAGICPET_SKILL + if( (turns=CHAR_getWorkInt( charaindex, CHAR_MYSKILLSTR)) > 0 ){ + turns--; + if( turns == 0 ){ + nums = CHAR_getWorkInt( charaindex, CHAR_MYSKILLSTRPOWER); + sprintf( szBuffer, "BD|r%X|0|4|%X|", bid, nums*(-1)); + BATTLESTR_ADD( szBuffer ); + } + CHAR_setWorkInt( charaindex, CHAR_MYSKILLSTR, turns); + } + if( (turns=CHAR_getWorkInt( charaindex, CHAR_MYSKILLTGH)) > 0 ){ + turns--; + if( turns == 0 ){ + nums = CHAR_getWorkInt( charaindex, CHAR_MYSKILLTGHPOWER); + sprintf( szBuffer, "BD|r%X|0|5|%X|", bid, nums*(-1)); + BATTLESTR_ADD( szBuffer ); + } + CHAR_setWorkInt( charaindex, CHAR_MYSKILLTGH, turns); + } + if( (turns=CHAR_getWorkInt( charaindex, CHAR_MYSKILLDEX)) > 0 ){ + turns--; + if( turns == 0 ){ + nums = CHAR_getWorkInt( charaindex, CHAR_MYSKILLDEXPOWER); + sprintf( szBuffer, "BD|r%X|0|6|%X|", bid, nums*(-1)); + BATTLESTR_ADD( szBuffer ); + } + CHAR_setWorkInt( charaindex, CHAR_MYSKILLDEX, turns); + } +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + if( (turns=CHAR_getWorkInt( charaindex, CHAR_MYSKILLHIT)) > 0 ){ + turns--; + if( turns == 0 ){ + int dec_num = CHAR_getWorkInt( charaindex, CHAR_MYSKILLHIT_NUM); + nums = CHAR_getWorkInt( charaindex, CHAR_WORKHITRIGHT); + nums -= dec_num; + CHAR_setWorkInt( charaindex, CHAR_WORKHITRIGHT, nums); + + CHAR_talkToCli( charaindex, -1, "恢复命中率", CHAR_COLORYELLOW); + //sprintf( szBuffer, "BD|r%X|0|6|%X|", bid, dec_num*(-1)); + //BATTLESTR_ADD( szBuffer ); + } + CHAR_setWorkInt( charaindex, CHAR_MYSKILLHIT, turns); + } +#endif + +#endif + } +#endif + return 0; + +} + + +BOOL BATTLE_CanMoveCheck( int charaindex ) +{ + + // + if( CHAR_getWorkInt( charaindex, CHAR_WORKPARALYSIS ) > 0 ){ + return FALSE; + } + + // 檗祭 + if( CHAR_getWorkInt( charaindex, CHAR_WORKSTONE ) > 0 ){ + return FALSE; + } + // 戽曰 + if( CHAR_getWorkInt( charaindex, CHAR_WORKSLEEP ) > 0 ){ + return FALSE; + } +#ifdef _MAGIC_BARRIER + if( CHAR_getWorkInt( charaindex, CHAR_WORKBARRIER ) > 0 ){ + return FALSE; + } +#endif + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + // 晕眩 + if( CHAR_getWorkInt( charaindex, CHAR_WORKDIZZY ) > 0 ){ + return FALSE; + } + // 天罗地网 + if( CHAR_getWorkInt( charaindex, CHAR_WORKDRAGNET ) > 0 ){ + return FALSE; + } +/* + // 冰箭术 + if( CHAR_getWorkInt( charaindex, CHAR_WORKICEARROW ) > 0 ){ + return FALSE; + } +*/ +/* + // 专注战斗 + if( CHAR_getWorkInt( charaindex, CHAR_WORK_FOCUS ) > 0 ){ + return FALSE; + } +*/ + // 雷附体 + if( CHAR_getWorkInt( charaindex, CHAR_WORK_T_ENCLOSE ) > 0 ){ + return FALSE; + } +#endif +#ifdef _PROFESSION_ADDSKILL + if( CHAR_getWorkInt( charaindex, CHAR_DOOMTIME ) > 0 ){ + return FALSE; + } +#endif + return TRUE; +} + +#ifdef _ITEM_EQUITSPACE +int BATTLE_GetEqShield( int charaindex ) +{ + int iRet = ITEM_FIST, itemindex; + + itemindex = CHAR_getItemIndex( charaindex, CHAR_EQSHIELD ); + if( ITEM_CHECKINDEX( itemindex ) == FALSE ){ + iRet = ITEM_FIST; + }else{ + iRet = ITEM_getInt( itemindex, ITEM_TYPE ); + } + return iRet; +} +#endif + +int BATTLE_GetWepon( int charaindex ) //取得角色手持武器 +{ + int iRet = ITEM_FIST, itemindex; + + itemindex = CHAR_getItemIndex( charaindex, CHAR_ARM ); + if( ITEM_CHECKINDEX( itemindex ) == FALSE ){ + iRet = ITEM_FIST; + }else{ + iRet = ITEM_getInt( itemindex, ITEM_TYPE ); + } + + return iRet; +} + +static int aBowW[50] = +{ + 0, 2, 1, 4, 3, 0, 1, 2, 3, 4, + 1, 0, 3, 2, 4, 1, 3, 0, 2, 4, + 2, 4, 0, 1, 3, 2, 0, 4, 1, 3, + 3, 1, 0, 2, 4, 3, 1, 0, 2, 4, + 4, 2, 0, 1, 3, 4, 2, 0, 1, 3, +}; + +void BATTLE_TargetListSet( int charaindex, int attackNo, int *pList) +{ + int i, j=0, defNo, battleindex=-1; + defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + +#ifdef _SKILLLIMIT // (可开放) Syu ADD 不得攻击我方限制 + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_FALLRIDE || // 落马 + CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_WILDVIOLENTATTACK || //狂暴攻击 + CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_TIMID || // 怯战 + CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_MPDAMAGE || // MP攻击 + CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_WEAKEN || // 虚弱 + CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_DAMAGETOHP || // 嗜血 + CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_STEALMONEY ) { // 捐献 + if( BATTLE_CheckSameSide( charaindex, defNo) == 1 ) { + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); +// BATTLE_NoAction( battleindex, attackNo ); + return; + } + } +#endif + + for( i = 0; i < BATTLE_ENTRY_MAX*2; i ++ ){ + pList[i] = defNo; + } +#ifdef _BATTLE_ATTCRAZED // ANDY 疯狂暴走 +#ifdef _SHOOTCHESTNUT // Syu ADD 宠技:丢栗子 + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_ATTCRAZED || + CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_ATTSHOOT ){ +#else + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_ATTCRAZED ){ +#endif + int deftop,defsub; + int plive[10]; + int n = CHAR_GETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3); + + +#ifdef _SHOOTCHESTNUT // Syu ADD 宠技:丢栗子 + if( BATTLE_CheckSameSide( charaindex, defNo) == 1 ) { + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + BATTLE_NoAction( battleindex, attackNo ); + return; + } +#endif + if( 0 <= defNo && defNo <= 9 ){ + defsub = 0; + deftop = 9; + }else if( 10 <= defNo && defNo <= 19 ){ + defsub = 10; + deftop = 19; + }else{ + pList[1] = -1; + return; + } + for( i = defsub; i < deftop; i ++ ){ + if( BATTLE_TargetCheck( battleindex, i) == FALSE ) continue; + plive[j++] = i; + } + if( j == 0 ) return; + for( i=0; i= CHAR_MAXPETSKILLHAVE ) i = 0; + + if( CHAR_getCharHaveSkill( charaindex, i ) == NULL ){ + continue; + } + + pskill_array = PETSKILL_GetArray( charaindex, i ); + skill_type = PETSKILL_getInt( pskill_array, PETSKILL_FIELD ); + + + if( skill_type == PETSKILL_FIELD_BATTLE + || skill_type == PETSKILL_FIELD_ALL + ){ + }else{ + continue; + } + + if( j < iNum ){ + j++; + continue; + } + + if( PETSKILL_Use( charaindex, iNum, toNo, NULL ) == TRUE ){ + + }else{ + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + } + break; + } + + if( k >= PETSKILLSERCHTIME ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + } + return 0; +} + + +enum{ + PETAI_MODE_NORMAL, + PETAI_MODE_TARGETRANDOM, + PETAI_MODE_RANDOMACT, + PETAI_MODE_OWNERATTACK, + PETAI_MODE_ENEMYATTACK, + PETAI_MODE_ESCAPE, + PETAI_MODE_NOACT, + PETAI_MODE_END +}; + +static int BATTLE_PetLoyalCheck( int battleindex, int bid, int charaindex ) +{ + int ai, toNo, mode = 0, type, Rand, toSide = 1, flg, i; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) != CHAR_TYPEPET ){ + return 0; + } + if( CHAR_getFlg( charaindex, CHAR_ISDIE ) == TRUE ) + return 0; + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_WAIT ){ + return 0; + } + flg = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEFLG ); + flg &= ~CHAR_BATTLEFLG_AIBAD; + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEFLG, flg ); + if( BATTLE_CanMoveCheck( charaindex ) == FALSE ){ + return 0; + } + toNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); + toSide = ( 0 <= toNo && toNo < BATTLE_ENTRY_MAX )?(0):(1); + ai = CHAR_getWorkInt( charaindex, CHAR_WORKFIXAI ); + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_GUARD + || bid == toNo + ){ + type = 1; + }else{ + type = 0; + } + + Rand = RAND( 1, 100 ); + + mode = 0; // 恳仄中垫 + if( ai >= 80 ){ // 镝擦蘸ㄧㄟ⊙动晓 + mode = PETAI_MODE_NORMAL; // 濮覆岳 + }else + if( ai >= 70 ){ // 镝擦蘸ㄦㄟ⊙动晓 + if( Rand < 10 )mode = PETAI_MODE_TARGETRANDOM; // 正□必永玄 + }else + if( ai >= 60 ){ + if( Rand < 20 )mode = PETAI_MODE_TARGETRANDOM; // 正□必永玄 + }else + if( ai >= 50 ){ + if( Rand < 35 )mode = PETAI_MODE_TARGETRANDOM; // 正□必永玄 + }else + if( ai >= 40 ){ + if( Rand < 50 )mode = PETAI_MODE_TARGETRANDOM; // 正□必永玄 + }else + if( ai >= 30 ){ + if( Rand < 70 )mode = PETAI_MODE_RANDOMACT; // 垫 仿件母丞 + }else + if( ai >= 20 ){ + if( Rand < 70 )mode = PETAI_MODE_RANDOMACT; // 垫 仿件母丞 + }else + if( ai >= 10 ){ + if( Rand < 80 ){ + mode = PETAI_MODE_OWNERATTACK; // 潜谛 猾 + }else{ + mode = PETAI_MODE_ENEMYATTACK; // 衬 猾 + } + }else{ + if( Rand < 60 ){ + mode = PETAI_MODE_OWNERATTACK; // 潜谛 猾 + }else{ + mode = PETAI_MODE_ESCAPE; // 仆月 + } + } + + + if( mode == PETAI_MODE_NORMAL )return 0; + + for( i = 0; i < CHAR_MAXPETSKILLHAVE;i ++ ){ + if( CHAR_getCharHaveSkill( charaindex, i ) ){ + break; + } + } + if( i >= CHAR_MAXPETSKILLHAVE ){ + mode = PETAI_MODE_NOACT; + } + flg = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEFLG ); + flg |= CHAR_BATTLEFLG_AIBAD; + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEFLG, flg ); + + + switch( mode ){ + case PETAI_MODE_NOACT: + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, + BATTLE_COM_NONE ); + break; + case PETAI_MODE_TARGETRANDOM: + if( type == 1 ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, + BATTLE_COM_NONE ); + }else{ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, + BATTLE_DefaultAttacker( battleindex, toSide ) ); + + } + break; + case PETAI_MODE_RANDOMACT: // 垫 互仿件母丞 + // 哗萄ㄠ葱 猾蟆反濮覆井尹切扎母丢 + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_EARTHROUND0 ){ + return 0; + } + + // 布□犯奴失件白仿弘毛反内允 + flg = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEFLG ); + flg &= ~CHAR_BATTLEFLG_GUARDIAN; + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEFLG, flg ); + + if( toNo == bid ){ // 愤坌毛蓟氏匹仄引匀凶日 + // 窒手匹五卅中仇午卞允月 + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + }else{ + // 仿件母丞卞檗 毛本永玄 + BATTLE_PetRandomSkill( battleindex, charaindex ); + } + break; + + case PETAI_MODE_OWNERATTACK: // 潜谛 猾 + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_ATTACK ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, bid-5 ); + break; + + case PETAI_MODE_ENEMYATTACK: // 衬 猾 + { int myside = 0; + if( bid >= BATTLE_ENTRY_MAX ) myside = 1; + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_ATTACK ); + // 锹澎扔奶玉卞 + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, + BATTLE_DefaultAttacker( battleindex, 1 - myside ) ); + } + break; + + case PETAI_MODE_ESCAPE: // 仆月公及 夫旦玄 + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_LOSTESCAPE ); + break; + + } + + return 1; + +} + +#ifdef __ATTACK_MAGIC + +#define MAX_MAGIC_NUMBER 25 + +// 每一种魔法的攻击 围 (id,area) +int TargetIndex[MAX_MAGIC_NUMBER][2] = +{ + {301,-1},{302,-1},{303,26},{304,-1},{305,20},{306,20}, + {307,-1},{308,-1},{309,-1},{310,-1},{311,26},{312,20}, + {313,-1},{314,-1},{315,-1},{316,-1},{317,26},{318,20}, + {319,-1},{320,-1},{321,26},{322,-1},{323,26},{324,20},{325,20} +}; + +int magic,toindex,magic_count; + +#endif + + + +static int BATTLE_Battling( int battleindex ) +{ + BATTLE *pBattle, *pWatchBattle; + BATTLE_ENTRY *pEntry[2]; + char *aszFieldAttr[] = { "无", "地", "水", "火", "风" }, + szBuffer[256]="", + szWork[256]; + int i,j,k, + len, + entrynum, + charaindex, + attackNo, + defNo=-1, + aAttackList[BATTLE_ENTRY_MAX*2+1], + aDefList[BATTLE_ENTRY_MAX*2+1], + ComboId, + itemindex, + AllSize = 0; + BATTLE_CHARLIST EntryList[40]; + int ContFlg, attackNoSub, defNoSub; + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX; + pBattle = &BattleArray[battleindex]; + pEntry[0] = pBattle->Side[0].Entry; + pEntry[1] = pBattle->Side[1].Entry; + + for( i = 0; i < arraysizeof(EntryList); i ++ ){ + EntryList[i].charaindex = -1; + EntryList[i].combo = 0; + } + + sprintf( szBuffer, "战役 %d 转换 %d 属性 %s", + battleindex, pBattle->turn, + aszFieldAttr[pBattle->field_att] + ); + + entrynum = 0; + + for( j = 0; j < 2; j ++ ){ + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + pEntry[j][i].flg &= ~BENT_FLG_ULTIMATE; + if( pEntry[j][i].charaindex == -1 )continue; + EntryList[entrynum].charaindex = pEntry[j][i].charaindex; + EntryList[entrynum].side = j; + EntryList[entrynum].num = pEntry[j][i].bid; + EntryList[entrynum].dex = BATTLE_DexCalc( pEntry[j][i].charaindex ); +#ifdef _EQUIT_SEQUENCE + EntryList[entrynum].sequence = CHAR_getWorkInt( pEntry[j][i].charaindex, CHAR_WORKSEQUENCEPOWER); +#endif + BATTLE_talkToCli( pEntry[j][i].charaindex, szBuffer, CHAR_COLORYELLOW ); + entrynum ++; + } + } + szAllBattleString[0] = 0; + k = 0; + for( j = 0; j < 2; j ++ ){ + k = j * SIDE_OFFSET; + for( i = 0; i < BATTLE_ENTRY_MAX/2; i ++ ){ + szBattleString[0] = 0; + if( pBattle->iEntryBack[k] >= 0 + && pBattle->Side[j].Entry[i].charaindex == -1){ + if( pBattle->iEntryBack2[k] >= 0 ){ + sprintf( szBattleString, "BE|et%X|f1|", k ); + //BATTLE_BroadCast( battleindex, "突然有人不见了。", CHAR_COLORYELLOW ); + }else{ + print( "应是输入ID不正确出现的error。\n" ); + //BATTLE_BroadCast( battleindex, "ID错误的error。", CHAR_COLORYELLOW ); + } + } + k ++; + strcat( szAllBattleString, szBattleString ); + } + } + len = strlen( szAllBattleString ); + AllSize += len; + EntrySort( EntryList, entrynum ); + ComboCheck( EntryList, entrynum ); + for( i = 0; i < entrynum; i ++ ){ + int COM, myside, otherside, bi, + attack_flg = 1, + attack_max = 1, + attack_count = 0; + + charaindex = EntryList[i].charaindex; + myside = EntryList[i].side; + otherside = 1-myside; + attackNo = EntryList[i].num; + bi = attackNo - myside * SIDE_OFFSET; + + aAttackList[0] = attackNo; + aAttackList[1] = -1; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )continue; + if( CHAR_getFlg( charaindex, CHAR_ISDIE ) == TRUE )continue; + szBadStatusString[0] = 0; + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ) + != BATTLE_CHARMODE_C_OK ){ + //sprintf( szBuffer, "指令输入不完全。(%s)", CHAR_getUseName( charaindex ) ); + //BATTLE_BroadCast( battleindex, szBuffer, CHAR_COLORYELLOW ); + continue; + } + if( CHAR_getInt( charaindex, CHAR_HP ) <= 0 )continue; + +#ifdef _CHECK_BATTLETIME + check_battle_com_begin(); +#endif + + szBattleString[0] = 0; + pszBattleTop = szBattleString; + pszBattleLast = szBattleString+arraysizeof(szBattleString); + + // WON ADD + if( CHAR_getFlg( charaindex, CHAR_ISDIE ) != TRUE ) + BATTLE_StatusSeq( charaindex ); + +#ifdef _OTHER_MAGICSTAUTS + BATTLE_MagicStatusSeq( charaindex ); +#endif + +#ifdef _MAGIC_DEEPPOISON // 剧毒 + if( CHAR_getFlg( charaindex, CHAR_ISDIE ) == TRUE ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + } +#endif + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + BATTLE_ProfessionStatusSeq( battleindex, charaindex); +#endif + + + if( BATTLE_CanMoveCheck( charaindex ) == FALSE ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + } + gBattleDamageModyfy = 1.0; + gBattleDuckModyfy = 0; + gBattleStausChange = -1; + gBattleStausTurn = 0; + gWeponType = ITEM_FIST; + gWeponType = BATTLE_GetWepon( charaindex ); +#ifdef _PETSKILL_BECOMEFOX + if( CHAR_getWorkInt( charaindex, CHAR_WORKFOXROUND ) != -1 //若是变成小狐狸 + || CHAR_getInt( charaindex, CHAR_BASEIMAGENUMBER)==101749) + { + int COM = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ); + + gWeponType = ITEM_FIST; + + if( !(COM == BATTLE_COM_ATTACK + || COM == BATTLE_COM_GUARD + || COM == BATTLE_COM_NONE) ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + CHAR_talkToCli( charaindex, -1, "变成小狐狸後只能攻击、防御和待机!", CHAR_COLORYELLOW ); + } + } +#endif +#ifdef _PETSKILL_BECOMEPIG + if( CHAR_getInt( charaindex, CHAR_BECOMEPIG) > -1 //变成乌力了 + && (CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER) ) + { + int COM = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ); + + gWeponType = ITEM_FIST; + //CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_ATTACK ); + if( !(COM == BATTLE_COM_ATTACK + || COM == BATTLE_COM_GUARD + || COM == BATTLE_COM_NONE + || COM == BATTLE_COM_ITEM + || COM == BATTLE_COM_ESCAPE + || COM == BATTLE_COM_CAPTURE + || COM == BATTLE_COM_WAIT + || COM == BATTLE_COM_PETIN + || COM == BATTLE_COM_PETOUT) ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_GUARD ); + //CHAR_talkToCli( charaindex, -1, "变成乌力後只能攻击、防御、待机、逃跑和使用道具!", CHAR_COLORYELLOW ); + CHAR_talkToCli( charaindex, -1, "变成乌力後不能使用咒术和职业技能!", CHAR_COLORYELLOW ); + } + } +#endif + gDamageDiv = 1.0; + attack_max = BATTLE_GetAttackCount( charaindex ); + if( attack_max <= 0 ){ + int work, randwork; + work = CHAR_getInt( charaindex, CHAR_LV ); + if( work < 10 || CHAR_getInt( charaindex, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ){ + attack_max = 1; + }else{ + int luckwork = CHAR_getInt( charaindex, CHAR_LUCK )*5; + if( luckwork > 5*5 ){ + print( "\nerr:运气奇怪(%s)(%d)\n", + CHAR_getUseName( charaindex ), + CHAR_getInt( charaindex, CHAR_LUCK ) ); + luckwork = 5*5; + } + randwork = RAND( 1, 1000 ); + if( randwork <= 10 + luckwork){ + attack_max = RAND( 5, 10 ); + }else + if( randwork <= 30 + luckwork ){ + attack_max = 3; + }else + if( randwork <= 70 + luckwork ){ + attack_max = 2; + }else{ + attack_max = 1; + } + } + }else{ + if( gWeponType == ITEM_FIST )gDamageDiv = attack_max; + } + if( gWeponType == ITEM_BREAKTHROW ){ + gBattleStausChange = BATTLE_ST_PARALYSIS; + gBattleStausTurn = 1-1; + }else{ + } + + if( BattleArray[battleindex].Side[myside].flg & BSIDE_FLG_SURPRISE ){ + }else{ + if( BATTLE_PetLoyalCheck( battleindex, attackNo, charaindex ) ) { +#ifdef _FIXWOLF // Syu ADD 修正狼人变身Bug + if ( CHAR_getInt ( charaindex , CHAR_BASEIMAGENUMBER) == 101428 ) { + if( CHAR_getWorkInt ( charaindex , CHAR_WORKTURN ) == 0){ + CHAR_setInt( charaindex, CHAR_BASEIMAGENUMBER, CHAR_getInt( charaindex , CHAR_BASEBASEIMAGENUMBER)); + CHAR_setWorkInt( charaindex, CHAR_WORKATTACKPOWER, CHAR_getWorkInt( charaindex , CHAR_WORKFIXSTR)); + CHAR_setWorkInt( charaindex, CHAR_WORKQUICK, CHAR_getWorkInt( charaindex , CHAR_WORKFIXDEX)); + } + } +#endif + sprintf( szWork, "BX|%X|", attackNo); + BATTLESTR_ADD( szWork ); + } + } + +#ifdef _PROFESSION_ADDSKILL + if( CHAR_getWorkInt( charaindex, CHAR_DOOMTIME ) > 0 ){ + CHAR_setWorkInt( charaindex, CHAR_DOOMTIME, CHAR_getWorkInt( charaindex, CHAR_DOOMTIME) - 1 ); + } + if( CHAR_getWorkInt( charaindex, CHAR_DOOMTIME ) == 0 + && ( CHAR_getWorkInt( charaindex, CHAR_WORK_com1 ) == BATTLE_COM_S_FIRE_SPEAR + || CHAR_getWorkInt( charaindex, CHAR_WORK_com1 ) == BATTLE_COM_S_DOOM ) ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, CHAR_getWorkInt( charaindex, CHAR_WORK_com1 ) ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, CHAR_getWorkInt( charaindex, CHAR_WORK_toNo ) ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, CHAR_getWorkInt( charaindex, CHAR_WORK_mode ) ); + CHAR_SETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3, CHAR_getWorkInt( charaindex, CHAR_WORK_skill_level ) ); + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, CHAR_getWorkInt( charaindex, CHAR_WORK_array ) ); + CHAR_setWorkInt( charaindex, CHAR_WORK_com1, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORK_toNo, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORK_mode, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORK_skill_level, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORK_array, 0 ); + } + +#endif + COM = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ); + + switch( COM ){ + case BATTLE_COM_ATTACK: + if( gWeponType == ITEM_BOOMERANG ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_BOOMERANG ); + +#ifdef _PETSKILL_BECOMEFOX + if( CHAR_getInt( charaindex, CHAR_BASEIMAGENUMBER)==101749 + || CHAR_getWorkInt( charaindex, CHAR_WORKFOXROUND ) != -1 ){ //若是变成小狐狸不可以使用回力标 + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + } +#endif +#ifdef _PETSKILL_BECOMEPIG + if( CHAR_getInt( charaindex, CHAR_BECOMEPIG) > -1 ){//变成乌力了 + gWeponType = ITEM_FIST; + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_ATTACK ); + } +#endif + } + break; + case BATTLE_COM_COMBO: + if( ComboCheck2( EntryList, i, entrynum ) == FALSE ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_ATTACK ); + } + break; + + case BATTLE_COM_S_STATUSCHANGE: + gBattleStausChange = CHAR_GETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3 ); + gBattleStausTurn = CHAR_GETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3 ); + break; + +#ifdef _PETSKILL_HECTOR + case BATTLE_COM_S_HECTOR: + gBattleStausChange = CHAR_GETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3 ); + gBattleStausTurn = CHAR_GETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3 ); + break; +#endif + +#ifdef _PET_SKILL_SARS // WON ADD 毒煞蔓延 + case BATTLE_COM_S_SARS: + gBattleStausChange = CHAR_GETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3 ); + gBattleStausTurn = CHAR_GETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3 ); + break; +#endif + + case BATTLE_COM_S_CHARGE: + BATTLE_Charge( battleindex, attackNo ); + break; + case BATTLE_COM_S_RENZOKU: + attack_max = CHAR_GETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3 ); + gDamageDiv = attack_max; + break; +#ifdef _VARY_WOLF + case BATTLE_COM_S_VARY: + // 先用不到 + break; +#endif +#ifdef _SKILL_WILDVIOLENT_ATT + //狂暴攻击 vincent add 2002/05/16 + case BATTLE_COM_S_WILDVIOLENTATTACK: + attack_max = RAND(3,10);//攻击次数 + gDamageDiv = attack_max;//每次攻击造成伤害 + gBattleDuckModyfy = CHAR_GETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3 );//命中率 + break; +#endif + case BATTLE_COM_S_EARTHROUND0: + gBattleDamageModyfy = 1.0 + 0.01 * CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM3 ); + break; +#ifdef _BATTLE_ATTCRAZED + case BATTLE_COM_S_ATTCRAZED: + attack_max = CHAR_GETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3); + break; +#endif +#ifdef _SHOOTCHESTNUT // Syu ADD 宠技:丢栗子 + case BATTLE_COM_S_ATTSHOOT: + attack_max = CHAR_GETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3); + gDamageDiv = attack_max;//每次攻击造成伤害 + break; +#endif + case BATTLE_COM_S_MIGHTY: + gBattleDamageModyfy = CHAR_GETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3 ) * 0.01; + gBattleDuckModyfy = CHAR_GETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3 ); // 歹今木膜恳骚橘尺 + break; + } + + BATTLE_TargetListSet( charaindex, attackNo, aDefList ); + COM = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ); + + ContFlg = FALSE; + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEFLG ) & CHAR_BATTLEFLG_AIBAD + && COM == BATTLE_COM_COMBO ){ + print( "由於忠诚度不足使用必杀技失败(%s)\n", CHAR_getUseName( charaindex ) ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_ATTACK ); + } +#ifdef _BATTLE_TIMESPEED//动画播放速度 + { + int flgtime = 0; + switch( COM ){ +#ifdef _BATTLE_ATTCRAZED + case BATTLE_COM_S_ATTCRAZED: + flgtime = 200*3; + break; +#endif +#ifdef _SHOOTCHESTNUT // Syu ADD 宠技:丢栗子 + case BATTLE_COM_S_ATTSHOOT: + flgtime = 80*attack_max; + break; +#endif + case BATTLE_COM_JYUJYUTU: + case BATTLE_COM_S_ATTACK_MAGIC: + flgtime = 260; // 1/100sec + break; + case BATTLE_COM_COMBO: + flgtime = 200; // 1/100sec + break; + case BATTLE_COM_GUARD: + break; + case BATTLE_COM_WAIT: + default : + flgtime = 150; // 1/100sec + break; + } + BattleArray[battleindex].flgTime += flgtime; + } +#endif + +#ifdef _PETSKILL_BECOMEFOX // 中了媚惑术後攻防敏能力各降 20% + if( CHAR_getWorkInt( charaindex, CHAR_WORKFOXROUND ) != -1 ){ //变成小狐狸 + CHAR_setWorkInt( charaindex, CHAR_WORKATTACKPOWER, CHAR_getWorkInt( charaindex, CHAR_WORKFIXSTR)*0.8);//攻降20% + CHAR_setWorkInt( charaindex, CHAR_WORKDEFENCEPOWER, CHAR_getWorkInt( charaindex, CHAR_WORKFIXTOUGH)*0.8);//防降20% + CHAR_setWorkInt( charaindex, CHAR_WORKQUICK, CHAR_getWorkInt( charaindex, CHAR_WORKFIXDEX)*0.8);//敏降20% + } +#endif + switch( COM ){//处理攻击 + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + //==== 直接攻击系 =============================================================== + case BATTLE_COM_S_BRUST: // 爆击 + case BATTLE_COM_S_CHAIN_ATK: // 连环攻击 + case BATTLE_COM_S_CHAIN_ATK_2: // 双重攻击 + case BATTLE_COM_S_CAVALRY: // 座骑攻击 + case BATTLE_COM_S_DEAD_ATTACK: // 濒死攻击 + case BATTLE_COM_S_ATTACK_WEAK: // 弱点攻击 + case BATTLE_COM_S_PLUNDER: // 体掠夺 + case BATTLE_COM_S_CHAOS: // 混乱攻击 + { + // 防止同队互打 + defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); + if( BATTLE_CheckSameSide( charaindex, defNo) == 1 ){ + BATTLE_NoAction( battleindex, attackNo ); break; + } + } + case BATTLE_COM_S_ENRAGE_PET: // 激怒宠物 + { + CHAR_setFlg( charaindex, CHAR_ISATTACKED, 1 ); + defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); + battle_profession_attack_fun(battleindex, attackNo, defNo, charaindex); + //change fix 修正使用职业得不到道具 + //BATTLE_AddProfit( battleindex, aAttackList); + } + break; + //==== 魔法攻击系 ================================================================ + case BATTLE_COM_S_VOLCANO_SPRINGS: // 火山泉 + case BATTLE_COM_S_FIRE_BALL: // 火星球 + case BATTLE_COM_S_FIRE_SPEAR: // 火龙枪 + case BATTLE_COM_S_SUMMON_THUNDER: // 召雷术 + case BATTLE_COM_S_CURRENT: // 电流术 + case BATTLE_COM_S_STORM: // 暴风雨 + case BATTLE_COM_S_ICE_ARROW: // 冰箭 + case BATTLE_COM_S_ICE_CRACK: // 冰爆术 + case BATTLE_COM_S_ICE_MIRROR: // 冰镜术 + case BATTLE_COM_S_DOOM: // 世界末日 + case BATTLE_COM_S_BLOOD_WORMS: // 嗜血蛊 + case BATTLE_COM_S_SIGN: // 一针见血 + case BATTLE_COM_S_ENCLOSE: // 附身术 + case BATTLE_COM_S_THROUGH_ATTACK: // 贯穿攻击 + case BATTLE_COM_S_CONVOLUTE: // 回旋攻击 + { +#ifdef _PROFESSION_ADDSKILL + /* if( COM == BATTLE_COM_S_DOOM //世界末日集气 + || COM == BATTLE_COM_S_FIRE_SPEAR){ + if( CHAR_getWorkInt( charaindex, CHAR_DOOMTIME ) > 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + sprintf( szWork, "bt|%x|", attackNo ); + BATTLESTR_ADD( szWork ); + break; + } + }*/ +#endif + // 防止同队互打 + defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); + if( BATTLE_CheckSameSide( charaindex, defNo) == 1 ){ + BATTLE_NoAction( battleindex, attackNo ); break; + } + } + case BATTLE_COM_S_BLOOD: // 嗜血成性 + { + CHAR_setFlg( charaindex, CHAR_ISATTACKED, 1 ); + defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); +#if 1 // Robin fix 修正嗜血吸别人的血 + if( defNo != attackNo && COM == BATTLE_COM_S_BLOOD ){ + print("\n 改封包!嗜血吸别人的血!!:%s ", CHAR_getChar( charaindex, CHAR_CDKEY) ); + defNo = attackNo; + + CHAR_talkToCli( charaindex, -1, "因封包异常而断线。", CHAR_COLORYELLOW); + CONNECT_setCloseRequest( CHAR_getWorkInt( charaindex, CHAR_WORKFD ) , 1 ); + break; + } +#endif +#ifdef _PROFESSION_ADDSKILL + if( COM == BATTLE_COM_S_ICE_CRACK ){ + if( pBattle->ice_count >= 20 ) + pBattle->ice_count = 0; + pBattle->ice_use[pBattle->ice_count] = TRUE; + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + pBattle->ice_level[pBattle->ice_count] = CHAR_GETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3); + pBattle->ice_bout[pBattle->ice_count] = 2; + pBattle->ice_toNo[pBattle->ice_count] = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); + pBattle->ice_array[pBattle->ice_count] = CHAR_GETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3); + pBattle->ice_charaindex[pBattle->ice_count] = charaindex; + pBattle->ice_attackNo[pBattle->ice_count] = attackNo; + ++pBattle->ice_count; + BATTLE_NoAction( battleindex, attackNo ); + print("\n进入冰爆"); + break; + } +#endif + battle_profession_attack_magic_fun(battleindex, attackNo, defNo, charaindex); + //change fix 修正使用职业得不到道具 + //BATTLE_AddProfit( battleindex, aAttackList); + break; + } + //==== 提升自已能力系 ==================================================================== + case BATTLE_COM_S_FOCUS: // 专注战斗 + case BATTLE_COM_S_AVOID: // 回避 + case BATTLE_COM_S_RECOVERY: // 补血 + case BATTLE_COM_S_SCAPEGOAT: // 舍已为友 + case BATTLE_COM_S_ENRAGE: // 激化攻击 + case BATTLE_COM_S_COLLECT: // 能量聚集 + case BATTLE_COM_S_TRAP: // 陷阱 + case BATTLE_COM_S_TRANSPOSE: // 移形换位 + case BATTLE_COM_S_DOCILE: // 驯伏宠物 +#ifdef _PROFESSION_ADDSKILL + case BATTLE_COM_S_CALL_NATURE: // 号召自然 +#endif + { + CHAR_setFlg( charaindex, CHAR_ISATTACKED, 1 ); + defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); + battle_profession_assist_fun(battleindex, attackNo, defNo, charaindex); + break; + } + //==== 击中改变状态系 ==================================================================== + case BATTLE_COM_S_SHIELD_ATTACK: // 盾击 + case BATTLE_COM_S_ENTWINE: // 树根缠绕 + case BATTLE_COM_S_DRAGNET: // 天罗地网 + case BATTLE_COM_S_TOXIN_WEAPON: // 毒素武器 + case BATTLE_COM_S_INSTIGATE: // 挑拨 + case BATTLE_COM_S_OBLIVION: // 遗忘 + { + // 防止同队互打 + defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); + if( BATTLE_CheckSameSide( charaindex, defNo) == 1 ){ + BATTLE_NoAction( battleindex, attackNo ); + if( COM == BATTLE_COM_S_TOXIN_WEAPON ) + printf("\nbug-同队互打"); + break; + } + } + case BATTLE_COM_S_RESIST_FIRE: // 火抗性提升 + case BATTLE_COM_S_RESIST_ICE: // 冰抗性提升 + case BATTLE_COM_S_RESIST_THUNDER: // 雷抗性提升 +#ifdef _PROFESSION_ADDSKILL + case BATTLE_COM_S_RESIST_F_I_T: // 自然威能 + case BATTLE_COM_S_BOUNDARY: // 四属性结界 +#endif + case BATTLE_COM_S_FIRE_ENCLOSE: // 火附体 + case BATTLE_COM_S_ICE_ENCLOSE: // 冰附体 + case BATTLE_COM_S_THUNDER_ENCLOSE: // 雷附体 + { + + CHAR_setFlg( charaindex, CHAR_ISATTACKED, 1 ); + defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); + battle_profession_status_chang_fun(battleindex, attackNo, defNo, charaindex); + + if( COM == BATTLE_COM_S_TOXIN_WEAPON ) + printf("\nbug-毒素武器处理结束"); + break; + } + //==================================================================================== +#endif + +#ifdef _PETSKILL_ACUPUNCTURE + case BATTLE_COM_S_ACUPUNCTURE: //针刺外皮 + CHAR_setWorkInt( charaindex, CHAR_WORKACUPUNCTURE, 1); + //print("\n针刺:%s",CHAR_getChar(charaindex,CHAR_NAME)); +#endif + case BATTLE_COM_S_CHARGE_OK: + case BATTLE_COM_S_POWERBALANCE: + case BATTLE_COM_S_STATUSCHANGE: + case BATTLE_COM_S_EARTHROUND0: + case BATTLE_COM_S_MIGHTY: + case BATTLE_COM_S_GUARDIAN_ATTACK: + case BATTLE_COM_S_RENZOKU: +#ifdef _BATTLE_ATTCRAZED // ANDY 疯狂暴走 + case BATTLE_COM_S_ATTCRAZED: +#endif +#ifdef _SHOOTCHESTNUT // Syu ADD 宠技:丢栗子 + case BATTLE_COM_S_ATTSHOOT: +#endif +#ifdef _SKILL_WILDVIOLENT_ATT + case BATTLE_COM_S_WILDVIOLENTATTACK://狂暴攻击 vincent add 2002/05/16 +#endif + +#ifdef _SKILL_SPEEDY_ATT + case BATTLE_COM_S_SPEEDYATTACK: //疾速攻击 vincent add 2002/05/20 +#endif + case BATTLE_COM_ATTACK: +#ifdef _PET_SKILL_SARS // WON ADD 毒煞蔓延 + case BATTLE_COM_S_SARS: +#endif + +#ifdef _PETSKILL_BECOMEFOX + case BATTLE_COM_S_BECOMEFOX: +#endif + +#ifdef _PETSKILL_BECOMEPIG + case BATTLE_COM_S_BECOMEPIG: +#endif + +#ifdef _PETSKILL_SHOWMERCY + case BATTLE_COM_S_SHOWMERCY: +#endif + +#ifdef _PETSKILL_GYRATE + case BATTLE_COM_S_GYRATE: + if( COM == BATTLE_COM_S_GYRATE ){ + int i,j=0,f_num,temp[5]={0}; + char szWork[256]; + defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); + if(defNo < 5) + f_num = 0; + else if(defNo >=5 && defNo < 10) + f_num = 5; + else if(defNo >=10 && defNo < 15) + f_num = 10; + else + f_num = 15; + + // 取出战场上存活的人 + for( i=f_num; i= 10 ){ + BATTLE_NoAction( battleindex, attackNo ); + break; + } + defNo = aDefList[0]; + }else + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 + || defNo == attackNo){ + BATTLE_NoAction( battleindex, attackNo ); + break; + } + if( COM == BATTLE_COM_S_EARTHROUND0 ){ + sprintf( szWork, "BI|a%X|", attackNo ); + }else { +#ifdef _FIXBUG_ATTACKBOW + if( CHAR_getWorkInt( charaindex, CHAR_WORKITEMMETAMO) > 0 || + CHAR_getWorkInt( charaindex, CHAR_WORKNPCMETAMO) > 0 + || CHAR_getWorkInt( charaindex, CHAR_WORKFOXROUND ) != -1 ){ //若是变成小狐狸 + + if( gWeponType == ITEM_BOW || gWeponType == ITEM_BOUNDTHROW || + gWeponType == ITEM_BREAKTHROW || gWeponType == ITEM_BOOMERANG) { + CHAR_talkToCli( charaindex, -1, "变身中无法使用远距离武器!!", CHAR_COLORYELLOW); + continue; + } + + } +#endif + + if( gWeponType == ITEM_BOW ) sprintf( szWork, "BB|a%X|w0|", attackNo ); + else if( gWeponType == ITEM_BOUNDTHROW ) //若是丢斧头 + sprintf( szWork, "BB|a%X|w1|", attackNo ); + else if( gWeponType == ITEM_BREAKTHROW ) + sprintf( szWork, "BB|a%X|w2|", attackNo ); + else sprintf( szWork, "BH|a%X|", attackNo ); + } + +#ifdef _SHOOTCHESTNUT // Syu ADD 宠技:丢栗子 + if ( COM == BATTLE_COM_S_ATTSHOOT ) + sprintf( szWork, "BB|a%X|w0|", attackNo ); +#endif + + BATTLESTR_ADD( szWork ); + if( COM == BATTLE_COM_S_CHARGE_OK || + COM == BATTLE_COM_S_EARTHROUND0 ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + }else{ + +#ifdef _SHOOTCHESTNUT // Syu ADD 宠技:丢栗子 + if ( CHAR_getWorkInt(charaindex, CHAR_WORKBATTLECOM1) != BATTLE_COM_S_ATTSHOOT) +#endif +#ifdef _PETSKILL_SHOWMERCY + if( CHAR_getWorkInt(charaindex, CHAR_WORKBATTLECOM1) != BATTLE_COM_S_SHOWMERCY) +#endif + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1,BATTLE_COM_ATTACK ); + } + for( attack_count = 0, k = 0;; ){ + if( gWeponType == ITEM_BOW ){ + if( BATTLE_TargetCheck( battleindex, defNo ) == FALSE ){ + attack_flg = 0; + }else{ + attack_flg = 1; + } + } + + + if( attack_flg ){ + + + ContFlg = BATTLE_Attack( battleindex, attackNo, defNo ); +#ifdef _PETSKILL_RETRACE + if( Battle_Attack_ReturnData_x.Battle_Attack_ReturnData == BATTLE_RET_DODGE + && COM == BATTLE_COM_S_RETRACE ){ + if( RAND(1,100) < 80 ){ //80%机率发动2次攻击 + //攻+20% + + CHAR_setWorkInt( BATTLE_No2Index( battleindex, attackNo ), + CHAR_WORKATTACKPOWER, + ( CHAR_getWorkInt( BATTLE_No2Index( battleindex, attackNo ), CHAR_WORKFIXSTR) + ( CHAR_getWorkInt( BATTLE_No2Index( battleindex, attackNo ), CHAR_WORKFIXSTR) * 0.2 ) ) ); + + BATTLE_Attack( battleindex, attackNo, defNo ); + + } + Battle_Attack_ReturnData_x.Battle_Attack_ReturnData = 0; + } +#endif + BATTLE_AddProfit( battleindex, aAttackList); + if( ++attack_count >= attack_max ) break; + if( CHAR_getInt( charaindex, CHAR_HP ) <= 0 ) { + ContFlg = FALSE; + break; + } + } + defNo = aDefList[++k]; + if( defNo < 0 ) break; + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, defNo ); + if( gWeponType == ITEM_BOW ){ + }else + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + break; + } + if( BATTLE_CountAlive( battleindex, 0) == 0 || BATTLE_CountAlive( battleindex, 1) == 0) { + break; + } + } + gBattleDamageModyfy = 1.0; + gBattleDuckModyfy = 0; + + for( k = 0; k < 5 && ContFlg == TRUE; k ++ ){ + if( ( k & 1 ) == 1 ){ + attackNoSub = attackNo; + defNoSub = defNo; + }else{ + defNoSub = attackNo; + attackNoSub = defNo; + } + + ContFlg = BATTLE_Counter(battleindex, attackNoSub, defNoSub ); + + aAttackList[0] = attackNoSub; + aAttackList[1] = -1; + BATTLE_AddProfit( battleindex, aAttackList); + } + aAttackList[0] = -1; + BATTLESTR_ADD( "FF|" ); + +#ifdef _PETSKILL_BECOMEFOX // 向对方使用媚惑术 + if ( (COM == BATTLE_COM_S_BECOMEFOX ) + && (Battle_Attack_ReturnData_x.Battle_Attack_ReturnData != BATTLE_RET_MISS) //没有miss + && (Battle_Attack_ReturnData_x.Battle_Attack_ReturnData != BATTLE_RET_DODGE) //没有闪避过 + && (Battle_Attack_ReturnData_x.Battle_Attack_ReturnData != BATTLE_RET_ALLGUARD) + && (Battle_Attack_ReturnData_x.Battle_Attack_ReturnData != BATTLE_RET_ARRANGE) + && (BATTLE_TargetCheck( battleindex, defNo )) //还活着 + && (rand()%100 < 31) + && (CHAR_getInt( BATTLE_No2Index( battleindex, defNo ), CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER) //只有宠物(CHAR_TYPEPET)才可以被媚惑 + && (CHAR_getWorkInt( BATTLE_No2Index( battleindex, defNo ), CHAR_WORK_PETFLG ) != 0 ) +#ifdef _PETSKILL_BECOMEPIG + && (CHAR_getInt( charaindex, CHAR_BECOMEPIG) == -1)//没有处於乌力化 +#endif + ) + { + int ToList[SIDE_OFFSET*2+1]; + int defindex = BATTLE_No2Index( battleindex, defNo ); + + BATTLE_MultiList( battleindex, defNo, ToList ); + BATTLE_MagicEffect( battleindex, defNo, ToList, 101120, 101750); + + CHAR_setWorkInt( defindex, CHAR_WORKFOXROUND, pBattle->turn ); + + if( CHAR_getInt( defindex, CHAR_RIDEPET) != -1 ) { //骑宠就要让他落马 + CHAR_setInt( defindex, CHAR_RIDEPET, -1 ); + BATTLE_changeRideImage( defindex ); + CHAR_setWorkInt( defindex, CHAR_WORKPETFALL, 1 ); + } + + CHAR_setInt( defindex, CHAR_BASEIMAGENUMBER, 101749); + } +#endif +#ifdef _PETSKILL_BECOMEPIG // 向对方使用乌力化 + if ( (COM == BATTLE_COM_S_BECOMEPIG ) + && (Battle_Attack_ReturnData_x.Battle_Attack_ReturnData != BATTLE_RET_MISS) //没有miss + && (Battle_Attack_ReturnData_x.Battle_Attack_ReturnData != BATTLE_RET_DODGE) //没有闪避过 + && (Battle_Attack_ReturnData_x.Battle_Attack_ReturnData != BATTLE_RET_ALLGUARD) + && (Battle_Attack_ReturnData_x.Battle_Attack_ReturnData != BATTLE_RET_ARRANGE) + && (BATTLE_TargetCheck( battleindex, defNo )) //还活着 + && (CHAR_getInt( BATTLE_No2Index( battleindex, defNo ), CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER) //只有玩家才可以被乌力化 + && (BATTLE_CheckSameSide( charaindex, defNo) != 1 ) // 防止同队互打 + && CHAR_getInt( BATTLE_No2Index( battleindex, defNo ), CHAR_BECOMEPIG) < 2000000000 ) //防止破表 + { + char temp[64]; + int ToList[SIDE_OFFSET*2+1], compute,petrate,pettime,pigbbi=100250; + char *pszOption=NULL; + int defindex = BATTLE_No2Index( battleindex, defNo ); + pszOption = PETSKILL_getChar( CHAR_GETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3 ), PETSKILL_OPTION ); + if( pszOption ) + sscanf( pszOption, "%d %d %d", &petrate, &pettime, &pigbbi); + else + petrate = 100, pettime = 60, pigbbi = 100250; + + if( rand()%100 < petrate ){ + CHAR_setWorkInt( defindex, CHAR_WORKITEMMETAMO, 0);//道具变身取消 + CHAR_setWorkInt( defindex, CHAR_WORKNPCMETAMO, 0 );//NPC变身取消 + CHAR_setWorkInt( defindex, CHAR_WORKFOXROUND, -1);//媚惑术变身取消 + + BATTLE_MultiList( battleindex, defNo, ToList ); + BATTLE_MagicEffect( battleindex, defNo, ToList, 101120, 101750); + + if( CHAR_getInt( defindex, CHAR_RIDEPET) != -1 ){ //骑宠就要让他落马 + CHAR_setInt( defindex, CHAR_RIDEPET, -1 ); + BATTLE_changeRideImage( defindex ); + CHAR_setWorkInt( defindex, CHAR_WORKPETFALL, 1 ); + } + + CHAR_setInt( defindex, CHAR_BECOMEPIG_BBI, pigbbi ); + + compute = CHAR_getInt( defindex, CHAR_BECOMEPIG); + CHAR_setInt( defindex, CHAR_BASEIMAGENUMBER, CHAR_getInt( defindex, CHAR_BECOMEPIG_BBI ) ); + if( compute == -1 )//第一次中 + CHAR_setInt( defindex, CHAR_BECOMEPIG, pettime + 1 + compute ); //乌力化时间(单位:秒) + else + CHAR_setInt( defindex, CHAR_BECOMEPIG, pettime + compute ); + sprintf(temp, "乌力时间:%d秒", CHAR_getInt( defindex, CHAR_BECOMEPIG) ); + CHAR_talkToCli( defindex, -1, temp, CHAR_COLORYELLOW); + + print("\n乌力化开始0:%s,round:%d", CHAR_getChar( defindex, CHAR_NAME), CHAR_getWorkInt( defindex, CHAR_WORKFOXROUND)); + } + } +#endif + break; +//以下处理特殊攻击 + case BATTLE_COM_BOOMERANG: + gBattleDamageModyfy = 0.3; + defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); + if( defNo < 0 ){ + defNo = BATTLE_DefaultAttacker( battleindex, 1 - myside ); + } + if( 0 <= defNo && defNo <= 19 ){ + defNo /= 5; // + }else{ + BATTLE_NoAction( battleindex, attackNo ); + break; + } + if( (int)(attackNo / 5 ) == defNo ){ + BATTLE_NoAction( battleindex, attackNo ); + break; + } + { + int *pBoomerangTbl = BoomerangVsTbl[defNo]; + for( k = 0; k < 5; k ++ ){ + if( BATTLE_TargetCheck( battleindex, pBoomerangTbl[k] ) == FALSE ){ + continue; + }else{ + break; + } + } + if( k == 5 ){ + defNo = BATTLE_DefaultAttacker( battleindex, 1 - myside ); + if( 0 <= defNo && defNo <= 19 ){ + defNo /= 5; + }else{ + BATTLE_NoAction( battleindex, attackNo ); + break; + } + } + } + sprintf( szWork, "BO|a%X|", attackNo ); + BATTLESTR_ADD( szWork ); + { + int *pBoomerangTbl = BoomerangVsTbl[defNo]; + if( myside == 1 ){ + k = 4; j = -1; + }else{ + k = 0; j = 1; + } + for( ; ; k += j ){ + if( j > 0 && k > 4 )break; + if( j < 0 && k < 0 )break; + defNo = pBoomerangTbl[k]; + if( BATTLE_TargetCheck( battleindex, defNo ) == FALSE ){ + continue; + } + BATTLE_Attack( battleindex, attackNo, defNo ); + } + } + gBattleDamageModyfy = 1.0; + gBattleDuckModyfy = 0; + BATTLESTR_ADD( "FF|" ); + break; + + //--------------------------------------------- + case BATTLE_COM_CAPTURE: + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + break; + } + BATTLE_Capture( battleindex, attackNo, defNo ); + break; + + //--------------------------------------------- +#ifdef _VARY_WOLF + case BATTLE_COM_S_VARY: + { + int ToList[SIDE_OFFSET*2+1]; + int bk_amn = 0; + + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + break; + } + bk_amn = (CHAR_getInt( charaindex, CHAR_BASEBASEIMAGENUMBER) + 5) + (myside*4); + BATTLE_MultiList( battleindex, defNo, ToList ); + BATTLE_MagicEffect( battleindex, attackNo, ToList, 101120, bk_amn); + } + break; +#endif + case BATTLE_COM_GUARD: + BATTLE_Guard( battleindex, attackNo ); + + break; + case BATTLE_COM_ESCAPE: + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) != CHAR_TYPEPET ){ + if (BATTLE_Escape(battleindex, attackNo, 0) == TRUE) + { + if (CHAR_getWorkInt(charaindex, CHAR_WORKFMPKFLAG) == 1) + CHAR_setWorkInt(charaindex, CHAR_WORKFMPKFLAG, -1); +#ifdef _ESCAPE_RESET // 恶宝中纪录逃跑时间 + if( getStayEncount( getfdFromCharaIndex(charaindex) ) ) { + CHAR_setWorkInt( charaindex, CHAR_WORKLASTESCAPE, time(NULL)); + //print(" 逃了 "); + } +#endif + } + } + break; + case BATTLE_COM_COMPELESCAPE: //强制离开 + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) != CHAR_TYPEPET ){ + BATTLE_Escape( battleindex, attackNo, 1); + if (CHAR_getWorkInt(charaindex, CHAR_WORKFMPKFLAG) == 1) + CHAR_setWorkInt(charaindex, CHAR_WORKFMPKFLAG, -1); + } + break; + + case BATTLE_COM_PETIN: + if( CHAR_getInt( charaindex, CHAR_DEFAULTPET ) == -1 ){ + BATTLE_NoAction( battleindex, attackNo ); + break; + } + { + char szWork[256]; + snprintf( szWork, sizeof( szWork ), "K%d", CHAR_getInt( charaindex, CHAR_DEFAULTPET ) ); + CHAR_sendStatusString( charaindex, szWork ); + + } + BATTLE_PetIn( battleindex, attackNo ); + lssproto_KS_send( + getfdFromCharaIndex( charaindex ), + CHAR_getInt( charaindex, CHAR_DEFAULTPET ), 1 ); + break; + case BATTLE_COM_PETOUT: + if( CHAR_getInt( charaindex, CHAR_DEFAULTPET ) != -1 ){ + lssproto_KS_send( + getfdFromCharaIndex( charaindex ), + CHAR_getInt( charaindex, CHAR_DEFAULTPET ), 1 ); + { + char szWork[256]; + snprintf( szWork, sizeof( szWork ), "K%d", CHAR_getInt( charaindex, CHAR_DEFAULTPET ) ); + CHAR_sendStatusString( charaindex, szWork ); + + } + BATTLE_PetIn( battleindex, attackNo ); + } + // shan 2002/01/14 Begin 五只宠 + { + int attackindex, petNo; + + attackindex = BATTLE_No2Index( battleindex, attackNo ); + petNo = CHAR_getWorkInt( attackindex, CHAR_WORKBATTLECOM2 ); + if( CHAR_getWorkInt(charaindex, CHAR_WORK_PET0_STAT+petNo) != PET_STAT_SELECT) + break; + } + // shan End + BATTLE_PetOut( battleindex, attackNo ); + lssproto_KS_send( + getfdFromCharaIndex( charaindex ), + CHAR_getInt( charaindex, CHAR_DEFAULTPET ), 1 ); + break; +// Terry add 2001/11/05 +#ifdef __ATTACK_MAGIC + case BATTLE_COM_S_ATTACK_MAGIC: // 宠物魔法 + magic = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + toindex = CHAR_getWorkInt(charaindex,CHAR_WORKBATTLECOM2); +// print("magic->%d,toindex->%d\n",magic,toindex); + // 判断攻 围 + for(magic_count=0;magic_count= 0 && toindex <= 4) + toindex = TargetIndex[magic_count][1]; + // 打右下的前面那一排 + else + toindex = TargetIndex[magic_count][1]-1; + } + break; + } + } +// print("toindex->%d\n",toindex); + MAGIC_DirectUse(charaindex,magic,toindex,CHAR_GETWORKINT_HIGH(charaindex,CHAR_WORKBATTLECOM3)); + BATTLE_AddProfit( battleindex, aAttackList ); + break; +#endif + case BATTLE_COM_JYUJYUTU: + MAGIC_DirectUse( + charaindex, + CHAR_GETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3 ), + CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ), + CHAR_GETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3 ) + ); + break; + + case BATTLE_COM_ITEM: + itemindex = CHAR_getItemIndex(charaindex, + CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM3 )); + if( ITEM_CHECKINDEX( itemindex ) == FALSE ){ + print( "\nerr:要使用的item位置奇怪(%s)(%d)\n", + CHAR_getUseName( charaindex ), CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM3 ) ); + break; + } + +#if 1 // Robin fix 战斗不可换防具饰品 + { + int itemtype = ITEM_getInt( itemindex, ITEM_TYPE ); + if( itemtype == ITEM_HELM + || itemtype == ITEM_ARMOUR + || itemtype == ITEM_BRACELET + //|| itemtype == ITEM_MUSIC + || itemtype == ITEM_NECKLACE + || itemtype == ITEM_RING + || itemtype == ITEM_BELT + || itemtype == ITEM_EARRING + || itemtype == ITEM_NOSERING + || itemtype == ITEM_AMULET + //|| itemtype == CHAR_HEAD + ) + { + print("\n 改封包!战斗不可换防具!!:%s ", CHAR_getChar( charaindex, CHAR_CDKEY) ); + break; + } + } +#endif + +#ifdef _FIXBUG_ATTACKBOW + { + if( CHAR_getWorkInt( charaindex, CHAR_WORKITEMMETAMO) > 0 || + CHAR_getWorkInt( charaindex, CHAR_WORKNPCMETAMO) > 0 + || CHAR_getWorkInt( charaindex, CHAR_WORKFOXROUND ) != -1 ){ //若是变成小狐狸 + + int armtype; + int itemindex = CHAR_getItemIndex( charaindex, CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM3 )); + if( !ITEM_CHECKINDEX(itemindex) ) break; + armtype = ITEM_getInt( itemindex, ITEM_TYPE ); + + if( armtype == ITEM_BOW || armtype == ITEM_BOUNDTHROW || + armtype == ITEM_BREAKTHROW || armtype == ITEM_BOOMERANG) { + CHAR_talkToCli( charaindex, -1, "变身无法使用远距离武器!", CHAR_COLORYELLOW ); + break; + } + } + } +#endif + + CHAR_ItemUse( + charaindex, + CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ), + CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM3 ) + ); + + + if( ITEM_getEquipPlace( charaindex, itemindex ) == CHAR_ARM ){ + sprintf( szWork, "BN|a%X|%X|", attackNo, + CHAR_getInt( charaindex, CHAR_BASEIMAGENUMBER ) ); + BATTLESTR_ADD( szWork ); + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + // 武器专精 + BATTLE_ProfessionStatus_init( battleindex, charaindex ); +#endif + + }else{ + } + + break; + +#ifdef _PSKILL_FALLGROUND + case BATTLE_COM_S_FALLRIDE://落马术 + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + print("\n BATTLE_NoAction()"); + break; + } + ContFlg = BATTLE_S_FallGround( battleindex, attackNo, defNo, BATTLE_COM_S_FALLRIDE); + break; + +#endif +#ifdef _PETSKILL_EXPLODE + case BATTLE_COM_S_EXPLODE: + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + print("\n BATTLE_NoAction()"); + break; + } + ContFlg = BATTLE_S_Explode( battleindex, attackNo, defNo, BATTLE_COM_S_EXPLODE); + break; +#endif + +#ifdef _PETSKILL_TIMID + case BATTLE_COM_S_TIMID: + { + int skill; + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + print("\n BATTLE_NoAction()"); + break; + } + skill = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + ContFlg = BATTLE_S_AttackDamage( battleindex, attackNo, defNo, BATTLE_COM_S_TIMID, skill); + } + break; +#endif +#ifdef _PETSKILL_2TIMID + case BATTLE_COM_S_2TIMID: + { + int skill; + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + print("\n BATTLE_NoAction()"); + break; + } + skill = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + ContFlg = BATTLE_S_AttackDamage( battleindex, attackNo, defNo, BATTLE_COM_S_2TIMID, skill); + } + break; +#endif + +#ifdef _PETSKILL_PROPERTY + case BATTLE_COM_S_PROPERTYSKILL: + { + int skill; + skill = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + BATTLE_S_PetSkillProperty( battleindex, attackNo, COM, skill); + BATTLE_NoAction( battleindex, attackNo ); + } + break; +#endif + +#ifdef _BATTLE_LIGHTTAKE + case BATTLE_COM_S_LIGHTTAKE: + { + int skill; + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + print("\n BATTLE_NoAction()"); + break; + } + skill = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + ContFlg = BATTLE_S_AttackDamage( battleindex, attackNo, defNo, BATTLE_COM_S_LIGHTTAKE, skill); + } + break; +#endif + +#ifdef _SKILL_DAMAGETOHP + case BATTLE_COM_S_DAMAGETOHP: //嗜血技 + { + int skill; + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + print("\n BATTLE_NoAction()"); + break; + } + skill = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + ContFlg = BATTLE_S_AttackDamage( battleindex, attackNo, defNo, BATTLE_COM_S_DAMAGETOHP, skill); + } + break; +#endif + +#ifdef _PETSKILL_DAMAGETOHP + case BATTLE_COM_S_DAMAGETOHP2: //暗月狂狼(嗜血技的变体) + { + int skill,attackidxtemp; + attackidxtemp = BATTLE_No2Index( battleindex, attackNo ); + + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + print("\n BATTLE_NoAction()"); + break; + } + skill = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + ContFlg = BATTLE_S_AttackDamage( battleindex, attackNo, defNo, BATTLE_COM_S_DAMAGETOHP2, skill); + + } + break; +#endif + +#ifdef _Skill_MPDAMAGE + case BATTLE_COM_S_MPDAMAGE: //MP伤害 + { + int skill; + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + print("\n BATTLE_NoAction()"); + break; + } + skill = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + ContFlg = BATTLE_S_AttackDamage( battleindex, attackNo, defNo, BATTLE_COM_S_MPDAMAGE, skill); + break; + } + break; +#endif +#ifdef _SKILL_TOOTH + case BATTLE_COM_S_TOOTHCRUSHE: + { + int skill; + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + print("\n BATTLE_NoAction()"); + break; + } + skill = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + ContFlg = BATTLE_S_AttackDamage( battleindex, attackNo, defNo, BATTLE_COM_S_TOOTHCRUSHE, skill); + break; + } + break; +#endif +#ifdef _PSKILL_MODIFY + case BATTLE_COM_S_MODIFYATT: + { + int skill; + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + print("\n BATTLE_NoAction()"); + break; + } + skill = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + ContFlg = BATTLE_S_AttackDamage( battleindex, attackNo, defNo, BATTLE_COM_S_MODIFYATT, skill); + } + break; +#endif +#ifdef _PSKILL_MDFYATTACK + case BATTLE_COM_S_MDFYATTACK: + { + int skill; + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + print("\n BATTLE_NoAction()"); + break; + } + skill = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + ContFlg = BATTLE_S_AttackDamage( battleindex, attackNo, defNo, BATTLE_COM_S_MDFYATTACK, skill); + } + break; +#endif + +#ifdef _PETSKILL_TEAR + case BATTLE_COM_S_PETSKILLTEAR: + { + int skill; + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + print("\n BATTLE_NoAction()"); + break; + } + skill = CHAR_GETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3); + ContFlg = BATTLE_S_AttackDamage( battleindex, attackNo, defNo, BATTLE_COM_S_PETSKILLTEAR, skill); + } + break; +#endif + +#ifdef _SONIC_ATTACK // WON ADD 音波攻击 + case BATTLE_COM_S_SONIC: + { + int skill, defNo2=-1, index2=-1; + + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + print("\n BATTLE_NoAction()"); + break; + } + skill = CHAR_GETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3); + + if( defNo >= 15 && defNo < 20 ) defNo2 = defNo - 5; + else if( defNo >= 5 && defNo < 10 ) defNo2 = defNo - 5; + else defNo2 = -1; + + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + index2 = BATTLE_No2Index( battleindex, defNo2 ); + + ContFlg = BATTLE_S_AttackDamage( battleindex, attackNo, defNo, BATTLE_COM_S_SONIC, skill ); + + if( index2 >= 0 ){ + if( defNo2 >= 0 ){ + ContFlg = BATTLE_S_AttackDamage( battleindex, attackNo, defNo2, BATTLE_COM_S_SONIC2, skill ); + } + } + + } + break; +#endif + +#ifdef _PETSKILL_REGRET + case BATTLE_COM_S_REGRET: + { + int skill, defNo2=-1, index2=-1; + + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + print("\n BATTLE_NoAction()"); + break; + } + skill = CHAR_GETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3); + + if( defNo >= 15 && defNo < 20 ) defNo2 = defNo - 5; + else if( defNo >= 5 && defNo < 10 ) defNo2 = defNo - 5; + else defNo2 = -1; + + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + index2 = BATTLE_No2Index( battleindex, defNo2 ); + + ContFlg = BATTLE_S_AttackDamage( battleindex, attackNo, defNo, BATTLE_COM_S_REGRET, skill ); + if( index2 >= 0 ){ + if( defNo2 >= 0 ){ + ContFlg = BATTLE_S_AttackDamage( battleindex, attackNo, defNo2, BATTLE_COM_S_REGRET2, skill ); + } + } + + } + break; +#endif + +#ifdef _MAGIC_SUPERWALL + case BATTLE_COM_S_SUPERWALL: + { + int skill; + defNo = CHAR_getWorkInt(charaindex,CHAR_WORKBATTLECOM2); + skill = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + ContFlg = PETSKILL_MagicStatusChange_Battle( battleindex, attackNo, defNo, skill); + } + break; +#endif +#ifdef _PETSKILL_SETDUCK + case BATTLE_COM_S_SETDUCK: + { + int skill; + defNo = CHAR_getWorkInt(charaindex,CHAR_WORKBATTLECOM2); + skill = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + ContFlg = PETSKILL_SetDuckChange_Battle( battleindex, attackNo, defNo, skill); + break; + } +#endif +#ifdef _MAGICPET_SKILL + case BATTLE_COM_S_SETMAGICPET: + { + int skill; + defNo = CHAR_getWorkInt(charaindex,CHAR_WORKBATTLECOM2); + skill = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + ContFlg = PETSKILL_SetMagicPet_Battle( battleindex, attackNo, defNo, skill); + break; + } +#endif +#ifdef _PRO_BATTLEENEMYSKILL + case BATTLE_COM_S_ENEMYRELIFE: + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + print("\n BATTLE_NoAction()"); + break; + } + + ContFlg =BATTLE_E_ENEMYREFILE( battleindex, attackNo, defNo, BATTLE_COM_S_ENEMYRELIFE); + if( ContFlg == FALSE ) { + CHAR_setFlg( charaindex, CHAR_ISATTACKED, 1 ); + ContFlg = BATTLE_Attack( battleindex, attackNo, defNo ); + BATTLE_AddProfit( battleindex, aAttackList ); + } + BATTLE_AddProfit( battleindex, aAttackList ); + break; + + case BATTLE_COM_S_ENEMYREHP: + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + print("\n BATTLE_NoAction()"); + break; + } + ContFlg =BATTLE_E_ENEMYREHP( battleindex, attackNo, defNo, BATTLE_COM_S_ENEMYREHP); + if( ContFlg == FALSE ) { + CHAR_setFlg( charaindex, CHAR_ISATTACKED, 1 ); + ContFlg = BATTLE_Attack( battleindex, attackNo, defNo ); + BATTLE_AddProfit( battleindex, aAttackList ); + } + BATTLE_AddProfit( battleindex, aAttackList ); + break; + + case BATTLE_COM_S_ENEMYHELP: + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + print("\n BATTLE_NoAction()"); + break; + } + ContFlg =BATTLE_E_ENEMYHELP( battleindex, attackNo, defNo, BATTLE_COM_S_ENEMYREHP); + if( ContFlg == FALSE ) { + CHAR_setFlg( charaindex, CHAR_ISATTACKED, 1 ); + ContFlg = BATTLE_Attack( battleindex, attackNo, defNo ); + BATTLE_AddProfit( battleindex, aAttackList ); + } + BATTLE_AddProfit( battleindex, aAttackList ); + break; +#endif + case BATTLE_COM_S_GBREAK: //破除防御 + + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + break; + } + ContFlg = BATTLE_S_GBreak( battleindex, attackNo, defNo ); + break; +#ifdef _SKILL_GUARDBREAK2//破除防御2 vincent add 2002/05/20 + case BATTLE_COM_S_GBREAK2: + //确定攻击对象 + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + break; + } + ContFlg = BATTLE_S_GBreak2( battleindex, attackNo, defNo ); + break; +#endif + +#ifdef _SKILL_SACRIFICE + case BATTLE_COM_S_SACRIFICE://救援 vincent add 2002/05/30 + //确定攻击对象 + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + break; + } + ContFlg = BATTLE_S_Sacrifice( battleindex, attackNo, defNo ); + + break; +#endif + +#ifdef _SKILL_REFRESH + case BATTLE_COM_S_REFRESH://状态回复 vincent add 2002/08/08 + { + int array; + array = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); +// print("\n vincent--case BATTLE_COM_S_REFRESH:-->defNo:%d",defNo); + ContFlg = BATTLE_S_Refresh( battleindex, attackNo, defNo ,array); + } + break; +#endif + +#ifdef _SKILL_WEAKEN //vincent宠技:虚弱 + case BATTLE_COM_S_WEAKEN: + { + int array; + array = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); + //print("\n vincent--case BATTLE_COM_S_WEAKEN:-->defNo:%d",defNo); + ContFlg = BATTLE_S_Weaken( battleindex, attackNo, defNo ,array); + } + break; +#endif + +#ifdef _SKILL_DEEPPOISON //vincent宠技:剧毒 + case BATTLE_COM_S_DEEPPOISON: + { + int array; + array = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); + ContFlg = BATTLE_S_Deeppoison( battleindex, attackNo, defNo ,array); + } + break; +#endif + +#ifdef _SKILL_BARRIER //vincent宠技:魔障 + case BATTLE_COM_S_BARRIER: + { + int array; + array = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); + ContFlg = BATTLE_S_Barrier( battleindex, attackNo, defNo ,array); + } + break; +#endif + +#ifdef _SKILL_NOCAST //vincent宠技:沉默 + case BATTLE_COM_S_NOCAST: + { + int array; + array = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); + ContFlg = BATTLE_S_Nocast( battleindex, attackNo, defNo ,array); + } + break; +#endif + +#ifdef _SKILL_ROAR //vincent宠技:大吼 + case BATTLE_COM_S_ROAR: + { + int array; + //确定攻击对象 + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + break; + } + array = CHAR_GETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3); + ContFlg = BATTLE_S_Roar( battleindex, attackNo, defNo ,array); + } + break; +#endif + case BATTLE_COM_S_ABDUCT: + { + int array; + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + break; + } + array = CHAR_GETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3); + BATTLE_Abduct( battleindex, attackNo, defNo, array); + } + break; + case BATTLE_COM_COMBO: + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + break; + } + gDamageDiv = 1.0; + ComboId = EntryList[i].combo; + aAttackList[0] = EntryList[i].num; // 伉旦玄卞笛尹月 + i ++; // 戚及谛井日 + k = 1; + for( ; EntryList[i].combo == ComboId && i < entrynum; i ++ ){ + int charmode; + // 绣箕允月井民尼永弁 + if( CHAR_CHECKINDEX( EntryList[i].charaindex ) == FALSE )continue; + + // 爵 卞辅笛仄化中卅中桦宁反戚尺 + charmode = CHAR_getWorkInt( EntryList[i].charaindex, CHAR_WORKBATTLEMODE ); + if( charmode == 0 || charmode == BATTLE_CHARMODE_FINAL ){ + continue; + } + + // 旦 □正旦唱橘荚汊↓ 质 + BATTLE_StatusSeq( EntryList[i].charaindex ); +#ifdef _OTHER_MAGICSTAUTS + BATTLE_MagicStatusSeq( EntryList[i].charaindex ); +#endif + // 仃卅井匀凶桦宁 + if( BATTLE_CanMoveCheck( EntryList[i].charaindex ) == FALSE ){ + continue; + } + if( CHAR_getInt( EntryList[i].charaindex, CHAR_HP ) <= 0 ){ + continue; + } + aAttackList[k++] = EntryList[i].num; + } + aAttackList[k] = -1; + i--; + if( k == 1 ){ + print( "\nerr:一人combo bug\n" ); + } + sprintf( szWork, "BY|r%X|", defNo ); + BATTLESTR_ADD( szWork ); + BATTLE_Combo( battleindex, aAttackList, defNo ); + +#ifdef _Item_ReLifeAct + BATTLE_AddProfit( battleindex, aAttackList ); +#endif + // 反 FF 毛仁匀勾仃月 + BATTLESTR_ADD( "FF|" ); + break; + + //--------------------------------------------- + case BATTLE_COM_WAIT: + case BATTLE_COM_NONE: + BATTLE_NoAction( battleindex, attackNo ); + break; + + //--------------------------------------------- + case BATTLE_COM_S_EARTHROUND1: + BATTLE_EarthRoundHide( battleindex, attackNo ); + break; + + //--------------------------------------------- + case BATTLE_COM_S_LOSTESCAPE: + BATTLE_LostEscape( battleindex, attackNo ); + break; + + case BATTLE_COM_S_STEAL: + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + break; + } + BATTLE_Steal( battleindex, attackNo, defNo ); + break; + +#ifdef _BATTLESTEAL_FIX + case BATTLE_COM_S_STEALMONEY: + if( (defNo = BATTLE_TargetAdjust( battleindex, charaindex, myside )) < 0 ){ + BATTLE_NoAction( battleindex, attackNo ); + break; + } + BATTLE_StealMoney( battleindex, attackNo, defNo) ; + break; +#endif + case BATTLE_COM_S_NOGUARD: + BATTLE_NoAction( battleindex, attackNo ); + break; + case BATTLE_COM_S_CHARGE: + sprintf( szWork, "bt|%x|", attackNo ); + BATTLESTR_ADD( szWork ); + break; +#ifdef _PETSKILL_LER + case BATTLE_COM_S_BAT_FLY: + { + if((defNo = BATTLE_TargetAdjust(battleindex,charaindex,myside)) < 0){ + BATTLE_NoAction(battleindex,attackNo); + break; + } + + BATTLE_BatFly(battleindex,attackNo,myside); + } + break; + case BATTLE_COM_S_DIVIDE_ATTACK: + { + if((defNo = BATTLE_TargetAdjust(battleindex,charaindex,myside)) < 0){ + BATTLE_NoAction(battleindex,attackNo); + break; + } + + BATTLE_DivideAttack(battleindex,attackNo,myside); + } + break; +#endif +#ifdef _PETSKILL_BATTLE_MODEL + case BATTLE_COM_S_BATTLE_MODEL: + BATTLE_BattleModel(battleindex,attackNo,myside); + break; +#endif + //--------------------------------------------- + default: + print( "\nerr:奇怪的命令(%d:%d:%s)\n", charaindex, COM, + CHAR_getUseName( charaindex ) ); + sprintf( szWork, "bg|%x|", attackNo ); + BATTLESTR_ADD( szWork ); + break; + } +#ifdef _VARY_WOLF + if(CHAR_getInt( charaindex, CHAR_BASEIMAGENUMBER)==101428) + { + if(CHAR_getWorkInt( charaindex, CHAR_WORKTURN)==0) + CHAR_setWorkInt( charaindex, CHAR_WORKTURN, 1); + else + CHAR_setWorkInt( charaindex, CHAR_WORKTURN, CHAR_getWorkInt( charaindex, CHAR_WORKTURN)+1); + + if(CHAR_getWorkInt( charaindex, CHAR_WORKTURN)>5) + { + CHAR_setInt( charaindex, CHAR_BASEIMAGENUMBER, CHAR_getInt( charaindex, CHAR_BASEBASEIMAGENUMBER)); + CHAR_setWorkInt( charaindex, CHAR_WORKATTACKPOWER, CHAR_getWorkInt( charaindex, CHAR_WORKFIXSTR)); + CHAR_setWorkInt( charaindex, CHAR_WORKQUICK, CHAR_getWorkInt( charaindex, CHAR_WORKFIXDEX)); + CHAR_setWorkInt( charaindex, CHAR_WORKTURN, 0); + } + } +#endif + +#ifdef _PETSKILL_BECOMEFOX // 判断中了媚惑术後是否已到恢复的回合数 + //if(CHAR_getInt( charaindex, CHAR_BASEIMAGENUMBER)==101749) //用图号判断的话,若是人变身时,会被自动改回去 + if( CHAR_getWorkInt( charaindex, CHAR_WORKFOXROUND ) != -1 ) //若是变成小狐狸 + { + if(CHAR_getInt( charaindex, CHAR_BASEIMAGENUMBER)!=101749) + CHAR_setInt( charaindex, CHAR_BASEIMAGENUMBER, 101749 ); + + if(pBattle->turn - CHAR_getWorkInt( charaindex, CHAR_WORKFOXROUND) > 2) + { + int defNo = BATTLE_Index2No( battleindex, charaindex ); + int toNo = defNo - 5;//主人的编号 + //print("\n变身人物回复:%s,round:%d", CHAR_getChar( charaindex, CHAR_NAME), CHAR_getWorkInt( charaindex, CHAR_WORKFOXROUND)); + + CHAR_setInt( charaindex, CHAR_BASEIMAGENUMBER, CHAR_getInt( charaindex, CHAR_BASEBASEIMAGENUMBER)); + + CHAR_setWorkInt( charaindex, CHAR_WORKATTACKPOWER, CHAR_getWorkInt( charaindex, CHAR_WORKFIXSTR)); + CHAR_setWorkInt( charaindex, CHAR_WORKDEFENCEPOWER, CHAR_getWorkInt( charaindex, CHAR_WORKFIXTOUGH)); + CHAR_setWorkInt( charaindex, CHAR_WORKQUICK, CHAR_getWorkInt( charaindex, CHAR_WORKFIXDEX)); + CHAR_setWorkInt( charaindex, CHAR_WORKFOXROUND, -1); + + //Change fix 回复宠物忘掉的技能 + sprintf( szWork, "W%d", CHAR_getInt( BATTLE_No2Index( battleindex, toNo ), CHAR_DEFAULTPET ) ); + CHAR_sendStatusString( BATTLE_No2Index( battleindex, toNo ), szWork ); + } + } +#endif +#ifdef _PETSKILL_BECOMEPIG + if( CHAR_getInt( charaindex, CHAR_BECOMEPIG) > -1 + && (CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER) ) + { + char pigbuffer[128]; + CHAR_setInt( charaindex, CHAR_BASEIMAGENUMBER, CHAR_getInt( charaindex, CHAR_BECOMEPIG_BBI ) ); + if( CHAR_getInt( charaindex, CHAR_BECOMEPIG) > 0 ){ + sprintf(pigbuffer, "乌力时间:%d秒", CHAR_getInt( charaindex, CHAR_BECOMEPIG )); + CHAR_talkToCli( charaindex,-1,pigbuffer,CHAR_COLORWHITE); + } + else{ + sprintf(pigbuffer, " 乌力时间结束,离开战斗後可解除乌力化:%d ", CHAR_getInt( charaindex, CHAR_BECOMEPIG )); + CHAR_talkToCli( charaindex,-1,pigbuffer,CHAR_COLORWHITE); + } + } +#endif + +#ifdef _PROFESSION_ADDSKILL + { +/* for(i=0;i<20;i++){ + if( pBattle->ice_use[i] ){//冰爆准备中 + print("\n冰爆准备中"); + if( pBattle->ice_bout[i] > 0 ){//冰爆倒数 + print("\n冰爆倒数"); + if( --pBattle->ice_bout[i] == 0 ){//放冰爆 + print("\n放冰爆"); + pBattle->ice_use[i] = FALSE; + if( CHAR_CHECKINDEX(pBattle->ice_charaindex[i]) ){ + int battlecom = CHAR_getWorkInt( pBattle->ice_charaindex[i], CHAR_WORKBATTLECOM1 ); + print("\n冰爆"); + print("\nbattlecom:%d",battlecom); + CHAR_setWorkInt( pBattle->ice_charaindex[i], CHAR_WORKBATTLECOM1, BATTLE_COM_S_ICE_CRACK ); + CHAR_SETWORKINT_HIGH( pBattle->ice_charaindex[i], CHAR_WORKBATTLECOM3, pBattle->ice_level[i] ); + CHAR_setWorkInt( pBattle->ice_charaindex[i], CHAR_WORKBATTLECOM2, pBattle->ice_toNo[i] ); + CHAR_SETWORKINT_HIGH( pBattle->ice_charaindex[i], CHAR_WORKBATTLECOM3, pBattle->ice_level[i] ); + CHAR_SETWORKINT_LOW( pBattle->ice_charaindex[i], CHAR_WORKBATTLECOM3, pBattle->ice_array[i] ); + battle_profession_attack_magic_fun(battleindex, pBattle->ice_attackNo[i], pBattle->ice_toNo[i], pBattle->ice_charaindex[i]); + CHAR_setWorkInt( pBattle->ice_charaindex[i], CHAR_WORKBATTLECOM1, battlecom ); + } + } + } + } + }*/ + } + { + int earth_boundary = GETHIGHVALUE( CHAR_getWorkInt( charaindex, CHAR_WORKFIXEARTHAT_BOUNDARY ) ); + int water_boundary = GETHIGHVALUE( CHAR_getWorkInt( charaindex, CHAR_WORKFIXWATERAT_BOUNDARY ) ); + int fire_boundary = GETHIGHVALUE( CHAR_getWorkInt( charaindex, CHAR_WORKFIXFIREAT_BOUNDARY ) ); + int wind_boundary = GETHIGHVALUE( CHAR_getWorkInt( charaindex, CHAR_WORKFIXWINDAT_BOUNDARY ) ); + int boundary_turn=0; + BOOL boundaryclear = FALSE; + if( earth_boundary > 0 ){//地结界 + boundary_turn = GETLOWVALUE( CHAR_getWorkInt( charaindex, CHAR_WORKFIXEARTHAT_BOUNDARY ) ) - 1; +print("\n地:%d ",boundary_turn ); + if( boundary_turn <= -1 ) + CHAR_setWorkInt( charaindex, CHAR_WORKFIXEARTHAT_BOUNDARY, 0 ),boundaryclear = TRUE; + else + CHAR_setWorkInt( charaindex, CHAR_WORKFIXEARTHAT_BOUNDARY, MAKE2VALUE(earth_boundary,boundary_turn) ); + + } + if( water_boundary > 0 ){//水结界 + boundary_turn = GETLOWVALUE( CHAR_getWorkInt( charaindex, CHAR_WORKFIXWATERAT_BOUNDARY ) ) - 1; +print("\n水:%d ",boundary_turn ); + + if( boundary_turn <= -1 ) + CHAR_setWorkInt( charaindex, CHAR_WORKFIXWATERAT_BOUNDARY, 0 ),boundaryclear = TRUE; + else + CHAR_setWorkInt( charaindex, CHAR_WORKFIXWATERAT_BOUNDARY, MAKE2VALUE(water_boundary,boundary_turn) ); + + } + if( fire_boundary > 0 ){//火结界 + boundary_turn = GETLOWVALUE( CHAR_getWorkInt( charaindex, CHAR_WORKFIXFIREAT_BOUNDARY ) ) - 1; +print("\n火:%d ",boundary_turn ); + + if( boundary_turn <= -1 ) + CHAR_setWorkInt( charaindex, CHAR_WORKFIXFIREAT_BOUNDARY, 0 ),boundaryclear = TRUE; + else + CHAR_setWorkInt( charaindex, CHAR_WORKFIXFIREAT_BOUNDARY, MAKE2VALUE(fire_boundary,boundary_turn) ); + + } + if( wind_boundary > 0 ){//风结界 + boundary_turn = GETLOWVALUE( CHAR_getWorkInt( charaindex, CHAR_WORKFIXWINDAT_BOUNDARY ) ) - 1; +print("\n风:%d ",boundary_turn ); + + if( boundary_turn <= -1 ) + CHAR_setWorkInt( charaindex, CHAR_WORKFIXWINDAT_BOUNDARY, 0 ),boundaryclear = TRUE; + else + CHAR_setWorkInt( charaindex, CHAR_WORKFIXWINDAT_BOUNDARY, MAKE2VALUE(wind_boundary,boundary_turn) ); + + } + if( GETHIGHVALUE( CHAR_getWorkInt( charaindex, CHAR_WORKFIXEARTHAT_BOUNDARY ) ) == 0 + && GETHIGHVALUE( CHAR_getWorkInt( charaindex, CHAR_WORKFIXWATERAT_BOUNDARY ) ) == 0 + && GETHIGHVALUE( CHAR_getWorkInt( charaindex, CHAR_WORKFIXFIREAT_BOUNDARY ) ) == 0 + && GETHIGHVALUE( CHAR_getWorkInt( charaindex, CHAR_WORKFIXWINDAT_BOUNDARY ) ) == 0 + && boundaryclear ){ + int toNo = BATTLE_Index2No( battleindex, charaindex ); + if( toNo < 10 )//右方 + snprintf( szWork, sizeof( szWork ), "Ba|%X|%X|", 0,1 ); + else + snprintf( szWork, sizeof( szWork ), "Ba|%X|%X|", 0,0 ); + BATTLESTR_ADD( szWork ); + BATTLESTR_ADD( "FF|" ); + } + } +#endif + +#ifdef _Item_ReLifeAct + { + //pEntry + int k, userindex=-1; + // if( BattleArray[ battleindex].type != BATTLE_TYPE_P_vs_P){ + for( k=0; k<20; k++) { + userindex = BATTLE_getBattleDieIndex( battleindex, k); + if( !CHAR_CHECKINDEX( userindex) ) continue; + //Change fix CHECK_ITEM_RELIFE里面有检查了,这里不用 + //if( CHAR_getFlg( userindex, CHAR_ISDIE ) == FALSE ) + // continue; + if( CHAR_getInt( userindex, CHAR_HP) > 0 ) + continue; + if( CHAR_getInt( userindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ) { + CHECK_ITEM_RELIFE( battleindex, userindex); + } +#ifdef _LOSE_FINCH_ + else if( CHAR_getInt( userindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET ){ + CHECK_PET_RELIFE( battleindex, userindex); + } +#endif + } + } +#endif + BATTLESTR_ADD( szBadStatusString ); + BATTLE_AddProfit( battleindex, aAttackList );//取得经验值 + len = pszBattleTop - szBattleString; + if( AllSize + len >= sizeof( szAllBattleString ) - 1 ){ + // 引匹中匀凶井日窒手仄卅中 + }else{ + memcpy( szAllBattleString+AllSize, szBattleString, len ); + szAllBattleString[AllSize+len] = 0;// NULL 毛本永玄 + AllSize += len; + } + +#ifdef _CHECK_BATTLETIME + check_battle_com_end( COM); +#endif + + if( BATTLE_CountAlive( battleindex, 0 ) == 0 || BATTLE_CountAlive( battleindex, 1 ) == 0 ) { + break; + } + } +#ifdef _PETSKILL_LER + { + register int i,dieindex; + for(i=0;i<20;i++){ + dieindex = BATTLE_getBattleDieIndex(battleindex,i); + if(!CHAR_CHECKINDEX(dieindex)) continue; + if(CHAR_getFlg(dieindex,CHAR_ISDIE) == FALSE) continue; + if(CHAR_getInt(dieindex,CHAR_HP) > 0) continue; + // 雷尔死亡,变身 + if(CHAR_getInt(dieindex,CHAR_BASEBASEIMAGENUMBER) == 101813 || + CHAR_getInt(dieindex,CHAR_BASEBASEIMAGENUMBER) == 101814) + BATTLE_LerChange(battleindex,dieindex,i); + } + } +#endif + + szBattleString[0] = 0; + pszBattleTop = szBattleString; + pszBattleLast = szBattleString+arraysizeof(szBattleString); + if( pBattle->field_att != BATTLE_ATTR_NONE ){ + pBattle->att_count--; + if( pBattle->att_count <= 0 ){ + pBattle->field_att = BATTLE_ATTR_NONE; + //snprintf( szBuffer, sizeof(szBuffer), + // "field回复成无属性。" + //); + //BATTLE_BroadCast( battleindex, szBuffer, CHAR_COLORYELLOW ); + BATTLESTR_ADD( "BV|15|0|" ); + } + } + + strncat( szAllBattleString, szBattleString, sizeof( szAllBattleString ) ); + for( i = 0; i < entrynum; i ++ ){ + charaindex = EntryList[i].charaindex; + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ) == BATTLE_CHARMODE_RESCUE ) + continue; + + if( BATTLE_CommandSend( charaindex, szAllBattleString ) == TRUE ){ + } + } + pWatchBattle = pBattle->pNext; + for( ; pWatchBattle ; pWatchBattle = pWatchBattle->pNext ){ + if( BATTLE_CHECKADDRESS( pWatchBattle ) == FALSE ){ + print( "err:观战battle address错误(%p)\n", pWatchBattle ); + break; + } + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + charaindex = pWatchBattle->Side[0].Entry[i].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )continue; + BATTLE_CommandSend( charaindex, szAllBattleString ); + } + pWatchBattle->mode = BATTLE_MODE_WATCHAFTER; + } + + return 0; +} + +#ifdef _Item_ReLifeAct +BOOL CHECK_ITEM_RELIFE( int battleindex, int toindex) +{ + int i, itemindex; + CHAR_EquipPlace ep; + typedef void (*DIERELIFEFUNC)(int,int,int); + DIERELIFEFUNC Drf; + + if( CHAR_getInt( toindex, CHAR_HP) > 0 ) + return FALSE; + +#ifdef _DUMMYDIE + if( CHAR_getFlg( toindex, CHAR_ISDIE ) == FALSE && CHAR_getFlg( toindex, CHAR_ISDUMMYDIE ) == FALSE ) +#else + if( CHAR_getFlg( toindex, CHAR_ISDIE ) == FALSE ) +#endif + return FALSE; + + for( i = 0 ; i < 5 ; i++ ){ + itemindex = CHAR_getItemIndex( toindex , i ); + if( !ITEM_CHECKINDEX( itemindex)) + continue; + ep = ITEM_getEquipPlace( toindex, itemindex ); + if( ep == -1 ) + continue; + Drf=(DIERELIFEFUNC)ITEM_getFunctionPointer(itemindex, ITEM_DIERELIFEFUNC); + if( Drf ) { + Drf( toindex, itemindex, i); + return TRUE; + } + } + + return FALSE; + +} +#endif + +#ifdef _LOSE_FINCH_ +BOOL CHECK_PET_RELIFE( int battleindex, int petindex) +{ + int ReceveEffect=-1; + int toNo; + int attackNo=-1; + int WORK_HP=1; + int i; + struct _RePet{ + int petid; + int Effect; + int Addhp; +//Syu Mod +// }rePet[]={{1,SPR_fukkatu3,100},{-1,0,0}}; + }rePet[]={{-1,0,0}}; + + if( BATTLE_CHECKINDEX( battleindex ) == FALSE ) { + return FALSE; + } + if( CHAR_CHECKINDEX( petindex) == FALSE ) + return FALSE; + + if( CHAR_getFlg( petindex, CHAR_ISDIE) == FALSE ) { + print("\n PET_RELIFE:[ %d, CHAR_ISDIE FALSE] return !", petindex); + return FALSE; + } + if( CHAR_getWorkInt( petindex, CHAR_WORKSPETRELIFE) != 0 ) + return FALSE; + for( i=0;iskill, SKILL_LEVEL); + skill_level = PROFESSION_CHANGE_SKILL_LEVEL_M( skill_level ); + + if( skill_level >= 6 ) add_practice = (skill_level-5) * 3 + 10; + else add_practice = skill_level * 2; + if( add_practice > 25 ) add_practice = 25; + + add_practice += old_practice; + // 因为old_practice=0所以add_practice为2~25 + + CHAR_setWorkInt( charaindex, CHAR_WORK_F_PROFICIENCY, add_practice ); + + }else + // 冰熟练度 + if( (strcmp( skill_name , "PROFESSION_ICE_PRACTICE" )) == 0 ){ + int old_practice = CHAR_getInt( charaindex, PROFESSION_ICE_P ); + int add_practice = 0; + int skill_level = 0; + + // 技能等级 + hskill = CHAR_getCharHaveSkill( charaindex, i ); + skill_level = SKILL_getInt( &hskill->skill, SKILL_LEVEL); + skill_level = PROFESSION_CHANGE_SKILL_LEVEL_M( skill_level ); + + if( skill_level >= 6 ) add_practice = (skill_level-5) * 3 + 10; + else add_practice = skill_level * 2; + if( add_practice > 25 ) add_practice = 25; + + add_practice += old_practice; + + CHAR_setWorkInt( charaindex, CHAR_WORK_I_PROFICIENCY, add_practice ); + + }else + // 雷熟练度 + if( (strcmp( skill_name , "PROFESSION_THUNDER_PRACTICE" )) == 0 ){ + int old_practice = CHAR_getInt( charaindex, PROFESSION_THUNDER_P ); + int add_practice = 0; + int skill_level = 0; + + // 技能等级 + hskill = CHAR_getCharHaveSkill( charaindex, i ); + skill_level = SKILL_getInt( &hskill->skill, SKILL_LEVEL); + skill_level = PROFESSION_CHANGE_SKILL_LEVEL_M( skill_level ); + + if( skill_level >= 6 ) add_practice = (skill_level-5) * 3 + 10; + else add_practice = skill_level * 2; + if( add_practice > 25 ) add_practice = 25; + + add_practice += old_practice; + + CHAR_setWorkInt( charaindex, CHAR_WORK_T_PROFICIENCY, add_practice ); + + }else + // 回避 + if( (strcmp( skill_name , "PROFESSION_AVOID" )) == 0 ){ + int skill_level = 0; + + if( profession_class != PROFESSION_SKILL_getInt( Pskillid, PROFESSION_SKILL_PROFESSION_CLASS) ) return; + + // 技能等级 + hskill = CHAR_getCharHaveSkill( charaindex, i ); + skill_level = SKILL_getInt( &hskill->skill, SKILL_LEVEL); + skill_level = PROFESSION_CHANGE_SKILL_LEVEL_A( skill_level ); + + if( skill_level <=5 ) + value = skill_level * 2; + else + value = (skill_level-5) * 3; + if( value > 25 ) value = 25; + + CHAR_setWorkInt( charaindex, CHAR_WORK_P_DUCK, 1); + CHAR_setWorkInt( charaindex, CHAR_WORKMOD_P_DUCK, value ); + + }else + // 格档 + if( (strcmp( skill_name , "PROFESSION_DEFLECT" )) == 0 ){ + int skill_level = 0; + int old_value = 0, add_value = 0; + + if( profession_class != PROFESSION_SKILL_getInt( Pskillid, PROFESSION_SKILL_PROFESSION_CLASS) ) return; + + // 技能等级 + hskill = CHAR_getCharHaveSkill( charaindex, i ); + skill_level = SKILL_getInt( &hskill->skill, SKILL_LEVEL); + skill_level = PROFESSION_CHANGE_SKILL_LEVEL_A( skill_level ); + + old_value = CHAR_getWorkInt( charaindex, CHAR_WORKFIXARRANGE ); + add_value = old_value + skill_level + 10; + + CHAR_setWorkInt( charaindex, CHAR_WORKFIXARRANGE, add_value ); + CHAR_complianceParameter( charaindex ); + + }else + // 武器专精 + if( (strcmp( skill_name , "PROFESSION_WEAPON_FOCUS" )) == 0 ){ + int skill_level = 0; + + rate = 0; + if( profession_class != PROFESSION_SKILL_getInt( Pskillid, PROFESSION_SKILL_PROFESSION_CLASS) ) continue; + + // 技能等级 + hskill = CHAR_getCharHaveSkill( charaindex, i ); + skill_level = SKILL_getInt( &hskill->skill, SKILL_LEVEL); + skill_level = PROFESSION_CHANGE_SKILL_LEVEL_A( skill_level ); + + // 技能参数 + pszOption = PROFESSION_SKILL_getChar( Pskillid, PROFESSION_SKILL_OPTION); + if( pszOption == NULL ) continue; + + // 装备武器 + WeaponType = BATTLE_GetWepon( charaindex ); + + switch( WeaponType ){ + case ITEM_AXE: + if( (pszP=strstr( pszOption, "斧" ))!=NULL) rate = 1; break; + case ITEM_CLUB: + if( (pszP=strstr( pszOption, "棍" ))!=NULL) rate = 1; break; + case ITEM_SPEAR: + if( (pszP=strstr( pszOption, "枪" ))!=NULL) rate = 1; break; + case ITEM_BOW: + if( (pszP=strstr( pszOption, "弓" ))!=NULL) rate = 1; break; + case ITEM_BOOMERANG: // 回旋标 + if( (pszP=strstr( pszOption, "镖" ))!=NULL) rate = 1; break; + case ITEM_BOUNDTHROW: // 投掷斧头 + if( (pszP=strstr( pszOption, "投" ))!=NULL) rate = 1; break; + case ITEM_BREAKTHROW: // 投掷石 + if( (pszP=strstr( pszOption, "石" ))!=NULL) rate = 1; break; + default: rate = 0; break; + } + + if( rate == 1 ){ + old_value = CHAR_getWorkInt( charaindex, CHAR_MYSKILLSTRPOWER); + + if( skill_level <=5 ) + value = skill_level * 2 + old_value; + else + value = (skill_level-5) * 3 + 10 + old_value; + + if( value > 25 ) value = 25; + + CHAR_setWorkInt( charaindex, CHAR_WORK_WEAPON, 1 ); + CHAR_setWorkInt( charaindex, CHAR_WORKMOD_WEAPON, value ); + } + } + } + } + return; +} + + +void BATTLE_ProfessionStatusSeq( int battleindex, int charaindex ) +{ + int profession_class=0, i=0, j=0, Pskillid=-1, skillid=-1; + int skill_level=0, value=0, old_value=0; + int bid=-1, hp=0, flag=0; + char *skill_name, szcommand[256]; + CHAR_HaveSkill* hskill; + + + int status_table[9]={ 2, //麻痹 + 3, //睡眠 + 4, //石化 + 12, //晕眩 + 13, //缠绕 + 14, //天罗 + 15, //冰暴 + 17, //冰箭 + 23, }; //雷附体 + +#ifdef _PETSKILL_DAMAGETOHP +/* { + char msg[32]={0}; + int pet,pindex; + pet = CHAR_getInt( charaindex, CHAR_DEFAULTPET ); + if( pet >= 0 ){ + sprintf( msg, "o%d", pet ); + //if(CHAR_getInt( petindex, CHAR_PETID) == "狼" //宠物ID + // && CHAR_getInt( petindex, CHAR_HP) ) + CHAR_sendStatusString( charaindex, msg ); + pindex = CHAR_getCharPet( charaindex, pet ); + print("\n宠物名:%s",CHAR_getChar( pindex, CHAR_NAME)); + } + else + print("\无宠物"); + + } */ +#endif + + if ( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) return; + + profession_class=CHAR_getInt( charaindex, PROFESSION_CLASS); + if( profession_class <= PROFESSION_CLASS_NONE ) return; + + for( i=0; i 0 ){ + flag=1; + break; + } + } + + if( flag > 0 ){ + // 技能等级 + hskill = CHAR_getCharHaveSkill( charaindex, i ); + skill_level = SKILL_getInt( &hskill->skill, SKILL_LEVEL); + skill_level = PROFESSION_CHANGE_SKILL_LEVEL_M( skill_level ); + + value = skill_level * 2; + if( value > 20 ) value = 20; + + old_value = CHAR_getWorkInt( charaindex, CHAR_WORKMAXHP); + + value = old_value * value / 100 ; + + hp = CHAR_getInt( charaindex, CHAR_HP); + + if( value + hp > old_value ) + value = old_value - hp; + + if( value < 0 ) value = 0; + + CHAR_setInt( charaindex, CHAR_HP, value + hp ); + + bid = BATTLE_Index2No( battleindex, charaindex ); + sprintf( szcommand, "BD|r%X|0|1|%X|", bid, value ); + BATTLESTR_ADD( szcommand ); + + PROFESSION_SKILL_LVEVEL_UP( charaindex, "PROFESSION_REBACK" ); + } + } + + // 陷阱 + if( (strcmp( skill_name , "PROFESSION_TRAP" )) == 0 ){ + int count=0; + + count = CHAR_getWorkInt( charaindex, CHAR_WORKTRAP); + if( count > 0 ){ + count--; + CHAR_setWorkInt( charaindex, CHAR_WORKTRAP, count ); + }else if( count == 0 ){ + CHAR_setWorkInt( charaindex, CHAR_WORKTRAP, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORKMODTRAP, 0 ); + } + } + } + + return; +} + +#endif diff --git a/gmsv/battle/battle_ai.c b/gmsv/battle/battle_ai.c new file mode 100644 index 0000000..b2ce8a3 --- /dev/null +++ b/gmsv/battle/battle_ai.c @@ -0,0 +1,533 @@ +#include "version.h" +#include +#include "common.h" +#include "char.h" +#include "char_base.h" +#include "battle.h" +#include "npcutil.h" +#include "pet_skill.h" + +struct B_AI_RESULT { + BATTLE_COM command; /* 窒毛允月井 */ + int target; /* 簿卞 */ +}; + +static int BATTLE_ai_normal( int, int, BATTLE_ENTRY *,struct B_AI_RESULT *); + +static int (*functbl[])( int, int, BATTLE_ENTRY *,struct B_AI_RESULT *) = { + NULL, + BATTLE_ai_normal, +}; + +int BATTLE_ai_all( int battleindex, int side, int turn) +{ + int i; + int rc = FALSE; + BATTLE_ENTRY *pEntry; + struct B_AI_RESULT result; + + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX; + if( BATTLE_CHECKSIDE( side ) == FALSE )return BATTLE_ERR_PARAM; + if( BATTLE_CHECKSIDE( side ^1) == FALSE )return BATTLE_ERR_PARAM; + if( BattleArray[battleindex].Side[side].type != BATTLE_S_TYPE_ENEMY ) return FALSE; + pEntry = BattleArray[battleindex].Side[side^1].Entry; + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + int charaindex = BattleArray[battleindex].Side[side].Entry[i].charaindex; + int mode; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )continue; + + mode = CHAR_getWorkInt( charaindex, CHAR_WORKTACTICS); + if( mode < 0 || mode >= arraysizeof( functbl)){ + print( "BATTLE_ai_all 中,战斗逻辑模式很奇怪(%s)(%d)\n", + CHAR_getUseName( charaindex ), mode ); + mode = 1; + } + if( BATTLE_IsCharge( charaindex ) == TRUE ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + continue; + } + if( BattleArray[battleindex].Side[side].flg & BSIDE_FLG_SURPRISE) { + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + }else { + if( functbl[mode] != NULL ) { + rc = functbl[mode]( turn, charaindex, pEntry, &result); + if( BATTLE_CanMoveCheck( charaindex ) == FALSE ){ + result.command = BATTLE_COM_NONE; + } + } + if( rc ) { +#ifdef _BATTLENPC_WARP_PLAYER + if(result.command==BATTLE_COM_WARP){ + for( i=0; icharaindex; + if( !CHAR_CHECKINDEX( tindex ))continue; + if( CHAR_getFlg( tindex, CHAR_ISDIE)) continue; + if( CHAR_getWorkInt( tindex, CHAR_WORKBATTLEMODE) + == BATTLE_CHARMODE_RESCUE ) continue; + if( CHAR_getInt( tindex, CHAR_WHICHTYPE)==CHAR_TYPEPLAYER){ + char sBuff[1024]="", sBuff1[1024]=""; + int ss[3]; + int sii; + int rc = 1; + if( NPC_Util_GetStrFromStrWithDelim( CHAR_getWorkChar( charaindex, CHAR_WORKBATTLE_ACT_CONDITION), + "wp", sBuff, sizeof( sBuff))!=NULL){ + for( sii=1; sii<=3; sii++){ + if(getStringFromIndexWithDelim( sBuff, ";", sii, sBuff1, sizeof( sBuff1))) + {ss[sii-1]=atoi(sBuff1);} + else + {rc=0;} + } + if(rc){ + CHAR_warpToSpecificPoint( tindex, ss[0], ss[1], ss[2]); + BATTLE_WatchStop( tindex); + } + } + } + } + } +#endif + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, result.command ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, + result.target + (side^1)*SIDE_OFFSET); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + //CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, array); + + } + } + } + return TRUE; +} + +int BATTLE_ai_one( int charaindex, int battleindex, int side, int turn) +{ + int rc = FALSE; + BATTLE_ENTRY *pEntry; + struct B_AI_RESULT result; + int mode; + + /* 由仿丢□正民尼永弁 */ + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX; + if( BATTLE_CHECKSIDE( side ) == FALSE )return BATTLE_ERR_PARAM; + if( BATTLE_CHECKSIDE( side ^1) == FALSE )return BATTLE_ERR_PARAM; + + /* 及扔奶玉隋垫丹 */ + /* 衬平乓仿动陆反 仃月 */ + if( BattleArray[battleindex].Side[side].type != BATTLE_S_TYPE_ENEMY ) return 0; + + /* 覆础扔奶玉 */ + pEntry = BattleArray[battleindex].Side[side^1].Entry; + + mode = CHAR_getWorkInt( charaindex, CHAR_WORKTACTICS); + /* 质 毛蕊曰坌仃月 */ + if( mode < 0 || mode >= arraysizeof( functbl)) return FALSE; + /* 质 毛蕊曰坌仃月 */ + if( functbl[mode] != NULL ) { + rc = functbl[mode]( turn, charaindex, pEntry, &result); + } + if( rc ) { + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, result.command ); + if( result.command == BATTLE_COM_ATTACK) { + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, + result.target + (side^1)*SIDE_OFFSET); + } + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + } + return TRUE; +} + +/* 骚卞锹澎毛瑁户月 */ + +#define B_AI_NORMAL_ATTACKOPTION "at" /* 猾左皿扑亦件 */ +#define B_AI_NORMAL_GUARDOPTION "gu" /* 豢左皿扑亦件 */ +#define B_AI_NORMAL_MAGICOPTION "ma" /* 热诸左皿扑亦件 */ +#define B_AI_NORMAL_ESCAPEOPTION "es" /* 仆月左皿扑亦件 */ +#define B_AI_NORMAL_WAZAOPTION "wa" /* 左皿扑亦件 */ +#ifdef _ENEMY_ATTACK_AI +#define B_AI_NORMAL_RANDAOPTION "rn" +#define B_AI_NORMAL_RANDOMOPTIONNUM 1 +#endif + +#define B_AI_NORMAL_ATTACKSUBOPTIONNUM 3 +#define B_AI_NORMAL_GUARDSUBOPTIONNUM 1 +#define B_AI_NORMAL_MAGICSUBOPTIONNUM 1 +#define B_AI_NORMAL_ESCAPESUBOPTIONNUM 1 +#define B_AI_NORMAL_WAZASUBOPTIONNUM 7 + +/* 左皿扑亦件娄醒及 侬及烂聒 */ +#define B_AI_NORMAL_TARGET_ALL 1 +#define B_AI_NORMAL_TARGET_PLAYER 2 +#define B_AI_NORMAL_TARGET_PET 3 +#ifdef _ENEMY_ATTACK_AI +#define B_AI_NORMAL_TARGET_LEADER 4 +#endif +#define B_AI_NORMAL_SELECT_RANDOM 1 +#define B_AI_NORMAL_SELECT_HP_MAX 2 +#define B_AI_NORMAL_SELECT_HP_MIN 3 +#ifdef _ENEMY_ATTACK_AI +#define B_AI_NORMAL_SELECT_STR_MAX 4 +#define B_AI_NORMAL_SELECT_DEX_MAX 5 +#define B_AI_NORMAL_SELECT_DEX_MIN 6 +#define B_AI_NORMAL_SELECT_ATT_SUBDUE 7 +enum{ + AI_ATT_EARTHAT = 1, + AI_ATT_WATERAT, + AI_ATT_FIREAT, + AI_ATT_WINDAT +}; +int GetSubdueAttribute(int index){ + int s_a = CHAR_getWorkInt( index, CHAR_WORKFIXEARTHAT); + int s_b = CHAR_getWorkInt( index, CHAR_WORKFIXWATERAT); + int s_c = CHAR_getWorkInt( index, CHAR_WORKFIXFIREAT); + int s_d = CHAR_getWorkInt( index, CHAR_WORKFIXWINDAT); + return ((s_a>s_c)?((s_b>s_d)?((s_a>s_b)?(2):(3)):((s_a>s_d)?(2):(1))):((s_b>s_d)?((s_c>s_b)?(4):(3)):((s_c>s_d)?(4):(1)))); +} +#endif + +typedef enum { + B_AI_ATTACKMODE = 1, + B_AI_GURADMODE, + B_AI_MAGICMODE, + B_AI_ESCAPEMODE, + B_AI_WAZAMODE0, + B_AI_WAZAMODE1, + B_AI_WAZAMODE2, + B_AI_WAZAMODE3, + B_AI_WAZAMODE4, + B_AI_WAZAMODE5, + B_AI_WAZAMODE6, +}B_AI_MODE; + +static int BATTLE_ai_normal( int turn, int charaindex, + BATTLE_ENTRY *pEntry, + struct B_AI_RESULT *result) +{ + int at[B_AI_NORMAL_ATTACKSUBOPTIONNUM] = { 0,0,0}; /* 猾左皿扑亦件 */ + int gu[B_AI_NORMAL_GUARDSUBOPTIONNUM] = {0}; /* 左皿扑亦件 */ + int ma[B_AI_NORMAL_MAGICSUBOPTIONNUM] = {0}; /* 左皿扑亦件 */ + int es[B_AI_NORMAL_ESCAPESUBOPTIONNUM] = {0}; /* 左皿扑亦件 */ + int wa[B_AI_NORMAL_WAZASUBOPTIONNUM] = {0,0,0,0, 0,0,0};/* 左皿扑亦件 */ +#ifdef _ENEMY_ATTACK_AI + int rn[B_AI_NORMAL_RANDOMOPTIONNUM] = {1}; +#endif + int target[BATTLE_ENTRY_MAX]; + int cnt; + int i; + int r; + int rc; + int mode=0; + char buff[256]; + char buff2[256]; + + if( turn == 1 ) { + print( "应该没这回事。\n" ); + return FALSE; + } + if( NPC_Util_GetStrFromStrWithDelim( CHAR_getWorkChar( charaindex, CHAR_WORKBATTLE_TACTICSOPTION), + B_AI_NORMAL_ATTACKOPTION, buff, sizeof( buff)) != NULL ){ + for( i = 1; i < B_AI_NORMAL_ATTACKSUBOPTIONNUM + 1; i ++ ) { + rc = getStringFromIndexWithDelim( buff, ";", i, buff2, sizeof( buff2)); + if( rc != TRUE ) { + print( "battle_ai.c:Invarid Param [%s]\n", + CHAR_getWorkChar( charaindex, CHAR_WORKBATTLE_TACTICSOPTION)); + return FALSE; + } + at[i-1] = atoi( buff2); + } + } + + if( NPC_Util_GetStrFromStrWithDelim( CHAR_getWorkChar( charaindex, CHAR_WORKBATTLE_TACTICSOPTION), + B_AI_NORMAL_GUARDOPTION, buff, sizeof( buff)) != NULL ){ + for( i = 1; i < B_AI_NORMAL_GUARDSUBOPTIONNUM + 1; i ++ ) { + rc = getStringFromIndexWithDelim( buff, ";", i, buff2, sizeof( buff2)); + if( rc != TRUE ) { + print( "battle_ai.c:Invarid Param [%s]\n", + CHAR_getWorkChar( charaindex, CHAR_WORKBATTLE_TACTICSOPTION)); + return FALSE; + } + gu[i-1] = atoi( buff2); + } + } + if( NPC_Util_GetStrFromStrWithDelim( CHAR_getWorkChar( charaindex, CHAR_WORKBATTLE_TACTICSOPTION), + B_AI_NORMAL_MAGICOPTION, + buff, sizeof( buff)) != NULL ){ + for( i = 1; i < B_AI_NORMAL_MAGICSUBOPTIONNUM + 1; i ++ ) { + rc = getStringFromIndexWithDelim( buff, ";", i, buff2, sizeof( buff2)); + if( rc != TRUE ) { + print( "battle_ai.c:Invarid Param [%s]\n", + CHAR_getWorkChar( charaindex, CHAR_WORKBATTLE_TACTICSOPTION)); + return FALSE; + } + ma[i-1] = atoi( buff2); + + } + } + if( NPC_Util_GetStrFromStrWithDelim( CHAR_getWorkChar( charaindex, CHAR_WORKBATTLE_TACTICSOPTION), + B_AI_NORMAL_ESCAPEOPTION, + buff, sizeof( buff)) != NULL ){ + for( i = 1; i < B_AI_NORMAL_ESCAPESUBOPTIONNUM + 1; i ++ ) { + rc = getStringFromIndexWithDelim( buff, ";", i, buff2, sizeof( buff2)); + + if( rc != TRUE ) { + print( "battle_ai.c:Invarid Param [%s]\n", + CHAR_getWorkChar( charaindex, CHAR_WORKBATTLE_TACTICSOPTION)); + return FALSE; + } + es[i-1] = atoi( buff2); + } + } + if( NPC_Util_GetStrFromStrWithDelim( CHAR_getWorkChar( charaindex, CHAR_WORKBATTLE_TACTICSOPTION), + B_AI_NORMAL_WAZAOPTION, + buff, sizeof( buff)) != NULL ){ + for( i = 1; i < B_AI_NORMAL_WAZASUBOPTIONNUM + 1; i ++ ) { + rc = getStringFromIndexWithDelim( buff, ";", i, buff2, sizeof( buff2)); + if( rc != TRUE ) { + }else{ + wa[i-1] = atoi( buff2); + } + } + } +#ifdef _ENEMY_ATTACK_AI + if( NPC_Util_GetStrFromStrWithDelim( CHAR_getWorkChar( charaindex, CHAR_WORKBATTLE_TACTICSOPTION), + B_AI_NORMAL_RANDAOPTION, + buff, sizeof( buff))!=NULL){ + for( i=1; icommand = BATTLE_COM_WARP; + return TRUE; + } + } +#endif + if( at[0] == 0 && gu[0] == 0 && ma[0] == 0 && es[0] == 0 ){ + for( i = 0; i < B_AI_NORMAL_WAZASUBOPTIONNUM; i ++ ){ + if( wa[i] != 0 )break; + } + if( i >= B_AI_NORMAL_WAZASUBOPTIONNUM ){ + print( "无指定任何的攻击方式。\n" ); + return FALSE; + } + } + while( !mode ) { + int work = 0; + work = at[0]+gu[0]+ma[0]+es[0]; + for( i = 0; i < B_AI_NORMAL_WAZASUBOPTIONNUM; i ++ ){ + work += wa[i]; + } + r = RAND( 0, work - 1 ); + if( at[0] != 0 && r < at[0] ) mode = B_AI_ATTACKMODE; + else if( gu[0] != 0 && r < at[0] + gu[0]) mode = B_AI_GURADMODE; + else if( ma[0] != 0 && r < at[0] + gu[0] + ma[0]) mode = B_AI_MAGICMODE; + else if( es[0] != 0 && r < at[0] + gu[0] + ma[0] + es[0] ){ + mode = B_AI_ESCAPEMODE; + } + if( mode ) break; + work = at[0] + gu[0] + ma[0] + es[0]; + for( i = 0; i < B_AI_NORMAL_WAZASUBOPTIONNUM; i ++ ){ + work += wa[i]; + if( wa[i] != 0 && r < work ){ + mode = B_AI_WAZAMODE0+i; + break; + } + } + } + if( mode == B_AI_ATTACKMODE || ( B_AI_WAZAMODE0 <= mode && mode <= B_AI_WAZAMODE6 )){ + while( 1 ) { + for( i = 0 ; i < BATTLE_ENTRY_MAX; i ++ ) { + target[i] = -1; + } + cnt = 0; + for( i = 0; i < BATTLE_ENTRY_MAX ; i ++ ) { + int tindex = (pEntry+i)->charaindex; + if( !CHAR_CHECKINDEX( tindex ))continue; + if( CHAR_getFlg( tindex, CHAR_ISDIE)) continue; + if( CHAR_getWorkInt( tindex, CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_RESCUE ) continue; + switch( at[1]) { + case B_AI_NORMAL_TARGET_PLAYER: + if( CHAR_getInt( tindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER ){ + target[cnt++] = i; + } + break; + case B_AI_NORMAL_TARGET_PET: + if( CHAR_getInt( tindex, CHAR_WHICHTYPE) == CHAR_TYPEPET){ + target[cnt++] = i; + } + break; +#ifdef _ENEMY_ATTACK_AI + case B_AI_NORMAL_TARGET_LEADER: + if( CHAR_getWorkInt( tindex, CHAR_WORKPARTYMODE ) == CHAR_PARTY_LEADER) { + target[cnt++] = i; + }else if(!RAND( 0, 2)) { + target[cnt++] = i; + } + break; +#endif + default: + target[cnt++] = i; + break; + } + } + if( cnt == 0 && at[1] == B_AI_NORMAL_TARGET_ALL ) return FALSE; + if( cnt > 0 ) break; + at[1] = B_AI_NORMAL_TARGET_ALL; + } + result->command = BATTLE_COM_NONE; + if( at[2] == B_AI_NORMAL_SELECT_RANDOM ) { + r = RAND( 0, cnt-1); + result->command = BATTLE_COM_ATTACK; + result->target = target[r]; + }else if( at[2] == B_AI_NORMAL_SELECT_HP_MAX || at[2] == B_AI_NORMAL_SELECT_HP_MIN ){ + int top = 0; + for( i = 0; i < cnt; i ++ ) { + if( i ==0 ) top = target[i]; + else { + int tophp = CHAR_getInt((pEntry+top)->charaindex, CHAR_HP); + int comphp = CHAR_getInt((pEntry+target[i])->charaindex, CHAR_HP); + if( at[2] == B_AI_NORMAL_SELECT_HP_MAX ) { + if( comphp > tophp ) top = target[i]; + } + else { + if( comphp < tophp ) top = target[i]; + } + } + } +#ifdef _ENEMY_ATTACK_AI + if(!RAND( 0, rn[0])) + result->target = target[RAND( 0, cnt-1)]; + else + result->target = top; + result->command = BATTLE_COM_ATTACK; +#else + result->command = BATTLE_COM_ATTACK; + result->target = top; +#endif + } +#ifdef _ENEMY_ATTACK_AI + else if(at[2] == B_AI_NORMAL_SELECT_STR_MAX) { + int top = 0; + for( i=0; icharaindex, CHAR_STR); + int compstr = CHAR_getInt( (pEntry+target[i])->charaindex, CHAR_STR); + if(compstr>topstr) top = target[i]; + } + } + if(!RAND( 0, rn[0])) + result->target = target[RAND( 0, cnt-1)]; + else + result->target = top; + result->command = BATTLE_COM_ATTACK; + } + else if(at[2] == B_AI_NORMAL_SELECT_DEX_MAX || + at[2] == B_AI_NORMAL_SELECT_DEX_MIN) { + int top = 0; + for( i=0; icharaindex, CHAR_DEX); + int compdex = CHAR_getInt( (pEntry+target[i])->charaindex, CHAR_DEX); + if(at[2]==B_AI_NORMAL_SELECT_DEX_MAX) { + if(compdex>topdex) top = target[i]; + }else { + if(compdextarget = target[RAND( 0, cnt-1)]; + else + result->target = top; + result->command = BATTLE_COM_ATTACK; + } + else if(at[2] == B_AI_NORMAL_SELECT_ATT_SUBDUE) { + int top = 0; + for( i=0; icharaindex, CHAR_WORKFIXEARTHAT); + int compatt = CHAR_getWorkInt( (pEntry+target[i])->charaindex, CHAR_WORKFIXEARTHAT); + if(compatt>topatt) top = target[i]; + } + break; + case AI_ATT_WATERAT: + { + int topatt = CHAR_getWorkInt( (pEntry+top)->charaindex, CHAR_WORKFIXWATERAT); + int compatt = CHAR_getWorkInt( (pEntry+target[i])->charaindex, CHAR_WORKFIXWATERAT); + if(compatt>topatt) top = target[i]; + } + break; + case AI_ATT_FIREAT: + { + int topatt = CHAR_getWorkInt( (pEntry+top)->charaindex, CHAR_WORKFIXFIREAT); + int compatt = CHAR_getWorkInt( (pEntry+target[i])->charaindex, CHAR_WORKFIXFIREAT); + if(compatt>topatt) top = target[i]; + } + break; + case AI_ATT_WINDAT: + { + int topatt = CHAR_getWorkInt( (pEntry+top)->charaindex, CHAR_WORKFIXWINDAT); + int compatt = CHAR_getWorkInt( (pEntry+target[i])->charaindex, CHAR_WORKFIXWINDAT); + if(compatt>topatt) top = target[i]; + } + break; + default: + break; + } + } + } + if(!RAND( 0, rn[0])) + result->target = target[RAND( 0, cnt-1)]; + else + result->target = top; + result->command = BATTLE_COM_ATTACK; + } +#endif + else{ + return FALSE; + } + if( B_AI_WAZAMODE0 <= mode && mode <= B_AI_WAZAMODE6 ){ + if( PETSKILL_Use( charaindex, mode - B_AI_WAZAMODE0, result->target,NULL ) == TRUE ){ + result->command = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ); + return TRUE; + }else{ + print( "此项技能尚未设定(%s):(%d)\n", + CHAR_getUseName( charaindex), mode - B_AI_WAZAMODE0 ); + return FALSE; + } + }else + if( mode == B_AI_ATTACKMODE ){ + result->command = BATTLE_COM_ATTACK; + return TRUE; + } + }else if( mode == B_AI_GURADMODE ) { + result->command = BATTLE_COM_GUARD; + return TRUE; + }else if( mode == B_AI_ESCAPEMODE ) { + result->command = BATTLE_COM_ESCAPE; + return TRUE; + } + return FALSE; +} diff --git a/gmsv/battle/battle_command.c b/gmsv/battle/battle_command.c new file mode 100644 index 0000000..555aa0a --- /dev/null +++ b/gmsv/battle/battle_command.c @@ -0,0 +1,1087 @@ +#include "version.h" +#include +#include +#include"char.h" +#include"char_base.h" +#include "battle.h" +#include "pet_skill.h" +#include "battle_event.h" +#include "battle_command.h" +#include "lssproto_serv.h" +#include "magic.h" +#include "magic_base.h" +#include "handletime.h" + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 +#include "profession_skill.h" +#endif + +int NowBattlerFd; +#if 1 +int BATTLE_MpDown( int charaindex, int down ) +{ + return 0; +} +#else +{ + int mp, battleindex; + // 爵 反覆谛爵井}???爵井 + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return TRUE; + // 覆谛爵元扎卅井匀凶日?? + if( BattleArray[battleindex].type != BATTLE_TYPE_P_vs_P ){ + return TRUE; + } + + // ??毛蛹日六月井" + mp = CHAR_getInt( charaindex, CHAR_MP ); + if( mp < down ){ + // 蛹日六卅中及匹窒手仄卅中午允月 + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + // 戊穴件玉OK及隙烂 + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + return FALSE; + } + mp -= down; + CHAR_setInt( charaindex, CHAR_MP, mp ); + return TRUE; +} +#endif + + +void BattleCommandDispach( int fd, char *command ) +{ + int endFlg = 0, battleindex; + int EscapeFree = BATTLE_FLG_FREEDP; + int charaindex = CONNECT_getCharaindex(fd); + char szBuffer[256]=""; +#ifdef _FIXWOLF // Syu ADD 修正狼人变身Bug + int i , j , pindex; + BATTLE_ENTRY *pEntry; +#endif + + NowBattlerFd = fd; + + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return; + + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ){ + return; + } + + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + + if( BATTLE_CHECKINDEX( battleindex ) == FALSE || + CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE ){ + + return; + } + + + if( BattleArray[battleindex].flg & BATTLE_FLG_CHARALOST ){ + EscapeFree = 0; + } + + if( strncmp( command, "U", 1 ) == 0 ){ + // shan 2001/12/25 begin + EscapeFree = 0; + if (CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEWATCH )!=TRUE){ + CHAR_talkToCli( charaindex, -1, + "华义大魔王使出定身法,定定定定定定把你定在战斗里。", CHAR_COLORYELLOW ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_GUARD ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + //sprintf( szBuffer, "Command(%s)(防御)", CHAR_getUseName( charaindex ) ); + endFlg = 1; + BATTLE_MpDown( charaindex, 2 ); + }else{ + BATTLE_WatchStop( charaindex ); + } + // shan end + }else + if( strncmp( command, "E", 1 ) == 0 ){ + + if( checkErrorStatus( charaindex) ) { + BattleCommandDispach( fd, "N"); + return; + } + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_ESCAPE ); + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + //sprintf( szBuffer, "Command(%s)(逃跑)", CHAR_getUseName( charaindex ) ); + endFlg = 1; + + BATTLE_MpDown( charaindex, 20 ); + + }else + if( strncmp( command, "H|", 2 ) == 0 ){ + int iNum = -1, At_SoubiIndex; + if( sscanf( command+2, "%X", &iNum ) != 1 + || ( iNum < 0 || iNum >= 20 ) + ){ + iNum = -1; + } + + if( checkErrorStatus( charaindex) ) { + BattleCommandDispach( fd, "N"); + return; + } + + EscapeFree = 0; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, iNum ); + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_ATTACK ); + + At_SoubiIndex = CHAR_getItemIndex( charaindex, CHAR_ARM ); + if( ITEM_CHECKINDEX( At_SoubiIndex ) == FALSE ){ + + }else{ + + if( ITEM_getInt( At_SoubiIndex, ITEM_TYPE ) == ITEM_BOOMERANG ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_BOOMERANG ); +#ifdef _PETSKILL_BECOMEFOX + if( CHAR_getInt( charaindex, CHAR_BASEIMAGENUMBER)==101749 + || CHAR_getWorkInt( charaindex, CHAR_WORKFOXROUND ) != -1 ){ //若是变成小狐狸不可以使用回力标 + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + } +#endif +#ifdef _PETSKILL_BECOMEPIG + if( CHAR_getInt( charaindex, CHAR_BECOMEPIG) > -1 ){//变成乌力了 + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_ATTACK ); + } +#endif + } + } + + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, 1 ); + //sprintf( szBuffer, "Command(%s)(战斗)", CHAR_getUseName( charaindex ) ); + + endFlg = 1; + + BATTLE_MpDown( charaindex, 5 ); + + }else + if( strncmp( command, "G", 1 ) == 0 ){ + + if( checkErrorStatus( charaindex) ) { + BattleCommandDispach( fd, "N"); + return; + } + + EscapeFree = 0; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_GUARD ); + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + + sprintf( szBuffer, "Command(%s)(防御)", CHAR_getUseName( charaindex ) ); + endFlg = 1; + + BATTLE_MpDown( charaindex, 2 ); + + }else + if( strncmp( command, "N", 1 ) == 0 ){ + + EscapeFree = 0; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_WAIT ); + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); +// sprintf( szBuffer, "Command(%s)(server托管)", CHAR_getUseName( charaindex ) ); + //sprintf( szBuffer, "Command(%s)(待机)", CHAR_getUseName( charaindex ) ); + endFlg = 1; + + }else + if( strncmp( command, "T|", 2 ) == 0 ){ + int iNum = -1; + + if( checkErrorStatus( charaindex) ) { + BattleCommandDispach( fd, "N"); + return; + } + + EscapeFree = 0; + + if( sscanf( command+2, "%X", &iNum ) != 1 + || ( iNum < 0 || iNum >= 20 ) + ){ + iNum = -1; + } + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, iNum ); + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_CAPTURE ); + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + + //sprintf( szBuffer, "Command(%s)(捕获)", CHAR_getUseName( charaindex ) ); + endFlg = 1; + + BATTLE_MpDown( charaindex, 20 ); + + }else + if( strncmp( command, "S|", 2 ) == 0 ){ + int iNum = -1; + + if( checkErrorStatus( charaindex) ) { + BattleCommandDispach( fd, "N"); + return; + } + + EscapeFree = 0; + + // shan 2002/01/08 begin + if( sscanf( command+2, "%d", &iNum ) != 1 + || ( iNum < -1 || iNum >= CHAR_MAXPETHAVE ) + || ( CHAR_getInt(charaindex,CHAR_RIDEPET)==iNum) + ){ + iNum = -1; + } + // shan end + +#ifdef _STANDBYPET + if( iNum >= 0) { + if( ! (CHAR_getWorkInt( charaindex, CHAR_WORKSTANDBYPET) & ( 1 << iNum)) ) { + print("\n 改封包!叫出非待机宠!!:%s ", CHAR_getChar( charaindex, CHAR_CDKEY) ); + iNum = -1; + } + } +#endif + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, iNum ); + if( iNum < 0 ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_PETIN ); + //sprintf( szBuffer, "Command(%s)(唤回宠物)", CHAR_getUseName( charaindex ) ); + }else{ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_PETOUT ); + //sprintf( szBuffer, "Command(%s)(叫出宠物)", CHAR_getUseName( charaindex ) ); + } + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + + endFlg = 1; + + BATTLE_MpDown( charaindex, 10 ); + + }else + if( strncmp( command, "W|", 2 ) == 0 ){ + int iNum = -1, petskillindex = -1, ToNo = -1, petnum, petindex; + + if( sscanf( command+2, "%X|%X", &iNum, &ToNo ) < 1 ){ + iNum = -1; ToNo = -1; + } + petnum = CHAR_getInt( charaindex, CHAR_DEFAULTPET ); + petindex = CHAR_getCharPet( charaindex, petnum ); + if( CHAR_CHECKINDEX( petindex ) == FALSE ){ + }else{ + + if( iNum < 0 || iNum >= CHAR_MAXPETSKILLHAVE +#ifdef _PETSKILLBUG //Add By Syu 2002.0805 + || (CHAR_getFlg( charaindex, CHAR_ISDIE ) == TRUE )|| + (CHAR_getInt( charaindex, CHAR_HP ) <= 0) +#endif + || checkErrorStatus( petindex) + ) + { + //sprintf( szBuffer, "Command(%s)(自动)", CHAR_getUseName( petindex ) ); + CHAR_setWorkInt( petindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); +#ifdef _PETSKILLBUG //Add By Syu 2002.0805 + }else if ((CHAR_getInt(petindex, CHAR_TRANSMIGRATION)<1) + && ( iNum>=CHAR_getInt(petindex, CHAR_SLOT) ) ) + { + //sprintf( szBuffer, "Command(%s)(自动)", CHAR_getUseName( petindex ) ); + CHAR_setWorkInt( petindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); +#endif + }else{ + petskillindex = PETSKILL_GetArray( petindex, iNum); +#ifdef _FIXWOLF // Syu ADD 修正狼人变身Bug + if( (CHAR_getPetSkill( petindex , iNum )== 600) && (ToNo == -1)) + { + for( j = 0; j < 2; j ++ ) + { + pEntry = BattleArray[battleindex].Side[j].Entry; + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ) + { + pindex = pEntry[i].charaindex; + if( pindex == petindex) + { + ToNo=i + ( j * 10 ); + break; + } + } + } + } +#endif + if( petskillindex >= 0 + && PETSKILL_Use( petindex, iNum, ToNo, NULL ) == TRUE + ){ + //sprintf( szBuffer, "Command(%s)(石版)", CHAR_getUseName( petindex ) ); + + EscapeFree = 0; + + }else{ + //sprintf( szBuffer, "Command(%s)(自动)", CHAR_getUseName( petindex ) ); + CHAR_setWorkInt( petindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + } + } + } + endFlg = 1; + + BATTLE_MpDown( charaindex, 10 ); + + }else + if( strncmp( command, "J|", 1 ) == 0 ){ + int iNum = -1, magicindex = -1, ToNo = -1; + int valid = -1; + int itemindex=-1; + + if( checkErrorStatus( charaindex) ) { + BattleCommandDispach( fd, "N"); + return; + } + + EscapeFree = 0; + + if( sscanf( command+2, "%X|%X", &iNum, &ToNo ) != 2 ){ + iNum = -1; ToNo = -1; + } + + if( iNum < CHAR_EQUIPPLACENUM && iNum >= CHAR_HEAD ){ + magicindex = MAGIC_GetArrayNo( charaindex, iNum ); + itemindex = CHAR_getItemIndex( charaindex, iNum ); + valid = MAGIC_isTargetValid( magicindex, ToNo); + + if ((valid <0 ) || ( magicindex < 0 ) || (itemindex < 0 )){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_WAIT ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + }else{ +#ifdef _ITEM_ATTSKILLMAGIC + char *magicarg; + int magic_array = -1; + magic_array = MAGIC_getMagicArray( magicindex ); + magicarg = MAGIC_getChar( magic_array, MAGIC_OPTION ); + if( magicarg != NULL && strstr( magicarg, "SKILL") != NULL ) { + int mp = ITEM_getInt( itemindex, ITEM_MAGICUSEMP ); + if( MAGIC_AttSkill( charaindex, ToNo, magic_array, mp) == FALSE ) { + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_WAIT ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + } + }else { +#endif + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, ToNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_JYUJYUTU ); + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, magicindex ); + CHAR_SETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3, iNum ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + //sprintf( szBuffer, "Command(%s)(咒术)", CHAR_getUseName( charaindex ) ); +#ifdef _ITEM_ATTSKILLMAGIC + } +#endif + } + }else{ + EscapeFree = 0; + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_WAIT ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + //sprintf( szBuffer, "Command(%s)(待机)", CHAR_getUseName( charaindex ) ); + } + endFlg = 1; + }else + if( strncmp( command, "I|", 1 ) == 0 ){ + int iNum = -1, ToNo = -1; + int valid = 0, itemindex = -1; + + if( checkErrorStatus( charaindex) ) { + BattleCommandDispach( fd, "N"); + return; + } + + EscapeFree = 0; + + if( sscanf( command+2, "%X|%X", &iNum, &ToNo ) != 2 ){ + iNum = -1; ToNo = -1; + } + itemindex = CHAR_getItemIndex( charaindex, iNum ); + if ( !ITEM_CHECKINDEX( itemindex) ) valid=-1; + if (valid >= 0) valid = ITEM_isTargetValid( charaindex, itemindex, ToNo ); + if (valid < 0 ) { + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_WAIT ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + } else { + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, ToNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_ITEM ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM3, iNum ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + //sprintf( szBuffer, "Command(%s)(道具)", CHAR_getUseName( charaindex ) ); + endFlg = 1; + } + }else + if( strncmp( command, "@", 1 ) == 0 ){ + //sprintf( szBuffer, "Command(%s)(通用)", CHAR_getUseName( charaindex ) ); + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + endFlg = 1; + + CHAR_setInt( charaindex, CHAR_MP, + min( 100, CHAR_getInt( charaindex, CHAR_MP ) + 30 ) ); + + }else +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + if( strncmp( command, "P", 1 ) == 0 ){ + int iNum=-1, ToNo=-1; + int skillindex=-1; + int char_pskill=-1, profession_skill=-1, Pskillid=-1; + + if( checkErrorStatus( charaindex) ) { + BattleCommandDispach( fd, "N"); + return; + } + + EscapeFree = 0; + + if( sscanf( command+2, "%X|%X", &iNum, &ToNo ) < 1 ){ + iNum = -1; ToNo = -1; + } + + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE ){ + print("\n\n 非法封包(19001)(%s)(%s)\n\n", CHAR_getChar(charaindex, CHAR_CDKEY), CHAR_getChar(charaindex, CHAR_NAME) ); +#ifdef _PROSKILL_ERR_KICK + saacproto_ACKick_send( acfd, CHAR_getChar(charaindex,CHAR_CDKEY), getFdidFromCharaIndex( charaindex), 1); +#endif + return; + } +#ifdef _PROSKILL_OPTIMUM // Robin fix cancel 此处略过职业检查, 改在 PROFESSION_SKILL_Use 中检查 + // 人物的职业 + char_pskill = CHAR_getInt( charaindex, PROFESSION_CLASS ); + // 技能的职业 + skillindex = PROFESSION_SKILL_GetArray( charaindex, iNum); + Pskillid = PROFESSION_SKILL_getskillArray( skillindex); + profession_skill = PROFESSION_SKILL_getInt( Pskillid, PROFESSION_SKILL_PROFESSION_CLASS); + + if( (char_pskill > 0) && (char_pskill == profession_skill) ){ +#else + if( 1 ) { +#endif + if( PROFESSION_SKILL_Use( charaindex, iNum, ToNo, NULL ) == 1 ){ + //sprintf( szBuffer, "Command(%s)(职业技能)", CHAR_getUseName( charaindex ) ); + endFlg = 1; + }else{ + print("\n职业技能失败!! "); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_WAIT ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + //sprintf( szBuffer, "Command(%s)(待机)", CHAR_getUseName( charaindex ) ); +#ifdef _PROSKILL_ERR_KICK + saacproto_ACKick_send( acfd, CHAR_getChar(charaindex,CHAR_CDKEY), getFdidFromCharaIndex( charaindex), 1); +#endif + } + }else{ + print("\n改封包??职业技能ID不正确:%s:%d:%d \n", + CHAR_getChar( charaindex, CHAR_CDKEY), char_pskill, profession_skill); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_WAIT ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + //sprintf( szBuffer, "Command(%s)(待机)", CHAR_getUseName( charaindex ) ); +#ifdef _PROSKILL_ERR_KICK + saacproto_ACKick_send( acfd, CHAR_getChar(charaindex,CHAR_CDKEY), getFdidFromCharaIndex( charaindex), 1); +#endif + } + + EscapeFree = 0; + }else +#endif + + { + //sprintf( szBuffer, "Command(%s)(失败)", CHAR_getUseName( charaindex ) ); + endFlg = 2; + } + + + if( endFlg ){ + BATTLE_ActSettingSend( battleindex ); + + if( endFlg==1 ){ + int fd; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE)==CHAR_TYPEPLAYER ){ + fd = CHAR_getWorkInt( charaindex, CHAR_WORKFD); + CONNECT_SetBattleRecvTime( fd, &NowTime); + } + } + } + + { + //if( BATTLE_CHECKINDEX( battleindex ) == TRUE ){ + // BATTLE_BroadCast( battleindex, szBuffer, CHAR_COLORWHITE ) ; + //} + } + + if( BattleArray[battleindex].turn == 0 ){ + BattleArray[battleindex].flg |= EscapeFree; + }else{ + BattleArray[battleindex].flg &= EscapeFree; + } +} + + +void BATTLE_ActSettingSend( int battleindex ) +{ + int pindex, k = 0, i, j, charaindex; + int endBit = 0; + char szBA[256]; + BATTLE_ENTRY *pEntry; + BATTLE *pBattle; + + for( j = 0; j < 2; j ++ ){ + pEntry = BattleArray[battleindex].Side[j].Entry; + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + pindex = pEntry[i].charaindex; + // 戊穴件玉 匹五化中凶日 + if( CHAR_getWorkInt( pindex, CHAR_WORKBATTLEMODE ) + == BATTLE_CHARMODE_C_OK + ){ + endBit |= 1 << k; // 申永玄 化月 + }else + // 衬分匀凶日濮覆 井允 + if( CHAR_getInt( pindex, CHAR_WHICHTYPE ) == CHAR_TYPEENEMY ) + { + endBit |= 1 << k; // 申永玄 化月 + } + k ++; + } + } + sprintf( szBA, "BA|%X|%X|", endBit, BattleArray[battleindex].turn ); +// print( "%s\n", szBA ); + //今日卞蝈够伙□皿仄化霜月 + for( j = 0; j < 2; j ++ ){ + pEntry = BattleArray[battleindex].Side[j].Entry; + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + pindex = pEntry[i].charaindex; + if( CHAR_CHECKINDEX( pindex ) == FALSE )continue; + // 辅爵仄凶化及平乓仿卞反霜日卅中 + if( CHAR_getWorkInt( pindex, CHAR_WORKBATTLEMODE ) == BATTLE_CHARMODE_RESCUE )continue; + // 皿伊奶乩□分匀凶日 + if( CHAR_getInt( pindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER + ){ // 戊穴件玉霜月 + BATTLE_CommandSend( pindex, szBA ); + } + } + } + + + // 棋爵仄化中月谛卞手霜月 + pBattle = BattleArray[battleindex].pNext; + for( ; pBattle ; pBattle = pBattle->pNext ){ + // 仇及失玉伊旦互恳仄中井民尼永弁 + if( BATTLE_CHECKADDRESS( pBattle ) == FALSE ){ + fprint( "err:观战battle address错误(%p)\n", pBattle ); + break; + } + // 蝈够卞霜耨 + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + charaindex = pBattle->Side[0].Entry[i].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )continue; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER )continue; + // 戊穴件玉霜月 + BATTLE_CommandSend( pindex, szBA ); + } + } + +} + + + +BOOL BATTLE_IsHide( int charaindex ){ + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_EARTHROUND0 + ){ + return TRUE; + } + return FALSE; +} + + + + + +//******************************************************* +// +// 田玄伙及戊穴件玉毛弁仿奶失件玄卞霜月 +// +BOOL BATTLE_CommandSend( int charaindex, char *pszCommand ) +// +//******************************************************** +{ + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return FALSE; + if( getfdFromCharaIndex( charaindex ) < 0 )return FALSE; + lssproto_B_send( getfdFromCharaIndex( charaindex ), pszCommand ); + return TRUE; +} + + +BOOL BATTLE_MakeCharaString( + int battleindex, + char *pszCommand, + int size +) +{ + int i, j, iOffset, charaindex, flg; + BATTLE_ENTRY *pEntry; + char szBuffer[4096]="", *pszTop, *pszLast; + char szEscapeName[128], szEscapeTitle[128]; + char szEscapePetName[128]; + int rideflg = 0, petindex = -1, petlevel, pethp, petmaxhp; + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return FALSE; + pszTop = pszCommand; + pszLast = pszCommand+size-1; +#if 1 + sprintf( szBuffer, "BC|%X|", BattleArray[battleindex].field_att ); +#else + sprintf( szBuffer, "BC|" ); +#endif + STRCPY_TAIL( pszTop, pszLast, szBuffer ); + + for( j = 0; j < 2; j ++ ){ + if( j == 1 ){ + iOffset = SIDE_OFFSET; // 轾仇丹础扔奶玉及桦宁反皿仿旦允月 + }else{ + iOffset = 0; + } + pEntry = BattleArray[battleindex].Side[j].Entry; + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + charaindex = pEntry[i].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )continue; + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEFLG ) + & CHAR_BATTLEFLG_ULTIMATE )continue; + flg = 0; + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ) + == BATTLE_CHARMODE_INIT ) flg |= BC_FLG_NEW; + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ) + == BATTLE_CHARMODE_RESCUE ) flg |= BC_FLG_NEW; + if( CHAR_getFlg( charaindex, CHAR_ISDIE ) == TRUE ){ + flg |= BC_FLG_DEAD; + }else + if( CHAR_getWorkInt( charaindex, CHAR_WORKPOISON ) > 0 ){ + flg |= BC_FLG_POISON; + }else +#ifdef _MAGIC_WEAKEN // 虚弱 + if( CHAR_getWorkInt( charaindex, CHAR_WORKWEAKEN ) > 0 ){ + flg |= BC_FLG_WEAKEN; + }else +#endif +#ifdef _MAGIC_DEEPPOISON // 剧毒 + if( CHAR_getWorkInt( charaindex, CHAR_WORKDEEPPOISON ) > 0 ){ + flg |= BC_FLG_DEEPPOISON; + }else +#endif +#ifdef _MAGIC_NOCAST // 沉默 + if( CHAR_getWorkInt( charaindex, CHAR_WORKNOCAST ) > 0 ){ + flg |= BC_FLG_NOCAST; + }else +#endif +#ifdef _MAGIC_BARRIER // 魔障 + if( CHAR_getWorkInt( charaindex, CHAR_WORKBARRIER ) > 0 ){ + flg |= BC_FLG_BARRIER; + }else +#endif + if( CHAR_getWorkInt( charaindex, CHAR_WORKPARALYSIS ) > 0 ){ + flg |= BC_FLG_PARALYSIS; + }else + if( CHAR_getWorkInt( charaindex, CHAR_WORKSLEEP ) > 0 ){ + flg |= BC_FLG_SLEEP; + }else + if( CHAR_getWorkInt( charaindex, CHAR_WORKSTONE ) > 0 ){ + flg |= BC_FLG_STONE; + }else + if( CHAR_getWorkInt( charaindex, CHAR_WORKDRUNK ) > 0 ){ + flg |= BC_FLG_DRUNK; + }else + if( CHAR_getWorkInt( charaindex, CHAR_WORKCONFUSION ) > 0 ){ + flg |= BC_FLG_CONFUSION; + } + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + flg |= BC_FLG_PLAYER; + } + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEFLG ) & CHAR_BATTLEFLG_REVERSE ){ + flg |= BC_FLG_REVERSE; + } + if( BATTLE_IsHide( charaindex ) == TRUE ){ + flg |= BC_FLG_HIDE; + } +#ifdef _PET_SKILL_SARS // WON ADD 毒煞蔓延 + if( CHAR_getWorkInt( charaindex, CHAR_WORKSARS ) > 0 ){ + flg |= BC_FLG_SARS; + } +#endif +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + if( CHAR_getWorkInt( charaindex, CHAR_WORKDIZZY ) > 0 ){ + flg |= BC_FLG_DIZZY; // 晕眩 + } + if( CHAR_getWorkInt( charaindex, CHAR_WORKENTWINE ) > 0 ){ + flg |= BC_FLG_ENTWINE; // 树根缠绕 + } + if( CHAR_getWorkInt( charaindex, CHAR_WORKDRAGNET ) > 0 ){ + flg |= BC_FLG_DRAGNET; // 天罗地网 + } + if( CHAR_getWorkInt( charaindex, CHAR_WORKICECRACK ) > 0 ){ + // flg |= BC_FLG_ICECRACK; // 冰爆术 + } + if( CHAR_getWorkInt( charaindex, CHAR_WORKOBLIVION ) > 0 ){ + flg |= BC_FLG_OBLIVION; // 遗忘 + } + if( CHAR_getWorkInt( charaindex, CHAR_WORKICEARROW ) > 0 ){ + flg |= BC_FLG_ICEARROW; // 冰箭 + } + if( CHAR_getWorkInt( charaindex, CHAR_WORKBLOODWORMS ) > 0 ){ + flg |= BC_FLG_BLOODWORMS; // 嗜血蛊 + } + if( CHAR_getWorkInt( charaindex, CHAR_WORKSIGN ) > 0 ){ + flg |= BC_FLG_SIGN; // 一针见血 + } + if( CHAR_getWorkInt( charaindex, CHAR_WORKINSTIGATE ) > 0 ){ + flg |= BC_FLG_CARY; // 挑拨 + } + if( CHAR_getWorkInt( charaindex, CHAR_WORK_F_ENCLOSE ) > 0 ){ + flg |= BC_FLG_F_ENCLOSE; // 火附体 + } + if( CHAR_getWorkInt( charaindex, CHAR_WORK_I_ENCLOSE ) > 0 ){ + flg |= BC_FLG_I_ENCLOSE; // 冰附体 + } + if( CHAR_getWorkInt( charaindex, CHAR_WORK_T_ENCLOSE ) > 0 ){ + flg |= BC_FLG_T_ENCLOSE; // 雷附体 + } +#endif +#ifdef _PROFESSION_ADDSKILL + if( CHAR_getWorkInt( charaindex, CHAR_WORKANNEX ) > 0 ){ + flg |= BC_FLG_T_ENCLOSE; // 附身术 + } + if( CHAR_getWorkInt( charaindex, CHAR_WORKWATER ) > 0 ){ + flg |= BC_FLG_WATER; // 水附体 + } + if( CHAR_getWorkInt( charaindex, CHAR_WORKFEAR ) > 0 ){ + flg |= BC_FLG_FEAR; // 恐惧 + } +#endif +#ifdef _PETSKILL_LER + if(CHAR_getWorkInt(charaindex,CHAR_WORK_RELIFE) > 0){ + flg |= BC_FLG_CHANGE; // 雷尔变身 + CHAR_setWorkInt(charaindex,CHAR_WORK_RELIFE,0); + } +#endif + makeEscapeString( CHAR_getUseName( charaindex ), + szEscapeName, + sizeof( szEscapeName ) ); + makeEscapeString( BATTLE_CharTitle( charaindex ), + szEscapeTitle, + sizeof( szEscapeTitle ) ); + // Robin 0728 ride Pet + petindex = BATTLE_getRidePet( charaindex ); + if( petindex != -1 ){ + rideflg = 1; + makeEscapeString( CHAR_getUseName( petindex ), + szEscapePetName, + sizeof( szEscapePetName ) ); + petlevel = CHAR_getInt( petindex, CHAR_LV); + pethp = CHAR_getInt( petindex, CHAR_HP); + petmaxhp = CHAR_getWorkInt( petindex, CHAR_WORKMAXHP); + + }else { + if( CHAR_getWorkInt( charaindex, CHAR_WORKPETFALL ) == 1 ){ + rideflg = -1; +#ifdef _PETSKILL_BECOMEFOX // 若中了媚惑术而落马时将讯息传给 Client + if( CHAR_getWorkInt( charaindex, CHAR_WORKFOXROUND ) != -1 ) + rideflg = -2; //client用来判断显示落马的文字 (对应的client变数为p_party[ BattleMyNo ]->onRide) +#endif +#ifdef _PETSKILL_BECOMEPIG // 若中了乌力化而落马时将讯息传给 Client + if( CHAR_getInt( charaindex, CHAR_BECOMEPIG) > 120 )//变成乌力了 + rideflg = -3; //client用来判断显示落马的文字 (对应的client变数为p_party[ BattleMyNo ]->onRide) +#endif + CHAR_setWorkInt( charaindex, CHAR_WORKPETFALL, 0 ); + } + else + rideflg = 0; + szEscapePetName[0] = 0; + petlevel = 0; + pethp = 0; + petmaxhp = 0; + } + + sprintf( szBuffer, "%X|%s|%s|%X|%X|%X|%X|%X|%X|%s|%X|%X|%X|", + pEntry[i].bid, + szEscapeName, + szEscapeTitle, + CHAR_getInt( charaindex, CHAR_BASEIMAGENUMBER ), + CHAR_getInt( charaindex, CHAR_LV ), + max( CHAR_getInt( charaindex, CHAR_HP ),0), + CHAR_getWorkInt( charaindex, CHAR_WORKMAXHP ), + flg, + rideflg, + szEscapePetName, + petlevel, + pethp, + petmaxhp + ); + STRCPY_TAIL( pszTop, pszLast, szBuffer ); + if( pszTop >= pszLast )return FALSE;// 译尹凶日撩 + } + } + + return TRUE; +} + +void BATTLE_BpSendToWatch( + BATTLE *pBattle, // 棋爵田玄伙正旦弁及禾奶件正 + char *pszBcString // BC 侬 +) +{ + + char szBp[256]; + int flg = 0, i, charaindex; + +// for( ; pBattle ; pBattle = pBattle->pNext ){ + if( pBattle == NULL )return; + // 仇及失玉伊旦互恳仄中井民尼永弁 + if( BATTLE_CHECKADDRESS( pBattle ) == FALSE ){ + fprint( "err:观战battle address错误(%p)\n", pBattle ); + return; + } + + // 蝈够卞霜耨 + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + charaindex = pBattle->Side[0].Entry[i].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )continue; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) + != CHAR_TYPEPLAYER ) continue; + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ) + == BATTLE_CHARMODE_WATCHINIT){ + flg |= BP_FLG_JOIN; // 蕙筋辅笛 + } + flg |= BP_FLG_PLAYER_MENU_OFF; // 皿伊奶乩□丢瓦亘□请今卅中 + // 皿伊奶乩□ 寞霜月 + sprintf( szBp, "BP|%X|%X|%X", 20, flg, 0 ); + BATTLE_CommandSend( charaindex, szBp ); + // 蝈够隋骚树 霜月 + BATTLE_CommandSend( charaindex, pszBcString ); + } + // 戊穴件玉谨切尺 + pBattle->mode = BATTLE_MODE_WATCHPRE; +// } +} + +void BATTLE_CharSendAll( int battleindex ) +{ + int i, j, charaindex, flg, pet, At_SoubiIndex, pindex; + char szBp[256]; + BATTLE *pBattle; + + BATTLE_MakeCharaString( + battleindex, + szAllBattleString, + sizeof(szAllBattleString) + ); + + for( j = 0; j < 2; j ++ ){ + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + charaindex = BattleArray[battleindex].Side[j].Entry[i].charaindex; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )continue; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER )continue; + flg = 0; + if( BattleArray[battleindex].Side[j].flg & BSIDE_FLG_SURPRISE ){ + flg |= BP_FLG_ENEMY_SURPRISAL; + }else + if( BattleArray[battleindex].Side[1-j].flg & BSIDE_FLG_SURPRISE ){ + flg |= BP_FLG_PLAYER_SURPRISAL; + } + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ) + == BATTLE_CHARMODE_RESCUE){ + flg |= BP_FLG_JOIN; // 辅爵 + } + At_SoubiIndex = CHAR_getItemIndex( charaindex, CHAR_ARM ); + if( ITEM_CHECKINDEX( At_SoubiIndex ) == FALSE ){ + }else{ + if( ITEM_getInt( At_SoubiIndex, ITEM_TYPE ) == ITEM_BOOMERANG ){ + flg |= BP_FLG_BOOMERANG; + } + } + + pet = CHAR_getInt( charaindex, CHAR_DEFAULTPET ); + if( pet >= 0 ){ + snprintf( szBp, sizeof( szBp ), "K%d", pet ); + CHAR_sendStatusString( charaindex, szBp ); + + pindex = CHAR_getCharPet( charaindex, pet ); + +#ifdef _PETSKILL_DAMAGETOHP + { +/* + 让开,让开~~~~~~~ + + ΘΘ + ⊙ ⊙ 我来给你送月饼了 +*/ + char msg[32]={0}; + //print("\n宠物id:%d",CHAR_getInt( pindex, CHAR_PETID)); + //print("\n宠物名:%s",CHAR_getChar( pindex, CHAR_NAME)); + //if( CHAR_getInt( pindex, CHAR_PETID) == 777 ){//宠物ID 水双头狼 + // || CHAR_getInt( pindex, CHAR_PETID) == 146 ) //火双头狼 + // && CHAR_getInt( pindex, CHAR_HP) ){ + sprintf( msg, "o%d", pet ); + CHAR_sendStatusString( charaindex, msg ); + + //} + } +#endif + +#ifdef _PETSKILL_BECOMEFOX // 限制中了媚惑术的宠物的技能 + //if( CHAR_getInt( pindex, CHAR_BASEIMAGENUMBER) == 101749 ){ + if( CHAR_getWorkInt( pindex, CHAR_WORKFOXROUND ) != -1 ){ //若是变成小狐狸 + char msg[32]={0}; + sprintf( msg, "a%d", pet ); + CHAR_sendStatusString( charaindex, msg ); + + } +#endif + + if( CHAR_CHECKINDEX( pindex ) == TRUE ){ + if( BATTLE_IsCharge( pindex ) == TRUE){ + flg |= BP_FLG_PET_MENU_OFF; + } + if( BATTLE_CanMoveCheck( pindex ) == FALSE ){ + flg |= BP_FLG_PET_MENU_OFF; + } + if( CHAR_getFlg( pindex, CHAR_ISDIE ) == TRUE ){ + flg |= BP_FLG_PET_MENU_OFF; + } + } + }else{ + flg |= BP_FLG_PET_MENU_OFF; + } + + if( BATTLE_CanMoveCheck( charaindex ) == FALSE + || CHAR_getFlg( charaindex, CHAR_ISDIE ) == TRUE + ){ + flg |= BP_FLG_PLAYER_MENU_OFF; + } + + if( BattleArray[battleindex].Side[j].flg & BSIDE_FLG_SURPRISE ){ + flg |= BP_FLG_PLAYER_MENU_OFF; + flg |= BP_FLG_PET_MENU_OFF; + } + sprintf( szBp, "BP|%X|%X|%X", + i + SIDE_OFFSET * j, + flg, CHAR_getInt( charaindex, CHAR_MP ) + ); + BATTLE_CommandSend( charaindex, szBp ); + BATTLE_CommandSend( charaindex, szAllBattleString ); + } + } + pBattle = BattleArray[battleindex].pNext; + for( ; pBattle ; pBattle = pBattle->pNext ){ + // 仇及失玉伊旦互恳仄中井民尼永弁 + if( BATTLE_CHECKADDRESS( pBattle ) == FALSE ){ + fprint( "err:观战battle address错误(%p)\n", pBattle ); + break; + } + + BATTLE_BpSendToWatch( pBattle, szAllBattleString ); + + } + + + +} + +void BattleEncountOut( int charaindex) +{ + + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return; + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEINDEX, -1 ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_MODE_NONE ); + + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX ) ); + CHAR_sendArroundCharaData( charaindex ); + + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEWATCH ) == 0 ){ + CHAR_sendBattleEffect( charaindex, OFF); + }else{ + CHAR_sendBattleWatch( CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX ), OFF); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEWATCH, 0 ); + } + + if( CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE ) == CHAR_PARTY_CLIENT ){ + int pmode/*, battleindex*/; + int pindex = CHAR_getWorkInt( charaindex, CHAR_WORKPARTYINDEX1 ); + pmode = CHAR_getWorkInt( pindex, CHAR_WORKBATTLEMODE ); + if( pmode > 0 && pmode != BATTLE_CHARMODE_FINAL ){ + BATTLE_RescueParentTry( charaindex, pindex ); + print( "较慢参加战斗(%s)\n", CHAR_getUseName( charaindex ) ); + } + } + +} + + +//************************************************** +// +// 犯白巧伙玄及戊穴件玉毛 木月矢永玄迕 +// +BOOL BATTLE_PetDefaultCommand( int petindex ) +// +//************************************************** +{ + if( CHAR_CHECKINDEX( petindex ) == FALSE )return FALSE; + // 锹澎及隙烂 + CHAR_setWorkInt( petindex, CHAR_WORKBATTLECOM2, -1 ); + // 骚橘 猾及隙烂 + CHAR_setWorkInt( petindex, CHAR_WORKBATTLECOM1, BATTLE_COM_ATTACK ); + // 戊穴件玉OK及隙烂 + CHAR_setWorkInt( petindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + + return TRUE; +} + +#if 0 +{ + int Sign, Damage, i; + Sign = (LifeUp >= 0)?(1):(0); + Damage = ABS( LifeUp ); + + for( i = 0; i < ; i ++ ){ + // (蕙滇)仇仇匹戊穴件玉毛中木月 + snprintf( szCommand, sizeof(szCommand), "BD|r%X|0|%X|d%X|", ToList[i], Sign, Damage ); + BATTLESTR_ADD( szCommand ); +} + +#endif + +// Robin fix 检查石化昏睡不可战斗 +int checkErrorStatus( int charaindex) +{ + //if( BATTLE_CanMoveCheck( charaindex) == FALSE) { + + if( + CHAR_getWorkInt( charaindex, CHAR_WORKPARALYSIS ) > 0 // 麻痹 + || CHAR_getWorkInt( charaindex, CHAR_WORKSTONE ) > 0 // 石化 + || CHAR_getWorkInt( charaindex, CHAR_WORKSLEEP ) > 0 // 睡眠 + //|| CHAR_getWorkInt( charaindex, CHAR_WORKBARRIER ) > 0 // 魔障 + || CHAR_getWorkInt( charaindex, CHAR_WORKDIZZY ) > 0 // 晕眩 + || CHAR_getWorkInt( charaindex, CHAR_WORKDRAGNET ) > 0 // 天罗地网 + //|| CHAR_getWorkInt( charaindex, CHAR_WORK_T_ENCLOSE ) > 0 // 雷附体 +#ifdef _PROFESSION_ADDSKILL +// || CHAR_getWorkInt( charaindex, CHAR_DOOMTIME ) > 0 //世界末日集气 +#endif + ) + { + + char cdkey[128]; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER) + strcpy( cdkey, CHAR_getChar( charaindex, CHAR_CDKEY)); + else + strcpy( cdkey, CHAR_getChar( charaindex, CHAR_OWNERCDKEY) ); + + print("\n 改封包!不可战斗的状态!!:%s ", cdkey ); + + return 1; + } + return 0; +} + diff --git a/gmsv/battle/battle_event.c b/gmsv/battle/battle_event.c new file mode 100644 index 0000000..86f7a4a --- /dev/null +++ b/gmsv/battle/battle_event.c @@ -0,0 +1,10231 @@ +#include "version.h" +#include +#include +#include "char.h" +#include "char_event.h" +#include "battle.h" +#include "battle_event.h" +#include "configfile.h" +#include "pet.h" +#include "log.h" +#include "lssproto_serv.h" +#include "anim_tbl.h" +#include "battle_magic.h" +#include "util.h" +#include "enemy.h" +#include "pet_skill.h" +#include "char_base.h" +#include "item_event.h" + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 +#include "profession_skill.h" +#include "item.h" +#include "skill.h" +#endif +#ifdef _PETSKILL_LER +#include "magic_base.h" +#endif + +#define DEFENSE_RATE (0.5) +#define DAMAGE_RATE (2.0) +#define CRITICAL_RATE (1.0) +#define KAWASHI_MAX_RATE (75) + +#define AJ_SAME (1.0) + +#define AJ_UP (1.5) +#define AJ_DOWN (0.6) + +#define ATTR_MAX 100 +#define D_ATTR (1.0/(ATTR_MAX*ATTR_MAX)) + +#define D_16 (1.0/16) +#define D_8 (1.0/8) + +float gKawashiPara = 0.02; +float gCounterPara = 0.08; +float gCriticalPara = 0.09; + +float gBattleDamageModyfy; +int gBattleDuckModyfy; +int gBattleStausChange; +int gBattleStausTurn; +float gDuckPer; +int gCriper; + +int gBattleBadStatusTbl[BATTLE_ENTRY_MAX*2]; + +#ifdef _OTHER_MAGICSTAUTS +#ifdef _MAGICSTAUTS_RESIST +char MagicStatus[MAXSTATUSTYPE][36] = { "NULL","魔抗","铁壁","火抗","电抗","冰抗"}; +int MagicTbl[] = { -1, CHAR_DEFMAGICSTATUS, CHAR_MAGICSUPERWALL, CHAR_MAGICFIRE, CHAR_MAGICTHUNDER, CHAR_MAGICICE }; +#else +char MagicStatus[MAXSTATUSTYPE][36] = { "NULL","魔抗","铁壁"}; +int MagicTbl[] = { -1, CHAR_DEFMAGICSTATUS, CHAR_MAGICSUPERWALL }; +#endif //_MAGICSTAUTS_RESIST +#endif + +char *aszStatus[] = { "全", "毒", "麻", "眠", "石", "醉", "乱", "虚", "剧", "障", "默" +#ifdef _PET_SKILL_SARS // WON ADD 毒煞蔓延 + ,"煞" +#endif +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + ,"晕","缠","罗","爆","忘","箭","蛊","针","挑","烧","霜","电","专","火","冰","雷","炎","冻","击" +#endif +#ifdef _PROFESSION_ADDSKILL + ,"抗" +#endif +}; + +char *aszStatusFull[] = { "全快", "毒", "麻痹", "睡眠", "石化", "酒醉", "混乱", "虚弱", "剧毒", "魔障", "沉默" +#ifdef _PET_SKILL_SARS // WON ADD 毒煞蔓延 + ,"毒煞" +#endif +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + ,"晕眩","缠绕","天罗","冰爆","遗忘","冰箭","嗜血蛊","一针见血","挑拨","火附体", + "冰附体","雷附体","专注战斗","火抗","冰抗","雷抗","火附","冰附","雷附" +#endif +}; + +int StatusTbl[] = { -1, CHAR_WORKPOISON, CHAR_WORKPARALYSIS, + CHAR_WORKSLEEP, CHAR_WORKSTONE, + CHAR_WORKDRUNK, CHAR_WORKCONFUSION, + CHAR_WORKWEAKEN, CHAR_WORKDEEPPOISON, + CHAR_WORKBARRIER, CHAR_WORKNOCAST +#ifdef _PET_SKILL_SARS // WON ADD 毒煞蔓延 + ,CHAR_WORKSARS +#endif +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + ,CHAR_WORKDIZZY, CHAR_WORKENTWINE + ,CHAR_WORKDRAGNET, CHAR_WORKICECRACK + ,CHAR_WORKOBLIVION, CHAR_WORKICEARROW + ,CHAR_WORKBLOODWORMS, CHAR_WORKSIGN + ,CHAR_WORKINSTIGATE, CHAR_WORK_F_ENCLOSE + ,CHAR_WORK_I_ENCLOSE, CHAR_WORK_T_ENCLOSE + ,CHAR_WORK_FOCUS, CHAR_WORKRESIST_F + ,CHAR_WORKRESIST_I, CHAR_WORKRESIST_T + ,CHAR_WORK_F_ENCLOSE_2, CHAR_WORK_I_ENCLOSE_2 + ,CHAR_WORK_T_ENCLOSE_2 +#endif +#ifdef _PROFESSION_ADDSKILL + ,CHAR_WORKERSIST_F_I_T, CHAR_WORKWATER//水附体 + ,CHAR_WORKANNEX//附身 + ,CHAR_WORKFEAR//恐惧 + ,CHAR_WORKICECRACK2 + ,CHAR_WORKICECRACK3 + ,CHAR_WORKICECRACK4 + ,CHAR_WORKICECRACK5 + ,CHAR_WORKICECRACK6 + ,CHAR_WORKICECRACK7 + ,CHAR_WORKICECRACK8 + ,CHAR_WORKICECRACK9 + ,CHAR_WORKICECRACK10 +#endif + }; + +int RegTbl[] = { -1, CHAR_WORKMODPOISON, CHAR_WORKMODPARALYSIS, + CHAR_WORKMODSLEEP, CHAR_WORKMODSTONE, + CHAR_WORKMODDRUNK, CHAR_WORKMODCONFUSION, + CHAR_WORKMODWEAKEN, CHAR_WORKMODDEEPPOISON, + CHAR_WORKMODBARRIER, CHAR_WORKMODNOCAST +#ifdef _PET_SKILL_SARS // WON ADD 毒煞蔓延 + ,CHAR_WORKMODSARS +#endif +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + ,CHAR_WORKMODDIZZY, CHAR_WORKMODENTWINE + ,CHAR_WORKMODDRAGNET, CHAR_WORKMODICECRACK + ,CHAR_WORKMODOBLIVION, CHAR_WORKMODICEARROW + ,CHAR_WORKMODBLOODWORMS, CHAR_WORKMODSIGN + ,CHAR_WORKMODINSTIGATE, CHAR_WORKMOD_F_ENCLOSE + ,CHAR_WORKMOD_I_ENCLOSE, CHAR_WORKMOD_T_ENCLOSE + ,CHAR_WORKMOD_FOCUS, CHAR_WORKMODRESIST_F + ,CHAR_WORKMODRESIST_I, CHAR_WORKMODRESIST_T + ,CHAR_WORKMOD_F_ENCLOSE_2, CHAR_WORKMOD_I_ENCLOSE_2 + ,CHAR_WORKMOD_T_ENCLOSE_2 +#endif + }; + +char *aszMagicDef[] = { "常", "吸", "反", "无" +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + ,"陷" +#endif +#ifdef _PETSKILL_ACUPUNCTURE + ,"刺" +#endif +}; + + + +char *aszMagicDefFull[] = { "通常", "吸收", "反射", "无效化" +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + ,"陷阱" +#endif +#ifdef _PETSKILL_ACUPUNCTURE + ,"针刺" +#endif +}; + + +int MagicDefTbl[] = { -1, CHAR_WORKDAMAGEABSROB, CHAR_WORKDAMAGEREFLEC, CHAR_WORKDAMAGEVANISH +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + ,CHAR_WORKTRAP +#endif +#ifdef _PETSKILL_ACUPUNCTURE + ,CHAR_WORKACUPUNCTURE +#endif +}; + +char *aszParamChange[] = { "无", "攻", "防", "早", "魅", "捕" }; +char *aszParamChangeFull[] = { "无", "攻击力", "防御力", "速度", "魅力", "捕获率" }; +int aParamChangeTbl[] = { -1, CHAR_WORKMODATTACK, CHAR_WORKMODDEFENCE, + CHAR_WORKMODQUICK, CHAR_WORKMODCHARM, CHAR_WORKMODCAPTURE }; + +// Robin 0727 Ride Pet +// 取得骑宠的index +int BATTLE_getRidePet( int charaindex ) +{ + int petindex = -1; + + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) + return -1; + else + { + int rideIndex = CHAR_getInt( charaindex, CHAR_RIDEPET ); + if( rideIndex == -1 ) + return -1; + petindex = CHAR_getCharPet( charaindex, rideIndex ); + if( !CHAR_CHECKINDEX( petindex ) ) return -1; + + } + + return petindex; + +} + +#ifdef _BACK_VERSION // 复刻版骑宠公式修改 +// Robin 0727 Ride Pet +// 取得骑宠时的叁围 复刻版 +float BATTLE_adjustRidePet3A( int charaindex, int petindex, int workindex, int action ) +{ + float ret = CHAR_getWorkInt( charaindex, workindex ); + BOOL throwweapon = BATTLE_IsThrowWepon(CHAR_getItemIndex( charaindex, CHAR_ARM ) ); + + switch( workindex ) { + case CHAR_WORKATTACKPOWER : // 攻击力 + if( throwweapon ) // 投掷 + ret = CHAR_getWorkInt( charaindex, CHAR_WORKATTACKPOWER );//间接攻击:人物 + else // 近战 + ret = CHAR_getWorkInt( petindex, CHAR_WORKATTACKPOWER );//直接攻击:宠物 + break; + case CHAR_WORKDEFENCEPOWER : // 防御力 + ret = ( CHAR_getWorkInt( charaindex, CHAR_WORKDEFENCEPOWER ) + CHAR_getWorkInt( petindex, CHAR_WORKDEFENCEPOWER ) ) / 2; + break; + case CHAR_WORKQUICK : // 敏捷力 + if( action == ATTACKSIDE ) { + if( throwweapon ) { + ret = CHAR_getWorkInt( charaindex, CHAR_WORKQUICK ); + }else { + ret = CHAR_getWorkInt( petindex, CHAR_WORKQUICK ); + } + }else if( action == DEFFENCESIDE ){ + ret = CHAR_getWorkInt( petindex, CHAR_WORKQUICK ); + } + break; + default : + ret = CHAR_getWorkInt( charaindex, workindex ); + } + + //print(" adj3A_Old:%d:%d=%f ", charaindex, workindex, ret); + + return ret; +} + +#else +// 取得骑宠时的叁围 正常版 +float BATTLE_adjustRidePet3A( int charaindex, int petindex, int workindex, int action ) +{ + float ret = CHAR_getWorkInt( charaindex, workindex ); + BOOL throwweapon = BATTLE_IsThrowWepon(CHAR_getItemIndex( charaindex, CHAR_ARM ) ); + + switch( workindex ) { + case CHAR_WORKATTACKPOWER : // 攻击力 + if( throwweapon ) // 投掷 + ret = CHAR_getWorkInt( charaindex, CHAR_WORKATTACKPOWER ) +#ifdef _BATTLE_NEWPOWER //andy 1/24 reEdit + + CHAR_getWorkInt( petindex, CHAR_WORKATTACKPOWER )*0.4; +#else + + CHAR_getWorkInt( petindex, CHAR_WORKATTACKPOWER )*0.2; +#endif + else // 近战 + ret = CHAR_getWorkInt( charaindex, CHAR_WORKATTACKPOWER )*0.8 + + CHAR_getWorkInt( petindex, CHAR_WORKATTACKPOWER )*0.8; + break; + case CHAR_WORKDEFENCEPOWER : // 防御力 + ret = CHAR_getWorkInt( charaindex, CHAR_WORKDEFENCEPOWER )*0.7 + + CHAR_getWorkInt( petindex, CHAR_WORKDEFENCEPOWER )*0.7; + break; + case CHAR_WORKQUICK : // 敏捷力 + if( action == ATTACKSIDE ) { + if( throwweapon ) { + ret = CHAR_getWorkInt( charaindex, CHAR_WORKQUICK )*0.8 + + CHAR_getWorkInt( petindex, CHAR_WORKQUICK )*0.2; + }else { +#ifdef _BATTLE_NEWPOWER //andy 1/24 reEdit + ret = CHAR_getWorkInt( charaindex, CHAR_WORKQUICK )*0.2 + + CHAR_getWorkInt( petindex, CHAR_WORKQUICK )*0.8; + +#else + ret = CHAR_getWorkInt( charaindex, CHAR_WORKQUICK )*0.5 + + CHAR_getWorkInt( petindex, CHAR_WORKQUICK )*0.5; +#endif + } + }else + if( action == DEFFENCESIDE ){ + ret = CHAR_getWorkInt( charaindex, CHAR_WORKQUICK )*0.1 + + CHAR_getWorkInt( petindex, CHAR_WORKQUICK )*0.9; + } + break; + default : + ret = CHAR_getWorkInt( charaindex, workindex ); + } + + //print(" adj3A_Now:%d:%d=%f ", charaindex, workindex, ret); + + return ret; +} +#endif + +// Robin 0727 ride Pet 落马改图 +void BATTLE_changeRideImage( int index ) +{ + int itemindex = CHAR_getItemIndex(index,CHAR_ARM); + int category; + int newimagenumber; + int basebaseimagenumber + = CHAR_getInt(index,CHAR_BASEBASEIMAGENUMBER); + if( !ITEM_CHECKINDEX(itemindex) ) { + category = ITEM_FIST; + }else { + category = ITEM_getInt(itemindex,ITEM_TYPE ); + } + newimagenumber = CHAR_getNewImagenumberFromEquip( + basebaseimagenumber, category); + if( newimagenumber == -1) { + CHAR_setInt( index, CHAR_BASEIMAGENUMBER, basebaseimagenumber); + }else { + CHAR_setInt( index, CHAR_BASEIMAGENUMBER, newimagenumber); + } +} + +void BATTLE_talkToCli( + int charaindex, + char *pszBuffer, + int color +) +{ + if( getBattleDebugMsg( ) != 0 + && CHAR_getFlg( charaindex, CHAR_ISSHOWBATTLEMSG ) + ){ + CHAR_talkToCli( charaindex, -1, pszBuffer, color ); + } +} + + +int BATTLE_BroadCastBase( + int battleindex, + char *pszBuffer, + int color, + int flg +) +{ + int i, j, pindex; + BATTLE_ENTRY *pEntry; + + if( flg != 1 && getBattleDebugMsg( ) == 0 )return 0; + + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return BATTLE_ERR_BATTLEINDEX; + + for( j = 0; j < 2; j ++ ){ + pEntry = BattleArray[battleindex].Side[j].Entry; + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + pindex = pEntry[i].charaindex; + if( CHAR_CHECKINDEX( pindex ) == FALSE )continue; + if( CHAR_getInt( pindex, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER )continue; + if( CHAR_getFlg( pindex, CHAR_ISSHOWBATTLEMSG ) == FALSE ) continue; + CHAR_talkToCli( pindex, -1, pszBuffer, color ); + } + } + + return 0; +} + +// Nuke 20040112 fix for performance +/*int BATTLE_BroadCast( + int battleindex, + char *pszBuffer, + int color +) +{ + return BATTLE_BroadCastBase( battleindex, pszBuffer, color, 0 ); + +} + +int BATTLE_BroadCastOn( + int battleindex, + char *pszBuffer, + int color +) +{ + return BATTLE_BroadCastBase( battleindex, pszBuffer, color, 1 ); +} +*/ + +#ifdef _TAKE_ITEMDAMAGE +int BATTLE_ItemCrushCheck( int charaindex , int flg) +{//flg def 1 att 2 + int EquipTbl[CHAR_EQUIPPLACENUM], itemindex; + int i, rndwork; + int Crushs=0; + //char szBuffer[256]; + + memset( EquipTbl, -1, sizeof( EquipTbl)); + if( flg == 2 ) { + itemindex = CHAR_getItemIndex( charaindex, CHAR_ARM); + if( ITEM_CHECKINDEX( itemindex) == TRUE ) { + return CHAR_ARM; + } + return -1; + }else { + Crushs = rand()%100; + if( Crushs < 50 ) { + rndwork = CHAR_BODY; + }else if( Crushs >= 50 && Crushs < 67 ) { + rndwork = CHAR_HEAD; + }else if( Crushs >= 67 && Crushs < 84 ) { + rndwork = CHAR_DECORATION1; + }else { + rndwork = CHAR_DECORATION2; + } + + for( i = 0; i < CHAR_EQUIPPLACENUM; i ++ ){//CHAR_ARM + itemindex = CHAR_getItemIndex( charaindex, rndwork); + if( ITEM_CHECKINDEX( itemindex) == TRUE && rndwork != CHAR_ARM ){ + return rndwork; + }else { + rndwork++; + rndwork=rndwork%5; + } + } + } + return -1; +} +#else +int BATTLE_ItemCrushCheck( int charaindex ) +{ + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ){ + return FALSE; + } + if( RAND( 1, gItemCrushRate ) < CHAR_getInt( charaindex, CHAR_LV ) ){ + return TRUE; + }else{ + return FALSE; + } +} +#endif + +#define BREAK_NAME_WEPON "武器" +#define BREAK_NAME_AROMER "防具" +#define BREAK_BRACELET "护腕" +#define BREAK_MUSIC "乐器" +#define BREAK_NECKLACE "头饰" +#define BREAK_RING "戒指" +#define BREAK_BELT "皮带" +#define BREAK_EARRING "耳饰" +#define BREAK_NOSERING "鼻环" +#define BREAK_AMULET "护身符" +#define BREAK_OTHER "道具" + +#ifdef _TAKE_ITEMDAMAGE +static char *aszCrushTbl[] = { "完好", "受损", "毁坏" , "不堪使用" , "碎片" }; +#else +static char *aszCrushTbl[] = { "受损", "毁坏" }; +#endif + + +#ifdef _TAKE_ITEMDAMAGE +int BATTLE_ItemCrush( int charaindex, int ItemEquip, int Damages, int flg) +{ + int itemindex, breadnums; + int crushlevel, crushenum, maxcrushenum; + char szBuffer[256]=""; + int battleindex, bid; + + itemindex = CHAR_getItemIndex( charaindex, ItemEquip ); + if( ITEM_CHECKINDEX( itemindex ) == FALSE ) + return -1; + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + + bid = BATTLE_Index2No( battleindex, charaindex ); + + crushlevel = ITEM_getInt( itemindex, ITEM_CRUSHLEVEL); + if( crushlevel < 0 ) crushlevel=0; + + crushenum = ITEM_getInt( itemindex, ITEM_DAMAGECRUSHE); + maxcrushenum = ITEM_getInt( itemindex, ITEM_MAXDAMAGECRUSHE); + if( maxcrushenum < 1 ) return -1; + if( ItemEquip == CHAR_ARM ) { + if( (breadnums = ((Damages-50)/40)) <= 0 ) + breadnums = 1; + }else { + if( Damages >= 200 ) breadnums = 1; + if( (breadnums = ((200 - Damages)/20)) < 0 ) + breadnums = 1; + } + crushenum = crushenum - RAND( breadnums, (breadnums*1.4) ); + ITEM_setInt( itemindex, ITEM_DAMAGECRUSHE, crushenum); + + if( crushenum <= 0 ){ //损坏消失 + crushenum = 0; + sprintf(szBuffer, "%s因过度损坏而消失。\n", ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( charaindex, -1, szBuffer, CHAR_COLORYELLOW); + + LogItem( + CHAR_getChar( charaindex, CHAR_NAME ), + CHAR_getChar( charaindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), +#endif + "因过度损坏而消失", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + CHAR_DelItem( charaindex, ItemEquip); + crushlevel = 4; + }else { //损坏扣值 + int defs, level=0; + + + defs = (crushenum*100)/maxcrushenum; + + if( defs >= 70 ){ + level = 0; + }else if( defs >= 50 && defs < 70 ) { + level = 1; + }else if( defs >= 30 && defs < 50 ) { + level = 2; + }else if( defs < 30 ) { + level = 3; + } + + if( level != crushlevel && defs < 70 ) { + ITEM_setInt( itemindex, ITEM_CRUSHLEVEL, level); +// for( i = 0; i < arraysizeof( ItemBreakPos ); i ++ ){ +// work = ITEM_getInt( itemindex, ItemBreakPos[i] ); +// if( work <= 0 )continue; +// work *=0.95; +// ITEM_setInt( itemindex, ItemBreakPos[i], work ); +// } + sprintf( szBuffer, "%s是%s的。", + ITEM_getChar( itemindex, ITEM_NAME ), aszCrushTbl[level] ); + CHAR_talkToCli( charaindex, -1, szBuffer, CHAR_COLORRED); + //更改道具说明 +// buf1 = ITEM_getChar( itemindex, ITEM_SECRETNAME); +// if( strstr( buf1, "(") != 0 ) { +// char buf5[256]; +// if( getStringFromIndexWithDelim( buf1,"(",1, buf5, sizeof( buf5)) != FALSE ) { +// sprintf( buf1, buf5); +// } +// } +// sprintf( buf2, "%s(%s)", buf1, aszCrushTbl[level]); +// ITEM_setChar( itemindex, ITEM_SECRETNAME, buf2); + } + } + + CHAR_sendItemDataOne( charaindex, ItemEquip ); + CHAR_complianceParameter( charaindex ); + CHAR_send_P_StatusString( charaindex, CHAR_P_STRING_ATK | CHAR_P_STRING_DEF + | CHAR_P_STRING_QUICK | CHAR_P_STRING_CHARM ); + + return TRUE; +} +#else +int BATTLE_ItemCrush( int charaindex ) +{ + int EquipTbl[CHAR_EQUIPPLACENUM], i, itemindex, rndwork, type; + int work, crushlevel, j, ItemEquip; + char szBuffer[256]=""; + + int ItemBreakPos[] = { + ITEM_ATTACKNUM_MIN, + ITEM_ATTACKNUM_MAX, + ITEM_MODIFYATTACK, + ITEM_MODIFYDEFENCE, + ITEM_MODIFYQUICK, + ITEM_MODIFYHP, + ITEM_MODIFYMP, + ITEM_MODIFYLUCK, + ITEM_MODIFYCHARM, + ITEM_MODIFYAVOID, + }; + + for( j = 0, i = 0; i < CHAR_EQUIPPLACENUM; i ++ ){ + itemindex = CHAR_getItemIndex( charaindex, i ); + if( ITEM_CHECKINDEX( itemindex ) == TRUE + && ITEM_getInt( itemindex, ITEM_MERGEFLG ) == 1 ){ + EquipTbl[j] = i; + j ++; + } + } + if( j == 0 )return FALSE; + rndwork = RAND( 0, j-1 ); + ItemEquip = EquipTbl[rndwork]; + itemindex = CHAR_getItemIndex( charaindex, ItemEquip ); + if( ITEM_CHECKINDEX( itemindex ) == FALSE )return FALSE; + crushlevel = ITEM_getInt( itemindex, ITEM_CRUSHLEVEL ); + if( crushlevel > 1 ) return FALSE; + { + if( crushlevel == 1 ){ + sprintf( szBuffer, "CrushLv2(毁坏道具Lv2)" ); + }else{ + sprintf( szBuffer, "CrushLv1(毁坏道具Lv1)" ); + } + LogItem( + CHAR_getChar( charaindex, CHAR_NAME ), + CHAR_getChar( charaindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), +#endif + szBuffer, + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + + ); + } + + /*{ int battleindex, bid; + //sprintf( szBuffer, "(%s)的(%s)是(%s)\n", + // CHAR_getUseName( charaindex ), + // ITEM_getChar( itemindex, ITEM_NAME ), + // aszCrushTbl[crushlevel] ); + + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + + bid = BATTLE_Index2No( battleindex, charaindex ); + //BATTLE_BroadCast( battleindex, szBuffer, + (bid >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + }*/ + + type = ITEM_getInt( itemindex, ITEM_TYPE ); + szBuffer[0] = 0; + switch( type ){ + case ITEM_FIST: + case ITEM_AXE: + case ITEM_CLUB: + case ITEM_SPEAR: + case ITEM_BOW: + case ITEM_BOOMERANG: + case ITEM_BOUNDTHROW: + case ITEM_BREAKTHROW: + sprintf( szBuffer, "%s%s", aszCrushTbl[crushlevel], BREAK_NAME_WEPON ); + break; + + case ITEM_HELM: + case ITEM_ARMOUR: + sprintf( szBuffer, "%s%s", aszCrushTbl[crushlevel], BREAK_NAME_AROMER ); + break; + + case ITEM_BRACELET: sprintf( szBuffer, "%s%s", aszCrushTbl[crushlevel], BREAK_BRACELET );break; + case ITEM_MUSIC: sprintf( szBuffer, "%s%s", aszCrushTbl[crushlevel], BREAK_MUSIC );break; + case ITEM_NECKLACE: sprintf( szBuffer, "%s%s", aszCrushTbl[crushlevel], BREAK_NECKLACE );break; + case ITEM_RING: sprintf( szBuffer, "%s%s", aszCrushTbl[crushlevel], BREAK_RING );break; + case ITEM_BELT: sprintf( szBuffer, "%s%s", aszCrushTbl[crushlevel], BREAK_BELT );break; + case ITEM_EARRING: sprintf( szBuffer, "%s%s", aszCrushTbl[crushlevel], BREAK_EARRING );break; + case ITEM_NOSERING: sprintf( szBuffer, "%s%s", aszCrushTbl[crushlevel], BREAK_NOSERING );break; + case ITEM_AMULET: sprintf( szBuffer, "%s%s", aszCrushTbl[crushlevel], BREAK_AMULET );break; + case ITEM_OTHER: sprintf( szBuffer, "%s%s", aszCrushTbl[crushlevel], BREAK_OTHER );break; + default: + sprintf( szBuffer, "%s%s", aszCrushTbl[crushlevel], BREAK_OTHER );break; + break; + } + ITEM_setChar( itemindex, ITEM_SECRETNAME, szBuffer ); + + for( i = 0; i < arraysizeof( ItemBreakPos ); i ++ ){ + work = ITEM_getInt( itemindex, ItemBreakPos[i] ); + if( work <= 0 )continue; + if( crushlevel == 1 ){ + work = 1; + }else{ + work /= 2; + if( work < 1 ) work = 1; + } + ITEM_setInt( itemindex, ItemBreakPos[i], work ); + } + CHAR_sendItemDataOne( charaindex, ItemEquip ); + ITEM_setInt( itemindex, ITEM_CRUSHLEVEL, crushlevel + 1 ); + CHAR_complianceParameter( charaindex ); + CHAR_send_P_StatusString( charaindex, + CHAR_P_STRING_ATK + | CHAR_P_STRING_DEF + | CHAR_P_STRING_QUICK + | CHAR_P_STRING_CHARM ); + + return TRUE; +} +#endif + +#ifdef _TAKE_ITEMDAMAGE +static int BATTLE_ItemCrushSeq( int attackindex, int charaindex, int Damages) +{ + int iRet = FALSE; + int crushindex=-1, crushpower; + int flg=0;//flg def 1 att 2 + + flg=1; + if( ( crushindex = BATTLE_ItemCrushCheck( charaindex, flg) ) >= 0 ) { + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER ){ + crushpower = CHAR_getWorkInt( attackindex, CHAR_WORKATTACKPOWER); + BATTLE_ItemCrush( charaindex, crushindex, Damages, flg); + } + } + flg=2; + if( ( crushindex = BATTLE_ItemCrushCheck( attackindex, flg) ) >= 0 ) { + if( CHAR_getInt( attackindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER ){ + crushpower = CHAR_getWorkInt( charaindex, CHAR_WORKDEFENCEPOWER); + BATTLE_ItemCrush( attackindex, crushindex, Damages, flg); + } + } + + return iRet; +} + +#else + +static int BATTLE_ItemCrushSeq( int charaindex ) +{ + char szWork[256]; + int iRet = FALSE; + + if( BATTLE_ItemCrushCheck( charaindex ) == TRUE ){ + if( BATTLE_ItemCrush( charaindex ) == TRUE ){ + sprintf( szWork, "BK|%s的\t装备受到损伤。", + CHAR_getUseName( charaindex ) ); + strcat( szBadStatusString, szWork ); + iRet = TRUE; + } + } + return iRet; +} +#endif + +#ifdef _EQUIT_ARRANGE +static BOOL BATTLE_ArrangeCheck( int attackindex, int defindex) +{ + int DEF_ARR; + if( CHAR_getWorkInt( defindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_GUARD ){ + return FALSE; + } + if( BATTLE_GetDamageReact( defindex ) > 0 ){ + return FALSE; + } + if( BATTLE_CanMoveCheck( defindex ) == FALSE ){ + return FALSE; + } + if( CHAR_getWorkInt( defindex, CHAR_WORKBATTLEFLG ) & CHAR_BATTLEFLG_NODUCK ){ + return FALSE; + } + if( CHAR_getWorkInt( defindex, CHAR_WORKBATTLEFLG ) & CHAR_BATTLEFLG_ABIO ){ + return FALSE; + } + if( (DEF_ARR = CHAR_getWorkInt( defindex, CHAR_WORKARRANGEPOWER )) > 0 ){ + int per = (DEF_ARR > 700)?700:DEF_ARR; + if( RAND( 1, 1000 ) <= per ){ + return TRUE; + } + } + + return FALSE; +} +#endif + +//回避判定 +static BOOL BATTLE_DuckCheck( + int attackindex, + int defindex +) +{ + int flg = FALSE; + + int Df_Dex, At_Dex, Df_Luck = 0; + float per, Work, wari, Big, Small; + + gDuckPer = 0; + if( CHAR_getWorkInt( defindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_GUARD ){ + return FALSE; + } + if( BATTLE_GetDamageReact( defindex ) > 0 ){ + return FALSE; + } + if( BATTLE_CanMoveCheck( defindex ) == FALSE ){ +#ifdef _PROFESSION_ADDSKILL + if( CHAR_getWorkInt( defindex, CHAR_DOOMTIME ) <= 0 )//集气时可闪避(并且没有处於天罗地网和盾击的状态) + return FALSE; + else{ + if( CHAR_getWorkInt( defindex, CHAR_WORKDRAGNET ) == 0 + && CHAR_getWorkInt( defindex, CHAR_WORKDIZZY ) == 0 ){ + } + else{ + return FALSE; + } + } +#else + return FALSE; +#endif + } + + if( CHAR_getWorkInt( defindex, CHAR_WORKBATTLEFLG ) & CHAR_BATTLEFLG_NODUCK ){ + return FALSE; + } + if( CHAR_getWorkInt( defindex, CHAR_WORKBATTLEFLG ) & CHAR_BATTLEFLG_ABIO ){ + return FALSE; + } + +#ifdef _PETSKILL_SETDUCK + if( BATTLE_CheckMySkillDuck( defindex ) == TRUE ){ + return TRUE; + } +#endif + + At_Dex = CHAR_getWorkInt( attackindex, CHAR_WORKFIXDEX ); + Df_Dex = CHAR_getWorkInt( defindex, CHAR_WORKFIXDEX ); + if( CHAR_getInt( defindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + Df_Luck = CHAR_getWorkInt( defindex, CHAR_WORKFIXLUCK ); + } + if( CHAR_getInt( attackindex, CHAR_WHICHTYPE ) == CHAR_TYPEENEMY + && CHAR_getInt( defindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET ){ + At_Dex *= 0.8; + }else + if( CHAR_getInt( attackindex, CHAR_WHICHTYPE ) != CHAR_TYPEENEMY + && CHAR_getInt( defindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET + ){ + Df_Dex *= 0.8; + }else + if( CHAR_getInt( attackindex, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER + && CHAR_getInt( defindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + At_Dex *= 0.6; + }else + if( CHAR_getInt( attackindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER + && CHAR_getInt( defindex, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ){ + Df_Dex *= 0.6; + } + + if( Df_Dex >= At_Dex ){ + Big = Df_Dex; + Small = At_Dex; + wari = 1.0; + }else{ + Big = At_Dex; + Small = Df_Dex; + if( Big <= 0 ){ + wari = 0.0; + }else{ + wari = Small / Big; + } + } + if( CHAR_getWorkInt( defindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_JYUJYUTU ){ + gKawashiPara = 0.027; + }else{ + gKawashiPara = 0.02; + } + Work = ( Big - Small ) / gKawashiPara; + if( Work <= 0 ) Work = 0; + per = (float)( sqrt( (double)Work ) ); + per *= wari; + per += Df_Luck; + + per += gBattleDuckModyfy; + if( CHAR_getWorkInt( attackindex, CHAR_WORKDRUNK ) > 0 ){ + per += RAND( 20, 30 ); + } + if( gWeponType == ITEM_BOW ){ + per += 20; + } + if( CHAR_getWorkInt( defindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_NOGUARD ){ + per += CHAR_GETWORKINT_HIGH( defindex, CHAR_WORKBATTLECOM3 ); + } + + if( gWeponType == ITEM_BOW ){ + per += 20; + } + + per *= 100; + if( per > KAWASHI_MAX_RATE*100 ) per = KAWASHI_MAX_RATE*100; + if( per <= 0 ) per = 1; + + gDuckPer = per * 0.01; +#ifdef _EQUIT_HITRIGHT + if( CHAR_getInt( attackindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + int AddHit = CHAR_getWorkInt( attackindex, CHAR_WORKHITRIGHT); + per -= RAND( AddHit*0.8, AddHit*1.2); + per = ( per < 0 )?0:per; + } +#endif + + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + per = BATTLE_check_profession_duck( defindex, per ); +#endif + +#ifdef _PROFESSION_ADDSKILL + if( CHAR_getWorkInt( attackindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_CHAOS ){ //混乱攻击时命中降低 + per += (per*0.4); + } +#endif + + if( RAND( 1, 10000 ) <= per ){ + flg = TRUE; +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + // 回避技能升级 + if( (CHAR_getInt( defindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER) ){ + PROFESSION_SKILL_LVEVEL_UP( defindex, "PROFESSION_AVOID" ); + } +#endif + }else{ + flg = FALSE; + } + return flg; +} + +static int BATTLE_AttrCalc( + int My_Fire, + int My_Water, + int My_Earth, + int My_Wind, + int My_None, + int Vs_Fire, + int Vs_Water, + int Vs_Earth, + int Vs_Wind, + int Vs_None +) +{ + int iRet = 0; + My_Fire = My_Fire * Vs_None * AJ_UP + + My_Fire * Vs_Fire * AJ_SAME + + My_Fire * Vs_Water * AJ_DOWN + + My_Fire * Vs_Earth * AJ_SAME + + My_Fire * Vs_Wind * AJ_UP; + My_Water = My_Water * Vs_None * AJ_UP + + My_Water * Vs_Fire * AJ_UP + + My_Water * Vs_Water * AJ_SAME + + My_Water * Vs_Earth * AJ_DOWN + + My_Water * Vs_Wind * AJ_SAME; + + My_Earth = My_Earth * Vs_None * AJ_UP + + My_Earth * Vs_Fire * AJ_SAME + + My_Earth * Vs_Water * AJ_UP + + My_Earth * Vs_Earth * AJ_SAME + + My_Earth * Vs_Wind * AJ_DOWN; + + My_Wind = My_Wind * Vs_None * AJ_UP + + My_Wind * Vs_Fire * AJ_DOWN + + My_Wind * Vs_Water * AJ_SAME + + My_Wind * Vs_Earth * AJ_UP + + My_Wind * Vs_Wind * AJ_SAME; + + My_None = My_None * Vs_None * AJ_SAME + + My_None * Vs_Fire * AJ_DOWN + + My_None * Vs_Water * AJ_DOWN + + My_None * Vs_Earth * AJ_DOWN + + My_None * Vs_Wind * AJ_DOWN; + + iRet = (My_Fire + My_Water + My_Earth + My_Wind + My_None) ; + return (iRet * D_ATTR); +} + +static void BATTLE_GetAttr( int charaindex, int *T_pow ) +{ +#ifdef _BATTLE_NEWPOWER +#else + int petindex = BATTLE_getRidePet( charaindex ); + if( petindex == -1 ){ +#endif + T_pow[0] = CHAR_getWorkInt( charaindex, CHAR_WORKFIXEARTHAT ); + T_pow[1] = CHAR_getWorkInt( charaindex, CHAR_WORKFIXWATERAT ); + T_pow[2] = CHAR_getWorkInt( charaindex, CHAR_WORKFIXFIREAT ); + T_pow[3] = CHAR_getWorkInt( charaindex, CHAR_WORKFIXWINDAT ); +/* + *pAt_Fire = CHAR_getWorkInt( charaindex, CHAR_WORKFIXFIREAT ); + *pAt_Water = CHAR_getWorkInt( charaindex, CHAR_WORKFIXWATERAT ); + *pAt_Earth = CHAR_getWorkInt( charaindex, CHAR_WORKFIXEARTHAT ); + *pAt_Wind = CHAR_getWorkInt( charaindex, CHAR_WORKFIXWINDAT ); +*/ +#ifdef _BATTLE_NEWPOWER +#else + }else { // Robin 0727 when Ride Pet +#endif +#ifdef _BATTLE_NEWPOWER +#else + T_pow[0] = ( CHAR_getWorkInt( charaindex, CHAR_WORKFIXEARTHAT ) + + CHAR_getWorkInt( petindex, CHAR_WORKFIXEARTHAT )) /2; + T_pow[1] = ( CHAR_getWorkInt( charaindex, CHAR_WORKFIXWATERAT ) + + CHAR_getWorkInt( petindex, CHAR_WORKFIXWATERAT )) /2; + T_pow[2] = ( CHAR_getWorkInt( charaindex, CHAR_WORKFIXFIREAT ) + + CHAR_getWorkInt( petindex, CHAR_WORKFIXFIREAT )) /2; + T_pow[3] = ( CHAR_getWorkInt( charaindex, CHAR_WORKFIXWINDAT ) + + CHAR_getWorkInt( petindex, CHAR_WORKFIXWINDAT )) /2; +/* + *pAt_Fire = ( CHAR_getWorkInt( charaindex, CHAR_WORKFIXFIREAT ) + + CHAR_getWorkInt( petindex, CHAR_WORKFIXFIREAT )) /2; + *pAt_Water = ( CHAR_getWorkInt( charaindex, CHAR_WORKFIXWATERAT ) + + CHAR_getWorkInt( petindex, CHAR_WORKFIXWATERAT )) /2; + *pAt_Earth = ( CHAR_getWorkInt( charaindex, CHAR_WORKFIXEARTHAT ) + + CHAR_getWorkInt( petindex, CHAR_WORKFIXEARTHAT )) /2; + *pAt_Wind = ( CHAR_getWorkInt( charaindex, CHAR_WORKFIXWINDAT ) + + CHAR_getWorkInt( petindex, CHAR_WORKFIXWINDAT )) /2; +*/ + } +#endif +#ifdef _PROFESSION_ADDSKILL + //加上结界 + //T_pow[0] += T_pow[0]*( (CHAR_getWorkInt( charaindex, CHAR_WORKFIXEARTHAT_BOUNDARY )>>16&0x0000ffff) /100 ); + //T_pow[1] += T_pow[1]*( (CHAR_getWorkInt( charaindex, CHAR_WORKFIXWATERAT_BOUNDARY )>>16&0x0000ffff) /100 ); + //T_pow[2] += T_pow[2]*( (CHAR_getWorkInt( charaindex, CHAR_WORKFIXFIREAT_BOUNDARY )>>16&0x0000ffff) /100 ); + //T_pow[3] += T_pow[3]*( (CHAR_getWorkInt( charaindex, CHAR_WORKFIXWINDAT_BOUNDARY )>>16&0x0000ffff) /100 ); +#endif +#ifdef _SUIT_TWFWENDUM + T_pow[0] = (T_pow[0]+CHAR_getWorkInt( charaindex, CHAR_WORK_EA ))>100?100:(T_pow[0]+CHAR_getWorkInt( charaindex, CHAR_WORK_EA )); + T_pow[1] = (T_pow[1]+CHAR_getWorkInt( charaindex, CHAR_WORK_WR ))>100?100:(T_pow[1]+CHAR_getWorkInt( charaindex, CHAR_WORK_EA )); + T_pow[2] = (T_pow[2]+CHAR_getWorkInt( charaindex, CHAR_WORK_FI ))>100?100:(T_pow[2]+CHAR_getWorkInt( charaindex, CHAR_WORK_EA )); + T_pow[3] = (T_pow[3]+CHAR_getWorkInt( charaindex, CHAR_WORK_WI ))>100?100:(T_pow[3]+CHAR_getWorkInt( charaindex, CHAR_WORK_EA )); +#endif + { + int i, renum=ATTR_MAX; + for( i=0; i<4; i++) { + if( T_pow[ i] < 0 ) T_pow[ i] = 0; + renum -= T_pow[ i]; + } + if( renum < 0 ) renum = 0; + T_pow[ 4] = renum; + } +/* + if( *pAt_Fire < 0 ) *pAt_Fire = 0; + if( *pAt_Water < 0 ) *pAt_Water = 0; + if( *pAt_Earth < 0 ) *pAt_Earth = 0; + if( *pAt_Wind < 0 ) *pAt_Wind = 0; + *pAt_None = ATTR_MAX - *pAt_Fire - *pAt_Water - *pAt_Earth - *pAt_Wind; + if( *pAt_None < 0 )*pAt_None = 0; +*/ +} + + +float BATTLE_FieldAttAdjust( + int battleindex, + int pAt_Fire, + int pAt_Water, + int pAt_Earth, + int pAt_Wind +) +{ +#define AJ_BOTTOM (0.5) +#define AJ_PLUS (0.5) + int att; + float power, a_pow; + att = BattleArray[battleindex].field_att; + a_pow = (float)(BattleArray[battleindex].att_pow); + + switch( att ){ + case BATTLE_ATTR_EARTH: + power = AJ_BOTTOM + (pAt_Earth) * a_pow * 0.01 * 0.01 * AJ_PLUS; + break; + case BATTLE_ATTR_WATER: + power = AJ_BOTTOM + (pAt_Water) * a_pow * 0.01 * 0.01 * AJ_PLUS ; + break; + case BATTLE_ATTR_FIRE: + power = AJ_BOTTOM + (pAt_Fire) * a_pow * 0.01 * 0.01 * AJ_PLUS ; + break; + case BATTLE_ATTR_WIND: + power = AJ_BOTTOM + (pAt_Wind) * a_pow * 0.01 * 0.01 * AJ_PLUS ; + break; + default: + power = AJ_BOTTOM; + break; + } + return power; +} + +static int BATTLE_AttrAdjust( + int attackindex, + int defindex, + int damage +) +{ + int At_pow[5]={0,0,0,0,0}; //地水火风 + int Dt_pow[5]={0,0,0,0,0}; + int i; + float At_FieldPow, Df_FieldPow; +#ifdef _BATTLE_PROPERTY + int (*loopfunc)(int,int,int*,int*,int)=NULL; +#endif + + BATTLE_GetAttr( attackindex, At_pow); + BATTLE_GetAttr( defindex, Dt_pow); + +#ifdef _PSKILL_MDFYATTACK + if( CHAR_getWorkInt( attackindex, CHAR_WORKBATTLECOM1) == BATTLE_COM_S_MDFYATTACK ) { + int MKind=-1, MODS=0; + MKind = CHAR_GETWORKINT_LOW( attackindex, CHAR_WORKBATTLECOM4); + MODS = CHAR_GETWORKINT_HIGH( attackindex, CHAR_WORKBATTLECOM4); + + for( i=0; i<5; i++) { + At_pow[ i] = 0; + } + + if( MKind >= 0 && MKind <= 4 ){ + At_pow[ MKind] = MODS; + At_pow[ 4] = 0; + } + } +#endif +#ifdef _BATTLE_PROPERTY + loopfunc =(int(*)(int,int,int*,int*,int))CHAR_getFunctionPointer( attackindex, CHAR_BATTLEPROPERTY); + if( loopfunc ){ + loopfunc( attackindex, defindex, &damage, At_pow, 5); + } +#endif +#ifdef _BATTLE_PROPERTY + loopfunc = NULL; + loopfunc =(int(*)(int,int,int*,int*,int))CHAR_getFunctionPointer( defindex, CHAR_BATTLEPROPERTY); + if( loopfunc ){ + loopfunc( defindex, attackindex, &damage, Dt_pow, 5); + } +#endif + + At_FieldPow = BATTLE_FieldAttAdjust( + CHAR_getWorkInt( attackindex, CHAR_WORKBATTLEINDEX ), At_pow[ 2], At_pow[ 1], At_pow[ 0], At_pow[ 3] ); + Df_FieldPow = BATTLE_FieldAttAdjust( + CHAR_getWorkInt( defindex, CHAR_WORKBATTLEINDEX ), Dt_pow[ 2], Dt_pow[ 1], Dt_pow[ 0], Dt_pow[ 3] ); + + for( i=0; i<5; i++) { + At_pow[ i] *= damage; + } +/* + At_Fire *= damage; At_Water *= damage; At_pow[0] *= damage; + At_Wind *= damage; At_none *= damage; +*/ + damage = BATTLE_AttrCalc(//火2水1第0封3 + At_pow[ 2], At_pow[ 1], At_pow[ 0], At_pow[ 3], At_pow[ 4], + Dt_pow[ 2], Dt_pow[ 1], Dt_pow[ 0], Dt_pow[ 3], Dt_pow[ 4] ); + damage *= (At_FieldPow / Df_FieldPow); + + return damage; +} + +int BATTLE_GuardAdjust( int damage ) +{ + int Rand = RAND( 1, 100 ); + if( Rand <= 25 ){ + damage *= 0.00; + }else{ + if( Rand <= 50 ){ + damage *= 0.10; + }else{ + if( Rand <= 70 ){ + damage *= 0.20; + }else{ + if( Rand <= 85 ){ + damage *= 0.30; + }else{ + if( Rand <= 95 ){ + damage *= 0.40; + }else{ + damage *= 0.50; + } + } + } + } + } + return damage; +} + +//计算伤害值 +int BATTLE_DamageCalc( int attackindex, int defindex ) +{ + float attack, defense; + int damage = 0; + int attackpet = BATTLE_getRidePet( attackindex ); + int defpet = BATTLE_getRidePet( defindex ); + + // Robin 0727 Ride Pet + if( attackpet == -1 ) { + attack = CHAR_getWorkInt( attackindex, CHAR_WORKATTACKPOWER ); + }else { + attack = BATTLE_adjustRidePet3A( attackindex, attackpet, CHAR_WORKATTACKPOWER, ATTACKSIDE ); + } + if( defpet == -1 ) { +#ifdef _BATTLE_NEWPOWER + defense = CHAR_getWorkInt( defindex, CHAR_WORKDEFENCEPOWER ) * 0.70; +#else + defense = CHAR_getWorkInt( defindex, CHAR_WORKDEFENCEPOWER ) * 0.45; + defense += CHAR_getWorkInt( defindex, CHAR_WORKQUICK ) * 0.2; + defense += CHAR_getWorkInt( defindex, CHAR_WORKFIXVITAL ) * 0.1; +#endif + }else { +#ifdef _BATTLE_NEWPOWER + defense = BATTLE_adjustRidePet3A( defindex, defpet, CHAR_WORKDEFENCEPOWER, DEFFENCESIDE ) * 0.70; +#else + defense = BATTLE_adjustRidePet3A( defindex, defpet, CHAR_WORKDEFENCEPOWER, DEFFENCESIDE ) * 0.45; + defense += BATTLE_adjustRidePet3A( defindex, defpet, CHAR_WORKQUICK, DEFFENCESIDE ) * 0.20; + defense += CHAR_getWorkInt( defindex, CHAR_WORKFIXVITAL ) * 0.05; +#endif + } + +#ifdef _MAGIC_SUPERWALL //铁壁防御 + if( CHAR_getWorkInt( defindex, CHAR_MAGICSUPERWALL ) > 0 ){ + float def = (float)(CHAR_getWorkInt( defindex, CHAR_OTHERSTATUSNUMS )); + def = (def + rand()%20)/100; + defense += defense * def; + } +#endif +#ifdef _NPCENEMY_ADDPOWER //修改怪物的能力值 + if( CHAR_getInt( defindex, CHAR_WHICHTYPE ) == CHAR_TYPEENEMY ) { + defense += (defense*(rand()%10)+2)/100; + } + if( CHAR_getInt( attackindex, CHAR_WHICHTYPE ) == CHAR_TYPEENEMY ) { + attack += (attack*(rand()%10)+2)/100; + } +#endif + if( CHAR_getWorkInt( defindex, CHAR_WORKSTONE ) > 0 ) defense *= 2.0; + +#ifdef _PETSKILL_REGRET + //无装备防御 + if( CHAR_getWorkInt( attackindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_REGRET + || CHAR_getWorkInt( attackindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_REGRET2 ) + defense = CHAR_getWorkInt(defindex,CHAR_WORKFIXTOUGH); +#endif + +#ifdef _EQUIT_NEGLECTGUARD //忽视目标防御力% + if( CHAR_getWorkInt( attackindex, CHAR_WORKNEGLECTGUARD) > 1 ) { + float defp = (float)CHAR_getWorkInt( attackindex, CHAR_WORKNEGLECTGUARD); + defp = 1 - (defp/100); + defense = defense*defp; + } +#endif + + if( defense <= attack && attack < (defense * 8.0/7.0) ){ + damage = (int)(RAND( 0, attack * D_16 )); + }else + if( defense > attack ){ + damage = (int)(RAND( 0, 1 )); + }else + if( attack >= (defense * 8/7) ){ + float K0; + K0 = RAND( 0, attack*D_8 ) - attack*D_16; + damage = (int)(( (attack - defense )*DAMAGE_RATE ) + K0); + } + + //四属性 + damage = BATTLE_AttrAdjust( attackindex, defindex, damage ); + +#ifdef _PROFESSION_ADDSKILL + { + //四属结界 + if( ((CHAR_getWorkInt( defindex, CHAR_WORKFIXEARTHAT_BOUNDARY )>>16) & 0x0000ffff) > 0 ){ + if( CHAR_getWorkInt( attackindex, CHAR_WORKFIXEARTHAT ) > 0 ) + damage -= damage*(float)((CHAR_getWorkInt( attackindex, CHAR_WORKFIXEARTHAT )/200.0)); + }else if( ((CHAR_getWorkInt( defindex, CHAR_WORKFIXWATERAT_BOUNDARY )>>16) & 0x0000ffff) > 0 ){ + if( CHAR_getWorkInt( attackindex, CHAR_WORKFIXWATERAT ) > 0 ) + damage -= damage*(float)((CHAR_getWorkInt( attackindex, CHAR_WORKFIXWATERAT )/200.0)); + }else if( ((CHAR_getWorkInt( defindex, CHAR_WORKFIXFIREAT_BOUNDARY )>>16) & 0x0000ffff) > 0 ){ + if( CHAR_getWorkInt( attackindex, CHAR_WORKFIXFIREAT ) > 0 ) + damage -= damage*(float)((CHAR_getWorkInt( attackindex, CHAR_WORKFIXFIREAT )/200.0)); + }else if( ((CHAR_getWorkInt( defindex, CHAR_WORKFIXWINDAT_BOUNDARY )>>16) & 0x0000ffff) > 0 ){ + if( CHAR_getWorkInt( attackindex, CHAR_WORKFIXWINDAT ) > 0 ) + damage -= damage*(float)((CHAR_getWorkInt( attackindex, CHAR_WORKFIXWINDAT )/200.0)); + } + //T_pow[1] += T_pow[1]*( (CHAR_getWorkInt( charaindex, CHAR_WORKFIXWATERAT_BOUNDARY )>>16&0x0000ffff) /100 ); + //T_pow[2] += T_pow[2]*( (CHAR_getWorkInt( charaindex, CHAR_WORKFIXFIREAT_BOUNDARY )>>16&0x0000ffff) /100 ); + //T_pow[3] += T_pow[3]*( (CHAR_getWorkInt( charaindex, CHAR_WORKFIXWINDAT_BOUNDARY )>>16&0x0000ffff) /100 ); + } +#endif + +#ifdef _ADD_DEAMGEDEFC //额外伤害 & 附加攻击 + { + int apower, dpower, otherpower; + apower = CHAR_getWorkInt( attackindex, CHAR_WORKOTHERDMAGE); + dpower = CHAR_getWorkInt( defindex, CHAR_WORKOTHERDEFC); + + otherpower = RAND( apower*0.3, apower) - RAND( dpower*0.3, dpower); + if( otherpower != 0 ) { + damage += otherpower; + } + } + if( damage < 0 ) + damage = 0; +#endif + + return damage; +} + +static int BATTLE_CriticalCheckPlayer( int attackindex, int defindex ) +{ + int At_Dex, At_Luck = 0, At_Kiryoku = 0, At_Soubi = 0; + int At_SoubiIndex, Df_Dex, root = 1; + float per, Work, Big, Small, wari, divpara = gCriticalPara; + + // WON REM + //if( gWeponType == ITEM_BOW )return 0; + + At_Dex = CHAR_getWorkInt( attackindex, CHAR_WORKFIXDEX ); + Df_Dex = CHAR_getWorkInt( defindex, CHAR_WORKFIXDEX ); + + if( CHAR_getInt( attackindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + At_Luck = CHAR_getWorkInt( attackindex, CHAR_WORKFIXLUCK ); + } + At_SoubiIndex = CHAR_getItemIndex( attackindex, CHAR_ARM ); + At_Kiryoku = CHAR_getInt( attackindex, CHAR_MP ); + + if( ITEM_CHECKINDEX( At_SoubiIndex ) == TRUE ){ + At_Soubi = ITEM_getInt( At_SoubiIndex, ITEM_CRITICAL ); + } + if( CHAR_getInt( attackindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET + && CHAR_getInt( defindex, CHAR_WHICHTYPE ) == CHAR_TYPEENEMY){ + Df_Dex *= 0.8; + }else + if( CHAR_getInt( attackindex, CHAR_WHICHTYPE ) == CHAR_TYPEENEMY + && CHAR_getInt( defindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET){ + divpara = 10.0; + root = 0; + }else + if( CHAR_getInt( attackindex, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER + && CHAR_getInt( defindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER){ + divpara = 10.0; + root = 0; + }else + if( CHAR_getInt( attackindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER + && CHAR_getInt( defindex, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER){ + Df_Dex *= 0.6; + } + + if( At_Dex >= Df_Dex ){ + Big = At_Dex; + Small = Df_Dex; + wari = 1.0; + }else{ + Big = Df_Dex; + Small = At_Dex; + if( Big <= 0 ){ + wari = 0.0; + }else{ + wari = Small / Big; + } + } + Work = ( Big - Small ) / divpara; + if( Work <= 0 ) Work = 0; + + if( root == 1 ){ + per = (float)( sqrt( (double)Work ) ) + At_Soubi * 0.5; + }else{ + per = (float)Work + At_Soubi * 0.5; + } + per *= wari; + per += At_Luck ; + per *= 100; + if( per < 0 ) per = 1; + if( per > 10000 ) per = 10000; +#ifdef _PETSKILL_LER + // 雷尔不能被打飞 + if(CHAR_getInt(defindex,CHAR_BASEBASEIMAGENUMBER) == 101813 || + CHAR_getInt(defindex,CHAR_BASEBASEIMAGENUMBER) == 101814) per = 0; +#endif + return (int)per; +} + +#if 0 +static int BATTLE_CriticalCheckEnemy( + int attackindex, + int defindex +) +{ + int At_Dex, At_Luck = 0, At_Kiryoku = 0, At_Soubi = 0; + int At_SoubiIndex, Df_Dex; + float per, Work, Big, Small, wari; + + if( gWeponType == ITEM_BOW )return 0; + + At_Dex = CHAR_getWorkInt( attackindex, CHAR_WORKFIXDEX ); + Df_Dex = CHAR_getWorkInt( defindex, CHAR_WORKFIXDEX ); + + if( CHAR_getInt( attackindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + At_Luck = CHAR_getWorkInt( attackindex, CHAR_WORKFIXLUCK ); + } + At_SoubiIndex = CHAR_getItemIndex( attackindex, CHAR_ARM ); + At_Kiryoku = CHAR_getInt( attackindex, CHAR_MP ); + + if( ITEM_CHECKINDEX( At_SoubiIndex ) == TRUE ){ + At_Soubi = ITEM_getInt( At_SoubiIndex, ITEM_CRITICAL ); + } + + if( At_Dex >= Df_Dex ){ + Big = At_Dex; + Small = Df_Dex; + wari = 1.0; + }else{ + Big = Df_Dex; + Small = At_Dex; + if( Big <= 0 ){ + wari = 0.0; + }else{ + wari = Small / Big; + } + } + + Work = ( Big - Small ) / 0.13; + if( Work <= 0 ) Work = 0; + + per = (float)( sqrt( (double)Work ) ) + + At_Soubi * 0.5; + + per *= wari; + + per += At_Luck ; + + if( per < 0 ) per = 0; + + if( per > 100 ) per = 100; + + return (int)per; +} +#endif + + +static int BATTLE_CounterCalc( int attackindex, int defindex ) +{ + int Df_Dex, At_Dex, Work, root = 1; + float per, Big, Small, wari, divpara = gCounterPara; + + At_Dex = CHAR_getWorkInt( attackindex, CHAR_WORKFIXDEX ); + Df_Dex = CHAR_getWorkInt( defindex, CHAR_WORKFIXDEX ); + + if( CHAR_getInt( attackindex, CHAR_WHICHTYPE ) == CHAR_TYPEENEMY + && CHAR_getInt( defindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET + ){ + divpara = 10; + root = 0; + }else if( CHAR_getInt( attackindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET + && CHAR_getInt( defindex, CHAR_WHICHTYPE ) == CHAR_TYPEENEMY + ){ + Df_Dex *= 0.8; + }else if( CHAR_getInt( attackindex, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER + && CHAR_getInt( defindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER + ){ + divpara = 10; + root = 0; + }else if( CHAR_getInt( attackindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER + && CHAR_getInt( defindex, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER + ){ + Df_Dex *= 0.6; + } + + if( At_Dex >= Df_Dex ){ + Big = At_Dex; + Small = Df_Dex; + wari = 1.0; + }else{ + Big = Df_Dex; + Small = At_Dex; + if( Big <= 0 ){ + wari = 0.0; + }else{ + wari = Small / Big; + } + } + Work = ( Big - Small ) / divpara; + if( Work <= 0 ) Work = 0; + if( root == 1 ){ + per = (float)( (double)sqrt( Work ) ); + }else{ + per = (float)( Work); + } + per *= wari; + + return per; +} + + +#if 0 +static int BATTLE_CriticalCheckPet( int attackindex, int defindex ) +{ + float per; + int iWork = 0; + + per = CHAR_getInt( attackindex, CHAR_CRITIAL ); + + if( CHAR_getWorkInt( attackindex, CHAR_WORKBATTLECOM1 ) + == BATTLE_COM_S_NOGUARD + ){ + iWork = CHAR_GETWORKINT_LOW( attackindex, CHAR_WORKBATTLECOM3 ); + iWork = iWork & 0xFF; + if( iWork > 127 )iWork *= -1; + } + + per += iWork; + + if( per < 0 ) per = 0; + + if( per > 100 ) per = 100; + + return per; +} + +#endif + +static int BATTLE_CriticalCheck( int attackindex, int defindex ) +{ + if( CHAR_getInt( attackindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + return BATTLE_CriticalCheckPlayer( attackindex, defindex ); + }else{ + return BATTLE_CriticalCheckPlayer( attackindex, defindex ); + } +} + +static int BATTLE_CriDamageCalc( int attackindex, int defindex ) +{ + int damage = 0; + damage = BATTLE_DamageCalc( attackindex, defindex ); + + damage += CHAR_getWorkInt( defindex, CHAR_WORKDEFENCEPOWER ) + * (float)CHAR_getInt( attackindex, CHAR_LV ) + / (float)CHAR_getInt( defindex, CHAR_LV ) + * 0.5; + return damage; +} + +static int BATTLE_GuardianCheck( int attackindex, int defindex ) +{ + int GuardianIndex, Guardian, battleindex; + int DefSide = 0, i, DefNo; + //char szBuffer[256]=""; + + battleindex = CHAR_getWorkInt( attackindex, CHAR_WORKBATTLEINDEX ); + + DefNo = BATTLE_Index2No( battleindex, defindex ); + i = DefNo; + if( i >= SIDE_OFFSET ){ + i -= SIDE_OFFSET; + DefSide = 1; + } + + if( BattleArray[battleindex].Side[DefSide].Entry[i].guardian == -1 ){ + return -1; + } + + Guardian = BattleArray[battleindex].Side[DefSide].Entry[i].guardian; +// Terry add fix 使用舍已为人技能时,若攻击使用此技能的人client会当 + if(Guardian == DefNo) return -1; +// end + GuardianIndex = BATTLE_No2Index( battleindex, Guardian ); + + if( CHAR_CHECKINDEX( GuardianIndex ) == FALSE )return -1; + + if( CHAR_getFlg( GuardianIndex, CHAR_ISDIE ) == TRUE )return -1; + + if( CHAR_getWorkInt( GuardianIndex, CHAR_WORKBATTLEFLG ) & CHAR_BATTLEFLG_GUARDIAN ){ + }else{ + return -1; + } + + if( CHAR_getWorkInt( GuardianIndex, CHAR_WORKSLEEP ) > 0 + || CHAR_getWorkInt( GuardianIndex, CHAR_WORKCONFUSION ) > 0 + || CHAR_getWorkInt( GuardianIndex, CHAR_WORKPARALYSIS ) > 0 + || CHAR_getWorkInt( GuardianIndex, CHAR_WORKSTONE ) > 0 + || CHAR_getWorkInt( GuardianIndex, CHAR_WORKBARRIER ) > 0 + || GuardianIndex == attackindex +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + || CHAR_getWorkInt( GuardianIndex, CHAR_WORKDIZZY ) > 0 // 晕眩 + || CHAR_getWorkInt( GuardianIndex, CHAR_WORKDRAGNET ) > 0 // 天罗地网 + || CHAR_getWorkInt( GuardianIndex, CHAR_WORKINSTIGATE ) > 0 // 挑拨 +#endif +#ifdef _PROFESSION_ADDSKILL + || CHAR_getWorkInt( GuardianIndex, CHAR_DOOMTIME ) > 0 //世界末日集气 +#endif + ){ + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)想要守住(%s)可是没成功\。", + // CHAR_getUseName( GuardianIndex ), + // CHAR_getUseName( defindex ) + //); + //BATTLE_BroadCast( battleindex, szBuffer, + // (DefNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + return -1; + } + + if( BATTLE_IsThrowWepon( + CHAR_getItemIndex( attackindex, CHAR_ARM ) ) == TRUE + ){ + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)想要守住(%s)可是没成功\。", + // CHAR_getUseName( GuardianIndex ), + // CHAR_getUseName( defindex ) + //); + //BATTLE_BroadCast( battleindex, szBuffer, + // (DefNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + return -1; + } + + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)护住了(%s)。", + // CHAR_getUseName( GuardianIndex ), + // CHAR_getUseName( defindex ) + //); + //BATTLE_BroadCast( battleindex, szBuffer, + // (DefNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + + return Guardian; +} + + +static int BATTLE_DamageWakeUp( int battleindex, int defindex ) +{ + int bid; + char szBuffer[256]=""; + CHAR_setInt( defindex, CHAR_DAMAGECOUNT, + CHAR_getInt( defindex, CHAR_DAMAGECOUNT ) +1 ); + + if( CHAR_getWorkInt( defindex, CHAR_WORKSLEEP ) > 0 ){ + CHAR_setWorkInt( defindex, CHAR_WORKSLEEP, 0 ); + bid = BATTLE_Index2No( battleindex, defindex ); + //sprintf( szBuffer, "(%s)被击中跳了起来。\n", + // CHAR_getUseName( defindex ) ); + //BATTLE_BroadCast( battleindex, szBuffer, + // (bid >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + sprintf( szBuffer, "BM|%X|%X|", bid, 0 ); + strcat( szBadStatusString, szBuffer ); + } + return 0; +} + +static int BATTLE_AttackSeq( int attackindex, int defindex, int *pDamage, int *pGuardian, int opt ) +{ + int iRet = 0, perCri = 0; + int GuardianIndex = -1,battleindex; + + battleindex = CHAR_getWorkInt( attackindex, CHAR_WORKBATTLEINDEX ); + + // 主人打宠 + if( CHAR_getInt( defindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET + && BattleArray[battleindex].norisk == 0 + && BattleArray[battleindex].type == BATTLE_TYPE_P_vs_E){ + if( CHAR_getWorkInt( defindex, CHAR_WORKPLAYERINDEX ) == attackindex ){ + CHAR_PetAddVariableAi( defindex, AI_FIX_SEKKAN ); // 修正忠诚度 + } + } + + // 闪避 + if( opt != BATTLE_COM_COMBO ){ + if( BATTLE_DuckCheck( attackindex, defindex ) == TRUE ){ + return BATTLE_RET_DODGE; + } +#ifdef _SUIT_ADDPART3 + if( CHAR_getWorkInt( defindex, CHAR_WORKDUCKPOWER) > 0 ){ + if( rand()%100 < CHAR_getWorkInt( defindex, CHAR_WORKDUCKPOWER) ) + return BATTLE_RET_DODGE; + } +#endif + } + + // 检查被攻击方有无被别人用忠犬保护 + if( *pGuardian == -1 ){ + *pGuardian = BATTLE_GuardianCheck( attackindex, defindex ); + if( *pGuardian != -1 ){ + GuardianIndex = BATTLE_No2Index( battleindex, *pGuardian ); + defindex = GuardianIndex; + } + } + + // 会心一击 + perCri = BATTLE_CriticalCheck( attackindex, defindex ); + +#ifdef _PETSKILL_DAMAGETOHP + if( opt == BATTLE_COM_S_DAMAGETOHP2 ){ //暗月狂狼 (会心一击上升30%) && CHAR_getInt( attackindex, CHAR_HP) <= CHAR_getWorkInt( attackindex, CHAR_MAXMP)*0.5 + //print("\n1会心一击:%d",perCri); + //print("\n1攻:%d", CHAR_getWorkInt( attackindex, CHAR_WORKATTACKPOWER)); + //print("\n1敏:%d", CHAR_getWorkInt( attackindex, CHAR_WORKQUICK)); + perCri = perCri + (perCri*0.3); //会心一击上升30% + CHAR_setWorkInt( attackindex, CHAR_WORKATTACKPOWER, CHAR_getWorkInt( attackindex,CHAR_WORKFIXSTR)+CHAR_getWorkInt( attackindex,CHAR_WORKFIXSTR)*0.2);//攻上升20% + CHAR_setWorkInt( attackindex, CHAR_WORKQUICK, CHAR_getWorkInt( attackindex, CHAR_WORKFIXDEX)+CHAR_getWorkInt( attackindex, CHAR_WORKFIXDEX) *0.2 );//敏上升20% + //print("\n2会心一击:%d",perCri); + //print("\n2攻:%d", CHAR_getWorkInt( attackindex, CHAR_WORKATTACKPOWER)); + //print("\n2敏:%d", CHAR_getWorkInt( attackindex, CHAR_WORKQUICK)); + } +#endif + + gCriper = perCri; + if( RAND( 1, 10000 ) < perCri ){ + // WON ADD + int gWeponType = BATTLE_GetWepon( attackindex ); + if( gWeponType != ITEM_BOW ){ + (*pDamage) = BATTLE_CriDamageCalc( attackindex, defindex ); + }else{ + (*pDamage) = BATTLE_DamageCalc( attackindex, defindex ); + } + iRet = BATTLE_RET_CRITICAL; + if( CHAR_getInt( attackindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + // 勇士武器专精技能升级 + PROFESSION_SKILL_WEAPON_FOCUS_LVEVEL_UP( attackindex, "PROFESSION_WEAPON_FOCUS" ); + // 勇士二刀流技能升级 + PROFESSION_SKILL_DUAL_WEAPON_LVEVEL_UP( attackindex, "PROFESSION_DUAL_WEAPON" ); + } + }else{ + (*pDamage) = BATTLE_DamageCalc( attackindex, defindex ); + iRet = BATTLE_RET_NORMAL; + } + + if( opt == BATTLE_COM_S_GBREAK){ + ;; + }else +#ifdef _SKILL_GUARDBREAK2//破除防御2 vincent add 2002/05/20 + if( opt == BATTLE_COM_S_GBREAK2){ + if( CHAR_getWorkInt( defindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_GUARD){ + (*pDamage) = (*pDamage)*1.3; + }else{ + (*pDamage) = (*pDamage)*0.7; + } + }else +#endif + +#ifdef _PETSKILL_REGRET + if( opt == BATTLE_COM_S_REGRET2 ){// 人物伤害减少 + (*pDamage) = (*pDamage)*0.8; + }else +#endif +#ifdef _SONIC_ATTACK // WON ADD 音波攻击 + if( opt == BATTLE_COM_S_SONIC2 ){// 人物伤害减半 + (*pDamage) = (*pDamage)*0.5; + }else +#endif + if( CHAR_getWorkInt( defindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_GUARD + && CHAR_getWorkInt( defindex, CHAR_WORKCONFUSION ) <= 0 ){ + (*pDamage) = BATTLE_GuardAdjust( (*pDamage) ); + } + if( (*pDamage) < 1 ) (*pDamage) = RAND( 0, 1 ); + +#ifdef _PREVENT_TEAMATTACK // 防止同队互打 + if (CHAR_getInt( defindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER || + CHAR_getInt( defindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET ) { + int myside = CHAR_getWorkInt( defindex, CHAR_WORKBATTLESIDE);//attackindex + if( myside == CHAR_getWorkInt( attackindex, CHAR_WORKBATTLESIDE)){ + if( CHAR_getWorkInt( attackindex, CHAR_WORKCONFUSION) > 0 +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + || CHAR_getWorkInt( attackindex, CHAR_WORKINSTIGATE) > 0 // 挑拨 +#endif +#ifdef _PROFESSION_ADDSKILL + || CHAR_getWorkInt( attackindex, CHAR_WORKANNEX) > 0 //附身 +#endif + ){ //攻击方异常混乱 +#ifdef _PETSKILL_TEMPTATION + }else if( CHAR_getWorkInt( attackindex, CHAR_WORKTEMPTATION ) > 0 ){//水漾诱惑 +#endif + }else if( CHAR_getInt( attackindex, CHAR_WHICHTYPE) == CHAR_TYPEPET && + CHAR_getWorkInt( attackindex, CHAR_WORKBATTLEFLG) & CHAR_BATTLEFLG_AIBAD ){ //nono宠 + }else if( CHAR_getInt( defindex, CHAR_WHICHTYPE) == CHAR_TYPEPET && + CHAR_getWorkInt( defindex, CHAR_WORKPLAYERINDEX) == attackindex ){ // 自已宠物 + }else { + int myhp, mymaxhp; + mymaxhp = CHAR_getWorkInt( defindex, CHAR_WORKMAXHP); + myhp = CHAR_getInt( defindex, CHAR_HP ) - *pDamage; + mymaxhp = mymaxhp *0.40; + if( mymaxhp >= myhp || mymaxhp < 40 ){ + *pDamage = 0; + }else { + *pDamage = 1; + } + } + } + } +#endif + +#ifdef _EQUIT_ARRANGE + if( BATTLE_ArrangeCheck( attackindex, defindex) == TRUE ){ + *pDamage *= 0.1; + iRet = BATTLE_RET_ARRANGE; + + // 勇士格挡技能增加 + if( (CHAR_getInt( defindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER) ) + PROFESSION_SKILL_LVEVEL_UP( defindex, "PROFESSION_DEFLECT" ); + } +#endif + + if( (*pDamage) == 0 ){ + iRet = BATTLE_RET_MISS; + if( GuardianIndex != -1 ){ + iRet = BATTLE_RET_NORMAL; + *pDamage = 1; + }else if( CHAR_getWorkInt( defindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_GUARD + && CHAR_getWorkInt( defindex, CHAR_WORKCONFUSION ) <= 0 ){ + iRet = BATTLE_RET_ALLGUARD; + } + } + + (*pDamage) *= gBattleDamageModyfy; + return iRet; +} + +#ifdef _PETSKILL_SETDUCK +BOOL BATTLE_CheckMySkillDuck( int charaindex ) +{ + int SDuck=0,rad=0; + if( !CHAR_CHECKINDEX( charaindex) ) + return FALSE; + if( (SDuck=CHAR_getWorkInt( charaindex, CHAR_MYSKILLDUCK)) > 0 ){ + int duck1 = CHAR_getWorkInt( charaindex, CHAR_MYSKILLDUCKPOWER); + if( (rad = (rand()%100)) > duck1 ){ + return FALSE; + }else {//回避 + return TRUE; + } + } + return FALSE; +} +#endif + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 +int BATTLE_check_profession_duck( int charaindex, int per ) +{ + + int SDuck=0; + + if( (SDuck=CHAR_getWorkInt( charaindex, CHAR_WORK_P_DUCK)) > 0 ){ + int duck1 = CHAR_getWorkInt( charaindex, CHAR_WORKMOD_P_DUCK); + per = per * ( 100 + duck1 ) / 100; + } + + return per; +} +#endif + + +int BATTLE_GetDamageReact( int charaindex ) +{ + if( CHAR_getWorkInt( charaindex, CHAR_WORKDAMAGEVANISH ) > 0 ){ + return BATTLE_MD_VANISH; + } + if( CHAR_getWorkInt( charaindex, CHAR_WORKDAMAGEABSROB ) > 0 ){ + return BATTLE_MD_ABSROB; + } + if( CHAR_getWorkInt( charaindex, CHAR_WORKDAMAGEREFLEC ) > 0 ){ + return BATTLE_MD_REFLEC; + } + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + if( CHAR_getWorkInt( charaindex, CHAR_WORKTRAP ) > 0 ){ //陷阱 + return BATTLE_MD_TRAP; + } +#endif +#ifdef _PETSKILL_ACUPUNCTURE + if( CHAR_getWorkInt( charaindex, CHAR_WORKACUPUNCTURE ) > 0 ){ //针刺外皮 + //print("\n针刺:BATTLE_GetDamageReact"); + return BATTLE_MD_ACUPUNCTURE; + } +#endif + return 0; +} + +int BATTLE_DamageSub( int attackindex, int defindex, int *pDamage, int *pPetDamage, int *pRefrect ) +{ + + int hp = 0, addpoint = 0, maxhp, IsUltimate = 0, react, work, battleindex; + int damage, playerdamage, petdamage; + int attackpet, defpet; + int pethp = 0, petmaxhp = 0; + int defquick = 0, petquick = 0; + + damage = *pDamage; + petdamage = *pPetDamage; + playerdamage = damage; + if( damage <= 0 )return 0; + +#ifdef _PETSKILL_SHOWMERCY + if( CHAR_getInt( defindex, CHAR_HP ) - damage <= 0 + && CHAR_getWorkInt(attackindex, CHAR_WORKBATTLECOM1) == BATTLE_COM_S_SHOWMERCY ){ + damage = CHAR_getInt( defindex, CHAR_HP ) - 1; + *pDamage = damage; + playerdamage = damage; + } +#endif + + attackpet = BATTLE_getRidePet( attackindex ); + defpet = BATTLE_getRidePet( defindex ); + if( defpet != -1 ) { + defquick = CHAR_getWorkInt( defindex, CHAR_WORKDEFENCEPOWER ); + petquick = CHAR_getWorkInt( defpet, CHAR_WORKDEFENCEPOWER ); + } + + if( *pRefrect != -1 ){ + react = BATTLE_GetDamageReact( defindex ); + }else{ + react = BATTLE_MD_NONE; + } + battleindex = CHAR_getWorkInt( defindex, CHAR_WORKBATTLEINDEX ); + + if( react == BATTLE_MD_REFLEC ){ + if( BATTLE_IsThrowWepon( CHAR_getItemIndex( attackindex, CHAR_ARM ) ) == FALSE ){ + *pRefrect = BATTLE_MD_REFLEC; + }else{ + *pRefrect = BATTLE_MD_NONE; + } + }else{ + } + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + if( react == BATTLE_MD_TRAP ){ + if( BATTLE_IsThrowWepon( CHAR_getItemIndex( attackindex, CHAR_ARM ) ) == FALSE ) + *pRefrect = BATTLE_MD_TRAP; + else + *pRefrect = BATTLE_MD_NONE; + } +#endif + +#ifdef _PETSKILL_ACUPUNCTURE + if( react == BATTLE_MD_ACUPUNCTURE ){ + if( BATTLE_IsThrowWepon( CHAR_getItemIndex( attackindex, CHAR_ARM ) ) == FALSE ){ + *pRefrect = BATTLE_MD_ACUPUNCTURE; + }else{ + *pRefrect = BATTLE_MD_NONE; + } + } +#endif + + if( react == BATTLE_MD_ABSROB ){ + hp = CHAR_getInt( defindex, CHAR_HP ); + if( defpet == -1 ) { + hp += damage; + }else { + pethp = CHAR_getInt( defpet, CHAR_HP ); + playerdamage = (damage*petquick)/(defquick+petquick) +1 ; + petdamage = damage - playerdamage +1 ; + hp += playerdamage; + pethp += petdamage; + + } + work = CHAR_getWorkInt( defindex, CHAR_WORKDAMAGEABSROB ) - 1; + CHAR_setWorkInt( defindex, CHAR_WORKDAMAGEABSROB, max( work, 0 ) ); + *pRefrect = BATTLE_MD_ABSROB; + }else + if( *pRefrect == BATTLE_MD_REFLEC ){ +#ifdef _PETSKILL_BATTLE_MODEL + if(CHAR_getWorkInt(defindex,CHAR_NPCWORKINT1) == BATTLE_COM_S_BATTLE_MODEL){ + work = CHAR_getWorkInt( defindex, CHAR_WORKDAMAGEREFLEC ) - 1; + CHAR_setWorkInt( defindex, CHAR_WORKDAMAGEREFLEC, max( work, 0 ) ); + hp = CHAR_getInt(defindex,CHAR_HP); + pethp = CHAR_getInt(defpet,CHAR_HP); + } + else +#endif + { + hp = CHAR_getInt( attackindex, CHAR_HP ); + if( attackpet == -1 ) { + hp -= damage; + }else { + pethp = CHAR_getInt( attackpet, CHAR_HP ); + defquick = CHAR_getWorkInt( attackindex, CHAR_WORKDEFENCEPOWER ); + petquick = CHAR_getWorkInt( attackpet, CHAR_WORKDEFENCEPOWER ); + if( pethp > 0 ) { + playerdamage = (damage*petquick)/(defquick+petquick) +1; + petdamage = damage - playerdamage +1 ; + hp -= playerdamage; + pethp -= petdamage; + }else + hp -= damage; + } + work = CHAR_getWorkInt( defindex, CHAR_WORKDAMAGEREFLEC ) - 1; + CHAR_setWorkInt( defindex, CHAR_WORKDAMAGEREFLEC, max( work, 0 ) ); + defindex = attackindex; + defpet = attackpet; + } + }else +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + if( *pRefrect == BATTLE_MD_TRAP ){ //陷阱 +#ifdef _PETSKILL_BATTLE_MODEL + if(CHAR_getWorkInt(defindex,CHAR_NPCWORKINT1) == BATTLE_COM_S_BATTLE_MODEL){ + CHAR_setWorkInt( defindex, CHAR_WORKTRAP, 0 ); + CHAR_setWorkInt( defindex, CHAR_WORKMODTRAP, 0 ); + hp = CHAR_getInt(defindex,CHAR_HP); + pethp = CHAR_getInt(defpet,CHAR_HP); + } + else +#endif + { + int value=0; + value = CHAR_getWorkInt( defindex, CHAR_WORKMODTRAP ); + damage = value; + + playerdamage = damage; + + hp = CHAR_getInt( attackindex, CHAR_HP ); + if( attackpet == -1 ) { + hp -= damage; + }else { + pethp = CHAR_getInt( attackpet, CHAR_HP ); + defquick = CHAR_getWorkInt( attackindex, CHAR_WORKDEFENCEPOWER ); + petquick = CHAR_getWorkInt( attackpet, CHAR_WORKDEFENCEPOWER ); + if( pethp > 0 ) { + playerdamage = (damage*petquick)/(defquick+petquick) +1; + petdamage = damage - playerdamage +1 ; + hp -= playerdamage; + pethp -= petdamage; + }else + hp -= damage; + } + + CHAR_setWorkInt( defindex, CHAR_WORKTRAP, 0 ); + CHAR_setWorkInt( defindex, CHAR_WORKMODTRAP, 0 ); + + defindex = attackindex; + defpet = attackpet; + } + }else +#endif +#ifdef _PETSKILL_ACUPUNCTURE + if( *pRefrect == BATTLE_MD_ACUPUNCTURE ){ //针刺外皮 + + if( damage%2 != 0 ) + damage+=1; + playerdamage = damage; + + //先扣被攻击方的血,因为之後的动作都是对攻击方做的 + hp = CHAR_getInt( defindex, CHAR_HP ); + if( attackpet == -1 ) { + hp -= damage; + if(hp<0)hp=0; + maxhp = CHAR_getWorkInt( defindex, CHAR_WORKMAXHP ); + CHAR_setInt( defindex, CHAR_HP, min( hp, maxhp ) ); + }else { + pethp = CHAR_getInt( defpet, CHAR_HP ); + defquick = CHAR_getWorkInt( defindex, CHAR_WORKDEFENCEPOWER ); + petquick = CHAR_getWorkInt( defpet, CHAR_WORKDEFENCEPOWER ); + if( pethp > 0 ) { + playerdamage = (damage*petquick)/(defquick+petquick) +1; + petdamage = damage - playerdamage +1 ; + if(playerdamage%2 != 0) playerdamage+=1; + if(petdamage%2 != 0) petdamage+=1; + hp -= playerdamage; + pethp -= petdamage; + if(hp<0)hp=0; + maxhp = CHAR_getWorkInt( defindex, CHAR_WORKMAXHP ); + CHAR_setInt( defindex, CHAR_HP, min( hp, maxhp ) ); + if( pethp < 0 ) pethp = 0; + petmaxhp = CHAR_getWorkInt( defpet, CHAR_WORKMAXHP ); + CHAR_setInt( defpet, CHAR_HP, min( pethp, petmaxhp ) ); + }else{ + hp -= damage; + if(hp<0)hp=0; + maxhp = CHAR_getWorkInt( defindex, CHAR_WORKMAXHP ); + CHAR_setInt( defindex, CHAR_HP, min( hp, maxhp ) ); + } + } + + //Change 2003/08/22 + if( (damage) >= CHAR_getWorkInt( defindex, CHAR_WORKMAXHP ) * 1.2 + 20 ){ + int DefSide=0,i; + int defNo = BATTLE_Index2No( battleindex, defindex ); + CHAR_setWorkInt( defindex, CHAR_WORKULTIMATE, 0 ); + + //死亡的宠物改为休息 + if( defNo >= SIDE_OFFSET ){ + i = defNo - SIDE_OFFSET; + DefSide = 1; + }else{ + i = defNo; + } + i = defNo-DefSide*SIDE_OFFSET; + BattleArray[battleindex].Side[DefSide].Entry[i].flg |= BENT_FLG_ULTIMATE; + } + + //针刺外皮技能回合数设为0 + CHAR_setWorkInt( defindex, CHAR_WORKACUPUNCTURE, 0); + //if( CHAR_getWorkInt( defindex, CHAR_WORKSLEEP ) > 0 )//检查有无昏睡 + // CHAR_setWorkInt( defindex, CHAR_WORKSLEEP, 0); + +#ifdef _PETSKILL_BATTLE_MODEL + if(CHAR_getWorkInt(defindex,CHAR_NPCWORKINT1) != BATTLE_COM_S_BATTLE_MODEL) +#endif + { + //扣攻击方的血 + hp = CHAR_getInt( attackindex, CHAR_HP ); + if( attackpet == -1 ) { + hp -= damage/2; + }else { + pethp = CHAR_getInt( attackpet, CHAR_HP ); + defquick = CHAR_getWorkInt( attackindex, CHAR_WORKDEFENCEPOWER ); + petquick = CHAR_getWorkInt( attackpet, CHAR_WORKDEFENCEPOWER ); + if( pethp > 0 ) { + playerdamage = (damage*petquick)/(defquick+petquick) +1; + petdamage = damage - playerdamage +1 ; + if(playerdamage%2 != 0) playerdamage+=1; + if(petdamage%2 != 0) petdamage+=1; + hp -= playerdamage/2; + pethp -= petdamage/2; + }else + hp -= damage/2; + } + playerdamage /= 2; + + defindex = attackindex; + defpet = attackpet; + } + }else +#endif + if( react == BATTLE_MD_VANISH ){ + hp = CHAR_getInt( defindex, CHAR_HP ); + if( defpet != -1 ) + pethp = CHAR_getInt( defpet, CHAR_HP ); + work = CHAR_getWorkInt( defindex, CHAR_WORKDAMAGEVANISH ) - 1; + CHAR_setWorkInt( defindex, CHAR_WORKDAMAGEVANISH, max( work, 0 ) ); + *pRefrect = BATTLE_MD_VANISH; + //andy_log + print("*pRefrect = BATTLE_MD_VANISH !!\n"); + }else{ + hp = CHAR_getInt( defindex, CHAR_HP ); + if( defpet == -1 ) { + hp -= damage; + }else { + pethp = CHAR_getInt( defpet, CHAR_HP ); + if( pethp > 0 ) { + //andy_edit 2002/07/31 + defquick = defquick>0?defquick:1; + petquick = petquick>0?petquick:1; + playerdamage = (damage*petquick)/(defquick+petquick)+ 1; + //playerdamage = (damage*petquick)/(defquick+petquick) +1; + petdamage = damage - playerdamage +1; + hp -= playerdamage; + pethp -= petdamage; + //print(" def_damage:%d ridepet_damage:%d ", (damage*petquick)/(defquick+petquick), damage - playerdamage); + }else + hp -= damage; + } + *pRefrect = 0; + } + + if( hp < 0 ){ + addpoint = -hp; + hp = 0; + } + + + maxhp = CHAR_getWorkInt( defindex, CHAR_WORKMAXHP ); + CHAR_setInt( defindex, CHAR_HP, min( hp, maxhp ) ); + if( defpet != -1 ) { + if( pethp < 0 ) pethp = 0; + petmaxhp = CHAR_getWorkInt( defpet, CHAR_WORKMAXHP ); + CHAR_setInt( defpet, CHAR_HP, min( pethp, petmaxhp ) ); + // Robin 0804 + if( pethp <= 0 ) { + CHAR_setInt( defindex, CHAR_RIDEPET, -1 ); + BATTLE_changeRideImage( defindex ); + CHAR_setWorkInt( defindex, CHAR_WORKPETFALL, 1 ); + print(" defpet_die! "); + } + } + + if( (damage) >= maxhp * 1.2 + 20 ){ + IsUltimate = 2; + }else{ + if( addpoint > 0 ){ + addpoint += CHAR_getWorkInt( defindex, CHAR_WORKULTIMATE ); + CHAR_setWorkInt( defindex, CHAR_WORKULTIMATE, addpoint ); + if( addpoint >= maxhp * 1.2 + 20 )IsUltimate = 1; + } + } + + if( BattleArray[battleindex].type == BATTLE_TYPE_P_vs_P ){ + } +#ifdef _PETSKILL_LER +// 雷尔不能被打飞 + if(CHAR_getInt(defindex,CHAR_BASEBASEIMAGENUMBER) == 101813 || + CHAR_getInt(defindex,CHAR_BASEBASEIMAGENUMBER) == 101814) IsUltimate = 0; +#endif + + if( IsUltimate ){ + CHAR_setWorkInt( defindex, CHAR_WORKULTIMATE, 0 ); + } + if( playerdamage < 0 ) playerdamage = 0; + if( petdamage < 0 ) petdamage = 0; + *pDamage = playerdamage; + *pPetDamage = petdamage; + + return IsUltimate; +} + +#ifdef _PETSKILL_FIREKILL //火线猎杀专用 +int BATTLE_DamageSub_FIREKILL( int attackindex, int defindex, int *pDamage, int *pPetDamage, int *pRefrect ) +{ + + int hp, addpoint = 0, maxhp, IsUltimate = 0, react, work, battleindex; + int damage, playerdamage, petdamage; + int attackpet, defpet; + int pethp = 0, petmaxhp = 0; + int defquick = 0, petquick = 0; + damage = *pDamage; + petdamage = *pPetDamage; + playerdamage = damage; + if( damage <= 0 )return 0; + + attackpet = BATTLE_getRidePet( attackindex ); + defpet = BATTLE_getRidePet( defindex ); + if( defpet != -1 ) { + defquick = CHAR_getWorkInt( defindex, CHAR_WORKDEFENCEPOWER ); + petquick = CHAR_getWorkInt( defpet, CHAR_WORKDEFENCEPOWER ); + } + + if( *pRefrect != -1 ){ + react = BATTLE_GetDamageReact( defindex ); + }else{ + react = BATTLE_MD_NONE; + } + + react = BATTLE_MD_NONE; + + battleindex = CHAR_getWorkInt( defindex, CHAR_WORKBATTLEINDEX ); + + if( react == BATTLE_MD_REFLEC ){ + if( BATTLE_IsThrowWepon( CHAR_getItemIndex( attackindex, CHAR_ARM ) ) == FALSE ){ + *pRefrect = BATTLE_MD_REFLEC; + }else{ + *pRefrect = BATTLE_MD_NONE; + } + }else{ + } + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + if( react == BATTLE_MD_TRAP ){ + if( BATTLE_IsThrowWepon( CHAR_getItemIndex( attackindex, CHAR_ARM ) ) == FALSE ) + *pRefrect = BATTLE_MD_TRAP; + else + *pRefrect = BATTLE_MD_NONE; + } +#endif + +#ifdef _PETSKILL_ACUPUNCTURE + if( react == BATTLE_MD_ACUPUNCTURE ){ + if( BATTLE_IsThrowWepon( CHAR_getItemIndex( attackindex, CHAR_ARM ) ) == FALSE ){ + *pRefrect = BATTLE_MD_ACUPUNCTURE; + }else{ + *pRefrect = BATTLE_MD_NONE; + } + } +#endif + + if( react == BATTLE_MD_ABSROB ){ + hp = CHAR_getInt( defindex, CHAR_HP ); + if( defpet == -1 ) { + hp += damage; + }else { + pethp = CHAR_getInt( defpet, CHAR_HP ); + playerdamage = (damage*petquick)/(defquick+petquick) +1 ; + petdamage = damage - playerdamage +1 ; + hp += playerdamage; + pethp += petdamage; + + } + work = CHAR_getWorkInt( defindex, CHAR_WORKDAMAGEABSROB ) - 1; + CHAR_setWorkInt( defindex, CHAR_WORKDAMAGEABSROB, max( work, 0 ) ); + *pRefrect = BATTLE_MD_ABSROB; + }else + if( *pRefrect == BATTLE_MD_REFLEC ){ + hp = CHAR_getInt( attackindex, CHAR_HP ); + if( attackpet == -1 ) { + hp -= damage; + }else { + pethp = CHAR_getInt( attackpet, CHAR_HP ); + defquick = CHAR_getWorkInt( attackindex, CHAR_WORKDEFENCEPOWER ); + petquick = CHAR_getWorkInt( attackpet, CHAR_WORKDEFENCEPOWER ); + if( pethp > 0 ) { + playerdamage = (damage*petquick)/(defquick+petquick) +1; + petdamage = damage - playerdamage +1 ; + hp -= playerdamage; + pethp -= petdamage; + }else + hp -= damage; + } + work = CHAR_getWorkInt( defindex, CHAR_WORKDAMAGEREFLEC ) - 1; + CHAR_setWorkInt( defindex, CHAR_WORKDAMAGEREFLEC, max( work, 0 ) ); + defindex = attackindex; + defpet = attackpet; + + }else +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + if( *pRefrect == BATTLE_MD_TRAP ){ //陷阱 + int value=0; + value = CHAR_getWorkInt( defindex, CHAR_WORKMODTRAP ); + damage = value; + + playerdamage = damage; + + hp = CHAR_getInt( attackindex, CHAR_HP ); + if( attackpet == -1 ) { + hp -= damage; + }else { + pethp = CHAR_getInt( attackpet, CHAR_HP ); + defquick = CHAR_getWorkInt( attackindex, CHAR_WORKDEFENCEPOWER ); + petquick = CHAR_getWorkInt( attackpet, CHAR_WORKDEFENCEPOWER ); + if( pethp > 0 ) { + playerdamage = (damage*petquick)/(defquick+petquick) +1; + petdamage = damage - playerdamage +1 ; + hp -= playerdamage; + pethp -= petdamage; + }else + hp -= damage; + } + + CHAR_setWorkInt( defindex, CHAR_WORKTRAP, 0 ); + CHAR_setWorkInt( defindex, CHAR_WORKMODTRAP, 0 ); + + defindex = attackindex; + defpet = attackpet; + + }else +#endif +#ifdef _PETSKILL_ACUPUNCTURE + if( *pRefrect == BATTLE_MD_ACUPUNCTURE ){ //针刺外皮 + + if( damage%2 != 0 ) + damage+=1; + playerdamage = damage; + + //先扣被攻击方的血,因为之後的动作都是对攻击方做的 + hp = CHAR_getInt( defindex, CHAR_HP ); + if( attackpet == -1 ) { + hp -= damage; + if(hp<0)hp=0; + maxhp = CHAR_getWorkInt( defindex, CHAR_WORKMAXHP ); + CHAR_setInt( defindex, CHAR_HP, min( hp, maxhp ) ); + }else { + pethp = CHAR_getInt( defpet, CHAR_HP ); + defquick = CHAR_getWorkInt( defindex, CHAR_WORKDEFENCEPOWER ); + petquick = CHAR_getWorkInt( defpet, CHAR_WORKDEFENCEPOWER ); + if( pethp > 0 ) { + playerdamage = (damage*petquick)/(defquick+petquick) +1; + petdamage = damage - playerdamage +1 ; + if(playerdamage%2 != 0) playerdamage+=1; + if(petdamage%2 != 0) petdamage+=1; + hp -= playerdamage; + pethp -= petdamage; + if(hp<0)hp=0; + maxhp = CHAR_getWorkInt( defindex, CHAR_WORKMAXHP ); + CHAR_setInt( defindex, CHAR_HP, min( hp, maxhp ) ); + if( pethp < 0 ) pethp = 0; + petmaxhp = CHAR_getWorkInt( defpet, CHAR_WORKMAXHP ); + CHAR_setInt( defpet, CHAR_HP, min( pethp, petmaxhp ) ); + }else{ + hp -= damage; + if(hp<0)hp=0; + maxhp = CHAR_getWorkInt( defindex, CHAR_WORKMAXHP ); + CHAR_setInt( defindex, CHAR_HP, min( hp, maxhp ) ); + } + } + + //Change 2003/08/22 + if( (damage) >= CHAR_getWorkInt( defindex, CHAR_WORKMAXHP ) * 1.2 + 20 ){ + int DefSide=0,i; + int defNo = BATTLE_Index2No( battleindex, defindex ); + CHAR_setWorkInt( defindex, CHAR_WORKULTIMATE, 0 ); + + //死亡的宠物改为休息 + if( defNo >= SIDE_OFFSET ){ + i = defNo - SIDE_OFFSET; + DefSide = 1; + }else{ + i = defNo; + } + i = defNo-DefSide*SIDE_OFFSET; + BattleArray[battleindex].Side[DefSide].Entry[i].flg |= BENT_FLG_ULTIMATE; + } + + //针刺外皮技能回合数设为0 + CHAR_setWorkInt( defindex, CHAR_WORKACUPUNCTURE, 0); + //if( CHAR_getWorkInt( defindex, CHAR_WORKSLEEP ) > 0 )//检查有无昏睡 + // CHAR_setWorkInt( defindex, CHAR_WORKSLEEP, 0); + + //扣攻击方的血 + hp = CHAR_getInt( attackindex, CHAR_HP ); + if( attackpet == -1 ) { + hp -= damage/2; + }else { + pethp = CHAR_getInt( attackpet, CHAR_HP ); + defquick = CHAR_getWorkInt( attackindex, CHAR_WORKDEFENCEPOWER ); + petquick = CHAR_getWorkInt( attackpet, CHAR_WORKDEFENCEPOWER ); + if( pethp > 0 ) { + playerdamage = (damage*petquick)/(defquick+petquick) +1; + petdamage = damage - playerdamage +1 ; + if(playerdamage%2 != 0) playerdamage+=1; + if(petdamage%2 != 0) petdamage+=1; + hp -= playerdamage/2; + pethp -= petdamage/2; + }else + hp -= damage/2; + } + + playerdamage /= 2; + + defindex = attackindex; + defpet = attackpet; + + }else +#endif + if( react == BATTLE_MD_VANISH ){ + hp = CHAR_getInt( defindex, CHAR_HP ); + if( defpet != -1 ) + pethp = CHAR_getInt( defpet, CHAR_HP ); + work = CHAR_getWorkInt( defindex, CHAR_WORKDAMAGEVANISH ) - 1; + CHAR_setWorkInt( defindex, CHAR_WORKDAMAGEVANISH, max( work, 0 ) ); + *pRefrect = BATTLE_MD_VANISH; + //andy_log + print("*pRefrect = BATTLE_MD_VANISH !!\n"); + }else{ + hp = CHAR_getInt( defindex, CHAR_HP ); + if( defpet == -1 ) { + hp -= damage; + }else { + pethp = CHAR_getInt( defpet, CHAR_HP ); + if( pethp > 0 ) { + //andy_edit 2002/07/31 + defquick = defquick>0?defquick:1; + petquick = petquick>0?petquick:1; + playerdamage = (damage*petquick)/(defquick+petquick)+ 1; + //playerdamage = (damage*petquick)/(defquick+petquick) +1; + petdamage = damage - playerdamage +1; + hp -= playerdamage; + pethp -= petdamage; + //print(" def_damage:%d ridepet_damage:%d ", (damage*petquick)/(defquick+petquick), damage - playerdamage); + }else + hp -= damage; + } + *pRefrect = 0; + } + if( hp < 0 ){ + addpoint = -hp; + hp = 0; + } + + maxhp = CHAR_getWorkInt( defindex, CHAR_WORKMAXHP ); + CHAR_setInt( defindex, CHAR_HP, min( hp, maxhp ) ); + if( defpet != -1 ) { + if( pethp < 0 ) pethp = 0; + petmaxhp = CHAR_getWorkInt( defpet, CHAR_WORKMAXHP ); + CHAR_setInt( defpet, CHAR_HP, min( pethp, petmaxhp ) ); + // Robin 0804 + if( pethp <= 0 ) { + CHAR_setInt( defindex, CHAR_RIDEPET, -1 ); + BATTLE_changeRideImage( defindex ); + CHAR_setWorkInt( defindex, CHAR_WORKPETFALL, 1 ); + print(" defpet_die! "); + } + } + + if( (damage) >= maxhp * 1.2 + 20 ){ + IsUltimate = 2; + }else{ + if( addpoint > 0 ){ + addpoint += CHAR_getWorkInt( defindex, CHAR_WORKULTIMATE ); + CHAR_setWorkInt( defindex, CHAR_WORKULTIMATE, addpoint ); + if( addpoint >= maxhp * 1.2 + 20 )IsUltimate = 1; + } + } + + if( BattleArray[battleindex].type == BATTLE_TYPE_P_vs_P ){ + } + +#ifdef _PETSKILL_LER +// 雷尔不能被打飞 + if(CHAR_getInt(defindex,CHAR_BASEBASEIMAGENUMBER) == 101813 || + CHAR_getInt(defindex,CHAR_BASEBASEIMAGENUMBER) == 101814) IsUltimate = 0; +#endif + + if( IsUltimate ){ + CHAR_setWorkInt( defindex, CHAR_WORKULTIMATE, 0 ); + } + if( playerdamage < 0 ) playerdamage = 0; + if( petdamage < 0 ) petdamage = 0; + *pDamage = playerdamage; + *pPetDamage = petdamage; + + return IsUltimate; +} +#endif + + +// Robin 0910 RidePetDebug +int BATTLE_DamageSub2( int attackindex, int defindex, int *pDamage, int *pPetDamage, int *pRefrect ) +{ + + int hp, addpoint = 0, maxhp, IsUltimate = 0, react, work, battleindex; + int damage, playerdamage, petdamage; + int attackpet, defpet; + int pethp = 0, petmaxhp = 0; + + damage = *pDamage; + petdamage = *pPetDamage; + playerdamage = *pDamage; + + if( damage <= 0 )return 0; + + attackpet = BATTLE_getRidePet( attackindex ); + defpet = BATTLE_getRidePet( defindex ); + + if( *pRefrect != -1 ){ + react = BATTLE_GetDamageReact( defindex ); + }else{ + react = BATTLE_MD_NONE; + } + + if( react == BATTLE_MD_REFLEC ){ + if( BATTLE_IsThrowWepon( CHAR_getItemIndex( attackindex, CHAR_ARM ) ) == FALSE ){ + *pRefrect = BATTLE_MD_REFLEC; + }else{ + *pRefrect = BATTLE_MD_NONE; + } + } + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + if( react == BATTLE_MD_TRAP ){ + if( BATTLE_IsThrowWepon( CHAR_getItemIndex( attackindex, CHAR_ARM ) ) == FALSE ) + *pRefrect = BATTLE_MD_TRAP; + else + *pRefrect = BATTLE_MD_NONE; + } +#endif + + if( react == BATTLE_MD_ABSROB ){ + + hp = CHAR_getInt( defindex, CHAR_HP ); + hp += playerdamage; + if( defpet != -1 ) { + pethp = CHAR_getInt( defpet, CHAR_HP ); + pethp += petdamage; + } + + work = CHAR_getWorkInt( defindex, CHAR_WORKDAMAGEABSROB ) - 1; + CHAR_setWorkInt( defindex, CHAR_WORKDAMAGEABSROB, max( work, 0 ) ); + + *pRefrect = BATTLE_MD_ABSROB; + + }else + if( *pRefrect == BATTLE_MD_REFLEC ){ + + hp = CHAR_getInt( attackindex, CHAR_HP ); + hp -= playerdamage; + if( attackpet != -1 ) { + pethp = CHAR_getInt( attackpet, CHAR_HP ); + if( pethp > 0 ) { + pethp -= petdamage; + } + } + + work = CHAR_getWorkInt( defindex, CHAR_WORKDAMAGEREFLEC ) - 1; + CHAR_setWorkInt( defindex, CHAR_WORKDAMAGEREFLEC, max( work, 0 ) ); + + defindex = attackindex; + defpet = attackpet; + + }else +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + if( *pRefrect == BATTLE_MD_TRAP ){ //陷阱 + + hp = CHAR_getInt( attackindex, CHAR_HP ); + hp -= playerdamage; + if( attackpet != -1 ) { + pethp = CHAR_getInt( attackpet, CHAR_HP ); + if( pethp > 0 ) { + pethp -= petdamage; + } + } + + CHAR_setWorkInt( defindex, CHAR_WORKTRAP, 0 ); + CHAR_setWorkInt( defindex, CHAR_WORKMODTRAP, 0 ); + + defindex = attackindex; + defpet = attackpet; + + }else +#endif + if( react == BATTLE_MD_VANISH ){ + hp = CHAR_getInt( defindex, CHAR_HP ); + if( defpet != -1 ) + pethp = CHAR_getInt( defpet, CHAR_HP ); + + work = CHAR_getWorkInt( defindex, CHAR_WORKDAMAGEVANISH ) - 1; + CHAR_setWorkInt( defindex, CHAR_WORKDAMAGEVANISH, max( work, 0 ) ); + + *pRefrect = BATTLE_MD_VANISH; + + }else{ + hp = CHAR_getInt( defindex, CHAR_HP ); + hp -= playerdamage; + if( defpet != -1 ){ + pethp = CHAR_getInt( defpet, CHAR_HP ); + if( pethp > 0 ) { + pethp -= petdamage; + //print(" def_damage:%d ridepet_damage:%d ", (damage*petquick)/(defquick+petquick), damage - playerdamage); + } + } + *pRefrect = 0; + } + + if( hp < 0 ){ + addpoint = -hp; + hp = 0; + } + + maxhp = CHAR_getWorkInt( defindex, CHAR_WORKMAXHP ); + + CHAR_setInt( defindex, CHAR_HP, min( hp, maxhp ) ); + + + if( defpet != -1 ) { + if( pethp < 0 ) pethp = 0; + petmaxhp = CHAR_getWorkInt( defpet, CHAR_WORKMAXHP ); + CHAR_setInt( defpet, CHAR_HP, min( pethp, petmaxhp ) ); + + // Robin 0804 + if( pethp <= 0 ) { + CHAR_setInt( defindex, CHAR_RIDEPET, -1 ); + BATTLE_changeRideImage( defindex ); + CHAR_setWorkInt( defindex, CHAR_WORKPETFALL, 1 ); + print(" defpet_die! "); + } + } + + if( (damage) >= maxhp * 1.2 + 20 ){ + IsUltimate = 2; + }else{ + if( addpoint > 0 ){ + addpoint += CHAR_getWorkInt( defindex, CHAR_WORKULTIMATE ); + CHAR_setWorkInt( defindex, CHAR_WORKULTIMATE, addpoint ); + if( addpoint >= maxhp * 1.2 + 20 )IsUltimate = 1; + } + } + + battleindex = CHAR_getWorkInt( defindex, CHAR_WORKBATTLEINDEX ); + if( BattleArray[battleindex].type == BATTLE_TYPE_P_vs_P ){ + } +#ifdef _PETSKILL_LER +// 雷尔不能被打飞 + if(CHAR_getInt(defindex,CHAR_BASEBASEIMAGENUMBER) == 101813 || + CHAR_getInt(defindex,CHAR_BASEBASEIMAGENUMBER) == 101814) IsUltimate = 0; +#endif + + if( IsUltimate ){ + CHAR_setWorkInt( defindex, CHAR_WORKULTIMATE, 0 ); + } + + //*pDamage = damage; + *pDamage = playerdamage; + *pPetDamage = petdamage; + + return IsUltimate; +} + + + +void BATTLE_DamageSubCale( + int attackindex, + int defindex, + int *pDamage, + int *pPetDamage +) +{ + int pethp; + int damage, playerdamage, petdamage; + int attackpet, defpet; + int defquick = 0, petquick = 0; + + damage = *pDamage; + petdamage = *pPetDamage; + playerdamage = damage; + + attackpet = BATTLE_getRidePet( attackindex ); + defpet = BATTLE_getRidePet( defindex ); + + defquick = CHAR_getWorkInt( defindex, CHAR_WORKDEFENCEPOWER ); + defquick = ( defquick < 1)?1:defquick; + if( defpet != -1 ) { + petquick = CHAR_getWorkInt( defpet, CHAR_WORKDEFENCEPOWER ); + petquick = ( petquick < 1)?1:petquick; + + pethp = CHAR_getInt( defpet, CHAR_HP ); + if( pethp > 0 ) { + playerdamage = (damage*petquick)/(defquick+petquick); + petdamage = damage - playerdamage; + if( damage > 0 && playerdamage < 1 ) + playerdamage = 1; + } + } + + *pDamage = playerdamage; + *pPetDamage = petdamage; + +} + +int BATTLE_Attack( int battleindex, int attackNo, int defNo ) +{ + char szBuffer[512]=""; + char szCommand[1024]; + int damage = 0, petdamage = 0, attackindex, toindex, ultimate = 0, + defindex, react = 0, statusDefNo, opt = 0; + int flg = 0, iWork, par, perStatus, i, DefSide = 0, Guardian = -1; + BOOL iRet = TRUE; + int suitpoison=30;//基本中毒% + + attackindex = BATTLE_No2Index( battleindex, attackNo ); + defindex = toindex = BATTLE_No2Index( battleindex, defNo ); + if( CHAR_CHECKINDEX( attackindex ) == FALSE ) return FALSE; + if( CHAR_CHECKINDEX( defindex ) == FALSE ) return FALSE; + + +#ifdef _PETSKILL_RETRACE + Battle_Attack_ReturnData_x.Battle_Attack_ReturnData = 0; +#endif + + if( gWeponType == ITEM_BOW ){ + if( toindex < 0 || CHAR_getInt( toindex, CHAR_HP ) <= 0 ){ + snprintf( szCommand, sizeof( szCommand ), "r%X|f0|d0|", defNo ); + BATTLESTR_ADD( szCommand ); + return FALSE; + } + } + + if( CHAR_getInt( toindex, CHAR_HP ) <= 0 ) return FALSE; + + if( CHAR_getInt( attackindex, CHAR_HP ) <= 0 ) return FALSE; + + // 光、镜、守 + if( BATTLE_GetDamageReact( attackindex ) > 0 ) iRet = FALSE; + else if( BATTLE_GetDamageReact( defindex ) > 0 ) iRet = FALSE; + + // 攻击模式 + iWork = BATTLE_AttackSeq( attackindex, toindex, &damage, &Guardian, opt ); + + if( Guardian >= 0 ) + defindex = BATTLE_No2Index( battleindex, Guardian ); + + if( gDamageDiv != 0.0 && damage > 0 ){ + damage /= gDamageDiv; + if( damage <= 0 ) damage = 1; + } + + par = BATTLE_AttrAdjust( attackindex, defindex, 100 ); + react = 0; + + ultimate = BATTLE_DamageSub( attackindex, defindex, &damage, &petdamage, &react ); + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + if( react == BATTLE_MD_TRAP ){ + defindex = attackindex; + statusDefNo = attackNo; + } +#endif +#ifdef _PETSKILL_ACUPUNCTURE + if( react == BATTLE_MD_ACUPUNCTURE ){ + defindex = attackindex; + statusDefNo = attackNo; + } +#endif + if( react == BATTLE_MD_REFLEC ){ + defindex = attackindex; + statusDefNo = attackNo; + }else{ + if( 0 <= Guardian && Guardian <= 19 ){ + statusDefNo = Guardian; + }else{ + statusDefNo = defNo; + } + } + +#ifdef _PETSKILL_ACUPUNCTURE + if( react == BATTLE_MD_ACUPUNCTURE ){ //针刺外皮时会无法正常解除被打方的状态,所以把index换回来 + defindex = toindex = BATTLE_No2Index( battleindex, defNo ); + statusDefNo = defNo; + } +#endif + + //昏睡时,在这里解除状态(也有其它的状态) + if( damage > 0 && ( react != BATTLE_MD_ABSROB ) && ( react != BATTLE_MD_VANISH ) ){ + BATTLE_DamageWakeUp( battleindex, defindex ); + } + +#ifdef _PETSKILL_ACUPUNCTURE + if( react == BATTLE_MD_ACUPUNCTURE ){ + defindex = attackindex; + statusDefNo = attackNo; + } +#endif + + switch( iWork ){ + case BATTLE_RET_ALLGUARD: + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)朝向(%s)攻击,轻易地被躲开。", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ) + //); + flg |= BCF_NORMAL; +#ifdef _PETSKILL_RETRACE + Battle_Attack_ReturnData_x.Battle_Attack_ReturnData = BATTLE_RET_ALLGUARD; +#endif + break; + case BATTLE_RET_MISS: + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)朝向(%s)攻击,没击中。", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ) + //); +#ifdef _PETSKILL_RETRACE + Battle_Attack_ReturnData_x.Battle_Attack_ReturnData = BATTLE_RET_MISS; +#endif + break; + case BATTLE_RET_DODGE: + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)攻击了(%s)躲开了(%.2f%%)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ), + // gDuckPer + //); + flg |= BCF_DODGE; +#ifdef _PETSKILL_RETRACE + Battle_Attack_ReturnData_x.Battle_Attack_ReturnData = BATTLE_RET_DODGE; +#endif + break; + case BATTLE_RET_NORMAL: + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)受到(%s)的攻击(%d)遭受损伤(%d:%d:%d%%)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ), + // damage, + // CHAR_getWorkInt( attackindex, CHAR_WORKATTACKPOWER ), + // CHAR_getWorkInt( defindex, CHAR_WORKDEFENCEPOWER ), + // par + //); + //andy_edit + flg |= BATTLE_getReactFlg( defindex, react); + flg |= BCF_NORMAL; + break; + case BATTLE_RET_CRITICAL: + //snprintf( szBuffer, sizeof(szBuffer), + //"(%s)向(%s)CRITICAL(%d%%)(%d)不可以(%d:%d:%d%%)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ), + // (int)(gCriper*0.01), + // damage, + // CHAR_getWorkInt( attackindex, CHAR_WORKATTACKPOWER ), + // CHAR_getWorkInt( defindex, CHAR_WORKDEFENCEPOWER ), + // par + //); + //andy_edit + flg |= BATTLE_getReactFlg( defindex, react); + flg |= BCF_KAISHIN; + iRet = FALSE; + break; +#ifdef _EQUIT_ARRANGE + case BATTLE_RET_ARRANGE: + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)攻击了(%s)挡掉了(%.2f%%)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ), + // gDuckPer + //); + flg |= BCF_B_ARRANGE; +#ifdef _PETSKILL_RETRACE + Battle_Attack_ReturnData_x.Battle_Attack_ReturnData = BATTLE_RET_ARRANGE; +#endif + break; +#endif + } + + + if( CHAR_getWorkInt( defindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_GUARD + && CHAR_getWorkInt( defindex, CHAR_WORKCONFUSION ) <= 0){ + strncat( szBuffer, "(GUARD)", sizeof( szBuffer ) ); + flg |= BCF_GUARD; + iRet = FALSE; + } + + if( CHAR_getInt( defindex, CHAR_HP ) <= 0 ){ + if( CHAR_getWorkInt( defindex, CHAR_WORKBATTLEFLG ) & CHAR_BATTLEFLG_ABIO ){ + ultimate = 1; + }else if( CHAR_getInt( defindex, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER && flg & BCF_KAISHIN ){ + if( RAND( 1, 100 ) < 50 ){ + ultimate = 1; + } + } + +#ifdef _PETSKILL_LER +// 雷尔不能被打飞 + if(CHAR_getInt(defindex,CHAR_BASEBASEIMAGENUMBER) == 101813 || + CHAR_getInt(defindex,CHAR_BASEBASEIMAGENUMBER) == 101814) ultimate = 0; +#endif + iRet = FALSE; + flg |= BCF_DEATH; + + if( ultimate == 1 ){ + flg |= BCF_ULTIMATE_1; + strcat( szBuffer, "ultimate嘆" ); + } + if( ultimate == 2 ){ + flg |= BCF_ULTIMATE_2; + strcat( szBuffer, "ultimate嘇" ); + } + } + + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + + +#ifdef _PETSKILL_ACUPUNCTURE + if( react == BATTLE_MD_ACUPUNCTURE ){ //针刺外皮不会反射特殊状态,所以要改回来 + defindex = toindex = BATTLE_No2Index( battleindex, defNo ); + statusDefNo = defNo; + } + //注意:之後要不要再改回原本反射.......???? +#endif + +#ifdef _SUIT_ADDPART4 + if( gBattleStausChange == -1 && CHAR_getWorkInt( attackindex, CHAR_SUITPOISON ) > 0 )//带毒装备 + gBattleStausChange = 1,gBattleStausTurn = 3, suitpoison=CHAR_getWorkInt( attackindex, CHAR_SUITPOISON ); +#endif + + if( damage > 0 && gBattleStausChange >= 0 ){ + if( BATTLE_StatusAttackCheck( + attackindex, + defindex, + gBattleStausChange, + suitpoison, + 40, + 2.0, + &perStatus + ) == TRUE + ){ + CHAR_setWorkInt( defindex, StatusTbl[gBattleStausChange], + gBattleStausTurn + 1 ); + + if( gBattleStausChange == BATTLE_ST_DRUNK ){ + CHAR_setWorkInt( defindex, CHAR_WORKDRUNK, + CHAR_getWorkInt( defindex, CHAR_WORKDRUNK ) / 2 ); + } + +#ifdef _PET_SKILL_SARS // WON ADD 毒煞蔓延 + if( gBattleStausChange == BATTLE_ST_SARS ){ + CHAR_setWorkInt( defindex, CHAR_WORKMODSARS, 1); + } +#endif + + if( gBattleStausChange == BATTLE_ST_PARALYSIS + || gBattleStausChange == BATTLE_ST_SLEEP + || gBattleStausChange == BATTLE_ST_STONE + || gBattleStausChange == BATTLE_ST_BARRIER + ){ + CHAR_setWorkInt( defindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + } + + //snprintf( szBuffer, sizeof(szBuffer), + //"(%s)变成(%s)(%d%%)", + // CHAR_getUseName( defindex ), + // aszStatusFull[gBattleStausChange], + // perStatus + //); + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + + BATTLE_BadStatusString( statusDefNo, gBattleStausChange ); + }else{ + //snprintf( szBuffer, sizeof(szBuffer), + //"(%s)无法成功\(%d%%)", + // aszStatusFull[gBattleStausChange], + // perStatus ); + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + } + } +#ifdef _SHOOTCHESTNUT // Syu ADD 宠技:丢栗子 + if ( ( damage > 0 ) && ( CHAR_getWorkInt( attackindex , CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_ATTSHOOT ) ) { + if ( RAND ( 1 , 5 ) > 4 ) { + CHAR_setWorkInt( defindex, CHAR_WORKSLEEP , 3 ); //设定昏睡 + CHAR_setWorkInt( defindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE );//因为设定了昏睡,所以设定无动作 + } + } +#endif + if( damage > 0 ){ +#ifdef _TAKE_ITEMDAMAGE + if( BATTLE_ItemCrushSeq( attackindex, defindex, damage) == TRUE ){ +#else + if( BATTLE_ItemCrushSeq( defindex ) == TRUE ){ +#endif + flg |= BCF_CRUSH; + } + } + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + if( damage > 0 && (CHAR_getInt(attackindex, CHAR_WHICHTYPE)== CHAR_TYPEPLAYER) ){ + int i; + // 检查火、冰、雷附体 + for( i=0; i<3; i++ ){ + int turn = 0, status = -1; + + turn = CHAR_getWorkInt( attackindex, CHAR_WORK_F_ENCLOSE_2+i ); + + if( turn > 0 ){ + int skill_type = CHAR_getWorkInt( attackindex, CHAR_WORKBATTLECOM1 ); + int perStatus = 0, j = 0; + int skill_level = CHAR_getWorkInt( attackindex, CHAR_WORKMOD_F_ENCLOSE_2+i ); + char pszP[3][10] = { "烧","霜","电" }; + int img1 = 101697, img2 = 101698 + i; + + // 状态 + for( j = 1; j < BATTLE_ST_END; j ++ ){ + if( strncmp( pszP[i], aszStatus[j], 2 ) == 0 ){ + status = j; + break; + } + } + + // 命中率 + perStatus = 20 + skill_level * 2; + + // 回合数 + if( skill_level >= 10 ) turn = 3; + else if( skill_level >= 5 ) turn = 2; + else turn = 1; + + // 雷附体一回合数 + if( i == 2 ) turn = 1; + + // 火、冰、雷附体附加攻击 +// Terry add fix 忠犬bug + if(Guardian >= 0) iRet = BATTLE_PROFESSION_RANG_ATTACK_DAMAGE(attackindex, attackNo, Guardian, skill_type, status, turn, perStatus, 0, img1, img2 ); + else iRet = BATTLE_PROFESSION_RANG_ATTACK_DAMAGE(attackindex, attackNo, defNo, skill_type, status, turn, perStatus, 0, img1, img2 ); + + break; + } + } + } +#endif + + + if( 0 <= Guardian && Guardian <= 19 ){ + iRet = FALSE; + flg |= BCF_GUARDIAN; + snprintf( szCommand, sizeof( szCommand ), + "r%X|f%X|d%X|p%X|g%X|", + defNo, + flg, + damage, + petdamage, + Guardian ); + }else{ + snprintf( szCommand, sizeof( szCommand ), + "r%X|f%X|d%X|p%X|", + defNo, + flg, + damage, + petdamage ); + } + + BATTLESTR_ADD( szCommand ); + + defNo = BATTLE_Index2No( battleindex, defindex ); + + if( defNo >= SIDE_OFFSET ){ + i = defNo - SIDE_OFFSET; + DefSide = 1; + }else{ + i = defNo; + } + + i = defNo-DefSide*SIDE_OFFSET; + if( ultimate > 0 ){ + BattleArray[battleindex].Side[DefSide].Entry[i].flg |= BENT_FLG_ULTIMATE; + } + return iRet; + +} + +#ifdef _PETSKILL_FIREKILL +int BATTLE_Attack_FIREKILL( int battleindex, int attackNo, int defNo ) +{ + char szBuffer[512]=""; + char szCommand[1024]; + int damage = 0, petdamage = 0, attackindex, toindex, ultimate = 0, + defindex, react = 0, statusDefNo, opt = 0; + int flg = 0, iWork, par, perStatus, i, DefSide = 0, Guardian = -1; + BOOL iRet = TRUE; + + attackindex = BATTLE_No2Index( battleindex, attackNo ); + defindex = toindex = BATTLE_No2Index( battleindex, defNo ); + if( CHAR_CHECKINDEX( attackindex ) == FALSE ) return FALSE; + if( CHAR_CHECKINDEX( defindex ) == FALSE ) return FALSE; + + +#ifdef _PETSKILL_RETRACE + Battle_Attack_ReturnData_x.Battle_Attack_ReturnData = 0; +#endif + + if( gWeponType == ITEM_BOW ){ + if( toindex < 0 || CHAR_getInt( toindex, CHAR_HP ) <= 0 ){ + snprintf( szCommand, sizeof( szCommand ), "r%X|f0|d0|", defNo ); + BATTLESTR_ADD( szCommand ); + return FALSE; + } + } + + if( CHAR_getInt( toindex, CHAR_HP ) <= 0 ) return FALSE; + + if( CHAR_getInt( attackindex, CHAR_HP ) <= 0 ) return FALSE; + + // 光、镜、守 +// if( BATTLE_GetDamageReact( attackindex ) > 0 ) iRet = FALSE; +// else if( BATTLE_GetDamageReact( defindex ) > 0 ) iRet = FALSE; + + // 攻击模式 + iWork = BATTLE_AttackSeq( attackindex, toindex, &damage, &Guardian, opt ); + + if( Guardian >= 0 ) + defindex = BATTLE_No2Index( battleindex, Guardian ); + + if( gDamageDiv != 0.0 && damage > 0 ){ + damage /= gDamageDiv; + if( damage <= 0 ) damage = 1; + } + + par = BATTLE_AttrAdjust( attackindex, defindex, 100 ); + react = 0; + + ultimate = BATTLE_DamageSub_FIREKILL( attackindex, defindex, &damage, &petdamage, &react ); + +//#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 +// if( react == BATTLE_MD_TRAP ){ +// defindex = attackindex; +// statusDefNo = attackNo; +// } +//#endif +//#ifdef _PETSKILL_ACUPUNCTURE +// if( react == BATTLE_MD_ACUPUNCTURE ){ +// defindex = attackindex; +// statusDefNo = attackNo; +// } +//#endif +// if( react == BATTLE_MD_REFLEC ){ +// defindex = attackindex; +// statusDefNo = attackNo; +// }else{ + if( 0 <= Guardian && Guardian <= 19 ){ + statusDefNo = Guardian; + }else{ + statusDefNo = defNo; + } +// } + +//#ifdef _PETSKILL_ACUPUNCTURE +// if( react == BATTLE_MD_ACUPUNCTURE ){ //针刺外皮时会无法正常解除被打方的状态,所以把index换回来 +// defindex = toindex = BATTLE_No2Index( battleindex, defNo ); +// statusDefNo = defNo; +// } +//#endif + + //昏睡时,在这里解除状态(也有其它的状态) + if( damage > 0 && ( react != BATTLE_MD_ABSROB ) && ( react != BATTLE_MD_VANISH ) ){ + BATTLE_DamageWakeUp( battleindex, defindex ); + } + +//#ifdef _PETSKILL_ACUPUNCTURE +// if( react == BATTLE_MD_ACUPUNCTURE ){ +// defindex = attackindex; +// statusDefNo = attackNo; +// } +//#endif + + switch( iWork ){ + case BATTLE_RET_ALLGUARD: + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)朝向(%s)攻击,轻易地被躲开。", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ) + //); + flg |= BCF_NORMAL; + break; + case BATTLE_RET_MISS: + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)朝向(%s)攻击,没击中。", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ) + //); + break; + case BATTLE_RET_DODGE: + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)攻击了(%s)躲开了(%.2f%%)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ), + // gDuckPer + //); + flg |= BCF_DODGE; +#ifdef _PETSKILL_RETRACE + Battle_Attack_ReturnData_x.Battle_Attack_ReturnData = BATTLE_RET_DODGE; +#endif + break; + case BATTLE_RET_NORMAL: + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)受到(%s)的攻击(%d)遭受损伤(%d:%d:%d%%)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ), + // damage, + // CHAR_getWorkInt( attackindex, CHAR_WORKATTACKPOWER ), + // CHAR_getWorkInt( defindex, CHAR_WORKDEFENCEPOWER ), + // par + //); + //andy_edit + flg |= BATTLE_getReactFlg( defindex, react); + flg |= BCF_NORMAL; + break; + case BATTLE_RET_CRITICAL: + //snprintf( szBuffer, sizeof(szBuffer), + //"(%s)向(%s)CRITICAL(%d%%)(%d)不可以(%d:%d:%d%%)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ), + // (int)(gCriper*0.01), + // damage, + // CHAR_getWorkInt( attackindex, CHAR_WORKATTACKPOWER ), + // CHAR_getWorkInt( defindex, CHAR_WORKDEFENCEPOWER ), + // par + //); + //andy_edit + flg |= BATTLE_getReactFlg( defindex, react); + flg |= BCF_KAISHIN; + iRet = FALSE; + break; +#ifdef _EQUIT_ARRANGE + case BATTLE_RET_ARRANGE: + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)攻击了(%s)挡掉了(%.2f%%)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ), + // gDuckPer + //); + flg |= BCF_B_ARRANGE; + break; +#endif + } + + + if( CHAR_getWorkInt( defindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_GUARD + && CHAR_getWorkInt( defindex, CHAR_WORKCONFUSION ) <= 0){ + strncat( szBuffer, "(GUARD)", sizeof( szBuffer ) ); + flg |= BCF_GUARD; + iRet = FALSE; + } + + if( CHAR_getInt( defindex, CHAR_HP ) <= 0 ){ + if( CHAR_getWorkInt( defindex, CHAR_WORKBATTLEFLG ) & CHAR_BATTLEFLG_ABIO ){ + ultimate = 1; + }else if( CHAR_getInt( defindex, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER && flg & BCF_KAISHIN ){ + if( RAND( 1, 100 ) < 50 ){ + ultimate = 1; + } + } +#ifdef _PETSKILL_LER +// 雷尔不能被打飞 + if(CHAR_getInt(defindex,CHAR_BASEBASEIMAGENUMBER) == 101813 || + CHAR_getInt(defindex,CHAR_BASEBASEIMAGENUMBER) == 101814) ultimate = 0; +#endif + iRet = FALSE; + flg |= BCF_DEATH; + + if( ultimate == 1 ){ + flg |= BCF_ULTIMATE_1; + strcat( szBuffer, "ultimate嘆" ); + } + if( ultimate == 2 ){ + flg |= BCF_ULTIMATE_2; + strcat( szBuffer, "ultimate嘇" ); + } + } + + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + + +//#ifdef _PETSKILL_ACUPUNCTURE +// if( react == BATTLE_MD_ACUPUNCTURE ){ //针刺外皮不会反射特殊状态,所以要改回来 +// defindex = toindex = BATTLE_No2Index( battleindex, defNo ); +// statusDefNo = defNo; +// } +// //注意:之後要不要再改回原本反射.......???? +//#endif + + + if( damage > 0 && gBattleStausChange >= 0 ){ + if( BATTLE_StatusAttackCheck( + attackindex, + defindex, + gBattleStausChange, + 30, + 40, + 2.0, + &perStatus + ) == TRUE + ){ + CHAR_setWorkInt( defindex, StatusTbl[gBattleStausChange], + gBattleStausTurn + 1 ); + + if( gBattleStausChange == BATTLE_ST_DRUNK ){ + CHAR_setWorkInt( defindex, CHAR_WORKDRUNK, + CHAR_getWorkInt( defindex, CHAR_WORKDRUNK ) / 2 ); + } + +#ifdef _PET_SKILL_SARS // WON ADD 毒煞蔓延 + if( gBattleStausChange == BATTLE_ST_SARS ){ + CHAR_setWorkInt( defindex, CHAR_WORKMODSARS, 1); + } +#endif + + if( gBattleStausChange == BATTLE_ST_PARALYSIS + || gBattleStausChange == BATTLE_ST_SLEEP + || gBattleStausChange == BATTLE_ST_STONE + || gBattleStausChange == BATTLE_ST_BARRIER + ){ + CHAR_setWorkInt( defindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + } + + //snprintf( szBuffer, sizeof(szBuffer), + //"(%s)变成(%s)(%d%%)", + // CHAR_getUseName( defindex ), + // aszStatusFull[gBattleStausChange], + // perStatus + //); + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + + BATTLE_BadStatusString( statusDefNo, gBattleStausChange ); + }else{ + //snprintf( szBuffer, sizeof(szBuffer), + //"(%s)无法成功\(%d%%)", + // aszStatusFull[gBattleStausChange], + // perStatus ); + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + } + } +#ifdef _SHOOTCHESTNUT // Syu ADD 宠技:丢栗子 + if ( ( damage > 0 ) && ( CHAR_getWorkInt( attackindex , CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_ATTSHOOT ) ) { + if ( RAND ( 1 , 5 ) > 4 ) { + CHAR_setWorkInt( defindex, CHAR_WORKSLEEP , 3 ); //设定昏睡 + CHAR_setWorkInt( defindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE );//因为设定了昏睡,所以设定无动作 + } + } +#endif + if( damage > 0 ){ +#ifdef _TAKE_ITEMDAMAGE + if( BATTLE_ItemCrushSeq( attackindex, defindex, damage) == TRUE ){ +#else + if( BATTLE_ItemCrushSeq( defindex ) == TRUE ){ +#endif + flg |= BCF_CRUSH; + } + } + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + if( damage > 0 && (CHAR_getInt(attackindex, CHAR_WHICHTYPE)== CHAR_TYPEPLAYER) ){ + int i; + // 检查火、冰、雷附体 + for( i=0; i<3; i++ ){ + int turn = 0, status = -1; + + turn = CHAR_getWorkInt( attackindex, CHAR_WORK_F_ENCLOSE_2+i ); + + if( turn > 0 ){ + int skill_type = CHAR_getWorkInt( attackindex, CHAR_WORKBATTLECOM1 ); + int perStatus = 0, j = 0; + int skill_level = CHAR_getWorkInt( attackindex, CHAR_WORKMOD_F_ENCLOSE_2+i ); + char pszP[3][10] = { "烧","霜","电" }; + int img1 = 101697, img2 = 101698 + i; + + // 状态 + for( j = 1; j < BATTLE_ST_END; j ++ ){ + if( strncmp( pszP[i], aszStatus[j], 2 ) == 0 ){ + status = j; + break; + } + } + + // 命中率 + perStatus = 20 + skill_level * 2; + + // 回合数 + if( skill_level >= 10 ) turn = 3; + else if( skill_level >= 5 ) turn = 2; + else turn = 1; + + // 雷附体一回合数 + if( i == 2 ) turn = 1; + + // 火、冰、雷附体附加攻击 +// Terry add fix 忠犬bug + if(Guardian >= 0) iRet = BATTLE_PROFESSION_RANG_ATTACK_DAMAGE(attackindex, attackNo, Guardian, skill_type, status, turn, perStatus, 0, img1, img2 ); + else iRet = BATTLE_PROFESSION_RANG_ATTACK_DAMAGE(attackindex, attackNo, defNo, skill_type, status, turn, perStatus, 0, img1, img2 ); + + break; + } + } + } +#endif + + if( 0 <= Guardian && Guardian <= 19 ){ + iRet = FALSE; + flg |= BCF_GUARDIAN; + snprintf( szCommand, sizeof( szCommand ), + "r%X|f%X|d%X|p%X|g%X|", + defNo, + flg, + damage, + petdamage, + Guardian ); + }else{ + snprintf( szCommand, sizeof( szCommand ), + "r%X|f%X|d%X|p%X|", + defNo, + flg, + damage, + petdamage ); + } + + BATTLESTR_ADD( szCommand ); + + defNo = BATTLE_Index2No( battleindex, defindex ); + + if( defNo >= SIDE_OFFSET ){ + i = defNo - SIDE_OFFSET; + DefSide = 1; + }else{ + i = defNo; + } + + i = defNo-DefSide*SIDE_OFFSET; + if( ultimate > 0 ){ + BattleArray[battleindex].Side[DefSide].Entry[i].flg |= BENT_FLG_ULTIMATE; + } + return iRet; + +} + +#endif + + +enum { + BATTLE_C_NONE = 0, + BATTLE_C_CLAW, + BATTLE_C_AXE, + BATTLE_C_CLUB, + BATTLE_C_SPEAR, + BATTLE_C_BOW, + BATTLE_C_THROU, + BATTLE_C_OTHER, + BATTLE_C_MAX +}; + +static int CounterTbl[] = { + 10, 9, 8, 8, 5, 0, 0, 0 , + 10, 9, 7, 7, 6, 0, 0, 0 , + 9, 8,10,10, 7, 0, 0, 0 , + 8, 8,10,10, 7, 0, 0, 0 , + 6, 6, 8, 8, 9, 0, 0, 0 , + 0, 0, 0, 0, 0, 0, 0, 0 , + 0, 0, 0, 0, 0, 0, 0, 0 , +}; + +static int BATTLE_ItemType2ItemMap( int type ){ + int iRet = BATTLE_C_NONE; + if( type == ITEM_FIST ) iRet = BATTLE_C_CLAW; + if( type == ITEM_AXE ) iRet = BATTLE_C_AXE; + if( type == ITEM_CLUB ) iRet = BATTLE_C_CLUB; + if( type == ITEM_BOW ) iRet = BATTLE_C_BOW; + if( type == ITEM_BOOMERANG ) iRet = BATTLE_C_THROU; + if( type == ITEM_BOUNDTHROW ) iRet = BATTLE_C_THROU; + if( type == ITEM_BREAKTHROW ) iRet = BATTLE_C_THROU; + return iRet; +} + +static BOOL BATTLE_CounterCheckPlayer( int attackindex, int defindex, int *pPar ) +{ + int + At_SoubiIndex, At_SoubiType, + Df_SoubiIndex, Df_SoubiType, + At_Soubi, CriPer, + At_Luck = 0, + flg = FALSE; + + float per; + + CriPer = BATTLE_CounterCalc( attackindex, defindex ); + + At_SoubiIndex = CHAR_getItemIndex( attackindex, CHAR_ARM ); + + if( BATTLE_IsThrowWepon( At_SoubiIndex ) == TRUE ){ + *pPar = 0.0; + return FALSE; + } + + if( ITEM_CHECKINDEX( At_SoubiIndex ) == FALSE ){ + At_SoubiType = ITEM_FIST; + }else{ + At_SoubiType = ITEM_getInt( At_SoubiIndex, ITEM_TYPE ); + } + + At_SoubiIndex = BATTLE_ItemType2ItemMap( At_SoubiType ); + + Df_SoubiIndex = CHAR_getItemIndex( defindex, CHAR_ARM ); + + if( BATTLE_IsThrowWepon( Df_SoubiIndex ) == TRUE ){ + *pPar = 0.0; + return FALSE; + } + + if( ITEM_CHECKINDEX( Df_SoubiIndex ) == FALSE ){ + Df_SoubiType = ITEM_FIST; + }else{ + Df_SoubiType = ITEM_getInt( Df_SoubiIndex, ITEM_TYPE ); + } + + Df_SoubiIndex = BATTLE_ItemType2ItemMap( Df_SoubiType ); + + At_Soubi = CounterTbl[BATTLE_C_MAX * At_SoubiIndex + Df_SoubiIndex]; + + if( CHAR_getInt( attackindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + At_Luck = CHAR_getWorkInt( attackindex, CHAR_WORKFIXLUCK ); + } + +#ifdef _SUIT_ADDENDUM + per = CriPer * At_Soubi * 0.1 + At_Luck + CHAR_getWorkInt( attackindex, CHAR_WORKCOUNTER ); +#else + per = CriPer * At_Soubi * 0.1 + At_Luck; +#endif + + *pPar = per; + + per *= 100; + if( per <= 0 ){ + per = 1; + *pPar = 0; + } + + if( RAND( 1, 10000 ) < per ){ + flg = TRUE; + }else{ + flg = FALSE; + } + return flg; +} + + +static BOOL BATTLE_CounterCheckPet( int attackindex, int defindex, int *pPer ) +{ + int At_SoubiIndex; + int flg = FALSE, Df_SoubiIndex, iWork; + + float per; + + At_SoubiIndex = CHAR_getItemIndex( attackindex, CHAR_ARM ); + + if( BATTLE_IsThrowWepon( At_SoubiIndex ) == TRUE ){ + *pPer = 0.0; + return FALSE; + } + + + Df_SoubiIndex = CHAR_getItemIndex( defindex, CHAR_ARM ); + + if( BATTLE_IsThrowWepon( Df_SoubiIndex ) == TRUE ){ + *pPer = 0.0; + return FALSE; + } + + per = BATTLE_CounterCalc( attackindex, defindex ); + + if( CHAR_getWorkInt( attackindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_NOGUARD ){ + iWork = CHAR_GETWORKINT_LOW( attackindex, CHAR_WORKBATTLECOM3 ); + iWork = iWork >> 8; + if( iWork > 127 )iWork *= -1; + per += iWork; + } + + if( per > 100 ) per = 100; + *pPer = per; + per *= 100; + + if( per <= 0 ){ + per = 1; + *pPer = per; + } + + if( RAND( 1, 10000 ) <= per ){ + flg = TRUE; + }else{ + flg = FALSE; + } + return flg; +} + +static BOOL BATTLE_CounterCheck( int attackindex, int defindex, int *pPar ) +{ +#ifdef _SHOOTCHESTNUT // Syu ADD 宠技:丢栗子 + if ( CHAR_getWorkInt( attackindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_ATTSHOOT || + CHAR_getWorkInt( defindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_ATTSHOOT + ) { + return FALSE; + } +#endif + if( CHAR_getInt( attackindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + return BATTLE_CounterCheckPlayer( attackindex, defindex, pPar ); + }else{ + return BATTLE_CounterCheckPet( attackindex, defindex, pPar ); + } +} + + + +//反击判定 +BOOL BATTLE_Counter( int battleindex, int attackNo, int defNo ) +{ + + char szBuffer[512]=""; + char szCommand[1024]; + int damage = 0, petdamage = 0, attackindex, defindex, Guardian = -2, react = 0, ultimate = 0; + int flg = 0, iWork, par, DefSide = 0, i, per = 0; + BOOL iRet = TRUE; + + attackindex = BATTLE_No2Index( battleindex, attackNo ); + defindex = BATTLE_No2Index( battleindex, defNo ); + +#ifdef _SHOOTCHESTNUT // Syu ADD 宠技:丢栗子 + if ( CHAR_getWorkInt( attackindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_ATTSHOOT ) { + return FALSE; + } +#endif + + if( CHAR_getInt( defindex, CHAR_HP ) <= 0 ) return FALSE; + if( CHAR_getInt( attackindex, CHAR_HP ) <= 0 ) return FALSE; + + if( CHAR_getWorkInt( attackindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_ATTACK + || CHAR_getWorkInt( attackindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_NOGUARD){ + ;; + }else{ + return FALSE; + } + + // nono宠 + if( CHAR_getWorkInt( attackindex, CHAR_WORKBATTLEFLG ) & CHAR_BATTLEFLG_ABIO ) return FALSE; + + // 反击条件 + if( BATTLE_CounterCheck( attackindex, defindex, &per ) == FALSE ) return FALSE; + + // 光、镜、守 + if( BATTLE_GetDamageReact( attackindex ) > 0 ) + iRet = FALSE; + else if( BATTLE_GetDamageReact( defindex ) > 0 ) + iRet = FALSE; + + gWeponType = BATTLE_GetWepon( attackindex ); + + gDamageDiv = 1.0; + + iWork = BATTLE_AttackSeq( attackindex, defindex, &damage, &Guardian, -1 ); + + if( damage <= 0 ){ + damage = 0; + }else{ + damage *= 0.75; + if( damage < 1 ) damage = 1; + } + + react = 0; + ultimate = BATTLE_DamageSub( attackindex, defindex, &damage, &petdamage, &react ); + if( react == BATTLE_MD_REFLEC ) defindex = attackindex; + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + if( react == BATTLE_MD_TRAP ) defindex = attackindex; +#endif + +#ifdef _PETSKILL_ACUPUNCTURE + if( react == BATTLE_MD_ACUPUNCTURE ) defindex = attackindex; +#endif + + if( damage > 0 && ( react != BATTLE_MD_ABSROB ) && ( react != BATTLE_MD_VANISH )){ + BATTLE_DamageWakeUp( battleindex, defindex ); + } + par = BATTLE_AttrAdjust( attackindex, defindex, 100 ); + switch( iWork ){ + case BATTLE_RET_MISS: +/* + snprintf( szBuffer, sizeof(szBuffer), + "(%s)朝向(%s)反击,没击中。", + CHAR_getUseName( attackindex ), + CHAR_getUseName( defindex ) + ); +*/ + return FALSE; + + case BATTLE_RET_DODGE: + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)意外攻击(%d%%)!但是(%s)闪开了(%.2f%%)", + // CHAR_getUseName( attackindex ), + // per, + // CHAR_getUseName( defindex ), + // gDuckPer + //); + flg |= BCF_DODGE; + break; + + case BATTLE_RET_NORMAL: + //snprintf( szBuffer, sizeof(szBuffer), + //"(%s)的反击!(%d%%)(%d)损伤 (%d:%d:%d%%)", + // CHAR_getUseName( attackindex ), + // per, + // damage, + // CHAR_getWorkInt( attackindex, CHAR_WORKATTACKPOWER ), + // CHAR_getWorkInt( defindex, CHAR_WORKDEFENCEPOWER ), + // par + //); + //andy_edit + flg |= BATTLE_getReactFlg( defindex, react); + break; + + case BATTLE_RET_CRITICAL: + //snprintf( szBuffer, sizeof(szBuffer), + //"(%s)的CRITICAL!(%d%%)(%d)损伤 (%d:%d:%d%%)", + // CHAR_getUseName( attackindex ), + // per, + // damage, + // CHAR_getWorkInt( attackindex, CHAR_WORKATTACKPOWER ), + // CHAR_getWorkInt( defindex, CHAR_WORKDEFENCEPOWER ), + // par + //); + flg |= BCF_KAISHIN; + iRet = FALSE; + //andy_edit + flg |= BATTLE_getReactFlg( defindex, react); + break; +#ifdef _EQUIT_ARRANGE + case BATTLE_RET_ARRANGE: + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)攻击了(%s)挡掉了(%.2f%%)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ), + // gDuckPer + //); + flg |= BCF_B_ARRANGE; + break; +#endif + } + + flg |= BCF_COUNTER; + + if( CHAR_getInt( defindex, CHAR_HP ) <= 0 ){ + if( CHAR_getWorkInt( defindex, CHAR_WORKBATTLEFLG ) & CHAR_BATTLEFLG_ABIO ){ + ultimate = 1; + }else + if( CHAR_getInt( defindex, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER + && flg & BCF_KAISHIN + ){ + if( RAND( 1, 100 ) < 50 ){ + ultimate = 1; + } + } +#ifdef _PETSKILL_LER +// 雷尔不能被打飞 + if(CHAR_getInt(defindex,CHAR_BASEBASEIMAGENUMBER) == 101813 || + CHAR_getInt(defindex,CHAR_BASEBASEIMAGENUMBER) == 101814) ultimate = 0; +#endif + iRet = FALSE; + flg |= BCF_DEATH; + + if( ultimate == 1 ){ + flg |= BCF_ULTIMATE_1; + strcat( szBuffer, "ultimate嘆" ); + } + if( ultimate == 2 ){ + flg |= BCF_ULTIMATE_2; + strcat( szBuffer, "ultimate嘇" ); + } + } + + if( damage > 0 ){ +#ifdef _TAKE_ITEMDAMAGE + if( BATTLE_ItemCrushSeq( attackindex, defindex, damage) == TRUE ){ +#else + if( BATTLE_ItemCrushSeq( defindex ) == TRUE ){ +#endif + flg |= BCF_CRUSH; + } + } + +#ifdef _NOTRIDE_ + snprintf( szCommand, sizeof( szCommand ), + "r%X|f%X|counter%X|", + defNo, + flg, + damage ); +#else + snprintf( szCommand, sizeof( szCommand ), + "r%X|f%X|counter%X|p%X|", + defNo, + flg, + damage, + petdamage + ); +#endif + //print(" CounterAttack!:%s ", szCommand ); + + BATTLESTR_ADD( szCommand ); + + + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + + if( defNo >= SIDE_OFFSET ){ + i = defNo - SIDE_OFFSET; + DefSide = 1; + } + + i = defNo-DefSide*SIDE_OFFSET; + if( ultimate > 0 ){ + BattleArray[battleindex].Side[DefSide].Entry[i].flg |= BENT_FLG_ULTIMATE; + } + + return iRet; +} + + +static BOOL BATTLE_CaptureCheck( + int attackindex, + int defindex, + float *pPer +) +{ + float + Df_MaxHp = 0, + Df_HpPer = 0, + At_Charm = 0, + At_Level = 0, + At_Dex = 0, + At_Luck = 0, + Df_Level = 0, + Df_Dex = 0, + Df_Ge = 30; + float WorkGet; + + *pPer = 0; + + if( CHAR_getInt( defindex, CHAR_WHICHTYPE ) != CHAR_TYPEENEMY ){ + return FALSE; + } + + if( CHAR_getWorkInt( defindex, CHAR_WORK_PETFLG ) == 0 ){ + return FALSE; + } + + if( CHAR_getWorkInt( attackindex, CHAR_PickAllPet) != TRUE ) { + if( CHAR_getInt( attackindex, CHAR_LV ) + 5 < CHAR_getInt( defindex, CHAR_LV )){ + return FALSE; + } + } + + At_Charm = CHAR_getWorkInt( attackindex, CHAR_WORKFIXCHARM ); + At_Level = CHAR_getInt( attackindex, CHAR_LV ); + Df_Level = CHAR_getInt( defindex, CHAR_LV ); + At_Dex = CHAR_getWorkInt( attackindex, CHAR_WORKFIXDEX ); + Df_Dex = CHAR_getWorkInt( defindex, CHAR_WORKFIXDEX ); + Df_Ge = CHAR_getWorkInt( defindex, CHAR_WORKMODCAPTUREDEFAULT ); + At_Luck = CHAR_getWorkInt( attackindex, CHAR_WORKFIXLUCK ); + Df_HpPer = CHAR_getInt( defindex, CHAR_HP ); + Df_MaxHp = CHAR_getWorkInt( defindex, CHAR_WORKMAXHP ); + if( Df_MaxHp <= 0 ) Df_MaxHp = 1; + + Df_HpPer = 10 - ( Df_HpPer * Df_HpPer ) / Df_MaxHp; + Df_Level = ( At_Level/2 - Df_Level/2 ); + Df_Dex = At_Dex / 15 - Df_Dex / 15; + + WorkGet = ( Df_HpPer + Df_Level + Df_Dex + ( Df_Ge + At_Luck ) ) * At_Charm / 50; + + WorkGet += CHAR_getWorkInt( attackindex, CHAR_WORKMODCAPTURE ); + + if( CHAR_getWorkInt( defindex, CHAR_WORKSLEEP ) > 0 ){ + WorkGet += 15; + } + + if( WorkGet > 99 ) WorkGet = 99; + + *pPer = WorkGet; + + if( RAND( 1,100 ) < WorkGet ){ + return TRUE; + }else{ + return FALSE; + } + +} +#ifdef _CAPTURE_FREES +#define MAXCAPTRUEFREE 15 + +typedef struct _NeedItemEnemy{ + int EnemyId; + int ItemId[MAXCAPTRUEFREE]; +}NEEDITEMENEMY; +NEEDITEMENEMY NeedEnemy[] = { + { 524, { 2456, -1, -1, -1, -1, -1, -1, -1, -1, -1} }, + //伊甸任务 + { 961, {20219, -1, -1, -1, -1, -1, -1, -1, -1, -1} }, + { 953, {20223, -1, -1, -1, -1, -1, -1, -1, -1, -1} }, + { 962, {20222, -1, -1, -1, -1, -1, -1, -1, -1, -1} }, + + { 777, {20253, -1, -1, -1, -1, -1, -1, -1, -1, -1} }, + { 796, {20247, -1, -1, -1, -1, -1, -1, -1, -1, -1} }, + { 812, {20259, -1, -1, -1, -1, -1, -1, -1, -1, -1} }, + + { 1105, {1690, 1691, 1692, -1, -1, -1, -1, -1, -1, -1} }, + { 8, {1810, -1, -1, -1, -1, -1, -1, -1, -1, -1} }, +#ifdef _WOLF_TAKE_AXE // WON ADD 抓双头狼的限制 + { 145, {2236, -1, -1, -1, -1, -1, -1, -1, -1, -1} }, + { 146, {2236, -1, -1, -1, -1, -1, -1, -1, -1, -1} }, +#endif +}; +#else +typedef struct _NeedItemEnemy{ + int EnemyId; + int ItemId; +}NEEDITEMENEMY; +NEEDITEMENEMY NeedEnemy[] = { + { 524, 2456 }, + //伊甸任务 + { 961, 20219}, + { 953, 20223}, + { 962, 20222}, + + { 777, 20253}, + { 796, 20247}, + { 812, 20259}, + +}; +#endif + +static int IsNeedCaptureItem( int charaindex ) +{ + int i=0; + for( i = 0; i < arraysizeof( NeedEnemy ); i ++ ){ + if( NeedEnemy[i].EnemyId != CHAR_getInt( charaindex, CHAR_PETID ) )continue; +#ifdef _CAPTURE_FREES + return i; +#else + return NeedEnemy[i].ItemId; +#endif + } + return -1; +} + +BOOL BATTLE_CaptureItemCheck( int attackindex, int defindex ) +{ +#ifdef _CAPTURE_FREES + int i; +#endif + int j, ti, itemindex; + + ti = IsNeedCaptureItem( defindex ); + if( ti < 0 ) return TRUE; + +#ifdef _CAPTURE_FREES + for( i=0; i= CHAR_MAXITEMHAVE ) return FALSE; + } + return TRUE; +#else + for( j = CHAR_STARTITEMARRAY; j < CHAR_MAXITEMHAVE; j ++ ){ + itemindex =CHAR_getItemIndex( attackindex, j ); + if( ITEM_CHECKINDEX( itemindex ) == FALSE )continue; + if( ITEM_getInt( itemindex, ITEM_ID ) == ti ){ + return TRUE; + } + } + return FALSE; +#endif + +} + +#ifdef _CAPTURE_FREES +BOOL BATTLE_CaptureItemDelAll( int attackindex, int defindex ) +{ + int i, j, itemindex=-1,ti; + + ti = IsNeedCaptureItem( defindex ); + if( ti < 0 ) return TRUE; + + for( i=0; i= 0 ){ + for( i = CHAR_STARTITEMARRAY; i < CHAR_MAXITEMHAVE; i ++ ) { + itemindex = CHAR_getItemIndex( attackindex, i ); + if( ITEM_CHECKINDEX( itemindex ) == FALSE )continue; + if( ITEM_getInt( itemindex, ITEM_ID ) == needItemId ){ + { + char token[256]; + LogItem( + CHAR_getChar( attackindex, CHAR_NAME ), + CHAR_getChar( attackindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), +#endif + "PetEaten(使用料理捕获宠物)", + CHAR_getInt( attackindex,CHAR_FLOOR), + CHAR_getInt( attackindex,CHAR_X ), + CHAR_getInt( attackindex,CHAR_Y ), + ITEM_getChar(itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + } + CHAR_DelItem( attackindex, i); + } + } + } +#endif + CHAR_setInt( attackindex, CHAR_GETPETCOUNT, + CHAR_getInt( attackindex, CHAR_GETPETCOUNT ) + 1 ); + + BATTLE_Exit( defindex, battleindex ); + CHAR_complianceParameter( pindex ); + CHAR_setInt( pindex, CHAR_VARIABLEAI, 0 ); + ai = CHAR_DEFAULTMAXAI - CHAR_getWorkInt( pindex, CHAR_WORKFIXAI ); + if( ai < 0 ){ + CHAR_PetAddVariableAi( pindex, ai * 100 ); + CHAR_setWorkInt( pindex, CHAR_WORKFIXAI, + CHAR_getWorkInt( pindex, CHAR_WORKFIXAI ) + ai ); + } + } + } + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + { + char szCommand[1024]; + snprintf( szCommand, sizeof( szCommand ), + "BT|a%X|r%X|f%X|", + attackNo, + defNo, + flg ); + BATTLESTR_ADD( szCommand ); + } + return ( flg )?(TRUE):(FALSE); +} + +void BATTLE_Guard( + int battleindex, + int attackNo +) +{ + char szCommand[128]; + //int attackindex; + sprintf( szCommand, "bg|%x|", attackNo ); + BATTLESTR_ADD( szCommand ); + /*attackindex = BATTLE_No2Index( battleindex, attackNo ); + { + char szBuffer[256]=""; + //snprintf( szBuffer, sizeof(szBuffer), "(%s)保住了自身安全。", + // CHAR_getUseName( attackindex ) + //); + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + }*/ + +} + +BOOL BATTLE_EscapeCheck( int attackindex, int attackNo, int *pPar ) +{ + int Esc = 100; + + int myside, otherside, battleindex; + int mylevel, enemylevel = 0, enemycnt = 0, i, enemyindex, luck, + escape_cnt, rare, SubNo; + BATTLE_ENTRY *pEntry; + + myside = CHAR_getWorkInt( attackindex, CHAR_WORKBATTLESIDE ); + otherside = 1 - myside; + + battleindex = CHAR_getWorkInt( attackindex, CHAR_WORKBATTLEINDEX ); + + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return TRUE; + + if( BattleArray[battleindex].type == BATTLE_TYPE_P_vs_P )return TRUE; + + if( attackNo >= SIDE_OFFSET ){ + SubNo = attackNo - SIDE_OFFSET; + }else{ + SubNo = attackNo; + } + + if( CHAR_getInt( attackindex, CHAR_WHICHTYPE ) == CHAR_TYPEENEMY ){ + rare = CHAR_getInt( attackindex, CHAR_RARE ); + switch( rare ){ + case 0: luck = 1; break; + case 1: luck = 3; break; + default:luck = 5; break; + } + }else{ + luck = min( 5, CHAR_getWorkInt( attackindex, CHAR_WORKFIXLUCK ) ); + luck = max( 1, luck ); + } + + mylevel = CHAR_getInt( attackindex, CHAR_LV ); + pEntry = BattleArray[battleindex].Side[otherside].Entry; + + escape_cnt = BattleArray[battleindex].Side[myside].Entry[SubNo].escape+1; + + for( i = 0; i < BATTLE_ENTRY_MAX; i ++ ){ + enemyindex = pEntry[i].charaindex; + if( CHAR_CHECKINDEX( enemyindex ) == FALSE )continue; + + if( CHAR_getWorkInt( enemyindex, CHAR_WORKBATTLEFLG ) & CHAR_BATTLEFLG_ABIO ) + enemylevel -= 100; + + enemylevel += CHAR_getInt( enemyindex, CHAR_LV ); + + enemycnt ++; + } + + if( enemycnt <= 0 ){ + enemylevel = 0; + Esc = 100; + }else{ + enemylevel /= enemycnt; + if( luck >= 5 ){ + Esc = 95 * escape_cnt; + }else + if( luck >= 4 ){ + Esc = ( 60 * escape_cnt ) - 2*( enemylevel - mylevel ); + }else + if( luck >= 3 ){ + Esc = ( 50 * escape_cnt ) - 2*( enemylevel - mylevel ); + }else + if( luck >= 2 ){ + Esc = ( 40 * escape_cnt ) - 2*( enemylevel - mylevel ); + }else + if( luck >= 1 ){ + Esc = ( 30 * escape_cnt ) - 2*( enemylevel - mylevel ); + }else{ + Esc = 95 * escape_cnt; + } + } + + if( Esc < 1 )Esc = 1; + + *pPar = Esc; + + if( RAND( 1,100 ) < Esc ){ + return TRUE; + }else{ + return FALSE; + } +} + + +BOOL BATTLE_Escape( int battleindex, int attackNo, int flag) +{ + //char szBuffer[512]=""; + char szCommand[1024]; + int attackindex, flg = FALSE, side, SubNo, iPar; + + sprintf( szCommand, "BE|e%X|", attackNo ); + BATTLESTR_ADD( szCommand ); + + attackindex = BATTLE_No2Index( battleindex, attackNo ); + + if( !CHAR_CHECKINDEX( attackindex ) ){ + return FALSE; + } + + if( attackNo >= SIDE_OFFSET ){ + side = 1; SubNo = attackNo - SIDE_OFFSET; + }else{ + side = 0; SubNo = attackNo; + } + + BattleArray[battleindex].Side[side].Entry[SubNo].escape ++; + + if( BATTLE_EscapeCheck( attackindex, attackNo, &iPar ) == FALSE ){ + flg = 0; + }else{ + flg = 1; + } + + if( flg == 1 || flag == 1 ){ + //snprintf( szBuffer, sizeof(szBuffer), "(%s)逃跑了(%d%%)", + // CHAR_getUseName( attackindex ), iPar + //); + //if( getBattleDebugMsg( ) != 0 ){ + // BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + //} + + if( BattleArray[battleindex].type == BATTLE_TYPE_P_vs_P + && CHAR_getInt( attackindex, CHAR_HP ) > 0 ){ + BATTLE_EscapeDpSend( battleindex, attackindex ); + BATTLE_GetDuelPoint( battleindex, side, SubNo ); + } + CHAR_DischargePartyNoMsg( attackindex ); + BATTLE_Exit( attackindex, battleindex ); + CHAR_setWorkInt( attackindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_FINAL ); + }else{ + //if( getBattleDebugMsg( ) != 0 ){ + //snprintf( szBuffer, sizeof(szBuffer), "(%s)差点跑了(%d%%)", + // CHAR_getUseName( attackindex ), iPar + //); + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + //} + } + snprintf( szCommand, sizeof( szCommand ), "f%X|", flg ); + BATTLESTR_ADD( szCommand ); + + return ( flg )?(TRUE):(FALSE); +} + + +int BATTLE_SurpriseCheck( int battleindex ) +{ + int iRet = 0, Rnd, charaindex, luck, a = 0, b = 7; + + if( BattleArray[battleindex].Side[0].type == BATTLE_S_TYPE_PLAYER + && BattleArray[battleindex].Side[1].type == BATTLE_S_TYPE_PLAYER + ){ + return 0; + } + + charaindex = BattleArray[battleindex].Side[0].Entry[0].charaindex; + + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return 0; + + if( BattleArray[battleindex].WinFunc != NULL )return 0; + + luck = CHAR_getWorkInt( charaindex, CHAR_WORKFIXLUCK ); + + switch( luck ){ + case 5: a = 20; b = 0; break; + case 4: a = 15; b = 2; break; + case 3: a = 10; b = 3; break; + case 2: a = 5; b = 5; break; + default: a = 0; b = 7; break; + } + + Rnd = RAND( 1, 100 ); + + if( Rnd <= a ){ + iRet = 1; + }else + if( Rnd < a + b ){ + iRet = 2; + } + + return iRet; +} + + +int BATTLE_NoAction( int battleindex, int attackNo ) +{ + //char szBuffer[512]=""; + char szCommand[512]; + int attackindex ; + + attackindex = BATTLE_No2Index( battleindex, attackNo ); + + sprintf( szCommand, "bn|%x|", attackNo ); + BATTLESTR_ADD( szCommand ); + + //snprintf( szBuffer, sizeof(szBuffer), "(%s)什麽也不能做。", + // CHAR_getUseName( attackindex ) + //); + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + + return 0; +} + + +int BATTLE_PetIn( int battleindex, int attackNo ) +{ + //char szBuffer[512]=""; + char szCommand[1024]; + int attackindex, petindex ; + + attackindex = BATTLE_No2Index( battleindex, attackNo ); + petindex = CHAR_getInt( attackindex, CHAR_DEFAULTPET ); + petindex = CHAR_getCharPet( attackindex, petindex ); +#ifdef _FIXWOLF // Syu ADD 修正狼人变身Bug + if ( CHAR_getInt ( petindex , CHAR_BASEIMAGENUMBER) == 101428 ) + { + CHAR_setInt( petindex, CHAR_BASEIMAGENUMBER, CHAR_getInt( petindex , CHAR_BASEBASEIMAGENUMBER)); + CHAR_setWorkInt( petindex, CHAR_WORKATTACKPOWER, CHAR_getWorkInt( petindex , CHAR_WORKFIXSTR)); + CHAR_setWorkInt( petindex, CHAR_WORKQUICK, CHAR_getWorkInt( petindex , CHAR_WORKFIXDEX)); + } +#endif +#ifdef _PETSKILL_BECOMEFOX // 宠物中媚惑术收回後再放出来时要恢复正常状态 + if ( CHAR_getInt ( petindex , CHAR_WORKFOXROUND) != -1 + || CHAR_getInt( petindex, CHAR_BASEIMAGENUMBER) == 101749 ){ //若是变身为狸 + CHAR_setInt( petindex, CHAR_BASEIMAGENUMBER, CHAR_getInt( petindex , CHAR_BASEBASEIMAGENUMBER)); + CHAR_setWorkInt( petindex, CHAR_WORKATTACKPOWER, CHAR_getWorkInt( petindex , CHAR_WORKFIXSTR)); + CHAR_setWorkInt( petindex, CHAR_WORKQUICK, CHAR_getWorkInt( petindex , CHAR_WORKFIXDEX)); + CHAR_setInt ( petindex , CHAR_WORKFOXROUND, -1 ); + } +#endif + if( CHAR_getWorkInt( petindex, CHAR_WORKBATTLEFLG ) + & CHAR_BATTLEFLG_NORETURN + ){ + //snprintf( szBuffer, sizeof(szBuffer), "(%s)无法回复成(%s)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( petindex ) + //); + return 0; + } + + BATTLE_PetDefaultExit( attackindex, battleindex ); + CHAR_setInt( attackindex, CHAR_DEFAULTPET, -1 ); + + //snprintf( szBuffer, sizeof(szBuffer), "(%s)回复成(%s)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( petindex ) + //); + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + + sprintf( szCommand, "BS|s%X|f0|", attackNo ); + BATTLESTR_ADD( szCommand ); + + return 0; + +} + +int BATTLE_PetOut( int battleindex, int attackNo ) +{ + //char szBuffer[512]=""; + char szCommand[1024], szEscapeName[128]; + int attackindex, petindex, petNo, flg = 0,iRet ; + + szCommand[0] = 0; + + attackindex = BATTLE_No2Index( battleindex, attackNo ); + petNo = CHAR_getWorkInt( attackindex, CHAR_WORKBATTLECOM2 ); + + CHAR_setInt( attackindex, CHAR_DEFAULTPET, petNo ); + + iRet = BATTLE_PetDefaultEntry( attackindex, battleindex, + CHAR_getWorkInt( attackindex, CHAR_WORKBATTLESIDE ) ); + + if( iRet < 0 ){ + //snprintf( szBuffer, sizeof(szBuffer), "(%s)呼唤宠物,可是没有出现其踪迹。", + // CHAR_getUseName( attackindex ) + //); + }else + if( CHAR_getInt( attackindex, CHAR_DEFAULTPET ) < 0 ){ + //snprintf( szBuffer, sizeof(szBuffer), "(%s)呼唤宠物,可是没有出现其踪迹。", + // CHAR_getUseName( attackindex ) + //); + }else{ + flg = 1; + petNo = CHAR_getInt( attackindex, CHAR_DEFAULTPET ); + petindex = CHAR_getCharPet( attackindex, petNo ); + + CHAR_setWorkInt( petindex, CHAR_WORKBATTLEMODE, + BATTLE_CHARMODE_C_OK ); + + //snprintf( szBuffer, sizeof(szBuffer), "(%s)呼唤(%s)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( petindex ) + //); + + makeEscapeString( CHAR_getUseName( petindex ), + szEscapeName, + sizeof( szEscapeName ) ); + + sprintf( szCommand, "BS|s%X|f1|g%X|l%X|h%X|%s|m%X|", + attackNo, + CHAR_getInt( petindex, CHAR_BASEIMAGENUMBER), + CHAR_getInt( petindex, CHAR_LV), + CHAR_getInt( petindex, CHAR_HP), + szEscapeName, + CHAR_getWorkInt( petindex, CHAR_WORKMAXHP) + ); + BATTLESTR_ADD( szCommand ); + } + + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + + return ( flg )?(TRUE):(FALSE); + +} + + +int BATTLE_Magic( int battleindex, int attackNo ) +{ + int attackindex, defindex, defNo; + + attackindex = BATTLE_No2Index( battleindex, attackNo ); + defNo = CHAR_getWorkInt( attackindex, CHAR_WORKBATTLECOM2 ); + defindex = BATTLE_No2Index( battleindex, defNo ); + + return 0; +} + + +//判别攻击是否命中 +int BATTLE_S_GBreak( int battleindex, int attackNo, int defNo ) +{ + char szBuffer[512]=""; + char szCommand[1024]; + int damage = 0, petdamage = 0, attackindex, defindex, ultimate = 0; + int flg = 0, iWork, par, i, DefSide = 0, + react = 0, + Guardian = -1; + BOOL iRet = FALSE; + + attackindex = BATTLE_No2Index( battleindex, attackNo ); + defindex = BATTLE_No2Index( battleindex, defNo ); + + if( defNo >= SIDE_OFFSET ){ + i = defNo - SIDE_OFFSET; + DefSide = 1; + } + + iWork = BATTLE_AttackSeq( attackindex, defindex, &damage, + &Guardian, BATTLE_COM_S_GBREAK ); + + if( CHAR_getWorkInt( defindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_GUARD + && CHAR_getWorkInt( defindex, CHAR_WORKCONFUSION ) <= 0 + ){ + react = 0; + ultimate = BATTLE_DamageSub( attackindex, defindex, &damage, &petdamage, &react ); + if( react == BATTLE_MD_REFLEC )defindex = attackindex; +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + if( react == BATTLE_MD_TRAP ) defindex = attackindex; +#endif +#ifdef _PETSKILL_ACUPUNCTURE + if( react == BATTLE_MD_ACUPUNCTURE ) defindex = attackindex; +#endif + + }else{ + //若敌非防御则damage为0 + damage = 0; + iWork = BATTLE_RET_MISS; + } + + if( damage > 0 + && ( react != BATTLE_MD_ABSROB ) + && ( react != BATTLE_MD_VANISH ) + ){ + BATTLE_DamageWakeUp( battleindex, defindex ); + } + + par = BATTLE_AttrAdjust( attackindex, defindex, 100 ); + switch( iWork ){ + + case BATTLE_RET_ALLGUARD: + case BATTLE_RET_MISS: + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)朝向(%s)发动绝技,没击中。", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ) + //); + iRet = TRUE; + break; + + case BATTLE_RET_DODGE: + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)展开防御攻击(%s)躲开了(%.2f%%)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ), + // gDuckPer + //); + flg |= BCF_DODGE; + iRet = TRUE; + break; + + case BATTLE_RET_NORMAL: + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)受到(%s)的绝技攻击(%d)损伤(%d:%d:%d%%)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ), + // damage, + // CHAR_getWorkInt( attackindex, CHAR_WORKATTACKPOWER ), + // CHAR_getWorkInt( defindex, CHAR_WORKDEFENCEPOWER ), + // par + //); + //andy_edit + flg |= BATTLE_getReactFlg( defindex, react); + flg |= BCF_NORMAL; + iRet = TRUE; + break; + + case BATTLE_RET_CRITICAL: + //snprintf( szBuffer, sizeof(szBuffer), + //"(%s)受到(%s)的绝技CRITICAL(%d)损伤(%d:%d:%d%%)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ), + // damage, + // CHAR_getWorkInt( attackindex, CHAR_WORKATTACKPOWER ), + // CHAR_getWorkInt( defindex, CHAR_WORKDEFENCEPOWER ), + // par + //); + flg |= BCF_KAISHIN; + iRet = FALSE; + //andy_edit + flg |= BATTLE_getReactFlg( defindex, react); + break; +#ifdef _EQUIT_ARRANGE + case BATTLE_RET_ARRANGE: + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)攻击了(%s)挡掉了(%.2f%%)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ), + // gDuckPer + //); + flg |= BCF_B_ARRANGE; + break; +#endif + } + + if( CHAR_getWorkInt( defindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_GUARD + && CHAR_getWorkInt( defindex, CHAR_WORKCONFUSION ) <= 0 + ){ + strncat( szBuffer, "(GUARD)", sizeof( szBuffer ) ); + iRet = FALSE; + } + + flg |= BCF_GBREAK; + + if( CHAR_getInt( defindex, CHAR_HP ) <= 0 ){ + if( CHAR_getWorkInt( defindex, CHAR_WORKBATTLEFLG ) & CHAR_BATTLEFLG_ABIO ){ + ultimate = 1; + }else + if( CHAR_getInt( defindex, CHAR_WHICHTYPE ) == CHAR_TYPEENEMY + && flg & BCF_KAISHIN + ){ + if( RAND( 1, 100 ) < 50 ){ + ultimate = 1; + } + } +#ifdef _PETSKILL_LER +// 雷尔不能被打飞 + if(CHAR_getInt(defindex,CHAR_BASEBASEIMAGENUMBER) == 101813 || + CHAR_getInt(defindex,CHAR_BASEBASEIMAGENUMBER) == 101814) ultimate = 0; +#endif + iRet = FALSE; + flg |= BCF_DEATH; + + if( ultimate == 1 ){ + flg |= BCF_ULTIMATE_1; + strcat( szBuffer, "ultimate嘆" ); + } + if( ultimate == 2 ){ + flg |= BCF_ULTIMATE_2; + strcat( szBuffer, "ultimate嘇" ); + } + } + + if( damage > 0 ){ +#ifdef _TAKE_ITEMDAMAGE + if( BATTLE_ItemCrushSeq( attackindex, defindex, damage) == TRUE ){ +#else + if( BATTLE_ItemCrushSeq( defindex ) == TRUE ){ +#endif + flg |= BCF_CRUSH; + } + } + +#ifdef _NOTRIDE_ + snprintf( szCommand, sizeof( szCommand ), + "BH|a%X|r%X|f%X|d%X|FF|", + attackNo, + defNo, + flg, + damage ); +#else + snprintf( szCommand, sizeof( szCommand ), + "BH|a%X|r%X|f%X|d%X|p%X|FF|", + attackNo, + defNo, + flg, + damage, + petdamage + ); +#endif + + BATTLESTR_ADD( szCommand ); + + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + + i = defNo-DefSide*SIDE_OFFSET; + if( ultimate > 0 ){ + BattleArray[battleindex].Side[DefSide].Entry[i].flg |= BENT_FLG_ULTIMATE; + } + + return iRet; +} + + +#ifdef _SKILL_SACRIFICE//救援 vincent add 2002/05/30 +int BATTLE_S_Sacrifice( int battleindex, int attackNo, int defNo ) +{ + int attackindex, defindex = 0; + int DefSide ,Damage= 0; + BOOL iRet = FALSE; + char szCommand[256]; + int ToList[SIDE_OFFSET*2+1]; + + attackindex = BATTLE_No2Index( battleindex, attackNo ); + defindex = BATTLE_No2Index( battleindex, defNo ); + if( defNo >= SIDE_OFFSET ){ + DefSide = 1; + } + + //修正HP + CHAR_setInt(attackindex,CHAR_HP,(CHAR_getInt(attackindex,CHAR_HP)*0.5)); + CHAR_setInt(defindex,CHAR_HP,min(CHAR_getInt(attackindex,CHAR_HP)+CHAR_getInt(defindex,CHAR_HP),CHAR_getWorkInt(defindex,CHAR_WORKMAXHP))); + Damage=CHAR_getInt(attackindex,CHAR_HP); + + //魔法动画 + BATTLE_MultiList( battleindex, defNo, ToList ); + //秀hp改变数值 + BATTLE_MagicEffect(battleindex, attackNo, ToList, MAGIC_EFFECT_USER, SPR_heal2 ); + snprintf( szCommand, sizeof(szCommand),"BD|r%X|%X|%X|d%X|p%X|", attackNo, BD_KIND_HP, 0, Damage, 0 ); + BATTLESTR_ADD( szCommand ); + snprintf( szCommand, sizeof(szCommand),"BD|r%X|%X|%X|d%X|p%X|", ToList[0], BD_KIND_HP, 1, Damage, 0 ); + BATTLESTR_ADD( szCommand ); + return iRet; +} +#endif + + +#ifdef _SKILL_REFRESH +int BATTLE_S_Refresh( int battleindex, int attackNo, int defNo, int marray ) +{ + BOOL iRet = FALSE; + char *magicarg; + int status = -1, i,charaindex; + int ReceveEffect= 0; + char *pszP; + magicarg = PETSKILL_getChar( marray, PETSKILL_OPTION ); + pszP = magicarg; + + for( ;status == -1 && pszP[0] != 0; pszP++ ){ + for( i = 0; i < BATTLE_ST_END; i ++ ){ + if( strncmp( pszP, aszStatus[i], 2 ) == 0 ){ + status = i; + pszP +=2; + break; + } + } + } + + if( status == -1 ) return iRet; + charaindex = BATTLE_No2Index( battleindex, attackNo ); + if( CHAR_getWorkInt( charaindex, StatusTbl[status] ) > 0 ){ + ReceveEffect = SPR_tyusya; + iRet = TRUE; + }else{ + ReceveEffect = SPR_hoshi; + } + + BATTLE_MultiStatusRecovery( battleindex, attackNo, defNo, + status, MAGIC_EFFECT_USER, ReceveEffect ); + return iRet; +} +#endif + +#ifdef _SKILL_ROAR //vincent宠技:大吼 +int BATTLE_S_Roar( int battleindex, int attackNo, int defNo, int marray ) +{ + int masteridx=-1, index2, charaindex; + BOOL iRet = FALSE; + char buf1[256]; + char szWork[128]; + int petid=-1, i=1; + BOOL FINDPET=FALSE; + + char *magicarg; + int flg=0; + + charaindex = BATTLE_No2Index( battleindex, attackNo ); + + index2 = BATTLE_No2Index( battleindex, defNo);//被击中目标之index + + if( !CHAR_CHECKINDEX( index2) ) return iRet; + if( BATTLE_Index2No( battleindex, charaindex ) == defNo ){//用在自身 + return iRet; + } + + if( CHAR_getInt( index2, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER ) { + petid = -1;//作用在人物 + }else if( CHAR_getInt( index2, CHAR_WHICHTYPE) == CHAR_TYPEPET ) { + masteridx = BATTLE_No2Index(battleindex,defNo-5);//作用在宠物 + if( !CHAR_CHECKINDEX( masteridx) ) return iRet; + petid = CHAR_getInt(index2,CHAR_PETID);//宠物id + }else if( CHAR_getInt( index2, CHAR_WHICHTYPE) == CHAR_TYPEENEMY ) { + petid = CHAR_getInt(index2,CHAR_PETID); + } + + magicarg = PETSKILL_getChar( marray, PETSKILL_OPTION ); + while( getStringFromIndexWithDelim( magicarg,"|", i, buf1, sizeof( buf1)) != FALSE ) { + if( petid == atoi( buf1) ){//年兽判别 + FINDPET = TRUE; + break; + } + i++; + } + +//送讯息至玩家 + if( FINDPET == TRUE ) {//若为年兽 + char buf4[255]; + sprintf( buf4, "%s被吼声吓跑了!", CHAR_getChar( index2, CHAR_NAME)); + BATTLE_Exit(index2,battleindex);//离开战斗 + if( CHAR_CHECKINDEX( masteridx) ){ + CHAR_setInt(masteridx,CHAR_DEFAULTPET,-1);//无参战宠 + CHAR_talkToCli( masteridx,-1, buf4, CHAR_COLORYELLOW); + } + + //前攻动画 + flg |= BCF_ROAR; + sprintf( szWork, "BH|a%X|", attackNo ); + BATTLESTR_ADD( szWork ); + snprintf( szWork, sizeof( szWork ), "r%X|f%X|d%X|p%X|", defNo, flg, 0, 0 ); + + BATTLESTR_ADD(szWork); + BATTLESTR_ADD( "FF|" ); + sprintf(szWork,"BQ|e%X|",defNo);//逃跑动画 + BATTLESTR_ADD(szWork); + CHAR_talkToCli( CHAR_getWorkInt(charaindex, CHAR_WORKPLAYERINDEX),-1, buf4, CHAR_COLORYELLOW); + } + + return iRet; +} +#endif + +#ifdef _SKILL_GUARDBREAK2//破除防御2 vincent add 2002/05/20 +int BATTLE_S_GBreak2( int battleindex, int attackNo, int defNo ) +{ + char szBuffer[512]=""; + char szCommand[1024]; + int damage = 0, petdamage = 0, attackindex, defindex, ultimate = 0; + int flg = 0, iWork, par, i, DefSide = 0, + react = 0, + Guardian = -1; + BOOL iRet = FALSE; + + attackindex = BATTLE_No2Index( battleindex, attackNo ); + defindex = BATTLE_No2Index( battleindex, defNo ); + + if( defNo >= SIDE_OFFSET ){ + i = defNo - SIDE_OFFSET; + DefSide = 1; + } + + iWork = BATTLE_AttackSeq( attackindex, defindex, &damage, + &Guardian, BATTLE_COM_S_GBREAK2 ); + react = 0; + ultimate = BATTLE_DamageSub( attackindex, defindex, &damage, &petdamage, &react ); + if( react == BATTLE_MD_REFLEC )defindex = attackindex; + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + if( react == BATTLE_MD_TRAP ) defindex = attackindex; +#endif +#ifdef _PETSKILL_ACUPUNCTURE + if( react == BATTLE_MD_ACUPUNCTURE ) defindex = attackindex; +#endif + + + if( damage > 0 + && ( react != BATTLE_MD_ABSROB ) + && ( react != BATTLE_MD_VANISH ) + ){ + BATTLE_DamageWakeUp( battleindex, defindex ); + } + + par = BATTLE_AttrAdjust( attackindex, defindex, 100 ); + switch( iWork ){ + + case BATTLE_RET_ALLGUARD: + case BATTLE_RET_MISS: + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)朝向(%s)发动绝技,没击中。", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ) + //); + iRet = TRUE; + break; + + case BATTLE_RET_DODGE: + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)展开防御攻击(%s)躲开了(%.2f%%)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ), + // gDuckPer + //); + flg |= BCF_DODGE; + iRet = TRUE; + break; + + case BATTLE_RET_NORMAL: + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)受到(%s)的绝技攻击(%d)损伤(%d:%d:%d%%)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ), + // damage, + // CHAR_getWorkInt( attackindex, CHAR_WORKATTACKPOWER ), + // CHAR_getWorkInt( defindex, CHAR_WORKDEFENCEPOWER ), + // par + //); + //andy_edit + flg |= BATTLE_getReactFlg( defindex, react); + flg |= BCF_NORMAL; + iRet = TRUE; + break; + + case BATTLE_RET_CRITICAL: + //snprintf( szBuffer, sizeof(szBuffer), + //"(%s)受到(%s)的绝技CRITICAL(%d)损伤(%d:%d:%d%%)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ), + // damage, + // CHAR_getWorkInt( attackindex, CHAR_WORKATTACKPOWER ), + // CHAR_getWorkInt( defindex, CHAR_WORKDEFENCEPOWER ), + // par + //); + flg |= BCF_KAISHIN; + iRet = FALSE; + //andy_edit + flg |= BATTLE_getReactFlg( defindex, react); + break; +#ifdef _EQUIT_ARRANGE + case BATTLE_RET_ARRANGE: + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)攻击了(%s)挡掉了(%.2f%%)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ), + // gDuckPer + //); + flg |= BCF_B_ARRANGE; + break; +#endif + } + + if( CHAR_getWorkInt( defindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_GUARD + && CHAR_getWorkInt( defindex, CHAR_WORKCONFUSION ) <= 0 + ){ + strncat( szBuffer, "(GUARD)", sizeof( szBuffer ) ); + flg |= BCF_GUARD; + flg |= BCF_GBREAK; + iRet = FALSE; + } + + if( CHAR_getInt( defindex, CHAR_HP ) <= 0 ){ + if( CHAR_getWorkInt( defindex, CHAR_WORKBATTLEFLG ) & CHAR_BATTLEFLG_ABIO ){ + ultimate = 1; + }else if( CHAR_getInt( defindex, CHAR_WHICHTYPE ) == CHAR_TYPEENEMY && flg & BCF_KAISHIN ){ + if( RAND( 1, 100 ) < 50 ){ + ultimate = 1; + } + } +#ifdef _PETSKILL_LER +// 雷尔不能被打飞 + if(CHAR_getInt(defindex,CHAR_BASEBASEIMAGENUMBER) == 101813 || + CHAR_getInt(defindex,CHAR_BASEBASEIMAGENUMBER) == 101814) ultimate = 0; +#endif + iRet = FALSE; + flg |= BCF_DEATH; + + if( ultimate == 1 ){ + flg |= BCF_ULTIMATE_1; + strcat( szBuffer, "ultimate嘆" ); + } + if( ultimate == 2 ){ + flg |= BCF_ULTIMATE_2; + strcat( szBuffer, "ultimate嘇" ); + } + } + + if( damage > 0 ){ +#ifdef _TAKE_ITEMDAMAGE + if( BATTLE_ItemCrushSeq( attackindex, defindex, damage) == TRUE ){ +#else + if( BATTLE_ItemCrushSeq( defindex ) == TRUE ){ +#endif + flg |= BCF_CRUSH; + } + } + +#ifdef _NOTRIDE_ + snprintf( szCommand, sizeof( szCommand ), + "BH|a%X|r%X|f%X|d%X|FF|", + attackNo, + defNo, + flg, + damage ); +#else + snprintf( szCommand, sizeof( szCommand ), + "BH|a%X|r%X|f%X|d%X|p%X|FF|", + attackNo, + defNo, + flg, + damage, + petdamage + ); +#endif + + BATTLESTR_ADD( szCommand ); + + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + + i = defNo-DefSide*SIDE_OFFSET; + if( ultimate > 0 ){ + BattleArray[battleindex].Side[DefSide].Entry[i].flg |= BENT_FLG_ULTIMATE; + } + + return iRet; + +} +#endif + + +int BATTLE_Charge( int battleindex, int attackNo ) +{ + //char szBuffer[512]=""; + int attackindex, iWork, N, pow; + + attackindex = BATTLE_No2Index( battleindex, attackNo ); + + iWork = CHAR_GETWORKINT_LOW( attackindex, CHAR_WORKBATTLECOM3 ); + + if( iWork <= 0 ){ + + N = CHAR_GETWORKINT_HIGH( attackindex, CHAR_WORKBATTLECOM3 ); + pow = CHAR_getWorkInt( attackindex, CHAR_WORKFIXSTR ); + pow += pow * N * 0.01; + CHAR_setWorkInt( attackindex, CHAR_WORKATTACKPOWER, + pow + CHAR_getWorkInt( attackindex, CHAR_WORKMODATTACK ) ); + + CHAR_setWorkInt( attackindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_CHARGE_OK ); + return TRUE; + }else{ + + CHAR_SETWORKINT_LOW( attackindex, CHAR_WORKBATTLECOM3, iWork - 1); + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)保持体力中。", + // CHAR_getUseName( attackindex ) + //); + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + + BATTLE_NoAction( battleindex, attackNo ); + + return FALSE; + } +} + +//状态攻击命中判定 +int BATTLE_StatusAttackCheck( + int attackindex, + int defindex, + int status, + int PerOffset, + int Range, + float Bai, + int *pPer +) +{ + + int Df_Reg = 0, level = 0, per = 0, i ; + int battleindex; + if( status >= BATTLE_ST_END || status <= 0 )return FALSE; + for( i = 1; i < BATTLE_ST_END; i++ ){//若已有异常状态则return + if( CHAR_getWorkInt( defindex, StatusTbl[i] ) > 0 )return FALSE; + } + + if( status == BATTLE_ST_PARALYSIS){ + per = 20; + per -= CHAR_getWorkInt( defindex, RegTbl[status] ); + *pPer = per; + }else{ + float templP = 0.0; + float fVitalP = 0.0; + fVitalP = CHAR_getInt( defindex, CHAR_VITAL ) + + CHAR_getInt( defindex, CHAR_STR ) + + CHAR_getInt( defindex, CHAR_TOUGH ) + + CHAR_getInt( defindex, CHAR_DEX ); + + templP = (float)CHAR_getInt( defindex, CHAR_VITAL ) / (fVitalP); + +#ifdef _PET_SKILL_SARS //andy_add 2003/06/20 + if( status == BATTLE_ST_SARS ){ + templP = (1 - templP)*0.9; + } +#endif + + fVitalP = templP / 0.25; + + if( CHAR_getInt( defindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + fVitalP *= 10.0; + }else{ + if( CHAR_getInt( defindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET ){ + fVitalP *= 10.0; + }else{ + if( CHAR_getInt( defindex, CHAR_WHICHTYPE ) == CHAR_TYPEENEMY ){ + fVitalP *= 10.0; + }else{ + fVitalP *= 10.0; + } + } + } + + if( status >= arraysizeof( RegTbl) || status < 0 ) { + Df_Reg = 0; + }else { + Df_Reg = CHAR_getWorkInt( defindex, RegTbl[status] ); + } + + battleindex = CHAR_getWorkInt( attackindex, CHAR_WORKBATTLEINDEX ); + if( BattleArray[battleindex].type != BATTLE_TYPE_P_vs_P ){ + level = CHAR_getInt( attackindex, CHAR_LV ) + - CHAR_getInt( defindex, CHAR_LV ); + level *= Bai; + }else{ + level = 0; + } + if( level > Range )level = Range; + if( level < -Range )level = -Range; + +#ifdef _SUIT_ADDENDUM + per = PerOffset + level + CHAR_getWorkInt( attackindex, CHAR_WORKFIXLUCK ) + - Df_Reg - fVitalP - CHAR_getWorkInt( defindex, CHAR_WORKRESIST ); +#else + per = PerOffset + level + CHAR_getWorkInt( attackindex, CHAR_WORKFIXLUCK ) + - Df_Reg - fVitalP; +#endif //_SUIT_ADDENDUM +#ifdef _EQUIT_RESIST + if( status == CHAR_WORKWEAKEN ) + per -= CHAR_getWorkInt( defindex, CHAR_WORKEQUITWEAKEN ); + else if( status == CHAR_WORKBARRIER ) + per -= CHAR_getWorkInt( defindex, CHAR_WORKEQUITBARRIER ); + else if( status == CHAR_WORKNOCAST ) + per -= CHAR_getWorkInt( defindex, CHAR_WORKEQUITNOCAST ); +#endif //_EQUIT_RESIST +#ifdef _SUIT_ADDPART3 + if( status == CHAR_WORKWEAKEN ) + per -= CHAR_getWorkInt( defindex, CHAR_WORKRENOCAST ); +#endif + if( per > 80 )per = 80; + *pPer = per; + } + + if( RAND( 1, 100 ) < per ){ + return TRUE; + }else{ + return FALSE; + } +} + +//职业技能状态攻击命中判定 +int PROFESSION_BATTLE_StatusAttackCheck( int charaindex, int toindex, int status, int Success ) +{ + int rand_num = RAND( 1, 100 ); + int i; + + if( status >= BATTLE_ST_END || status <= 0 ) return 0; + if( CHAR_getInt( toindex , CHAR_HP) <= 0 ) return 0; + if( CHAR_getFlg( toindex, CHAR_ISDIE ) == TRUE ) return 0; + +#ifdef _PROFESSION_ADDSKILL + if( status == BATTLE_ST_RESIST_F_I_T ){//自然威能 + if( CHAR_getWorkInt( toindex, StatusTbl[BATTLE_ST_RESIST_F] ) > 0 ) return 0; + if( CHAR_getWorkInt( toindex, StatusTbl[BATTLE_ST_RESIST_I] ) > 0 ) return 0; + if( CHAR_getWorkInt( toindex, StatusTbl[BATTLE_ST_RESIST_T] ) > 0 ) return 0; + return 1; + } + if( status == CHAR_WORKICECRACK + || status == CHAR_WORKICECRACK2 + || status == CHAR_WORKICECRACK3 + || status == CHAR_WORKICECRACK4 + || status == CHAR_WORKICECRACK5 + || status == CHAR_WORKICECRACK6 + || status == CHAR_WORKICECRACK7 + || status == CHAR_WORKICECRACK8 + || status == CHAR_WORKICECRACK9 + || status == CHAR_WORKICECRACK10){ + return 1; + } +#endif + + for( i = 1; i < BATTLE_ST_END; i++ ){//若已有异常状态则return + if( CHAR_getWorkInt( toindex, StatusTbl[i] ) > 0 ) return 0; + } + + if( rand_num < Success ){ + return 1; + }else{ + return 0; + } +} + + + +int BATTLE_Combo( int battleindex, int *pAttackList, int defNo ) +{ + char szBuffer[512]=""; + char szCommand[1024]; + int damage = 0, petdamage = 0, + attackindex, + toindex, + defindex, + ultimate = 0, + AllDamage = 0, + AllPetDamage = 0, + react = 0, + attackNo; + int flg = 0, iWork, par, i, DefSide = 0, + Guardian = -2; + BOOL iRet = FALSE; + + defindex = toindex = BATTLE_No2Index( battleindex, defNo ); + + //BATTLE_BroadCast( battleindex, "发动必杀技!!", + // (pAttackList[0] >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + + for( i = 0; pAttackList[i] != -1 && i < BATTLE_ENTRY_MAX; i ++ ){ + attackNo = pAttackList[i]; + + defindex = toindex; + + flg = 0; + + attackindex = BATTLE_No2Index( battleindex, attackNo ); + + if( CHAR_getInt( toindex, CHAR_HP ) <= 0 ){ + return FALSE; + } + + if( CHAR_getInt( attackindex, CHAR_HP ) <= 0 ){ + return FALSE; + } + + Guardian = -2; + iWork = BATTLE_AttackSeq( attackindex, toindex, &damage, + &Guardian, BATTLE_COM_COMBO ); + Guardian = -1; + if( damage <= 0 )damage = 1; + + par = BATTLE_AttrAdjust( attackindex, defindex, 100 ); + + react = BATTLE_GetDamageReact( defindex ); + if( ( react == BATTLE_MD_REFLEC +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + || react == BATTLE_MD_TRAP +#endif +#ifdef _PETSKILL_ACUPUNCTURE + || react == BATTLE_MD_ACUPUNCTURE +#endif + ) && BATTLE_IsThrowWepon( CHAR_getItemIndex( attackindex, CHAR_ARM ) ) == FALSE ){ + + int refrect = 0; + BATTLE_DamageSub( attackindex, + defindex, &damage, &petdamage, &refrect ); + }else + if( react == BATTLE_MD_ABSROB + || react == BATTLE_MD_VANISH + ){ + int refrect = 0; + BATTLE_DamageSub( attackindex, + defindex, &damage, &petdamage, &refrect ); + }else{ + + BATTLE_DamageSubCale( attackindex, + defindex, &damage, &petdamage ); + AllDamage += damage; + AllPetDamage += petdamage; + } + + if( pAttackList[i+1] == -1 ){ + int refrect = -1; + ultimate = BATTLE_DamageSub2( attackindex, + defindex, &AllDamage, &AllPetDamage, &refrect ); + } + if( react == BATTLE_MD_REFLEC ){ + defindex = attackindex; + } +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + if( react == BATTLE_MD_TRAP ) defindex = attackindex; +#endif +#ifdef _PETSKILL_ACUPUNCTURE + if( react == BATTLE_MD_ACUPUNCTURE ) defindex = attackindex; +#endif + if( damage > 0 && ( react != BATTLE_MD_ABSROB )&& ( react != BATTLE_MD_VANISH )){ + BATTLE_DamageWakeUp( battleindex, defindex ); + } + + szBuffer[0] = 0; + switch( iWork ){ + + case BATTLE_RET_MISS: + case BATTLE_RET_ALLGUARD: + case BATTLE_RET_NORMAL: + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)受到(%s)的攻击(%d)遭受损伤(%d:%d:%d%%)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ), + // damage, + // CHAR_getWorkInt( attackindex, CHAR_WORKATTACKPOWER ), + // CHAR_getWorkInt( defindex, CHAR_WORKDEFENCEPOWER ), + // par + //); + flg |= BCF_NORMAL; + iRet = TRUE; + //andy_edit + flg |= BATTLE_getReactFlg( defindex, react); + break; + + case BATTLE_RET_CRITICAL: + //snprintf( szBuffer, sizeof(szBuffer), + //"(%s)向(%s)CRITICAL(%d%%)(%d)不可以(%d:%d:%d%%)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ), + // (int)(gCriper*0.01), + // damage, + // CHAR_getWorkInt( attackindex, CHAR_WORKATTACKPOWER ), + // CHAR_getWorkInt( defindex, CHAR_WORKDEFENCEPOWER ), + // par + //); + flg |= BCF_KAISHIN; + iRet = FALSE; + //andy_edit + flg |= BATTLE_getReactFlg( defindex, react); + break; + + } + + if( CHAR_getWorkInt( defindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_GUARD + && CHAR_getWorkInt( defindex, CHAR_WORKCONFUSION ) <= 0 + ){ + strncat( szBuffer, "(GUARD)", sizeof( szBuffer ) ); + flg |= BCF_GUARD; + iRet = FALSE; + } + + if( CHAR_getInt( defindex, CHAR_HP ) <= 0 ){ + + if( CHAR_getWorkInt( defindex, CHAR_WORKBATTLEFLG ) & CHAR_BATTLEFLG_ABIO ){ + ultimate = 1; + }else + + if( CHAR_getInt( defindex, CHAR_WHICHTYPE ) == CHAR_TYPEENEMY + && flg & BCF_KAISHIN + ){ + if( RAND( 1, 100 ) < 50 ){ + ultimate = 1; + } + } +#ifdef _PETSKILL_LER +// 雷尔不能被打飞 + if(CHAR_getInt(defindex,CHAR_BASEBASEIMAGENUMBER) == 101813 || + CHAR_getInt(defindex,CHAR_BASEBASEIMAGENUMBER) == 101814) ultimate = 0; +#endif + iRet = FALSE; + flg |= BCF_DEATH; + + if( ultimate == 1 ){ + flg |= BCF_ULTIMATE_1; + strcat( szBuffer, "ultimate嘆" ); + } + if( ultimate == 2 ){ + flg |= BCF_ULTIMATE_2; + strcat( szBuffer, "ultimate嘇" ); + } + } + + if( damage > 0 ){ +#ifdef _TAKE_ITEMDAMAGE + if( BATTLE_ItemCrushSeq( attackindex, defindex, damage) == TRUE ){ +#else + if( BATTLE_ItemCrushSeq( defindex ) == TRUE ){ +#endif + flg |= BCF_CRUSH; + } + } +#ifdef _NOTRIDE_ + if( 0 <= Guardian && Guardian <= 19 ){ + iRet = FALSE; + flg |= BCF_GUARDIAN; + snprintf( szCommand, sizeof( szCommand ), + "a%X|f%X|d%X|g%X|", + attackNo, + flg, + damage, + Guardian ); + }else{ + snprintf( szCommand, sizeof( szCommand ), + "a%X|f%X|d%X|", + attackNo, + flg, + damage ); + } +#else + if( 0 <= Guardian && Guardian <= 19 ){ + iRet = FALSE; + flg |= BCF_GUARDIAN; + snprintf( szCommand, sizeof( szCommand ), + "a%X|f%X|d%X|p%X|g%X|", + attackNo, + flg, + damage, + petdamage, + Guardian ); + }else{ + snprintf( szCommand, sizeof( szCommand ), + "a%X|f%X|d%X|p%X|", + attackNo, + flg, + damage, + petdamage ); + } + +#endif + BATTLESTR_ADD( szCommand ); + + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + + defNo = BATTLE_Index2No( battleindex, defindex ); + + if( defNo >= SIDE_OFFSET ){ + iWork = defNo - SIDE_OFFSET; + DefSide = 1; + }else{ + iWork = defNo; + } + + iWork = defNo-DefSide*SIDE_OFFSET; + if( ultimate > 0 ){ + BattleArray[battleindex].Side[DefSide].Entry[iWork].flg |= BENT_FLG_ULTIMATE; + } + + } + + return iRet; +} + + + +int BATTLE_EarthRoundHide( int battleindex, int attackNo ) +{ + //char szBuffer[512]=""; + char szCommand[1024]; + int attackindex, flg = 0 ; + + szCommand[0] = 0; + + attackindex = BATTLE_No2Index( battleindex, attackNo ); + + sprintf( szCommand, "BF|%X|", attackNo ); + BATTLESTR_ADD( szCommand ); + + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)绕到背後去。", + // CHAR_getUseName( attackindex ) + //); + + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + + CHAR_setFlg( attackindex, CHAR_ISATTACKED, 0 ); + + CHAR_setWorkInt( attackindex, CHAR_WORKBATTLECOM1, + BATTLE_COM_S_EARTHROUND0 ); + + return ( flg )?(TRUE):(FALSE); + +} + + + +BOOL BATTLE_LostEscape( int battleindex, int attackNo ) +{ + char szBuffer[512]=""; + char szCommand[1024]; + int attackindex, flg = FALSE, side, SubNo, + oyaindex, pno; + + attackindex = BATTLE_No2Index( battleindex, attackNo ); + + if( attackNo >= SIDE_OFFSET ){ + side = 1; SubNo = attackNo - SIDE_OFFSET; + }else{ + side = 0; SubNo = attackNo; + } + + oyaindex = CHAR_getWorkInt( attackindex, CHAR_WORKPLAYERINDEX ); + + pno = CHAR_getInt( oyaindex, CHAR_DEFAULTPET ); + if( pno < 0 )return FALSE; + +#if 0 // nono宠逃走改休息 + CHAR_setCharPet( oyaindex, pno, -1); +#else + print(" nono宠改休息 "); +#endif + + BATTLE_Exit( attackindex, battleindex ); + + CHAR_setInt( oyaindex, CHAR_DEFAULTPET, -1 ); + + CHAR_AddCharm( oyaindex, CH_FIX_PETESCAPE ); + + LogPet( + CHAR_getUseName( oyaindex ), + CHAR_getUseID( oyaindex ), + CHAR_getChar( attackindex, CHAR_NAME ), + CHAR_getInt( attackindex, CHAR_LV ), +#if 0 // nono宠逃走改休息 + "EscapeLost(战斗逃走)", +#else + "EscapeLost(战斗逃走并回收)", +#endif + CHAR_getInt( oyaindex, CHAR_FLOOR ), + CHAR_getInt( oyaindex, CHAR_X ), + CHAR_getInt( oyaindex, CHAR_Y ), + CHAR_getChar( attackindex, CHAR_UNIQUECODE) // shan 2001/12/14 + ); + + //snprintf( szBuffer, sizeof(szBuffer), "(%s)走掉了。", + // CHAR_getUseName( attackindex ) + //); + //if( getBattleDebugMsg( ) != 0 ){ + // BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + //} + + sprintf( szCommand, "BQ|e%X|", attackNo ); + BATTLESTR_ADD( szCommand ); + + snprintf( szBuffer, sizeof( szBuffer ), "K%d", pno ); + + CHAR_sendStatusString( oyaindex, szBuffer ); + + + + return ( flg )?(TRUE):(FALSE); + + +} + +BOOL BATTLE_Abduct( + int battleindex, + int attackNo, + int defNo, + int array +) +{ + //char szBuffer[512]=""; + char szCommand[1024]; +#ifdef _BATTLE_ABDUCTII + char *pszP=NULL; +#endif + int attackindex, defindex, per, flg, attackoyaindex, defoyaindex = -1; + int attacklevel, deflevel; + int Attacktype, Deftype; + BOOL iRet = FALSE; + + attackindex = BATTLE_No2Index( battleindex, attackNo ); + defindex = BATTLE_No2Index( battleindex, defNo ); + if( CHAR_CHECKINDEX( attackindex ) == FALSE ) return iRet; + if( CHAR_CHECKINDEX( defindex ) == FALSE ) return iRet; +#ifdef _BATTLE_ABDUCTII + // 取得宠物技能命令 + pszP = PETSKILL_getChar( array, PETSKILL_OPTION ); + if( pszP == NULL ) return iRet; +#endif + + //ANDY_ReEdit + Attacktype = CHAR_getInt( attackindex, CHAR_WHICHTYPE); + if( Attacktype == CHAR_TYPEENEMY ) { + attackoyaindex = -1; + }else if( Attacktype == CHAR_TYPEPET ) { + attackoyaindex = CHAR_getWorkInt( attackindex, CHAR_WORKPLAYERINDEX ); + if( CHAR_CHECKINDEX( attackoyaindex ) == FALSE ) return iRet; + }else { + return iRet; + } + //ANDY_ReEdit + Deftype = CHAR_getInt( defindex, CHAR_WHICHTYPE ); + if( Deftype == CHAR_TYPEPET ){ + defoyaindex = CHAR_getWorkInt( defindex, CHAR_WORKPLAYERINDEX ); + if( CHAR_CHECKINDEX( defoyaindex ) == FALSE ) return iRet; + }else { + defoyaindex = -1; + } + + if( Deftype != CHAR_TYPEPLAYER ){ +#ifdef _BATTLE_ABDUCTII + int AiPer=0; + // 取得宠物技能命令 + AiPer = atoi( pszP); + if( AiPer <= 0 || Deftype != CHAR_TYPEPET ){ +#endif + attacklevel = CHAR_getInt( attackindex, CHAR_LV ); + deflevel = CHAR_getInt( defindex, CHAR_LV ); + per = ( deflevel - attacklevel ) * 0.6 + 30; + per = max( per, 50 ); +#ifdef _BATTLE_ABDUCTII + }else { + per = 0; + if( CHAR_getWorkInt( defindex, CHAR_WORKFIXAI) < AiPer ){ + per = 200; + } + } +#endif + }else{ + per = 0; + return iRet; + } + if( BattleArray[battleindex].WinFunc != NULL ){ + per = 0; + } + + iRet = TRUE; + if( RAND( 1, 100 ) < per ){ + flg = 1; + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)带着(%s)离开该处(%d%%)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ), + // per + //); + if( Deftype == CHAR_TYPEPET ){ + BATTLE_PetDefaultExit( defoyaindex, battleindex ); + CHAR_setInt( defoyaindex, CHAR_DEFAULTPET, -1 ); + }else if( Deftype == CHAR_TYPEENEMY ) { + BATTLE_Exit( defindex, battleindex ); + } + }else{ + flg = 0; + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)无法带离(%s)一个人默默地离开(%d%%)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ), + // per + //); + } + + //if( getBattleDebugMsg( ) != 0 ){ + // BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + //} + sprintf( szCommand, "B!|a%X|d%X|f%X|", attackNo, defNo, flg ); + BATTLESTR_ADD( szCommand ); + + //ANDY_ReEdit + if( Attacktype == CHAR_TYPEPET ) { + BATTLE_PetDefaultExit( attackoyaindex, battleindex ); + CHAR_setInt( attackoyaindex, CHAR_DEFAULTPET, -1 ); + }else { + BATTLE_Exit( attackindex, battleindex); + } + return iRet; +} +#ifdef _BATTLESTEAL_FIX +void BATTLE_StealMoney( int battleindex, int attackNo, int defNo) +{ + char szBuffer[512]=""; + char szCommand[1024]; + int attackindex, defindex, per; + int S_FLG = 0, GOLD = 0; + int LV=0; + char buf1[256]; + int masterindex; + int safeSide=0; + + if( BATTLE_CHECKINDEX( battleindex) == FALSE ) return; + attackindex = BATTLE_No2Index( battleindex, attackNo ); + if( CHAR_CHECKINDEX( attackindex ) == FALSE ) return; + defindex = BATTLE_No2Index( battleindex, defNo ); + if( CHAR_CHECKINDEX( defindex ) == FALSE ) return; + masterindex = CHAR_getWorkInt( attackindex, CHAR_WORKPLAYERINDEX ); + if( !CHAR_CHECKINDEX( masterindex ) ) return; + LV = CHAR_getInt( defindex, CHAR_LV ); + per = 0; + if( CHAR_getInt( defindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ) { + if( attackNo > 10 ) { + safeSide = 1; + } + if( defNo>=safeSide*SIDE_OFFSET && defNo<((safeSide*SIDE_OFFSET)+SIDE_OFFSET)){//同边 + per = 0; + }else { //不同边 + per = 50; + per = (((per+LV)/4)+10)>>1; + } + }else if( CHAR_getInt( defindex, CHAR_WHICHTYPE ) == CHAR_TYPEENEMY ) { + per=5; + } + S_FLG = 0; + + + + if( CHAR_getInt( attackindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET ) { + if( CHAR_getInt( masterindex, CHAR_GOLD) >= CHAR_getMaxHaveGold( masterindex) ) + per = 0; + } + + if( RAND( 1, 100 ) < per ){ + S_FLG = 1; + if( CHAR_getInt( defindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ) { + GOLD = CHAR_getInt( defindex, CHAR_GOLD ); + GOLD = (int)( (float)GOLD * RAND( 1, 15 ) * 0.01 ); + if( (CHAR_getInt( masterindex, CHAR_GOLD) + GOLD) >= CHAR_getMaxHaveGold( masterindex) ) { + GOLD = CHAR_getMaxHaveGold( masterindex) - CHAR_getInt( masterindex, CHAR_GOLD); + } + }else { + GOLD = RAND( 10, 100); + } + if( GOLD <= 0 ){ + S_FLG = 0; + }else{ + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)从(%s)获得了(%d)STONE(%d%%)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ), + // GOLD, + // per + // ); + if( CHAR_getInt( defindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ) { + CHAR_setInt( defindex, CHAR_GOLD, CHAR_getInt( defindex, CHAR_GOLD ) - GOLD ); + CHAR_send_P_StatusString( defindex, CHAR_P_STRING_GOLD ); + } + } + }else{ + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)没从(%s)获得东西(%d%%)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ), + // per + //); + } + sprintf( buf1, "被偷了一些石币"); + if( S_FLG) { + sprintf( szBuffer, "BK|%s%s。|", CHAR_getUseName( defindex ), buf1 ); + strcat( szBadStatusString, szBuffer ); + if( CHAR_getInt( attackindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET ){ + int attackoyaindex = CHAR_getWorkInt( attackindex, CHAR_WORKPLAYERINDEX ); + if( CHAR_CHECKINDEX( attackoyaindex ) == TRUE ){ + BATTLE_PetDefaultExit( attackoyaindex, battleindex ); + CHAR_setInt( attackoyaindex, CHAR_DEFAULTPET, -1 ); + { + int playergold=CHAR_getInt( attackoyaindex, CHAR_GOLD)+GOLD; + if( playergold > CHAR_getMaxHaveGold( attackoyaindex) ) playergold = CHAR_getMaxHaveGold( attackoyaindex); + CHAR_setInt( attackoyaindex, CHAR_GOLD , playergold); + CHAR_send_P_StatusString( attackoyaindex, CHAR_P_STRING_GOLD ); + } + lssproto_KS_send( getfdFromCharaIndex( attackoyaindex ), + CHAR_getInt( attackoyaindex, CHAR_DEFAULTPET ), 1 ); + } + BATTLE_Exit( attackindex, battleindex ); + }else{ + BATTLE_Exit( attackindex, battleindex ); + } + } + //if( getBattleDebugMsg( ) != 0 ) { + // BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + //} + sprintf( szCommand, "B#|a%X|d%X|f%X|", attackNo, defNo, S_FLG ); + BATTLESTR_ADD( szCommand ); +} +#endif + +void BATTLE_Steal( int battleindex, int attackNo, int defNo ) +{ + char szBuffer[512]=""; + char szCommand[1024]; + int attackindex, defindex, per, flg, i, j; + int enemytype, stealmode = 0, gold, itemindex; + int itemtbl[CHAR_MAXITEMNUM]; + + attackindex = BATTLE_No2Index( battleindex, attackNo ); + if( CHAR_CHECKINDEX( attackindex ) == FALSE )return; + defindex = BATTLE_No2Index( battleindex, defNo ); + if( CHAR_CHECKINDEX( defindex ) == FALSE )return; + enemytype = CHAR_getInt( defindex, CHAR_WHICHTYPE ); + if( enemytype == CHAR_TYPEPLAYER ){ + per = 50; + }else{ + per = 0; + } + + if( RAND( 1, 100 ) < per ){ + flg = 1; + if( RAND( 1, 100 ) < 50 ){ + stealmode = 0; + gold = CHAR_getInt( defindex, CHAR_GOLD ); + gold = (int)( (float)gold * RAND( 8, 12 ) * 0.01 ); + if( gold <= 0 ){ + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)无法获得(%s)的STONE(%d%%)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ), + // per + //); + flg = 0; + }else{ + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)从(%s)获得了(%d)STONE(%d%%)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ), + // gold, + // per + //); + CHAR_setInt( defindex, CHAR_GOLD, + CHAR_getInt( defindex, CHAR_GOLD ) - gold ); + CHAR_send_P_StatusString( defindex, CHAR_P_STRING_GOLD ); + } + }else{ + stealmode = 1; + for( j = 0, i = CHAR_STARTITEMARRAY; i < CHAR_MAXITEMHAVE; i ++ ){ + itemindex = CHAR_getItemIndex( defindex, i ); + if( ITEM_CHECKINDEX( itemindex ) == TRUE ){ + itemtbl[j++] = i; + } + } + if( j <= 0 ){ + itemindex = -1; + }else{ + itemindex = -1; + i = RAND( 0, j-1 ); + if( i >= 0 ){ + if( 0 <= itemtbl[i] && itemtbl[i] < CHAR_STARTITEMARRAY ){ + fprint( "err:要盗取装备品(%d)\n", itemtbl[i] ); + }else{ + itemindex = CHAR_getItemIndex( defindex, itemtbl[i] ); + } + } + } + if( itemindex == - 1 ){ + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)无法获得(%s)的道具(%d%%)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ), + // per + //); + flg = 0; + }else{ + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)从(%s)获得了(%s)(%d%%)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ), + // ITEM_getAppropriateName( itemindex ), + // per + //); + CHAR_setItemIndex( defindex, itemtbl[i], -1 ); + CHAR_sendItemDataOne( defindex, itemtbl[i] ); + { + LogItem( + CHAR_getChar( defindex, CHAR_NAME ), + CHAR_getChar( defindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), +#endif + "Stealed(偷窃的道具)", + CHAR_getInt( defindex,CHAR_FLOOR), + CHAR_getInt( defindex,CHAR_X ), + CHAR_getInt( defindex,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + } + ITEM_endExistItemsOne( itemindex ); + } + } + }else{ + flg = 0; + //snprintf( szBuffer, sizeof(szBuffer), "(%s)没从(%s)获得东西(%d%%)", + // CHAR_getUseName( attackindex ), CHAR_getUseName( defindex ), per ); + } + if( flg == 1 ){ + sprintf( szBuffer, "BK|%s被偷了一些东西。|", + CHAR_getUseName( defindex ) ); + strcat( szBadStatusString, szBuffer ); + if( CHAR_getInt( attackindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET ){ + int attackoyaindex = CHAR_getWorkInt( attackindex, CHAR_WORKPLAYERINDEX ); + if( CHAR_CHECKINDEX( attackoyaindex ) == TRUE ){ + BATTLE_PetDefaultExit( attackoyaindex, battleindex ); + CHAR_setInt( attackoyaindex, CHAR_DEFAULTPET, -1 ); + }else{ + BATTLE_Exit( attackindex, battleindex ); + } + }else{ + BATTLE_Exit( attackindex, battleindex ); + } + } + //if( getBattleDebugMsg( ) != 0 ){ + // BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + //} + sprintf( szCommand, "B#|a%X|d%X|f%X|", attackNo, defNo, flg ); + BATTLESTR_ADD( szCommand ); +} + +#ifdef _PSKILL_FALLGROUND //落马术 +int BATTLE_S_FallGround( int battleindex, int attackNo, int defNo, int skill_type) +{ + char szBuffer[512]=""; + char szCommand[1024]; + int attackindex, defindex; + int damage=0, petdamage=0, i=0, iWork, Guardian=-1; + int flg = 0, DefSide=0,par,ultimate=0, react=0; + BOOL iRet = FALSE; + attackindex = BATTLE_No2Index( battleindex, attackNo ); //攻方index + defindex = BATTLE_No2Index( battleindex, defNo ); //守方index + + + if( defNo >= SIDE_OFFSET ){ + i = defNo - SIDE_OFFSET; + DefSide = 1; + } + react = 0; + react = BATTLE_GetDamageReact( defindex);//有光镜守 + //取得攻击後状态 + iWork = BATTLE_AttackSeq( attackindex, defindex, &damage, + &Guardian, BATTLE_COM_S_FALLRIDE ); + + + ultimate = BATTLE_DamageSub( attackindex, defindex, &damage, &petdamage, &react ); + if( react == BATTLE_MD_REFLEC ) defindex = attackindex; + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + if( react == BATTLE_MD_TRAP ) defindex = attackindex; +#endif +#ifdef _PETSKILL_ACUPUNCTURE + if( react == BATTLE_MD_ACUPUNCTURE ) defindex = attackindex; +#endif + if( damage > 0 && ( react != BATTLE_MD_ABSROB )&& ( react != BATTLE_MD_VANISH )){ + BATTLE_DamageWakeUp( battleindex, defindex ); + } + par = BATTLE_AttrAdjust( attackindex, defindex, 100 ); + + + + switch( iWork ){ + case BATTLE_RET_ALLGUARD: + case BATTLE_RET_MISS: + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)朝向(%s)发动绝技,没击中。", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ) + //); + iRet = TRUE; + break; + case BATTLE_RET_DODGE: + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)展开防御攻击(%s)躲开了(%.2f%%)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ), + // gDuckPer + //); + flg |= BCF_DODGE; + iRet = TRUE; + break; + case BATTLE_RET_NORMAL: + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)受到(%s)的绝技攻击(%d)损伤(%d:%d:%d%%)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ), + // damage, + // CHAR_getWorkInt( attackindex, CHAR_WORKATTACKPOWER ), + // CHAR_getWorkInt( defindex, CHAR_WORKDEFENCEPOWER ), + // par + //); + //andy_edit + flg |= BATTLE_getReactFlg( defindex, react); + flg |= BCF_NORMAL; + iRet = TRUE; + break; + case BATTLE_RET_CRITICAL: + //snprintf( szBuffer, sizeof(szBuffer), + //"(%s)受到(%s)的绝技CRITICAL(%d)损伤(%d:%d:%d%%)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ), + // damage, + // CHAR_getWorkInt( attackindex, CHAR_WORKATTACKPOWER ), + // CHAR_getWorkInt( defindex, CHAR_WORKDEFENCEPOWER ), + // par + //); + flg |= BCF_KAISHIN; + iRet = FALSE; + flg |= BATTLE_getReactFlg( defindex, react); + break; +#ifdef _EQUIT_ARRANGE + case BATTLE_RET_ARRANGE: + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)攻击了(%s)挡掉了(%.2f%%)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ), + // gDuckPer + //); + flg |= BCF_B_ARRANGE; + break; +#endif + } + + if( CHAR_getWorkInt( defindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_GUARD + && CHAR_getWorkInt( defindex, CHAR_WORKCONFUSION ) <= 0 ){ + strncat( szBuffer, "(GUARD)", sizeof( szBuffer ) ); + iRet = FALSE; + } + + if( skill_type == BATTLE_COM_S_FALLRIDE && damage > 0 && react == 0 +#ifdef _PREVENT_TEAMATTACK + && BATTLE_CheckSameSide( attackindex, defNo) == 0 +#endif + ){ //落马 + int fallflg = RAND( 0, 100); + if( +#ifdef _EQUIT_RESIST + fallflg > 50 + CHAR_getWorkInt( defindex, CHAR_WORKEQUITFALLRIDE ) +#else + fallflg > 50 +#endif + ){ + if( CHAR_getInt( defindex , CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ) { +#ifdef _FIXPETFALL //Syu ADD 修正落马术 + if( CHAR_getInt( defindex, CHAR_RIDEPET) >= 0 ) { +#else + if( CHAR_getInt( defindex, CHAR_RIDEPET) > 0 ) { +#endif + flg |= BCF_FALL; + CHAR_setInt( defindex, CHAR_RIDEPET, -1 ); + BATTLE_changeRideImage( defindex ); + CHAR_setWorkInt( defindex, CHAR_WORKPETFALL, 1 ); + } + } +#ifdef _ENEMY_FALLGROUND + else if( CHAR_getInt( defindex , CHAR_WHICHTYPE ) == CHAR_TYPEENEMY ) { + if( CHAR_getInt( defindex, CHAR_RIDEPET) > 0 ) { + CHAR_setInt( defindex, CHAR_RIDEPET, -1 ); + BATTLE_changeRideImage( defindex ); + CHAR_setWorkInt( defindex, CHAR_WORKPETFALL, 1 ); + + CHAR_setInt( defindex, CHAR_STR, CHAR_getInt( defindex, CHAR_STR)*0.7); + CHAR_setInt( defindex, CHAR_TOUGH, CHAR_getInt( defindex, CHAR_TOUGH)*0.7); + CHAR_setInt( defindex, CHAR_VITAL, CHAR_getInt( defindex, CHAR_VITAL)*0.7); + CHAR_complianceParameter( defindex ); + if( CHAR_getInt( defindex , CHAR_HP) > CHAR_getWorkInt( defindex , CHAR_WORKMAXHP ) ) { + CHAR_setInt( defindex , CHAR_HP , CHAR_getWorkInt( defindex , CHAR_WORKMAXHP ) ); + } + } + } +#endif + } + } + + if( CHAR_getInt( defindex, CHAR_HP ) <= 0 ){ + if( CHAR_getWorkInt( defindex, CHAR_WORKBATTLEFLG ) & CHAR_BATTLEFLG_ABIO ){ + ultimate = 1; + }else + if( CHAR_getInt( defindex, CHAR_WHICHTYPE ) == CHAR_TYPEENEMY && flg & BCF_KAISHIN ){ + if( RAND( 1, 100 ) < 50 ){ + ultimate = 1; + } + } +#ifdef _PETSKILL_LER +// 雷尔不能被打飞 + if(CHAR_getInt(defindex,CHAR_BASEBASEIMAGENUMBER) == 101813 || + CHAR_getInt(defindex,CHAR_BASEBASEIMAGENUMBER) == 101814) ultimate = 0; +#endif + iRet = FALSE; + flg |= BCF_DEATH; + if( ultimate == 1 ){ + flg |= BCF_ULTIMATE_1; + strcat( szBuffer, "ultimate嘆" ); + } + if( ultimate == 2 ){ + flg |= BCF_ULTIMATE_2; + strcat( szBuffer, "ultimate嘇" ); + } + } + if( damage > 0 ){ +#ifdef _TAKE_ITEMDAMAGE + if( BATTLE_ItemCrushSeq( attackindex, defindex, damage) == TRUE ){ +#else + if( BATTLE_ItemCrushSeq( defindex ) == TRUE ){ +#endif + flg |= BCF_CRUSH; + } + } + snprintf( szCommand, sizeof( szCommand ), "BH|a%X|r%X|f%X|d%X|p%X|FF|", + attackNo, defNo, flg, damage, petdamage ); + + BATTLESTR_ADD( szCommand ); + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + i = defNo-DefSide*SIDE_OFFSET; + if( ultimate > 0 ){ + BattleArray[battleindex].Side[DefSide].Entry[i].flg |= BENT_FLG_ULTIMATE; + } + + return iRet; +} +#endif +#ifdef _PETSKILL_EXPLODE +int BATTLE_S_Explode( int battleindex, int attackNo, int defNo, int skill_type) +{ + char szBuffer[512]=""; + char szCommand[1024]; + int attackindex, defindex; + int damage=0, petdamage=0, i=0, iWork, Guardian=-1; + int flg = 0, DefSide=0,par,ultimate=0, react=0; + BOOL iRet = FALSE; + attackindex = BATTLE_No2Index( battleindex, attackNo ); //攻方index + defindex = BATTLE_No2Index( battleindex, defNo ); //守方index + + if( defNo >= SIDE_OFFSET ){ + i = defNo - SIDE_OFFSET; + DefSide = 1; + } + react = 0; + react = BATTLE_GetDamageReact( defindex);//有光镜守 + //取得攻击後状态 + iWork = BATTLE_AttackSeq( attackindex, defindex, &damage, + &Guardian, BATTLE_COM_S_EXPLODE ); + + if( damage > 0 ){ + damage = ( CHAR_getInt(defindex,CHAR_HP) >> 1 ); + flg |= BCF_EXPLODE; + CHAR_setInt( attackindex, CHAR_HP ,1); + } + + ultimate = BATTLE_DamageSub( attackindex, defindex, &damage, &petdamage, &react ); + if( react == BATTLE_MD_REFLEC ) defindex = attackindex; + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + if( react == BATTLE_MD_TRAP ) defindex = attackindex; +#endif +#ifdef _PETSKILL_ACUPUNCTURE + if( react == BATTLE_MD_ACUPUNCTURE ) defindex = attackindex; +#endif + if( damage > 0 && ( react != BATTLE_MD_ABSROB )&& ( react != BATTLE_MD_VANISH )){ + BATTLE_DamageWakeUp( battleindex, defindex ); + } + par = BATTLE_AttrAdjust( attackindex, defindex, 100 ); + + switch( iWork ){ + case BATTLE_RET_ALLGUARD: + case BATTLE_RET_MISS: + iRet = TRUE; + break; + case BATTLE_RET_DODGE: + flg |= BCF_DODGE; + iRet = TRUE; + break; + case BATTLE_RET_NORMAL: + flg |= BATTLE_getReactFlg( defindex, react); + flg |= BCF_NORMAL; + iRet = TRUE; + break; + case BATTLE_RET_CRITICAL: + flg |= BCF_KAISHIN; + iRet = FALSE; + flg |= BATTLE_getReactFlg( defindex, react); + break; +#ifdef _EQUIT_ARRANGE + case BATTLE_RET_ARRANGE: + flg |= BCF_B_ARRANGE; + break; +#endif + } + + if( CHAR_getWorkInt( defindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_GUARD + && CHAR_getWorkInt( defindex, CHAR_WORKCONFUSION ) <= 0 ){ + strncat( szBuffer, "(GUARD)", sizeof( szBuffer ) ); + iRet = FALSE; + } + + if( skill_type == BATTLE_COM_S_EXPLODE && damage > 0 && react == 0 +#ifdef _PREVENT_TEAMATTACK + && BATTLE_CheckSameSide( attackindex, defNo) == 0 +#endif + ){ //落马 + int fallflg = 100;//= RAND( 0, 100); + if( +#ifdef _EQUIT_RESIST + fallflg > 50 + CHAR_getWorkInt( defindex, CHAR_WORKEQUITFALLRIDE ) +#else + fallflg > 50 +#endif + ){ + if( CHAR_getInt( defindex , CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ) { +#ifdef _FIXPETFALL //Syu ADD 修正落马术 + if( CHAR_getInt( defindex, CHAR_RIDEPET) >= 0 ) { +#else + if( CHAR_getInt( defindex, CHAR_RIDEPET) > 0 ) { +#endif + flg |= BCF_FALL; + CHAR_setInt( defindex, CHAR_RIDEPET, -1 ); + BATTLE_changeRideImage( defindex ); + CHAR_setWorkInt( defindex, CHAR_WORKPETFALL, 1 ); + } + } +#ifdef _ENEMY_FALLGROUND + else if( CHAR_getInt( defindex , CHAR_WHICHTYPE ) == CHAR_TYPEENEMY ) { + if( CHAR_getInt( defindex, CHAR_RIDEPET) > 0 ) { + CHAR_setInt( defindex, CHAR_RIDEPET, -1 ); + BATTLE_changeRideImage( defindex ); + CHAR_setWorkInt( defindex, CHAR_WORKPETFALL, 1 ); + + CHAR_setInt( defindex, CHAR_STR, CHAR_getInt( defindex, CHAR_STR)*0.7); + CHAR_setInt( defindex, CHAR_TOUGH, CHAR_getInt( defindex, CHAR_TOUGH)*0.7); + CHAR_setInt( defindex, CHAR_VITAL, CHAR_getInt( defindex, CHAR_VITAL)*0.7); + CHAR_complianceParameter( defindex ); + if( CHAR_getInt( defindex , CHAR_HP) > CHAR_getWorkInt( defindex , CHAR_WORKMAXHP ) ) { + CHAR_setInt( defindex , CHAR_HP , CHAR_getWorkInt( defindex , CHAR_WORKMAXHP ) ); + } + } + } +#endif + } + } + + if( CHAR_getInt( defindex, CHAR_HP ) <= 0 ){ + if( CHAR_getWorkInt( defindex, CHAR_WORKBATTLEFLG ) & CHAR_BATTLEFLG_ABIO ){ + ultimate = 1; + }else + if( CHAR_getInt( defindex, CHAR_WHICHTYPE ) == CHAR_TYPEENEMY && flg & BCF_KAISHIN ){ + if( RAND( 1, 100 ) < 50 ){ + ultimate = 1; + } + } +#ifdef _PETSKILL_LER +// 雷尔不能被打飞 + if(CHAR_getInt(defindex,CHAR_BASEBASEIMAGENUMBER) == 101813 || + CHAR_getInt(defindex,CHAR_BASEBASEIMAGENUMBER) == 101814) ultimate = 0; +#endif + iRet = FALSE; + flg |= BCF_DEATH; + if( ultimate == 1 ){ + flg |= BCF_ULTIMATE_1; + strcat( szBuffer, "ultimate嘆" ); + } + if( ultimate == 2 ){ + flg |= BCF_ULTIMATE_2; + strcat( szBuffer, "ultimate嘇" ); + } + } + if( damage > 0 ){ +#ifdef _TAKE_ITEMDAMAGE + if( BATTLE_ItemCrushSeq( attackindex, defindex, damage) == TRUE ){ +#else + if( BATTLE_ItemCrushSeq( defindex ) == TRUE ){ +#endif + flg |= BCF_CRUSH; + } + } + snprintf( szCommand, sizeof( szCommand ), "BH|a%X|r%X|f%X|d%X|p%X|FF|", + attackNo, defNo, flg, damage, petdamage ); + + BATTLESTR_ADD( szCommand ); + i = defNo-DefSide*SIDE_OFFSET; + if( ultimate > 0 ){ + BattleArray[battleindex].Side[DefSide].Entry[i].flg |= BENT_FLG_ULTIMATE; + } + + return iRet; +} +#endif + +#ifdef _PRO_BATTLEENEMYSKILL +int BATTLE_E_ENEMYREFILE( int battleindex, int attackNo, int defNo, int skill_type ) +{ + int ReceveEffect; + BOOL iRet = FALSE; + int attackindex, defindex, pow, toNo; + + toNo=-1; + attackindex = BATTLE_No2Index( battleindex, attackNo); + + if( !CHAR_CHECKINDEX( attackindex) ) return iRet; + if( CHAR_getInt( attackindex , CHAR_WHICHTYPE ) == CHAR_TYPEENEMY ) { + int k=0, j=0, index; + int ToNoList[10]; + int l=0; + memset( ToNoList,-1, sizeof( ToNoList)); + + for( k=10;k<20;k++) { + index = BATTLE_getBattleDieIndex( battleindex, k); + if( !CHAR_CHECKINDEX( index) ) continue; + if( CHAR_getFlg( index, CHAR_ISDIE ) == TRUE ) { + ToNoList[j] = k; + j++; + } + } + if( j == 0 ) return iRet; + toNo = ToNoList[ l=RAND( 0, j-1)]; + if( toNo < 0 || toNo > 20 ) + return iRet; + for( k=0;k<10;k++) + print("\n RE[ %d. %d]", k,ToNoList[ k]); + }else if( CHAR_getInt( attackindex , CHAR_WHICHTYPE ) == CHAR_TYPEPET ) { + toNo = defNo; + }else { + return iRet; + } + if( !BATTLE_CHECKNO( toNo) ) return iRet; + ReceveEffect = SPR_fukkatu1; + defindex = BATTLE_No2Index( battleindex, toNo); + if( !CHAR_CHECKINDEX( defindex) ) return iRet; + pow = CHAR_getWorkInt( defindex, CHAR_WORKMAXHP)/2; + BATTLE_MultiRessurect( battleindex, attackNo, toNo, + pow, 0, SPR_item3, ReceveEffect ); + iRet = TRUE; + + return iRet; +} + +int BATTLE_E_ENEMYREHP( int battleindex, int attackNo, int defNo, int skill_type) +{ + BOOL iRet=FALSE; + int attackindex, defindex; + int power = 0, per = 0, HealedEffect, toNo=-1; + int kind; + + attackindex = BATTLE_No2Index( battleindex, attackNo); + if( CHAR_CHECKINDEX( attackindex ) == FALSE ) return iRet; + if( CHAR_getWorkInt( attackindex, CHAR_WORKBATTLEMODE ) == BATTLE_CHARMODE_INIT || + !CHAR_getWorkInt( attackindex, CHAR_WORKBATTLEMODE ) ){ + return iRet; + } + + if( CHAR_getInt( attackindex , CHAR_WHICHTYPE ) == CHAR_TYPEENEMY ) { + int k=0, j=0, l, index; + int ToNoList[10]; + memset( ToNoList,-1, sizeof( ToNoList)); + for( k=10;k<20;k++) { + index = BATTLE_No2Index( battleindex, k); + if( !CHAR_CHECKINDEX( index) ) continue; + if( CHAR_getInt( index, CHAR_HP) <= 0 ) continue; + if( CHAR_getInt( index, CHAR_HP) < (CHAR_getWorkInt( index, CHAR_WORKMAXHP) *2/3)) { + ToNoList[j] = k; + j++; + } + } + if( j == 0 ) return iRet; + toNo = ToNoList[ l=RAND( 0, j-1)]; + if( toNo < 0 || toNo > 20 ) + return iRet; + for( k=0;k<10;k++) + print("\n HP[ %d. %d]", k,ToNoList[ k]); + + }else if( CHAR_getInt( attackindex , CHAR_WHICHTYPE ) == CHAR_TYPEPET ) { + toNo = defNo; + }else { + return iRet; + } + defindex = BATTLE_No2Index( battleindex, toNo); + if( CHAR_CHECKINDEX( defindex ) == FALSE ) return iRet; + + kind = 0; + power = RAND( 100, CHAR_getWorkInt( defindex, CHAR_WORKMAXHP)); + HealedEffect = SPR_heal2; + +#ifdef _CHANGEITEMUSE // Syu ADD 调整战斗中使用料理设定 + BATTLE_MultiRecovery( battleindex, attackNo, toNo, + kind, power, per, SPR_item3, HealedEffect , 0); +#else + BATTLE_MultiRecovery( battleindex, attackNo, toNo, + kind, power, per, SPR_item3, HealedEffect ); +#endif + + iRet = TRUE; + return iRet; +} + +int BATTLE_E_ENEMYHELP( int battleindex, int attackNo, int defNo, int skill_type ) +{ + BOOL iRet = FALSE; + int attackindex, enindex, array; + int Side=-1, LV, i, enemynum, PetID; + //char szBuffer[256]=""; + print("\n BATTLE_E_ENEMYHELP()"); + + attackindex = BATTLE_No2Index( battleindex, attackNo); + if( CHAR_CHECKINDEX( attackindex ) == FALSE ) return iRet; + if( CHAR_getInt( attackindex , CHAR_WHICHTYPE ) != CHAR_TYPEENEMY || + BattleArray[battleindex].type == BATTLE_TYPE_P_vs_P || + CHAR_getInt( attackindex , CHAR_HP) <= 0 ) { + return iRet; + } + + if( CHAR_getInt( attackindex , CHAR_WHICHTYPE ) == CHAR_TYPEENEMY ) { + int k=0, index; + int ToNoList[10]; + memset( ToNoList,-1, sizeof( ToNoList)); + for( k=10;k<20;k++) { + index = BATTLE_No2Index( battleindex, k); + if( !CHAR_CHECKINDEX( index) ) { + break; + } + } + if( k == 20 ) return iRet; + } + LV = CHAR_getInt( attackindex, CHAR_LV ); + + PetID = CHAR_getInt( attackindex, CHAR_PETID ); + enemynum = ENEMY_getEnemyNum(); + for( i = 0; i < enemynum; i ++ ) { + //if( ENEMY_getInt( i, ENEMY_ID ) == PetID ) + if( ENEMY_getInt( i, ENEMY_TEMPNO ) == PetID ) + break; + } + if( i == enemynum ) + return iRet; + array = i; + + Side = CHAR_getWorkInt( attackindex, CHAR_WORKBATTLESIDE ); + enindex = ENEMY_createEnemy( array, RAND( (LV*0.8), LV*1.2)); + if( !CHAR_CHECKINDEX( enindex ) ) return iRet; + if( BATTLE_NewEntry( enindex, battleindex, Side) ) { + //CHAR_setWorkInt( enindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_RESCUE ); + CHAR_setWorkInt( enindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + //snprintf( szBuffer, sizeof( szBuffer ), "(%s)加入作战。", + // CHAR_getUseName( enindex ) ); + //BATTLE_BroadCast( battleindex, szBuffer, CHAR_COLORYELLOW ); + }else { + + } + iRet = TRUE; + return iRet; + +} + +#endif + +int BATTLE_DefineAttack( int attackindex, int defindex, int iWork, + char *szBuffer, int damage, int react, int *flg) +{ + int iRet; + int par; + iRet = TRUE; + par = BATTLE_AttrAdjust( attackindex, defindex, 100 ); + switch( iWork ){ + case BATTLE_RET_ALLGUARD: + case BATTLE_RET_MISS: + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)朝向(%s)发动绝技,没击中。", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ) + //); + iRet = TRUE; + break; + case BATTLE_RET_DODGE: + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)展开防御攻击(%s)躲开了(%.2f%%)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ), + // gDuckPer + //); + *flg |= BCF_DODGE; + iRet = TRUE; + break; + case BATTLE_RET_NORMAL: + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)受到(%s)的绝技攻击(%d)损伤(%d:%d:%d%%)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ), + // damage, + // CHAR_getWorkInt( attackindex, CHAR_WORKATTACKPOWER ), + // CHAR_getWorkInt( defindex, CHAR_WORKDEFENCEPOWER ), + // par + //); + + *flg |= BATTLE_getReactFlg( defindex, react); + *flg |= BCF_NORMAL; + iRet = TRUE; + break; + case BATTLE_RET_CRITICAL: + //snprintf( szBuffer, sizeof(szBuffer), + //"(%s)受到(%s)的绝技CRITICAL(%d)损伤(%d:%d:%d%%)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ), + // damage, + // CHAR_getWorkInt( attackindex, CHAR_WORKATTACKPOWER ), + // CHAR_getWorkInt( defindex, CHAR_WORKDEFENCEPOWER ), + // par + //); + *flg |= BCF_KAISHIN; + iRet = FALSE; + *flg |= BATTLE_getReactFlg( defindex, react); + break; +#ifdef _EQUIT_ARRANGE + case BATTLE_RET_ARRANGE: + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)攻击了(%s)挡掉了(%.2f%%)", + // CHAR_getUseName( attackindex ), + // CHAR_getUseName( defindex ), + // gDuckPer + //); + *flg |= BCF_B_ARRANGE; + break; +#endif + } + if( CHAR_getWorkInt( defindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_GUARD + && CHAR_getWorkInt( defindex, CHAR_WORKCONFUSION ) <= 0 ){ + //strncat( szBuffer, "(GUARD)", sizeof( szBuffer ) ); + iRet = FALSE; + } + + return iRet; +} + +int BATTLE_DefDieType( int defindex, int iRet, int *ultimate, int *flg, char *szBuffer) +{ + + if( CHAR_getInt( defindex, CHAR_HP ) <= 0 ){ + if( CHAR_getWorkInt( defindex, CHAR_WORKBATTLEFLG ) & CHAR_BATTLEFLG_ABIO ){ + *ultimate = 1; + }else + if( CHAR_getInt( defindex, CHAR_WHICHTYPE ) == CHAR_TYPEENEMY && *flg & BCF_KAISHIN ){ + if( RAND( 1, 100 ) < 50 ){ + *ultimate = 1; + } + } + +#ifdef _PETSKILL_LER +// 雷尔不能被打飞 + if(CHAR_getInt(defindex,CHAR_BASEBASEIMAGENUMBER) == 101813 || + CHAR_getInt(defindex,CHAR_BASEBASEIMAGENUMBER) == 101814) *ultimate = 0; +#endif + iRet = FALSE; + *flg |= BCF_DEATH; + if( *ultimate == 1 ){ + *flg |= BCF_ULTIMATE_1; + strcat( szBuffer, "ultimate嘆" ); + } + if( *ultimate == 2 ){ + *flg |= BCF_ULTIMATE_2; + strcat( szBuffer, "ultimate嘇" ); + } + } + return iRet; +} + +#ifdef _SKILL_DAMAGETOHP +int BATTLE_S_DamageToHp( int battleindex, int attackindex, int defindex, int Damage, int skill) +{ + char *pszOption; + char buf1[256]; + int A_HP=0, pHP,defi=0; + float def=0.00; + if( Damage < 1 ) return A_HP; + if( BATTLE_GetDamageReact( defindex) > 0 )//有光镜守 + return A_HP; + + pszOption = PETSKILL_getChar( skill, PETSKILL_OPTION ); + if( pszOption == NULL ) + return A_HP; + memset( buf1, 0, sizeof( buf1)); + if( getStringFromIndexWithDelim( pszOption, "|",2, buf1,sizeof( buf1)) == FALSE ) + return A_HP; + + defi = atoi( buf1); + def = ((float)defi)/100; + A_HP = (int)(Damage*def); + if( (A_HP+CHAR_getInt( attackindex, CHAR_HP)) > CHAR_getWorkInt( attackindex, CHAR_WORKMAXHP ) ){ + A_HP = CHAR_getWorkInt( attackindex, CHAR_WORKMAXHP )-CHAR_getInt( attackindex, CHAR_HP); + } + + pHP = CHAR_getInt( attackindex, CHAR_HP) + A_HP; + CHAR_setInt( attackindex, CHAR_HP, min( pHP, CHAR_getWorkInt( attackindex, CHAR_WORKMAXHP ))); + CHAR_send_P_StatusString( attackindex, CHAR_P_STRING_HP); + return A_HP; +} +#endif + +#ifdef _PETSKILL_DAMAGETOHP +int BATTLE_S_DamageToHp2( int battleindex, int attackindex, int defindex, int Damage, int skill) +{ + char *pszOption; + char buf1[256]; + int A_HP=0, pHP,defi=0; + float def=0.00; + if( Damage < 1 ) return A_HP; + if( BATTLE_GetDamageReact( defindex) > 0 )//有光镜守 + return A_HP; + + pszOption = PETSKILL_getChar( skill, PETSKILL_OPTION ); + if( pszOption == NULL ) + return A_HP; + memset( buf1, 0, sizeof( buf1)); + sprintf(buf1,"%s",pszOption); + //if( getStringFromIndexWithDelim( pszOption, "|",2, buf1,sizeof( buf1)) == FALSE ) + // return A_HP; + + defi = atoi( buf1); + def = ((float)defi)/100; + A_HP = (int)(Damage*def); + if( (A_HP+CHAR_getInt( attackindex, CHAR_HP)) > CHAR_getWorkInt( attackindex, CHAR_WORKMAXHP ) ){ + A_HP = CHAR_getWorkInt( attackindex, CHAR_WORKMAXHP )-CHAR_getInt( attackindex, CHAR_HP); + } + //print("\n伤:%d 回血:%d",Damage,A_HP); + pHP = CHAR_getInt( attackindex, CHAR_HP) + A_HP; + CHAR_setInt( attackindex, CHAR_HP, min( pHP, CHAR_getWorkInt( attackindex, CHAR_WORKMAXHP ))); + CHAR_send_P_StatusString( attackindex, CHAR_P_STRING_HP); + return A_HP; +} +#endif + +#ifdef _Skill_MPDAMAGE //BATTLE_COM_S_MPDAMAGE +int BATTLE_S_MpDamage( int battleindex, int attackindex, int defindex, int damage, int skill) +{ + char *pszOption; + char buf1[256]; + int D_MP=0,defi=0; + float def=0.00; + if( damage < 1 ) return D_MP; + if( BATTLE_GetDamageReact( defindex) > 0 )//有光镜守 + return D_MP; + if( CHAR_getInt( defindex, CHAR_WHICHTYPE) == CHAR_TYPEENEMY || + CHAR_getInt( defindex, CHAR_WHICHTYPE) == CHAR_TYPEPET ) + return D_MP; + if( CHAR_getInt( defindex, CHAR_MP) <= 0 ) return D_MP; + + pszOption = PETSKILL_getChar( skill, PETSKILL_OPTION ); + if( pszOption == NULL ) return D_MP; + memset( buf1, 0, sizeof( buf1)); + if( getStringFromIndexWithDelim( pszOption, "|",2, buf1,sizeof( buf1)) == FALSE ) + return D_MP; + defi = atoi( buf1); + def = ((float)defi)/100; + D_MP = (int)(CHAR_getInt( defindex, CHAR_MP)*def); + CHAR_setInt( defindex, CHAR_MP, ( CHAR_getInt( defindex, CHAR_MP) - D_MP) ); + CHAR_send_P_StatusString( defindex, CHAR_P_STRING_MP); + return D_MP; +} +#endif +#ifdef _SKILL_TOOTH +void BATTLE_S_ToothCrushe( int battleindex, int attackindex, int defindex, int damage, int skill) +{ + int crushindex, itemindex; //aszCrushTbl + //char *strCrushTbl[] = { "完好", "受损", "毁坏" , "不堪使用" , "碎片" }; + if( CHAR_getInt( defindex, CHAR_WHICHTYPE) != CHAR_TYPEPLAYER ) + return; +#ifdef _TAKE_ITEMDAMAGE + if( ( crushindex = BATTLE_ItemCrushCheck( defindex, 1) ) >= 0 ) { + int crushenum, maxcrushenum, level=0; + float def=0.00; + itemindex = CHAR_getItemIndex( defindex, crushindex ); + if( ITEM_CHECKINDEX(itemindex) == FALSE ) return; + crushenum = ITEM_getInt( itemindex, ITEM_DAMAGECRUSHE); + maxcrushenum = ITEM_getInt( itemindex, ITEM_MAXDAMAGECRUSHE); + if( maxcrushenum < 1 ) return; + def = ((float)crushenum/maxcrushenum); + if( def >= 1 ) { + level = 1; + def = 0.70; + }else if( def >= 0.50 ){ + level = 2; + def = 0.30; + }else if( def >= 0.30 ){ + level = 3; + def = 0.10; + }else{ + def = 0.00; + } + crushenum = (int)((float)maxcrushenum*def); + ITEM_setInt( itemindex, ITEM_DAMAGECRUSHE, crushenum); + + if( crushenum <= 0 ) { + char buf2[256]; + sprintf(buf2, "%s因过度损坏而消失。\n", ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( defindex, -1, buf2, CHAR_COLORYELLOW); + + LogItem( + CHAR_getChar( defindex, CHAR_NAME ), + CHAR_getChar( defindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), +#endif + "因过度损坏而消失", + CHAR_getInt( defindex,CHAR_FLOOR), + CHAR_getInt( defindex,CHAR_X ), + CHAR_getInt( defindex,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + + CHAR_setItemIndex( defindex, crushindex ,-1); + ITEM_endExistItemsOne( itemindex); + + }else { + char buf2[256]; + sprintf( buf2, "%s是%s的。", ITEM_getChar( itemindex, ITEM_NAME ), aszCrushTbl[level] ); + CHAR_talkToCli( defindex, -1, buf2, CHAR_COLORYELLOW); + //更改道具说明 +// buf1 = ITEM_getChar( itemindex, ITEM_SECRETNAME); +// if( strstr( buf1, "(") != 0 ) { +// char buf5[256]; +// if( getStringFromIndexWithDelim( buf1,"(",1, buf5, sizeof( buf5)) != FALSE ) { +// sprintf( buf1, buf5); +// } +// } +// sprintf( buf2, "%s(%s)", buf1, aszCrushTbl[level]); +// ITEM_setChar( itemindex, ITEM_SECRETNAME, buf2); + ITEM_setInt( itemindex, ITEM_CRUSHLEVEL, level); + } + CHAR_sendItemDataOne( defindex, crushindex ); + CHAR_complianceParameter( defindex ); + CHAR_send_P_StatusString( defindex, CHAR_P_STRING_ATK | CHAR_P_STRING_DEF + | CHAR_P_STRING_QUICK | CHAR_P_STRING_CHARM ); + + } +#endif +} +#endif + +#ifdef _PSKILL_MODIFY +void BATTLE_S_Modifyattack( int battleindex, int attackindex, int defindex, int *damage, int skill) +{ + int i; + char *pszOption=NULL; + int array = skill; + char buf1[256], buf2[256]; + float def=0.00; + struct tagModKind{ + char szModKind[36]; + int Kind; + }KModKind[5] = { + { "EA", CHAR_EARTHAT}, { "WA", CHAR_WATERAT}, + { "FI", CHAR_FIREAT} , { "WI", CHAR_WINDAT}, + { "ALL",100} + }; + + + pszOption = PETSKILL_getChar( array, PETSKILL_OPTION ); + if( pszOption == NULL ) return; + if( getStringFromIndexWithDelim( pszOption, "|", 1, buf1, sizeof( buf1)) == FALSE ) + return; + + if( getStringFromIndexWithDelim( pszOption, "|", 2, buf2, sizeof( buf1)) == FALSE ) + return; + def = ((float)(atoi( buf2))/100); + + for( i=0; i< 4; i++) { + int ModNum=0; + if( strcmp( KModKind[i].szModKind , buf1)) continue; + if( (ModNum = CHAR_getInt( defindex, KModKind[i].Kind )) > 0 ) { + def += (float)((rand()%(ModNum+5))/100); + *damage += *damage * def; + break; + } + } +} +#endif + +#ifdef _PETSKILL_PROPERTY +int BATTLE_S_PetSkillProperty( int battleindex, int attackNo, int skill_type, int skill) +{ + int attackindex; + BOOL iRet = FALSE; + char *pszP=NULL; + + pszP = PETSKILL_getChar( skill, PETSKILL_OPTION ); + if( pszP == NULL ) return iRet; + + + attackindex = BATTLE_No2Index( battleindex, attackNo ); //攻方index + if( !CHAR_CHECKINDEX( attackindex)) return iRet; + switch( skill_type){ + case BATTLE_COM_S_PROPERTYSKILL: + { + Char *ch; + ch = CHAR_getCharPointer( attackindex); + if( ch == NULL ) return iRet; + strcpysafe( ch->charfunctable[CHAR_BATTLEPROPERTY].string, + sizeof( ch->charfunctable[CHAR_BATTLEPROPERTY]), pszP);//战斗 + CHAR_constructFunctable( attackindex); + iRet = TRUE; + } + break; + } + return iRet; +} +#endif + +int BATTLE_S_AttackDamage( int battleindex, int attackNo, int defNo, int skill_type, int skill) +{ + char szBuffer[512]=""; + char szCommand[1024]; + int attackindex, defindex; + int damage=0, petdamage=0, i=0, iWork, Guardian=-1,react; + int flg = 0, DefSide=0,ultimate=0; + int otherdamage=0; + BOOL iRet = FALSE; + int ReactType = 0; + + char *pszP=NULL; + pszP = PETSKILL_getChar( skill, PETSKILL_OPTION ); + if( pszP == NULL ) return iRet; + + react = 0; + attackindex = BATTLE_No2Index( battleindex, attackNo ); //攻方index + defindex = BATTLE_No2Index( battleindex, defNo ); //守方index + if( (ReactType=BATTLE_GetDamageReact( defindex)) > 0 ) { //有光镜守 + react = ReactType; +#ifdef _BATTLE_LIGHTTAKE + if( skill_type == BATTLE_COM_S_LIGHTTAKE ){ + int Statustype = -2; + if( strstr( pszP, "VANISH") != 0 ) Statustype = BATTLE_MD_VANISH; + else if( strstr( pszP, "ABSROB") != 0 ) Statustype = BATTLE_MD_ABSROB; + else if( strstr( pszP, "REFLEC") != 0 ) Statustype = BATTLE_MD_REFLEC; + if( ReactType == Statustype ){ + react=0; + }else{ + skill_type=-1; + } + }else{ + skill_type=-1; + } +#else + skill_type=-1; +#endif + } + + if( defNo >= SIDE_OFFSET ){ + i = defNo - SIDE_OFFSET; + DefSide = 1; + } + + //取得攻击後状态 + iWork = BATTLE_AttackSeq( attackindex, defindex, &damage, &Guardian, skill_type ); + + switch( skill_type){ +#ifdef _PSKILL_MODIFY + case BATTLE_COM_S_MODIFYATT: + if( damage > 0 ){ + BATTLE_S_Modifyattack( battleindex, attackindex, defindex, &damage, skill); + } + break; +#endif +#ifdef _PETSKILL_TEAR + case BATTLE_COM_S_PETSKILLTEAR: +#ifdef _PREVENT_TEAMATTACK + if( BATTLE_CheckSameSide( attackindex, defNo) == 1 ){ + }else +#endif + if( iWork != BATTLE_RET_DODGE && react == 0 ){ + int userhp=0, petindex; + float def=0; + userhp = CHAR_getWorkInt( defindex, CHAR_WORKMAXHP) - CHAR_getInt( defindex, CHAR_HP); + if( CHAR_getInt( defindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER && + (petindex = BATTLE_getRidePet( defindex )) != -1 ){ + userhp += CHAR_getWorkInt( petindex, CHAR_WORKMAXHP) - CHAR_getInt( petindex, CHAR_HP); + } + def = ((float)atoi( pszP))/100; + userhp = userhp * def; + if( userhp <= 0 ) damage = 0; + else damage += userhp; + } + break; +#endif + } + ultimate = BATTLE_DamageSub( attackindex, defindex, &damage, &petdamage, &react); + + if( react == BATTLE_MD_REFLEC ) defindex = attackindex; + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + if( react == BATTLE_MD_TRAP ) defindex = attackindex; +#endif + +#ifdef _PETSKILL_ACUPUNCTURE + if( react == BATTLE_MD_ACUPUNCTURE ) defindex = attackindex; +#endif + + if( damage > 0 && ( react != BATTLE_MD_ABSROB )&& ( react != BATTLE_MD_VANISH )){ + BATTLE_DamageWakeUp( battleindex, defindex ); + } + iRet = BATTLE_DefineAttack( attackindex, defindex, iWork, szBuffer, damage, react, &flg); + if( CHAR_getInt( defindex, CHAR_HP ) <= 0 ) + iRet = BATTLE_DefDieType( defindex, iRet, &ultimate, &flg, szBuffer); +#ifdef _PETSKILL_ANTINTER + //强制将死掉的宠打飞 + if( CHAR_getWorkInt( attackindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_ANTINTER + && CHAR_getInt( defindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET ){ + ultimate = 2; + flg &= (!BCF_ULTIMATE_1); + flg |= BCF_DEATH; + flg |= BCF_ULTIMATE_2; + CHAR_setWorkInt( defindex, CHAR_WORKULTIMATE, 0 ); + damage=1;//因後面有判断若 damage<=0 则 skill_type=-1 所以这里damage设为1 + } +#endif + + if( damage > 0 ){ +#ifdef _TAKE_ITEMDAMAGE + if( BATTLE_ItemCrushSeq( attackindex, defindex, damage) == TRUE ){ +#else + if( BATTLE_ItemCrushSeq( defindex ) == TRUE ){ +#endif + flg |= BCF_CRUSH; + } + } + + if( damage <= 0 ) { +#ifdef _SONIC_ATTACK // WON ADD 音波攻击 + if( skill_type != BATTLE_COM_S_SONIC && skill_type != BATTLE_COM_S_SONIC2 +#ifdef _PETSKILL_REGRET + && skill_type != BATTLE_COM_S_REGRET && skill_type != BATTLE_COM_S_REGRET2 +#endif + ) +#endif + skill_type=-1; + } + + + + + memset( szCommand, 0, sizeof( szCommand)); + switch( skill_type) { + case -1: + snprintf( szCommand, sizeof( szCommand ), "BH|a%X|r%X|f%X|d%X|p%X|FF|", + attackNo, defNo, flg, damage, petdamage ); + BATTLESTR_ADD( szCommand ); + break; + +#ifdef _PETSKILL_TEAR + case BATTLE_COM_S_PETSKILLTEAR: + snprintf( szCommand, sizeof( szCommand ), "BH|a%X|r%X|f%X|d%X|p%X|FF|", + attackNo, defNo, flg, damage, petdamage ); + BATTLESTR_ADD( szCommand ); + break; +#endif + +#ifdef _SKILL_DAMAGETOHP + case BATTLE_COM_S_DAMAGETOHP: + otherdamage = BATTLE_S_DamageToHp( battleindex, attackindex, defindex,damage+petdamage, skill); + snprintf( szCommand, sizeof( szCommand ), "Bh|a%X|r%X|f%X|d%X|p%X|j%X|FF|", + attackNo, defNo, flg, damage, petdamage, otherdamage); + BATTLESTR_ADD( szCommand ); + break; +#endif + +#ifdef _PETSKILL_DAMAGETOHP + case BATTLE_COM_S_DAMAGETOHP2: + otherdamage = BATTLE_S_DamageToHp2( battleindex, attackindex, defindex,damage+petdamage, skill); + snprintf( szCommand, sizeof( szCommand ), "Bh|a%X|r%X|f%X|d%X|p%X|j%X|FF|", + attackNo, defNo, flg, damage, petdamage, otherdamage); + BATTLESTR_ADD( szCommand ); + break; +#endif + +#ifdef _Skill_MPDAMAGE + case BATTLE_COM_S_MPDAMAGE: + otherdamage = BATTLE_S_MpDamage( battleindex, attackindex, defindex, damage, skill); + snprintf( szCommand, sizeof( szCommand ), "Bp|a%X|r%X|f%X|d%X|p%X|j%X|FF|", + attackNo, defNo, flg, damage, petdamage, otherdamage); + BATTLESTR_ADD( szCommand ); + break; +#endif + +#ifdef _SKILL_TOOTH + case BATTLE_COM_S_TOOTHCRUSHE: // 齿术 tooth + flg |= BCF_TOOTH; + BATTLE_S_ToothCrushe( battleindex, attackindex, defindex, damage, skill); + snprintf( szCommand, sizeof( szCommand ), "BH|a%X|r%X|f%X|d%X|p%X|FF|", + attackNo, defNo, flg, damage, petdamage ); + BATTLESTR_ADD( szCommand ); + break; +#endif + +#ifdef _PSKILL_MDFYATTACK + case BATTLE_COM_S_MDFYATTACK: + flg |= BCF_MODIFY; + snprintf( szCommand, sizeof( szCommand ), "BH|a%X|r%X|f%X|d%X|p%X|g%X|FF|", + attackNo, defNo, flg, damage, petdamage, skill); + BATTLESTR_ADD( szCommand ); + break; +#endif +#ifdef _PSKILL_MODIFY + case BATTLE_COM_S_MODIFYATT: + flg |= BCF_ATTDOUBLE; + snprintf( szCommand, sizeof( szCommand ), "BH|a%X|r%X|f%X|d%X|p%X|g%X|FF|", + attackNo, defNo, flg, damage, petdamage, skill); + BATTLESTR_ADD( szCommand ); + break; +#endif + +#ifdef _PETSKILL_TIMID + case BATTLE_COM_S_TIMID: + { + int timid = rand()%100; + snprintf( szCommand, sizeof( szCommand ), "BH|a%X|r%X|f%X|d%X|p%X|FF|", + attackNo, defNo, flg, damage, petdamage ); + BATTLESTR_ADD( szCommand ); + if( timid < 15 && damage > 1 ){//怯战 + BATTLE_NoAction( battleindex, defNo ); + sprintf( szCommand, "BE|e%X|", defNo ); + BATTLESTR_ADD( szCommand ); + snprintf( szCommand, sizeof( szCommand ), "f%X|", 1); + BATTLESTR_ADD( szCommand ); + + if( CHAR_getInt( defindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET ){ + int defkoyaindex = CHAR_getWorkInt( defindex, CHAR_WORKPLAYERINDEX ); +#ifdef _PETS_SELECTCON + lssproto_PETS_send( getfdFromCharaIndex(defkoyaindex), + CHAR_getInt( defkoyaindex, CHAR_DEFAULTPET), FALSE); + CHAR_setWorkInt( defkoyaindex, + CHAR_WORK_PET0_STAT+CHAR_getInt( defkoyaindex, CHAR_DEFAULTPET), FALSE); +#endif + BATTLE_PetDefaultExit( defkoyaindex, battleindex ); + CHAR_setInt( defkoyaindex, CHAR_DEFAULTPET, -1 ); + + }else { + BATTLE_Exit( defindex, battleindex); + CHAR_DischargePartyNoMsg( defindex);//解散团队 + } + } + } + break; +#endif +#ifdef _PETSKILL_2TIMID + case BATTLE_COM_S_2TIMID: + { + int timid=0; + char *timidc=NULL; + pszP = PETSKILL_getChar( skill, PETSKILL_OPTION ); + if( ( timidc = strstr( pszP, "命%" ) ) != NULL ) + sscanf( timidc+3,"%d", &timid ); + snprintf( szCommand, sizeof( szCommand ), "BH|a%X|r%X|f%X|d%X|p%X|FF|", + attackNo, defNo, flg, damage, petdamage ); + BATTLESTR_ADD( szCommand ); + if( rand()%100 < timid && damage > 1 ){ + if( CHAR_getInt( defindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET ){ + int defkoyaindex = CHAR_getWorkInt( defindex, CHAR_WORKPLAYERINDEX ); + + snprintf( szCommand, sizeof( szCommand ), "K%d", CHAR_getInt( defkoyaindex, CHAR_DEFAULTPET ) ); + CHAR_sendStatusString( defkoyaindex, szCommand ); + + BATTLE_PetIn( battleindex, defNo-5 ); + lssproto_KS_send( getfdFromCharaIndex( defkoyaindex ), CHAR_getInt( defkoyaindex, CHAR_DEFAULTPET ), 1 ); + + /*BATTLE_NoAction( battleindex, defNo ); + sprintf( szCommand, "BE|e%X|", defNo ); + BATTLESTR_ADD( szCommand ); + snprintf( szCommand, sizeof( szCommand ), "f%X|", 1); + BATTLESTR_ADD( szCommand ); + + BATTLE_PetDefaultExit( defkoyaindex, battleindex ); + CHAR_setInt( defkoyaindex, CHAR_DEFAULTPET, -1 ); + + print("\ndefNo:%d",defNo);*/ + } + } + } + break; +#endif + +#ifdef _PETSKILL_ANTINTER + case BATTLE_COM_S_ANTINTER: + { + pszP = PETSKILL_getChar( skill, PETSKILL_OPTION ); + //flg &= !(BCF_ULTIMATE_1 | BCF_ULTIMATE_2); + snprintf( szCommand, sizeof( szCommand ), "BH|a%X|r%X|f%X|d%X|p%X|FF|", + attackNo, defNo, flg |= BCF_ANTINTER , 0, 0 ); + BATTLESTR_ADD( szCommand ); + if( CHAR_getInt( defindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET ){ + int defkoyaindex = CHAR_getWorkInt( defindex, CHAR_WORKPLAYERINDEX ); + BATTLE_PetDefaultExit( defkoyaindex, battleindex );//宠物离开战场 + CHAR_setInt( defkoyaindex, CHAR_DEFAULTPET, -1 );//设定无参战宠物 + } + } + break; +#endif + +#ifdef _BATTLE_LIGHTTAKE + case BATTLE_COM_S_LIGHTTAKE: + { + int Typenum = 0; + if( strstr( pszP, "VANISH") != 0 ){ + if( ReactType == BATTLE_MD_VANISH ){ + Typenum = CHAR_getWorkInt( defindex, CHAR_WORKDAMAGEVANISH ); + CHAR_setWorkInt( attackindex, CHAR_WORKDAMAGEVANISH, Typenum); + } + }else if( strstr( pszP, "ABSROB") != 0 ){ + if( ReactType == BATTLE_MD_ABSROB ){ + Typenum = CHAR_getWorkInt( defindex, CHAR_WORKDAMAGEABSROB ); + CHAR_setWorkInt( attackindex, CHAR_WORKDAMAGEABSROB, Typenum); + } + }else if( strstr( pszP, "REFLEC") != 0 ){ + if( ReactType == BATTLE_MD_REFLEC ){ + Typenum = CHAR_getWorkInt( defindex, CHAR_WORKDAMAGEREFLEC ); + CHAR_setWorkInt( attackindex, CHAR_WORKDAMAGEREFLEC, Typenum); + } + } + snprintf( szCommand, sizeof( szCommand ), "BH|a%X|r%X|f%X|d%X|p%X|FF|", + attackNo, defNo, flg, damage, petdamage ); + BATTLESTR_ADD( szCommand ); + } + break; +#endif + +#ifdef _SONIC_ATTACK // WON ADD 音波攻击 + // 宠物伤害 + case BATTLE_COM_S_SONIC: + { + int img2=0; + if( defNo >= 10 ) img2 = 101703; + else img2 = 101704; + + flg |= BCF_B_SKILLACT; //击中後秀图 + + snprintf( szCommand, sizeof( szCommand ), "B+|a%X|r%X|f%X|d%X|e%X|s%X|h%X|FF|", + attackNo, defNo, flg, damage, 0, 0, img2 ); + BATTLESTR_ADD( szCommand ); + + break; + } + // 人物伤害 + case BATTLE_COM_S_SONIC2: + { + sprintf( szCommand, "BD|r%X|0|0|d%X|p%X|", defNo, damage, petdamage ); + BATTLESTR_ADD( szCommand ); + + break; + } +#endif +#ifdef _PETSKILL_REGRET + // 宠物伤害 + case BATTLE_COM_S_REGRET: + { + int img2=0,Success=0; + char *psz = NULL; + if( (psz = strstr( pszP, "命%" ) ) != NULL ) sscanf( psz+3, "%d", &Success ); + if( (PROFESSION_BATTLE_StatusAttackCheck( attackindex, defindex, 12, Success ) == 0 ) + || (CHAR_getInt( defindex, CHAR_HP ) <= 0 ) ){ + + }else{ + CHAR_setWorkInt( defindex, StatusTbl[12], 2 );//晕眩1回合 + CHAR_setWorkInt( defindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + BATTLE_BadStatusString( defNo, 12 ); + } + + if( defNo >= 10 ) img2 = 101418;//101703; + else img2 = 101418;//101704; + + flg |= BCF_B_SKILLACT; //击中後秀图 + snprintf( szCommand, sizeof( szCommand ), "B+|a%X|r%X|f%X|d%X|e%X|s%X|h%X|FF|", + attackNo, defNo, flg, damage, 0, 0, img2 ); + BATTLESTR_ADD( szCommand ); + break; + } + // 人物伤害 + case BATTLE_COM_S_REGRET2: + { + int Success; + char *psz = NULL; + if( (psz = strstr( pszP, "命%" ) ) != NULL ) sscanf( psz+3, "%d", &Success ); + if( (PROFESSION_BATTLE_StatusAttackCheck( attackindex, defindex, 12, Success ) == 0 ) + || (CHAR_getInt( defindex, CHAR_HP ) <= 0 ) ){ + + }else{ + CHAR_setWorkInt( defindex, StatusTbl[12], 2 );//晕眩1回合 + CHAR_setWorkInt( defindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + BATTLE_BadStatusString( defNo, 12 ); + } + + sprintf( szCommand, "BD|r%X|0|0|d%X|p%X|", defNo, damage, petdamage ); + BATTLESTR_ADD( szCommand ); + break; + } +#endif + + default: + snprintf( szCommand, sizeof( szCommand ), "BH|a%X|r%X|f%X|d%X|p%X|FF|", + attackNo, defNo, flg, damage, petdamage ); + BATTLESTR_ADD( szCommand ); + break; + } + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + + i = defNo-DefSide*SIDE_OFFSET; + if( ultimate > 0 ){ + BattleArray[battleindex].Side[DefSide].Entry[i].flg |= BENT_FLG_ULTIMATE; + } + return iRet; +} + +#ifdef _MAGIC_SUPERWALL +int PETSKILL_MagicStatusChange_Battle( int battleindex, int attackNo, int toNo, int marray) +{ + char *magicarg; + int status = -1, i, turn = 3, nums=0; + int ReceveEffect, charaindex=-1; + char buf1[256]; + charaindex = BATTLE_No2Index( battleindex, attackNo ); //攻方index + if( !CHAR_CHECKINDEX( charaindex)) return FALSE; + magicarg = PETSKILL_getChar( marray, PETSKILL_OPTION ); + if( getStringFromIndexWithDelim( magicarg,"|",1, buf1, sizeof( buf1)) == FALSE ) + return FALSE; + for( i=0; i= 20 ) + return FALSE; + } + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + //attackNo = BATTLE_Index2No( battleindex, charaindex ); +/* //动画图号决定 + if( status == BATTLE_ST_NONE ){ + ReceveEffect = SPR_tyusya; + }else{ + ReceveEffect = SPR_hoshi; + } +*/ + ReceveEffect = SPR_hoshi; + BATTLE_MultiMagicStatusChange( + battleindex, attackNo, toNo, status, + turn, MAGIC_EFFECT_USER, ReceveEffect, nums ); + + return TRUE; +} +#endif + +#ifdef _PETSKILL_SETDUCK +int PETSKILL_SetDuckChange_Battle( int battleindex, int attackNo, int toNo, int marray) +{ + char *skillarg=NULL; + int turn = 3, nums=0; + int charaindex=-1; + char buf1[256]; + + charaindex = BATTLE_No2Index( battleindex, attackNo ); //攻方index + if( !CHAR_CHECKINDEX( charaindex)) return FALSE; + if( BATTLE_No2Index( battleindex, toNo ) != charaindex ) return FALSE; + + skillarg = PETSKILL_getChar( marray, PETSKILL_OPTION ); + if( skillarg == NULL ) return FALSE; + if( getStringFromIndexWithDelim( skillarg,"|",1, buf1, sizeof( buf1)) == FALSE ) + return FALSE; + turn = atoi( buf1); + if( getStringFromIndexWithDelim( skillarg,"|",2, buf1, sizeof( buf1)) == FALSE ) + return FALSE; + nums = atoi( buf1); + + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + { + int ToList[SIDE_OFFSET*2+1]; + char szBuffer[256]=""; + memset( szBuffer, 0, sizeof( szBuffer)); + memset( ToList, -1, sizeof( ToList)); + BATTLE_MultiList( battleindex, toNo, ToList ); + BATTLE_MagicEffect( battleindex, attackNo, ToList, MAGIC_EFFECT_USER, SPR_hoshi ); + if( CHAR_getWorkInt( charaindex, CHAR_MYSKILLDUCK) > 0){ + }else { + CHAR_setWorkInt( charaindex, CHAR_MYSKILLDUCK, turn); + CHAR_setWorkInt( charaindex, CHAR_MYSKILLDUCKPOWER, nums ); + sprintf( szBuffer, "BD|r%X|0|3|%X|", toNo, nums); + BATTLESTR_ADD( szBuffer ); + } + } + return TRUE; +} +#endif + +#ifdef _MAGICPET_SKILL +int PETSKILL_SetMagicPet_Battle( int battleindex, int attackNo, int toNo, int marray) +{ + char *skillarg=NULL; + int turn = 3, nums=0; + int charaindex=-1; + char buf1[256]; + + charaindex = BATTLE_No2Index( battleindex, attackNo ); //攻方index + if( !CHAR_CHECKINDEX( charaindex)) return FALSE; + if( BATTLE_CHECKINDEX( battleindex ) == FALSE ) return FALSE; + + skillarg = PETSKILL_getChar( marray, PETSKILL_OPTION ); + if( skillarg == NULL ) return FALSE; + if( getStringFromIndexWithDelim( skillarg,"|",1, buf1, sizeof( buf1)) == FALSE ) + return FALSE; + turn = atoi( buf1); + if( getStringFromIndexWithDelim( skillarg,"|",2, buf1, sizeof( buf1)) == FALSE ) + return FALSE; + nums = atoi( buf1); + if( getStringFromIndexWithDelim( skillarg,"|",3, buf1, sizeof( buf1)) == FALSE ) + return FALSE; + if( strstr( buf1, "HP") != 0 ) { +#ifdef _CHANGEITEMUSE // Syu ADD 调整战斗中使用料理设定 + BATTLE_MultiRecovery( battleindex, attackNo, toNo, + BD_KIND_HP, nums, 0, MAGIC_EFFECT_USER, SPR_heal3 , 0); +#else + BATTLE_MultiRecovery( battleindex, attackNo, toNo, + BD_KIND_HP, nums, 0, MAGIC_EFFECT_USER, SPR_heal3 ); +#endif + }else{ + int ToList[SIDE_OFFSET*2+1]; + char szBuffer[256]=""; + int todef=0, i; + + memset( szBuffer, 0, sizeof( szBuffer)); + memset( ToList, -1, sizeof( ToList)); + BATTLE_MultiList( battleindex, toNo, ToList ); + BATTLE_MagicEffect( battleindex, attackNo, ToList, MAGIC_EFFECT_USER, SPR_hoshi ); + + for( i = 0; ToList[i] != -1; i ++ ){ + int bid; + int toindex = BATTLE_No2Index( battleindex, ToList[i] ); + if( !CHAR_CHECKINDEX( toindex ))continue; + + if( CHAR_getWorkInt( toindex, CHAR_MYSKILLDUCK) > 0 || + CHAR_getWorkInt( toindex, CHAR_MYSKILLSTR) > 0 || + CHAR_getWorkInt( toindex, CHAR_MYSKILLTGH) > 0 || + CHAR_getWorkInt( toindex, CHAR_MYSKILLDEX) > 0 ) continue; + + if( strstr( buf1, "STR") != 0 ) { + CHAR_setWorkInt( toindex, CHAR_MYSKILLSTR, turn); + CHAR_setWorkInt( toindex, CHAR_MYSKILLSTRPOWER, nums ); + todef = 4; + }else if( strstr( buf1, "TGH") != 0 ){ + CHAR_setWorkInt( toindex, CHAR_MYSKILLTGH, turn); + CHAR_setWorkInt( toindex, CHAR_MYSKILLTGHPOWER, nums ); + todef = 5; + }else if( strstr( buf1, "DEX") != 0 ){ + CHAR_setWorkInt( toindex, CHAR_MYSKILLDEX, turn); + CHAR_setWorkInt( toindex, CHAR_MYSKILLDEXPOWER, nums ); + todef = 6; + } + bid = BATTLE_Index2No( battleindex, toindex ); + sprintf( szBuffer, "BD|r%X|0|%d|%X|", bid, todef, nums); + BATTLESTR_ADD( szBuffer ); + } + } + return TRUE; +} +#endif + +#ifdef _SKILL_WEAKEN //vincent宠技:虚弱 +int BATTLE_S_Weaken( + int battleindex, + int attackNo, + int defNo, + int marray +) +{ + BOOL iRet = FALSE; + char *magicarg; + int status = -1, i, turn = 3; + int ReceveEffect, Success = 0; + char *pszP; + char szTurn[] = "turn"; + char szSuccess[] = "成"; + magicarg = PETSKILL_getChar( marray, PETSKILL_OPTION ); + if( magicarg == NULL ) { + print("\n magicarg == NULL "); + return FALSE; + } + pszP = magicarg; + + for( ;status == -1 && pszP[0] != 0; pszP++ ){ + for( i = 1; i < BATTLE_ST_END; i ++ ){ + if( strncmp( pszP, aszStatus[i], 2 ) == 0 ){ + status = i; + pszP +=2; + break; + } + } + } + + if( status == -1 ) return FALSE; + + if( ( pszP = strstr( pszP, szTurn ) ) != NULL){ + pszP += sizeof( szTurn ); + sscanf( pszP, "%d", &turn ); + } + + if( ( pszP = strstr( pszP, szSuccess ) ) != NULL){ + pszP += sizeof( szSuccess ); + sscanf( pszP, "%d", &Success ); + } + + if( status == BATTLE_ST_NONE ){ + ReceveEffect = SPR_tyusya; + }else{ + ReceveEffect = SPR_hoshi; + } + BATTLE_MultiParamChangeTurn( battleindex, attackNo, defNo, status, + MAGIC_EFFECT_USER, ReceveEffect, turn, Success); + + return iRet; +} +#endif + +#ifdef _PETSKILL_TEMPTATION +BOOL BATTLE_S_Temptation( int battleindex,int attackNo,int defNo, int skill ) +{ + BOOL iRet = FALSE; + char *magicarg; + char szWork[256]; + int attackindex,defindex,defside,flg=0,img2,img1; + int target; + + magicarg = PETSKILL_getChar( skill , PETSKILL_OPTION ); + if( magicarg == NULL ) { + print("\n magicarg == NULL "); + return iRet; + } + attackindex = BATTLE_No2Index( battleindex, attackNo ); + defindex = BATTLE_No2Index( battleindex, defNo ); + if( CHAR_CHECKINDEX( attackindex ) == FALSE )return iRet; + if( CHAR_CHECKINDEX( defindex ) == FALSE )return iRet; + if( CHAR_getInt( defindex, CHAR_WHICHTYPE) != CHAR_TYPEPET ) return iRet; + if( CHAR_getWorkInt( defindex , CHAR_WORKFIXAI ) <= atoi(magicarg)){ + //技能攻击 + CHAR_setWorkInt( defindex, CHAR_WORKTEMPTATION , 1 ); //用来解除打自己方1滴血的限制 + defside = CHAR_getWorkInt( defindex, CHAR_WORKBATTLESIDE); + target = CHAR_getWorkInt( defindex, CHAR_WORKBATTLECOM2 ); + + if( CHAR_getWorkInt( defindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_ATTACK ){ + CHAR_setWorkInt( defindex , CHAR_WORKBATTLECOM2, + BATTLE_DefaultAttacker(battleindex,defside)); + }else{ + CHAR_setWorkInt( defindex , CHAR_WORKBATTLECOM2, + BATTLE_DefaultAttacker(battleindex,defside)); + } + img1 = 101505; //珠珠动画101637; //准备期动画 + img2 = 101502; //珠珠动画101645; //击中後动画 + flg |= BCF_NO_DAMAGE; + flg |= BCF_B_SKILLACT; //击中後秀图 + snprintf( szWork, sizeof( szWork ), "B+|a%X|r%X|f%X|d%X|p%X|e%X|s%X|h%X|FF|", + attackNo, defNo, flg, 0, 0, 1 , img1 , img2 ); + BATTLESTR_ADD( szWork ); + iRet = TRUE; + } + return iRet; + +} +#endif + +#ifdef _SKILL_DEEPPOISON //vincent宠技:剧毒 +int BATTLE_S_Deeppoison( int battleindex, int attackNo, int defNo, int marray ) +{ + BOOL iRet = FALSE; + char *magicarg; + int status = -1, i, turn = 3; + int ReceveEffect, Success = 0; + char *pszP; + char szTurn[] = "turn"; + char szSuccess[] = "成"; + magicarg = PETSKILL_getChar( marray, PETSKILL_OPTION ); + if( magicarg == NULL ) { + print("\n magicarg == NULL "); + return FALSE; + } + pszP = magicarg; + + for( ;status == -1 && pszP[0] != 0; pszP++ ){ + for( i = 1; i < BATTLE_ST_END; i ++ ){ + if( strncmp( pszP, aszStatus[i], 2 ) == 0 ){ + status = i; + pszP +=2; + break; + } + } + } + + if( status == -1 ) return FALSE; + + if( ( pszP = strstr( pszP, szTurn ) ) != NULL){ + pszP += sizeof( szTurn ); + sscanf( pszP, "%d", &turn ); + } + + if( ( pszP = strstr( pszP, szSuccess ) ) != NULL){ + pszP += sizeof( szSuccess ); + sscanf( pszP, "%d", &Success ); + } + + if( status == BATTLE_ST_NONE ){ + ReceveEffect = SPR_tyusya; + }else{ + ReceveEffect = SPR_hoshi; + } + + BATTLE_MultiStatusChange( battleindex, attackNo, defNo, + status, turn+2, MAGIC_EFFECT_USER, ReceveEffect, Success ); + + return iRet; +} +#endif + +#ifdef _SKILL_BARRIER //vincent宠技:魔障 +int BATTLE_S_Barrier( + int battleindex, + int attackNo, + int defNo , + int marray +) +{ + BOOL iRet = FALSE; + int battlemode; + int i,turn,perStatus,charaindex,toindex; + int ToList[SIDE_OFFSET*2+1]; + char *magicarg; + int Success = 0; + char szTurn[] = "turn"; + char szSuccess[] = "成"; + char *pszP; + charaindex = BATTLE_No2Index( battleindex, attackNo ); //攻方index + //check index + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return FALSE; + + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + + if( battlemode == BATTLE_CHARMODE_INIT ){ + return FALSE; + } + + magicarg = PETSKILL_getChar( marray, PETSKILL_OPTION ); + if( magicarg == NULL ) { + print("\n magicarg == NULL "); + return FALSE; + } + + pszP = magicarg; + + //读取作用回合数 + if( ( pszP = strstr( pszP, szTurn ) ) != NULL){ + pszP += sizeof( szTurn ); + sscanf( pszP, "%d", &turn ); + } + //命中率 + if( ( pszP = strstr( pszP, szSuccess ) ) != NULL){ + pszP += sizeof( szSuccess ); + sscanf( pszP, "%d", &Success ); + } + + BATTLE_MultiList( battleindex, defNo, ToList ); + + //施魔法动画效果 + BATTLE_MagicEffect(battleindex, attackNo, ToList, MAGIC_EFFECT_USER, SPR_hoshi); + + //check是否战斗中 + if( IsBATTLING( charaindex ) == TRUE ) + { + + for( i = 0; ToList[i] != -1; i ++ ) + { + toindex = BATTLE_No2Index( battleindex, ToList[i] ); + if( BATTLE_StatusAttackCheck( charaindex,toindex, BATTLE_ST_BARRIER, Success, 30, 1.0, &perStatus ) == TRUE ) + { + CHAR_setWorkInt( toindex, CHAR_WORKBARRIER, turn+1); + } + } + + } + return iRet; +} +#endif + +#ifdef _SKILL_NOCAST //vincent宠技:沉默 +int BATTLE_S_Nocast( + int battleindex, + int attackNo, + int defNo , + int marray +) +{ + BOOL iRet = FALSE; + int battlemode; + int i,turn,perStatus,charaindex,toindex; + int ToList[SIDE_OFFSET*2+1]; + char *magicarg; + int Success = 0; + char szTurn[] = "turn"; + char szSuccess[] = "成"; + char *pszP; + charaindex = BATTLE_No2Index( battleindex, attackNo ); //攻方index + //check index + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return FALSE; + + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + + if( battlemode == BATTLE_CHARMODE_INIT ){ + return FALSE; + } + + magicarg = PETSKILL_getChar( marray, PETSKILL_OPTION ); + if( magicarg == NULL ) { + print("\n magicarg == NULL "); + return FALSE; + } + + pszP = magicarg; + + //读取作用回合数 + if( ( pszP = strstr( pszP, szTurn ) ) != NULL){ + pszP += sizeof( szTurn ); + sscanf( pszP, "%d", &turn ); + } + //命中率 + if( ( pszP = strstr( pszP, szSuccess ) ) != NULL){ + pszP += sizeof( szSuccess ); + sscanf( pszP, "%d", &Success ); + } + + BATTLE_MultiList( battleindex, defNo, ToList ); + + //施魔法动画效果 + BATTLE_MagicEffect(battleindex, attackNo, ToList, MAGIC_EFFECT_USER, SPR_hoshi); + + //check是否战斗中 + if( IsBATTLING( charaindex ) == TRUE ){ + + for( i = 0; ToList[i] != -1; i ++ ){ + toindex = BATTLE_No2Index( battleindex, ToList[i] ); + if( BATTLE_StatusAttackCheck( charaindex,toindex, BATTLE_ST_NOCAST, Success, 30, 1.0, &perStatus ) == TRUE + && CHAR_getInt( toindex, CHAR_WHICHTYPE) != CHAR_TYPEPET){ + //无法展开咒术页 + lssproto_NC_send( getfdFromCharaIndex( toindex ), 1); + CHAR_setWorkInt( toindex, CHAR_WORKNOCAST, turn ); + BATTLE_BadStatusString( ToList[i], BATTLE_ST_NOCAST ); + } + } + + } + return iRet; +} +#endif + +int BATTLE_getReactFlg( int index, int react) +{ + int flg=0; + if( react == BATTLE_MD_ABSROB )flg |= BCF_ABSORB; + if( react == BATTLE_MD_REFLEC )flg |= BCF_REFRECT; + if( react == BATTLE_MD_VANISH )flg |= BCF_VANISH; +#ifdef _MAGIC_SUPERWALL + if( CHAR_getWorkInt( index, CHAR_MAGICSUPERWALL ) > 0 ){ + flg |= BCF_SUPERWALL; + } +#endif +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + if( react == BATTLE_MD_TRAP ) flg |= BCF_TRAP; +#endif +#ifdef _PETSKILL_ACUPUNCTURE + if( react == BATTLE_MD_ACUPUNCTURE ) flg |= BCF_ACUPUNCTURE; +#endif + return flg; +} + +#ifdef _PREVENT_TEAMATTACK +int BATTLE_CheckSameSide( int charaindex, int toNo) +{ + int ToList[SIDE_OFFSET*2+1]; + int toindex, i, battleindex; + int MySide; + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + MySide = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLESIDE); + +//toindex = BATTLE_No2Index( battleindex, ToList[i] ); + if( toNo < 20 ){//单一目标 + toindex = BATTLE_No2Index( battleindex, toNo); + if( CHAR_getWorkInt( toindex, CHAR_WORKBATTLESIDE) == MySide ) return 1;//同边 + }else if( toNo){ + + BATTLE_MultiList( battleindex, toNo, ToList ); + for( i = 0; ToList[i] != -1; i ++ ){ + toindex = BATTLE_No2Index( battleindex, ToList[i] ); + if( !CHAR_CHECKINDEX( toindex) ) continue; + + if( CHAR_getWorkInt( toindex, CHAR_WORKBATTLESIDE) == MySide ) return 1;//同边 + } + } + return 0; +} +#endif + + +#ifdef _USER_CHARLOOPS +int CHAR_BattleStayLoop( int charaindex) +{ + int fd = getfdFromCharaIndex( charaindex); + if( getStayEncount( fd) ) { + if( CONNECT_getBDTime( fd) < time( NULL) ) { + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ) == BATTLE_CHARMODE_NONE){ + lssproto_EN_recv( fd, CHAR_getInt( charaindex,CHAR_X), CHAR_getInt( charaindex,CHAR_Y)); + CONNECT_setBDTime( fd, (int)time( NULL)); + } + } + }else{ + Char *ch; + ch = CHAR_getCharPointer( charaindex); + if( ch == NULL ) return 0; + strcpysafe( ch->charfunctable[CHAR_LOOPFUNCTEMP1].string, + sizeof( ch->charfunctable[CHAR_LOOPFUNCTEMP1]), "");//战斗 + CHAR_setInt( charaindex, CHAR_LOOPINTERVAL, 0); + CHAR_constructFunctable( charaindex); + } + + return 1; +} +#endif + +#ifdef _PETSKILL_PROPERTY +int PET_PetskillPropertyEvent( int Myindex, int defindex, int *damage, int *T_Pow, int size) +{ + int My_Pow[5]={0,0,0,0,0}; + int i, totals=100; + if( !CHAR_CHECKINDEX( Myindex)) return 0; + if( !CHAR_CHECKINDEX( defindex)) return 0; + BATTLE_GetAttr( defindex, My_Pow); + + //被攻击方转变属性 + for( i=0; i<4; i++) { + int nums = (i+3)%4; + if( My_Pow[i] != 0 ){ + T_Pow[ nums] = My_Pow[i]; + totals -= My_Pow[i]; + }else{ + T_Pow[ nums] = 0; + } + } + T_Pow[ 4] = totals; + return 1; +} +#endif + + + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + +// 直接攻击函式 +int battle_profession_attack_fun(int battleindex, int attackNo, int defNo, int charaindex) +{ + char szBuffer[512]=""; + char szCommand[1024]; + int attackindex, defindex=-1; + int damage=0, petdamage=0, i=0, iWork, Guardian=-1,react; + int flg = 0, DefSide=0,ultimate=0; + BOOL iRet = FALSE; + int ReactType=0, skill_type=-1, skill=-1; + char *pszP = NULL; + char *pszOption = NULL; + int effect=0, img1=0, img2=0, atk_num=0, skill_level; + + skill = CHAR_GETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3); + skill_type=CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ); + + //攻方index + attackindex = BATTLE_No2Index( battleindex, attackNo ); + if( CHAR_CHECKINDEX( attackindex ) == FALSE ) return iRet; + + //守方index + defindex = BATTLE_No2Index( battleindex, defNo ); + if( CHAR_CHECKINDEX( defindex ) == FALSE ){ + return iRet; + } + + // 体掠夺 + if( (CHAR_getInt( defindex, CHAR_HP ) <= 0) && (skill_type != BATTLE_COM_S_PLUNDER) ){ + return iRet; + } + + // 非战斗使用技能 + if( !PROFESSION_SKILL_getInt( skill, PROFESSION_SKILL_USE_FLAG) ) return iRet; + + // 取得技能参数 + pszOption = PROFESSION_SKILL_getChar( skill, PROFESSION_SKILL_OPTION); + if( pszOption == NULL ) return iRet; + + // 技能等级 + skill_level = CHAR_GETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3); + skill_level = PROFESSION_CHANGE_SKILL_LEVEL_A( skill_level ); + + // 动画方式 0原地秀动画 1人物移动秀动画 + if( (pszP = strstr( pszOption, "效%" ) ) != NULL ) sscanf( pszP+3, "%d", &effect ); + + // 准备期的动画 + img1 = PROFESSION_SKILL_getInt( skill, PROFESSION_SKILL_IMG_1 ); + + // 击中後的动画 + img2 = PROFESSION_SKILL_getInt( skill, PROFESSION_SKILL_IMG_2 ); + + // 目标地球一周,不动作 + if( defNo >= 0 && defNo <= 19 ){ + if( CHAR_getWorkInt( defindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_EARTHROUND0 ){ + return iRet; + } + } + + // 取出各技能参数 + switch( skill_type){ + case BATTLE_COM_S_BRUST: // 爆击 + { + int str=0, old_str=0; + + // 增加攻击力 + old_str = CHAR_getWorkInt( charaindex, CHAR_WORKFIXSTR); + str = old_str * ( skill_level * 3 + 100 ) / 100; + + CHAR_setWorkInt( charaindex, CHAR_WORKFIXSTR, str ); + + break; + } + case BATTLE_COM_S_CHAOS: // 混乱攻击 + { + int atk = 0; + // 减30%攻击力 + atk = CHAR_getWorkInt( charaindex, CHAR_WORKATTACKPOWER ); + atk = atk * 70 / 100; + CHAR_setWorkInt(charaindex,CHAR_WORKATTACKPOWER, atk ); + + if( skill_level >= 10 ) atk_num = 5; + else if( skill_level >= 5 ) atk_num = 4; + else atk_num = 3; + + break; + } + case BATTLE_COM_S_CHAIN_ATK: // 连环攻击 + { + int rand_num = RAND(1, 100); + int hit; + + if( skill_level % 10 != 0 ) + skill_level += 1; + hit = skill_level * 5 + 15; + + if( rand_num <= hit ) + atk_num=2; // 攻击二次 + else + atk_num=0; + + break; + } + case BATTLE_COM_S_ENRAGE_PET: // 激怒宠物 + { + // 判断是否同队 + if( BATTLE_CheckSameSide( charaindex, defNo) != 1 ) return iRet; + + defNo = attackNo; + + // 攻击力 1 + CHAR_setWorkInt(charaindex,CHAR_WORKATTACKPOWER, 0 ); + + break; + } + case BATTLE_COM_S_CHAIN_ATK_2: // 双重攻击 + { + int atkpower = 0; + int absrob_num = CHAR_getWorkInt( defindex, CHAR_WORKDAMAGEABSROB ); // 光 + //int reflec_num = CHAR_getWorkInt( defindex, CHAR_WORKDAMAGEREFLEC ); // 镜 + int evanish_num = CHAR_getWorkInt( defindex, CHAR_WORKDAMAGEVANISH ); // 守 + int trap_num = CHAR_getWorkInt( defindex, CHAR_WORKTRAP ); // 陷阱 + + if( absrob_num > 0 ) CHAR_setWorkInt( defindex, CHAR_WORKDAMAGEABSROB, max(absrob_num - 1, 0) ); + //if( reflec_num > 0 ) CHAR_setWorkInt( defindex, CHAR_WORKDAMAGEREFLEC, max(reflec_num - 1, 0) );//让镜有效,这行要拿掉 + if( evanish_num > 0 ) CHAR_setWorkInt( defindex, CHAR_WORKDAMAGEVANISH, max(evanish_num - 1, 0) ); + if( trap_num > 0 ) CHAR_setWorkInt( defindex, CHAR_WORKTRAP, 0 ); + + // 第一下攻击力 0 + CHAR_setWorkInt(charaindex,CHAR_WORKATTACKPOWER, 0 ); + + snprintf( szCommand, sizeof( szCommand ), "B+|a%X|r%X|f%X|d%X|p%X|e%X|s%X|h%X|", + attackNo, defNo, BCF_NO_DAMAGE, 0, 0, effect, img1, img2 ); + BATTLESTR_ADD( szCommand ); + + // 增加攻击力 + atkpower =(int)( CHAR_getWorkInt(charaindex,CHAR_WORKFIXSTR) * (skill_level * 2 + 100) /100 ); + + CHAR_setWorkInt(charaindex,CHAR_WORKATTACKPOWER, atkpower ); + + if( (CHAR_getInt( charaindex, CHAR_HP ) > 0 ) && + (CHAR_getInt( defindex, CHAR_HP ) > 0 ) ){ + BATTLE_Attack( battleindex, attackNo, defNo ); + } + + snprintf( szCommand, sizeof( szCommand ), "FF|"); + BATTLESTR_ADD( szCommand ); + + return iRet; + } + case BATTLE_COM_S_DEAD_ATTACK: // 濒死攻击 + { + int hit=0, hp=0, old_hp=0, rate=0; + + rate = skill_level * 2 + 10 ; + old_hp = CHAR_getInt(charaindex, CHAR_HP); + hp = old_hp * rate / 100; + + if( old_hp <= 10 ){ + CHAR_talkToCli( charaindex, -1, "HP不足,无法使用技能", CHAR_COLORYELLOW); + return iRet; + } + + hit = skill_level * 2 + 80; + + CHAR_setWorkInt(charaindex,CHAR_WORKHITRIGHT, CHAR_getWorkInt(charaindex,CHAR_WORKHITRIGHT) + hit ); + CHAR_setWorkInt( charaindex, CHAR_MYSKILLHIT, 1); + CHAR_setWorkInt( charaindex, CHAR_MYSKILLHIT_NUM, hit); + CHAR_talkToCli( charaindex, -1, "命中率上升", CHAR_COLORYELLOW); + + sprintf( szCommand, "BD|r%X|0|1|%X|", attackNo, (-1) * (old_hp - hp) ); + BATTLESTR_ADD( szCommand ); + + CHAR_setInt(charaindex, CHAR_HP, hp); + break; + } + case BATTLE_COM_S_ATTACK_WEAK: // 弱点攻击 + { + float str=0.0, dex=0.0; + int whichtype; + + whichtype = CHAR_getInt( defindex, CHAR_WHICHTYPE); + + // 目标为宠物时升攻 + if( (whichtype == CHAR_TYPEPET) || (whichtype == CHAR_TYPEENEMY) ){ + str = skill_level * 2 +10 + 100; + CHAR_setWorkInt(charaindex,CHAR_WORKATTACKPOWER, CHAR_getWorkInt(charaindex,CHAR_WORKATTACKPOWER) * (str/100) ); + } + + // 降敏 + dex = 100 - ( skill_level + 10 ); + CHAR_setWorkInt(charaindex,CHAR_WORKQUICK, CHAR_getWorkInt(charaindex,CHAR_WORKFIXDEX) * (dex/100) ); + sprintf( szCommand, "BD|r%X|0|6|%X|", attackNo, (-1) * (skill_level + 10) ); + BATTLESTR_ADD( szCommand ); + + break; + } + case BATTLE_COM_S_PLUNDER: // 体掠夺 + { + char pBidList[BATTLE_ENTRY_MAX*2+1]; + int item, start = 0; + memset( pBidList, -1, sizeof(pBidList) ); + pBidList[0] = defNo; + + // 掠夺的目标 + defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); + defindex = BATTLE_No2Index( battleindex, defNo ); + if( CHAR_getInt( defindex, CHAR_WHICHTYPE) != CHAR_TYPEENEMY ) return 1; + + snprintf( szCommand, sizeof( szCommand ), "B+|a%X|r%X|f%X|d%X|p%X|e%X|s%X|h%X|FF|", + attackNo, defNo, flg, 0, 0, effect, img1, img2 ); + BATTLESTR_ADD( szCommand ); + + if( defNo < 10 ) start = 0; + else start = 10; + + for( i = start; i < start+10; i++ ){ + for(item=CHAR_STARTITEMARRAY; item < CHAR_STARTITEMARRAY+10; item++){ + int enemy_index = -1; + int itemindex = -1; + + enemy_index = BATTLE_No2Index( battleindex, i ); + if( !CHAR_CHECKINDEX(enemy_index) ) break; + + itemindex = CHAR_getItemIndex( enemy_index, item ); + + if(ITEM_CHECKINDEX( itemindex ) == TRUE ){ + char msg[64], *item_name; + + CHAR_AddPileItem( charaindex, itemindex); + + item_name = ITEM_getChar( itemindex, ITEM_NAME); + + sprintf( msg, "得到%s", item_name ); + CHAR_talkToCli( charaindex, -1, msg, CHAR_COLORYELLOW); + + CHAR_setItemIndex( enemy_index, item, -1 ); + + BATTLE_Exit( defindex, battleindex ); + + return 1; + } + } + } + + BATTLE_Exit( defindex, battleindex ); + + return 1; + } + default: + break; + } + + + react = 0; + if( (ReactType=BATTLE_GetDamageReact( defindex)) > 0 ) { //有光镜守 + react = ReactType; + if( skill_type != BATTLE_COM_S_CHAIN_ATK ){ + react=0; +// skill_type=-1; + } + } + + + if( defNo >= SIDE_OFFSET ){ + i = defNo - SIDE_OFFSET; + DefSide = 1; + } + + //取得攻击後状态 + iWork = BATTLE_AttackSeq( attackindex, defindex, &damage, &Guardian, skill_type ); + if( skill_type == BATTLE_COM_S_ENRAGE_PET ){//让激怒宠物技能不要真的打死宠物 + if( CHAR_getInt( defindex, CHAR_HP ) <= damage ){ + damage = 0; + } + } + +#ifdef CAVALRY_DEBUG + ultimate = BATTLE_DamageSub( attackindex, defindex, &damage, &petdamage, &react); +#else + if( skill_type == BATTLE_COM_S_CAVALRY) // 座骑攻击 + ultimate = BATTLE_PROFESSION_ATK_PET_DamageSub( attackindex, defindex, &damage, &petdamage, &react, skill_level ); + else + ultimate = BATTLE_DamageSub( attackindex, defindex, &damage, &petdamage, &react); +#endif + + if( react == BATTLE_MD_REFLEC ) defindex = attackindex; + if( react == BATTLE_MD_TRAP ) defindex = attackindex; +#ifdef _PETSKILL_ACUPUNCTURE + if( react == BATTLE_MD_ACUPUNCTURE ) defindex = attackindex; +#endif + if( damage > 0 && ( react != BATTLE_MD_ABSROB )&& ( react != BATTLE_MD_VANISH )){ + BATTLE_DamageWakeUp( battleindex, defindex ); + } + + iRet = BATTLE_DefineAttack( attackindex, defindex, iWork, szBuffer, damage, react, &flg); + + // 将 NORMAL 及 CRITICAL 的 flg 改成 职业的flg + if( img2 != 0 ){ + if( flg == BCF_NORMAL || flg == BCF_KAISHIN ){ + if( (pszP = strstr( pszOption, "前" ) ) != NULL ) + flg |= BCF_F_SKILLACT; //击中前秀图 + else + flg |= BCF_B_SKILLACT; //击中後秀 + } + } + + if( CHAR_getInt( defindex, CHAR_HP ) <= 0 ){ + iRet = BATTLE_DefDieType( defindex, iRet, &ultimate, &flg, szBuffer); + } + + if( damage > 0 ){ + if( BATTLE_ItemCrushSeq( attackindex, defindex, damage) == TRUE ) + flg |= BCF_CRUSH; + } + + + memset( szCommand, 0, sizeof( szCommand)); + switch( skill_type){ + case BATTLE_COM_S_BRUST: // 爆击 + case BATTLE_COM_S_DEAD_ATTACK: // 濒死攻击 + case BATTLE_COM_S_ATTACK_WEAK: // 弱点攻击 + case BATTLE_COM_S_CAVALRY: // 座骑攻击 + { + snprintf( szCommand, sizeof( szCommand ), "B+|a%X|r%X|f%X|d%X|p%X|e%X|s%X|h%X|FF|", + attackNo, defNo, flg, damage, petdamage, effect, img1, img2 ); + BATTLESTR_ADD( szCommand ); + break; + } + case BATTLE_COM_S_ENRAGE_PET: // 激怒宠物 + { + int str = 0; + int turn = 0; + int pindex = -1; + + + flg |= BCF_NO_DAMAGE; + flg |= BCF_B_SKILLACT; //击中後秀图 + + defNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); + + pindex = BATTLE_No2Index( battleindex, defNo ); + + // 检查是否为宠物 + if( CHAR_getInt( pindex, CHAR_WHICHTYPE) != CHAR_TYPEPET ) break; + + snprintf( szCommand, sizeof( szCommand ), "B+|a%X|r%X|f%X|d%X|p%X|e%X|s%X|h%X|FF|", + attackNo, defNo, flg, 0, 0, effect, img1, img2 ); + BATTLESTR_ADD( szCommand ); + + // 加攻 + str = skill_level * 2 + 10; + sprintf( szCommand, "BD|r%X|0|4|%X|", defNo, str); + BATTLESTR_ADD( szCommand ); + CHAR_setWorkInt( pindex, CHAR_MYSKILLSTRPOWER, str); + + if( skill_level >= 10 ) turn=5; + else if( skill_level >= 5 ) turn=4; + else turn=3; + + CHAR_setWorkInt( pindex, CHAR_MYSKILLSTR, turn ); + + break; + } + case BATTLE_COM_S_CHAOS: // 混乱攻击 + { + int i=0, j=0, k=0, f_num=0; + int temp[10], chose_temp[10]; + int defNo_index = BATTLE_No2Index( battleindex, defNo ); + + memset( temp, -1, sizeof( temp ) ); + memset( chose_temp, -1, sizeof( chose_temp ) ); + + if( CHAR_getWorkInt( defNo_index, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_EARTHROUND0 ){ + break; + } + + if( defNo >= 10 ) f_num = 10; + else f_num = 0; + + // 减30%攻击力 + //CHAR_setWorkInt(charaindex,CHAR_WORKATTACKPOWER, CHAR_getWorkInt( charaindex, CHAR_WORKATTACKPOWER ) * 70 / 100 ); + + //传给client减攻击力效果 + sprintf( szCommand, "BD|r%X|0|4|%X|", attackNo, -30 ); + BATTLESTR_ADD( szCommand ); + + snprintf( szCommand, sizeof( szCommand ), "B+|a%X|r%X|f%X|d%X|p%X|e%X|s%X|h%X|", + attackNo, defNo, flg, damage, petdamage, effect, img1, img2 ); + BATTLESTR_ADD( szCommand ); + + // 取出战场上存活的人 + for( i=f_num; i 0 ){ + int atk_to_index = -1; + atk_to_index = BATTLE_No2Index( battleindex, chose_temp[k] ); + + if( ( atk_to_index >= 0 ) && + ( BATTLE_TargetCheck(battleindex, chose_temp[k] ) != FALSE ) && + ( CHAR_getWorkInt( atk_to_index, CHAR_WORKBATTLECOM1 ) != BATTLE_COM_S_EARTHROUND0 ) + ){ + BATTLE_Attack( battleindex, attackNo, chose_temp[k] ); + k++; + atk_num --; + }else{ + + memset( temp, -1, sizeof( temp ) ); + memset( chose_temp, -1, sizeof( chose_temp ) ); + j = 0; k = 0; + + // 取出战场上存活的人 + for( i=f_num; i 0 ) && + (CHAR_getInt( defindex, CHAR_HP ) > 0 ) ){ + BATTLE_Attack( battleindex, attackNo, defNo ); + } + + snprintf( szCommand, sizeof( szCommand ), "FF|"); + BATTLESTR_ADD( szCommand ); + + break; + } + } + + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + + i = defNo-DefSide*SIDE_OFFSET; + if( ultimate > 0 ){ + BattleArray[battleindex].Side[DefSide].Entry[i].flg |= BENT_FLG_ULTIMATE; + } + return iRet; +} + + +// 魔法攻击函式 +int battle_profession_attack_magic_fun(int battleindex, int attackNo, int defNo, int charaindex) +{ + int attr=-1, attIdx=0, skill=-1, toindex; + + // 取技能ID + skill = CHAR_GETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3); + + // 攻击目标 + // Robin fix + //toindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ); + toindex = defNo; + + + // 攻击 围 0单体 1单排 2一方全体 + if( toindex < 20 ){ // 单体 + attIdx = 0; + }else if( toindex>=23 && toindex<=26 ){ // 单排 + attIdx = 1; + }else if( toindex==20 || toindex==21 ){ // 一方全体 + attIdx = 2; + } + + // Robin fix 增加战场属性优势 + attr = BattleArray[battleindex].field_att -1; + + PROFESSION_MAGIC_ATTAIC( battleindex, attackNo, toindex, attIdx, attr, skill); + + return TRUE; +} + +// 提升自已能力系函式 +int battle_profession_assist_fun(int battleindex, int attackNo, int defNo, int charaindex) +{ + int i, skill, skill_type, skill_level, img1, img2, turn=1; + char *pszP = NULL, *pszOption = NULL, szCommand[256]; + BOOL iRet = FALSE; + int ToList[SIDE_OFFSET*2+1]; + + skill = CHAR_GETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3); + skill_type = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ); + + // 非战斗使用技能 + if( !PROFESSION_SKILL_getInt( skill, PROFESSION_SKILL_USE_FLAG) ) return iRet; + + // 技能的参数 + pszOption = PROFESSION_SKILL_getChar( skill, PROFESSION_SKILL_OPTION); + if( pszOption == NULL ) return iRet; + + // 技能等级 + skill_level = CHAR_GETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3); + + // 准备期的动画 + img1 = PROFESSION_SKILL_getInt( skill, PROFESSION_SKILL_IMG_1 ); + + // 击中後的动画 + img2 = PROFESSION_SKILL_getInt( skill, PROFESSION_SKILL_IMG_2 ); + + // 使用回合数 + if( (pszP = strstr( pszOption, "回%" ) ) != NULL ) sscanf( pszP+3, "%d", &turn ); + if(turn < 1) turn=1; + + switch(skill_type){ + case BATTLE_COM_S_TRANSPOSE: // 移形换位 + { + int defNo2 = CHAR_getWorkInt(charaindex,CHAR_WORKBATTLECOM2); + skill_level = PROFESSION_CHANGE_SKILL_LEVEL_M( skill_level ); + + memset( ToList, -1, sizeof( ToList)); + BATTLE_MultiList( battleindex, defNo2, ToList ); + BATTLE_MagicEffect( battleindex, attackNo, ToList, img1, img2 ); + + for( i = 0; ToList[i] != -1; i ++ ){ + int avoid=0; + int toindex = BATTLE_No2Index( battleindex, ToList[i] ); + if( !CHAR_CHECKINDEX( toindex ))continue; + if( charaindex != toindex ) continue; + + // 回避率 + if( skill_level >= 10 ) avoid = 70; + else if( skill_level >= 9 ) avoid = 60; + else if( skill_level >= 8 ) avoid = 50; + else if( skill_level >= 6 ) avoid = 45; + else if( skill_level >= 5 ) avoid = 30; + else if( skill_level >= 3 ) avoid = 25; + else avoid = 10; + + if( skill_level >= 10 ) turn = 5; + else if( skill_level >= 6 ) turn = 4; + else turn = 3; + + if( CHAR_getWorkInt( toindex, CHAR_MYSKILLDUCK) <= 0){ + CHAR_setWorkInt( toindex, CHAR_MYSKILLDUCK, turn+1); + CHAR_setWorkInt( toindex, CHAR_MYSKILLDUCKPOWER, avoid ); + sprintf( szCommand, "BD|r%X|0|3|%X|", ToList[i], avoid); + BATTLESTR_ADD( szCommand ); + iRet = TRUE; + } + } + break; + } + case BATTLE_COM_S_SCAPEGOAT: // 舍已为友 + { + int tgh=0, old_tgh=0, flg=0, rate=0; + int pos=0, side=0, ownerpos=0; + skill_level = PROFESSION_CHANGE_SKILL_LEVEL_A( skill_level ); + + pos = BATTLE_Index2No( battleindex, charaindex ); + side = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLESIDE ); + + if( skill_level >= 10 ){ // 我方全体 + for(i=0; i<10; i++){ + if(pos != i ) + BattleArray[battleindex].Side[side].Entry[i].guardian = pos; + } + }else if( skill_level >= 5 ){ // 我方所有宠物 + for(i=5; i<10; i++){ + if(pos != i ) + BattleArray[battleindex].Side[side].Entry[i].guardian = pos; + } + }else{ // 人物之宠物 + ownerpos = pos + 5; + if( ownerpos >= 10 ) ownerpos -= 10; + if( ownerpos < 0 || ownerpos > 19 ){ + }else{ + BattleArray[battleindex].Side[side].Entry[ownerpos].guardian = pos; + } + } + + rate = skill_level * 2; + + tgh = 30 - rate; + sprintf( szCommand, "BD|r%X|0|5|%X|", attackNo, (-1) * tgh ); + BATTLESTR_ADD( szCommand ); + + old_tgh = CHAR_getWorkInt(charaindex,CHAR_WORKFIXTOUGH); + tgh = (int)( old_tgh * (100-tgh) / 100 ); + CHAR_setWorkInt( charaindex, CHAR_WORKFIXTOUGH, tgh); + + flg = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEFLG ); + flg |= CHAR_BATTLEFLG_GUARDIAN; + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEFLG, flg ); + + iRet = TRUE; + + break; + } + case BATTLE_COM_S_ENRAGE: // 激化攻击 + { + int str=0, tgh=0; + skill_level = PROFESSION_CHANGE_SKILL_LEVEL_A( skill_level ); + + memset( ToList, -1, sizeof( ToList)); + BATTLE_MultiList( battleindex, attackNo, ToList ); + BATTLE_MagicEffect( battleindex, attackNo, ToList, img1, img2 ); + + // 减防 + tgh = skill_level * 2 + 10; + sprintf( szCommand, "BD|r%X|0|5|%X|", attackNo, (-1) * tgh ); + BATTLESTR_ADD( szCommand ); + + CHAR_setWorkInt(charaindex,CHAR_MYSKILLTGHPOWER, (-1) * tgh); + + // 加攻 + str = skill_level * 2 + 20; + sprintf( szCommand, "BD|r%X|0|4|%X|", attackNo, str); + BATTLESTR_ADD( szCommand ); + + CHAR_setWorkInt( charaindex, CHAR_MYSKILLSTRPOWER, str); + + if( skill_level >= 10 ) turn=5; + else if( skill_level >= 5 ) turn=4; + else turn=3; + + CHAR_setWorkInt( charaindex, CHAR_MYSKILLSTR, turn ); + CHAR_setWorkInt( charaindex, CHAR_MYSKILLTGH, turn ); + + iRet = TRUE; + break; + } + case BATTLE_COM_S_COLLECT: // 能量聚集 + { + int dex=0, tgh=0; + skill_level = PROFESSION_CHANGE_SKILL_LEVEL_A( skill_level ); + + memset( ToList, -1, sizeof( ToList)); + BATTLE_MultiList( battleindex, attackNo, ToList ); + BATTLE_MagicEffect( battleindex, attackNo, ToList, img1, img2 ); + + // 减敏 + dex = (skill_level * 2) + 10; + sprintf( szCommand, "BD|r%X|0|6|%X|", attackNo, (-1) * dex ); + BATTLESTR_ADD( szCommand ); + CHAR_setWorkInt(charaindex,CHAR_MYSKILLDEXPOWER, dex); + + // 加防 + tgh = (skill_level * 2) + 20; + sprintf( szCommand, "BD|r%X|0|5|%X|", attackNo, tgh); + BATTLESTR_ADD( szCommand ); + CHAR_setWorkInt( charaindex, CHAR_MYSKILLTGHPOWER, tgh); + + if( skill_level >= 10 ) turn=5; + else if( skill_level >= 5 ) turn=4; + else turn=3; + + CHAR_setWorkInt( charaindex, CHAR_MYSKILLDEX, turn ); + CHAR_setWorkInt( charaindex, CHAR_MYSKILLTGH, turn ); + + iRet = TRUE; + break; + } + case BATTLE_COM_S_FOCUS: // 专注战斗 + { + int ToList[SIDE_OFFSET*2+1]; + skill_level = PROFESSION_CHANGE_SKILL_LEVEL_A( skill_level ); + + memset( ToList, -1, sizeof( ToList)); + BATTLE_MultiList( battleindex, attackNo, ToList ); + BATTLE_MagicEffect( battleindex, attackNo, ToList, img1, img2 ); + + CHAR_setWorkInt( charaindex, CHAR_MYSKILLHIT, 2); + CHAR_setWorkInt( charaindex, CHAR_MYSKILLHIT_NUM, 100); + + CHAR_talkToCli( charaindex, -1, "命中率上升", CHAR_COLORYELLOW); + + iRet = TRUE; + break; + } + case BATTLE_COM_S_TRAP: // 陷阱 + { + int value; + int ToList[SIDE_OFFSET*2+1]; + skill_level = PROFESSION_CHANGE_SKILL_LEVEL_M( skill_level ); + + memset( ToList, -1, sizeof(ToList) ); + ToList[0] = attackNo; + + value = skill_level * 30 + 100; + BATTLE_MagicEffect( battleindex, attackNo, ToList, img1, img2 ); + + if( skill_level >= 10 ) turn=3; + else if( skill_level >= 5 ) turn=2; + else turn=1; + + CHAR_setWorkInt( charaindex, CHAR_WORKTRAP, turn); + CHAR_setWorkInt( charaindex, CHAR_WORKMODTRAP, value); + + iRet = TRUE; + break; + } + case BATTLE_COM_S_DOCILE: // 驯伏宠物 + { + int rate = 0; + skill_level = PROFESSION_CHANGE_SKILL_LEVEL_A( skill_level ); + + rate = skill_level * 2 + 10; + + BATTLE_MultiCaptureUp( battleindex, attackNo, defNo, rate, img1, img2 ); + + iRet = TRUE; + break; + } +#ifdef _PROFESSION_ADDSKILL + case BATTLE_COM_S_CALL_NATURE: // 号召自然 + { + int ridepet=0,count=0,addhp=0,toindex=-1; + int ToList[SIDE_OFFSET*2+1]; + BATTLE_MultiList( battleindex, defNo, ToList ); + + if( defNo == 20 || defNo == 25 || defNo == 26 )//右方 + img1 = 101772; + for( i = 0; ToList[i] != -1; i ++ ){ + toindex = BATTLE_No2Index( battleindex, ToList[i] ); + if( CHAR_CHECKINDEX( toindex ) == FALSE ) continue; + ridepet = BATTLE_getRidePet( toindex ); + if( ridepet == -1 ) + ++count; + else + count += 2; + } + if( skill_level >= 100 ) addhp = 5000/count; + else if( skill_level > 95 ) addhp = 4500/count; + else if( skill_level > 90 ) addhp = 4000/count; + else if( skill_level > 85 ) addhp = 3500/count; + else if( skill_level > 80 ) addhp = 3000/count; + else if( skill_level > 60 ) addhp = 2500/count; + else if( skill_level > 40 ) addhp = 2000/count; + else if( skill_level > 20 ) addhp = 1000/count; + else addhp = 500/count; + if( addhp <= 100 ) + img2 = SPR_heal; + else if( addhp <= 300 ) + img2 = SPR_heal2; + else + img2 = SPR_heal3; + BATTLE_MagicEffect( battleindex, attackNo, ToList, img1, img2 ); + + for( i = 0; ToList[i] != -1; i ++ ){ + toindex = BATTLE_No2Index( battleindex, ToList[i] ); + if( CHAR_CHECKINDEX( toindex ) == FALSE ) continue; + ridepet = BATTLE_getRidePet( toindex ); + if( ridepet == -1 ){ + CHAR_setInt( toindex, CHAR_HP, + min( addhp+CHAR_getInt( toindex, CHAR_HP ), CHAR_getWorkInt( toindex, CHAR_WORKMAXHP ) ) ); + } + else{ + CHAR_setInt( toindex, CHAR_HP, + min( addhp+CHAR_getInt( toindex, CHAR_HP ), CHAR_getWorkInt( toindex, CHAR_WORKMAXHP ) ) ); + CHAR_setInt( ridepet, CHAR_HP, + min( addhp+CHAR_getInt( ridepet, CHAR_HP ), CHAR_getWorkInt( ridepet, CHAR_WORKMAXHP ) ) ); + } + snprintf( szCommand, sizeof(szCommand),"BD|r%X|%X|%X|d%X|p%X|", ToList[i], BD_KIND_HP, 1, addhp, ridepet?addhp:0 ); + BATTLESTR_ADD( szCommand ); + + + if( BattleArray[battleindex].norisk == 0 + && CHAR_getInt( toindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET) + { + int flg = CHAR_getWorkInt( toindex, CHAR_WORKBATTLEFLG ); + if( flg & CHAR_BATTLEFLG_RECOVERY ) + {} + else + { + CHAR_PetAddVariableAi( toindex, AI_FIX_PETRECOVERY ); + CHAR_setWorkInt( toindex, CHAR_WORKBATTLEFLG, flg | CHAR_BATTLEFLG_RECOVERY ); + } + } + } + + iRet = TRUE; + break; + } +#endif + default: + break; + } + + + return iRet; +} + +#ifdef _PROFESSION_ADDSKILL +extern unsigned int GET_PROFESSION_magic_array(int idx); +#endif + +// 击中改变状态系函式 +extern void BATTLE_TargetListSet( int charaindex, int attackNo, int *pList); +extern int BoomerangVsTbl[4][5]; +int battle_profession_status_chang_fun(int battleindex, int attackNo, int defNo, int charaindex) +{ + int i, skill, skill_type, skill_level, img1=0, img2=0, turn=1, j; + char *pszP = NULL, *pszOption = NULL, szCommand[512]; + float rate=0.0; + BOOL iRet = FALSE; + int defindex; + int damage=0, petdamage=0, iWork, Guardian=-1,react; + int flg=0, DefSide=0,ultimate=0; + int ReactType=0, effect=0; + + skill = CHAR_GETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3 ); + skill_type=CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1 ); + + // 非战斗使用技能 + if( !PROFESSION_SKILL_getInt( skill, PROFESSION_SKILL_USE_FLAG) ) return iRet; + + // 技能的参数 + pszOption = PROFESSION_SKILL_getChar( skill, PROFESSION_SKILL_OPTION); + if( pszOption == NULL ) return iRet; + + // 技能等级 + skill_level = CHAR_GETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3); + skill_level = PROFESSION_CHANGE_SKILL_LEVEL_A( skill_level ); + + // 技能等级 rate + if( (pszP = strstr( pszOption, "倍%" ) ) != NULL ) sscanf( pszP+3, "%f", &rate ); + + // 准备期的动画 + img1 = PROFESSION_SKILL_getInt( skill, PROFESSION_SKILL_IMG_1 ); + + // 击中後的动画 + img2 = PROFESSION_SKILL_getInt( skill, PROFESSION_SKILL_IMG_2 ); + + // 使用回合数 + if( (pszP = strstr( pszOption, "回%" ) ) != NULL ) sscanf( pszP+3, "%d", &turn ); + if(turn < 1) turn=1; + + // 动画方式 0原地秀动画 1人物移动秀动画 + if( (pszP = strstr( pszOption, "效%" ) ) != NULL ) sscanf( pszP+3, "%d", &effect ); + + // 目标地球一周,不动作 + if( defNo >= 0 && defNo <= 19 ){ + defindex = BATTLE_No2Index( battleindex, defNo ); + if( CHAR_CHECKINDEX( defindex ) == FALSE ) return iRet; + if( CHAR_getWorkInt( defindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_EARTHROUND0 ){ + return iRet; // Miss + } + } + + switch(skill_type){ + // 不移动型 + case BATTLE_COM_S_ENTWINE: // 树根缠绕 + case BATTLE_COM_S_DRAGNET: // 天罗地网 + case BATTLE_COM_S_INSTIGATE: // 挑拨 + case BATTLE_COM_S_OBLIVION: // 遗忘 + case BATTLE_COM_S_RESIST_FIRE: // 火抗性提升 + case BATTLE_COM_S_RESIST_ICE: // 冰抗性提升 + case BATTLE_COM_S_RESIST_THUNDER: // 雷抗性提升 +#ifdef _PROFESSION_ADDSKILL + case BATTLE_COM_S_RESIST_F_I_T: // 自然威能 +#endif + case BATTLE_COM_S_FIRE_ENCLOSE: // 火附体 + case BATTLE_COM_S_ICE_ENCLOSE: // 冰附体 + case BATTLE_COM_S_THUNDER_ENCLOSE: // 雷附体 + { + int perStatus=0, toindex=-1, status=-1, Success=0, dex=0, old_dex; + //char szBuffer[256]=""; + int ToList[SIDE_OFFSET*2+1]; + int defNo2 = CHAR_getWorkInt(charaindex,CHAR_WORKBATTLECOM2); + + // 使用对象 + if( skill_type == BATTLE_COM_S_RESIST_FIRE || // 火抗性提升 + skill_type == BATTLE_COM_S_RESIST_ICE || // 冰抗性提升 + skill_type == BATTLE_COM_S_RESIST_THUNDER // 雷抗性提升 +#ifdef _PROFESSION_ADDSKILL + || skill_type == BATTLE_COM_S_RESIST_F_I_T // 自然威能 +#endif + ){ +#ifdef _PROFESSION_ADDSKILL + defNo2 = BATTLE_Index2No( battleindex, charaindex ); +#else + if( defNo2 < 10 ){ + if( skill_level >= 10 ) defNo2 = 20; + else if( skill_level >= 5 ) defNo2 = 25; + }else{ + if( skill_level >= 10 ) defNo2 = 21; + else if( skill_level >= 5 ) defNo2 = 24; + } +#endif + } + + memset( ToList, -1, sizeof( ToList)); + BATTLE_MultiList( battleindex, defNo2, ToList ); + + BATTLE_MagicEffect( battleindex, attackNo, ToList, img1, img2 ); + + charaindex = BATTLE_No2Index( battleindex, attackNo ); + if( CHAR_CHECKINDEX( charaindex ) == FALSE ) return iRet; + + // 改变状态 + if( ((pszP = strstr( pszOption, "缠" ) ) != NULL ) || + ((pszP = strstr( pszOption, "挑" ) ) != NULL ) || + ((pszP = strstr( pszOption, "忘" ) ) != NULL ) || + ((pszP = strstr( pszOption, "火" ) ) != NULL ) || + ((pszP = strstr( pszOption, "冰" ) ) != NULL ) || + ((pszP = strstr( pszOption, "雷" ) ) != NULL ) || + ((pszP = strstr( pszOption, "罗" ) ) != NULL ) || + ((pszP = strstr( pszOption, "击" ) ) != NULL ) || + ((pszP = strstr( pszOption, "冻" ) ) != NULL ) || + ((pszP = strstr( pszOption, "炎" ) ) != NULL ) +#ifdef _PROFESSION_ADDSKILL + || ((pszP = strstr( pszOption, "抗" ) ) != NULL ) +#endif + ){ + for( i = 1; i < BATTLE_ST_END; i ++ ){ + if( strncmp( pszP, aszStatus[i], 2 ) == 0 ){ + status = i; + break; + } + } + } + + // 成功率 + if( (pszP = strstr( pszOption, "成%" ) ) != NULL ) sscanf( pszP+3, "%d", &Success ); + + Success = Success + skill_level * 4; + + if( skill_type == BATTLE_COM_S_DRAGNET ){ + int DRAGNET=0,dragnet_idx=-1; + //找出攻方是那一边的 + if( attackNo > 9 ){//左边 + for(i=0;i<10;i++){//计算右边有多少人中天罗 + dragnet_idx = BATTLE_No2Index( battleindex, i ); + if( CHAR_CHECKINDEX( dragnet_idx ) ) + if( CHAR_getWorkInt( dragnet_idx, CHAR_WORKDRAGNET ) > 0 ) + ++DRAGNET; + } + } + else{//右 + for(i=10;i<20;i++){//计算左边有多少人中天罗 + dragnet_idx = BATTLE_No2Index( battleindex, i ); + if( CHAR_CHECKINDEX( dragnet_idx ) ) + if( CHAR_getWorkInt( BATTLE_No2Index( battleindex, i ), CHAR_WORKDRAGNET ) > 0 ) + ++DRAGNET; + } + } + if( DRAGNET == 1 ) + Success *= 0.64; + else if( DRAGNET > 1 ) + Success *= 0.4; + } + + perStatus = Success; + + // 回合数 + if( (skill_type == BATTLE_COM_S_INSTIGATE) && (skill_level == 10) ){ // 挑拨 + turn = 4; + }else if( (skill_type == BATTLE_COM_S_RESIST_FIRE) || // 火抗性提升 + (skill_type == BATTLE_COM_S_RESIST_ICE) || // 冰抗性提升 + (skill_type == BATTLE_COM_S_RESIST_THUNDER) ){ // 雷抗性提升 + + if( skill_level >= 10 ) turn = 5; + else if( skill_level >= 5 ) turn = 4; + else turn = 3; + }else if( skill_type == BATTLE_COM_S_OBLIVION ){ // 遗忘 + if( skill_level >= 10 ){ turn = 4; + }else if( skill_level >= 5 ){ turn = 3; + }else{ turn = 2; } + } +#ifdef _PROFESSION_ADDSKILL + else if( skill_type == BATTLE_COM_S_RESIST_F_I_T ){ // 自然威能 + skill_level = CHAR_GETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3); + if( skill_level >= 100 ) turn = 5; + else if( skill_level > 80 ) turn = 4; + else turn = 3; + } +#endif + + switch( skill_type ){ + case BATTLE_COM_S_RESIST_FIRE: + CHAR_talkToCli( charaindex, -1 , "火抗性提升" , CHAR_COLORYELLOW ); break; + case BATTLE_COM_S_RESIST_ICE: + CHAR_talkToCli( charaindex, -1 , "冰抗性提升" , CHAR_COLORYELLOW ); break; + case BATTLE_COM_S_RESIST_THUNDER: + CHAR_talkToCli( charaindex, -1 , "雷抗性提升" , CHAR_COLORYELLOW ); break; +#ifdef _PROFESSION_ADDSKILL + case BATTLE_COM_S_RESIST_F_I_T: + CHAR_talkToCli( charaindex, -1 , "火冰雷抗性提升" , CHAR_COLORYELLOW ); break; +#endif + } + + for( i = 0; ToList[i] != -1; i ++ ){ + toindex = BATTLE_No2Index( battleindex, ToList[i] ); + if( CHAR_CHECKINDEX( toindex ) == FALSE ) return iRet; + + // 挑拨不可施於玩家人物身上 + if( skill_type == BATTLE_COM_S_INSTIGATE ){ + if( CHAR_getInt( toindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + CHAR_talkToCli( charaindex, -1, "不可施於人物身上", CHAR_COLORYELLOW ); + break; + } + } + + // 状态命中检定 + if( (PROFESSION_BATTLE_StatusAttackCheck( charaindex, toindex, status, Success ) == 0 ) + || (CHAR_getInt( toindex, CHAR_HP ) <= 0 ) ){ + + //snprintf( szBuffer, sizeof(szBuffer), "(%s)无法将(%s)做成(%s)(%d%%)", + // CHAR_getUseName( charaindex ), CHAR_getUseName( toindex ), + // aszStatusFull[status], perStatus ); + + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + }else{ +#ifdef _PROFESSION_ADDSKILL + if( status == BATTLE_ST_RESIST_F_I_T ){//自然威能 + CHAR_setWorkInt( toindex, StatusTbl[BATTLE_ST_RESIST_F], turn + 1 ); + CHAR_setWorkInt( toindex, StatusTbl[BATTLE_ST_RESIST_I], turn + 1 ); + CHAR_setWorkInt( toindex, StatusTbl[BATTLE_ST_RESIST_T], turn + 1 ); + } + else +#endif + CHAR_setWorkInt( toindex, StatusTbl[status], turn + 1 ); + + if( status == BATTLE_ST_PARALYSIS + || status == BATTLE_ST_SLEEP + || status == BATTLE_ST_STONE + || status == BATTLE_ST_BARRIER + || status == BATTLE_ST_DIZZY + || status == BATTLE_ST_ENTWINE + || status == BATTLE_ST_DRAGNET + || status == BATTLE_ST_ICECRACK + || status == BATTLE_ST_ICEARROW ){ + CHAR_setWorkInt( toindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + } + if( status == BATTLE_ST_DRAGNET ){//天罗地网 + CHAR_setWorkInt( toindex, CHAR_DOOMTIME, 0 );//世界末日集气 + CHAR_setWorkInt( toindex, CHAR_WORK_com1, 0 ); + CHAR_setWorkInt( toindex, CHAR_WORK_toNo, 0 ); + CHAR_setWorkInt( toindex, CHAR_WORK_mode, 0 ); + CHAR_setWorkInt( toindex, CHAR_WORK_skill_level, 0 ); + CHAR_setWorkInt( toindex, CHAR_WORK_array, 0 ); + } + if( skill_type == BATTLE_COM_S_FIRE_ENCLOSE ){ // 火附体 + CHAR_setWorkInt( toindex, CHAR_WORKMOD_F_ENCLOSE_2, skill_level ); + // 加火熟练度经验值 + PROFESSION_SKILL_LVEVEL_UP( charaindex, "PROFESSION_FIRE_PRACTICE" ); + }else if(skill_type == BATTLE_COM_S_ICE_ENCLOSE ){ // 冰附体 + CHAR_setWorkInt( toindex, CHAR_WORKMOD_I_ENCLOSE_2, skill_level ); + // 加冰熟练度经验值 + PROFESSION_SKILL_LVEVEL_UP( charaindex, "PROFESSION_ICE_PRACTICE" ); + }else if(skill_type == BATTLE_COM_S_THUNDER_ENCLOSE ){ // 雷附体 + CHAR_setWorkInt( toindex, CHAR_WORKMOD_T_ENCLOSE_2, skill_level ); + // 加雷熟练度经验值 + PROFESSION_SKILL_LVEVEL_UP( charaindex, "PROFESSION_THUNDER_PRACTICE" ); + } + + // 遗忘 宠物遗忘技能 + if( skill_type == BATTLE_COM_S_OBLIVION ){ + int toNo = -1, toNoindex = -1, pet_no = -1, num = 0; + char msg[20]; + + memset( msg, -1, sizeof(msg) ); + + // 主人index + toNo = ToList[i] - 5; + toNoindex = BATTLE_No2Index( battleindex, toNo ); + + // 宠物编号 + pet_no = CHAR_getInt( toNoindex, CHAR_DEFAULTPET ); + + // 遗忘宠技数量 + num = skill_level / 2; + if( num < 1 ) num = 1; + CHAR_setWorkInt( toindex, CHAR_WORKMODOBLIVION, num ); + + // 传给 client 遗忘技能 + if( toNoindex != -1 ){ + sprintf( msg, "W%d", pet_no ); + CHAR_sendStatusString( toNoindex, msg ); + + sprintf( msg, "Y%d", pet_no ); + CHAR_sendStatusString( toNoindex, msg ); + + } + } + + // 挑拨 降属性 + if(skill_type == BATTLE_COM_S_INSTIGATE ){ + int rate=0; + rate = skill_level * 1 + 10; + CHAR_setWorkInt( toindex, CHAR_WORKMODINSTIGATE, rate); + + sprintf( szCommand, "BD|r%X|0|4|%X|", ToList[i], (-1) * rate); + BATTLESTR_ADD( szCommand ); + sprintf( szCommand, "BD|r%X|0|5|%X|", ToList[i], (-1) * rate); + BATTLESTR_ADD( szCommand ); + sprintf( szCommand, "BD|r%X|0|6|%X|", ToList[i], (-1) * rate ); + BATTLESTR_ADD( szCommand ); + + } + + // 树根缠绕 降敏 + if(skill_type == BATTLE_COM_S_ENTWINE ){ + if( (pszP = strstr( pszOption, "敏%" ) ) != NULL ) sscanf( pszP+3, "%d", &dex ); + dex = skill_level * 4 + dex; + old_dex = CHAR_getWorkInt( toindex, CHAR_WORKFIXDEX); + old_dex = old_dex * (100 - dex) / 100; + CHAR_setWorkInt( toindex, CHAR_WORKFIXDEX, old_dex ); + sprintf( szCommand, "BD|r%X|0|6|%X|", ToList[i], (-1) * dex ); + BATTLESTR_ADD( szCommand ); + } + + // 火抗性提升 + if(skill_type == BATTLE_COM_S_RESIST_FIRE ){ + int old_value = CHAR_getWorkInt( toindex, CHAR_WORK_F_RESIST ); + int up_value = skill_level + 10; + CHAR_setWorkInt( toindex, CHAR_WORKMODRESIST_F, up_value ); + CHAR_setWorkInt( toindex, CHAR_WORK_F_RESIST, old_value + up_value ); + + }else + // 冰抗性提升 + if(skill_type == BATTLE_COM_S_RESIST_ICE ){ + int old_value = CHAR_getWorkInt( toindex, CHAR_WORK_I_RESIST ); + int up_value = skill_level + 10; + CHAR_setWorkInt( toindex, CHAR_WORKMODRESIST_I, up_value ); + CHAR_setWorkInt( toindex, CHAR_WORK_I_RESIST, old_value + up_value ); + + }else + // 雷抗性提升 + if(skill_type == BATTLE_COM_S_RESIST_THUNDER ){ + int old_value = CHAR_getWorkInt( toindex, CHAR_WORK_T_RESIST ); + int up_value = skill_level + 10; + CHAR_setWorkInt( toindex, CHAR_WORKMODRESIST_T, up_value ); + CHAR_setWorkInt( toindex, CHAR_WORK_T_RESIST, old_value + up_value ); + + } +#ifdef _PROFESSION_ADDSKILL + else + // 自然威能 + if(skill_type == BATTLE_COM_S_RESIST_F_I_T ){ + int old_value = CHAR_getWorkInt( toindex, CHAR_WORK_F_RESIST ); + int up_value = 2; //抗性值 + + if( skill_level >= 10 ) up_value = 20; + else if( skill_level > 8 ) up_value = 18; + else if( skill_level > 7 ) up_value = 16; + else if( skill_level > 6 ) up_value = 14; + else if( skill_level > 5 ) up_value = 12; + else if( skill_level > 4 ) up_value = 10; + else if( skill_level > 3 ) up_value = 8; + else if( skill_level > 2 ) up_value = 6; + else if( skill_level > 1 ) up_value = 4; + else up_value = 2; + + CHAR_setWorkInt( toindex, CHAR_WORKMODRESIST_F, up_value ); + CHAR_setWorkInt( toindex, CHAR_WORK_F_RESIST, old_value + up_value ); + + old_value = CHAR_getWorkInt( toindex, CHAR_WORK_I_RESIST ); + CHAR_setWorkInt( toindex, CHAR_WORKMODRESIST_I, up_value ); + CHAR_setWorkInt( toindex, CHAR_WORK_I_RESIST, old_value + up_value ); + + old_value = CHAR_getWorkInt( toindex, CHAR_WORK_T_RESIST ); + CHAR_setWorkInt( toindex, CHAR_WORKMODRESIST_T, up_value ); + CHAR_setWorkInt( toindex, CHAR_WORK_T_RESIST, old_value + up_value ); + + } +#endif + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)将(%s)做成(%s)(%d%%)", CHAR_getUseName( charaindex ), + // CHAR_getUseName( toindex ), aszStatusFull[status], perStatus ); + + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + BATTLE_BadStatusString( ToList[i], status ); + iRet = TRUE; + } + } + break; + } + // 移动型 + case BATTLE_COM_S_SHIELD_ATTACK: // 盾击 + { + int itmid=-1; + int perStatus, status=-1, Success=-1; + char szBuffer[256]=""; + int ToList[SIDE_OFFSET*2+1]; + int defNo2 = CHAR_getWorkInt(charaindex,CHAR_WORKBATTLECOM2); + + itmid = CHAR_getItemIndex( charaindex, CHAR_EQSHIELD ); + + if( ( itmid < 0 ) || ITEM_WSHIELD != ITEM_getInt( itmid , ITEM_TYPE ) ){ + CHAR_talkToCli( charaindex, -1, "未装备盾牌,无法使用此技能", CHAR_COLORYELLOW); + iRet = FALSE; + break; + } + + // 攻击力减半 + if( skill_level != 10 ) + CHAR_setWorkInt(charaindex,CHAR_WORKATTACKPOWER, (int)(CHAR_getWorkInt(charaindex,CHAR_WORKATTACKPOWER) * 0.5 ) ); + + memset( ToList, -1, sizeof( ToList)); + BATTLE_MultiList( battleindex, defNo2, ToList ); + + // 改变状态 + if( (pszP = strstr( pszOption, "晕" ) ) != NULL ){ + for( i = 1; i < BATTLE_ST_END; i ++ ){ + if( strncmp( pszP, aszStatus[i], 2 ) == 0 ){ + status = i; + break; + } + } + } + + // 成功率 + if( (pszP = strstr( pszOption, "成%" ) ) != NULL ) sscanf( pszP+3, "%d", &Success ); + Success += skill_level * 4; + perStatus = Success; + + if( defNo2 >= SIDE_OFFSET ){ + i = defNo2 - SIDE_OFFSET; + DefSide = 1; + } + + for( i = 0; ToList[i] != -1; i ++ ){ + int hit = -1; + react = 0; + + defindex = BATTLE_No2Index( battleindex, ToList[i] ); //守方index + if( CHAR_CHECKINDEX( defindex ) == FALSE ) continue; + + if( (ReactType=BATTLE_GetDamageReact( defindex)) > 0 ) { //有光镜守 + react = ReactType; + skill_type=-1; + } + + //取得攻击後状态 + iWork = BATTLE_AttackSeq( charaindex, defindex, &damage, &Guardian, skill_type ); + + ultimate = BATTLE_DamageSub( charaindex, defindex, &damage, &petdamage, &react); + + if( damage > 0 && ( react != BATTLE_MD_ABSROB )&& ( react != BATTLE_MD_VANISH )){ + BATTLE_DamageWakeUp( battleindex, defindex ); + } + + iRet = BATTLE_DefineAttack( charaindex, defindex, iWork, szBuffer, damage, react, &flg); + + // 将 NORMAL 及 CRITICAL 的 flg 改成 职业的flg + if( img2 != 0 ){ + if( flg == BCF_NORMAL || flg == BCF_KAISHIN ){ + hit=1; + if( (pszP = strstr( pszOption, "前" ) ) != NULL ){ + flg |= BCF_F_SKILLACT; //击中前秀图 + }else{ + flg |= BCF_B_SKILLACT; //击中後秀图 + } + } + } + + if( CHAR_getInt( defindex, CHAR_HP ) <= 0 ) + iRet = BATTLE_DefDieType( defindex, iRet, &ultimate, &flg, szBuffer); + + if( damage > 0 ){ + if( BATTLE_ItemCrushSeq( charaindex, defindex, damage) == TRUE ){ + flg |= BCF_CRUSH; + } + } + + if( hit == 1 ){ + if( (PROFESSION_BATTLE_StatusAttackCheck( charaindex, defindex, status, Success ) == 0 ) + || (CHAR_getInt( defindex, CHAR_HP ) <= 0 ) ){ + + //snprintf( szBuffer, sizeof(szBuffer), "(%s)无法将(%s)做成(%s)(%d%%)", + // CHAR_getUseName( charaindex ), CHAR_getUseName( defindex ), aszStatusFull[status], perStatus ); + + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + }else{ + CHAR_setWorkInt( defindex, StatusTbl[status], turn + 1 ); + + if( status == BATTLE_ST_PARALYSIS + || status == BATTLE_ST_SLEEP + || status == BATTLE_ST_STONE + || status == BATTLE_ST_BARRIER + || status == BATTLE_ST_DIZZY + || status == BATTLE_ST_ENTWINE + || status == BATTLE_ST_DRAGNET + || status == BATTLE_ST_ICECRACK + || status == BATTLE_ST_ICEARROW + ){ + CHAR_setWorkInt( defindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + } + + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)将(%s)做成(%s)(%d%%)", + // CHAR_getUseName( charaindex ), + // CHAR_getUseName( defindex ), + // aszStatusFull[status], + // perStatus + //); + + BATTLE_BadStatusString( ToList[i], status ); + } + } + + snprintf( szCommand, sizeof( szCommand ), "B+|a%X|r%X|f%X|d%X|p%X|e%X|s%X|h%X|FF|", + attackNo, ToList[i], flg, damage, petdamage, effect, img1, img2 ); + BATTLESTR_ADD( szCommand ); + + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + + i = defNo2-DefSide*SIDE_OFFSET; + if( ultimate > 0 ){ + BattleArray[battleindex].Side[DefSide].Entry[i].flg |= BENT_FLG_ULTIMATE; + } + + iRet = TRUE; + } + break; + + } + case BATTLE_COM_S_TOXIN_WEAPON: // 毒素武器 + { + int perStatus, status=-1, Success=-1; + int defNo2 = CHAR_getWorkInt(charaindex,CHAR_WORKBATTLECOM2); + + charaindex = BATTLE_No2Index( battleindex, attackNo ); + if( CHAR_CHECKINDEX( charaindex ) == FALSE ) return iRet; + + // 改变状态 + if( ((pszP = strstr( pszOption, "毒" ) ) != NULL ) ){ + + for( i = 1; i < BATTLE_ST_END; i ++ ){ + if( strncmp( pszP, aszStatus[i], 2 ) == 0 ){ + status = i; + break; + } + } + } + + // 成功率 + if( (pszP = strstr( pszOption, "成%" ) ) != NULL ) sscanf( pszP+3, "%d", &Success ); + Success += skill_level * 2; + perStatus = Success; + + if( defNo2 >= SIDE_OFFSET ){ + i = defNo2 - SIDE_OFFSET; + DefSide = 1; + } + + { + int gWeponType = BATTLE_GetWepon( charaindex ); + char szCommand[512]; + int i = 0, ReactType = 0, iRet = -1; + int ToList[SIDE_OFFSET*2+1]; + BOOL bChange = FALSE; + + memset( ToList, -1, sizeof( ToList)); + BATTLE_MultiList( battleindex, defNo, ToList ); + + memset( szCommand, -1, sizeof(szCommand) ); + + // 有无变身 +#ifdef _PETSKILL_BECOMEPIG + if(CHAR_getWorkInt(charaindex, CHAR_WORKFOXROUND) > 0 + || CHAR_getWorkInt(charaindex, CHAR_BECOMEPIG) > 0) bChange = TRUE; +#else + if(CHAR_getWorkInt(charaindex, CHAR_WORKFOXROUND) > 0) bChange = TRUE; +#endif + if(!bChange){ + // 武器为远程武器 + if( gWeponType == ITEM_BOW ){ + sprintf( szCommand, "BB|a%X|w0|", attackNo ); + BATTLESTR_ADD( szCommand ); + memset( ToList, -1, sizeof( ToList)); + BATTLE_TargetListSet(charaindex,attackNo,ToList); + }else if( gWeponType == ITEM_BOUNDTHROW ){ + sprintf( szCommand, "BB|a%X|w1|", attackNo ); + BATTLESTR_ADD( szCommand ); + }else if( gWeponType == ITEM_BREAKTHROW ){ + sprintf( szCommand, "BB|a%X|w2|", attackNo ); + BATTLESTR_ADD( szCommand ); + }else if( gWeponType == ITEM_BOOMERANG){ + sprintf( szCommand, "BO|a%X|", attackNo ); + BATTLESTR_ADD( szCommand ); + memset(ToList,-1,sizeof(ToList)); + for(i=0;i<5;i++) ToList[i] = BoomerangVsTbl[defNo/5][i]; + gBattleDamageModyfy = 0.3; + } + } + + for( i = 0; ToList[i] != -1; i ++ ){ + int defindex = -1, j = -1; + int react = 0; + char szBuffer[256] = ""; + + damage = 0; + petdamage = 0; + flg = 0; + + //memset( szBuffer, 0, sizeof( szBuffer ) ); + + defindex = BATTLE_No2Index( battleindex, ToList[i] ); //守方index + if( CHAR_CHECKINDEX( defindex ) == FALSE ) continue; + if( CHAR_getInt( defindex, CHAR_HP ) <= 0 ) continue; + + if( (ReactType=BATTLE_GetDamageReact( defindex)) > 0 ){ //有光镜守 + react = ReactType; + skill_type=-1; + } + + //取得攻击後状态 + iWork = BATTLE_AttackSeq( charaindex, defindex, &damage, &Guardian, skill_type ); + if(Guardian >= 0) defindex = BATTLE_No2Index( battleindex, Guardian ); + + iRet = BATTLE_DefineAttack( charaindex, defindex, iWork, szBuffer, damage, react, &flg); + + if(damage > 0){ + ultimate = BATTLE_DamageSub( charaindex, defindex, &damage, &petdamage, &react); + + if((react != BATTLE_MD_ABSROB ) && ( react != BATTLE_MD_VANISH ) ){ + BATTLE_DamageWakeUp( battleindex, defindex ); + } + + if( CHAR_getInt( defindex, CHAR_HP ) <= 0 ) + iRet = BATTLE_DefDieType( defindex, iRet, &ultimate, &flg, szBuffer); + + if( BATTLE_ItemCrushSeq( charaindex, defindex, damage) == TRUE ){ + flg |= BCF_CRUSH; + } + + if( (PROFESSION_BATTLE_StatusAttackCheck( charaindex, defindex, status, perStatus ) == 0 ) + || (CHAR_getInt( defindex, CHAR_HP ) <= 0 ) ){ + + //snprintf( szBuffer, sizeof(szBuffer), "(%s)无法将(%s)做成(%s)(%d%%)", + // CHAR_getUseName( charaindex ), CHAR_getUseName( defindex ), aszStatusFull[status], perStatus ); + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + }else{ + CHAR_setWorkInt( defindex, StatusTbl[status], turn + 1 ); + + if( status == BATTLE_ST_PARALYSIS + || status == BATTLE_ST_SLEEP + || status == BATTLE_ST_STONE + || status == BATTLE_ST_BARRIER + || status == BATTLE_ST_DIZZY + || status == BATTLE_ST_ENTWINE + || status == BATTLE_ST_DRAGNET + || status == BATTLE_ST_ICECRACK + || status == BATTLE_ST_ICEARROW + ){ + CHAR_setWorkInt( defindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + } + + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)将(%s)做成(%s)(%d%%)", + // CHAR_getUseName( charaindex ), + // CHAR_getUseName( defindex ), + // aszStatusFull[status], + // perStatus + //); + + BATTLE_BadStatusString( ToList[i], status ); + } + } + + // 武器为远程武器时 + + if(((gWeponType == ITEM_BOW) + || (gWeponType == ITEM_BOUNDTHROW) + || (gWeponType == ITEM_BREAKTHROW) + || (gWeponType == ITEM_BOOMERANG)) && !bChange){ + snprintf( szCommand, sizeof( szCommand ), "r%X|f%X|d%X|p%X|", ToList[i], flg, damage, petdamage ); + BATTLESTR_ADD( szCommand ); + }else{ + snprintf( szCommand, sizeof( szCommand ), "BH|a%X|r%X|f%X|d%X|p%X|FF|", attackNo, ToList[i], flg, damage, petdamage); + BATTLESTR_ADD( szCommand ); + } + + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + + j = ToList[i]-DefSide*SIDE_OFFSET; + if( ultimate > 0 ){ + BattleArray[battleindex].Side[DefSide].Entry[j].flg |= BENT_FLG_ULTIMATE; + } + + iRet = TRUE; + } + + // 武器为远程武器时 + if((( gWeponType == ITEM_BOW ) || ( gWeponType == ITEM_BOUNDTHROW ) || ( gWeponType == ITEM_BREAKTHROW ) || ( gWeponType == ITEM_BOOMERANG )) && !bChange){ + snprintf( szCommand, sizeof( szCommand ), "FF|" ); + BATTLESTR_ADD( szCommand ); + } + } + if(gWeponType == ITEM_BOOMERANG) gBattleDamageModyfy = 1.0; + break; + } +#ifdef _PROFESSION_ADDSKILL + case BATTLE_COM_S_BOUNDARY: // 四属性结界 + { + int ToList[SIDE_OFFSET*2+1],status=-1,power=20,toindex=-1,loop=1; + int defNo2 = defNo;//CHAR_getWorkInt(charaindex,CHAR_WORKBATTLECOM2); + int rand_boundary,rand_boundary2 = RAND( 1, 100 ); + + if( skill_level >= 10 ) turn = 5; + else if( skill_level > 9 ) turn = 4; + else if( skill_level > 8 ) turn = 3; + else if( skill_level > 4 ) turn = 2; + else turn = 1; + + skill_level = CHAR_GETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3); + + if( skill_level >= 100 ) power = 100; + else if( skill_level > 95 ) power = 90; + else if( skill_level > 90 ) power = 80; + else if( skill_level > 85 ) power = 70; + else if( skill_level > 80 ) power = 60; + else if( skill_level > 60 ) power = 50; + else if( skill_level > 40 ) power = 40; + else if( skill_level > 20 ) power = 30; + else power = 20; + + if( ((pszP = strstr( pszOption, "地结界" ) ) != NULL ) ) + status = CHAR_WORKFIXEARTHAT_BOUNDARY; + else if( ((pszP = strstr( pszOption, "水结界" ) ) != NULL ) ) + status = CHAR_WORKFIXWATERAT_BOUNDARY; + else if( ((pszP = strstr( pszOption, "火结界" ) ) != NULL ) ) + status = CHAR_WORKFIXFIREAT_BOUNDARY; + else if( ((pszP = strstr( pszOption, "风结界" ) ) != NULL ) ){ + status = CHAR_WORKFIXWINDAT_BOUNDARY; + } + else{//破结界 + status = CHAR_WORKFIXEARTHAT_BOUNDARY; + + if( skill_level >= 100 ) rand_boundary = 100; + else if( skill_level > 80 ) rand_boundary = 80; + else if( skill_level > 40 ) rand_boundary = 70; + else if( skill_level > 20 ) rand_boundary = 60; + else rand_boundary = 50; + if( rand_boundary2 <= rand_boundary ){ + loop = 4; + power=0; + turn=0; + } + else + loop = 0; + } + + if( ((pszP = strstr( pszOption, "破结界" ) ) != NULL ) ){ + if( defNo2 < 10 )defNo2 = 20; else defNo2 = 21; + } + + memset( ToList, -1, sizeof( ToList)); + BATTLE_MultiList( battleindex, defNo2, ToList ); + + if( ((pszP = strstr( pszOption, "破结界" ) ) == NULL ) ){//先把所有结界清除 + for( j=CHAR_WORKFIXEARTHAT_BOUNDARY; j 0 ) { + playerdamage = (damage*petquick)/(defquick+petquick) +1; + petdamage = damage - playerdamage +1 ; + hp -= playerdamage; + pethp -= petdamage; + }else + hp -= damage; + } + work = CHAR_getWorkInt( defindex, CHAR_WORKDAMAGEREFLEC ) - 1; + CHAR_setWorkInt( defindex, CHAR_WORKDAMAGEREFLEC, max( work, 0 ) ); + defindex = attackindex; + defpet = attackpet; + + }else + if( *pRefrect == BATTLE_MD_TRAP ){ //陷阱 + int value=0; + value = CHAR_getWorkInt( defindex, CHAR_WORKMODTRAP ); + damage = value; + + hp = CHAR_getInt( attackindex, CHAR_HP ); + if( attackpet == -1 ) { + hp -= damage; + playerdamage = hp; + }else { + pethp = CHAR_getInt( attackpet, CHAR_HP ); + defquick = CHAR_getWorkInt( attackindex, CHAR_WORKDEFENCEPOWER ); + petquick = CHAR_getWorkInt( attackpet, CHAR_WORKDEFENCEPOWER ); + if( pethp > 0 ) { + playerdamage = (damage*petquick)/(defquick+petquick) +1; + petdamage = damage - playerdamage +1 ; + hp -= playerdamage; + pethp -= petdamage; + }else + hp -= damage; + } + + CHAR_setWorkInt( defindex, CHAR_WORKTRAP, 0 ); + CHAR_setWorkInt( defindex, CHAR_WORKMODTRAP, 0 ); + defindex = attackindex; + defpet = attackpet; + + }else +#ifdef _PETSKILL_ACUPUNCTURE +/* if( *pRefrect == BATTLE_MD_ACUPUNCTURE ){ + hp = CHAR_getInt( attackindex, CHAR_HP ); + if( attackpet == -1 ) { + hp -= ( damage/2 ? damage/2:1 ); + }else { + pethp = CHAR_getInt( attackpet, CHAR_HP ); + defquick = CHAR_getWorkInt( attackindex, CHAR_WORKDEFENCEPOWER ); + petquick = CHAR_getWorkInt( attackpet, CHAR_WORKDEFENCEPOWER ); + if( pethp > 0 ) { + playerdamage = (damage*petquick)/(defquick+petquick) +1; + petdamage = damage - playerdamage +1 ; + hp -= ( playerdamage/2 ? playerdamage/2:1 ); + pethp -= ( petdamage/2 ? petdamage/2:1 ); + }else + hp -= ( damage/2 ? damage/2:1 ); + } + //work = CHAR_getWorkInt( defindex, CHAR_WORKACUPUNCTURE ) - 1; + CHAR_setWorkInt( defindex, CHAR_WORKACUPUNCTURE, 0);//max( work, 0 ) ); + defindex = attackindex; + defpet = attackpet; + }*/ +#endif + if( react == BATTLE_MD_VANISH ){ + hp = CHAR_getInt( defindex, CHAR_HP ); + if( defpet != -1 ) + pethp = CHAR_getInt( defpet, CHAR_HP ); + work = CHAR_getWorkInt( defindex, CHAR_WORKDAMAGEVANISH ) - 1; + CHAR_setWorkInt( defindex, CHAR_WORKDAMAGEVANISH, max( work, 0 ) ); + *pRefrect = BATTLE_MD_VANISH; + }else{ + hp = CHAR_getInt( defindex, CHAR_HP ); + + if( defpet == -1 ) { + hp -= (damage * 0.7); + }else { + pethp = CHAR_getInt( defpet, CHAR_HP ); + if( pethp > 0 ) { + int rate=0; + rate = skill_level * 2 + 60; + + petdamage = damage * rate / 100; + playerdamage = damage - petdamage; + + hp -= playerdamage; + pethp -= petdamage; + + }else + hp -= damage; + } + *pRefrect = 0; + } + if( hp < 0 ){ + addpoint = -hp; + hp = 0; + } + maxhp = CHAR_getWorkInt( defindex, CHAR_WORKMAXHP ); + CHAR_setInt( defindex, CHAR_HP, min( hp, maxhp ) ); + if( defpet != -1 ) { + if( pethp < 0 ) pethp = 0; + petmaxhp = CHAR_getWorkInt( defpet, CHAR_WORKMAXHP ); + CHAR_setInt( defpet, CHAR_HP, min( pethp, petmaxhp ) ); + // Robin 0804 + if( pethp <= 0 ) { + CHAR_setInt( defindex, CHAR_RIDEPET, -1 ); + BATTLE_changeRideImage( defindex ); + CHAR_setWorkInt( defindex, CHAR_WORKPETFALL, 1 ); + print(" defpet_die! "); + } + } + + if( (damage) >= maxhp * 1.2 + 20 ){ + IsUltimate = 2; + }else{ + if( addpoint > 0 ){ + addpoint += CHAR_getWorkInt( defindex, CHAR_WORKULTIMATE ); + CHAR_setWorkInt( defindex, CHAR_WORKULTIMATE, addpoint ); + if( addpoint >= maxhp * 1.2 + 20 )IsUltimate = 1; + } + } + + if( BattleArray[battleindex].type == BATTLE_TYPE_P_vs_P ){ + } +#ifdef _PETSKILL_LER +// 雷尔不能被打飞 + if(CHAR_getInt(defindex,CHAR_BASEBASEIMAGENUMBER) == 101813 || + CHAR_getInt(defindex,CHAR_BASEBASEIMAGENUMBER) == 101814) IsUltimate = 0; +#endif + + if( IsUltimate ){ + CHAR_setWorkInt( defindex, CHAR_WORKULTIMATE, 0 ); + } + if( playerdamage < 0 ) playerdamage = 0; + if( petdamage < 0 ) petdamage = 0; + *pDamage = playerdamage; + *pPetDamage = petdamage; + return IsUltimate; +} + + +// 取得回旋攻击伤害 +int BATTLE_PROFESSION_CONVOLUTE_GET_DAMAGE( int attackindex, int defindex, int skill_level ) +{ + int damage = 0, old_atk = 0, atk = 0; + int rand_num = RAND(1, 10000 ); + // 会心一击 + int perCri = BATTLE_CriticalCheck( attackindex, defindex ); + + old_atk = CHAR_getWorkInt( attackindex, CHAR_WORKATTACKPOWER ); + atk = old_atk * (100 -( 50 - skill_level )) / 100; + CHAR_setWorkInt( attackindex, CHAR_WORKATTACKPOWER, atk ); + + if( rand_num < perCri ){ + damage = BATTLE_CriDamageCalc( attackindex, defindex ); + }else{ + //profession fix + if( BATTLE_DuckCheck( attackindex, defindex ) ) + return 0; + damage = BATTLE_DamageCalc( attackindex, defindex ); + } + + return damage; +} + +// 取得贯穿攻击伤害 +int BATTLE_PROFESSION_THROUGH_ATTACK_GET_DAMAGE( int attackindex, int defindex ) +{ + int damage = 0; + int rand_num = RAND(1, 10000 ); + // 会心一击 + int perCri = BATTLE_CriticalCheck( attackindex, defindex ); + + if( rand_num < perCri ){ + damage = BATTLE_CriDamageCalc( attackindex, defindex ); + }else{ + //profession fix + if( BATTLE_DuckCheck( attackindex, defindex ) ) + return 0; + damage = BATTLE_DamageCalc( attackindex, defindex ); + } + + return damage; +} + +// 火、冰、雷附体附加攻击 +int BATTLE_PROFESSION_RANG_ATTACK_DAMAGE( int charaindex, int attackNo, int defNo, int skill_type, int status, int turn, int perStatus, int effect, int img1, int img2 ) +{ + int ReactType = 0, iRet = -1,defindex = -1,react = 0; + int battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + //char szBuffer[256]=""; + + //memset( szBuffer, 0, sizeof( szBuffer ) ); + + defindex = BATTLE_No2Index( battleindex, defNo); //守方index + if( defindex == -1 ) return iRet; + + if( (ReactType=BATTLE_GetDamageReact( defindex)) > 0 ){ //有光镜守 + react = ReactType; + skill_type=-1; + } + + if( img1 != 0 ){ + if( (PROFESSION_BATTLE_StatusAttackCheck( charaindex, defindex, status, perStatus ) == 0 ) + || (CHAR_getInt( defindex, CHAR_HP ) <= 0 ) ){ + //snprintf( szBuffer, sizeof(szBuffer), "(%s)无法将(%s)做成(%s)(%d%%)", + // CHAR_getUseName( charaindex ), CHAR_getUseName( defindex ), aszStatusFull[status], perStatus ); + //BATTLE_BroadCast( battleindex, szBuffer,(attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + } + else{ + CHAR_setWorkInt( defindex, StatusTbl[status], turn + 1 ); + + if( status == BATTLE_ST_PARALYSIS + || status == BATTLE_ST_SLEEP + || status == BATTLE_ST_STONE + || status == BATTLE_ST_BARRIER + || status == BATTLE_ST_DIZZY + || status == BATTLE_ST_ENTWINE + || status == BATTLE_ST_DRAGNET + || status == BATTLE_ST_ICECRACK + || status == BATTLE_ST_ICEARROW + ) CHAR_setWorkInt( defindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)将(%s)做成(%s)(%d%%)", + // CHAR_getUseName( charaindex ), + // CHAR_getUseName( defindex ), + // aszStatusFull[status], + // perStatus + // ); + + BATTLE_BadStatusString( defNo, status ); + iRet = TRUE; + } + //BATTLE_BroadCast( battleindex, szBuffer,(attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + } + + return iRet; +} + +#endif + +#ifdef _PETSKILL_LER +extern ToCallMagic PROFESSION_magic[3]; +// 雷尔技 - 群蝠四窜 +void BATTLE_BatFly( int battleindex, int attackNo,int myside) +{ + int ToList[SIDE_OFFSET*2+1],i,toindex; + int petidx,addhp = 0,charhp,pethp,charaindex; + char szCommand[1024]; + + charaindex = BATTLE_No2Index(battleindex,attackNo); + if(CHAR_CHECKINDEX(charaindex) == FALSE) return; + + memset(ToList,-1,sizeof(ToList)); + if(myside) BATTLE_MultiList(battleindex,TARGET_SIDE_0,ToList); // 打右上 + else BATTLE_MultiList(battleindex,TARGET_SIDE_1,ToList); // 打左下 + + PROFESSION_magic[2].uiSpriteNum = myside ? 101806:101807; + PROFESSION_magic[2].siSx = 320; + PROFESSION_magic[2].siSy = 240; + PROFESSION_magic[2].uiPrevMagicNum = myside ? 101808:101809; // 前置动画 + PROFESSION_magic[2].uiPostMagicNum = 0xffffffff; // 无後置动画 + PROFESSION_magic[2].uiShowType = 1; + PROFESSION_magic[2].uiShowBehindChar = 1; + PROFESSION_magic[2].siPrevMagicSx = 0; + PROFESSION_magic[2].siPrevMagicSy = 0; + PROFESSION_MAGIC_ATTAIC_Effect(battleindex,attackNo,ToList,2); + sprintf(szCommand,"%X|",0x5711438); + BATTLESTR_ADD(szCommand); + + for(i=0;i CHAR_getWorkInt(charaindex,CHAR_WORKMAXHP)){ + CHAR_setInt(charaindex,CHAR_HP,CHAR_getWorkInt(charaindex,CHAR_WORKMAXHP)); + addhp = 0; + } + else CHAR_setInt(charaindex,CHAR_HP,CHAR_getInt(charaindex,CHAR_HP) + addhp); + sprintf(szCommand,"BD|r%X|%X|1|d%X|p0|",attackNo,BD_KIND_HP,addhp); + BATTLESTR_ADD(szCommand); +} + +// 雷尔技 - 分身地裂 +void BATTLE_DivideAttack( int battleindex, int attackNo,int myside) +{ + int ToList[SIDE_OFFSET*2+1],i,toindex; + int petidx,charhp,charmp,pethp,charaindex; + char szCommand[1024]; + + charaindex = BATTLE_No2Index(battleindex,attackNo); + if(CHAR_CHECKINDEX(charaindex) == FALSE) return; + + memset(ToList,-1,sizeof(ToList)); + if(myside) BATTLE_MultiList(battleindex,TARGET_SIDE_0,ToList); // 打左上 + else BATTLE_MultiList(battleindex,TARGET_SIDE_1,ToList); // 打右下 + + PROFESSION_magic[2].uiSpriteNum = myside ? 101798:101800; + PROFESSION_magic[2].siSx = 320; + PROFESSION_magic[2].siSy = 240; + PROFESSION_magic[2].uiPrevMagicNum = myside ? 101808:101809; // 前置动画 + PROFESSION_magic[2].uiPostMagicNum = 0xffffffff; // 无後置动画 + PROFESSION_magic[2].uiShowType = 1; + PROFESSION_magic[2].uiShowBehindChar = 0; + PROFESSION_magic[2].siPrevMagicSx = 0; + PROFESSION_magic[2].siPrevMagicSy = 0; + PROFESSION_MAGIC_ATTAIC_Effect(battleindex,attackNo,ToList,2); + sprintf(szCommand,"%X|",0x5711438); + BATTLESTR_ADD(szCommand); + + // 先完成扣MP的动作 + for(i=0;i>1)); + charmp >>= 1; + sprintf(szCommand,"BD|r%X|%X|0|d%X|",ToList[i],BD_KIND_MP,charmp); + BATTLESTR_ADD(szCommand); + } + } + for(i=0;i 10 ? 1:0); + } + else if(CHAR_getInt(charaindex,CHAR_BASEBASEIMAGENUMBER) == 101814){ + array = ENEMY_getEnemyArrayFromId(2510); + if(array == -1) return; + newindex = ENEMY_createEnemy(array,300); + if(newindex == -1) return; + CHAR_setWorkInt(newindex,CHAR_WORK_RELIFE,101811); + CHAR_setWorkInt(newindex,CHAR_WORKBATTLESIDE,no > 10 ? 1:0); + } + pBattle = &BattleArray[battleindex]; + pEntry = pBattle->Side[no > 10 ? 1:0].Entry; + pEntry[no > 10 ? no-10:no].charaindex = newindex; +} +#endif + +#ifdef _PETSKILL_BATTLE_MODEL +typedef struct _tsAttackObject{ + int index; // 攻击物件编号 + int target; // 目标编号 + int actionNumber; // 攻击物件图号 +}AttackObject; +// BATTLE_BattleModel 用的攻击函式 +void BATTLE_BattleModel_ATTACK( + int battleindex, + int charaindex, + AttackObject *pAAttackObject, + int iEffect, + int iTurn, + int iEffectHit, + int iType) +{ + int i,iDefindex,iPetindex,iToindex,iDamage,iPetDamage,iGuardian = -1,iDefState,iUltimate = 0,iTemp = 0,iTemp2 = 0,iFlg = 0; + char szCommand[1024]; + + // 检查目标存不存在或有没有死亡 + if(!BATTLE_TargetCheck(battleindex,pAAttackObject->target)) return; + iToindex = iDefindex = BATTLE_No2Index(battleindex,pAAttackObject->target); + // 若是宠物,检查主人在不在场上 + if(CHAR_getInt(iToindex,CHAR_WHICHTYPE ) == CHAR_TYPEPET){ + if(pAAttackObject->target + 5 >= SIDE_OFFSET) iFlg = 1; + i = pAAttackObject->target + 5 - iFlg * SIDE_OFFSET; + if(BattleArray[battleindex].Side[iFlg].Entry[i].flg & BENT_FLG_ULTIMATE) return; + } + iPetindex = BATTLE_getRidePet(iToindex); + // 计算伤害 + iDefState = BATTLE_AttackSeq(charaindex,iToindex,&iDamage,&iGuardian,-1); + // iType & 0x00000004 为 true 表示为物理攻击 + if(iType & 0x00000004){ + // 若忠犬没死亡,设定忠犬 + if(BATTLE_TargetCheck(battleindex,iGuardian)){ + // 若有忠犬,把被攻击者设定为使用忠犬技能的角色,否则被攻击者为原目标 + if(iGuardian >= 0) iDefindex = BATTLE_No2Index(battleindex,iGuardian); + } + else iGuardian = -1; + } + // 设定 CHAR_NPCWORKINT1 为 BATTLE_COM_S_BATTLE_MODEL 在 BATTLE_DamageSub 会用到 + iTemp2 = CHAR_getWorkInt(iDefindex,CHAR_NPCWORKINT1); + CHAR_setWorkInt(iDefindex,CHAR_NPCWORKINT1,BATTLE_COM_S_BATTLE_MODEL); + // 在这之後的 iDefindex 才是真正会受伤的目标 + if(gDamageDiv != 0.0 && iDamage > 0){ + iDamage /= gDamageDiv; + if(iDamage <= 0) iDamage = 1; + } + // 若没有下列任一项,进行扣血 + if(!(iDefState == BATTLE_RET_DODGE)){ + // 扣血 + // 物理攻击 + if(iType & 0x00000004) iUltimate = BATTLE_DamageSub(charaindex,iDefindex,&iDamage,&iPetDamage,&iTemp); + // 非物理攻击 + else{ + iTemp = -1; + iUltimate = BATTLE_DamageSub(charaindex,iDefindex,&iDamage,&iPetDamage,&iTemp); + } + } + iFlg = 0; + // 回传状态检查 + switch(iDefState){ + case BATTLE_RET_ALLGUARD:iFlg |= BCF_GUARD;break; + case BATTLE_RET_MISS:iDamage = 0;break; + case BATTLE_RET_DODGE:iDamage = 0;iFlg |= BCF_DODGE;break; + case BATTLE_RET_NORMAL: + iFlg |= BATTLE_getReactFlg(iDefindex,iTemp); + iFlg |= BCF_NORMAL; + break; + case BATTLE_RET_CRITICAL: + iFlg |= BATTLE_getReactFlg(iDefindex,iTemp); + iFlg |= BCF_KAISHIN; + break; +#ifdef _EQUIT_ARRANGE + case BATTLE_RET_ARRANGE:iFlg |= BCF_B_ARRANGE;break; +#endif + } + + //昏睡时,在这里解除状态(也有其它的状态) + if(iDamage > 0 && (iTemp != BATTLE_MD_ABSROB) && (iTemp != BATTLE_MD_VANISH)) BATTLE_DamageWakeUp(battleindex,iDefindex); + + // 目标是否死亡 + if(CHAR_getInt(iDefindex,CHAR_HP) <= 0){ + if(CHAR_getWorkInt(iDefindex,CHAR_WORKBATTLEFLG ) & CHAR_BATTLEFLG_ABIO) iUltimate = 1; + else if(CHAR_getInt(iDefindex,CHAR_WHICHTYPE) != CHAR_TYPEPLAYER && (iFlg & BCF_KAISHIN)){ + if(RAND(1,100) < 50) iUltimate = 1; + } +#ifdef _PETSKILL_LER + // 雷尔不能被打飞 + if(CHAR_getInt(iDefindex,CHAR_BASEBASEIMAGENUMBER) == 101813 || + CHAR_getInt(iDefindex,CHAR_BASEBASEIMAGENUMBER) == 101814) iUltimate = 0; +#endif + iFlg |= BCF_DEATH; + if(iUltimate == 1) iFlg |= BCF_ULTIMATE_1; + if(iUltimate == 2) iFlg |= BCF_ULTIMATE_2; + } + else{ +#ifdef _TAKE_ITEMDAMAGE + if(BATTLE_ItemCrushSeq(charaindex,iDefindex,iDamage) == TRUE) +#else + if(BATTLE_ItemCrushSeq(iDefindex) == TRUE) +#endif + iFlg |= BCF_CRUSH; + // 状态命中判定 + if(iDamage > 0 && BATTLE_StatusAttackCheck(charaindex,iDefindex,iEffect,iEffectHit,30,1.0,&iTemp)){ + CHAR_setWorkInt(iDefindex,StatusTbl[iEffect],iTurn); + if(iEffect == BATTLE_ST_DRUNK) CHAR_setWorkInt(iDefindex,CHAR_WORKDRUNK,CHAR_getWorkInt(iDefindex,CHAR_WORKDRUNK) >> 1); + // 中以下状态的目标该回合之後不能行动 + if(iEffect == BATTLE_ST_PARALYSIS || iEffect == BATTLE_ST_SLEEP || iEffect == BATTLE_ST_STONE || iEffect == BATTLE_ST_BARRIER) + CHAR_setWorkInt(iDefindex,CHAR_WORKBATTLECOM1,BATTLE_COM_NONE); + // 回传client那一个目标要执行状态改变 + if(iGuardian >= 0) BATTLE_BadStatusString(iGuardian,iEffect); // iGuardian 大於等於 0 表示有目标使用了忠犬,该目标状态改变 + else BATTLE_BadStatusString(pAAttackObject->target,iEffect); // 否则原目标状态改变 + } + } + + if(iGuardian >= 0){ + iFlg |= BCF_GUARDIAN; + snprintf(szCommand,sizeof(szCommand), + "r%X|i%X|f%X|d%X|p%X|a%X|g%X|", + pAAttackObject->target, + pAAttackObject->index, + iFlg, + iDamage, + iPetDamage, + pAAttackObject->actionNumber, + iGuardian); + }else + snprintf(szCommand,sizeof(szCommand), + "r%X|i%X|f%X|d%X|p%X|a%X|", + pAAttackObject->target, + pAAttackObject->index, + iFlg, + iDamage, + iPetDamage, + pAAttackObject->actionNumber); + + // 把命令送入传给client的buffer + BATTLESTR_ADD(szCommand); + + iTemp = BATTLE_Index2No(battleindex,iDefindex); + + // iFlg 已没作用,拿来作别的用途 + iFlg = 0; + if(iTemp >= SIDE_OFFSET) iFlg = 1; + + i = iTemp - iFlg * SIDE_OFFSET; + if(iUltimate > 0) BattleArray[battleindex].Side[iFlg].Entry[i].flg |= BENT_FLG_ULTIMATE; + CHAR_setWorkInt(iDefindex,CHAR_NPCWORKINT1,iTemp2); +} + +void BATTLE_BattleModel(int battleindex,int attackNo,int myside) +{ + int iToList[SIDE_OFFSET*2+1],i,i0,i1,i2,iEffect = -1,iTurn = -1,iEffectHit = 0,iType,iObjectNum,charaindex; + int iActionNumber[4] = {-1,-1,-1,-1},iActionAmount = 0; + char szData[32],szData2[32],*pszOption = NULL; + AttackObject AAttackObject[10]; + + charaindex = BATTLE_No2Index(battleindex,attackNo); + if(CHAR_CHECKINDEX(charaindex) == FALSE) return; + + pszOption = PETSKILL_getChar(CHAR_getWorkInt(charaindex,CHAR_WORKBATTLECOM3),PETSKILL_OPTION); + + if(pszOption == NULL){ + printf("BATTLE_BattleModel: read PETSKILL_OPTION error!!(array:%d,file:%s,line:%d)\n", + CHAR_getWorkInt(charaindex,CHAR_WORKBATTLECOM3),__FILE__,__LINE__); + return; + } + + // 取得效果 + if(getStringFromIndexWithDelim(pszOption,"|",3,szData,sizeof(szData)) != FALSE){ + for(i=1;i= iActionAmount) i1 = 0; + } + + // 检查场上目标剩几只 + for(i=0;i= i){ + i0 = i; // 记录场上目标只数 + + for(i=0;i +#include "char.h" +#include "char_base.h" +#include "battle.h" +#include "battle_event.h" +#include "battle_item.h" +#include "battle_magic.h" +#include "item_event.h" +#include "log.h" +#include "anim_tbl.h" +#include "npcutil.h" +#include "magic_base.h" +#include "lssproto_serv.h" + + +int BATTLE_ItemUseDelete( + int charaindex, + int haveitemindex +) +{ + int itemindex; + + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if( ITEM_CHECKINDEX( itemindex ) == FALSE ) return 0; + { + LogItem( + CHAR_getChar( charaindex, CHAR_NAME ), + CHAR_getChar( charaindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), +#endif + "BattleUse(战斗中使用掉的道具)", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + } + CHAR_DelItemMess( charaindex, haveitemindex, 0); + + return 0; +} + +#ifdef _IMPRECATE_ITEM +void ITEM_useImprecate( int charaindex, int toNo, int haveitemindex ) +{ + int i; + int battleindex, attackNo,itemindex; + char *arg; + char buf[256]; + + struct tagImprecate { + char fun[256]; + int intfun; + }; + struct tagImprecate ImList[3] ={ + {"咒",BD_KIND_CURSE},{"恩",BD_KIND_BESTOW},{"祝",BD_KIND_WISHES} }; + + if( !CHAR_CHECKINDEX( charaindex) ) return; + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + + if( (attackNo = BATTLE_Index2No( battleindex, charaindex )) < 0 ){ + print( "ANDY attackNo=%d\n", attackNo); + return; + } + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + + arg = ITEM_getChar(itemindex, ITEM_ARGUMENT ); + if( arg == NULL ){ + print( "ANDY ITEM id:%d=>arg err\n", ITEM_getInt( itemindex, ITEM_ID)); + return; + } + + for( i=0; i<3; i++) { + if( strstr( arg, ImList[i].fun ) != 0 ) { + char buf1[256]; + int kind,powers, rounds, HealedEffect; + + if( NPC_Util_GetStrFromStrWithDelim( arg, ImList[i].fun, buf, sizeof( buf)) == NULL )continue; + kind = ImList[i].intfun; + if( getStringFromIndexWithDelim( buf,"x", 1, buf1, sizeof( buf1)) == FALSE ) continue; + powers = atoi( buf1); + if( getStringFromIndexWithDelim( buf,"x", 2, buf1, sizeof( buf1)) == FALSE ) continue; + rounds = atoi( buf1); + HealedEffect = SPR_hoshi; + BATTLE_ImprecateRecovery( + battleindex, attackNo, toNo, kind, powers, + rounds, SPR_item3, HealedEffect ); + CHAR_setItemIndex(charaindex, haveitemindex ,-1); + CHAR_sendItemDataOne( charaindex, haveitemindex); + ITEM_endExistItemsOne( itemindex ); + break; + } + } +} +#endif + +#ifdef _ITEM_MAGICRECOVERY +void ITEM_useMRecovery_Battle( int charaindex, int toNo, int haveitemindex ) +{ + int battleindex, attackNo, itemindex; + int turn=0, magicid, marray; + char buf1[256]; + char *arg=NULL; + + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + if( BATTLE_CHECKINDEX( battleindex ) == FALSE ) return; + if( (attackNo = BATTLE_Index2No( battleindex, charaindex )) == -1 ) return; + + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + arg = ITEM_getChar( itemindex, ITEM_ARGUMENT ); + + + if( getStringFromIndexWithDelim( arg, ":", 2, buf1, sizeof(buf1)) ==FALSE ) return; + turn = atoi( buf1); + if( getStringFromIndexWithDelim( arg, ":", 1, buf1, sizeof(buf1)) ==FALSE ) return; + + if( strstr( buf1, "全" ) != NULL ){ + }else{ + } + + magicid = ITEM_getInt( itemindex, ITEM_MAGICID); + marray = MAGIC_getMagicArray( magicid); + if( marray == -1 ) return; + + + if( IsBATTLING( charaindex ) == TRUE ){ + int i, status=-1; + char *magicarg=NULL, *pszP=NULL; +#ifdef _PREVENT_TEAMATTACK //光镜守..不得使用敌方 + int battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER + //&& BattleArray[battleindex].type != BATTLE_TYPE_P_vs_P + ){ + if( BATTLE_CheckSameSide( charaindex, toNo) == 0 ){//不同边 + int battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + BATTLE_NoAction( battleindex, BATTLE_Index2No( battleindex, charaindex) ); + CHAR_talkToCli( charaindex, -1, "光镜守..不得施予非玩家敌方。", CHAR_COLORYELLOW); + return; + } + } +#endif + + magicarg = MAGIC_getChar( marray, MAGIC_OPTION ); + pszP = magicarg; + for( ;status == -1 && pszP[0] != 0; pszP++ ){ + for( i = 1; i < BATTLE_MD_END; i ++ ){ + if( strncmp( pszP, aszMagicDef[i], 2 ) == 0 ){ + status = i; + pszP +=2; + break; + } + } + } + if( status == -1 ) return; + + BATTLE_MultiMagicDef( battleindex, attackNo, toNo, + status, turn, MAGIC_EFFECT_USER, SPR_difence ); + + LogItem( + CHAR_getChar( charaindex, CHAR_NAME ), + CHAR_getChar( charaindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), +#endif + "BattleUse(战斗中使用掉的道具)", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + } + + CHAR_DelItemMess( charaindex, haveitemindex, 0); +} +#endif + +#ifdef _ITEM_USEMAGIC +void ITEM_useMagic_Battle( int charaindex, int toNo, int haveitemindex ) +{ + int itemindex,itemmaxuse; + char *arg=NULL; + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + arg = ITEM_getChar( itemindex, ITEM_ARGUMENT ); + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_JYUJYUTU ); + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, atoi(arg) ); + CHAR_SETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + + MAGIC_DirectUse( + charaindex, + CHAR_GETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3 ), + CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2 ), + CHAR_GETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3 ) + ); + + itemmaxuse = ITEM_getInt( itemindex, ITEM_DAMAGEBREAK); + if( itemmaxuse > 0 ) + ITEM_setInt( itemindex, ITEM_DAMAGEBREAK, itemmaxuse-1 ); + else{ + LogItem( + CHAR_getChar( charaindex, CHAR_NAME ), + CHAR_getChar( charaindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), +#endif + "BattleUse(战斗中使用掉的道具)", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + + CHAR_DelItemMess( charaindex, haveitemindex, 0); + } +} +#endif + +void ITEM_useRecovery_Battle( int charaindex, int toNo, int haveitemindex ) +{ +#ifdef _CHANGEITEMUSE // Syu ADD 调整战斗中使用料理设定 + int power1 = 0; +#endif + int power = 0, per = 0, HealedEffect=0; + int battleindex, attackNo,itemindex, kind = BD_KIND_HP; + char *p = NULL, *arg; + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + arg = ITEM_getChar(itemindex, ITEM_ARGUMENT ); +#ifdef _CHANGEITEMUSE // Syu ADD 调整战斗中使用料理设定 + if( ((p = strstr( arg, "体" )) != NULL) && ((p = strstr( arg,"气")) != NULL)) + { + kind = BD_KIND_HP_MP; + p = strstr( arg,"气"); + if( sscanf( p+2, "%d", &power1 ) != 1 ) + { + power1 = 0; + } + p = strstr( arg,"体"); + } + else if( (p = strstr( arg, "体" )) != NULL ) +#else + if( (p = strstr( arg, "体" )) != NULL ) +#endif + { + kind = BD_KIND_HP; + } + else if( (p = strstr( arg, "气" )) != NULL ) + { + kind = BD_KIND_MP; + } + else +#ifdef _ITEM_UNBECOMEPIG + if( (p = strstr( arg, "解猪" )) != NULL ){ + kind = BD_KIND_UNBECOMEPIG; + HealedEffect = 100608; //特效编号 + } + else +#endif +#ifdef _ITEM_LVUPUP + if( (p = strstr( arg, "LVUPUP" )) != NULL ){ + return; + } + else +#endif +#ifdef _ITEM_PROPERTY + if( (p = strstr( arg, "PROPERTY" )) != NULL ){ + kind = BD_KIND_PROPERTY; + HealedEffect = 100608; //特效编号 + if( strstr( arg, "+" ) ) + power = 1; + else if( strstr( arg, "-" ) ) + power = 2; + } + else +#endif +#ifdef _ITEM_ADDPETEXP + if( (p = strstr( arg, "GETEXP" )) != NULL ){ + return; + } + else +#endif + return; + +#ifdef _ITEM_UNBECOMEPIG + if( HealedEffect != 100608 ){ +#endif + if( sscanf( p+2, "%d", &power ) != 1 ) + power = 0; + if( power <= 100 ) + HealedEffect = SPR_heal;//SPR_hoshi + else if( power <= 300 ) + HealedEffect = SPR_heal2; + else + HealedEffect = SPR_heal3; +#ifdef _ITEM_UNBECOMEPIG + } +#endif + + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + attackNo = BATTLE_Index2No( battleindex, charaindex ); + if( attackNo < 0 )return; + +#ifdef _CHANGEITEMUSE // Syu ADD 调整战斗中使用料理设定 + BATTLE_MultiRecovery( battleindex, attackNo, toNo, + kind, power, per, SPR_item3, HealedEffect , power1); +#else + BATTLE_MultiRecovery( battleindex, attackNo, toNo, + kind, power, per, SPR_item3, HealedEffect ); +#endif + { + LogItem( + CHAR_getChar( charaindex, CHAR_NAME ), + CHAR_getChar( charaindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), +#endif + "BattleUse(战斗中使用掉的道具)", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + } + CHAR_DelItemMess( charaindex, haveitemindex, 0); +} + +void ITEM_useStatusChange_Battle( + int charaindex, + int toNo, + int haveitemindex +){ + int turn = 0, i; + int battleindex, attackNo,itemindex, status = -1, Success = 15; + int ReceveEffect; + char *pszP = NULL, *arg; + char szTurn[] = "turn"; + char szSuccess[] = "成"; + + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + arg = ITEM_getChar(itemindex, ITEM_ARGUMENT ); + pszP = arg; + for( ;status == -1 && pszP[0] != 0; pszP++ ){ + for( i = 0; i < BATTLE_ST_END; i ++ ){ + if( strncmp( pszP, aszStatus[i], 2 ) == 0 ){ + status = i; + pszP +=2; + break; + } + } + } + if( status == -1 ) return ; + if( ( pszP = strstr( arg, szTurn ) ) != NULL){ + pszP += sizeof( szTurn ); + sscanf( pszP, "%d", &turn ); + } + if( ( pszP = strstr( arg, szSuccess ) ) != NULL){ + pszP += sizeof( szSuccess ); + sscanf( pszP, "%d", &Success ); + } + + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + attackNo = BATTLE_Index2No( battleindex, charaindex ); + + if( status == BATTLE_ST_NONE ){ + ReceveEffect = SPR_tyusya; + }else{ + ReceveEffect = SPR_hoshi; + } + BATTLE_MultiStatusChange( battleindex, attackNo, toNo, + status, turn, SPR_item3, ReceveEffect, Success ); + BATTLE_ItemUseDelete( charaindex, haveitemindex ); +} + +void ITEM_useStatusRecovery_Battle( + int charaindex, // 银匀凶谛及奶件犯永弁旦 + int toNo, // 银歹木月谛及 寞 + int haveitemindex // 银丹谛及失奶 丞及 寞 +){ + int i; + int battleindex, attackNo,itemindex, status = -1; + int ReceveEffect; + char *pszP = NULL, *arg; + + // 失奶 丞互丐月井升丹井 + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + + // 由仿丢□正毛潸 + arg = ITEM_getChar(itemindex, ITEM_ARGUMENT ); + + pszP = arg; + // 躲绊毛潸 + for( ;status == -1 && pszP[0] != 0; pszP++ ){ + // 蝈莒手丐月及匹ㄟ井日腹绸 + for( i = 0; i < BATTLE_ST_END; i ++ ){ + // 躲绊疋永正伉井" + if( strncmp( pszP, aszStatus[i], 2 ) == 0 ){ + status = i; + pszP +=2; + break; + } + } + } + // 躲绊卅中及匹撩 + if( status == -1 ) return ; + + //------- 仇仇井日荚汊质 ----------- + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + + attackNo = BATTLE_Index2No( battleindex, charaindex ); + + ReceveEffect = SPR_tyusya; // 月午五反仇木 + + // 蝈够 + BATTLE_MultiStatusRecovery( battleindex, attackNo, toNo, + status, SPR_item3, ReceveEffect ); + + // 爵 卞失奶 丞互壅尹凶桦宁及隋骚质 + BATTLE_ItemUseDelete( charaindex, haveitemindex ); + +} + + + + + + +void ITEM_useMagicDef_Battle( + int charaindex, + int toNo, + int haveitemindex +) +{ + int turn = 0, i; + int battleindex, attackNo,itemindex, status = -1; + char *pszP = NULL, *arg; + + char szTurn[] = "turn"; + + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + + arg = ITEM_getChar(itemindex, ITEM_ARGUMENT ); + + pszP = arg; + + for( ;status == -1 && pszP[0] != 0; pszP++ ){ + for( i = 1; i < BATTLE_MD_END; i ++ ){ + if( strncmp( pszP, aszMagicDef[i], 2 ) == 0 ){ + status = i; + pszP +=2; + break; + } + } + } + + if( status == -1 ) return ; + + if( ( pszP = strstr( arg, szTurn ) ) != NULL){ + pszP += sizeof( szTurn ); + sscanf( pszP, "%d", &turn ); + } + + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + + attackNo = BATTLE_Index2No( battleindex, charaindex ); + + BATTLE_MultiMagicDef( battleindex, attackNo, toNo, + status, turn, SPR_item3, SPR_difence ); + + BATTLE_ItemUseDelete( charaindex, haveitemindex ); + + +} + + + + + + +//-------------------------------------------------------------- +// 由仿丢□正 凳失奶 丞毛银匀凶桦宁及质 +//-------------------------------------------------------------- +// 爵 及桦宁 +void ITEM_useParamChange_Battle( + int charaindex, // 银匀凶谛及奶件犯永弁旦 + int toNo, // 银歹木月谛及 寞 + int haveitemindex // 银丹谛及失奶 丞及 寞 +) +{ + int i; + int battleindex, attackNo,itemindex; + int pow, par = 0; + int kind = -1; + char *pszP = NULL, *arg; + + // 失奶 丞互丐月井升丹井 + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + + // 由仿丢□正毛潸 + arg = ITEM_getChar(itemindex, ITEM_ARGUMENT ); + + pszP = arg; + // 躲绊毛潸 + for( ;kind == -1 && pszP[0] != 0; pszP++ ){ + for( i = 1; i < BATTLE_MD_END; i ++ ){ + // 躲绊疋永正伉井" + if( strncmp( pszP, aszParamChange[i], 2 ) == 0 ){ + kind = i; + pszP +=2; + break; + } + } + } + // 躲绊卅中及匹撩 + if( kind == -1 ) return ; + + + if( strstr( pszP, "%" ) ){ // 仇及桦宁反⊙煌遥 + par = 1; + } + + if( sscanf( pszP, "%d", &pow ) != 1 ){ + // 窒禾奶件玄丐仆月井 + pow = 30; + } + + //------- 仇仇井日质 ----------- + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + + attackNo = BATTLE_Index2No( battleindex, charaindex ); + + // 蝈够 + BATTLE_MultiParamChange( battleindex, attackNo, toNo, + kind, pow, par, SPR_item3, SPR_hoshi ); + + + // 爵 卞失奶 丞互壅尹凶桦宁及隋骚质 + BATTLE_ItemUseDelete( charaindex, haveitemindex ); + + +} + + + + + + +//-------------------------------------------------------------- +// 白奴□伙玉箪岭 凳失奶 丞毛银匀凶桦宁及质 +//-------------------------------------------------------------- +// 爵 及桦宁 +void ITEM_useFieldChange_Battle( + int charaindex, // 银匀凶谛及奶件犯永弁旦 + int toNo, // 银歹木月谛及 寞 + int haveitemindex // 银丹谛及失奶 丞及 寞 +) +{ + int itemindex; + char *pArg; + + // 失奶 丞互丐月井升丹井 + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + + //------- 仇仇井日质 ----------- + // 由仿丢□正毛潸 + pArg = ITEM_getChar(itemindex, ITEM_ARGUMENT ); + + // 由仿丢□正 中及匹撩 + if( pArg == NULL )return ; + + BATTLE_FieldAttChange( charaindex, pArg ); + + // 爵 卞失奶 丞互壅尹凶桦宁及隋骚质 + BATTLE_ItemUseDelete( charaindex, haveitemindex ); + +} + + +//-------------------------------------------------------------- +// 箪岭 鳖失奶 丞毛银匀凶桦宁及质 +//-------------------------------------------------------------- +// 爵 及桦宁 +void ITEM_useAttReverse_Battle( + int charaindex, // 银匀凶谛及奶件犯永弁旦 + int toNo, // 银歹木月谛及 寞 + int haveitemindex // 银丹谛及失奶 丞及 寞 +) +{ + int itemindex, battleindex, attackNo; + + + // 失奶 丞互丐月井升丹井 + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + + //------- 仇仇井日质 ----------- + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + + attackNo = BATTLE_Index2No( battleindex, charaindex ); + + // 蝈够 + BATTLE_MultiAttReverse( battleindex, attackNo, toNo, + SPR_item3, SPR_kyu ); + + // 爵 卞失奶 丞互壅尹凶桦宁及隋骚质 + BATTLE_ItemUseDelete( charaindex, haveitemindex ); + + +} + + +//-------------------------------------------------------------- +// 竣濮井日汊唾毛银匀凶桦宁及质 +//-------------------------------------------------------------- +// 爵 及桦宁 +void ITEM_useRessurect( + int charaindex, // 银匀凶谛及奶件犯永弁旦 + int toNo, // 银歹木月谛及 寞 + int haveitemindex // 银丹谛及失奶 丞及 寞 +) +{ + int itemindex, battleindex, attackNo, par = 0, pow = 0, ReceveEffect; + char *pszP = NULL; + + + // 失奶 丞互丐月井升丹井 + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + + //------- 仇仇井日质 ----------- + pszP = ITEM_getChar(itemindex, ITEM_ARGUMENT ); + + if( strstr( pszP, "%" ) ){ // 仇及桦宁反⊙煌遥 + par = 1; + } + + if( sscanf( pszP, "%d", &pow ) != 1 ){ + // 窒禾奶件玄荚汊允月井" + pow = 0; // ㄟ及桦宁反敦蝈荚汊 + } + + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + + attackNo = BATTLE_Index2No( battleindex, charaindex ); + + if( pow <= 0 ){ + ReceveEffect = SPR_fukkatu3; + }else + if( pow <= 100 ){ + ReceveEffect = SPR_fukkatu1; + }else + if( pow <= 300 ){ + ReceveEffect = SPR_fukkatu2; + }else{ + ReceveEffect = SPR_fukkatu3; + } + + // 蝈够 + BATTLE_MultiRessurect( battleindex, attackNo, toNo, + pow, par, SPR_item3, ReceveEffect ); + + + // 爵 卞失奶 丞互壅尹凶桦宁及隋骚质 + BATTLE_ItemUseDelete( charaindex, haveitemindex ); + +} + + + +//-------------------------------------------------------------- +// 凯 膜恳毛银匀凶桦宁及质 +//-------------------------------------------------------------- +// 爵 及桦宁 +void ITEM_useCaptureUp_Battle( + int charaindex, // 银匀凶谛及奶件犯永弁旦 + int toNo, // 银歹木月谛及 寞 + int haveitemindex // 银丹谛及失奶 丞及 寞 +) +{ + int itemindex, battleindex, attackNo, pow = 5, ReceveEffect; + char *pArg; + + // 失奶 丞互丐月井升丹井 + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + + //------- 仇仇井日质 ----------- + // 由仿丢□正毛潸 + pArg = ITEM_getChar(itemindex, ITEM_ARGUMENT ); + + // 由仿丢□正 中及匹撩 + if( pArg == NULL )return ; + + if( sscanf( pArg, "%d", &pow ) != 1 ){ + // 窒禾奶件玄荚汊允月井" + pow = 5; + } + + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + + attackNo = BATTLE_Index2No( battleindex, charaindex ); + + ReceveEffect = SPR_hoshi; + + // 蝈够 + BATTLE_MultiCaptureUp( battleindex, attackNo, toNo, + pow, SPR_item3, ReceveEffect ); + + // 爵 卞失奶 丞互壅尹凶桦宁及隋骚质 + BATTLE_ItemUseDelete( charaindex, haveitemindex ); + +} +#ifdef _ITEM_CRACKER +void ITEM_useCracker_Effect( charaindex, toindex, haveitemindex) +{ + int itemindex,x,y,tofd; + + itemindex = CHAR_getItemIndex(charaindex,haveitemindex); + // 检查物品 + if(!ITEM_CHECKINDEX(itemindex)) return; + + x = CHAR_getInt( charaindex, CHAR_X); + y = CHAR_getInt( charaindex, CHAR_Y); + + CHAR_setMyPosition( charaindex, x, y, TRUE); + CHAR_setWorkInt( charaindex, CHAR_WORKITEM_CRACKER, 1); + CHAR_sendCrackerEffect( charaindex, 101125); + //to client + tofd = getfdFromCharaIndex( charaindex ); + lssproto_IC_send(tofd, x, y); + //清除道具 + BATTLE_ItemUseDelete(charaindex,haveitemindex); + CHAR_talkToCli(charaindex,-1,"道具消失了。",CHAR_COLORYELLOW); + +} +#endif +#ifdef _ITEM_REFRESH //vincent 解除异常状态道具 +void ITEM_useRefresh_Effect( charaindex, toindex, haveitemindex) +{ + int i,itemindex,ReceveEffect; + char *arg; +// char szBuffer[128]=""; + int status = -1,attackNo,index2; + int battleindex; + char *pszP; + +//print("\nvincent--ITEM_useRefresh_Effect"); + // 检查物品 + itemindex = CHAR_getItemIndex(charaindex,haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + arg = ITEM_getChar(itemindex, ITEM_ARGUMENT ); + pszP = arg; + // 躲绊毛潸 + for( ;status == -1 && pszP[0] != 0; pszP++ ){ + // ㄠ井日腹绸 + for( i = 1; i < BATTLE_ST_END; i ++ ){ + // 躲绊疋永正伉井" + if( strncmp( pszP, aszStatus[i], 2 ) == 0 ){ + status = i; + pszP +=2; + break; + } + } + } +//print("\nvincent-->status:%d",status); + // 躲绊卅中及匹撩 + if( status == -1 ) return; + + // 田玄伙 寞 + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + index2 = BATTLE_No2Index( battleindex, toindex);//被击中目标之index + attackNo = BATTLE_Index2No( battleindex, charaindex ); +// defNo = BATTLE_Index2No( battleindex, index2 ); +//print("\nvincent-->charaindex:%d,attackNo:%d,index2:%d,defNo:%d,",charaindex,attackNo,index2,defNo); + + /* 平乓仿弁正□及赭 伉旦玄井日壅蛔 */ + CHAR_setItemIndex(charaindex, haveitemindex ,-1); + CHAR_sendItemDataOne( charaindex, haveitemindex);/* 失奶 丞凳蕙 */ +// if( CHAR_getWorkInt( charaindex, StatusTbl[status] ) > 0 ){ +// ReceveEffect = SPR_tyusya; +// }else{ +// ReceveEffect = SPR_hoshi; +// } + ReceveEffect = SPR_tyusya;//打针 + BATTLE_MultiStatusRecovery( battleindex, attackNo, toindex, + status, MAGIC_EFFECT_USER, ReceveEffect ); + /* 壅允 */ + ITEM_endExistItemsOne( itemindex ); +////////////////////////// +// BATTLE_MultiList( battleindex, defNo, ToList ); +// for( i = 0; ToList[i] != -1; i ++ ){ +// toindex = BATTLE_No2Index( battleindex, ToList[i] ); +// +// } + + + +//////////////////////////// +} +#endif +#ifdef _ITEM_ADDEXP //vincent 经验提升 +void ITEM_useAddexp_Effect( charaindex, toindex, haveitemindex) +{ + int itemindex,power,vtime; + //,pindex + char *p = NULL, *arg; + char szBuffer[1024]=""; + + itemindex = CHAR_getItemIndex(charaindex,haveitemindex); + + // 检查物品 + if(!ITEM_CHECKINDEX(itemindex)) return; + arg = ITEM_getChar(itemindex, ITEM_ARGUMENT ); + + if( (p = strstr( arg, "增" )) != NULL ){ + sscanf( p+2, "%d", &power ); + } + if( (p = strstr( arg, "分" )) != NULL ){ + sscanf( p+2, "%d", &vtime ); + } + if( p == NULL )return; +#ifdef _ITEM_ADDEXP2 // 智果时间可以累加 + { + int point; + point = CHAR_getWorkInt( charaindex, CHAR_WORKITEM_ADDEXP) + * (int)(CHAR_getWorkInt( charaindex, CHAR_WORKITEM_ADDEXPTIME)/60); + if( point >= 72000) { + CHAR_talkToCli( charaindex, -1, "智慧之果累计时间及效果已达上限。", CHAR_COLORYELLOW); + return; + } + point += (power * vtime); + point = min( point, 72000); + vtime = (int)(point / power); +#ifdef _LOG_OTHER + sprintf( szBuffer, "使用智慧之果 %d\t累积效果= 分数%d 能力%d% 时间%d分 ", + ITEM_getInt( itemindex, ITEM_ID ), point, power, vtime); + LogOther( + CHAR_getChar( charaindex, CHAR_CDKEY), + CHAR_getChar( charaindex, CHAR_NAME), + szBuffer ); +#endif + //CHAR_setInt( charaindex, CHAR_ADDEXPPOWER, power); + //CHAR_setInt( charaindex, CHAR_ADDEXPTIME,vtime*60 ); + + //sprintf(szBuffer, "测试讯息:目前分数%d 时间%d秒。", point, vtime*60); + //CHAR_talkToCli(charaindex,-1,szBuffer,CHAR_COLORRED); + } +#endif + CHAR_setWorkInt( charaindex, CHAR_WORKITEM_ADDEXP, power); + CHAR_setWorkInt( charaindex, CHAR_WORKITEM_ADDEXPTIME,vtime*60 ); + + //清除道具 + BATTLE_ItemUseDelete(charaindex,haveitemindex); + //sprintf(szBuffer, "学习经验的能力提升了%d%", power); + sprintf(szBuffer, "学习经验的能力提升了%d%,时效剩馀%d分钟。", power, vtime); + CHAR_talkToCli(charaindex,-1,szBuffer,CHAR_COLORYELLOW); + +} +#endif +//Terry add 2001/12/24 +#ifdef _ITEM_FIRECRACKER +void ITEM_useFirecracker_Battle( charaindex, toindex, haveitemindex) +{ + int itemindex, battleindex, masteridx=-1, index2; + + char szWork[128]; +#ifdef _FIX_FIRECRACKER + int petid=-1, i=1; + BOOL FINDPET=FALSE; + char *buff1; + char token[256], buf1[256]; +#else + int PetEscape = 0; +#endif + + itemindex = CHAR_getItemIndex(charaindex,haveitemindex); + // 检查物品 + if(!ITEM_CHECKINDEX(itemindex)) return; + + battleindex = CHAR_getWorkInt(charaindex,CHAR_WORKBATTLEINDEX); +#ifdef _FIX_FIRECRACKER + index2 = BATTLE_No2Index( battleindex, toindex); + if( !CHAR_CHECKINDEX( index2) ) return; + { + int attackNo = BATTLE_Index2No( battleindex, charaindex ); + int safeSide = 0; + int MySide_start, MySide_end; + if( attackNo >= 10 ) + safeSide = 1; + + MySide_start = safeSide*SIDE_OFFSET; + MySide_end = ((safeSide*SIDE_OFFSET) + SIDE_OFFSET); + + if( (toindex >= MySide_start) && (toindex= 901 && CHAR_getInt(index2,CHAR_PETID) <= 904){ + // 取得目标的正後方的角色的index + masteridx = BATTLE_No2Index(battleindex,toindex-5); + // 如果对战的是玩家 + if(CHAR_getInt(masteridx,CHAR_WHICHTYPE) == CHAR_TYPEPLAYER) PetEscape = 1; + else print("\n年兽在遇敌时出现"); + } + } + + // 如果不是炸自己 + if(BATTLE_Index2No(battleindex,charaindex) != toindex) + { + sprintf(szWork,"BB|a%X|w3|r%X|f0|d0|p0|FF|",BATTLE_Index2No(battleindex,charaindex),toindex); + BATTLESTR_ADD(szWork); + if(PetEscape) + { + BATTLE_Exit(index2,battleindex); + CHAR_setInt(masteridx,CHAR_DEFAULTPET,-1); + sprintf(szWork,"BQ|e%X|",toindex); + BATTLESTR_ADD(szWork); + CHAR_talkToCli(masteridx,-1,"年兽被吓跑了!",CHAR_COLORWHITE); + CHAR_talkToCli(charaindex,-1,"年兽被吓跑了!",CHAR_COLORWHITE); + } + } + CHAR_talkToCli(charaindex,-1,"什麽事都没发生。",CHAR_COLORWHITE); + CHAR_talkToCli(charaindex,-1,"道具消失了。",CHAR_COLORWHITE); + // 使用後道具消失 + BATTLE_ItemUseDelete(charaindex,haveitemindex); +#endif +} +#endif + +//Terry end + + + + +//气绝状态回复耐力,复加复活(光,镜,守)精灵 参数同魔法(光,镜,守)精灵,但只能在战斗之使用,用完就没了 +//参数 例如:耐力值 吸 turn 1 +#ifdef _FEV_ADD_NEW_ITEM // FEV ADD 增加复活守精 +void ITEM_ResAndDef( int charaindex, int toindex, int haveitemindex ) +{ + int itemindex, battleindex, attackNo, par = 0, pow = 0, ReceveEffect; + char *buffer = NULL; + char *magicarg = NULL; + char *magicarg2 = NULL; + char *magicarg3 = NULL; + char magicarg4[200]; + + char *pszP = NULL; + char delim[] = " ";//协助分解字串的区隔字元 + + int status = -1, i, turn = 3; + char szTurn[] = "turn"; + + // 失奶 丞互丐月井升丹井 + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + + buffer = ITEM_getChar(itemindex, ITEM_ARGUMENT );//整串字串 + pszP = strtok(buffer, delim);//第一个参数 + magicarg = strtok(NULL, delim);//第二个参数 + magicarg2 = strtok(NULL, delim);//第叁个参数 + magicarg3 = strtok(NULL, delim);//第四个参数 + sprintf(magicarg4,"%s %s %s",magicarg,magicarg2,magicarg3); + magicarg = (char*)magicarg4; + + //光镜守..不得使用敌方 + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER + //&& BattleArray[battleindex].type != BATTLE_TYPE_P_vs_P + ){ + if( BATTLE_CheckSameSide( charaindex, toindex) == 0 ){//不同边 + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + BATTLE_NoAction( battleindex, BATTLE_Index2No( battleindex, charaindex) ); + CHAR_talkToCli( charaindex, -1, "光镜守..不得施予非玩家敌方。", CHAR_COLORYELLOW); + return; + } + } + + //在气绝状态回复耐力 + if( strstr( pszP, "%" ) ){ + par = 1; + } + + if( sscanf( pszP, "%d", &pow ) != 1 ){ + pow = 0; + } + + attackNo = BATTLE_Index2No( battleindex, charaindex ); + + //选择代表的特效 + if( pow <= 0 ){ + ReceveEffect = SPR_fukkatu3; + }else + if( pow <= 100 ){ + ReceveEffect = SPR_fukkatu1; + }else + if( pow <= 300 ){ + ReceveEffect = SPR_fukkatu2; + }else{ + ReceveEffect = SPR_fukkatu3; + } + + BATTLE_MultiRessurect( battleindex, attackNo, toindex, + pow, par, SPR_item3, ReceveEffect ); + + + //(光,镜,守)精灵 + + // 躲绊毛潸 + for( ;status == -1 && magicarg[0] != 0; magicarg++ ){ + for( i = 1; i < BATTLE_MD_END; i ++ ){ + // 躲绊疋永正伉井" + if( strncmp( magicarg, aszMagicDef[i], 2 ) == 0 ){ + status = i; + pszP +=2; + break; + } + } + } + // 躲绊卅中及匹撩 + if( status == -1 ) return; + + // 窒荚 凳今六月井" + if( ( magicarg = strstr( magicarg, szTurn ) ) != NULL){ + magicarg += sizeof( szTurn ); + sscanf( magicarg, "%d", &turn ); + } + + //print("次数:%d",turn); + + // 田玄伙 寞 + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + attackNo = BATTLE_Index2No( battleindex, charaindex ); + + // 蝈够 + BATTLE_MultiMagicDef( battleindex, attackNo, toindex, + status, turn, MAGIC_EFFECT_USER, SPR_difence ); + + + BATTLE_ItemUseDelete( charaindex, haveitemindex ); + +} + +#endif + + + + + diff --git a/gmsv/battle/battle_magic.c b/gmsv/battle/battle_magic.c new file mode 100644 index 0000000..5f71bbf --- /dev/null +++ b/gmsv/battle/battle_magic.c @@ -0,0 +1,5627 @@ +#include "version.h" +#include +#include"char.h" +#include"char_base.h" +#include"battle.h" +#include"battle_event.h" +#include"magic_base.h" +#include"battle_magic.h" +#include"item_event.h" +#include"anim_tbl.h" +#include"common.h" +#include"lssproto_serv.h" + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 +#include "profession_skill.h" +#include "skill.h" +#endif + +#ifdef __ATTACK_MAGIC + +extern AttMagic *ATTMAGIC_magic; +extern int ATTMAGIC_magicnum; + +#define AJ_SAME (1.0) +#define AJ_UP (1.5) +#define AJ_DOWN (0.6) + +#define ATTR_MAX 100 +#define D_ATTR (1.0/(ATTR_MAX*ATTR_MAX)) +#ifdef _FIX_MAGICDAMAGE +static int BATTLE_getMagicAdjustInt( int attackindex, int defindex, int MagicLv, int flg,int damage ); +void Magic_ComputeAttExp( int charindex, int Mnum, int MagicLv, int Expoint); +void Magic_ComputeDefExp( int charindex, int Mnum, int MagicLv, int Damage); +#endif + +#ifdef _MAGIC_TOCALL +/* +typedef struct tagToCallMagic +{ + unsigned int uiSpriteNum; // 此咒术在Spr_x.bin的编号 + unsigned int uiAttackType; // 攻击的方式:单人,整排( 轮流 ) , 整排( 轮流 ) , 整排( 同时 ) , 全体( 轮流 ) , 全体( 同时 ) + unsigned int uiSliceTime; // 轮流攻击时的时间差 + unsigned int uiShowType; // 显示的位置方式:中央、指定 + int siSx; // 显示的位置 - X轴 + int siSy; // 显示的位置 - Y轴 + unsigned int uiShowBehindChar; // 显示在人物的前方或下方 + unsigned int uiShakeScreen; // 是否震动画面 + unsigned int uiShakeFrom; // 震动画面的起始时间( 毫秒 ) + unsigned int uiShakeTo; // 震动画面的结束时间( 毫秒 _ + unsigned int uiPrevMagicNum; // 前置咒术的索引号( 0XFFFFFFFFFF 表示无前置咒术 ) + int siPrevMagicSx; // 前置咒术的显示位置 - X轴 + int siPrevMagicSy; // 前置咒术的显示位置 - Y轴 + int siPrevMagicOnChar; // 前置咒术显示在人物的前方或下方 + unsigned int uiPostMagicNum; // 後置咒术的索引号( 0XFFFFFFFF 表示无後置咒术 ) + int siPostMagicSx; // 後置咒术的显示位置 - X轴 + int siPostMagicSy; // 後置咒术的显示位置 - Y轴 + int siPostMagicOnChar; // 後置咒术显示在人物的前方或下方 + int isPostDisappear; // 咒术一般攻击完时是否马上消失 + int ToCallMagicNo; // 召唤术的编号 +}ToCallMagic; +*/ + +ToCallMagic TOCALL_magic[3] = { {100354,0,0,0,50,25,1,0,0,0,101120,65528,65485,0,-1,0,0,0,1,0}, + {100354,1,0,0,50,25,1,0,0,0,101120,65528,65485,0,-1,0,0,0,1,1}, + {100354,5,0,0,0,0,1,1,1000,4000,101120,65528,65485,0,-1,0,0,0,0,2}, + }; + +#endif + +// 魔法熟练度及抗性升级所需经验值 +int Magic_Level_Table[101] = +{ + 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, //lv 1~10 + 66, 78, 91, 105, 120, 136, 153, 171, 190, 210, //lv 11~20 + 231, 253, 276, 300, 325, 351, 378, 406, 435, 465, //lv 21~30 + 496, 528, 561, 595, 630, 666, 703, 741, 780, 820, //lv 31~40 + 861, 903, 946, 990,1035,1081,1128,1176,1225,1275, //lv 41~50 + 1326,1378,1431,1485,1540,1596,1653,1711,1770,1830, //lv 51~60 + 1891,1953,2016,2080,2145,2211,2278,2346,2415,2485, //lv 61~70 + 2556,2628,2701,2775,2850,2926,3003,3081,3160,3240, //lv 71~80 + 3321,3403,3486,3570,3655,3741,3828,3916,4005,4095, //lv 81~90 + 4186,4278,4371,4465,4560,4656,4753,4851,4950,5050, //lv 91~100 + 9999 +}; +#endif + +#if 0 + +int BATTLE_PointChange( + int ToList[], // + int kind, + int point +) + +{ + + return 0; +} +#endif + +int BATTLE_MagicEffect( int battleindex, int attackNo, int ToList[], int MyEffect, int ToEffect ) +{ + int i; + char szCommand[256]; + int attackindex; + + attackindex = BATTLE_No2Index( battleindex, attackNo ); + if( CHAR_CHECKINDEX( attackindex ) == FALSE )return 0; + + snprintf( szCommand, sizeof(szCommand), + "BJ|a%X|m%X|e%X|e%X|", + attackNo, + CHAR_getInt( attackindex, CHAR_MP ), + MyEffect, + ToEffect + ); + + + BATTLESTR_ADD( szCommand ); + + for( i = 0; ToList[i] != -1; i ++ ){ + snprintf( szCommand, sizeof(szCommand), "r%X|",ToList[i]); + BATTLESTR_ADD( szCommand ); + } + BATTLESTR_ADD( "FF|" ); + + return 0; +} + +#ifdef __ATTACK_MAGIC + +int BATTLE_AttMagicEffect( int battleindex , int attackNo , int ToList[] , int AttackMgcNo ) +{ + int i; + char szcommand[256]; + int attackindex; + + attackindex = BATTLE_No2Index( battleindex , attackNo ); + if( FALSE == CHAR_CHECKINDEX( attackindex ) ) + return 0; + + if( attackNo >= 10 ) + i = AttackMgcNo * 2; + else + i = AttackMgcNo * 2 + 1; + + snprintf( + szcommand , sizeof( szcommand ) , "BJ|a%X|i%X|m%X|%X|%X|%X|s%X|t%X|l%X|%X|%X|%X|%X|%X|%X|o%X|o%X|o%X|s%X|%X|%X|" , + attackNo , 12345678 , CHAR_getInt( attackindex , CHAR_MP ) , + ATTMAGIC_magic[i].uiPrevMagicNum , + ATTMAGIC_magic[i].uiSpriteNum , + ATTMAGIC_magic[i].uiPostMagicNum , + ATTMAGIC_magic[i].uiAttackType , + ATTMAGIC_magic[i].uiSliceTime , + ATTMAGIC_magic[i].uiShowType , + ATTMAGIC_magic[i].siSx , + ATTMAGIC_magic[i].siSy , + ATTMAGIC_magic[i].siPrevMagicSx , + ATTMAGIC_magic[i].siPrevMagicSy , + ATTMAGIC_magic[i].siPostMagicSx , + ATTMAGIC_magic[i].siPostMagicSy , + ATTMAGIC_magic[i].siPrevMagicOnChar , + ATTMAGIC_magic[i].uiShowBehindChar , + ATTMAGIC_magic[i].siPostMagicOnChar , + ATTMAGIC_magic[i].uiShakeScreen , + ATTMAGIC_magic[i].uiShakeFrom , + ATTMAGIC_magic[i].uiShakeTo + ); + + BATTLESTR_ADD( szcommand ); + + for( i = 0 ; ToList[i] != -1 ; i++ ) + { + snprintf( szcommand , sizeof( szcommand ) , "r%X|" , ToList[i] ); + BATTLESTR_ADD( szcommand ); + } + + BATTLESTR_ADD( "FF|" ); + + return 0; +} + +#endif + + +#ifdef _MAGIC_TOCALL + +int BATTLE_ToCallDragonEffect( int battleindex , int attackNo , int ToList[] , int AttackMgcNo ) +{ + int i; + char szcommand[256]; + int attackindex; + + attackindex = BATTLE_No2Index( battleindex , attackNo ); + if( FALSE == CHAR_CHECKINDEX( attackindex ) ) + return 0; +/* + if( attackNo >= 10 ) + i = AttackMgcNo * 2; + else + i = AttackMgcNo * 2 + 1; +*/ + snprintf( + szcommand , sizeof( szcommand ) , "B$|a%X|i%X|m%X|%X|%X|%X|s%X|t%X|l%X|%X|%X|%X|%X|%X|%X|o%X|o%X|o%X|s%X|%X|%X|%X|%X|" , + attackNo , 5711438 , CHAR_getInt( attackindex , CHAR_MP ) , + TOCALL_magic[AttackMgcNo].uiPrevMagicNum , + TOCALL_magic[AttackMgcNo].uiSpriteNum , + TOCALL_magic[AttackMgcNo].uiPostMagicNum , + TOCALL_magic[AttackMgcNo].uiAttackType , + TOCALL_magic[AttackMgcNo].uiSliceTime , + TOCALL_magic[AttackMgcNo].uiShowType , + TOCALL_magic[AttackMgcNo].siSx , + TOCALL_magic[AttackMgcNo].siSy , + TOCALL_magic[AttackMgcNo].siPrevMagicSx , + TOCALL_magic[AttackMgcNo].siPrevMagicSy , + TOCALL_magic[AttackMgcNo].siPostMagicSx , + TOCALL_magic[AttackMgcNo].siPostMagicSy , + TOCALL_magic[AttackMgcNo].siPrevMagicOnChar , + TOCALL_magic[AttackMgcNo].uiShowBehindChar , + TOCALL_magic[AttackMgcNo].siPostMagicOnChar , + TOCALL_magic[AttackMgcNo].uiShakeScreen , + TOCALL_magic[AttackMgcNo].uiShakeFrom , + TOCALL_magic[AttackMgcNo].uiShakeTo , + TOCALL_magic[AttackMgcNo].isPostDisappear , + TOCALL_magic[AttackMgcNo].ToCallMagicNo + ); + + BATTLESTR_ADD( szcommand ); + + for( i = 0 ; ToList[i] != -1 ; i++ ) + { + snprintf( szcommand , sizeof( szcommand ) , "r%X|" , ToList[i] ); + BATTLESTR_ADD( szcommand ); + } + + BATTLESTR_ADD( "FF|" ); + + return 0; +} + +#endif +#ifdef _IMPRECATE_ITEM +void BATTLE_ImprecateRecovery( + int battleindex, int attackNo, int toNo, int kind, int powers, + int rounds, int UseEffect, int RecevEffect ) +{ + int i, toindex, flg; + int ToList[SIDE_OFFSET*2+1]; + //char szBuffer[256]=""; + BATTLE_MultiList( battleindex, toNo, ToList ); + + BATTLE_MagicEffect( + battleindex, attackNo, ToList, + UseEffect, RecevEffect ); + for( i = 0; ToList[i] != -1; i ++ ){ + toindex = BATTLE_No2Index( battleindex, ToList[i] ); + if( CHAR_CHECKINDEX( toindex ) == FALSE )continue; + switch( kind ){ +#ifdef _IMPRECATE_ITEM + case BD_KIND_CURSE: + if( CHAR_getWorkInt( toindex, CHAR_WORKIMPRECATENUM1 ) <= 0 && + CHAR_getInt( toindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER ) { + CHAR_setWorkInt( toindex, CHAR_WORKHURTMP, powers); //伤害 MP + CHAR_setWorkInt( toindex, CHAR_WORKIMPRECATENUM1, rounds); + } + break; + case BD_KIND_BESTOW: + if( CHAR_getWorkInt( toindex, CHAR_WORKIMPRECATENUM2 ) <= 0 ){ +#ifdef _TYPE_TOXICATION + if( CHAR_CanCureFlg( toindex, "HP") == FALSE ) break; +#endif + CHAR_setWorkInt( toindex, CHAR_WORKWISHESHP, powers); //祝福 hp + CHAR_setWorkInt( toindex, CHAR_WORKIMPRECATENUM2, rounds); + } + break; + case BD_KIND_WISHES: + if( CHAR_getWorkInt( toindex, CHAR_WORKIMPRECATENUM3 ) <= 0 && + CHAR_getInt( toindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER ) { + CHAR_setWorkInt( toindex, CHAR_WORKWISHESMP, powers); //祝福 MP + CHAR_setWorkInt( toindex, CHAR_WORKIMPRECATENUM3, rounds); + } + break; +#endif + } + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + if( BattleArray[battleindex].norisk == 0 + && CHAR_getInt( toindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET){ + flg = CHAR_getWorkInt( toindex, CHAR_WORKBATTLEFLG ); + if( flg & CHAR_BATTLEFLG_RECOVERY ){ + }else{ + CHAR_PetAddVariableAi( toindex, AI_FIX_PETRECOVERY ); + CHAR_setWorkInt( toindex, CHAR_WORKBATTLEFLG, flg | CHAR_BATTLEFLG_RECOVERY ); + } + } + } + return; +} +#endif + +void BATTLE_MultiRecovery( + int battleindex, + int attackNo, + int toNo, + int kind, + int power, + int per, + int UseEffect, +#ifdef _CHANGEITEMUSE // Syu ADD 调整战斗中使用料理设定 + int RecevEffect, + int power1 +#else + int RecevEffect +#endif +) +{ + int i, toindex, UpPoint = 0, workhp, oldhp, flg; +#ifdef _CHANGEITEMUSE // Syu ADD 调整战斗中使用料理设定 + int UpPoint1 = 0; +#endif + int ToList[SIDE_OFFSET*2+1]; + + //char szBuffer[256]=""; + char szCommand[256]; + + int ridepet, petUpPoint =0; + + + BATTLE_MultiList( battleindex, toNo, ToList ); + + BATTLE_MagicEffect( battleindex, attackNo, ToList, UseEffect, RecevEffect ); + + for( i = 0; ToList[i] != -1; i ++ ){ + toindex = BATTLE_No2Index( battleindex, ToList[i] ); + + if( CHAR_CHECKINDEX( toindex ) == FALSE ) continue; + + ridepet = BATTLE_getRidePet( toindex ); + + switch( kind ){ +#ifdef _ITEM_UNBECOMEPIG + case BD_KIND_UNBECOMEPIG: + if( CHAR_getInt( toindex, CHAR_BECOMEPIG ) > -1 ){ + CHAR_setInt( toindex, CHAR_BECOMEPIG, -1 ); + CHAR_setInt( toindex, CHAR_BASEIMAGENUMBER, CHAR_getInt( toindex, CHAR_BASEBASEIMAGENUMBER)); + CHAR_complianceParameter( toindex ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( toindex , CHAR_WORKOBJINDEX )); + CHAR_send_P_StatusString( toindex , CHAR_P_STRING_BASEBASEIMAGENUMBER); + CHAR_talkToCli( toindex,-1,"乌力化失效了。",CHAR_COLORWHITE); + } + break; +#endif +#ifdef _ITEM_PROPERTY + case BD_KIND_PROPERTY: + { + if (CHAR_getInt(toindex, CHAR_WHICHTYPE)!=CHAR_TYPEPLAYER) + return; + //print("地水火风:%d %d %d %d", CHAR_getInt( toindex, CHAR_EARTHAT ), CHAR_getInt( toindex, CHAR_WATERAT ), CHAR_getInt( toindex, CHAR_FIREAT ), CHAR_getInt( toindex, CHAR_WINDAT ) ); + if( power == 1 ){//旋转属性 正转 + if( CHAR_getInt( toindex, CHAR_EARTHAT ) == 100 ) + CHAR_setInt( toindex, CHAR_EARTHAT, CHAR_getInt( toindex, CHAR_EARTHAT )-10 ), + CHAR_setInt( toindex, CHAR_WATERAT, CHAR_getInt( toindex, CHAR_WATERAT )+10 ); + else if( CHAR_getInt( toindex, CHAR_WATERAT ) == 100 ) + CHAR_setInt( toindex, CHAR_WATERAT, CHAR_getInt( toindex, CHAR_WATERAT )-10 ), + CHAR_setInt( toindex, CHAR_FIREAT, CHAR_getInt( toindex, CHAR_FIREAT )+10 ); + else if( CHAR_getInt( toindex, CHAR_FIREAT ) == 100 ) + CHAR_setInt( toindex, CHAR_FIREAT, CHAR_getInt( toindex, CHAR_FIREAT )-10 ), + CHAR_setInt( toindex, CHAR_WINDAT, CHAR_getInt( toindex, CHAR_WINDAT )+10 ); + else if( CHAR_getInt( toindex, CHAR_WINDAT ) == 100 ) + CHAR_setInt( toindex, CHAR_WINDAT, CHAR_getInt( toindex, CHAR_WINDAT )-10 ), + CHAR_setInt( toindex, CHAR_EARTHAT, CHAR_getInt( toindex, CHAR_EARTHAT )+10 ); + else if( CHAR_getInt( toindex, CHAR_EARTHAT ) > 0 && CHAR_getInt( toindex, CHAR_WATERAT ) > 0 ) + CHAR_setInt( toindex, CHAR_EARTHAT, CHAR_getInt( toindex, CHAR_EARTHAT )-10 ), + CHAR_setInt( toindex, CHAR_WATERAT, CHAR_getInt( toindex, CHAR_WATERAT )+10 ); + else if( CHAR_getInt( toindex, CHAR_WATERAT ) > 0 && CHAR_getInt( toindex, CHAR_FIREAT ) > 0 ) + CHAR_setInt( toindex, CHAR_WATERAT, CHAR_getInt( toindex, CHAR_WATERAT )-10 ), + CHAR_setInt( toindex, CHAR_FIREAT, CHAR_getInt( toindex, CHAR_FIREAT )+10 ); + else if( CHAR_getInt( toindex, CHAR_FIREAT ) > 0 && CHAR_getInt( toindex, CHAR_WINDAT ) > 0 ) + CHAR_setInt( toindex, CHAR_FIREAT, CHAR_getInt( toindex, CHAR_FIREAT )-10 ), + CHAR_setInt( toindex, CHAR_WINDAT, CHAR_getInt( toindex, CHAR_WINDAT )+10 ); + else if( CHAR_getInt( toindex, CHAR_WINDAT ) > 0 && CHAR_getInt( toindex, CHAR_EARTHAT ) > 0 ) + CHAR_setInt( toindex, CHAR_WINDAT, CHAR_getInt( toindex, CHAR_WINDAT )-10 ), + CHAR_setInt( toindex, CHAR_EARTHAT, CHAR_getInt( toindex, CHAR_EARTHAT )+10 ); + } + if( power == 2 ){//旋转属性 反转 + if( CHAR_getInt( toindex, CHAR_EARTHAT ) == 100 ) + CHAR_setInt( toindex, CHAR_EARTHAT, CHAR_getInt( toindex, CHAR_EARTHAT )-10 ), + CHAR_setInt( toindex, CHAR_WINDAT, CHAR_getInt( toindex, CHAR_WINDAT )+10 ); + else if( CHAR_getInt( toindex, CHAR_WATERAT ) == 100 ) + CHAR_setInt( toindex, CHAR_WATERAT, CHAR_getInt( toindex, CHAR_WATERAT )-10 ), + CHAR_setInt( toindex, CHAR_EARTHAT, CHAR_getInt( toindex, CHAR_EARTHAT )+10 ); + else if( CHAR_getInt( toindex, CHAR_FIREAT ) == 100 ) + CHAR_setInt( toindex, CHAR_FIREAT, CHAR_getInt( toindex, CHAR_FIREAT )-10 ), + CHAR_setInt( toindex, CHAR_WATERAT, CHAR_getInt( toindex, CHAR_WATERAT )+10 ); + else if( CHAR_getInt( toindex, CHAR_WINDAT ) == 100 ) + CHAR_setInt( toindex, CHAR_WINDAT, CHAR_getInt( toindex, CHAR_WINDAT )-10 ), + CHAR_setInt( toindex, CHAR_FIREAT, CHAR_getInt( toindex, CHAR_FIREAT )+10 ); + else if( CHAR_getInt( toindex, CHAR_EARTHAT ) > 0 && CHAR_getInt( toindex, CHAR_WATERAT ) > 0 ) + CHAR_setInt( toindex, CHAR_EARTHAT, CHAR_getInt( toindex, CHAR_EARTHAT )+10 ), + CHAR_setInt( toindex, CHAR_WATERAT, CHAR_getInt( toindex, CHAR_WATERAT )-10 ); + else if( CHAR_getInt( toindex, CHAR_WATERAT ) > 0 && CHAR_getInt( toindex, CHAR_FIREAT ) > 0 ) + CHAR_setInt( toindex, CHAR_WATERAT, CHAR_getInt( toindex, CHAR_WATERAT )+10 ), + CHAR_setInt( toindex, CHAR_FIREAT, CHAR_getInt( toindex, CHAR_FIREAT )-10 ); + else if( CHAR_getInt( toindex, CHAR_FIREAT ) > 0 && CHAR_getInt( toindex, CHAR_WINDAT ) > 0 ) + CHAR_setInt( toindex, CHAR_FIREAT, CHAR_getInt( toindex, CHAR_FIREAT )+10 ), + CHAR_setInt( toindex, CHAR_WINDAT, CHAR_getInt( toindex, CHAR_WINDAT )-10 ); + else if( CHAR_getInt( toindex, CHAR_WINDAT ) > 0 && CHAR_getInt( toindex, CHAR_EARTHAT ) > 0 ) + CHAR_setInt( toindex, CHAR_WINDAT, CHAR_getInt( toindex, CHAR_WINDAT )+10 ), + CHAR_setInt( toindex, CHAR_EARTHAT, CHAR_getInt( toindex, CHAR_EARTHAT )-10 ); + } + } +#endif + case BD_KIND_HP: +#ifdef _TYPE_TOXICATION + if( CHAR_CanCureFlg( toindex, "HP") == FALSE ) continue; +#endif + // Robin 0728 ride Pet + if( ridepet == -1 ) { + UpPoint = RAND( (power*0.9), (power*1.1) ); +#ifdef _MAGIC_REHPAI +#else + if( per ){ + UpPoint *= CHAR_getWorkInt( toindex, CHAR_WORKMAXHP ) * 0.01; + } + UpPoint *= GetRecoveryRate( toindex ); +#endif + workhp = CHAR_getInt( toindex, CHAR_HP ); + oldhp = workhp; + workhp += (int)UpPoint; + CHAR_setInt( toindex, CHAR_HP, + min( workhp, CHAR_getWorkInt( toindex, CHAR_WORKMAXHP ) ) ); + + //snprintf( szBuffer, sizeof(szBuffer), "(%s)的耐久力回复(%d)", CHAR_getUseName( toindex ), UpPoint ); + + }else { + int allUpPoint; + UpPoint = RAND( (power*0.9), (power*1.1) ); +#ifdef _MAGIC_REHPAI + allUpPoint = UpPoint; + UpPoint = (allUpPoint * Magic_RideGetHP( toindex, ridepet, 1 ))/100; + petUpPoint = allUpPoint - UpPoint; +#else + petUpPoint = UpPoint; + if( per ){ + UpPoint *= CHAR_getWorkInt( toindex, CHAR_WORKMAXHP ) * 0.01; + petUpPoint *= CHAR_getWorkInt( ridepet, CHAR_WORKMAXHP ) * 0.01; + + } + UpPoint *= GetRecoveryRate( toindex ); + petUpPoint *= GetRecoveryRate( ridepet ); +#endif + + + allUpPoint = UpPoint + petUpPoint; +#ifdef _MAGIC_REHPAI +#else + UpPoint = (UpPoint * UpPoint) / allUpPoint; + petUpPoint = (petUpPoint * petUpPoint) / allUpPoint; +#endif + workhp = CHAR_getInt( toindex, CHAR_HP ); + oldhp = workhp; + workhp += (int)UpPoint; + CHAR_setInt( toindex, CHAR_HP, + min( workhp, CHAR_getWorkInt( toindex, CHAR_WORKMAXHP ) ) ); + workhp = CHAR_getInt( ridepet, CHAR_HP ); + oldhp = workhp; + workhp += (int)petUpPoint; + CHAR_setInt( ridepet, CHAR_HP, + min( workhp, CHAR_getWorkInt( ridepet, CHAR_WORKMAXHP ) ) ); + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)的耐久力回复(%d),(%s的骑宠)的耐久力回复(%d)", + // CHAR_getUseName( toindex ), + // UpPoint, + // CHAR_getUseName( toindex ), + // petUpPoint + // ); + } + break; + case BD_KIND_MP: + UpPoint = RAND( (power*0.9), (power*1.1) ); + if( per ){ + UpPoint *= CHAR_getWorkInt( toindex, CHAR_WORKMAXMP ) * 0.01; + } + workhp = CHAR_getInt( toindex, CHAR_MP ); + oldhp = workhp; + workhp += (int)UpPoint; + CHAR_setInt( toindex, CHAR_MP, + min( workhp, CHAR_getWorkInt( toindex, CHAR_WORKMAXMP ) ) ); + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)的气力回复(%d)", + // CHAR_getUseName( toindex ), + // UpPoint + // ); + break; +#ifdef _CHANGEITEMUSE // Syu ADD 调整战斗中使用料理设定 + case BD_KIND_HP_MP: +#ifdef _TYPE_TOXICATION + if( CHAR_CanCureFlg( toindex, "HP") == FALSE ) + continue; +#endif + if( ridepet == -1 ) + { + UpPoint = RAND( (power*0.9), (power*1.1) ); +#ifdef _MAGIC_REHPAI +#else + if( per ) + { + UpPoint *= CHAR_getWorkInt( toindex, CHAR_WORKMAXHP ) * 0.01; + } + UpPoint *= GetRecoveryRate( toindex ); +#endif + workhp = CHAR_getInt( toindex, CHAR_HP ); + oldhp = workhp; + workhp += (int)UpPoint; + CHAR_setInt( toindex, CHAR_HP, + min( workhp, CHAR_getWorkInt( toindex, CHAR_WORKMAXHP ) ) ); + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)的耐久力回复(%d)", + // CHAR_getUseName( toindex ), + // UpPoint + // ); + } + else + { + int allUpPoint; + UpPoint = RAND( (power*0.9), (power*1.1) ); +#ifdef _MAGIC_REHPAI + allUpPoint = UpPoint; + UpPoint = (allUpPoint * Magic_RideGetHP( toindex, ridepet, 1 ))/100; + petUpPoint = allUpPoint - UpPoint; +#else + petUpPoint = UpPoint; + if( per ) + { + UpPoint *= CHAR_getWorkInt( toindex, CHAR_WORKMAXHP ) * 0.01; + petUpPoint *= CHAR_getWorkInt( ridepet, CHAR_WORKMAXHP ) * 0.01; + + } + UpPoint *= GetRecoveryRate( toindex ); + petUpPoint *= GetRecoveryRate( ridepet ); +#endif + allUpPoint = UpPoint + petUpPoint; +#ifdef _MAGIC_REHPAI +#else + UpPoint = (UpPoint * UpPoint) / allUpPoint; + petUpPoint = (petUpPoint * petUpPoint) / allUpPoint; +#endif + workhp = CHAR_getInt( toindex, CHAR_HP ); + oldhp = workhp; + workhp += (int)UpPoint; + CHAR_setInt( toindex, CHAR_HP, + min( workhp, CHAR_getWorkInt( toindex, CHAR_WORKMAXHP ) ) ); + workhp = CHAR_getInt( ridepet, CHAR_HP ); + oldhp = workhp; + workhp += (int)petUpPoint; + CHAR_setInt( ridepet, CHAR_HP, + min( workhp, CHAR_getWorkInt( ridepet, CHAR_WORKMAXHP ) ) ); + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)的耐久力回复(%d),(%s的骑宠)的耐久力回复(%d)", + // CHAR_getUseName( toindex ), + // UpPoint, + // CHAR_getUseName( toindex ), + // petUpPoint + // ); + } + UpPoint1 = RAND( (power1*0.9), (power1*1.1) ); + if( per ) + { + UpPoint1 *= CHAR_getWorkInt( toindex, CHAR_WORKMAXMP ) * 0.01; + } + workhp = CHAR_getInt( toindex, CHAR_MP ); + oldhp = workhp; + workhp += (int)UpPoint1; + CHAR_setInt( toindex, CHAR_MP, + min( workhp, CHAR_getWorkInt( toindex, CHAR_WORKMAXMP ) ) ); + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)的气力回复(%d)", + // CHAR_getUseName( toindex ), + // UpPoint1); + break; +#endif + } + +#ifdef _CHANGEITEMUSE // Syu ADD 调整战斗中使用料理设定 + if ( kind == BD_KIND_HP_MP) + { + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + { + //补体的部分 + int Sign, Damage, petDamage; + Sign = (UpPoint >= 0)?(1):(0); + Damage = ABS( UpPoint ); + petDamage = ABS( petUpPoint ); +#ifdef _NOTRIDE_ + snprintf( szCommand, sizeof(szCommand), + "BD|r%X|%X|%X|d%X|", ToList[i], BD_KIND_HP, Sign, Damage ); +#else + snprintf( szCommand, sizeof(szCommand), + "BD|r%X|%X|%X|d%X|p%X|", ToList[i], BD_KIND_HP, Sign, Damage, petDamage ); +#endif //_NOTRIDE_ + BATTLESTR_ADD( szCommand ); + } + + { + //补气的部分 + int Sign, Damage, petDamage; + Sign = (UpPoint1 >= 0)?(1):(0); + Damage = ABS( UpPoint1 ); + petDamage = ABS( petUpPoint ); +#ifdef _NOTRIDE_ + snprintf( szCommand, sizeof(szCommand), + "BD|r%X|%X|%X|d%X|", ToList[i], BD_KIND_MP, Sign, Damage ); +#else + snprintf( szCommand, sizeof(szCommand), + "BD|r%X|%X|%X|d%X|p%X|", ToList[i], BD_KIND_MP, Sign, Damage, petDamage ); +#endif //_NOTRIDE_ + BATTLESTR_ADD( szCommand ); + } + + } + else + { + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + { + int Sign, Damage, petDamage; + Sign = (UpPoint >= 0)?(1):(0); + Damage = ABS( UpPoint ); + petDamage = ABS( petUpPoint ); +#ifdef _NOTRIDE_ + snprintf( szCommand, sizeof(szCommand), + "BD|r%X|%X|%X|d%X|", ToList[i], kind, Sign, Damage ); +#else + snprintf( szCommand, sizeof(szCommand), + "BD|r%X|%X|%X|d%X|p%X|", ToList[i], kind, Sign, Damage, petDamage ); +#endif //_NOTRIDE_ + BATTLESTR_ADD( szCommand ); + } + } + if( BattleArray[battleindex].norisk == 0 + && CHAR_getInt( toindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET) + { + flg = CHAR_getWorkInt( toindex, CHAR_WORKBATTLEFLG ); + if( flg & CHAR_BATTLEFLG_RECOVERY ) + {} + else + { + CHAR_PetAddVariableAi( toindex, AI_FIX_PETRECOVERY ); + CHAR_setWorkInt( toindex, CHAR_WORKBATTLEFLG, flg | CHAR_BATTLEFLG_RECOVERY ); + } + } +#else //_CHANGEITEMUSE + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + { + int Sign, Damage, petDamage; + Sign = (UpPoint >= 0)?(1):(0); + Damage = ABS( UpPoint ); + petDamage = ABS( petUpPoint ); +#ifdef _NOTRIDE_ + snprintf( szCommand, sizeof(szCommand), + "BD|r%X|%X|%X|d%X|", ToList[i], kind, Sign, Damage ); +#else + snprintf( szCommand, sizeof(szCommand), + "BD|r%X|%X|%X|d%X|p%X|", ToList[i], kind, Sign, Damage, petDamage ); +#endif //_NOTRIDE_ + BATTLESTR_ADD( szCommand ); + } + + if( BattleArray[battleindex].norisk == 0 + && CHAR_getInt( toindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET){ + flg = CHAR_getWorkInt( toindex, CHAR_WORKBATTLEFLG ); + if( flg & CHAR_BATTLEFLG_RECOVERY ){ + }else{ + CHAR_PetAddVariableAi( toindex, AI_FIX_PETRECOVERY ); + CHAR_setWorkInt( toindex, CHAR_WORKBATTLEFLG, flg | CHAR_BATTLEFLG_RECOVERY ); + } + } +#endif //_CHANGEITEMUSE + } + return; +} + +#ifdef _MAGIC_REHPAI +int Magic_RideGetHP( int toindex, int petindex, int flg) +{ + int allDHp=1; + int petDHp=1; + int CharDHp=1; + int ISIZE = 100; + + CharDHp = CHAR_getWorkInt( toindex, CHAR_WORKMAXHP ) - CHAR_getInt( toindex, CHAR_HP); + petDHp = CHAR_getWorkInt( petindex, CHAR_WORKMAXHP ) - CHAR_getInt( petindex, CHAR_HP); + allDHp = (CharDHp + petDHp); + + if( allDHp <= 0 ) allDHp=1; + if( flg == 1) + return (int)((CharDHp*ISIZE)/allDHp); + else + return (int)((petDHp*ISIZE)/allDHp); +} +#endif + +int MAGIC_Recovery_Battle( int charaindex, int toNo, int marray, int mp ) +{ + char *magicarg; + float power; + int battleindex, attackNo, HealedEffect = 0, per = 0; + int range; + if( !CHAR_CHECKINDEX( charaindex) ) return FALSE; + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + attackNo = BATTLE_Index2No( battleindex, charaindex ); + +#if 1 // Robin fix 防封包改Magic 围 + range = MAGIC_getInt( marray, MAGIC_TARGET ); + //print(" MAGIC_TARGET:%d toNo:%d ", range, toNo); + if( range == 0 && toNo != attackNo ) { // 只能对自己使用 + print("\n 改封包!MAGIC只能对自己使用!!:%s ", CHAR_getChar( charaindex, CHAR_CDKEY) ); + return FALSE; + } + if( range == 1 && toNo >= 20 ) { // 只能对单体使用 + print("\n 改封包!MAGIC只能对单体使用!!:%s ", CHAR_getChar( charaindex, CHAR_CDKEY) ); + return FALSE; + } +#endif + + // shan(对全体使用魔法的bug),修改者jinchao+2001/12/07 + if( BATTLE_CHECKINDEX( battleindex ) == FALSE ) return FALSE; + magicarg = MAGIC_getChar( marray, MAGIC_OPTION ); + // shan(对全体使用魔法的bug),修改者jinchao+2001/12/07 + if (!magicarg) return FALSE; + + power = atoi( magicarg ); + if( strstr( magicarg, "%" ) ){ + per = 1; + } + + if( power <= 100 ){ + HealedEffect = SPR_heal; + }else + if( power <= 300 ){ + HealedEffect = SPR_heal2; + }else{ + HealedEffect = SPR_heal3; + } + +#ifdef _CHANGEITEMUSE // Syu ADD 调整战斗中使用料理设定 + BATTLE_MultiRecovery( battleindex, attackNo, toNo, + BD_KIND_HP, (int)power, per, MAGIC_EFFECT_USER, HealedEffect , 0); +#else + BATTLE_MultiRecovery( battleindex, attackNo, toNo, + BD_KIND_HP, (int)power, per, MAGIC_EFFECT_USER, HealedEffect ); +#endif + return TRUE; +} + +void BATTLE_MultiResAndDef( + int battleindex, // 田玄伙奶件犯永弁旦 + int attackNo, // 井仃月谛 寞 + int toNo, // 井仃日木月谛 寞 + int power, // 湘 荚汊袄 + int per, // ⊙井" + int kind, // 芊 豢及潘 + int count, // 窒荚 什井 + int UseEffect, // 银丹谛及巨白尼弁玄 + int RecevEffect // 井仃日木月谛及巨白尼弁玄 +) +{ + int i, toindex, charaindex, UpPoint = 0, workhp; + int ToList[SIDE_OFFSET*2+1]; + + //char szBuffer[256]=""; + char szCommand[256]; + + + BATTLE_MultiListDead( battleindex, toNo, ToList ); + + BATTLE_MagicEffect( + battleindex, // 田玄伙奶件犯永弁旦 + attackNo, // 井仃月谛 寞(ㄟ ㄠㄨ) + ToList, // 井仃日木月谛 寞伉旦玄(ㄟ ㄠㄨ) + UseEffect, // 井仃月谛巨白尼弁玄 + RecevEffect // 井仃日木月谛巨白尼弁玄 + ); + charaindex = BATTLE_No2Index( battleindex, attackNo ); + for( i = 0; ToList[i] != -1; i ++ ){ + toindex = BATTLE_No2Index( battleindex, ToList[i] ); + if( BattleArray[battleindex].type == BATTLE_TYPE_P_vs_P + && CHAR_getInt( toindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER){ + continue; + } + if( CHAR_getFlg( toindex, CHAR_ISDIE ) == FALSE ){ + continue; + } + UpPoint = power; +#ifdef _MAGIC_REHPAI +#else + if( per ){ + UpPoint *= CHAR_getWorkInt( toindex, CHAR_WORKMAXHP ) * 0.01; + } +#endif + if( power == 0 ){ + UpPoint = CHAR_getWorkInt( toindex, CHAR_WORKMAXHP ); + }else{ + UpPoint = RAND( (power*0.9), (power*1.1) ); + } + UpPoint = max( 1, UpPoint ); + workhp = CHAR_getInt( toindex, CHAR_HP ) + UpPoint; + CHAR_setInt( toindex, CHAR_HP, + min( workhp, CHAR_getWorkInt( toindex, CHAR_WORKMAXHP ) ) ); + CHAR_setFlg( toindex, CHAR_ISDIE, 0 ); + CHAR_setWorkInt( toindex, MagicDefTbl[kind], count ); + + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)恢复意识", + // CHAR_getUseName( toindex ) ); + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)将(%s)遭受(损伤%s)", + // CHAR_getUseName( charaindex ), + // CHAR_getUseName( toindex ), + // aszMagicDefFull[kind] + //); + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + snprintf( szCommand, sizeof(szCommand), + "BL|r%X|h%X|", ToList[i], CHAR_getInt( toindex, CHAR_HP ) ); + BATTLESTR_ADD( szCommand ); + if( BattleArray[battleindex].norisk == 0 + && BattleArray[battleindex].type == BATTLE_TYPE_P_vs_E ){ + if( CHAR_getInt( toindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET ){ + CHAR_PetAddVariableAi( toindex, AI_FIX_PETRESSURECT ); + } + } + } +} + +#ifdef __ATTACK_MAGIC + +static int CharTable[4][5] = +{ + { 13 , 11 , 10 , 12 , 14 } , + { 18 , 16 , 15 , 17 , 19 } , + { 8 , 6 , 5 , 7 , 9 } , + { 3 , 1 , 0 , 2 , 4 } +}; + +static int CharTableIdx[20][2] = +{ + { 3 , 2 } , { 3 , 1 } , { 3 , 3 } , { 3 , 0 } , { 3 , 4 } , + { 2 , 2 } , { 2 , 1 } , { 2 , 3 } , { 2 , 0 } , { 2 , 4 } , + { 0 , 2 } , { 0 , 1 } , { 0 , 3 } , { 0 , 0 } , { 0 , 4 } , + { 1 , 2 } , { 1 , 1 } , { 1 , 3 } , { 1 , 0 } , { 1 , 4 } +}; + + + +typedef int ( *FUNC )( const void* , const void* ); + +static int SortLoc( const int *pEle1 , const int *pEle2 ) +{ + int ele1basex , ele1basey; + int ele2basex , ele2basey; + + ele1basex = CharTableIdx[*pEle1][1]; + ele1basey = CharTableIdx[*pEle1][0]; + ele2basex = CharTableIdx[*pEle2][1]; + ele2basey = CharTableIdx[*pEle2][0]; + + // 左上方 + if( *pEle1 >= 10 ) + { + if( ele1basey != ele2basey ) + return ( ele1basey - ele2basey ); + + return ( ele1basex - ele2basex ); + } + // 右下方 + else + { + if( ele1basey != ele2basey ) + return ( ele2basey - ele1basey ); + + return ( ele2basex - ele1basey ); + } + + return 0; +} + + +static void BATTLE_GetAttr( int charaindex , int *pAt_Fire , int *pAt_Water , int *pAt_Earth , int *pAt_Wind , int *pAt_None ) +{ + + int petindex = BATTLE_getRidePet( charaindex ); + + if( petindex == -1 ) + { + *pAt_Fire = CHAR_getWorkInt( charaindex , CHAR_WORKFIXFIREAT ); + *pAt_Water = CHAR_getWorkInt( charaindex , CHAR_WORKFIXWATERAT ); + *pAt_Earth = CHAR_getWorkInt( charaindex , CHAR_WORKFIXEARTHAT ); + *pAt_Wind = CHAR_getWorkInt( charaindex , CHAR_WORKFIXWINDAT ); + } + else + { + *pAt_Fire = ( CHAR_getWorkInt( charaindex , CHAR_WORKFIXFIREAT ) + + CHAR_getWorkInt( petindex , CHAR_WORKFIXFIREAT ) ) / 2; + *pAt_Water = ( CHAR_getWorkInt( charaindex , CHAR_WORKFIXWATERAT ) + + CHAR_getWorkInt( petindex , CHAR_WORKFIXWATERAT ) ) / 2; + *pAt_Earth = ( CHAR_getWorkInt( charaindex , CHAR_WORKFIXEARTHAT ) + + CHAR_getWorkInt( petindex , CHAR_WORKFIXEARTHAT ) ) / 2; + *pAt_Wind = ( CHAR_getWorkInt( charaindex , CHAR_WORKFIXWINDAT ) + + CHAR_getWorkInt( petindex , CHAR_WORKFIXWINDAT ) ) / 2; + } + + if( *pAt_Fire < 0 ) *pAt_Fire = 0; + if( *pAt_Water < 0 ) *pAt_Water = 0; + if( *pAt_Earth < 0 ) *pAt_Earth = 0; + if( *pAt_Wind < 0 ) *pAt_Wind = 0; + + *pAt_None = 100 - *pAt_Fire - *pAt_Water - *pAt_Earth - *pAt_Wind; + + if( *pAt_None < 0 ) + *pAt_None = 0; +} + +static void BATTLE_GetPureAttr( int charaindex , int *pAt_Fire , int *pAt_Water, int *pAt_Earth , int *pAt_Wind ) +{ + *pAt_Fire = CHAR_getWorkInt( charaindex , CHAR_WORKFIXFIREAT ); + *pAt_Water = CHAR_getWorkInt( charaindex , CHAR_WORKFIXWATERAT ); + *pAt_Earth = CHAR_getWorkInt( charaindex , CHAR_WORKFIXEARTHAT ); + *pAt_Wind = CHAR_getWorkInt( charaindex , CHAR_WORKFIXWINDAT ); + + if( *pAt_Fire < 0 ) *pAt_Fire = 0; + if( *pAt_Water < 0 ) *pAt_Water = 0; + if( *pAt_Earth < 0 ) *pAt_Earth = 0; + if( *pAt_Wind < 0 ) *pAt_Wind = 0; +} + + + +int BATTLE_CalAttMagicEffect( int AttEle , int DefPosEleValue , int DefNegEleValue ) +{ + int value; + + value = ( 100 * DefPosEleValue - 100 * DefNegEleValue ) / 1000; + + if( value > 10 ) + return 10; + else if( value < -10 ) + return -10; + + return value; +} + + + +int BATTLE_CalcCharaRatio( int AttEle , int charaidx ) +{ + int petidx , charahurt , pethurt; + int charaattr[4] , petattr[4]; + + // 没有宠物 + if( -1 == ( petidx = BATTLE_getRidePet( charaidx ) ) ) + return 10; + + // Nuke 20040330: Fix bug + if ( -1 == AttEle ) + return 5; + + BATTLE_GetPureAttr( charaidx , &charaattr[2] , &charaattr[1] , &charaattr[0], &charaattr[3] ); + BATTLE_GetPureAttr( petidx , &petattr[2] , &petattr[1] , &petattr[0] , &petattr[3] ); + + //print("\nAttEle: %d %d %d %d %d ",AttEle, charaattr[( AttEle + 1 ) % 4], charaattr[AttEle],petattr[( AttEle + 1 ) %4] , petattr[AttEle]); + + charahurt = 20 + BATTLE_CalAttMagicEffect( AttEle , charaattr[( AttEle + 1 ) % 4] , charaattr[AttEle] ); + pethurt = 20 + BATTLE_CalAttMagicEffect( AttEle , petattr[( AttEle + 1 ) %4] , petattr[AttEle] ); + + charahurt = 10 * charahurt / ( charahurt + pethurt ); + + if( charahurt < 2 ) + return 2; + else if( charahurt > 8 ) + return 8; + + return charahurt; +} + +static int BATTLE_AttrCalc( + int My_Fire, // 愤坌础(膜恳熬仃月幻丹) + int My_Water, + int My_Earth, + int My_Wind, + int My_None, + int Vs_Fire, // 锹澎础 + int Vs_Water, + int Vs_Earth, + int Vs_Wind, + int Vs_None +) +{ + int iRet = 0; + + // 绍及 猾 宁煌允月[ + My_Fire = My_Fire * Vs_None * AJ_UP // 绍 雄中 + + My_Fire * Vs_Fire * AJ_SAME // 绍 绍 元 + + My_Fire * Vs_Water * AJ_DOWN // 绍 浇中 + + My_Fire * Vs_Earth * AJ_SAME // 绍 萝 元 + + My_Fire * Vs_Wind * AJ_UP; // 绍 氘 雄中 + + // 及 猾 宁煌允月[ + My_Water = My_Water * Vs_None * AJ_UP // 雄中 + + My_Water * Vs_Fire * AJ_UP // 绍 雄中 + + My_Water * Vs_Water * AJ_SAME // 元 + + My_Water * Vs_Earth * AJ_DOWN // 萝 浇中 + + My_Water * Vs_Wind * AJ_SAME; // 氘 元 + + // 萝 + My_Earth = My_Earth * Vs_None * AJ_UP // 萝 雄中 + + My_Earth * Vs_Fire * AJ_SAME // 萝 绍 元 + + My_Earth * Vs_Water * AJ_UP // 萝 雄中 + + My_Earth * Vs_Earth * AJ_SAME // 萝 萝 元 + + My_Earth * Vs_Wind * AJ_DOWN; // 萝 氘 浇中 + + // 氘 + My_Wind = My_Wind * Vs_None * AJ_UP // 氘 雄中 + + My_Wind * Vs_Fire * AJ_DOWN // 氘 绍 浇中 + + My_Wind * Vs_Water * AJ_SAME // 氘 元 + + My_Wind * Vs_Earth * AJ_UP // 氘 萝 雄中 + + My_Wind * Vs_Wind * AJ_SAME; // 氘 氘 元 + + // 箪岭 + My_None = My_None * Vs_None * AJ_SAME // 元 + + My_None * Vs_Fire * AJ_DOWN // 绍 浇中 + + My_None * Vs_Water * AJ_DOWN // 浇中 + + My_None * Vs_Earth * AJ_DOWN // 萝 浇中 + + My_None * Vs_Wind * AJ_DOWN; // 氘 浇中 + + // 蝈 宁煌允月 + iRet = (My_Fire + My_Water + My_Earth + My_Wind + My_None) ; + + // 喘仃遥壬匀井曰匹 五仁卅匀凶及匹公及坌尺日允 + return (iRet * D_ATTR); +} + +extern float BATTLE_FieldAttAdjust(int battleindex,int pAt_Fire,int pAt_Water,int pAt_Earth,int pAt_Wind); +#ifndef _FIX_MAGICDAMAGE +static int BATTLE_AttrAdjust( + int attackindex, + int defindex, + int damage +) +{ + int At_Fire, At_Earth, At_Water, At_Wind, At_none; + int Df_Fire, Df_Earth, Df_Water, Df_Wind, Df_none; + float At_FieldPow, Df_FieldPow; + + BATTLE_GetAttr(attackindex,&At_Fire,&At_Water,&At_Earth,&At_Wind,&At_none); + + At_FieldPow = BATTLE_FieldAttAdjust( + CHAR_getWorkInt( attackindex, CHAR_WORKBATTLEINDEX ), + At_Fire, At_Water, At_Earth, At_Wind ); + + At_Fire *= damage; At_Water *= damage; At_Earth *= damage; + At_Wind *= damage; At_none *= damage; + BATTLE_GetAttr( defindex, &Df_Fire, &Df_Water, + &Df_Earth,&Df_Wind, &Df_none ); + Df_FieldPow = BATTLE_FieldAttAdjust( + CHAR_getWorkInt( defindex, CHAR_WORKBATTLEINDEX ), + Df_Fire, Df_Water, Df_Earth, Df_Wind ); + damage = BATTLE_AttrCalc( + At_Fire, At_Water, At_Earth, At_Wind, At_none, + Df_Fire, Df_Water, Df_Earth, Df_Wind, Df_none ); + damage *= (At_FieldPow / Df_FieldPow); + return damage; +} +#endif +// 计算闪避率 +// return: 0:没闪过 1:闪过 +int BATTLE_MagicDodge(int charindex,int nDefKind,int nFieldAttr) +{ + float fLuck = 0,fResist = 0; +#ifdef _EQUIT_DEFMAGIC + float Dluck=0.0; +#endif + int charType = CHAR_getInt( charindex, CHAR_WHICHTYPE); + // 如果是防守者是玩家 + if( charType == CHAR_TYPEPLAYER ){ + fLuck = (float)CHAR_getInt( charindex, CHAR_LUCK) * 3; + fResist = (float)CHAR_getInt( charindex, CHAR_EARTH_RESIST + nFieldAttr) * 0.15; + fLuck += fResist; +#ifdef _EQUIT_DEFMAGIC + Dluck = (float)(CHAR_getWorkInt( charindex, CHAR_EQUITQUIMAGIC)*0.9); + fLuck += Dluck; +#endif + }else {// 如果是防守者是宠物 + fLuck = (float)CHAR_getInt( charindex, CHAR_LV) * 0.2; + if(fLuck > 30) fLuck = 30; + } + if(rand()%100+1 > (int)fLuck) + return 0; + else + return 1; +} + + +#define DEF_MAGIC_NUM 4 + +extern void BATTLE_changeRideImage( int index ); + +#ifdef _FIX_MAGICDAMAGE +void BATTLE_MultiAttMagic( int battleindex, int attackNo, int toNo, + int attIdx ,int FieldAttr ,int Power, int MagicLv) +#else +void BATTLE_MultiAttMagic( int battleindex, int attackNo, int toNo , int attIdx, + int FieldAttr , int Power) +#endif +{ + int list[SIDE_OFFSET * 2 + 1]; + int listidx,i,j,k,z; + int basex , basey , magicattidx,def_is_player[10],def_be_hit[10]; + int att_magic_lv[4]; + int def_magic_resist[DEF_MAGIC_NUM]; + int attvalue , charahp , pethp , charaidx , petidx , charahurt,pet_att_lv = 1,pet_def_lv = 1,charahurt_temp; + char szcommand[256]; + int AttIsPlayer=0,DefIsPlayer=0; + int getexp = 0; + +#ifndef _FIX_MAGICDAMAGE + int att_magic_exp_add,att_magic_exp_sub,def_magic_exp_add,def_magic_exp_sub; + int lv_up_exp,DefFieldAttr = 0; + float temp = 0.0f; +// int attattr[5], defattr[5]; + char msgbuf[64]; + char kind[4][3] = {"地","水","火","风"}; +#else + BOOL TrueMagic=FALSE; +#endif + + // terry + + + if((z = BATTLE_MultiList(battleindex,toNo,list)) == -1) + return; + else + { + if(z != toNo) toNo = z; + } + + BATTLE_AttMagicEffect( battleindex , attackNo , list , attIdx ); + + // 计算攻击的人物清单 + if( attackNo < 10 ) + magicattidx = attIdx * 2 + 1; + else + magicattidx = attIdx * 2; + + listidx = 0; + memset(def_is_player,-1,sizeof(def_is_player)); + memset(def_be_hit,-1,sizeof(def_be_hit)); + + // 单人攻击 + if( toNo < 20 ){ + toNo = list[0]; + basex = CharTableIdx[toNo][1]; + basey = CharTableIdx[toNo][0]; + + for( i = 0 , j = basey - 1 ; j <= basey + 1 ; i++ , j++ ){ + if( toNo < 10 && ( j < 2 || j > 3 ) ) + continue; + else if( toNo >= 10 && ( j < 0 || j > 1 ) ) + continue; + // 计算那些人需要加入清单 + for( k = 0 ; k < 5 ; k++ ){ + if( basex - 2 + k < 0 || basex - 2 + k > 4 ) + continue; + + if( ATTMAGIC_magic[magicattidx].siField[i][k] && TRUE == BATTLE_TargetCheck( battleindex , CharTable[j][basex - 2 + k] ) ) + { + list[listidx] = CharTable[j][basex - 2 + k]; + listidx++; + } + } + } + }else if( 20 == toNo ){ // 右下全体 + for( i = 0 ; i < 2 ; i++ ){ + for( j = 0 ; j < 5 ; j++ ){ + if( ATTMAGIC_magic[magicattidx].siField[i][j] && TRUE == BATTLE_TargetCheck( battleindex , CharTable[i + 2][j] ) ){ + list[listidx] = CharTable[i + 2][j]; + listidx++; + } + } + } + }else if( 21 == toNo ){ // 左上全体 + for( i = 0 ; i < 2 ; i++ ){ + for( j = 0 ; j < 5 ; j++ ){ + if( ATTMAGIC_magic[magicattidx].siField[i][j] && TRUE == BATTLE_TargetCheck( battleindex , CharTable[i][j] ) ){ + list[listidx] = CharTable[i][j]; + listidx++; + } + } + } + } + // 左上第一列 , 左上第二列 , 右下第一列 , 右下第二列 + else if( 23 == toNo || 24 == toNo || 25 == toNo || 26 == toNo ){ + basey = toNo - 23; + + for( i = 0 , j = basey - 1 ; j <= basey + 1 ; i++ , j++ ){ + if( ( 25 == toNo || 26 == toNo ) && ( j < 2 || j > 3 ) ) + continue; + else if( ( 23 == toNo || 24 == toNo ) && ( j < 0 || j > 1 ) ) + continue; + + // 计算那些人需要加入清单 + for( k = 0 ; k < 5 ; k++ ){ + if( ATTMAGIC_magic[magicattidx].siField[i][k] && TRUE == BATTLE_TargetCheck( battleindex , CharTable[j][k] ) ) + { + list[listidx] = CharTable[j][k]; + listidx++; + } + } + } + } + + + qsort( list , listidx , sizeof( list[0] ) , ( FUNC )SortLoc );// 排序位置 + + // 取得人物的属性(不论玩家或是宠物) + //BATTLE_GetAttr( BATTLE_No2Index( battleindex , attackNo ) , &attattr[2] , &attattr[1] , &attattr[0] , &attattr[3] , &attattr[4] ); + // 如果攻击者是玩家,取得人物的魔法熟练度及魔法抗性 + { + int attType = CHAR_getInt(BATTLE_No2Index(battleindex,attackNo),CHAR_WHICHTYPE); + int Check=0; + AttIsPlayer=0; + if( attType == CHAR_TYPEPLAYER) { + AttIsPlayer = 1; + for(i=0;i<4;i++){ // att_magic_lv[i]: i = 0:地 1:水 2:火 3:风 + att_magic_lv[i] = CHAR_getInt(BATTLE_No2Index(battleindex,attackNo),CHAR_EARTH_EXP+i); + } + }else if( attType == CHAR_TYPEENEMY ) { + for(i=0;i<4;i++){ + att_magic_lv[i] = (CHAR_getInt(BATTLE_No2Index(battleindex,attackNo), CHAR_LV)*0.9); + } + }else { +#ifdef _FIX_MAGICDAMAGE + AttIsPlayer = 1; +#endif + for(i=0;i<4;i++){ +#ifdef _FIX_MAGICDAMAGE + att_magic_lv[i] = CHAR_getInt(BATTLE_No2Index(battleindex,attackNo),CHAR_EARTH_EXP+i); +#else + att_magic_lv[i] = 0; +#endif + } + } + Check = rand()%100; +#ifdef _FIX_MAGICDAMAGE + if( Check > att_magic_lv[ FieldAttr] ) TrueMagic = FALSE; + else TrueMagic = TRUE; +#endif + } + pet_att_lv = CHAR_getInt(BATTLE_No2Index(battleindex,attackNo), CHAR_LV); + + z = 0; + for(i=0;i 0 ){ + float def = (float)(CHAR_getWorkInt( charaidx, CHAR_OTHERSTATUSNUMS )); + def = def/100; + for(j=0;j 0) { + CHAR_setWorkInt(def_be_hit[i],CHAR_WORKSLEEP,0); + z = BATTLE_Index2No(battleindex,def_be_hit[i]); + sprintf(szcommand,"BM|%X|%X|",z,0); + BATTLESTR_ADD(szcommand); + } + } +#else + //TrueMagic == FALSE + // 攻击方的经验值----------------------------------------------------------------------------- + if(AttIsPlayer){ + // 被克的魔法 + DefFieldAttr = (FieldAttr+1)%4; + // 取得玩家所用的魔法的经验值 + att_magic_exp_add = CHAR_getInt(BATTLE_No2Index(battleindex,attackNo),CHAR_EARTH_ATTMAGIC_EXP+FieldAttr); + // 取得玩家所用的魔法的被克魔法经验值 + att_magic_exp_sub = CHAR_getInt(BATTLE_No2Index(battleindex,attackNo),CHAR_EARTH_ATTMAGIC_EXP+DefFieldAttr); + // 依所使用的魔法加该属性的exp,打几只算几点exp + att_magic_exp_add += getexp; + // 依所使用的魔法扣被克属性的exp,打几只扣几点exp + att_magic_exp_sub -= getexp; + lv_up_exp = Magic_Level_Table[att_magic_lv[FieldAttr]]; + while(att_magic_exp_add >= lv_up_exp || att_magic_exp_sub < 0){ + // 如果玩家所用的魔法的经验值现在可以升级了 + if(att_magic_exp_add >= lv_up_exp){ + // 如果超过了100级 + if(att_magic_lv[FieldAttr] + 1 > 100){ + att_magic_lv[FieldAttr] = 100; + // 经验值清为0 + att_magic_exp_add = 0; + }else{ + att_magic_lv[FieldAttr]++; + // 把现在的经验值扣掉升了级所用的经验值 + att_magic_exp_add -= lv_up_exp; + snprintf(msgbuf,sizeof(msgbuf),"你的 %s 魔法熟练度升级为 %d。",kind[FieldAttr],att_magic_lv[FieldAttr]); + CHAR_talkToCli(BATTLE_No2Index(battleindex,attackNo),-1,msgbuf,CHAR_COLORRED); + } + } + // 如果玩家所用的魔法的相克魔法的经验值现在可以降级了 + if(att_magic_exp_sub < 0 ){ + // 如果等级已经是1级 + if(att_magic_lv[DefFieldAttr] <= 1){ + att_magic_lv[DefFieldAttr] = 1; + // 经验值清为0 + att_magic_exp_sub = 0; + }else{ + att_magic_lv[DefFieldAttr]--; + // 把下一个等级的经验值扣掉现在的经验值 + att_magic_exp_sub = Magic_Level_Table[att_magic_lv[DefFieldAttr]] + att_magic_exp_sub; + snprintf(msgbuf,sizeof(msgbuf),"你的 %s 魔法熟练度降级为 %d。",kind[DefFieldAttr],att_magic_lv[DefFieldAttr]); + CHAR_talkToCli(BATTLE_No2Index(battleindex,attackNo),-1,msgbuf,CHAR_COLORRED); + } + } + lv_up_exp = Magic_Level_Table[att_magic_lv[FieldAttr]]; + } + CHAR_setInt(BATTLE_No2Index(battleindex,attackNo),CHAR_EARTH_EXP+FieldAttr,att_magic_lv[FieldAttr]); + CHAR_setInt(BATTLE_No2Index(battleindex,attackNo),CHAR_EARTH_ATTMAGIC_EXP+FieldAttr,att_magic_exp_add); + CHAR_setInt(BATTLE_No2Index(battleindex,attackNo),CHAR_EARTH_EXP+DefFieldAttr,att_magic_lv[DefFieldAttr]); + CHAR_setInt(BATTLE_No2Index(battleindex,attackNo),CHAR_EARTH_ATTMAGIC_EXP+DefFieldAttr,att_magic_exp_sub); + } + + // 防守方的经验值----------------------------------------------------------------------------- + for(i=0;i= lv_up_exp || def_magic_exp_sub < 0){ + // 如果防守方玩家对此魔法的抗性的经验值现在可以升级了 + if(def_magic_exp_add >= lv_up_exp){ + // 如果超过了100级 + if(def_magic_resist[FieldAttr] + 1 > 100) def_magic_resist[FieldAttr] = 100; + else { + def_magic_resist[FieldAttr]++; + snprintf(msgbuf,sizeof(msgbuf),"你的 %s 魔法抗性升级为 %d。",kind[FieldAttr],def_magic_resist[FieldAttr]); + CHAR_talkToCli(charaidx,-1,msgbuf,CHAR_COLORRED); + } + // 经验值清为0 + def_magic_exp_add = 0; + } + // 如果防守方玩家对此魔法的抗性的相克魔法的经验值现在可以降级了 + if(def_magic_exp_sub < 0 ) { + // 如果等级已经是1级 + if(def_magic_resist[DefFieldAttr] <= 1) def_magic_exp_sub = 0; // 经验值清为0 + else { + def_magic_resist[DefFieldAttr]--; + // 经验值变成下一个等级的经验值 + def_magic_exp_sub = Magic_Level_Table[def_magic_resist[DefFieldAttr]]; + snprintf(msgbuf,sizeof(msgbuf),"你的 %s 魔法抗性降级为 %d。",kind[DefFieldAttr],def_magic_resist[DefFieldAttr]); + CHAR_talkToCli(charaidx,-1,msgbuf,CHAR_COLORRED); + } + } + lv_up_exp = Magic_Level_Table[def_magic_resist[FieldAttr]]; + } + CHAR_setInt(charaidx,CHAR_EARTH_RESIST+FieldAttr,def_magic_resist[FieldAttr]); + CHAR_setInt(charaidx,CHAR_EARTH_DEFMAGIC_EXP+FieldAttr,def_magic_exp_add); + CHAR_setInt(charaidx,CHAR_EARTH_RESIST+DefFieldAttr,def_magic_resist[DefFieldAttr]); + CHAR_setInt(charaidx,CHAR_EARTH_DEFMAGIC_EXP+DefFieldAttr,def_magic_exp_sub); + } + // 如果被攻击者中了睡眠 + if(CHAR_getWorkInt(def_be_hit[i],CHAR_WORKSLEEP) > 0) { + CHAR_setWorkInt(def_be_hit[i],CHAR_WORKSLEEP,0); + z = BATTLE_Index2No(battleindex,def_be_hit[i]); + sprintf(szcommand,"BM|%X|%X|",z,0); + BATTLESTR_ADD(szcommand); + } + } +#endif +} + +#endif + +#ifdef _MAGIC_TOCALL +void BATTLE_MultiToCallDragonMagic( int battleindex, int attackNo, int toNo, + int attIdx ,int FieldAttr ,int Power, int ImageNo) +{ + int list[SIDE_OFFSET * 2 + 1]; + int listidx,i,j,k,z; + int /*basex , */basey , magicattidx,def_is_player[10],def_be_hit[10]; + int attvalue , charahp , pethp , charaidx , petidx , charahurt,charahurt_temp; + char szcommand[256]; + int /*AttIsPlayer = 0,*/DefIsPlayer = 0; + +#ifndef _FIX_MAGICDAMAGE + int att_magic_exp_add,att_magic_exp_sub,def_magic_exp_add,def_magic_exp_sub; + int lv_up_exp,DefFieldAttr = 0; + float temp = 0.0f; + char msgbuf[64]; +#else +#endif + + int icindex, ioindex; + // terry + print("BATTLE_MultiToCallDragonMagic in.............\n"); + if((z = BATTLE_MultiList(battleindex,toNo,list)) == -1) + return; + else{ + if(z != toNo) toNo = z; + } + + TOCALL_magic[attIdx].uiSpriteNum = ImageNo; + + BATTLE_ToCallDragonEffect( battleindex , attackNo , list , attIdx); + + // 计算攻击的人物清单 + if( attackNo < 10 ) + magicattidx = attIdx * 2 + 1; + else + magicattidx = attIdx * 2; + + + listidx = 0; + memset(def_is_player,-1,sizeof(def_is_player)); + memset(def_be_hit,-1,sizeof(def_be_hit)); + + // 单人攻击 + if( toNo < 20 ){ + toNo = list[0]; + listidx++; + + } else if( 20 == toNo ){ // 右下全体 + for( i = 0 ; i < 2 ; i++ ){ + for( j = 0 ; j < 5 ; j++ ){ + if(TRUE == BATTLE_TargetCheck( battleindex , CharTable[i + 2][j] ) ){ + list[listidx] = CharTable[i + 2][j]; + listidx++; + } + } + } + } else if( 21 == toNo ){ // 左上全体 + for( i = 0 ; i < 2 ; i++ ){ + for( j = 0 ; j < 5 ; j++ ){ + if(TRUE == BATTLE_TargetCheck( battleindex , CharTable[i][j] ) ){ + list[listidx] = CharTable[i][j]; + listidx++; + } + } + } + } // 左上第一列 , 左上第二列 , 右下第一列 , 右下第二列 + else if( 23 == toNo || 24 == toNo || 25 == toNo || 26 == toNo ){ + basey = toNo - 23; + for( i = 0 , j = basey - 1 ; j <= basey + 1 ; i++ , j++ ){ + if( ( 25 == toNo || 26 == toNo ) && ( j < 2 || j > 3 ) ) + continue; + else if( ( 23 == toNo || 24 == toNo ) && ( j < 0 || j > 1 ) ) + continue; + // 计算那些人需要加入清单 + for( k = 0 ; k < 5 ; k++ ){ + if(TRUE == BATTLE_TargetCheck( battleindex , CharTable[j][k] ) ) + { + list[listidx] = CharTable[j][k]; + listidx++; + } + } + } + } + print("listidx=%d............................\n", listidx); + qsort( list , listidx , sizeof( list[0] ) , ( FUNC )SortLoc );// 排序位置 + for( i = 0 ; i < listidx ; i++ ) { + int defType; + charaidx = BATTLE_No2Index( battleindex , list[i] ); + petidx = BATTLE_getRidePet( charaidx ); + defType = CHAR_getInt(charaidx, CHAR_WHICHTYPE); + DefIsPlayer = 0; + if (defType == CHAR_TYPEPLAYER) { + DefIsPlayer = 1; + } + if (CHAR_createCharacter( 100354 /*image no*/, 100, 600, 370, 0, + &icindex, &ioindex, 0) == TRUE) { + + print("char create success\n"); +// CHAR_setInt( icindex, CHAR_STR, 100); + CHAR_setInt( icindex, CHAR_LUCK, 1); + CHAR_setWorkInt( icindex, CHAR_WORKATTACKPOWER, + Power ); + CHAR_setWorkInt( icindex, CHAR_WORKOTHERDMAGE, + 0); + + if (BATTLE_MagicDodge(charaidx, DefIsPlayer, FieldAttr)) { +// 没击中 + attvalue = 0; + } else { + if( 0 == TOCALL_magic[attIdx].uiAttackType ) {// 单人攻击 + attvalue = BATTLE_DamageCalc(icindex, charaidx); + } + else { + attvalue = BATTLE_DamageCalc(icindex, charaidx); + } + } + print("char create success=%d %d\n", icindex, attvalue); + CHAR_CharaDelete(icindex); + charahp = CHAR_getInt( charaidx , CHAR_HP ); + if (-1 == petidx || CHAR_getInt(petidx, CHAR_HP) <= 0) { +// 没骑宠物 + if( ( charahp -= attvalue ) < 0 ) { + charahp = 0; + } + CHAR_setInt( charaidx , CHAR_HP , charahp ); + pethp = 0; + if( 0 == TOCALL_magic[attIdx].uiAttackType ) {// 单人攻击 + sprintf( szcommand , "%X|%X|%X|%X|" , toNo , list[i] , attvalue , pethp); + } else + sprintf( szcommand , "%X|%X|%X|%X|" , list[i] , list[i] , attvalue , pethp); + }else{ + pethp = CHAR_getInt( petidx , CHAR_HP ); + charahurt = attvalue * BATTLE_CalcCharaRatio( FieldAttr , charaidx ) / 10; + + charahurt_temp = charahurt; + if( ( charahp -= charahurt ) < 0 ) + { + charahurt = charahp; + charahp = 0; + } + + attvalue = attvalue - charahurt; + if( ( pethp -= attvalue ) < 0) + { + pethp = 0; + // 宠物没血了退出战场 + CHAR_setInt(charaidx,CHAR_RIDEPET,-1); + BATTLE_changeRideImage(charaidx); + CHAR_setWorkInt(charaidx,CHAR_WORKPETFALL,1); + } + CHAR_setInt( charaidx , CHAR_HP , charahp ); + CHAR_setInt( petidx , CHAR_HP , pethp ); + + charahurt = charahurt_temp; + + if( 0 == TOCALL_magic[attIdx].uiAttackType ) {// 单人攻击 + sprintf( szcommand , "%X|%X|%X|%X|" , toNo , list[i] , charahurt , attvalue); + } else + sprintf( szcommand , "%X|%X|%X|%X|" , list[i] , list[i] , charahurt , attvalue); + + } + + BATTLESTR_ADD( szcommand ); + } + } + + sprintf( szcommand , "%X|" , 0x5711438 ); + BATTLESTR_ADD( szcommand ); + +} + +#endif + +//*********************************************************** +// +// 芊羁匹 醒及平乓仿弁正□毛汊唾今六月 +// +void BATTLE_MultiRessurect( + int battleindex, // 田玄伙奶件犯永弁旦 + int attackNo, // 井仃月谛 寞 + int toNo, // 井仃日木月谛 寞 + int power, // 湘 荚汊袄 + int per, // ⊙井" + int UseEffect, // 银丹谛及巨白尼弁玄 + int RecevEffect // 井仃日木月谛及巨白尼弁玄 +) +// +//*********************************************************** +{ + int i, toindex, UpPoint = 0, workhp; + int ToList[SIDE_OFFSET*2+1]; + + //char szBuffer[256]=""; + char szCommand[256]; + + + BATTLE_MultiListDead( battleindex, toNo, ToList ); + + BATTLE_MagicEffect( + battleindex, // 田玄伙奶件犯永弁旦 + attackNo, // 井仃月谛 寞(ㄟ ㄠㄨ) + ToList, // 井仃日木月谛 寞伉旦玄(ㄟ ㄠㄨ) + UseEffect, // 井仃月谛巨白尼弁玄 + RecevEffect // 井仃日木月谛巨白尼弁玄 + ); + + // 汊唾今六月 + for( i = 0; ToList[i] != -1; i ++ ){ + // 锹澎及奶件犯永弁旦 + toindex = BATTLE_No2Index( battleindex, ToList[i] ); + + // 反皿伊奶乩□及戏五忒曰 仄 + if( BattleArray[battleindex].type == BATTLE_TYPE_P_vs_P + && CHAR_getInt( toindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER + ){ + continue; + } + + // 竣濮仄化中卅仃木壬汊唾今六卅中 + if( CHAR_getFlg( toindex, CHAR_ISDIE ) == FALSE ){ + continue; + } + + // 公及引引及煌遥 + UpPoint = power; + + if( per ){ + // ⊙煌遥 + UpPoint *= CHAR_getWorkInt( toindex, CHAR_WORKMAXHP ) * 0.01; + } + + if( power == 0 ){ + // 仇及桦宁反敦蝈荚汊 + UpPoint = CHAR_getWorkInt( toindex, CHAR_WORKMAXHP ); + }else{ + // 荚汊汹卞汔毛 凶六月(漆反赝癫) + UpPoint = RAND( (power*0.9), (power*1.1) ); + } + // 斓匹手ㄠ + UpPoint = max( 1, UpPoint ); + + workhp = CHAR_getInt( toindex, CHAR_HP ) + UpPoint; + + // 毛译尹卅中方丹卞荚汊 + CHAR_setInt( toindex, CHAR_HP, + min( workhp, CHAR_getWorkInt( toindex, CHAR_WORKMAXHP ) ) ); + + // 汊唾 + CHAR_setFlg( toindex, CHAR_ISDIE, 0 ); + + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)恢复意识", + // CHAR_getUseName( toindex ) ); + + // 须 煤 + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + + // (汊唾)戊穴件玉毛中木月 + snprintf( szCommand, sizeof(szCommand), + "BL|r%X|h%X|", ToList[i], CHAR_getInt( toindex, CHAR_HP ) ); + + // 侬 馨笛 + BATTLESTR_ADD( szCommand ); +/* + { int Sign, Damage; + Sign = (UpPoint >= 0)?(1):(0); + Damage = ABS( UpPoint ); + // ( 荚汊)戊穴件玉毛中木月 + snprintf( szCommand, sizeof(szCommand), + "BD|r%X|%X|%X|d%X|", ToList[i], 0, Sign, Damage ); + } + // 侬 馨笛 + BATTLESTR_ADD( szCommand ); +*/ + + // 衬午及爵 匹伉旦弁互卅井匀凶日 + if( BattleArray[battleindex].norisk == 0 + && BattleArray[battleindex].type == BATTLE_TYPE_P_vs_E + ){ + // 仇仇匹矢永玄分匀凶日袄毛皿仿旦允月 + if( CHAR_getInt( toindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET ){ + CHAR_PetAddVariableAi( toindex, AI_FIX_PETRESSURECT ); + } + } + } + + return; + +} + +#ifdef _Item_ReLifeAct +void BATTLE_MultiReLife( int battleindex, int attackNo, int toNo, + int power, int RecevEffect ) +{ + int i, toindex, UpPoint = 0, workhp; + int ToList[SIDE_OFFSET*2+1]; + //char szBuffer[256]=""; + char szCommand[256]; + char buf1[256]; + + memset(szCommand, 0, sizeof(szCommand)); + BATTLE_MultiListDead( battleindex, toNo, ToList ); + + + //snprintf( szCommand, sizeof(szCommand), "Bj|"); + for( i = 0; ToList[i] != -1; i ++ ){ + toindex = BATTLE_No2Index( battleindex, ToList[i] ); + //if( BattleArray[battleindex].type == BATTLE_TYPE_P_vs_P + //&& CHAR_getInt( toindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + // continue; + //} + if( CHAR_getFlg( toindex, CHAR_ISDIE ) == FALSE ){ + continue; + } + UpPoint = power; + workhp = max( 1, UpPoint ); + + CHAR_setInt( toindex, CHAR_HP, min( workhp, CHAR_getWorkInt( toindex, CHAR_WORKMAXHP ) ) ); + CHAR_setFlg( toindex, CHAR_ISDIE, 0 ); + //snprintf( szBuffer, sizeof(szBuffer), "(%s)恢复意识", CHAR_getUseName( toindex ) ); +#if 0 // Robin 修正多人同时替身娃娃复活会当机 + snprintf( buf1, sizeof(buf1), "Bj|r%X|l%X|e%X|h%X|FF|", + ToList[i], 1, RecevEffect, CHAR_getInt( toindex, CHAR_HP )); + strcat( szCommand, buf1); +#else + snprintf( buf1, sizeof(buf1), + "BJ|a%X|m%X|e%X|e%X|FF|", + ToList[i], + CHAR_getInt( toindex, CHAR_MP ), + RecevEffect, //MyEffect, + 0 //ToEffect + ); + strcat( szCommand, buf1); + + snprintf( buf1, sizeof(buf1), + "BL|r%X|h%X|", ToList[i], CHAR_getInt( toindex, CHAR_HP ) ); + strcat( szCommand, buf1); + +#endif + if( BattleArray[battleindex].norisk == 0 + && BattleArray[battleindex].type == BATTLE_TYPE_P_vs_E ){ + if( CHAR_getInt( toindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET ){ + CHAR_PetAddVariableAi( toindex, AI_FIX_PETRESSURECT ); + } + } + } + //strcat( szCommand, "FF|"); + BATTLESTR_ADD( szCommand ); + return; +} +#endif + +void BATTLE_MultiStatusChange( + int battleindex, // 田玄伙奶件犯永弁旦 + int attackNo, // 井仃月谛 寞 + int toNo, // 井仃日木月谛 寞 + int status, // 旦 □正旦潘 + int turn, // 正□件醒 + int UseEffect, // 银丹谛及巨白尼弁玄 + int RecevEffect, // 井仃日木月谛及巨白尼弁玄 + int Success // 岳 +) +{ + int i, toindex, charaindex; + int perStatus; + int ToList[SIDE_OFFSET*2+1]; + //char szBuffer[256]=""; + + BATTLE_MultiList( battleindex, toNo, ToList ); + BATTLE_MagicEffect( + battleindex, // 田玄伙奶件犯永弁旦 + attackNo, // 井仃月谛 寞(ㄟ ㄠㄨ) + ToList, // 井仃日木月谛 寞伉旦玄(ㄟ ㄠㄨ) + UseEffect, // 井仃月谛巨白尼弁玄 + RecevEffect // 井仃日木月谛巨白尼弁玄 + ); + + charaindex = BATTLE_No2Index( battleindex, attackNo ); + for( i = 0; ToList[i] != -1; i ++ ){ + toindex = BATTLE_No2Index( battleindex, ToList[i] ); + if( BATTLE_StatusAttackCheck( charaindex, + toindex, status, Success, 30, 1.0, &perStatus ) == FALSE ){ + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)无法将(%s)做成(%s)(%d%%)", + // CHAR_getUseName( charaindex ), + // CHAR_getUseName( toindex ), + // aszStatusFull[status], + // perStatus + //); + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + }else{ + CHAR_setWorkInt( toindex, StatusTbl[status], turn ); + + if( status == BATTLE_ST_PARALYSIS + || status == BATTLE_ST_SLEEP + || status == BATTLE_ST_STONE + || status == BATTLE_ST_BARRIER ){ + CHAR_setWorkInt( toindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + } + + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)将(%s)做成(%s)(%d%%)", + // CHAR_getUseName( charaindex ), + // CHAR_getUseName( toindex ), + // aszStatusFull[status], + // perStatus + //); + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + BATTLE_BadStatusString( ToList[i], status ); + } + } + return; +} + +#ifdef _OTHER_MAGICSTAUTS +void BATTLE_MultiMagicStatusChange( int battleindex, int attackNo, int toNo, int status, int turn, + int UseEffect, int RecevEffect, int nums ) +{ + int i, j, toindex, charaindex; + int ToList[SIDE_OFFSET*2+1]; + + BATTLE_MultiList( battleindex, toNo, ToList ); + BATTLE_MagicEffect( battleindex, attackNo, ToList, UseEffect, RecevEffect ); + + charaindex = BATTLE_No2Index( battleindex, attackNo ); + for( i = 0; ToList[i] != -1; i ++ ){ + toindex = BATTLE_No2Index( battleindex, ToList[i] ); + for( j=1; j 0 ){ + tostatus = j; + } + } + //======== 仇仇匹岳 井升丹井毛 烂今六月 ========== + if( tostatus == 0 ){//正常 + // 撩 凛 +// print("\n vincent--很健康"); + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)很健康", + // CHAR_getUseName( toindex ) ); + }else + // 蝈莒隙烂匹尕麻僖分匀凶日 + if( ( status == 0 && tostatus != 0 && tostatus <= CHAR_WORKCONFUSION ) // 蝈莒隙烂匹尕麻僖//找到异常 + || ( status == tostatus ) // 唱橘午荚汊椭互穴永民仄凶 + ){ + // 荚汊允月 + CHAR_setWorkInt( toindex, StatusTbl[tostatus], 0 ); +#ifdef _MAGIC_NOCAST + if( StatusTbl[tostatus] == CHAR_WORKNOCAST ){ + //print("\nvincent-->lssproto_NC_send"); + lssproto_NC_send( getfdFromCharaIndex( toindex ), 0);//沉默解除 + } +#endif +// print("\n vincent--解除了:%d",tostatus); + // 岳 凛 + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)解除了(%s)的(%s)", + // CHAR_getUseName( charaindex ), + // CHAR_getUseName( toindex ), + // aszStatusFull[tostatus] + //); + // 仇仇匹旦 □正旦唱橘迕 侬 戊穴件玉毛中木月 + BATTLE_BadStatusString( ToList[i], 0 );//解除异常 + + }else{ +// print("\n vincent--不"); + // 撩 凛 +/* snprintf( szBuffer, sizeof(szBuffer), + "(%s)不(%s)", + CHAR_getUseName( toindex ), + aszStatusFull[status] + ); +*/ + } + // 须 煤 + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + } + + return; +} + +//*********************************************************** +// +// 芊羁匹 醒及平乓仿弁正□毛 芊 豢 +// +void BATTLE_MultiMagicDef( + int battleindex, // 田玄伙奶件犯永弁旦 + int attackNo, // 井仃月谛 寞 + int toNo, // 井仃日木月谛 寞 + int kind, // 升及 芊 豢井 + int count, // 荚醒 + int UseEffect, // 银丹谛及巨白尼弁玄 + int RecevEffect // 井仃日木月谛及巨白尼弁玄 +) +// +//*********************************************************** +{ + + int i, toindex, charaindex; + int ToList[SIDE_OFFSET*2+1]; + + //char szBuffer[256]=""; + + + BATTLE_MultiList( battleindex, toNo, ToList ); + + BATTLE_MagicEffect( + battleindex, // 田玄伙奶件犯永弁旦 + attackNo, // 井仃月谛 寞(ㄟ ㄠㄨ) + ToList, // 井仃日木月谛 寞伉旦玄(ㄟ ㄠㄨ) + UseEffect, // 井仃月谛巨白尼弁玄 + RecevEffect // 井仃日木月谛巨白尼弁玄 + ); + + charaindex = BATTLE_No2Index( battleindex, attackNo ); + for( i = 0; ToList[i] != -1; i ++ ){ + toindex = BATTLE_No2Index( battleindex, ToList[i] ); + CHAR_setWorkInt( toindex, MagicDefTbl[kind], count ); + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)将(%s)遭受(损伤%s)", + // CHAR_getUseName( charaindex ), + // CHAR_getUseName( toindex ), + // aszMagicDefFull[kind] + //); + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + } + + return; + + + +} + + +#if 1 + +//*********************************************************** +// +// 芊羁匹 醒及平乓仿弁正□及由仿丢□正毛晓票今六月 +// +void BATTLE_MultiParamChange( + int battleindex, // 田玄伙奶件犯永弁旦 + int attackNo, // 井仃月谛 寞 + int toNo, // 井仃日木月谛 寞 + int kind, // 升及由仿丢□正井 + int power, // 禾奶件玄 + int par, // ⊙煌遥允月 + int UseEffect, // 银丹谛及巨白尼弁玄 + int RecevEffect // 井仃日木月谛及巨白尼弁玄 +) +// +//*********************************************************** +{ + + int i, toindex, charaindex; + int ToList[SIDE_OFFSET*2+1]; + int res = 0, work; + //char szBuffer[256]=""; + + + BATTLE_MultiList( battleindex, toNo, ToList ); + + BATTLE_MagicEffect( + battleindex, // 田玄伙奶件犯永弁旦 + attackNo, // 井仃月谛 寞(ㄟ ㄠㄨ) + ToList, // 井仃日木月谛 寞伉旦玄(ㄟ ㄠㄨ) + UseEffect, // 井仃月谛巨白尼弁玄 + RecevEffect // 井仃日木月谛巨白尼弁玄 + ); + + charaindex = BATTLE_No2Index( battleindex, attackNo ); + + // 升及由仿丢□正卞允月井 + for( i = 0; ToList[i] != -1; i ++ ){ + + // 锹澎及奶件犯永弁旦 + toindex = BATTLE_No2Index( battleindex, ToList[i] ); + + switch( kind ){ + case PC_KIND_ATTACK: + if( par ){ + // ⊙煌遥卅凶户}ㄠㄟㄟ反井仃卅中 + work = CHAR_getWorkInt( toindex, CHAR_WORKFIXSTR ); + work = work * power; + }else{ + // 公及引引及煌遥卅凶户ㄠㄟㄟ井仃月 + work = power * 100; + } + CHAR_setWorkInt( toindex, CHAR_WORKMODATTACK, + CHAR_getWorkInt( toindex, CHAR_WORKMODATTACK ) + work ); + res = work * 0.01; + break; + case PC_KIND_DEFENSE: + if( par ){ + // ⊙煌遥卅凶户}ㄠㄟㄟ反井仃卅中 + work = CHAR_getWorkInt( toindex, CHAR_WORKFIXTOUGH ); + work = work * power; + }else{ + // 公及引引及煌遥卅凶户ㄠㄟㄟ井仃月 + work = power * 100; + } + CHAR_setWorkInt( toindex, CHAR_WORKMODDEFENCE, + CHAR_getWorkInt( toindex, CHAR_WORKMODDEFENCE ) + work ); + res = work * 0.01; + break; + case PC_KIND_QUICK: + if( par ){ + // ⊙煌遥卅凶户}ㄠㄟㄟ反井仃卅中 + work = CHAR_getWorkInt( toindex, CHAR_WORKFIXDEX ); + work = work * power; + }else{ + // 公及引引及煌遥卅凶户ㄠㄟㄟ井仃月 + work = power * 100; + } + CHAR_setWorkInt( toindex, CHAR_WORKMODQUICK, + CHAR_getWorkInt( toindex, CHAR_WORKMODQUICK ) + work ); + res = work * 0.01; + break; + case PC_KIND_CHARM: + if( par ){ + // CHARM 反 100 今木化卅中凶户}100坌及ㄠ允月 + work = CHAR_getWorkInt( toindex, CHAR_WORKFIXCHARM ); + work = work * power * 0.01; + }else{ + // 公及引引及煌遥 + work = power; + } + CHAR_setWorkInt( toindex, CHAR_WORKMODCHARM, + CHAR_getWorkInt( toindex, CHAR_WORKMODCHARM ) + work ); + res = work; + break; + case PC_KIND_CAPTURE: + // CAPTURE 反 % 及心 + work = power; + CHAR_setWorkInt( toindex, CHAR_WORKMODCAPTURE, + CHAR_getWorkInt( toindex, CHAR_WORKMODCAPTURE ) + work ); + res = work; + break; + } + + // 仇仇引匹 凶日 内岳 + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)被(%s)(%+d)", + // CHAR_getUseName( toindex ), + // aszParamChangeFull[kind], + // res + //); + + // 须 煤 + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + + } + + return; +} + +#endif + + +//*********************************************************** +// +// 芊羁匹 醒及箪岭 鳖 +// +void BATTLE_MultiAttReverse( + int battleindex, // 田玄伙奶件犯永弁旦 + int attackNo, // 井仃月谛 寞 + int toNo, // 井仃日木月谛 寞 + int UseEffect, // 银丹谛及巨白尼弁玄 + int RecevEffect // 井仃日木月谛及巨白尼弁玄 +) +// +//*********************************************************** +{ + + int i, toindex, charaindex; + int ToList[SIDE_OFFSET*2+1]; + int flg, OnOff; + char szBuffer[256]=""; + + BATTLE_MultiList( battleindex, toNo, ToList ); + + BATTLE_MagicEffect( + battleindex, // 田玄伙奶件犯永弁旦 + attackNo, // 井仃月谛 寞(ㄟ ㄠㄨ) + ToList, // 井仃日木月谛 寞伉旦玄(ㄟ ㄠㄨ) + UseEffect, // 井仃月谛巨白尼弁玄 + RecevEffect // 井仃日木月谛巨白尼弁玄 + ); + + charaindex = BATTLE_No2Index( battleindex, attackNo ); + + // 升及由仿丢□正卞允月井 + for( i = 0; ToList[i] != -1; i ++ ){ + + // 锹澎及奶件犯永弁旦 + toindex = BATTLE_No2Index( battleindex, ToList[i] ); + + flg = CHAR_getWorkInt( toindex, CHAR_WORKBATTLEFLG ); + flg ^= CHAR_BATTLEFLG_REVERSE; // 鳖 + CHAR_setWorkInt( toindex, CHAR_WORKBATTLEFLG, flg ); + OnOff = ( flg & CHAR_BATTLEFLG_REVERSE )?(1):(0); + + // 仇仇匹允井今内 鳖今六月 + BATTLE_AttReverse( toindex ); + + if( OnOff ){ + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)的属性变成相反。", + // CHAR_getUseName( toindex ) ); + }else{ + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)回复成原本的属性。", + // CHAR_getUseName( toindex ) ); + } + + // 须 煤 + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + + // 仇仇匹箪岭 鳖及 侬 毛霜月 + sprintf( szBuffer, "BR|%X|%X|", ToList[i], OnOff ); + BATTLESTR_ADD( szBuffer ); + } + + return; + +} + +void BATTLE_MultiCaptureUp( + int battleindex, + int attackNo, + int toNo, + int power, + int UseEffect, + int RecevEffect +) +{ + int i, toindex, UpPoint = 0, workhp; + int ToList[SIDE_OFFSET*2+1]; + + //char szBuffer[256]=""; + char szCommand[256]; + + BATTLE_MultiList( battleindex, toNo, ToList ); + + BATTLE_MagicEffect( + battleindex, + attackNo, + ToList, + UseEffect, + RecevEffect + ); + + for( i = 0; ToList[i] != -1; i ++ ){ + toindex = BATTLE_No2Index( battleindex, ToList[i] ); + + if( CHAR_getInt( toindex, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ){ + continue; + } + + if( CHAR_getFlg( toindex, CHAR_ISDIE ) == TRUE ){ + continue; + } + + UpPoint = power; + + UpPoint = RAND( (power*0.9), (power*1.1) ); + + workhp = CHAR_getWorkInt( toindex, CHAR_WORKMODCAPTURE ) + UpPoint; + + CHAR_setWorkInt( toindex, CHAR_WORKMODCAPTURE, workhp ); + + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)的捕获率变成(%d)", + // CHAR_getUseName( toindex ), UpPoint ); + + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + + snprintf( szCommand, sizeof( szCommand ), + "B%%|%X|%X|", ToList[i], BFUKI_CAPTUREUP ); + + BATTLESTR_ADD( szCommand ); + } + return; +} + + + + + +//**************************************************************** +// +// 白奴□伙玉箪岭 凳热诸 +// +int BATTLE_FieldAttChange( + int charaindex, // 井仃月谛及奶件犯永弁旦 + char *pArg +) +// +// 岳 允木壬 TRUE +// 撩 卅日 FALSE +// +//**************************************************************** + +{ + + int attr = -1, i, attackNo, turn = 3; + int battleindex, power = 30; + int FieldAttr[] = { BATTLE_ATTR_NONE, BATTLE_ATTR_EARTH, BATTLE_ATTR_WATER, BATTLE_ATTR_FIRE, BATTLE_ATTR_WIND }; + char szBuffer[256]=""; + char szCommand[256], + // Robin 03/20 debug + //*pszP, *aszAttr[] = { "无", "土", "水", "火", "风" }; + *pszP, *aszAttr[] = { "无", "地", "水", "火", "风" }; + // Robin 03/21 debug + //char szTurn[] = "回"; + char szTurn[] = "turn"; + + + pszP = pArg; + // 箪岭毛潸 + for( ;attr == -1 && pszP[0] != 0; pszP++ ){ + for( i = 0; i < 5; i ++ ){ + // 箪岭疋永正伉井" + if( strncmp( pszP, aszAttr[i], 2 ) == 0 ){ + attr = i; + pszP +=2; + break; + } + } + } + // 箪岭 中及匹撩 + if( attr == -1 ) + { + return FALSE; + } + + // 升木仁日中 凳今六月井" + sscanf( pszP, "%d", &power ); + if( power < 0 || power > 100 )power = 30; + + // 窒正□件 凳今六月井" + if( ( pszP = strstr( pszP, szTurn ) ) != NULL){ + pszP += sizeof( szTurn ); + sscanf( pszP, "%d", &turn ); + } + + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + if( BATTLE_CHECKINDEX( battleindex ) == FALSE )return FALSE; + // 祭今六月箪岭 + BattleArray[battleindex].field_att = FieldAttr[attr]; + // 膜恳允月由伐□ + BattleArray[battleindex].att_pow = power; + // 膜恳允月正□件醒 + BattleArray[battleindex].att_count = turn; + + // 仇仇引匹 凶日 内岳 + if( attr >= 0 ){ + //snprintf( szBuffer, sizeof(szBuffer), + // "(%s)将field的属性改为(%s)", + // CHAR_getUseName( charaindex ), + // aszAttr[attr] + //); + } + + attackNo = BATTLE_Index2No( battleindex, charaindex ); + + // 须 煤 + //BATTLE_BroadCast( battleindex, szBuffer, + // (attackNo >= 10)? CHAR_COLORGRAY : CHAR_COLORPURPLE ) ; + + // 仇仇匹 侬 戊穴件玉毛中木月 + sprintf( szCommand, "BV|%X|%X|",attackNo, attr ); + BATTLESTR_ADD( szCommand ); + + return TRUE; + +} + + + + +//**************************************************************** +// +// 白奴□伙玉箪岭 凳热诸 +// +int MAGIC_FieldAttChange_Battle( + int charaindex, // 井仃月谛及奶件犯永弁旦 + int toNo, // 井仃日木月谛及奶件犯永弁旦( 银迕) + int marray, // magicindex + int mp // MP +) +// 岳 允木壬 TRUE +// 撩 卅日 FALSE +// +//**************************************************************** + +{ + char *pArg; + + // 由仿丢□正毛潸 + pArg = MAGIC_getChar( marray, MAGIC_OPTION ); + // 由仿丢□正 中及匹撩 + if( pArg == NULL )return FALSE; + + return BATTLE_FieldAttChange( charaindex, pArg ); + +} +//**************************************************************** +// +// 旦 □正旦唱橘毛芨尹月热诸 +// +int MAGIC_StatusChange_Battle( + int charaindex, // 井仃月谛及奶件犯永弁旦 + int toNo, // 井仃日木月谛及奶件犯永弁旦 + int marray, // magicindex + int mp // MP +) +// 岳 仄凶日 TRUE +// 撩 仄凶日 FALSE +//**************************************************************** + +{ + char *magicarg; + int status = -1, i, attackNo, turn = 3; + int battleindex, ReceveEffect, Success = 15; + char *pszP; + char szTurn[] = "turn"; + char szSuccess[] = "成"; + + magicarg = MAGIC_getChar( marray, MAGIC_OPTION ); + pszP = magicarg; + for( ;status == -1 && pszP[0] != 0; pszP++ ){ + for( i = 1; i < BATTLE_ST_END; i ++ ){ + if( strncmp( pszP, aszStatus[i], 2 ) == 0 ){ + status = i; + pszP +=2; + break; + } + } + } + if( status == -1 ) return FALSE; + if( ( pszP = strstr( pszP, szTurn ) ) != NULL){ + pszP += sizeof( szTurn ); + sscanf( pszP, "%d", &turn ); + } + if( ( pszP = strstr( pszP, szSuccess ) ) != NULL){ + pszP += sizeof( szSuccess ); + sscanf( pszP, "%d", &Success ); + } + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + attackNo = BATTLE_Index2No( battleindex, charaindex ); + if( status == BATTLE_ST_NONE ){ + ReceveEffect = SPR_tyusya; // 月午五反仇木 + }else{ + ReceveEffect = SPR_hoshi; // 井井月午五反仇木 + } + + BATTLE_MultiStatusChange( battleindex, attackNo, toNo, + status, turn, MAGIC_EFFECT_USER, ReceveEffect, Success ); + + + return TRUE; + +} + +#ifdef _MAGIC_DEEPPOISON +int MAGIC_StatusChange_Battle2( + int charaindex, // 井仃月谛及奶件犯永弁旦 + int toNo, // 井仃日木月谛及奶件犯永弁旦 + int marray, // magicindex + int mp // MP +) +// 岳 仄凶日 TRUE +// 撩 仄凶日 FALSE +//**************************************************************** + +{ + char *magicarg; + int status = -1, i, attackNo, turn = 3; + int battleindex, ReceveEffect, Success = 15; + char *pszP; + char szTurn[] = "turn"; + char szSuccess[] = "成"; + magicarg = MAGIC_getChar( marray, MAGIC_OPTION ); + if( magicarg == NULL ) { + print("\n magicarg == NULL "); + return FALSE; + } + pszP = magicarg; + // 躲绊毛潸 + for( ;status == -1 && pszP[0] != 0; pszP++ ){ + // ㄠ井日腹绸 + for( i = 1; i < BATTLE_ST_END; i ++ ){ + // 躲绊疋永正伉井" + if( strncmp( pszP, aszStatus[i], 2 ) == 0 ){ + status = i; + pszP +=2; + break; + } + } + } + // 躲绊卅中及匹撩 + if( status == -1 ) return FALSE; + + // 窒正□件 凳今六月井" + if( ( pszP = strstr( pszP, szTurn ) ) != NULL){ + pszP += sizeof( szTurn ); + sscanf( pszP, "%d", &turn ); + } + + // 岳 涩烂 + if( ( pszP = strstr( pszP, szSuccess ) ) != NULL){ + pszP += sizeof( szSuccess ); + sscanf( pszP, "%d", &Success ); + } + + + + // 田玄伙 寞 + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + attackNo = BATTLE_Index2No( battleindex, charaindex ); + + if( status == BATTLE_ST_NONE ){ + ReceveEffect = SPR_tyusya; // 月午五反仇木 + }else{ + ReceveEffect = SPR_hoshi; // 井井月午五反仇木 + } + // 蝈够 + BATTLE_MultiStatusChange( battleindex, attackNo, toNo, + status, turn+2, MAGIC_EFFECT_USER, ReceveEffect, Success ); + return TRUE; +} +#endif +#ifdef _OTHER_MAGICSTAUTS +int MAGIC_MagicStatusChange_Battle( int charaindex, int toNo, int marray, int mp ) +{ + char *magicarg; + int status = -1, i, attackNo, turn = 3, nums=0; + int battleindex, ReceveEffect; + char buf1[256]; + + magicarg = MAGIC_getChar( marray, MAGIC_OPTION ); + + if( getStringFromIndexWithDelim( magicarg,"|",1, buf1, sizeof( buf1)) == FALSE ) + return FALSE; + for( i=0; i= 20 ) + return FALSE; + } + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + attackNo = BATTLE_Index2No( battleindex, charaindex ); + //动画图号决定 +#define SPR_mic_def 101411 + ReceveEffect = SPR_heal2; + if( status == 1 ) + ReceveEffect = SPR_mic_def; +#ifdef _MAGICSTAUTS_RESIST + else if( status == 3 ) + ReceveEffect = 101802; + else if( status == 4 ) + ReceveEffect = 101804; + else if( status == 5 ) + ReceveEffect = 101803; +#endif + //else{ + // ReceveEffect = SPR_hoshi; + //} + + BATTLE_MultiMagicStatusChange( + battleindex, attackNo, toNo, status, + turn, MAGIC_EFFECT_USER, ReceveEffect, nums ); + + return TRUE; +} +#endif + + +int MAGIC_MagicDef_Battle( + int charaindex, + int toNo, + int marray, + int mp +) +{ + char *magicarg; + int status = -1, i, attackNo, turn = 3; + int battleindex; + char *pszP; + + char szTurn[] = "turn"; + + magicarg = MAGIC_getChar( marray, MAGIC_OPTION ); + + pszP = magicarg; + + for( ;status == -1 && pszP[0] != 0; pszP++ ){ + for( i = 1; i < BATTLE_MD_END; i ++ ){ + if( strncmp( pszP, aszMagicDef[i], 2 ) == 0 ){ + status = i; + pszP +=2; + break; + } + } + } + + if( status == -1 ) return FALSE; + + if( ( pszP = strstr( pszP, szTurn ) ) != NULL){ + pszP += sizeof( szTurn ); + sscanf( pszP, "%d", &turn ); + } + + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + attackNo = BATTLE_Index2No( battleindex, charaindex ); + + BATTLE_MultiMagicDef( battleindex, attackNo, toNo, + status, turn, MAGIC_EFFECT_USER, SPR_difence ); + + + return TRUE; +} + + + + + + + +#if 1 + +//**************************************************************** +// +// 由仿丢□正 祭毛芨尹月热诸 +// +int MAGIC_ParamChange_Battle( + int charaindex, // 井仃月谛及奶件犯永弁旦 + int toNo, // 井仃日木月谛及奶件犯永弁旦 + int marray, // magicindex + int mp // MP +) +// 岳 仄凶日 TRUE +// 撩 仄凶日 FALSE +//**************************************************************** + +{ + char *magicarg; + int kind = -1, i, attackNo; + int battleindex, pow, par = 0; + + char *pszP; + + // 由仿丢□正毛潸 //魔法名称 + magicarg = MAGIC_getChar( marray, MAGIC_OPTION ); + + pszP = magicarg; + // 躲绊毛潸 //取得更改参数(无,攻,防,早,魅,捕) + for( ;kind == -1 && pszP[0] != 0; pszP++ ){ + for( i = 1; i < BATTLE_MD_END; i ++ ){ + // 躲绊疋永正伉井" + if( strncmp( pszP, aszParamChange[i], 2 ) == 0 ){ + kind = i; + pszP +=2; + break; + } + } + } + // 躲绊卅中及匹撩 + if( kind == -1 ) return FALSE; + + if( strstr( pszP, "%" ) ){ // 仇及桦宁反⊙煌遥 + par = 1; + } + + if( sscanf( pszP, "%d", &pow ) != 1 ){ + // 窒禾奶件玄丐仆月井 + pow = 30; + } + + // 田玄伙 寞 + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + attackNo = BATTLE_Index2No( battleindex, charaindex ); + + // 蝈够 + BATTLE_MultiParamChange( battleindex, attackNo, toNo, + kind, pow, par, MAGIC_EFFECT_USER, SPR_hoshi ); + + + return TRUE; +} + + + +#endif + + + + + + + +//**************************************************************** +// +// 蜊谛及箪岭 鳖毛芨尹月热诸 +// +int MAGIC_AttReverse_Battle( + int charaindex, // 井仃月谛及奶件犯永弁旦 + int toNo, // 井仃日木月谛及奶件犯永弁旦 + int marray, // magicindex + int mp // MP +) +// 岳 仄凶日 TRUE +// 撩 仄凶日 FALSE +//**************************************************************** + +{ + int attackNo; + int battleindex; + + // 由仿丢□正反漆及午仇欠 中 + // 田玄伙 寞 + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + attackNo = BATTLE_Index2No( battleindex, charaindex ); + + // 蝈够 + BATTLE_MultiAttReverse( battleindex, attackNo, toNo, + MAGIC_EFFECT_USER, SPR_kyu ); + + + return TRUE; +} + + + +//**************************************************************** +// +// 旦 □正旦唱橘毛荚汊允月热诸 +// +int MAGIC_StatusRecovery_Battle( + int charaindex, // 井仃月谛及奶件犯永弁旦 + int toNo, // 井仃日木月谛及奶件犯永弁旦 + int marray, // magicindex + int mp // MP +) +// 岳 仄凶日 TRUE +// 撩 仄凶日 FALSE +//**************************************************************** +{ + char *magicarg; + int status = -1, i, attackNo; + int battleindex, ReceveEffect; + char *pszP; + + // 由仿丢□正毛潸 + magicarg = MAGIC_getChar( marray, MAGIC_OPTION ); + + pszP = magicarg; + // 躲绊毛潸 + for( ;status == -1 && pszP[0] != 0; pszP++ ){ + // 蝈莒手丐月及匹ㄟ井日腹绸 + for( i = 0; i < BATTLE_ST_END; i ++ ){ + // 躲绊疋永正伉井" + if( strncmp( pszP, aszStatus[i], 2 ) == 0 ){ + status = i; + pszP +=2; + break; + } + } + } + // 躲绊卅中及匹撩 + if( status == -1 ) return FALSE; + + + // 田玄伙 寞 + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + attackNo = BATTLE_Index2No( battleindex, charaindex ); + + ReceveEffect = SPR_tyusya; // 月午五反仇木 + + // 蝈够 + BATTLE_MultiStatusRecovery( battleindex, attackNo, toNo, + status, MAGIC_EFFECT_USER, ReceveEffect ); + + + return TRUE; + +} + + +//**************************************************************** +// +// 竣濮井日汊唾允月热诸 +// +int MAGIC_Ressurect_Battle( + int charaindex, // 井仃月谛及奶件犯永弁旦 + int toNo, // 井仃日木月谛及奶件犯永弁旦 + int marray, // magicindex + int mp // MP +) +// 岳 仄凶日 TRUE +// 撩 仄凶日 FALSE +//**************************************************************** +{ + char *magicarg; + int attackNo, ReceveEffect; + int battleindex, pow = 0, par = 0; + + char *pszP; + + // 由仿丢□正毛潸 + magicarg = MAGIC_getChar( marray, MAGIC_OPTION ); + + pszP = magicarg; + + if( strstr( pszP, "%" ) ){ // 仇及桦宁反⊙煌遥 + par = 1; + } + if( sscanf( pszP, "%d", &pow ) != 1 ){ + // 窒禾奶件玄荚汊允月井" + pow = 0; // ㄟ及桦宁反敦蝈荚汊 + } + + if( pow <= 0 ){ + ReceveEffect = SPR_fukkatu3; + }else + if( pow <= 100 ){ + ReceveEffect = SPR_fukkatu1; + }else + if( pow <= 300 ){ + ReceveEffect = SPR_fukkatu2; + }else{ + ReceveEffect = SPR_fukkatu3; + } + + // 田玄伙 寞 + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + attackNo = BATTLE_Index2No( battleindex, charaindex ); + + // 蝈够 + BATTLE_MultiRessurect( battleindex, attackNo, toNo, + pow, par, MAGIC_EFFECT_USER, ReceveEffect ); + + return TRUE; +} + + +int MAGIC_ResAndDef_Battle( + int charaindex, + int toNo, + int marray, + int mp +) +{ + char *magicarg; + int attackNo, i; + int battleindex, pow = 0, par = 0, turn = 3, status = -1; + // Robin 03/21 debug + //char szTurn[] = "回"; + char szTurn[] = "turn"; + + char *pszP; + +// Terry add 2004/12/7 + // 复活光..不得使用敌方 + battleindex = CHAR_getWorkInt(charaindex, CHAR_WORKBATTLEINDEX); + if(CHAR_getInt(charaindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER) + { + if(BATTLE_CheckSameSide(charaindex, toNo) == 0) //不同边 + { + battleindex = CHAR_getWorkInt(charaindex, CHAR_WORKBATTLEINDEX); + BATTLE_NoAction(battleindex, BATTLE_Index2No(battleindex, charaindex)); + CHAR_talkToCli(charaindex, -1, "复活光镜守..不得施予非玩家敌方。", CHAR_COLORYELLOW); + return; + } + } +// end + // 由仿丢□正毛潸 + magicarg = MAGIC_getChar( marray, MAGIC_OPTION ); + + pszP = magicarg; + + if( strstr( pszP, "%" ) ){ // 仇及桦宁反⊙煌遥 + par = 1; + } + if( sscanf( pszP, "%d", &pow ) != 1 ){ + // 窒禾奶件玄荚汊允月井" + pow = 0; // ㄟ及桦宁反敦蝈荚汊 + } + + // 馨笛允月 芊 豢躲绊毛潸 + for( ;status == -1 && pszP[0] != 0; pszP++ ){ + for( i = 1; i < BATTLE_MD_END; i ++ ){ + char *p; + // 躲绊疋永正伉井" + p = strstr( pszP, aszMagicDef[i] ); + if( p != NULL ){ + status = i; + pszP = p; + break; + } + } + } + + // 躲绊卅中及匹撩 + if( status == -1 ) return FALSE; + + // 窒荚 凳今六月井" + if( ( pszP = strstr( pszP, szTurn ) ) != NULL){ + pszP += sizeof( szTurn ); + sscanf( pszP, "%d", &turn ); + } + + // 田玄伙 寞 + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + attackNo = BATTLE_Index2No( battleindex, charaindex ); + + // 蝈够 + BATTLE_MultiResAndDef( battleindex, attackNo, toNo, + pow, par, status, turn, MAGIC_EFFECT_USER, SPR_difence ); + + return TRUE; +} + +#ifdef __ATTACK_MAGIC + +int MAGIC_AttMagic_Battle( int charaindex , int toNo , int marray , int mp ) +{ + int attno , attidx , battleindex; + int attr = -1, i , power; + char aszattr[][32] = { "地", "水", "火", "风" }; + char buf1[256]; + char *magicarg; + int magiclv=0; + magicarg = MAGIC_getChar( marray , MAGIC_OPTION ); + if( magicarg == NULL ) { + print("\n Magic magicarg == NULL "); + return FALSE; + } + + for( i=0; i<4; i++) { + if( strstr( magicarg, aszattr[i]) != NULL ) { + attr = i; + break; + } + } + if( i == 4 ) { + print("\n not find aszattr !!"); + return FALSE; + } + memset( buf1, 0, sizeof( buf1)); + if( getStringFromIndexWithDelim( magicarg, "|", 2, buf1, sizeof( buf1)) == FALSE ) return FALSE; + power = atoi( buf1); + + if( getStringFromIndexWithDelim( magicarg, "|", 3, buf1, sizeof( buf1)) == FALSE ) return FALSE; + magiclv = atoi( buf1); + + battleindex = CHAR_getWorkInt( charaindex , CHAR_WORKBATTLEINDEX ); + attno = BATTLE_Index2No( battleindex , charaindex ); + attidx = MAGIC_getInt( marray , MAGIC_IDX ); + if( -1 == attidx || attidx >= ATTMAGIC_magicnum ) + return FALSE; +#ifdef _FIX_MAGICDAMAGE + BATTLE_MultiAttMagic( battleindex , attno , toNo , attidx , attr , power, magiclv); +#else + BATTLE_MultiAttMagic( battleindex , attno , toNo , attidx , attr , power ); +#endif + return TRUE; +} + +#endif + + +#ifdef _MAGIC_TOCALL + +int MAGIC_ToCallDragon_Battle( int charaindex , int toNo , int marray , int mp ) +{ + int attno , attidx , battleindex; + int attr = -1,/* i , */power, imageno; +// char aszattr[][32] = { "地", "水", "火", "风" }; + char buf1[256]; + char *magicarg; + //int magiclv=0; + magicarg = MAGIC_getChar( marray , MAGIC_OPTION ); + print("charaindex=%d, toNo=%d, marray=%d, mp=%d\n", charaindex, toNo, marray, mp); + + if( magicarg == NULL ) { + print("\n Magic magicarg == NULL "); + return FALSE; + } +/* + for( i=0; i<4; i++) { + if( strstr( magicarg, aszattr[i]) != NULL ) { + attr = i; + break; + } + } + if( i == 4 ) { + print("\n not find aszattr !!"); + return FALSE; + } +*/ + memset( buf1, 0, sizeof( buf1)); + if( getStringFromIndexWithDelim( magicarg, "|", 1, buf1, sizeof( buf1)) == FALSE ) return FALSE; + imageno = atoi( buf1); + if( getStringFromIndexWithDelim( magicarg, "|", 2, buf1, sizeof( buf1)) == FALSE ) return FALSE; + power = atoi( buf1); + + battleindex = CHAR_getWorkInt( charaindex , CHAR_WORKBATTLEINDEX ); + attno = BATTLE_Index2No( battleindex , charaindex ); + attidx = MAGIC_getInt( marray , MAGIC_IDX ); + print("attidx=%d....................\n", attidx); + if( -1 == attidx || attidx >= ATTMAGIC_magicnum ) + return FALSE; + print("battleindex=%d, attno=%d, attidx=%d, attr=%d, power=%d\n", battleindex, attno, attidx, attr, power); + + BATTLE_MultiToCallDragonMagic( battleindex , attno , toNo , attidx , attr , power, imageno); + + return TRUE; +} + +#endif + +//**************************************************************** +// +// 凯 祭允月热诸 +// +int MAGIC_CaptureUp_Battle( + int charaindex, // 井仃月谛及奶件犯永弁旦 + int toNo, // 井仃日木月谛及奶件犯永弁旦 + int marray, // magicindex + int mp // MP +) +// 岳 仄凶日 TRUE +// 撩 仄凶日 FALSE +//**************************************************************** +{ + char *magicarg; + int attackNo, ReceveEffect; + int battleindex, pow = 5; + + // 由仿丢□正毛潸 + magicarg = MAGIC_getChar( marray, MAGIC_OPTION ); + + if( sscanf( magicarg, "%d", &pow ) != 1 ){ + // 窒禾奶件玄荚汊允月井" + pow = 5; + } + + ReceveEffect = SPR_hoshi; + + // 田玄伙 寞 + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + attackNo = BATTLE_Index2No( battleindex, charaindex ); + + // 蝈够 + BATTLE_MultiCaptureUp( battleindex, attackNo, toNo, + pow, MAGIC_EFFECT_USER, ReceveEffect ); + + return TRUE; +} +#ifdef _FIX_MAGICDAMAGE +static int BATTLE_getMagicAdjustInt( int attackindex, int defindex, int MagicLv, int flg,int damage ) +{ + int At_Fire, At_Earth, At_Water, At_Wind, At_none; + int Df_Fire, Df_Earth, Df_Water, Df_Wind, Df_none; + float At_FieldPow, Df_FieldPow; + + //取得施法者属性 + BATTLE_GetAttr(attackindex,&At_Fire,&At_Water,&At_Earth,&At_Wind,&At_none); + MagicLv *=10; + switch( flg) { //将属性置换为魔法牵引属性 + case 0: + At_Earth = MagicLv+(MagicLv*(At_Earth/50)); + At_Water=0; At_Fire=0; At_Wind=0; + break; + case 1: + At_Water = MagicLv+(MagicLv*(At_Water/50)); + At_Earth=0; At_Fire=0; At_Wind=0; + break; + case 2: + At_Fire = MagicLv+(MagicLv*(At_Fire/50)); + At_Earth=0; At_Water=0; At_Wind=0; + break; + case 3: + At_Wind = MagicLv+(MagicLv*(At_Wind/50)); + At_Earth=0; At_Water=0; At_Fire=0; + break; + } + //取得该场属性加成 + At_FieldPow = BATTLE_FieldAttAdjust( + CHAR_getWorkInt( attackindex, CHAR_WORKBATTLEINDEX ), + At_Fire, At_Water, + At_Earth, At_Wind ); + + At_Fire *= damage; At_Water *= damage; At_Earth *= damage; + At_Wind *= damage; At_none *= damage; + + //取得防守方属性 + BATTLE_GetAttr( defindex, &Df_Fire, &Df_Water, + &Df_Earth,&Df_Wind, &Df_none ); + //取得该场属性加成 + Df_FieldPow = BATTLE_FieldAttAdjust( + CHAR_getWorkInt( defindex, CHAR_WORKBATTLEINDEX ), + Df_Fire, Df_Water, Df_Earth, Df_Wind ); + //四属相克 + damage = BATTLE_AttrCalc( + At_Fire, At_Water, At_Earth, At_Wind, At_none, + Df_Fire, Df_Water, Df_Earth, Df_Wind, Df_none ); + damage *= (At_FieldPow / Df_FieldPow); + return damage; +} + +void Magic_ComputeAttExp( int charindex, int Mnum, int MagicLv, int Expoint) +{ + int magiclv1, magicex1; + int addEx = (MagicLv * 3) * Expoint; + char MagicStr[][128]={"地","水","火","风"}; + char buf1[256]; + memset( buf1, 0, sizeof( buf1)); + magiclv1 = CHAR_getInt( charindex, CHAR_EARTH_EXP+Mnum); + magicex1 = CHAR_getInt( charindex, CHAR_EARTH_ATTMAGIC_EXP+Mnum); + magicex1 += addEx; + if( magicex1 > 100 ) { + magicex1 = 0; + if( magiclv1 < 100 ) { + magiclv1 += 1; + sprintf( buf1,"%s魔法熟练度提升为%d。", MagicStr[Mnum], magiclv1); + CHAR_talkToCli( charindex, -1, buf1, CHAR_COLORYELLOW); + } + } + if( magicex1 < 0 ) magicex1 = 0; + if( magiclv1 < 0 ) magiclv1 = 0; + if( magiclv1 > 100 ) magiclv1 = 100; + CHAR_setInt( charindex, CHAR_EARTH_EXP+Mnum, magiclv1); + CHAR_setInt( charindex, CHAR_EARTH_ATTMAGIC_EXP+Mnum, magicex1); + + Mnum = (Mnum+1)%4; //相克的魔法 + magiclv1 = CHAR_getInt( charindex, CHAR_EARTH_EXP+Mnum); + magicex1 = CHAR_getInt( charindex, CHAR_EARTH_ATTMAGIC_EXP+Mnum); + if( magiclv1 > 1 ) { + magicex1 -= addEx*0.5; + if( magicex1 < 0 ) { + magicex1 = 0; + magiclv1 -= 1; + if( magiclv1 < 0 ) magiclv1 = 0; + CHAR_setInt( charindex, CHAR_EARTH_EXP+Mnum, magiclv1); + sprintf( buf1,"%s魔法熟练度下降为%d。", MagicStr[Mnum], magiclv1); + CHAR_talkToCli( charindex, -1, buf1, CHAR_COLORYELLOW); + } + CHAR_setInt( charindex, CHAR_EARTH_ATTMAGIC_EXP+Mnum, magicex1); + } + return; +} + +void Magic_ComputeDefExp( int charindex, int Mnum, int MagicLv, int Damage) +{ + int magiclv1; + int magicex1; + int addEx; + char buf1[256]; + char MagicStr[][128]={"地","水","火","风"}; + if( Damage < 200 ) return; + memset( buf1, 0, sizeof( buf1)); + magiclv1 = CHAR_getInt( charindex, CHAR_EARTH_RESIST+Mnum); + magicex1 = CHAR_getInt( charindex, CHAR_EARTH_DEFMAGIC_EXP+Mnum); + addEx = (Damage/20)*(MagicLv*2); + magicex1+=addEx; + if( magiclv1 < 0 ) magiclv1 = 0; + if( magicex1 > 100 ) { + magicex1 = 0; + if( magiclv1 < 100 ) { + magiclv1 +=1; + if( magiclv1 < 0 ) magiclv1 = 0; + if( magiclv1 > 100 ) magiclv1 = 100; + CHAR_setInt( charindex, CHAR_EARTH_RESIST+Mnum, magiclv1); + sprintf( buf1,"%s抗魔值提升为%d。", MagicStr[Mnum], magiclv1); + CHAR_talkToCli( charindex, -1, buf1, CHAR_COLORYELLOW); + } + } + if( magicex1 < 0 ) magicex1 = 0; + CHAR_setInt( charindex, CHAR_EARTH_DEFMAGIC_EXP+Mnum, magicex1); + Mnum = (Mnum+1)%4; //相克的魔法 + magiclv1 = CHAR_getInt( charindex, CHAR_EARTH_RESIST+Mnum); + magicex1 = CHAR_getInt( charindex, CHAR_EARTH_DEFMAGIC_EXP+Mnum); + if( magiclv1 > 1 ) { + magicex1 -=2; + if( magicex1 < 0 ) { + magicex1 = 90; + magiclv1 -=1; + if( magiclv1 < 0 ) + magiclv1 = 0; + sprintf( buf1,"%s抗魔值下降为%d。", MagicStr[Mnum], magiclv1); + CHAR_talkToCli( charindex, -1, buf1, CHAR_COLORYELLOW); + CHAR_setInt( charindex, CHAR_EARTH_RESIST+Mnum, magiclv1); + } + CHAR_setInt( charindex, CHAR_EARTH_DEFMAGIC_EXP+Mnum, magicex1); + } + return; +} + +#endif + +#ifdef _MAGIC_WEAKEN +int MAGIC_ParamChange_Turn_Battle( + int charaindex, + int toNo, + int marray, + int mp +) +{ + char *magicarg; + int status = -1, i, attackNo, turn = 3; + int battleindex, Success = 15; + char *pszP; + char szTurn[] = "turn"; + char szSuccess[] = "成"; + magicarg = MAGIC_getChar( marray, MAGIC_OPTION ); + if( magicarg == NULL ) { + print("\n magicarg == NULL "); + return FALSE; + } + pszP = magicarg; + // 躲绊毛潸 + for( ;status == -1 && pszP[0] != 0; pszP++ ){ + // ㄠ井日腹绸 + for( i = 1; i < BATTLE_ST_END; i ++ ){ + // 躲绊疋永正伉井" + if( strncmp( pszP, aszStatus[i], 2 ) == 0 ){ + status = i; + pszP +=2; + break; + } + } + } + + if( status == -1 ) return FALSE; + + if( ( pszP = strstr( pszP, szTurn ) ) != NULL){ + pszP += sizeof( szTurn ); + sscanf( pszP, "%d", &turn ); + } + + if( ( pszP = strstr( pszP, szSuccess ) ) != NULL){ + pszP += sizeof( szSuccess ); + sscanf( pszP, "%d", &Success ); + } + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + attackNo = BATTLE_Index2No( battleindex, charaindex ); + BATTLE_MultiParamChangeTurn( battleindex, attackNo, toNo, status, MAGIC_EFFECT_USER, SPR_hoshi, turn, Success ); + return TRUE; +} + +void BATTLE_MultiParamChangeTurn( + int battleindex, + int attackNo, + int toNo, + int status, + int UseEffect, + int RecevEffect, + int turn, + int Success +) +{ + + int i, toindex,perStatus,charaindex; + int ToList[SIDE_OFFSET*2+1]; + charaindex = BATTLE_No2Index( battleindex, attackNo ); //攻方index + BATTLE_MultiList( battleindex, toNo, ToList ); + + //施魔法动画效果 + BATTLE_MagicEffect(battleindex, attackNo, ToList, UseEffect, RecevEffect); + + for( i = 0; ToList[i] != -1; i ++ ) + { + toindex = BATTLE_No2Index( battleindex, ToList[i] ); + + if( BATTLE_StatusAttackCheck( charaindex, + toindex, status, Success, 30, 1.0, &perStatus ) == TRUE ) + { + CHAR_setWorkInt( toindex, CHAR_WORKWEAKEN, turn+1 ); + } + } + return; + +} +#endif + + +/* +typedef struct tagToCallMagic +{ + unsigned int uiSpriteNum; // 此咒术在Spr_x.bin的编号 + unsigned int uiAttackType; // 攻击的方式:单人,整排( 轮流 ) , 整排( 轮流 ) , 整排( 同时 ) , 全体( 轮流 ) , 全体( 同时 ) + unsigned int uiSliceTime; // 轮流攻击时的时间差 + unsigned int uiShowType; // 显示的位置方式:中央、指定 + int siSx; // 显示的位置 - X轴 + int siSy; // 显示的位置 - Y轴 + unsigned int uiShowBehindChar; // 显示在人物的前方或下方 + unsigned int uiShakeScreen; // 是否震动画面 + unsigned int uiShakeFrom; // 震动画面的起始时间( 毫秒 ) + unsigned int uiShakeTo; // 震动画面的结束时间( 毫秒 _ + unsigned int uiPrevMagicNum; // 前置咒术的索引号( 0XFFFFFFFFFF 表示无前置咒术 ) + int siPrevMagicSx; // 前置咒术的显示位置 - X轴 + int siPrevMagicSy; // 前置咒术的显示位置 - Y轴 + int siPrevMagicOnChar; // 前置咒术显示在人物的前方或下方 + unsigned int uiPostMagicNum; // 後置咒术的索引号( 0XFFFFFFFF 表示无後置咒术 ) + int siPostMagicSx; // 後置咒术的显示位置 - X轴 + int siPostMagicSy; // 後置咒术的显示位置 - Y轴 + int siPostMagicOnChar; // 後置咒术显示在人物的前方或下方 + int isPostDisappear; // 咒术一般攻击完时是否马上消失 + int ToCallMagicNo; // 召唤术的编号 +}ToCallMagic; +*/ + +ToCallMagic PROFESSION_magic[3] = { {0,0,0,1,0,0,1,1,0,0,0,65528,65485,0,-1,0,0,0,1,0}, // 单人 + {0,3,0,1,0,0,1,1,0,0,0,65528,65485,0,-1,0,0,0,1,1}, // 单排 + {0,5,0,1,0,0,1,1,0,0,0,65528,65485,0,-1,0,0,0,0,2}, // 全体 + }; + + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 +void PROFESSION_MAGIC_ATTAIC( int battleindex, int attackNo, int toNo, int attIdx ,int FieldAttr, int skill) +{ + int list[SIDE_OFFSET * 2 + 1]; + int listidx,i,j,k,z; + int basey, def_is_player[10],def_be_hit[10]; + int attvalue , charahp , pethp , charaidx , petidx , charahurt,charahurt_temp; + char szcommand[256]; + int DefIsPlayer=0, power=0, skill_level; + float hp_power=0, mp_power=0, add_hp=0, add_mp=0, dec_hp=0, dec_mp=0; + int icindex, ioindex; + int charaindex, command, magic_type=0; +#ifdef _PROFESSION_ADDSKILL + int decmplist[]={-1,-1,-1,-1,-1,-1,-1,-1,-1,-1}, decmplistcount=0; +#endif + charaindex = BATTLE_No2Index(battleindex, attackNo); + if( !CHAR_CHECKINDEX(charaindex) ) return; + + if((z = BATTLE_MultiList(battleindex,toNo,list)) == -1) return; + else if(z != toNo){ + toNo = z; +// terry fix for 不设定为新的目标会有问题 2004/02/10 + CHAR_setWorkInt(charaindex,CHAR_WORKBATTLECOM2,toNo); +// end + } + + // 技能 + command = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1); + + // 技能等级 + skill_level = CHAR_GETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3); + skill_level = PROFESSION_CHANGE_SKILL_LEVEL_M( skill_level ); + + // 将魔法参数代入动画 + magic_type = analysis_profession_parameter( attIdx, skill, toNo, charaindex ); + PROFESSION_MAGIC_ATTAIC_Effect( battleindex, attackNo, list, attIdx); + + listidx = 0; + memset(def_is_player,-1,sizeof(def_is_player)); + memset(def_be_hit,-1,sizeof(def_be_hit)); + + // 单人攻击 + if( toNo < 20 ){ + toNo = list[0]; + listidx++; + + } else if( 20 == toNo ){ // 右下全体 + for( i = 0 ; i < 2 ; i++ ){ + for( j = 0 ; j < 5 ; j++ ){ + if(TRUE == BATTLE_TargetCheck( battleindex , CharTable[i + 2][j] ) ){ + list[listidx] = CharTable[i + 2][j]; + listidx++; + } + } + } + } else if( 21 == toNo ){ // 左上全体 + for( i = 0 ; i < 2 ; i++ ){ + for( j = 0 ; j < 5 ; j++ ){ + if(TRUE == BATTLE_TargetCheck( battleindex , CharTable[i][j] ) ){ + list[listidx] = CharTable[i][j]; + listidx++; + } + } + } + } // 左上第一列 , 左上第二列 , 右下第一列 , 右下第二列 + else if( 23 == toNo || 24 == toNo || 25 == toNo || 26 == toNo ){ + basey = toNo - 23; + for( i = 0 , j = basey - 1 ; j <= basey + 1 ; i++ , j++ ){ + if( ( 25 == toNo || 26 == toNo ) && ( j < 2 || j > 3 ) ) + continue; + else if( ( 23 == toNo || 24 == toNo ) && ( j < 0 || j > 1 ) ) + continue; + // 计算那些人需要加入清单 + for( k = 0 ; k < 5 ; k++ ){ + if(TRUE == BATTLE_TargetCheck( battleindex , CharTable[j][k] ) ) + { + list[listidx] = CharTable[j][k]; + listidx++; + } + } + } + } + qsort( list , listidx , sizeof( list[0] ) , ( FUNC )SortLoc );// 排序位置 + + // 取熟练度 + PROFESSION_MAGIC_GET_PRACTICE( &hp_power, &mp_power, &dec_hp, &dec_mp, charaindex ); + + + power = hp_power; + + // 取出攻击 list + PROFESSION_MAGIC_TOLIST_SORT( list, &listidx, charaindex ); + + for( i = 0 ; i < listidx ; i++ ) { + int defType; + charaidx = BATTLE_No2Index( battleindex , list[i] ); + petidx = BATTLE_getRidePet( charaidx ); + defType = CHAR_getInt(charaidx, CHAR_WHICHTYPE); + DefIsPlayer = 0; + + if( !CHAR_CHECKINDEX(charaidx) ) continue; + + // 制作魔法特效 + if (CHAR_createCharacter( 100354, 777, 45, 45, 0, &icindex, &ioindex, 0) == TRUE){ + + CHAR_setInt( icindex, CHAR_LUCK, 1); + CHAR_setWorkInt( icindex, CHAR_WORKATTACKPOWER, power ); + CHAR_setWorkInt( icindex, CHAR_WORKOTHERDMAGE, 0 ); + + + // 魔法命中检定 + if( PROFESSION_MAGIC_DODGE( charaindex, charaidx, magic_type ) == 1 ){ + // MISS + attvalue = 0; + }else{ + // 取特殊魔法伤害值 + power = PROFESSION_MAGIC_GET_ICE_MIRROR_DAMAGE( charaindex, charaidx, command, power ); +#ifdef _SUIT_ADDPART4 + if( CHAR_getWorkInt( charaidx, CHAR_WORKUNMPOWER ) > 0 ){//抵抗法师魔法的装备 + power -= power * (CHAR_getWorkInt( charaidx, CHAR_WORKUNMPOWER )/100.00); + print("\nWORKUNMPOWER:%d", CHAR_getWorkInt( charaidx, CHAR_WORKUNMPOWER )); + } +#endif + // 取魔法伤害值 +#ifdef _PROFESSION_ADDSKILL + attvalue = PROFESSION_MAGIC_GET_DAMAGE( charaindex, charaidx, magic_type, power, command ); +#else + attvalue = PROFESSION_MAGIC_GET_DAMAGE( charaindex, charaidx, magic_type, power ); +#endif + // 改变自身状态魔法 + PROFESSION_MAGIC_CHANGE_STATUS( charaindex, attvalue, mp_power, &add_hp, &add_mp ); + + // 特殊攻击 + attvalue = PROFESSION_MAGIC_CHANG_STATUS( command, battleindex, charaindex, charaidx, attvalue, i ); + def_be_hit[i] = charaidx; + +#ifdef _PROFESSION_ADDSKILL + if( command == BATTLE_COM_S_STORM ){// 暴风雨 水附体 + if( (PROFESSION_BATTLE_StatusAttackCheck( charaindex, charaidx, BATTLE_ST_WATER, 30 ) == 0 )// 状态命中检定 + || (CHAR_getInt( charaidx, CHAR_HP ) <= 0 ) ){ + + }else{ + int bid = BATTLE_Index2No( battleindex, charaidx ); + int watercount=0; + if( skill_level > 8 ) watercount=5; + else if( skill_level > 6 ) watercount=4; + else if( skill_level > 4 ) watercount=3; + else if( skill_level > 3 ) watercount=2; + else watercount=1; + CHAR_setWorkInt( charaidx, CHAR_WORKWATER, watercount ); + BATTLE_BadStatusString( bid, BATTLE_ST_WATER ); + } + } + + //记录被攻击方的idx + decmplist[decmplistcount++] = list[i]; +#endif + } + + // 清除魔法特效 + CHAR_CharaDelete(icindex); + + + charahp = CHAR_getInt( charaidx, CHAR_HP ); + + // 没骑宠物 + if( -1 == petidx || CHAR_getInt(petidx, CHAR_HP) <= 0 ){ + if( ( charahp -= attvalue ) < 0 ){ + charahp = 0; + } + CHAR_setInt( charaidx , CHAR_HP , charahp ); + pethp = 0; + if( 0 == PROFESSION_magic[attIdx].uiAttackType ) {// 单人攻击 + sprintf( szcommand , "%X|%X|%X|%X|" , toNo , list[i] , attvalue , pethp); + } else + sprintf( szcommand , "%X|%X|%X|%X|" , list[i] , list[i] , attvalue , pethp); + + }else{ + pethp = CHAR_getInt( petidx , CHAR_HP ); + charahurt = attvalue * BATTLE_CalcCharaRatio( FieldAttr , charaidx ) / 10; + + //以下的计算,若人物被打死,血不够扣的话,会将多出来的伤害再累加至宠物身上 + charahurt_temp = charahurt; + if( ( charahp -= charahurt ) < 0 ) + { + charahurt = charahp; + charahp = 0; + } + + attvalue = attvalue - charahurt; + if( ( pethp -= attvalue ) < 0) + { + pethp = 0; + // 宠物没血了退出战场 + CHAR_setInt(charaidx,CHAR_RIDEPET,-1); + BATTLE_changeRideImage(charaidx); + CHAR_setWorkInt(charaidx,CHAR_WORKPETFALL,1); + } + CHAR_setInt( charaidx , CHAR_HP , charahp ); + CHAR_setInt( petidx , CHAR_HP , pethp ); + + charahurt = charahurt_temp; + + if( 0 == PROFESSION_magic[attIdx].uiAttackType ) {// 单人攻击 + sprintf( szcommand , "%X|%X|%X|%X|" , toNo , list[i] , charahurt , attvalue); + } else + sprintf( szcommand , "%X|%X|%X|%X|" , list[i] , list[i] , charahurt , attvalue); + } + + + { + //Change fix 加上这个先拿到DP值 + int aAttackList[BATTLE_ENTRY_MAX*2+1]; + aAttackList[0] = attackNo; + aAttackList[1] = -1; + BATTLE_AddProfit( battleindex, aAttackList); + } + //change fix 让替身娃娃可正常运作 (这样做所有法术类职技战斗後都拿不到DP值,不过上面先拿到,所以没关系) + if( CHAR_getInt( charaidx, CHAR_HP ) <= 0 + && CHAR_getInt( charaidx, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER + /*&& !BattleArray[battleindex].dpbattle*/ ) + CHAR_setFlg( charaidx, CHAR_ISDIE, 1 ); + + BATTLESTR_ADD( szcommand ); + } + } + + sprintf( szcommand , "%X|" , 0x5711438 ); + BATTLESTR_ADD( szcommand ); + +#ifdef _PROFESSION_ADDSKILL + //扣敌方mp + if( (int)mp_power != 0 ){ + for( i=0;i 0 ){ + int mp = CHAR_getInt( BATTLE_No2Index( battleindex , decmplist[i] ), CHAR_MP); + if( mp > 0 ){ + mp = mp_power>mp?mp:mp_power; + sprintf( szcommand, "BD|r%X|1|0|m%X|", decmplist[i], mp ); + BATTLESTR_ADD( szcommand ); + CHAR_setInt(BATTLE_No2Index( battleindex , decmplist[i] ), CHAR_MP, CHAR_getInt( BATTLE_No2Index( battleindex , decmplist[i] ), CHAR_MP) - mp); + } + } + } + } + } + if( command == BATTLE_COM_S_DOOM ){ //世界末日 灭敏效果 + if( skill_level >= 10 ){ + int work=0; + for( i=0;i 0 ){ + CHAR_setWorkInt( BATTLE_No2Index( battleindex , decmplist[i] ), CHAR_WORKFEAR, 4 ); + BATTLE_BadStatusString( decmplist[i], BATTLE_ST_FEAR ); + sprintf( szcommand, "BD|r%X|0|6|%X|", decmplist[i], -20 );//敏降30% + BATTLESTR_ADD( szcommand ); + // 减攻 + sprintf( szcommand, "BD|r%X|0|4|%X|", decmplist[i], -10 ); + BATTLESTR_ADD( szcommand ); + // 减防 + sprintf( szcommand, "BD|r%X|0|5|%X|", decmplist[i], -10 ); + BATTLESTR_ADD( szcommand ); + } + } + } + } +#endif + if( (int)add_hp != 0 ){ + int hp=0; + + hp = CHAR_getInt( charaindex, CHAR_HP) + add_hp; + + if( hp >= CHAR_getWorkInt(charaindex, CHAR_WORKMAXHP) ){ + hp = CHAR_getWorkInt(charaindex, CHAR_WORKMAXHP); + add_hp = hp - CHAR_getInt( charaindex, CHAR_HP); + }else if ( hp <= 1 ){ + hp = 1; + add_hp = 1 - CHAR_getInt( charaindex, CHAR_HP); + } + CHAR_setInt(charaindex, CHAR_HP, hp); + + sprintf( szcommand, "BD|r%X|0|1|%X|", attackNo, (int)add_hp); + BATTLESTR_ADD( szcommand ); + } + + + if( (int)add_mp != 0 ){ + int mp=0; + + mp = CHAR_getInt( charaindex, CHAR_MP) + add_mp; + + if( mp >= CHAR_getWorkInt(charaindex, CHAR_WORKMAXMP) ){ + mp = CHAR_getWorkInt(charaindex, CHAR_WORKMAXMP); + add_mp = mp - CHAR_getInt( charaindex, CHAR_MP); + }else if ( mp <= 1 ){ + mp = 1; + add_mp = 1 - CHAR_getInt( charaindex, CHAR_MP); + } + + CHAR_setInt(charaindex, CHAR_MP, mp); + + sprintf( szcommand, "BD|r%X|1|1|m%X|", attackNo, (int)add_mp); + + BATTLESTR_ADD( szcommand ); + } +// Terry fix 2003/11/17 修正睡眠者中了攻击性法术不会醒 + for(i=0; i 0) { + CHAR_setWorkInt(def_be_hit[i],CHAR_WORKSLEEP,0); + sprintf(szcommand,"BM|%X|%X|",BATTLE_Index2No(battleindex,def_be_hit[i]),0); + BATTLESTR_ADD(szcommand); + } + } +// Terry end +} + + +int PROFESSION_MAGIC_ATTAIC_Effect( int battleindex, int attackNo , int ToList[] , int AttackMgcNo ) +{ + int i; + char szcommand[256]; + int attackindex; + + + attackindex = BATTLE_No2Index( battleindex , attackNo ); + if( FALSE == CHAR_CHECKINDEX( attackindex ) ) + return 0; +#ifdef _PROFESSION_ADDSKILL + //if( CHAR_getWorkInt( attackindex, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_ICE_CRACK ) //冰爆术不先秀特效 + // return 0; +#endif + snprintf( szcommand , sizeof( szcommand ) , "B$|a%X|i%X|m%X|%X|%X|%X|s%X|t%X|l%X|%X|%X|%X|%X|%X|%X|o%X|o%X|o%X|s%X|%X|%X|%X|%X|" , + attackNo , 5711438 , CHAR_getInt( attackindex , CHAR_MP ) , + PROFESSION_magic[AttackMgcNo].uiPrevMagicNum , + PROFESSION_magic[AttackMgcNo].uiSpriteNum , + PROFESSION_magic[AttackMgcNo].uiPostMagicNum , + PROFESSION_magic[AttackMgcNo].uiAttackType , + PROFESSION_magic[AttackMgcNo].uiSliceTime , + PROFESSION_magic[AttackMgcNo].uiShowType , + PROFESSION_magic[AttackMgcNo].siSx , + PROFESSION_magic[AttackMgcNo].siSy , + PROFESSION_magic[AttackMgcNo].siPrevMagicSx , + PROFESSION_magic[AttackMgcNo].siPrevMagicSy , + PROFESSION_magic[AttackMgcNo].siPostMagicSx , + PROFESSION_magic[AttackMgcNo].siPostMagicSy , + PROFESSION_magic[AttackMgcNo].siPrevMagicOnChar , + PROFESSION_magic[AttackMgcNo].uiShowBehindChar , + PROFESSION_magic[AttackMgcNo].siPostMagicOnChar , + PROFESSION_magic[AttackMgcNo].uiShakeScreen , + PROFESSION_magic[AttackMgcNo].uiShakeFrom , + PROFESSION_magic[AttackMgcNo].uiShakeTo , + PROFESSION_magic[AttackMgcNo].isPostDisappear , + PROFESSION_magic[AttackMgcNo].ToCallMagicNo + ); + + BATTLESTR_ADD( szcommand ); + + for( i = 0 ; ToList[i] != -1 ; i++ ){ + snprintf( szcommand , sizeof( szcommand ) , "r%X|" , ToList[i] ); + BATTLESTR_ADD( szcommand ); + } + + BATTLESTR_ADD( "FF|" ); + + return 0; +} + +int analysis_profession_parameter( int attIdx, int skill, int toNo, int charaindex ) +{ + int image_1, image_2, place, place2, shake_s_time; + int shake_e_time, disappear, x, y, i; + char temp[64]; + char *pszOption; + // Robin fix profession magic_type + //char magic[3][5]={"火","电","冰"}; + char magic[3][5]={"火","冰","电"}; + int magic_type=-1; + + + // 取得技能参数 + if( (pszOption=PROFESSION_SKILL_getChar(skill,PROFESSION_SKILL_OPTION)) == NULL ) return -1; + + // 魔法属性 + memset( temp, 0, sizeof(temp) ); + if( !getStringFromIndexWithDelim(pszOption,"|",1,temp,sizeof(temp)) ) return -1; + + for( i=0; i<3; i++){ + if( (strcmp( magic[i], temp )) == 0 ) + magic_type = i+1; + } + + switch( magic_type ){ + case 1: + // 加火熟练度经验值 + PROFESSION_SKILL_LVEVEL_UP( charaindex, "PROFESSION_FIRE_PRACTICE" ); + break; + case 2: + // 加冰熟练度经验值 + PROFESSION_SKILL_LVEVEL_UP( charaindex, "PROFESSION_ICE_PRACTICE" ); + break; + case 3: + // 加雷熟练度经验值 + PROFESSION_SKILL_LVEVEL_UP( charaindex, "PROFESSION_THUNDER_PRACTICE" ); + break; + + } + + // 显示的位置方式 0人物 1画面中央 + memset( temp, 0, sizeof(temp) ); + if( !getStringFromIndexWithDelim(pszOption,"|",2,temp,sizeof(temp)) ) return -1; + place = atoi(temp); + PROFESSION_magic[attIdx].uiShowType = place; + + // 显示在人物的前方或下方 + memset( temp, 0, sizeof(temp) ); + if( !getStringFromIndexWithDelim(pszOption,"|",3,temp,sizeof(temp)) ) return -1; + place2 = atoi(temp); + PROFESSION_magic[attIdx].uiShowBehindChar = place2; + + // 显示的位置X + memset( temp, 0, sizeof(temp) ); + if( !getStringFromIndexWithDelim(pszOption,"|",4,temp,sizeof(temp)) ) return -1; + x = atoi(temp); + + // 显示的位置Y + memset( temp, 0, sizeof(temp) ); + if( !getStringFromIndexWithDelim(pszOption,"|",5,temp,sizeof(temp)) ) return -1; + y = atoi(temp); + + // 震动画面的开始毫秒数 + memset( temp, 0, sizeof(temp) ); + if( !getStringFromIndexWithDelim(pszOption,"|",6,temp,sizeof(temp)) ) return -1; + shake_s_time = atoi(temp); + + // 震动画面的结束毫秒数 + memset( temp, 0, sizeof(temp) ); + if( !getStringFromIndexWithDelim(pszOption,"|",7,temp,sizeof(temp)) ) return -1; + shake_e_time = atoi(temp); + + // 咒术一般攻击完时是否马上消失 + memset( temp, 0, sizeof(temp) ); + if( !getStringFromIndexWithDelim(pszOption,"|",8,temp,sizeof(temp)) ) return -1; + disappear = atoi(temp); + + // 准备动作的魔法图号 + image_1 = PROFESSION_SKILL_getInt( skill, PROFESSION_SKILL_IMG_1); + PROFESSION_magic[attIdx].uiPrevMagicNum = image_1; // 前置动画 + + // 战斗的魔法图号 + image_2 = PROFESSION_SKILL_getInt( skill, PROFESSION_SKILL_IMG_2); + PROFESSION_magic[attIdx].uiSpriteNum = image_2; // 後置动画 + + // 显示在画面的 x,y座标 + PROFESSION_magic[attIdx].siSx = x; + PROFESSION_magic[attIdx].siSy = y; + + // 取得攻击右边的魔法图号及座标 + PROFESSION_MAGIC_GET_IMG2( toNo, charaindex, attIdx, pszOption ); + + // 地震的时间 + if( (shake_s_time>0) || (shake_e_time>0) ){ + PROFESSION_magic[attIdx].uiShakeScreen = 1; + PROFESSION_magic[attIdx].uiShakeFrom = shake_s_time; + PROFESSION_magic[attIdx].uiShakeTo = shake_e_time; + }else{ + PROFESSION_magic[attIdx].uiShakeScreen = 0; + PROFESSION_magic[attIdx].uiShakeFrom = 0; + PROFESSION_magic[attIdx].uiShakeTo = 0; + } + + + return magic_type; +} + + +// 取熟练度得伤害力 +void PROFESSION_MAGIC_GET_PRACTICE( + float *hp_power, + float *mp_power, + float *dec_hp, + float *dec_mp, + int charaindex +) +{ + int skill_level=0, critical=0, command=0; + + skill_level = CHAR_GETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3); + skill_level = PROFESSION_CHANGE_SKILL_LEVEL_M( skill_level ); + + command = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1); + + critical = RAND( 1,100); + + switch( command ){ + case BATTLE_COM_S_VOLCANO_SPRINGS: // 火山泉 + { + *hp_power = skill_level * 10 + 100; + + if( skill_level >= 10 ){ + if( critical <= 25 ) + *hp_power *= 1.5; + }else{ + if( critical <= (skill_level+12) ) + *hp_power *= 1.5; + } + + break; + } + case BATTLE_COM_S_FIRE_BALL: // 火星球 + { + if( skill_level >= 10 ) + *hp_power = 360; + else if( skill_level >= 9 ) + *hp_power = 320; + else if( skill_level >= 8 ) + *hp_power = 280; + else if( skill_level >= 7) + *hp_power = 260; + else if( skill_level >= 5) + *hp_power = 220; + else if( skill_level >= 3) + *hp_power = 180; + else + *hp_power = 160; + + break; + } + case BATTLE_COM_S_SUMMON_THUNDER: // 召雷术 + { + *hp_power = skill_level*10 + 200; + break; + } + case BATTLE_COM_S_CURRENT: // 电流术 + { +#ifdef _PROFESSION_ADDSKILL + if( skill_level >= 10 ) + *hp_power = 300; + else if( skill_level > 9 ) + *hp_power = 250; + else if( skill_level > 7 ) + *hp_power = 200; + else if( skill_level > 4 ) + *hp_power = 150; + else if( skill_level > 1 ) + *hp_power = 10; + else + *hp_power = 50; +#else + *hp_power = skill_level*50 + 100; +#endif + break; + } + case BATTLE_COM_S_STORM: // 暴风雨 + { +#ifdef _PROFESSION_ADDSKILL + if( skill_level > 9 ) + *hp_power = 200; + else if( skill_level > 7 ) + *hp_power = 180; + else if( skill_level > 5 ) + *hp_power = 160; + else if( skill_level > 3 ) + *hp_power = 140; + else + *hp_power = 120; +#else + *hp_power = skill_level*10 + 100; +#endif + break; + } + case BATTLE_COM_S_ICE_ARROW: // 冰箭术 + { + if( skill_level >= 10 ) + *hp_power = 250; + else + *hp_power = skill_level*10 + 130; + break; + } + case BATTLE_COM_S_ICE_CRACK: // 冰爆术 + { + if( skill_level >= 10 ) + *hp_power = 400; + else if ( skill_level == 9 ) + *hp_power = 300; + else + *hp_power = skill_level*10 + 210; + + break; + } + case BATTLE_COM_S_DOOM: // 世界末日 + { + if( skill_level >= 10 ) + *hp_power = 550; + else if( skill_level > 9 ) + *hp_power = 500; + else if( skill_level > 8 ) + *hp_power = 450; + else if( skill_level > 7 ) + *hp_power = 400; + else if( skill_level > 6 ) + *hp_power = 350; + else if( skill_level > 4 ) + *hp_power = 300; + else if( skill_level > 2 ) + *hp_power = 250; + else + *hp_power = 200; + break; + } + case BATTLE_COM_S_FIRE_SPEAR: // 火龙枪 + { + if( skill_level > 9 ) + *hp_power = 800; + else if( skill_level > 8 ) + *hp_power = 450; + else if( skill_level > 7 ) + *hp_power = 400; + else if( skill_level > 6 ) + *hp_power = 350; + else if( skill_level > 5 ) + *hp_power = 300; + else if( skill_level > 3 ) + *hp_power = 200; + else + *hp_power = 100; + break; + } + + case BATTLE_COM_S_BLOOD: // 嗜血成性 + { + int hp = CHAR_getInt( charaindex, CHAR_HP); + if( hp > 1 ) + *hp_power = CHAR_getInt( charaindex, CHAR_HP) * (skill_level*5 +10) /100; + else + *hp_power = 0; + + break; + } + case BATTLE_COM_S_BLOOD_WORMS: // 嗜血蛊 + { + *hp_power = skill_level*10+20; + break; + } + case BATTLE_COM_S_SIGN: // 一针见血 + { +#ifdef _PROFESSION_ADDSKILL + if( skill_level >= 10 ){ + *hp_power = 200; + *mp_power = 30; + }else if( skill_level > 6 ){ + *hp_power = 150; + *mp_power = 20; + }else if( skill_level > 3 ){ + *hp_power = 100; + *mp_power = 15; + }else{ + *hp_power = 50; + *mp_power = 10; + } +#else + if( skill_level >= 10 ){ + *hp_power = 300; + *mp_power = 70; + }else if( skill_level >= 9 ){ + *hp_power = 200; + *mp_power = 50; + }else if( skill_level >= 7 ){ + *hp_power = 150; + *mp_power = 30; + }else if( skill_level >= 4 ){ + *hp_power = 100; + *mp_power = 20; + }else{ + *hp_power = 50; + *mp_power = 10; + } +#endif + break; + } + case BATTLE_COM_S_ENCLOSE: // 附身术 + { +#ifdef _PROFESSION_ADDSKILL + if( skill_level >= 10 ) + *hp_power = 400; + else if( skill_level > 9 ) + *hp_power = 300; + else if( skill_level > 7 ) + *hp_power = 250; + else if( skill_level > 4 ) + *hp_power = 200; + else + *hp_power = 150; + break; +#else + if( skill_level >= 10 ) + *hp_power = 300; + else if( skill_level >= 8 ) + *hp_power = 250; + else if( skill_level >= 5 ) + *hp_power = 200; + else + *hp_power = 150; + break; +#endif + } + default: + break; + } + +#ifdef _SUIT_ADDENDUM + *hp_power += *hp_power * (CHAR_getWorkInt( charaindex, CHAR_WORKMPOWER )/100.00); +#endif +#ifdef _SUIT_ADDPART4 + if( rand()%100 < 30 ) + *hp_power += *hp_power * (CHAR_getWorkInt( charaindex, CHAR_WORKMPOWER2 )/100.00);//加强法师魔法的装备(限定30%机率) +#endif + + if( *hp_power > 0 ){ + float rand_num = RAND( 98, 102 ); + *hp_power *= rand_num / 100; + }else{ + *hp_power = 0; + } +} + + +// 选择改击数量 +void PROFESSION_MAGIC_TOLIST_SORT( int *list, int *listidx, int charaindex ) +{ + int j=0, get_num=0, temp[SIDE_OFFSET * 2 + 1]; + int skill_level=-1, command=-1; + + skill_level = CHAR_GETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3); + skill_level = PROFESSION_CHANGE_SKILL_LEVEL_M( skill_level ); + + command = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1); + + switch(command){ + case BATTLE_COM_S_CURRENT: // 电流术 + { +#ifdef _PROFESSION_ADDSKILL + if( skill_level > 9 ) get_num = 10; + else if( skill_level > 8 ) get_num = 9; + else if( skill_level > 7 ) get_num = 8; + else if( skill_level > 6 ) get_num = 7; + else if( skill_level > 5 ) get_num = 6; + else if( skill_level > 4 ) get_num = 5; + else if( skill_level > 3 ) get_num = 4; + else if( skill_level > 2 ) get_num = 3; + else if( skill_level > 1 ) get_num = 2; + else get_num = 1; +#else + if( skill_level >= 9 ) get_num = 5; + else if( skill_level >= 7 ) get_num = 4; + else if( skill_level >= 5 ) get_num = 3; + else if( skill_level >= 3 ) get_num = 2; + else get_num = 1; +#endif + break; + } + case BATTLE_COM_S_STORM: // 暴风雨 + { + get_num = skill_level; + break; + } + case BATTLE_COM_S_DOOM: // 世界末日 + { + if( skill_level >= 8 ) get_num = 10; + else if( skill_level >= 7 ) get_num = 8; + else if( skill_level >= 5 ) get_num = 6; + else if( skill_level >= 3 ) get_num = 4; + else get_num = 2; + break; + } + case BATTLE_COM_S_FIRE_SPEAR: // 火龙枪 + { + /*int miss_rate=0, rand_num=0; + + miss_rate = skill_level * 2 + 10; + rand_num = RAND(0, 100); + + if( rand_num <= miss_rate ){ + memset(list, -1, sizeof(list)); + *listidx = 0; + return; + }else + get_num = skill_level; + + break;*/ + /* + if( skill_level > 9 ) get_num = 10; + else if( skill_level > 8) get_num = 9; + else if( skill_level > 7 ) get_num = 8; + else if( skill_level > 6 ) get_num = 7; + else if( skill_level > 5 ) get_num = 6; + else if( skill_level > 4 ) get_num = 5; + else if( skill_level > 3 ) get_num = 4; + else if( skill_level > 2 ) get_num = 3; + else if( skill_level > 1 ) get_num = 2; + else get_num = 1; + */ + break; + } + case BATTLE_COM_S_SIGN: // 一针见血 + { +#ifdef _PROFESSION_ADDSKILL + get_num = 10; +#else + if( skill_level >= 10 ) get_num = 5; + else if( skill_level >= 8 ) get_num = 4; + else if( skill_level >= 6 ) get_num = 3; + else if( skill_level >= 3 ) get_num = 2; + else get_num = 1; +#endif + break; + } + case BATTLE_COM_S_CONVOLUTE: // 回旋攻击 + case BATTLE_COM_S_FIRE_BALL: // 火星球 + { + int toNo=-1, toNo2=-1, battleindex=-1, i=0, count=0; + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + + if(battleindex == -1) return; + + toNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2); + memset( temp, -1, sizeof( temp ) ); + + if( toNo == 24 ) toNo2 = 15; + else if( toNo == 23 ) toNo2 = 10; + else if( toNo == 25 ) toNo2 = 5; + else if( toNo == 26 ) toNo2 = 0; + else return; + + for( i=0; i<5; i++ ){ + if(BATTLE_TargetCheck(battleindex,toNo2+i) != FALSE){ + temp[count] = toNo2+i; + count++; + } + } + + memset(list, -1, sizeof(list)); + memcpy( list, temp, sizeof(temp) ); + + *listidx = count; + + return; + } + case BATTLE_COM_S_THROUGH_ATTACK: // 贯穿攻击 + { + int toNo = -1, toNo2 = -1, battleindex = -1; + + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + if(battleindex == -1) return; + + toNo = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM2); + memset( temp, -1, sizeof( temp ) ); + temp[0] = toNo; + + if( toNo < (SIDE_OFFSET/2) ) toNo2= toNo + (SIDE_OFFSET/2); + else if( toNo < (SIDE_OFFSET) ) toNo2= toNo - (SIDE_OFFSET/2); + else if( toNo < (SIDE_OFFSET*1.5) ) toNo2= toNo + (SIDE_OFFSET/2); + else if( toNo < (SIDE_OFFSET*2) ) toNo2= toNo - (SIDE_OFFSET/2); + + if(BATTLE_TargetCheck( battleindex, toNo2 ) != FALSE){ + if( toNo2 > toNo ){ + temp[0] = toNo2; + temp[1] = toNo; + }else + temp[1] = toNo2; + + *listidx = 2; + }else + *listidx = 1; + + memset(list, -1, sizeof(list)); + memcpy( list, temp, sizeof(temp) ); + + } + default: + return; + } + + if( get_num == 0 ) return; + + if( get_num >= 10) get_num=10; + + if( get_num >= *listidx ) return; + + memset(temp, -1, sizeof(temp)); + + while( j < get_num ){ + int rand_num=-1, out_num=-1; + + rand_num = RAND(0, *listidx-1); + out_num = list[rand_num]; + list[rand_num] = -1; + + if(out_num > 0){ + temp[j] = out_num; + j++; + } + } + + memset(list, -1, sizeof(list)); + memcpy( list, temp, sizeof(temp) ); + + *listidx = j; + + return; +} + + +// 改变自身状态 +void PROFESSION_MAGIC_CHANGE_STATUS( + int charaindex, + int hp_power, + float mp_power, + float *add_hp, + float *add_mp +) +{ + int skill_level=0, command=0, critical=0; + critical = RAND( 1,100); + + skill_level = CHAR_GETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3); + skill_level = PROFESSION_CHANGE_SKILL_LEVEL_M( skill_level ); + + command = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1); + + switch( command ){ + case BATTLE_COM_S_BLOOD: // 嗜血成性 + { + int rate = 0; + + if( skill_level >= 10 ) rate = 20; + else if( skill_level >= 7 ) rate = 15; + else if( skill_level >= 5 ) rate = 10; + else if( skill_level >= 3 ) rate = 5; + else rate = 0; + + *add_mp += hp_power * ( rate + 40 ) / 100; + + break; + } + case BATTLE_COM_S_BLOOD_WORMS: // 嗜血蛊 + { + if( skill_level >= 10 ){ + *add_hp += hp_power * 0.2; + break; + }else{ + *add_hp += hp_power * ((skill_level/4)*5 + 5) / 100; + break; + } + break; + } +#ifdef _PROFESSION_ADDSKILL + case BATTLE_COM_S_SIGN: // 一针见血 + { + int success=10; + /*( skill_level >= 10 ) success = 30;//成功率 + else if( skill_level > 9 ) success = 25; + else if( skill_level > 8 ) success = 20; + else if( skill_level > 7 ) success = 15; + else success = 10; + success = 30;*/ + if( RAND(0,100) < success ){ + if( skill_level > 8 ){ + *add_hp += hp_power; + *add_mp += mp_power; + } + else if( skill_level > 7 ){ + *add_hp += hp_power/2; + *add_mp += 0; + } + } + else + { + *add_hp += 0; + *add_mp += 0; + } + break; + } +#endif + default: + break; + } +} + +// 取得位置不是在中央的多人魔法图号及座标 +void PROFESSION_MAGIC_GET_IMG2( int toNo, int charaindex, int attIdx, char *pszOption ) +{ + int command=0, img2=0, x=0, y=0; + char temp[64]; + int skill_level=0; + + skill_level = CHAR_GETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3); + skill_level = PROFESSION_CHANGE_SKILL_LEVEL_M( skill_level ); + + command = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLECOM1); + + switch( command ){ + case BATTLE_COM_S_BLOOD: // 嗜血成性 + { + int img=0; + + if( skill_level >= 10 ) img = 101689; + else if( skill_level >= 7 ) img = 101690; + else if( skill_level >= 3 ) img = 101691; + else img = 101692; + + PROFESSION_MAGIC_CHANG_IMG2( img, pszOption, attIdx ); + return; + } + case BATTLE_COM_S_VOLCANO_SPRINGS: // 火山泉 + { + int img=0; + + if( skill_level >= 10 ) img = 101686; + else if( skill_level >= 5 ) img = 101687; + else img = 101688; + + if( toNo >= 0 && toNo < 10 ) + PROFESSION_MAGIC_CHANG_IMG2( img, pszOption, attIdx ); + else{ + int x=0, y=0; + char temp[128]; + + memset( temp, 0, sizeof(temp) ); + if( getStringFromIndexWithDelim(pszOption,"|",11,temp,sizeof(temp)) ) x = atoi(temp); + + memset( temp, 0, sizeof(temp) ); + if( getStringFromIndexWithDelim(pszOption,"|",12,temp,sizeof(temp)) ) y = atoi(temp); + + // 後置动画 + PROFESSION_magic[attIdx].uiSpriteNum = img; + + // 後置动画座标 + PROFESSION_magic[attIdx].siSx = x; + PROFESSION_magic[attIdx].siSy = y; + } + + return; + } + case BATTLE_COM_S_BLOOD_WORMS: // 嗜血蛊 + { + // 右方 + if( toNo == 20 || toNo == 25 || toNo == 26 || + ( toNo >= 0 && toNo < SIDE_OFFSET ) ) + PROFESSION_MAGIC_CHANG_IMG2( 101623, pszOption, attIdx ); + return; + } + case BATTLE_COM_S_ICE_MIRROR: // 冰镜术 + { + if( toNo >= 0 && toNo < 10 ) + PROFESSION_MAGIC_CHANG_IMG2( 101652, pszOption, attIdx ); + else{ + int x=0, y=0; + char temp[128]; + + memset( temp, 0, sizeof(temp) ); + if( getStringFromIndexWithDelim(pszOption,"|",11,temp,sizeof(temp)) ) x = atoi(temp); + + memset( temp, 0, sizeof(temp) ); + if( getStringFromIndexWithDelim(pszOption,"|",12,temp,sizeof(temp)) ) y = atoi(temp); + + // 後置动画 + PROFESSION_magic[attIdx].uiSpriteNum = 101652; + + // 後置动画座标 + PROFESSION_magic[attIdx].siSx = x; + PROFESSION_magic[attIdx].siSy = y; + } + + return; + } + case BATTLE_COM_S_ENCLOSE: // 附身术 + { + // 右方 + if( toNo == 20 || toNo == 25 || toNo == 26 || + ( toNo >= 0 && toNo < SIDE_OFFSET ) ) + PROFESSION_MAGIC_CHANG_IMG2( 101643, pszOption, attIdx ); + return; + } + case BATTLE_COM_S_FIRE_SPEAR: // 火龙枪 + { + // 右方 + //if( toNo == 20 || toNo == 25 || toNo == 26 ) + if( toNo < 10 ) + PROFESSION_MAGIC_CHANG_IMG2( 101642, pszOption, attIdx ); + return; + } + case BATTLE_COM_S_DOOM: // 世界末日 + { + // 右方 + if( toNo == 20 || toNo == 25 || toNo == 26 ) + PROFESSION_MAGIC_CHANG_IMG2( 101639, pszOption, attIdx ); + return; + } + case BATTLE_COM_S_ICE_CRACK: // 冰爆术 + { + // 右方 + if( toNo == 20 || toNo == 25 || toNo == 26 ) + PROFESSION_MAGIC_CHANG_IMG2( 101650, pszOption, attIdx ); + return; + } + case BATTLE_COM_S_ICE_ARROW: // 冰箭术 + { + // 右方 + if( toNo == 20 || toNo == 25 || toNo == 26 || + ( toNo >= 0 && toNo < SIDE_OFFSET ) ) + PROFESSION_MAGIC_CHANG_IMG2( 101649, pszOption, attIdx ); + return; + + } + case BATTLE_COM_S_STORM: // 暴风雨 + { + // 右方 + if( toNo == 20 || toNo == 25 || toNo == 26 ) + PROFESSION_MAGIC_CHANG_IMG2( 101677, pszOption, attIdx ); + return; + } +#ifdef _PROFESSION_ADDSKILL + case BATTLE_COM_S_BOUNDARY: // 四属性结界 + { + // 右方 + if( toNo == 20 || toNo == 25 || toNo == 26 ){ + if( getStringFromIndexWithDelim(pszOption,"|",1,temp,sizeof(temp)) ) + { + if( strcmp( "地结界", temp ) == 0 ) + PROFESSION_MAGIC_CHANG_IMG2( 101786, pszOption, attIdx ); + else if( strcmp( "水结界", temp ) == 0 ) + PROFESSION_MAGIC_CHANG_IMG2( 101774, pszOption, attIdx ); + else if( strcmp( "火结界", temp ) == 0 ) + PROFESSION_MAGIC_CHANG_IMG2( 101780, pszOption, attIdx ); + else if( strcmp( "风结界", temp ) == 0 ) + PROFESSION_MAGIC_CHANG_IMG2( 101792, pszOption, attIdx ); + else + PROFESSION_MAGIC_CHANG_IMG2( 101770, pszOption, attIdx ); + } + } + return; + } +#endif + case BATTLE_COM_S_CONVOLUTE: // 回旋攻击 + { + img2=101656; + if( toNo == 25 ){ // 右 1 + memset( temp, 0, sizeof(temp) ); + if( getStringFromIndexWithDelim(pszOption,"|",9,temp,sizeof(temp)) ) x = atoi(temp); + memset( temp, 0, sizeof(temp) ); + if( getStringFromIndexWithDelim(pszOption,"|",10,temp,sizeof(temp)) ) y = atoi(temp); + }else if( toNo == 26 ){ // 右 2 + memset( temp, 0, sizeof(temp) ); + if( getStringFromIndexWithDelim(pszOption,"|",11,temp,sizeof(temp)) ) x = atoi(temp); + memset( temp, 0, sizeof(temp) ); + if( getStringFromIndexWithDelim(pszOption,"|",12,temp,sizeof(temp)) ) y = atoi(temp); + }else if( toNo == 23 ){ // 左 1 + memset( temp, 0, sizeof(temp) ); + if( getStringFromIndexWithDelim(pszOption,"|",13,temp,sizeof(temp)) ) x = atoi(temp); + memset( temp, 0, sizeof(temp) ); + if( getStringFromIndexWithDelim(pszOption,"|",14,temp,sizeof(temp)) ) y = atoi(temp); + }else if( toNo == 24 ){ // 左 2 + memset( temp, 0, sizeof(temp) ); + if( getStringFromIndexWithDelim(pszOption,"|",15,temp,sizeof(temp)) ) x = atoi(temp); + memset( temp, 0, sizeof(temp) ); + if( getStringFromIndexWithDelim(pszOption,"|",16,temp,sizeof(temp)) ) y = atoi(temp); + }else + return; + + // 後置动画 + PROFESSION_magic[attIdx].uiSpriteNum = img2; + + // 後置动画座标 + PROFESSION_magic[attIdx].siSx = x; + PROFESSION_magic[attIdx].siSy = y; + + break; + } + case BATTLE_COM_S_THROUGH_ATTACK: // 贯穿攻击 + { + if( (toNo == 13) || (toNo == 18) ){ // 左下 1 + img2=101676; + x = 50; + y = 240; + }else if( (toNo == 11) || (toNo == 16) ){ // 左 2 + img2=101675; + x = 120; + y = 200; + }else if( (toNo == 10) || (toNo == 15) ){ // 左 3 + img2=101674; + x = 140; + y = 160; + }else if( (toNo == 12) || (toNo == 17) ){ // 左 4 + img2=101673; + x = 160; + y = 120; + }else if( (toNo == 14) || (toNo == 19) ){ // 左 5 + img2=101672; + x = 180; + y = 80; + }else if( (toNo == 3) || (toNo == 8) ){ // 右 1 + img2=101665; + memset( temp, 0, sizeof(temp) ); + if( getStringFromIndexWithDelim(pszOption,"|",9,temp,sizeof(temp)) ) x = atoi(temp); + memset( temp, 0, sizeof(temp) ); + if( getStringFromIndexWithDelim(pszOption,"|",10,temp,sizeof(temp)) ) y = atoi(temp); + }else if( (toNo == 1) || (toNo == 6) ){ // 右 2 + img2=101664; + memset( temp, 0, sizeof(temp) ); + if( getStringFromIndexWithDelim(pszOption,"|",11,temp,sizeof(temp)) ) x = atoi(temp); + memset( temp, 0, sizeof(temp) ); + if( getStringFromIndexWithDelim(pszOption,"|",12,temp,sizeof(temp)) ) y = atoi(temp); + }else if( (toNo == 0) || (toNo == 5) ){ // 右 3 + img2=101663; + memset( temp, 0, sizeof(temp) ); + if( getStringFromIndexWithDelim(pszOption,"|",13,temp,sizeof(temp)) ) x = atoi(temp); + memset( temp, 0, sizeof(temp) ); + if( getStringFromIndexWithDelim(pszOption,"|",14,temp,sizeof(temp)) ) y = atoi(temp); + }else if( (toNo == 2) || (toNo == 7) ){ // 右 4 + img2=101662; + memset( temp, 0, sizeof(temp) ); + if( getStringFromIndexWithDelim(pszOption,"|",15,temp,sizeof(temp)) ) x = atoi(temp); + memset( temp, 0, sizeof(temp) ); + if( getStringFromIndexWithDelim(pszOption,"|",16,temp,sizeof(temp)) ) y = atoi(temp); + }else if( (toNo == 4) || (toNo == 9) ){ // 右 5 + img2=101661; + memset( temp, 0, sizeof(temp) ); + if( getStringFromIndexWithDelim(pszOption,"|",17,temp,sizeof(temp)) ) x = atoi(temp); + memset( temp, 0, sizeof(temp) ); + if( getStringFromIndexWithDelim(pszOption,"|",18,temp,sizeof(temp)) ) y = atoi(temp); + }else + return; + + // 後置动画 + PROFESSION_magic[attIdx].uiSpriteNum = img2; + + // 後置动画座标 + PROFESSION_magic[attIdx].siSx = x; + PROFESSION_magic[attIdx].siSy = y; + + // 前置动画 + if( toNo >= 10 ){ + int img1 = 101671; + PROFESSION_magic[attIdx].uiPrevMagicNum = img1; + } + break; + } + case BATTLE_COM_S_FIRE_BALL: // 火星球 + { + if( toNo == 25 ){ // 右 1 + img2=101694; + + memset( temp, 0, sizeof(temp) ); + if( getStringFromIndexWithDelim(pszOption,"|",9,temp,sizeof(temp)) ) x = atoi(temp); + memset( temp, 0, sizeof(temp) ); + if( getStringFromIndexWithDelim(pszOption,"|",10,temp,sizeof(temp)) ) y = atoi(temp); + }else if( toNo == 26 ){ // 右 2 + img2=101694; + + memset( temp, 0, sizeof(temp) ); + if( getStringFromIndexWithDelim(pszOption,"|",11,temp,sizeof(temp)) ) x = atoi(temp); + memset( temp, 0, sizeof(temp) ); + if( getStringFromIndexWithDelim(pszOption,"|",12,temp,sizeof(temp)) ) y = atoi(temp); + }else if( toNo == 23 ){ // 左 1 + img2=101693; + + memset( temp, 0, sizeof(temp) ); + if( getStringFromIndexWithDelim(pszOption,"|",13,temp,sizeof(temp)) ) x = atoi(temp); + memset( temp, 0, sizeof(temp) ); + if( getStringFromIndexWithDelim(pszOption,"|",14,temp,sizeof(temp)) ) y = atoi(temp); + }else if( toNo == 24 ){ // 左 2 + img2=101693; + + memset( temp, 0, sizeof(temp) ); + if( getStringFromIndexWithDelim(pszOption,"|",15,temp,sizeof(temp)) ) x = atoi(temp); + memset( temp, 0, sizeof(temp) ); + if( getStringFromIndexWithDelim(pszOption,"|",16,temp,sizeof(temp)) ) y = atoi(temp); + }else + return; + + // 後置动画 + PROFESSION_magic[attIdx].uiSpriteNum = img2; + + // 後置动画座标 + PROFESSION_magic[attIdx].siSx = x; + PROFESSION_magic[attIdx].siSy = y; + + break; + } + default: return; + } + +} + + +#define D_16 (1.0/16) +#define D_8 (1.0/8) +// 取得攻击伤害 +#ifdef _PROFESSION_ADDSKILL +int PROFESSION_MAGIC_GET_DAMAGE( int attackindex, int defindex, int magic_type, int power, int command ) +#else +int PROFESSION_MAGIC_GET_DAMAGE( int attackindex, int defindex, int magic_type, int power ) +#endif +{ + int attack=0; + int damage = 0, rand_num=0; + int fire_proficiency = -1, electric_proficiency = -1, ice_proficiency = -1;//熟练度 + int fire_resist = -1, electric_resist = -1, ice_resist = -1; + +#ifdef _FIX_MAGIC_RESIST // WON ADD 修正魔法抗性 + int proficiency=0;//熟练度 + int resist=0;//抗性 + int suit=0;//装备 + int spirit=0;//使用精灵造成的抗性 + + if( command == BATTLE_COM_S_DOOM ) + magic_type = 1; + + if( magic_type == 1){ // 火属性 + proficiency = CHAR_getWorkInt( attackindex, CHAR_WORK_F_PROFICIENCY); // 火熟练度 + resist = CHAR_getWorkInt( defindex, CHAR_WORK_F_RESIST); // 火抗 +#ifdef _EQUIT_RESIST + suit = CHAR_getWorkInt( defindex, CHAR_WORK_F_SUIT)+CHAR_getWorkInt( defindex, CHAR_WORKEQUITFIRE ); +#else + suit = CHAR_getWorkInt( defindex, CHAR_WORK_F_SUIT); +#endif +#ifdef _MAGICSTAUTS_RESIST + if( CHAR_getWorkInt( defindex, CHAR_MAGICFIRE) > 0 ) + spirit = CHAR_getWorkInt( defindex, CHAR_OTHERSTATUSNUMS ); +#endif + } + + if( command == BATTLE_COM_S_DOOM ){ + damage = power * (1+proficiency/100.0) * (1-(resist/100.0)) * (1-(suit/100.0)) * (1-(spirit/100.0)); + magic_type = 2; + } + + if( magic_type == 2){ // 电属性 + proficiency = CHAR_getWorkInt( attackindex, CHAR_WORK_T_PROFICIENCY); // 电熟练度 + resist = CHAR_getWorkInt( defindex, CHAR_WORK_T_RESIST); // 电抗 +#ifdef _EQUIT_RESIST + suit = CHAR_getWorkInt( defindex, CHAR_WORK_I_SUIT)+CHAR_getWorkInt( defindex, CHAR_WORKEQUITTHUNDER ); +#else + suit = CHAR_getWorkInt( defindex, CHAR_WORK_I_SUIT); +#endif +#ifdef _MAGICSTAUTS_RESIST + if( CHAR_getWorkInt( defindex, CHAR_MAGICTHUNDER) > 0 ) + spirit = CHAR_getWorkInt( defindex, CHAR_OTHERSTATUSNUMS ); +#endif + } + + if( command == BATTLE_COM_S_DOOM ){ + damage += power * (1+proficiency/100.0) * (1-(resist/100.0)) * (1-(suit/100.0)) * (1-(spirit/100.0)); + magic_type = 3; + } + + if( magic_type == 3){ // 冰属性 + proficiency = CHAR_getWorkInt( attackindex, CHAR_WORK_I_PROFICIENCY); // 冰熟练度 + resist = CHAR_getWorkInt( defindex, CHAR_WORK_I_RESIST); // 冰抗 +#ifdef _EQUIT_RESIST + suit = CHAR_getWorkInt( defindex, CHAR_WORK_T_SUIT)+CHAR_getWorkInt( defindex, CHAR_WORKEQUITICE ); +#else + suit = CHAR_getWorkInt( defindex, CHAR_WORK_T_SUIT); +#endif +#ifdef _MAGICSTAUTS_RESIST + if( CHAR_getWorkInt( defindex, CHAR_MAGICICE) > 0 ) + spirit = CHAR_getWorkInt( defindex, CHAR_OTHERSTATUSNUMS ); +#endif + } + + if( command == BATTLE_COM_S_DOOM ){ + damage += power * (1+proficiency/100.0) * (1-(resist/100.0)) * (1-(suit/100.0)) * (1-(spirit/100.0)); + damage /= 3.0; + } + else + damage = power * (1+proficiency/100.0) * (1-(resist/100.0)) * (1-(suit/100.0)) * (1-(spirit/100.0)); + +#else //_FIX_MAGIC_RESIST + + fire_proficiency = CHAR_getWorkInt( attackindex, CHAR_WORK_F_PROFICIENCY); // 火熟练度 + electric_proficiency = CHAR_getWorkInt( attackindex, CHAR_WORK_T_PROFICIENCY); // 电熟练度 + ice_proficiency = CHAR_getWorkInt( attackindex, CHAR_WORK_I_PROFICIENCY); // 冰熟练度 + fire_resist = CHAR_getWorkInt( defindex, CHAR_WORK_F_RESIST); // 火抗 + electric_resist = CHAR_getWorkInt( defindex, CHAR_WORK_T_RESIST); // 电抗 + ice_resist = CHAR_getWorkInt( defindex, CHAR_WORK_I_RESIST); // 冰抗 + +// print("\n won test 0.0 ==> f(%d) e(%d) i(%d)", fire_proficiency, electric_proficiency, ice_proficiency ); +// print("\n won test 0.1 ==> f(%d) e(%d) i(%d)", fire_resist, electric_resist, ice_resist ); + + if( magic_type == 1){ // 火属性 + + attack = power * ( 100 + fire_proficiency ) / 100; // 攻击加成 + + if( rand_num < 40){ // 原攻击伤害 + attack = attack * ( 100 - fire_resist ) / 100; + }else{ // 乱数取伤害 + rand_num = RAND(-20, 20); + attack = attack * ( 100 - (rand_num + fire_resist) ) / 100; + } +//print( "\nattack:%d ", attack ); + + }else + if( magic_type == 2){ // 电属性 + + attack = power * ( 100 + electric_proficiency ) / 100; // 攻击加成 + + if( rand_num < 40){ // 原攻击伤害 + attack = attack * ( 100 - electric_resist ) / 100; + }else{ // 乱数取伤害 + rand_num = RAND(-20, 20); + attack = attack * ( 100 - (rand_num + electric_resist) ) / 100; + } + }else + if( magic_type == 3){ // 冰属性 + + attack = power * ( 100 + ice_proficiency ) / 100; // 攻击加成 + + if( rand_num < 40){ // 原攻击伤害 + attack = attack * ( 100 - ice_resist ) / 100; + }else{ // 乱数取伤害 + rand_num = RAND(-20, 20); + attack = attack * ( 100 - (rand_num + ice_resist) ) / 100; + } + }else{ // 无 + attack = power; + } + + damage = attack; + +#endif + + if( damage < 0 ) + damage = 0; + + return damage; +} + + +// 取得特殊攻击伤害 +int PROFESSION_MAGIC_GET_ICE_MIRROR_DAMAGE( int attackindex, int defindex, int command, int power ) +{ + int damage = power; + + if( command == BATTLE_COM_S_ICE_MIRROR ){ // 冰镜术 + float defense = -1; + int rate=0; + int defpet = BATTLE_getRidePet( defindex ); + int skill_level = CHAR_GETWORKINT_HIGH( attackindex, CHAR_WORKBATTLECOM3); + int base_defense = CHAR_getInt( defindex, CHAR_TOUGH ) / 100; + + skill_level = PROFESSION_CHANGE_SKILL_LEVEL_M( skill_level ); + + if( defpet == -1 ) + defense = CHAR_getWorkInt( defindex, CHAR_WORKDEFENCEPOWER ); + else + defense = BATTLE_adjustRidePet3A( defindex, defpet, CHAR_WORKDEFENCEPOWER, DEFFENCESIDE ); + + if( skill_level >= 10 ){ + rate = 60; + }else{ + rate = skill_level * 5 + 5; + } + + //andy_Edit + damage = 120 + (int)( ( defense * rate / 100 ) + ( ( defense - base_defense ) * rate / 200 ) ); + //控制对npc的伤害 + if( CHAR_getInt( defense , CHAR_WHICHTYPE ) == CHAR_TYPEENEMY ) + damage = damage > 800 ? 800 : damage; + + }else + if( command == BATTLE_COM_S_CONVOLUTE ){ // 回旋攻击 + int skill_level = CHAR_GETWORKINT_HIGH( attackindex, CHAR_WORKBATTLECOM3); + int hit=0; + int rand_num = RAND( 1, 100); + + skill_level = PROFESSION_CHANGE_SKILL_LEVEL_A( skill_level ); + + hit = skill_level * 2 + 60; + + //if( rand_num <= hit ){ + // 取得回旋攻击伤害 + damage = BATTLE_PROFESSION_CONVOLUTE_GET_DAMAGE( attackindex, defindex, skill_level ); + //}else{ + // damage = 0; + //} + }else + if( command == BATTLE_COM_S_THROUGH_ATTACK ){ // 贯穿攻击 + int skill_level = CHAR_GETWORKINT_HIGH( attackindex, CHAR_WORKBATTLECOM3); + + skill_level = PROFESSION_CHANGE_SKILL_LEVEL_A( skill_level ); + + if( skill_level != 10 ){ + // 命中率下降 + CHAR_setWorkInt( attackindex, CHAR_MYSKILLHIT, 1); + CHAR_setWorkInt( attackindex, CHAR_MYSKILLHIT_NUM, -70); + CHAR_setWorkInt( attackindex, CHAR_WORKHITRIGHT, CHAR_getWorkInt(attackindex,CHAR_WORKHITRIGHT) -50 ); + } + + // 取得贯穿攻击伤害 + damage = BATTLE_PROFESSION_THROUGH_ATTACK_GET_DAMAGE( attackindex, defindex ); + } +#ifdef _PROFESSION_ADDSKILL + else + if( command == BATTLE_COM_S_CURRENT //电流术 + || command == BATTLE_COM_S_SUMMON_THUNDER ){//召雷术 + if( CHAR_getWorkInt( defindex, CHAR_WORKWATER ) > 0 ){//水附体 + if( RAND(1, 100) < 75 ) + damage *= 3; + } + } +#endif + return damage; +} + + + +// 计算闪避率 +// return: 0:没闪过 1:闪过 +int PROFESSION_MAGIC_DODGE( int atk_index, int def_index, int magic_type ) +{ + float fLuck = 0,fResist = 0, proficiency = 0; + float Dluck=0.0; + int charType = CHAR_getInt( def_index, CHAR_WHICHTYPE); + int rand_num = RAND( 1, 100 ); + int command; + + + // 目标地球一周,不动作 + if( CHAR_getWorkInt( def_index, CHAR_WORKBATTLECOM1 ) == BATTLE_COM_S_EARTHROUND0 ){ + return 1; // Miss + } + + // 如果是防守者是玩家 + if( charType == CHAR_TYPEPLAYER ){ + + // 幸运 + fLuck = (float)CHAR_getInt( def_index, CHAR_LUCK) * 3; + + // 抗性 + if( magic_type != 0 ){ + fResist = (float)(CHAR_getWorkInt( def_index, CHAR_WORK_F_RESIST + magic_type - 1 )) * 0.5; + } + fLuck += fResist; + + // 抗魔装备 + Dluck = (float)(CHAR_getWorkInt( def_index, CHAR_EQUITQUIMAGIC)*0.4); + + fLuck += Dluck; + + }else {// 如果是防守者是宠物 + fLuck = (float)CHAR_getInt( def_index, CHAR_LV) * 0.15; + if(fLuck > 20) fLuck = 20; + } + + // 熟练度 + // Robin fix + //if( magic_type != 0 ){ + if( magic_type > 0 ){ + proficiency = (float)CHAR_getInt( atk_index, (CHAR_WORK_F_PROFICIENCY + magic_type - 1) ) * 0.2; + fLuck -= proficiency; + } + +/* print("\n PROFESSION_MAGIC_DODGE atk=%s def=%s magic_type(%d)", + CHAR_getChar( atk_index, CHAR_NAME), + CHAR_getChar( def_index, CHAR_NAME), + magic_type ); + print("\n won test 4 ==> rand_num(%d) lucky(%d) fResist(%f) Dluck(%f) proficiency(%f) fLuck(%f)", + rand_num, + CHAR_getInt( def_index, CHAR_LUCK) * 3, + fResist, + Dluck, + proficiency, + fLuck ); +*/ + if( rand_num > (int)fLuck){ +#ifdef _PROFESSION_ADDSKILL + command = CHAR_getWorkInt( atk_index, CHAR_WORKBATTLECOM1); + switch( command ){ + case BATTLE_COM_S_CURRENT: + case BATTLE_COM_S_STORM: + if( RAND( 1, 100 ) < 75 ) + return 0; + else + return 1; + break; + case BATTLE_COM_S_FIRE_SPEAR: + case BATTLE_COM_S_DOOM: + if( RAND( 1, 100 ) < 90 ) + return 0; + else + return 1; + break; + case BATTLE_COM_S_SIGN: + if( RAND( 1, 100 ) < 50 ) + return 0; + else + return 1; + break; + } +#endif + return 0; // hit + } + else + return 1; // Miss +} + +void PROFESSION_MAGIC_CHANG_IMG2( int img2, char *pszOption, int attIdx ) +{ + int x=0, y=0; + char temp[128]; + + memset( temp, 0, sizeof(temp) ); + if( getStringFromIndexWithDelim(pszOption,"|",9,temp,sizeof(temp)) ) x = atoi(temp); + + memset( temp, 0, sizeof(temp) ); + if( getStringFromIndexWithDelim(pszOption,"|",10,temp,sizeof(temp)) ) y = atoi(temp); + + // 後置动画 + PROFESSION_magic[attIdx].uiSpriteNum = img2; + + // 後置动画座标 + PROFESSION_magic[attIdx].siSx = x; + PROFESSION_magic[attIdx].siSy = y; +} + + + +int PROFESSION_MAGIC_CHANG_STATUS(int command,int battleindex, int charaindex, int charaidx, int attvalue, int no ) +{ + int i,j; + int skill_level=0; + + skill_level = CHAR_GETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3); + skill_level = PROFESSION_CHANGE_SKILL_LEVEL_M( skill_level ); + + switch( command ){ + case BATTLE_COM_S_THROUGH_ATTACK: // 贯穿攻击 + { + int skill_level = CHAR_GETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3); + + skill_level = PROFESSION_CHANGE_SKILL_LEVEL_A( skill_level ); + + if( no == 0 ){ // 攻击前排的 + attvalue = attvalue * (skill_level * 2 + 70) / 100; + }else if( no == 1 ){ // 攻击後排的 + attvalue = attvalue * (skill_level * 2 + 50) / 100; + } + + break; + } + case BATTLE_COM_S_ICE_CRACK: // 冰爆术 + { + int hit=0, rand_num = RAND( 0, 100 ); + + //for( j = 1; j < BATTLE_ST_END; j++ ){ //若已有异常状态则return + // if( CHAR_getWorkInt( charaidx, StatusTbl[j] ) > 0 ) return 0; + //} + // 命中率 + if( skill_level >= 10 ) hit = 80; + else if( skill_level >= 7 ) hit = 70; + else if( skill_level >= 5 ) hit = 80; + else if( skill_level >= 3 ) hit = 90; + else hit = 100; + + hit = 100; + if( rand_num < hit ){ + int damage=0; + int bid = BATTLE_Index2No( battleindex, charaidx ); + + if( skill_level >= 10 ) damage = attvalue * 1.3; + else if( skill_level >= 7 ) damage = attvalue * 1.25; + else if( skill_level >= 4 ) damage = attvalue * 1.2; + else damage = attvalue * 1.1; + + if( damage <= 0 ) break; + + for( i=0; i<10; i++ ){ + if( CHAR_getWorkInt( charaidx, CHAR_WORKICECRACK+i ) <= 0 ){ + CHAR_setWorkInt( charaidx, CHAR_WORKICECRACK+i, 3 ); + CHAR_setWorkInt( charaidx, CHAR_WORKMODICECRACK+i, damage ); + print("\niceidx:%d",charaidx); + break; + } + } + //BATTLE_BadStatusString( bid, BATTLE_ST_ICECRACK ); + + } + + // 冰爆术第一击无伤害 + attvalue = 0; + + break; + } + case BATTLE_COM_S_ENCLOSE: // 附身术 + { + for( j = 1; j < BATTLE_ST_END; j++ ) //若已有异常状态则return + if( CHAR_getWorkInt( charaidx, StatusTbl[j] ) > 0 ) return attvalue; + + { + int success=0, rand_num=0, round=1; + int bid = BATTLE_Index2No( battleindex, charaidx ); + + skill_level = CHAR_GETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3); + + if( skill_level >= 100 ) success = 50; + else if( skill_level > 90 ) success = 40; + else if( skill_level > 80 ) success = 30; + else if( skill_level > 60 ) success = 25; + else if( skill_level > 30 ) success = 20; + else success = 10; + + if( skill_level > 80 ) round = 3; + else if( skill_level > 50 ) round = 2; + else round = 1; + + rand_num = RAND(0,100); + + if( rand_num <= success ){ //成功时目标混乱 +#ifdef _PROFESSION_ADDSKILL + CHAR_setWorkInt( charaidx, CHAR_WORKANNEX, round ); + print("\n附身round:%d",round); +#else + CHAR_setWorkInt( charaidx, CHAR_WORKCONFUSION, 4 ); + CHAR_setWorkInt( charaidx, CHAR_WORKMODCONFUSION, 100 ); +#endif + BATTLE_BadStatusString( bid, BATTLE_ST_CONFUSION ); + } + } + break; + } + case BATTLE_COM_S_ICE_ARROW: // 冰箭 + { + for( j = 1; j < BATTLE_ST_END; j++ ){ //若已有异常状态则return + if( CHAR_getWorkInt( charaidx, StatusTbl[j] ) > 0 ) return attvalue; + } + { + int success=0, rand_num=0; + int bid = BATTLE_Index2No( battleindex, charaidx ); + + if( skill_level >= 8 ) success = 25; + else if( skill_level >= 5 ) success = 20; + else if( skill_level >= 2 ) success = 15; + else success = 10; + rand_num = RAND(0,100); + + if( rand_num <= success ){ //成功时目标降敏 + int dec_dex=0, turn=0; + + if( skill_level >= 8 ) dec_dex = 25; + else if( skill_level >= 5 ) dec_dex = 20; + else dec_dex = 10; + + if( skill_level >= 10 ) turn = 3; + else if( skill_level >= 6 ) turn = 2; + else turn = 1; + + CHAR_setWorkInt( charaidx, CHAR_WORKICEARROW, turn + 1 ); + CHAR_setWorkInt( charaidx, CHAR_WORKMODICEARROW, dec_dex ); + + BATTLE_BadStatusString( bid, BATTLE_ST_ICEARROW ); + } + } + break; + } + case BATTLE_COM_S_BLOOD_WORMS: // 嗜血蛊 + { + for( j = 1; j < BATTLE_ST_END; j++ ){ //若已有异常状态则return + if( CHAR_getWorkInt( charaidx, StatusTbl[j] ) > 0 ) return attvalue; + } + { + int turn=0; + int bid = BATTLE_Index2No( battleindex, charaidx ); + + if( skill_level >= 10 ) turn = 5; + else if( skill_level >= 8 ) turn = 4; + else if( skill_level >= 5 ) turn = 3; + else turn = 2; + + CHAR_setWorkInt( charaidx, CHAR_WORKBLOODWORMS, turn + 1 ); + CHAR_setWorkInt( charaidx, CHAR_WORKMODBLOODWORMS, skill_level ); + CHAR_setWorkInt( charaidx, CHAR_WORKBLOODWORMSID, charaindex ); + + BATTLE_BadStatusString( bid, BATTLE_ST_BLOODWORMS ); + + } + break; + } + case BATTLE_COM_S_SIGN: // 一针见血 + { +#ifdef _PROFESSION_ADDSKILL +#else + for( j = 1; j < BATTLE_ST_END; j++ ){ //若已有异常状态则return + if( CHAR_getWorkInt( charaidx, StatusTbl[j] ) > 0 ) return attvalue; + } + { + int turn=0, success=0, rand_num=0; + int bid = BATTLE_Index2No( battleindex, charaidx ); + + // 非玩家离开 +// if( CHAR_getInt( charaidx, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) return attvalue; + + if( skill_level == 10 ) success = 35; + else if( skill_level >= 8 ) success = (skill_level - 3) * 5; + else if( skill_level >= 6 ) success = 20; + else if( skill_level >= 4 ) success = 15; + else if( skill_level >= 2 ) success = 10; + else success = 5; + + rand_num = RAND(0,100); + + if( rand_num <= success ){ //成功时目标吸血 + if( skill_level >= 10 ) turn = 5; + else if( skill_level >= 7 ) turn = 4; + else if( skill_level >= 4 ) turn = 3; + else turn = 2; + + CHAR_setWorkInt( charaidx, CHAR_WORKSIGN, turn + 1 ); + CHAR_setWorkInt( charaidx, CHAR_WORKMODSIGN, skill_level ); + CHAR_setWorkInt( charaidx, CHAR_WORKSIGNID, charaindex ); + + BATTLE_BadStatusString( bid, BATTLE_ST_SIGN ); + } + } +#endif + break; + } + case BATTLE_COM_S_DOOM: // 世界末日 + { +/* int rand_num = RAND( 1, 100 ), work, dex; + char szCommand[64]; + int bid = BATTLE_Index2No( battleindex, charaidx ); + + if( skill_level < 10 ) break; +#ifdef _PROFESSION_ADDSKILL + CHAR_setWorkInt( charaidx, CHAR_WORKFEAR, 2 ); + BATTLE_BadStatusString( bid, BATTLE_ST_FEAR ); + work = CHAR_getWorkInt( charaindex, CHAR_WORKQUICK )+20; + dex = work>>1;//敏降50% + sprintf( szCommand, "BD|r%X|0|6|%X|", bid, (-1) * dex ); + BATTLESTR_ADD( szCommand ); +#endif + // 中麻痹 + /*if( rand_num <= 20 ){ + CHAR_setWorkInt( charaidx, CHAR_WORKPARALYSIS, 3 ); + BATTLE_BadStatusString( bid, BATTLE_ST_PARALYSIS ); + }else{ + rand_num = RAND( 1, 100 ); + if( rand_num <= 10 ){ + CHAR_setWorkInt( charaidx, CHAR_WORKCONFUSION, 3 ); + BATTLE_BadStatusString( bid, BATTLE_ST_CONFUSION ); + } + }*/ + + break; + } + } + + + return attvalue; +} + + +#endif + + +#ifdef _PETSKILL_FIREKILL +/* + . ..·. ..··. .○ + *. ..· ★.* ·. . + ★ . ·● ● ·. .★. + ..· / \_/ \_ ·. + ??√√ √√??? + 中秋节快乐 +*/ +void BATTLE_MultiAttMagic_Fire( int battleindex, int attackNo, int defNo, + int FieldAttr , int Power) + +{ + int list[SIDE_OFFSET * 2 + 1]; + int listidx=0,i,j,z,def_be_hit[10],att_magic_lv[4]; + int def_magic_resist[DEF_MAGIC_NUM]; + int attvalue , charahp , pethp , charaidx , petidx , charahurt,pet_att_lv = 1,pet_def_lv = 1,charahurt_temp; + char szcommand[256]; + int AttIsPlayer=0,DefIsPlayer=0; + int getexp = 0; + +#ifndef _FIX_MAGICDAMAGE + int att_magic_exp_add,att_magic_exp_sub,def_magic_exp_add,def_magic_exp_sub; + int lv_up_exp,DefFieldAttr = 0; + float temp = 0.0f; +// int attattr[5], defattr[5]; + char msgbuf[64]; + char kind[4][3] = {"地","水","火","风"}; +#else + BOOL TrueMagic=FALSE; +#endif + int f_num=0; + int MagicLv=4; + + memset(def_be_hit,-1,sizeof(def_be_hit)); + + if(defNo < 5) + f_num = 0; + else if(defNo >=5 && defNo < 10) + f_num = 5; + else if(defNo >=10 && defNo < 15) + f_num = 10; + else + f_num = 15; + + // 取出战场上存活的人 + for( i=f_num; i att_magic_lv[ FieldAttr] ) TrueMagic = FALSE; + else TrueMagic = TRUE; +#endif + } + pet_att_lv = CHAR_getInt(BATTLE_No2Index(battleindex,attackNo), CHAR_LV); + + z = 0; + for(i=0;i 0 ){ + float def = (float)(CHAR_getWorkInt( charaidx, CHAR_OTHERSTATUSNUMS )); + def = def/100; + for(j=0;j 0) { + CHAR_setWorkInt(def_be_hit[i],CHAR_WORKSLEEP,0); + z = BATTLE_Index2No(battleindex,def_be_hit[i]); + sprintf(szcommand,"BM|%X|%X|",z,0); + BATTLESTR_ADD(szcommand); + } + } +} +#endif + +#ifdef _PROFESSION_ADDSKILL +unsigned int GET_PROFESSION_magic_array(int idx) +{ + return PROFESSION_magic[idx].uiSpriteNum; +} +#endif + + + + diff --git a/gmsv/battle/makefile b/gmsv/battle/makefile new file mode 100644 index 0000000..5bc7f32 --- /dev/null +++ b/gmsv/battle/makefile @@ -0,0 +1,376 @@ + +INCFLAGS=-I.. -I../include + +CFLAGS=-w -O3 $(INCFLAGS) + +PROG=libbattle.a + +SRC=battle.c battle_event.c battle_command.c battle_ai.c battle_magic.c pet_skill.c battle_item.c profession_skill.c +OBJ=$(SRC:.c=.o) + +ifeq (0,$(MAKELEVEL)) +CC=gcc +RM=rm -f +AR=ar cr +MV=mv +RANLIB=ranlib +SED=sed +SHELL=/bin/sh +endif + +all: $(PROG) + +$(PROG): $(OBJ) + $(RM) $(PROG) + $(AR) $(PROG) $(OBJ) + $(RANLIB) $(PROG) + +depend: + $(MV) makefile makefile.bak + $(SED) -ne '1,/^# DO NOT DELETE THIS LINE/p' makefile.bak>makefile + $(CC) $(INCFLAGS) -M $(SRC) >> makefile + +clean: + $(RM) $(PROG) + $(RM) $(OBJ) + $(RM) *~ + +distclean: + $(RM) $(PROG) + $(RM) $(OBJ) + $(RM) *~ + $(MV) makefile makefile.bak + $(SED) -ne '1,/^# DO NOT DELETE THIS LINE/p' makefile.bak>makefile + $(RM) makefile.bak + +# DO NOT DELETE THIS LINE +battle.o: battle.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/stdlib.h /usr/include/sys/types.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/bits/time.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/buf.h ../include/common.h \ + /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \ + /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h ../include/object.h \ + ../include/char.h ../include/char_base.h ../include/skill.h \ + ../include/util.h /usr/include/sys/time.h ../include/title.h \ + ../include/addressbook.h ../include/net.h /usr/include/netinet/in.h \ + /usr/include/stdint.h /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/battle.h ../include/battle_event.h \ + ../include/battle_command.h ../include/battle_ai.h \ + ../include/configfile.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/encount.h ../include/enemy.h \ + ../include/handletime.h ../include/readmap.h ../include/pet_skill.h \ + ../include/npcutil.h ../include/magic.h ../include/npc_npcenemy.h \ + ../include/log.h ../include/pet_skillinfo.h ../include/anim_tbl.h \ + ../include/battle_magic.h ../include/profession_skill.h +battle_event.o: battle_event.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/math.h /usr/include/bits/huge_val.h \ + /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/char_event.h ../include/battle.h ../include/battle_event.h \ + ../include/configfile.h ../include/pet.h ../include/log.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/anim_tbl.h ../include/battle_magic.h \ + ../include/enemy.h ../include/pet_skill.h ../include/item_event.h \ + ../include/profession_skill.h ../include/magic_base.h +battle_command.o: battle_command.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/stdlib.h /usr/include/sys/types.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/bits/time.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/char.h ../include/common.h \ + /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \ + /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/battle.h ../include/pet_skill.h ../include/battle_event.h \ + ../include/battle_command.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/magic.h ../include/magic_base.h \ + ../include/handletime.h ../include/profession_skill.h +battle_ai.o: battle_ai.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + ../include/common.h /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h ../include/char.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/battle.h ../include/npcutil.h ../include/pet_skill.h +battle_magic.o: battle_magic.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/battle.h ../include/battle_event.h ../include/magic_base.h \ + ../include/battle_magic.h ../include/item_event.h ../include/anim_tbl.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/profession_skill.h +pet_skill.o: pet_skill.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/string.h ../include/common.h /usr/include/errno.h \ + /usr/include/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/asm/errno.h ../include/buf.h ../include/configfile.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/char.h ../include/pet_skill.h ../include/battle.h \ + ../include/battle_event.h ../include/battle_magic.h \ + ../include/item_gen.h ../include/char_talk.h +battle_item.o: battle_item.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/battle.h ../include/battle_event.h ../include/battle_item.h \ + ../include/battle_magic.h ../include/item_event.h ../include/log.h \ + ../include/anim_tbl.h ../include/npcutil.h ../include/magic_base.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h +profession_skill.o: profession_skill.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/stdio.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/string.h /usr/include/time.h /usr/include/bits/time.h \ + ../include/buf.h ../include/common.h /usr/include/errno.h \ + /usr/include/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/asm/errno.h ../include/profession_skill.h \ + ../include/util.h /usr/include/sys/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/skill.h ../include/char_base.h \ + ../include/title.h ../include/addressbook.h ../include/net.h \ + /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/battle.h ../include/magic_base.h \ + ../include/configfile.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h diff --git a/gmsv/battle/makefile.bak b/gmsv/battle/makefile.bak new file mode 100644 index 0000000..1c63209 --- /dev/null +++ b/gmsv/battle/makefile.bak @@ -0,0 +1,281 @@ + +INCFLAGS=-I.. -I../include + +CFLAGS=-w -O3 $(INCFLAGS) + +PROG=libbattle.a + +SRC=battle.c battle_event.c battle_command.c battle_ai.c battle_magic.c pet_skill.c battle_item.c profession_skill.c +OBJ=$(SRC:.c=.o) + +ifeq (0,$(MAKELEVEL)) +CC=gcc +RM=rm -f +AR=ar cr +MV=mv +RANLIB=ranlib +SED=sed +SHELL=/bin/sh +endif + +all: $(PROG) + +$(PROG): $(OBJ) + $(RM) $(PROG) + $(AR) $(PROG) $(OBJ) + $(RANLIB) $(PROG) + +depend: + $(MV) makefile makefile.bak + $(SED) -ne '1,/^# DO NOT DELETE THIS LINE/p' makefile.bak>makefile + $(CC) $(INCFLAGS) -M $(SRC) >> makefile + +clean: + $(RM) $(PROG) + $(RM) $(OBJ) + $(RM) *~ + +distclean: + $(RM) $(PROG) + $(RM) $(OBJ) + $(RM) *~ + $(MV) makefile makefile.bak + $(SED) -ne '1,/^# DO NOT DELETE THIS LINE/p' makefile.bak>makefile + $(RM) makefile.bak + +# DO NOT DELETE THIS LINE +battle.o: battle.c /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/stdlib.h /usr/include/sys/types.h \ + /usr/include/bits/types.h /usr/include/time.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/sys/sysmacros.h /usr/include/alloca.h ../include/buf.h \ + ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/libio.h /usr/include/_G_config.h \ + /usr/include/bits/stdio_lim.h ../include/object.h ../include/char.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/bits/time.h ../include/title.h \ + ../include/addressbook.h ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/battle.h ../include/battle_event.h \ + ../include/battle_command.h ../include/battle_ai.h \ + ../include/configfile.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/encount.h ../include/enemy.h ../include/handletime.h \ + ../include/readmap.h ../include/pet_skill.h ../include/npcutil.h \ + ../include/magic.h ../include/npc_npcenemy.h ../include/log.h \ + ../include/pet_skillinfo.h +battle_event.o: battle_event.c /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/math.h /usr/include/bits/huge_val.h \ + /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/float.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/char_event.h ../include/battle.h ../include/battle_event.h \ + ../include/configfile.h ../include/pet.h ../include/log.h +battle_command.o: battle_command.c /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/stdlib.h /usr/include/sys/types.h \ + /usr/include/bits/types.h /usr/include/time.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/sys/sysmacros.h /usr/include/alloca.h ../include/char.h \ + ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/libio.h /usr/include/_G_config.h \ + /usr/include/bits/stdio_lim.h ../include/char_base.h \ + ../include/skill.h ../include/util.h /usr/include/sys/time.h \ + /usr/include/bits/time.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/battle.h ../include/pet_skill.h ../include/battle_event.h \ + ../include/battle_command.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h ../include/magic.h \ + ../include/magic_base.h +battle_ai.o: battle_ai.c /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/common.h ../include/char.h ../include/char_base.h \ + ../include/skill.h ../include/util.h /usr/include/sys/time.h \ + /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/battle.h ../include/npcutil.h ../include/pet_skill.h +battle_magic.o: battle_magic.c /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/battle.h ../include/battle_event.h ../include/magic_base.h \ + ../include/battle_magic.h ../include/item_event.h \ + ../include/anim_tbl.h +pet_skill.o: pet_skill.c /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + /usr/include/string.h ../include/common.h ../include/buf.h \ + ../include/configfile.h ../include/char_base.h ../include/skill.h \ + ../include/util.h /usr/include/sys/time.h /usr/include/time.h \ + /usr/include/bits/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/char.h ../include/pet_skill.h ../include/battle.h \ + ../include/battle_event.h ../include/item_gen.h +battle_item.o: battle_item.c /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/battle.h ../include/battle_event.h \ + ../include/battle_item.h ../include/battle_magic.h \ + ../include/item_event.h ../include/log.h ../include/anim_tbl.h +profession_skill.o: profession_skill.c /usr/include/stdio.h \ + /usr/include/string.h ../include/buf.h ../include/profession_skill.h \ + ../include/char_base.h ../include/battle.h ../include/magic_base.h \ + ../include/configfile.h + diff --git a/gmsv/battle/pet_skill.c b/gmsv/battle/pet_skill.c new file mode 100644 index 0000000..978f23a --- /dev/null +++ b/gmsv/battle/pet_skill.c @@ -0,0 +1,2462 @@ +#include "version.h" +#include +#include +#include "common.h" +#include "buf.h" +#include "configfile.h" +#include "char_base.h" +#include "char_data.h" +#include "pet_skill.h" +#include "battle.h" +#include "battle_event.h" +#include "battle_magic.h" +#include "item.h" +#include "item_gen.h" +#include "char_talk.h" + +/*======================================================================== + * 矢永玄及 卞勾中化及末□旦 宠物的各式技能 + *========================================================================*/ + + +static Petskill *PETSKILL_petskill; +static int PETSKILL_petskillnum; + +typedef struct tagPetskill_PetskillFunctionTable +{ + char *functionname; /* 涩烂白央奶伙卞踏仁楮醒及 蟆 */ + PETSKILL_CALLFUNC func; /* 端卞裟太请今木月楮醒 */ + int hash; /* hash */ + int status; /* 仇及戊穴件玉毛矢永玄互隙烂仄凶执 */ +}PETSKILL_PetskillFunctionTable; + +/* 毛 支仄凶日仇仇卞瓒 允月仪 */ +static PETSKILL_PetskillFunctionTable PETSKILL_functbl[] = { + { "PETSKILL_None", PETSKILL_None, 0 }, + { "PETSKILL_NormalAttack", PETSKILL_NormalAttack, 0 }, + { "PETSKILL_NormalGuard", PETSKILL_NormalGuard, 0 }, + { "PETSKILL_ContinuationAttack",PETSKILL_ContinuationAttack, 0 }, + { "PETSKILL_ChargeAttack", PETSKILL_ChargeAttack, 0 }, + { "PETSKILL_Guardian", PETSKILL_Guardian, 0 }, + { "PETSKILL_PowerBalance", PETSKILL_PowerBalance, 0 }, + { "PETSKILL_Mighty", PETSKILL_Mighty, 0 }, + { "PETSKILL_StatusChange", PETSKILL_StatusChange, 0 }, + { "PETSKILL_EarthRound", PETSKILL_EarthRound, 0 }, + { "PETSKILL_GuardBreak", PETSKILL_GuardBreak, 0 }, +#ifdef _SKILL_GUARDBREAK2//破除防御2 vincent add 2002/05/20 + { "PETSKILL_GuardBreak2", PETSKILL_GuardBreak2, 0 }, +#endif + { "PETSKILL_Abduct", PETSKILL_Abduct, 0 }, + { "PETSKILL_Steal", PETSKILL_Steal, 0 }, + { "PETSKILL_Merge", PETSKILL_Merge, 0 }, +#ifdef _ALCHEMIST + { "PETSKILL_Alchemist", PETSKILL_Merge, 0 }, +#endif + { "PETSKILL_NoGuard", PETSKILL_NoGuard, 0 }, +#ifdef _ITEM_INSLAY + { "PETSKILL_Inslay", PETSKILL_Inslay, 0 }, +#endif +#ifdef _PETSKILL_FIXITEM + { "PETSKILL_Fixitem", PETSKILL_Fixitem, 0 }, +#endif + +#ifdef _MAGIC_SUPERWALL + { "PETSKILL_MagicStatusChange" , PETSKILL_MagicStatusChange, 0}, +#endif + +// Terry add 2001/11/05 +#ifdef __ATTACK_MAGIC + { "PETSKILL_AttackMagic", PETSKILL_AttackMagic,0}, +#endif + +#ifdef _PSKILL_FALLGROUND + { "PETSKILL_FallGround", PETSKILL_FallGround, 0}, +#endif +#ifdef _PETSKILL_EXPLODE + { "PETSKILL_Explode", PETSKILL_Explode, 0}, +#endif +#ifdef _BATTLESTEAL_FIX + { "PETSKILL_StealMoney", PETSKILL_StealMoney, 0 }, +#endif +#ifdef _PRO_BATTLEENEMYSKILL + { "ENEMYSKILL_ReLife", ENEMYSKILL_ReLife, 0}, + { "ENEMYSKILL_ReHP", ENEMYSKILL_ReHP, 0}, + { "ENEMYSKILL_EnemyHelp", ENEMYSKILL_EnemyHelp, 0}, +#endif +#ifdef _SKILL_DAMAGETOHP + { "PETSKILL_DamageToHp", PETSKILL_DamageToHp, 0}, +#endif + +#ifdef _PETSKILL_TIMID + { "PETSKILL_BattleTimid", PETSKILL_BattleTimid, 0}, +#endif +#ifdef _PETSKILL_2TIMID + { "PETSKILL_2BattleTimid", PETSKILL_2BattleTimid, 0}, +#endif +#ifdef _PETSKILL_ANTINTER + { "PETSKILL_AntInter", PETSKILL_AntInter, 0}, +#endif + +#ifdef _PETSKILL_PROPERTY + { "PETSKILL_BattleProperty", PETSKILL_BattleProperty, 0}, +#endif + +#ifdef _PETSKILL_TEAR + { "PETSKILL_BattleTearDamage", PETSKILL_BattleTearDamage, 0}, +#endif + +#ifdef _BATTLE_LIGHTTAKE + { "PETSKILL_Lighttakeed", PETSKILL_Lighttakeed, 0}, +#endif + +#ifdef _BATTLE_ATTCRAZED + { "PETSKILL_AttackCrazed", PETSKILL_AttackCrazed, 0}, +#endif + +#ifdef _SHOOTCHESTNUT // Syu ADD 宠技:丢栗子 + { "PETSKILL_AttackShoot", PETSKILL_AttackShoot, 0}, +#endif + +#ifdef _Skill_MPDAMAGE + { "PETSKILL_MpDamage", PETSKILL_MpDamage, 0}, +#endif + +#ifdef _SKILL_TOOTH + { "PETSKILL_ToothCrushe", PETSKILL_ToothCrushe, 0}, +#endif + +#ifdef _PETSKILL_SETDUCK + { "PETSKILL_SetDuck", PETSKILL_SetDuck, 0}, +#endif +#ifdef _MAGICPET_SKILL + { "PETSKILL_SetMagicPet", PETSKILL_SetMagicPet, 0}, +#endif +#ifdef _PSKILL_MODIFY + { "PETSKILL_Modifyattack", PETSKILL_Modifyattack, 0}, +#endif + +#ifdef _PSKILL_MDFYATTACK + { "PETSKILL_Mdfyattack", PETSKILL_Mdfyattack, 0}, +#endif +#ifdef _VARY_WOLF + { "PETSKILL_Vary", PETSKILL_Vary, 0}, +#endif +#ifdef _SKILL_WILDVIOLENT_ATT + { "PETSKILL_WildViolentAttack", PETSKILL_WildViolentAttack, 0},//vincent add 2002/05/16 +#endif + +#ifdef _SKILL_SPEEDY_ATT + { "PETSKILL_SpeedyAttack", PETSKILL_SpeedyAttack, 0},//vincent add 2002/05/20 +#endif +#ifdef _SKILL_SACRIFICE + { "PETSKILL_Sacrifice", PETSKILL_Sacrifice, 0},//vincent add 2002/05/30 +#endif +#ifdef _SKILL_REFRESH + { "PETSKILL_Refresh", PETSKILL_Refresh, 0},//vincent add 2002/08/08 +#endif +#ifdef _SKILL_WEAKEN //vincent宠技:虚弱 + { "PETSKILL_Weaken", PETSKILL_Weaken, 0},//vincent add 2002/07/11 +#endif +#ifdef _SKILL_DEEPPOISON //vincent宠技:剧毒 + { "PETSKILL_Deeppoison", PETSKILL_Deeppoison, 0},//vincent add 2002/07/16 +#endif +#ifdef _SKILL_BARRIER //vincent宠技:魔障 + { "PETSKILL_Barrier", PETSKILL_Barrier, 0},//vincent add 2002/07/16 +#endif +#ifdef _SKILL_NOCAST //vincent宠技:沉默 + { "PETSKILL_Nocast", PETSKILL_Nocast, 0},//vincent add 2002/07/16 +#endif +#ifdef _SKILL_ROAR //vincent宠技:大吼 + { "PETSKILL_Roar", PETSKILL_Roar, 0},//vincent add 2002/07/11 +#endif + +#ifdef _PET_SKILL_SARS // WON ADD 毒煞蔓延 + { "PETSKILL_Sars", PETSKILL_Sars, 0}, +#endif + +#ifdef _SONIC_ATTACK // WON ADD 音波攻击 + { "PETSKILL_Sonic", PETSKILL_Sonic, 0}, +#endif +#ifdef _PETSKILL_REGRET + { "PETSKILL_Regret", PETSKILL_Regret, 0}, +#endif + +#ifdef _PETSKILL_GYRATE + { "PETSKILL_Gyrate", PETSKILL_Gyrate, 0}, +#endif + +#ifdef _PETSKILL_ACUPUNCTURE //针刺外皮 + { "PETSKILL_Acupuncture", PETSKILL_Acupuncture, 0}, +#endif + +#ifdef _PETSKILL_RETRACE + { "PETSKILL_Retrace", PETSKILL_Retrace, 0}, +#endif + +#ifdef _PETSKILL_HECTOR + { "PETSKILL_Hector", PETSKILL_Hector, 0}, +#endif + +#ifdef _PETSKILL_FIREKILL + { "PETSKILL_Firekill", PETSKILL_Firekill, 0}, +#endif + +#ifdef _PETSKILL_DAMAGETOHP + { "PETSKILL_DamageToHp2", PETSKILL_DamageToHp2, 0}, +#endif + +#ifdef _PETSKILL_BECOMEFOX + { "PETSKILL_BecomeFox", PETSKILL_BecomeFox, 0}, +#endif + +#ifdef _PETSKILL_BECOMEPIG + { "PETSKILL_BecomePig", PETSKILL_BecomePig, 0}, +#endif + +#ifdef _PETSKILL_SHOWMERCY + { "PETSKILL_ShowMercy", PETSKILL_ShowMercy, 0}, +#endif + +#ifdef _PETSKILL_COMBINED + { "PETSKILL_Combined", PETSKILL_Combined, 0}, +#endif +#ifdef _PETSKILL_LER + { "PETSKILL_BatFly", PETSKILL_BatFly, 0}, + { "PETSKILL_DivideAttack", PETSKILL_DivideAttack, 0}, +#endif +#ifdef _PETSKILL_BATTLE_MODEL + { "PETSKILL_BattleModel", PETSKILL_BattleModel, 0}, +#endif + +}; + +/*----------------------------------------------------------------------*/ + + +/* 湘 民尼永弁]失弁本旦楮溢 */ +/*----------------------------------------------------------------------*/ +INLINE BOOL PETSKILL_CHECKINDEX( int index ) +{ + if( PETSKILL_petskillnum<=index || index<0 )return FALSE; + return TRUE; +} +/*----------------------------------------------------------------------*/ +static INLINE BOOL PETSKILL_CHECKINTDATAINDEX( int index) +{ + if( PETSKILL_DATAINTNUM <= index || index < 0 ) return FALSE; + return TRUE; +} +/*----------------------------------------------------------------------*/ +static INLINE BOOL PETSKILL_CHECKCHARDATAINDEX( int index) +{ + if( PETSKILL_DATACHARNUM <= index || index < 0 ) return FALSE; + return TRUE; +} +/*----------------------------------------------------------------------*/ +INLINE int PETSKILL_getInt( int index, PETSKILL_DATAINT element) +{ + return PETSKILL_petskill[index].data[element]; +} +/*----------------------------------------------------------------------*/ +INLINE int PETSKILL_setInt( int index, PETSKILL_DATAINT element, int data) +{ + int buf; + buf = PETSKILL_petskill[index].data[element]; + PETSKILL_petskill[index].data[element]=data; + return buf; +} +/*----------------------------------------------------------------------*/ +INLINE char* PETSKILL_getChar( int index, PETSKILL_DATACHAR element) +{ + if( !PETSKILL_CHECKINDEX( index)) return NULL; + if( !PETSKILL_CHECKCHARDATAINDEX( element)) return NULL; + return PETSKILL_petskill[index].string[element].string; +} + +/*----------------------------------------------------------------------*/ +INLINE BOOL PETSKILL_setChar( int index ,PETSKILL_DATACHAR element, char* new ) +{ + if(!PETSKILL_CHECKINDEX(index))return FALSE; + if(!PETSKILL_CHECKCHARDATAINDEX(element))return FALSE; + strcpysafe( PETSKILL_petskill[index].string[element].string, + sizeof(PETSKILL_petskill[index].string[element].string), + new ); + return TRUE; +} +/*---------------------------------------------------------------------- + * 矢永玄 及醒毛襞月[ + *---------------------------------------------------------------------*/ +int PETSKILL_getPetskillNum( void) +{ + return PETSKILL_petskillnum; +} + +#ifdef _CFREE_petskill +#define PETSKILL_STARTINTNUM 7 //PETSKILL_DATACHARNUM+1 +#else +#define PETSKILL_STARTINTNUM 5 +#endif + +/*---------------------------------------------------------------------- + * 矢永玄 及涩烂白央奶伙毛 戈//初始宠技 + *---------------------------------------------------------------------*/ +BOOL PETSKILL_initPetskill( char *filename) +{ + FILE* f; + char line[256]; + int linenum=0; + int petskill_readlen=0; + int i,j; + int max_skillid =0; + + f = fopen(filename,"r"); + if( f == NULL ){ + print( "file open error\n"); + return FALSE; + } + + PETSKILL_petskillnum=0; + + /* 引内 躲卅垫互窒垫丐月井升丹井譬屯月 *///读曲宠技总数 + while( fgets( line, sizeof( line ), f ) ){ + char token[256]; + linenum ++; + if( line[0] == '#' )continue; /* comment */ + if( line[0] == '\n' )continue; /* none */ + chomp( line ); + PETSKILL_petskillnum++; +#ifdef _PETSKILL_OPTIMUM // Robin 取出最大宠技ID + if( getStringFromIndexWithDelim( line, ",", PETSKILL_STARTINTNUM, token, sizeof(token)) == FALSE ) + continue; + //print("\n 宠技ID:%d %s ", atoi( token), line); + max_skillid = max( atoi( token), max_skillid); +#endif + } + + if( fseek( f, 0, SEEK_SET ) == -1 ){ + fprint( "寻找失败\n" ); + fclose(f); + return FALSE; + } + +#ifdef _PETSKILL_OPTIMUM // 宠技Table数为 最大技能ID +1 + PETSKILL_petskillnum = max_skillid +1; +// print("\n 最大宠技ID = %d\n", max_skillid); +#endif + + PETSKILL_petskill = allocateMemory( sizeof(struct tagPetskill) + * PETSKILL_petskillnum ); + if( PETSKILL_petskill == NULL ){ + fprint( "无法分配内存 %d\n" , + sizeof(struct tagPetskill)*PETSKILL_petskillnum); + fclose( f ); + return FALSE; + } + + /* 赓渝祭 */ + for( i = 0; i < PETSKILL_petskillnum; i ++ ) { + for( j = 0; j < PETSKILL_DATAINTNUM; j ++ ) { + PETSKILL_setInt( i,j,-1); + } + for( j = 0; j < PETSKILL_DATACHARNUM; j ++ ) { + PETSKILL_setChar( i,j,""); + } + } + + /* 引凶 心 允 */ + linenum = 0; + while( fgets( line, sizeof( line ), f ) ){ + linenum ++; + if( line[0] == '#' )continue; /* comment */ + if( line[0] == '\n' )continue; /* none */ + + chomp( line ); + + /* 垫毛帮溥允月 */ + /* 引内 tab 毛 " " 卞 五晶尹月 */ + replaceString( line, '\t' , ' ' ); + /* 燮 及旦矢□旦毛潸月[*/ +{ + char buf[256]; + for( i = 0; i < strlen( line); i ++) { + if( line[i] != ' ' ) { + break; + } + strcpy( buf, &line[i]); + } + if( i != 0 ) { + strcpy( line, buf); + } +} +{ + char token[256]; + int ret; + +#ifdef _PETSKILL_OPTIMUM // 读取本行宠技的ID, 直接以宠技ID当Table index + ret = getStringFromIndexWithDelim( line, ",", PETSKILL_STARTINTNUM, token, sizeof(token)); + if( ret==FALSE ){ + fprint("文件语法错误:%s 第%d行\n",filename,linenum); + break; + } + petskill_readlen = atoi( token); +#endif + + for( i = 0; i < PETSKILL_DATACHARNUM; i ++ ) { + /* 侬 迕玄□弁件毛苇月 */ + ret = getStringFromIndexWithDelim( line,",", i + 1, token,sizeof(token)); + if( ret==FALSE ){ + fprint("文件语法错误:%s 第%d行\n",filename,linenum); + break; + } + PETSKILL_setChar( petskill_readlen, i, token); + } + + /* 4勾 动嫦反醒袄犯□正 */ + for( i = PETSKILL_STARTINTNUM; i < PETSKILL_DATAINTNUM+PETSKILL_STARTINTNUM; i ++ ) { + ret = getStringFromIndexWithDelim( line,",",i,token, + sizeof(token)); + if( ret==FALSE ){ + fprint("文件语法错误:%s 第%d行\n",filename,linenum); + break; + } + if( strlen( token) != 0 ) { + PETSKILL_setInt( petskill_readlen, i - PETSKILL_STARTINTNUM, atoi( token)); + } + } + if( i < PETSKILL_DATAINTNUM+PETSKILL_STARTINTNUM ) continue; + +#ifdef _CFREE_petskill + if(line[0]=='E') PETSKILL_setInt( petskill_readlen, PETSKILL_ILLEGAL, 1); +#else + // Robin 2001/02/26 +1 set_illegal_Skill + if(line[0]=='T') PETSKILL_setInt( petskill_readlen, PETSKILL_ILLEGAL, 1); +#endif + //print("Id:%d illegal:%d\n",PETSKILL_getInt(petskill_readlen,PETSKILL_ID),PETSKILL_getInt(petskill_readlen,PETSKILL_ILLEGAL)); + + petskill_readlen ++; +} + + } + fclose(f); + + PETSKILL_petskillnum = petskill_readlen; + + + print( "有效宠物技能数是 %d...", PETSKILL_petskillnum ); + + /* hash 及瓒 */ + for( i = 0; i < arraysizeof( PETSKILL_functbl); i ++ ) { + PETSKILL_functbl[i].hash = hashpjw( PETSKILL_functbl[i].functionname); + } +/* +#ifdef _CFREE_petskill + for( i=0; i = 0 && petskillid < PETSKILL_petskillnum ) + return PETSKILL_petskill[petskillid].data[PETSKILL_ID]; +#else + int i; + for( i = 0; i < PETSKILL_petskillnum; i ++ ) { + if( PETSKILL_petskill[i].data[PETSKILL_ID] == petskillid ) { + return i; + } + } +#endif + return -1; +} +/*------------------------------------------------------------ + * 矢永玄 及楮醒 井日禾奶件正□毛忒允 + * 娄醒 + * name char* 热诸及 蟆 + * 忒曰袄 + * 楮醒尺及禾奶件正[卅中桦宁卞反NULL + ------------------------------------------------------------*/ +PETSKILL_CALLFUNC PETSKILL_getPetskillFuncPointer(char* name ) +{ + int i; + int hash = hashpjw( name ); + for( i = 0 ; i< arraysizeof( PETSKILL_functbl) ; i++ ) { + if( PETSKILL_functbl[i].hash == hash ) { + if( strcmp( PETSKILL_functbl[i].functionname, name ) == 0 ) { + return PETSKILL_functbl[i].func; + } + } + } + return NULL; +} + +int PETSKILL_Use( + int charaindex, + int havepetskill, + int toindex, + char *data + //BOOL isCLI // Robin 2001/02/26 if owner is player +) +{ + int array, petskillid; + int ret,i; + PETSKILL_CALLFUNC func; + char combined[32], *pszOption; + + petskillid = CHAR_getPetSkill( charaindex, havepetskill); +#ifdef _FIXWOLF // Syu ADD 修正狼人变身Bug + if( petskillid == 600 ){ + if ( CHAR_getInt ( charaindex , CHAR_BASEIMAGENUMBER) == 101428 ) + petskillid = -1; + } +#endif + + array = PETSKILL_getPetskillArray( petskillid); + if( array == -1 ) return FALSE; + + if(PETSKILL_getInt(array, PETSKILL_ILLEGAL)){ + if( (CHAR_getInt(charaindex, CHAR_WHICHTYPE)==CHAR_TYPEPET) ){ + print(" CHAR_TYPEPET:%d ", charaindex); + return FALSE; + } + } +#ifdef _PETSKILL_CHECKTYPE +#define _SKILLTYPE_NONE 0x01 +#define _SKILLTYPE_BATTLE 0x02 + if( (CHAR_getInt(charaindex, CHAR_WHICHTYPE)==CHAR_TYPEPET) && + (PETSKILL_getInt( array, PETSKILL_USETYPE) & _SKILLTYPE_BATTLE) > 0){ + int masterindex = CHAR_getWorkInt( charaindex, CHAR_WORKPLAYERINDEX); + if( !CHAR_CHECKINDEX( masterindex) ) return FALSE; + if( CHAR_getWorkInt( masterindex, CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE ){ + return FALSE; + } + } +#endif + func = PETSKILL_getPetskillFuncPointer( PETSKILL_getChar( array, PETSKILL_FUNCNAME) ); + if( func ) { + ret = func( charaindex, toindex, array, data ); + }else { + ret = FALSE; + } + return ret; +} + + +int _PETSKILL_GetArray( char *file, int line, int charaindex, int havepetskill ) +{ + int petskillid,array; + + petskillid = CHAR_getPetSkill( charaindex, havepetskill); + if( petskillid == -1 ) { + return -1; + } + + array = PETSKILL_getPetskillArray( petskillid); + + return array; +} + + +//---------------------------------------------------------------------- +int PETSKILL_ContinuationAttack( + int charaindex, + int toindex, + int array, + char *data + +) +{ + char *pszOption; + int N = 1; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_RENZOKU ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toindex ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + + pszOption = PETSKILL_getChar( array, PETSKILL_OPTION ); + if( sscanf( pszOption, "%d", &N ) == 1 ){ + if( N < 1 || N > 10 )N = 1; + }else{ + N = 1; + } + + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, N ); + + return TRUE; +} + +int PETSKILL_ChargeAttack( + int charaindex, + int toindex, + int array, + char *data +) +{ + char *pszOption, *pszP; + int N = 1, Per = 0; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_CHARGE ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toindex ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + pszOption = PETSKILL_getChar( array, PETSKILL_OPTION ); + if( sscanf( pszOption, "%d", &N ) == 1 ){ + if( N < 1 || N > 10 )N = 1; + }else{ + N = 1; + } + if( (pszP = strstr( pszOption, "攻%" ) ) != NULL ){ + sscanf( pszP+3, "%d", &Per ); + } + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, N ); + CHAR_SETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3, Per ); + return TRUE; +} + +int PETSKILL_Guardian( + int charaindex, + int toNo, + int array, + char *data +) +{ + char *pszOption, *pszP; + int + battleindex, side, pos, ownerpos, + strdef, flg; + float fPer = 0.01; + + pszOption = PETSKILL_getChar( array, PETSKILL_OPTION ); + + if( (pszP = strstr( pszOption, "攻%" ) ) != NULL ){ + sscanf( pszP+3, "%f", &fPer ); + fPer=(fPer/100); + strdef=CHAR_getWorkInt(charaindex,CHAR_WORKFIXSTR); + strdef=(int)(strdef * fPer); + CHAR_setWorkInt(charaindex,CHAR_WORKATTACKPOWER,(CHAR_getWorkInt(charaindex,CHAR_WORKFIXSTR)+strdef)); + } + + if( (pszP = strstr( pszOption, "防%" ) ) != NULL ){ + sscanf( pszP+3, "%f", &fPer ); + fPer=(fPer/100); + strdef=CHAR_getWorkInt(charaindex,CHAR_WORKFIXTOUGH); + strdef=(int)(strdef * fPer); + CHAR_setWorkInt(charaindex,CHAR_WORKDEFENCEPOWER,(CHAR_getWorkInt(charaindex,CHAR_WORKFIXTOUGH)+strdef)); + } + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_GUARDIAN_ATTACK ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + + flg = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEFLG ); + flg |= CHAR_BATTLEFLG_GUARDIAN; + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEFLG, flg ); + + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + + pos = BATTLE_Index2No( battleindex, charaindex ); + + if( (pszP = strstr( pszOption, "COM:" ) ) != NULL + && strstr( pszP+4, "防御" ) != NULL + ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_GUARD ); + + side = ( toNo >= SIDE_OFFSET )?( 1 ):( 0 ); + ownerpos = toNo - side * SIDE_OFFSET; + + if( 0 <= ownerpos && ownerpos < SIDE_OFFSET ){ + BattleArray[battleindex].Side[side].Entry[ownerpos].guardian = pos; + } + + }else{ + side = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLESIDE ); + ownerpos = pos - 5; + ownerpos -= side * SIDE_OFFSET; + + if( ownerpos < 0 || ownerpos > 19 ){ + }else{ + BattleArray[battleindex].Side[side].Entry[ownerpos].guardian = pos; + } + } + + return TRUE; +} + +int PETSKILL_Mighty( + int charaindex, + int toindex, + int array, + char *data +) +{ + char *pszOption, *pszP; + int iBai = 0, iDuck = 0; + float fBai = 2.00; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_MIGHTY ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toindex ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + pszOption = PETSKILL_getChar( array, PETSKILL_OPTION ); + if( (pszP = strstr( pszOption, "倍" ) ) != NULL ){ + sscanf( pszP+2, "%f", &fBai ); + iBai = (int)(fBai * 100); + } + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, iBai ); + pszOption = PETSKILL_getChar( array, PETSKILL_OPTION ); + if( ( pszP = strstr( pszOption, "避" ) ) != NULL){ + sscanf( pszP+2, "%d", &iDuck ); + } + CHAR_SETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3, iDuck ); + return TRUE; +} + + + +int PETSKILL_PowerBalance( + int charaindex, + int toindex, + int array, + char *data +) +{ + char *pszOption, *pszP; + float fPer = 0.01; + int strdef; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_POWERBALANCE); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toindex ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + + pszOption = PETSKILL_getChar( array, PETSKILL_OPTION ); + + if( pszOption == NULL ) { + print("\n pszOption == NULL "); + return FALSE; + } + if( (pszP = strstr( pszOption, "攻%" ) ) != NULL ){ + sscanf( pszP+3, "%f", &fPer ); + fPer=(fPer/100); + strdef=CHAR_getWorkInt(charaindex,CHAR_WORKFIXSTR); + strdef=(int)(strdef * fPer); + CHAR_setWorkInt(charaindex,CHAR_WORKATTACKPOWER,(CHAR_getWorkInt(charaindex,CHAR_WORKFIXSTR)+strdef)); + } + + if( (pszP = strstr( pszOption, "防%" ) ) != NULL ){ + sscanf( pszP+3, "%f", &fPer ); + fPer=(fPer/100); + strdef=CHAR_getWorkInt(charaindex,CHAR_WORKFIXTOUGH); + strdef=(int)(strdef * fPer); + CHAR_setWorkInt(charaindex,CHAR_WORKDEFENCEPOWER,(CHAR_getWorkInt(charaindex,CHAR_WORKFIXTOUGH)+strdef)); + } + + return TRUE; +} + +//---------------------------------------------------------------------- +int PETSKILL_StatusChange( + int charaindex, + int toindex, + int array, + char *data + +) +{ + char *pszOption, *pszP; + float fPer = 0.01; + int strdef; + int status = -1, i = 0, turn = 3; + char szTurn[] = "turn"; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_STATUSCHANGE ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toindex ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + + pszOption = PETSKILL_getChar( array, PETSKILL_OPTION ); + pszP = pszOption; + + for( ;status == -1 && pszP[0] != 0; pszP++ ){ + for( i = 1; i < BATTLE_ST_END; i ++ ){ + if( strncmp( pszP, aszStatus[i], 2 ) == 0 ){ + status = i; + pszP +=2; + break; + } + } + } + + if( ( pszP = strstr( pszP, szTurn ) ) != NULL){ + pszP += sizeof( szTurn ); + sscanf( pszP, "%d", &turn ); + } + + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, i ); + CHAR_SETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3, turn ); + + if( (pszP = strstr( pszOption, "攻%" ) ) != NULL ){ + sscanf( pszP+3, "%f", &fPer ); + fPer=(fPer/100); + strdef=CHAR_getWorkInt(charaindex,CHAR_WORKFIXSTR); + strdef=(int)(strdef * fPer); + CHAR_setWorkInt(charaindex,CHAR_WORKATTACKPOWER, + (CHAR_getWorkInt(charaindex,CHAR_WORKFIXSTR)+strdef) ); + } + + if( (pszP = strstr( pszOption, "防%" ) ) != NULL ){ + sscanf( pszP+3, "%f", &fPer ); + fPer=(fPer/100); + + strdef=CHAR_getWorkInt(charaindex,CHAR_WORKFIXTOUGH); + strdef=(int)(strdef * fPer); + CHAR_setWorkInt(charaindex,CHAR_WORKDEFENCEPOWER, + (CHAR_getWorkInt(charaindex,CHAR_WORKFIXTOUGH)+strdef)); + } + + + return TRUE; + +} + +#ifdef _VARY_WOLF + +int PETSKILL_Vary( int cindex, int tindex, int id, char* data) +{ + char *pszOption, *pszP; + float fPer = 0.01; + int a_dep; + int d_dep; + int i; + int petid[4] = {981,982,983,984}; + + for( i=0; i<4; i++) { + if( CHAR_getInt( cindex, CHAR_PETID) == petid[i] ) break; + } + if( i>= 4 ) return FALSE; + + CHAR_setWorkInt( cindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_VARY); + CHAR_setWorkInt( cindex, CHAR_WORKBATTLECOM2, tindex ); + CHAR_setWorkInt( cindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + + pszOption = PETSKILL_getChar( id, PETSKILL_OPTION ); + + + if(pszOption==NULL){ + print("\n pszOption==NULL"); + return FALSE; + } + if( (pszP = strstr( pszOption, "攻%" ) ) != NULL ){ + sscanf( pszP+3, "%f", &fPer ); + CHAR_setWorkInt( cindex, CHAR_SKILLSTRPOWER, fPer); + fPer = fPer / 100; + a_dep = CHAR_getWorkInt( cindex, CHAR_WORKFIXSTR); + a_dep = (int)(a_dep * fPer); + CHAR_setWorkInt( cindex, CHAR_WORKATTACKPOWER, CHAR_getWorkInt( cindex, CHAR_WORKFIXSTR) + a_dep); + + } + if( (pszP = strstr( pszOption, "敏%" ) ) != NULL ){ + sscanf( pszP+3, "%f", &fPer ); + CHAR_setWorkInt( cindex, CHAR_SKILLDEXPOWER, fPer); + fPer = fPer / 100; + d_dep = CHAR_getWorkInt( cindex, CHAR_WORKFIXDEX); + d_dep = (int)(d_dep * fPer); + CHAR_setWorkInt( cindex, CHAR_WORKQUICK, CHAR_getWorkInt( cindex, CHAR_WORKFIXDEX) + d_dep); + + } + CHAR_setInt( cindex, CHAR_BASEIMAGENUMBER, 101428); + CHAR_setWorkInt( cindex, CHAR_WORKTURN, 0); + + return TRUE; +} +#endif + +#ifdef _SKILL_WILDVIOLENT_ATT + +int PETSKILL_WildViolentAttack( + int charaindex, + int toindex, + int array, + char *data + +) +{ + char *pszOption, *pszP; + float fPer = 0.01; + int strdef=0; + int iDuck = 0; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_WILDVIOLENTATTACK); + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toindex ); + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + + pszOption = PETSKILL_getChar( array, PETSKILL_OPTION ); + + if( pszOption == NULL ) { + print("\n pszOption == NULL "); + return FALSE; + } + //读取攻值 + if( (pszP = strstr( pszOption, "攻%" ) ) != NULL ){ + sscanf( pszP+3, "%f", &fPer ); + fPer=(fPer/100); + + //设定修正值 + strdef=CHAR_getWorkInt(charaindex,CHAR_WORKFIXSTR); + strdef=(int)(strdef * fPer); + CHAR_setWorkInt(charaindex,CHAR_WORKATTACKPOWER,(CHAR_getWorkInt(charaindex,CHAR_WORKFIXSTR)+strdef)); + } + //读取防值 + if( (pszP = strstr( pszOption, "防%" ) ) != NULL ){ + sscanf( pszP+3, "%f", &fPer ); + fPer=(fPer/100); + + //设定修正值 + strdef=CHAR_getWorkInt(charaindex,CHAR_WORKFIXTOUGH); + strdef=(int)(strdef * fPer); + CHAR_setWorkInt(charaindex,CHAR_WORKDEFENCEPOWER,(CHAR_getWorkInt(charaindex,CHAR_WORKFIXTOUGH)+strdef)); + } + //读取避值 + if( ( pszP = strstr( pszOption, "避" ) ) != NULL){ + sscanf( pszP+2, "%d", &iDuck ); + } + // 膜恳毛忡绣 + CHAR_SETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3, iDuck ); + + return TRUE; +} +#endif + +#ifdef _SKILL_SACRIFICE +int PETSKILL_Sacrifice( + int charaindex, + int toindex, + int array, + char *data + +) +{ + char buf[256]; + + if(CHAR_getInt(charaindex,CHAR_HP) > CHAR_getWorkInt(charaindex,CHAR_WORKMAXHP)*0.2 ) + { + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_SACRIFICE); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toindex ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + } + else + { + + sprintf(buf, "%s自身耐久力不足 救援失败!!", CHAR_getChar( charaindex, CHAR_NAME )); + CHAR_talkToCli( CHAR_getWorkInt(charaindex, CHAR_WORKPLAYERINDEX), -1, buf, CHAR_COLORYELLOW); + return FALSE; + } + return TRUE; +} +#endif +#ifdef _SKILL_REFRESH +int PETSKILL_Refresh( + int charaindex, + int toindex, + int array, + char *data + +) +{ + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_REFRESH); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toindex ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, array); + return TRUE; +} +#endif +#ifdef _SKILL_WEAKEN //vincent宠技:虚弱 +int PETSKILL_Weaken( + int charaindex, + int toindex, + int array, + char *data + +) +{ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_WEAKEN); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toindex ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, array); + return TRUE; +} +#endif +#ifdef _SKILL_DEEPPOISON //vincent宠技:剧毒 +int PETSKILL_Deeppoison( + int charaindex, + int toindex, + int array, + char *data + +) +{ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_DEEPPOISON); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toindex ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, array); + return TRUE; +} +#endif + +#ifdef _SKILL_BARRIER //vincent宠技:魔障 +int PETSKILL_Barrier( + int charaindex, + int toindex, + int array, + char *data + +) +{ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_BARRIER); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toindex ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, array); + return TRUE; +} +#endif + +#ifdef _SKILL_NOCAST //vincent宠技:沉默 +int PETSKILL_Nocast( + int charaindex, + int toindex, + int array, + char *data + +) +{ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_NOCAST); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toindex ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, array); + return TRUE; +} +#endif + +#ifdef _SKILL_ROAR //vincent宠技:大吼 +int PETSKILL_Roar( + int charaindex, + int toindex, + int array, + char *data + +) +{ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_ROAR); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toindex ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, array); + return TRUE; +} +#endif + +#ifdef _SKILL_GUARDBREAK2//破除防御2 vincent add 2002/05/20 +int PETSKILL_GuardBreak2( + int charaindex, + int toNo, + int array, + char *data + +) +{ + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_GBREAK2 ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + + return TRUE; + +} +#endif + +//******************************************************* +int PETSKILL_NormalAttack( + int charaindex, + int toindex, + int array, + char *data + +) +{ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_ATTACK ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toindex ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + + return TRUE; + +} + +int PETSKILL_NormalGuard( + int charaindex, + int toindex, + int array, + char *data + +) +{ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_GUARD ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toindex ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + + return TRUE; + +} + + +int PETSKILL_None( + int charaindex, + int toindex, + int array, + char *data +) +{ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toindex ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + + return TRUE; +} + + +int PETSKILL_EarthRound( + int charaindex, + int toNo, + int array, + char *data +) +{ + char *pszOption, *pszP; + float fPer = 0.01; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_EARTHROUND1 ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + pszOption = PETSKILL_getChar( array, PETSKILL_OPTION ); + + if( (pszP = strstr( pszOption, "攻%" ) ) != NULL ){ + sscanf( pszP+3, "%f", &fPer ); + CHAR_setWorkInt(charaindex,CHAR_WORKBATTLECOM3, (int)fPer ); + } + + + return TRUE; + +} + + +int PETSKILL_GuardBreak( + int charaindex, + int toNo, + int array, + char *data + +) +{ + char *pszOption, *pszP; + float fPer = 0.01; + int strdef; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_GBREAK ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + + pszOption = PETSKILL_getChar( array, PETSKILL_OPTION ); + + if( (pszP = strstr( pszOption, "攻%" ) ) != NULL ){ + sscanf( pszP+3, "%f", &fPer ); + fPer=(fPer/100); + + strdef=CHAR_getWorkInt(charaindex,CHAR_WORKFIXSTR); + strdef=(int)(strdef * fPer); + CHAR_setWorkInt(charaindex,CHAR_WORKATTACKPOWER,(CHAR_getWorkInt(charaindex,CHAR_WORKFIXSTR)+strdef)); + } + + + return TRUE; + +} +#ifdef _SKILL_SPEEDY_ATT//疾速攻击 vincent add 2002/05/20 +int PETSKILL_SpeedyAttack( + int charaindex, + int toNo, + int array, + char *data + +) +{ + char *pszOption, *pszP; + float fPer = 0.01; + int strdef=0; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_SPEEDYATTACK ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + + pszOption = PETSKILL_getChar( array, PETSKILL_OPTION ); + + if( pszOption == NULL ) { + print("\n pszOption == NULL "); + return FALSE; + } + + //读取防值 + if( (pszP = strstr( pszOption, "防%" ) ) != NULL ){ + sscanf( pszP+3, "%f", &fPer ); + fPer=(fPer/100); + + //设定修正值 + strdef=CHAR_getWorkInt(charaindex,CHAR_WORKFIXTOUGH); + strdef=(int)(strdef * fPer); + CHAR_setWorkInt(charaindex,CHAR_WORKDEFENCEPOWER,(CHAR_getWorkInt(charaindex,CHAR_WORKFIXTOUGH)+strdef)); + } + + return TRUE; + +} +#endif + +int PETSKILL_Abduct( + int charaindex, + int toNo, + int array, + char *data +) +{ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_ABDUCT ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, array); + + return TRUE; +} + +int PETSKILL_Steal( + int charaindex, + int toNo, + int array, + char *data +) +{ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_STEAL ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + return TRUE; +} + +#ifdef _BATTLESTEAL_FIX +int PETSKILL_StealMoney( int charaindex, int toNo, int array, char *data) +{ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_STEALMONEY ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + return TRUE; +} +#endif + +//******************************************************* +// 檗 -- 失奶 丞宁岳 +// +int PETSKILL_Merge( + int charaindex, + int toNo, + int array, + char *data +) +{ + int ret, ownerindex; + + // Robin 0521 debug + ownerindex = CHAR_getWorkInt( charaindex, CHAR_WORKPLAYERINDEX); + if( CHAR_getWorkInt( ownerindex, CHAR_WORKBATTLEMODE ) != BATTLE_CHARMODE_NONE ){ + print(" Merge_ErrB:fd=%d ", ownerindex); + return FALSE; + } + ret = ITEM_mergeItem_merge( CHAR_getWorkInt( charaindex, CHAR_WORKPLAYERINDEX), + CHAR_getInt( charaindex, CHAR_PETID), data, charaindex, 0); + return ret; +} + +#ifdef _ALCHEMIST +int PETSKILL_Alchemist( + int charaindex, + int toNo, + int array, + char *data +) +{ + int ret, ownerindex; + + // Robin 0521 debug + ownerindex = CHAR_getWorkInt( charaindex, CHAR_WORKPLAYERINDEX); + if( CHAR_getWorkInt( ownerindex, CHAR_WORKBATTLEMODE ) != BATTLE_CHARMODE_NONE ){ + print(" Merge_Alchemist_ErrB:fd=%d ", ownerindex); + return FALSE; + } + ret = ITEM_mergeItem_merge( CHAR_getWorkInt( charaindex, CHAR_WORKPLAYERINDEX), + CHAR_getInt( charaindex, CHAR_PETID), data, charaindex, 1); + return ret; +} +#endif + +int PETSKILL_NoGuard( + int charaindex, + int toNo, + int array, + char *data + +) +{ + char *pszOption, *pszP; + int Duck = 0, Counter = 0, Critical = 0; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_NOGUARD ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + pszOption = PETSKILL_getChar( array, PETSKILL_OPTION ); + if( (pszP = strstr( pszOption, "避%" ) ) != NULL ){ + sscanf( pszP+3, "%d", &Duck ); + CHAR_SETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3, Duck ); + } + if( (pszP = strstr( pszOption, "击%" ) ) != NULL ){ + sscanf( pszP+3, "%d", &Counter ); + } + if( (pszP = strstr( pszOption, "心%" ) ) != NULL ){ + sscanf( pszP+3, "%d", &Critical ); + } + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, + (Counter << 8) + Critical ); + + return TRUE; +} + +#ifdef __ATTACK_MAGIC + +int PETSKILL_AttackMagic( + int charaindex, + int toindex, + int array, + char *data +) +{ + char *pszP; + char szMagic[] = "magic"; + char szItem[] = "item"; + int magic = 313,item = 19659; // magic id预设为火魔法等级一,item index预设为19659 + + // 取得宠物技能命令 + pszP = PETSKILL_getChar( array, PETSKILL_OPTION ); + + // 取得施放的魔法的magic id + if((pszP = strstr(pszP,szMagic)) != NULL) + { + pszP += sizeof(szMagic); + sscanf(pszP,"%d",&magic); + } + // 取得有此魔法属性的item index + if((pszP = strstr(pszP,szItem)) != NULL) + { + pszP += sizeof(szItem); + sscanf(pszP,"%d",&item); + } + // 设定宠物技能为魔法 + CHAR_setWorkInt(charaindex,CHAR_WORKBATTLECOM1,BATTLE_COM_S_ATTACK_MAGIC ); + // 攻击目标设定 + CHAR_setWorkInt(charaindex,CHAR_WORKBATTLECOM2,toindex); + // 设定所使用的是那一种魔法 + CHAR_SETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3,magic); + // 设定所使用的魔法的道具 + CHAR_SETWORKINT_HIGH(charaindex,CHAR_WORKBATTLECOM3,item); + // 命令下达完毕 + CHAR_setWorkInt(charaindex,CHAR_WORKBATTLEMODE,BATTLE_CHARMODE_C_OK ); + + return TRUE; +} + +#endif + +#ifdef _PSKILL_FALLGROUND //落马术 +int PETSKILL_FallGround( int charaindex, int toNo, int array, char *data ) +{ + char *pszOption, *pszP; + float fPer = 0.01; + int strdef; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_FALLRIDE ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + + pszOption = PETSKILL_getChar( array, PETSKILL_OPTION ); + if( (pszP = strstr( pszOption, "攻%" ) ) != NULL ){ + sscanf( pszP+3, "%f", &fPer ); + fPer=(fPer/100); + strdef=CHAR_getWorkInt(charaindex,CHAR_WORKFIXSTR); + strdef=(int)(strdef * fPer); + CHAR_setWorkInt(charaindex,CHAR_WORKATTACKPOWER,(CHAR_getWorkInt(charaindex,CHAR_WORKFIXSTR)+strdef)); + } + return TRUE; + +} //BATTLE_COM_S_DAMAGETOHP +#endif +#ifdef _PETSKILL_EXPLODE +int PETSKILL_Explode( int charaindex, int toNo, int array, char *data ) +{ + char *pszOption, *pszP; + float fPer = 0.01; + int strdef; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + if( BattleArray[CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX )].type != BATTLE_TYPE_P_vs_P ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_ATTACK ); + return TRUE; + } + else + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_EXPLODE ); + + + + pszOption = PETSKILL_getChar( array, PETSKILL_OPTION ); + if( (pszP = strstr( pszOption, "命%" ) ) != NULL ){ + sscanf( pszP+3, "%f", &fPer ); + fPer=(fPer/100); + strdef=CHAR_getWorkInt(charaindex,CHAR_WORKFIXSTR); + strdef=(int)(strdef * fPer); + CHAR_setWorkInt(charaindex,CHAR_WORKFIXDEX,(CHAR_getWorkInt(charaindex,CHAR_WORKFIXDEX)+strdef)); + } + if( (pszP = strstr( pszOption, "防%" ) ) != NULL ){ + sscanf( pszP+3, "%f", &fPer ); + fPer=(fPer/100); + strdef=CHAR_getWorkInt(charaindex,CHAR_WORKFIXSTR); + strdef=(int)(strdef * fPer); + CHAR_setWorkInt(charaindex,CHAR_WORKATTACKPOWER,(CHAR_getWorkInt(charaindex,CHAR_WORKFIXSTR)+strdef)); + } + return TRUE; + +} +#endif + +#ifdef _PRO_BATTLEENEMYSKILL +int ENEMYSKILL_ReLife( int enemyindex, int toNo, int array, char *data ) +{ + CHAR_setWorkInt( enemyindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_ENEMYRELIFE ); + CHAR_setWorkInt( enemyindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( enemyindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + return TRUE; +} + +int ENEMYSKILL_ReHP( int enemyindex, int toNo, int array, char *data ) +{ + CHAR_setWorkInt( enemyindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_ENEMYREHP ); + CHAR_setWorkInt( enemyindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( enemyindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + return TRUE; +} + +int ENEMYSKILL_EnemyHelp( int enemyindex, int toNo, int array, char *data ) +{ + CHAR_setWorkInt( enemyindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_ENEMYHELP ); + CHAR_setWorkInt( enemyindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( enemyindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + return TRUE; +} + +#endif + +#ifdef _SKILL_DAMAGETOHP //嗜血技 { "PETSKILL_DamageToHp", PETSKILL_DamageToHp, 0}, +int PETSKILL_DamageToHp( int charaindex, int toNo, int array, char *data ) +{ + char *pszOption; + char buf1[256]; + int strdef; + float def=0.00; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_DAMAGETOHP ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + CHAR_SETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3, array); //记录技能 + pszOption = PETSKILL_getChar( array, PETSKILL_OPTION ); + + if( pszOption == NULL ) return FALSE; + if( getStringFromIndexWithDelim( pszOption, "|", 1, buf1, sizeof( buf1)) == FALSE ) + return FALSE; + + strdef = CHAR_getWorkInt(charaindex,CHAR_WORKFIXSTR); + def = (atoi( buf1)/100); + strdef = strdef - (int)(strdef*def); + CHAR_setWorkInt( charaindex, CHAR_WORKATTACKPOWER, strdef); + + return TRUE; + +} +#endif + +#ifdef _Skill_MPDAMAGE +int PETSKILL_MpDamage( int charaindex, int toNo, int array, char *data ) +{ + char *pszOption; + char buf1[256]; + int strdef; + float def=0.00; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_MPDAMAGE ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + CHAR_SETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3, array); ////记录技能 + + pszOption = PETSKILL_getChar( array, PETSKILL_OPTION ); + if( pszOption == NULL ) return FALSE; + if( getStringFromIndexWithDelim( pszOption, "|", 1, buf1, sizeof( buf1)) == FALSE ) + return FALSE; + + def = (float)(atoi( buf1)/100); + strdef = CHAR_getWorkInt(charaindex,CHAR_WORKFIXSTR); + strdef = strdef - (int)( strdef*def); + CHAR_setWorkInt( charaindex, CHAR_WORKATTACKPOWER, strdef); + + return TRUE; +} +#endif + + +#ifdef _SKILL_TOOTH +int PETSKILL_ToothCrushe( int charaindex, int toNo, int array, char *data ) +{ + //char *pszOption; + //char buf1[256]; + //int strdef; + //float def=0.00; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_TOOTHCRUSHE ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, array); //记录技能 +/* + pszOption = PETSKILL_getChar( array, PETSKILL_OPTION ); + if( pszOption == NULL ) return FALSE; + if( getStringFromIndexWithDelim( pszOption, "|", 1, buf1, sizeof( buf1)) == FALSE ) + return FALSE; + + def = (float)(atoi( buf1)/100); + strdef = CHAR_getWorkInt(charaindex,CHAR_WORKFIXSTR); + strdef = strdef - (int)( strdef*def); + CHAR_setWorkInt( charaindex, CHAR_WORKATTACKPOWER, strdef); +*/ + return TRUE; +} +#endif +#ifdef _PSKILL_MODIFY +int PETSKILL_Modifyattack( int charaindex, int toNo, int array, char *data ) +{ + //char *pszOption; + //char buf1[256]; + //int strdef; + //float def=0.00; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_MODIFYATT ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, array); //记录技能 +/* + pszOption = PETSKILL_getChar( array, PETSKILL_OPTION ); + if( pszOption == NULL ) return FALSE; + if( getStringFromIndexWithDelim( pszOption, "|", 1, buf1, sizeof( buf1)) == FALSE ) + return FALSE; + + def = (float)(atoi( buf1)/100); + strdef = CHAR_getWorkInt(charaindex,CHAR_WORKFIXSTR); + strdef = strdef - (int)( strdef*def); + CHAR_setWorkInt( charaindex, CHAR_WORKATTACKPOWER, strdef); +*/ + return TRUE; +} +#endif + +#ifdef _PSKILL_MDFYATTACK +int PETSKILL_Mdfyattack( int charaindex, int toNo, int array, char *data ) +{ + char *pszOption; + char buf1[256]; + char MNodify[][36]={"EA","WA","FI","WI"}; + int nums, i; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_MDFYATTACK); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, array);//记录属性 + + pszOption = PETSKILL_getChar( array, PETSKILL_OPTION ); + if( pszOption == NULL ) return FALSE; + if( getStringFromIndexWithDelim( pszOption, "|", 1, buf1, sizeof( buf1)) == FALSE ) + return FALSE; + for( i=0; i<4; i++) { + if( strcmp( buf1, MNodify[i]) ) continue; + break; + } + if( i == 4 ) return FALSE; + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM4, i);//记录属性 + if( getStringFromIndexWithDelim( pszOption, "|", 2, buf1, sizeof( buf1)) == FALSE ) + return FALSE; + nums=atoi( buf1); + CHAR_SETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM4, nums);//记录数值 + return TRUE; +} +#endif + +#ifdef _ITEM_INSLAY +int PETSKILL_Inslay( int index, int toNo, int array, char *data) +{ + int charaindex, petid; + + int inslayindex=-1, inslayno=-1; + int i, j, itemno; +#define MAXINSLAY 4 + int itemindexs[MAXINSLAY]={-1,-1,-1,-1}; + int itemnos[MAXINSLAY]={-1,-1,-1,-1}; + + if( !CHAR_CHECKINDEX( index) ) return FALSE; + if( CHAR_getInt( index, CHAR_WHICHTYPE) != CHAR_TYPEPET ) return FALSE; + charaindex = CHAR_getWorkInt( index, CHAR_WORKPLAYERINDEX); + if( !CHAR_CHECKINDEX( charaindex) ) return FALSE; + + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ) != BATTLE_CHARMODE_NONE ) + return FALSE; + petid = CHAR_getInt( charaindex, CHAR_PETID); + + + for( i = 0; i < 15; i ++ ) { + char buf[256]; + char *buf1; + int itemindex; + if( getStringFromIndexWithDelim( data , "|", i+1, buf, sizeof( buf ) ) == FALSE ) break; + itemno = atoi( buf); + if( !CHAR_CHECKITEMINDEX( charaindex, itemno) ) continue; + itemindex = CHAR_getItemIndex( charaindex, itemno); + if( !ITEM_CHECKINDEX( itemindex) ) continue; + + if( i >= MAXINSLAY ) { + CHAR_talkToCli( charaindex, -1, "精工每次只能选择四个物品。", CHAR_COLORYELLOW); + return FALSE; + } + for( j=0; j< MAXINSLAY; j++ ) { + if( itemindexs[j] == itemindex ) { + print("精工物品index相同 ERROR !!\n"); + return FALSE; + } + } + if( (buf1 = ITEM_getChar( itemindex, ITEM_TYPECODE)) == NULL ) { + print(" ITEM_TYPECODE == NULL 错误 !!\n"); + return FALSE; + } + if( !strcmp( buf1, "\0") || !strcmp( buf1, "NULL") ) { + CHAR_talkToCli( charaindex, -1, "这样物品不适合精工。", CHAR_COLORYELLOW); + return FALSE; + } + if( strstr( buf1, "INSLAY") != 0 ) { + if( !ITEM_CHECKINDEX( inslayindex)) { + inslayindex = itemindex; + inslayno = itemno; + }else { + CHAR_talkToCli( charaindex, -1, "精工每次只能选择一个武器或防具。", CHAR_COLORYELLOW); + return FALSE; + } + } + itemindexs[i] = itemindex; + itemnos[i] = itemno; + } + + if( !ITEM_CHECKINDEX( inslayindex) ) { + CHAR_talkToCli( charaindex, -1, "精工必须选择一个武器或防具。", CHAR_COLORYELLOW); + return FALSE; + } + + for( i=0; i< MAXINSLAY; i++) { + if( !ITEM_CHECKINDEX( itemindexs[i]) )break; + if( inslayindex == itemindexs[i] ) continue; + if( PETSKILL_ITEM_inslay( charaindex, inslayindex, itemindexs[i] ) == FALSE ){ + return FALSE; + } + CHAR_DelItem( charaindex, itemnos[i]); +/* + CHAR_setItemIndex( charaindex, itemnos[i] ,-1); + CHAR_sendItemDataOne( charaindex, itemnos[i] ); + ITEM_endExistItemsOne( itemindexs[i]); +*/ + } + + CHAR_sendItemDataOne( charaindex, inslayno ); + CHAR_complianceParameter( charaindex ); + CHAR_send_P_StatusString( charaindex, CHAR_P_STRING_ATK | CHAR_P_STRING_DEF + | CHAR_P_STRING_QUICK | CHAR_P_STRING_CHARM ); + + return TRUE; +} + +#endif + +#ifdef _MAGIC_SUPERWALL +int PETSKILL_MagicStatusChange( int charaindex, int toindex, int array, char *data ) +{ + if( CHAR_CHECKINDEX( charaindex ) == FALSE ) return FALSE; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_SUPERWALL); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toindex ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, array);//记录属性 + + return TRUE; +} + +#endif + +#ifdef _PETSKILL_SETDUCK +int PETSKILL_SetDuck( int charaindex, int toNo, int array, char *data ) +{ + if( CHAR_CHECKINDEX( charaindex ) == FALSE ) + return FALSE; + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_SETDUCK); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, array);//记录属性 + + + CHAR_setWorkInt( charaindex, CHAR_MAGICPETMP, 0 ); + return TRUE; +} +#endif + +#ifdef _MAGICPET_SKILL +int PETSKILL_SetMagicPet( int charaindex, int toNo, int array, char *data ) +{ + int nums=0; + if( CHAR_CHECKINDEX( charaindex ) == FALSE ) + return FALSE; + + nums = CHAR_getWorkInt( charaindex, CHAR_MAGICPETMP); + if( nums >= 3 ){ + int toindex = CHAR_getWorkInt( charaindex, CHAR_WORKPLAYERINDEX); + CHAR_talkToCli( toindex, -1, "此技能单场限用叁次。", CHAR_COLORYELLOW); + return FALSE; + } + CHAR_setWorkInt( charaindex, CHAR_MAGICPETMP, nums ); + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_SETMAGICPET); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, array);//记录属性 + return TRUE; +} +#endif + +#ifdef _PETSKILL_FIXITEM +int PETSKILL_Fixitem( int index, int toNo, int array, char *data) +{ + int charaindex, petid; + + int fixindex=-1, fixno=-1; + int i, j, itemno; +#define MAXFIXITEM 2 + int itemindexs[MAXFIXITEM]={-1,-1}; + int itemnos[MAXFIXITEM]={-1,-1}; + + if( !CHAR_CHECKINDEX( index) ) return FALSE; + if( CHAR_getInt( index, CHAR_WHICHTYPE) != CHAR_TYPEPET ) return FALSE; + charaindex = CHAR_getWorkInt( index, CHAR_WORKPLAYERINDEX); + if( !CHAR_CHECKINDEX( charaindex) ) return FALSE; + + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ) != BATTLE_CHARMODE_NONE ) + return FALSE; + petid = CHAR_getInt( charaindex, CHAR_PETID); + + + for( i = 0; i < 15; i ++ ) { + char buf[256]; + int itemtype=-1; + int itemindex; + if( getStringFromIndexWithDelim( data , "|", i+1, buf, sizeof( buf ) ) == FALSE ) break; + itemno = atoi( buf); + if( !CHAR_CHECKITEMINDEX( charaindex, itemno) ) continue; + itemindex = CHAR_getItemIndex( charaindex, itemno); + if( !ITEM_CHECKINDEX( itemindex) ) continue; + + if( i >= MAXFIXITEM ) { + CHAR_talkToCli( charaindex, -1, "修复每次只能选择两个物品。", CHAR_COLORYELLOW); + return FALSE; + } + for( j=0; j< MAXFIXITEM; j++ ) { + if( itemindexs[j] == itemindex ) { + print("修复物品index相同 ERROR !!\n"); + return FALSE; + } + } + itemtype = ITEM_getInt( itemindex, ITEM_TYPE); + if( itemtype == ITEM_DISH ) { + CHAR_talkToCli( charaindex, -1, "料理不能做修复。", CHAR_COLORYELLOW); + return FALSE; + } + + if( (itemtype >= ITEM_FIST && itemtype <= ITEM_AMULET) || + itemtype == ITEM_BOOMERANG || itemtype == ITEM_BOUNDTHROW || itemtype == ITEM_BREAKTHROW){ + if( !ITEM_CHECKINDEX( fixindex)) { + fixindex = itemindex; + fixno = itemno; + }else { + CHAR_talkToCli( charaindex, -1, "修复每次只能选择一个武器或防具。", CHAR_COLORYELLOW); + return FALSE; + } + } + + itemindexs[i] = itemindex; + itemnos[i] = itemno; + } + + if( !ITEM_CHECKINDEX( fixindex) ) { + CHAR_talkToCli( charaindex, -1, "修复必须选择一个武器或防具。", CHAR_COLORYELLOW); + return FALSE; + } + + if( PETSKILL_ITEM_FixItem( charaindex, fixindex, itemindexs ) == FALSE ){ + return FALSE; + }else { + for( i=0; i< MAXFIXITEM; i++) { + if( !ITEM_CHECKINDEX( itemindexs[i]) )break; + if( fixindex == itemindexs[i] ) continue; + CHAR_setItemIndex( charaindex, itemnos[i] ,-1); + CHAR_sendItemDataOne( charaindex, itemnos[i] ); + ITEM_endExistItemsOne( itemindexs[i]); + } + } + + CHAR_sendItemDataOne( charaindex, fixno ); + CHAR_complianceParameter( charaindex ); + CHAR_send_P_StatusString( charaindex, CHAR_P_STRING_ATK | CHAR_P_STRING_DEF + | CHAR_P_STRING_QUICK | CHAR_P_STRING_CHARM ); + CHAR_talkToCli( charaindex, -1, "修复完成。", CHAR_COLORYELLOW); + return TRUE; +} +#endif + +#ifdef _PETSKILL_TIMID +int PETSKILL_BattleTimid( int charaindex, int toNo, int array, char *data ) +{ + if( !CHAR_CHECKINDEX( charaindex) ) return FALSE; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER ) return FALSE; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_TIMID ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + + CHAR_setWorkInt( charaindex, CHAR_WORKATTACKPOWER, ( CHAR_getWorkInt( charaindex, CHAR_WORKFIXSTR)*0.7) ); + CHAR_setWorkInt( charaindex, CHAR_WORKDEFENCEPOWER, ( CHAR_getWorkInt( charaindex, CHAR_WORKFIXTOUGH)*0.4) ); + CHAR_setWorkInt( charaindex, CHAR_WORKQUICK, ( CHAR_getWorkInt( charaindex, CHAR_WORKFIXDEX)*0.8) ); + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, array);//记录属性 + + return TRUE; +} +#endif +#ifdef _PETSKILL_2TIMID +int PETSKILL_2BattleTimid( int charaindex, int toNo, int array, char *data ) +{ + char *pszOption=NULL; + char *pszP; + float fPer=0; + if( !CHAR_CHECKINDEX( charaindex) ) return FALSE; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_2TIMID ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + + pszOption = PETSKILL_getChar( array, PETSKILL_OPTION ); + if( pszOption == NULL ) return FALSE; + if( (pszP = strstr( pszOption, "-攻%" ) ) != NULL ){ + sscanf( pszP+4, "%f", &fPer ); + fPer=(fPer/100); + CHAR_setWorkInt( charaindex, CHAR_WORKATTACKPOWER, (CHAR_getWorkInt( charaindex, CHAR_WORKFIXSTR)*fPer) ); + } + if( (pszP = strstr( pszOption, "+攻%" ) ) != NULL ){ + sscanf( pszP+4, "%f", &fPer ); + fPer=(fPer/100); + CHAR_setWorkInt( charaindex, CHAR_WORKATTACKPOWER, CHAR_getWorkInt( charaindex, CHAR_WORKFIXSTR)+(CHAR_getWorkInt( charaindex, CHAR_WORKFIXSTR)*fPer) ); + } + if( (pszP = strstr( pszOption, "-防%" ) ) != NULL ){ + sscanf( pszP+4, "%f", &fPer ); + fPer=(fPer/100); + CHAR_setWorkInt( charaindex, CHAR_WORKDEFENCEPOWER, ( CHAR_getWorkInt( charaindex, CHAR_WORKFIXTOUGH)*fPer) ); + } + if( (pszP = strstr( pszOption, "+防%" ) ) != NULL ){ + sscanf( pszP+4, "%f", &fPer ); + fPer=(fPer/100); + CHAR_setWorkInt( charaindex, CHAR_WORKDEFENCEPOWER, CHAR_getWorkInt( charaindex, CHAR_WORKFIXTOUGH)+(CHAR_getWorkInt( charaindex, CHAR_WORKFIXTOUGH)*fPer) ); + } + if( (pszP = strstr( pszOption, "-敏%" ) ) != NULL ){ + sscanf( pszP+4, "%f", &fPer ); + fPer=(fPer/100); + CHAR_setWorkInt( charaindex, CHAR_WORKQUICK, ( CHAR_getWorkInt( charaindex, CHAR_WORKFIXDEX)*fPer) ); + } + if( (pszP = strstr( pszOption, "+敏%" ) ) != NULL ){ + sscanf( pszP+4, "%f", &fPer ); + fPer=(fPer/100); + CHAR_setWorkInt( charaindex, CHAR_WORKQUICK, CHAR_getWorkInt( charaindex, CHAR_WORKFIXDEX)+(CHAR_getWorkInt( charaindex, CHAR_WORKFIXDEX)*fPer) ); + } + + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, array);//记录属性 + + return TRUE; +} +#endif +#ifdef _PETSKILL_ANTINTER +int PETSKILL_AntInter( int charaindex, int toNo, int array, char* data) +{ + if( !CHAR_CHECKINDEX( charaindex) ) return FALSE; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_ANTINTER); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, array);//记录属性 + return TRUE; +} +#endif + +#ifdef _PETSKILL_PROPERTY +int PETSKILL_BattleProperty( int charaindex, int toNo, int array, char *data ) +{ + if( !CHAR_CHECKINDEX( charaindex) ) return FALSE; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER ) return FALSE; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_PROPERTYSKILL ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + +// CHAR_setWorkInt( charaindex, CHAR_WORKATTACKPOWER, ( CHAR_getWorkInt( charaindex, CHAR_WORKFIXSTR)*0.7) ); +// CHAR_setWorkInt( charaindex, CHAR_WORKDEFENCEPOWER, ( CHAR_getWorkInt( charaindex, CHAR_WORKFIXTOUGH)*0.5) ); +// CHAR_setWorkInt( charaindex, CHAR_WORKQUICK, ( CHAR_getWorkInt( charaindex, CHAR_WORKFIXDEX)*0.95) ); + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, array);//记录属性 + + return TRUE; +} +#endif + +#ifdef _PETSKILL_TEAR +int PETSKILL_BattleTearDamage( int charaindex, int toNo, int array, char *data ) +{ + if( !CHAR_CHECKINDEX( charaindex) ) return FALSE; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER ) return FALSE; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_PETSKILLTEAR ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + + CHAR_setWorkInt( charaindex, CHAR_WORKATTACKPOWER, ( CHAR_getWorkInt( charaindex, CHAR_WORKFIXSTR)*0.9) ); + CHAR_setWorkInt( charaindex, CHAR_WORKDEFENCEPOWER, ( CHAR_getWorkInt( charaindex, CHAR_WORKFIXTOUGH)*0.8) ); + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, array);//记录属性 + return TRUE; +} +#endif + + +#ifdef _BATTLE_LIGHTTAKE +int PETSKILL_Lighttakeed( int charaindex, int toNo, int array, char *data ) +{ + if( !CHAR_CHECKINDEX( charaindex) ) return FALSE; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER ) return FALSE; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_LIGHTTAKE ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + + CHAR_setWorkInt( charaindex, CHAR_WORKATTACKPOWER, (CHAR_getWorkInt( charaindex, CHAR_WORKFIXSTR)*0.7) ); + CHAR_setWorkInt( charaindex, CHAR_WORKDEFENCEPOWER, (CHAR_getWorkInt( charaindex, CHAR_WORKFIXTOUGH)*0.5) ); +// CHAR_setWorkInt( charaindex, CHAR_WORKQUICK, (CHAR_getWorkInt( charaindex, CHAR_WORKFIXDEX)*0.95) ); + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, array);//记录属性 + return TRUE; +} +#endif + +#ifdef _BATTLE_ATTCRAZED +int PETSKILL_AttackCrazed( int charaindex, int toNo, int array, char *data ) +{ + char *pszOption=NULL; + if( !CHAR_CHECKINDEX( charaindex) ) return FALSE; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER ) return FALSE; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_ATTCRAZED ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + + CHAR_setWorkInt( charaindex, CHAR_WORKATTACKPOWER, (CHAR_getWorkInt( charaindex, CHAR_WORKFIXSTR)*0.8) ); + CHAR_setWorkInt( charaindex, CHAR_WORKDEFENCEPOWER, (CHAR_getWorkInt( charaindex, CHAR_WORKFIXTOUGH)*0.7) ); + + pszOption = PETSKILL_getChar( array, PETSKILL_OPTION ); + if( pszOption == NULL ) return FALSE; + + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, array);//记录属性 + CHAR_SETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3, atoi(pszOption)); + return TRUE; +} +#endif + +#ifdef _SHOOTCHESTNUT // Syu ADD 宠技:丢栗子 +int PETSKILL_AttackShoot( int charaindex, int toNo, int array, char *data ) +{ + //int n = RAND ( 3 , 5 ) ; + int n ; + int loyal = CHAR_getWorkInt( charaindex, CHAR_WORKFIXAI ); + char bb1[16] , bb2[16] ; + char *buf = NULL ; + if( !CHAR_CHECKINDEX( charaindex) ) return FALSE; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER ) return FALSE; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_ATTSHOOT ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + + buf = PETSKILL_getChar( array , PETSKILL_OPTION ) ; + if ( buf == NULL ) return FALSE; + getStringFromIndexWithDelim( buf , "|", 1 , bb1 , sizeof( bb1 ) ); + getStringFromIndexWithDelim( buf , "|", 2 , bb2 , sizeof( bb2 ) ); + n = RAND ( atoi(bb1) , atoi(bb2) ) ; + if ( loyal >= 100 ) { + if ( RAND ( 1 , 300 ) > 299 ) + n = 8 ; + else if ( (CHAR_getInt( charaindex , CHAR_HP )) < 20 && ( RAND ( 1 , 50 ) > 49 ) ) + n = 8 ; + } +/* + if ( n != 8 ) + CHAR_setWorkInt( charaindex, CHAR_WORKATTACKPOWER, (CHAR_getWorkInt( charaindex, CHAR_WORKFIXSTR) * 1.2 / n ) ); + else + CHAR_setWorkInt( charaindex, CHAR_WORKATTACKPOWER, (CHAR_getWorkInt( charaindex, CHAR_WORKFIXSTR) * 1.2 / 4 ) ); + CHAR_setWorkInt( charaindex, CHAR_WORKDEFENCEPOWER, (CHAR_getWorkInt( charaindex, CHAR_WORKFIXTOUGH) * 1) ); +*/ + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, array);//记录属性 + CHAR_SETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3, n); + return TRUE; +} +#endif + +#ifdef _PET_SKILL_SARS // WON ADD 毒煞蔓延 +int PETSKILL_Sars( int charaindex, int toNo, int array, char *data ) +{ + + char *pszOption, *pszP; + int status = -1, i = 0, turn = 3; + char szTurn[] = "turn"; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_SARS ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + + pszOption = PETSKILL_getChar( array, PETSKILL_OPTION ); + pszP = pszOption; + + for( ;status == -1 && pszP[0] != 0; pszP++ ){ + for( i = 1; i < BATTLE_ST_END; i ++ ){ + if( strncmp( pszP, aszStatus[i], 2 ) == 0 ){ + status = i; + pszP +=2; + break; + } + } + } + + if( ( pszP = strstr( pszP, szTurn ) ) != NULL){ + pszP += sizeof( szTurn ); + sscanf( pszP, "%d", &turn ); + } + + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, status ); + CHAR_SETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3, turn ); + + return TRUE; + + +} +#endif + +#ifdef _SONIC_ATTACK // WON ADD 音波攻击 +int PETSKILL_Sonic( int charaindex, int toNo, int array, char *data ) +{ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_SONIC ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, array); //记录属性 + return TRUE; + +} +#endif +#ifdef _PETSKILL_REGRET +int PETSKILL_Regret( int charaindex, int toNo, int array, char *data ) +{ + char *pszOption, *pszP; + int strdef; + float fPer = 0.01; + pszOption = PETSKILL_getChar( array, PETSKILL_OPTION ); + if( (pszP = strstr( pszOption, "攻%" ) ) != NULL ){ + sscanf( pszP+3, "%f", &fPer ); + fPer=(fPer/100); + strdef=CHAR_getWorkInt(charaindex,CHAR_WORKFIXSTR); + strdef=(int)(strdef * fPer); + CHAR_setWorkInt(charaindex,CHAR_WORKATTACKPOWER,(CHAR_getWorkInt(charaindex,CHAR_WORKFIXSTR)+strdef)); + } + + if( (pszP = strstr( pszOption, "防%" ) ) != NULL ){ + sscanf( pszP+3, "%f", &fPer ); + fPer=(fPer/100); + strdef=CHAR_getWorkInt(charaindex,CHAR_WORKFIXTOUGH); + strdef=(int)(strdef * fPer); + CHAR_setWorkInt(charaindex,CHAR_WORKDEFENCEPOWER,(CHAR_getWorkInt(charaindex,CHAR_WORKFIXTOUGH)+strdef)); + } + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_REGRET ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, array); //记录属性 + return TRUE; + +} +#endif + +#ifdef _PETSKILL_GYRATE +int PETSKILL_Gyrate( int charaindex, int toNo, int array, char *data ) +{ + char *pszOption, *pszP; + float fPer = 0.01; + int strdef=0; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_GYRATE ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); //攻击对象 23,24,25,26 为单排 + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + + pszOption = PETSKILL_getChar( array, PETSKILL_OPTION ); + + if( pszOption == NULL ) { + print("\n pszOption == NULL "); + return FALSE; + } + + //读取攻值 + if( (pszP = strstr( pszOption, "攻%" ) ) != NULL ){ + sscanf( pszP+3, "%f", &fPer ); + fPer=(fPer/100); + + //设定修正值 + strdef=CHAR_getWorkInt(charaindex,CHAR_WORKFIXSTR); + strdef=(int)(strdef * fPer); + CHAR_setWorkInt(charaindex,CHAR_WORKATTACKPOWER,(CHAR_getWorkInt(charaindex,CHAR_WORKFIXSTR)+strdef)); + } + + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, array); //记录属性 + return TRUE; +} +#endif + +#ifdef _PETSKILL_ACUPUNCTURE +int PETSKILL_Acupuncture( int charaindex, int toNo, int array, char *data ) +{ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_ACUPUNCTURE ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, array); //记录属性 + return TRUE; +} +#endif + +#ifdef _PETSKILL_RETRACE +int PETSKILL_Retrace( int charaindex, int toNo, int array, char *data ) +{ + //char *pszOption, *pszP; + //float fPer = 0.01; + //int strdef=0; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_RETRACE ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + +/* pszOption = PETSKILL_getChar( array, PETSKILL_OPTION ); + + if( pszOption == NULL ) { + print("\n pszOption == NULL "); + return FALSE; + } + + //读取攻值 + if( (pszP = strstr( pszOption, "攻%" ) ) != NULL ){ + sscanf( pszP+3, "%f", &fPer ); + fPer=(fPer/100); + //设定修正值 + strdef=CHAR_getWorkInt(charaindex,CHAR_WORKFIXSTR); + strdef=(int)(strdef * fPer); + CHAR_setWorkInt(charaindex,CHAR_WORKATTACKPOWER,(CHAR_getWorkInt(charaindex,CHAR_WORKFIXSTR)+strdef)); + } +*/ + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, array); //记录属性 + return TRUE; +} +#endif + +#ifdef _PETSKILL_HECTOR +int PETSKILL_Hector( int charaindex, int toNo, int array, char *data ) +{ + char *pszOption, *pszP; + float fPer = 0.01; + int strdef; + int status = -1;//, i = 0, turn = 3; + //char szTurn[] = "turn"; + int d_dep; + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_HECTOR ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + + pszOption = PETSKILL_getChar( array, PETSKILL_OPTION ); + + if( pszOption == NULL ) { + print("\n pszOption == NULL "); + return FALSE; + } + + //读取攻值 + if( (pszP = strstr( pszOption, "攻%" ) ) != NULL ){ + sscanf( pszP+3, "%f", &fPer ); + fPer=(fPer/100); + + //设定修正值 + strdef=CHAR_getWorkInt(charaindex,CHAR_WORKFIXSTR); + strdef=(int)(strdef * fPer); + CHAR_setWorkInt(charaindex,CHAR_WORKATTACKPOWER,(CHAR_getWorkInt(charaindex,CHAR_WORKFIXSTR)+strdef)); + } + + if( (pszP = strstr( pszOption, "敏%" ) ) != NULL ){ + sscanf( pszP+3, "%f", &fPer ); + CHAR_setWorkInt( charaindex, CHAR_SKILLDEXPOWER, fPer); + fPer = fPer / 100; + d_dep = CHAR_getWorkInt( charaindex, CHAR_WORKFIXDEX); + d_dep = (int)(d_dep * fPer); + CHAR_setWorkInt( charaindex, CHAR_WORKQUICK, CHAR_getWorkInt( charaindex, CHAR_WORKFIXDEX) + d_dep); + } + + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, array); //记录属性 + + return TRUE; +} +#endif + +#ifdef _PETSKILL_FIREKILL +int PETSKILL_Firekill( int charaindex, int toNo, int array, char *data ) +{ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_FIREKILL ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, array); //记录属性 + + return TRUE; +} +#endif + +#ifdef _PETSKILL_DAMAGETOHP +int PETSKILL_DamageToHp2( int charaindex, int toNo, int array, char *data ) +{ + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_DAMAGETOHP2 ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + CHAR_SETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3, array); //记录技能 +/* pszOption = PETSKILL_getChar( array, PETSKILL_OPTION ); + + if( pszOption == NULL ) return FALSE; + + strdef = CHAR_getWorkInt(charaindex,CHAR_WORKFIXSTR); + def = (atoi( pszOption)/100); + strdef = strdef - (int)(strdef*def); + CHAR_setWorkInt( charaindex, CHAR_WORKATTACKPOWER, strdef); +*/ + + return TRUE; + +} +#endif + +#ifdef _PETSKILL_BECOMEFOX +int PETSKILL_BecomeFox( int charaindex, int toNo, int array, char* data) +{ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_BECOMEFOX); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + CHAR_SETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3, array); //记录技能 + + return TRUE; +} +#endif + +#ifdef _PETSKILL_BECOMEPIG +int PETSKILL_BecomePig( int charaindex, int toNo, int array, char* data) +{ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_BECOMEPIG); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, array); //记录属性 + return TRUE; +} +#endif + +#ifdef _PETSKILL_LER +int PETSKILL_BatFly(int charaindex,int toNo,int array,char* data) +{ + CHAR_setWorkInt(charaindex,CHAR_WORKBATTLECOM1,BATTLE_COM_S_BAT_FLY); + CHAR_setWorkInt(charaindex,CHAR_WORKBATTLECOM2,toNo); + CHAR_setWorkInt(charaindex,CHAR_WORKBATTLEMODE,BATTLE_CHARMODE_C_OK); + CHAR_SETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3,array); + return TRUE; +} + +int PETSKILL_DivideAttack( int charaindex, int toNo, int array, char* data) +{ + CHAR_setWorkInt(charaindex,CHAR_WORKBATTLECOM1,BATTLE_COM_S_DIVIDE_ATTACK); + CHAR_setWorkInt(charaindex,CHAR_WORKBATTLECOM2,toNo); + CHAR_setWorkInt(charaindex,CHAR_WORKBATTLEMODE,BATTLE_CHARMODE_C_OK); + CHAR_SETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM3,array); + return TRUE; +} +#endif + +#ifdef _PETSKILL_BATTLE_MODEL +int PETSKILL_BattleModel(int charaindex, int toindex, int array, char* data) +{ + float fPer; + int i,iType,iObjectNum,iValue; + int iAddPowerType[3] = {CHAR_WORKATTACKPOWER,CHAR_WORKDEFENCEPOWER,CHAR_WORKQUICK}; + char *pszOption,szData[32],szData2[32]; + char szWord[3][3] = {"攻","防","敏"}; + + pszOption = PETSKILL_getChar(array,PETSKILL_OPTION); + if(pszOption == NULL){ + printf("PETSKILL_BattleModel: 读取 PETSKILL_OPTION 错误!!(数组:%d,文件:%s,第%d行)\n",array,__FILE__,__LINE__); + return FALSE; + } + + // 取得攻击类型 + if(getStringFromIndexWithDelim(pszOption,"|",1,szData,sizeof(szData)) == FALSE){ + printf("PETSKILL_BattleModel: no type data!!(文件:%s,第%d行)\n",__FILE__,__LINE__); + return FALSE; + } + iType = atoi(szData); + // 取得攻击物件数量 + if(getStringFromIndexWithDelim(pszOption,"|",2,szData,sizeof(szData)) == FALSE){ + printf("PETSKILL_BattleModel: no object number data!!(文件:%s,第%d行)\n",__FILE__,__LINE__); + return FALSE; + } + iObjectNum = atoi(szData); + if(iObjectNum <= 0) iObjectNum = RAND(1,10); + else if(iObjectNum > 10) iObjectNum = 10; + // 取得能力增减 + if(getStringFromIndexWithDelim(pszOption,"|",6,szData,sizeof(szData)) != FALSE){ + for(i=0;i<3;i++){ + if(getStringFromIndexWithDelim(szData," ",i+1,szData2,sizeof(szData2)) != FALSE){ + // 检查设定 + if(strstr(szData2,szWord[i]) != NULL){ + iValue = CHAR_getWorkInt(charaindex,CHAR_WORKATTACKPOWER); + // 有带 "%" 的设定 ex: "攻%" + if(strstr(szData2,"%") != NULL){ + sscanf(szData2 + 3,"%f",&fPer); + fPer = (fPer/100); + iValue += (int)(iValue * fPer); + } + // 没带 "%" 的设定 ex: "攻" + else{ + sscanf(szData2 + 2,"%f",&fPer); + iValue = (int)fPer; + } + CHAR_setWorkInt(charaindex,iAddPowerType[i],iValue); + } + } + else break; + } + } + + CHAR_setWorkInt(charaindex,CHAR_WORKBATTLEMODE,BATTLE_CHARMODE_C_OK); + CHAR_setWorkInt(charaindex,CHAR_WORKBATTLECOM1,BATTLE_COM_S_BATTLE_MODEL); + CHAR_SETWORKINT_LOW(charaindex,CHAR_WORKBATTLECOM2,iType); // 记录攻击类型 + CHAR_SETWORKINT_HIGH(charaindex,CHAR_WORKBATTLECOM2,iObjectNum); // 记录攻击物件数量 + CHAR_setWorkInt(charaindex,CHAR_WORKBATTLECOM3,array); + return TRUE; +} +#endif + +#ifdef _PETSKILL_SHOWMERCY +int PETSKILL_ShowMercy( int charaindex, int toNo, int array, char* data) +{ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_S_SHOWMERCY); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + + return TRUE; +} +#endif + +#ifdef _PETSKILL_COMBINED +int PETSKILL_Combined( int charaindex, int toNo, int array, char* data) +{ + char *pszOption; + char combined[32]; + int kill[10],count,i; + char killstr[32],countstr[32]; + + pszOption = PETSKILL_getChar( array, PETSKILL_OPTION ); + if( pszOption == NULL ) return FALSE; + + strcpy( combined, " " ); + getStringFromIndexWithDelim( pszOption, "|", 1, combined, sizeof( combined)); + if( strcmp( combined, "综合法" ) == 0 ){ + if( getStringFromIndexWithDelim( pszOption, "|", 2, countstr, sizeof( countstr)) == FALSE ) + return FALSE; + count = atoi(countstr); + if( count > 10 ) + count = 10; + for(i=0;i +#include +#include +#include "buf.h" +#include "profession_skill.h" +#include "char_base.h" +#include "battle.h" +#include "magic_base.h" +#include "configfile.h" +#include "char.h" +#include "lssproto_serv.h" +#include "skill.h" + +static Professionskill *PROFESSION_skill; + + +typedef struct tagProfessionskill_skillFunctionTable +{ + char *functionname; + PROFESSION_SKILL_CALLFUNC func; + int hash; +// int status; +}PROFESSION_SKILL_skillFunctionTable; + +static PROFESSION_SKILL_skillFunctionTable PROFESSION_SKILL_functbl[] = { + +// 巫师技能 + { "PROFESSION_VOLCANO_SPRINGS", PROFESSION_volcano_springs, 0 }, // 火山泉 + { "PROFESSION_FIRE_BALL", PROFESSION_fire_ball, 0 }, // 火星球 + { "PROFESSION_FIRE_SPEAR", PROFESSION_fire_spear, 0 }, // 火龙枪 + { "PROFESSION_SUMMON_THUNDER", PROFESSION_summon_thunder, 0 }, // 召雷术 + { "PROFESSION_CURRENT", PROFESSION_current, 0 }, // 电流术 + { "PROFESSION_STORM", PROFESSION_storm, 0 }, // 暴风雨 + { "PROFESSION_ICE_ARROW", PROFESSION_ice_arrow, 0 }, // 冰箭术 + { "PROFESSION_ICE_CRACK", PROFESSION_ice_crack, 0 }, // 冰爆术 + { "PROFESSION_ICE_MIRROR", PROFESSION_ice_mirror, 0 }, // 冰镜术 + { "PROFESSION_DOOM", PROFESSION_doom, 0 }, // 世界末日 + { "PROFESSION_BLOOD", PROFESSION_blood, 0 }, // 嗜血成性 + { "PROFESSION_BLOOD_WORMS", PROFESSION_blood_worms, 0 }, // 嗜血蛊 + { "PROFESSION_SIGN", PROFESSION_sign, 0 }, // 一针见血 + { "PROFESSION_FIRE_ENCLOSE", PROFESSION_fire_enclose, 0 }, // 火附体 + { "PROFESSION_ICE_ENCLOSE", PROFESSION_ice_eclose, 0 }, // 冰附体 + { "PROFESSION_THUNDER_ENCLOSE", PROFESSION_thunder_enclose, 0 }, // 雷附体 + { "PROFESSION_FIRE_PRACTICE", PROFESSION_fire_practice, 0 }, // 火魔法熟练度 + { "PROFESSION_ICE_PRACTICE", PROFESSION_ice_practice, 0 }, // 冰魔法熟练度 + { "PROFESSION_THUNDER_PRACTICE",PROFESSION_thunder_practice,0 }, // 雷魔法熟练度 + { "PROFESSION_ENCLOSE", PROFESSION_enclose, 0 }, // 附身术 + { "PROFESSION_TRANSPOSE", PROFESSION_transpose, 0 }, // 移形换位 +// { "PROFESSION_ALCHEMY", PROFESSION_alchemy, 0 }, // 炼金术 + +// 勇士技能 + { "PROFESSION_CHAIN_ATK", PROFESSION_chain_atk, 0 }, // 连环攻击 + { "PROFESSION_AVOID", PROFESSION_avoid, 0 }, // 回避 + { "PROFESSION_WEAPON_FOCUS", PROFESSION_weapon_focus, 0 }, // 武器专精 + { "PROFESSION_REBACK", PROFESSION_reback, 0 }, // 状态回复 + { "PROFESSION_BRUST", PROFESSION_brust, 0 }, // 爆击 + { "PROFESSION_CHAIN_ATK_2", PROFESSION_chain_atk_2, 0 }, // 双重攻击 + { "PROFESSION_SCAPEGOAT", PROFESSION_scapegoat, 0 }, // 舍已为友 + { "PROFESSION_ENRAGE", PROFESSION_enrage, 0 }, // 激化攻击 + { "PROFESSION_ENERGY_COLLECT", PROFESSION_energy_collect, 0 }, // 能量聚集 + { "PROFESSION_FOCUS", PROFESSION_focus, 0 }, // 专注战斗 + { "PROFESSION_SHIELD_ATTACK", PROFESSION_shield_attack, 0 }, // 盾击 + { "PROFESSION_DUAL_WEAPON", PROFESSION_dual_weapon, 0 }, // 二刀流 + { "PROFESSION_DEFLECT", PROFESSION_deflect, 0 }, // 格档 + { "PROFESSION_THROUGH_ATTACK", PROFESSION_through_attack, 0 }, // 贯穿攻击 + { "PROFESSION_CAVALRY", PROFESSION_cavalry, 0 }, // 座骑攻击 + { "PROFESSION_DEAD_ATTACK", PROFESSION_dead_attack, 0 }, // 濒死攻击 + { "PROFESSION_CONVOLUTE", PROFESSION_convolute, 0 }, // 回旋攻击 + { "PROFESSION_CHAOS", PROFESSION_chaos, 0 }, // 混乱攻击 + +// 猎人 + { "PROFESSION_TRACK", PROFESSION_track, 0 }, // 追寻敌踪 + { "PROFESSION_ESCAPE", PROFESSION_escape, 0 }, // 回避战斗 + { "PROFESSION_DOCILE", PROFESSION_docile, 0 }, // 驯伏宠物 + { "PROFESSION_TRAP", PROFESSION_trap, 0 }, // 陷阱 + { "PROFESSION_ENRAGE_PET", PROFESSION_enrage_pet, 0 }, // 激怒宠物 + { "PROFESSION_DRAGNET", PROFESSION_dragnet, 0 }, // 天罗地网 + { "PROFESSION_ENTWINE", PROFESSION_entwine, 0 }, // 树根缠绕 + { "PROFESSION_AUTARKY", PROFESSION_autarky, 0 }, // 自给自足 + { "PROFESSION_PLUNDER", PROFESSION_plunder, 0 }, // 体掠夺 + { "PROFESSION_TOXIN_WEAPON", PROFESSION_toxin_weapon, 0 }, // 毒素武器 + { "PROFESSION_RESIST_FIRE", PROFESSION_resist_fire, 0 }, // 火抗性 + { "PROFESSION_RESIST_ICE", PROFESSION_resist_ice, 0 }, // 冰抗性 + { "PROFESSION_RESIST_THUNDER", PROFESSION_resist_thunder, 0 }, // 雷抗性 +#ifdef _PROFESSION_ADDSKILL + { "PROFESSION_RESIST_F_I_T", PROFESSION_resist_f_i_t, 0 }, // 自然威能 + { "PROFESSION_CALL_NATURE", PROFESSION_call_nature, 0 }, // 号召自然 + { "PROFESSION_BOUNDARY", PROFESSION_boundary, 0 }, // 四属性结界 +#endif + { "PROFESSION_G_RESIST_FIRE", PROFESSION_g_resist_fire, 0 }, // 团体火抗性 + { "PROFESSION_G_RESIST_ICE", PROFESSION_g_resist_ice, 0 }, // 团体冰抗性 + { "PROFESSION_G_RESIST_THUNDER",PROFESSION_g_resist_thunder,0 }, // 团体雷抗性 + { "PROFESSION_ATTACK_WEAK", PROFESSION_attack_weak, 0 }, // 弱点攻击 + { "PROFESSION_INSTIGATE", PROFESSION_instigate, 0 }, // 挑拨 + { "PROFESSION_OBLIVION", PROFESSION_oblivion, 0 }, // 遗忘 + +// 共同技能 + { "PROFESSION_FULL_MP", PROFESSION_full_mp, 0 }, // 气力充沛 + { "PROFESSION_STRONG_BACK", PROFESSION_strong_back, 0 }, // 负重增加 + { "PROFESSION_STRENGTHEN", PROFESSION_strengthen, 0 }, // 自我强化 + +}; + + +static int profession_skill_num; // 职业技能总数 + +// 将 profession.txt 载入 +BOOL PROFESSION_initSkill( char *filename) +{ + + FILE* f; + char line[256]; + int linenum=-1; + int skill_readlen=0; + int i, j; + + int max_skillid = 0; + + f = fopen(filename,"r"); + if( f == NULL ){ + print( "file open error\n"); + return FALSE; + } + + profession_skill_num=0; + + while( fgets( line, sizeof( line ), f ) ){ + char token[256]; + + linenum ++; + if( line[0] == '#' )continue; + if( line[0] == '\n' )continue; + chomp( line ); + profession_skill_num++; +#ifdef _PROSKILL_OPTIMUM // Robin 取出最大职技ID + if( getStringFromIndexWithDelim( line, ",", + PROFESSION_SKILL_DATACHARNUM+PROFESSION_SKILL_ID+1, + token, sizeof(token)) == FALSE ) + continue; + max_skillid = max( atoi( token), max_skillid); +#endif + } + + if( fseek( f, 0, SEEK_SET ) == -1 ){ + fprint( "Seek Error\n" ); + fclose(f); + return FALSE; + } + +#ifdef _PROSKILL_OPTIMUM // 职技Table数为 最大技能ID +1 + profession_skill_num = max_skillid +1; + print("最大职技ID = %d ...", max_skillid); +#endif + + PROFESSION_skill = allocateMemory( sizeof(struct tagProfessionkill) * profession_skill_num + 1 ); + + + if( PROFESSION_skill == NULL ){ + fprint( "无法分配内存 %d\n", sizeof(struct tagProfessionkill)*profession_skill_num); + fclose( f ); + return FALSE; + } + + // init skill + for( i = 0; i < profession_skill_num; i ++ ) { + for( j = 0; j < PROFESSION_SKILL_DATAINTNUM; j ++ ) + PROFESSION_SKILL_setInt( i,j,-1); + + for( j = 0; j < PROFESSION_SKILL_DATACHARNUM; j ++ ) + PROFESSION_SKILL_setChar( i,j,""); + } + + linenum = -1; + while( fgets( line, sizeof( line ), f ) ){ + linenum ++; + if( line[0] == '#' )continue; + if( line[0] == '\n' )continue; + + chomp( line ); + + replaceString( line, '\t' , ' ' ); + + { + char buf[256]; + for( i = 0; i < strlen( line); i ++) { + if( line[i] != ' ' ) { + break; + } + strcpy( buf, &line[i]); + } + + if( i != 0 ) { + strcpy( line, buf); + } + } + { + char token[256]; + int ret; + +#ifdef _PROSKILL_OPTIMUM // 读取本行职技的ID, 直接以职技ID当Table index + ret = getStringFromIndexWithDelim( line, ",", PROFESSION_SKILL_DATACHARNUM+PROFESSION_SKILL_ID+1, token, sizeof(token)); + if( ret==FALSE ){ + fprint("Syntax Error file:%s line:%d\n",filename,linenum); + break; + } + skill_readlen = atoi( token); +#endif + for( i = 0; i < PROFESSION_SKILL_DATACHARNUM; i ++ ) { + + ret = getStringFromIndexWithDelim( line,",", i + 1, token,sizeof(token)); + if( ret==FALSE ){ + fprint("Syntax Error file:%s line:%d\n",filename,linenum); + break; + } + PROFESSION_SKILL_setChar( skill_readlen, i, token); + } + + for( i = 0; i < PROFESSION_SKILL_DATAINTNUM; i ++ ) { + ret = getStringFromIndexWithDelim( line, ",", i+PROFESSION_SKILL_DATACHARNUM+1, token, sizeof(token)); + + if( ret==FALSE ){ + fprint("文件语法错误:%s 第%d行\n",filename,linenum); + break; + } + if( strlen( token) != 0 ) { + PROFESSION_SKILL_setInt( skill_readlen, i , atoi( token )); + } + } + skill_readlen ++; + } + } + fclose(f); + + profession_skill_num = skill_readlen; + + for( i = 0; i < arraysizeof( PROFESSION_SKILL_functbl); i ++ ){ + PROFESSION_SKILL_functbl[i].hash = hashpjw( PROFESSION_SKILL_functbl[i].functionname ); + } + + return TRUE; + +} + + +// 重新载入 profession.txt +void rePROFESSION_initSkill() +{ + freeMemory( PROFESSION_skill ); + PROFESSION_initSkill(getProfession()); +} + +INLINE BOOL PROFESSION_SKILL_CHECKINDEX( int index ) +{ + if( profession_skill_num < index || index < 0 )return FALSE; + return TRUE; +} + +static INLINE BOOL PROFESSION_SKILL_CHECKINTDATAINDEX( int index) +{ + if( PROFESSION_SKILL_DATAINTNUM < index || index < 0 ) return FALSE; + return TRUE; +} + +static INLINE BOOL PROFESSION_SKILL_CHECKCHARDATAINDEX( int index) +{ + if( PROFESSION_SKILL_DATACHARNUM < index || index < 0 ) return FALSE; + return TRUE; +} + +INLINE int PROFESSION_SKILL_getInt( int index, PROFESSION_SKILL_DATAINT element) +{ + return PROFESSION_skill[index].data[element]; +} + +INLINE int PROFESSION_SKILL_setInt( int index, PROFESSION_SKILL_DATAINT element, int data) +{ + int buf; + buf = PROFESSION_skill[index].data[element]; + PROFESSION_skill[index].data[element]=data; + return buf; +} + +INLINE char* PROFESSION_SKILL_getChar( int index, PROFESSION_SKILL_DATACHAR element) +{ + if( !PROFESSION_SKILL_CHECKINDEX( index)) return NULL; + if( !PROFESSION_SKILL_CHECKCHARDATAINDEX( element)) return NULL; + return PROFESSION_skill[index].string[element].string; +} + +INLINE BOOL PROFESSION_SKILL_setChar( int index ,PROFESSION_SKILL_DATACHAR element, char* new ) +{ + if(!PROFESSION_SKILL_CHECKINDEX(index))return FALSE; + if(!PROFESSION_SKILL_CHECKCHARDATAINDEX(element))return FALSE; + + strcpysafe( PROFESSION_skill[index].string[element].string, + sizeof(PROFESSION_skill[index].string[element].string), + new ); + return TRUE; +} + +int PROFESSION_SKILL_getskillNum( void) +{ + return profession_skill_num; +} + + +/*----------------------------------------------------------------------*/ + +int PROFESSION_SKILL_getskillArray( int skillid) +{ +#ifdef _PROSKILL_OPTIMUM // 查询职技ID改为阵列式 + if( skillid >= 0 && skillid < profession_skill_num ) + return PROFESSION_skill[skillid].data[PROFESSION_SKILL_ID]; +#else + int i; + for( i = 0; i <= profession_skill_num; i ++ ) { // 待优化 + if( PROFESSION_skill[i].data[PROFESSION_SKILL_ID] == skillid ) + return i; + } +#endif + return -1; +} + +PROFESSION_SKILL_CALLFUNC PROFESSION_SKILL_getskillFuncPointer(char* name ) +{ + int i; + int hash = hashpjw( name ); + + for( i = 0; i< arraysizeof( PROFESSION_SKILL_functbl); i++ ){ + if( PROFESSION_SKILL_functbl[i].hash == hash ){ + if( strcmp( PROFESSION_SKILL_functbl[i].functionname, name ) == 0 ){ + return PROFESSION_SKILL_functbl[i].func; + } + } + } + + return NULL; +} + +int _PROFESSION_SKILL_GetArray( char *file, int line, int charaindex, int skill ) +{ + int skillid,array; + + skillid = CHAR_getCharSkill( charaindex, skill); + + if( skillid < 0 ) return -1; + + array = PROFESSION_SKILL_getskillArray( skillid ); + + return array; +} + + +/*----------------------------------------------------------------------*/ + +// 使用职业技能 +int PROFESSION_SKILL_Use( int charaindex, int skill, int toNo, char *data ) +{ + int Pskillid, skillid; + int ret=-1, skill_level; + PROFESSION_SKILL_CALLFUNC func; + CHAR_HaveSkill* hskill; + int char_pskill, profession_skill; + + skillid = CHAR_getCharSkill( charaindex, skill); + Pskillid = PROFESSION_SKILL_getskillArray( skillid); + //print("\n skillid:%d Pskillid:%d ", skillid, Pskillid); // Robin log + if( Pskillid == -1 ) { + printf("\n 改封包??找不到该职技! "); + return ret; + } + +#ifdef _PROSKILL_OPTIMUM // Robin fix 检查职业是否相符 + char_pskill = CHAR_getInt( charaindex, PROFESSION_CLASS ); + profession_skill = PROFESSION_SKILL_getInt( Pskillid, PROFESSION_SKILL_PROFESSION_CLASS); + if( (char_pskill <=0) || (char_pskill != profession_skill) ) { + print("\n 改封包??职技的职业不正确!:%d:%d ", char_pskill, profession_skill); + return ret; + } +#endif + + // 找寻对应 function + func = PROFESSION_SKILL_getskillFuncPointer( PROFESSION_SKILL_getChar( Pskillid, PROFESSION_SKILL_FUNCNAME) ); + + // 判断是否为人物 + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE) != CHAR_TYPEPLAYER ) return ret; + + + if( func ){ + // 人物技能等级 + hskill = CHAR_getCharHaveSkill( charaindex, skill ); + skill_level = SKILL_getInt( &hskill->skill, SKILL_LEVEL); + + // 耗损 MP + if( PROFESSION_SKILL_DEC_COST_MP( charaindex, skill, Pskillid, skill_level ) != 1 ) { + print("\n Error:职技MP:%d:%d:%d ", skill, Pskillid, skill_level); + return ret; + } + + // 使用职业技能 + ret = func( charaindex, toNo, Pskillid, data, skill_level ); + if( ret == -1 ){ + int rands = rand()%10; + //andy_log + print("ret = %d, rands:%d \n", ret, rands); + if( rands > 5 ) return ret; + } + + if( Pskillid == 57 //激怒宠物 选宠物才有经验值 + && CHAR_getInt( BATTLE_No2Index( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ), toNo ), CHAR_WHICHTYPE) != CHAR_TYPEPET ) + return ret; + + // 一般技能升级 + PROFESSION_NORMAL_SKILL_LEVLE_UP( &hskill->skill, Pskillid, charaindex ); + } + else { + print("\n 错误!找不到职技func "); + } + + return ret; +} + +// 特殊技能升级 +void PROFESSION_SKILL_LVEVEL_UP( int charaindex, char *name ) +{ + int skill=-1; + int skillid=0, Pskillid=0, i; + char *skill_name; + CHAR_HaveSkill* hskill; + + for( i=0; i CHAR_SKILLMAXHAVE) ) return; + + skillid = CHAR_getCharSkill( charaindex, skill); + Pskillid = PROFESSION_SKILL_getskillArray( skillid); + if( Pskillid == -1 ) return; + + // 人物技能等级 + hskill = CHAR_getCharHaveSkill( charaindex, skill ); + + // 一般技能升级 + PROFESSION_NORMAL_SKILL_LEVLE_UP( &hskill->skill, Pskillid, charaindex ); + + return; +} + +// 二刀流技能升级 +void PROFESSION_SKILL_DUAL_WEAPON_LVEVEL_UP( int charaindex, char *name ) +{ + int skill=-1, arm = 0, shield = 0; + int skillid=0, Pskillid=0, i; + char *skill_name; + CHAR_HaveSkill* hskill; + + // 检查左右手装备 + for( i = 0 ; i < CHAR_EQUIPPLACENUM ; i ++ ){ + int id = CHAR_getItemIndex(charaindex,i); + if( ITEM_CHECKINDEX(id) ){ + if( i == CHAR_ARM ) arm = 1; + else if( i == CHAR_EQSHIELD ) shield = 1; + } + } + + if( arm != 1 || shield != 1 ) return; + + for( i=0; i CHAR_SKILLMAXHAVE) ) return; + + skillid = CHAR_getCharSkill( charaindex, skill); + Pskillid = PROFESSION_SKILL_getskillArray( skillid); + if( Pskillid == -1 ) return; + + // 人物技能等级 + hskill = CHAR_getCharHaveSkill( charaindex, skill ); + + // 一般技能升级 + PROFESSION_NORMAL_SKILL_LEVLE_UP( &hskill->skill, Pskillid, charaindex ); + + return; +} + + +// 武器专精技能升级 +void PROFESSION_SKILL_WEAPON_FOCUS_LVEVEL_UP( int charaindex, char *name ) +{ + int skill = -1; + int skillid=0, Pskillid = 0, i; + char *skill_name, *pszOption, *pszP, diff[20]; + int WeaponType = -1; + CHAR_HaveSkill* hskill; + + memset( diff, -1, sizeof(diff) ); + // 装备武器 + WeaponType = BATTLE_GetWepon( charaindex ); + + switch( WeaponType ){ + case ITEM_AXE: + sprintf( diff, "斧" ); break; + case ITEM_CLUB: + sprintf( diff, "棍" ); break; + case ITEM_SPEAR: + sprintf( diff, "枪" ); break; + case ITEM_BOW: + sprintf( diff, "弓" ); break; + case ITEM_BOOMERANG: // 回旋标 + sprintf( diff, "镖" ); break; + case ITEM_BOUNDTHROW: // 投掷斧头 + sprintf( diff, "投" ); break; + case ITEM_BREAKTHROW: // 投掷石 + sprintf( diff, "石" ); break; + default: + sprintf( diff, "无" ); break; + } + + for( i=0; i CHAR_SKILLMAXHAVE) ) return; + + skillid = CHAR_getCharSkill( charaindex, skill); + Pskillid = PROFESSION_SKILL_getskillArray( skillid); + if( Pskillid == -1 ) return; + + // 人物技能等级 + hskill = CHAR_getCharHaveSkill( charaindex, skill ); + + // 一般技能升级 + PROFESSION_NORMAL_SKILL_LEVLE_UP( &hskill->skill, Pskillid, charaindex ); + + return; +} + +// 耗损 MP +int PROFESSION_SKILL_DEC_COST_MP( int charaindex, int skill, int Pskillid, int skill_level ) +{ + + if(skill_level > 0){ + int dec_mp; + int old_mp = CHAR_getInt( charaindex, CHAR_MP ); + int mp=0; + + // 取出耗损 MP + if( (dec_mp = PROFESSION_MAGIC_COST_MP( charaindex, skill )) == -1 ) + dec_mp = PROFESSION_SKILL_getInt( Pskillid, PROFESSION_SKILL_COST_MP ); + + // 检查 MP量 + if( old_mp < dec_mp ) return -1; + + // 嗜血成性 + if( Pskillid != 11 +#ifdef _PROFESSION_ADDSKILL + // && Pskillid != 2 //针针相对不扣 MP +#endif + ) + if( dec_mp <= 0 ) return -1; + + // 扣掉人物 MP + mp = old_mp - dec_mp; + if( mp < 0 ) mp = 0; + CHAR_setInt( charaindex , CHAR_MP , mp ); + CHAR_send_P_StatusString( charaindex , CHAR_P_STRING_MP); + + return 1; + } + + return -1; +} + + + +// 一般技能升级 +void PROFESSION_NORMAL_SKILL_LEVLE_UP(Skill *skill, int Pskillid, int charaindex ) +{ + int skill_level = 0, up_fix_value = 0; + int rand_num = RAND( 0, 10000 ), rand_num2 = 0; + + // 技能等级到达上限不升级 + skill_level = SKILL_getRealInt( skill, SKILL_LEVEL); + if( skill_level >= PROFESSION_SKILL_MAX_LEVEL * 100 ) return; + + // 升级修正数值 + up_fix_value = PROFESSION_SKILL_getInt( Pskillid, PROFESSION_SKILL_FIX_VALUE) * 100; + rand_num2 = RAND( 0, up_fix_value); + + // 升级检定 +#ifdef _75_TEST +#else + if( rand_num > skill_level + rand_num2){ +#endif + // 增加熟练度 + skill_level += PROFESSION_SKILL_ADD_POINT; +#ifdef _75_TEST + if( skill_level > 10000 ) + skill_level = 10000; +#endif + SKILL_setInt( skill, SKILL_LEVEL, skill_level ); + + if( ( skill_level % 100 ) == 0 ){ + char msg[256]; + sprintf( msg, "%s技能熟练度上升为%d", PROFESSION_SKILL_getChar( Pskillid, PROFESSION_SKILL_NAME), skill_level/100 ); + CHAR_talkToCli( charaindex, -1, msg, CHAR_COLORYELLOW); + CHAR_sendStatusString( charaindex , "S"); + + + // 职业经验值增加 + PROFESSION_LEVEL_CHECK_UP( charaindex ); + } +#ifdef _75_TEST +#else + } +#endif + return; +} + + +void PROFESSION_LEVEL_CHECK_UP( int charaindex ) +{ + int skill_level_add = 0, skill_level_sum = 0, i = 0; + int old_level = CHAR_getInt( charaindex, PROFESSION_LEVEL ); + int next_level_need_point = 9999999; + CHAR_HaveSkill* hskill; + + // 下一级职业升级点数 + next_level_need_point = old_level * 70 * 100; + + for( i=0; iskill, SKILL_IDENTITY); + if( skillID <= 0 ) continue; + + // 共通技能熟练度 50 + if( (skillID == 63) || (skillID == 64) || (skillID == 65) ){ + skill_level_add = 50*100; + }else{ + skill_level_add = SKILL_getRealInt( &hskill->skill, SKILL_LEVEL); + } + + skill_level_sum += skill_level_add; + } + + print("\n技能熟练度上升 ==> 当前熟练度点数(%d) 下一级熟练度升级点数(%d)", skill_level_sum, next_level_need_point ); + + // 技能熟练度达到下一级职业升级点数时,职业等级增加 + if( skill_level_sum >= next_level_need_point ){ + int old_skill_point = CHAR_getInt( charaindex, PROFESSION_SKILL_POINT ); + int next_skill_point = old_skill_point+1; + char msg[64]; + + print("\n职业等级上升 ==> 当前职业等级点数(%d) 下一级职业等级升级点数(%d)", old_skill_point, next_skill_point ); + + CHAR_setInt( charaindex, PROFESSION_LEVEL, old_level + 1 ); + CHAR_setInt( charaindex, PROFESSION_SKILL_POINT, next_skill_point ); + CHAR_sendStatusString( charaindex , "P"); + + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( charaindex , CHAR_WORKOBJINDEX )); + + sprintf( msg, "职业等级上升为%d级,技能点数上升1点", old_level + 1 ); + CHAR_talkToCli( charaindex, -1, msg, CHAR_COLORYELLOW); + } +} + +// 增加技能 +int PROFESSION_SKILL_ADDSK( int charaindex, int skill, int level ) +{ + int i; + + CHAR_HaveSkill *pSkil; + + if( level > 100 ) level = 100; + else if( level < 1 ) level = 1; + + for( i = 0; i < CHAR_SKILLMAXHAVE; i ++ ){ + int skill_id = -1; + + pSkil = CHAR_getCharHaveSkill( charaindex, i ); + skill_id = SKILL_getInt( &pSkil->skill, SKILL_IDENTITY); + if( skill == skill_id && skill_id != -1 ){ + CHAR_talkToCli(charaindex,-1, "你已经学习过此技能", CHAR_COLORYELLOW); + return -1; + } + + if( pSkil == NULL )continue; + if( pSkil->use != 0 )continue; + break; + } + if( i >= CHAR_SKILLMAXHAVE ){ + CHAR_talkToCli(charaindex,-1, "技能数量已达上限", CHAR_COLORYELLOW); + return -1; + }else{ + level *= 100; + SKILL_makeSkillData( &pSkil->skill, skill, level); + pSkil->use = TRUE; + } + + CHAR_sendStatusString( charaindex , "S"); + + + return 1; +} + +void profession_common_fun( int charaindex, int toNo, int skill_level, int array, int com1 ) +{ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, com1 ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM2, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEMODE, BATTLE_CHARMODE_C_OK ); + CHAR_SETWORKINT_HIGH( charaindex, CHAR_WORKBATTLECOM3, skill_level); + CHAR_SETWORKINT_LOW( charaindex, CHAR_WORKBATTLECOM3, array); +#ifdef _PROFESSION_ADDSKILL + if( com1 == BATTLE_COM_S_DOOM + /*&& CHAR_getWorkInt( charaindex, CHAR_DOOMTIME) == 0*/ ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + CHAR_setWorkInt( charaindex, CHAR_WORK_com1, com1 ); + CHAR_setWorkInt( charaindex, CHAR_WORK_toNo, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORK_mode, BATTLE_CHARMODE_C_OK ); + CHAR_setWorkInt( charaindex, CHAR_WORK_skill_level, skill_level ); + CHAR_setWorkInt( charaindex, CHAR_WORK_array, array ); + CHAR_setWorkInt( charaindex, CHAR_DOOMTIME, 3); + } + else if( com1 == BATTLE_COM_S_FIRE_SPEAR + /*&& CHAR_getWorkInt( charaindex, CHAR_DOOMTIME) == 0*/ ){ + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLECOM1, BATTLE_COM_NONE ); + CHAR_setWorkInt( charaindex, CHAR_WORK_com1, com1 ); + CHAR_setWorkInt( charaindex, CHAR_WORK_toNo, toNo ); + CHAR_setWorkInt( charaindex, CHAR_WORK_mode, BATTLE_CHARMODE_C_OK ); + CHAR_setWorkInt( charaindex, CHAR_WORK_skill_level, skill_level ); + CHAR_setWorkInt( charaindex, CHAR_WORK_array, array ); + CHAR_setWorkInt( charaindex, CHAR_DOOMTIME, 2); + } +#endif +} + +/*----------------------------------------------------------------------*/ +// 以下为职业技能 + +// 巫师技能-火山泉 +int PROFESSION_volcano_springs( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_VOLCANO_SPRINGS ); + return TRUE; +} + +// 巫师技能-火星球 +int PROFESSION_fire_ball( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_FIRE_BALL ); + return TRUE; +} + +// 巫师技能-火龙枪 +int PROFESSION_fire_spear( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_FIRE_SPEAR ); + return TRUE; +} + +// 巫师技能-召雷术 +int PROFESSION_summon_thunder( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_SUMMON_THUNDER ); + return TRUE; +} + +// 巫师技能-电流术 +int PROFESSION_current( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_CURRENT ); + return TRUE; +} + +// 巫师技能-暴风雨 +int PROFESSION_storm( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_STORM ); + return TRUE; +} + +// 巫师技能-冰箭术 +int PROFESSION_ice_arrow( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_ICE_ARROW ); + return TRUE; +} + +// 巫师技能-冰爆术 +int PROFESSION_ice_crack( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_ICE_CRACK ); + return TRUE; +} + +// 巫师技能-冰镜术 +int PROFESSION_ice_mirror( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_ICE_MIRROR ); + return TRUE; +} + +// 巫师技能-世界末日 +int PROFESSION_doom( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_DOOM ); + return TRUE; +} + +// 巫师技能-嗜血成性 +int PROFESSION_blood( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_BLOOD ); + return TRUE; +} + +// 巫师技能-嗜血蛊 +int PROFESSION_blood_worms( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_BLOOD_WORMS ); + return TRUE; +} + +// 巫师技能-一针见血 +int PROFESSION_sign( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_SIGN ); + return TRUE; +} + +// 巫师技能-火附体 +int PROFESSION_fire_enclose( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_FIRE_ENCLOSE ); + return TRUE; +} + +// 巫师技能-冰附体 +int PROFESSION_ice_eclose( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_ICE_ENCLOSE ); + return TRUE; +} + +// 巫师技能-雷附体 +int PROFESSION_thunder_enclose( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_THUNDER_ENCLOSE ); + return TRUE; +} + +// 巫师技能-火魔法熟练度 +int PROFESSION_fire_practice( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + return TRUE; +} + +// 巫师技能-冰魔法熟练度 +int PROFESSION_ice_practice( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + return TRUE; +} + +// 巫师技能-雷魔法熟练度 +int PROFESSION_thunder_practice( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + return TRUE; +} + +// 巫师技能-附身术 +int PROFESSION_enclose( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_ENCLOSE ); + return TRUE; +} + +// 巫师技能-移形换位 +int PROFESSION_transpose( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_TRANSPOSE ); + return TRUE; +} + + +/*----------------------------------------------------------------------*/ + +// 勇士技能-爆击 +int PROFESSION_brust( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_BRUST ); + return TRUE; +} + +// 勇士技能-连环攻击 +int PROFESSION_chain_atk( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_CHAIN_ATK ); + return TRUE; +} + +// 勇士技能-回避 +int PROFESSION_avoid( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_AVOID ); + return TRUE; +} + +// 勇士技能-补血 +int PROFESSION_recovery( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_RECOVERY ); + return TRUE; +} + +// 勇士技能-武器专精 +int PROFESSION_weapon_focus( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + return TRUE; +} + +// 勇士技能-状态回复 +int PROFESSION_reback( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_REBACK ); + return TRUE; +} + +// 勇士技能-双重攻击 +int PROFESSION_chain_atk_2( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_CHAIN_ATK_2 ); + return TRUE; +} + +// 勇士技能-舍已为友 +int PROFESSION_scapegoat( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_SCAPEGOAT ); + return TRUE; +} + +// 勇士技能-激化攻击 +int PROFESSION_enrage( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_ENRAGE ); + return TRUE; +} + +// 勇士技能-能量聚集 +int PROFESSION_energy_collect( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_COLLECT ); + return TRUE; +} + +// 勇士技能-专注战斗 +int PROFESSION_focus( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_FOCUS ); + return TRUE; +} + +// 勇士技能-盾击 +int PROFESSION_shield_attack( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_SHIELD_ATTACK ); + return TRUE; +} + +// 勇士技能-二刀流 +int PROFESSION_dual_weapon( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + return TRUE; +} + +// 勇士技能-格档 +int PROFESSION_deflect( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_DEFLECT ); + return TRUE; +} + +// 勇士技能-贯穿攻击 +int PROFESSION_through_attack( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_THROUGH_ATTACK ); + return TRUE; +} + +// 勇士技能-座骑攻击 +int PROFESSION_cavalry( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_CAVALRY ); + return TRUE; +} + +// 勇士技能-濒死攻击 +int PROFESSION_dead_attack( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_DEAD_ATTACK ); + return TRUE; +} + +// 勇士技能-回旋攻击 +int PROFESSION_convolute( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_CONVOLUTE ); + return TRUE; +} + +// 勇士技能-混乱攻击 +int PROFESSION_chaos( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_CHAOS ); + return TRUE; +} + +/*----------------------------------------------------------------------*/ + +// 猎人技能-陷阱 +int PROFESSION_trap( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_TRAP ); + return TRUE; +} + +// 猎人技能-驯伏宠物 +int PROFESSION_docile( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_DOCILE ); + return TRUE; +} + +// 猎人技能-激怒宠物 +int PROFESSION_enrage_pet( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_ENRAGE_PET ); + return TRUE; +} + +// 猎人技能-天罗地网 +int PROFESSION_dragnet( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_DRAGNET ); + return TRUE; +} + +// 猎人技能-树根缠绕 +int PROFESSION_entwine( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_ENTWINE ); + return TRUE; +} + +// 猎人技能-自给自足 +int PROFESSION_autarky( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + return TRUE; +} + +// 猎人技能- 体掠夺 +int PROFESSION_plunder( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_PLUNDER ); + return TRUE; +} + +// 猎人技能-毒素武器 +int PROFESSION_toxin_weapon( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_TOXIN_WEAPON ); + return TRUE; +} + +// 猎人技能-火抗性提升 +int PROFESSION_resist_fire( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_RESIST_FIRE ); + return TRUE; +} + +// 猎人技能-冰抗性提升 +int PROFESSION_resist_ice( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_RESIST_ICE ); + return TRUE; +} + +// 猎人技能-雷抗性提升 +int PROFESSION_resist_thunder( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_RESIST_THUNDER ); + return TRUE; +} + +#ifdef _PROFESSION_ADDSKILL +// 猎人技能-自然威能 +int PROFESSION_resist_f_i_t( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_RESIST_F_I_T ); + return TRUE; +} +// 猎人技能-号召自然 +int PROFESSION_call_nature( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_CALL_NATURE ); + return TRUE; +} +// 猎人技能-四属性结界 +int PROFESSION_boundary( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_BOUNDARY ); + return TRUE; +} +#endif + +// 猎人技能-团体火抗性提升 +int PROFESSION_g_resist_fire( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_G_RESIST_FIRE ); + return TRUE; +} + +// 猎人技能-团体冰抗性提升 +int PROFESSION_g_resist_ice( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_G_RESIST_ICE ); + return TRUE; +} + +// 猎人技能-团体雷抗性提升 +int PROFESSION_g_resist_thunder( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_G_RESIST_THUNDER ); + return TRUE; +} + +// 猎人技能-弱点攻击 +int PROFESSION_attack_weak( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_ATTACK_WEAK ); + return TRUE; +} + +// 猎人技能-挑拨 +int PROFESSION_instigate( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_INSTIGATE ); + return TRUE; +} + +// 猎人技能-遗忘 +int PROFESSION_oblivion( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + profession_common_fun( charaindex, toNo, skill_level, array, BATTLE_COM_S_OBLIVION ); + return TRUE; +} + + +/*----------------------------------------------------------------------*/ +// 非战斗技能 + +// 猎人技能-追寻敌踪 +int PROFESSION_track( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + char *pszP = NULL, *pszOption = NULL, msg[20]; + int per=0, rate=0, img1, ret = 1; + skill_level /= 10; + + if( CHAR_getWorkInt( charaindex, CHAR_ENCOUNT_NUM) >= (int)time(NULL) ){ + ret = -1; + } + + // 技能的参数 + pszOption = PROFESSION_SKILL_getChar( array, PROFESSION_SKILL_OPTION); + + // 技能等级 rate + if( (pszP = strstr( pszOption, "倍%" ) ) != NULL ) sscanf( pszP+3, "%d", &rate ); + per = skill_level * rate; + + // 准备期的动画 + img1 = PROFESSION_SKILL_getInt( array, PROFESSION_SKILL_IMG_1 ); + + CHAR_setWorkInt( charaindex, CHAR_ENCOUNT_FIX, per); + CHAR_talkToCli( charaindex, -1, "遇敌率上升", CHAR_COLORRED); + CHAR_setWorkInt( charaindex, CHAR_ENCOUNT_NUM, (int)time(NULL) + (60 * 3) ); + + sprintf( msg, "%d", img1); + lssproto_BATTLESKILL_send ( getfdFromCharaIndex(charaindex), msg ) ; + + return ret; +} + +// 猎人技能-回避战斗 +int PROFESSION_escape( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + char *pszP = NULL, *pszOption = NULL, msg[20]; + int per=0, rate=0, img1, ret =1; + skill_level /= 10; + + if( CHAR_getWorkInt( charaindex, CHAR_ENCOUNT_NUM) >= (int)time(NULL) ){ + ret = -1; + } + + // 技能的参数 + pszOption = PROFESSION_SKILL_getChar( array, PROFESSION_SKILL_OPTION); + + // 技能等级 rate + if( (pszP = strstr( pszOption, "倍%" ) ) != NULL ) sscanf( pszP+3, "%d", &rate ); + per = skill_level * rate; + + // 准备期的动画 + img1 = PROFESSION_SKILL_getInt( array, PROFESSION_SKILL_IMG_1 ); + + CHAR_setWorkInt( charaindex, CHAR_ENCOUNT_FIX, (-1) * per); + CHAR_talkToCli( charaindex, -1, "遇敌率下降", CHAR_COLORGREEN); + + CHAR_setWorkInt( charaindex, CHAR_ENCOUNT_NUM, (int)time(NULL) + (60 * 3) ); + + sprintf( msg, "%d", img1); + lssproto_BATTLESKILL_send ( getfdFromCharaIndex(charaindex), msg ) ; + + return ret; +} + + + +// 共同技能-气力充沛 +int PROFESSION_full_mp( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + return TRUE; +} +// 共同技能-负重增加 +int PROFESSION_strong_back( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + return TRUE; +} +// 共同技能-自我强化 +int PROFESSION_strengthen( int charaindex, int toNo, int array, char *data, int skill_level ) +{ + return TRUE; +} + +#endif + diff --git a/gmsv/buf.c b/gmsv/buf.c new file mode 100644 index 0000000..0002082 --- /dev/null +++ b/gmsv/buf.c @@ -0,0 +1,195 @@ +#define __BUF_C__ +#include "version.h" +#include +#include +#include + +#include "buf.h" +#include "handletime.h" + +static int UNIT; +static int UNITNUMBER; +static int memconfig; +static int readblock; +static int NowMemory; +static struct timeval AllocOldTime; + + +typedef struct tagMemory +{ + char* pointer; + BOOL used; + + unsigned int nsize; +}Memory; +static Memory *mem; + + +void memEnd( void ) +{ + if( mem != NULL && mem[0].pointer != NULL ){ + free(mem[0].pointer); + free(mem); + } +} + +BOOL configmem( int unit , int unitnumber ) +{ + if( memconfig == TRUE ) + return FALSE; + UNIT = unit; + UNITNUMBER = unitnumber; + if( UNIT <= 0 || UNITNUMBER <= 0 ) + return memconfig = FALSE; + return memconfig = TRUE; +} + +BOOL memInit( void ) +{ + int i; + if( memconfig == FALSE ) + return FALSE; + mem = calloc( 1, sizeof( Memory ) * UNITNUMBER ); + if( mem == NULL ){ + print( "memInit: Can't alloc memory: %d\n" , + sizeof(Memory)*UNITNUMBER ); + return FALSE; + } + + memset( mem , 0 , sizeof( Memory )* UNITNUMBER ); + for( i = 0 ; i < UNITNUMBER ; i ++ ){ + mem[i].pointer = NULL; + mem[i].used = FALSE; + mem[i].nsize = 0; + } + mem[0].pointer = calloc( 1, UNIT*UNITNUMBER ); + if( mem[0].pointer == NULL ){ + print( "memInit: Can't Allocate %d byte\n" , UNIT*UNITNUMBER ); + free( mem ); + return FALSE; + } + memset( mem[0].pointer , 0 , sizeof( UNIT*UNITNUMBER )); + +#ifdef DEBUG + print( "Allocate %d byte( %.2fK byte %.2fM byte )\n" , + UNIT*UNITNUMBER, + UNIT*UNITNUMBER/1024.0, + UNIT*UNITNUMBER/1024.0/1024.0 + ); +#endif + readblock = 0; + for( i = 0 ; i < UNITNUMBER ; i ++ ) + mem[i].pointer = mem[0].pointer + i * UNIT; + + NowMemory = 0; + AllocOldTime.tv_sec = NowTime.tv_sec; + AllocOldTime.tv_usec = NowTime.tv_usec; + + return TRUE; +} + +void* allocateMemory( const unsigned int nbyte ) +{ + int i; + int arrayAllocSize; + BOOL flg = FALSE; + void *ret; + int first = 0; + + arrayAllocSize = nbyte/UNIT + ( nbyte%UNIT ? 1 : 0 ); + if( arrayAllocSize == 0 )return NULL; +#ifdef DEBUG + debug( arrayAllocSize , d ); +#endif + i = readblock; + while( 1 ) { + if( i > UNITNUMBER - arrayAllocSize) { + i = 0; + } + if( mem[i].used != FALSE ){ + i += mem[i].nsize; + }else{ + int j; + BOOL found = TRUE; + for( j = i; j < i + arrayAllocSize; j ++ ) { + if( mem[j].used != FALSE ){ + i = j + mem[j].nsize; + found = FALSE; + if( first == 0 ) first = 1; + break; + } + } + if( found ) { + mem[i].used=TRUE; + mem[i].nsize = arrayAllocSize; + readblock = i + arrayAllocSize; + ret = mem[i].pointer; + break; + } + } + if( ( i >= readblock || i > UNITNUMBER - arrayAllocSize ) + && flg == TRUE ) { + ret = NULL; + break; + } + if( i > UNITNUMBER - arrayAllocSize) { + i = 0; + flg = TRUE; + } + + } + if( ret == NULL ) { + print( "Can't Allocate %d byte .remnants:%4.2f\n" , nbyte, (float)(NowMemory/UNITNUMBER)); + }else { + NowMemory += arrayAllocSize; + + if( NowTime.tv_sec > AllocOldTime.tv_sec +10 ) { + print( "\n"); + if( NowMemory > (double)UNITNUMBER * 0.9) { + print( "Warning!! Memory use rate exceeded 90%% .remnants:%d\n", UNITNUMBER-NowMemory); + }else if( NowMemory > (double)UNITNUMBER * 0.8) { + print( "Warning!! Memory use rate exceeded 80%% .remnants:%d\n", UNITNUMBER-NowMemory); + }else if( NowMemory > (double)UNITNUMBER * 0.7) { + print( "Memory use rate exceeded 70%% .remnants:%d\n", UNITNUMBER-NowMemory); + } + memcpy( &AllocOldTime, &NowTime, sizeof( AllocOldTime)); + } + //print( "NowMemory.remnants:%4.2f\n", (float)(UNITNUMBER-NowMemory)/UNITNUMBER); + } + + return ret; + +} + + + +/*------------------------------------------------------------ + * allocateMemory匹割忡仄凶丢乒伉□毛free允月[ + * 娄醒 + * freepointer int 割忡允月燮 及禾奶件正□ + * 忒曰袄 + * 卅仄 + ------------------------------------------------------------*/ +void freeMemory( void* freepointer ) +{ + int arrayindex; + char* toppointer; + toppointer = mem[0].pointer; + if( freepointer == NULL )return; + arrayindex = ((int)freepointer-(int)toppointer)/UNIT; + if( arrayindex < readblock) { + readblock = arrayindex; + } + mem[arrayindex].used = FALSE; + + NowMemory -= mem[arrayindex].nsize; + +} + +void showMem( char *buf) +{ + sprintf( buf, "NowMemory.remnants:%d%%", ((UNITNUMBER-NowMemory)*100)/UNITNUMBER); + printf( "\n" ); + printf( buf ); +} + diff --git a/gmsv/callfromac.c b/gmsv/callfromac.c new file mode 100644 index 0000000..eb3a26d --- /dev/null +++ b/gmsv/callfromac.c @@ -0,0 +1,1854 @@ +#include +#include "version.h" +#include "common.h" +#include "saacproto_cli.h" +#include "lssproto_serv.h" +#include "net.h" +#include "char.h" +#include "object.h" +#include "readmap.h" +#include "msignal.h" +#include "map_deal.h" +#include "npc_duelranking.h" +#include "npc_warpman.h" +#include "handletime.h" +#include "npc_scheduleman.h" +#include "configfile.h" +#include "chatroom.h" +#ifdef _PAUCTION_MAN +#include "npc_pauctionman.h" +#endif +#include "npc_eventaction.h" +// CoolFish: Family 2001/5/24 +#include "family.h" +#include "defend.h" +#include "log.h" +#include "buf.h" +#ifdef _ALLDOMAN // (不可开) Syu ADD 排行榜NPC +#include "npc_alldoman.h" +#endif + +#ifdef _RACEMAN +#include "npc_raceman.h" +#endif + +#ifdef _DEATH_CONTEND +#include "deathcontend.h" +#endif +time_t initTime =0; + +extern BOOL bNewServer; + +extern int i_shutdown_time;//ttom + +void saacproto_ACGmsvDownRequest_recv( int fd, int min) +{ + char buff[256]; + int i; + int playernum = CHAR_getPlayerMaxNum(); + + snprintf( buff, sizeof( buff),"极度的系统公告。"); + for( i = 0 ; i < playernum ; i++) { + if( CHAR_getCharUse(i) != FALSE ) { + CHAR_talkToCli( i, -1, buff, CHAR_COLORYELLOW); + } + } + SERVSTATE_setLimittime(min); + SERVSTATE_setShutdown( NowTime.tv_sec ); + SERVSTATE_setDsptime( 0 ); + +} +//检查是否有和ac连接,以及载入家族 +void saacproto_ACServerLogin_recv (int fd, char* result,char* data) +{ + if( strcmp( result , SUCCESSFUL ) != 0 ){ + /* 夫弘奶件撩 */ + print( "saacproto_ACServerLogin fail! so quitting...[%s][%s]\n", + result,data ); + shutdownProgram( ); + exit(1); + } + print("SAAC登陆成功\n"); + time(&initTime); + if( bNewServer ) + print("新服务器! "); + else + print("旧服务器! "); +#ifdef _SERVER_NUMS + print( " 版本 : <%s>" , SERVER_VERSION); +#endif + print(" 正常服务器!\n"); + + // Robin 0530 + //saacproto_ACShowFMList_send( acfd ); + FAMILY_Init(); +#ifdef _UNIVERSE_CHATROOM + CHATROOM_getChatRoomList(); +#endif + +#ifdef _ANGEL_SUMMON + saacproto_ACMissionTable_send( acfd, -1, 1, "", ""); +#endif +} + +void saacproto_ACCharList_recv(int fd, char* result, char* data,int retfd) +{ + int clifd = getfdFromFdid(retfd); + + + if( CONNECT_checkfd(clifd) == FALSE ){ + return; + } + lssproto_CharList_send( clifd, result , data ); + CONNECT_setState( clifd, NOTLOGIN ); +} + +void saacproto_ACCharLoad_recv(int fd , char* result,char* data,int retfd,int saveindex) +{ + int clifd = getfdFromFdid(retfd); + if( CONNECT_checkfd( clifd ) == FALSE )return; + + if(( strcmp( result , SUCCESSFUL ) == 0 )&&(data[0])) { +#ifdef _BAD_PLAYER // WON ADD 送坏玩家去关 + CHAR_login( clifd, data, saveindex, 0 ); // 正常玩家 + }else if( ( strcmp( result , BADPLAYER ) == 0 ) && (data[0]) ){ + CHAR_login( clifd, data, saveindex, 1 ); // 坏玩家 +#else + CHAR_login( clifd,data,saveindex ); +#endif + + }else{ + char cdkey[64]; +#ifndef _FIX_MESSAGE // WON ADD 修改WORKER封包内容 + data = ""; +#endif + CONNECT_getCdkey( clifd, cdkey , sizeof( cdkey )); + print(" (%s)ACCharLoad错误:%s ", cdkey, data); + lssproto_CharLogin_send( clifd, result ,data ); + CONNECT_setState( clifd, NOTLOGIN ); + } +} + +#ifdef _DEATH_CONTEND +void saacproto_LoadPkTeamListData_recv(int fd , char* result, char* data, int ti ) +{ + //andy_log + print("加载PK团队数据接收( %s, %d) 数据长度:%d\n", result, ti, strlen(data) ); + if( !strcmp( result, "success") ){ + if( PKLIST_LoadPkTeamListData() == FALSE ) return; + if( ti != - 1 ) + saacproto_LoadPkTeamListData_send( fd , ti, 1000); + } +} +//要求资讯 +void saacproto_PKLISTCHARTS_recv( int fd, char *data, int type, int flg) +{ + //andy_log + print("接收PK名称() \n"); + if( data == NULL ) return; + PKLIST_HandleChartsMess( fd, data, type, flg); +} + +#endif + +#ifdef _PAUCTION_MAN +void saacproto_ACItemAuction_recv( int fd, char *ITEMNAME, char *data, int itemID, int ret, int flg) +{ + //物品处理 + switch( flg) { + case 1: + { + int itemindex=-1; + itemindex = NPC_PAItemShop_AddItem( itemID, ret); + if( !ITEM_CHECKINDEX( itemindex) ) + return; + NPC_PAItemShop_reItem( itemindex, data); + } + break; + case 2: + { + NPC_PAItemShop_DelItem( ret, -1); + } + break; + } +} +#endif + +/* + *本□皮卞凶中允月忒蚕[ + * state卞方匀化质 毛坌仃月 + */ + +void saacproto_ACCharSave_recv(int fd ,char* result, char* data,int retfd) +{ + int clifd = getfdFromFdid(retfd) , fdid; + char cdkey[CDKEYLEN], passwd[PASSWDLEN], charname[CHARNAMELEN]; + /* + * 端巨仿□匹手卅中及卞仇仇匹反元井木月仪反丐月 + * 公木反}中五卅曰涛粮毛濠匀凶凛分[ + */ + if( CONNECT_checkfd( clifd )== FALSE ) return; + + CONNECT_getCdkey( clifd, cdkey, sizeof( cdkey )); + CONNECT_getPasswd( clifd, passwd, sizeof( passwd)); + + CONNECT_getCharname( clifd, charname, sizeof( charname )); + + fdid = CONNECT_getFdid( clifd ); + switch( CONNECT_getState( clifd ) ){ + case WHILECREATE: + /* 平乓仿综曰匹及本□皮 */ + /* 公木毛弁仿奶失件玄卞中丹( 公及引引 )*/ + if( strcmp(result,FAILED) ==0 ) data =""; + lssproto_CreateNewChar_send( clifd , result , data); + CONNECT_setState( clifd, NOTLOGIN ); + break; + + case WHILELOGOUTSAVE: + /* 骚及夫弘失它玄及凛及本□皮及忒蚕 */ + if( strcmp( result , SUCCESSFUL ) == 0 ) + /* 岳 */ + lssproto_CharLogout_send( clifd, result , "success" ); + else + /* 巨仿□支午仄扎屯月 */ + lssproto_CharLogout_send( clifd, result , "Cannot save" ); + CONNECT_setState( clifd, NOTLOGIN ); + CONNECT_setCharaindex( clifd, -1 ); + break; + + case WHILELOSTCHARSAVE: + /* 瑛绊互升丹匹丐木}仇及平乓仿反绰轮允月 */ + saacproto_ACCharDelete_send( acfd, cdkey,passwd,charname,"",fdid ); + CONNECT_setState( clifd, WHILELOSTCHARDELETE ); + CONNECT_setCharaindex( clifd, -1 ); + break; + + case WHILECLOSEALLSOCKETSSAVE: + CONNECT_setState( clifd, NOTLOGIN ); + // Arminius debug + // CONNECT_endOne_debug(clifd); + CONNECT_setUse( clifd , FALSE); + + SERVSTATE_decrementCloseallsocketnum(); + if( SERVSTATE_getCloseallsocketnum() == 0 ) { + SERVSTATE_SetAcceptMore( -1 ); + print( "所有人物存档\n" ); + print("\n 关闭服务器时间 =%d",i_shutdown_time);//ttom + if(i_shutdown_time==1){ + system( "正常关闭" ); + sigshutdown( 0 ); + } + } + default: + break; + } +} + + +void saacproto_ACCharDelete_recv(int fd,char* result,char* data,int retfd) +{ + int clifd = getfdFromFdid(retfd); + if( CONNECT_checkfd( clifd ) == FALSE )return; + + switch( CONNECT_getState(clifd) ){ + case WHILELOSTCHARDELETE: + /* 夫旦玄匹平乓仿壅仄 及忒蚕 */ + /* 窒手仄卅中 */ + /* 橇谪毛 允 */ + CONNECT_setState(clifd, NOTLOGIN ); + CONNECT_setCharaindex( clifd, -1 ); + break; + case WHILECHARDELETE: + /* 骚及平乓仿壅仄 */ + /* 公及引引霜月 */ + if( strcmp(result,FAILED) == 0)data=""; + lssproto_CharDelete_send( clifd, result , data ); + CONNECT_setState( clifd, NOTLOGIN ); + CONNECT_setCharaindex( clifd, -1 ); + break; + default: + break; + } +} + +/* + * 夫永弁及忒蚕[仇木反荸轮卞仄井银歹卅中[蜇箕幻廿银歹木月 烂反卅中 + */ +void saacproto_ACLock_recv(int fd , char* result, char* data ,int retfd) +{ + int clifd = getfdFromFdid(retfd); + char cdkey[CDKEYLEN]; + int cindex = getCharindexFromFdid(retfd); + + if( CONNECT_checkfd(clifd) == FALSE) return; + + // Arminius 7.25 GM unlock test + if (strncmp(data, "USRLOCKED", 9)==0) { + char buf[4096]; + sprintf(buf, "%s", &data[10]); + CHAR_talkToCli(cindex, -1, buf, CHAR_COLORYELLOW); + return; + } else if (strncmp(data, "USRUNLOCKED", 11)==0) { + CHAR_talkToCli(cindex, -1, "User not locked.", CHAR_COLORYELLOW); + return; + } else if (strncmp(data, "GMUNLOCKSUCCESS", 15)==0) { + CHAR_talkToCli(cindex, -1, "User unlock success", CHAR_COLORYELLOW); + return; + } else if (strncmp(data, "GMUNLOCKFAIL", 12)==0) { + CHAR_talkToCli(cindex, -1, "User unlock failed", CHAR_COLORYELLOW); + return; + } else if (strncmp(data, "GMUNLOCKALL", 11)==0) { + CHAR_talkToCli(cindex, -1, "Server unlocked", CHAR_COLORYELLOW); + return; + } + + CONNECT_getCdkey( clifd, cdkey , sizeof( cdkey )); + + switch( CONNECT_getState( clifd ) ){ + case WHILECANNOTLOGIN: + /* 夫弘奶件撩 仄凶凛及夫永弁及忒蚕 */ + if( strcmp( result , SUCCESSFUL ) == 0 ){ + /* 岳 匹窒手仄化中卅中橇谪卞允月 */ + CONNECT_setState( clifd, NOTLOGIN ); + + }else{ + /* + * 丢永本□斥毛苇月 + */ + char mesg[128]; + snprintf( mesg ,sizeof( mesg ), "%s hasn't been locked" ,cdkey); + if( strcmp( data , mesg ) == 0 ){ + /* + * 夫永弁今木化中卅中及匹手丹窒手仄卅中[ + * 岳 仄凶及午 元健中卞允月[ + */ + CONNECT_setState( clifd, NOTLOGIN ); + }else{ + /* + * 疯蘸夫永弁荸轮仄方丹午允月 + * state 及 祭卅仄[ + */ + saacproto_ACLock_send(fd, cdkey , + UNLOCK, CONNECT_getFdid( clifd) ); + } + } + + break; + default: + break; + } +} + +void saacproto_ACUCheck_recv( int fd , char *cd ) +{ + int conind; + int flag = 0; + conind = getfdFromCdkeyWithLogin( cd ); + flag = ( conind >= 0 ) ? 1 : 0; + saacproto_ACUCheck_send( fd , cd , flag ); +} + + +/* --------------------------------------------- + * 犯□正矛□旦凳蕙熬仃午曰质 醒袄 + * --------------------------------------------*/ +void saacproto_DBUpdateEntryInt_recv( int fd,char* result, + char* table,char* key,int msgid,int msgid2 ) +{ + if( strcmp( result, NET_STRING_FAILED) == 0 ) { + print( "failed: DBUpdateEntryInt\n"); + return; + } +} +/* --------------------------------------------- + * 犯□正矛□旦凳蕙熬仃午曰质 侬 + * --------------------------------------------*/ +void saacproto_DBUpdateEntryString_recv( int fd,char* result, + char* table,char* key,int msgid,int msgid2 ) +{ + if( strcmp( result, NET_STRING_FAILED) == 0 ) { + print( "failed: DBUpdateEntryString\n"); + return; + } +} + +/* --------------------------------------------- + * 犯□正矛□旦熬仃午曰质 仿件弁 + * --------------------------------------------*/ +void saacproto_DBGetEntryRank_recv( int fd,char* result,int rank,int count, + char* table,char* key,int msgid,int msgid2 ) +{ + if( strcmp( result, NET_STRING_FAILED) == 0 ) { + print( "failed: DBGetEntryRank\n"); + return; + } + if( strcmp( table, DB_DUELPOINT) == 0 ) { + if( CHAR_getInt( OBJECT_getIndex( msgid2), CHAR_WHICHTYPE) == CHAR_TYPEDUELRANKING){ + NPC_Duelranking_CallMyRanking( count, msgid, msgid2); + }else { + NPC_GetDuelRank( rank, msgid, msgid2); + } + } +} + +void saacproto_DBDeleteEntryInt_recv( int fd,char* result, + char* table,char* key,int msgid,int msgid2 ) +{ + if( strcmp( result, NET_STRING_FAILED) == 0 ) { + print( "failed: DBDeleteEntryInt\n"); + return; + } + +} +/* --------------------------------------------- + * 犯□正矛□旦绰轮熬仃午曰质 侬 + * --------------------------------------------*/ +void saacproto_DBDeleteEntryString_recv( int fd,char* result, + char* table,char* key,int msgid,int msgid2 ) +{ + if( strcmp( result, NET_STRING_FAILED) == 0 ) { + print( "failed: DBDeleteEntryString\n"); + return; + } + +} + + +/* --------------------------------------------- + * 犯□正矛□旦熬仃午曰质 醒袄 + * --------------------------------------------*/ +void saacproto_DBGetEntryInt_recv( int fd,char* result,int value, + char* table,char* key,int msgid,int msgid2 ) +{ + if( strcmp( result, NET_STRING_FAILED) == 0 ) { + print( "failed: DBGetEntryInt\n"); + return; + } +} +/* --------------------------------------------- + * 犯□正矛□旦熬仃午曰质 侬 + * --------------------------------------------*/ +void saacproto_DBGetEntryString_recv( int fd,char* result,char *value, + char* table,char* key,int msgid,int msgid2 ) +{ + char cdkey[32]; + char charaname[32]; + + if( strcmp( table, DB_ADDRESSBOOK) == 0 ){ + int mode = 1; + if( strcmp( result, NET_STRING_FAILED) == 0 ) { + mode = 0; + } + makeStringFromEscaped( key); + if( !getStringFromIndexWithDelim( key, "_", 1, cdkey, sizeof( cdkey)) ){ + return; + } + if( !getStringFromIndexWithDelim( key, "_", 2, charaname, sizeof( charaname)) ){ + return; + } + ADDRESSBOOK_DispatchMessage( cdkey, charaname, value, mode); + }else { + if( strcmp( result, NET_STRING_FAILED) == 0 ) { + print( "failed: DBGetEntryString\n"); + return; + } + } +} + +void saacproto_DBGetEntryByRank_recv( int fd,char* result,char* list, + char* table,int msgid,int msgid2 ) +{ + if( strcmp( result, NET_STRING_FAILED) == 0 ) { + print( "failed: DBGetEntryByRank\n"); + return; + } +} +/* --------------------------------------------- + * 犯□正矛□旦熬仃午曰质 市它件玄 + * --------------------------------------------*/ +void saacproto_DBGetEntryByCount_recv( int fd,char* result,char* list, + char* table,int count_start,int msgid,int msgid2 ) +{ + if( strcmp( result, NET_STRING_FAILED) == 0 ) { + print( "failed: DBGetEntryByCount\n"); + return; + } + /* duelpoint database 及质 */ + if( strcmp( table, DB_DUELPOINT) == 0 ) { + NPC_Duelranking_PrintRanking( list, count_start, msgid, msgid2); + } +} +#ifdef _ALLDOMAN // (不可开) Syu ADD 排行榜NPC +void saacproto_UpdataStele_recv( int fd , char *token) +{ + NPC_AlldomanWriteStele( token ); +} +void saacproto_S_UpdataStele_recv( int i , char *ocdkey , char *oname , char *ncdkey , + char *nname , char *title , int level , int trns , int floor ) +{ + print("\nSyu log 收到Single=> %s , %s , %s , %s ",ocdkey , oname , ncdkey , nname); + NPC_Alldoman_S_WriteStele( ocdkey , oname , ncdkey , nname , title , level , trns , floor ) ; +} + +#endif +/* --------------------------------------------- + * 皮夫□玉平乓旦玄丢永本□斥熬仃午曰 + * --------------------------------------------*/ +void saacproto_Broadcast_recv( int fd,char* id,char* charname,char *message ) +{ +#ifndef _DEATH_CONTEND + if( strstr( message, "online") == 0 || + strstr( message, "offline") == 0 || + strstr( message, "param") == 0 || + strstr( message, "chardelete") == 0 ){ + char buff[512]; + char escapebuf[1024]; + + snprintf( buff, sizeof( buff),"%s_%s", id, charname ); + makeEscapeString( buff, escapebuf, sizeof(escapebuf)); + + saacproto_DBGetEntryString_send( acfd, DB_ADDRESSBOOK, escapebuf, 0,0); + } +#endif +} + +void saacproto_Message_recv( int fd,char* id_from,char* charname_from, + char* id_to,char* charname_to, + char* message,int option,int mesgid ) +{ + BOOL ret; + ret = ADDRESSBOOK_sendMessage_FromOther( id_from, charname_from, + id_to, charname_to, + message, option + ); + if( ret == TRUE) { + saacproto_MessageAck_send( acfd, id_to, charname_to, + "successful",mesgid); + } +} + +/* --------------------------------------------- + * CoolFish: Family 2001/5/9 + * --------------------------------------------*/ +void saacproto_ACAddFM_recv(int fd, char *result, int fmindex, int charfdid, + int index) +{ + int ret; + int clifd = getfdFromFdid(charfdid); +// print("ACAddFM_0\n"); + if (CONNECT_checkfd(clifd) == FALSE) return; + if (strcmp(result, SUCCESSFUL) == 0) ret = 1; + else ret = 0; +// print("ACAddFM_1 clifd:%d ret:%d fmindex:%d index:%d\n", +// clifd, ret, fmindex, index); + ACAddFM(clifd, ret, fmindex, index); +} +void saacproto_ACJoinFM_recv(int fd, char *result, int recv, int charfdid) +{ + int ret; + int clifd = getfdFromFdid(charfdid); + if (CONNECT_checkfd(clifd) == FALSE) return; + if (strcmp(result, SUCCESSFUL) == 0) ret = 1; + else ret = 0; + ACJoinFM(clifd, ret, recv); +} +void saacproto_ACLeaveFM_recv(int fd, char *result, int resultflag, int charfdid) +{ + int ret; + int clifd = getfdFromFdid(charfdid); + if (CONNECT_checkfd(clifd) == FALSE) return; + if (strcmp(result, SUCCESSFUL) == 0) ret = 1; + else ret = 0; + ACLeaveFM(clifd, ret, resultflag); + + print(" ACLeaveFM_%d ", ret ); +} +void saacproto_ACChangeFM_recv(int fd, char *result, int charfdid) +{ + +} +void saacproto_ACDelFM_recv(int fd, char *result, int charfdid) +{ + int ret; + int clifd = getfdFromFdid(charfdid); + if (CONNECT_checkfd(clifd) == FALSE) return; + if (strcmp(result, SUCCESSFUL) == 0) ret = 1; + else ret = 0; + + ACDelFM(clifd, ret); + + print(" ACDelFM_%d ", ret); +} +void saacproto_ACShowFMList_recv(int fd, char *result, int fmnum, char *data) +{ + int ret; + if (strcmp(result, SUCCESSFUL) == 0) ret = 1; + else ret = 0; + ACShowFMList(ret, fmnum, data); +} + +#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令 +void saacproto_ACRELOADFMOK_recv( int fd, int charindex ) +{ + CHAR_talkToCli( charindex, -1, "重读家族资料OK!", CHAR_COLORYELLOW); + +} + +void saacproto_ACSHOWMEMBERLIST2_recv( int fd, int charaindex, int fm1, char *fm1_name, int fm2, char *fm2_name, int time, int id ) +{ + int i, hour = 0, min = 0; + int fmpks_pos = id * 24; + char f1[20] = {0}, f2[20] = {0}; + + hour = time / 100; + min = time % 100; + + if( fm1_name == NULL || fm2_name == NULL ) return; + + sprintf( f1, "%s", fm1_name ); + sprintf( f2, "%s", fm2_name ); + + for( i=0; i 0 ) { + CHAR_setInt( charaindex, CHAR_GOLD, CHAR_getInt( charaindex, CHAR_GOLD ) +atoi(data1) ); + } + CHAR_send_P_StatusString( charaindex , CHAR_P_STRING_GOLD); + return; + }else { + if( atoi(data1) < 0 ) { + CHAR_setInt( charaindex, CHAR_GOLD, CHAR_getInt( charaindex, CHAR_GOLD ) -atoi(data1) ); + CHAR_send_P_StatusString( charaindex , CHAR_P_STRING_GOLD); + } +#ifdef _FAMILYBANKSTONELOG + CHAR_setInt(charaindex,CHAR_FMBANKGOLD,CHAR_getInt(charaindex,CHAR_FMBANKGOLD)+intdata); + LogFamilyBankStone( + CHAR_getChar( charaindex, CHAR_NAME ), + CHAR_getChar( charaindex, CHAR_CDKEY ), + intdata, + CHAR_getInt( charaindex, CHAR_GOLD ), + (intdata>0)?"FMBank(存款)(家族银行)":"FMBank(取款)(家族银行)", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + CHAR_getInt( charaindex,CHAR_FMBANKGOLD) + ); +#else + LogStone( + atoi(data2), + CHAR_getChar( charaindex, CHAR_NAME ), + CHAR_getChar( charaindex, CHAR_CDKEY ), + -intdata, + CHAR_getInt( charaindex, CHAR_GOLD ), + "FMBank(家族银行)", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ) + ); +#endif + } + }else if( kindflag == FM_FIX_FMLEADERCHANGE ){ + ACFMJob( clifd, ret, data1, data2 ); + } + // CoolFish: 2001/10/03 + else if (kindflag == FM_FIX_FMADV || kindflag == FM_FIX_FMFEED + || kindflag == FM_FIX_FMSYNTHESIZE || kindflag == FM_FIX_FMDEALFOOD) + { + char tmpbuf[1024], flag[128]; +#ifdef _NEW_MANOR_LAW + int i; +#endif + if (kindflag == FM_FIX_FMADV) strcpy(flag, "ADV"); + else if (kindflag == FM_FIX_FMFEED) strcpy(flag, "FEED"); + else if (kindflag == FM_FIX_FMSYNTHESIZE) strcpy(flag, "SYN"); + else if (kindflag == FM_FIX_FMDEALFOOD) strcpy(flag, "FOOD"); + sprintf(tmpbuf, "%s::%d %s %s", flag, + CHAR_getInt(charaindex, CHAR_FMINDEX), + CHAR_getChar(charaindex, CHAR_FMNAME), data1); + // print("ACFixFMData tmpbuf:%s\n", tmpbuf); + LogFMPOP(tmpbuf); +#ifdef _NEW_MANOR_LAW + for(i=0;i= FAMILY_MAXNUM ){ + print(" fmindex:%d if FALSE !!\n", fmindex); + return; + } + familyTax[ fmindex] = data; + sprintf( buf, "B|T|%d", data ); + lssproto_FM_send( clifd, buf ); + } + +} +void saacproto_ACFMClearPK_recv(int fd, char *result, char *fmname, int fmindex, + int index) +{ + int ret, i = 0; + + if (strcmp(result, SUCCESSFUL) == 0) ret = 1; + else ret = 0; + for (i = 0; i < MAX_SCHEDULEMAN * MAX_SCHEDULE; i++) + { + { + if (fmpks[i].flag == -1) continue; + if (fmpks[i].host_index == index + || fmpks[i].guest_index == index) + { + fmpks[i].host_index = -1; + strcpy(fmpks[i].host_name, ""); + fmpks[i].guest_index = -1; + strcpy(fmpks[i].guest_name, ""); + fmpks[i].prepare_time = -1; + fmpks[i].max_player = -1; + fmpks[i].win = -1; + fmpks[i].flag = -1; + } + } + } +} + +#ifdef _ACFMPK_LIST +void saacproto_ACSendFmPk_recv( int fd, int toindex, int flg) +{ + char buf[256]; + if( flg == 0){ + sprintf( buf, "庄园挑战登录失败!!"); + CHAR_talkToCli( toindex, -1, buf, CHAR_COLORRED); + }else{ + sprintf( buf, "庄园挑战登录确认OK,请好好准备。"); + CHAR_talkToCli( toindex, -1, buf, CHAR_COLORYELLOW); + } +} +void saacproto_ACLoadFmPk_recv(int fd, char *data) +{ + char buf[10], fm_pk_data[128]; + char token[256], skip[256]; + int fm_pk_num , fmpks_pos=-1; + + easyGetTokenFromString( data , 1 , buf , sizeof(buf)); + fm_pk_num = atoi(buf); + sprintf(fm_pk_data , "%s", data+2 ); + + if( ((fmpks_pos=fm_pk_num*MAX_SCHEDULE)== -1) || (fm_pk_num > FMPOINTNUM) ){ + print("\n err fm_pk_num(%d)", fm_pk_num ); + return; + } + // 时间 + if (getStringFromIndexWithDelim(data,"|",2,token,sizeof(token))) { + fmpks[fmpks_pos+1].dueltime=atoi(token); + } + // 主队 familyindex + if (getStringFromIndexWithDelim(data,"|",3,token,sizeof(token))) { + fmpks[fmpks_pos+1].host_index=atoi(token); + } + // 主队 家族名 + if (getStringFromIndexWithDelim(data,"|",4,token,sizeof(token))) { + strcpy(fmpks[fmpks_pos+1].host_name,makeStringFromEscaped(token)); + } + // 客队 familyindex + if (getStringFromIndexWithDelim(data,"|",5,token,sizeof(token))) { + fmpks[fmpks_pos+1].guest_index=atoi(token); + } + // 客队 家族名 + if (getStringFromIndexWithDelim(data,"|",6,token,sizeof(token))) { + strcpy(fmpks[fmpks_pos+1].guest_name,makeStringFromEscaped(token)); + } + // 准备时间 + if (getStringFromIndexWithDelim(data,"|",7,token,sizeof(token))) { + fmpks[fmpks_pos+1].prepare_time=atoi(token); + } + // 最大人数 + if (getStringFromIndexWithDelim(data,"|",8,token,sizeof(token))) { + int maxnum = atoi( token); + if( maxnum < 50 ) maxnum = 50; + fmpks[fmpks_pos+1].max_player = maxnum; + } + // 旗标 + if (getStringFromIndexWithDelim(data,"|",9,token,sizeof(token))) { + fmpks[fmpks_pos+1].flag=atoi(token); + } + if( fmpks[fmpks_pos+1].flag == FMPKS_FLAG_MANOR_OTHERPLANET ){ + // 对战星球 + if (getStringFromIndexWithDelim(data,"|",10,token,sizeof(token))) { + strcpy(fmpks[fmpks_pos+2].host_name,makeStringFromEscaped(token)); + strcpy(skip, makeStringFromEscaped(token)); + if (strcmp(getGameserverID(), skip)==0) { + fmpks[fmpks_pos+1].flag=8; + }else if( fmpks[fmpks_pos+1].flag == 8) { + fmpks[fmpks_pos+1].flag=10; + } + } + }else{ + strcpy( fmpks[fmpks_pos+2].host_name, ""); + } +} +#endif + + +void saacproto_ACManorPKAck_recv(int fd, char *data) +{ + // 更新这个 server 的 庄园 pk scheduleman + int i; + char token[256], skip[256]; + int char_max=CHAR_getCharNum(); + + print("ACManorPKAck_recv: %s\n",data); + + for (i=0; i= 990000 ){ + sprintf( buf,"帐号人物[%s]持有石币将超过100万,取消领取资格!", CdKey); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + }else{ + NPC_ActionAddGold( charaindex, 10000); + } + break; + case NEW_DELERR: //新帐号人物删除发生错误! + CHAR_talkToCli( charaindex, -1, "此帐号人物无法领取石币!", CHAR_COLORYELLOW); + break; + case NEW_ADDOK: + sprintf( buf,"新帐号人物[%s]增加完成!", CdKey); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + break; + case NEW_ADDERR: + sprintf( buf,"新帐号人物[%s]增加发生错误!", CdKey); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + break; + case NEW_LISTFULL: + CHAR_talkToCli( charaindex, -1, "新帐号人物列表已满!", CHAR_COLORYELLOW); + break; + } +} +#endif + + +#ifdef _NEW_PLAYERGOLD +void saacproto_LoadNEWPlayer_recv(int fd , int charaindex, char *data) +{ + CHAR_talkToCli( charaindex, -1, data, CHAR_COLORYELLOW); +} +#endif + +#ifdef _WAEI_KICK +void saacproto_ACKick_recv(int fd , int act, char* data ,int retfd) +{ + int clifd = getfdFromFdid(retfd); + //char cdkey[CDKEYLEN]; + int cindex = getCharindexFromFdid(retfd); + + print("状态:%s \n", data); + + switch( act) { + case 0: //FAIL + if( CONNECT_checkfd(clifd) == FALSE) return; + CHAR_talkToCli( cindex, -1, data, CHAR_COLORYELLOW); + break; + case 1: //跨星球踢人 + { + char cdkey[256]; + char szName[256]; + int i, MAX_USER=0; + BOOL find=FALSE; + + print(" SAAC踢人:%s ", data); + + MAX_USER=getFdnum(); + for(i=0;i%s ", fd_charaindex, cdkey); + CHAR_talkToCli( fd_charaindex, -1, "因准备移民而断线!", + CHAR_COLORYELLOW); + } +#endif +#ifdef _TIMEOUTKICK + else if( retfd == -3 ){ // Robin add + print(" 因WGS点数不足:%d->%s ", fd_charaindex, cdkey); + CHAR_talkToCli( fd_charaindex, -1, "您的WGS点数不足!", + CHAR_COLORYELLOW); + } +#endif + else{ + print(" 因做坏事 "); + CHAR_talkToCli(fd_charaindex, -1, "因做坏事而断线。", + CHAR_COLORYELLOW); + } + CONNECT_setCloseRequest( i , 1 ); + find=TRUE; + } + } + } + + if( find == TRUE && retfd != -1 && CHAR_CHECKINDEX( cindex) ) { + char buf1[256];//, buf2[256]; + sprintf(buf1,"系统将[%s]逐出伺服器。", /*CHAR_getChar( cindex, CHAR_NAME),*/ szName); + for( i=0; iindexOfExistDepotItems = allocateMemory( sizeof( int ) * CHAR_MAXDEPOTITEMHAVE ); + if( ch->indexOfExistDepotItems == NULL ) return; + for( i=0; iindexOfExistDepotItems[i] = -1; + + if( CHAR_makeDepotItemStringToChar( charaindex, data) == FALSE ){ + CHAR_talkToCli( charaindex, -1, "道具仓库资料读取失败!", CHAR_COLORYELLOW); + CHAR_removeDepotItem( charaindex); + return; + } + if( !CHAR_CHECKINDEX( meindex) ) return; + if( clifd != -1 ) { + char message[1024]; + char buf[1024]; + strcpy( message, + "3\n\n" + " 使用道具仓库\n\n" + " <存放道具>\n" + " <取回道具>\n" + ); + lssproto_WN_send( clifd, WINDOW_MESSAGETYPE_SELECT, + WINDOW_BUTTONTYPE_CANCEL, + 311, //CHAR_WINDOWTYPE_DEPOTITEMSHOP_HANDLE, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + makeEscapeString( message, buf, sizeof(buf)) ); + } + +} + +#endif//,。! + + +#ifdef _CHAR_POOLPET +void saacproto_ACCharSavePoolPet_recv(int fd ,char* result, char* data,int retfd) +{ + int charaindex = getCharindexFromFdid( retfd); + if( !CHAR_CHECKINDEX(charaindex) ) return; + if( strstr( result, FAILED ) != NULL ){ + CHAR_talkToCli( charaindex, -1, "宠物仓库资料存档失败!", CHAR_COLORYELLOW); + return; + + } +} + +void saacproto_ACCharGetPoolPet_recv(int fd ,char* result, char* data,int retfd, int meindex) +{ + Char* ch = NULL; + int i, clifd, charaindex; + + if( strcmp( result , SUCCESSFUL ) != 0 ) return; + charaindex = getCharindexFromFdid(retfd); + if( !CHAR_CHECKINDEX( charaindex) ) return; + clifd = getfdFromCharaIndex( charaindex); + if( CHAR_CheckDepotPet( charaindex) ) return;//仓库已存在 + + if( (ch = CHAR_getCharPointer( charaindex)) == NULL ) return; + ch->indexOfExistDepotPets = allocateMemory( sizeof( int ) * CHAR_MAXDEPOTPETHAVE ); + if( ch->indexOfExistDepotPets == NULL ) return; + for( i=0; iindexOfExistDepotPets[i] = -1; + + if( CHAR_makeDepotPetStringToChar( charaindex, data) == FALSE ){ + CHAR_talkToCli( charaindex, -1, "宠物仓库资料读取失败!", CHAR_COLORYELLOW); + CHAR_removeDepotPet( charaindex); + return; + } + if( !CHAR_CHECKINDEX( meindex) ) return; + if( clifd != -1 ) { + char message[1024]; + char buf[1024]; + strcpy( message, + "3\n\n" + " 使用宠物仓库\n\n" + " <存放宠物>\n" + " <取回宠物>\n" + ); + lssproto_WN_send( clifd, WINDOW_MESSAGETYPE_SELECT, + WINDOW_BUTTONTYPE_CANCEL, + CHAR_WINDOWTYPE_DEPOTPETSHOP_HANDLE, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + makeEscapeString( message, buf, sizeof(buf)) ); + } + +} + +#endif + + +#ifdef _UNIVERSE_CHATROOM//ACUniChatroom +void saacproto_ACUniChatroom_recv( int acfd, int charaindex, int clifdid, char *result, + char *CdKey, char *data) +{ + saac_ChatRoom_recvall ( acfd, result, data, charaindex, clifdid ); +} +#endif + + +#ifdef _ANGEL_SUMMON +//void saacproto_ACMissionTable_recv( int fd, int num, int type, char *data, int charaindex) +void saacproto_ACMissionTable_recv( int fd, int num, int type, char *data, char* angelinfo) +{ + char msg[1024]; + + if( type == 1 ) { // get data list + //if( num == -1) // get all data + { + int di, ti; + char onedata[1024], token[1024]; + + if( num == -1 ) { + print("获得所有任务!!\n"); + memset( missiontable, 0, sizeof(missiontable)); + } + else + print("获得一个任务!!:%s\n", data); + + for( di =1; di = MAXMISSIONTABLE) continue; + getStringFromIndexWithDelim( onedata, "|", 2, token, sizeof(token)); + strcpy( missiontable[ti].angelinfo, token); + getStringFromIndexWithDelim( onedata, "|", 3, token, sizeof(token)); + strcpy( missiontable[ti].heroinfo, token); + getStringFromIndexWithDelim( onedata, "|", 4, token, sizeof(token)); + missiontable[ti].mission = atoi( token); + getStringFromIndexWithDelim( onedata, "|", 5, token, sizeof(token)); + missiontable[ti].flag = atoi( token); + getStringFromIndexWithDelim( onedata, "|", 6, token, sizeof(token)); + missiontable[ti].time = atoi( token); + getStringFromIndexWithDelim( onedata, "|", 7, token, sizeof(token)); + missiontable[ti].limittime = atoi( token); + } + } + } + else if( type == 2 ) { // add data return + int angelindex =-1, i, maxChar; + char nameinfo[128], msgbuf[1024]; + + if( num == -1) { + sprintf( msg, "任务已满\n"); + print( msg); + LogAngel( msg); + return; + } + + sprintf( msgbuf, "收到AC回应(add data) num=%d nameinfo=%s ", num, angelinfo); + print( msgbuf); + LogAngel( msgbuf); + + maxChar = CHAR_getPlayerMaxNum(); + for( i =0; i = MAXMISSIONTABLE) return; + + sprintf( msg, " AC清除 任务:%d %s %s ", num, missiontable[num].angelinfo, missiontable[num].heroinfo); + print( msg); + LogAngel( msg); + + strcpy( missiontable[num].angelinfo, ""); + strcpy( missiontable[num].heroinfo, ""); + missiontable[num].mission = 0; + missiontable[num].flag = 0; + missiontable[num].time = 0; + missiontable[num].limittime = 0; + + } + +} + +#endif + +#ifdef _TEACHER_SYSTEM +void saacproto_ACCheckCharacterOnLine_recv( int acfd, int charaindex, int iOnline,char *data,int flag) +{ + switch(flag){ + case R_F_TEACHER_SYSTEM: + CHAR_Teacher_system_View(charaindex,iOnline,data); + break; + default:printf("saacproto_ACCheckCharacterOnLine_recv(): error flag type!!(%d)\n",flag); + } +} +#endif + +#ifdef _RACEMAN +void saacproto_ACRaceRecordandSort_recv(int fd,int charaindex,int racetype,char *data) +{ + int i,j=0; + char perdata[128]; + char buuf[16384]; + + //sprintf(buuf,"recv_type:%d data:%s",racetype,data); + //CHAR_talkToCli( charaindex , -1, buuf , CHAR_COLORYELLOW); + + //print("race_recv:%s",data); + + if(racetype == 0 || racetype == 9 ) return; //因为登记动作而接收到ac的回传,所以不用处理 + + //或许可以原封不动传给CLIENT + + if(racetype == 1){ //gamemode 1 + memset(ranktable1,0,sizeof(ranktable1)); + for(i=0;i +#include +#include +#include "common.h" +#include "util.h" +#include "lssproto_serv.h" +#include "saacproto_cli.h" +#include "net.h" +#include "char.h" +#include "object.h" +#include "readmap.h" +#include "addressbook.h" +#include "handletime.h" +#include "configfile.h" +#include "event.h" +#include "pet.h" +#include "battle.h" +#include "battle_command.h" +#include "magic.h" +#include "petmail.h" +#include "item_gen.h" +#include "pet_skill.h" +#include "log.h" //add this because the second had it +#include "map_deal.h" // CoolFish: 2001/4/18 +#include "trade.h" // CoolFish: Trade 2001/4/18 +#include "family.h" // CoolFish: Family 2001/5/24 +#include "item_event.h" // shan: blackmarket + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 +#include "profession_skill.h" +#endif +#ifdef _CHATROOMPROTOCOL // (不可开) Syu ADD 聊天室频道 +#include "chatroom.h" +#endif +BOOL checkStringErr( char * ); + +// shan add +extern struct FM_PKFLOOR fmpkflnum[FAMILY_FMPKFLOOR]; + + +/* ----------------------------------------------------------------------- + * 蓟 仄凶 读及 寞井日平乓仿奶件犯永弁旦毛 月 + * ----------------------------------------------------------------------*/ +static int Callfromcli_Util_getTargetCharaindex( int fd, int toindex) +{ + int to_charaindex = -1; + int fd_charaindex = CONNECT_getCharaindex( fd ); + + /* 愤坌愤褥 */ + if( toindex == 0 ) { + to_charaindex = fd_charaindex; + } + /* 矢永玄 1 5 */ + else if( toindex > 0 && toindex < 6 ) { + to_charaindex = CHAR_getCharPet( fd_charaindex, toindex-1); + if( !CHAR_CHECKINDEX( to_charaindex)) { + to_charaindex = -1; + } + } + /* 醮棉 6 10 */ + else if( toindex > 5 && toindex < 11 ) { + to_charaindex = CHAR_getPartyIndex( fd_charaindex, toindex - 6); + } + return to_charaindex; +} +/*---------------------------------------- + * 弁仿奶失件玄互夫弘奶件允月 匹手丢乒伉卞卺户月分仃卅及匹民尼永弁反卅中 + * 仇木毛裟少午 CLI 卞卅月[ + ----------------------------------------*/ +void lssproto_ClientLogin_recv( int fd,char* cdkey, char* passwd ) +{ + /* 2褐卞仇木互裟壬木月及反中中 */ + /* 由旦伐□玉 凳毛仄化岳 分匀凶日疯太仇木毛裟少仪[*/ + {//ttom avoid the restore 2001/01/09 + int fd_charaindex; + Char *chwk; + + // CoolFish: +2 2001/4/18 + fd_charaindex = CONNECT_getCharaindex(fd); + chwk = CHAR_getCharPointer(fd_charaindex); + if(CONNECT_isNOTLOGIN(fd)==FALSE){ + print("\n the Client had Logined fd=%d",fd); + return; + } + } + //print( "CliLogin cdkey=%s\n" , cdkey ); + /* connect卞戊疋□允月 */ + CONNECT_setCdkey( fd, cdkey ); + CONNECT_setPasswd( fd, passwd ); + CONNECT_setCtype( fd, CLI ); + {//ttom + unsigned long ip; + int a,b,c,d; + int i; + ip=CONNECT_get_userip(fd); + a=(ip % 0x100); ip=ip / 0x100; + b=(ip % 0x100); ip=ip / 0x100; + c=(ip % 0x100); ip=ip / 0x100; + d=(ip % 0x100); + print( "\n登陆账号=%s 来自 %d.%d.%d.%d \n",cdkey,a,b,c,d); + + for(i=0;i= 32 ){ + lssproto_CreateNewChar_send(fd,FAILED, "Too long charname\n"); + return; + // Nuke start 0711: Avoid naming as WAEI + }else if (strstr(charname,"华义") +// WON ADD + || strstr(charname,"gm") || strstr(charname,"GM") + || strstr(charname,"Gm") || strstr(charname,"gM") + || strstr(charname,"gm") || strstr(charname,"GM") + || strstr(charname,"Gm") || strstr(charname,"gM") +#ifdef _UNREG_NEMA + || (strstr(charname,getUnregname(0)) && strlen(getUnregname(0))>0) + || (strstr(charname,getUnregname(1)) && strlen(getUnregname(1))>0) + || (strstr(charname,getUnregname(2)) && strlen(getUnregname(2))>0) + || (strstr(charname,getUnregname(3)) && strlen(getUnregname(3))>0) + || (strstr(charname,getUnregname(4)) && strlen(getUnregname(4))>0) +#endif + || strstr(charname,"神秘人物") +// WON END + ) { + + unsigned ip=CONNECT_get_userip(fd); + int a, b, c, d, ck; + + a=(ip % 0x100); ip=ip / 0x100; + b=(ip % 0x100); ip=ip / 0x100; + c=(ip % 0x100); ip=ip / 0x100; + d=(ip % 0x100); + + ck= ( + ( (a== 10) && (b==0) && (c==0) ) || + ( (a==211) && (b==76) && (c==176) && (d==21) ) || // 台北wayi + ( (a==210) && (b==64) && (c==97) && ((d>=21)&&(d<=25)) ) || + ( (a==61) && (b==222) && (c==142) && (d==66) ) + ); + + print(" name_WAEI_IP:%d.%d.%d.%d ck:%d ",a,b,c,d,ck ); + + if( !ck ) { + lssproto_CreateNewChar_send(fd,FAILED, "Invalid charname\n"); + return; + } + } + { + // Nuke start 0801,0916: Avoid strange name + int i,ach; + for (i=0,ach=0;i=0x7f)&& + ((unsigned char)charname[i]<=0xa0)) { ach=1; break; } // Force no 0x7f~0xa0 + if ((unsigned char)charname[i]<=0x20) { ach=1; break; } // Force greater than 0x20 + if (ach) { + if ((((unsigned char)charname[i]>=0x40)&&((unsigned char)charname[i]<=0x7e))|| + (((unsigned char)charname[i]>=0xa1)&&((unsigned char)charname[i]<=0xfe))) ach=0; + } else { + if (((unsigned char)charname[i]>=0xa1)&&((unsigned char)charname[i]<=0xfe)) ach=1; + } + } + if (ach) { lssproto_CreateNewChar_send(fd,FAILED, "Error in Chinese\n"); return; } + // Nuke end + } + // Nuke end + + + CONNECT_getCdkey( fd, cdkey, sizeof( cdkey )); + CHAR_createNewChar( fd, dataplacenum, charname ,imgno, faceimgno, + vital, str, tgh, dex, + earth, water, fire, wind, + hometown , cdkey ); +} + +void lssproto_CharLogin_recv( int fd,char* charname ) +{ + char cdkey[CDKEYLEN], passwd[PASSWDLEN]; + + if( CONNECT_isCLI( fd ) == FALSE )return; + print( "\n尝试登陆: 人物名称=%s\n", charname); + if( charname[0] == '\0' ){ + lssproto_CharLogin_send( fd, FAILED, "\n人物名称含有不能访问字符\n" ); + return; + } + if( CONNECT_isNOTLOGIN(fd) == FALSE ){ + lssproto_CharLogin_send( fd, FAILED, "Already Logged in\n" ); + return; + } + CONNECT_setCharname( fd, charname ); + CONNECT_getCdkey( fd, cdkey, sizeof( cdkey )); + CONNECT_getPasswd( fd, passwd, sizeof(passwd)); + saacproto_ACCharLoad_send( acfd, cdkey,passwd, charname,1,"", + CONNECT_getFdid(fd) ); + CONNECT_setState( fd, WHILELOGIN ); +} + +#ifdef _ITEM_CHECKDROPATLOGOUT +BOOL CheckDropatLogout(int charaindex ) +{ + int i; + for( i=0 ; i= 0) || getMuseum() ) +#else + if( CHAR_getInt( charaindex, CHAR_LASTTALKELDER) >= 0 ) +#endif + { +#ifdef _MUSEUM + if( getMuseum() ) { + fl = 9000; x = 40; y = 40; + } + else { + CHAR_getElderPosition( CHAR_getInt( charaindex, CHAR_LASTTALKELDER), &fl, &x, &y ); + } +#else + CHAR_getElderPosition( CHAR_getInt( charaindex, CHAR_LASTTALKELDER), &fl, &x, &y ); +#endif + +#ifdef _CHAR_NEWLOGOUT + if( flg == 1 ){//回纪录点 + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE){ + CHAR_talkToCli( charaindex, -1, "战斗中无法回纪录点!", CHAR_COLORYELLOW); + return; + } +#ifdef _ITEM_CHECKWARES + if( CHAR_CheckInItemForWares( charaindex, 0) == FALSE ){ + CHAR_talkToCli( charaindex, -1, "携带货物无法使用。", CHAR_COLORYELLOW); + return; + } +#endif +#ifdef _BAD_PLAYER // WON ADD 送坏玩家去关 + if( (CHAR_getInt(charaindex,CHAR_FLOOR)==117)||(CHAR_getInt(charaindex,CHAR_FLOOR)==887) ){ + CHAR_talkToCli( charaindex, -1, "此处无法使用。", CHAR_COLORYELLOW); + return; + } +#endif + if( CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE ) != CHAR_PARTY_NONE ){ + CHAR_talkToCli( charaindex, -1, "团队中无法回纪录点!", CHAR_COLORYELLOW); + return; + } +#ifdef _ITEM_CHECKDROPATLOGOUT + if( CheckDropatLogout( charaindex ) ){ + CHAR_talkToCli( charaindex, -1, "携带的物品使你无法回纪录点!", CHAR_COLORYELLOW); + return; + } +#endif +#ifdef _DEATH_CONTEND +/* + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE){ + if( CHAR_getInt( charaindex, CHAR_FLOOR) != 8250 && + CHAR_getInt( charaindex, CHAR_PKLISTLEADER) == 1 ){ + //andy_log + print("PlayerLogout_Exit()\n"); + NPC_PKLIST_PlayerLogout_Exit( charaindex ); + CHAR_warpToSpecificPoint( charaindex, 8250, 17, 17 ); + } + } +*/ +#else + if( CHAR_getInt( charaindex,CHAR_FLOOR ) != 117 && + CHAR_getInt( charaindex,CHAR_FLOOR ) != 887 +#ifdef _ADD_DUNGEON //追加地牢 + && CHAR_getInt( charaindex,CHAR_FLOOR ) != 8513 +#endif + ){ + CHAR_warpToSpecificPoint( charaindex, fl, x, y ); + + } +#endif + return; + } +#else + if( CHAR_getInt(charaindex,CHAR_FLOOR ) == 117){ + CHAR_setInt(charaindex,CHAR_X,225); + CHAR_setInt(charaindex,CHAR_Y,13); + }else{ + CHAR_setInt(charaindex,CHAR_FLOOR,fl); + CHAR_setInt(charaindex,CHAR_X,x); + CHAR_setInt(charaindex,CHAR_Y,y); + } +#endif + } + + // Robin add + //CHAR_setInt( charaindex, CHAR_LASTLEAVETIME, (int)time(NULL)); + } + + CHAR_logout(fd,TRUE); + CONNECT_setState( fd, WHILELOGOUTSAVE ); + CONNECT_setCharaindex( fd, -1 ); + CONNECT_getCdkey( fd, cdkey, sizeof(cdkey )); + CONNECT_getCharname( fd, charname, sizeof(charname)); + print( "Logout cdkey:%s charname=%s\n" , cdkey, charname ); +} + +void lssproto_CharDelete_recv( int fd , char* charname) +{ + char cdkey[CDKEYLEN],passwd[PASSWDLEN]; + int fdid; + + if( CONNECT_isCLI( fd ) == FALSE )return; + if( CONNECT_isNOTLOGIN( fd ) == FALSE ){ + lssproto_CharDelete_send( fd, FAILED, "Already Logged in\n" ); + return; + } + CONNECT_getCdkey( fd, cdkey, sizeof(cdkey)); + CONNECT_getPasswd( fd, passwd, sizeof(passwd)); + fdid = CONNECT_getFdid(fd); + saacproto_ACCharDelete_send( acfd, cdkey,passwd, charname , "" ,fdid ); + +#ifndef _DEATH_CONTEND + { + char buff[512]; + char escapebuf[1024]; + snprintf( buff, sizeof(buff), "%s_%s", cdkey, charname); + makeEscapeString( buff, escapebuf, sizeof(escapebuf)); + saacproto_DBDeleteEntryInt_send(acfd, DB_DUELPOINT, escapebuf, fdid, 0 ); + saacproto_DBDeleteEntryString_send( acfd, DB_ADDRESSBOOK, escapebuf, fdid, 0 ); + } + saacproto_Broadcast_send( acfd, cdkey, charname, "chardelete", 0); +#endif + + CONNECT_setState( fd, WHILECHARDELETE ); +} + +void lssproto_CharList_recv( int fd ) +{ + char cdkey[CDKEYLEN], passwd[PASSWDLEN]; + int fdid=-1; + + if( CONNECT_isCLI( fd ) == FALSE )return; + + if( CONNECT_isNOTLOGIN( fd ) == FALSE ){ + lssproto_CharList_send( fd, FAILED, "Already Logged in\n" ); + return; + } + + CONNECT_getCdkey( fd, cdkey, sizeof(cdkey)); + CONNECT_getPasswd( fd, passwd, sizeof(passwd)); + fdid = CONNECT_getFdid( fd ); + { + int i; + int playernum = CHAR_getPlayerMaxNum(); + for( i=0; i1)||(i_diff_y>1) ){ + // Robin 0518 + //CHAR_talkToCli(fd_charaindex, -1, "因走路座标错误而断线。", CHAR_COLORYELLOW); + + //return; + x = ix; + y = iy; + } + } + if(!(MAP_walkAble(fd_charaindex,CHAR_getInt(fd_charaindex, CHAR_FLOOR),x,y))){ + // Robin 03/14 + x = ix; + y = iy; + }else{ + } + CHAR_walk_init( fd, x, y, direction, TRUE); +} +/*------------------------------------------------------------ + * 汹仁 + ------------------------------------------------------------*/ +void lssproto_W2_recv( int fd,int x,int y,char* direction ) +{ + //ttom +3 + int fd_charaindex, ix, iy, i_fl; + //Char *chwk;// CoolFish: Rem 2001/4/18 + fd_charaindex = CONNECT_getCharaindex( fd ); + + ix=CHAR_getInt(fd_charaindex, CHAR_X); + iy=CHAR_getInt(fd_charaindex, CHAR_Y); + i_fl=CHAR_getInt(fd_charaindex, CHAR_FLOOR); + + // CoolFish: Prevent Trade Cheat 2001/4/18 + if (CHAR_getWorkInt(fd_charaindex, CHAR_WORKTRADEMODE) != CHAR_TRADE_FREE) + return; + + //ttom avoid the warp at will 11/6 + { + int i_diff_x,i_diff_y; + //ix=CHAR_getInt(fd_charaindex, CHAR_X); + //iy=CHAR_getInt(fd_charaindex, CHAR_Y); + //i_fl=CHAR_getInt(fd_charaindex, CHAR_FLOOR); + i_diff_x=abs(ix-x); + i_diff_y=abs(iy-y); + if( (i_diff_x>1)||(i_diff_y>1) ){//2 + //print("\nWarp Error!!!!!!!!!"); + //print("\nthe origion->fd=%d,x=%d,y=%d",fd,ix,iy); + //print("\nthe modify-->fd=%d,X=%d,Y=%d,dir=%s",fd,x,y,direction); + x=ix; + y=iy; + // Robin 03/14 + //return; + } + //if((i_fl==117)&&(ix==225)&&(iy==13)) goto END_w; + }//ttom + if(!(MAP_walkAble(fd_charaindex,CHAR_getInt(fd_charaindex, CHAR_FLOOR),x,y))){ + print("\n the map is invaild(f:%d,x:%d,y:%d)",CHAR_getInt(fd_charaindex, CHAR_FLOOR),x,y); + x = ix; + y = iy; + } +//END_w: + CHAR_walk_init( fd, x, y, direction, FALSE); +} + +void lssproto_SKD_recv( int fd,int dir, int index) +{ + CHECKFDANDTIME; +} + +void lssproto_ID_recv( int fd,int x,int y,int haveitemindex,int toindex ) +{ + int to_charaindex; + int fd_charaindex; + + CHECKFDANDTIME; + fd_charaindex = CONNECT_getCharaindex( fd ); + + // CoolFish: Prevent Trade Cheat 2001/4/18 + if (CHAR_getWorkInt(fd_charaindex, CHAR_WORKTRADEMODE) != CHAR_TRADE_FREE) + return; + + /* 爵 凛反轮仁 仿弘匹仇木卞娄匀井井月第 岭丐曰 */ + if( CHAR_getWorkInt( fd_charaindex, CHAR_WORKBATTLEMODE) + != BATTLE_CHARMODE_NONE) return ; + //ttom avoid the warp at will 12/5 + { + int ix,iy; + ix=CHAR_getInt(fd_charaindex, CHAR_X); + iy=CHAR_getInt(fd_charaindex, CHAR_Y); + x=ix; + y=iy; + } + CHAR_setMyPosition( fd_charaindex, x,y,TRUE); + to_charaindex = Callfromcli_Util_getTargetCharaindex( fd, toindex); + CHAR_ItemUse( fd_charaindex, to_charaindex, haveitemindex ); +} + + +/*------------------------------------------------------------ + * 惫寞毛蓟少 + ------------------------------------------------------------*/ +void lssproto_ST_recv( int fd,int titleindex ) +{ + CHECKFDANDTIME; + CHAR_selectTitle( CONNECT_getCharaindex( fd) , titleindex ); +} +/*------------------------------------------------------------ + * 惫寞毛绰轮允月 + ------------------------------------------------------------*/ +void lssproto_DT_recv( int fd,int titleindex ) +{ + CHECKFDANDTIME; + CHAR_deleteTitle( CONNECT_getCharaindex(fd) , titleindex ); +} + + +/*------------------------------------------------------------ + * 愤裘惫寞毛 允月 + ------------------------------------------------------------*/ +void lssproto_FT_recv( int fd,char* data ) +{ + CHECKFDANDTIME; + + // Robin 04/23 debug + if( strlen(data) > 12 ) return; + + if( checkStringErr(data) ) return; + + CHAR_inputOwnTitle( CONNECT_getCharaindex(fd) , data); +} + +/*------------------------------------------------------------ + * 失奶 丞毛胶丹 + ------------------------------------------------------------*/ +void lssproto_PI_recv( int fd,int x, int y, int dir ) +{ + int fd_charaindex; + CHECKFDANDTIME; + fd_charaindex = CONNECT_getCharaindex( fd ); + {//ttom avoid warp at will + int ix,iy; + ix=CHAR_getInt(fd_charaindex, CHAR_X); + iy=CHAR_getInt(fd_charaindex, CHAR_Y); + if( (ix!=x)||(iy!=y)){ + //print("\n--Error!!!!"); + //print("\norigion x=%d,y=%d",ix,iy); + //print("\nmodify X=%d,Y=%d",x,y); + x=ix; + y=iy; + } + }//ttom end + + CHAR_setMyPosition( fd_charaindex, x,y,TRUE); + if( CHAR_getWorkInt( fd_charaindex, CHAR_WORKBATTLEMODE) + != BATTLE_CHARMODE_NONE) return ; + CHAR_PickUpItem( fd_charaindex, dir); +} + +void lssproto_DI_recv( int fd,int x, int y, int itemindex ) +{ + int charaindex; + CHECKFDANDTIME; + charaindex = CONNECT_getCharaindex( fd ); + + if( CHAR_getWorkInt(charaindex, CHAR_WORKTRADEMODE) != CHAR_TRADE_FREE) return; + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE) return; + + CHAR_setMyPosition( charaindex , + CHAR_getInt( charaindex, CHAR_X), CHAR_getInt( charaindex, CHAR_Y), TRUE); + + CHAR_DropItem( charaindex, itemindex ); +} + +void lssproto_DP_recv( int fd,int x, int y, int petindex ) +{ + int fd_charaindex; + CHECKFDANDTIME; + fd_charaindex = CONNECT_getCharaindex( fd ); + if (CHAR_getWorkInt(fd_charaindex, CHAR_WORKTRADEMODE) != CHAR_TRADE_FREE) + return; + { + int ix,iy; + ix=CHAR_getInt(fd_charaindex, CHAR_X); + iy=CHAR_getInt(fd_charaindex, CHAR_Y); + x=ix; + y=iy; + } + CHAR_setMyPosition( fd_charaindex , x,y,TRUE); + if( CHAR_getWorkInt( fd_charaindex , CHAR_WORKBATTLEMODE) + != BATTLE_CHARMODE_NONE) return ; + PET_dropPet( fd_charaindex, petindex); +} + +/*------------------------------------------------------------ + * 嗯毛 仁 + ------------------------------------------------------------*/ +void lssproto_DG_recv( int fd,int x, int y, int amount ) +{ + int fd_charaindex; + CHECKFDANDTIME; + fd_charaindex = CONNECT_getCharaindex( fd ); + //ttom avoid the warp at will 12/15 + { + int ix,iy; + ix=CHAR_getInt(fd_charaindex, CHAR_X); + iy=CHAR_getInt(fd_charaindex, CHAR_Y); + x=ix; + y=iy; + } + CHAR_setMyPosition( fd_charaindex, x,y,TRUE); + + /* 爵 反轮仁 仿弘匹仇木卞娄匀井井月第 岭丐曰 */ + if( CHAR_getWorkInt( fd_charaindex, CHAR_WORKBATTLEMODE) + != BATTLE_CHARMODE_NONE) return ; + + // CoolFish: Prevent Trade Cheat 2001/4/18 + if (CHAR_getWorkInt(fd_charaindex, CHAR_WORKTRADEMODE) != CHAR_TRADE_FREE) + return; + + + CHAR_DropMoney( fd_charaindex, amount ); +} + +/*------------------------------------------------------------ + * 失奶 丞毛啖 允月[隶 手仇木匹 + ------------------------------------------------------------*/ +void lssproto_MI_recv( int fd,int fromindex,int toindex ) +{ + int fd_charaindex; + CHECKFDANDTIME; + fd_charaindex = CONNECT_getCharaindex( fd ); + + // CoolFish: Prevent Trade Cheat 2001/4/18 + if (CHAR_getWorkInt(fd_charaindex, CHAR_WORKTRADEMODE) != CHAR_TRADE_FREE) + return; + + /* 爵 反轮仁 仿弘匹仇木卞娄匀井井月第 岭丐曰 */ + if( CHAR_getWorkInt( fd_charaindex, CHAR_WORKBATTLEMODE) + != BATTLE_CHARMODE_NONE) return ; + CHAR_moveEquipItem( fd_charaindex, fromindex, toindex ); + +} + +/*------------------------------------------------------------ + * 旦平伙失永皿 + ------------------------------------------------------------*/ +void lssproto_SKUP_recv( int fd,int skillid ) +{ + int fd_charaindex; + CHECKFDANDTIME; + fd_charaindex = CONNECT_getCharaindex(fd); + + /* 爵 反轮仁 仿弘匹仇木卞娄匀井井月第 岭丐曰 */ + if( CHAR_getWorkInt( fd_charaindex, CHAR_WORKBATTLEMODE) + != BATTLE_CHARMODE_NONE) return ; + CHAR_SkillUp(fd_charaindex,skillid); +} + +/*------------------------------------------------------------ + * 戊生弁扑亦件锹澎卞丢永本□斥毛霜耨 + ------------------------------------------------------------*/ +void lssproto_MSG_recv( int fd,int index,char* message, int color ) +{ + int fd_charaindex; + CHECKFD; + fd_charaindex = CONNECT_getCharaindex( fd); + ADDRESSBOOK_sendMessage( fd_charaindex, index,message, color ); + +} + +/*------------------------------------------------------------ + * 失玉伊旦皮永弁及 毛母它件夫□玉允月邰菲互 凶 + ------------------------------------------------------------*/ +void lssproto_AB_recv( int fd ) +{ + int fd_charaindex; + CHECKFDANDTIME; + fd_charaindex = CONNECT_getCharaindex( fd ); + ADDRESSBOOK_sendAddressbookTable( fd_charaindex ); +} + +/*------------------------------------------------------------ + * 失玉伊旦皮永弁及嫩 毛绰轮允月 + ------------------------------------------------------------*/ +void lssproto_DAB_recv( int fd , int index) +{ + int fd_charaindex; + CHECKFDANDTIME; + fd_charaindex = CONNECT_getCharaindex( fd ); + ADDRESSBOOK_deleteEntry( fd_charaindex ,index); +} + +void lssproto_AAB_recv( int fd , int x, int y) +{ + int fd_charaindex; + CHECKFDANDTIME; + fd_charaindex = CONNECT_getCharaindex( fd ); + { + int ix,iy; + ix=CHAR_getInt(fd_charaindex, CHAR_X); + iy=CHAR_getInt(fd_charaindex, CHAR_Y); + if( (ix!=x)||(iy!=y)){ + x=ix; + y=iy; + } + } + CHAR_setMyPosition( fd_charaindex , x,y,TRUE); + ADDRESSBOOK_addEntry( fd_charaindex ); +} + +void lssproto_L_recv( int fd, int dir ) +{ + int fd_charaindex; + CHECKFDANDTIME; + fd_charaindex = CONNECT_getCharaindex( fd ); + CHAR_Look( fd_charaindex ,dir ); +} + + +/*------------------------------------------------------------ + * 民乓永玄迕丢永本□斥及霜耨 + ------------------------------------------------------------*/ +void lssproto_TK_recv( int fd,int x, int y,char* message,int color, int area ) +{ + int fd_charaindex,ix,iy;//ttom+2 + int fmindex, channel; + + CHECKFD; + fd_charaindex = CONNECT_getCharaindex( fd ); + fmindex = CHAR_getInt( fd_charaindex, CHAR_FMINDEX ); + channel = CHAR_getWorkInt( fd_charaindex, CHAR_WORKFMCHANNEL ); + {// Robin 0629 silent + int silentSec, talkCount; + silentSec = CHAR_getInt(fd_charaindex,CHAR_SILENT); + if( silentSec > 0 ) { + int loginTime; + char buf[256]; + int leftSec; + loginTime = CHAR_getWorkInt(fd_charaindex, CHAR_WORKLOGINTIME ); + // 防止时间修正回朔後 异常禁言 Robin 20040817 + if( (int)NowTime.tv_sec < loginTime) { + CHAR_setInt(fd_charaindex, CHAR_SILENT, 0 ); + return; + } + if( ((int)NowTime.tv_sec -loginTime) > silentSec ) { + CHAR_setInt(fd_charaindex, CHAR_SILENT, 0 ); + return; + } + silentSec += 10; //多禁10秒 + + leftSec = silentSec - ((int)NowTime.tv_sec - loginTime); + sprintf(buf, "禁言中!!还有%d秒,再讲多禁10秒钟。", leftSec ); + CHAR_talkToCli(fd_charaindex, -1, buf, color); + CHAR_setInt(fd_charaindex, CHAR_SILENT, silentSec ); + return; + } + + talkCount = CHAR_getWorkInt(fd_charaindex, CHAR_WORKTALKCOUNT ); + talkCount ++; + CHAR_setWorkInt( fd_charaindex, CHAR_WORKTALKCOUNT, talkCount); + if( talkCount > 8 ) { + int lastTalkTime = CHAR_getWorkInt(fd_charaindex, CHAR_WORKTALKTIME ); + if( (int)NowTime.tv_sec - lastTalkTime < 10 ) { + CHAR_setInt( fd_charaindex,CHAR_SILENT, 60 ); + CHAR_setWorkInt( fd_charaindex, CHAR_WORKLOGINTIME, (int)NowTime.tv_sec ); + CHAR_talkToCli( fd_charaindex, -1, "你太多话了唷,请你的嘴巴先休息个一分钟吧!", color); + CHAR_setWorkInt(fd_charaindex, CHAR_WORKTALKCOUNT, 0 ); + return; + }else { + CHAR_setWorkInt( fd_charaindex, CHAR_WORKTALKTIME, (int)NowTime.tv_sec ); + CHAR_setWorkInt(fd_charaindex, CHAR_WORKTALKCOUNT, 0 ); + } + } + + } + ix=CHAR_getInt(fd_charaindex, CHAR_X); + iy=CHAR_getInt(fd_charaindex, CHAR_Y); + x=ix; + y=iy; + CHAR_setMyPosition( fd_charaindex, x,y,TRUE); + if(!CONNECT_get_shutup(fd)){ //ttom add the shut up function + CHAR_Talk( fd,fd_charaindex, message, color, area ); + } +} + +void lssproto_M_recv( int fd, int fl, int x1, int y1 , int x2, int y2 ) +{ + char* mapdata; + RECT seek={x1,y1,x2-x1,y2-y1},ret; + CHECKFD; + + mapdata = MAP_getdataFromRECT(fl,&seek,&ret); + if( mapdata != NULL ){ + lssproto_M_send( fd, fl, ret.x, ret.y, + ret.x+ret.width, ret.y+ret.height, mapdata ); + } +} + +/*------------------------------------------------------------ + * 平乓仿犯□正 邰菲[ + ------------------------------------------------------------*/ +void lssproto_C_recv( int fd, int index ) +{ + /* 仇木分仃凛棉及涩烂毛苇卅中仪卞允月 */ + CHECKFD; + CHAR_sendCSpecifiedObjindex( fd, index); +} + +void lssproto_S_recv( int fd, char* category ) +{ + char* string; + int fd_charaindex; + + fd_charaindex = CONNECT_getCharaindex( fd ); + string = CHAR_makeStatusString( fd_charaindex, category ); + if( string != NULL ) + lssproto_S_send( fd , string ); + +} + +void lssproto_EV_recv( int fd,int event,int seqno,int x,int y, int dir ) +{ + int rc; + int fx,fy; + int fd_charaindex; + + CHECKFD; + fd_charaindex = CONNECT_getCharaindex( fd ); + { + int ix,iy; + ix=CHAR_getInt(fd_charaindex, CHAR_X); + iy=CHAR_getInt(fd_charaindex, CHAR_Y); + if( ( ix != x ) || ( iy != y ) ){ + goto CK1; + } + goto OK; + } +CK1: + { + OBJECT object; + int ix,iy,ifloor,i,j; + int warp_point_x[9]; + int warp_point_y[9]; + int warp_point=0; + ix=CHAR_getInt(fd_charaindex, CHAR_X); + iy=CHAR_getInt(fd_charaindex, CHAR_Y); + ifloor=CHAR_getInt(fd_charaindex,CHAR_FLOOR); + for(i=iy-1;i<=iy+1;i++){ + for(j=ix-1;j<=ix+1;j++){ + for( object = MAP_getTopObj(ifloor,j,i) ; object ;object = NEXT_OBJECT(object ) ){ + int o = GET_OBJINDEX(object); + if( OBJECT_getType(o) == OBJTYPE_CHARA ){ + int etype; + int charaindex=OBJECT_getIndex(o); + if( !CHAR_CHECKINDEX(charaindex) ) continue; + etype = CHAR_getWorkInt( charaindex, CHAR_WORKEVENTTYPE); + if( etype != CHAR_EVENT_NONE ) { + if(etype==CHAR_EVENT_WARP){ + warp_point_x[warp_point]=j; + warp_point_y[warp_point]=i; + warp_point++; + } + } + } +#ifdef _MAP_WARPPOINT + else if( OBJECT_getType(o) == OBJTYPE_WARPPOINT ){ + int etype = OBJECT_getchartype( o); + if( etype != CHAR_EVENT_NONE ) { + warp_point_x[warp_point]=j; + warp_point_y[warp_point]=i; + warp_point++; + break; + } + } +#endif + } + } + } + + for(i=0;i 7) { + fx = CHAR_getInt(fd_charaindex, CHAR_X); + fy = CHAR_getInt(fd_charaindex, CHAR_Y); + }else { + CHAR_getCoordinationDir( dir, CHAR_getInt(fd_charaindex, CHAR_X), + CHAR_getInt(fd_charaindex, CHAR_Y),1,&fx,&fy); + } + rc = EVENT_main(fd_charaindex, event,fx,fy); + lssproto_EV_send( fd, seqno, rc); +} +/*------------------------------------------------------------ + * 巨件市它件玄 戏 + ------------------------------------------------------------*/ +void lssproto_EN_recv( int fd , int x,int y ) +{ + int ret = FALSE, err = 0; + int fd_charaindex; + CHECKFD; + fd_charaindex = CONNECT_getCharaindex( fd); + + //print(" EN_recv "); + + if( CHAR_getWorkInt( fd_charaindex, CHAR_WORKPARTYMODE) != CHAR_PARTY_CLIENT){ + CHAR_setMyPosition( fd_charaindex, x,y,TRUE); + CHAR_setWorkChar( fd_charaindex, CHAR_WORKWALKARRAY,""); + err = BATTLE_CreateVsEnemy( fd_charaindex,0, -1); + if( err != 0 ){ + ret = FALSE; + }else{ + ret = TRUE; + } + } +} +/*------------------------------------------------------------ + * 皿伊奶乩□ 衔匹巨件市它件玄 瑁 戏 + ------------------------------------------------------------*/ +void lssproto_DU_recv( int fd , int x,int y ) +{ + OBJECT object; + int fd_charaindex; + int ret = FALSE, charaindex = -1, enemyindex; + int frontx,fronty; + int cnt = 0; + BOOL found = FALSE; + CHECKFDANDTIME; + fd_charaindex = CONNECT_getCharaindex( fd ); + {//ttom avoid warp at will + int ix,iy; + ix=CHAR_getInt(fd_charaindex, CHAR_X); + iy=CHAR_getInt(fd_charaindex, CHAR_Y); + if( (ix!=x)||(iy!=y)){ + //print("\n--Error!!!!"); + //print("\norigion x=%d,y=%d",ix,iy); + //print("\nmodify X=%d,Y=%d",x,y); + x=ix; + y=iy; + } + } + + + /* 阂及凛反 骰允月 */ + if( CHAR_getWorkInt( fd_charaindex, CHAR_WORKPARTYMODE) + != CHAR_PARTY_CLIENT) + { + int i; + // 愤坌及奶件犯永弁旦 + charaindex = fd_charaindex; + CHAR_setMyPosition( charaindex, x,y,TRUE); + /* WALKARRAY毛弁伉失允月 */ + CHAR_setWorkChar( charaindex, CHAR_WORKWALKARRAY,""); + + + /* 赓渝祭允月 */ + for( i = 0; i < CONNECT_WINDOWBUFSIZE ; i ++ ) { + CONNECT_setDuelcharaindex( fd, i, -1 ); + } + + /* 及蟆及甄 毛 月 */ + CHAR_getCoordinationDir( CHAR_getInt( charaindex, CHAR_DIR ) , + CHAR_getInt( charaindex , CHAR_X ), + CHAR_getInt( charaindex , CHAR_Y ) , + 1 , &frontx , &fronty ); + + /*愤坌及 及蟆及平乓仿毛潸 允月 */ + for( object = MAP_getTopObj( CHAR_getInt( charaindex, CHAR_FLOOR), + frontx,fronty) ; + object ; + object = NEXT_OBJECT(object ) ) + { + int toindex; + int objindex = GET_OBJINDEX(object); + /* 平乓仿弁正□元扎卅中 */ + if( OBJECT_getType( objindex) != OBJTYPE_CHARA) continue; + toindex = OBJECT_getIndex( objindex); + /* 皿伊奶乩□元扎卅中 */ + if( CHAR_getInt( toindex, CHAR_WHICHTYPE) != CHAR_TYPEPLAYER ) continue; + found = TRUE; + /* 爵 分匀凶日蛲 */ + if( CHAR_getWorkInt( toindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE ){ + continue; + } + /* 辅爵蛐 卅日蛲 */ + if( !CHAR_getFlg( toindex, CHAR_ISDUEL)) continue; + + // shan begin + { + int i; + for( i=0; i 1 ) { + int strlength; + char msgbuf[1024]; + char escapebuf[2048]; + strcpy( msgbuf, "1\n要和谁战斗?\n"); + strlength = strlen( msgbuf); + /* 它奴件玉它及丢永本□斥综岳[ + * 爵 及平乓仿及域 + */ + for( i = 0; + CONNECT_getDuelcharaindex( fd,i) != -1 + && i< CONNECT_WINDOWBUFSIZE; + i ++ ) + { + char *a = CHAR_getChar( + CONNECT_getDuelcharaindex( fd,i) , CHAR_NAME); + char buf[256]; + snprintf( buf, sizeof( buf),"%s [%s]\n", a, + CHAR_getWorkInt( + CONNECT_getDuelcharaindex(fd,i), + CHAR_WORKPARTYMODE ) + != CHAR_PARTY_NONE ? "团体": "单独"); + if( strlength + strlen( buf) > arraysizeof( msgbuf)){ + print( "%s:%d视窗讯息buffer不足。\n", + __FILE__,__LINE__); + break; + } + strcpy( &msgbuf[strlength], buf); + strlength += strlen(buf); + } + + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_SELECT, + WINDOW_BUTTONTYPE_CANCEL, + CHAR_WINDOWTYPE_SELECTDUEL, + -1, + makeEscapeString( msgbuf, escapebuf, sizeof(escapebuf))); + ret = TRUE; + } + } + + +// 巨仿□质 +lssproto_DU_recv_Err:; + if( ret == FALSE ) { + /* 瑛绊霜耨 */ + lssproto_EN_send( fd, FALSE, 0 ); + if( cnt > 0 ) CHAR_talkToCli( charaindex, -1, "遭遇失败!", CHAR_COLORYELLOW); + else if( found ) CHAR_talkToCli( charaindex, -1, "无人可以对战。", CHAR_COLORYELLOW); + else CHAR_talkToCli( charaindex, -1, "那里没有任何人。", CHAR_COLORYELLOW); + } +} +/*------------------------------------------------------------ + * 巨件市它件玄蔽 + ------------------------------------------------------------*/ +void lssproto_EO_recv( int fd, int dummy ) +{ + int fd_charaindex; + int battle_index;//ttom++ + CHECKFD; + fd_charaindex = CONNECT_getCharaindex( fd ); + BattleEncountOut( fd_charaindex ); + // Nuke start 0827 : Battle acceleration + battle_index=CHAR_getWorkInt(fd_charaindex,CHAR_WORKBATTLEINDEX); + if( BATTLE_CHECKINDEX( battle_index ) == FALSE ){ + return; + } + if(BattleArray[battle_index].type != BATTLE_TYPE_P_vs_P){ + if(CONNECT_get_watchmode(fd)) { + //print("fd= %d Watching the battle __ lssprot_EO_recv \n",fd);//for debug + CONNECT_set_watchmode(fd,FALSE); + return; + } + else if (checkBEOTime( fd ) < 0) { + //CHAR_talkToCli(fd_charaindex, -1, "你加速喔。", CHAR_COLORYELLOW); + } + } + // Nuke end + +} + +/*------------------------------------------------------------ + * 巨件市它件玄 蝇邰菲 + ------------------------------------------------------------*/ +void lssproto_BU_recv( int fd, int dummy) +{ + int fd_charaindex; + CHECKFD; + fd_charaindex = CONNECT_getCharaindex( fd ); + // shan 2001/12/25 + //BATTLE_WatchStop( fd_charaindex ); +} + +void lssproto_B_recv( int fd, char *command ) +{ + int fd_charaindex; + int battle_index;//ttom++ + CHECKFD; + fd_charaindex = CONNECT_getCharaindex( fd ); + BattleCommandDispach( fd, command ); + // Nuke +1 0827: Battle acceleration + battle_index=CHAR_getWorkInt(fd_charaindex,CHAR_WORKBATTLEINDEX); + if( BATTLE_CHECKINDEX( battle_index ) == FALSE ){ + return; + } + if(BattleArray[battle_index].type != BATTLE_TYPE_P_vs_P){ + if(BattleArray[battle_index].type == BATTLE_TYPE_WATCH) { + CONNECT_set_watchmode(fd,TRUE); + return; + } + } + //Nuke end +} + +void lssproto_FS_recv( int fd,int flg ) +{ + int fd_charaindex; + CHECKFDANDTIME; + + fd_charaindex = CONNECT_getCharaindex( fd ); + /* 椭瘀反竣卞六内卞公及引引白仿弘凳蕙 */ + CHAR_setFlg( fd_charaindex, CHAR_ISPARTY, + (flg & CHAR_FS_PARTY )? TRUE:FALSE); + //CHAR_setFlg( fd_charaindex, CHAR_ISBATTLE, + // (flg & CHAR_FS_BATTLE )? TRUE:FALSE); + CHAR_setFlg( fd_charaindex, CHAR_ISDUEL, + (flg & CHAR_FS_DUEL )? TRUE:FALSE); + CHAR_setFlg( fd_charaindex, CHAR_ISPARTYCHAT, + (flg & CHAR_FS_PARTYCHAT )? TRUE:FALSE); + CHAR_setFlg( fd_charaindex, CHAR_ISTRADECARD, + (flg & CHAR_FS_TRADECARD )? TRUE:FALSE); +#ifdef _CHANNEL_MODIFY + //密语频道开关 + CHAR_setFlg(fd_charaindex,CHAR_ISTELL,(flg & CHAR_FS_TELL )? TRUE:FALSE); + //家族频道开关 + CHAR_setFlg(fd_charaindex,CHAR_ISFM,(flg & CHAR_FS_FM )? TRUE:FALSE); + //职业频道开关 + CHAR_setFlg(fd_charaindex,CHAR_ISOCC,(flg & CHAR_FS_OCC )? TRUE:FALSE); + //聊天室 + CHAR_setFlg(fd_charaindex,CHAR_ISCHAT,(flg & CHAR_FS_CHAT )? TRUE:FALSE); + //储存对话开关 + CHAR_setFlg(fd_charaindex,CHAR_ISSAVE,(flg & CHAR_FS_SAVE )? TRUE:FALSE); +#endif +#ifdef _AUCPROTOCOL // (不可开) Syu ADD 拍卖频道开关Protocol + CHAR_setFlg( fd_charaindex, CHAR_ISAUC, + (flg & CHAR_FS_AUC )? TRUE:FALSE); +#endif + // CoolFish: Trade 2001/4/18 + CHAR_setFlg( fd_charaindex, CHAR_ISTRADE, + (flg & CHAR_FS_TRADE )? TRUE:FALSE); + /* + if (CHAR_getFlg(fd_charaindex, CHAR_ISTRADECARD) == TRUE) + CHAR_setFlg(fd_charaindex, CHAR_ISTRADE, FALSE); + if (CHAR_getFlg(fd_charaindex, CHAR_ISTRADE) == TRUE) + CHAR_setFlg(fd_charaindex, CHAR_ISTRADECARD, FALSE); + */ + + lssproto_FS_send( fd, flg); +} +/*------------------------------------------------------------ + * 醮棉邰菲 戏[ + ------------------------------------------------------------*/ +void lssproto_PR_recv( int fd,int x, int y, int request ) +{ + int result = FALSE; + int fd_charaindex; + CHECKFDANDTIME; + + fd_charaindex = CONNECT_getCharaindex( fd ); + +#if 1 // 禁止组队区域 + if( request == 1 ) + { + int nowFloor; + nowFloor = CHAR_getInt( fd_charaindex, CHAR_FLOOR); + if( nowFloor == 31706 + || nowFloor == 10204 + || (10601 <= nowFloor && nowFloor <= 10605 ) + || nowFloor == 10919 || nowFloor == 10920 + || nowFloor == 20711 || nowFloor == 20712 + || nowFloor == 1008 || nowFloor == 1021 + || nowFloor == 3008 || nowFloor == 3021 + || ( nowFloor <= 8213 && nowFloor >= 8200 ) + || ( nowFloor >= 30017 && nowFloor <= 30021 ) +#ifdef _TIME_TICKET + || check_TimeTicketMap(nowFloor) +#endif + ){ + print("\n 改封包!禁止组队区域!!:%s ", CHAR_getChar( fd_charaindex, CHAR_CDKEY) ); + return; + } + } +#endif + + {//ttom avoid warp at will + int ix,iy; + ix=CHAR_getInt(fd_charaindex, CHAR_X); + iy=CHAR_getInt(fd_charaindex, CHAR_Y); + if( (ix!=x)||(iy!=y)){ + //print("\n--Error!!!!"); + //print("\norigion x=%d,y=%d",ix,iy); + //print("\nmodify X=%d,Y=%d",x,y); + x=ix; + y=iy; + } + } + CHAR_setMyPosition( fd_charaindex, x,y,TRUE); + + if( request == 0 ) { + /* 轮迩允月 */ + result = CHAR_DischargeParty(fd_charaindex, 0); + } + else if( request == 1 ) { + /* 迩允月 */ + result = CHAR_JoinParty(fd_charaindex); + } +} +/*------------------------------------------------------------ + * 爵 卞瓒 允月矢永玄毛蓟 仄凶[ + ------------------------------------------------------------*/ +void lssproto_KS_recv( int fd,int petarray ) +{ + int ret , fd_charaindex; + CHECKFDANDTIME; + fd_charaindex = CONNECT_getCharaindex( fd ); + + if( CHAR_getInt( fd_charaindex, CHAR_RIDEPET) == petarray ) + lssproto_KS_send( fd, petarray, FALSE); + + ret = PET_SelectBattleEntryPet( fd_charaindex, petarray); + lssproto_KS_send( fd, petarray, ret); +} + +#ifdef _STANDBYPET +void lssproto_SPET_recv( int fd, int standbypet ) +{ + int fd_charaindex; + int i, s_pet =0, cnt =0; + + CHECKFDANDTIME; + fd_charaindex = CONNECT_getCharaindex( fd ); + + if( CHAR_getWorkInt( fd_charaindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE + && standbypet >= CHAR_getWorkInt( fd_charaindex, CHAR_WORKSTANDBYPET) ) { + print("\n 改封包!??战斗中用SPET增加待机宠!!:%s ", CHAR_getChar( fd_charaindex, CHAR_CDKEY) ); + return; + } + + //if( CHAR_getInt( fd_charaindex, CHAR_RIDEPET) == petarray ) { + // lssproto_SPET_send( fd, petarray, FALSE); + //} + + for( i =0; i < CHAR_MAXPETHAVE; i++) { + if( standbypet & ( 1 << i ) ) { + + //if( CHAR_getInt( fd_charaindex, CHAR_RIDEPET) == i ) + // continue; + + cnt++; + if( cnt > 3 ) { + print("\n 改封包!待机宠超过数量!!:%s ", CHAR_getChar( fd_charaindex, CHAR_CDKEY) ); + //lssproto_SPET_send( fd, s_pet, FALSE); + break; + } + + s_pet |= ( 1 << i ); + } + } + CHAR_setWorkInt( fd_charaindex, CHAR_WORKSTANDBYPET, s_pet); + + lssproto_SPET_send( fd, s_pet, TRUE); +} +#endif + +/*------------------------------------------------------------ + * 减变升啼卅升及 蜇六方午熬仃午匀凶 + ------------------------------------------------------------*/ +void lssproto_AC_recv( int fd,int x, int y,int actionno ) +{ + int fd_charaindex; + CHECKFDANDTIME; + fd_charaindex = CONNECT_getCharaindex( fd ); + {//ttom avoid the warp at will + Char *ch; + ch = CHAR_getCharPointer( fd_charaindex); + // CoolFish: +1 2001/11/05 + if (!ch) return; + + if((ch->data[CHAR_X]!=x)||(ch->data[CHAR_Y]!=y)){ + return; + } + } + CHAR_setMyPosition( fd_charaindex, x,y,TRUE); + CHAR_sendAction( fd_charaindex, actionno, FALSE); + return; +} +/*------------------------------------------------------------ + * 芊毛银匀凶[ + ------------------------------------------------------------*/ +void lssproto_MU_recv( int fd,int x,int y,int array,int toindex ) +{ + int to_charaindex = -1, fd_charaindex; + CHECKFDANDTIME; + fd_charaindex = CONNECT_getCharaindex( fd ); + {//ttom avoid warp at will + int ix,iy; + ix=CHAR_getInt(fd_charaindex, CHAR_X); + iy=CHAR_getInt(fd_charaindex, CHAR_Y); + if( (ix!=x)||(iy!=y)){ + //print("\n--Error!!!!"); + //print("\norigion x=%d,y=%d",ix,iy); + //print("\nmodify X=%d,Y=%d",x,y); + x=ix; + y=iy; + } + } + + CHAR_setMyPosition( fd_charaindex, x,y,TRUE); + /* toindex 毛平乓仿弁正□犯□正及index卞 晶允月 */ + to_charaindex = Callfromcli_Util_getTargetCharaindex( fd, toindex); + MAGIC_Use( fd_charaindex, array, to_charaindex); +} + +void lssproto_JB_recv( int fd,int x,int y ) +{ + int charaindex, floor; + + CHECKFDANDTIME; + charaindex = CONNECT_getCharaindex( fd ); + { + int ix,iy; + ix=CHAR_getInt(charaindex, CHAR_X); + iy=CHAR_getInt(charaindex, CHAR_Y); + if( (ix!=x)||(iy!=y)){ + x=ix; + y=iy; + } + } + + CHAR_setMyPosition( charaindex, x,y,TRUE); + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return; + floor = CHAR_getInt( charaindex, CHAR_FLOOR ); + if( floor == 1007 + || floor == 2007 + || floor == 3007 + || floor == 4007 + || floor == 130 ){ + BATTLE_WatchTry( charaindex ); + }else{ + BATTLE_RescueTry( charaindex ); + } +} + +void lssproto_KN_recv( int fd,int havepetindex,char* data ) +{ + int fd_charaindex; + CHECKFD; + fd_charaindex = CONNECT_getCharaindex( fd ); + + // Robin 04/26 debug + if( strlen(data) > 16 ) return; + + // CoolFish: Prevent Trade Cheat 2001/4/18 + if (CHAR_getWorkInt(fd_charaindex, CHAR_WORKTRADEMODE) != CHAR_TRADE_FREE) + return; + + if( checkStringErr(data) ) return; + + CHAR_inputUserPetName( fd_charaindex, havepetindex, data); + +} +/*------------------------------------------------------------ + * 它奴件玉它毛蓟 仄凶[ + ------------------------------------------------------------*/ +void lssproto_WN_recv( int fd,int x,int y,int seqno, + int objindex,int select, char* data ) +{ + int fd_charaindex; + + CHECKFDANDTIME; + + if( checkStringErr(data) ) return; +#ifdef _NO_WARP + { + if(seqno!=CONNECT_get_seqno(fd)){ + return; + } + if( !( (select)&(CONNECT_get_selectbutton(fd)) ) && select ){ + if( CONNECT_get_seqno(fd)==CHAR_WINDOWTYPE_QUIZ_MAIN ){ + }else if( ( (CONNECT_get_seqno(fd)==CHAR_WINDOWTYPE_SCHEDULEMAN_START) + || (CONNECT_get_seqno(fd)==CHAR_WINDOWTYPE_SCHEDULEMAN_SELECT) ) + && (select==1) ){ + }else{ + return ; + } + } + } // shan End +#endif + + fd_charaindex = CONNECT_getCharaindex( fd ); + // CoolFish: Prevent Trade Cheat 2001/4/18 + if (CHAR_getWorkInt(fd_charaindex, CHAR_WORKTRADEMODE) != CHAR_TRADE_FREE) { + return; + } + // Robin + if( checkStringErr(data) ) return; + +#ifdef _ANGEL_SUMMON + if( seqno == CHAR_WINDOWTYPE_ANGEL_ASK ) + { + print("\n CHAR_WINDOWTYPE_ANGEL_ASK objindex:%d select:%d data:%s ", + objindex, select, data ); + + if(select==WINDOW_BUTTONTYPE_YES ) { + if( AngelCreate( fd_charaindex) == FALSE ) { + sendAngelCleanToCli( fd ); + } + } + else if(select==WINDOW_BUTTONTYPE_NO ) { + int mindex; + char nameinfo[64]; + mindex = checkIfAngel( fd_charaindex); + print(" ====不接受召唤任务==== "); + getMissionNameInfo( fd_charaindex, nameinfo); + saacproto_ACMissionTable_send( acfd, mindex, 3, nameinfo, ""); + + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, + "真是遗憾。\n少了你的帮助,看来魔族会继续危害大陆的人民了。" ); + + //CHAR_talkToCli( fd_charaindex, -1, "天之声:真是可惜,这可是难得的机会呀。", CHAR_COLORYELLOW); + + sendAngelCleanToCli( fd ); + } + } +#endif + +#ifdef _CONTRACT + if( seqno == CHAR_WINDOWTYPE_CONTRACT_ANSWER ) { + ITEM_contractSign( fd, objindex, select); + } +#endif + + {//ttom avoid the warp at will + Char *ch; + ch = CHAR_getCharPointer( fd_charaindex); + // CoolFish: +1 2001/11/05 + if (!ch) return; + if((ch->data[CHAR_X]!=x)||(ch->data[CHAR_Y]!=y)){ + // Robin 04/20 test + return; + x=ch->data[CHAR_X]; + y=ch->data[CHAR_Y]; + } + //ttom avoid WN at will + if(seqno==CHAR_WINDOWTYPE_NPCENEMY_START){ +// Char *ch; + OBJECT object; + int ix,iy,ifloor,i,j; + int whichtype= -1; + int enemy=0; + int enemy_index; + if(!CHECKOBJECT(objindex)){ + goto FIRST; + } + enemy_index=OBJECT_getIndex(objindex);//ttom 11/15/2000 + ix =ch->data[CHAR_X]; + iy =ch->data[CHAR_Y]; + ifloor=ch->data[CHAR_FLOOR]; + for(i=iy-1;i<=iy+1;i++){ + for(j=ix-1;j<=ix+1;j++){ + for( object = MAP_getTopObj(ifloor,j,i) ; object ; + object = NEXT_OBJECT(object ) ){ + int objindex = GET_OBJINDEX(object); + switch( OBJECT_getType(objindex) ){ + case OBJTYPE_CHARA: + whichtype = CHAR_getInt( OBJECT_getIndex( objindex), CHAR_WHICHTYPE); + if( whichtype == CHAR_TYPENPCENEMY){ + int i_ene_temp; + i_ene_temp=OBJECT_getIndex( objindex); + //print("\n--enetemp=%d",i_ene_temp); + if(i_ene_temp== enemy_index){ + goto START_WN; + }else{ + enemy=0; + } + } + break; + case OBJTYPE_ITEM: + break; + case OBJTYPE_GOLD: + break; + default: + break; + } + } + } + } + if(enemy==0){ +FIRST: + + lssproto_EN_send( fd, FALSE, 0 ); + CHAR_talkToCli(fd_charaindex, -1, "事件错误。", CHAR_COLORYELLOW); + goto END_WN; + } + } + } + //ttom end +START_WN: + CHAR_setMyPosition( fd_charaindex, x,y,TRUE); + if( CHAR_getWorkInt( fd_charaindex, CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE){ + if(seqno==CHAR_WINDOWTYPE_WINDOWWARPMAN_MAIN){ + if(!CONNECT_get_first_warp(fd)){ + select=1; + } + } + CHAR_processWindow( fd_charaindex, seqno, + select, objindex, makeStringFromEscaped(data)); + +#ifdef _NO_WARP + if (CONNECT_get_seqno(fd)==CHAR_WINDOWTYPE_WINDOWWARPMAN_MAIN) + { + CONNECT_set_seqno(fd,-1); + CONNECT_set_selectbutton(fd,1); + } +#endif + } +//ttom+1 +END_WN: + return; + //CONNECT_set_pass(fd,TRUE);//ttom +} + +/*------------------------------------------------------------ + * 云踞仃乒□玉 凳毛熬仃凶 + ------------------------------------------------------------*/ +void lssproto_HL_recv( int fd,int flg ) +{ + char msgbuf[128]; + int i, fd_charaindex; + CHECKFD; + + fd_charaindex = CONNECT_getCharaindex( fd ); + /* 爵 元扎卅井匀凶日 骰允月 */ + if( CHAR_getWorkInt( fd_charaindex, CHAR_WORKBATTLEMODE) + == BATTLE_CHARMODE_NONE) + { + return; + } +#ifdef _LOCKHELP_OK // (不可开) Syu ADD 锁定不可加入战斗 + if((CHAR_getInt(fd_charaindex,CHAR_FLOOR) >= 8200 && CHAR_getInt(fd_charaindex,CHAR_FLOOR) <= 8213) || + (CHAR_getInt(fd_charaindex,CHAR_FLOOR) >= 30017 && CHAR_getInt(fd_charaindex,CHAR_FLOOR) <= 30021) + ){ + return ; + } +#endif + if( flg == TRUE ) { + +#ifdef _ESCAPE_RESET // 使用恶宝逃跑後x分钟内不可求救 + if( getStayEncount( fd ) ) { + //print(" 恶宝中组队 "); + if( time(NULL) - CHAR_getWorkInt( fd_charaindex, CHAR_WORKLASTESCAPE) < 5*60 ) { + lssproto_HL_send( fd, FALSE); + //print(" 恶宝逃跑後组队 "); + CHAR_talkToCli( fd_charaindex, -1, "暂时不可以求救。", CHAR_COLORYELLOW); + return; + } + } +#endif + + /* 云踞仃乒□玉及白仿弘 化月 */ + BattleArray[CHAR_getWorkInt( fd_charaindex, + CHAR_WORKBATTLEINDEX)].Side[ + CHAR_getWorkInt( fd_charaindex, + CHAR_WORKBATTLESIDE)].flg |= BSIDE_FLG_HELP_OK; + + snprintf( msgbuf, sizeof( msgbuf), + "%s 在求救!", + CHAR_getChar( fd_charaindex, CHAR_NAME)); + } + else { + /* 云踞仃乒□玉及白仿弘 午允 */ + BattleArray[CHAR_getWorkInt( fd_charaindex, + CHAR_WORKBATTLEINDEX)].Side[ + CHAR_getWorkInt( fd_charaindex, + CHAR_WORKBATTLESIDE)].flg &= ~BSIDE_FLG_HELP_OK; + + snprintf( msgbuf, sizeof( msgbuf), + "%s 决定拒绝帮助。", + CHAR_getChar( fd_charaindex, CHAR_NAME)); + } + + /* 云踞仃橇谪互 歹匀凶仪毛爵 醮棉卞(愤坌殖戈)霜耨 */ + for( i = 0; i < 5; i ++ ) { + int toindex = BattleArray[CHAR_getWorkInt( + fd_charaindex, CHAR_WORKBATTLEINDEX)].Side[ + CHAR_getWorkInt( fd_charaindex, + CHAR_WORKBATTLESIDE)].Entry[i].charaindex; + if( CHAR_CHECKINDEX( toindex)) { + int tofd = getfdFromCharaIndex( toindex ); + if( tofd != -1 ) { + lssproto_HL_send( tofd, flg); + } + /* 丢永本□斥霜耨 */ + CHAR_talkToCli( toindex, -1, msgbuf, CHAR_COLORYELLOW); + /* 云踞仃CA 憎]引凶反壅允 */ + CHAR_sendBattleEffect( toindex, ON); + } + } +} +/*------------------------------------------------------------ + * proc 毛仁木午蜕歹木凶[ + ------------------------------------------------------------*/ +void lssproto_ProcGet_recv( int fd ) +{ + outputNetProcLog( fd, 1); +} +/*------------------------------------------------------------ + * 皿伊奶乩□醒毛仁木午蜕歹木凶[ + ------------------------------------------------------------*/ +void lssproto_PlayerNumGet_recv( int fd ) +{ + int i; + int clicnt =0; + int playercnt = 0; + for( i = 0; i < ConnectLen; i ++ ) { + if( CONNECT_getUse_debug(i,1017) ){ + if( CONNECT_getCtype(i) == CLI) { + clicnt ++; + if( CONNECT_getCharaindex(i) >= 0 ) playercnt++; + } + } + } + lssproto_PlayerNumGet_send( fd, clicnt, playercnt); +} + + +/*------------------------------------------------------------ + * 棋爵邰菲 戏[ + ------------------------------------------------------------*/ +void lssproto_LB_recv( int fd,int x,int y ) +{ + int fd_charaindex; + + CHECKFDANDTIME; + fd_charaindex = CONNECT_getCharaindex( fd ); + {//ttom avoid warp at will + int ix,iy; + ix=CHAR_getInt(fd_charaindex, CHAR_X); + iy=CHAR_getInt(fd_charaindex, CHAR_Y); + if( (ix!=x)||(iy!=y)){ + //print("\n--Error!!!!"); + //print("\norigion x=%d,y=%d",ix,iy); + //print("\nmodify X=%d,Y=%d",x,y); + x=ix; + y=iy; + } + } + CHAR_setMyPosition( fd_charaindex, x,y,TRUE); + /* 杀梁匹五月井民尼永弁仄化杀梁允月 */ + BATTLE_WatchTry( fd_charaindex ); +} +/*------------------------------------------------------------ + * 扑乓永玄母它件质 钒铵 + ------------------------------------------------------------*/ +void lssproto_Shutdown_recv( int fd,char* passwd,int min ) +{ + char buff[256]; + if( strcmp( passwd, "hogehoge") == 0 ) { + int i; + int playernum = CHAR_getPlayerMaxNum(); + + snprintf( buff, sizeof( buff),"极度的系统公告。"); + for( i = 0 ; i < playernum ; i++) { + if( CHAR_getCharUse(i) != FALSE ) { + CHAR_talkToCli( i, -1, buff, CHAR_COLORYELLOW); + } + } + SERVSTATE_setLimittime(min); + SERVSTATE_setShutdown( NowTime.tv_sec ); + SERVSTATE_setDsptime( 0 ); + } +} +void lssproto_PMSG_recv( int fd,int index,int petindex,int itemindex, + char* message,int color ) +{ + + // CoolFish: Prevent Trade Cheat 2001/4/18 + int fd_charaindex; + fd_charaindex = CONNECT_getCharaindex(fd); + if (CHAR_getWorkInt(fd_charaindex, CHAR_WORKTRADEMODE) != CHAR_TRADE_FREE) + return; + PETMAIL_sendPetMail( CONNECT_getCharaindex( fd ), + index, petindex, itemindex, message, color); + +} +/*------------------------------------------------------------ + * 矢永玄 银迕熬耨 + ------------------------------------------------------------*/ +void lssproto_PS_recv( int fd, int havepetindex, int havepetskill, int toindex, char* data ) +{ + int to_charaindex = Callfromcli_Util_getTargetCharaindex( fd, toindex); + int charaindex = CONNECT_getCharaindex( fd ); + int petindex; + BOOL ret; + petindex = CHAR_getCharPet( charaindex, havepetindex); + if( !CHAR_CHECKINDEX( petindex)) return; + + ret = PETSKILL_Use( petindex, havepetskill, to_charaindex, data ); + lssproto_PS_send( fd, ret, havepetindex, havepetskill, toindex); +} +/*------------------------------------------------------------ + * 甄 毛本永玄允月 + ------------------------------------------------------------*/ +void lssproto_SP_recv( int fd,int x,int y, int dir ) +{ + int fd_charaindex; + + fd_charaindex = CONNECT_getCharaindex( fd ); + {//ttom avoid the warp at will + int i_x,i_y; + i_x=CHAR_getInt(fd_charaindex, CHAR_X); + i_y=CHAR_getInt(fd_charaindex, CHAR_Y); + + if((i_x!=x)||(i_y!=y)){ + x=i_x; + y=i_y; + } + }//ttom + + CHAR_setMyPosition_main( fd_charaindex, x,y,dir,TRUE); + +} + +/*------------------------------------------------------------ + * CoolFish: Trade Command 2001/4/18 + ------------------------------------------------------------*/ +void lssproto_TD_recv( int fd, char* message ) +{ + int fd_charaindex; + CHECKFDANDTIME; + + fd_charaindex = CONNECT_getCharaindex( fd ); + print(" MAP_TRADEPICKUP_check0 "); + CHAR_Trade(fd, fd_charaindex, message); +} + +/*------------------------------------------------------------ + * CoolFish: Family Command 2001/5/24 + ------------------------------------------------------------*/ +void lssproto_FM_recv( int fd, char* message ) +{ + int fd_charaindex; + struct timeval recvtime; + CHECKFDANDTIME; + + // add code by shan + CONNECT_getLastrecvtime( fd, &recvtime); + if( time_diff( NowTime, recvtime) < 0.5 ){ + return; + } + CONNECT_setLastrecvtime(fd, &NowTime); + + fd_charaindex = CONNECT_getCharaindex( fd ); + + if( checkStringErr( message ) ) return; + + CHAR_Family(fd, fd_charaindex, message); + +} + +// shan 2002/01/10 +void lssproto_PETST_recv( int fd, int nPet, int sPet ) +{ + int charaindex; + int i, nums=0; + CHECKFDANDTIME; + + charaindex = CONNECT_getCharaindex( fd ); + if (!CHAR_CHECKINDEX( charaindex ) ) return; + + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE) + != BATTLE_CHARMODE_NONE) return ; + + for( i=0; i<5; i++) { + if( CHAR_getWorkInt( charaindex, CHAR_WORK_PET0_STAT+i) == TRUE ) + nums++; + } + if( nums <= 3 ) + CHAR_setWorkInt( charaindex, CHAR_WORK_PET0_STAT+nPet, sPet); + +} + +void lssproto_BM_recv(int fd, int iindex) +{ +#ifdef _BLACK_MARKET + int charaindex; + CHECKFDANDTIME; + + charaindex = CONNECT_getCharaindex( fd); + if(!CHAR_CHECKINDEX( charaindex)) return; + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE) + != BATTLE_CHARMODE_NONE) return ; + + ITEM_BM_Exchange( charaindex, iindex); +#endif +} + +#ifdef _MIND_ICON +void lssproto_MA_recv(int fd, int x, int y, int nMind) +{ + int charaindex; + CHECKFDANDTIME; + + charaindex = CONNECT_getCharaindex( fd); + if(!CHAR_CHECKINDEX( charaindex)) return; + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE) return ; + + { + int i_x, i_y; + i_x = CHAR_getInt( charaindex, CHAR_X); + i_y = CHAR_getInt( charaindex, CHAR_Y); + + if((i_x!=x)||(i_y!=y)){ + x = i_x; + y = i_y; + } + } + + //print("\nshan------------------>mind action->%d x->%d y->%d", nMind, x, y); + CHAR_setMyPosition( charaindex, x, y, TRUE); + CHAR_setWorkInt( charaindex, CHAR_MIND_NUM, nMind); + CHAR_sendMindEffect( charaindex, CHAR_getWorkInt( charaindex, CHAR_MIND_NUM)); + if(CHAR_getWorkInt( charaindex, CHAR_MIND_NUM) != 101290 && + CHAR_getWorkInt( charaindex, CHAR_MIND_NUM) != 101294 && + CHAR_getWorkInt( charaindex, CHAR_MIND_NUM) != 101288 ) + CHAR_setWorkInt( charaindex, CHAR_MIND_NUM, 0); + //print("\nshan------------------>end"); + + return; +} +#endif +BOOL checkStringErr( char *checkstring ) +{ + int i,ach; + for (i=0,ach=0;i=0x40)&&((unsigned char)checkstring[i]<=0x7e))|| + (((unsigned char)checkstring[i]>=0xa1)&&((unsigned char)checkstring[i]<=0xfe))) ach=0; + } else { + if (((unsigned char)checkstring[i]>=0xa1)&&((unsigned char)checkstring[i]<=0xfe)) ach=1; + } + } + if (ach) + { + print(" StringDog! "); + return TRUE; + } + + return FALSE; + +} + +#ifdef _FIX_DEL_MAP // WON ADD 玩家抽地图送监狱 +void lssproto_DM_recv( int fd ) +{ + int index; + index = CONNECT_getCharaindex( fd ); + if( !CHAR_CHECKINDEX( index)) return; + CHAR_warpToSpecificPoint(index,117,225,13); +} +#endif + +#ifdef _CHECK_GAMESPEED +void lssproto_CS_recv( int fd ) +{ + int index, Ttime, NowTimes; + index = CONNECT_getCharaindex( fd ); + if( !CHAR_CHECKINDEX( index)) return; + + NowTimes = (int)time(NULL); + Ttime = getGameSpeedTime( fd); + setGameSpeedTime( fd, NowTimes); + + if( CHAR_getWorkInt( index, CHAR_WORKFLG) & WORKFLG_DEBUGMODE ) { + }else if( (NowTimes-Ttime) < 20 ){ + lssproto_CS_send( fd, 20 - (NowTimes-Ttime)); + } +} +#endif + +#ifdef _TEAM_KICKPARTY +void lssproto_KTEAM_recv( int fd, int si) +{ + int charaindex=-1, pindex; + if( si < 0 || si > 5 ) return; + charaindex = CONNECT_getCharaindex( fd ); + if( !CHAR_CHECKINDEX( charaindex) ) return; + + if( CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE) != CHAR_PARTY_LEADER ) return; + + pindex = CHAR_getWorkInt( charaindex, si + CHAR_WORKPARTYINDEX1); + if( !CHAR_CHECKINDEX( pindex) ) return; + if( CHAR_getWorkInt( pindex, CHAR_WORKPARTYMODE) == CHAR_PARTY_LEADER ) return; + + if( CHAR_DischargeParty( pindex, 0) == FALSE ){ + CHAR_talkToCli( charaindex, -1, "踢除失败!", CHAR_COLORYELLOW); + }else{ + char buf1[256]; + sprintf( buf1, "队长[%s]将你踢除!", CHAR_getUseName( charaindex )); + CHAR_talkToCli( pindex, -1, buf1, CHAR_COLORYELLOW); + sprintf( buf1, "将[%s]踢除出团队!", CHAR_getUseName( pindex )); + CHAR_talkToCli( charaindex, -1, buf1, CHAR_COLORYELLOW); + } +} +#endif + +#ifdef _CHATROOMPROTOCOL // (不可开) Syu ADD 聊天室频道 +void lssproto_CHATROOM_recv (int fd , char *data) +{ + ChatRoom_recvall ( fd , data ) ; +} +#endif + +#ifdef _NEWREQUESTPROTOCOL // (不可开) Syu ADD 新增Protocol要求细项 +void lssproto_RESIST_recv (int fd ) +{ + int charindex = -1 ; + + char token[256]; + charindex = CONNECT_getCharaindex( fd ); + if( !CHAR_CHECKINDEX( charindex) ) return; + sprintf ( token , "%d|%d|%d|%d|%d|%d|%d|%d" , + CHAR_getInt( charindex, CHAR_EARTH_RESIST ) , + CHAR_getInt( charindex, CHAR_WATER_RESIST ) , + CHAR_getInt( charindex, CHAR_FIRE_RESIST ) , + CHAR_getInt( charindex, CHAR_WIND_RESIST ) , + CHAR_getInt( charindex, CHAR_EARTH_EXP ) , + CHAR_getInt( charindex, CHAR_WATER_EXP ) , + CHAR_getInt( charindex, CHAR_FIRE_EXP ) , + CHAR_getInt( charindex, CHAR_WIND_EXP ) + ); + lssproto_RESIST_send ( fd , token ) ; +} +#endif + +#ifdef _OUTOFBATTLESKILL // (不可开) Syu ADD 非战斗时技能Protocol +void lssproto_BATTLESKILL_recv (int fd, int iNum) +{ + int charaindex = CONNECT_getCharaindex( fd ); +#ifndef _PROSKILL_OPTIMUM + int skillindex=-1,char_pskill=-1,profession_skill=-1; +#endif + + if( !CHAR_CHECKINDEX( charaindex) ) return; + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE ) return; + +#ifndef _PROSKILL_OPTIMUM // Robin fix cancel 此处略过职业检查, 改在 PROFESSION_SKILL_Use 中检查 + // 人物的职业 + char_pskill = CHAR_getInt( charaindex, PROFESSION_CLASS ); + + skillindex = PROFESSION_SKILL_GetArray( charaindex, iNum); + Pskillid = skillindex; + // 技能的职业 + profession_skill = PROFESSION_SKILL_getInt( Pskillid, PROFESSION_SKILL_PROFESSION_CLASS); + + if( (char_pskill > 0) && (char_pskill == profession_skill) ){ +#else + if( 1 ){ +#endif + if( PROFESSION_SKILL_Use( charaindex, iNum, 0, NULL ) != 1 ){ + print("\n 玩家(%s)使用技能错误!", CHAR_getUseName( charaindex ) ); + saacproto_ACKick_send( acfd, CHAR_getChar(charaindex,CHAR_CDKEY), getFdidFromCharaIndex( charaindex), 1); + } + } + +} + +#endif + +#ifdef _STREET_VENDOR +void lssproto_STREET_VENDOR_recv(int fd,char *message) +{ + int charaindex = CONNECT_getCharaindex(fd); + + if(!CHAR_CHECKINDEX(charaindex)) return; + if(CHAR_getWorkInt(charaindex,CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE) return; + if(CHAR_getWorkInt(charaindex,CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE){ + CHAR_talkToCli(charaindex,-1,"组队状态下不能交易",CHAR_COLORYELLOW); + return; + } + CHAR_sendStreetVendor(charaindex,message); +} +#endif + +#ifdef _RIGHTCLICK +void lssproto_RCLICK_recv(int fd, int type, char* data) +{ + print("\n RCLICK_recv( type=%d data=%s) ", type, data); +} +#endif + +#ifdef _JOBDAILY +void lssproto_JOBDAILY_recv(int fd,char *data) +{ + int charaindex = CONNECT_getCharaindex(fd); + if(!CHAR_CHECKINDEX(charaindex)) return; + + CHAR_JobDaily(charaindex,data); +} +#endif + +#ifdef _TEACHER_SYSTEM +void lssproto_TEACHER_SYSTEM_recv(int fd,char *data) +{ + int charaindex = CONNECT_getCharaindex(fd); + + if(!CHAR_CHECKINDEX(charaindex)) return; + CHAR_Teacher_system(charaindex,data); +} +#endif diff --git a/gmsv/char/addressbook.c b/gmsv/char/addressbook.c new file mode 100644 index 0000000..b63599f --- /dev/null +++ b/gmsv/char/addressbook.c @@ -0,0 +1,907 @@ +#define __ADDRESSBOOK_C_ +#include "version.h" + +#include +#include +#include +#include + +#include "addressbook.h" +#include "char.h" +#include "handletime.h" +#include "buf.h" +#include "net.h" +#include "lssproto_serv.h" +#include "saacproto_cli.h" +#include "object.h" +#include "battle.h" +#include "configfile.h" +#include "npcutil.h" +#include "pet.h" +#include "petmail.h" +#include "log.h" + +/*裔烂丢永本□斥及 赢赢今[票匹烂聒允月 侬 及赢今反 + 仇木动票卞允月仇午*/ +#define ADDRESSBOOK_FIXEDMESSAGE_MAXLEN 128 + +/* 愤坌及蟆卞簿手中卅井匀凶及匹}失玉伊旦皮永弁卞馨笛匹五卅井匀凶 + 午五及裔烂丢永本□斥 */ +#define ADDRESSBOOK_CANTADD "那里没有任何人。" +#define ADDRESSBOOK_CANTADD2 "无法交换名片。" + +/* 簿井毛笛尹月仇午互匹五凶午五}笛尹方丹午仄凶谛卞霜耨允月丢永本□斥*/ +#define ADDRESSBOOK_ADDED "和%s交换名片 。" + +/* 簿井卞涌毛创尹日木凶日 */ +#define ADDRESSBOOK_BEINGADDED "和%s交换名片 。" + +/* 巨件玄伉互中匀天中分匀凶午五及丢永本□斥 */ +#define ADDRESSBOOK_MYTABLEFULL "名片匣已满。" + +/* 锹澎及巨件玄伉互中匀天中分匀凶午五及丢永本□斥 */ +#define ADDRESSBOOK_HISTABLEFULL "对方的名片匣已满。" + + +/* 丢永本□斥毛霜耨允月及卞岳 仄凶午五 */ +#define ADDRESSBOOK_SENT "送信给%s 。" + +/* 丢永本□斥毛霜耨允月及卞撩 仄凶午五 */ +#define ADDRESSBOOK_UNSENT "无法送信给%s 。" + +/* 簿井毛创尹方丹午仄凶互}湃卞创尹化中凶 */ +#define ADDRESSBOOK_ALREADYADDED "已经和%s交换过名片了。 " + +/* 铜毛域 读卞 丹橇谪 */ +#define ADDRESSBOOK_GIVEADDRESS "从%s得到名片。" + +/* 铜毛域 读卞丐仆月橇谪 */ +#define ADDRESSBOOK_TAKEADDRESS1 "给%s自己的名片。" +/* 铜毛域 读卞丐仆月橇谪 */ +#define ADDRESSBOOK_TAKEADDRESS2 "因为%s想要名片,所以将名片给他了。" + +#define ADDRESSBOOK_RETURNED1 \ +"从%s寄来信件,但由於没有%s的名片又将信件退回。" + +#define ADDRESSBOOK_RETURNED2 \ +"寄信件给%s,但由於%s 没有名片,所以信件又被退回来了。" + +#define PETMAIL_RETURNED1 \ +"%s不在这个世界里,所以无法寄送信件给他。" + + +/* static匹银丹迕[ 五中袄手*/ +char ADDRESSBOOK_returnstring[25*128]; + + + +static int ADDRESSBOOK_findBlankEntry( int cindex ); +static BOOL ADDRESSBOOK_makeEntryFromCharaindex( int charaindex, + ADDRESSBOOK_entry* ae); + +/*------------------------------------------------------------ + * 失玉伊旦皮永弁及丢永本□斥毛霜耨允月 + * MSG皿夫玄戊伙井日勾井歹木月[ + * + * 支月仇午反}connection井日cdkey匹腹绸仄化}平乓仿 手 + * 甲永玄仄凶日} MSG_send允月[公及午五卞}愤坌及树 互 + * 锹澎及伉旦玄卞卅井匀凶日窒手仄卅中午中丹仇午分[ + * 娄醒 + * cindex int 平乓仿及index + * aindex int 失玉伊旦皮永弁及index + * text char* 霜耨允月 侬 + * color int 缙 + * 忒曰袄 + * 左件仿奶件及平乓仿卞丢永本□斥毛霜耨仄凶日TRUE , + * 左白仿奶件卞瓒 仄凶日FALSE毛井尹允 + ------------------------------------------------------------*/ +BOOL ADDRESSBOOK_sendMessage( int cindex, int aindex, char* text , int color ) +{ + int i ; + char tmpmsg[256]; + char textbuffer[2048]; + char *mycd; + char *mycharaname = CHAR_getChar(cindex,CHAR_NAME ); + struct tm tm1; + ADDRESSBOOK_entry *ae; + int playernum = CHAR_getPlayerMaxNum(); + + if( !CHAR_CHECKINDEX(cindex) )return FALSE; + + ae = CHAR_getAddressbookEntry( cindex , aindex ); + if( ae == NULL )return FALSE; + + //getcdkeyFromCharaIndex(cindex, mycd,sizeof(mycd) ); + mycd = CHAR_getChar( cindex, CHAR_CDKEY); + + memcpy( &tm1, localtime( (time_t *)&NowTime.tv_sec), sizeof( tm1)); + + snprintf( textbuffer, sizeof( textbuffer), + "%2d/%02d %2d:%02d|%s|-1", + tm1.tm_mon +1, tm1.tm_mday, tm1.tm_hour, tm1.tm_min, + text); + + /* 扔□田□ 卞中月凛 */ + for( i = 0 ; i < playernum ; i ++){ + if( CHAR_CHECKINDEX( i) && + strcmp( CHAR_getChar( i, CHAR_CDKEY), ae->cdkey) == 0 && + strcmp( CHAR_getChar( i, CHAR_NAME), ae->charname) == 0 ) + { + /* + * CDKEY 手 平乓仿 手域谯仄凶[公及平乓仿弁正及 + * 失玉伊旦皮永弁卞愤坌及树 互丐月井譬屯化} + * 绣箕仄凶日}MSG允月[ + */ + int index_to_my_info = + ADDRESSBOOK_getIndexInAddressbook( i , + mycd, mycharaname); + + int fd; + if( index_to_my_info < 0 ){ + /* + * 锹澎互愤坌毛坫壅仄化仄引匀化月[ + * 域杀 谛卞]丢□伙互 凶午分仃骚襞允月[ + */ + //snprintf( tmpmsg, sizeof( tmpmsg), + // ADDRESSBOOK_RETURNED1, + // ae->charname + // ); + + //CHAR_talkToCli( CONNECT_getCharaindex(i), -1, + // tmpmsg , CHAR_COLORYELLOW ); + + snprintf( tmpmsg, sizeof( tmpmsg), + ADDRESSBOOK_RETURNED2, + CHAR_getChar( i, CHAR_NAME), + CHAR_getChar( i, CHAR_NAME)); + + /* 霜曰潜卞手丢永本□斥 */ + CHAR_talkToCli( cindex, -1, + tmpmsg , CHAR_COLORYELLOW ); + return FALSE; + } + + fd = getfdFromCharaIndex( i); + if( fd != -1 ) { + lssproto_MSG_send( fd , index_to_my_info , textbuffer , color ); + /* 夫弘午曰 */ + printl( LOG_TALK, "CD=%s\tNM=%s\tT=%s" , mycd, mycharaname, textbuffer ); + + } + + snprintf( tmpmsg , sizeof( tmpmsg),ADDRESSBOOK_SENT, + ae->charname ); + CHAR_talkToCli(cindex,-1, tmpmsg , color ); + + // WON ADD 修正snprintf会导致当机的bug + { + char tmp[1000]; + sprintf( tmp , "ADDRESSBOOK_sendMessage:" + "Send MSG to: %s %s\n", + ae->cdkey , ae->charname ); + // print( tmp ); + } + + CHAR_setInt( cindex, CHAR_SENDMAILCOUNT, + CHAR_getInt( cindex, CHAR_SENDMAILCOUNT)+1); + return TRUE; + } + } + /* 苇勾井日卅井匀凶凛反]失市它件玄扔□田□卞霜月 */ + saacproto_Message_send( acfd, mycd, mycharaname, + ae->cdkey, ae->charname, textbuffer, color); + CHAR_setInt( cindex, CHAR_SENDMAILCOUNT, + CHAR_getInt( cindex, CHAR_SENDMAILCOUNT)+1); + + + snprintf( tmpmsg , sizeof( tmpmsg),ADDRESSBOOK_SENT,ae->charname ); + CHAR_talkToCli( cindex,-1, tmpmsg , CHAR_COLORWHITE ); + + return FALSE; +} +/*------------------------------------------------------------ + * 失玉伊旦皮永弁及丢永本□斥毛霜耨允月 + * saac 井日msg 毛熬仃午匀化弁仿奶失件玄卞禾旦玄允月[ + * + * 忒曰袄 + ------------------------------------------------------------*/ +BOOL ADDRESSBOOK_sendMessage_FromOther( char *fromcdkey, char *fromcharaname, + char *tocdkey, char *tocharaname, + char* text , int color ) +{ +#define ADDRESSBOOK_SYSTEM "system" + + int i ; + char tmpmsg[256]; + int playernum = CHAR_getPlayerMaxNum(); + + /* 扔□田□ 毛腹绸允月 */ + for( i = 0 ; i < playernum ; i ++){ + if( CHAR_CHECKINDEX( i) && + strcmp( CHAR_getChar( i, CHAR_CDKEY), tocdkey) == 0 && + strcmp( CHAR_getChar( i, CHAR_NAME), tocharaname) == 0) + { + int index_to_my_info; + /* + * CDKEY 手 平乓仿 手域谯仄凶[公及平乓仿弁正及 + * 失玉伊旦皮永弁卞愤坌及树 互丐月井譬屯化} + * 绣箕仄凶日}MSG允月[ + */ + + /* 扑旦 丞丢永本□斥互窖匀化五凶 */ + if( strcmp( fromcdkey, ADDRESSBOOK_SYSTEM) == 0 && + strcmp( fromcharaname, ADDRESSBOOK_SYSTEM ) == 0 ) + { + /* 扑旦 丞丢永本□斥毛龚仁 */ + CHAR_talkToCli( i, -1, text , color ); + break; + } + + index_to_my_info = + ADDRESSBOOK_getIndexInAddressbook( i , + fromcdkey, fromcharaname); + if( index_to_my_info < 0 ){ + /* + * 锹澎互愤坌毛坫壅仄化仄引匀化月[ + */ + + snprintf( tmpmsg, sizeof( tmpmsg), ADDRESSBOOK_RETURNED2, + tocharaname, tocharaname); + + /* 霜曰潜卞手丢永本□斥 */ + saacproto_Message_send( acfd, ADDRESSBOOK_SYSTEM , ADDRESSBOOK_SYSTEM, + fromcdkey, fromcharaname, tmpmsg, CHAR_COLORYELLOW); + + } + else { + int fd = getfdFromCharaIndex( i); + if( fd != -1 ) { + lssproto_MSG_send( fd , index_to_my_info , text , color ); + /* 夫弘午曰 */ + printl( LOG_TALK, "CD=%s\tNM=%s\tT=%s" , fromcdkey, + fromcharaname, text ); + } + } + break; + } + } + if( i == playernum ) return FALSE; + return TRUE; +} + +int ADDRESSBOOK_getIndexInAddressbook(int cindex , char *cdkey, + char *charname) +{ + int i ; + + if( !CHAR_CHECKINDEX( cindex ) ) return -1; + + for( i = 0 ; i < ADDRESSBOOK_MAX ; i++){ + ADDRESSBOOK_entry *ae = CHAR_getAddressbookEntry( cindex , i ); + if( ae && ae->use && strcmp( ae->cdkey, cdkey )==0 && + strcmp( ae->charname , charname ) == 0 ){ + return i; + } + } + return -1; +} + +BOOL ADDRESSBOOK_deleteEntry( int meindex ,int index ) +{ + ADDRESSBOOK_entry ent; + BOOL ret; + if( !CHAR_CHECKINDEX( meindex ) ) return FALSE; + + memset( &ent ,0, sizeof( ADDRESSBOOK_entry )); + ret = CHAR_setAddressbookEntry( meindex , index , &ent ); + if( ret == TRUE ){ + ADDRESSBOOK_sendAddressbookTable( meindex ); + return TRUE; + } + return FALSE; +} + +BOOL ADDRESSBOOK_addEntry( int meindex ) +{ + int objbuf[20]; + int found_count; + int front_x , front_y; + int i; + int cnt = 0; + int fd; + char *mycd , *tocd; + BOOL found = FALSE; + + if( !CHAR_CHECKINDEX( meindex ) )return FALSE; + + fd = getfdFromCharaIndex( meindex); + if( fd == -1 ) return FALSE; + + if( ADDRESSBOOK_findBlankEntry( meindex ) < 0) { + CHAR_talkToCli( meindex , -1,ADDRESSBOOK_MYTABLEFULL,CHAR_COLORWHITE ); + return FALSE; + } + + for( i = 0; i < CONNECT_WINDOWBUFSIZE; i ++ ) { + CONNECT_setTradecardcharaindex( fd,i,-1); + } + + CHAR_getCoordinationDir( CHAR_getInt( meindex, CHAR_DIR ) , + CHAR_getInt( meindex , CHAR_X ), + CHAR_getInt( meindex , CHAR_Y ) , + 1 , &front_x , &front_y ); + + found_count = CHAR_getSameCoordinateObjects( objbuf, + arraysizeof( objbuf), + CHAR_getInt(meindex,CHAR_FLOOR), + front_x,front_y ); + if( found_count == 0 ){ + CHAR_talkToCli( meindex, -1, ADDRESSBOOK_CANTADD, CHAR_COLORWHITE); + return FALSE; + } + for( i = 0 ; i < found_count; i++ ){ + int objindex = objbuf[i]; + int index = OBJECT_getIndex( objindex); + if( OBJECT_getType(objindex) != OBJTYPE_CHARA ) { + continue; + } + if( CHAR_getInt( index,CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ){ + continue; + } + if( index == meindex ) { + continue; + } + found = TRUE; + if( CHAR_getWorkInt( index, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE) { + continue; + } + if(!CHAR_getFlg( index, CHAR_ISTRADECARD)) { + continue; + } + if( ADDRESSBOOK_findBlankEntry( index ) < 0 ) { + continue; + } + tocd = CHAR_getChar( index, CHAR_CDKEY); + mycd = CHAR_getChar( meindex, CHAR_CDKEY); + if( ADDRESSBOOK_getIndexInAddressbook( meindex, tocd, + CHAR_getChar( index, CHAR_NAME)) >= 0 && + ADDRESSBOOK_getIndexInAddressbook( index, mycd, + CHAR_getChar(meindex, CHAR_NAME) ) >= 0 ) { + continue; + } + + CONNECT_setTradecardcharaindex( fd,cnt,index); + cnt ++; + if( cnt == CONNECT_WINDOWBUFSIZE ) break; + } + + if( cnt == 0 ) { + if( found ) { + CHAR_talkToCli( meindex, -1, ADDRESSBOOK_CANTADD2, CHAR_COLORWHITE); + }else { + CHAR_talkToCli( meindex, -1, ADDRESSBOOK_CANTADD, CHAR_COLORWHITE); + } + return FALSE; + } + if( cnt == 1 ) { + ADDRESSBOOK_addAddressBook( meindex, + CONNECT_getTradecardcharaindex(fd,0) ); + return TRUE; + }else if( cnt > 1 ) { + int strlength; + char msgbuf[1024]; + char escapebuf[2048]; + strcpy( msgbuf, "1\n和谁交换名片呢?\n"); + strlength = strlen( msgbuf); + for( i = 0; + CONNECT_getTradecardcharaindex(fd,i) != -1 + && i< CONNECT_WINDOWBUFSIZE; i ++ ){ + char *a = CHAR_getChar( CONNECT_getTradecardcharaindex(fd,i), + CHAR_NAME); + char buf[256]; + snprintf( buf, sizeof( buf),"%s\n", a); + if( strlength + strlen( buf) > arraysizeof( msgbuf)){ + print( "%s:%d视窗讯息buffer不足。\n", + __FILE__,__LINE__); + break; + } + strcpy( &msgbuf[strlength], buf); + strlength += strlen(buf); + } + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_SELECT, + WINDOW_BUTTONTYPE_CANCEL, + CHAR_WINDOWTYPE_SELECTTRADECARD, + -1, + makeEscapeString( msgbuf, escapebuf, sizeof(escapebuf))); + return TRUE; + } + + return FALSE; +} + +static int ADDRESSBOOK_findBlankEntry( int cindex ) +{ + int i; + + if( CHAR_CHECKINDEX( cindex ) == FALSE )return -1; + + for( i=0 ; iuse == FALSE ) { + return i; + } + } + return -1; +} + +static BOOL ADDRESSBOOK_makeEntryFromCharaindex( int charaindex, + ADDRESSBOOK_entry* ae) +{ + char *cdkey; + + if( !CHAR_CHECKINDEX(charaindex) ) return FALSE; + + memset( ae,0,sizeof(ADDRESSBOOK_entry) ); + cdkey = CHAR_getChar( charaindex, CHAR_CDKEY); + if( cdkey == NULL ){ + print( "ADDRESSBOOK_makeEntryFromCharaindex:" + " strange! getcdkeyFromCharaIndex returns NULL!" + " charaindex: %d\n" , charaindex ); + return FALSE; + } + strcpysafe( ae->cdkey , sizeof( ae->cdkey ),cdkey); + + strcpysafe( ae->charname,sizeof( ae->charname), + CHAR_getChar(charaindex,CHAR_NAME) ); + ae->level = CHAR_getInt( charaindex , CHAR_LV ); + ae->duelpoint = CHAR_getInt( charaindex, CHAR_DUELPOINT); + ae->graphicsno = CHAR_getInt( charaindex , CHAR_FACEIMAGENUMBER ); + ae->online = getServernumber(); + ae->use = TRUE; + ae->transmigration = CHAR_getInt( charaindex, CHAR_TRANSMIGRATION); + + return TRUE; +} + +void ADDRESSBOOK_notifyLoginLogout( int cindex , int flg ) +{ + int i; + char *cd=NULL; + char *nm = CHAR_getChar( cindex , CHAR_NAME ); + int playernum = CHAR_getPlayerMaxNum(); + + if( !CHAR_CHECKINDEX( cindex ) )return; + cd = CHAR_getChar( cindex, CHAR_CDKEY); + + CHAR_send_DpDBUpdate_AddressBook( cindex, flg ); + + for( i = 0 ; i < playernum ; i++){ + if( CHAR_CHECKINDEX( i) && i != cindex ) { + int j; + for( j = 0 ; juse == TRUE && + strcmp( ae->cdkey , cd ) == 0 && + strcmp( ae->charname, nm ) == 0 ){ + + ae->online = (flg == 0 ) ? 0: getServernumber(); + ae->level = CHAR_getInt( cindex , CHAR_LV ); + ae->duelpoint = CHAR_getInt( cindex, CHAR_DUELPOINT); + ae->graphicsno = CHAR_getInt( cindex, CHAR_FACEIMAGENUMBER ); + ae->transmigration = CHAR_getInt( cindex, CHAR_TRANSMIGRATION); + + ADDRESSBOOK_sendAddressbookTableOne( i,j ); + + break; + } + } + } + } + + if( flg == 0 ){ + saacproto_Broadcast_send( acfd,cd, nm, "offline", 1); + }else if( flg == 1 ) { + for( i = 0 ; i < ADDRESSBOOK_MAX; i++ ){ + int j; + ADDRESSBOOK_entry* ae; + ae = CHAR_getAddressbookEntry( cindex, i ); + if( ae->use == 0 )continue; + ae->online = 0; + for( j=0 ; j < playernum ; j++ ) { + if( CHAR_CHECKINDEX( j) && + strcmp( ae->cdkey, CHAR_getChar( j, CHAR_CDKEY)) == 0 && + strcmp( ae->charname, CHAR_getChar( j, CHAR_NAME) )== 0){ + ae->level = CHAR_getInt( j, CHAR_LV ); + ae->graphicsno = CHAR_getInt( j, CHAR_FACEIMAGENUMBER ); + ae->online = getServernumber(); + ae->transmigration = CHAR_getInt( j, CHAR_TRANSMIGRATION); + break; + } + } + if( j == playernum) { +#ifndef _DEATH_CONTEND + char buff[512]; + char escapebuf[1024]; + ae->online = 0; + snprintf( buff, sizeof(buff), "%s_%s", ae->cdkey, ae->charname); + makeEscapeString( buff, escapebuf, sizeof(escapebuf)); + saacproto_DBGetEntryString_send( acfd, DB_ADDRESSBOOK, escapebuf, 0,0); +#endif + } + } + ADDRESSBOOK_sendAddressbookTable(cindex); + saacproto_Broadcast_send( acfd,cd, nm, "online", 1); + saacproto_MessageFlush_send( acfd, cd, nm); + } +} + +BOOL ADDRESSBOOK_sendAddressbookTable( int cindex ) +{ + int stringlen=0; + int i; + + if( !CHAR_CHECKINDEX( cindex ) )return FALSE; + + for( i=0 ; iuse ){ + char tmp[CHARNAMELEN+32]; + char charname_escaped[CHARNAMELEN*2]; + makeEscapeString( ae->charname, charname_escaped , + sizeof(charname_escaped )); + /* 银迕白仿弘| 蟆|伊矛伙|仿奶白|白仿弘 */ + snprintf( tmp , sizeof( tmp ), + "%d|%s|%d|%d|%d|%d|%d|" , + ae->use, + charname_escaped , ae->level , + ae->duelpoint,ae->online,ae->graphicsno, + ae->transmigration); + strcpysafe ( ADDRESSBOOK_returnstring + stringlen , + sizeof(ADDRESSBOOK_returnstring) - stringlen, + tmp ); + stringlen += strlen( tmp ); + if( stringlen >= sizeof(ADDRESSBOOK_returnstring) ) { + break; + } + }else{ + /*银匀化卅中犯□正手冲徇及心匹霜月 */ + char tmp[32]; + snprintf( tmp , sizeof( tmp ), "|||||||" ); + strcpysafe ( ADDRESSBOOK_returnstring + stringlen , + sizeof(ADDRESSBOOK_returnstring) - stringlen, + tmp ); + stringlen += strlen( tmp ); + if( stringlen >= sizeof(ADDRESSBOOK_returnstring)) { + break; + } + } + } + + dchop( ADDRESSBOOK_returnstring, "|" ); + + { + int fd; + fd = getfdFromCharaIndex( cindex ); + if( fd == -1 ) return FALSE; + lssproto_AB_send( fd, ADDRESSBOOK_returnstring ); + } + return TRUE; +} + +BOOL ADDRESSBOOK_sendAddressbookTableOne( int cindex, int num ) +{ + int stringlen=0; + ADDRESSBOOK_entry *ae; + + if( !CHAR_CHECKINDEX( cindex ) )return FALSE; + if( num < 0 || num > ADDRESSBOOK_MAX) return FALSE; + + ae = CHAR_getAddressbookEntry( cindex , num ); + + if( ae && ae->use ){ + char tmp[CHARNAMELEN+32]; + char charname_escaped[CHARNAMELEN*2]; + makeEscapeString( ae->charname, charname_escaped , + sizeof(charname_escaped )); + snprintf( tmp , sizeof( tmp ), + "%d|%s|%d|%d|%d|%d|%d|" , + ae->use, + charname_escaped , ae->level , + ae->duelpoint,ae->online,ae->graphicsno, + ae->transmigration); + strcpysafe ( ADDRESSBOOK_returnstring + stringlen , + sizeof(ADDRESSBOOK_returnstring) - stringlen, + tmp ); + stringlen += strlen( tmp ); + if( stringlen >= sizeof(ADDRESSBOOK_returnstring) ) { + return FALSE; + } + }else{ + char tmp[32]; + snprintf( tmp , sizeof( tmp ), "|||||||" ); + strcpysafe ( ADDRESSBOOK_returnstring + stringlen , + sizeof(ADDRESSBOOK_returnstring) - stringlen, + tmp ); + stringlen += strlen( tmp ); + if( stringlen >= sizeof(ADDRESSBOOK_returnstring)) { + return FALSE; + } + } + + { + int fd; + fd = getfdFromCharaIndex( cindex ); + if( fd == -1 ) return FALSE; + lssproto_ABI_send( fd, num, ADDRESSBOOK_returnstring ); + } + return TRUE; +} + +/*------------------------------------------------------------ + * 夫午勾及失玉伊旦皮永弁巨件玄伉毛} 侬 卞卅云允[ + * 仇木反平乓仿忡绣迕卅及匹弁仿奶失件玄卞霜耨允月方曰手恳割 + * 卅手及匹丐月 邰互丐月[ + * 娄醒 + * a ADDRESSBOOK_entry* 侬 卞仄凶中厌瞻 尺及禾奶件正 + * 忒曰袄 + * char * + ------------------------------------------------------------*/ +char *ADDRESSBOOK_makeAddressbookString( ADDRESSBOOK_entry *a ) +{ + char work1[256], work2[256]; + + if( a->use == 0 ){ + /* 坞巨件玄伉分匀凶日坞 侬 */ + ADDRESSBOOK_returnstring[0] = '\0'; + return ADDRESSBOOK_returnstring; + } + + makeEscapeString( a->cdkey, work1, sizeof( work1 )); + makeEscapeString( a->charname , work2 , sizeof( work2 )); + snprintf( ADDRESSBOOK_returnstring, + sizeof( ADDRESSBOOK_returnstring ), + "%s|%s|%d|%d|%d|%d", + work1, work2, a->level, a->duelpoint, a->graphicsno,a->transmigration); + + return ADDRESSBOOK_returnstring; + +} + +/*------------------------------------------------------------ + * 侬 祭今木化中月失玉伊旦皮永弁巨件玄伉毛}厌瞻 卞卅云允[ + * 仇及瑛绊厌瞻 及use动陆及树 反敦僬卞卅月[ + * 娄醒 + * in char* 侬 + * a ADDRESSBOOK_entry* 犯□正毛璋户月赭 + * 忒曰袄 + * 勾友卞TRUE + ------------------------------------------------------------*/ +BOOL ADDRESSBOOK_makeAddressbookEntry( char *in , ADDRESSBOOK_entry *a ) +{ + char work1[256], work2[256] , work3[256] , work4[256],work5[256],work6[256]; + int ret; + if( strlen( in ) == 0 ){ + memset( a,0,sizeof(ADDRESSBOOK_entry) ); + a->use = 0; + return TRUE; + } + + getStringFromIndexWithDelim( in, "|" , 1 , work1 , sizeof( work1 )); + getStringFromIndexWithDelim( in, "|" , 2 , work2 , sizeof( work2 )); + getStringFromIndexWithDelim( in, "|" , 3 , work3 , sizeof( work3 )); + getStringFromIndexWithDelim( in, "|" , 4 , work4 , sizeof( work4 )); + getStringFromIndexWithDelim( in, "|" , 5 , work5 , sizeof( work5 )); + work6[0] = '\0'; + ret = getStringFromIndexWithDelim( in, "|" , 6 , work6 , sizeof( work6 )); + if( ret == FALSE ) { + a->transmigration = 0; + } + else { + a->transmigration = atoi( work6); + } + a->use = 1; + + makeStringFromEscaped( work1 ); + makeStringFromEscaped( work2 ); + + strcpysafe( a->cdkey , sizeof(a->cdkey) , work1 ); + strcpysafe( a->charname , sizeof(a->charname), work2 ); + + a->level = atoi( work3 ); + a->duelpoint = atoi( work4 ); + a->graphicsno = atoi( work5 ); + + return FALSE; +} + +void ADDRESSBOOK_addAddressBook( int meindex, int toindex) +{ + char tmpstring[CHARNAMELEN + + ADDRESSBOOK_FIXEDMESSAGE_MAXLEN]; + + int hisblank; + int myblank; + int myaddindex, toaddindex; + int dir; + char *cdkey; + + hisblank = ADDRESSBOOK_findBlankEntry( toindex ); + if( hisblank < 0 ) { + CHAR_talkToCli( meindex, -1, ADDRESSBOOK_HISTABLEFULL, CHAR_COLORWHITE); + return ; + } + myblank = ADDRESSBOOK_findBlankEntry( meindex ); + if( myblank < 0 ){ + CHAR_talkToCli( meindex , -1, ADDRESSBOOK_MYTABLEFULL, CHAR_COLORWHITE ); + return ; + } + + cdkey = CHAR_getChar( toindex, CHAR_CDKEY); + myaddindex = ADDRESSBOOK_getIndexInAddressbook( meindex, cdkey, + CHAR_getChar( toindex, CHAR_NAME)); + cdkey = CHAR_getChar( meindex, CHAR_CDKEY); + toaddindex = ADDRESSBOOK_getIndexInAddressbook( toindex, cdkey, + CHAR_getChar(meindex, CHAR_NAME)); + if( myaddindex < 0 ){ + ADDRESSBOOK_entry hisentry; + + if( ADDRESSBOOK_makeEntryFromCharaindex(toindex,&hisentry) == FALSE ){ + return ; + } + CHAR_setAddressbookEntry( meindex, myblank,&hisentry ); + + snprintf( tmpstring, sizeof( tmpstring), + toaddindex < 0 ? ADDRESSBOOK_ADDED: ADDRESSBOOK_GIVEADDRESS, + hisentry.charname); + CHAR_talkToCli( meindex , -1,tmpstring, CHAR_COLORWHITE ); + ADDRESSBOOK_sendAddressbookTableOne( meindex, myblank); + }else{ + snprintf( tmpstring, sizeof( tmpstring), ADDRESSBOOK_TAKEADDRESS1, + CHAR_getChar( toindex, CHAR_NAME)); + CHAR_talkToCli( meindex, -1, tmpstring, CHAR_COLORWHITE); + + } + if( toaddindex < 0 ) { + ADDRESSBOOK_entry meae; + if( ADDRESSBOOK_makeEntryFromCharaindex(meindex,&meae) == FALSE) { + return; + } + CHAR_setAddressbookEntry( toindex, hisblank,&meae ); + snprintf( tmpstring , sizeof( tmpstring), + myaddindex < 0 ? ADDRESSBOOK_ADDED : ADDRESSBOOK_GIVEADDRESS, + CHAR_getChar( meindex, CHAR_NAME ) ); + CHAR_talkToCli( toindex, -1, tmpstring, CHAR_COLORWHITE); + ADDRESSBOOK_sendAddressbookTableOne( toindex , hisblank); + }else { + if( myaddindex < 0 ) { + snprintf( tmpstring , sizeof( tmpstring), + ADDRESSBOOK_TAKEADDRESS2, + CHAR_getChar( meindex, CHAR_NAME ) ); + CHAR_talkToCli( toindex, -1, tmpstring, CHAR_COLORWHITE); + } + } + dir = NPC_Util_GetDirCharToChar( toindex, meindex, 0); + if( dir != -1) { + + if( CHAR_getInt( toindex, CHAR_DIR) != dir) { + CHAR_setInt( toindex, CHAR_DIR, dir); + } + CHAR_sendWatchEvent( CHAR_getWorkInt( toindex, CHAR_WORKOBJINDEX), + CHAR_ACTNOD,NULL,0,TRUE); + CHAR_setWorkInt( toindex, CHAR_WORKACTION, CHAR_ACTNOD); + CHAR_sendWatchEvent( CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + CHAR_ACTNOD,NULL,0,TRUE); + CHAR_setWorkInt( meindex, CHAR_WORKACTION, CHAR_ACTNOD); + } + return; +} + + +void ADDRESSBOOK_DispatchMessage( char *cd, char *nm, char *value, int mode) +{ + int i; + char work[256]; + int online,level,duelpoint, faceimagenumber, transmigration; + int playernum = CHAR_getPlayerMaxNum(); + int ret; + + getStringFromIndexWithDelim( value, "|" , 1 , work , sizeof( work )); + online = atoi( work); + getStringFromIndexWithDelim( value, "|" , 2 , work , sizeof( work )); + level = atoi( work); + getStringFromIndexWithDelim( value, "|" , 3 , work , sizeof( work )); + duelpoint = atoi( work); + getStringFromIndexWithDelim( value, "|" , 4 , work , sizeof( work )); + faceimagenumber = atoi( work); + ret = getStringFromIndexWithDelim( value, "|" , 5 , work , sizeof( work )); + if( ret ) { + transmigration = atoi( work); + } + else { + transmigration = 0; + } + + if( online == getServernumber()) { + for( i = 0 ; i < playernum ; i++) { + if( CHAR_CHECKINDEX( i )) { + char *c = CHAR_getChar( i, CHAR_CDKEY); + char *n = CHAR_getChar( i, CHAR_NAME); + if( c == NULL || n == NULL ) continue; + if( strcmp( c , cd ) == 0 && strcmp( n, nm ) == 0 ) { + break; + } + } + } + if( i == playernum ) { + online = 0; + saacproto_Broadcast_send( acfd,cd, nm, "offline", 1); + } + } + + for( i = 0 ; i < playernum ; i++) { + if( CHAR_CHECKINDEX( i )) { + int j; + for( j = 0 ; j < ADDRESSBOOK_MAX ; j++) { + ADDRESSBOOK_entry *ae; + ae = CHAR_getAddressbookEntry( i ,j ); + if( ae && ae->use == TRUE && + strcmp( ae->cdkey , cd ) == 0 && + strcmp( ae->charname, nm ) == 0 ) + { + if( mode == 0 ) { + ae->use = FALSE; + }else { + ae->online = online; + ae->level = level; + ae->duelpoint = duelpoint; + ae->graphicsno = faceimagenumber; + ae->transmigration = transmigration; + } + ADDRESSBOOK_sendAddressbookTableOne( i,j ); + + break; + } + } + } + } +} + + +BOOL ADDRESSBOOK_AutoaddAddressBook( int meindex, int toindex) +{ + int hisblank; + int myblank; + int myaddindex, toaddindex; + + char *cdkey; + + myblank = ADDRESSBOOK_findBlankEntry( meindex ); + hisblank = ADDRESSBOOK_findBlankEntry( toindex ); + if( hisblank < 0 || myblank < 0) { //"名片匣已满。" + return FALSE; + } + + cdkey = CHAR_getChar( toindex, CHAR_CDKEY); + myaddindex = ADDRESSBOOK_getIndexInAddressbook( meindex, cdkey, + CHAR_getChar( toindex, CHAR_NAME)); + cdkey = CHAR_getChar( meindex, CHAR_CDKEY); + toaddindex = ADDRESSBOOK_getIndexInAddressbook( toindex, cdkey, + CHAR_getChar(meindex, CHAR_NAME)); + if( myaddindex < 0 ){ + ADDRESSBOOK_entry meae; + ADDRESSBOOK_entry hisentry; + if( ADDRESSBOOK_makeEntryFromCharaindex(toindex,&hisentry) == FALSE || + ADDRESSBOOK_makeEntryFromCharaindex(meindex,&meae) == FALSE ){ + return FALSE; + } + CHAR_setAddressbookEntry( meindex, myblank,&hisentry ); + CHAR_setAddressbookEntry( toindex, hisblank,&meae ); + ADDRESSBOOK_sendAddressbookTableOne( meindex, myblank); + ADDRESSBOOK_sendAddressbookTableOne( toindex , hisblank); + } + return TRUE; +} + diff --git a/gmsv/char/char.c b/gmsv/char/char.c new file mode 100644 index 0000000..18f5808 --- /dev/null +++ b/gmsv/char/char.c @@ -0,0 +1,8706 @@ +#include "version.h" +#include +#include +#include +#include // shan +#include +#include +#include +#include +#include "common.h" +#include "char_base.h" +#include "char_data.h" +#include "char.h" +#include "lssproto_serv.h" +#include "item.h" +#include "item_event.h" +#include "buf.h" +#include "object.h" +#include "map_deal.h" +#include "saacproto_cli.h" +#include "readmap.h" +#include "handletime.h" +#include "char_event.h" +#include "npccreate.h" +#include "addressbook.h" +#include "item_event.h" +#include "magic_base.h" +#include "magic.h" +#include "chatmagic.h" +#include "configfile.h" +#include "log.h" +#include "anim_tbl.h" +#include "encount.h" +#include "battle.h" +#include "pet_skill.h" +#include "util.h" +#include "enemy.h" +#include "npcutil.h" +#include "pet.h" +#include "family.h" +#include "defend.h" +#ifdef _NPCSERVER_NEW +#include "npcserver.h" +#endif +#ifdef _DEATH_CONTEND +#include "deathcontend.h" +#endif +#include "correct_bug.h" +#ifdef _JOBDAILY +#include "npc_checkman.h" +#endif + +#ifdef _CHAR_PROFESSION // WON ADD 人物职业栏位 +#include "profession_skill.h" +#endif +#ifdef _CHATROOMPROTOCOL // (不可开) Syu ADD 聊天室频道 +#include "chatroom.h" +#endif + +extern int channelMember[FAMILY_MAXNUM][FAMILY_MAXCHANNEL][FAMILY_MAXMEMBER]; +extern int familyMemberIndex[FAMILY_MAXNUM][FAMILY_MAXMEMBER]; + +extern tagRidePetTable ridePetTable[296]; +extern int BATTLE_getRidePet( int charaindex ); + +#ifdef _CHANNEL_MODIFY +extern int InitOccChannel(void); +#endif + +#ifdef _ANGEL_SUMMON +extern int checkIfAngelByName( char* nameinfo); +extern char* getMissionNameInfo( int charaindex, char* nameinfo); +extern void CHAR_sendAngelMark( int objindex, int flag); +extern int checkIfOnlyAngel( int charaindex); +extern void selectAngel( int charaindex, int heroindex, int mission, int gm_cmd); +#endif + +extern void GOLD_DeleteTimeCheckOne( int objindex); + +// WON ADD 修正道具的设定问题 +void fix_item_bug(int charaindex, int i); + + +/*====================平乓仿及综岳卞楮允月楮醒====================*/ +/*------------------------------------------------------------ + * 综岳允月凛及左皿扑亦件及袄毛涩烂仄方丹午允月[ + * 娄醒 + * ch Char* 涩烂燮及平乓仿及犯□正 + * option char* 弁仿奶失件玄井日仁月犯□正 + * 忒曰袄 + * 岳 TRUE + * 撩 FALSE + ------------------------------------------------------------*/ +static BOOL CHAR_makeCharFromOptionAtCreate( Char* ch , + int vital, int str, int tgh, int dex, + int earth, int water, int fire, int wind) +{ + + /* 躲岭及腹据毛垫丹 */ + int para[4]; + int attr[4]; + int i; + int parasum,attrsum; + int cnt; + + para[0] = vital; + para[1] = str; + para[2] = tgh; + para[3] = dex; + + attr[0] = earth; + attr[1] = water; + attr[2] = fire; + attr[3] = wind; + +#define MAXPARAMETER 20 +#define PKMAXPARAMETER 300 + parasum = 0; + /* + * 允屯化及犯□正及 卞 - 反丐匀化反卅日卅中仄 + * 瑕丐孔木及仪毛哔尹化云中化 及袄手译尹卅中 + */ + + for( i = 0; i < arraysizeof( para); i ++ ) { + if( para[i] < 0 || para[i] > MAXPARAMETER )return FALSE; + parasum += para[i]; + } +#ifdef _NEW_PLAYER_CF //新手出生配置 + if( parasum > MAXPARAMETER ) return FALSE; +#else + if( parasum != MAXPARAMETER ) return FALSE; +#endif + +/*#ifdef _NEW_TESTSERVER //测试伺服 + if( parasum > MAXPARAMETER ) return FALSE; +#else + if( parasum != MAXPARAMETER ) return FALSE; +#endif*/ + + +#undef MAXPARAMETER + + +#define MAXATTRIBUTE 10 + cnt = 0; + attrsum = 0; + /* 箪岭及民尼永弁毛允月 */ + for( i = 0; i < arraysizeof( para); i ++ ) { + if( attr[i] < 0 || attr[i] > MAXATTRIBUTE )return FALSE; + attrsum += attr[i]; + if( attr[i] > 0 ) cnt ++; + } + /* 宁煌袄反10 */ + if( attrsum != MAXATTRIBUTE ) return FALSE; + + /* 2勾方曰聂仁喃曰癫化日木化中凶日蛲 */ + if( cnt > 2 ) return FALSE; + + /* 菅箪岭反喃曰癫化日木卅中 */ + if( attr[0] > 0 && attr[2] > 0 ) return FALSE; + if( attr[1] > 0 && attr[3] > 0 ) return FALSE; + +#undef MAXATTRIBUTE + + /* 戊疋□ */ + ch->data[CHAR_VITAL] = vital*100; + ch->data[CHAR_STR] = str*100; + ch->data[CHAR_TOUGH] = tgh*100; + ch->data[CHAR_DEX] = dex*100; + + ch->data[CHAR_EARTHAT] = attr[0] * 10; + ch->data[CHAR_WATERAT] = attr[1] * 10; + ch->data[CHAR_FIREAT] = attr[2] * 10; + ch->data[CHAR_WINDAT] = attr[3] * 10; +#ifdef _NEWOPEN_MAXEXP + ch->data[CHAR_OLDEXP] = 0; +#endif + ch->data[CHAR_EXP] = 0; + + +#ifdef _NEW_PLAYER_CF //新手出生配置 + ch->data[CHAR_TRANSMIGRATION] = getNewplayertrans(); + ch->data[CHAR_GOLD] = getNewplayergivegold();; + ch->data[CHAR_LV] = getNewplayerlv();//120; +// ch->data[CHAR_LEARNRIDE] = 200; +// ch->data[CHAR_LASTTALKELDER] = (rand()%10)>5?35:36;//34; +// ch->data[CHAR_SKILLUPPOINT] = 616;//600; +#ifdef _75_TEST + ch->data[CHAR_TRANSEQUATION] = (100 << 16) + 650; +#endif +#ifdef _NEW_RIDEPETS + //ch->data[CHAR_LOWRIDEPETS] = 0xffffffff; +#endif +#endif + +/*#ifdef _NEW_TESTSERVER //测试伺服 + ch->data[CHAR_SKILLUPPOINT] = "";//600; + ch->data[CHAR_TRANSMIGRATION] = 5; + ch->data[CHAR_GOLD] = CHAR_MAXGOLDHAVE; + ch->data[CHAR_LV] = 140;//120; + ch->data[CHAR_LEARNRIDE] = 200; +// ch->data[CHAR_LASTTALKELDER] = (rand()%10)>5?35:36;//34; + ch->data[CHAR_SKILLUPPOINT] = 616;//600; +#ifdef _75_TEST + ch->data[CHAR_TRANSEQUATION] = (100 << 16) + 650; +#endif +#ifdef _NEW_RIDEPETS + //ch->data[CHAR_LOWRIDEPETS] = 0xffffffff; +#endif +#endif*/ + +#ifdef _PETSKILL_BECOMEPIG + ch->data[CHAR_BECOMEPIG] = -1; + ch->data[CHAR_BECOMEPIG_BBI] = 100250; +#endif + + ch->data[CHAR_LASTLEAVETIME] = 0; + + return TRUE; +} + +#ifdef _HELP_NEWHAND +void CHAR_loginAddItemForNew( int charindex ) +{ + int emptyitemindexinchara, itemindex; + int i; + + char msgbuf[128]; + + for( i = 0; i < 15; i ++ ) { + emptyitemindexinchara = CHAR_findEmptyItemBox( charindex ); + + if( emptyitemindexinchara < 0 ){ + sprintf( msgbuf, "空间栏位不足。" ); + + CHAR_talkToCli( charindex, -1, msgbuf, CHAR_COLORYELLOW); + return; + } + if(getNewplayergiveitem(i)==-1)continue; + itemindex = ITEM_makeItemAndRegist( getNewplayergiveitem(i) ); + + if( itemindex != -1 ){ + CHAR_setItemIndex( charindex, emptyitemindexinchara, itemindex ); + ITEM_setWorkInt(itemindex, ITEM_WORKOBJINDEX,-1); + ITEM_setWorkInt(itemindex, ITEM_WORKCHARAINDEX,charindex); + CHAR_sendItemDataOne( charindex, emptyitemindexinchara); + } + } + print("Get New Hand Item"); +} +#endif + +void CHAR_createNewChar( int clifd, int dataplacenum, char* charname , + int imgno,int faceimgno, + int vital,int str,int tgh,int dex, + int earth,int water,int fire,int wind, + int hometown , char *cdkey ) +{ + + Char ch, *chwk; + int charaindex, petindex; + int enemyarray; + char szKey[256]; + +/*#ifdef _NEW_TESTSERVER //测试伺服 + int add_pet[]={0,0,0,0,0}; +#endif*/ + +#ifdef _NEW_PLAYER_CF //新手出生配置 + int add_pet[]={0,0,0,0,0}; +#endif + +#ifdef _DELBORNPLACE //Syu ADD 6.0 统一出生於新手村 + int BornPet = hometown; + if( getMuseum() ) + hometown = 1; +#endif + memset(&ch,0,sizeof(Char)); + + if( !CHAR_checkPlayerImageNumber( imgno)) { + lssproto_CreateNewChar_send( clifd ,FAILED, "" ); + CONNECT_setState( clifd, NOTLOGIN ); + return; + } + if( !CHAR_checkFaceImageNumber( imgno, faceimgno)) { + lssproto_CreateNewChar_send( clifd ,FAILED, "" ); + CONNECT_setState( clifd, NOTLOGIN ); + return; + } + CHAR_getDefaultChar(&ch,imgno); + ch.data[CHAR_WALKINTERVAL] = getWalksendinterval(); + + if( CHAR_getInitElderPosition( &ch ,hometown) == FALSE ){ + lssproto_CreateNewChar_send( clifd ,FAILED, "" ); + CONNECT_setState( clifd, NOTLOGIN ); + return; + + }else if( MAP_checkCoordinates( ch.data[CHAR_FLOOR], ch.data[CHAR_X], + ch.data[CHAR_Y] ) == FALSE ){ + lssproto_CreateNewChar_send( clifd ,FAILED, ""); + CONNECT_setState( clifd, NOTLOGIN ); + return; + } + strcpysafe( ch.string[CHAR_NAME].string , + sizeof(ch.string[CHAR_NAME].string), + charname); + + if( CHAR_getNewImagenumberFromEquip( imgno,0) == -1 ){ + lssproto_CreateNewChar_send( clifd ,FAILED, ""); + CONNECT_setState( clifd, NOTLOGIN ); + return; + } + ch.data[CHAR_BASEIMAGENUMBER] = imgno; + ch.data[CHAR_BASEBASEIMAGENUMBER] = imgno; + ch.data[CHAR_FACEIMAGENUMBER] = faceimgno; + ch.data[CHAR_DATAPLACENUMBER] = dataplacenum; + +#ifdef _FM_JOINLIMIT + ch.data[CHAR_FMTIMELIMIT] = 0; +#endif + +#ifdef _NEWSAVE + ch.data[CHAR_SAVEINDEXNUMBER] = -1; +#endif + ch.data[CHAR_HP] = 0x7fffffff; + + ch.data[CHAR_CHARM] = 60; + ch.data[CHAR_MAXMP] = ch.data[CHAR_MP] = 100; + strcpysafe( ch.string[CHAR_CDKEY].string, + sizeof( ch.string[CHAR_CDKEY].string), cdkey ); + + // Robin 0724 + ch.data[CHAR_RIDEPET] = -1; + ch.data[CHAR_LEARNRIDE] = 0; + +#ifdef _NEW_RIDEPETS + ch.data[CHAR_LOWRIDEPETS] = 0; +#endif + +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + ch.data[CHAR_FAME] = 0; +#endif +#ifdef _NEW_MANOR_LAW + ch.data[CHAR_MOMENTUM] = 0; // 个人气势 +#endif +#ifdef _TEACHER_SYSTEM + ch.data[CHAR_TEACHER_FAME] = 0; // 导师领导声望 +#endif +#ifdef _RACEMAN + ch.data[CHAR_CHECKIN] = 0; // 宠物登记 + ch.data[CHAR_CATCHCNT1] = 0; // 新手限 猎宠次数 + ch.data[CHAR_CATCHCNT2] = 0; // 老手限 猎宠次数 + ch.data[CHAR_CATCHCNT3] = 0; // 家族限 猎宠次数 + ch.data[CHAR_CATCHCNT4] = 0; // 老手不限 猎宠次数 + ch.data[CHAR_CATCHCNT5] = 0; // 家族不限 猎宠次数 + ch.data[CHAR_KINDCNT1] = 0; + ch.data[CHAR_KINDCNT2] = 0; + ch.data[CHAR_KINDCNT3] = 0; + ch.data[CHAR_KINDCNT4] = 0; + ch.data[CHAR_KINDCNT5] = 0; + ch.data[CHAR_KINDCNT6] = 0; + ch.data[CHAR_KINDCNT7] = 0; + ch.data[CHAR_KINDCNT8] = 0; + ch.data[CHAR_KINDCNT9] = 0; + ch.data[CHAR_KINDCNT10] = 0; +#endif +#ifdef _CHAR_PROFESSION // WON ADD 人物职业 + ch.data[PROFESSION_CLASS] = 0; + ch.data[PROFESSION_LEVEL] = 0; +// ch.data[PROFESSION_EXP] = 0; + ch.data[PROFESSION_SKILL_POINT] = 0; + ch.data[ATTACHPILE] = 0; +#endif + +#ifdef _GM_IDENTIFY + sprintf(ch.string[CHAR_GMIDENTIFY].string,"%s",""); //gm名称清为空字串 +#endif +#ifdef _TEACHER_SYSTEM + memset(ch.string[CHAR_TEACHER_ID].string,0,sizeof(STRING128)); + memset(ch.string[CHAR_TEACHER_NAME].string,0,sizeof(STRING128)); +#endif + +#ifdef _ITEM_SETLOVER + memset(ch.string[CHAR_LOVERID].string,0,sizeof(STRING128)); + memset(ch.string[CHAR_LOVERNAME].string,0,sizeof(STRING128)); +#endif + +#ifdef _PETSKILL_BECOMEPIG + ch.data[CHAR_BECOMEPIG] = -1; + ch.data[CHAR_BECOMEPIG_BBI] = 100250; +#endif + + strcpysafe( ch.string[CHAR_FMNAME].string, + sizeof( ch.string[CHAR_FMNAME].string), "\0" ); + ch.data[CHAR_FMINDEX] = -1; + + if( CHAR_makeCharFromOptionAtCreate( &ch, + vital,str,tgh,dex, + earth,water,fire,wind ) == FALSE ) + { + lssproto_CreateNewChar_send( clifd ,FAILED, + "option data is invalid\n"); + CONNECT_setState( clifd, NOTLOGIN ); + return; + } + { + int mp=ch.data[CHAR_MAXMP]; + int str=ch.data[CHAR_STR]; + int tough=ch.data[CHAR_TOUGH]; + + ch.data[CHAR_INITDATA] = 2*100*100*100*100 /*+ hp*100*100*100*/ + + mp*100*100 + str* 100 + tough; + } + + charaindex = CHAR_initCharOneArray( &ch ); + if( charaindex == -1 ) { + lssproto_CreateNewChar_send( clifd ,FAILED, ""); + CONNECT_setState( clifd, NOTLOGIN ); + return; + } + +/*#ifdef _NEW_TESTSERVER //伊甸测试伺服 + { + int petTemp[]={ 2258, 1610, 353, 2474, -1}; //朱雀、 + int petNum=0; + int k=0; + int i=0,j=0; + +#ifdef _75_TEST + if( CHAR_getInt( charaindex, CHAR_LASTTALKELDER) == 1 )//玛丽娜丝 + petTemp[4] = 2;//凯比 + else if( CHAR_getInt( charaindex, CHAR_LASTTALKELDER) == 2 )//加加 + petTemp[4] = 3;//克克尔 + else if( CHAR_getInt( charaindex, CHAR_LASTTALKELDER) == 3 )//卡鲁它那 + petTemp[4] = 4;//威伯 + else + petTemp[4] = 1;//乌力 +#else + j=2; + for( i=0; i< arraysizeof(ridePetTable) ; i++ ){ + if( CHAR_getInt( charaindex, CHAR_BASEBASEIMAGENUMBER) == ridePetTable[i].charNo ){ + petTemp[j]= ridePetTable[i].petId; + j++; + if( j >= arraysizeof( petTemp) ) + break; + } + } +#endif + + j=0; + for( petNum=0; petNum 3 ) BornPet = 3; + if ( BornPet < 0 ) BornPet = 0; + enemyarray = ENEMY_getEnemyArrayFromId( BornPet + 2076); + } + else { + enemyarray = ENEMY_getEnemyArrayFromId( hometown + 1); + } +#else + enemyarray = ENEMY_getEnemyArrayFromId( hometown + 1); +#endif + petindex = ENEMY_createPetFromEnemyIndex( charaindex, enemyarray); + if( !CHAR_CHECKINDEX( petindex )){ + CHAR_endCharOneArray( charaindex); + lssproto_CreateNewChar_send( clifd ,FAILED, ""); + CONNECT_setState( clifd, NOTLOGIN ); + return; + } + CHAR_setMaxExpFromLevel( petindex, 1); + +#endif*/ + +#ifdef _NEW_PLAYER_CF //新手出生配置 + int petTemp[]={ 2258, 1610, 353, 2474, -1}; //朱雀、 + int petNum=0; + int k=0; + int i=0,j=0; + int mylevel,level; + if(getNewplayergivepet(0)==-1){ + if( CHAR_getInt( charaindex, CHAR_LASTTALKELDER) == 1 )//玛丽娜丝 + setNewplayergivepet(0,2); + else if( CHAR_getInt( charaindex, CHAR_LASTTALKELDER) == 2 )//加加 + setNewplayergivepet(0,3); + else if( CHAR_getInt( charaindex, CHAR_LASTTALKELDER) == 3 )//卡鲁它那 + setNewplayergivepet(0,4); + else + setNewplayergivepet(0,1); + } + + for( petNum=0; petNum<5; petNum++) { + if(getNewplayergivepet(petNum)==-1)continue; + enemyarray = ENEMY_getEnemyArrayFromId( getNewplayergivepet(petNum)); //白虎 + petindex = ENEMY_createPetFromEnemyIndex( charaindex, enemyarray); + if( petindex == -1 ) { + continue; + } + add_pet[j]=petindex; + mylevel = CHAR_getInt( petindex, CHAR_LV); + level = getNewplayerpetlv()-mylevel; + if(level<1)level=1; + for( k = 1; k < level; k ++ ){ //升级 + CHAR_PetLevelUp( petindex ); + CHAR_PetAddVariableAi( petindex, AI_FIX_PETLEVELUP ); + CHAR_setInt( petindex, CHAR_LV, CHAR_getInt( petindex, CHAR_LV) +1 ); + } + CHAR_complianceParameter( petindex ); + CHAR_setInt( petindex , CHAR_HP , CHAR_getWorkInt( petindex , CHAR_WORKMAXHP ) ); + } +#endif + +#ifdef _HELP_NEWHAND + CHAR_loginAddItemForNew(charaindex); +#endif + +#if 1 + if( CHAR_makeDBKey( charaindex, szKey, sizeof( szKey ) ) != FALSE ){ + int dp; + char info[512]; + snprintf( info, sizeof( info), + "%d,%d,%d,%d,%d,%d", + CHAR_getInt( charaindex, CHAR_LV), + CHAR_getInt( charaindex, CHAR_DUELBATTLECOUNT), + CHAR_getInt( charaindex, CHAR_DUELWINCOUNT), + CHAR_getInt( charaindex, CHAR_DUELLOSECOUNT), + CHAR_getInt( charaindex, CHAR_DUELSTWINCOUNT), + CHAR_getInt( charaindex, CHAR_DUELMAXSTWINCOUNT)); + dp = CHAR_getInt( charaindex, CHAR_DUELPOINT ); + saacproto_DBUpdateEntryInt_send( + acfd, + DB_DUELPOINT, + szKey, + (max(dp,0)), + info, + CONNECT_getFdid(clifd ),0 ); + } +#endif + chwk = CHAR_getCharPointer( charaindex); +#ifdef _AUTO_ADDADDRESS + { + int playernum = CHAR_getPlayerMaxNum(); + int i, k, oldnum=0, newnum=0; + i = charaindex; + for( k=0 ; k< playernum ; k++ ){ + char token[256]; + if( ++i >= playernum ) i = 0; + if( i < 0 ) i =0; + if( !CHAR_getCharUse(i) ) continue; + if( charaindex == i ) continue; + if( !CHAR_getFlg( i, CHAR_ISTRADECARD) ) continue; + if( oldnum < 3 && CHAR_getInt( i, CHAR_LV) > 100 ){ + if( ADDRESSBOOK_AutoaddAddressBook( charaindex, i) == TRUE ){ + sprintf( token, "新手-%s 加入石器,并与你交换名片。", CHAR_getUseName( charaindex)); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW); + oldnum++; + } + }else if( newnum < 5 && CHAR_getInt( i, CHAR_LV) < 30 ){ + if( ADDRESSBOOK_AutoaddAddressBook( charaindex, i) == TRUE ){ + sprintf( token, "新手-%s 加入石器,并与你交换名片。", CHAR_getUseName( charaindex)); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW); + newnum++; + } + } + if( newnum >= 5 && oldnum >= 3 ) + break; + } + } +#endif + +#ifdef _NEW_PLAYER_CF //新手出生配置 + + CHAR_charSaveFromConnectAndChar( clifd,chwk ,FALSE ); + CHAR_endCharData(&ch); + CHAR_endCharOneArray( charaindex); + { + int k=0; + for( k=0;kcharfunctable[i].string, + sizeof( ch->charfunctable[i]), + tmp[i]); + } +} + +void CHAR_loginAddItem( int charaindex ) +{ +/* + int emptyindex, itemindex, id; + int itemID[10]={ 20128, 20130, 20171, 20176, 20296, + 20287, 20288, 20289, 20290, 20291}; + + { + int trn_num=0; + trn_num=CHAR_getInt(charaindex,CHAR_TRANSMIGRATION); + CHAR_setInt( charaindex, CHAR_MAXPOOLITEMHAVELIMIT, 10 + (trn_num * 4) ) ; + CHAR_setInt( charaindex, CHAR_MAXPOOLPETHAVELIMIT , 5 + (trn_num * 2) ); + } + while( 1){ + emptyindex = CHAR_findEmptyItemBox( charaindex ); + if( emptyindex == -1 ) break; + id = rand()%10; + itemindex = ITEM_makeItemAndRegist( itemID[id] ); + if( !ITEM_CHECKINDEX( itemindex) ) break; + CHAR_setItemIndex( charaindex, emptyindex, itemindex); + ITEM_setWorkInt( itemindex, ITEM_WORKCHARAINDEX, charaindex); + ITEM_setWorkInt( itemindex, ITEM_WORKOBJINDEX, -1); + //andy_log + print("@:%d.", emptyindex); + } + while( 1){ + emptyindex = CHAR_findEmptyPoolItemBox( charaindex ); + if( emptyindex == -1 ) break; + id = rand()%10; + itemindex = ITEM_makeItemAndRegist( itemID[id] ); + if( !ITEM_CHECKINDEX( itemindex) ) break; + + CHAR_setPoolItemIndex( charaindex, emptyindex, itemindex); + ITEM_setWorkInt( itemindex, ITEM_WORKCHARAINDEX, charaindex); + ITEM_setWorkInt( itemindex, ITEM_WORKOBJINDEX, -1); + //andy_log + print("&:%d.", emptyindex); + } +*/ +} + +void CHAR_loginCheckUserItem( int charaindex) +{ + typedef void (*ATTACHFUNC)(int,int); + int i, itemindex; + for( i=0; i 0 ){ + if( (ti = CHAR_findEmptyItemBox( charaindex )) != -1 ){ + CHAR_setItemIndex( charaindex , i, -1); + CHAR_setItemIndex( charaindex , ti, itemindex); + } + continue; + } + } + //////////////////////////////////////////// + + + if( (i == ITEM_getEquipPlace( charaindex, itemindex )) || + i == CHAR_DECORATION1 || i == CHAR_DECORATION2 ){ + char category[256]; + ATTACHFUNC atf; + atf=(ATTACHFUNC)ITEM_getFunctionPointer(itemindex,ITEM_ATTACHFUNC); + if( atf ) atf( charaindex, itemindex ); + if( ITEM_canuseMagic( itemindex)) { + snprintf( category, sizeof( category), "J%d",i); + CHAR_sendStatusString( charaindex, category ); + } + }else{ + if( (ti = CHAR_findEmptyItemBox( charaindex )) == -1 ) continue; + CHAR_setItemIndex( charaindex , i, -1); + CHAR_setItemIndex( charaindex , ti, itemindex); + } + } + for( i = CHAR_STARTITEMARRAY ; i < CHAR_MAXITEMHAVE ; i++ ){ //检查携带道具 + itemindex = CHAR_getItemIndex( charaindex , i ); + if( !ITEM_CHECKINDEX( itemindex)) continue; + ITEM_reChangeItemName( itemindex); +#ifdef _ITEM_PILENUMS + ITEM_reChangeItemToPile( itemindex); +#endif + +#ifdef _ANGEL_SUMMON + if( ITEM_getInt( itemindex, ITEM_ID) == ANGELITEM + || ITEM_getInt( itemindex, ITEM_ID) == HEROITEM ) { + int mindex, mission; + // 检查信物所有人是否任务中 + mindex = checkIfAngelByName( ITEM_getChar( itemindex, ITEM_ANGELINFO)); + mission = atoi( ITEM_getChar( itemindex, ITEM_ANGELMISSION)); + if( mindex < 0 || mission != missiontable[mindex].mission ) { + CHAR_setItemIndex( charaindex, i, -1 ); + ITEM_endExistItemsOne( itemindex); + CHAR_sendItemDataOne( charaindex, i); + continue; + } + } +#endif + + ITEM_setItemUniCode( itemindex); + +#ifdef _DEATH_FAMILY_LOGIN_CHECK // WON ADD 家族战登入检查 + if( ITEM_getInt( itemindex, ITEM_TYPE) == ITEM_WARES || + ITEM_getInt( itemindex, ITEM_TYPE) == ITEM_DISH || + ITEM_getInt( itemindex, ITEM_TYPE) == ITEM_OTHER ){ + CHAR_setItemIndex( charaindex, i, -1 ); + ITEM_endExistItemsOne( itemindex); + CHAR_sendItemDataOne( charaindex, i); + } + +#endif + +#ifdef _DEATH_CONTEND + if( ITEM_getInt( itemindex, ITEM_TYPE) == ITEM_WARES || + ITEM_getInt( itemindex, ITEM_TYPE) == ITEM_DISH || + ITEM_getInt( itemindex, ITEM_TYPE) == ITEM_OTHER ){ + CHAR_setItemIndex( charaindex, i, -1 ); + ITEM_endExistItemsOne( itemindex); + CHAR_sendItemDataOne( charaindex, i); + } +#endif + + } + //检查寄放店道具 + for( i = 0 ; i < CHAR_MAXPOOLITEMHAVE ; i++ ){ + itemindex = CHAR_getPoolItemIndex( charaindex , i ); + if( !ITEM_CHECKINDEX( itemindex) ) continue; + + ITEM_reChangeItemName( itemindex); +#ifdef _ITEM_PILENUMS + ITEM_reChangeItemToPile( itemindex); +#endif + +#ifdef _ANGEL_SUMMON + if( ITEM_getInt( itemindex, ITEM_ID) == ANGELITEM + || ITEM_getInt( itemindex, ITEM_ID) == HEROITEM ) { + int mindex, mission; + // 检查信物所有人是否任务中 + mindex = checkIfAngelByName( ITEM_getChar( itemindex, ITEM_ANGELINFO)); + mission = atoi( ITEM_getChar( itemindex, ITEM_ANGELMISSION)); + if( mindex < 0 || mission != missiontable[mindex].mission ) { + CHAR_setPoolItemIndex( charaindex, i, -1 ); + ITEM_endExistItemsOne( itemindex); + continue; + } + } +#endif + + ITEM_setItemUniCode( itemindex); + +#ifdef _DEATH_FAMILY_LOGIN_CHECK // WON ADD 家族战登入检查 + if( ITEM_getInt( itemindex, ITEM_TYPE) == ITEM_WARES || + ITEM_getInt( itemindex, ITEM_TYPE) == ITEM_DISH || + ITEM_getInt( itemindex, ITEM_TYPE) == ITEM_OTHER ){ + CHAR_setPoolItemIndex( charaindex, i, -1 ); + ITEM_endExistItemsOne( itemindex); + } +#endif + +#ifdef _DEATH_CONTEND + if( ITEM_getInt( itemindex, ITEM_TYPE) == ITEM_WARES || + ITEM_getInt( itemindex, ITEM_TYPE) == ITEM_DISH || + ITEM_getInt( itemindex, ITEM_TYPE) == ITEM_OTHER ){ + CHAR_setPoolItemIndex( charaindex, i, -1 ); + ITEM_endExistItemsOne( itemindex); + } +#endif + } + + // WON ADD 修正道具的设定问题 + if(!NPC_EventCheckFlg( charaindex,134)){ + for (i = 0; i < CHAR_MAXITEMHAVE; i ++) { + itemindex = CHAR_getItemIndex(charaindex, i); + fix_item_bug(charaindex, itemindex); + } + for (i = 0; i < CHAR_MAXPOOLITEMHAVE; i++) { + itemindex = CHAR_getPoolItemIndex(charaindex, i); + fix_item_bug(charaindex, itemindex); + } + NPC_EventSetFlg(charaindex, 134); + } + + Check_P_I_UniCode( charaindex); +} +void CHAR_LoginBesideSetWorkInt( int charaindex, int clifd) +{ + CHAR_setWorkInt( charaindex, CHAR_WORKPARTYMODE, CHAR_PARTY_NONE); + CHAR_setWorkInt( charaindex, CHAR_WORKPARTYINDEX1, -1); + CHAR_setWorkInt( charaindex, CHAR_WORKPARTYINDEX2, -1); + CHAR_setWorkInt( charaindex, CHAR_WORKPARTYINDEX3, -1); + CHAR_setWorkInt( charaindex, CHAR_WORKPARTYINDEX4, -1); + CHAR_setWorkInt( charaindex, CHAR_WORKPARTYINDEX5, -1); + + CHAR_setWorkInt( charaindex, CHAR_WORKTRADEMODE, CHAR_TRADE_FREE); + CHAR_setWorkInt( charaindex, CHAR_WORKFMINDEXI, -1); + CHAR_setWorkInt( charaindex, CHAR_WORKFMCHANNEL, -1); + CHAR_setWorkInt( charaindex, CHAR_WORKFMCHANNELQUICK, -1); + CHAR_setWorkInt( charaindex, CHAR_WORKFMFLOOR, -1); + CHAR_setWorkInt( charaindex, CHAR_WORKFMDP, 0); + CHAR_setWorkInt( charaindex, CHAR_WORKFMPKFLAG, -1); + CHAR_setWorkInt( charaindex, CHAR_WORKFMSETUPFLAG, -1); + CHAR_setWorkInt( charaindex, CHAR_WORKFMMANINDEX, -1); + CHAR_setWorkInt( charaindex, CHAR_WORKFMCHARINDEX, -1); + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEFLAG, -1); + CHAR_setWorkInt( charaindex, CHAR_WORK_PET0_STAT, 0); + CHAR_setWorkInt( charaindex, CHAR_WORK_PET1_STAT, 0); + CHAR_setWorkInt( charaindex, CHAR_WORK_PET2_STAT, 0); + CHAR_setWorkInt( charaindex, CHAR_WORK_PET3_STAT, 0); + CHAR_setWorkInt( charaindex, CHAR_WORK_PET4_STAT, 0); + CHAR_setWorkInt( charaindex, CHAR_WORKACTION, -1); + CHAR_setWorkInt( charaindex, CHAR_WORKEFFECT, -1); + CHAR_setWorkInt( charaindex, CHAR_WORKFD, clifd); + + + if( CHAR_getInt( charaindex, CHAR_SILENT) > 100000000 ) + CHAR_setInt( charaindex, CHAR_SILENT, 0); + CHAR_setWorkInt( charaindex, CHAR_WORKLOGINTIME, (int)NowTime.tv_sec); + CHAR_setWorkInt( charaindex, CHAR_WORKTALKCOUNT, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORKTALKTIME, (int)NowTime.tv_sec); + CHAR_setWorkInt( charaindex, CHAR_WORKPETFOLLOW, -1); +#ifdef _ITEM_ADDEXP //vincent 经验提升 + CHAR_setWorkInt(charaindex,CHAR_WORKITEM_ADDEXP, 0); + CHAR_setWorkInt(charaindex,CHAR_WORKITEM_ADDEXPTIME, 0); +#endif +#ifdef _BULL_FIXPLAYER + if( NPC_EventCheckFlg( charaindex, 131 ) != TRUE ) { + if( CHAR_getInt( charaindex, CHAR_ABULLSCORE) > 100 ) + CHAR_setInt( charaindex, CHAR_ABULLSCORE, 100); + CHAR_setInt( charaindex, CHAR_ABULLTIME, 0); + NPC_EventSetFlg( charaindex, 131); + NPC_NowEndEventSetFlgCls( charaindex, 130); + } +#endif +#ifdef _STATUS_WATERWORD //水世界状态 + if( MAP_getMapFloorType( CHAR_getInt( charaindex, CHAR_FLOOR)) == 1 ){ + CHAR_setWorkInt( charaindex, CHAR_WORKMAPFLOORTYPE, 1); + }else{ + CHAR_setWorkInt( charaindex, CHAR_WORKMAPFLOORTYPE, 0); + } +#endif +#ifdef _NEWOPEN_MAXEXP + if( CHAR_getInt( charaindex, CHAR_OLDEXP) > 0 || CHAR_getInt( charaindex, CHAR_OLDEXP) < 0 ){ + CHAR_ChangeExp( charaindex); + } +#endif +#ifdef _PETSKILL_BECOMEFOX + CHAR_setWorkInt( charaindex, CHAR_WORKFOXROUND, -1 ); +#endif +#ifdef _MAP_TIME + CHAR_setWorkInt(charaindex,CHAR_WORK_MAP_TIME,0); +#endif +#ifdef _PETSKILL_LER + CHAR_setWorkInt(charaindex,CHAR_WORK_RELIFE,0); +#endif + +#ifdef _ITEM_ADDEXP2 + CHAR_setWorkInt( charaindex, CHAR_WORKITEM_ADDEXP, + CHAR_getInt( charaindex, CHAR_ADDEXPPOWER) ); + CHAR_setWorkInt( charaindex, CHAR_WORKITEM_ADDEXPTIME , + CHAR_getInt( charaindex, CHAR_ADDEXPTIME) ); +#endif + +} + +void CHAR_CheckProfessionSkill( int charaindex) +{ + int i, Pclass, skpoint=0, mynum=0; + CHAR_HaveSkill *pSkil; + + if( NPC_EventCheckFlg( charaindex, 155) ) return; + + Pclass = CHAR_getInt( charaindex, PROFESSION_CLASS ); + skpoint = CHAR_getInt( charaindex, PROFESSION_SKILL_POINT); + if( Pclass == PROFESSION_CLASS_NONE )return; + + + for( i=0; iskill, 0, 0 ); + pSkil->use = 0; + break; + case 64: + CHAR_setInt( charaindex, CHAR_MAXMP, 100); + CHAR_setInt( charaindex, PROFESSION_SKILL_POINT, skpoint+1 ); + pSkil = CHAR_getCharHaveSkill( charaindex, i ); + SKILL_makeSkillData( &pSkil->skill, 0, 0 ); + pSkil->use = 0; + break; + case 65: + CHAR_setInt( charaindex, ATTACHPILE, 0); + CHAR_setInt( charaindex, PROFESSION_SKILL_POINT, skpoint+1 ); + pSkil = CHAR_getCharHaveSkill( charaindex, i ); + SKILL_makeSkillData( &pSkil->skill, 0, 0 ); + pSkil->use = 0; + break; + } + } + { + int myskillpoint, myskillnum=0, myskilllevel; + int mysknum=0; + + myskillpoint= CHAR_getInt( charaindex, PROFESSION_SKILL_POINT ); + myskilllevel= CHAR_getInt( charaindex, PROFESSION_LEVEL ); + + for( i=0; i 0 ){ + CHAR_setInt( charaindex, PROFESSION_SKILL_POINT, myskillpoint + mysknum ); + }else if( mysknum < 0 ){ + int defsknum = (myskillpoint + myskillnum)-myskilllevel; + while( 1){ + if( defsknum<= 0 || + (myskillpoint= CHAR_getInt( charaindex, PROFESSION_SKILL_POINT )) <= 0 ) break; + CHAR_setInt( charaindex, PROFESSION_SKILL_POINT, myskillpoint-1); + defsknum--; + } + } + } + + NPC_EventSetFlg( charaindex, 155); +} + +void CHAR_ResetPoolPetEgg( int charaindex) +{ + int levelup, vital, str, tgh, dex; + int raise, petindex, i; + + + if( NPC_EventCheckFlg( charaindex, 157) ) return; + + for( i = 0; i < CHAR_MAXPOOLPETHAVE; i ++ ) { + petindex = CHAR_getCharPoolPet( charaindex, i); + if( !CHAR_CHECKINDEX( petindex) ) continue; + + if( CHAR_getInt( petindex, CHAR_FUSIONBEIT) != 1 || + CHAR_getInt( petindex, CHAR_FUSIONRAISE) <= 0 ) continue; + + raise = CHAR_getInt( petindex, CHAR_FUSIONRAISE); + raise--; + CHAR_setInt( petindex, CHAR_FUSIONTIMELIMIT, (int)time(NULL)+PETFEEDTIME); + if( raise < 1 ) raise = 1; + if( raise >= 40 ) raise = 30; + CHAR_setInt( petindex, CHAR_FUSIONRAISE, raise); + + levelup = CHAR_getInt( petindex, CHAR_ALLOCPOINT); + vital = ((levelup>>24) & 0xFF) + 4; + str = ((levelup>>16) & 0xFF) + 4; + tgh = ((levelup>> 8) & 0xFF) + 4; + dex = ((levelup>> 0) & 0xFF) + 4; + if( vital < 0 ) vital = 0; + if( str < 0 ) str = 0; + if( tgh < 0 ) tgh = 0; + if( dex < 0 ) dex = 0; + //扣属性 + levelup = (vital<<24) + (str<<16) + (tgh<<8) + (dex<<0); + CHAR_setInt( petindex, CHAR_ALLOCPOINT, levelup); + } + NPC_EventSetFlg( charaindex, 157); +} + +// Robin add 重设宠蛋 养时间 +void CHAR_ResetPetEggFusionTime(int charaindex) +{ + int i, petindex; + int nowTime =0; + //int leaveTime =0; + //int lastFeedTime =0; + //int anhour = PETFEEDTIME; + + //if( NPC_EventCheckFlg( charaindex, 157) ) return; + + nowTime = (int)time(NULL); + //leaveTime = CHAR_getInt( charaindex, CHAR_LASTLEAVETIME); + + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ) { + petindex = CHAR_getCharPet( charaindex, i); + if( !CHAR_CHECKINDEX( petindex) ) continue; + + if( CHAR_getInt( petindex, CHAR_FUSIONBEIT) != 1 || + CHAR_getInt( petindex, CHAR_FUSIONRAISE) <= 0 ) continue; + + //lastFeedTime = CHAR_getInt( petindex, CHAR_FUSIONTIMELIMIT); + //if( leaveTime > 0) { + // CHAR_setInt( petindex, CHAR_FUSIONTIMELIMIT, nowTime- (leaveTime-lastFeedTime)); + //} + //else + // CHAR_setInt( petindex, CHAR_FUSIONTIMELIMIT, nowTime); + + CHAR_setInt( petindex, CHAR_FUSIONTIMELIMIT, nowTime); + + } + + //NPC_EventSetFlg( charaindex, 157); + +} + + +BOOL CHAR_CheckProfessionEquit( int toindex) +{ + int i, j, itemindex, newindex; + int FixItem[16]={ + 2028,2029,2030,2031,2032,2033,2034,2035, + 2036,2037,2038,2039,2040,2041,2042,2043 + }; + CHAR_HaveSkill *pSkil; + + if(!NPC_EventCheckFlg( toindex, 149)){ + for (i = 0; i < CHAR_MAXITEMHAVE; i ++) { + itemindex = CHAR_getItemIndex( toindex, i); + if( !ITEM_CHECKINDEX( itemindex)) continue; + + for( j=0; j<16; j++){ + if( ITEM_getInt( itemindex, ITEM_ID) == FixItem[j] ){ + CHAR_setItemIndex( toindex, i, -1 ); + ITEM_endExistItemsOne( itemindex); + newindex = ITEM_makeItemAndRegist( FixItem[j]); + if( !ITEM_CHECKINDEX( newindex) ) break; + CHAR_setItemIndex( toindex , i, newindex); + ITEM_setWorkInt( itemindex, ITEM_WORKCHARAINDEX, toindex); + ITEM_setWorkInt( itemindex, ITEM_WORKOBJINDEX, -1); + + CHAR_sendItemDataOne( toindex, i); + + } + } + } + + for (i = 0; i < CHAR_MAXPOOLITEMHAVE; i++){ + int itemindex = CHAR_getPoolItemIndex(toindex, i); + if( !ITEM_CHECKINDEX( itemindex)) continue; + for( j=0; j<16; j++){ + if( ITEM_getInt( itemindex, ITEM_ID) == FixItem[j] ){ + CHAR_setPoolItemIndex( toindex, i, -1); + ITEM_endExistItemsOne( itemindex); + + newindex = ITEM_makeItemAndRegist( FixItem[j]); + if( !ITEM_CHECKINDEX( newindex) ) break; + CHAR_setPoolItemIndex( toindex , i, newindex); + ITEM_setWorkInt( itemindex, ITEM_WORKCHARAINDEX, toindex); + ITEM_setWorkInt( itemindex, ITEM_WORKOBJINDEX, -1); + + } + } + } + + NPC_EventSetFlg( toindex, 149); + } + + + if( NPC_EventCheckFlg( toindex, 156) ) return TRUE; + + // WON ADD + for( i=0; i 0 ) continue; + + pSkil = CHAR_getCharHaveSkill( toindex, i ); + SKILL_makeSkillData( &pSkil->skill, 0, 0 ); + pSkil->use = 0; + } + { + int myskillpoint= CHAR_getInt( toindex, PROFESSION_SKILL_POINT ); + int myskilllevel= CHAR_getInt( toindex, PROFESSION_LEVEL ); + int myskillnum = 0, mysknum = 0; + + for( i=0; i 0 ){ + CHAR_setInt( toindex, PROFESSION_SKILL_POINT, myskillpoint + mysknum ); + } + } + + { + Skill work1[PROFESSION_MAX_LEVEL]; + int cnt=0; + for( i=0; iuse = 0; + if( work1[i].data[SKILL_IDENTITY] == -1 ) continue; + SKILL_makeSkillData( &pSkil->skill, work1[i].data[SKILL_IDENTITY], work1[i].data[SKILL_LEVEL] ); + pSkil->use = 1; + } + } + + NPC_EventSetFlg( toindex, 156); + + return TRUE; +} + +static void CHAR_setLuck( int charaindex); + +#ifdef _CHANNEL_MODIFY +extern int *piOccChannelMember; +#endif + +#ifdef _BAD_PLAYER // WON ADD 送坏玩家去关 +void CHAR_login( int clifd, char* data, int saveindex, int badplayer ) +#else +void CHAR_login( int clifd, char* data, int saveindex ) +#endif +{ + int charaindex,objindex; + Char ch; + int per; +DebugPoint=50; +// char c_temp2[4096]; + if( CHAR_makeCharFromStringToArg( data , &ch ) == FALSE ){ + fprint ("make char error\n"); + goto MAKECHARDATAERROR; + } +DebugPoint=70; + CHAR_setCharFuncTable( &ch); +DebugPoint=71; + charaindex = CHAR_initCharOneArray( &ch ); +DebugPoint=72; + if( charaindex == -1 ){ + fprint ("make char error\n"); + CHAR_endCharData(&ch); + goto MAKECHARDATAERROR; + } +DebugPoint=80; +#ifdef _NEWSAVE + CHAR_setInt( charaindex, CHAR_SAVEINDEXNUMBER, saveindex); + print("存档装载索引:%d\n", CHAR_getInt( charaindex, CHAR_SAVEINDEXNUMBER) ); +#endif + if( CHAR_getFlg( charaindex, CHAR_ISDIE)){ + print( "?data? ISDIE flg is standing.\n"); + CHAR_setFlg( charaindex, CHAR_ISDIE, FALSE); + } +#ifdef _75_TEST + { + int event_end[] = { 4, 32, 33, 34, 81, 86, 87, 105, 83}; + int i; + for( i=0; i < arraysizeof(event_end); i++) { + NPC_EventSetFlg( charaindex, event_end[i]); + } + } +#endif +#ifndef _FIX_UNNECESSARY + // Arminius 7.9 airplane logout + if( CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE) == CHAR_PARTY_CLIENT ) { + int oyaindex = CHAR_getWorkInt( charaindex, CHAR_WORKPARTYINDEX1); + if( CHAR_CHECKINDEX( oyaindex)) { + if (CHAR_getInt( oyaindex, CHAR_WHICHTYPE ) == CHAR_TYPEBUS) { + if ((CHAR_getInt( oyaindex, CHAR_BASEIMAGENUMBER) !=100355) && + (CHAR_getInt( oyaindex, CHAR_BASEIMAGENUMBER) !=100461)) { + + if(CHAR_getWorkInt(oyaindex,CHAR_NPCWORKINT5)==1) { + if( CHAR_getInt( charaindex, CHAR_LASTTALKELDER)>=0){ + int fl,x,y; + CHAR_getElderPosition( CHAR_getInt( charaindex, CHAR_LASTTALKELDER), + &fl, &x, &y ); + CHAR_setInt(charaindex,CHAR_FLOOR,fl); + CHAR_setInt(charaindex,CHAR_X,x); + CHAR_setInt(charaindex,CHAR_Y,y); + } + } + } + } + } + } +#endif +// Nuke 20040420: CHECK MAX POINT +#if 1 + { + int lv,vi,str,tou,dx,skup,trn,teq,quest,level,total,max; + float table[]={437,490,521,550,578,620}; //各转最高点数(减10) + //float table[]={620,660,700,740,780,820}; //各转最高点数(减10) + lv = CHAR_getInt(charaindex,CHAR_LV); + vi = CHAR_getInt(charaindex,CHAR_VITAL); + str = CHAR_getInt(charaindex,CHAR_STR); + tou = CHAR_getInt(charaindex,CHAR_TOUGH); + dx = CHAR_getInt(charaindex,CHAR_DEX); + trn = CHAR_getInt(charaindex,CHAR_TRANSMIGRATION); + teq = CHAR_getInt(charaindex,CHAR_TRANSEQUATION); + skup = CHAR_getInt(charaindex,CHAR_SKILLUPPOINT); + quest=(teq >> 16)& 0xFFFF; + level=teq & 0xFFFF; + total=(vi+str+tou+dx)/100+skup; + max=(trn==0)?(lv-1)*3+20+10: // 0转447 + (lv-1)*3+table[trn-1]/12.0+quest/4.0+(level-trn*85)/4.0+10+1+10+trn*10; + + +/* 1转以上=升级点数+继承点术+历史任务+历史等级+转前祝福+误差1点+转後祝福+转生红利 */ + if (trn==6) max=max-20; /* 六转时没有转前祝福与转後祝福 */ + if (total>max) + { + print("\n重调点数[%s:%s]:%d->%d ", + CHAR_getChar(charaindex,CHAR_CDKEY), + CHAR_getChar(charaindex,CHAR_NAME), + total,max); + CHAR_setInt(charaindex,CHAR_VITAL,1000); + CHAR_setInt(charaindex,CHAR_STR,0); + CHAR_setInt(charaindex,CHAR_TOUGH,0); + CHAR_setInt(charaindex,CHAR_DEX,0); + CHAR_setInt(charaindex,CHAR_SKILLUPPOINT,max-10); + } + // 补足六转点数不足之玩家 + if ((trn==6) && (total < max)) + { + print("\n补足点数[%s:%s]:%d->%d ", + CHAR_getChar(charaindex,CHAR_CDKEY), + CHAR_getChar(charaindex,CHAR_NAME), + total,max); + CHAR_setInt(charaindex,CHAR_SKILLUPPOINT, + CHAR_getInt(charaindex,CHAR_SKILLUPPOINT)+(max-total)); + } + } +#endif + { + int EQ_BBI=-1, EQ_ARM=-1, EQ_NUM=-1, EQ_BI=-1; + int CH_BI = CHAR_getInt( charaindex, CHAR_BASEIMAGENUMBER); + + EQ_BBI = CHAR_getInt( charaindex, CHAR_BASEBASEIMAGENUMBER); + EQ_ARM = CHAR_getItemIndex(charaindex,CHAR_ARM); + EQ_NUM=ITEM_FIST; + if ( ITEM_CHECKINDEX( EQ_ARM)) { + EQ_NUM=ITEM_getInt(EQ_ARM,ITEM_TYPE); + } + + EQ_BI=CHAR_getNewImagenumberFromEquip( EQ_BBI, EQ_NUM); + + if( CHAR_getInt( charaindex, CHAR_RIDEPET) != -1 ) { //骑宠 + + }else { //非骑宠 + if( EQ_BI != CH_BI ) { + print("\n 非骑宠形象 %d [%d=>%d]", charaindex, + CHAR_getInt( charaindex, CHAR_BASEIMAGENUMBER), + EQ_BI ); + CHAR_setInt( charaindex, CHAR_BASEIMAGENUMBER, EQ_BI); + } + } + } + { + int x,y; + if( CHAR_isAppearPosition( CHAR_getInt( charaindex, CHAR_FLOOR),&x, &y )) { + int flelder, xelder, yelder; + CHAR_getElderPosition(CHAR_getInt(charaindex, CHAR_LASTTALKELDER), + &flelder, &xelder, &yelder); + CHAR_setInt(charaindex, CHAR_FLOOR, flelder); + CHAR_setInt(charaindex, CHAR_X, xelder); + CHAR_setInt(charaindex, CHAR_Y, yelder); + } + } + +#ifdef _FIX_GAMBLENUM + { + if( CHAR_getInt(charaindex, CHAR_GAMBLENUM) < 0){ + CHAR_setInt(charaindex, CHAR_GAMBLENUM, 0); + } + } +#endif + +#ifdef _DEATH_CONTEND + { + char cdkey[CDKEYLEN]; + memset( cdkey, 0, sizeof(cdkey)); + CONNECT_getCdkey( clifd, cdkey, sizeof( cdkey )); + if( strlen(cdkey) > 0 ) { + if( strcmp( cdkey, CHAR_getChar( charaindex, CHAR_CDKEY) ) ){ + print("账号错误 %s->%s\n", CHAR_getChar( charaindex, CHAR_CDKEY), cdkey); + CHAR_setChar( charaindex, CHAR_CDKEY, cdkey); + } + }else{ + print("账号错误:%d\n", clifd); + } + } + CHAR_setInt( charaindex, CHAR_PKLISTTEAMNUM, -1); + CHAR_setInt( charaindex, CHAR_PKLISTLEADER, -1); + //CHAR_setInt( charaindex, CHAR_GOLD, 1000000); + PKLIST_InsertTeamNum( charaindex); + if( CHAR_getInt( charaindex, CHAR_PKLISTTEAMNUM ) < 0 || + CHAR_getInt( charaindex, CHAR_PKLISTLEADER ) < 0 ){ + PKLIST_InsertTeamNum( charaindex); + } +#endif + +#ifdef _MAP_NOEXIT + { + int exfloor=-1,ex_X=-1,ex_Y=-1; + int map_type=0; + unsigned int point; + point = MAP_getExFloor_XY( CHAR_getInt(charaindex, CHAR_FLOOR) , &map_type); + if( point > 0 ) { + if( CHAR_getInt( charaindex, CHAR_LASTTALKELDER) >= 0 ) { + CHAR_getElderPosition(CHAR_getInt(charaindex, CHAR_LASTTALKELDER), + &exfloor, &ex_X, &ex_Y); + } + if( map_type >= 0 ) { // map_type >= 0 优先回纪录点 + if( exfloor == map_type && exfloor >= 0 ) {//回纪录点 + }else { + exfloor = (point>>16)&0xffffff; + ex_X = (point>>8)&0xff; + ex_Y = (point>>0)&0xff; + } + } + if( CHECKFLOORID( exfloor) ) { //检查房间号 + CHAR_setInt(charaindex, CHAR_FLOOR, exfloor); + CHAR_setInt(charaindex, CHAR_X, ex_X); + CHAR_setInt(charaindex, CHAR_Y, ex_Y); + } + } + +#ifdef _BAD_PLAYER // WON ADD 送坏玩家去关 + + NPC_NowEndEventSetFlgCls( charaindex, 135); // 旗标 + if( badplayer ){ + NPC_EventSetFlg(charaindex, 135); // 旗标 + CHAR_setInt(charaindex, CHAR_FLOOR, 887); + CHAR_setInt(charaindex, CHAR_X, 56); + CHAR_setInt(charaindex, CHAR_Y, 14); + + }else if( CHAR_getInt(charaindex, CHAR_FLOOR) == 887 ){ // 如果在888,回记录点 + CHAR_getElderPosition(CHAR_getInt(charaindex, CHAR_LASTTALKELDER), &exfloor, &ex_X, &ex_Y); + CHAR_setInt(charaindex, CHAR_FLOOR, exfloor); + CHAR_setInt(charaindex, CHAR_X, ex_X); + CHAR_setInt(charaindex, CHAR_Y, ex_Y); + + } +#endif +#ifdef _DEATH_FAMILY_LOGIN_CHECK + CHAR_setInt( charaindex, CHAR_FLOOR, 130); + CHAR_setInt( charaindex, CHAR_X, 56); + CHAR_setInt( charaindex, CHAR_Y, 12); +#endif + +#ifdef _NEW_INSERVERPOINT + CHAR_setInt( charaindex, CHAR_FLOOR, 8250); + CHAR_setInt( charaindex, CHAR_X, 15); + CHAR_setInt( charaindex, CHAR_Y, 15); +#endif + } +#endif + if( CHAR_getInt(charaindex,CHAR_X) < 0 || CHAR_getInt(charaindex,CHAR_Y) < 0 ){ + CHAR_setInt(charaindex,CHAR_X,1); + CHAR_setInt(charaindex,CHAR_Y,1); + } +#ifdef _MAP_TIME + // 如果登入的地图是这些编号的话,回到入口 + if(CHAR_getInt(charaindex,CHAR_FLOOR) >= 30017 && CHAR_getInt(charaindex, CHAR_FLOOR) <= 30021){ + CHAR_setInt(charaindex,CHAR_FLOOR,30008); + CHAR_setInt(charaindex,CHAR_X,39); + CHAR_setInt(charaindex,CHAR_Y,38); + } +#endif + + objindex = initObjectFromObjectMember(OBJTYPE_CHARA,charaindex, + CHAR_getInt(charaindex,CHAR_X), + CHAR_getInt(charaindex,CHAR_Y), + CHAR_getInt(charaindex,CHAR_FLOOR)); + if( objindex == -1 ){ + fprint ("init obj error\n"); + goto DELETECHARDATA; + } + + CHAR_setWorkInt( charaindex,CHAR_WORKOBJINDEX,objindex ); + CONNECT_setState( clifd, LOGIN ); + CONNECT_setCharaindex( clifd, charaindex ); + CHAR_LoginBesideSetWorkInt( charaindex, clifd); + +#ifdef _CHANGEGOATMETAMO // (不可开) Syu 羊年兽更换新图 + if( NPC_EventCheckFlg( charaindex, 141 ) != TRUE ) { + int z; + int PETID1; + int PETBASE1; + for ( z = 0 ; z < CHAR_MAXPETHAVE; z ++ ) { + int petindex = CHAR_getCharPet(charaindex,z); + if( CHAR_CHECKINDEX( petindex) ) { + PETID1 = CHAR_getInt( petindex, CHAR_PETID); + PETBASE1 = CHAR_getInt( petindex , CHAR_BASEBASEIMAGENUMBER ); + if ( PETID1 == 1056 && PETBASE1 == 101497 ) + CHAR_setInt( petindex , CHAR_BASEBASEIMAGENUMBER , 101607 ) ; + if ( PETID1 == 1057 && PETBASE1 == 101498 ) + CHAR_setInt( petindex , CHAR_BASEBASEIMAGENUMBER , 101608 ) ; + if ( PETID1 == 1058 && PETBASE1 == 101499 ) + CHAR_setInt( petindex , CHAR_BASEBASEIMAGENUMBER , 101609 ) ; + if ( PETID1 == 1059 && PETBASE1 == 101500 ) + CHAR_setInt( petindex , CHAR_BASEBASEIMAGENUMBER , 101610 ) ; + } + } + for ( z = 0 ; z < CHAR_MAXPOOLPETHAVE; z ++ ) { + int petindex = CHAR_getCharPoolPet(charaindex,z); + if( CHAR_CHECKINDEX( petindex) ) { + PETID1 = CHAR_getInt( petindex, CHAR_PETID); + PETBASE1 = CHAR_getInt( petindex , CHAR_BASEBASEIMAGENUMBER ); + if ( PETID1 == 1056 && PETBASE1 == 101497 ) + CHAR_setInt( petindex , CHAR_BASEBASEIMAGENUMBER , 101607 ) ; + if ( PETID1 == 1057 && PETBASE1 == 101498 ) + CHAR_setInt( petindex , CHAR_BASEBASEIMAGENUMBER , 101608 ) ; + if ( PETID1 == 1058 && PETBASE1 == 101499 ) + CHAR_setInt( petindex , CHAR_BASEBASEIMAGENUMBER , 101609 ) ; + if ( PETID1 == 1059 && PETBASE1 == 101500 ) + CHAR_setInt( petindex , CHAR_BASEBASEIMAGENUMBER , 101610 ) ; + } + } + } + NPC_EventSetFlg( charaindex, 141); +#endif + + CHAR_complianceParameter( charaindex ); + //检查人物身上 + { + int i; +// char *petstring; + int ID1; + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ) { + int petindex = CHAR_getCharPet(charaindex,i); + if( CHAR_CHECKINDEX( petindex) ) { + +#ifdef _CHECK_ENEMY_PET + { + int j; + for( j=0;j 0 || CHAR_getInt( charaindex, CHAR_OLDEXP) < 0 ){ + CHAR_ChangeExp( petindex); + } +#endif + ID1=CHAR_getInt( petindex, CHAR_PETID); +// petstring = CHAR_makePetStringFromPetIndex( petindex); +#ifdef _REEDIT_PETBBIS + if( ID1 == 1133 ){ + CHAR_setInt( petindex, CHAR_BASEIMAGENUMBER, 101578); + CHAR_setInt( petindex, CHAR_BASEBASEIMAGENUMBER, 101578); + print("PET:%s fix BBI\n", CHAR_getUseName(petindex)); + } +#endif + // WON ADD 修正白虎七技 + if( ID1 == 777 )CHAR_setInt( petindex, CHAR_SLOT, 7); + CHAR_setWorkInt( petindex, CHAR_WORKPLAYERINDEX, charaindex); + // 修正宠技最大值变-1 Robin 20040803 + if( CHAR_getInt( petindex, CHAR_SLOT) < 0 ) { + int j; + for( j=0; j= 0) + CHAR_setInt( petindex, CHAR_SLOT, j+1); + } + //print(" 宠技MAX变-1改6 "); + } + + CHAR_complianceParameter( petindex ); +#ifdef _FIX_GP_PET_SKILL // WON ADD 修正gp宠会落马术 + if( ID1 == 1133){ + int j; + for( j=0; j 0 || + CHAR_getInt( charaindex, CHAR_OLDEXP) < 0 ){ + CHAR_ChangeExp( petindex); + } +#endif + b_find=FALSE; + ID1=CHAR_getInt( petindex, CHAR_PETID); +#ifdef _REEDIT_PETBBIS + if( ID1 == 1133 ){ + CHAR_setInt( petindex, CHAR_BASEIMAGENUMBER, 101578); + CHAR_setInt( petindex, CHAR_BASEBASEIMAGENUMBER, 101578); + } +#endif +/* + tran_no=CHAR_getInt( charaindex, CHAR_TRANSMIGRATION); + petstring = CHAR_makePetStringFromPetIndex( petindex); + c_ptr_index=strstr(petstring,"name:"); + getStringFromIndexWithDelim(c_ptr_index,":",2,c_temp,sizeof(c_temp)); + c_ptr_index=c_temp; + getStringFromIndexWithDelim(c_ptr_index,"|",1,c_temp1,sizeof(c_temp1)); + + if(b_find){//ttom + CHAR_setCharPoolPet( charaindex, i, -1); + print("\nKill pool pet ID=%d name=%s",ID1,c_temp1); + sprintf(c_temp2,"Kill pool pet ID=%d name=%s",ID1,c_temp1); + LogKill(CHAR_getChar( charaindex, CHAR_NAME ), + CHAR_getChar( charaindex, CHAR_CDKEY ), + c_temp2); + }else{//ttom +*/ + CHAR_setWorkInt( petindex, CHAR_WORKPLAYERINDEX, charaindex); + CHAR_complianceParameter( petindex ); +// }//ttom + } + } + } + +// CHAR_ResetPoolPetEgg( charaindex); +// CHAR_CheckProfessionEquit( charaindex); + CHAR_CheckProfessionSkill( charaindex); + { + int i=0; + int skidx[]={2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,3,3,3,3,3,3,3}; + //20040702 Change fix + //检查是否有职业不该有的技能并删除 + for( i = CHAR_SKILLMAXHAVE-1; i >= 0; i -- ){ + CHAR_HaveSkill *pSkil; + Skill* skill; + + pSkil = CHAR_getCharHaveSkill( charaindex, i ); + skill = &pSkil->skill; + if( pSkil == NULL )continue; + if( pSkil->use == 0 )continue; + if( skidx[skill->data[SKILL_IDENTITY]] != CHAR_getInt( charaindex, PROFESSION_CLASS ) + && skidx[skill->data[SKILL_IDENTITY]] != 4 ){//共通技不删 + SKILL_makeSkillData( &pSkil->skill, 0, 0 ); + pSkil->use = 0; + } + } + } +#ifdef _LOGIN_ADDITEM + CHAR_loginAddItem( charaindex); +#endif + CHAR_loginCheckUserItem( charaindex); +#ifdef _FIX_TSKILLCAN + CHAR_PETSKILLCAN( charaindex); +#endif + CHAR_complianceParameter( charaindex ); + + // Robin add 重设宠蛋 养时间 + CHAR_ResetPetEggFusionTime( charaindex); + +#ifdef _PROFESSION_FIX_LEVEL // WON ADD 修正职业经验值 + { + int i=0; + for( i = 0 ; i < CHAR_SKILLMAXHAVE ; i ++ ){ + CHAR_HaveSkill* hskill; + + hskill = CHAR_getCharHaveSkill( charaindex, i ); + + if( hskill != NULL && hskill->use == TRUE ){ + int skill_level = SKILL_getInt( &hskill->skill, SKILL_LEVEL); + if( skill_level < 10 ){ + SKILL_setInt( &hskill->skill, SKILL_LEVEL, 10* 100 ); + } + } + } + } +#endif + +#ifdef _CHANNEL_MODIFY + if(CHAR_getInt(charaindex,PROFESSION_CLASS) > 0){ + int i,pclass = CHAR_getInt(charaindex,PROFESSION_CLASS) - 1,Empty = -1; + // 若旧的职业频道记录有记录在就留着,若没有加入频道 + for(i=0;i MAX_PERSONAL_MOMENTUM) CHAR_setInt(charaindex,CHAR_MOMENTUM,MAX_PERSONAL_MOMENTUM); +#endif + +#ifdef _PETSKILL_BECOMEPIG + if( CHAR_getInt( charaindex, CHAR_BECOMEPIG) > -1 ){ + CHAR_setInt( charaindex, CHAR_BASEIMAGENUMBER, CHAR_getInt( charaindex, CHAR_BECOMEPIG_BBI ) ); + } + //change fix 处理负很大的乌力时间 + else{ + CHAR_setInt( charaindex, CHAR_BECOMEPIG, -1 ); + } +#endif + + + lssproto_CharLogin_send( clifd, SUCCESSFUL,"" ); + per = ENCOUNT_getEncountPercentMin( charaindex, + CHAR_getInt( charaindex, CHAR_FLOOR), + CHAR_getInt( charaindex, CHAR_X), + CHAR_getInt( charaindex, CHAR_Y)); + if( per != -1) { + CHAR_setWorkInt( charaindex, CHAR_WORKENCOUNTPROBABILITY_MIN, per); + } + per = ENCOUNT_getEncountPercentMax( charaindex, + CHAR_getInt( charaindex, CHAR_FLOOR), + CHAR_getInt( charaindex, CHAR_X), + CHAR_getInt( charaindex, CHAR_Y)); + if( per != -1) { + CHAR_setWorkInt( charaindex, CHAR_WORKENCOUNTPROBABILITY_MAX, per); + } + + CHAR_setLuck( charaindex); + { + int i; + char* statuscat[]={"C","P","I","S","D","E","F"}; + for( i=0 ; i=1 ) + CHAR_Skillupsend(charaindex); + CHAR_checkEffect( charaindex); + +#ifdef _DEATH_FAMILY_LOGIN_CHECK // WON ADD 家族战登入检查 +// if( NPC_EventCheckFlg( charaindex, 150 ) != TRUE ) { + { + char *char_id, *char_name; + // 清除家族旗标 + SetFMVarInit(charaindex); + char_id = CHAR_getChar( charaindex, CHAR_CDKEY ); + char_name = CHAR_getChar( charaindex, CHAR_NAME ); + saacproto_new_ACFM_Login_send(acfd, charaindex, char_id, char_name ); + } +// NPC_EventSetFlg( charaindex, 150); +// } +#else + + // CoolFish: Family 2001/5/30 + if ((CHAR_getChar(charaindex, CHAR_FMNAME)!=NULL) && + (CHAR_getInt(charaindex, CHAR_FMINDEX) >= 0) && + (strcmp(CHAR_getChar(charaindex, CHAR_FMNAME), "") != 0)) + { +#ifdef _FMVER21 + int eventflag = 0; + // 是否符合族长得资格 + if (CheckLeaderQ(charaindex) >= 0) + eventflag = 1; + if (CHAR_getInt(charaindex, CHAR_FMLEADERFLAG) != FMMEMBER_LEADER) + SetFMPetVarInit(charaindex); + saacproto_ACFMCharLogin_send( + acfd, + CHAR_getChar(charaindex, CHAR_FMNAME), + CHAR_getInt(charaindex, CHAR_FMINDEX), + CHAR_getChar(charaindex, CHAR_NAME), + CHAR_getChar(charaindex, CHAR_CDKEY), + CHAR_getInt(charaindex, CHAR_LV), eventflag, + CONNECT_getFdid(clifd) +#ifdef _FM_MODIFY + ,getServernumber() +#endif + ); +#endif + } +#ifdef _FMVER21 + else + SetFMVarInit(charaindex); +#endif + +#endif + + AnnounceToPlayerWN( clifd ); + +#ifdef _ANGEL_SUMMON + { + int mindex; + mindex = checkIfOnlyAngel( charaindex); + if( mindex != -1 ) { + if( missiontable[mindex].flag == MISSION_WAIT_ANSWER ) { + lssproto_WN_send( clifd, WINDOW_MESSAGETYPE_ANGELMESSAGE, + WINDOW_BUTTONTYPE_YESNO, + CHAR_WINDOWTYPE_ANGEL_ASK, + -1, + "目前魔族肆虐,精灵们需要你的帮忙,前往寻找勇者来消灭这些魔族,你是否愿意帮忙?" ); + } + } + } +#endif + + print("\n登陆人物名称:%s ", CHAR_getChar(charaindex, CHAR_NAME ) ); + + { + unsigned long ip; + char ipstr[512]; + + ip=CONNECT_get_userip(clifd); + sprintf(ipstr,"%d.%d.%d.%d", + ((unsigned char *)&ip)[0], + ((unsigned char *)&ip)[1], + ((unsigned char *)&ip)[2], + ((unsigned char *)&ip)[3]); + + LogLogin( + CHAR_getChar( charaindex, CHAR_CDKEY), + CHAR_getChar( charaindex, CHAR_NAME), + saveindex, ipstr + ); + } + +#ifdef _TEACHER_SYSTEM + // 学生上线通知导师 + if(strlen(CHAR_getChar(charaindex,CHAR_TEACHER_ID)) > 0 && strlen(CHAR_getChar(charaindex,CHAR_TEACHER_NAME)) > 0){ + int iPlayernum = CHAR_getPlayerMaxNum(),i; + char szMsg[128]; + + for(i=0;i 0 && + strlen(CHAR_getChar(charaindex,CHAR_LOVERID))>0 && + strlen(CHAR_getChar(charaindex,CHAR_LOVERNAME))>0){ + int iPlayernum = CHAR_getPlayerMaxNum(),i; + char szMsg[128]; + for(i=0;idata[CHAR_SAVEINDEXNUMBER]); + saacproto_ACCharSave_send( acfd, cdkey, + ch->string[CHAR_NAME].string, + CHAR_makeOptionString( ch ), chardata, + unlock, CONNECT_getFdid(fd), ch->data[CHAR_SAVEINDEXNUMBER] ); +#else + saacproto_ACCharSave_send( acfd, cdkey, + ch->string[CHAR_NAME].string, + CHAR_makeOptionString( ch ), chardata, + unlock, CONNECT_getFdid(fd) ); +#endif + return TRUE; +} + +BOOL CHAR_charSaveFromConnect( int fd , BOOL unlock) +{ + Char* ch; + int charaindex = CONNECT_getCharaindex(fd); + if( CHAR_CHECKINDEX( charaindex ) == FALSE)return FALSE; + ch = CHAR_getCharPointer( charaindex ); + if( !ch )return FALSE; +#ifdef _CHAR_POOLITEM + if( CHAR_SaveDepotItem( charaindex) == TRUE ){ + print("saveDepotItem:%d \n", charaindex); + } +#endif +#ifdef _CHAR_POOLPET + if( CHAR_SaveDepotPet( charaindex) == TRUE ){ + print("saveDepotPet:%d \n", charaindex); + } +#endif + + return CHAR_charSaveFromConnectAndChar( fd, ch, unlock ); +} + + +/*------------------------------------------------------------ + * 夫弘失它玄允月凛卞 匀凶引引夫弘失它玄匹五卅中失奶 丞毛 + * 允 + * 娄醒 + * charaindex int 平乓仿弁正□及奶件犯永弁旦 + * 忒曰袄 + * 卅仄 + ------------------------------------------------------------*/ +static void CHAR_dropItemAtLogout( int charaindex ) +{ + int i; + for( i=0 ; i= 0 ){ + BATTLE_EscapeDpSend( battleindex, charindex ); + CHAR_setInt( charindex, CHAR_DUELPOINT, + CHAR_getInt( charindex, CHAR_DUELPOINT ) + + CHAR_getWorkInt( charindex, CHAR_WORKGETEXP ) ); + BATTLE_Exit( charindex, battleindex ); + } + + CHAR_dropItemAtLogout( charindex ); + CHAR_DischargeParty( charindex, 0); + if(CHAR_getChar(charindex, CHAR_FMNAME) != NULL ) { + if(strlen(CHAR_getChar(charindex, CHAR_FMNAME)) > 0 && + strlen(CHAR_getChar(charindex, CHAR_FMNAME)) < sizeof( STRING32) ) + if( (CHAR_getInt(charindex, CHAR_FMINDEX) >= 0) && + (strcmp(CHAR_getChar(charindex, CHAR_FMNAME), "") != 0) ) { + saacproto_ACFMCharLogout_send(acfd, + CHAR_getChar(charindex, CHAR_FMNAME), + CHAR_getInt(charindex, CHAR_FMINDEX), + CHAR_getChar(charindex, CHAR_NAME), + CHAR_getChar(charindex, CHAR_CDKEY), + CHAR_getInt(charindex, CHAR_LV), + CHAR_getWorkInt(charindex, CHAR_WORKFMINDEXI), + CONNECT_getFdid(clifd)); + } + } + +#ifdef _CHATROOMPROTOCOL // (不可开) Syu ADD 聊天室频道 + if ( CHAR_getWorkInt ( charindex , CHAR_WORKCHATROOMTYPE ) != 0 ) { + ChatRoom_Leave ( charindex ) ; + } +#endif +#ifdef _STREET_VENDOR + // 若玩家是卖方且正在交易中 + if(CHAR_getWorkInt(charindex,CHAR_WORKSTREETVENDOR) == 2){ + // 取出和他交易的人 + toindex = CHAR_getWorkInt(charindex,CHAR_WORKSTREETVENDOR_WHO); + if(toindex > -1 && CHAR_CHECKINDEX(toindex)){ + CHAR_setWorkInt(toindex,CHAR_WORKSTREETVENDOR_WHO,-1); + CHAR_setWorkInt(toindex,CHAR_WORKSTREETVENDOR,-1); + lssproto_STREET_VENDOR_send(getfdFromCharaIndex(toindex),"C|"); + CHAR_talkToCli(toindex,-1,"店家取消交易",CHAR_COLORYELLOW); + } + } + // 玩家是买方 + else if(CHAR_getWorkInt(charindex,CHAR_WORKSTREETVENDOR) == 3){ + // 取出卖方 + toindex = CHAR_getWorkInt(charindex,CHAR_WORKSTREETVENDOR_WHO); + if(toindex > -1 && CHAR_CHECKINDEX(toindex)){ + CHAR_setWorkInt(toindex,CHAR_WORKSTREETVENDOR_WHO,-1); + CHAR_setWorkInt(toindex,CHAR_WORKSTREETVENDOR,1); + } + } +#endif + + // Robin 0606 channel + fmindexi = CHAR_getWorkInt(charindex, CHAR_WORKFMINDEXI); + channel = CHAR_getWorkInt(charindex, CHAR_WORKFMCHANNEL); + i = 0; + if( (fmindexi > 0) && (channel >= 0) && (fmindexi < FAMILY_MAXNUM) && (channel < FAMILY_MAXCHANNEL)) { + while( i < FAMILY_MAXMEMBER ) { + if( channelMember[fmindexi][channel][i] == charindex ) { + channelMember[fmindexi][channel][i] = -1; + break; + } + i++; + } + } +#ifdef _CHANNEL_MODIFY + if(CHAR_getInt(charindex,PROFESSION_CLASS) > 0){ + int i,pclass = CHAR_getInt(charindex,PROFESSION_CLASS) - 1; + for(i=0;i 0) && (fmindexi < FAMILY_MAXNUM)){ + if( familyMemberIndex[fmindexi][i] == charindex ) + familyMemberIndex[fmindexi][i] = -1; + } + } + // Robin 0629 silent + if( CHAR_getInt( charindex, CHAR_SILENT) > 0 ){ + int silent_t, login_t; + login_t = CHAR_getWorkInt(charindex, CHAR_WORKLOGINTIME); + silent_t = CHAR_getInt( charindex, CHAR_SILENT); + silent_t = silent_t - ( (int)NowTime.tv_sec-login_t); + if( silent_t<0 ) silent_t = 0; + CHAR_setInt( charindex, CHAR_SILENT, silent_t); + } + +#ifdef _ITEM_ADDEXP2 + if( CHAR_getWorkInt( charindex, CHAR_WORKITEM_ADDEXP) > 0 ) { + // 登入时智果效果自动减90秒 + CHAR_setWorkInt( charindex, CHAR_WORKITEM_ADDEXPTIME, + CHAR_getWorkInt( charindex, CHAR_WORKITEM_ADDEXPTIME) - 90 ); + if( CHAR_getWorkInt( charindex, CHAR_WORKITEM_ADDEXPTIME) <= 0 ) { + CHAR_setWorkInt( charindex, CHAR_WORKITEM_ADDEXPTIME, 0); + CHAR_setWorkInt( charindex, CHAR_WORKITEM_ADDEXP, 0); + } + } + CHAR_setInt( charindex, CHAR_ADDEXPPOWER, + CHAR_getWorkInt( charindex, CHAR_WORKITEM_ADDEXP) ); + CHAR_setInt( charindex, CHAR_ADDEXPTIME, + CHAR_getWorkInt( charindex, CHAR_WORKITEM_ADDEXPTIME) ); +#endif + +#ifdef _TIME_TICKET + if( check_TimeTicketMap( CHAR_getInt( charindex, CHAR_FLOOR)) ) { + CHAR_warpToSpecificPoint( charindex, 7001, 41, 6); + } +#endif + + // Robin add + CHAR_setInt( charindex, CHAR_LASTLEAVETIME, (int)time(NULL)); + + if( save ){ + CHAR_charSaveFromConnect( clifd ,TRUE); + } + +#ifndef _DEATH_CONTEND + ADDRESSBOOK_notifyLoginLogout(charindex,0); +#endif + CHAR_CharaDeleteHavePet( charindex); + CHAR_CharaDelete( charindex ); + + return ret; +} +/*------------------------------------------------------------ + * watch奶矛件玄毛霜月井升丹井民尼永弁允月 + * 娄醒 + * objindex int 奶矛件玄毛云仇仄凶平乓仿及左皮斥尼弁玄 + * 奶件犯永弁旦 + * index int 奶矛件玄毛云仇仄凶平乓仿及奶件犯永弁旦 + * recvindex int 奶矛件玄毛熬仃午月平乓仿及index + * chac int 失弁扑亦件及潘 + * 忒曰袄 TRUE: 霜匀化中中方 + * FALSE: 蛲 + ------------------------------------------------------------*/ +static BOOL CHAR_sendWatchEvent_sendCheck( int objindex, int index, + int recvindex, int chac) +{ + /* 愤坌互NPC匹锹澎手NPC及凛 仃月 */ + if( OBJECT_getType( objindex) == OBJTYPE_CHARA && + CHAR_getInt( index, CHAR_WHICHTYPE) != CHAR_TYPEPLAYER && + CHAR_getInt(recvindex, CHAR_WHICHTYPE ) + != CHAR_TYPEPLAYER ) + { + return FALSE; + } + /* 平乓仿动陆及watch 反民尼永弁 仄卞蕞 */ + if( OBJECT_getType( objindex) != OBJTYPE_CHARA) { + return TRUE; + } + /* + * 愤坌尺及汹五及 反 仄卞允月 + */ + if( index == recvindex && chac == CHAR_ACTWALK ) { + return FALSE; + } + + if( CHAR_getInt( recvindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER) { + /* 爵 及谛卞反 蛲分井日霜耨仄卅中 */ + if( CHAR_getWorkInt( recvindex,CHAR_WORKBATTLEMODE) + != BATTLE_CHARMODE_NONE) + { + return FALSE; + } + /* 失弁扑亦件元扎 中凛 */ + if( CHAR_getWorkInt( index, CHAR_WORKACTION) == -1 ) { + if( OBJECT_getType(objindex) == OBJTYPE_CHARA) { + /* 元由□ 奴分匀凶日 + * 褪动陆反职及丢件田□卞汹五毛霜耨仄卅中 + */ + if( CHAR_getWorkInt( index, CHAR_WORKPARTYMODE ) + == CHAR_PARTY_CLIENT && + CHAR_getWorkInt( recvindex, CHAR_WORKPARTYMODE) + != CHAR_PARTY_NONE && + chac == CHAR_ACTWALK ) + { + int found = FALSE; + int loop; + /* 阂毛譬屯月 */ + for( loop = 1; loop < CHAR_PARTYMAX; loop ++ ) { + int partycharaindex = CHAR_getPartyIndex( recvindex, loop); + /* 中凶平乓仿互愤坌及由□ 奴及阂分匀凶 */ + if( partycharaindex == index ) { + found = TRUE; + break; + } + } + if( found ) return FALSE; + } + /* 褪反阂及STAND毛霜耨仄卅中 */ + if( CHAR_getWorkInt( index, CHAR_WORKPARTYMODE) + == CHAR_PARTY_CLIENT && + CHAR_getWorkInt( recvindex, CHAR_WORKPARTYMODE) + == CHAR_PARTY_LEADER && + chac == CHAR_ACTSTAND) + { + int found = FALSE; + int loop; + /* 阂毛譬屯月 */ + for( loop = 1; loop < CHAR_PARTYMAX; loop ++ ) { + int partycharaindex + = CHAR_getWorkInt( recvindex, + CHAR_WORKPARTYINDEX1+loop); + /* STAND仄凶平乓仿互愤坌及由□ 奴及阂分匀凶 */ + if( partycharaindex == index ) { + found = TRUE; + break; + } + } + if( found ) return FALSE; + } + } + } + } + return TRUE; +} + +void CHAR_sendWatchEvent( int objindex, int chac, int* opt, + int optlen,BOOL myflg ) +{ + int i; + int j; + int x=0,y=0,dir=0; + int floor; + int watchopt[32]; + int watchoptlen=0; + typedef void (*WATCHF)(int,int,CHAR_ACTION,int,int,int,int*,int); + int index; + + if( !CHECKOBJECTUSE(objindex) )return; + index = OBJECT_getIndex( objindex); + switch( OBJECT_getType(objindex) ){ + case OBJTYPE_CHARA: + for( i=0; i= 4 ){ + return; + } + // 引分由仿丢□正失永皿匹五月井" + cnt = CHAR_getInt(charaindex,CHAR_SKILLUPPOINT); + if( cnt <= 0 )return; + +#ifdef _CHAR_PROFESSION // WON ADD 人物职业栏位 + { + int p_class = CHAR_getInt( charaindex, PROFESSION_CLASS ); + int fd=-1; + + switch( p_class ){ + case PROFESSION_CLASS_FIGHTER: + // 勇士锁敏200 + if( SkUpTbl[skillid] == CHAR_DEX ){ + if( CHAR_getInt( charaindex, SkUpTbl[skillid] ) >= 200 * 100 ){ + CHAR_talkToCli(charaindex, -1, "你的能力值已达上限", CHAR_COLORYELLOW ); + fd = getfdFromCharaIndex(charaindex); + if( fd != -1 ) lssproto_SKUP_send( fd, cnt ); + return; + } + } + break; + case PROFESSION_CLASS_WIZARD: + // 巫师锁攻200 + if( SkUpTbl[skillid] == CHAR_STR ){ + if( CHAR_getInt( charaindex, SkUpTbl[skillid] ) >= 200 * 100 ){ + CHAR_talkToCli(charaindex, -1, "你的能力值已达上限", CHAR_COLORYELLOW ); + fd = getfdFromCharaIndex(charaindex); + if( fd != -1 ) lssproto_SKUP_send( fd, cnt ); + return; + } + } + // 巫师锁防200 + if( SkUpTbl[skillid] == CHAR_TOUGH ){ + if( CHAR_getInt( charaindex, SkUpTbl[skillid] ) >= 200 * 100 ){ + CHAR_talkToCli(charaindex, -1, "你的能力值已达上限", CHAR_COLORYELLOW ); + fd = getfdFromCharaIndex(charaindex); + if( fd != -1 ) lssproto_SKUP_send( fd, cnt ); + return; + } + } + break; + case PROFESSION_CLASS_HUNTER: + // 猎人锁攻200 + if( SkUpTbl[skillid] == CHAR_STR ){ + if( CHAR_getInt( charaindex, SkUpTbl[skillid] ) >= 200 * 100 ){ + CHAR_talkToCli(charaindex, -1, "你的能力值已达上限", CHAR_COLORYELLOW ); + fd = getfdFromCharaIndex(charaindex); + if( fd != -1 ) lssproto_SKUP_send( fd, cnt ); + return; + } + } + // 猎人锁防200 + if( SkUpTbl[skillid] == CHAR_TOUGH ){ + if( CHAR_getInt( charaindex, SkUpTbl[skillid] ) >= 200 * 100 ){ + CHAR_talkToCli(charaindex, -1, "你的能力值已达上限", CHAR_COLORYELLOW ); + fd = getfdFromCharaIndex(charaindex); + if( fd != -1 ) lssproto_SKUP_send( fd, cnt ); + return; + } + } + // 猎人锁敏400 + if( SkUpTbl[skillid] == CHAR_DEX ){ + if( CHAR_getInt( charaindex, SkUpTbl[skillid] ) >= 400 * 100 ){ + CHAR_talkToCli(charaindex, -1, "你的能力值已达上限", CHAR_COLORYELLOW ); + fd = getfdFromCharaIndex(charaindex); + if( fd != -1 ) lssproto_SKUP_send( fd, cnt ); + return; + } + } + break; + default: break; + } + + fd = getfdFromCharaIndex(charaindex); + if( fd != -1 ) lssproto_SKUP_send( fd, cnt-1 ); + } +#endif + + CHAR_setInt( charaindex,CHAR_SKILLUPPOINT,cnt-1); + CHAR_setInt( charaindex, SkUpTbl[skillid], CHAR_getInt( charaindex, SkUpTbl[skillid] ) + 1*100 ); + + CHAR_complianceParameter(charaindex); + CHAR_send_P_StatusString( charaindex, SendTbl[skillid]); + +#ifdef _ANGEL_SUMMON // 加点时检查资格 + if( cnt-1 == 0 ) + //selectAngel( charaindex); + selectAngel( charaindex, -1, -1 , FALSE); + +#endif + } + CHAR_PartyUpdate( charaindex, CHAR_N_STRING_MAXHP ); + +} + +INLINE void CHAR_getDXDY( int dir , int* dx, int* dy ) +{ + static POINT CHAR_dxdy[8]= + { + { 0,-1}, /* */ + { 1,-1}, /* */ + { 1, 0}, /* */ + { 1, 1}, /* */ + { 0, 1}, /* */ + {-1, 1}, /* */ + {-1, 0}, /* */ + {-1,-1}, /* */ + }; + VALIDATEDIR(dir); + + if( dx )*dx = CHAR_dxdy[dir].x; + if( dy )*dy = CHAR_dxdy[dir].y; +} +INLINE int CHAR_getDX( int dir ) +{ + int tmp; + CHAR_getDXDY( dir,&tmp,NULL); + return tmp; +} +INLINE int CHAR_getDY( int dir ) +{ + int tmp; + CHAR_getDXDY( dir,NULL,&tmp); + return tmp; +} + +/*------------------------------------------------------------ + * 元穴旦及平乓仿弁正□毛 月[ + * 娄醒 + * objbuf int* object 匹及 index 毛医 允月 + * 田永白央 + * siz int objbuf 及 扔奶术 + * ff int 白夫失 + * fx int x + * fy int y + * 忒曰袄 + * 窒蜊平乓仿互中月井[ + ------------------------------------------------------------*/ +int CHAR_getSameCoordinateObjects(int* objbuf, int siz,int ff, int fx, + int fy) +{ + OBJECT object; + int findobjnum=0; + + for( object = MAP_getTopObj(ff,fx,fy) ; object ; + object = NEXT_OBJECT(object ) ){ + int objindex = GET_OBJINDEX(object); + + if( siz <= findobjnum )break; + if( OBJECT_getType(objindex) != OBJTYPE_NOUSE ) + objbuf[findobjnum++] = objindex; + } + return findobjnum; +} + + +/*====================平乓仿及树 毛 月烟及楮醒====================*/ +/*左皿扑亦件犯□正及 侬 毛忡绣允月楮醒*/ +static char CHAR_optiondataString[STRINGBUFSIZ]; +/*------------------------------------------------------------ + * 左皿扑亦件迕及 侬 毛综月[ + * level, showstring , 熔及醒 , 飓 寞} 窒荚夫弘奶件仄凶井[ + * 弁仿旦[ + * 娄醒 + * ch Char* 平乓仿犯□正 + * 忒曰袄 + * char* static 卅 毛忒允及匹戚荚及裟太请仄及凛卞反 互 + * 凳今木化中月[娄醒毛公及引引忡绣仄卅中仪[ + ------------------------------------------------------------*/ +char* CHAR_makeOptionString( Char* ch ) +{ + char escapeshowstring[256]; + char *showstr = MAP_getfloorShowstring(ch->data[CHAR_FLOOR]); + if( ! showstr ){ + CHAR_optiondataString[0] = '\0'; + return CHAR_optiondataString; + } else { + +#if 0 /* 动票反LS2酷 匹丐月 */ + snprintf( CHAR_optiondataString, + sizeof( CHAR_optiondataString ), + "%d|%s|1|%d|%d", + ch->data[CHAR_LV], + makeEscapeString( showstr , + escapeshowstring,sizeof(escapeshowstring) ), + ch->data[CHAR_BASEIMAGENUMBER], + ch->data[CHAR_LOGINCOUNT]); +#endif + + /* 动票反StoneAge 酷 匹丐月[ + + dataplace|faceimg|level|hp|str|def|dex|charm|dp|earth|water|fire|wind|login|Name|Place + 午卅月[ + */ + { + snprintf( CHAR_optiondataString, + sizeof( CHAR_optiondataString ), + "%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%s|%s", + ch->data[CHAR_DATAPLACENUMBER], + ch->data[CHAR_FACEIMAGENUMBER], + ch->data[CHAR_LV], + ch->workint[CHAR_WORKMAXHP], + ch->workint[CHAR_WORKATTACKPOWER], + ch->workint[CHAR_WORKDEFENCEPOWER], + ch->workint[CHAR_WORKQUICK], + ch->workint[CHAR_WORKFIXCHARM], + ch->data[CHAR_DUELPOINT], /* dp, FIXME */ + ch->workint[CHAR_WORKFIXEARTHAT], + ch->workint[CHAR_WORKFIXWATERAT], + ch->workint[CHAR_WORKFIXFIREAT], + ch->workint[CHAR_WORKFIXWINDAT], + ch->data[CHAR_LOGINCOUNT], + ch->string[CHAR_NAME].string, + makeEscapeString( showstr , + escapeshowstring, + sizeof(escapeshowstring) ) + ); + } + } + return CHAR_optiondataString; +} + +static char CHAR_statusSendBuffer[STRINGBUFSIZ]; + +char* CHAR_makeStatusString( int index, char* category ) +{ + char c = tolower( category[0] ); + int strlength=0; + + if( !CHAR_CHECKINDEX( index ) ) return NULL; + + if( category == NULL ){ + CHAR_statusSendBuffer[0] = '\0'; + return CHAR_statusSendBuffer; + } +DebugPoint = 100; + switch( c ){ + case 'p': + { + int i; + int getCharDataArray[]= { + CHAR_NAME, + CHAR_OWNTITLE, + //CHAR_FMNAME, + }; + int maxexp = 200; + int exp; + int attr[4]; + { + exp = CHAR_getInt(index,CHAR_EXP ); + maxexp = CHAR_GetLevelExp( index, CHAR_getInt( index, CHAR_LV ) + 1); + } + + for( i = 0; i < 4; i ++ ) { + attr[i] = CHAR_getWorkInt( index, CHAR_WORKFIXEARTHAT + i); + if( attr[i] < 0 ) attr[i] = 0; + } + + snprintf(CHAR_statusSendBuffer,sizeof(CHAR_statusSendBuffer), + "P1|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|", + CHAR_getInt(index,CHAR_HP), + CHAR_getWorkInt(index,CHAR_WORKMAXHP), + CHAR_getInt(index,CHAR_MP), + CHAR_getWorkInt(index,CHAR_WORKMAXMP), + CHAR_getInt(index,CHAR_VITAL)/100, + CHAR_getInt(index,CHAR_STR)/100, + CHAR_getInt(index,CHAR_TOUGH)/100, + CHAR_getInt(index,CHAR_DEX)/100, + exp, maxexp, + CHAR_getInt(index,CHAR_LV), + CHAR_getWorkInt(index,CHAR_WORKATTACKPOWER), + CHAR_getWorkInt(index,CHAR_WORKDEFENCEPOWER), + CHAR_getWorkInt( index, CHAR_WORKQUICK), + CHAR_getWorkInt( index, CHAR_WORKFIXCHARM), + CHAR_getWorkInt( index, CHAR_WORKFIXLUCK), + attr[0], + attr[1], + attr[2], + attr[3], + CHAR_getInt(index,CHAR_GOLD), + CHAR_getInt(index,CHAR_INDEXOFEQTITLE), + CHAR_getInt(index,CHAR_DUELPOINT), + CHAR_getInt( index, CHAR_TRANSMIGRATION), + CHAR_getInt(index,CHAR_RIDEPET), + CHAR_getInt(index,CHAR_LEARNRIDE), + CHAR_getInt(index,CHAR_BASEBASEIMAGENUMBER) +#ifdef _NEW_RIDEPETS + ,CHAR_getInt( index, CHAR_LOWRIDEPETS) +#endif + + ); + strlength = strlen( CHAR_statusSendBuffer ); + for( i = 0 ; i < arraysizeof( getCharDataArray ) ; i ++ ){ + char token[256]; + char escapebuffer[128]; + snprintf( token, + sizeof( token ), + "%s" STATUSSENDDELIMITER, + makeEscapeString( CHAR_getChar(index, getCharDataArray[i]), + escapebuffer,sizeof(escapebuffer) + )); + strcpysafe( CHAR_statusSendBuffer + strlength, + sizeof( CHAR_statusSendBuffer ) - strlength, + token ); + strlength += strlen( token ); + if( strlength >= sizeof( CHAR_statusSendBuffer ) ) + return CHAR_statusSendBuffer; + } + return CHAR_statusSendBuffer; + break; + } +#ifdef _NEW_RIDEPETS + case 'x': + { + snprintf(CHAR_statusSendBuffer,sizeof(CHAR_statusSendBuffer), "X0|%d", + CHAR_getInt( index, CHAR_LOWRIDEPETS)); + return CHAR_statusSendBuffer; + break; + } +#endif + case 'f': + { + int big4fm =0; +#ifndef _NEW_RIDEPETS + switch( CHAR_getWorkInt( index, CHAR_WORKFMFLOOR) ) + { + case 1041: + big4fm = 1; + break; + case 2031: + big4fm = 2; + break; + case 3031: + big4fm = 3; + break; + case 4031: + big4fm = 4; + break; + default: + big4fm = 0; + } +#endif +#ifdef _FIX_FMNAME_RULE // WON ADD 家族未成立,不显示名称 + if( CHAR_getWorkInt(index, CHAR_WORKFMSETUPFLAG)==1 ){ + snprintf( CHAR_statusSendBuffer, + sizeof( CHAR_statusSendBuffer ), + "F%s|%d|%d|%d|%d", + "(待审)", + CHAR_getInt( index, CHAR_FMLEADERFLAG), + CHAR_getWorkInt( index, CHAR_WORKFMCHANNEL), + CHAR_getInt( index, CHAR_FMSPRITE), big4fm ); + }else +#endif + + snprintf( CHAR_statusSendBuffer, + sizeof( CHAR_statusSendBuffer ), + "F%s|%d|%d|%d|%d", + CHAR_getChar( index, CHAR_FMNAME), + CHAR_getInt( index, CHAR_FMLEADERFLAG), + CHAR_getWorkInt( index, CHAR_WORKFMCHANNEL), + CHAR_getInt( index, CHAR_FMSPRITE), big4fm ); + return CHAR_statusSendBuffer; + break; + } + case 'c': + { + int floor,xsiz,ysiz; + floor = CHAR_getInt(index,CHAR_FLOOR); + xsiz = MAP_getfloorX(floor); + ysiz = MAP_getfloorY(floor); + snprintf( CHAR_statusSendBuffer, + sizeof( CHAR_statusSendBuffer ), + "C%d|%d|%d|%d|%d", + CHAR_getInt(index,CHAR_FLOOR), + xsiz, ysiz, + CHAR_getInt(index,CHAR_X), + CHAR_getInt(index,CHAR_Y) ); + return CHAR_statusSendBuffer; + break; + } + case 'i': + { + int i; + CHAR_statusSendBuffer[0] = 'I'; + strlength = 1; + for( i = 0 ; i < CHAR_MAXITEMHAVE ; i ++ ){ + char token[512]; + int itemindex; + itemindex = CHAR_getItemIndex( index, i ); + if( itemindex >= 0 ) { + snprintf( token ,sizeof(token),"%s|" ,ITEM_makeItemStatusString( -1, itemindex ) ); + }else { + snprintf( token ,sizeof(token),"%s|" , ITEM_makeItemFalseString() ); + } + strcpysafe( CHAR_statusSendBuffer + strlength, + sizeof(CHAR_statusSendBuffer) - strlength, token ); + strlength += strlen( token ); + if( strlength >= arraysizeof(CHAR_statusSendBuffer) ) return CHAR_statusSendBuffer; + } + dchop( CHAR_statusSendBuffer , "|" ); + return CHAR_statusSendBuffer; + break; + } + case 's': + { + int i; + CHAR_statusSendBuffer[0] = 'S'; + strlength = 1; + + for( i = 0 ; i < CHAR_SKILLMAXHAVE ; i ++ ){ + char token[256]; + CHAR_HaveSkill* hskill; + + hskill = CHAR_getCharHaveSkill( index, i ); + + if( hskill != NULL && hskill->use == TRUE ){ +#ifdef _CHAR_PROFESSION // WON ADD 人物职业 + snprintf( token , sizeof(token), "%s|", SKILL_makeSkillStatusString(&hskill->skill, index, i) ); +#else + snprintf( token , sizeof(token), "%s|", SKILL_makeSkillStatusString(&hskill->skill) ); +#endif + }else{ + snprintf( token , sizeof(token), "%s|", SKILL_makeSkillFalseString() ); + } + + strcpysafe( CHAR_statusSendBuffer + strlength, sizeof(CHAR_statusSendBuffer)-strlength, token ); + + strlength += strlen( token ); + if( strlength >= arraysizeof(CHAR_statusSendBuffer) ) + return CHAR_statusSendBuffer; + } + + dchop( CHAR_statusSendBuffer , "|" ); + return CHAR_statusSendBuffer; + break; + } + case 't': + { + int i; + CHAR_statusSendBuffer[0] = 'T'; + strlength = 1; + for( i = 0 ; i < CHAR_TITLEMAXHAVE ; i ++ ){ + char token[256]; + char escape[256]; + snprintf( token , sizeof(token), "%s|" , + makeEscapeString( TITLE_makeTitleStatusString(index, + i ), + escape,sizeof(escape) ) ); + + strcpysafe( CHAR_statusSendBuffer + strlength, + sizeof(CHAR_statusSendBuffer) - strlength, + token ); + strlength += strlen( token ); + if( strlength >= arraysizeof(CHAR_statusSendBuffer) ) + return CHAR_statusSendBuffer; + } + dchop( CHAR_statusSendBuffer , "|" ); + return CHAR_statusSendBuffer; + break; + } + case 'd': + snprintf( CHAR_statusSendBuffer,sizeof(CHAR_statusSendBuffer), + "D%d|%ld",CHAR_getWorkInt(index,CHAR_WORKOBJINDEX), + NowTime.tv_sec ); + return CHAR_statusSendBuffer; + break; + case 'm': + snprintf( CHAR_statusSendBuffer,sizeof(CHAR_statusSendBuffer), + "M%d|%d|%d", + CHAR_getInt( index,CHAR_HP ), + CHAR_getInt( index,CHAR_MP ), + CHAR_getInt( index,CHAR_EXP ) ); + return CHAR_statusSendBuffer; + break; + case 'e': + return NULL; + + case 'n': + { + int num; + + int i, nindex = -1; + int getCharDataArray[]= { + CHAR_NAME + }; + num = tolower( category[1] ) - '0'; + + if( num < 0 || num >= CHAR_PARTYMAX ){ + print( "朋友模式失败 (%c)%d \n", num, num ); + break; + } + + nindex = CHAR_getPartyIndex( index, num); + + if( nindex == -1 ){ + snprintf(CHAR_statusSendBuffer,sizeof(CHAR_statusSendBuffer), + "N%d|0|", num ); + return CHAR_statusSendBuffer; + }else{ + snprintf(CHAR_statusSendBuffer,sizeof(CHAR_statusSendBuffer), + "N%d|1|%d|%d|%d|%d|%d|", + num, + CHAR_getWorkInt( nindex, CHAR_WORKOBJINDEX), + CHAR_getInt( nindex, CHAR_LV), + CHAR_getWorkInt( nindex, CHAR_WORKMAXHP), + CHAR_getInt( nindex, CHAR_HP), + CHAR_getInt( nindex, CHAR_MP) + + ); + } + strlength = strlen( CHAR_statusSendBuffer ); + + for( i = 0 ; i < arraysizeof( getCharDataArray ) ; i ++ ){ + char token[256]; + char escapebuffer[128]; + snprintf( token, + sizeof( token ), + "%s" STATUSSENDDELIMITER, + makeEscapeString( CHAR_getChar(nindex, + getCharDataArray[i]), + escapebuffer,sizeof(escapebuffer) + )); + strcpysafe( CHAR_statusSendBuffer + strlength, + sizeof( CHAR_statusSendBuffer ) - strlength, + token ); + strlength += strlen( token ); + if( strlength >= sizeof( CHAR_statusSendBuffer ) ) + return CHAR_statusSendBuffer; + } + + return CHAR_statusSendBuffer; + break; + } + case 'k': + { + int num; + int i, pindex; + int getCharDataArray[]= { + CHAR_NAME, + CHAR_USERPETNAME, + }; + num = tolower( category[1] ) - '0'; + if( num < 0 || num >= CHAR_MAXPETHAVE ){ + print( "宠物模式失败 (%c)%d \n", num, num ); + break; + } + pindex = CHAR_getCharPet( index, num ); + if( pindex == -1 ){ + snprintf(CHAR_statusSendBuffer,sizeof(CHAR_statusSendBuffer), + "K%d|0|", num ); + return CHAR_statusSendBuffer; + }else{ + int attr[4]; + BOOL changenameflg = FALSE; + char *mycdkey; + char *cdkey = NULL; + for( i = 0; i < 4; i ++ ) { + attr[i] = CHAR_getWorkInt( pindex, CHAR_WORKFIXEARTHAT + i); + if( attr[i] < 0 ) attr[i] = 0; + } + mycdkey = CHAR_getChar( index, CHAR_CDKEY); + { + cdkey = CHAR_getChar( pindex, CHAR_CDKEY); + if( cdkey == NULL ) { + print( "can't get CDKEY\n"); + }else { + + if( strlen( cdkey) == 0 || + strcmp( cdkey, mycdkey) == 0 ){ + changenameflg = TRUE; + } + } + } + snprintf(CHAR_statusSendBuffer,sizeof(CHAR_statusSendBuffer), +// Syu ADD 改变交易时宠物转生颜色 +#ifdef _SHOW_FUSION + "K%d|1|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|", +#else + "K%d|1|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|", +#endif + num, + CHAR_getInt(pindex,CHAR_BASEIMAGENUMBER), + CHAR_getInt(pindex,CHAR_HP), + CHAR_getWorkInt(pindex,CHAR_WORKMAXHP), + CHAR_getInt(pindex,CHAR_MP), + CHAR_getWorkInt(pindex,CHAR_WORKMAXMP), + CHAR_getInt(pindex,CHAR_EXP ), + CHAR_GetLevelExp( pindex,CHAR_getInt( pindex, CHAR_LV ) + 1), + CHAR_getInt(pindex,CHAR_LV), + CHAR_getWorkInt(pindex,CHAR_WORKATTACKPOWER), + CHAR_getWorkInt(pindex,CHAR_WORKDEFENCEPOWER), + CHAR_getWorkInt( pindex, CHAR_WORKQUICK), + CHAR_getWorkInt( pindex, CHAR_WORKFIXAI), + attr[0], + attr[1], + attr[2], + attr[3], + CHAR_getInt( pindex, CHAR_SLOT), +// Syu ADD 改变交易时宠物转生颜色 + changenameflg, + CHAR_getInt( pindex,CHAR_TRANSMIGRATION) +#ifdef _SHOW_FUSION + ,CHAR_getInt ( pindex, CHAR_FUSIONBEIT) +#endif + ); + } + strlength = strlen( CHAR_statusSendBuffer ); + for( i = 0 ; i < arraysizeof( getCharDataArray ) ; i ++ ){ + char token[256]; + char escapebuffer[128]; + snprintf( token, + sizeof( token ), + "%s" STATUSSENDDELIMITER, + makeEscapeString( CHAR_getChar(pindex, + getCharDataArray[i]), + escapebuffer,sizeof(escapebuffer) + )); + strcpysafe( CHAR_statusSendBuffer + strlength, + sizeof( CHAR_statusSendBuffer ) - strlength, + token ); + strlength += strlen( token ); + if( strlength >= sizeof( CHAR_statusSendBuffer ) ) + return CHAR_statusSendBuffer; + } + return CHAR_statusSendBuffer; + break; + } + + case 'j': +{ + + int num; + int i, itemindex; + int getMagicDataArray[]= { + MAGIC_NAME, + MAGIC_COMMENT, + }; + num = tolower( category[1] ) - '0'; + + if( num < 0 || num >= CHAR_EQUIPPLACENUM ){ + break; + } + + itemindex = CHAR_getItemIndex( index, num ); + if( !ITEM_CHECKINDEX( itemindex) ) { + snprintf(CHAR_statusSendBuffer,sizeof(CHAR_statusSendBuffer), + "J%d|0|", num ); + return CHAR_statusSendBuffer; + }else{ + int magicindex = MAGIC_getMagicArray( ITEM_getInt( itemindex, ITEM_MAGICID)); + if( magicindex == -1 ) { + snprintf(CHAR_statusSendBuffer,sizeof(CHAR_statusSendBuffer), + "J%d|0|", num ); + return CHAR_statusSendBuffer; + } + snprintf(CHAR_statusSendBuffer,sizeof(CHAR_statusSendBuffer), + "J%d|1|%d|%d|%d|", + num, + ITEM_getInt( itemindex, ITEM_MAGICUSEMP), + MAGIC_getInt( magicindex, MAGIC_FIELD), + MAGIC_getInt( magicindex, MAGIC_TARGET)); + strlength = strlen( CHAR_statusSendBuffer ); + + for( i = 0 ; i < arraysizeof( getMagicDataArray ) ; i ++ ){ + char token[256]; + char escapebuffer[128]; + snprintf( token, + sizeof( token ), + "%s" STATUSSENDDELIMITER, + makeEscapeString( MAGIC_getChar(magicindex, + getMagicDataArray[i]), + escapebuffer,sizeof(escapebuffer) + )); + strcpysafe( CHAR_statusSendBuffer + strlength, + sizeof( CHAR_statusSendBuffer ) - strlength, + token ); + strlength += strlen( token ); + if( strlength >= sizeof( CHAR_statusSendBuffer ) ) + return CHAR_statusSendBuffer; + } + return CHAR_statusSendBuffer; + } + } + break; + + case 'w': +{ + int num; + int i,petskillloop, pindex; + char tmp[16]; + int getPetSkillDataArray[]= { + PETSKILL_NAME, + PETSKILL_COMMENT, + }; + + num = tolower( category[1] ) - '0'; + if( num < 0 || num >= CHAR_MAXPETHAVE ){ + print( "宠物特技资料失败 (%c)%d \n", num, num ); + break; + } + + pindex = CHAR_getCharPet( index, num ); + if( !CHAR_CHECKINDEX(pindex)){ + return NULL; + } + snprintf( tmp, sizeof( tmp), "W%d|", num); + strcpysafe( CHAR_statusSendBuffer, sizeof( CHAR_statusSendBuffer), + tmp); + strlength += strlen( tmp); + if( strlength >= arraysizeof( CHAR_statusSendBuffer) ) { + return CHAR_statusSendBuffer; + } + for( petskillloop = 0; petskillloop < CHAR_MAXPETSKILLHAVE; petskillloop ++ ) { + int skillid = CHAR_getPetSkill( pindex, petskillloop); + int petskillindex = PETSKILL_getPetskillArray( skillid ); + if( PETSKILL_CHECKINDEX( petskillindex) ) { + char token[256]; + snprintf( token, sizeof( token), + "%d|%d|%d|", + + PETSKILL_getInt( petskillindex, PETSKILL_ID), + PETSKILL_getInt( petskillindex, PETSKILL_FIELD), + PETSKILL_getInt( petskillindex, PETSKILL_TARGET) + ); + strcpysafe( CHAR_statusSendBuffer + strlength, + sizeof(CHAR_statusSendBuffer) - strlength, + token ); + strlength += strlen( token ); + if( strlength >= arraysizeof(CHAR_statusSendBuffer)) { + return CHAR_statusSendBuffer; + } + + for( i = 0 ; i < arraysizeof( getPetSkillDataArray ) ; i ++ ){ + char escapebuffer[128]; + snprintf( token, + sizeof( token ), + "%s" STATUSSENDDELIMITER, + makeEscapeString( + PETSKILL_getChar(petskillindex, + getPetSkillDataArray[i]), + escapebuffer,sizeof(escapebuffer) + )); + strcpysafe( CHAR_statusSendBuffer + strlength, + sizeof( CHAR_statusSendBuffer ) - strlength, + token ); + strlength += strlen( token ); + if( strlength >= sizeof( CHAR_statusSendBuffer )) { + return CHAR_statusSendBuffer; + } + } + } + else { + char token[256]; + snprintf( token, sizeof( token),"|||||"); + strcpysafe( CHAR_statusSendBuffer + strlength, + sizeof(CHAR_statusSendBuffer) - strlength, + token ); + strlength += strlen( token ); + if( strlength >= arraysizeof(CHAR_statusSendBuffer) ) { + return CHAR_statusSendBuffer; + } + } + } + return CHAR_statusSendBuffer; +} + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + case 'y': +{ + int num = 0, f_num = 0; + int i,petskillloop, pindex; + char tmp[16]; + int getPetSkillDataArray[]= { + PETSKILL_NAME, + PETSKILL_COMMENT, + }; + + num = tolower( category[1] ) - '0'; + if( num < 0 || num >= CHAR_MAXPETHAVE ){ + print( "宠物特技资料失败 (%c)%d \n", num, num ); + break; + } + + pindex = CHAR_getCharPet( index, num ); + if( !CHAR_CHECKINDEX(pindex)){ + return NULL; + } + snprintf( tmp, sizeof( tmp), "W%d|", num); + strcpysafe( CHAR_statusSendBuffer, sizeof( CHAR_statusSendBuffer), + tmp); + strlength += strlen( tmp); + if( strlength >= arraysizeof( CHAR_statusSendBuffer) ) { + return CHAR_statusSendBuffer; + } + + if( CHAR_getWorkInt( pindex, CHAR_WORKOBLIVION) > 0 ) + f_num = CHAR_getWorkInt( pindex, CHAR_WORKMODOBLIVION ) + 1;// 遗忘宠技数量 + + for( petskillloop = 0; petskillloop < CHAR_MAXPETSKILLHAVE; petskillloop ++ ) { + int skillid = CHAR_getPetSkill( pindex, petskillloop); + int petskillindex = PETSKILL_getPetskillArray( skillid ); + if( PETSKILL_CHECKINDEX( petskillindex) ) { + char token[256]; + int field = -1, target = -1; + int oblivion = CHAR_getWorkInt( pindex, CHAR_WORKOBLIVION ); + int p_id = PETSKILL_getInt( petskillindex, PETSKILL_ID); + int rand_num = RAND( 0, 100 ); + + // 中了遗忘 + if( (oblivion > 0) && ( f_num > 0 ) && ( rand_num <= 60 ) && ( p_id != 1 ) ){ + field = PETSKILL_FIELD_MAP; + target = PETSKILL_TARGET_NONE; + f_num --; + }else{ + field = PETSKILL_getInt( petskillindex, PETSKILL_FIELD); + target = PETSKILL_getInt( petskillindex, PETSKILL_TARGET); + } + + snprintf( token, sizeof( token),"%d|%d|%d|", +// PETSKILL_getInt( petskillindex, PETSKILL_ID), + p_id, + field, target + ); + strcpysafe( CHAR_statusSendBuffer + strlength, + sizeof(CHAR_statusSendBuffer) - strlength, + token ); + strlength += strlen( token ); + if( strlength >= arraysizeof(CHAR_statusSendBuffer)) { + return CHAR_statusSendBuffer; + } + + for( i = 0 ; i < arraysizeof( getPetSkillDataArray ) ; i ++ ){ + char escapebuffer[128]; + snprintf( token, + sizeof( token ), + "%s" STATUSSENDDELIMITER, + makeEscapeString( + PETSKILL_getChar(petskillindex, + getPetSkillDataArray[i]), + escapebuffer,sizeof(escapebuffer) + )); + strcpysafe( CHAR_statusSendBuffer + strlength, + sizeof( CHAR_statusSendBuffer ) - strlength, + token ); + strlength += strlen( token ); + if( strlength >= sizeof( CHAR_statusSendBuffer )) { + return CHAR_statusSendBuffer; + } + } + } + else { + char token[256]; + snprintf( token, sizeof( token),"|||||"); + strcpysafe( CHAR_statusSendBuffer + strlength, + sizeof(CHAR_statusSendBuffer) - strlength, + token ); + strlength += strlen( token ); + if( strlength >= arraysizeof(CHAR_statusSendBuffer) ) { + return CHAR_statusSendBuffer; + } + } + } + return CHAR_statusSendBuffer; +} +#endif + +#ifdef _PETSKILL_DAMAGETOHP + case 'o': +{ + int getPetSkillDataArray[]= { + PETSKILL_NAME, + PETSKILL_COMMENT, + }; + int i,petskillloop, pindex=index; + int num = 0;//, f_num = 0; + char tmp[16]; + + num = tolower( category[1] ) - '0'; + if( num < 0 || num >= CHAR_MAXPETHAVE ){ + print( "宠物特技资料失败 (%c)%d \n", num, num ); + break; + } + + pindex = CHAR_getCharPet( index, num ); + if( !CHAR_CHECKINDEX(pindex)){ + return NULL; + } + snprintf( tmp, sizeof( tmp), "W%d|", num); + strcpysafe( CHAR_statusSendBuffer, sizeof( CHAR_statusSendBuffer), + tmp); + strlength += strlen( tmp); + if( strlength >= arraysizeof( CHAR_statusSendBuffer) ) { + return CHAR_statusSendBuffer; + } + + for( petskillloop = 0; petskillloop < CHAR_MAXPETSKILLHAVE; petskillloop ++ ) { + int skillid = CHAR_getPetSkill( pindex, petskillloop); + int petskillindex = PETSKILL_getPetskillArray( skillid ); + if( PETSKILL_CHECKINDEX( petskillindex) ) { + char token[256]; + int field = -1, target = -1; + //int oblivion = CHAR_getWorkInt( pindex, CHAR_WORKOBLIVION ); + int p_id = PETSKILL_getInt( petskillindex, PETSKILL_ID); + + //生命大於50%且技能名称若为 浴血狂袭 技能不能选 + if( ( CHAR_getInt( pindex, CHAR_HP ) > CHAR_getWorkInt( pindex, CHAR_WORKMAXHP )*0.5 + && strcmp(PETSKILL_getChar( petskillindex, PETSKILL_NAME),"浴血狂袭" ) == 0 ) +#ifdef _PETSKILL_EXPLODE + || ( CHAR_getInt( pindex, CHAR_HP ) < (CHAR_getWorkInt( pindex, CHAR_WORKMAXHP ) >> 1 ) + && strcmp(PETSKILL_getChar( petskillindex, PETSKILL_NAME),"爆裂攻击" ) == 0 ) +#endif + ){ + field = PETSKILL_FIELD_MAP; + target = PETSKILL_TARGET_NONE; + }else{ + field = PETSKILL_getInt( petskillindex, PETSKILL_FIELD); + target = PETSKILL_getInt( petskillindex, PETSKILL_TARGET); + } + + snprintf( token, sizeof( token),"%d|%d|%d|", +// PETSKILL_getInt( petskillindex, PETSKILL_ID), + p_id, + field, target + ); + strcpysafe( CHAR_statusSendBuffer + strlength, + sizeof(CHAR_statusSendBuffer) - strlength, + token ); + strlength += strlen( token ); + if( strlength >= arraysizeof(CHAR_statusSendBuffer)) { + return CHAR_statusSendBuffer; + } + + for( i = 0 ; i < arraysizeof( getPetSkillDataArray ) ; i ++ ){ + char escapebuffer[128]; + snprintf( token, + sizeof( token ), + "%s" STATUSSENDDELIMITER, + makeEscapeString( + PETSKILL_getChar(petskillindex, + getPetSkillDataArray[i]), + escapebuffer,sizeof(escapebuffer) + )); + strcpysafe( CHAR_statusSendBuffer + strlength, + sizeof( CHAR_statusSendBuffer ) - strlength, + token ); + strlength += strlen( token ); + if( strlength >= sizeof( CHAR_statusSendBuffer )) { + return CHAR_statusSendBuffer; + } + } + } + else { + char token[256]; + snprintf( token, sizeof( token),"|||||"); + strcpysafe( CHAR_statusSendBuffer + strlength, + sizeof(CHAR_statusSendBuffer) - strlength, + token ); + strlength += strlen( token ); + if( strlength >= arraysizeof(CHAR_statusSendBuffer) ) { + return CHAR_statusSendBuffer; + } + } + } + return CHAR_statusSendBuffer; +} +#endif + +#ifdef _PETSKILL_BECOMEFOX + case 'a': +{ + int getPetSkillDataArray[]= { + PETSKILL_NAME, + PETSKILL_COMMENT, + }; + int i,petskillloop, pindex=index; + int num = 0;//, f_num = 0; + char tmp[16]; + + num = tolower( category[1] ) - '0'; + if( num < 0 || num >= CHAR_MAXPETHAVE ){ + print( "宠物特技资料失败 (%c)%d \n", num, num ); + break; + } + print( "宠物特技资料" ); + pindex = CHAR_getCharPet( index, num ); + if( !CHAR_CHECKINDEX(pindex)){ + return NULL; + } + snprintf( tmp, sizeof( tmp), "W%d|", num); + strcpysafe( CHAR_statusSendBuffer, sizeof( CHAR_statusSendBuffer), + tmp); + strlength += strlen( tmp); + if( strlength >= arraysizeof( CHAR_statusSendBuffer) ) { + return CHAR_statusSendBuffer; + } + + for( petskillloop = 0; petskillloop < CHAR_MAXPETSKILLHAVE; petskillloop ++ ) { + int skillid = CHAR_getPetSkill( pindex, petskillloop); + int petskillindex = PETSKILL_getPetskillArray( skillid ); + if( PETSKILL_CHECKINDEX( petskillindex) ) { + char token[256]; + int field = -1, target = -1; + //int oblivion = CHAR_getWorkInt( pindex, CHAR_WORKOBLIVION ); + int p_id = PETSKILL_getInt( petskillindex, PETSKILL_ID); + + //技能名称若为 待机 攻击 防御 技能才能选 + print("\n技能名称:%s",PETSKILL_getChar( petskillindex, PETSKILL_NAME)); + if( strcmp(PETSKILL_getChar( petskillindex, PETSKILL_NAME),"待机" ) == 0 + || strcmp(PETSKILL_getChar( petskillindex, PETSKILL_NAME),"攻击" ) == 0 + || strcmp(PETSKILL_getChar( petskillindex, PETSKILL_NAME),"防御" ) == 0){ + field = PETSKILL_getInt( petskillindex, PETSKILL_FIELD); + target = PETSKILL_getInt( petskillindex, PETSKILL_TARGET); + }else{ + field = PETSKILL_FIELD_MAP; + target = PETSKILL_TARGET_NONE; + } + + snprintf( token, sizeof( token),"%d|%d|%d|", +// PETSKILL_getInt( petskillindex, PETSKILL_ID), + p_id, + field, target + ); + strcpysafe( CHAR_statusSendBuffer + strlength, + sizeof(CHAR_statusSendBuffer) - strlength, + token ); + strlength += strlen( token ); + if( strlength >= arraysizeof(CHAR_statusSendBuffer)) { + return CHAR_statusSendBuffer; + } + + for( i = 0 ; i < arraysizeof( getPetSkillDataArray ) ; i ++ ){ + char escapebuffer[128]; + snprintf( token, + sizeof( token ), + "%s" STATUSSENDDELIMITER, + makeEscapeString( + PETSKILL_getChar(petskillindex, + getPetSkillDataArray[i]), + escapebuffer,sizeof(escapebuffer) + )); + strcpysafe( CHAR_statusSendBuffer + strlength, + sizeof( CHAR_statusSendBuffer ) - strlength, + token ); + strlength += strlen( token ); + if( strlength >= sizeof( CHAR_statusSendBuffer )) { + return CHAR_statusSendBuffer; + } + } + } + else { + char token[256]; + snprintf( token, sizeof( token),"|||||"); + strcpysafe( CHAR_statusSendBuffer + strlength, + sizeof(CHAR_statusSendBuffer) - strlength, + token ); + strlength += strlen( token ); + if( strlength >= arraysizeof(CHAR_statusSendBuffer) ) { + return CHAR_statusSendBuffer; + } + } + } + return CHAR_statusSendBuffer; +} +#endif + + default: + break; + } + + CHAR_statusSendBuffer[0] = '\0'; + return CHAR_statusSendBuffer; +} + +//BOOL CHAR_sendStatusString( int charaindex, char* category ) +BOOL _CHAR_sendStatusString( int charaindex, char* category, char* file, int line ) +{ + char* string; + + //print("\nsend_S:%s:%d ", file, line); + + if( CHAR_getInt(charaindex,CHAR_WHICHTYPE) != CHAR_TYPEPLAYER ){ + return FALSE; + } + string = CHAR_makeStatusString( charaindex, category ); + + if( string != NULL ){ + int fd; + fd = getfdFromCharaIndex( charaindex ); + if( fd != -1 ){ + lssproto_S_send( fd, string ); + return TRUE; + } + } + return FALSE; +} + +void CHAR_inputOwnTitle( int index ,char* name ) +{ + if( !CHAR_CHECKINDEX( index ) ) return; + + if( CHAR_getFlg( index,CHAR_ISDIE ) )return; + + CHAR_setChar( index, CHAR_OWNTITLE ,name); + + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( index, CHAR_WORKOBJINDEX) ); + + CHAR_send_P_StatusString( index, CHAR_P_STRING_OWNTITLE ); +} + + +void CHAR_selectTitle( int index, int titleindex ) +{ + if( !CHAR_CHECKINDEX( index ) )return; + + if( CHAR_getFlg( index,CHAR_ISDIE ) )return; + + if( titleindex == -1 ){ + CHAR_setInt( index, CHAR_INDEXOFEQTITLE, titleindex); + }else if( titleindex < 0 || titleindex >= CHAR_TITLEMAXHAVE ) { + return; + } + else{ + + int title = CHAR_getCharHaveTitle( index,titleindex ); + + if( TITLE_getTitleIndex( title) != -1 ){ + CHAR_setInt( index, CHAR_INDEXOFEQTITLE, titleindex); + } + } + + CHAR_sendStatusString( index, "T" ); + CHAR_send_P_StatusString( index, CHAR_P_STRING_TITLE ); +} + + +void CHAR_deleteTitle( int index, int titleindex ) +{ + int title; + + if( !CHAR_CHECKINDEX( index ) )return; + /* 韶氏匹中月凛反分户 */ + if( CHAR_getFlg( index,CHAR_ISDIE ) )return; + + if( titleindex < 0 || titleindex >= CHAR_TITLEMAXHAVE )return; + title = CHAR_getCharHaveTitle( index,titleindex ); + /*if( TITLE_CHECKTABLEINDEX( title ) == FALSE )*/ + if( TITLE_getTitleIndex( title) == -1 ) { + return; + } + CHAR_setCharHaveTitle( index,titleindex,-1 ); + + /* 愤坌互银匀化中凶支勾卅日壬}公木手卅仄卞允月 */ + if( CHAR_getInt(index, CHAR_INDEXOFEQTITLE) == titleindex ) + CHAR_setInt(index, CHAR_INDEXOFEQTITLE, -1 ); + + /* + * 旦 □正旦树 毛霜月[ + */ + CHAR_sendStatusString( index, "T" ); + CHAR_send_P_StatusString( index, CHAR_P_STRING_TITLE ); +} + +static void CHAR_initcharWorkInt( index ) +{ + float hp; + static struct substitutionTable{ + CHAR_WORKDATAINT workindex; + CHAR_DATAINT intindex; + }subtbl[]={ + { CHAR_WORKMAXMP, CHAR_MAXMP }, + { CHAR_WORKFIXFIREAT, CHAR_FIREAT }, + { CHAR_WORKFIXWATERAT, CHAR_WATERAT}, + { CHAR_WORKFIXEARTHAT, CHAR_EARTHAT}, + { CHAR_WORKFIXWINDAT, CHAR_WINDAT }, + { CHAR_WORKFIXCHARM, CHAR_CHARM }, + { CHAR_WORKFIXLUCK, CHAR_LUCK }, + { CHAR_WORKFIXLUCK, CHAR_LUCK }, + { CHAR_WORKMODPOISON, CHAR_POISON }, + { CHAR_WORKMODPARALYSIS,CHAR_PARALYSIS }, + { CHAR_WORKMODSLEEP, CHAR_SLEEP }, + { CHAR_WORKMODSTONE, CHAR_STONE }, + { CHAR_WORKMODDRUNK, CHAR_DRUNK }, + { CHAR_WORKMODCONFUSION, CHAR_CONFUSION } + }; + int i; + for( i=0 ; i 0 ){ + CHAR_setWorkInt( index, CHAR_WORKFIXEARTHAT + (i + 2) % 4, attr * -1); + } + } + +#ifdef _MAGIC_RESIST_EQUIT // WON ADD 职业抗性装备 + { + // 火冰电抗性 + //for( i=0; i<3; i++) + // CHAR_setWorkInt( index, CHAR_WORK_F_RESIST+i, CHAR_getInt( index, PROFESSION_FIRE_R+i ) ); + } +#endif + + + CHAR_setWorkInt( index, CHAR_WORKFIXDEX, + CHAR_getInt( index, CHAR_DEX) * 0.01 ); + CHAR_setWorkInt( index, CHAR_WORKFIXVITAL, + CHAR_getInt( index, CHAR_VITAL) * 0.01 ); + + CHAR_setWorkInt( index, CHAR_WORKFIXSTR, + CHAR_getInt( index, CHAR_STR) * 0.01 * 1.0 +//#ifdef _BATTLE_NEWPOWER +// + CHAR_getInt( index, CHAR_DEX) * 0.01 * 0.05 +// + CHAR_getInt( index, CHAR_VITAL) * 0.01 * 0.05 ); // 耐力 +//#else + + CHAR_getInt( index, CHAR_TOUGH) * 0.01 * 0.1 + + CHAR_getInt( index, CHAR_VITAL) * 0.01 * 0.1 + + CHAR_getInt( index, CHAR_DEX) * 0.01 * 0.05 ); +//#endif + CHAR_setWorkInt( index, CHAR_WORKFIXTOUGH, + CHAR_getInt( index, CHAR_TOUGH) * 0.01 * 1.0 +//#ifdef _BATTLE_NEWPOWER +// + CHAR_getInt( index, CHAR_DEX) * 0.01 * 0.05 +// + CHAR_getInt( index, CHAR_VITAL) * 0.01 * 0.05 ); // 力量 +//#else + + CHAR_getInt(index,CHAR_STR) * 0.01 * 0.1 + + CHAR_getInt(index,CHAR_VITAL) * 0.01 * 0.1 + + CHAR_getInt(index,CHAR_DEX) * 0.01 * 0.05 ); +//#endif + +#ifdef _ITEMSET5_TXT + { + CHAR_setWorkInt( index, CHAR_WORKFIXARRANGE, 0); + CHAR_setWorkInt( index, CHAR_WORKFIXSEQUENCE, 0); + CHAR_setWorkInt( index, CHAR_WORKATTACHPILE, 0); + CHAR_setWorkInt( index, CHAR_WORKHITRIGHT, 0); + } +#endif + + + +#ifdef _ITEMSET6_TXT + { + CHAR_setWorkInt( index, CHAR_WORKNEGLECTGUARD, 0); + } +#endif + + CHAR_setWorkInt( index, CHAR_WORKATTACKPOWER, + CHAR_getWorkInt(index,CHAR_WORKFIXSTR) ); + CHAR_setWorkInt( index, CHAR_WORKDEFENCEPOWER, + CHAR_getWorkInt(index,CHAR_WORKFIXTOUGH) ); + CHAR_setWorkInt( index, CHAR_WORKQUICK, + CHAR_getWorkInt( index, CHAR_WORKFIXDEX)); + + hp = ( CHAR_getInt(index,CHAR_VITAL) * 4 + + CHAR_getInt(index,CHAR_STR) * 1 + + CHAR_getInt(index,CHAR_TOUGH) * 1 + + CHAR_getInt(index,CHAR_DEX) * 1 ) * 0.01; + + CHAR_setWorkInt( index, CHAR_WORKMAXHP, (int)hp ); + CHAR_setWorkInt( index, CHAR_WORKMAXMP, CHAR_getInt( index, CHAR_MAXMP)); + +#ifdef _ADD_DEAMGEDEFC + CHAR_setWorkInt( index, CHAR_WORKOTHERDMAGE, 0); + CHAR_setWorkInt( index, CHAR_WORKOTHERDEFC, 0); +#endif + + if( CHAR_getInt( index, CHAR_WHICHTYPE) == CHAR_TYPEPET) { + int hostindex; + CHAR_setWorkInt( index, CHAR_WORKFIXAI, 0); + hostindex = CHAR_getWorkInt( index, CHAR_WORKPLAYERINDEX); + if( CHAR_CHECKINDEX( hostindex)) { + int ai; + int modai = CHAR_getInt( index, CHAR_MODAI); + double R; + if( modai <= 0 ) modai = 100; + R = 1.10; + ai = ( (CHAR_getInt( hostindex, CHAR_LV) + * CHAR_getWorkInt( hostindex, CHAR_WORKFIXCHARM ) + * R) + / + (CHAR_getInt( index, CHAR_LV)* modai) * 100 ) ; + if( ai > 100 ) ai = 100; + + ai += CHAR_getInt( index, CHAR_VARIABLEAI) * 0.01; + if( CHAR_getInt( hostindex, CHAR_TRANSMIGRATION ) > 0 ){ + // shan 120 -> 140 + ai += ( CHAR_GetLevel() - CHAR_getInt( hostindex, CHAR_LV ) ) / 2; + } + if( ai < 0 ) ai = 0; + if( ai > 100 ) ai = 100; + CHAR_setWorkInt( index, CHAR_WORKFIXAI, ai); + } + } +} + +int _CHAR_complianceParameter( int index, char *FILE, int LINE) +{ + //print("\ncompPara:%s:%d", FILE, LINE); + + if( !CHAR_CHECKINDEX( index)) return 0; + + CHAR_initcharWorkInt( index ); + ITEM_equipEffect( index ); + + CHAR_setWorkInt(index, CHAR_WORKATTACKPOWER, + CHAR_getWorkInt( index, CHAR_WORKFIXSTR ) ); + CHAR_setWorkInt(index, CHAR_WORKDEFENCEPOWER, + CHAR_getWorkInt( index, CHAR_WORKFIXTOUGH ) ); + CHAR_setWorkInt(index, CHAR_WORKQUICK, + CHAR_getWorkInt( index, CHAR_WORKFIXDEX ) ); + +#ifdef _ITEMSET5_TXT + CHAR_setWorkInt(index, CHAR_WORKARRANGEPOWER, + CHAR_getWorkInt( index, CHAR_WORKFIXARRANGE ) ); + CHAR_setWorkInt(index, CHAR_WORKSEQUENCEPOWER, + CHAR_getWorkInt( index, CHAR_WORKFIXSEQUENCE ) ); +#endif + + Other_DefcharWorkInt( index); + CHAR_setInt( index, CHAR_HP, min( CHAR_getInt(index,CHAR_HP), CHAR_getWorkInt( index, CHAR_WORKMAXHP))); + CHAR_setInt( index, CHAR_MP, min( CHAR_getInt(index,CHAR_MP), CHAR_getWorkInt( index, CHAR_WORKMAXMP))); + + if( CHAR_getInt( index, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER ){ + if( CHAR_getWorkInt( index, CHAR_WORKPETFOLLOW ) != -1 ){ + int petindex = CHAR_getWorkInt( index, CHAR_WORKPETFOLLOW ); + if( !CHAR_CHECKINDEX( petindex) ){ + CHAR_setWorkInt( index, CHAR_WORKPETFOLLOW, -1); + }else{ + if( CHAR_getInt( petindex, CHAR_WHICHTYPE) == CHAR_TYPEPET && + !CHAR_CHECKINDEX( CHAR_getWorkInt( petindex, CHAR_WORKPLAYERINDEX)) ){ + CHAR_setWorkInt( index, CHAR_WORKPETFOLLOW, petindex); + CHAR_setWorkInt( petindex, CHAR_WORKPLAYERINDEX, index); + } + } + } + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + { + int i, add_pile = 0; + int old_pile = CHAR_getWorkInt( index, CHAR_WORKATTACHPILE); + + for( i=0; i NowTime.tv_sec +#ifdef _NPCCHANGE_PLAYERIMG + || CHAR_getWorkInt( index, CHAR_WORKNPCMETAMO) > 0 +#endif +#ifdef _PETSKILL_BECOMEPIG + || CHAR_getInt( index, CHAR_BECOMEPIG) > -1 +#endif + ){ + newimagenumber = oldimagenumber; //不恢复成原本的图 + } +#endif + // Arminius 8.9 airplane + if (oldimagenumber==100259) newimagenumber=100259; +#ifdef _VARY_WOLF + if( (CHAR_getInt( index, CHAR_WHICHTYPE) == CHAR_TYPEPET) && + (CHAR_getWorkInt( index, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE) && + oldimagenumber == 101428 ){ + newimagenumber = 101428; + } +#endif + +#ifdef _ENEMY_FALLGROUND + if( CHAR_getInt( index, CHAR_WHICHTYPE) == CHAR_TYPEENEMY ) { + return 0; + }else { +#endif + if( newimagenumber == -1 ) { + CHAR_setInt(index,CHAR_BASEIMAGENUMBER, basebaseimagenumber); + }else { + CHAR_setInt(index,CHAR_BASEIMAGENUMBER,newimagenumber); + } + +#ifdef _ENEMY_FALLGROUND + } +#endif +#ifdef _NEW_RIDEPETS + if( (CHAR_getWorkInt(index, CHAR_WORKITEMMETAMO)>NowTime.tv_sec) + || (CHAR_getWorkInt(index,CHAR_WORKNPCMETAMO)>0)){ + return 0; + } +#endif + // Robin 0725 + if( CHAR_getInt(index, CHAR_RIDEPET) != -1 ){ + int i; +#ifndef _NEW_RIDEPETS + int big4fm =0; +#endif +#ifdef _NEW_RIDEPETS + BOOL FindGraNo = FALSE; +#endif + int petindex = CHAR_getCharPet( index, CHAR_getInt(index, CHAR_RIDEPET) ); +#ifndef _NEW_RIDEPETS + int leaderGraNo = 100700 + + ((CHAR_getInt( index, CHAR_BASEBASEIMAGENUMBER)-100000)/20)*10 + + CHAR_getInt( index, CHAR_FMSPRITE)*5; + switch( CHAR_getWorkInt( index, CHAR_WORKFMFLOOR) ){ + + case 1041: + big4fm = 1; + break; + case 2031: + big4fm = 2; + break; + case 3031: + big4fm = 3; + break; + case 4031: + big4fm = 4; + break; + default: + big4fm = 0; + } +#endif + for( i=0; i< arraysizeof(ridePetTable) ; i++ ) { +#ifdef _NEW_RIDEPETS + if( (( CHAR_getInt( index, CHAR_BASEIMAGENUMBER) == ridePetTable[i].charNo ) || + ( CHAR_getInt( index, CHAR_BASEBASEIMAGENUMBER) == ridePetTable[i].charNo )) +#else + if( ( CHAR_getInt( index, CHAR_BASEBASEIMAGENUMBER) == ridePetTable[i].charNo ) +#endif + && ( CHAR_getInt( petindex, CHAR_BASEBASEIMAGENUMBER) == ridePetTable[i].petNo ) ) { + CHAR_setInt( index, CHAR_BASEIMAGENUMBER, ridePetTable[i].rideNo ); +#ifdef _NEW_RIDEPETS + FindGraNo = TRUE; +#endif + break; + } +#ifndef _NEW_RIDEPETS + else if( ( leaderGraNo == ridePetTable[i].charNo ) + && ( CHAR_getInt( petindex, CHAR_BASEBASEIMAGENUMBER) == ridePetTable[i].petNo ) +#ifdef _EVERYONE_RIDE + && big4fm != 0 ){ +#else + && CHAR_getInt( index, CHAR_FMLEADERFLAG ) == FMMEMBER_LEADER ){ +#endif + CHAR_setInt( index, CHAR_BASEIMAGENUMBER, ridePetTable[i].rideNo ); + break; + } +#endif + } + +#ifdef _NEW_RIDEPETS + { + int ti=-1, Noindex, image=-1; + int petNo = CHAR_getInt( petindex, CHAR_BASEBASEIMAGENUMBER); + int playerNo = CHAR_getInt( index, CHAR_BASEBASEIMAGENUMBER); + + int playerlowsride = CHAR_getInt( index, CHAR_LOWRIDEPETS); + if( (ti = RIDEPET_getPETindex( petNo, playerlowsride )) >= 0 ) { + if( (Noindex = RIDEPET_getNOindex( playerNo)) >= 0 ){ + if( (image = RIDEPET_getRIDEno( Noindex,ti)) >= 0 ) { + FindGraNo = TRUE; + CHAR_setInt( index, CHAR_BASEIMAGENUMBER, image ); + } + } + } + } + if( FindGraNo == FALSE ){ + CHAR_setInt( index , CHAR_RIDEPET, -1 ); + CHAR_setInt( index , CHAR_BASEIMAGENUMBER , CHAR_getInt( index, CHAR_BASEBASEIMAGENUMBER) ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( index, CHAR_WORKOBJINDEX )); + CHAR_send_P_StatusString( index, CHAR_P_STRING_RIDEPET ); + } +#endif + } + } + return 1; +} + +/*====================================================================== + 平乓仿及失奶 丞毛健丹楮醒 + ======================================================================*/ + +/*====================苇月====================*/ +/*------------------------------------------------------------ + * 轾隙烂匹}公及 轾及平乓仿弁正卞苇月奶矛件玄毛 戏今六月 + * 娄醒 + * charaindex int 平乓仿奶件犯永弁旦 + * dir int 轾 + * 忒曰袄 + * 卅仄 + ------------------------------------------------------------*/ +void CHAR_Look( int charaindex, int dir ) +{ + int fl ,x,y; + OBJECT object; + + /* 奶件犯永弁旦及民尼永弁 */ + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return; + + if( dir < 0 ) { + dir = CHAR_getInt(charaindex,CHAR_DIR); + } + VALIDATEDIR(dir); + if( CHAR_getInt( charaindex, CHAR_DIR) != dir ) { + CHAR_setInt(charaindex,CHAR_DIR,dir); + /* 轾 晶仄凶失弁扑亦件毛霜耨允月 */ + CHAR_sendWatchEvent(CHAR_getWorkInt(charaindex,CHAR_WORKOBJINDEX), + CHAR_ACTTURN,NULL,0,TRUE); + } + + fl = CHAR_getInt(charaindex,CHAR_FLOOR); + CHAR_getCoordinationDir( CHAR_getInt(charaindex,CHAR_DIR), + CHAR_getInt(charaindex,CHAR_X), + CHAR_getInt(charaindex,CHAR_Y), + 1, &x, &y ); + + //CHAR_talkToCli( charaindex, -1, "调查四周环境。", CHAR_COLORWHITE ); + + for( object=MAP_getTopObj(fl,x,y) ; object ; + object = NEXT_OBJECT(object) ){ + int objindex = GET_OBJINDEX(object); + if( OBJECT_getType(objindex) == OBJTYPE_CHARA ){ + typedef void (*LOOKF)(int,int); + LOOKF lf; + lf = (LOOKF)CHAR_getFunctionPointer( + OBJECT_getIndex(objindex),CHAR_LOOKEDFUNC); + if( lf ) lf(OBJECT_getIndex(objindex),charaindex); + } + } +} + +BOOL _CHAR_makeObjectCString( char *file, int line, int objindex,char* buf, int buflen ) +{ + char objindexbuf[64]; + if( CHECKOBJECT(objindex) == FALSE ) return FALSE; + + switch( OBJECT_getType(objindex) ){ + case OBJTYPE_NOUSE: + return FALSE; + break; + case OBJTYPE_CHARA: + { + int charaindex = OBJECT_getIndex(objindex); + char escapename[256]; + char escapetitle[256]; + // shan add +1 + char tmp[128]; + int namecolor; +#ifdef _TRANS_6 +#ifdef _TRANS_7 + int namecolortbl[] = { CHAR_COLORWHITE, CHAR_COLORYELLOW, CHAR_COLORGREEN, + CHAR_COLORCYAN, CHAR_COLORRED, CHAR_COLORPURPLE, CHAR_COLORBLUE2,CHAR_COLORGRAY};//转生後的颜色 +#else + int namecolortbl[] = { CHAR_COLORWHITE, CHAR_COLORYELLOW, CHAR_COLORGREEN, + CHAR_COLORCYAN, CHAR_COLORRED, CHAR_COLORPURPLE, CHAR_COLORBLUE2};//转生後的颜色 +#endif +#else + int namecolortbl[] = { CHAR_COLORWHITE, CHAR_COLORYELLOW, CHAR_COLORGREEN, + CHAR_COLORCYAN, CHAR_COLORRED, CHAR_COLORPURPLE}; +#endif + int ridepet = BATTLE_getRidePet( charaindex ); + char petname[64] = ""; + char escapepetname[256]; + int petlevel = 0; + + if( !CHAR_getFlg(charaindex,CHAR_ISVISIBLE) )return FALSE; + namecolor = CHAR_getInt( charaindex, CHAR_TRANSMIGRATION); +#ifdef _TRANS_6 +#ifdef _TRANS_7 + if( namecolor > 7 ) namecolor = 7; +#else + if( namecolor > 6 ) namecolor = 6; +#endif +#else + if( namecolor > 5 ) namecolor = 5; +#endif + if( namecolor < 0 ) namecolor = 0; + + // shan add begin + if( CHAR_getWorkInt(charaindex, CHAR_WORKFMINDEXI) >= 0 + && CHAR_getWorkInt(charaindex, CHAR_WORKFMINDEXI) < FAMILY_MAXNUM + && CHAR_getInt( charaindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER + && CHAR_getWorkInt(charaindex, CHAR_WORKFMSETUPFLAG)!=1) +#ifdef _ITEM_SETLOVER + if(strlen( CHAR_getChar( charaindex, CHAR_LOVE)) > 0 && + strlen(CHAR_getChar(charaindex,CHAR_LOVERID))>0 && + strlen(CHAR_getChar(charaindex,CHAR_LOVERNAME))>0) + sprintf(tmp, "%s§♂%s♀",CHAR_getChar( charaindex, CHAR_FMNAME),CHAR_getChar( charaindex, CHAR_LOVERNAME)); + else + sprintf(tmp, "%s",CHAR_getChar( charaindex, CHAR_FMNAME)); +#else + sprintf(tmp, "%s",CHAR_getChar( charaindex, CHAR_FMNAME)); +#endif + else +#ifdef _ITEM_SETLOVER + if(strlen( CHAR_getChar( charaindex, CHAR_LOVE)) > 0 && + strlen(CHAR_getChar(charaindex,CHAR_LOVERID))>0 && + strlen(CHAR_getChar(charaindex,CHAR_LOVERNAME))>0) + sprintf(tmp, "♂%s♀",CHAR_getChar( charaindex, CHAR_LOVERNAME)); + else + strcpy(tmp, ""); +#else + strcpy(tmp, ""); +#endif + + // Robin 0730 + if( ridepet >= 0 ){ + if( ! strcmp( CHAR_getChar( ridepet, CHAR_USERPETNAME), "") ) + strcpy( petname, CHAR_getChar( ridepet, CHAR_NAME )); + else + strcpy( petname, CHAR_getChar( ridepet, CHAR_USERPETNAME )); + petlevel = CHAR_getInt( ridepet, CHAR_LV); + } +#ifdef _OBJSEND_C + #ifdef _CHAR_PROFESSION // WON ADD 人物职业 + #ifdef _ALLDOMAN // (不可开) Syu ADD 排行榜NPC + snprintf( buf, buflen, "%d|%d|%s|%d|%d|%d|%d|%d|%d|%s|%s|%d|%d|%d|%s|%s|%d|%d|%d|%d|%d", + #else + snprintf( buf, buflen, "%d|%d|%s|%d|%d|%d|%d|%d|%d|%s|%s|%d|%d|%d|%s|%s|%d|%d|%d|%d", + #endif + #else + snprintf( buf, buflen, "%d|%d|%s|%d|%d|%d|%d|%d|%d|%s|%s|%d|%d|%d|%s|%s|%d", + #endif + OBJTYPE_CHARA, +#else + #ifdef _GM_IDENTIFY + snprintf( buf, buflen, "%d|%s|%d|%d|%d|%d|%d|%d|%s|%s|%d|%d|%d|%s|%s|%d|%s", //多出了gm名称这个栏位 + #else + snprintf( buf, buflen, "%d|%s|%d|%d|%d|%d|%d|%d|%s|%s|%d|%d|%d|%s|%s|%d", + #endif +#endif + CHAR_getInt( charaindex, CHAR_WHICHTYPE), + cnv10to62( objindex,objindexbuf, sizeof(objindexbuf)), + OBJECT_getX(objindex), + OBJECT_getY(objindex), + CHAR_getInt( charaindex, CHAR_DIR), + CHAR_getInt( charaindex,CHAR_BASEIMAGENUMBER ), + CHAR_getInt( charaindex,CHAR_LV ), + namecolortbl[namecolor], + makeEscapeString( CHAR_getChar( charaindex,CHAR_NAME ), escapename, sizeof(escapename)), + makeEscapeString(CHAR_getChar(charaindex,CHAR_OWNTITLE), escapetitle,sizeof(escapetitle)), + CHAR_getFlg( charaindex,CHAR_ISOVERED ), + CHAR_getFlg( charaindex,CHAR_HAVEHEIGHT ), + CHAR_getInt( charaindex, CHAR_POPUPNAMECOLOR), + tmp, + makeEscapeString( petname, escapepetname, sizeof(escapepetname)), + petlevel +#ifdef _CHAR_PROFESSION // WON ADD 人物职业 + ,CHAR_getInt( charaindex, PROFESSION_CLASS) // 职业别 + ,CHAR_getInt( charaindex, PROFESSION_LEVEL) // 职业等级 +// ,CHAR_getInt( charaindex, PROFESSION_EXP) // 职业经验值 + ,CHAR_getInt( charaindex, PROFESSION_SKILL_POINT) // 技能点数 +#endif +#ifdef _ALLDOMAN // (不可开) Syu ADD 排行榜NPC + ,CHAR_getInt( charaindex, CHAR_HEROFLOOR ) // 英雄战场楼层 +#endif +#ifdef _GM_IDENTIFY + ,CHAR_getChar(charaindex, CHAR_GMIDENTIFY) //gm的名称 +#endif +#ifdef _PETSKILL_BECOMEPIG + // ,CHAR_getInt(charaindex, CHAR_BECOMEPIG) +#endif + ); + break; + } + case OBJTYPE_ITEM: + { + int itemindex = OBJECT_getIndex(objindex); + int nameint; + int leaklevel; + int color; + char bufbuf[256]; + char *temp; + leaklevel = ITEM_getInt( itemindex,ITEM_LEAKLEVEL ); + + nameint = ITEM_SECRETNAME; +// if( leaklevel >=1 ) { +// nameint = ITEM_SECRETNAME; +// }else { +// nameint = ITEM_NAME; +// } + color = CHAR_COLORWHITE; + if (ITEM_getChar( itemindex, ITEM_CDKEY) == NULL){ + return FALSE; + break; + } + temp=ITEM_getChar( itemindex, ITEM_CDKEY); + if( temp && strlen( temp ) ) { + color = CHAR_COLORGREEN; + }else { + if( ITEM_getInt( itemindex, ITEM_MERGEFLG) ) { + color = CHAR_COLORYELLOW; + } + } +#ifdef _OBJSEND_C + snprintf( buf, buflen, "%d|%s|%d|%d|%d|%d|%s", + OBJTYPE_ITEM, +#else + snprintf( buf, buflen, "%s|%d|%d|%d|%d|%s", +#endif + cnv10to62( objindex,objindexbuf, sizeof(objindexbuf)), + OBJECT_getX(objindex), OBJECT_getY(objindex), + ITEM_getInt( itemindex,ITEM_BASEIMAGENUMBER ), + color, + makeEscapeString( ITEM_getChar( itemindex,nameint), bufbuf, sizeof(bufbuf)) + ); + break; + } + case OBJTYPE_GOLD: +#ifdef _OBJSEND_C + snprintf( buf, buflen, "%d|%s|%d|%d|%d", + OBJTYPE_GOLD, +#else + snprintf( buf, buflen, "%s|%d|%d|%d", +#endif + cnv10to62( objindex,objindexbuf, sizeof(objindexbuf)), + OBJECT_getX(objindex),OBJECT_getY(objindex), + OBJECT_getIndex(objindex) ); + break; +#ifdef _OBJSEND_C +#ifdef _NPCSERVER_NEW + case OBJTYPE_NPCSCHARA: + { + char bufbuf[256]; + snprintf( buf, buflen, "%d|%s|%s|%d|%d|%d|%d", + OBJTYPE_NPCSCHARA, + cnv10to62( objindex,objindexbuf, sizeof(objindexbuf)), + makeEscapeString( OBJECT_getName( objindex), bufbuf, sizeof(bufbuf)), + OBJECT_getNpcdir( objindex), + OBJECT_getNpcImage( objindex), + OBJECT_getX(objindex), + OBJECT_getY(objindex)); + } + break; +#endif +#endif + default: + return FALSE; + break; + } + return TRUE; +} + +void CHAR_sendCSpecifiedObjindex( int fd, int index) +{ + char introduction[512]; + if( CHECKOBJECTUSE( index ) + && CHAR_makeObjectCString( index, introduction, + sizeof(introduction) ) ){ + lssproto_C_send( fd,introduction ); + }else{ + char mesg[32]; + cnv10to62( index, mesg, sizeof( mesg)); + lssproto_C_send( fd, mesg ); + } +} + +void CHAR_sendSpecifiedobjindexCToCharaindex(int charaindex,int objindex) +{ + int fd; + fd = getfdFromCharaIndex(charaindex); + if( fd == -1)return; + CHAR_sendCSpecifiedObjindex(fd,objindex); +} + +void CHAR_sendCToArroundCharacter( int objindex ) +{ + char introduction[512]; + int x,y,fl; + int i,j; + + if( CHAR_makeObjectCString( objindex,introduction, sizeof(introduction) ) == FALSE ) return; + + x = OBJECT_getX(objindex); + y = OBJECT_getY(objindex); + fl =OBJECT_getFloor(objindex); + + for( i = x - CHAR_DEFAULTSEESIZ/2 ; + i <= x +CHAR_DEFAULTSEESIZ/2 ; i ++ ){ + for( j = y - CHAR_DEFAULTSEESIZ/2; + j <= y + CHAR_DEFAULTSEESIZ/2; j ++ ){ + OBJECT object; + for( object = MAP_getTopObj( fl, i,j); + object; + object = NEXT_OBJECT(object) ){ + int objindexwk = GET_OBJINDEX( object); + if( OBJECT_getType(objindexwk) == OBJTYPE_CHARA ){ + int index = OBJECT_getIndex(objindexwk); + if( CHAR_getInt( index, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + int fd; + if( CHAR_getWorkInt( index, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE) continue; + fd = getfdFromCharaIndex( index); + if( fd == -1 )continue; + lssproto_C_send( fd,introduction ); + } + } + } + } + } +} + +void CHAR_sendCDArroundChar_Main( int fl, int x, int y, int objindex, BOOL mode ) +{ +#define CHAR_CDSEESIZ CHAR_DEFAULTSEESIZ+10 + + int i,j; + char cdmsg[64*2]; + cnv10to62( objindex,cdmsg, sizeof(cdmsg)); + for( i = x - CHAR_CDSEESIZ/2 ; i <= x +CHAR_CDSEESIZ/2 ; i ++ ){ + for( j = y - CHAR_CDSEESIZ/2; j <= y + CHAR_CDSEESIZ/2; j ++ ){ + OBJECT object; + for( object = MAP_getTopObj( fl, i,j); object; + object = NEXT_OBJECT(object) ){ + + int objindexwk = GET_OBJINDEX( object); + if( OBJECT_getType(objindexwk) == OBJTYPE_CHARA ){ + int index = OBJECT_getIndex( objindexwk); + if( CHAR_getInt( index,CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER) { + if( objindexwk != objindex ) { + int fd; + fd = getfdFromCharaIndex(index); + if( fd == -1 )continue; + if( CHAR_getWorkInt( index, CHAR_WORKBATTLEMODE) + == BATTLE_CHARMODE_NONE ) + { + CONNECT_appendCDbuf( fd, cdmsg, strlen( cdmsg)); + CDflush( index); + } + } + } + } + } + } + } +} + +void CHAR_sendCDArroundChar( int fl, int x, int y, int objindex ) +{ + CHAR_sendCDArroundChar_Main( fl,x,y,objindex,FALSE); +} + +void CHAR_sendArroundCharaData( int charaindex ) +{ + int fd; + int i,j,x, y,fl; + char introduction[512*2]; + char c_msg[1024*96]; + int strpos = 0; + char cabuf[128*2]; + fd = getfdFromCharaIndex( charaindex ); + if( fd == -1 )return; + c_msg[0] = '\0'; + fl = CHAR_getInt( charaindex, CHAR_FLOOR); + x = CHAR_getInt( charaindex, CHAR_X); + y = CHAR_getInt( charaindex, CHAR_Y); + + for( i = x-CHAR_DEFAULTSEESIZ/2 ; i <= x+CHAR_DEFAULTSEESIZ/2 ; i++ ){ + for( j = y-CHAR_DEFAULTSEESIZ/2 ; j <= y+CHAR_DEFAULTSEESIZ/2 ; j ++ ) { + OBJECT object; + for( object = MAP_getTopObj(fl,i,j) ; object ; object = NEXT_OBJECT(object ) ){ + int introlen; + int objindex = GET_OBJINDEX(object); + int c_index = OBJECT_getIndex( objindex); + + if( OBJECT_getType(objindex) == OBJTYPE_NOUSE ) continue; + if( OBJECT_getType(objindex) == OBJTYPE_CHARA && + !CHAR_getFlg(OBJECT_getIndex(objindex), CHAR_ISVISIBLE) ){ + continue; + } + if( OBJECT_getType( objindex) == OBJTYPE_CHARA) { + if( CHAR_getInt( c_index, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + /* 苇尹凶平乓仿互醮棉汹五及褪卅日壬伉□母□ 憎CA毛霜月 */ + if( CHAR_getWorkInt( c_index, CHAR_WORKPARTYMODE )== CHAR_PARTY_LEADER ){ + if( CHAR_makeCAOPT1String( objindex, cabuf, sizeof( cabuf), CHAR_ACTLEADER,1 )) { + CONNECT_appendCAbuf( fd,cabuf,strlen(cabuf)); + } + } + // Robin 0611 trade + /* 角色交易中 */ + if( CHAR_getWorkInt( c_index, CHAR_WORKTRADEMODE ) != CHAR_TRADE_FREE ) { + if( CHAR_makeCAOPT1String( objindex, cabuf, sizeof( cabuf), CHAR_ACTTRADE,1 )){ + CONNECT_appendCAbuf( fd,cabuf,strlen(cabuf)); + } + } + +#ifdef _ANGEL_SUMMON + if( CHAR_getWorkInt( c_index, CHAR_WORKANGELMODE ) == TRUE ) { + if( CHAR_makeCAOPT1String( objindex, cabuf, sizeof( cabuf), CHAR_ACTANGEL,1 )){ + CONNECT_appendCAbuf( fd,cabuf,strlen(cabuf)); + } + } +#endif + +#ifdef _MIND_ICON + //print("\nshan--->(batlmode)->%d", CHAR_getWorkInt( c_index, CHAR_WORKBATTLEMODE )); + if(CHAR_getWorkInt( c_index, CHAR_MIND_NUM) && + CHAR_getWorkInt( c_index, CHAR_WORKBATTLEMODE ) == BATTLE_CHARMODE_NONE){ + if( CHAR_makeCAOPT1String( objindex, cabuf, sizeof( cabuf), + CHAR_MIND, CHAR_getWorkInt( c_index, CHAR_MIND_NUM))){ + CONNECT_appendCAbuf( fd, cabuf, strlen(cabuf)); + //print("\nshan---->(1)cabuf-->%s", cabuf); + } + } +#endif + +#ifdef _STREET_VENDOR + if(CHAR_getWorkInt(c_index,CHAR_WORKSTREETVENDOR) == 1 && + CHAR_getWorkInt(c_index,CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE){ + if(CHAR_makeCAOPTString(objindex,cabuf,sizeof(cabuf), + CHAR_STREETVENDOR_OPEN,CHAR_getWorkChar(c_index,CHAR_STREETVENDOR_NAME))){ + CONNECT_appendCAbuf(fd,cabuf,strlen(cabuf)); + } + } +#endif + +#ifdef _ITEM_CRACKER + if(CHAR_getWorkInt( c_index, CHAR_WORKITEM_CRACKER)&& + CHAR_getWorkInt( c_index, CHAR_WORKBATTLEMODE ) == BATTLE_CHARMODE_NONE) + { + if( CHAR_makeCAOPT1String( objindex, cabuf, sizeof( cabuf), + CHAR_ITEM_CRACKER, CHAR_getWorkInt( c_index, CHAR_WORKITEM_CRACKER))) + { + CONNECT_appendCAbuf( fd, cabuf, strlen(cabuf)); + } + } +#endif + if( CHAR_getWorkInt( c_index, CHAR_WORKBATTLEMODE ) != BATTLE_CHARMODE_NONE ){ + if( CHAR_getWorkInt( c_index, CHAR_WORKBATTLEWATCH) == TRUE ) { + if( CHAR_makeCAOPT1String( objindex, cabuf, sizeof( cabuf), CHAR_ACTBATTLEWATCH, 1)) { + CONNECT_appendCAbuf( fd, cabuf, strlen( cabuf)); + } + }else { + int battleno = CHAR_getWorkInt( c_index, CHAR_WORKBATTLEINDEX); + int sideno = CHAR_getWorkInt( c_index, CHAR_WORKBATTLESIDE); + int helpno = FALSE; + if( BATTLE_CHECKINDEX( battleno ) == FALSE ){ + }else { + helpno = (BattleArray[ battleno].Side[ + CHAR_getWorkInt( c_index, CHAR_WORKBATTLESIDE)].flg & BSIDE_FLG_HELP_OK)?TRUE:FALSE; + } + if( CHAR_makeCAOPT3String( objindex, cabuf, sizeof( cabuf), CHAR_ACTBATTLE, + battleno,sideno,helpno)){ + CONNECT_appendCAbuf( fd,cabuf,strlen(cabuf)); + + } + } + } + if( CHAR_getWorkInt( c_index, CHAR_WORKACTION ) != -1 ) { + if( CHAR_makeCADefaultString( objindex, cabuf, sizeof( cabuf), + CHAR_getWorkInt( c_index, CHAR_WORKACTION))){ + CONNECT_appendCAbuf( fd,cabuf,strlen(cabuf)); + + } + } + }else if( CHAR_getInt( c_index, CHAR_WHICHTYPE ) == CHAR_TYPEPET ) { + if( CHAR_getWorkInt( c_index, CHAR_WORKACTION ) != -1 ){ + if( CHAR_makeCADefaultString( objindex, cabuf, sizeof( cabuf), + CHAR_getWorkInt( c_index, CHAR_WORKACTION))){ + CONNECT_appendCAbuf( fd,cabuf,strlen(cabuf)); + } + } + } +#ifdef _ADD_ACTION + else { //npc + + if( CHAR_CHECKINDEX( c_index) ) { + if( CHAR_getWorkInt( c_index, CHAR_WORKACTION ) > 0 ) { + if( CHAR_makeCADefaultString( objindex, cabuf, sizeof( cabuf), + CHAR_getWorkInt( c_index, CHAR_WORKACTION))) { + CONNECT_appendCAbuf( fd,cabuf,strlen(cabuf)); + + } + } + } + } +#endif + } + if( c_index == charaindex) continue; + if( CHAR_makeObjectCString( objindex, introduction, sizeof( introduction))){ + introlen = strlen( introduction); + introduction[introlen] = ','; + introduction[introlen+1] = '\0'; + + strcpysafe( &c_msg[strpos], sizeof( c_msg) - strpos, + introduction); + strpos += strlen( introduction); + } + } + } + } + dchop( c_msg, "," ); + if( strlen( c_msg) == 0 ) return; + lssproto_C_send( fd, c_msg); +} + +BOOL _CHAR_warpToSpecificPoint( char *file, int line, int charaindex, int floor, int x, int y) +{ + int objindex; + int per; + objindex = CHAR_getWorkInt(charaindex,CHAR_WORKOBJINDEX); + if( !MAP_IsValidCoordinate( floor, x, y )) { + print( "error: invalid Coordinate fl[%d] x[%d] y[%d] %s:%d from %s:%d\n", + floor, x, y, __FILE__, __LINE__, file, line); + return FALSE; + } + CHAR_sendCDArroundChar_Main( OBJECT_getFloor(objindex), + OBJECT_getX(objindex), + OBJECT_getY(objindex), + objindex, TRUE ); + + CHAR_setInt( charaindex,CHAR_FLOOR,floor); + CHAR_setInt( charaindex,CHAR_X,x); + CHAR_setInt( charaindex,CHAR_Y,y); + { + int of,ox,oy; + of = OBJECT_setFloor(objindex,floor); + ox = OBJECT_setX(objindex,x); + oy = OBJECT_setY(objindex,y); + if( !MAP_objmove( objindex,of,ox,oy,floor,x,y ) ){ + fprint( "ERROR MAP_OBJMOVE objindex=%d\n",objindex ); + } + } + per = ENCOUNT_getEncountPercentMin( charaindex, floor,x,y); + if( per != -1 ) { + CHAR_setWorkInt( charaindex, CHAR_WORKENCOUNTPROBABILITY_MIN, per); + } + per = ENCOUNT_getEncountPercentMax( charaindex, floor,x,y); + if( per != -1 ) { + CHAR_setWorkInt( charaindex, CHAR_WORKENCOUNTPROBABILITY_MAX, per); + } + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + CHAR_setWorkInt( charaindex, CHAR_ENCOUNT_FIX, 0); +#endif + + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER ) { + CAflush( charaindex ); + { + int i; + char* statuscat[]={"C","E",}; + for( i=0 ; i -1) && (CHAR_CHECKINDEX( petindex )) ) + + CHAR_warpToSpecificPoint( petindex, floor, x, y ); + } +#ifdef _STATUS_WATERWORD //水世界状态 + if( MAP_getMapFloorType( floor) == 1 ){ + CHAR_setWorkInt( charaindex, CHAR_WORKMAPFLOORTYPE, 1); + }else { + CHAR_setWorkInt( charaindex, CHAR_WORKMAPFLOORTYPE, 0); + } +#endif +#ifdef _MAP_TIME + // 如果进入的地图是这些编号的话,设定倒数 + if(floor >= 30017 && floor <= 30021){ + if(CHAR_getWorkInt(charaindex,CHAR_WORK_MAP_TIME) <= 0) CHAR_setWorkInt(charaindex,CHAR_WORK_MAP_TIME,60); + } + // 如果进入正常的地图 + else CHAR_setWorkInt(charaindex,CHAR_WORK_MAP_TIME,0); +#endif + +#ifdef _ANGEL_SUMMON + if( CHAR_getWorkInt( charaindex, CHAR_WORKANGELMODE ) == TRUE ) { + CHAR_sendAngelMark( objindex, 1); + } +#endif + + }else if( OBJECT_getType( objindex) == OBJTYPE_CHARA ){ + MAP_sendArroundChar( charaindex ); + } + + return TRUE; +} + +static void CHAR_walk_check( int charaindex ) +{ + if( strlen( CHAR_getWorkChar( charaindex ,CHAR_WORKWALKARRAY ) ) != 0 ){ + struct timeval old; + old.tv_sec = CHAR_getWorkInt(charaindex,CHAR_WORKWALKSTARTSEC); + old.tv_usec = CHAR_getWorkInt(charaindex,CHAR_WORKWALKSTARTMSEC); + if( time_diff_us(NowTime,old) >= CHAR_getInt(charaindex,CHAR_WALKINTERVAL)*1000.0 ) { + CHAR_walkcall( charaindex ); + }else { + } + } +} + +static BOOL CHAR_callLoop( int charaindex ) +{ + unsigned int timediff_us; + struct timeval old; + int loopinterval, iRet = FALSE; + loopinterval = CHAR_getInt(charaindex,CHAR_LOOPINTERVAL); + if( loopinterval <= 0 )return FALSE; + + //print("\n CHAR_callLoop:%d", charaindex); + + old.tv_sec = CHAR_getWorkInt(charaindex,CHAR_WORKLOOPSTARTSEC); + old.tv_usec = CHAR_getWorkInt(charaindex,CHAR_WORKLOOPSTARTMSEC); + timediff_us = time_diff_us( NowTime , old ); + + if( timediff_us >= loopinterval*1000.0 ){ + int (*loopfunc)(int)=NULL; + loopfunc =(int(*)(int))CHAR_getFunctionPointer( charaindex, CHAR_LOOPFUNC); + if( loopfunc ){ + loopfunc(charaindex); + iRet = TRUE; + } +#ifdef _USER_CHARLOOPS + loopfunc =(int(*)(int))CHAR_getFunctionPointer( charaindex, CHAR_LOOPFUNCTEMP1); + if( loopfunc ){ + loopfunc(charaindex); + iRet = TRUE; + } +#endif + if( iRet == FALSE ){ + CHAR_setInt( charaindex, CHAR_LOOPINTERVAL, 0); + } + + CHAR_setWorkInt(charaindex,CHAR_WORKLOOPSTARTSEC, NowTime.tv_sec); + CHAR_setWorkInt(charaindex,CHAR_WORKLOOPSTARTMSEC, NowTime.tv_usec); + } + return iRet; +} + + +int EnemyMoveNum = 10; +void CHAR_Loop( void ) +{ + int charnum=CHAR_getCharNum(); + int playernum = CHAR_getPlayerMaxNum(); + int petnum = CHAR_getPetMaxNum(); + static int charcnt = 0; + int i, movecnt=0; + + + if( charcnt == -1 ) { + charcnt = CHAR_getCharNum(); + } + + // 玩家用的loop + for( i=0 ; i< playernum ; i++ ){ + if( CHAR_getCharUse(i) == FALSE )continue; + CHAR_walk_check( i ); + CHAR_callLoop( i ); +#ifdef _TEACHER_SYSTEM + // 有获得导师声望 + if(CHAR_getWorkInt(i,CHAR_WORK_GET_TEACHER_FAME) > 0){ + int iAddTFame = CHAR_getInt(i,CHAR_TEACHER_FAME) + CHAR_getWorkInt(i,CHAR_WORK_GET_TEACHER_FAME); + int iAddFame = CHAR_getInt(i,CHAR_FAME) + CHAR_getWorkInt(i,CHAR_WORK_GET_TEACHER_FAME); + + // 加导师声望(导师声望最大值和个人声望最大值一样) + if(iAddTFame > MAX_PERSONALFAME) iAddTFame = MAX_PERSONALFAME; + else if(iAddTFame < 0) iAddTFame = 0; + CHAR_setInt(i,CHAR_TEACHER_FAME,iAddTFame); + // 加声望 + if(iAddFame > MAX_PERSONALFAME) iAddFame = MAX_PERSONALFAME; + else if(iAddFame < 0) iAddFame = 0; + CHAR_setInt(i,CHAR_FAME,iAddFame); + // 清为 0 + CHAR_setWorkInt(i,CHAR_WORK_GET_TEACHER_FAME,0); + // 若有家族,上传给ac保持二边资料同步 + if(CHAR_getInt(i,CHAR_FMLEADERFLAG) > 0 && CHAR_getInt(i,CHAR_FMLEADERFLAG) != FMMEMBER_APPLY){ + char tmpbuf1[16]; + + sprintf(tmpbuf1,"%d",iAddFame); + saacproto_ACFixFMData_send(acfd, + CHAR_getChar(i,CHAR_FMNAME), + CHAR_getInt(i,CHAR_FMINDEX), + CHAR_getWorkInt(i,CHAR_WORKFMINDEXI), + FM_FIX_FMFEED, + "0", // 只是为了同步资料,所以设为0,不动到家族的资料 + tmpbuf1, // 同步个人声望资料 + CHAR_getWorkInt(i,CHAR_WORKFMCHARINDEX), + CONNECT_getFdid(getfdFromCharaIndex(i)) + ); + } + } +#endif + } + + // 玩家以外的Object用的loop + for( i = 0, movecnt = 0 ; i < (petnum/2) ; i++, charcnt++ ){ + if( charcnt >= charnum )charcnt = playernum ; + if( CHAR_getCharUse(charcnt) == FALSE )continue; + if( CHAR_callLoop(charcnt) == TRUE ){ + if( ++movecnt >= EnemyMoveNum )break; + } + } + +} + +char* CHAR_appendNameAndTitle( int charaindex, char* src, char* buf, + int buflen ) +{ + if( buflen > 0 ){ + if( CHAR_CHECKINDEX(charaindex) == FALSE ) + snprintf( buf,buflen,"%s",src ); + else{ + int titleindex = CHAR_getInt(charaindex,CHAR_INDEXOFEQTITLE); + if( titleindex == -1 ) + snprintf( buf,buflen, "%s:%s", + CHAR_getChar(charaindex,CHAR_NAME), src ); + else + snprintf( buf,buflen, "%s(%s):%s", + CHAR_getChar(charaindex,CHAR_NAME), + TITLE_makeTitleStatusString(charaindex, + titleindex), src ); + } + } + return buf; +} + +void CHAR_getCoordinationDir( int dir , int x, int y ,int c, + int *xout , int *yout ) +{ + *xout = x + CHAR_getDX(dir) * c; + *yout = y + CHAR_getDY(dir) * c; +} + +BOOL CHAR_createCharacter( int type, int floor, int x, int y,int dir, + int* charaindex, int* objindex, BOOL seemap ) +{ + Char ch; + Object ob; + if( !CHAR_getDefaultChar( &ch,type ) )return FALSE; + + ch.data[CHAR_FLOOR] = floor; + ch.data[CHAR_X] = x; + ch.data[CHAR_Y] = y; + ch.data[CHAR_DIR] = dir; + + *charaindex = CHAR_initCharOneArray( &ch ); + if( *charaindex == -1 )return FALSE; + + ob.type = OBJTYPE_CHARA; + ob.index = *charaindex; + ob.floor = floor; + ob.x = x; + ob.y = y; + + if( seemap && MAP_walkAble( *charaindex, floor,x,y ) == FALSE ){ + CHAR_endCharOneArray( *charaindex ); + return FALSE; + } + + *objindex = initObjectOne( &ob ); + if( *objindex == -1 ){ + CHAR_endCharOneArray(*charaindex); + return FALSE; + } + CHAR_setWorkInt( *charaindex,CHAR_WORKOBJINDEX,*objindex); + + /* 生永玄伐□弁毛垫丹 */ + + CHAR_sendWatchEvent( *objindex,CHAR_ACTSTAND,NULL,0,TRUE); + + return TRUE; +} + +void CHAR_ObjectDelete( int objindex ) +{ + CHAR_sendCDArroundChar( OBJECT_getFloor(objindex), + OBJECT_getX(objindex), + OBJECT_getY(objindex), + objindex ); +#ifdef _MAP_WARPPOINT + if( OBJECT_getType( objindex) == OBJTYPE_WARPPOINT ){ + print("Delete OBJTYPE_WARPPOINT endObjectOne( %d) [%d,%d,%d] \n ", objindex, + OBJECT_getFloor(objindex), OBJECT_getX(objindex), + OBJECT_getY(objindex) ); + } +#endif + endObjectOne(objindex); +} + +/*------------------------------------------------------------ + * 平乓仿毛绰轮允月[左皮斥尼弁玄手绰轮允月[ + * 生永玄伐□弁及支曰酸仄毛卅仁允凶户及手及 + * 娄醒 + * charaindex int 平乓仿奶件犯永永弁旦 + * 忒曰袄 + * 卅仄 + ------------------------------------------------------------*/ +void CHAR_CharaDelete( int charaindex ) +{ + /* 左皮斥尼弁玄毛绰轮 */ + CHAR_ObjectDelete( CHAR_getWorkInt( charaindex,CHAR_WORKOBJINDEX ) ); + /* 平乓仿及绰轮 */ + CHAR_endCharOneArray( charaindex ); +} +/*------------------------------------------------------------ + * 皿伊奶乩□及 匀化中月矢永玄毛壅允 + ------------------------------------------------------------*/ +void CHAR_CharaDeleteHavePet( int charaindex) +{ + int i; + int pindex; + + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ) { + pindex = CHAR_getCharPet( charaindex, i); + if( CHAR_CHECKINDEX( pindex)) { + CHAR_endCharOneArray( pindex ); + } + } + for( i = 0; i < CHAR_MAXPOOLPETHAVE; i ++ ) { + pindex = CHAR_getCharPoolPet( charaindex, i); + if( CHAR_CHECKINDEX( pindex)) { + CHAR_endCharOneArray( pindex ); + } + } +} +/*------------------------------------------------------------ + * 减变升啼卅升毛 蜇允月[ + * mode int 0: 愤坌卞反CA霜日卅中 + * 1: 愤坌卞手CA霜月 + ------------------------------------------------------------*/ +int CHAR_sendAction( int charaindex, int action, int mode) +{ + /* 霜日木化 凶失弁扑亦件午CA毛域谯今六月 □皮伙 */ + static int table[] = { + CHAR_ACTATTACK,CHAR_ACTDAMAGE,CHAR_ACTDOWN,CHAR_ACTACTIONSTAND, + CHAR_ACTACTIONWALK,CHAR_ACTSIT,CHAR_ACTHAND,CHAR_ACTPLEASURE, + CHAR_ACTANGRY,CHAR_ACTSAD,CHAR_ACTGUARD, CHAR_ACTNOD, CHAR_ACTTHROW + }; + if( action < 0 || action >= arraysizeof( table)) return FALSE; + + /* 璃曰卞失弁扑亦件毛霜耨允月 */ + CHAR_sendWatchEvent( + CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX), + table[action], + NULL,0,mode); + + /* 失弁扑亦件及瓒 */ + CHAR_setWorkInt( charaindex, CHAR_WORKACTION, table[action]); + + return TRUE; +} +/*------------------------------------------------------------ + * 愤坌互爵 匹丐月午中丹仪毛霜耨允月[ + ------------------------------------------------------------*/ +void CHAR_sendBattleEffect( int charaindex, int onoff) +{ + int opt[3]; + + if( onoff == 1) { + opt[0] = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX); + opt[1] = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLESIDE); + opt[2] = (BattleArray[CHAR_getWorkInt( charaindex, + CHAR_WORKBATTLEINDEX)].Side[ + CHAR_getWorkInt( charaindex, + CHAR_WORKBATTLESIDE)].flg & BSIDE_FLG_HELP_OK) ? TRUE:FALSE; + } + else { + opt[0] = -1; + opt[1] = -1; + opt[2] = 0; + } + + CHAR_sendWatchEvent( CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX), + CHAR_ACTBATTLE,opt,arraysizeof(opt),TRUE); +} + +/*------------------------------------------------------------ + * 交易中传送讯息 add code Shan 2001/06/30 + ------------------------------------------------------------*/ +void CHAR_sendTradeEffect( int charaindex, int onoff) +{ + int opt[1]; + + if( onoff == 1) { + opt[0] = 1; + } + else { + opt[0] = -1; + } + CHAR_sendWatchEvent( CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX), + CHAR_ACTTRADE,opt,arraysizeof(opt),TRUE); +} + +#ifdef _ANGEL_SUMMON +void CHAR_sendAngelEffect( int charaindex, int onoff) +{ + int opt[1]; + + if( onoff == 1) { + opt[0] = 1; + } + else { + opt[0] = -1; + } + CHAR_sendWatchEvent( CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX), + CHAR_ACTANGEL,opt,arraysizeof(opt),TRUE); +} +#endif + +#ifdef _MIND_ICON +void CHAR_sendMindEffect( int charaindex, int onoff) +{ + int opt[1]; + + if(onoff>0){ + opt[0] = onoff; + } + else{ + opt[0] = 0; + } + CHAR_sendWatchEvent( CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX), + CHAR_MIND, opt, arraysizeof(opt), FALSE); +} +#endif +#ifdef _ITEM_CRACKER +void CHAR_sendCrackerEffect( int charaindex, int onoff) +{ + int opt[1]; + opt[0] = onoff; + CHAR_sendWatchEvent( CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX), + CHAR_ITEM_CRACKER, opt, arraysizeof(opt), FALSE); +} +#endif + +void CHAR_inputUserPetName( int index , int havepetindex, char* name ) +{ + int petindex; + //char category[3]; + char *mycdkey=NULL, *cdkey = NULL; + BOOL changenameflg = FALSE; + + if( !CHAR_CHECKINDEX( index ) ) return; + + petindex = CHAR_getCharPet( index, havepetindex); + if( !CHAR_CHECKINDEX( petindex)) return; + + if (CHAR_getInt(petindex, CHAR_PETFAMILY) == 1){ + CHAR_talkToCli(index, -1, "家族守护兽无法修改名字!", CHAR_COLORYELLOW); + return; + } + + mycdkey = CHAR_getChar( index, CHAR_CDKEY); + cdkey = CHAR_getChar( petindex, CHAR_CDKEY); + if( cdkey == NULL ) { + print( "can't get CDKEY\n"); + }else { + if( strlen( cdkey) == 0 || strcmp( cdkey, mycdkey) == 0 ) { + changenameflg = TRUE; + } + } + if( !changenameflg) { + CHAR_talkToCli( index, -1, "无法为宠物命名。", CHAR_COLORYELLOW ); + return; + } + + CHAR_setChar( petindex, CHAR_USERPETNAME ,name); + + if( strlen( name ) == 0 || + strcmp( CHAR_getChar( petindex, CHAR_NAME), name) == 0 ){ + CHAR_setChar( petindex, CHAR_CDKEY, ""); + }else { + CHAR_setChar( petindex, CHAR_CDKEY, mycdkey); + } + CHAR_send_K_StatusString( index, havepetindex, CHAR_K_STRING_USERPETNAME); +} + +static void CHAR_setLuck( int charaindex) +{ + LSTIME nowlstime; + LSTIME mylstime; + struct { + int prob; + int luck; + }lucktbl[] = { + { 60, 1 }, /* 40% */ + { 30, 2 }, /* 30% */ + { 10, 3 }, /* 20% */ + { 3, 4 }, /* 7% */ + { 0, 5 } /* 3% */ + }; + + if( !CHAR_CHECKINDEX( charaindex)) return; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE) != CHAR_TYPEPLAYER) return; + + RealTimeToLSTime( NowTime.tv_sec, &nowlstime); + RealTimeToLSTime( CHAR_getInt( charaindex, CHAR_LASTTIMESETLUCK), &mylstime); + + /* LS凛棉匹ㄠ 动晓烦匀化中木壬CHAR_LUCK毛凳蕙允月 */ + if( nowlstime.day != mylstime.day || nowlstime.year != mylstime.year ) { + int i,r; + r = RAND( 0, 99); + for( i = 0; i < arraysizeof( lucktbl); i ++ ) { + if( r >= lucktbl[i].prob ) { + CHAR_setInt( charaindex, CHAR_LUCK, lucktbl[i].luck); + CHAR_setInt( charaindex, CHAR_LASTTIMESETLUCK, NowTime.tv_sec); + return; + } + } + } +} +void CHAR_JoinBattle_WindowResult( int charaindex, int select, char *data) +{ + int ret = FALSE; + int fd = getfdFromCharaIndex( charaindex); + +#if 1 // 修正利用参战重复加入战斗 Robin + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE) { + CHAR_talkToCli( charaindex, -1, " 重复加入战斗! ", CHAR_COLORRED); + print("\n 改封包!!重复加入战斗!:%s ", CHAR_getChar( charaindex, CHAR_CDKEY) ); + //lssproto_EN_send( fd, FALSE, 0 ); + return; + } +#endif + if( select != WINDOW_BUTTONTYPE_CANCEL && + CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE) == CHAR_PARTY_NONE ){ + while( 1 ) { + int selected; + int bcharaindex; + if( fd == -1 ) break; + selected = atoi( data)-1; + + if( !CHAR_CHECKINDEX( CONNECT_getBattlecharaindex(fd,selected))) { + break; + } + if( CHAR_getWorkInt( CONNECT_getBattlecharaindex(fd,selected), + CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE){ + break; + } + if( BattleArray[ CHAR_getWorkInt( + CONNECT_getBattlecharaindex( fd,selected), + CHAR_WORKBATTLEINDEX)].type != BATTLE_TYPE_P_vs_E ){ + break; + } + bcharaindex = CONNECT_getBattlecharaindex( fd,selected); + if( !(BattleArray[CHAR_getWorkInt( bcharaindex, + CHAR_WORKBATTLEINDEX)].Side[ + CHAR_getWorkInt( bcharaindex, + CHAR_WORKBATTLESIDE)].flg + & BSIDE_FLG_HELP_OK)){ + break; + } + if(NPC_Util_CharDistance( charaindex, + CONNECT_getBattlecharaindex( + fd,selected) )> 1){ + break; + } + if( BATTLE_RescueEntry( charaindex, + CONNECT_getBattlecharaindex(fd,selected) )){ + CHAR_talkToCli( charaindex, -1, "无法参战。", + CHAR_COLORYELLOW); + }else { + ret = TRUE; + } + + break; + } + } + if( ret == FALSE ) { + if( fd != -1 ) { + lssproto_EN_send( fd, FALSE, 0 ); + } + } +} +void CHAR_JoinDuel_WindowResult( int charaindex, int select, char *data) +{ + int ret = FALSE; + int fd = getfdFromCharaIndex( charaindex); + /* 手丹域蘸民尼永弁允月 */ + if( select != WINDOW_BUTTONTYPE_CANCEL && + CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE) != CHAR_PARTY_CLIENT ) + { + /* 生旦玄互丹匀午云仄中及匹ㄠ蘸分仃伙□皿毛银丹 */ + while( 1 ) { + int selected; + int enemyindex; + + if( fd == -1 ) break; + selected = atoi( data)-1; + /* 躲卅index井 */ + if( !CHAR_CHECKINDEX( CONNECT_getDuelcharaindex(fd,selected)) ) { + break; + } + /* 爵 井升丹井 */ + if( CHAR_getWorkInt( CONNECT_getDuelcharaindex(fd,selected), + CHAR_WORKBATTLEMODE) + != BATTLE_CHARMODE_NONE) + { + break; + } + /* duel第井 */ + if( !CHAR_getFlg( CONNECT_getDuelcharaindex(fd,selected), + CHAR_ISDUEL)) + { + break; + } + /* ㄠ汹动 卞中月井(它奴件玉它匹 中宁歹六仄化月棉卞 仃月啃) */ + if(NPC_Util_CharDistance( charaindex, + CONNECT_getDuelcharaindex(fd,selected) ) + > 1) + { + break; + } + // 及蟆及平乓仿及奶件犯永弁旦 + enemyindex = CONNECT_getDuelcharaindex( fd,selected); + // 锹澎互褪卅日公及引引巨件市它件玄今六月互 + // 阂间卅日褪毛裟氏匹仁月 + if( CHAR_getWorkInt( enemyindex, CHAR_WORKPARTYMODE ) + == CHAR_PARTY_CLIENT ) + { + enemyindex = CHAR_getWorkInt( enemyindex, CHAR_WORKPARTYINDEX1 ); + // 卅兮井褪互中卅中 + if( enemyindex < 0 ) break; + } + /* 锹澎互皿伊奶乩□匹卅中仪手丐月 */ + if( CHAR_getWorkInt( enemyindex, CHAR_WHICHTYPE) != CHAR_TYPEPLAYER){ + break; + } + ret = BATTLE_CreateVsPlayer( charaindex, enemyindex ); + if( ret != 0 ){ + CHAR_talkToCli( charaindex, -1, + "遭遇失败!", CHAR_COLORYELLOW); + ret = FALSE; + } + else { + ret = TRUE; + } + break; + } + } + if( ret == FALSE ) { + /* 瑛绊霜耨 */ + if( fd != -1 ) { + lssproto_EN_send( fd, FALSE, 0 ); + } + } +} +void CHAR_SelectCard_WindowResult( int charaindex, int select, char *data) +{ + if( select != WINDOW_BUTTONTYPE_CANCEL ){ + while( 1 ) { + int selected; + int fd; + fd = getfdFromCharaIndex( charaindex); + if( fd == -1 ) break; + selected = atoi( data)-1; + if( !CHAR_CHECKINDEX( + CONNECT_getTradecardcharaindex(fd,selected))) { + break; + } + if( CHAR_getWorkInt( CONNECT_getTradecardcharaindex(fd,selected), + CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE){ + break; + } + if(!CHAR_getFlg( CONNECT_getTradecardcharaindex(fd,selected), + CHAR_ISTRADECARD)){ + break; + } + if( NPC_Util_CharDistance( charaindex, + CONNECT_getTradecardcharaindex + (fd,selected) ) > 1){ + break; + } + ADDRESSBOOK_addAddressBook( charaindex, + CONNECT_getTradecardcharaindex( + fd,selected)); + break; + } + } +} + +void CHAR_JoinParty_WindowResult( int charaindex , int select, char *data) +{ + int ret = FALSE; + int fd = getfdFromCharaIndex( charaindex); + /* 手丹域蘸民尼永弁允月 */ + if( select != WINDOW_BUTTONTYPE_CANCEL && + /* 愤坌互由□ 奴赚氏匹凶日蛲 */ + CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE) == CHAR_PARTY_NONE ) + { + /* 生旦玄互丹匀午云仄中及匹ㄠ蘸分仃伙□皿毛银丹 */ + while( 1 ) { + int parray; + int selected; + int toindex = -1; + if( fd == -1 ) break; + selected = atoi( data)-1; + + /* 躲卅index井 + * (褐邰“它奴件玉它匹 中宁歹六仄化月棉卞 + * 躲卅index卞卅月第 岭互丐月) + */ + if( !CHAR_CHECKINDEX( + CONNECT_getJoinpartycharaindex(fd,selected))) { + break; + } + /* 褪互中凶日娄匀舰曰请允 */ + if( CHAR_getWorkInt( CONNECT_getJoinpartycharaindex( + fd,selected), CHAR_WORKPARTYMODE) + == CHAR_PARTY_NONE ) + { + toindex = CONNECT_getJoinpartycharaindex( fd,selected ); + } + else { + toindex = CHAR_getPartyIndex( + CONNECT_getJoinpartycharaindex(fd,selected), 0); + if( !CHAR_CHECKINDEX( toindex) ) { + print( " %s:%d err\n", __FILE__, __LINE__); + break; + } + } + /* ㄠ汹动 卞中月井(它奴件玉它匹 中宁歹六仄化月棉卞 仃月啃) */ + if( NPC_Util_CharDistance( charaindex, toindex ) > 1) { + break; + } + /* 爵 反分户 */ + if( CHAR_getWorkInt( toindex, CHAR_WORKBATTLEMODE) + != BATTLE_CHARMODE_NONE) + { + break; + } + /* 醮棉袱第乒□玉井 */ + if( !CHAR_getFlg( toindex, CHAR_ISPARTY)) { + break; + } + + /* 锹澎由□ 奴及谛醒反 井" */ + parray = CHAR_getEmptyPartyArray( toindex) ; + if( parray == -1 ) break; + +#ifdef _DEATH_CONTEND + if(CHAR_getInt(toindex,CHAR_PKLISTTEAMNUM) == -1 && CHAR_getInt(charaindex,CHAR_PKLISTTEAMNUM) == -1){ + }else if(CHAR_getInt(charaindex,CHAR_PKLISTLEADER) > 0 || + CHAR_getInt(toindex, CHAR_PKLISTTEAMNUM) < 0 || + CHAR_getInt(charaindex, CHAR_PKLISTTEAMNUM) < 0 || + CHAR_getInt(toindex,CHAR_PKLISTTEAMNUM) != CHAR_getInt(charaindex,CHAR_PKLISTTEAMNUM) || + CHAR_getInt(toindex,CHAR_WHICHTYPE) != CHAR_TYPEPLAYER){ + CHAR_talkToCli( charaindex, -1, "队伍不同,无法加入团队。", CHAR_COLORYELLOW); + ret = FALSE; + break; + } +#endif + + /* 由□ 奴卞 日六月 */ + CHAR_JoinParty_Main( charaindex, toindex); + + ret = TRUE; + + break; + } + } + if( ret == FALSE ) { + CHAR_talkToCli( charaindex, -1, "无法加入团队。", + CHAR_COLORYELLOW); + } + /* 瑛绊霜耨 */ + if( fd != -1 ) { + lssproto_PR_send( fd, 1, ret); + } +} +void CHAR_JoinBattleWatch_WindowResult( int charaindex, int select, char *data) +{ + int ret = FALSE; + int fd = getfdFromCharaIndex( charaindex); + /* 手丹域蘸民尼永弁允月 */ + if( select != WINDOW_BUTTONTYPE_CANCEL ) { + /* 生旦玄互丹匀午云仄中及匹ㄠ蘸分仃伙□皿毛银丹 */ + while( 1 ) { + int selected; + if( fd == -1 ) break; + selected = atoi( data)-1; + + /* 躲卅index井 + * (褐邰“它奴件玉它匹 中宁歹六仄化月棉卞 + * 躲卅index卞卅月第 岭互丐月) + */ + if( !CHAR_CHECKINDEX( CONNECT_getBattlecharaindex(fd,selected))) { + break; + } + /* 爵 井升丹井 */ + if( CHAR_getWorkInt( CONNECT_getBattlecharaindex(fd,selected), + CHAR_WORKBATTLEMODE) + == BATTLE_CHARMODE_NONE) + { + break; + } + /* ㄠ汹动 卞中月井(它奴件玉它匹 中宁歹六仄化月棉卞 仃月啃) */ + if(NPC_Util_CharDistance( charaindex, + CONNECT_getBattlecharaindex( + fd,selected) ) + > 1) + { + break; + } + /* 巨件玄伉□今六月 */ + if( BATTLE_WatchEntry( charaindex, + CONNECT_getBattlecharaindex(fd,selected) + )) + { + CHAR_talkToCli( charaindex, -1, "无法观战。", + CHAR_COLORYELLOW); + } + else { + ret = TRUE; + } + + break; + } + } + if( ret == FALSE ) { + /* 瑛绊霜耨 */ + if( fd != -1 ) { + lssproto_EN_send( fd, FALSE, 0 ); + } + } +} + +#ifdef _FM_MODIFY +extern void NPC_FmDengonWindowTalked( int index, int talker, int seqno, int select, char *data); +#endif + +void CHAR_processWindow(int charaindex, int seqno, int select, + int objindex, char* data ) +{ + if( CHECKOBJECTUSE(objindex)) { + if( OBJECT_getType(objindex) == OBJTYPE_CHARA ) { + typedef void (*WINDF)(int,int,int, int,char*); + WINDF windowtalkedfunc=NULL; + windowtalkedfunc = (WINDF)CHAR_getFunctionPointer( + OBJECT_getIndex(objindex),CHAR_WINDOWTALKEDFUNC); + if( windowtalkedfunc ) { + windowtalkedfunc( OBJECT_getIndex(objindex), charaindex, + seqno, select, data); + } + } +#ifdef _NPCSERVER_NEW //CHAR_WINDOWTALKEDFUNC + else if( OBJECT_getType(objindex) == OBJTYPE_NPCSCHARA ) { + int npcindex = OBJECT_getNpcIndex( objindex); + if( npcfd != -1 ) + NPCS_NpcWinMess_send( objindex, npcindex, charaindex, data, seqno, select); + } +#endif + }else { + if( seqno == CHAR_WINDOWTYPE_SELECTBATTLE) { + CHAR_JoinBattle_WindowResult( charaindex, select, data); + }else if( seqno == CHAR_WINDOWTYPE_SELECTDUEL) { + CHAR_JoinDuel_WindowResult( charaindex, select, data); + }else if( seqno == CHAR_WINDOWTYPE_SELECTTRADECARD) { + CHAR_SelectCard_WindowResult( charaindex, select, data); + }else{ + if( seqno == CHAR_WINDOWTYPE_SELECTPARTY) { + CHAR_JoinParty_WindowResult( charaindex, select, data); + }else { + if( seqno == CHAR_WINDOWTYPE_SELECTBATTLEWATCH) { + CHAR_JoinBattleWatch_WindowResult( charaindex, select, data); + }else if( seqno >= CHAR_WINDOWTYPE_SELECTRENAMEITEM_PAGE1 && + seqno <= CHAR_WINDOWTYPE_SELECTRENAMEITEM_RENAME_ATTENTION ){ + ITEM_useRenameItem_WindowResult( charaindex, seqno, select, data); + } +#ifdef _PETSKILL_CANNEDFOOD + else if( seqno == ITEM_WINDOWTYPE_SELECTPETSKILL_SELECT ){ + ITEM_usePetSkillCanned_WindowResult( charaindex, seqno, select, data); + } +#endif + } + } +#ifdef _FM_MODIFY + if(seqno >= CHAR_WINDOWTYPE_FM_DENGON || seqno <= CHAR_WINDOWTYPE_FM_DPSELECT) + NPC_FmDengonWindowTalked(0,charaindex,seqno,select,data); +#endif + } +} + +void CHAR_PartyUpdate( int charaindex, int senddata ){ + int i, ownerindex, mode, pindex, pno; + mode = CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE ); + if( mode == CHAR_PARTY_NONE )return; + if( mode == CHAR_PARTY_LEADER ){ + ownerindex = charaindex; + }else{ + ownerindex = CHAR_getWorkInt( charaindex, CHAR_WORKPARTYINDEX1 ); + } + + for( pno = 0; pno < CHAR_PARTYMAX; pno ++ ){ + pindex = CHAR_getWorkInt( ownerindex, CHAR_WORKPARTYINDEX1+pno ); + if( pindex == charaindex )break; + } + if( pno == CHAR_PARTYMAX )return; + for( i = 0; i < CHAR_PARTYMAX; i ++ ){ + pindex = CHAR_getWorkInt( ownerindex, CHAR_WORKPARTYINDEX1+i ); + if( pindex == charaindex )continue; + if( pindex < 0 )continue; + CHAR_send_N_StatusString( pindex, pno, senddata ); + } +} + +static int CHAR_getObjectByPosition( int myobjindex, int fl, int x, int y, + int *objbuf, int objbuflen) +{ + int i,j; + int cnt = 0; + + for( i = x-CHAR_DEFAULTSEESIZ/2 ; i <= x+CHAR_DEFAULTSEESIZ/2 ; i++ ){ + for( j = y-CHAR_DEFAULTSEESIZ/2 ; j <= y+CHAR_DEFAULTSEESIZ/2 ; + j ++ ) + { + OBJECT object; + for( object = MAP_getTopObj(fl,i,j) ; + object ; + object = NEXT_OBJECT(object ) ) + { + int objindex = GET_OBJINDEX(object); + if( OBJECT_getType(objindex) == OBJTYPE_NOUSE ) continue; + if( OBJECT_getType( objindex) == OBJTYPE_CHARA && + !CHAR_getFlg( OBJECT_getIndex( objindex), CHAR_ISVISIBLE)) + { + continue; + } + /* 愤坌反中中方 */ + if( objindex == myobjindex) continue; + + objbuf[cnt] = objindex; + cnt ++; + if( cnt >= objbuflen) return cnt; + } + } + } + return cnt; +} +static void CHAR_setMyPosition_sendData( int charaindex,int prev_x, int prev_y, int x, int y) +{ + int CurrentObjCollection[CHAR_DEFAULTSEESIZ*CHAR_DEFAULTSEESIZ*10]; + int PrevObjCollection[CHAR_DEFAULTSEESIZ*CHAR_DEFAULTSEESIZ*10]; + int curcnt,prevcnt; + int objindex; + int fl; + char introduction[512]; + char c_msg[1024*96]; + char buf[64]; + int strpos; + int fd; + int i,j; + char cabuf[128]; + char myintroduction[512]; + char cd_msg[128]; + + fd = CHAR_getWorkInt( charaindex, CHAR_WORKFD); + if( fd == -1 )return; + + objindex = CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX); + fl = CHAR_getInt( charaindex, CHAR_FLOOR); + + curcnt = CHAR_getObjectByPosition( objindex, fl,x,y, CurrentObjCollection, sizeof(CurrentObjCollection)); + prevcnt = CHAR_getObjectByPosition( objindex, fl, prev_x, prev_y, PrevObjCollection, sizeof(PrevObjCollection)); + strpos = 0; + c_msg[0] = '\0'; + if( !CHAR_makeObjectCString( objindex, myintroduction,sizeof( myintroduction))){ + myintroduction[0] = '\0'; + } + + for( i = 0 ; i < curcnt; i ++ ) { + int findflg = FALSE; + for( j = 0; j < prevcnt; j ++ ) { + if( CurrentObjCollection[i] == PrevObjCollection[j] ) { + findflg = TRUE; + break; + } + } + if( !findflg ) { + int introlen; + int c_index = OBJECT_getIndex( CurrentObjCollection[i]); + if( CHAR_makeObjectCString( CurrentObjCollection[i], introduction, + sizeof( introduction))) + { + introlen = strlen( introduction); + introduction[introlen] = ','; + introduction[introlen+1] = '\0'; + + strcpysafe( &c_msg[strpos], sizeof( c_msg) - strpos, + introduction); + strpos += strlen( introduction); + if( strpos >= sizeof( c_msg)) break; + } + if( strlen( myintroduction) != 0 ) { + if( OBJECT_getType( CurrentObjCollection[i] ) == OBJTYPE_CHARA ) { + if( CHAR_getInt( c_index, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER) { + int tofd = getfdFromCharaIndex( c_index ); + CDsend( tofd); + lssproto_C_send( tofd, myintroduction); + } + } + } + if( OBJECT_getType( CurrentObjCollection[i]) == OBJTYPE_CHARA ) { + if( CHAR_getInt( c_index, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER && + CHAR_getWorkInt( c_index, CHAR_WORKPARTYMODE ) + == CHAR_PARTY_LEADER ){ + if( CHAR_makeCAOPT1String( CurrentObjCollection[i], cabuf, sizeof( cabuf), + CHAR_ACTLEADER,1 )){ + CONNECT_appendCAbuf( fd,cabuf,strlen(cabuf)); + } + } + + // Robin 0611 trade + /* 角色交易中 */ + if( CHAR_getInt( c_index, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER && + CHAR_getWorkInt( c_index, CHAR_WORKTRADEMODE ) != CHAR_TRADE_FREE ) { + if( CHAR_makeCAOPT1String( objindex, cabuf, sizeof( cabuf), CHAR_ACTTRADE,1 )) + { + CONNECT_appendCAbuf( fd,cabuf,strlen(cabuf)); + } + } + +#ifdef _ANGEL_SUMMON + if( CHAR_getInt( c_index, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER && + CHAR_getWorkInt( c_index, CHAR_WORKANGELMODE ) == TRUE ) { + if( CHAR_makeCAOPT1String( objindex, cabuf, sizeof( cabuf), CHAR_ACTANGEL,1 )) + { + CONNECT_appendCAbuf( fd,cabuf,strlen(cabuf)); + } + } +#endif + +#ifdef _MIND_ICON + if( CHAR_getInt( c_index, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER && + CHAR_getWorkInt( c_index, CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE && + CHAR_getWorkInt( c_index, CHAR_MIND_NUM)) + { + if( CHAR_makeCAOPT1String( objindex, cabuf, sizeof( cabuf), + CHAR_MIND, CHAR_getWorkInt( c_index, CHAR_MIND_NUM))) + { + CONNECT_appendCAbuf( fd, cabuf, strlen( cabuf)); + //print("\nshan---->(2)cabuf-->%s", cabuf); + } + } +#endif +#ifdef _STREET_VENDOR + if(CHAR_getWorkInt(c_index,CHAR_WORKSTREETVENDOR) == 1 && + CHAR_getWorkInt(c_index,CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE){ + if(CHAR_makeCAOPTString(objindex,cabuf,sizeof(cabuf), + CHAR_STREETVENDOR_OPEN,CHAR_getWorkChar(c_index,CHAR_STREETVENDOR_NAME))) + CONNECT_appendCAbuf(fd,cabuf,strlen(cabuf)); + } +#endif +#ifdef _ITEM_CRACKER + if( CHAR_getInt( c_index, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER && + CHAR_getWorkInt( c_index, CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE && + CHAR_getWorkInt( c_index, CHAR_WORKITEM_CRACKER)) + { + if( CHAR_makeCAOPT1String( objindex, cabuf, sizeof( cabuf), + CHAR_ITEM_CRACKER, CHAR_getWorkInt( c_index, CHAR_WORKITEM_CRACKER))) + { + CONNECT_appendCAbuf( fd, cabuf, strlen( cabuf)); + } + } +#endif + /* 愤坌互褪匹锹澎互爵 匹卅中卅日锹澎卞伉□母□ 憎CA毛霜月 */ + if( CHAR_getInt( c_index, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER && + CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE ) + == CHAR_PARTY_LEADER && + CHAR_getWorkInt( c_index, CHAR_WORKBATTLEMODE) + == BATTLE_CHARMODE_NONE) + { + int tofd = getfdFromCharaIndex( c_index ); + if( tofd != -1 ) { + if( CHAR_makeCAOPT1String( CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX), + cabuf, sizeof( cabuf), + CHAR_ACTLEADER,1 )) + { + CONNECT_appendCAbuf( tofd,cabuf,strlen(cabuf)); + } + } + } + /* 苇尹凶平乓仿互爵 卅日爵 失奶戊件 憎 毛霜月 */ + if( CHAR_getInt( c_index, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER && + CHAR_getWorkInt( c_index, CHAR_WORKBATTLEMODE ) + != BATTLE_CHARMODE_NONE ) + { + /* 棋爵CA */ + if( CHAR_getWorkInt( c_index, CHAR_WORKBATTLEWATCH) == TRUE ) { + if( CHAR_makeCAOPT1String( CurrentObjCollection[i], cabuf, + sizeof( cabuf), + CHAR_ACTBATTLEWATCH, + 1)) + { + CONNECT_appendCAbuf( fd, cabuf, strlen( cabuf)); + } + } + else { + int battleno = CHAR_getWorkInt( c_index, + CHAR_WORKBATTLEINDEX); + int sideno = CHAR_getWorkInt( c_index, + CHAR_WORKBATTLESIDE); + int helpno = (BattleArray[CHAR_getWorkInt( c_index, + CHAR_WORKBATTLEINDEX)].Side[ + CHAR_getWorkInt( c_index, + CHAR_WORKBATTLESIDE)].flg & BSIDE_FLG_HELP_OK) ? TRUE:FALSE; + /* HelpNo = 1 反移 */ + if( CHAR_makeCAOPT3String( CurrentObjCollection[i], cabuf, sizeof( cabuf), + CHAR_ACTBATTLE, + battleno,sideno,helpno + )) + { + CONNECT_appendCAbuf( fd,cabuf,strlen(cabuf)); + } + } + } + /* 苇尹凶平乓仿互窒井及失弁扑亦件毛仄化中木壬霜月[ */ + if( ( CHAR_getInt( c_index, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER || + CHAR_getInt( c_index, CHAR_WHICHTYPE ) == CHAR_TYPEPET ) && + CHAR_getWorkInt( c_index, CHAR_WORKACTION ) != -1 ) + { + if( CHAR_makeCADefaultString( CurrentObjCollection[i], cabuf, sizeof( cabuf), + CHAR_getWorkInt( c_index, CHAR_WORKACTION))) + { + CONNECT_appendCAbuf( fd,cabuf,strlen(cabuf)); + } + } + } + } + } + dchop( c_msg, "," ); + if( strlen( c_msg) != 0 ) { + lssproto_C_send( fd, c_msg); + } + + /* 愤坌及CD综岳 */ + cnv10to62( objindex,cd_msg, sizeof(cd_msg)); + + for( i = 0 ; i < prevcnt; i ++ ) { + int findflg = FALSE; + /* 蟆及匏 卞中月左皮斥尼弁玄匹]蜇箕及甄 卞中卅中 + * 左皮斥尼弁玄卅日壅允屯五左皮斥尼弁玄分 + */ + for( j = 0; j < curcnt; j ++ ) { + if( PrevObjCollection[i] == CurrentObjCollection[j] ) { + findflg = TRUE; + break; + } + } + if( !findflg ) { + cnv10to62( PrevObjCollection[i], buf, sizeof( buf)); + CONNECT_appendCDbuf( fd, buf, strlen( buf)); + + /* 锹澎卞手 霜月 */ + if( OBJECT_getType( PrevObjCollection[i]) == OBJTYPE_CHARA ) { + int tocharaindex = OBJECT_getIndex( PrevObjCollection[i]); + if( CHAR_getInt( tocharaindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER) { + int tofd = CHAR_getWorkInt( tocharaindex, CHAR_WORKFD); + if( tofd != -1 ) { + CONNECT_appendCDbuf( tofd, cd_msg, strlen( cd_msg)); + CDsend( tofd); + } + } + } + } + } + CDsend( fd); + + +} +BOOL CHAR_setMyPosition( int index, int x, int y, BOOL CAFlg) +{ + return CHAR_setMyPosition_main( index,x,y,-1,CAFlg); +} + +BOOL CHAR_setMyPosition_main( int index, int x, int y, int setdir, BOOL CAFlg) +{ + int objindex; + int prev_x,prev_y; + int fl; + + prev_x = CHAR_getInt( index, CHAR_X); + prev_y = CHAR_getInt( index, CHAR_Y); + if( prev_x == x && prev_y == y ) { + return FALSE; + } + + if( CHAR_getWorkInt( index, CHAR_WORKPARTYMODE) == CHAR_PARTY_CLIENT) { + return FALSE; + } + + if( CHAR_getFlg( index, CHAR_ISWARP)) return FALSE; + + objindex = CHAR_getWorkInt(index,CHAR_WORKOBJINDEX); + fl = CHAR_getInt( index, CHAR_FLOOR); + + if( !MAP_IsValidCoordinate( fl, x, y )) { + print( "error: invalid Coordinate fl[%d] x[%d] y[%d] %s:%d\n", + fl, x, y, __FILE__, __LINE__); + CONNECT_setCloseRequest( CHAR_getWorkInt( index, CHAR_WORKFD), 1); + return FALSE; + } + + if( ABS( x - prev_x) > CHAR_DEFAULTSEESIZ/2 || + ABS( y - prev_y) > CHAR_DEFAULTSEESIZ/2 ) + { + CHAR_sendCDArroundChar( fl,prev_x,prev_y,objindex ); + } + + if( ABS( x - prev_x) <= 1 && ABS( y - prev_y ) <= 1){ + POINT start,end; + int dir; + start.x = CHAR_getInt( index, CHAR_X); + start.y = CHAR_getInt( index, CHAR_Y); + end.x = x; + end.y = y; + dir = NPC_Util_getDirFromTwoPoint( &start, &end); + if( dir != -1 ) { + CHAR_walk( index, dir, 0); + } + } + else { + CHAR_setInt( index, CHAR_X,x); + CHAR_setInt( index, CHAR_Y,y); + if( setdir >= 0 && setdir < 8) CHAR_setInt( index, CHAR_DIR, setdir); + { + int of,ox,oy; + of = OBJECT_setFloor(objindex,fl); + ox = OBJECT_setX(objindex,x); + oy = OBJECT_setY(objindex,y); + + if( !MAP_objmove( objindex,of,ox,oy,fl,x,y ) ){ + fprint( "ERROR MAP_OBJMOVE objindex=%d\n",objindex ); + return FALSE; + } + } + if( ABS( x - prev_x) > CHAR_DEFAULTSEESIZ/2 || + ABS( y - prev_y) > CHAR_DEFAULTSEESIZ/2 ) + { + CHAR_sendWatchEvent(objindex,CHAR_ACTWARP,NULL,0,FALSE); + } + else if( CAFlg == TRUE ) { + CHAR_sendWatchEvent(objindex,CHAR_ACTWARP,NULL,0,FALSE); + } + } + + if( CHAR_getWorkInt( index, CHAR_WORKPARTYMODE) == CHAR_PARTY_LEADER ) { + if( ABS( x - prev_x) <= 1 && ABS( y - prev_y ) <= 1){ + int i; + int prevparty_x = prev_x; + int prevparty_y = prev_y; + for( i = 1; i < CHAR_PARTYMAX; i ++ ) { + int toindex = CHAR_getWorkInt( index, i + CHAR_WORKPARTYINDEX1); + if( CHAR_CHECKINDEX(toindex) ) { + int client_x = prevparty_x; + int client_y = prevparty_y; + int dir; + POINT start, end; + + prevparty_x = CHAR_getInt( toindex, CHAR_X); + prevparty_y = CHAR_getInt( toindex, CHAR_Y); + start.x = prevparty_x; + start.y = prevparty_y; + + end.x = client_x; + end.y = client_y; + + dir = NPC_Util_getDirFromTwoPoint( &start, &end); + if( dir != - 1 ) { + CHAR_walk( toindex, dir, 0); + } + } + } + } + + else if( ABS( x - prev_x) > CHAR_DEFAULTSEESIZ/2 || + ABS( y - prev_y) > CHAR_DEFAULTSEESIZ/2 ) + { + int i; + for( i = 1; i < CHAR_PARTYMAX; i ++ ) { + int toindex = CHAR_getWorkInt( index, i + CHAR_WORKPARTYINDEX1); + if( CHAR_CHECKINDEX(toindex) ) { + CHAR_warpToSpecificPoint( toindex,fl , x,y); + } + } + } + } + + if( ABS( x - prev_x) <= CHAR_DEFAULTSEESIZ/2 && + ABS( y - prev_y) <= CHAR_DEFAULTSEESIZ/2 ) + { + CHAR_setMyPosition_sendData( index, prev_x, prev_y, x, y); + } + + return TRUE; +} + + +static char CHAR_P_statusSendBuffer[STRINGBUFSIZ]; + + + +static char *CHAR_make_P_StatusString( int charaindex, unsigned int indextable ) +{ + int i,j; + int ret = 0; + int strlength; + char buf[64]; + struct { + unsigned int kind; + int intdataindex; + int gettype; + }chk[] = { + { CHAR_P_STRING_HP, CHAR_HP, 0 }, + { CHAR_P_STRING_MAXHP, CHAR_WORKMAXHP, 1 }, + { CHAR_P_STRING_MP, CHAR_MP, 0 }, + { CHAR_P_STRING_MAXMP, CHAR_WORKMAXMP, 1 }, + { CHAR_P_STRING_EXP, CHAR_EXP, 0 }, + { CHAR_P_STRING_LV, CHAR_LV, 0 }, + { CHAR_P_STRING_ATK, CHAR_WORKATTACKPOWER, 1 }, + { CHAR_P_STRING_DEF, CHAR_WORKDEFENCEPOWER, 1 }, + { CHAR_P_STRING_QUICK, CHAR_WORKQUICK, 1 }, + { CHAR_P_STRING_CHARM, CHAR_WORKFIXCHARM, 1 }, + { CHAR_P_STRING_LUCK, CHAR_WORKFIXLUCK, 1 }, + { CHAR_P_STRING_GOLD, CHAR_GOLD, 0 }, + { CHAR_P_STRING_TITLE, CHAR_INDEXOFEQTITLE, 0 }, + { CHAR_P_STRING_NAME, CHAR_NAME, 2 }, + { CHAR_P_STRING_OWNTITLE, CHAR_OWNTITLE, 2 }, + { CHAR_P_STRING_VITAL, CHAR_VITAL, 10 }, + { CHAR_P_STRING_STR, CHAR_STR, 10 }, + { CHAR_P_STRING_TOUGH, CHAR_TOUGH, 10 }, + { CHAR_P_STRING_DEX, CHAR_DEX, 10 }, + { CHAR_P_STRING_EARTH, CHAR_WORKFIXEARTHAT, 11 }, + { CHAR_P_STRING_WATER, CHAR_WORKFIXWATERAT, 11 }, + { CHAR_P_STRING_FIRE, CHAR_WORKFIXFIREAT, 11 }, + { CHAR_P_STRING_WIND, CHAR_WORKFIXWINDAT, 11 }, + { CHAR_P_STRING_DUELPOINT, CHAR_DUELPOINT, 0 }, + { CHAR_P_STRING_TRANSMIGRATION, CHAR_TRANSMIGRATION, 0}, + { CHAR_P_STRING_RIDEPET, CHAR_RIDEPET, 0}, + { CHAR_P_STRING_LEARNRIDE, CHAR_LEARNRIDE, 0}, + { CHAR_P_STRING_BASEBASEIMAGENUMBER, CHAR_BASEBASEIMAGENUMBER, 0}, + { CHAR_P_STRING_SKYWALKER, CHAR_WORKSKYWALKER, 1}, + { CHAR_P_STRING_DEBUGMODE, CHAR_WORKDEBUGMODE, 1}, +/* +#ifdef _CHAR_PROFESSION +#ifdef _SEND_PROF_DATA + { CHAR_P_STRING_PROFESSION, PROFESSION_CLASS, 20}, +#endif +#endif +*/ + }; + + snprintf( CHAR_P_statusSendBuffer, sizeof( CHAR_P_statusSendBuffer), + "P%s|", cnv10to62( indextable, buf,sizeof(buf))); + strlength = strlen( CHAR_P_statusSendBuffer ); + + for( i = 1; i < sizeof( int) * 8; i ++ ){ + if( indextable & (1 << i) ) { + char tmp[256]; + BOOL found = FALSE; + for( j = 0; j < arraysizeof( chk); j ++ ) { + if( chk[j].kind == 1 << i ) { + if( chk[j].gettype == 0 ) { + ret = CHAR_getInt( charaindex,chk[j].intdataindex); + snprintf( tmp, sizeof( tmp), "%d|", ret); + }else if( chk[j].gettype == 1 ) { + ret = CHAR_getWorkInt( charaindex,chk[j].intdataindex); + snprintf( tmp, sizeof( tmp), "%d|", ret); + }else if( chk[j].gettype == 10 ) { + ret = CHAR_getInt( charaindex, chk[j].intdataindex)/100; + snprintf( tmp, sizeof( tmp), "%d|", ret); + }else if( chk[j].gettype == 11 ) { + ret = CHAR_getWorkInt( charaindex, chk[j].intdataindex); + if( ret < 0) ret = 0; + snprintf( tmp, sizeof( tmp), "%d|", ret); + }else if( chk[j].gettype == 2 ) { + char escapebuffer[128]; + char *a = CHAR_getChar( charaindex, chk[j].intdataindex); + + snprintf( tmp,sizeof( tmp ), + "%s|", + makeEscapeString( a, escapebuffer, + sizeof(escapebuffer) + )); + } +/* +#ifdef _CHAR_PROFESSION +#ifdef _SEND_PROF_DATA + else if( chk[j].gettype == 20 ) { + int k; + char tempbuf[256]; + strcpy( tmp, ""); + for( k=0; k<11; k++){ + ret = CHAR_getInt( charaindex, chk[j].intdataindex + k ); + snprintf( tempbuf, sizeof( tempbuf), "%d|", ret); + strcat( tmp, tempbuf); + } + } +#endif +#endif +*/ + found = TRUE; + break; + } + } + if( !found) { + if( indextable & CHAR_P_STRING_NEXTEXP ) { + ret = CHAR_GetLevelExp( charaindex, CHAR_getInt( charaindex, CHAR_LV ) + 1); + snprintf( tmp, sizeof( tmp), "%d|", ret); + found = TRUE; + } + } + if( !found) { + print( "找不到指定的参数[%d]\n",indextable); + }else { + strcpysafe( &CHAR_P_statusSendBuffer[ strlength], + sizeof( CHAR_P_statusSendBuffer) - strlength, + tmp); + + strlength += strlen( tmp ); + if( strlength >= sizeof( CHAR_P_statusSendBuffer ) ) { + return CHAR_P_statusSendBuffer; + } + } + } + } + return CHAR_P_statusSendBuffer; +} + + + +BOOL CHAR_send_P_StatusString( int charaindex, unsigned int indextable ) +{ + char* string; + //if( indextable >= ( CHAR_P_STRING_BASEBASEIMAGENUMBER << 1)) { + if( indextable >= ( CHAR_P_STRING_SKYWALKER << 1)) { + //if( indextable >= ( CHAR_P_STRING_DEBUGMODE << 1)) { + print( "send_P invalid index[%d]\n", indextable); + return FALSE; + } + + if( CHAR_getInt(charaindex,CHAR_WHICHTYPE) != CHAR_TYPEPLAYER ){ + return FALSE; + } + + string = CHAR_make_P_StatusString( charaindex, indextable ); + + if( string != NULL ){ + int fd; + fd = getfdFromCharaIndex( charaindex ); + if( fd != -1 ){ + lssproto_S_send( fd, string ); + return TRUE; + } + } + return FALSE; +} +static char CHAR_N_statusSendBuffer[STRINGBUFSIZ]; +/*------------------------------------------------------------ + * 弁仿奶失件玄卞霜月 { 及 侬 毛综岳允月[ + * 娄醒 + * charaindex int 平乓仿奶件犯弁永旦 + * indextable int P 毛霜月由仿丢□正及螂宁 [ + *------------------------------------------------------------*/ +static char *CHAR_make_N_StatusString( int charaindex, int num, unsigned int indextable ) +{ + int i,j; + int nindex = -1; + int ret = 0; + int strlength; + char buf[64]; + struct { + unsigned int kind; + int intdataindex; + int gettype; + }chk[] = { + { CHAR_N_STRING_OBJINDEX, CHAR_WORKOBJINDEX, 1 }, + { CHAR_N_STRING_LV, CHAR_LV, 0 }, + { CHAR_N_STRING_MAXHP, CHAR_WORKMAXHP, 1 }, + { CHAR_N_STRING_HP, CHAR_HP, 0 }, + { CHAR_N_STRING_MP, CHAR_MP, 0 }, + { CHAR_N_STRING_NAME, CHAR_NAME, 2 }, + + + }; + /* 醮棉旦 □正旦犯□正 */ + /* 凝民尼永弁 */ + if( num < 0 || num >= CHAR_PARTYMAX ){ + print( "朋友模式失败 (%c)%d \n", num, num ); + return NULL; + } + /* 醮棉及奶件犯永弁旦毛潸 */ + nindex = CHAR_getPartyIndex( charaindex, num); + + if( nindex == -1 ){ + /* 鬼支仃升 snprintf 允月 */ + snprintf( CHAR_N_statusSendBuffer,sizeof(CHAR_N_statusSendBuffer), + "N%d|0|", num ); + return CHAR_N_statusSendBuffer; + } + + snprintf( CHAR_N_statusSendBuffer, sizeof( CHAR_N_statusSendBuffer), + "N%d|%s|", num,cnv10to62( indextable, buf,sizeof(buf))); + strlength = strlen( CHAR_N_statusSendBuffer ); + + /* indextable及 匹 匀化中月申永玄毛赐 卞譬屯月 */ + for( i = 1; i < sizeof( int) * 8; i ++ ){ + if( indextable & (1 << i) ) { + char tmp[256]; + BOOL found = FALSE; + /* 匀化中月申永玄午]chk卞甲永玄允月井譬屯月 */ + for( j = 0; j < arraysizeof( chk); j ++ ) { + if( chk[j].kind == 1 << i ) { + /* 域谯仄凶及匹袄毛潸 允月 */ + /* 醒袄烟及犯□正 */ + if( chk[j].gettype == 0 ) { + ret = CHAR_getInt( nindex,chk[j].intdataindex); + snprintf( tmp, sizeof( tmp), "%d|", ret); + } + else if( chk[j].gettype == 1 ) { + ret = CHAR_getWorkInt( nindex,chk[j].intdataindex); + snprintf( tmp, sizeof( tmp), "%d|", ret); + } + else if( chk[j].gettype == 10 ) { + ret = CHAR_getInt( nindex, chk[j].intdataindex)/100; + snprintf( tmp, sizeof( tmp), "%d|", ret); + } + else if( chk[j].gettype == 11 ) { + ret = CHAR_getWorkInt( nindex, chk[j].intdataindex); + if( ret < 0) ret = 0; + snprintf( tmp, sizeof( tmp), "%d|", ret); + } + /* 侬 烟及犯□正 */ + else if( chk[j].gettype == 2 ) { + char escapebuffer[128]; + char *a = CHAR_getChar( nindex, chk[j].intdataindex); + + snprintf( tmp,sizeof( tmp ), + "%s|", + makeEscapeString( a, escapebuffer, + sizeof(escapebuffer) + )); + } + found = TRUE; + break; + } + } + /* 职及正奶皿及犯□正井手仄木卅中 */ + if( !found) { + /* 仇仇井日反ㄠ勾ㄠ勾 */ + } + if( !found) { + print( "找不到指定的参数[%d]\n",indextable); + } + else { + strcpysafe( &CHAR_N_statusSendBuffer[ strlength], + sizeof( CHAR_N_statusSendBuffer) - strlength, + tmp); + + strlength += strlen( tmp ); + if( strlength >= sizeof( CHAR_N_statusSendBuffer ) ) { + return CHAR_N_statusSendBuffer; + } + } + } + } + return CHAR_N_statusSendBuffer; +} +/*------------------------------------------------------------ + * S P 旦 □正旦毛霜月[民尼永弁允月及匹}晓匹反民尼永弁仄卅仁化方中[ + * 娄醒 + * charaindex int 平乓仿奶件犯弁永旦 + * num int 醮棉 寞 + * indextable int P 毛霜月由仿丢□正及螂宁 [ + * 忒曰袄 + * 霜匀凶[TRUE(1) + * 霜木卅井匀凶[FALSE(0) + *------------------------------------------------------------*/ +BOOL CHAR_send_N_StatusString( int charaindex, int num, unsigned int indextable ) +{ + char* string; + + if( indextable >= (CHAR_N_STRING_NAME << 1)) { + print( "send_N invalid index[%d]\n", indextable); + return FALSE; + } + + if( CHAR_getInt(charaindex,CHAR_WHICHTYPE) != CHAR_TYPEPLAYER ){ + return FALSE; + } + string = CHAR_make_N_StatusString( charaindex, num, indextable ); + if( string != NULL ){ + int fd; + fd = getfdFromCharaIndex( charaindex ); + if( fd != -1 ){ + lssproto_S_send( fd, string ); + return TRUE; + } + } + return FALSE; +} + +static char CHAR_K_statusSendBuffer[STRINGBUFSIZ]; +static char *CHAR_make_K_StatusString( int charaindex, int num, unsigned int indextable ) +{ + int i,j; + int ret = 0; + int strlength; + int pindex; + char buf[64]; + struct { + unsigned int kind; + int intdataindex; + int gettype; + }chk[] = { + { CHAR_K_STRING_BASEIMAGENUMBER, CHAR_BASEIMAGENUMBER, 0 }, + { CHAR_K_STRING_HP, CHAR_HP, 0 }, + { CHAR_K_STRING_MAXHP, CHAR_WORKMAXHP, 1 }, + { CHAR_K_STRING_MP, CHAR_MP, 0 }, + { CHAR_K_STRING_MAXHP, CHAR_WORKMAXMP, 1 }, + { CHAR_K_STRING_EXP, CHAR_EXP, 0 }, + { CHAR_K_STRING_LV, CHAR_LV, 0 }, + { CHAR_K_STRING_ATK, CHAR_WORKATTACKPOWER, 1 }, + { CHAR_K_STRING_DEF, CHAR_WORKDEFENCEPOWER, 1 }, + { CHAR_K_STRING_QUICK, CHAR_WORKQUICK, 1 }, + { CHAR_K_STRING_AI, CHAR_WORKFIXAI, 1 }, + { CHAR_K_STRING_EARTH, CHAR_WORKFIXEARTHAT, 11}, + { CHAR_K_STRING_WATER, CHAR_WORKFIXWATERAT, 11}, + { CHAR_K_STRING_FIRE, CHAR_WORKFIXFIREAT, 11}, + { CHAR_K_STRING_WIND, CHAR_WORKFIXWINDAT, 11}, + { CHAR_K_STRING_SLOT, CHAR_SLOT, 0 }, + { CHAR_K_STRING_NAME, CHAR_NAME, 2 }, + { CHAR_K_STRING_USERPETNAME, CHAR_USERPETNAME, 2 }, + + }; + /* 凝民尼永弁 */ + if( num < 0 || num >= CHAR_MAXPETHAVE ){ + print( "宠物模式失败 (%c)%d \n", num, num ); + return NULL; + } + /* 矢永玄及奶件犯永弁旦毛潸 */ + pindex = CHAR_getCharPet( charaindex, num ); + if( pindex == -1 ){ + /* 鬼支仃升 snprintf 允月 */ + snprintf(CHAR_K_statusSendBuffer,sizeof(CHAR_K_statusSendBuffer), + "K%d|0|", num ); + return CHAR_K_statusSendBuffer; + } + + snprintf( CHAR_K_statusSendBuffer, sizeof( CHAR_K_statusSendBuffer), + "K%d|%s|", num, cnv10to62( indextable, buf,sizeof(buf))); + strlength = strlen( CHAR_K_statusSendBuffer ); + + for( i = 1; i < sizeof( int) * 8; i ++ ){ + if( indextable & (1 << i) ) { + char tmp[256]; + BOOL found = FALSE; + for( j = 0; j < arraysizeof( chk); j ++ ) { + if( chk[j].kind == 1 << i ) { + if( chk[j].gettype == 0 ) { + ret = CHAR_getInt( pindex,chk[j].intdataindex); + snprintf( tmp, sizeof( tmp), "%d|", ret); + } + else if( chk[j].gettype == 1 ) { + ret = CHAR_getWorkInt( pindex,chk[j].intdataindex); + snprintf( tmp, sizeof( tmp), "%d|", ret); + } + else if( chk[j].gettype == 10 ) { + ret = CHAR_getInt( pindex, chk[j].intdataindex)/100; + snprintf( tmp, sizeof( tmp), "%d|", ret); + } + else if( chk[j].gettype == 11 ) { + ret = CHAR_getWorkInt( pindex, chk[j].intdataindex); + if( ret < 0) ret = 0; + snprintf( tmp, sizeof( tmp), "%d|", ret); + } + /* 侬 烟及犯□正 */ + else if( chk[j].gettype == 2 ) { + char escapebuffer[128]; + char *a = CHAR_getChar( pindex, chk[j].intdataindex); + + snprintf( tmp,sizeof( tmp ), + "%s|", + makeEscapeString( a, escapebuffer, + sizeof(escapebuffer) + )); + } + found = TRUE; + break; + } + } + if( !found) { + if( indextable & CHAR_K_STRING_NEXTEXP ) { + ret = CHAR_GetLevelExp( pindex, CHAR_getInt( pindex, CHAR_LV ) + 1); + snprintf( tmp, sizeof( tmp), "%d|", ret); + found = TRUE; + } + if( indextable & CHAR_K_STRING_CHANGENAMEFLG ) { + BOOL changenameflg = FALSE; + char *mycdkey, *cdkey = NULL; + mycdkey = CHAR_getChar( charaindex, CHAR_CDKEY); + { + cdkey = CHAR_getChar( pindex, CHAR_CDKEY); + if( cdkey == NULL ) { + print( "can't get CDKEY\n"); + }else { + if( strlen( cdkey) == 0 || + strcmp( cdkey, mycdkey) == 0 ){ + changenameflg = TRUE; + } + } + } + snprintf( tmp, sizeof( tmp), "%d|", changenameflg); + found = TRUE; + } + } + if( !found) { + print( "找不到指定的参数[%d]\n",indextable); + }else { + strcpysafe( &CHAR_K_statusSendBuffer[ strlength], + sizeof( CHAR_K_statusSendBuffer) - strlength, + tmp); + + strlength += strlen( tmp ); + if( strlength >= sizeof( CHAR_K_statusSendBuffer ) ) { + return CHAR_K_statusSendBuffer; + } + } + } + } + return CHAR_K_statusSendBuffer; +} +/*------------------------------------------------------------ + * S K 旦 □正旦毛霜月[民尼永弁允月及匹}晓匹反民尼永弁仄卅仁化方中[ + * 娄醒 + * charaindex int 平乓仿奶件犯弁永旦 + * indextable int P 毛霜月由仿丢□正及螂宁 [ + * 忒曰袄 + * 霜匀凶[TRUE(1) + * 霜木卅井匀凶[FALSE(0) + *------------------------------------------------------------*/ +BOOL CHAR_send_K_StatusString( int charaindex, int num, unsigned int indextable ) +{ + char* string; + + if( indextable >= (CHAR_K_STRING_USERPETNAME << 1)) { + print( "send_K invalid index[%d]\n", indextable); + return FALSE; + } + + if( CHAR_getInt(charaindex,CHAR_WHICHTYPE) != CHAR_TYPEPLAYER ){ + return FALSE; + } + string = CHAR_make_K_StatusString( charaindex, num, indextable ); + if( string != NULL ){ + int fd; + fd = getfdFromCharaIndex( charaindex ); + if( fd != -1 ){ + lssproto_S_send( fd, string ); + return TRUE; + } + } + return FALSE; +} + + + +//------------------------------------------------------------ +// 皿伊奶乩□及 毛笛遥 +//------------------------------------------------------------ +void CHAR_AddCharm( int charaindex, int iValue ) +{ + int iWork; + iWork = CHAR_getInt( charaindex, CHAR_CHARM ) + iValue; + iWork = max( 0, iWork ); // 凝ㄟ + iWork = min( 100, iWork ); // ㄠㄟㄟ + CHAR_setInt( charaindex, CHAR_CHARM, iWork ); +} + +//------------------------------------------------------------ +// 矢永玄及镝擦蘸 祭袄毛笛遥允月[ +//------------------------------------------------------------ +void CHAR_PetAddVariableAi( int petindex, int iValue ) +{ + int iWork; + iWork = CHAR_getInt( petindex, CHAR_VARIABLEAI ) + iValue; + iWork = min( CHAR_MAXVARIABLEAI, iWork ); + iWork = max( CHAR_MINVARIABLEAI, iWork ); + CHAR_setInt( petindex, CHAR_VARIABLEAI, iWork ); + +} + +//------------------------------------------------------------ +// 犯□正矛□旦卞瓒 允月平□ 蟆 毛综岳允月[ +//------------------------------------------------------------ +int CHAR_makeDBKey( int charaindex, char *pszBuffer, int size ){ + + char *cdkey; + char buff[512]; + char escapebuf[1024]; + + pszBuffer[0] = 0; // 赓渝祭 + cdkey = CHAR_getChar( charaindex, CHAR_CDKEY); + if( cdkey == NULL )return FALSE; // 瓒 匹五卅中 + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return FALSE; + + // 平□反 cdkey_ 蟆 + snprintf( buff, sizeof(buff), + "%s_%s", cdkey, CHAR_getChar( charaindex, CHAR_NAME ) ); + makeEscapeString( buff, escapebuf, sizeof(escapebuf)); + strcpysafe( pszBuffer, size, escapebuf); + + return TRUE; +} + + +//------------------------------------------------------------ +// +// 犯□正矛□旦及嫩 毛凳蕙 +// +// DuelPoint 及 DBUpdateEntry毛霜月 +//------------------------------------------------------------ +BOOL CHAR_send_DpDBUpdate( int charaindex ) +{ + int fd,dp; + char szKey[256]; + if( CHAR_makeDBKey( charaindex, szKey, sizeof( szKey ) ) == FALSE ){ + return FALSE; + } + dp = CHAR_getInt( charaindex, CHAR_DUELPOINT ); + fd = getfdFromCharaIndex( charaindex); + if( fd != -1 ) { + char info[512]; + //char escapebuff[1024]; + /* "等级|几战|几胜|几败|几连胜|最高连胜数" */ + snprintf( info, sizeof( info), + "%d,%d,%d,%d,%d,%d", + CHAR_getInt( charaindex, CHAR_LV), + CHAR_getInt( charaindex, CHAR_DUELBATTLECOUNT), + CHAR_getInt( charaindex, CHAR_DUELWINCOUNT), + CHAR_getInt( charaindex, CHAR_DUELLOSECOUNT), + CHAR_getInt( charaindex, CHAR_DUELSTWINCOUNT), + CHAR_getInt( charaindex, CHAR_DUELMAXSTWINCOUNT)); + saacproto_DBUpdateEntryInt_send( + acfd, DB_DUELPOINT, szKey, max(dp,0), info, + CONNECT_getFdid( fd ) ,0 ); + } + + return TRUE; +} + +char *CHAR_getUseName( int charaindex ) +{ + char *pName=NULL; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET ){ + pName = CHAR_getChar( charaindex, CHAR_USERPETNAME ); + if( pName[0] == 0 ){ + pName = CHAR_getChar( charaindex, CHAR_NAME ); + } + }else{ +// if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ) +// pName = CHAR_getChar( charaindex, CHAR_OWNTITLE ); +// if( pName == NULL || strlen(pName) <= 0 ) + pName = CHAR_getChar( charaindex, CHAR_NAME ); + } + return pName; +} + +// Robin extend_of_CHAR_getUseName() 2001/02/15 +char *CHAR_getUseID( int charaindex ) +{ + char *pName; + // 矢永玄分匀凶日白伉□生□丞卞允月 + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET ){ + pName = "NO_USER"; + }else{ + pName = CHAR_getChar( charaindex, CHAR_CDKEY ); + } + return pName; +} + +BOOL CHAR_send_DpDBUpdate_AddressBook( int charaindex, int mode ) +{ + int fd; + char szKey[256]; + if( CHAR_makeDBKey( charaindex, szKey, sizeof( szKey ) ) == FALSE ){ + return FALSE; + } + + fd = getfdFromCharaIndex( charaindex); + if( fd != -1 ) { + char msgbuf[512]; + snprintf( msgbuf, sizeof( msgbuf), + "%d|%d|%d|%d|%d|", + (mode == 0 ) ? 0 : getServernumber(), + CHAR_getInt( charaindex, CHAR_LV), + CHAR_getInt( charaindex, CHAR_DUELPOINT), + CHAR_getInt( charaindex, CHAR_FACEIMAGENUMBER), + CHAR_getInt( charaindex, CHAR_TRANSMIGRATION) ); + + saacproto_DBUpdateEntryString_send( + acfd, DB_ADDRESSBOOK, szKey, msgbuf, CONNECT_getFdid( fd ),0 ); + + saacproto_Broadcast_send( acfd, CHAR_getChar( charaindex, CHAR_CDKEY), + CHAR_getChar( charaindex, CHAR_NAME), "param", 0); + + } + return TRUE; +} + +void CHAR_sendBattleWatch( int objindex, int onoff) +{ + int opt[1]; + opt[0] = onoff; + CHAR_sendWatchEvent( objindex,CHAR_ACTBATTLEWATCH,opt,1,TRUE); +} +/*------------------------------------------------------------ + * 隙烂今木凶 毛莫曰及谛卞矢永玄丢□伙及梢请毛允月[ + * 娄醒 + * charaindex int chara 匹及奶件犯弁永旦 + * 忒曰袄 + * 卅仄 + ------------------------------------------------------------*/ +void CHAR_sendPMEToArroundCharacterFLXY( int petindex, int fl, int x, int y, + int dir, int flg, int no ) +{ + int i,j; + int objindex; + int graphicsno; + char buff[2048]; + + objindex = CHAR_getWorkInt( petindex, CHAR_WORKOBJINDEX); + graphicsno = CHAR_getInt( petindex, CHAR_BASEIMAGENUMBER); + if( CHAR_makeObjectCString( objindex, buff, sizeof( buff)) == FALSE ) { + buff[0] = '\0'; + } + + for( i = x - CHAR_DEFAULTSEESIZ/2 ; + i <= x +CHAR_DEFAULTSEESIZ/2 ; i ++ ){ + for( j = y - CHAR_DEFAULTSEESIZ/2; + j <= y + CHAR_DEFAULTSEESIZ/2; j ++ ){ + + OBJECT object; + for( object = MAP_getTopObj( fl, i,j); + object; + object = NEXT_OBJECT(object) ){ + int objindexwk = GET_OBJINDEX( object); + if( OBJECT_getType(objindexwk) == OBJTYPE_CHARA ){ + int index = OBJECT_getIndex(objindexwk); + if( CHAR_getInt( index,CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + int fd; + if( CHAR_getWorkInt( index, CHAR_WORKBATTLEMODE) + != BATTLE_CHARMODE_NONE) continue; + fd = getfdFromCharaIndex( index); + if( fd == -1 )continue; + lssproto_PME_send( fd, objindex, graphicsno, + x,y, dir,flg,no,buff + ); + } + } + } + } + } +} +/*------------------------------------------------------------ + * charaindex 匹隙烂今木凶 毛莫曰及谛卞矢永玄丢□伙及梢请毛允月[ + * 娄醒 + * charaindex int chara 匹及奶件犯弁永旦 + * 忒曰袄 + * 卅仄 + ------------------------------------------------------------*/ +void CHAR_sendPMEToArroundCharacter( int charaindex, int petindex, int flg, int no ) +{ + int dirx[9],diry[9]; + int i; + int fl,x,y; + int dir; + for( i = 0 ; i < 7 ; i ++ ){ + dirx[i+2] = CHAR_getDX(CHAR_getInt(charaindex,CHAR_DIR) + i+1); + diry[i+2] = CHAR_getDY(CHAR_getInt(charaindex,CHAR_DIR) + i+1); + } + dirx[0] = CHAR_getDX(CHAR_getInt(charaindex,CHAR_DIR)); + diry[0] = CHAR_getDY(CHAR_getInt(charaindex,CHAR_DIR)); + dirx[1] = 0; + diry[1] = 0; + + fl = CHAR_getInt( charaindex,CHAR_FLOOR ); + dir = CHAR_getInt( charaindex, CHAR_DIR); + + /* 仁 轾潸 */ + for( i = 0 ; i < 9 ; i ++ ){ + int x = CHAR_getInt( charaindex, CHAR_X) + dirx[i]; + int y = CHAR_getInt( charaindex, CHAR_Y) + diry[i]; + /* 矢永玄毛 仃月桦赭井譬屯月 */ + if( PET_isPutPoint( fl, x, y ) == TRUE ) { + break; + } + } + /* 卅仃木壬箫葭 */ + if( i == 9 ) i = 1; + + x = CHAR_getInt(charaindex,CHAR_X)+dirx[i]; + y = CHAR_getInt(charaindex,CHAR_Y)+diry[i]; + + CHAR_sendPMEToArroundCharacterFLXY( petindex, + fl, x, y, dir, flg, no); +} +/*------------------------------------------------------------ + * SE毛 日允[ + * 耨葭毛 艘卞]苇尹月 区坌霜耨允月 + * 娄醒 + * fl,x,y 耨葭及甄 + * senumber 及 寞[sndcnf.h毛辅寰及仇午[ + * sw 日允井鞅户月井 0 : 鞅户月 1 : 日允 + ------------------------------------------------------------*/ +void CHAR_sendSEoArroundCharacter( int fl, int x, int y, int senumber, int sw ) +{ + int i,j; + + for( i = x - CHAR_DEFAULTSEESIZ/2 ; + i <= x +CHAR_DEFAULTSEESIZ/2 ; i ++ ){ + for( j = y - CHAR_DEFAULTSEESIZ/2; + j <= y + CHAR_DEFAULTSEESIZ/2; j ++ ){ + + OBJECT object; + for( object = MAP_getTopObj( fl, i,j); + object; + object = NEXT_OBJECT(object) ){ + int objindexwk = GET_OBJINDEX( object); + if( OBJECT_getType(objindexwk) == OBJTYPE_CHARA ){ + int index = OBJECT_getIndex(objindexwk); + if( CHAR_getInt( index,CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + int fd; + if( CHAR_getWorkInt( index, CHAR_WORKBATTLEMODE) + != BATTLE_CHARMODE_NONE) continue; + fd = getfdFromCharaIndex( index); + if( fd == -1 )continue; + lssproto_SE_send( fd,x, y, senumber, sw ); + } + } + } + } + } +} +/*====================梢请涩烂====================*/ + + +#ifndef _SEND_EFFECT // WON ADD AC送下雪、下雨等特效 + +#define CHAR_EFFECT_SETTINGBUFFER 256 +typedef struct tagCHAR_effectsetting +{ + int floor; // 白夫失 + int effect; // 梢请 寞 + int level; // 梢请及伊矛伙[ 蜇及雄今[ + int sendflg; // 憎巨白尼弁玄毛霜匀凶井升丹井[ + char month[CHAR_EFFECT_SETTINGBUFFER]; // 垫允月畸 + char day[CHAR_EFFECT_SETTINGBUFFER]; // 垫允月 + char hour[CHAR_EFFECT_SETTINGBUFFER]; // 垫允月凛棉 + char min[CHAR_EFFECT_SETTINGBUFFER]; // 垫允月坌 + char expire[CHAR_EFFECT_SETTINGBUFFER]; // 垫仄化中月赢今[( + +}CHAR_effectsetting; + +CHAR_effectsetting* CHAR_effect; +int CHAR_effectnum; + +#endif + + + +/*------------------------------------------------------------ + * 梢请涩烂及赓渝祭毛允月[ + * 娄醒 + * filename char* 涩烂白央奶伙 + * 忒曰袄 + * 岳 TRUE(1) + * 撩 FALSE(0) + *------------------------------------------------------------*/ +BOOL CHAR_initEffectSetting( char* filename ) +{ + FILE* f; + char line[256]; + int linenum=0; + + int effectreadlen=0; + + f = fopen(filename,"r"); + if( f == NULL ){ + errorprint; + return FALSE; + } + + CHAR_effectnum=0; + + /* 引内 躲卅垫互窒垫丐月井升丹井譬屯月 */ + while( fgets( line, sizeof( line ), f ) ){ + linenum ++; + if( line[0] == '#' )continue; /* comment */ + if( line[0] == '\n' )continue; /* none */ + chomp( line ); + + CHAR_effectnum++; + } + + if( fseek( f, 0, SEEK_SET ) == -1 ){ + fprint( "Seek Error\n" ); + fclose(f); + return FALSE; + } + + CHAR_effect = allocateMemory( sizeof(CHAR_effectsetting) + * CHAR_effectnum ); + if( CHAR_effect == NULL ){ + fprint( "Can't allocate Memory %d\n" , + sizeof(CHAR_effectsetting)*CHAR_effectnum); + fclose( f ); + return FALSE; + } + /* 赓渝祭 */ +{ + int i; + for( i = 0; i < CHAR_effectnum; i ++ ) { + CHAR_effect[i].floor = 0; + CHAR_effect[i].effect = 0; + CHAR_effect[i].level = 0; + CHAR_effect[i].sendflg = 0; + CHAR_effect[i].month[0] = '\0'; + CHAR_effect[i].day[0] = '\0'; + CHAR_effect[i].hour[0] = '\0'; + CHAR_effect[i].min[0] = '\0'; + CHAR_effect[i].expire[0] = '\0'; + + } +} + + /* 引凶 心 允 */ + linenum = 0; + while( fgets( line, sizeof( line ), f ) ){ + linenum ++; + if( line[0] == '#' )continue; /* comment */ + if( line[0] == '\n' )continue; /* none */ + chomp( line ); + + /* 垫毛帮溥允月 */ + /* 引内 tab 毛 " " 卞 五晶尹月 */ + replaceString( line, '\t' , ' ' ); + /* 粮仄凶 " " 毛夫午勾卞允月 */ + deleteSequentChar( line, " " ); + + /* 仇仇引匹帮溥仄化}燮 互 旦矢□旦分匀凶日 */ + /* 引卅中 */ + if( line[0] == ' ' )continue; + + { + char token[256]; + int ret; + + /* 夫午勾户及玄□弁件毛苇月 */ + ret = getStringFromIndexWithDelim( line," ",1,token, + sizeof(token)); + if( ret==FALSE ){ + fprint("文件秩序错误:%s 第%d行\n",filename,linenum); + continue; + } + CHAR_effect[effectreadlen].floor = atoi(token); + + /* 2勾户及玄□弁件毛苇月 */ + ret = getStringFromIndexWithDelim( line," ",2,token, + sizeof(token)); + if( ret==FALSE ){ + fprint("文件秩序错误:%s 第%d行\n",filename,linenum); + continue; + } + + CHAR_effect[effectreadlen].effect = atoi( token ); + + /* 3勾户及玄□弁件毛苇月 */ + ret = getStringFromIndexWithDelim( line," ",3,token, + sizeof(token)); + if( ret ==FALSE){ + fprint("文件秩序错误:%s 第%d行\n",filename,linenum); + continue; + } + + CHAR_effect[effectreadlen].level = atoi( token ); + + /* 4勾户及玄□弁件毛苇月 */ + ret = getStringFromIndexWithDelim( line," ",4,token, + sizeof(token)); + if( ret ==FALSE){ + fprint("文件秩序错误:%s 第%d行\n",filename,linenum); + continue; + } + strcpysafe( CHAR_effect[effectreadlen].month, + sizeof( CHAR_effect[effectreadlen].month), + token); + + /* 5勾户及玄□弁件毛苇月 */ + ret = getStringFromIndexWithDelim( line," ",5,token, + sizeof(token)); + if( ret ==FALSE){ + fprint("文件秩序错误:%s 第%d行\n",filename,linenum); + continue; + } + strcpysafe( CHAR_effect[effectreadlen].day, + sizeof( CHAR_effect[effectreadlen].day), + token); + + /* 6勾户及玄□弁件毛苇月 */ + ret = getStringFromIndexWithDelim( line," ",6,token, + sizeof(token)); + if( ret ==FALSE){ + fprint("文件秩序错误:%s 第%d行\n",filename,linenum); + continue; + } + strcpysafe( CHAR_effect[effectreadlen].hour, + sizeof( CHAR_effect[effectreadlen].hour), + token); + + /* 7勾户及玄□弁件毛苇月 */ + ret = getStringFromIndexWithDelim( line," ",7,token, + sizeof(token)); + if( ret ==FALSE){ + fprint("文件秩序错误:%s 第%d行\n",filename,linenum); + continue; + } + strcpysafe( CHAR_effect[effectreadlen].min, + sizeof( CHAR_effect[effectreadlen].min), + token); + + /* 8勾户及玄□弁件毛苇月 */ + ret = getStringFromIndexWithDelim( line," ",8,token, + sizeof(token)); + if( ret ==FALSE){ + fprint("文件秩序错误:%s 第%d行\n",filename,linenum); + continue; + } + strcpysafe( CHAR_effect[effectreadlen].expire, + sizeof( CHAR_effect[effectreadlen].expire), + token); + + effectreadlen ++; + } + } + fclose(f); + + CHAR_effectnum = effectreadlen; + + print( "有效设置总数 %d...", CHAR_effectnum ); +#ifdef DEBUG + + { + int i; + for( i=0; i tim && NowTime.tv_sec < tim+atoi(CHAR_effect[num].expire)) { + flg = TRUE; + break; + } + } + if( !flg ) break; + } + } + // 坌互隙烂 仄分匀凶日手丹OK + + returnflg = TRUE; + break; + } + return returnflg; +} +//------------------------------------------------------------------------- +// 平乓仿弁正□及匏 午凛棉毛葭卞] +// 巨白尼弁玄毛霜月 邰互丐木壬霜月 +//------------------------------------------------------------------------- +void CHAR_checkEffect( int charaindex) +{ + int i; + int fl = CHAR_getInt( charaindex, CHAR_FLOOR); + int fd = getfdFromCharaIndex( charaindex); + + // 巨白尼弁玄域绎壅允 + lssproto_EF_send( fd, 0, 0, ""); + CHAR_setWorkInt( charaindex, CHAR_WORKEFFECT, 0); + + for( i = 0; i < CHAR_effectnum; i ++){ + // 白夫失互域谯仄凶凛分仃 + if( CHAR_effect[i].floor == fl) { + // 椭瘀毛譬屯引允[ + if( CHAR_checkEffectTime( i)){ + // 巨白尼弁玄毛霜月 + lssproto_EF_send( fd, CHAR_effect[i].effect, CHAR_effect[i].level, ""); + if( CHAR_effect[i].level == 0 ) { + CHAR_setWorkInt( charaindex, CHAR_WORKEFFECT, + CHAR_getWorkInt( charaindex, CHAR_WORKEFFECT) & + ~CHAR_effect[i].effect); + } + else { + CHAR_setWorkInt( charaindex, CHAR_WORKEFFECT, + CHAR_getWorkInt( charaindex, CHAR_WORKEFFECT) | + CHAR_effect[i].effect); + } + } + } + } +} + +void CHAR_checkEffectLoop( void) +{ + int i,j; + int playernum = CHAR_getPlayerMaxNum(); + int player; + int efnum = 0; + + struct { + int floor; + int effect; + BOOL on; + BOOL off; + } ef[2048]; + + memset( &ef, 0, sizeof( ef)); + + for( i = 0; i < CHAR_effectnum; i ++){ + + if( CHAR_checkEffectTime( i)){ + if( !CHAR_effect[i].sendflg) { + + for( player = 0 ; player < playernum; player ++ ) { + if( CHAR_getInt( player, CHAR_FLOOR) == CHAR_effect[i].floor ) { + int fd = getfdFromCharaIndex( player); + lssproto_EF_send( fd, CHAR_effect[i].effect, CHAR_effect[i].level, ""); + if( CHAR_effect[i].level == 0 ) { + CHAR_setWorkInt( player, CHAR_WORKEFFECT, + CHAR_getWorkInt( player, CHAR_WORKEFFECT) & + ~CHAR_effect[i].effect); + } + else { + CHAR_setWorkInt( player, CHAR_WORKEFFECT, + CHAR_getWorkInt( player, CHAR_WORKEFFECT) | + CHAR_effect[i].effect); + } + } + } + CHAR_effect[i].sendflg = TRUE; + + } + + for( j = 0; j < efnum; j ++ ) { + if( ef[j].floor == CHAR_effect[i].floor && + ef[j].effect == CHAR_effect[i].effect) + { + ef[j].on = TRUE; + break; + } + } + if( j == efnum ) { + ef[j].floor = CHAR_effect[i].floor; + ef[j].effect = CHAR_effect[i].effect; + ef[j].on = TRUE; + efnum++; + if( efnum >= arraysizeof( ef)) { + print( "err buffer over %s:%d\n", __FILE__, __LINE__); + efnum --; + } + } + } + else { + if( CHAR_effect[i].sendflg) { + + for( j = 0; j < efnum; j ++ ) { + if( ef[j].floor == CHAR_effect[i].floor && + ef[j].effect == CHAR_effect[i].effect) + { + ef[j].off = TRUE; + break; + } + } + if( j == efnum ) { + ef[j].floor = CHAR_effect[i].floor; + ef[j].effect = CHAR_effect[i].effect; + ef[j].off = TRUE; + efnum++; + if( efnum >= arraysizeof( ef)) { + print( "err buffer over %s:%d\n", __FILE__, __LINE__); + efnum --; + } + } + CHAR_effect[i].sendflg = FALSE; + } + } + } + + for( i = 0; i < efnum; i ++ ) { + if( ef[i].on == FALSE && ef[i].off == TRUE ) { + + for( player = 0 ; player < playernum; player ++ ) { + if( CHAR_getInt( player, CHAR_FLOOR) == ef[i].floor ) { + int fd = getfdFromCharaIndex( player); + lssproto_EF_send( fd, 0, 0, ""); + CHAR_setWorkInt( player, CHAR_WORKEFFECT, 0); + } + } + } + } +} + +float GetRecoveryRate( int charaindex ){ + float fBai = 1.0; + + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + fBai = 1.0 + 0.00010 * CHAR_getInt( charaindex, CHAR_VITAL ); + }else{ + + fBai = 1.0 + 0.00005 * CHAR_getInt( charaindex, CHAR_VITAL ); + } + return fBai; + +} + + +#define CHARDATASIZE (1024*256) +#define SPACESTRING "|" + +static int makeSaveCharString( char *out , int outlen , + char *nm , char *opt , char *info ) +{ + char nmwork[256]; + char optwork[512]; + char infowork[CHARDATASIZE]; + char outwork[CHARDATASIZE]; + char *nmwork_p , *optwork_p , *infowork_p; + int l; + + strncpy( nmwork , nm , sizeof( nmwork )); + nmwork[strlen( nm)]=0; + + strncpy( optwork , opt , sizeof( optwork )); + optwork[strlen(opt)]=0; + + strncpy( infowork , info , sizeof( infowork )); + infowork[strlen(info)]=0; + + nmwork_p = makeEscapeString( nm , nmwork ,sizeof( nmwork )); + optwork_p = makeEscapeString( opt , optwork , sizeof( optwork )); + infowork_p = makeEscapeString( info , infowork , sizeof( infowork )); + + snprintf( outwork ,sizeof( outwork ) , + "%s" SPACESTRING "%s" SPACESTRING "%s" , + nmwork_p , optwork_p , infowork_p ); + + l = strlen( outwork ); + outwork[ strlen( outwork)+1] = 0; + if( l >= (outlen-1)){ + return -1; + } + + memcpy( out , outwork , l + 1 ); + + return 0; +} + +#ifdef _STORECHAR +int storeCharaData( void ){ + int i, charamax; + FILE *fp; + struct tm *pLtime; + char szFileName[256], *chardata; + char outbuff[CHARDATASIZE]; + Char* ch; + + print("\n保存运行中的数据\n"); + + pLtime = localtime( &NowTime.tv_sec ); + + charamax = getFdnum(); + + for( i = 0; i < charamax; i ++ ){ + int hash, dir, j; + char charId[32]; + char pathname[128]; + + if( CHAR_getCharUse( i ) == FALSE )continue; + + strcpy( charId, CHAR_getChar( i, CHAR_CDKEY ) ); + print("账号:%s", charId); + + hash = 0; + for( j=0; jtm_year+1900, + pLtime->tm_mon+1, + pLtime->tm_mday, + pLtime->tm_hour, + pLtime->tm_min + ); + + fp = fopen( szFileName, "w" ); + if( fp == NULL )continue; + + ch = CHAR_getCharPointer( i ); + if( !ch )continue; + + chardata = CHAR_makeStringFromCharData( ch ); + + if( makeSaveCharString( outbuff , sizeof( outbuff ), + CHAR_getChar( i, CHAR_NAME ), + CHAR_makeOptionString( ch ), + chardata ) == 0 + ){ + + fprintf( fp, outbuff ); + }else{ + fprintf( fp, "本□皮撩 \n" ); + } + + fclose( fp ); + } + return 0; +} + +#endif + +#ifdef _LASTERR_FUNCTION +DebugBreakPoint LastFunction[10]; +static int lastfunctionNum = 0; +void LastFunction_Init() +{ + int i; + for( i=0; i<10; i++) { + memset( LastFunction[i].FILE, 0, sizeof( char)*256); + memset( LastFunction[i].funName, 0, sizeof( char)*256); + LastFunction[i].line = -1; + } +} +void LastFunction_Add( char *file, int line, char *funName) +{ + lastfunctionNum ++; + if( lastfunctionNum >= 10 ) + lastfunctionNum = 0; + + strcpy( LastFunction[ lastfunctionNum].FILE, file); + LastFunction[ lastfunctionNum].line = line; + strcpy( LastFunction[ lastfunctionNum].funName, funName); +} + +int LastFunction_Get( int lasts, char *file, int *line, char *funName) +{ + if( lasts < 0 || lasts >= 10 ) + return -1; + strcpy( file, LastFunction[ lasts].FILE); + *line = LastFunction[ lasts].line = line; + strcpy( funName, LastFunction[ lasts].funName); + return lastfunctionNum; +} +#endif + + + +#ifdef _FIX_METAMORIDE +BOOL CHAR_CHECKJOINENEMY( int index) +{ + int masterindex=-1; + if( CHAR_getWorkInt( index, CHAR_WORKPARTYMODE) == CHAR_PARTY_CLIENT ) { + masterindex = CHAR_getWorkInt( index, CHAR_WORKPARTYINDEX1); + if( !CHAR_CHECKINDEX( masterindex) ) { + print( "err masterindex:%d %s:%d !!\n", masterindex,__FILE__, __LINE__); + return FALSE; + } + if( CHAR_getInt( masterindex, CHAR_WHICHTYPE) == CHAR_TYPEBUS) { + return TRUE; //JOIN ENEMY + } + } + + return FALSE; +} +#endif + + // WON ADD 修正道具的设定问题 +void fix_item_bug(int charaindex, int itemindex) +{ + + if (ITEM_CHECKINDEX(itemindex)){ + switch( ITEM_getInt(itemindex,ITEM_ID) ){ + case 19700: ITEM_setChar( itemindex, ITEM_ARGUMENT, "KPET:901_902_903_904"); break; // 鞭炮 + case 20242: ITEM_setChar( itemindex, ITEM_ARGUMENT, "KPET:957_958_959_960"); break; // 雄黄酒 + case 1292: ITEM_setInt( itemindex, ITEM_MAXDAMAGECRUSHE, 0); ITEM_setInt( itemindex, ITEM_DAMAGECRUSHE, 0); break; // 灵力铠 + case 19646: ITEM_setInt( itemindex, ITEM_MAXDAMAGECRUSHE, 0); ITEM_setInt( itemindex, ITEM_DAMAGECRUSHE, 0); break; // 灵力铠 + case 1478: ITEM_setChar( itemindex, ITEM_ARGUMENT, "HP:30"); break; // 洛克服 + case 20282: ITEM_setChar( itemindex, ITEM_EFFECTSTRING, "攻+25 伤+25 敏-4 魅+5"); ITEM_setInt( itemindex, ITEM_MODIFYQUICK, -4 ); break; // 铁枪1 + case 20283: ITEM_setChar( itemindex, ITEM_EFFECTSTRING, "攻+50 伤+50 敏-10 魅+10"); ITEM_setInt( itemindex, ITEM_MODIFYQUICK, -10 ); break; // 铁枪2 + case 20284: ITEM_setChar( itemindex, ITEM_EFFECTSTRING, "攻+100 伤+100 敏-20 魅+15"); ITEM_setInt( itemindex, ITEM_MODIFYQUICK, -20 ); break; // 铁枪3 + case 1210: ITEM_setChar( itemindex, ITEM_EFFECTSTRING, "攻 +4 防 -4 敏 +4 魅 +2"); break; // 碧玉的石手环 + case 1203: ITEM_setChar( itemindex, ITEM_EFFECTSTRING, "攻 +2 防 +2 敏 -2 魅 +1"); break; // 皮的手环(红) + case 1204: ITEM_setChar( itemindex, ITEM_EFFECTSTRING, "攻 -2 防 +2 敏 +2 魅 +1"); break; // 皮的手环(绿) + case 1205: ITEM_setChar( itemindex, ITEM_EFFECTSTRING, "攻 +2 防 -2 敏 +2 魅 +1"); break; // 皮的手环(青) + case 1483: ITEM_setInt( itemindex, ITEM_MODIFYCHARM, 5); break; // 库沙达号角 + case 20147: ITEM_setChar(itemindex,ITEM_INGNAME0,"木"); ITEM_setChar(itemindex,ITEM_INGNAME1,"骨"); ITEM_setInt(itemindex,ITEM_INGVALUE0, 1125 ); ITEM_setInt(itemindex,ITEM_INGVALUE1, 1125 ); break; // 双头叉 + default: + break; + } + } +} + + +#ifdef _NPCSERVER_NEW +BOOL NPCSERVER_CreateObjindexFromServer( int fd, int npcindex, char *Name, int image, + int dir, int floor, int x, int y) +{ + int objindex; + Object obj; + + obj.type = OBJTYPE_NPCSCHARA; + obj.index= -1; + memset( obj.objname, 0, sizeof( obj.objname)); + memcpy( obj.objname, Name, strlen( Name)+1); + obj.npcsindex = npcindex; + obj.imagenum = image; + obj.dir = dir; + obj.x = x; + obj.y = y; + obj.floor = floor; + objindex = initObjectOne( &obj ); + if( objindex == -1 ){ + return FALSE; + } + + return TRUE; +} +#endif + +#ifdef _PET_LOSTPET +BOOL CHAR_CharSaveLostPet( int petindex, int type)//地上0 溜宠 1 宠邮 2 +{ + int lv, cost=0; + char* CdKey=NULL; + char* Uniquecode; + char* petname; + + char lostpetstring[1024*2]; + char *petstring; + + if( !CHAR_CHECKINDEX( petindex) ) return FALSE; +//存入 + petstring = CHAR_makePetStringFromPetIndex( petindex); + if( petstring == NULL ) return FALSE; + CdKey = CHAR_getChar( petindex, CHAR_OWNERCDKEY); + if( CdKey == NULL ) return FALSE; + Uniquecode = CHAR_getChar( petindex, CHAR_UNIQUECODE); + if( Uniquecode == NULL ) return FALSE; + lv = CHAR_getInt( petindex, CHAR_LV); + petname = CHAR_getChar( petindex, CHAR_NAME); + + if( type == 1 ){ + cost = lv*300; + }else if( type == 2){ + cost = lv*1000; + }else{ + cost = lv*10000; + } + + sprintf( lostpetstring, "%s|%s|%d|%d|%s|%d#%s#%d", + CdKey, petname, lv, cost, Uniquecode, (int)time( NULL), petstring, + type); + + print("保存最后宠物:%s-%d\n", lostpetstring, strlen(lostpetstring)); + { + char buf[10][2048]={"","","","","","","","","",""}; + char line[2048]; + int count=0, i, start=0; + FILE *fp=NULL; + char filename[256]; + +/* + sprintf( filename, "lostpet/%s.txt", CdKey); + if( (fp=fopen( filename, "a+")) != NULL ){ + fprintf( fp, "%s\n", petstring); + fclose( fp); + }else{ + print("Can't Add %s \n", filename); + } + +*/ + + + sprintf( filename, "lostpet/%s.txt", CdKey); + if( (fp=fopen( filename, "r")) != NULL ){ + while( fgets( line , sizeof( line ) , fp ) && count < 7){ + if( strlen(line) <= 0 ) continue; + strcpy( buf[ count++] , line); + } + fclose( fp); + }else{ + print("Can't Read %s \n", filename); + } + + if( (fp=fopen( filename, "w+")) == NULL ){ + print("Can't Write %s \n", filename); + return FALSE; + } + if( strlen( buf[ 6]) > 0 ){ + start=2; + } + for( i=start; i<7; i++){ + if( strlen( buf[i]) > 0 ) { + print("Write %s \n", buf[i]); + fprintf( fp, "%s", buf[i]); + } + } + fprintf( fp, "%s\n", lostpetstring); + + fclose( fp); + } + return TRUE; +} +/* +while( fgets( line , sizeof( line ) , fp ) && count < 7){ +*/ +#endif + +#ifdef _ALLDOMAN +void InitHeroList( void) +{ + saacproto_UpdataStele_send ( acfd , "FirstLoad", "LoadHerolist" , "华义" , 0 , 0 , 0 , 999 ) ; +} +#endif + +#ifdef _STREET_VENDOR +void CHAR_sendStreetVendor(int charaindex,char *message) +{ + char szAction[2],szTemp[21],szMessage[4]; + int count = 0,i,j,iItemIndex = 0,iPetIndex = 0,iPileNum = 0,iMaxPileNum = 0; + int ix,iy,iPlayerNum = 0,tofd = -1,objbuf[16]; + + if(!getStringFromIndexWithDelim(message,"|",1,szAction,sizeof(szAction))) return; + // 开启摆摊介面 + if(szAction[0] == 'O'){ + CHAR_getCoordinationDir(CHAR_getInt(charaindex,CHAR_DIR),CHAR_getInt(charaindex,CHAR_X), + CHAR_getInt(charaindex,CHAR_Y),1,&ix,&iy); + // 取得前方玩家数量 + iPlayerNum = CHAR_getSameCoordinateObjects(objbuf,arraysizeof(objbuf),CHAR_getInt(charaindex,CHAR_FLOOR),ix,iy); + // 没有人 + if(iPlayerNum == 0){ + // 检查自己站的座标有没有人也在摆摊 + iPlayerNum = CHAR_getSameCoordinateObjects(objbuf,arraysizeof(objbuf), + CHAR_getInt(charaindex,CHAR_FLOOR), + CHAR_getInt(charaindex,CHAR_X), + CHAR_getInt(charaindex,CHAR_Y)); + // 不只自己一个人 + if(iPlayerNum > 1){ + // 检查别人有没有摆摊 + for(i=0;i 0){ + if(CHAR_getWorkInt(charaindex,CHAR_WORKSTREETVENDOR) == 1){ + // 修改内容中设成未摆摊 + CHAR_setWorkInt(charaindex,CHAR_WORKSTREETVENDOR,-1); + CHAR_sendStreetVendorDataToCli(charaindex,charaindex); + } + // 已在交易中但要改内容,关闭对方视窗 + else if(CHAR_getWorkInt(charaindex,CHAR_WORKSTREETVENDOR) == 2){ + int toindex = CHAR_getWorkInt(charaindex,CHAR_WORKSTREETVENDOR_WHO); + + if(toindex != -1 && CHAR_CHECKINDEX(toindex)){ + CHAR_setWorkInt(toindex,CHAR_WORKSTREETVENDOR,-1); + CHAR_setWorkInt(toindex,CHAR_WORKSTREETVENDOR_WHO,-1); + lssproto_STREET_VENDOR_send(getfdFromCharaIndex(toindex),"C|"); + CHAR_talkToCli(toindex,-1,"店家取消交易",CHAR_COLORYELLOW); + CHAR_setWorkInt(charaindex,CHAR_WORKSTREETVENDOR_WHO,-1); + // 清除交易图示 + CHAR_sendTradeEffect(charaindex,0); + CHAR_sendTradeEffect(toindex,0); + } + // 修改内容中,设成未摆摊 + CHAR_setWorkInt(charaindex,CHAR_WORKSTREETVENDOR,-1); + CHAR_sendStreetVendorDataToCli(charaindex,charaindex); + } + return; + } + // 检查对方是否卖完 + for(j=0;j 0){ + if(CHAR_getWorkInt(charaindex,CHAR_WORKSTREETVENDOR) == 1){ + // 修改内容中设成未摆摊 + CHAR_setWorkInt(charaindex,CHAR_WORKSTREETVENDOR,-1); + CHAR_sendStreetVendorDataToCli(charaindex,charaindex); + } + // 已在交易中但要改内容,关闭对方视窗 + else if(CHAR_getWorkInt(charaindex,CHAR_WORKSTREETVENDOR) == 2){ + int toindex = CHAR_getWorkInt(charaindex,CHAR_WORKSTREETVENDOR_WHO); + + if(toindex != -1 && CHAR_CHECKINDEX(toindex)){ + CHAR_setWorkInt(toindex,CHAR_WORKSTREETVENDOR,-1); + CHAR_setWorkInt(toindex,CHAR_WORKSTREETVENDOR_WHO,-1); + lssproto_STREET_VENDOR_send(getfdFromCharaIndex(toindex),"C|"); + CHAR_talkToCli(toindex,-1,"店家取消交易",CHAR_COLORYELLOW); + CHAR_setWorkInt(charaindex,CHAR_WORKSTREETVENDOR_WHO,-1); + // 清除交易图示 + CHAR_sendTradeEffect(charaindex,0); + CHAR_sendTradeEffect(toindex,0); + } + // 修改内容中,设成未摆摊 + CHAR_setWorkInt(charaindex,CHAR_WORKSTREETVENDOR,-1); + CHAR_sendStreetVendorDataToCli(charaindex,charaindex); + } + } + // 设定成摆摊 + else{ + sprintf(szMessage,"O|"); + lssproto_STREET_VENDOR_send(getfdFromCharaIndex(charaindex),szMessage); + } + return; + } + } + } + } + // 摆摊 + else if(szAction[0] == 'S'){ + int price; + + // 清除所有旧资料 + for(i=0;i 10000000) price = 10000000; + CHAR_setStreetVendor(charaindex,i,SV_PRICE,price); + } + if(!getStringFromIndexWithDelim(message,"|",6+(i-1)*3,szTemp,sizeof(szTemp))) return; + + // 检查cli端送来的资料 + for(i=0;i CHAR_getMaxHaveGold(toindex)){ + // 身上不够放,存入个人银行 + if(CHAR_getInt(toindex,CHAR_BANKGOLD) + iPrice > CHAR_MAXBANKGOLDHAVE){ + CHAR_talkToCli(charaindex,-1,"店家放不下石币了,交易取消。",CHAR_COLORRED); + CHAR_talkToCli(toindex,-1,"你身上及个人银行存款已满",CHAR_COLORRED); + break; + } + CHAR_talkToCli(toindex,-1,"贩卖所得已存入个人银行",CHAR_COLORRED); + bPutToBank = TRUE; + } + // 若是道具 + if(iKind == 0){ + iItemIndex = CHAR_getItemIndex(toindex,iFieldIndex); + // 道具不存在 + if(!ITEM_CHECKINDEX(iItemIndex)){ + CHAR_clearStreetVendor(toindex,iBuyIndex); + printf("\nCHAR_sendStreetVendor(B):找不到道具!!!!!!!\n"); + continue; + } + // 丢在地上会消失的道具不可贩卖 + if(ITEM_getInt(iItemIndex,ITEM_VANISHATDROP) == 1){ + CHAR_clearStreetVendor(toindex,iBuyIndex); + CHAR_talkToCli(charaindex,-1,"丢在地上会消失的道具不可贩卖,该选项取消",CHAR_COLORYELLOW); + CHAR_talkToCli(toindex,-1,"侦测到有丢在地上会消失的道具在贩卖,帐号已记录!",CHAR_COLORRED); + LogStreetVendor( + CHAR_getUseName(toindex), + CHAR_getUseID(toindex), + "", + "", + ITEM_getChar(iItemIndex,ITEM_NAME), + -1, + iPrice, + "StreetVendor(卖方改封包)", + CHAR_getInt(toindex,CHAR_FLOOR), + CHAR_getInt(toindex,CHAR_X), + CHAR_getInt(toindex,CHAR_Y), + -1,-1,-1, + ITEM_getChar(iItemIndex,ITEM_UNIQUECODE) + ); + continue; + } + // 议价物品不能卖 + if(iPrice == 0){ + LogStreetVendor( + CHAR_getUseName(toindex), + CHAR_getUseID(toindex), + CHAR_getUseName(charaindex), + CHAR_getUseID(charaindex), + ITEM_getChar(iItemIndex,ITEM_NAME), + -1, + iPrice, + "StreetVendor(买方改封包)", + CHAR_getInt(toindex,CHAR_FLOOR), + CHAR_getInt(toindex,CHAR_X), + CHAR_getInt(toindex,CHAR_Y), + CHAR_getInt(charaindex,CHAR_FLOOR), + CHAR_getInt(charaindex,CHAR_X), + CHAR_getInt(charaindex,CHAR_Y), + ITEM_getChar(iItemIndex,ITEM_UNIQUECODE) + ); + continue; + } + // 检查物品堆叠 + iPileNum = ITEM_getInt(iItemIndex,ITEM_USEPILENUMS); + // 买方最大堆叠数 + iMaxPileNum = CHAR_getMyMaxPilenum(charaindex); + // 若物品的堆叠数比身上的最大堆叠数少,把卖方的物品清掉,把物品新增至买方 + if(iPileNum - iMaxPileNum <= 0){ + if(!ITEM_CHECKINDEX(iItemIndex)){ + CHAR_talkToCli(charaindex,-1,"交易失败(1)。",CHAR_COLORRED); + break; + } +#ifdef _ITEM_PILENUMS + // 道具数量为0 + if(ITEM_getInt(iItemIndex,ITEM_USEPILENUMS) <= 0){ + CHAR_talkToCli(charaindex,-1,"交易失败(2)。",CHAR_COLORRED); + break; + } +#endif + // 新增买方的 + if((iRet = CHAR_addItemSpecificItemIndex(charaindex,iItemIndex)) >= CHAR_MAXITEMHAVE){ + CHAR_talkToCli(charaindex,-1,"道具栏满了。",CHAR_COLORRED); + break; + } + CHAR_sendItemDataOne(charaindex,iRet); + // 清掉卖方的 + CHAR_setItemIndex(toindex,iFieldIndex,-1); + CHAR_sendItemDataOne(toindex,iFieldIndex); + CHAR_clearStreetVendor(toindex,iBuyIndex); + // 扣钱 + CHAR_setInt(charaindex,CHAR_GOLD,CHAR_getInt(charaindex,CHAR_GOLD) - iPrice); + CHAR_send_P_StatusString(charaindex,CHAR_P_STRING_GOLD); + // 加钱 + if(bPutToBank) CHAR_setInt(toindex,CHAR_BANKGOLD,CHAR_getInt(toindex,CHAR_BANKGOLD) + iPrice); + else CHAR_setInt(toindex,CHAR_GOLD,CHAR_getInt(toindex,CHAR_GOLD) + iPrice); + CHAR_send_P_StatusString(toindex,CHAR_P_STRING_GOLD); + sprintf(szMsg,"道具 %s 交易完成",ITEM_getChar(iItemIndex,ITEM_NAME)); + CHAR_talkToCli(charaindex,-1,szMsg,CHAR_COLORWHITE); + sprintf(szMsg,"%s 买走了道具 %s",CHAR_getUseName(charaindex),ITEM_getChar(iItemIndex,ITEM_NAME)); + CHAR_talkToCli(toindex,-1,szMsg,CHAR_COLORWHITE); + LogStreetVendor( + CHAR_getUseName(toindex), + CHAR_getUseID(toindex), + CHAR_getUseName(charaindex), + CHAR_getUseID(charaindex), + ITEM_getChar(iItemIndex,ITEM_NAME), + -1, + iPrice, + "StreetVendor(道具)", + CHAR_getInt(toindex,CHAR_FLOOR), + CHAR_getInt(toindex,CHAR_X), + CHAR_getInt(toindex,CHAR_Y), + CHAR_getInt(charaindex,CHAR_FLOOR), + CHAR_getInt(charaindex,CHAR_X), + CHAR_getInt(charaindex,CHAR_Y), + ITEM_getChar(iItemIndex,ITEM_UNIQUECODE) + ); + } + else CHAR_talkToCli(charaindex,-1,"身上堆叠数上限不足。",CHAR_COLORRED); + } + // 若是宠物 + else if(iKind == 1){ + int iEmptyPetField; + + iPetIndex = CHAR_getCharPet(toindex,iFieldIndex); + // 宠物不存在 + if(!CHAR_CHECKINDEX(iPetIndex)){ + CHAR_clearStreetVendor(toindex,iBuyIndex); + printf("\nCHAR_sendStreetVendor(B):找不到宠物!!!!!!!\n"); + continue; + } + if(CHAR_getInt(iPetIndex,CHAR_PETFAMILY) == 1){ + CHAR_talkToCli(charaindex,-1,"家族守护兽无法贩卖,该选项取消",CHAR_COLORYELLOW); + CHAR_clearStreetVendor(toindex,iBuyIndex); + LogStreetVendor( + CHAR_getUseName(toindex), + CHAR_getUseID(toindex), + "", + "", + CHAR_getChar(iPetIndex,CHAR_NAME), + -1, + iPrice, + "StreetVendor(卖方改封包)", + CHAR_getInt(toindex,CHAR_FLOOR), + CHAR_getInt(toindex,CHAR_X), + CHAR_getInt(toindex,CHAR_Y), + -1,-1,-1, + CHAR_getChar(iPetIndex,CHAR_UNIQUECODE) + ); + continue; + } + if(CHAR_getInt(toindex,CHAR_RIDEPET) == CHAR_getStreetVendor(toindex,iBuyIndex,SV_INDEX)){ + CHAR_talkToCli(charaindex,-1,"骑乘中的宠物无法贩卖,该选项取消",CHAR_COLORYELLOW); + CHAR_clearStreetVendor(toindex,iBuyIndex); + LogStreetVendor( + CHAR_getUseName(toindex), + CHAR_getUseID(toindex), + "", + "", + CHAR_getChar(iPetIndex,CHAR_NAME), + -1, + iPrice, + "StreetVendor(卖方改封包)", + CHAR_getInt(toindex,CHAR_FLOOR), + CHAR_getInt(toindex,CHAR_X), + CHAR_getInt(toindex,CHAR_Y), + -1,-1,-1, + CHAR_getChar(iPetIndex,CHAR_UNIQUECODE) + ); + continue; + } + + // 议价物品不能卖 + if(iPrice == 0){ + LogStreetVendor( + CHAR_getUseName(toindex), + CHAR_getUseID(toindex), + CHAR_getUseName(charaindex), + CHAR_getUseID(charaindex), + CHAR_getChar(iPetIndex,CHAR_NAME), + -1, + iPrice, + "StreetVendor(买方改封包)", + CHAR_getInt(toindex,CHAR_FLOOR), + CHAR_getInt(toindex,CHAR_X), + CHAR_getInt(toindex,CHAR_Y), + CHAR_getInt(charaindex,CHAR_FLOOR), + CHAR_getInt(charaindex,CHAR_X), + CHAR_getInt(charaindex,CHAR_Y), + CHAR_getChar(iPetIndex,CHAR_UNIQUECODE) + ); + continue; + } + // 检查玩家有无装备驯兽戒指,检查玩家有没有转生过 + if(CHAR_getWorkInt(charaindex,CHAR_PickAllPet) == FALSE && CHAR_getInt(charaindex,CHAR_TRANSMIGRATION) < 1){ + // 检查玩家等级有没有比宠物高 + if(CHAR_getInt(iPetIndex,CHAR_LV) > (CHAR_getInt(charaindex,CHAR_LV) + 5)){ + CHAR_talkToCli(charaindex,-1,"你无法照顾该宠物。",CHAR_COLORRED); + continue; + } + } + // 以下是宠物交换 + iEmptyPetField = CHAR_getCharPetElement(charaindex); + // 身上有空栏位 + if(iEmptyPetField > -1){ + // 清卖方 + CHAR_setCharPet(toindex,iFieldIndex,-1); + CHAR_clearStreetVendor(toindex,iBuyIndex); + sprintf(szMsg,"K%d",iFieldIndex); + CHAR_sendStatusString(toindex,szMsg); + // 设定买方 + CHAR_setCharPet(charaindex,iEmptyPetField,iPetIndex); + CHAR_setWorkInt(iPetIndex,CHAR_WORKPLAYERINDEX,charaindex); + CHAR_setChar(iPetIndex,CHAR_OWNERCDKEY,CHAR_getChar(charaindex,CHAR_CDKEY)); + CHAR_setChar(iPetIndex,CHAR_OWNERCHARANAME,CHAR_getChar(charaindex,CHAR_NAME)); + CHAR_complianceParameter(iPetIndex); + sprintf(szMsg,"K%d",iEmptyPetField); + CHAR_sendStatusString(charaindex,szMsg); + sprintf(szMsg,"W%d",iEmptyPetField); + CHAR_sendStatusString(charaindex,szMsg); + // 扣钱 + CHAR_setInt(charaindex,CHAR_GOLD,CHAR_getInt(charaindex,CHAR_GOLD) - iPrice); + CHAR_send_P_StatusString(charaindex,CHAR_P_STRING_GOLD); + // 加钱 + if(bPutToBank) CHAR_setInt(toindex,CHAR_BANKGOLD,CHAR_getInt(toindex,CHAR_BANKGOLD) + iPrice); + else CHAR_setInt(toindex,CHAR_GOLD,CHAR_getInt(toindex,CHAR_GOLD) + iPrice); + CHAR_send_P_StatusString(toindex,CHAR_P_STRING_GOLD); + sprintf(szMsg,"%s 买走了宠物 %s",CHAR_getUseName(charaindex),CHAR_getChar(iPetIndex,CHAR_NAME)); + CHAR_talkToCli(charaindex,-1,szMsg,CHAR_COLORWHITE); + sprintf(szMsg,"宠物 %s 交易完成!",CHAR_getChar(iPetIndex,CHAR_NAME)); + CHAR_talkToCli(toindex,-1,szMsg,CHAR_COLORWHITE); + LogStreetVendor( + CHAR_getUseName(toindex), + CHAR_getUseID(toindex), + CHAR_getUseName(charaindex), + CHAR_getUseID(charaindex), + CHAR_getChar(iPetIndex,CHAR_NAME), + CHAR_getInt(iPetIndex,CHAR_LV), + iPrice, + "StreetVendor(宠物)", + CHAR_getInt(toindex,CHAR_FLOOR), + CHAR_getInt(toindex,CHAR_X), + CHAR_getInt(toindex,CHAR_Y), + CHAR_getInt(charaindex,CHAR_FLOOR), + CHAR_getInt(charaindex,CHAR_X), + CHAR_getInt(charaindex,CHAR_Y), + CHAR_getChar(iPetIndex,CHAR_UNIQUECODE) + ); + } + // 玩家宠物栏位满了 + else CHAR_talkToCli(charaindex,-1,"身上宠物栏栏位不足!",CHAR_COLORRED); + } + // 错的内容 + else{ + CHAR_clearStreetVendor(toindex,iBuyIndex); + printf("\nCHAR_sendStreetVendor(B):错的内容!!!!!!!\n"); + } + } + // 卖方设定为摆摊,清除买方状态 + CHAR_setWorkInt(charaindex,CHAR_WORKSTREETVENDOR,-1); + CHAR_setWorkInt(toindex,CHAR_WORKSTREETVENDOR,1); + // 清除交易图示 + CHAR_sendTradeEffect(charaindex,0); + CHAR_sendTradeEffect(toindex,0); + CHAR_setWorkInt(toindex,CHAR_WORKSTREETVENDOR_WHO,-1); + CHAR_setWorkInt(charaindex,CHAR_WORKSTREETVENDOR_WHO,-1); + } + else printf("StreetVendor交易找不到对方(%s)\n",CHAR_getChar(charaindex,CHAR_NAME)); + } +} + +void CHAR_sendStreetVendorDataToCli(int charaindex,int toindex) +{ + int i,count = 0; + + // 送贩卖内容给玩家自己,要修改贩卖内容 + if(charaindex == toindex){ + char szMsg[512],szTemp[512],szTemp1[16]; + + memset(szTemp,0,sizeof(szTemp)); + for(i=0;i=48){ + for(j=0;j 0 && strlen(CHAR_getChar(charaindex,CHAR_TEACHER_NAME)) > 0) bHasTeacher = TRUE; + // 检查正前方有没有人 + CHAR_getCoordinationDir(CHAR_getInt(charaindex,CHAR_DIR),CHAR_getInt(charaindex,CHAR_X), + CHAR_getInt(charaindex,CHAR_Y),1,&ix,&iy); + // 取得前方玩家数量 + iPlayerNum = CHAR_getSameCoordinateObjects(objbuf,arraysizeof(objbuf),CHAR_getInt(charaindex,CHAR_FLOOR),ix,iy); + // 没有人 + if(iPlayerNum == 0){ + // 已有导师,显示导师资料 + if(bHasTeacher){ + // 向 ac 要资料 + saacproto_ACCheckCharacterOnLine_send(acfd,charaindex,CHAR_getChar(charaindex,CHAR_TEACHER_ID), + CHAR_getChar(charaindex,CHAR_TEACHER_NAME), + R_F_TEACHER_SYSTEM); + } + // 没有导师,显示说明 + else lssproto_TEACHER_SYSTEM_send(getfdFromCharaIndex(charaindex),"M|"); + } + // 有人 + else{ + // 已有导师 + if(bHasTeacher){ + // 请玩家先取消原本的导师再进行找新导师动作 + CHAR_talkToCli(charaindex,-1,"请先取消原本的导师再找其他人作为你的导师",CHAR_COLORRED); + } + else{ + int objindex,index; + char szFindName[256]; + + if(iPlayerNum == 1){ + // 询问是否要对方当你的导师 + objindex = objbuf[0]; + index = OBJECT_getIndex(objindex); + + if(OBJECT_getType(objindex) != OBJTYPE_CHARA) break; + if(CHAR_getInt(index,CHAR_WHICHTYPE) != CHAR_TYPEPLAYER) break; + if(index == charaindex) break; + // 检查对方是否为自己的学生 + if(strcmp(CHAR_getChar(index,CHAR_TEACHER_ID),CHAR_getChar(charaindex,CHAR_CDKEY)) == 0 && + strcmp(CHAR_getChar(index,CHAR_TEACHER_NAME),CHAR_getChar(charaindex,CHAR_NAME)) == 0){ + CHAR_talkToCli(charaindex,-1,"对方为你的学生,无法让对方成为你的导师",CHAR_COLORRED); + break; + } + sprintf(szMsg,"C|%s|%d",CHAR_getChar(index,CHAR_NAME),index); + lssproto_TEACHER_SYSTEM_send(getfdFromCharaIndex(charaindex),szMsg); + } + // 超过一人,询问要找谁当导师 + else{ + int iGetNum = 0; + char szBuf[1024]; + + memset(szBuf,0,sizeof(szBuf)); + for(i=0;i 0 && tickettime > nowtime+20 ) { + continue; + } + // 时限不到20秒 + else if( tickettime < nowtime+20 && tickettime >= nowtime ) { + sprintf( msg, "时间票剩馀时间%d秒。", tickettime - nowtime); + CHAR_talkToCli( i, -1, msg, CHAR_COLORYELLOW); + } + + // 超过时限 + else if( tickettime < nowtime ) { + int floor, x, y; + int totaltime; + char msg[1024]; + if( CHAR_getWorkInt( i, CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE) { + CHAR_talkToCli( i, -1, "时间已到,谢谢光顾。", CHAR_COLORYELLOW); + if( CHAR_getWorkInt( i, CHAR_WORKTICKETTIMESTART) > 0 ) { + totaltime = nowtime - CHAR_getWorkInt( i, CHAR_WORKTICKETTIMESTART); + sprintf( msg, "总入场时间%d分%d秒。", totaltime/60, totaltime%60); + CHAR_talkToCli( i, -1, msg, CHAR_COLORYELLOW); + } + CHAR_setWorkInt( i, CHAR_WORKTICKETTIME, 0); + CHAR_setWorkInt( i, CHAR_WORKTICKETTIMESTART, 0); + /* + if( CHAR_getElderPosition( CHAR_getInt( i, CHAR_LASTTALKELDER), &floor, &x, &y ) != TRUE ) { + CHAR_warpToSpecificPoint( i, 1006, 15, 15); + } + else { + CHAR_warpToSpecificPoint( i, floor, x, y); + } + */ + CHAR_warpToSpecificPoint( i, 7001, 41, 6); + } + else { + CHAR_talkToCli( i, -1, "时间已到,将於战斗结束时离开。", CHAR_COLORYELLOW); + // 移至 BATTLE_Exit() 处理 + } + } + } + +} +#endif diff --git a/gmsv/char/char.c.bak b/gmsv/char/char.c.bak new file mode 100644 index 0000000..bab9417 --- /dev/null +++ b/gmsv/char/char.c.bak @@ -0,0 +1,8701 @@ +#include "version.h" +#include +#include +#include +#include // shan +#include +#include +#include +#include +#include "common.h" +#include "char_base.h" +#include "char_data.h" +#include "char.h" +#include "lssproto_serv.h" +#include "item.h" +#include "item_event.h" +#include "buf.h" +#include "object.h" +#include "map_deal.h" +#include "saacproto_cli.h" +#include "readmap.h" +#include "handletime.h" +#include "char_event.h" +#include "npccreate.h" +#include "addressbook.h" +#include "item_event.h" +#include "magic_base.h" +#include "magic.h" +#include "chatmagic.h" +#include "configfile.h" +#include "log.h" +#include "anim_tbl.h" +#include "encount.h" +#include "battle.h" +#include "pet_skill.h" +#include "util.h" +#include "enemy.h" +#include "npcutil.h" +#include "pet.h" +#include "family.h" +#include "defend.h" +#ifdef _NPCSERVER_NEW +#include "npcserver.h" +#endif +#ifdef _DEATH_CONTEND +#include "deathcontend.h" +#endif +#include "correct_bug.h" +#ifdef _JOBDAILY +#include "npc_checkman.h" +#endif + +#ifdef _CHAR_PROFESSION // WON ADD 人物职业栏位 +#include "profession_skill.h" +#endif +#ifdef _CHATROOMPROTOCOL // (不可开) Syu ADD 聊天室频道 +#include "chatroom.h" +#endif + +extern int channelMember[FAMILY_MAXNUM][FAMILY_MAXCHANNEL][FAMILY_MAXMEMBER]; +extern int familyMemberIndex[FAMILY_MAXNUM][FAMILY_MAXMEMBER]; + +extern tagRidePetTable ridePetTable[146]; +extern int BATTLE_getRidePet( int charaindex ); + +#ifdef _CHANNEL_MODIFY +extern int InitOccChannel(void); +#endif + +#ifdef _ANGEL_SUMMON +extern int checkIfAngelByName( char* nameinfo); +extern char* getMissionNameInfo( int charaindex, char* nameinfo); +extern void CHAR_sendAngelMark( int objindex, int flag); +extern int checkIfOnlyAngel( int charaindex); +extern void selectAngel( int charaindex, int heroindex, int mission, int gm_cmd); +#endif + +extern void GOLD_DeleteTimeCheckOne( int objindex); + +// WON ADD 修正道具的设定问题 +void fix_item_bug(int charaindex, int i); + + +/*====================平乓仿及综岳卞楮允月楮醒====================*/ +/*------------------------------------------------------------ + * 综岳允月凛及左皿扑亦件及袄毛涩烂仄方丹午允月[ + * 娄醒 + * ch Char* 涩烂燮及平乓仿及犯□正 + * option char* 弁仿奶失件玄井日仁月犯□正 + * 忒曰袄 + * 岳 TRUE + * 撩 FALSE + ------------------------------------------------------------*/ +static BOOL CHAR_makeCharFromOptionAtCreate( Char* ch , + int vital, int str, int tgh, int dex, + int earth, int water, int fire, int wind) +{ + + /* 躲岭及腹据毛垫丹 */ + int para[4]; + int attr[4]; + int i; + int parasum,attrsum; + int cnt; + + para[0] = vital; + para[1] = str; + para[2] = tgh; + para[3] = dex; + + attr[0] = earth; + attr[1] = water; + attr[2] = fire; + attr[3] = wind; + +#define MAXPARAMETER 20 +#define PKMAXPARAMETER 300 + parasum = 0; + /* + * 允屯化及犯□正及 卞 - 反丐匀化反卅日卅中仄 + * 瑕丐孔木及仪毛哔尹化云中化 及袄手译尹卅中 + */ + + for( i = 0; i < arraysizeof( para); i ++ ) { + if( para[i] < 0 || para[i] > MAXPARAMETER )return FALSE; + parasum += para[i]; + } +#ifdef _NEW_PLAYER_CF //新手出生配置 + if( parasum > MAXPARAMETER ) return FALSE; +#else + if( parasum != MAXPARAMETER ) return FALSE; +#endif + +/*#ifdef _NEW_TESTSERVER //测试伺服 + if( parasum > MAXPARAMETER ) return FALSE; +#else + if( parasum != MAXPARAMETER ) return FALSE; +#endif*/ + + +#undef MAXPARAMETER + + +#define MAXATTRIBUTE 10 + cnt = 0; + attrsum = 0; + /* 箪岭及民尼永弁毛允月 */ + for( i = 0; i < arraysizeof( para); i ++ ) { + if( attr[i] < 0 || attr[i] > MAXATTRIBUTE )return FALSE; + attrsum += attr[i]; + if( attr[i] > 0 ) cnt ++; + } + /* 宁煌袄反10 */ + if( attrsum != MAXATTRIBUTE ) return FALSE; + + /* 2勾方曰聂仁喃曰癫化日木化中凶日蛲 */ + if( cnt > 2 ) return FALSE; + + /* 菅箪岭反喃曰癫化日木卅中 */ + if( attr[0] > 0 && attr[2] > 0 ) return FALSE; + if( attr[1] > 0 && attr[3] > 0 ) return FALSE; + +#undef MAXATTRIBUTE + + /* 戊疋□ */ + ch->data[CHAR_VITAL] = vital*100; + ch->data[CHAR_STR] = str*100; + ch->data[CHAR_TOUGH] = tgh*100; + ch->data[CHAR_DEX] = dex*100; + + ch->data[CHAR_EARTHAT] = attr[0] * 10; + ch->data[CHAR_WATERAT] = attr[1] * 10; + ch->data[CHAR_FIREAT] = attr[2] * 10; + ch->data[CHAR_WINDAT] = attr[3] * 10; +#ifdef _NEWOPEN_MAXEXP + ch->data[CHAR_OLDEXP] = 0; +#endif + ch->data[CHAR_EXP] = 0; + + +#ifdef _NEW_PLAYER_CF //新手出生配置 + ch->data[CHAR_TRANSMIGRATION] = getNewplayertrans(); + ch->data[CHAR_GOLD] = getNewplayergivegold();; + ch->data[CHAR_LV] = getNewplayerlv();//120; +// ch->data[CHAR_LEARNRIDE] = 200; +// ch->data[CHAR_LASTTALKELDER] = (rand()%10)>5?35:36;//34; +// ch->data[CHAR_SKILLUPPOINT] = 616;//600; +#ifdef _75_TEST + ch->data[CHAR_TRANSEQUATION] = (100 << 16) + 650; +#endif +#ifdef _NEW_RIDEPETS + //ch->data[CHAR_LOWRIDEPETS] = 0xffffffff; +#endif +#endif + +/*#ifdef _NEW_TESTSERVER //测试伺服 + ch->data[CHAR_SKILLUPPOINT] = "";//600; + ch->data[CHAR_TRANSMIGRATION] = 5; + ch->data[CHAR_GOLD] = CHAR_MAXGOLDHAVE; + ch->data[CHAR_LV] = 140;//120; + ch->data[CHAR_LEARNRIDE] = 200; +// ch->data[CHAR_LASTTALKELDER] = (rand()%10)>5?35:36;//34; + ch->data[CHAR_SKILLUPPOINT] = 616;//600; +#ifdef _75_TEST + ch->data[CHAR_TRANSEQUATION] = (100 << 16) + 650; +#endif +#ifdef _NEW_RIDEPETS + //ch->data[CHAR_LOWRIDEPETS] = 0xffffffff; +#endif +#endif*/ + +#ifdef _PETSKILL_BECOMEPIG + ch->data[CHAR_BECOMEPIG] = -1; + ch->data[CHAR_BECOMEPIG_BBI] = 100250; +#endif + + ch->data[CHAR_LASTLEAVETIME] = 0; + + return TRUE; +} + +#ifdef _HELP_NEWHAND +void CHAR_loginAddItemForNew( int charindex ) +{ + int emptyitemindexinchara, itemindex; + int i; + + char msgbuf[128]; + + for( i = 0; i < 15; i ++ ) { + emptyitemindexinchara = CHAR_findEmptyItemBox( charindex ); + + if( emptyitemindexinchara < 0 ){ + sprintf( msgbuf, "空间栏位不足。" ); + + CHAR_talkToCli( charindex, -1, msgbuf, CHAR_COLORYELLOW); + return; + } + if(getNewplayergiveitem(i)==-1)continue; + itemindex = ITEM_makeItemAndRegist( getNewplayergiveitem(i) ); + + if( itemindex != -1 ){ + CHAR_setItemIndex( charindex, emptyitemindexinchara, itemindex ); + ITEM_setWorkInt(itemindex, ITEM_WORKOBJINDEX,-1); + ITEM_setWorkInt(itemindex, ITEM_WORKCHARAINDEX,charindex); + CHAR_sendItemDataOne( charindex, emptyitemindexinchara); + } + } + print("Get New Hand Item"); +} +#endif + +void CHAR_createNewChar( int clifd, int dataplacenum, char* charname , + int imgno,int faceimgno, + int vital,int str,int tgh,int dex, + int earth,int water,int fire,int wind, + int hometown , char *cdkey ) +{ + + Char ch, *chwk; + int charaindex, petindex; + int enemyarray; + char szKey[256]; + +/*#ifdef _NEW_TESTSERVER //测试伺服 + int add_pet[]={0,0,0,0,0}; +#endif*/ + +#ifdef _NEW_PLAYER_CF //新手出生配置 + int add_pet[]={0,0,0,0,0}; +#endif + +#ifdef _DELBORNPLACE //Syu ADD 6.0 统一出生於新手村 + int BornPet = hometown; + if( getMuseum() ) + hometown = 1; +#endif + memset(&ch,0,sizeof(Char)); + + if( !CHAR_checkPlayerImageNumber( imgno)) { + lssproto_CreateNewChar_send( clifd ,FAILED, "" ); + CONNECT_setState( clifd, NOTLOGIN ); + return; + } + if( !CHAR_checkFaceImageNumber( imgno, faceimgno)) { + lssproto_CreateNewChar_send( clifd ,FAILED, "" ); + CONNECT_setState( clifd, NOTLOGIN ); + return; + } + CHAR_getDefaultChar(&ch,imgno); + ch.data[CHAR_WALKINTERVAL] = getWalksendinterval(); + + if( CHAR_getInitElderPosition( &ch ,hometown) == FALSE ){ + lssproto_CreateNewChar_send( clifd ,FAILED, "" ); + CONNECT_setState( clifd, NOTLOGIN ); + return; + + }else if( MAP_checkCoordinates( ch.data[CHAR_FLOOR], ch.data[CHAR_X], + ch.data[CHAR_Y] ) == FALSE ){ + lssproto_CreateNewChar_send( clifd ,FAILED, ""); + CONNECT_setState( clifd, NOTLOGIN ); + return; + } + strcpysafe( ch.string[CHAR_NAME].string , + sizeof(ch.string[CHAR_NAME].string), + charname); + + if( CHAR_getNewImagenumberFromEquip( imgno,0) == -1 ){ + lssproto_CreateNewChar_send( clifd ,FAILED, ""); + CONNECT_setState( clifd, NOTLOGIN ); + return; + } + ch.data[CHAR_BASEIMAGENUMBER] = imgno; + ch.data[CHAR_BASEBASEIMAGENUMBER] = imgno; + ch.data[CHAR_FACEIMAGENUMBER] = faceimgno; + ch.data[CHAR_DATAPLACENUMBER] = dataplacenum; + +#ifdef _FM_JOINLIMIT + ch.data[CHAR_FMTIMELIMIT] = 0; +#endif + +#ifdef _NEWSAVE + ch.data[CHAR_SAVEINDEXNUMBER] = -1; +#endif + ch.data[CHAR_HP] = 0x7fffffff; + + ch.data[CHAR_CHARM] = 60; + ch.data[CHAR_MAXMP] = ch.data[CHAR_MP] = 100; + strcpysafe( ch.string[CHAR_CDKEY].string, + sizeof( ch.string[CHAR_CDKEY].string), cdkey ); + + // Robin 0724 + ch.data[CHAR_RIDEPET] = -1; + ch.data[CHAR_LEARNRIDE] = 0; + +#ifdef _NEW_RIDEPETS + ch.data[CHAR_LOWRIDEPETS] = 0; +#endif + +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + ch.data[CHAR_FAME] = 0; +#endif +#ifdef _NEW_MANOR_LAW + ch.data[CHAR_MOMENTUM] = 0; // 个人气势 +#endif +#ifdef _TEACHER_SYSTEM + ch.data[CHAR_TEACHER_FAME] = 0; // 导师领导声望 +#endif +#ifdef _RACEMAN + ch.data[CHAR_CHECKIN] = 0; // 宠物登记 + ch.data[CHAR_CATCHCNT1] = 0; // 新手限 猎宠次数 + ch.data[CHAR_CATCHCNT2] = 0; // 老手限 猎宠次数 + ch.data[CHAR_CATCHCNT3] = 0; // 家族限 猎宠次数 + ch.data[CHAR_CATCHCNT4] = 0; // 老手不限 猎宠次数 + ch.data[CHAR_CATCHCNT5] = 0; // 家族不限 猎宠次数 + ch.data[CHAR_KINDCNT1] = 0; + ch.data[CHAR_KINDCNT2] = 0; + ch.data[CHAR_KINDCNT3] = 0; + ch.data[CHAR_KINDCNT4] = 0; + ch.data[CHAR_KINDCNT5] = 0; + ch.data[CHAR_KINDCNT6] = 0; + ch.data[CHAR_KINDCNT7] = 0; + ch.data[CHAR_KINDCNT8] = 0; + ch.data[CHAR_KINDCNT9] = 0; + ch.data[CHAR_KINDCNT10] = 0; +#endif +#ifdef _CHAR_PROFESSION // WON ADD 人物职业 + ch.data[PROFESSION_CLASS] = 0; + ch.data[PROFESSION_LEVEL] = 0; +// ch.data[PROFESSION_EXP] = 0; + ch.data[PROFESSION_SKILL_POINT] = 0; + ch.data[ATTACHPILE] = 0; +#endif + +#ifdef _GM_IDENTIFY + sprintf(ch.string[CHAR_GMIDENTIFY].string,"%s",""); //gm名称清为空字串 +#endif +#ifdef _TEACHER_SYSTEM + memset(ch.string[CHAR_TEACHER_ID].string,0,sizeof(STRING128)); + memset(ch.string[CHAR_TEACHER_NAME].string,0,sizeof(STRING128)); +#endif + +#ifdef _ITEM_SETLOVER + memset(ch.string[CHAR_LOVERID].string,0,sizeof(STRING128)); + memset(ch.string[CHAR_LOVERNAME].string,0,sizeof(STRING128)); +#endif + +#ifdef _PETSKILL_BECOMEPIG + ch.data[CHAR_BECOMEPIG] = -1; + ch.data[CHAR_BECOMEPIG_BBI] = 100250; +#endif + + strcpysafe( ch.string[CHAR_FMNAME].string, + sizeof( ch.string[CHAR_FMNAME].string), "\0" ); + ch.data[CHAR_FMINDEX] = -1; + + if( CHAR_makeCharFromOptionAtCreate( &ch, + vital,str,tgh,dex, + earth,water,fire,wind ) == FALSE ) + { + lssproto_CreateNewChar_send( clifd ,FAILED, + "option data is invalid\n"); + CONNECT_setState( clifd, NOTLOGIN ); + return; + } + { + int mp=ch.data[CHAR_MAXMP]; + int str=ch.data[CHAR_STR]; + int tough=ch.data[CHAR_TOUGH]; + + ch.data[CHAR_INITDATA] = 2*100*100*100*100 /*+ hp*100*100*100*/ + + mp*100*100 + str* 100 + tough; + } + + charaindex = CHAR_initCharOneArray( &ch ); + if( charaindex == -1 ) { + lssproto_CreateNewChar_send( clifd ,FAILED, ""); + CONNECT_setState( clifd, NOTLOGIN ); + return; + } + +/*#ifdef _NEW_TESTSERVER //伊甸测试伺服 + { + int petTemp[]={ 2258, 1610, 353, 2474, -1}; //朱雀、 + int petNum=0; + int k=0; + int i=0,j=0; + +#ifdef _75_TEST + if( CHAR_getInt( charaindex, CHAR_LASTTALKELDER) == 1 )//玛丽娜丝 + petTemp[4] = 2;//凯比 + else if( CHAR_getInt( charaindex, CHAR_LASTTALKELDER) == 2 )//加加 + petTemp[4] = 3;//克克尔 + else if( CHAR_getInt( charaindex, CHAR_LASTTALKELDER) == 3 )//卡鲁它那 + petTemp[4] = 4;//威伯 + else + petTemp[4] = 1;//乌力 +#else + j=2; + for( i=0; i< arraysizeof(ridePetTable) ; i++ ){ + if( CHAR_getInt( charaindex, CHAR_BASEBASEIMAGENUMBER) == ridePetTable[i].charNo ){ + petTemp[j]= ridePetTable[i].petId; + j++; + if( j >= arraysizeof( petTemp) ) + break; + } + } +#endif + + j=0; + for( petNum=0; petNum 3 ) BornPet = 3; + if ( BornPet < 0 ) BornPet = 0; + enemyarray = ENEMY_getEnemyArrayFromId( BornPet + 2076); + } + else { + enemyarray = ENEMY_getEnemyArrayFromId( hometown + 1); + } +#else + enemyarray = ENEMY_getEnemyArrayFromId( hometown + 1); +#endif + petindex = ENEMY_createPetFromEnemyIndex( charaindex, enemyarray); + if( !CHAR_CHECKINDEX( petindex )){ + CHAR_endCharOneArray( charaindex); + lssproto_CreateNewChar_send( clifd ,FAILED, ""); + CONNECT_setState( clifd, NOTLOGIN ); + return; + } + CHAR_setMaxExpFromLevel( petindex, 1); + +#endif*/ + +#ifdef _NEW_PLAYER_CF //新手出生配置 + int petTemp[]={ 2258, 1610, 353, 2474, -1}; //朱雀、 + int petNum=0; + int k=0; + int i=0,j=0; + int mylevel,level; + if(getNewplayergivepet(0)==-1){ + if( CHAR_getInt( charaindex, CHAR_LASTTALKELDER) == 1 )//玛丽娜丝 + setNewplayergivepet(0,2); + else if( CHAR_getInt( charaindex, CHAR_LASTTALKELDER) == 2 )//加加 + setNewplayergivepet(0,3); + else if( CHAR_getInt( charaindex, CHAR_LASTTALKELDER) == 3 )//卡鲁它那 + setNewplayergivepet(0,4); + else + setNewplayergivepet(0,1); + } + + for( petNum=0; petNum<5; petNum++) { + if(getNewplayergivepet(petNum)==-1)continue; + enemyarray = ENEMY_getEnemyArrayFromId( getNewplayergivepet(petNum)); //白虎 + petindex = ENEMY_createPetFromEnemyIndex( charaindex, enemyarray); + if( petindex == -1 ) { + continue; + } + add_pet[j]=petindex; + mylevel = CHAR_getInt( petindex, CHAR_LV); + level = getNewplayerpetlv()-mylevel; + if(level<1)level=1; + for( k = 1; k < level; k ++ ){ //升级 + CHAR_PetLevelUp( petindex ); + CHAR_PetAddVariableAi( petindex, AI_FIX_PETLEVELUP ); + CHAR_setInt( petindex, CHAR_LV, CHAR_getInt( petindex, CHAR_LV) +1 ); + } + CHAR_complianceParameter( petindex ); + CHAR_setInt( petindex , CHAR_HP , CHAR_getWorkInt( petindex , CHAR_WORKMAXHP ) ); + } +#endif + +#ifdef _HELP_NEWHAND + CHAR_loginAddItemForNew(charaindex); +#endif + +#if 1 + if( CHAR_makeDBKey( charaindex, szKey, sizeof( szKey ) ) != FALSE ){ + int dp; + char info[512]; + snprintf( info, sizeof( info), + "%d,%d,%d,%d,%d,%d", + CHAR_getInt( charaindex, CHAR_LV), + CHAR_getInt( charaindex, CHAR_DUELBATTLECOUNT), + CHAR_getInt( charaindex, CHAR_DUELWINCOUNT), + CHAR_getInt( charaindex, CHAR_DUELLOSECOUNT), + CHAR_getInt( charaindex, CHAR_DUELSTWINCOUNT), + CHAR_getInt( charaindex, CHAR_DUELMAXSTWINCOUNT)); + dp = CHAR_getInt( charaindex, CHAR_DUELPOINT ); + saacproto_DBUpdateEntryInt_send( + acfd, + DB_DUELPOINT, + szKey, + (max(dp,0)), + info, + CONNECT_getFdid(clifd ),0 ); + } +#endif + chwk = CHAR_getCharPointer( charaindex); +#ifdef _AUTO_ADDADDRESS + { + int playernum = CHAR_getPlayerMaxNum(); + int i, k, oldnum=0, newnum=0; + i = charaindex; + for( k=0 ; k< playernum ; k++ ){ + char token[256]; + if( ++i >= playernum ) i = 0; + if( i < 0 ) i =0; + if( !CHAR_getCharUse(i) ) continue; + if( charaindex == i ) continue; + if( !CHAR_getFlg( i, CHAR_ISTRADECARD) ) continue; + if( oldnum < 3 && CHAR_getInt( i, CHAR_LV) > 100 ){ + if( ADDRESSBOOK_AutoaddAddressBook( charaindex, i) == TRUE ){ + sprintf( token, "新手-%s 加入石器,并与你交换名片。", CHAR_getUseName( charaindex)); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW); + oldnum++; + } + }else if( newnum < 5 && CHAR_getInt( i, CHAR_LV) < 30 ){ + if( ADDRESSBOOK_AutoaddAddressBook( charaindex, i) == TRUE ){ + sprintf( token, "新手-%s 加入石器,并与你交换名片。", CHAR_getUseName( charaindex)); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW); + newnum++; + } + } + if( newnum >= 5 && oldnum >= 3 ) + break; + } + } +#endif + +#ifdef _NEW_PLAYER_CF //新手出生配置 + + CHAR_charSaveFromConnectAndChar( clifd,chwk ,FALSE ); + CHAR_endCharData(&ch); + CHAR_endCharOneArray( charaindex); + { + int k=0; + for( k=0;kcharfunctable[i].string, + sizeof( ch->charfunctable[i]), + tmp[i]); + } +} + +void CHAR_loginAddItem( int charaindex ) +{ +/* + int emptyindex, itemindex, id; + int itemID[10]={ 20128, 20130, 20171, 20176, 20296, + 20287, 20288, 20289, 20290, 20291}; + + { + int trn_num=0; + trn_num=CHAR_getInt(charaindex,CHAR_TRANSMIGRATION); + CHAR_setInt( charaindex, CHAR_MAXPOOLITEMHAVELIMIT, 10 + (trn_num * 4) ) ; + CHAR_setInt( charaindex, CHAR_MAXPOOLPETHAVELIMIT , 5 + (trn_num * 2) ); + } + while( 1){ + emptyindex = CHAR_findEmptyItemBox( charaindex ); + if( emptyindex == -1 ) break; + id = rand()%10; + itemindex = ITEM_makeItemAndRegist( itemID[id] ); + if( !ITEM_CHECKINDEX( itemindex) ) break; + CHAR_setItemIndex( charaindex, emptyindex, itemindex); + ITEM_setWorkInt( itemindex, ITEM_WORKCHARAINDEX, charaindex); + ITEM_setWorkInt( itemindex, ITEM_WORKOBJINDEX, -1); + //andy_log + print("@:%d.", emptyindex); + } + while( 1){ + emptyindex = CHAR_findEmptyPoolItemBox( charaindex ); + if( emptyindex == -1 ) break; + id = rand()%10; + itemindex = ITEM_makeItemAndRegist( itemID[id] ); + if( !ITEM_CHECKINDEX( itemindex) ) break; + + CHAR_setPoolItemIndex( charaindex, emptyindex, itemindex); + ITEM_setWorkInt( itemindex, ITEM_WORKCHARAINDEX, charaindex); + ITEM_setWorkInt( itemindex, ITEM_WORKOBJINDEX, -1); + //andy_log + print("&:%d.", emptyindex); + } +*/ +} + +void CHAR_loginCheckUserItem( int charaindex) +{ + typedef void (*ATTACHFUNC)(int,int); + int i, itemindex; + for( i=0; i 0 ){ + if( (ti = CHAR_findEmptyItemBox( charaindex )) != -1 ){ + CHAR_setItemIndex( charaindex , i, -1); + CHAR_setItemIndex( charaindex , ti, itemindex); + } + continue; + } + } + //////////////////////////////////////////// + + + if( (i == ITEM_getEquipPlace( charaindex, itemindex )) || + i == CHAR_DECORATION1 || i == CHAR_DECORATION2 ){ + char category[256]; + ATTACHFUNC atf; + atf=(ATTACHFUNC)ITEM_getFunctionPointer(itemindex,ITEM_ATTACHFUNC); + if( atf ) atf( charaindex, itemindex ); + if( ITEM_canuseMagic( itemindex)) { + snprintf( category, sizeof( category), "J%d",i); + CHAR_sendStatusString( charaindex, category ); + } + }else{ + if( (ti = CHAR_findEmptyItemBox( charaindex )) == -1 ) continue; + CHAR_setItemIndex( charaindex , i, -1); + CHAR_setItemIndex( charaindex , ti, itemindex); + } + } + for( i = CHAR_STARTITEMARRAY ; i < CHAR_MAXITEMHAVE ; i++ ){ //检查携带道具 + itemindex = CHAR_getItemIndex( charaindex , i ); + if( !ITEM_CHECKINDEX( itemindex)) continue; + ITEM_reChangeItemName( itemindex); +#ifdef _ITEM_PILENUMS + ITEM_reChangeItemToPile( itemindex); +#endif + +#ifdef _ANGEL_SUMMON + if( ITEM_getInt( itemindex, ITEM_ID) == ANGELITEM + || ITEM_getInt( itemindex, ITEM_ID) == HEROITEM ) { + int mindex, mission; + // 检查信物所有人是否任务中 + mindex = checkIfAngelByName( ITEM_getChar( itemindex, ITEM_ANGELINFO)); + mission = atoi( ITEM_getChar( itemindex, ITEM_ANGELMISSION)); + if( mindex < 0 || mission != missiontable[mindex].mission ) { + CHAR_setItemIndex( charaindex, i, -1 ); + ITEM_endExistItemsOne( itemindex); + CHAR_sendItemDataOne( charaindex, i); + continue; + } + } +#endif + + ITEM_setItemUniCode( itemindex); + +#ifdef _DEATH_FAMILY_LOGIN_CHECK // WON ADD 家族战登入检查 + if( ITEM_getInt( itemindex, ITEM_TYPE) == ITEM_WARES || + ITEM_getInt( itemindex, ITEM_TYPE) == ITEM_DISH || + ITEM_getInt( itemindex, ITEM_TYPE) == ITEM_OTHER ){ + CHAR_setItemIndex( charaindex, i, -1 ); + ITEM_endExistItemsOne( itemindex); + CHAR_sendItemDataOne( charaindex, i); + } + +#endif + +#ifdef _DEATH_CONTEND + if( ITEM_getInt( itemindex, ITEM_TYPE) == ITEM_WARES || + ITEM_getInt( itemindex, ITEM_TYPE) == ITEM_DISH || + ITEM_getInt( itemindex, ITEM_TYPE) == ITEM_OTHER ){ + CHAR_setItemIndex( charaindex, i, -1 ); + ITEM_endExistItemsOne( itemindex); + CHAR_sendItemDataOne( charaindex, i); + } +#endif + + } + //检查寄放店道具 + for( i = 0 ; i < CHAR_MAXPOOLITEMHAVE ; i++ ){ + itemindex = CHAR_getPoolItemIndex( charaindex , i ); + if( !ITEM_CHECKINDEX( itemindex) ) continue; + + ITEM_reChangeItemName( itemindex); +#ifdef _ITEM_PILENUMS + ITEM_reChangeItemToPile( itemindex); +#endif + +#ifdef _ANGEL_SUMMON + if( ITEM_getInt( itemindex, ITEM_ID) == ANGELITEM + || ITEM_getInt( itemindex, ITEM_ID) == HEROITEM ) { + int mindex, mission; + // 检查信物所有人是否任务中 + mindex = checkIfAngelByName( ITEM_getChar( itemindex, ITEM_ANGELINFO)); + mission = atoi( ITEM_getChar( itemindex, ITEM_ANGELMISSION)); + if( mindex < 0 || mission != missiontable[mindex].mission ) { + CHAR_setPoolItemIndex( charaindex, i, -1 ); + ITEM_endExistItemsOne( itemindex); + continue; + } + } +#endif + + ITEM_setItemUniCode( itemindex); + +#ifdef _DEATH_FAMILY_LOGIN_CHECK // WON ADD 家族战登入检查 + if( ITEM_getInt( itemindex, ITEM_TYPE) == ITEM_WARES || + ITEM_getInt( itemindex, ITEM_TYPE) == ITEM_DISH || + ITEM_getInt( itemindex, ITEM_TYPE) == ITEM_OTHER ){ + CHAR_setPoolItemIndex( charaindex, i, -1 ); + ITEM_endExistItemsOne( itemindex); + } +#endif + +#ifdef _DEATH_CONTEND + if( ITEM_getInt( itemindex, ITEM_TYPE) == ITEM_WARES || + ITEM_getInt( itemindex, ITEM_TYPE) == ITEM_DISH || + ITEM_getInt( itemindex, ITEM_TYPE) == ITEM_OTHER ){ + CHAR_setPoolItemIndex( charaindex, i, -1 ); + ITEM_endExistItemsOne( itemindex); + } +#endif + } + + // WON ADD 修正道具的设定问题 + if(!NPC_EventCheckFlg( charaindex,134)){ + for (i = 0; i < CHAR_MAXITEMHAVE; i ++) { + itemindex = CHAR_getItemIndex(charaindex, i); + fix_item_bug(charaindex, itemindex); + } + for (i = 0; i < CHAR_MAXPOOLITEMHAVE; i++) { + itemindex = CHAR_getPoolItemIndex(charaindex, i); + fix_item_bug(charaindex, itemindex); + } + NPC_EventSetFlg(charaindex, 134); + } + + Check_P_I_UniCode( charaindex); +} +void CHAR_LoginBesideSetWorkInt( int charaindex, int clifd) +{ + CHAR_setWorkInt( charaindex, CHAR_WORKPARTYMODE, CHAR_PARTY_NONE); + CHAR_setWorkInt( charaindex, CHAR_WORKPARTYINDEX1, -1); + CHAR_setWorkInt( charaindex, CHAR_WORKPARTYINDEX2, -1); + CHAR_setWorkInt( charaindex, CHAR_WORKPARTYINDEX3, -1); + CHAR_setWorkInt( charaindex, CHAR_WORKPARTYINDEX4, -1); + CHAR_setWorkInt( charaindex, CHAR_WORKPARTYINDEX5, -1); + + CHAR_setWorkInt( charaindex, CHAR_WORKTRADEMODE, CHAR_TRADE_FREE); + CHAR_setWorkInt( charaindex, CHAR_WORKFMINDEXI, -1); + CHAR_setWorkInt( charaindex, CHAR_WORKFMCHANNEL, -1); + CHAR_setWorkInt( charaindex, CHAR_WORKFMCHANNELQUICK, -1); + CHAR_setWorkInt( charaindex, CHAR_WORKFMFLOOR, -1); + CHAR_setWorkInt( charaindex, CHAR_WORKFMDP, 0); + CHAR_setWorkInt( charaindex, CHAR_WORKFMPKFLAG, -1); + CHAR_setWorkInt( charaindex, CHAR_WORKFMSETUPFLAG, -1); + CHAR_setWorkInt( charaindex, CHAR_WORKFMMANINDEX, -1); + CHAR_setWorkInt( charaindex, CHAR_WORKFMCHARINDEX, -1); + + CHAR_setWorkInt( charaindex, CHAR_WORKBATTLEFLAG, -1); + CHAR_setWorkInt( charaindex, CHAR_WORK_PET0_STAT, 0); + CHAR_setWorkInt( charaindex, CHAR_WORK_PET1_STAT, 0); + CHAR_setWorkInt( charaindex, CHAR_WORK_PET2_STAT, 0); + CHAR_setWorkInt( charaindex, CHAR_WORK_PET3_STAT, 0); + CHAR_setWorkInt( charaindex, CHAR_WORK_PET4_STAT, 0); + CHAR_setWorkInt( charaindex, CHAR_WORKACTION, -1); + CHAR_setWorkInt( charaindex, CHAR_WORKEFFECT, -1); + CHAR_setWorkInt( charaindex, CHAR_WORKFD, clifd); + + + if( CHAR_getInt( charaindex, CHAR_SILENT) > 100000000 ) + CHAR_setInt( charaindex, CHAR_SILENT, 0); + CHAR_setWorkInt( charaindex, CHAR_WORKLOGINTIME, (int)NowTime.tv_sec); + CHAR_setWorkInt( charaindex, CHAR_WORKTALKCOUNT, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORKTALKTIME, (int)NowTime.tv_sec); + CHAR_setWorkInt( charaindex, CHAR_WORKPETFOLLOW, -1); +#ifdef _ITEM_ADDEXP //vincent 经验提升 + CHAR_setWorkInt(charaindex,CHAR_WORKITEM_ADDEXP, 0); + CHAR_setWorkInt(charaindex,CHAR_WORKITEM_ADDEXPTIME, 0); +#endif +#ifdef _BULL_FIXPLAYER + if( NPC_EventCheckFlg( charaindex, 131 ) != TRUE ) { + if( CHAR_getInt( charaindex, CHAR_ABULLSCORE) > 100 ) + CHAR_setInt( charaindex, CHAR_ABULLSCORE, 100); + CHAR_setInt( charaindex, CHAR_ABULLTIME, 0); + NPC_EventSetFlg( charaindex, 131); + NPC_NowEndEventSetFlgCls( charaindex, 130); + } +#endif +#ifdef _STATUS_WATERWORD //水世界状态 + if( MAP_getMapFloorType( CHAR_getInt( charaindex, CHAR_FLOOR)) == 1 ){ + CHAR_setWorkInt( charaindex, CHAR_WORKMAPFLOORTYPE, 1); + }else{ + CHAR_setWorkInt( charaindex, CHAR_WORKMAPFLOORTYPE, 0); + } +#endif +#ifdef _NEWOPEN_MAXEXP + if( CHAR_getInt( charaindex, CHAR_OLDEXP) > 0 || CHAR_getInt( charaindex, CHAR_OLDEXP) < 0 ){ + CHAR_ChangeExp( charaindex); + } +#endif +#ifdef _PETSKILL_BECOMEFOX + CHAR_setWorkInt( charaindex, CHAR_WORKFOXROUND, -1 ); +#endif +#ifdef _MAP_TIME + CHAR_setWorkInt(charaindex,CHAR_WORK_MAP_TIME,0); +#endif +#ifdef _PETSKILL_LER + CHAR_setWorkInt(charaindex,CHAR_WORK_RELIFE,0); +#endif + +#ifdef _ITEM_ADDEXP2 + CHAR_setWorkInt( charaindex, CHAR_WORKITEM_ADDEXP, + CHAR_getInt( charaindex, CHAR_ADDEXPPOWER) ); + CHAR_setWorkInt( charaindex, CHAR_WORKITEM_ADDEXPTIME , + CHAR_getInt( charaindex, CHAR_ADDEXPTIME) ); +#endif + +} + +void CHAR_CheckProfessionSkill( int charaindex) +{ + int i, Pclass, skpoint=0, mynum=0; + CHAR_HaveSkill *pSkil; + + if( NPC_EventCheckFlg( charaindex, 155) ) return; + + Pclass = CHAR_getInt( charaindex, PROFESSION_CLASS ); + skpoint = CHAR_getInt( charaindex, PROFESSION_SKILL_POINT); + if( Pclass == PROFESSION_CLASS_NONE )return; + + + for( i=0; iskill, 0, 0 ); + pSkil->use = 0; + break; + case 64: + CHAR_setInt( charaindex, CHAR_MAXMP, 100); + CHAR_setInt( charaindex, PROFESSION_SKILL_POINT, skpoint+1 ); + pSkil = CHAR_getCharHaveSkill( charaindex, i ); + SKILL_makeSkillData( &pSkil->skill, 0, 0 ); + pSkil->use = 0; + break; + case 65: + CHAR_setInt( charaindex, ATTACHPILE, 0); + CHAR_setInt( charaindex, PROFESSION_SKILL_POINT, skpoint+1 ); + pSkil = CHAR_getCharHaveSkill( charaindex, i ); + SKILL_makeSkillData( &pSkil->skill, 0, 0 ); + pSkil->use = 0; + break; + } + } + { + int myskillpoint, myskillnum=0, myskilllevel; + int mysknum=0; + + myskillpoint= CHAR_getInt( charaindex, PROFESSION_SKILL_POINT ); + myskilllevel= CHAR_getInt( charaindex, PROFESSION_LEVEL ); + + for( i=0; i 0 ){ + CHAR_setInt( charaindex, PROFESSION_SKILL_POINT, myskillpoint + mysknum ); + }else if( mysknum < 0 ){ + int defsknum = (myskillpoint + myskillnum)-myskilllevel; + while( 1){ + if( defsknum<= 0 || + (myskillpoint= CHAR_getInt( charaindex, PROFESSION_SKILL_POINT )) <= 0 ) break; + CHAR_setInt( charaindex, PROFESSION_SKILL_POINT, myskillpoint-1); + defsknum--; + } + } + } + + NPC_EventSetFlg( charaindex, 155); +} + +void CHAR_ResetPoolPetEgg( int charaindex) +{ + int levelup, vital, str, tgh, dex; + int raise, petindex, i; + + + if( NPC_EventCheckFlg( charaindex, 157) ) return; + + for( i = 0; i < CHAR_MAXPOOLPETHAVE; i ++ ) { + petindex = CHAR_getCharPoolPet( charaindex, i); + if( !CHAR_CHECKINDEX( petindex) ) continue; + + if( CHAR_getInt( petindex, CHAR_FUSIONBEIT) != 1 || + CHAR_getInt( petindex, CHAR_FUSIONRAISE) <= 0 ) continue; + + raise = CHAR_getInt( petindex, CHAR_FUSIONRAISE); + raise--; + CHAR_setInt( petindex, CHAR_FUSIONTIMELIMIT, (int)time(NULL)+PETFEEDTIME); + if( raise < 1 ) raise = 1; + if( raise >= 40 ) raise = 30; + CHAR_setInt( petindex, CHAR_FUSIONRAISE, raise); + + levelup = CHAR_getInt( petindex, CHAR_ALLOCPOINT); + vital = ((levelup>>24) & 0xFF) + 4; + str = ((levelup>>16) & 0xFF) + 4; + tgh = ((levelup>> 8) & 0xFF) + 4; + dex = ((levelup>> 0) & 0xFF) + 4; + if( vital < 0 ) vital = 0; + if( str < 0 ) str = 0; + if( tgh < 0 ) tgh = 0; + if( dex < 0 ) dex = 0; + //扣属性 + levelup = (vital<<24) + (str<<16) + (tgh<<8) + (dex<<0); + CHAR_setInt( petindex, CHAR_ALLOCPOINT, levelup); + } + NPC_EventSetFlg( charaindex, 157); +} + +// Robin add 重设宠蛋 养时间 +void CHAR_ResetPetEggFusionTime(int charaindex) +{ + int i, petindex; + int nowTime =0; + //int leaveTime =0; + //int lastFeedTime =0; + //int anhour = PETFEEDTIME; + + //if( NPC_EventCheckFlg( charaindex, 157) ) return; + + nowTime = (int)time(NULL); + //leaveTime = CHAR_getInt( charaindex, CHAR_LASTLEAVETIME); + + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ) { + petindex = CHAR_getCharPet( charaindex, i); + if( !CHAR_CHECKINDEX( petindex) ) continue; + + if( CHAR_getInt( petindex, CHAR_FUSIONBEIT) != 1 || + CHAR_getInt( petindex, CHAR_FUSIONRAISE) <= 0 ) continue; + + //lastFeedTime = CHAR_getInt( petindex, CHAR_FUSIONTIMELIMIT); + //if( leaveTime > 0) { + // CHAR_setInt( petindex, CHAR_FUSIONTIMELIMIT, nowTime- (leaveTime-lastFeedTime)); + //} + //else + // CHAR_setInt( petindex, CHAR_FUSIONTIMELIMIT, nowTime); + + CHAR_setInt( petindex, CHAR_FUSIONTIMELIMIT, nowTime); + + } + + //NPC_EventSetFlg( charaindex, 157); + +} + + +BOOL CHAR_CheckProfessionEquit( int toindex) +{ + int i, j, itemindex, newindex; + int FixItem[16]={ + 2028,2029,2030,2031,2032,2033,2034,2035, + 2036,2037,2038,2039,2040,2041,2042,2043 + }; + CHAR_HaveSkill *pSkil; + + if(!NPC_EventCheckFlg( toindex, 149)){ + for (i = 0; i < CHAR_MAXITEMHAVE; i ++) { + itemindex = CHAR_getItemIndex( toindex, i); + if( !ITEM_CHECKINDEX( itemindex)) continue; + + for( j=0; j<16; j++){ + if( ITEM_getInt( itemindex, ITEM_ID) == FixItem[j] ){ + CHAR_setItemIndex( toindex, i, -1 ); + ITEM_endExistItemsOne( itemindex); + newindex = ITEM_makeItemAndRegist( FixItem[j]); + if( !ITEM_CHECKINDEX( newindex) ) break; + CHAR_setItemIndex( toindex , i, newindex); + ITEM_setWorkInt( itemindex, ITEM_WORKCHARAINDEX, toindex); + ITEM_setWorkInt( itemindex, ITEM_WORKOBJINDEX, -1); + + CHAR_sendItemDataOne( toindex, i); + + } + } + } + + for (i = 0; i < CHAR_MAXPOOLITEMHAVE; i++){ + int itemindex = CHAR_getPoolItemIndex(toindex, i); + if( !ITEM_CHECKINDEX( itemindex)) continue; + for( j=0; j<16; j++){ + if( ITEM_getInt( itemindex, ITEM_ID) == FixItem[j] ){ + CHAR_setPoolItemIndex( toindex, i, -1); + ITEM_endExistItemsOne( itemindex); + + newindex = ITEM_makeItemAndRegist( FixItem[j]); + if( !ITEM_CHECKINDEX( newindex) ) break; + CHAR_setPoolItemIndex( toindex , i, newindex); + ITEM_setWorkInt( itemindex, ITEM_WORKCHARAINDEX, toindex); + ITEM_setWorkInt( itemindex, ITEM_WORKOBJINDEX, -1); + + } + } + } + + NPC_EventSetFlg( toindex, 149); + } + + + if( NPC_EventCheckFlg( toindex, 156) ) return TRUE; + + // WON ADD + for( i=0; i 0 ) continue; + + pSkil = CHAR_getCharHaveSkill( toindex, i ); + SKILL_makeSkillData( &pSkil->skill, 0, 0 ); + pSkil->use = 0; + } + { + int myskillpoint= CHAR_getInt( toindex, PROFESSION_SKILL_POINT ); + int myskilllevel= CHAR_getInt( toindex, PROFESSION_LEVEL ); + int myskillnum = 0, mysknum = 0; + + for( i=0; i 0 ){ + CHAR_setInt( toindex, PROFESSION_SKILL_POINT, myskillpoint + mysknum ); + } + } + + { + Skill work1[PROFESSION_MAX_LEVEL]; + int cnt=0; + for( i=0; iuse = 0; + if( work1[i].data[SKILL_IDENTITY] == -1 ) continue; + SKILL_makeSkillData( &pSkil->skill, work1[i].data[SKILL_IDENTITY], work1[i].data[SKILL_LEVEL] ); + pSkil->use = 1; + } + } + + NPC_EventSetFlg( toindex, 156); + + return TRUE; +} + +static void CHAR_setLuck( int charaindex); + +#ifdef _CHANNEL_MODIFY +extern int *piOccChannelMember; +#endif + +#ifdef _BAD_PLAYER // WON ADD 送坏玩家去关 +void CHAR_login( int clifd, char* data, int saveindex, int badplayer ) +#else +void CHAR_login( int clifd, char* data, int saveindex ) +#endif +{ + int charaindex,objindex; + Char ch; + int per; +DebugPoint=50; +// char c_temp2[4096]; + if( CHAR_makeCharFromStringToArg( data , &ch ) == FALSE ){ + fprint ("make char error\n"); + goto MAKECHARDATAERROR; + } +DebugPoint=70; + CHAR_setCharFuncTable( &ch); +DebugPoint=71; + charaindex = CHAR_initCharOneArray( &ch ); +DebugPoint=72; + if( charaindex == -1 ){ + fprint ("make char error\n"); + CHAR_endCharData(&ch); + goto MAKECHARDATAERROR; + } +DebugPoint=80; +#ifdef _NEWSAVE + CHAR_setInt( charaindex, CHAR_SAVEINDEXNUMBER, saveindex); + print("存档装载索引:%d\n", CHAR_getInt( charaindex, CHAR_SAVEINDEXNUMBER) ); +#endif + if( CHAR_getFlg( charaindex, CHAR_ISDIE)){ + print( "?data? ISDIE flg is standing.\n"); + CHAR_setFlg( charaindex, CHAR_ISDIE, FALSE); + } +#ifdef _75_TEST + { + int event_end[] = { 4, 32, 33, 34, 81, 86, 87, 105, 83}; + int i; + for( i=0; i < arraysizeof(event_end); i++) { + NPC_EventSetFlg( charaindex, event_end[i]); + } + } +#endif +#ifndef _FIX_UNNECESSARY + // Arminius 7.9 airplane logout + if( CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE) == CHAR_PARTY_CLIENT ) { + int oyaindex = CHAR_getWorkInt( charaindex, CHAR_WORKPARTYINDEX1); + if( CHAR_CHECKINDEX( oyaindex)) { + if (CHAR_getInt( oyaindex, CHAR_WHICHTYPE ) == CHAR_TYPEBUS) { + if ((CHAR_getInt( oyaindex, CHAR_BASEIMAGENUMBER) !=100355) && + (CHAR_getInt( oyaindex, CHAR_BASEIMAGENUMBER) !=100461)) { + + if(CHAR_getWorkInt(oyaindex,CHAR_NPCWORKINT5)==1) { + if( CHAR_getInt( charaindex, CHAR_LASTTALKELDER)>=0){ + int fl,x,y; + CHAR_getElderPosition( CHAR_getInt( charaindex, CHAR_LASTTALKELDER), + &fl, &x, &y ); + CHAR_setInt(charaindex,CHAR_FLOOR,fl); + CHAR_setInt(charaindex,CHAR_X,x); + CHAR_setInt(charaindex,CHAR_Y,y); + } + } + } + } + } + } +#endif +// Nuke 20040420: CHECK MAX POINT +#if 1 + { + int lv,vi,str,tou,dx,skup,trn,teq,quest,level,total,max; + //float table[]={437,490,521,550,578,620}; //各转最高点数(减10) + float table[]={620,660,700,740,780,820}; //各转最高点数(减10) + lv = CHAR_getInt(charaindex,CHAR_LV); + vi = CHAR_getInt(charaindex,CHAR_VITAL); + str = CHAR_getInt(charaindex,CHAR_STR); + tou = CHAR_getInt(charaindex,CHAR_TOUGH); + dx = CHAR_getInt(charaindex,CHAR_DEX); + trn = CHAR_getInt(charaindex,CHAR_TRANSMIGRATION); + teq = CHAR_getInt(charaindex,CHAR_TRANSEQUATION); + skup = CHAR_getInt(charaindex,CHAR_SKILLUPPOINT); + quest=(teq >> 16)& 0xFFFF; + level=teq & 0xFFFF; + total=(vi+str+tou+dx)/100+skup; + max=(trn==0)?(lv-1)*3+20+10: // 0转447 + (lv-1)*3+table[trn-1]/12.0+quest/4.0+(level-trn*85)/4.0+10+1+10+trn*10; +/* 1转以上=升级点数+继承点术+历史任务+历史等级+转前祝福+误差1点+转後祝福+转生红利 */ + if (trn==6) max=max-20; /* 六转时没有转前祝福与转後祝福 */ + if (total>max) + { + print("\n重调点数[%s:%s]:%d->%d ", + CHAR_getChar(charaindex,CHAR_CDKEY), + CHAR_getChar(charaindex,CHAR_NAME), + total,max); + CHAR_setInt(charaindex,CHAR_VITAL,1000); + CHAR_setInt(charaindex,CHAR_STR,0); + CHAR_setInt(charaindex,CHAR_TOUGH,0); + CHAR_setInt(charaindex,CHAR_DEX,0); + CHAR_setInt(charaindex,CHAR_SKILLUPPOINT,max-10); + } + // 补足六转点数不足之玩家 + if ((trn==6) && (total < max)) + { + print("\n补足点数[%s:%s]:%d->%d ", + CHAR_getChar(charaindex,CHAR_CDKEY), + CHAR_getChar(charaindex,CHAR_NAME), + total,max); + CHAR_setInt(charaindex,CHAR_SKILLUPPOINT, + CHAR_getInt(charaindex,CHAR_SKILLUPPOINT)+(max-total)); + } + } +#endif + { + int EQ_BBI=-1, EQ_ARM=-1, EQ_NUM=-1, EQ_BI=-1; + int CH_BI = CHAR_getInt( charaindex, CHAR_BASEIMAGENUMBER); + + EQ_BBI = CHAR_getInt( charaindex, CHAR_BASEBASEIMAGENUMBER); + EQ_ARM = CHAR_getItemIndex(charaindex,CHAR_ARM); + EQ_NUM=ITEM_FIST; + if ( ITEM_CHECKINDEX( EQ_ARM)) { + EQ_NUM=ITEM_getInt(EQ_ARM,ITEM_TYPE); + } + + EQ_BI=CHAR_getNewImagenumberFromEquip( EQ_BBI, EQ_NUM); + + if( CHAR_getInt( charaindex, CHAR_RIDEPET) != -1 ) { //骑宠 + + }else { //非骑宠 + if( EQ_BI != CH_BI ) { + print("\n 非骑宠形象 %d [%d=>%d]", charaindex, + CHAR_getInt( charaindex, CHAR_BASEIMAGENUMBER), + EQ_BI ); + CHAR_setInt( charaindex, CHAR_BASEIMAGENUMBER, EQ_BI); + } + } + } + { + int x,y; + if( CHAR_isAppearPosition( CHAR_getInt( charaindex, CHAR_FLOOR),&x, &y )) { + int flelder, xelder, yelder; + CHAR_getElderPosition(CHAR_getInt(charaindex, CHAR_LASTTALKELDER), + &flelder, &xelder, &yelder); + CHAR_setInt(charaindex, CHAR_FLOOR, flelder); + CHAR_setInt(charaindex, CHAR_X, xelder); + CHAR_setInt(charaindex, CHAR_Y, yelder); + } + } + +#ifdef _FIX_GAMBLENUM + { + if( CHAR_getInt(charaindex, CHAR_GAMBLENUM) < 0){ + CHAR_setInt(charaindex, CHAR_GAMBLENUM, 0); + } + } +#endif + +#ifdef _DEATH_CONTEND + { + char cdkey[CDKEYLEN]; + memset( cdkey, 0, sizeof(cdkey)); + CONNECT_getCdkey( clifd, cdkey, sizeof( cdkey )); + if( strlen(cdkey) > 0 ) { + if( strcmp( cdkey, CHAR_getChar( charaindex, CHAR_CDKEY) ) ){ + print("账号错误 %s->%s\n", CHAR_getChar( charaindex, CHAR_CDKEY), cdkey); + CHAR_setChar( charaindex, CHAR_CDKEY, cdkey); + } + }else{ + print("账号错误:%d\n", clifd); + } + } + CHAR_setInt( charaindex, CHAR_PKLISTTEAMNUM, -1); + CHAR_setInt( charaindex, CHAR_PKLISTLEADER, -1); + //CHAR_setInt( charaindex, CHAR_GOLD, 1000000); + PKLIST_InsertTeamNum( charaindex); + if( CHAR_getInt( charaindex, CHAR_PKLISTTEAMNUM ) < 0 || + CHAR_getInt( charaindex, CHAR_PKLISTLEADER ) < 0 ){ + PKLIST_InsertTeamNum( charaindex); + } +#endif + +#ifdef _MAP_NOEXIT + { + int exfloor=-1,ex_X=-1,ex_Y=-1; + int map_type=0; + unsigned int point; + point = MAP_getExFloor_XY( CHAR_getInt(charaindex, CHAR_FLOOR) , &map_type); + if( point > 0 ) { + if( CHAR_getInt( charaindex, CHAR_LASTTALKELDER) >= 0 ) { + CHAR_getElderPosition(CHAR_getInt(charaindex, CHAR_LASTTALKELDER), + &exfloor, &ex_X, &ex_Y); + } + if( map_type >= 0 ) { // map_type >= 0 优先回纪录点 + if( exfloor == map_type && exfloor >= 0 ) {//回纪录点 + }else { + exfloor = (point>>16)&0xffffff; + ex_X = (point>>8)&0xff; + ex_Y = (point>>0)&0xff; + } + } + if( CHECKFLOORID( exfloor) ) { //检查房间号 + CHAR_setInt(charaindex, CHAR_FLOOR, exfloor); + CHAR_setInt(charaindex, CHAR_X, ex_X); + CHAR_setInt(charaindex, CHAR_Y, ex_Y); + } + } + +#ifdef _BAD_PLAYER // WON ADD 送坏玩家去关 + + NPC_NowEndEventSetFlgCls( charaindex, 135); // 旗标 + if( badplayer ){ + NPC_EventSetFlg(charaindex, 135); // 旗标 + CHAR_setInt(charaindex, CHAR_FLOOR, 887); + CHAR_setInt(charaindex, CHAR_X, 56); + CHAR_setInt(charaindex, CHAR_Y, 14); + + }else if( CHAR_getInt(charaindex, CHAR_FLOOR) == 887 ){ // 如果在888,回记录点 + CHAR_getElderPosition(CHAR_getInt(charaindex, CHAR_LASTTALKELDER), &exfloor, &ex_X, &ex_Y); + CHAR_setInt(charaindex, CHAR_FLOOR, exfloor); + CHAR_setInt(charaindex, CHAR_X, ex_X); + CHAR_setInt(charaindex, CHAR_Y, ex_Y); + + } +#endif +#ifdef _DEATH_FAMILY_LOGIN_CHECK + CHAR_setInt( charaindex, CHAR_FLOOR, 130); + CHAR_setInt( charaindex, CHAR_X, 56); + CHAR_setInt( charaindex, CHAR_Y, 12); +#endif + +#ifdef _NEW_INSERVERPOINT + CHAR_setInt( charaindex, CHAR_FLOOR, 8250); + CHAR_setInt( charaindex, CHAR_X, 15); + CHAR_setInt( charaindex, CHAR_Y, 15); +#endif + } +#endif + if( CHAR_getInt(charaindex,CHAR_X) < 0 || CHAR_getInt(charaindex,CHAR_Y) < 0 ){ + CHAR_setInt(charaindex,CHAR_X,1); + CHAR_setInt(charaindex,CHAR_Y,1); + } +#ifdef _MAP_TIME + // 如果登入的地图是这些编号的话,回到入口 + if(CHAR_getInt(charaindex,CHAR_FLOOR) >= 30017 && CHAR_getInt(charaindex, CHAR_FLOOR) <= 30021){ + CHAR_setInt(charaindex,CHAR_FLOOR,30008); + CHAR_setInt(charaindex,CHAR_X,39); + CHAR_setInt(charaindex,CHAR_Y,38); + } +#endif + + objindex = initObjectFromObjectMember(OBJTYPE_CHARA,charaindex, + CHAR_getInt(charaindex,CHAR_X), + CHAR_getInt(charaindex,CHAR_Y), + CHAR_getInt(charaindex,CHAR_FLOOR)); + if( objindex == -1 ){ + fprint ("init obj error\n"); + goto DELETECHARDATA; + } + + CHAR_setWorkInt( charaindex,CHAR_WORKOBJINDEX,objindex ); + CONNECT_setState( clifd, LOGIN ); + CONNECT_setCharaindex( clifd, charaindex ); + CHAR_LoginBesideSetWorkInt( charaindex, clifd); + +#ifdef _CHANGEGOATMETAMO // (不可开) Syu 羊年兽更换新图 + if( NPC_EventCheckFlg( charaindex, 141 ) != TRUE ) { + int z; + int PETID1; + int PETBASE1; + for ( z = 0 ; z < CHAR_MAXPETHAVE; z ++ ) { + int petindex = CHAR_getCharPet(charaindex,z); + if( CHAR_CHECKINDEX( petindex) ) { + PETID1 = CHAR_getInt( petindex, CHAR_PETID); + PETBASE1 = CHAR_getInt( petindex , CHAR_BASEBASEIMAGENUMBER ); + if ( PETID1 == 1056 && PETBASE1 == 101497 ) + CHAR_setInt( petindex , CHAR_BASEBASEIMAGENUMBER , 101607 ) ; + if ( PETID1 == 1057 && PETBASE1 == 101498 ) + CHAR_setInt( petindex , CHAR_BASEBASEIMAGENUMBER , 101608 ) ; + if ( PETID1 == 1058 && PETBASE1 == 101499 ) + CHAR_setInt( petindex , CHAR_BASEBASEIMAGENUMBER , 101609 ) ; + if ( PETID1 == 1059 && PETBASE1 == 101500 ) + CHAR_setInt( petindex , CHAR_BASEBASEIMAGENUMBER , 101610 ) ; + } + } + for ( z = 0 ; z < CHAR_MAXPOOLPETHAVE; z ++ ) { + int petindex = CHAR_getCharPoolPet(charaindex,z); + if( CHAR_CHECKINDEX( petindex) ) { + PETID1 = CHAR_getInt( petindex, CHAR_PETID); + PETBASE1 = CHAR_getInt( petindex , CHAR_BASEBASEIMAGENUMBER ); + if ( PETID1 == 1056 && PETBASE1 == 101497 ) + CHAR_setInt( petindex , CHAR_BASEBASEIMAGENUMBER , 101607 ) ; + if ( PETID1 == 1057 && PETBASE1 == 101498 ) + CHAR_setInt( petindex , CHAR_BASEBASEIMAGENUMBER , 101608 ) ; + if ( PETID1 == 1058 && PETBASE1 == 101499 ) + CHAR_setInt( petindex , CHAR_BASEBASEIMAGENUMBER , 101609 ) ; + if ( PETID1 == 1059 && PETBASE1 == 101500 ) + CHAR_setInt( petindex , CHAR_BASEBASEIMAGENUMBER , 101610 ) ; + } + } + } + NPC_EventSetFlg( charaindex, 141); +#endif + + CHAR_complianceParameter( charaindex ); + //检查人物身上 + { + int i; +// char *petstring; + int ID1; + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ) { + int petindex = CHAR_getCharPet(charaindex,i); + if( CHAR_CHECKINDEX( petindex) ) { + +#ifdef _CHECK_ENEMY_PET + { + int j; + for( j=0;j 0 || CHAR_getInt( charaindex, CHAR_OLDEXP) < 0 ){ + CHAR_ChangeExp( petindex); + } +#endif + ID1=CHAR_getInt( petindex, CHAR_PETID); +// petstring = CHAR_makePetStringFromPetIndex( petindex); +#ifdef _REEDIT_PETBBIS + if( ID1 == 1133 ){ + CHAR_setInt( petindex, CHAR_BASEIMAGENUMBER, 101578); + CHAR_setInt( petindex, CHAR_BASEBASEIMAGENUMBER, 101578); + print("PET:%s fix BBI\n", CHAR_getUseName(petindex)); + } +#endif + // WON ADD 修正白虎七技 + if( ID1 == 777 )CHAR_setInt( petindex, CHAR_SLOT, 7); + CHAR_setWorkInt( petindex, CHAR_WORKPLAYERINDEX, charaindex); + // 修正宠技最大值变-1 Robin 20040803 + if( CHAR_getInt( petindex, CHAR_SLOT) < 0 ) { + int j; + for( j=0; j= 0) + CHAR_setInt( petindex, CHAR_SLOT, j+1); + } + //print(" 宠技MAX变-1改6 "); + } + + CHAR_complianceParameter( petindex ); +#ifdef _FIX_GP_PET_SKILL // WON ADD 修正gp宠会落马术 + if( ID1 == 1133){ + int j; + for( j=0; j 0 || + CHAR_getInt( charaindex, CHAR_OLDEXP) < 0 ){ + CHAR_ChangeExp( petindex); + } +#endif + b_find=FALSE; + ID1=CHAR_getInt( petindex, CHAR_PETID); +#ifdef _REEDIT_PETBBIS + if( ID1 == 1133 ){ + CHAR_setInt( petindex, CHAR_BASEIMAGENUMBER, 101578); + CHAR_setInt( petindex, CHAR_BASEBASEIMAGENUMBER, 101578); + } +#endif +/* + tran_no=CHAR_getInt( charaindex, CHAR_TRANSMIGRATION); + petstring = CHAR_makePetStringFromPetIndex( petindex); + c_ptr_index=strstr(petstring,"name:"); + getStringFromIndexWithDelim(c_ptr_index,":",2,c_temp,sizeof(c_temp)); + c_ptr_index=c_temp; + getStringFromIndexWithDelim(c_ptr_index,"|",1,c_temp1,sizeof(c_temp1)); + + if(b_find){//ttom + CHAR_setCharPoolPet( charaindex, i, -1); + print("\nKill pool pet ID=%d name=%s",ID1,c_temp1); + sprintf(c_temp2,"Kill pool pet ID=%d name=%s",ID1,c_temp1); + LogKill(CHAR_getChar( charaindex, CHAR_NAME ), + CHAR_getChar( charaindex, CHAR_CDKEY ), + c_temp2); + }else{//ttom +*/ + CHAR_setWorkInt( petindex, CHAR_WORKPLAYERINDEX, charaindex); + CHAR_complianceParameter( petindex ); +// }//ttom + } + } + } + +// CHAR_ResetPoolPetEgg( charaindex); +// CHAR_CheckProfessionEquit( charaindex); + CHAR_CheckProfessionSkill( charaindex); + { + int i=0; + int skidx[]={2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,3,3,3,3,3,3,3}; + //20040702 Change fix + //检查是否有职业不该有的技能并删除 + for( i = CHAR_SKILLMAXHAVE-1; i >= 0; i -- ){ + CHAR_HaveSkill *pSkil; + Skill* skill; + + pSkil = CHAR_getCharHaveSkill( charaindex, i ); + skill = &pSkil->skill; + if( pSkil == NULL )continue; + if( pSkil->use == 0 )continue; + if( skidx[skill->data[SKILL_IDENTITY]] != CHAR_getInt( charaindex, PROFESSION_CLASS ) + && skidx[skill->data[SKILL_IDENTITY]] != 4 ){//共通技不删 + SKILL_makeSkillData( &pSkil->skill, 0, 0 ); + pSkil->use = 0; + } + } + } +#ifdef _LOGIN_ADDITEM + CHAR_loginAddItem( charaindex); +#endif + CHAR_loginCheckUserItem( charaindex); +#ifdef _FIX_TSKILLCAN + CHAR_PETSKILLCAN( charaindex); +#endif + CHAR_complianceParameter( charaindex ); + + // Robin add 重设宠蛋 养时间 + CHAR_ResetPetEggFusionTime( charaindex); + +#ifdef _PROFESSION_FIX_LEVEL // WON ADD 修正职业经验值 + { + int i=0; + for( i = 0 ; i < CHAR_SKILLMAXHAVE ; i ++ ){ + CHAR_HaveSkill* hskill; + + hskill = CHAR_getCharHaveSkill( charaindex, i ); + + if( hskill != NULL && hskill->use == TRUE ){ + int skill_level = SKILL_getInt( &hskill->skill, SKILL_LEVEL); + if( skill_level < 10 ){ + SKILL_setInt( &hskill->skill, SKILL_LEVEL, 10* 100 ); + } + } + } + } +#endif + +#ifdef _CHANNEL_MODIFY + if(CHAR_getInt(charaindex,PROFESSION_CLASS) > 0){ + int i,pclass = CHAR_getInt(charaindex,PROFESSION_CLASS) - 1,Empty = -1; + // 若旧的职业频道记录有记录在就留着,若没有加入频道 + for(i=0;i MAX_PERSONAL_MOMENTUM) CHAR_setInt(charaindex,CHAR_MOMENTUM,MAX_PERSONAL_MOMENTUM); +#endif + +#ifdef _PETSKILL_BECOMEPIG + if( CHAR_getInt( charaindex, CHAR_BECOMEPIG) > -1 ){ + CHAR_setInt( charaindex, CHAR_BASEIMAGENUMBER, CHAR_getInt( charaindex, CHAR_BECOMEPIG_BBI ) ); + } + //change fix 处理负很大的乌力时间 + else{ + CHAR_setInt( charaindex, CHAR_BECOMEPIG, -1 ); + } +#endif + + + lssproto_CharLogin_send( clifd, SUCCESSFUL,"" ); + per = ENCOUNT_getEncountPercentMin( charaindex, + CHAR_getInt( charaindex, CHAR_FLOOR), + CHAR_getInt( charaindex, CHAR_X), + CHAR_getInt( charaindex, CHAR_Y)); + if( per != -1) { + CHAR_setWorkInt( charaindex, CHAR_WORKENCOUNTPROBABILITY_MIN, per); + } + per = ENCOUNT_getEncountPercentMax( charaindex, + CHAR_getInt( charaindex, CHAR_FLOOR), + CHAR_getInt( charaindex, CHAR_X), + CHAR_getInt( charaindex, CHAR_Y)); + if( per != -1) { + CHAR_setWorkInt( charaindex, CHAR_WORKENCOUNTPROBABILITY_MAX, per); + } + + CHAR_setLuck( charaindex); + { + int i; + char* statuscat[]={"C","P","I","S","D","E","F"}; + for( i=0 ; i=1 ) + CHAR_Skillupsend(charaindex); + CHAR_checkEffect( charaindex); + +#ifdef _DEATH_FAMILY_LOGIN_CHECK // WON ADD 家族战登入检查 +// if( NPC_EventCheckFlg( charaindex, 150 ) != TRUE ) { + { + char *char_id, *char_name; + // 清除家族旗标 + SetFMVarInit(charaindex); + char_id = CHAR_getChar( charaindex, CHAR_CDKEY ); + char_name = CHAR_getChar( charaindex, CHAR_NAME ); + saacproto_new_ACFM_Login_send(acfd, charaindex, char_id, char_name ); + } +// NPC_EventSetFlg( charaindex, 150); +// } +#else + + // CoolFish: Family 2001/5/30 + if ((CHAR_getChar(charaindex, CHAR_FMNAME)!=NULL) && + (CHAR_getInt(charaindex, CHAR_FMINDEX) >= 0) && + (strcmp(CHAR_getChar(charaindex, CHAR_FMNAME), "") != 0)) + { +#ifdef _FMVER21 + int eventflag = 0; + // 是否符合族长得资格 + if (CheckLeaderQ(charaindex) >= 0) + eventflag = 1; + if (CHAR_getInt(charaindex, CHAR_FMLEADERFLAG) != FMMEMBER_LEADER) + SetFMPetVarInit(charaindex); + saacproto_ACFMCharLogin_send( + acfd, + CHAR_getChar(charaindex, CHAR_FMNAME), + CHAR_getInt(charaindex, CHAR_FMINDEX), + CHAR_getChar(charaindex, CHAR_NAME), + CHAR_getChar(charaindex, CHAR_CDKEY), + CHAR_getInt(charaindex, CHAR_LV), eventflag, + CONNECT_getFdid(clifd) +#ifdef _FM_MODIFY + ,getServernumber() +#endif + ); +#endif + } +#ifdef _FMVER21 + else + SetFMVarInit(charaindex); +#endif + +#endif + + AnnounceToPlayerWN( clifd ); + +#ifdef _ANGEL_SUMMON + { + int mindex; + mindex = checkIfOnlyAngel( charaindex); + if( mindex != -1 ) { + if( missiontable[mindex].flag == MISSION_WAIT_ANSWER ) { + lssproto_WN_send( clifd, WINDOW_MESSAGETYPE_ANGELMESSAGE, + WINDOW_BUTTONTYPE_YESNO, + CHAR_WINDOWTYPE_ANGEL_ASK, + -1, + "目前魔族肆虐,精灵们需要你的帮忙,前往寻找勇者来消灭这些魔族,你是否愿意帮忙?" ); + } + } + } +#endif + + print("\n登陆人物名称:%s ", CHAR_getChar(charaindex, CHAR_NAME ) ); + + { + unsigned long ip; + char ipstr[512]; + + ip=CONNECT_get_userip(clifd); + sprintf(ipstr,"%d.%d.%d.%d", + ((unsigned char *)&ip)[0], + ((unsigned char *)&ip)[1], + ((unsigned char *)&ip)[2], + ((unsigned char *)&ip)[3]); + + LogLogin( + CHAR_getChar( charaindex, CHAR_CDKEY), + CHAR_getChar( charaindex, CHAR_NAME), + saveindex, ipstr + ); + } + +#ifdef _TEACHER_SYSTEM + // 学生上线通知导师 + if(strlen(CHAR_getChar(charaindex,CHAR_TEACHER_ID)) > 0 && strlen(CHAR_getChar(charaindex,CHAR_TEACHER_NAME)) > 0){ + int iPlayernum = CHAR_getPlayerMaxNum(),i; + char szMsg[128]; + + for(i=0;i 0 && + strlen(CHAR_getChar(charaindex,CHAR_LOVERID))>0 && + strlen(CHAR_getChar(charaindex,CHAR_LOVERNAME))>0){ + int iPlayernum = CHAR_getPlayerMaxNum(),i; + char szMsg[128]; + for(i=0;idata[CHAR_SAVEINDEXNUMBER]); + saacproto_ACCharSave_send( acfd, cdkey, + ch->string[CHAR_NAME].string, + CHAR_makeOptionString( ch ), chardata, + unlock, CONNECT_getFdid(fd), ch->data[CHAR_SAVEINDEXNUMBER] ); +#else + saacproto_ACCharSave_send( acfd, cdkey, + ch->string[CHAR_NAME].string, + CHAR_makeOptionString( ch ), chardata, + unlock, CONNECT_getFdid(fd) ); +#endif + return TRUE; +} + +BOOL CHAR_charSaveFromConnect( int fd , BOOL unlock) +{ + Char* ch; + int charaindex = CONNECT_getCharaindex(fd); + if( CHAR_CHECKINDEX( charaindex ) == FALSE)return FALSE; + ch = CHAR_getCharPointer( charaindex ); + if( !ch )return FALSE; +#ifdef _CHAR_POOLITEM + if( CHAR_SaveDepotItem( charaindex) == TRUE ){ + print("saveDepotItem:%d \n", charaindex); + } +#endif +#ifdef _CHAR_POOLPET + if( CHAR_SaveDepotPet( charaindex) == TRUE ){ + print("saveDepotPet:%d \n", charaindex); + } +#endif + + return CHAR_charSaveFromConnectAndChar( fd, ch, unlock ); +} + + +/*------------------------------------------------------------ + * 夫弘失它玄允月凛卞 匀凶引引夫弘失它玄匹五卅中失奶 丞毛 + * 允 + * 娄醒 + * charaindex int 平乓仿弁正□及奶件犯永弁旦 + * 忒曰袄 + * 卅仄 + ------------------------------------------------------------*/ +static void CHAR_dropItemAtLogout( int charaindex ) +{ + int i; + for( i=0 ; i= 0 ){ + BATTLE_EscapeDpSend( battleindex, charindex ); + CHAR_setInt( charindex, CHAR_DUELPOINT, + CHAR_getInt( charindex, CHAR_DUELPOINT ) + + CHAR_getWorkInt( charindex, CHAR_WORKGETEXP ) ); + BATTLE_Exit( charindex, battleindex ); + } + + CHAR_dropItemAtLogout( charindex ); + CHAR_DischargeParty( charindex, 0); + if(CHAR_getChar(charindex, CHAR_FMNAME) != NULL ) { + if(strlen(CHAR_getChar(charindex, CHAR_FMNAME)) > 0 && + strlen(CHAR_getChar(charindex, CHAR_FMNAME)) < sizeof( STRING32) ) + if( (CHAR_getInt(charindex, CHAR_FMINDEX) >= 0) && + (strcmp(CHAR_getChar(charindex, CHAR_FMNAME), "") != 0) ) { + saacproto_ACFMCharLogout_send(acfd, + CHAR_getChar(charindex, CHAR_FMNAME), + CHAR_getInt(charindex, CHAR_FMINDEX), + CHAR_getChar(charindex, CHAR_NAME), + CHAR_getChar(charindex, CHAR_CDKEY), + CHAR_getInt(charindex, CHAR_LV), + CHAR_getWorkInt(charindex, CHAR_WORKFMINDEXI), + CONNECT_getFdid(clifd)); + } + } + +#ifdef _CHATROOMPROTOCOL // (不可开) Syu ADD 聊天室频道 + if ( CHAR_getWorkInt ( charindex , CHAR_WORKCHATROOMTYPE ) != 0 ) { + ChatRoom_Leave ( charindex ) ; + } +#endif +#ifdef _STREET_VENDOR + // 若玩家是卖方且正在交易中 + if(CHAR_getWorkInt(charindex,CHAR_WORKSTREETVENDOR) == 2){ + // 取出和他交易的人 + toindex = CHAR_getWorkInt(charindex,CHAR_WORKSTREETVENDOR_WHO); + if(toindex > -1 && CHAR_CHECKINDEX(toindex)){ + CHAR_setWorkInt(toindex,CHAR_WORKSTREETVENDOR_WHO,-1); + CHAR_setWorkInt(toindex,CHAR_WORKSTREETVENDOR,-1); + lssproto_STREET_VENDOR_send(getfdFromCharaIndex(toindex),"C|"); + CHAR_talkToCli(toindex,-1,"店家取消交易",CHAR_COLORYELLOW); + } + } + // 玩家是买方 + else if(CHAR_getWorkInt(charindex,CHAR_WORKSTREETVENDOR) == 3){ + // 取出卖方 + toindex = CHAR_getWorkInt(charindex,CHAR_WORKSTREETVENDOR_WHO); + if(toindex > -1 && CHAR_CHECKINDEX(toindex)){ + CHAR_setWorkInt(toindex,CHAR_WORKSTREETVENDOR_WHO,-1); + CHAR_setWorkInt(toindex,CHAR_WORKSTREETVENDOR,1); + } + } +#endif + + // Robin 0606 channel + fmindexi = CHAR_getWorkInt(charindex, CHAR_WORKFMINDEXI); + channel = CHAR_getWorkInt(charindex, CHAR_WORKFMCHANNEL); + i = 0; + if( (fmindexi > 0) && (channel >= 0) && (fmindexi < FAMILY_MAXNUM) && (channel < FAMILY_MAXCHANNEL)) { + while( i < FAMILY_MAXMEMBER ) { + if( channelMember[fmindexi][channel][i] == charindex ) { + channelMember[fmindexi][channel][i] = -1; + break; + } + i++; + } + } +#ifdef _CHANNEL_MODIFY + if(CHAR_getInt(charindex,PROFESSION_CLASS) > 0){ + int i,pclass = CHAR_getInt(charindex,PROFESSION_CLASS) - 1; + for(i=0;i 0) && (fmindexi < FAMILY_MAXNUM)){ + if( familyMemberIndex[fmindexi][i] == charindex ) + familyMemberIndex[fmindexi][i] = -1; + } + } + // Robin 0629 silent + if( CHAR_getInt( charindex, CHAR_SILENT) > 0 ){ + int silent_t, login_t; + login_t = CHAR_getWorkInt(charindex, CHAR_WORKLOGINTIME); + silent_t = CHAR_getInt( charindex, CHAR_SILENT); + silent_t = silent_t - ( (int)NowTime.tv_sec-login_t); + if( silent_t<0 ) silent_t = 0; + CHAR_setInt( charindex, CHAR_SILENT, silent_t); + } + +#ifdef _ITEM_ADDEXP2 + if( CHAR_getWorkInt( charindex, CHAR_WORKITEM_ADDEXP) > 0 ) { + // 登入时智果效果自动减90秒 + CHAR_setWorkInt( charindex, CHAR_WORKITEM_ADDEXPTIME, + CHAR_getWorkInt( charindex, CHAR_WORKITEM_ADDEXPTIME) - 90 ); + if( CHAR_getWorkInt( charindex, CHAR_WORKITEM_ADDEXPTIME) <= 0 ) { + CHAR_setWorkInt( charindex, CHAR_WORKITEM_ADDEXPTIME, 0); + CHAR_setWorkInt( charindex, CHAR_WORKITEM_ADDEXP, 0); + } + } + CHAR_setInt( charindex, CHAR_ADDEXPPOWER, + CHAR_getWorkInt( charindex, CHAR_WORKITEM_ADDEXP) ); + CHAR_setInt( charindex, CHAR_ADDEXPTIME, + CHAR_getWorkInt( charindex, CHAR_WORKITEM_ADDEXPTIME) ); +#endif + +#ifdef _TIME_TICKET + if( check_TimeTicketMap( CHAR_getInt( charindex, CHAR_FLOOR)) ) { + CHAR_warpToSpecificPoint( charindex, 7001, 41, 6); + } +#endif + + // Robin add + CHAR_setInt( charindex, CHAR_LASTLEAVETIME, (int)time(NULL)); + + if( save ){ + CHAR_charSaveFromConnect( clifd ,TRUE); + } + +#ifndef _DEATH_CONTEND + ADDRESSBOOK_notifyLoginLogout(charindex,0); +#endif + CHAR_CharaDeleteHavePet( charindex); + CHAR_CharaDelete( charindex ); + + return ret; +} +/*------------------------------------------------------------ + * watch奶矛件玄毛霜月井升丹井民尼永弁允月 + * 娄醒 + * objindex int 奶矛件玄毛云仇仄凶平乓仿及左皮斥尼弁玄 + * 奶件犯永弁旦 + * index int 奶矛件玄毛云仇仄凶平乓仿及奶件犯永弁旦 + * recvindex int 奶矛件玄毛熬仃午月平乓仿及index + * chac int 失弁扑亦件及潘 + * 忒曰袄 TRUE: 霜匀化中中方 + * FALSE: 蛲 + ------------------------------------------------------------*/ +static BOOL CHAR_sendWatchEvent_sendCheck( int objindex, int index, + int recvindex, int chac) +{ + /* 愤坌互NPC匹锹澎手NPC及凛 仃月 */ + if( OBJECT_getType( objindex) == OBJTYPE_CHARA && + CHAR_getInt( index, CHAR_WHICHTYPE) != CHAR_TYPEPLAYER && + CHAR_getInt(recvindex, CHAR_WHICHTYPE ) + != CHAR_TYPEPLAYER ) + { + return FALSE; + } + /* 平乓仿动陆及watch 反民尼永弁 仄卞蕞 */ + if( OBJECT_getType( objindex) != OBJTYPE_CHARA) { + return TRUE; + } + /* + * 愤坌尺及汹五及 反 仄卞允月 + */ + if( index == recvindex && chac == CHAR_ACTWALK ) { + return FALSE; + } + + if( CHAR_getInt( recvindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER) { + /* 爵 及谛卞反 蛲分井日霜耨仄卅中 */ + if( CHAR_getWorkInt( recvindex,CHAR_WORKBATTLEMODE) + != BATTLE_CHARMODE_NONE) + { + return FALSE; + } + /* 失弁扑亦件元扎 中凛 */ + if( CHAR_getWorkInt( index, CHAR_WORKACTION) == -1 ) { + if( OBJECT_getType(objindex) == OBJTYPE_CHARA) { + /* 元由□ 奴分匀凶日 + * 褪动陆反职及丢件田□卞汹五毛霜耨仄卅中 + */ + if( CHAR_getWorkInt( index, CHAR_WORKPARTYMODE ) + == CHAR_PARTY_CLIENT && + CHAR_getWorkInt( recvindex, CHAR_WORKPARTYMODE) + != CHAR_PARTY_NONE && + chac == CHAR_ACTWALK ) + { + int found = FALSE; + int loop; + /* 阂毛譬屯月 */ + for( loop = 1; loop < CHAR_PARTYMAX; loop ++ ) { + int partycharaindex = CHAR_getPartyIndex( recvindex, loop); + /* 中凶平乓仿互愤坌及由□ 奴及阂分匀凶 */ + if( partycharaindex == index ) { + found = TRUE; + break; + } + } + if( found ) return FALSE; + } + /* 褪反阂及STAND毛霜耨仄卅中 */ + if( CHAR_getWorkInt( index, CHAR_WORKPARTYMODE) + == CHAR_PARTY_CLIENT && + CHAR_getWorkInt( recvindex, CHAR_WORKPARTYMODE) + == CHAR_PARTY_LEADER && + chac == CHAR_ACTSTAND) + { + int found = FALSE; + int loop; + /* 阂毛譬屯月 */ + for( loop = 1; loop < CHAR_PARTYMAX; loop ++ ) { + int partycharaindex + = CHAR_getWorkInt( recvindex, + CHAR_WORKPARTYINDEX1+loop); + /* STAND仄凶平乓仿互愤坌及由□ 奴及阂分匀凶 */ + if( partycharaindex == index ) { + found = TRUE; + break; + } + } + if( found ) return FALSE; + } + } + } + } + return TRUE; +} + +void CHAR_sendWatchEvent( int objindex, int chac, int* opt, + int optlen,BOOL myflg ) +{ + int i; + int j; + int x=0,y=0,dir=0; + int floor; + int watchopt[32]; + int watchoptlen=0; + typedef void (*WATCHF)(int,int,CHAR_ACTION,int,int,int,int*,int); + int index; + + if( !CHECKOBJECTUSE(objindex) )return; + index = OBJECT_getIndex( objindex); + switch( OBJECT_getType(objindex) ){ + case OBJTYPE_CHARA: + for( i=0; i= 4 ){ + return; + } + // 引分由仿丢□正失永皿匹五月井" + cnt = CHAR_getInt(charaindex,CHAR_SKILLUPPOINT); + if( cnt <= 0 )return; + +#ifdef _CHAR_PROFESSION // WON ADD 人物职业栏位 + { + int p_class = CHAR_getInt( charaindex, PROFESSION_CLASS ); + int fd=-1; + + switch( p_class ){ + case PROFESSION_CLASS_FIGHTER: + // 勇士锁敏200 + if( SkUpTbl[skillid] == CHAR_DEX ){ + if( CHAR_getInt( charaindex, SkUpTbl[skillid] ) >= 200 * 100 ){ + CHAR_talkToCli(charaindex, -1, "你的能力值已达上限", CHAR_COLORYELLOW ); + fd = getfdFromCharaIndex(charaindex); + if( fd != -1 ) lssproto_SKUP_send( fd, cnt ); + return; + } + } + break; + case PROFESSION_CLASS_WIZARD: + // 巫师锁攻200 + if( SkUpTbl[skillid] == CHAR_STR ){ + if( CHAR_getInt( charaindex, SkUpTbl[skillid] ) >= 200 * 100 ){ + CHAR_talkToCli(charaindex, -1, "你的能力值已达上限", CHAR_COLORYELLOW ); + fd = getfdFromCharaIndex(charaindex); + if( fd != -1 ) lssproto_SKUP_send( fd, cnt ); + return; + } + } + // 巫师锁防200 + if( SkUpTbl[skillid] == CHAR_TOUGH ){ + if( CHAR_getInt( charaindex, SkUpTbl[skillid] ) >= 200 * 100 ){ + CHAR_talkToCli(charaindex, -1, "你的能力值已达上限", CHAR_COLORYELLOW ); + fd = getfdFromCharaIndex(charaindex); + if( fd != -1 ) lssproto_SKUP_send( fd, cnt ); + return; + } + } + break; + case PROFESSION_CLASS_HUNTER: + // 猎人锁攻200 + if( SkUpTbl[skillid] == CHAR_STR ){ + if( CHAR_getInt( charaindex, SkUpTbl[skillid] ) >= 200 * 100 ){ + CHAR_talkToCli(charaindex, -1, "你的能力值已达上限", CHAR_COLORYELLOW ); + fd = getfdFromCharaIndex(charaindex); + if( fd != -1 ) lssproto_SKUP_send( fd, cnt ); + return; + } + } + // 猎人锁防200 + if( SkUpTbl[skillid] == CHAR_TOUGH ){ + if( CHAR_getInt( charaindex, SkUpTbl[skillid] ) >= 200 * 100 ){ + CHAR_talkToCli(charaindex, -1, "你的能力值已达上限", CHAR_COLORYELLOW ); + fd = getfdFromCharaIndex(charaindex); + if( fd != -1 ) lssproto_SKUP_send( fd, cnt ); + return; + } + } + // 猎人锁敏400 + if( SkUpTbl[skillid] == CHAR_DEX ){ + if( CHAR_getInt( charaindex, SkUpTbl[skillid] ) >= 400 * 100 ){ + CHAR_talkToCli(charaindex, -1, "你的能力值已达上限", CHAR_COLORYELLOW ); + fd = getfdFromCharaIndex(charaindex); + if( fd != -1 ) lssproto_SKUP_send( fd, cnt ); + return; + } + } + break; + default: break; + } + + fd = getfdFromCharaIndex(charaindex); + if( fd != -1 ) lssproto_SKUP_send( fd, cnt-1 ); + } +#endif + + CHAR_setInt( charaindex,CHAR_SKILLUPPOINT,cnt-1); + CHAR_setInt( charaindex, SkUpTbl[skillid], CHAR_getInt( charaindex, SkUpTbl[skillid] ) + 1*100 ); + + CHAR_complianceParameter(charaindex); + CHAR_send_P_StatusString( charaindex, SendTbl[skillid]); + +#ifdef _ANGEL_SUMMON // 加点时检查资格 + if( cnt-1 == 0 ) + //selectAngel( charaindex); + selectAngel( charaindex, -1, -1 , FALSE); + +#endif + } + CHAR_PartyUpdate( charaindex, CHAR_N_STRING_MAXHP ); + +} + +INLINE void CHAR_getDXDY( int dir , int* dx, int* dy ) +{ + static POINT CHAR_dxdy[8]= + { + { 0,-1}, /* */ + { 1,-1}, /* */ + { 1, 0}, /* */ + { 1, 1}, /* */ + { 0, 1}, /* */ + {-1, 1}, /* */ + {-1, 0}, /* */ + {-1,-1}, /* */ + }; + VALIDATEDIR(dir); + + if( dx )*dx = CHAR_dxdy[dir].x; + if( dy )*dy = CHAR_dxdy[dir].y; +} +INLINE int CHAR_getDX( int dir ) +{ + int tmp; + CHAR_getDXDY( dir,&tmp,NULL); + return tmp; +} +INLINE int CHAR_getDY( int dir ) +{ + int tmp; + CHAR_getDXDY( dir,NULL,&tmp); + return tmp; +} + +/*------------------------------------------------------------ + * 元穴旦及平乓仿弁正□毛 月[ + * 娄醒 + * objbuf int* object 匹及 index 毛医 允月 + * 田永白央 + * siz int objbuf 及 扔奶术 + * ff int 白夫失 + * fx int x + * fy int y + * 忒曰袄 + * 窒蜊平乓仿互中月井[ + ------------------------------------------------------------*/ +int CHAR_getSameCoordinateObjects(int* objbuf, int siz,int ff, int fx, + int fy) +{ + OBJECT object; + int findobjnum=0; + + for( object = MAP_getTopObj(ff,fx,fy) ; object ; + object = NEXT_OBJECT(object ) ){ + int objindex = GET_OBJINDEX(object); + + if( siz <= findobjnum )break; + if( OBJECT_getType(objindex) != OBJTYPE_NOUSE ) + objbuf[findobjnum++] = objindex; + } + return findobjnum; +} + + +/*====================平乓仿及树 毛 月烟及楮醒====================*/ +/*左皿扑亦件犯□正及 侬 毛忡绣允月楮醒*/ +static char CHAR_optiondataString[STRINGBUFSIZ]; +/*------------------------------------------------------------ + * 左皿扑亦件迕及 侬 毛综月[ + * level, showstring , 熔及醒 , 飓 寞} 窒荚夫弘奶件仄凶井[ + * 弁仿旦[ + * 娄醒 + * ch Char* 平乓仿犯□正 + * 忒曰袄 + * char* static 卅 毛忒允及匹戚荚及裟太请仄及凛卞反 互 + * 凳今木化中月[娄醒毛公及引引忡绣仄卅中仪[ + ------------------------------------------------------------*/ +char* CHAR_makeOptionString( Char* ch ) +{ + char escapeshowstring[256]; + char *showstr = MAP_getfloorShowstring(ch->data[CHAR_FLOOR]); + if( ! showstr ){ + CHAR_optiondataString[0] = '\0'; + return CHAR_optiondataString; + } else { + +#if 0 /* 动票反LS2酷 匹丐月 */ + snprintf( CHAR_optiondataString, + sizeof( CHAR_optiondataString ), + "%d|%s|1|%d|%d", + ch->data[CHAR_LV], + makeEscapeString( showstr , + escapeshowstring,sizeof(escapeshowstring) ), + ch->data[CHAR_BASEIMAGENUMBER], + ch->data[CHAR_LOGINCOUNT]); +#endif + + /* 动票反StoneAge 酷 匹丐月[ + + dataplace|faceimg|level|hp|str|def|dex|charm|dp|earth|water|fire|wind|login|Name|Place + 午卅月[ + */ + { + snprintf( CHAR_optiondataString, + sizeof( CHAR_optiondataString ), + "%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%s|%s", + ch->data[CHAR_DATAPLACENUMBER], + ch->data[CHAR_FACEIMAGENUMBER], + ch->data[CHAR_LV], + ch->workint[CHAR_WORKMAXHP], + ch->workint[CHAR_WORKATTACKPOWER], + ch->workint[CHAR_WORKDEFENCEPOWER], + ch->workint[CHAR_WORKQUICK], + ch->workint[CHAR_WORKFIXCHARM], + ch->data[CHAR_DUELPOINT], /* dp, FIXME */ + ch->workint[CHAR_WORKFIXEARTHAT], + ch->workint[CHAR_WORKFIXWATERAT], + ch->workint[CHAR_WORKFIXFIREAT], + ch->workint[CHAR_WORKFIXWINDAT], + ch->data[CHAR_LOGINCOUNT], + ch->string[CHAR_NAME].string, + makeEscapeString( showstr , + escapeshowstring, + sizeof(escapeshowstring) ) + ); + } + } + return CHAR_optiondataString; +} + +static char CHAR_statusSendBuffer[STRINGBUFSIZ]; + +char* CHAR_makeStatusString( int index, char* category ) +{ + char c = tolower( category[0] ); + int strlength=0; + + if( !CHAR_CHECKINDEX( index ) ) return NULL; + + if( category == NULL ){ + CHAR_statusSendBuffer[0] = '\0'; + return CHAR_statusSendBuffer; + } +DebugPoint = 100; + switch( c ){ + case 'p': + { + int i; + int getCharDataArray[]= { + CHAR_NAME, + CHAR_OWNTITLE, + //CHAR_FMNAME, + }; + int maxexp = 200; + int exp; + int attr[4]; + { + exp = CHAR_getInt(index,CHAR_EXP ); + maxexp = CHAR_GetLevelExp( index, CHAR_getInt( index, CHAR_LV ) + 1 ); + } + + for( i = 0; i < 4; i ++ ) { + attr[i] = CHAR_getWorkInt( index, CHAR_WORKFIXEARTHAT + i); + if( attr[i] < 0 ) attr[i] = 0; + } + + snprintf(CHAR_statusSendBuffer,sizeof(CHAR_statusSendBuffer), + "P1|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|", + CHAR_getInt(index,CHAR_HP), + CHAR_getWorkInt(index,CHAR_WORKMAXHP), + CHAR_getInt(index,CHAR_MP), + CHAR_getWorkInt(index,CHAR_WORKMAXMP), + CHAR_getInt(index,CHAR_VITAL)/100, + CHAR_getInt(index,CHAR_STR)/100, + CHAR_getInt(index,CHAR_TOUGH)/100, + CHAR_getInt(index,CHAR_DEX)/100, + exp, maxexp, + CHAR_getInt(index,CHAR_LV), + CHAR_getWorkInt(index,CHAR_WORKATTACKPOWER), + CHAR_getWorkInt(index,CHAR_WORKDEFENCEPOWER), + CHAR_getWorkInt( index, CHAR_WORKQUICK), + CHAR_getWorkInt( index, CHAR_WORKFIXCHARM), + CHAR_getWorkInt( index, CHAR_WORKFIXLUCK), + attr[0], + attr[1], + attr[2], + attr[3], + CHAR_getInt(index,CHAR_GOLD), + CHAR_getInt(index,CHAR_INDEXOFEQTITLE), + CHAR_getInt(index,CHAR_DUELPOINT), + CHAR_getInt( index, CHAR_TRANSMIGRATION), + CHAR_getInt(index,CHAR_RIDEPET), + CHAR_getInt(index,CHAR_LEARNRIDE), + CHAR_getInt(index,CHAR_BASEBASEIMAGENUMBER) +#ifdef _NEW_RIDEPETS + ,CHAR_getInt( index, CHAR_LOWRIDEPETS) +#endif + + ); + strlength = strlen( CHAR_statusSendBuffer ); + for( i = 0 ; i < arraysizeof( getCharDataArray ) ; i ++ ){ + char token[256]; + char escapebuffer[128]; + snprintf( token, + sizeof( token ), + "%s" STATUSSENDDELIMITER, + makeEscapeString( CHAR_getChar(index, getCharDataArray[i]), + escapebuffer,sizeof(escapebuffer) + )); + strcpysafe( CHAR_statusSendBuffer + strlength, + sizeof( CHAR_statusSendBuffer ) - strlength, + token ); + strlength += strlen( token ); + if( strlength >= sizeof( CHAR_statusSendBuffer ) ) + return CHAR_statusSendBuffer; + } + return CHAR_statusSendBuffer; + break; + } +#ifdef _NEW_RIDEPETS + case 'x': + { + snprintf(CHAR_statusSendBuffer,sizeof(CHAR_statusSendBuffer), "X0|%d", + CHAR_getInt( index, CHAR_LOWRIDEPETS)); + return CHAR_statusSendBuffer; + break; + } +#endif + case 'f': + { + int big4fm =0; +#ifndef _NEW_RIDEPETS + switch( CHAR_getWorkInt( index, CHAR_WORKFMFLOOR) ) + { + case 1041: + big4fm = 1; + break; + case 2031: + big4fm = 2; + break; + case 3031: + big4fm = 3; + break; + case 4031: + big4fm = 4; + break; + default: + big4fm = 0; + } +#endif +#ifdef _FIX_FMNAME_RULE // WON ADD 家族未成立,不显示名称 + if( CHAR_getWorkInt(index, CHAR_WORKFMSETUPFLAG)==1 ){ + snprintf( CHAR_statusSendBuffer, + sizeof( CHAR_statusSendBuffer ), + "F%s|%d|%d|%d|%d", + "(待审)", + CHAR_getInt( index, CHAR_FMLEADERFLAG), + CHAR_getWorkInt( index, CHAR_WORKFMCHANNEL), + CHAR_getInt( index, CHAR_FMSPRITE), big4fm ); + }else +#endif + + snprintf( CHAR_statusSendBuffer, + sizeof( CHAR_statusSendBuffer ), + "F%s|%d|%d|%d|%d", + CHAR_getChar( index, CHAR_FMNAME), + CHAR_getInt( index, CHAR_FMLEADERFLAG), + CHAR_getWorkInt( index, CHAR_WORKFMCHANNEL), + CHAR_getInt( index, CHAR_FMSPRITE), big4fm ); + return CHAR_statusSendBuffer; + break; + } + case 'c': + { + int floor,xsiz,ysiz; + floor = CHAR_getInt(index,CHAR_FLOOR); + xsiz = MAP_getfloorX(floor); + ysiz = MAP_getfloorY(floor); + snprintf( CHAR_statusSendBuffer, + sizeof( CHAR_statusSendBuffer ), + "C%d|%d|%d|%d|%d", + CHAR_getInt(index,CHAR_FLOOR), + xsiz, ysiz, + CHAR_getInt(index,CHAR_X), + CHAR_getInt(index,CHAR_Y) ); + return CHAR_statusSendBuffer; + break; + } + case 'i': + { + int i; + CHAR_statusSendBuffer[0] = 'I'; + strlength = 1; + for( i = 0 ; i < CHAR_MAXITEMHAVE ; i ++ ){ + char token[512]; + int itemindex; + itemindex = CHAR_getItemIndex( index, i ); + if( itemindex >= 0 ) { + snprintf( token ,sizeof(token),"%s|" ,ITEM_makeItemStatusString( -1, itemindex ) ); + }else { + snprintf( token ,sizeof(token),"%s|" , ITEM_makeItemFalseString() ); + } + strcpysafe( CHAR_statusSendBuffer + strlength, + sizeof(CHAR_statusSendBuffer) - strlength, token ); + strlength += strlen( token ); + if( strlength >= arraysizeof(CHAR_statusSendBuffer) ) return CHAR_statusSendBuffer; + } + dchop( CHAR_statusSendBuffer , "|" ); + return CHAR_statusSendBuffer; + break; + } + case 's': + { + int i; + CHAR_statusSendBuffer[0] = 'S'; + strlength = 1; + + for( i = 0 ; i < CHAR_SKILLMAXHAVE ; i ++ ){ + char token[256]; + CHAR_HaveSkill* hskill; + + hskill = CHAR_getCharHaveSkill( index, i ); + + if( hskill != NULL && hskill->use == TRUE ){ +#ifdef _CHAR_PROFESSION // WON ADD 人物职业 + snprintf( token , sizeof(token), "%s|", SKILL_makeSkillStatusString(&hskill->skill, index, i) ); +#else + snprintf( token , sizeof(token), "%s|", SKILL_makeSkillStatusString(&hskill->skill) ); +#endif + }else{ + snprintf( token , sizeof(token), "%s|", SKILL_makeSkillFalseString() ); + } + + strcpysafe( CHAR_statusSendBuffer + strlength, sizeof(CHAR_statusSendBuffer)-strlength, token ); + + strlength += strlen( token ); + if( strlength >= arraysizeof(CHAR_statusSendBuffer) ) + return CHAR_statusSendBuffer; + } + + dchop( CHAR_statusSendBuffer , "|" ); + return CHAR_statusSendBuffer; + break; + } + case 't': + { + int i; + CHAR_statusSendBuffer[0] = 'T'; + strlength = 1; + for( i = 0 ; i < CHAR_TITLEMAXHAVE ; i ++ ){ + char token[256]; + char escape[256]; + snprintf( token , sizeof(token), "%s|" , + makeEscapeString( TITLE_makeTitleStatusString(index, + i ), + escape,sizeof(escape) ) ); + + strcpysafe( CHAR_statusSendBuffer + strlength, + sizeof(CHAR_statusSendBuffer) - strlength, + token ); + strlength += strlen( token ); + if( strlength >= arraysizeof(CHAR_statusSendBuffer) ) + return CHAR_statusSendBuffer; + } + dchop( CHAR_statusSendBuffer , "|" ); + return CHAR_statusSendBuffer; + break; + } + case 'd': + snprintf( CHAR_statusSendBuffer,sizeof(CHAR_statusSendBuffer), + "D%d|%ld",CHAR_getWorkInt(index,CHAR_WORKOBJINDEX), + NowTime.tv_sec ); + return CHAR_statusSendBuffer; + break; + case 'm': + snprintf( CHAR_statusSendBuffer,sizeof(CHAR_statusSendBuffer), + "M%d|%d|%d", + CHAR_getInt( index,CHAR_HP ), + CHAR_getInt( index,CHAR_MP ), + CHAR_getInt( index,CHAR_EXP ) ); + return CHAR_statusSendBuffer; + break; + case 'e': + return NULL; + + case 'n': + { + int num; + + int i, nindex = -1; + int getCharDataArray[]= { + CHAR_NAME + }; + num = tolower( category[1] ) - '0'; + + if( num < 0 || num >= CHAR_PARTYMAX ){ + print( "朋友模式失败 (%c)%d \n", num, num ); + break; + } + + nindex = CHAR_getPartyIndex( index, num); + + if( nindex == -1 ){ + snprintf(CHAR_statusSendBuffer,sizeof(CHAR_statusSendBuffer), + "N%d|0|", num ); + return CHAR_statusSendBuffer; + }else{ + snprintf(CHAR_statusSendBuffer,sizeof(CHAR_statusSendBuffer), + "N%d|1|%d|%d|%d|%d|%d|", + num, + CHAR_getWorkInt( nindex, CHAR_WORKOBJINDEX), + CHAR_getInt( nindex, CHAR_LV), + CHAR_getWorkInt( nindex, CHAR_WORKMAXHP), + CHAR_getInt( nindex, CHAR_HP), + CHAR_getInt( nindex, CHAR_MP) + + ); + } + strlength = strlen( CHAR_statusSendBuffer ); + + for( i = 0 ; i < arraysizeof( getCharDataArray ) ; i ++ ){ + char token[256]; + char escapebuffer[128]; + snprintf( token, + sizeof( token ), + "%s" STATUSSENDDELIMITER, + makeEscapeString( CHAR_getChar(nindex, + getCharDataArray[i]), + escapebuffer,sizeof(escapebuffer) + )); + strcpysafe( CHAR_statusSendBuffer + strlength, + sizeof( CHAR_statusSendBuffer ) - strlength, + token ); + strlength += strlen( token ); + if( strlength >= sizeof( CHAR_statusSendBuffer ) ) + return CHAR_statusSendBuffer; + } + + return CHAR_statusSendBuffer; + break; + } + case 'k': + { + int num; + int i, pindex; + int getCharDataArray[]= { + CHAR_NAME, + CHAR_USERPETNAME, + }; + num = tolower( category[1] ) - '0'; + if( num < 0 || num >= CHAR_MAXPETHAVE ){ + print( "宠物模式失败 (%c)%d \n", num, num ); + break; + } + pindex = CHAR_getCharPet( index, num ); + if( pindex == -1 ){ + snprintf(CHAR_statusSendBuffer,sizeof(CHAR_statusSendBuffer), + "K%d|0|", num ); + return CHAR_statusSendBuffer; + }else{ + int attr[4]; + BOOL changenameflg = FALSE; + char *mycdkey; + char *cdkey = NULL; + for( i = 0; i < 4; i ++ ) { + attr[i] = CHAR_getWorkInt( pindex, CHAR_WORKFIXEARTHAT + i); + if( attr[i] < 0 ) attr[i] = 0; + } + mycdkey = CHAR_getChar( index, CHAR_CDKEY); + { + cdkey = CHAR_getChar( pindex, CHAR_CDKEY); + if( cdkey == NULL ) { + print( "can't get CDKEY\n"); + }else { + + if( strlen( cdkey) == 0 || + strcmp( cdkey, mycdkey) == 0 ){ + changenameflg = TRUE; + } + } + } + snprintf(CHAR_statusSendBuffer,sizeof(CHAR_statusSendBuffer), +// Syu ADD 改变交易时宠物转生颜色 +#ifdef _SHOW_FUSION + "K%d|1|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|", +#else + "K%d|1|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|", +#endif + num, + CHAR_getInt(pindex,CHAR_BASEIMAGENUMBER), + CHAR_getInt(pindex,CHAR_HP), + CHAR_getWorkInt(pindex,CHAR_WORKMAXHP), + CHAR_getInt(pindex,CHAR_MP), + CHAR_getWorkInt(pindex,CHAR_WORKMAXMP), + CHAR_getInt(pindex,CHAR_EXP ), + CHAR_GetLevelExp( pindex,CHAR_getInt( pindex, CHAR_LV ) + 1 ), + CHAR_getInt(pindex,CHAR_LV), + CHAR_getWorkInt(pindex,CHAR_WORKATTACKPOWER), + CHAR_getWorkInt(pindex,CHAR_WORKDEFENCEPOWER), + CHAR_getWorkInt( pindex, CHAR_WORKQUICK), + CHAR_getWorkInt( pindex, CHAR_WORKFIXAI), + attr[0], + attr[1], + attr[2], + attr[3], + CHAR_getInt( pindex, CHAR_SLOT), +// Syu ADD 改变交易时宠物转生颜色 + changenameflg, + CHAR_getInt( pindex,CHAR_TRANSMIGRATION) +#ifdef _SHOW_FUSION + ,CHAR_getInt ( pindex, CHAR_FUSIONBEIT) +#endif + ); + } + strlength = strlen( CHAR_statusSendBuffer ); + for( i = 0 ; i < arraysizeof( getCharDataArray ) ; i ++ ){ + char token[256]; + char escapebuffer[128]; + snprintf( token, + sizeof( token ), + "%s" STATUSSENDDELIMITER, + makeEscapeString( CHAR_getChar(pindex, + getCharDataArray[i]), + escapebuffer,sizeof(escapebuffer) + )); + strcpysafe( CHAR_statusSendBuffer + strlength, + sizeof( CHAR_statusSendBuffer ) - strlength, + token ); + strlength += strlen( token ); + if( strlength >= sizeof( CHAR_statusSendBuffer ) ) + return CHAR_statusSendBuffer; + } + return CHAR_statusSendBuffer; + break; + } + + case 'j': +{ + + int num; + int i, itemindex; + int getMagicDataArray[]= { + MAGIC_NAME, + MAGIC_COMMENT, + }; + num = tolower( category[1] ) - '0'; + + if( num < 0 || num >= CHAR_EQUIPPLACENUM ){ + break; + } + + itemindex = CHAR_getItemIndex( index, num ); + if( !ITEM_CHECKINDEX( itemindex) ) { + snprintf(CHAR_statusSendBuffer,sizeof(CHAR_statusSendBuffer), + "J%d|0|", num ); + return CHAR_statusSendBuffer; + }else{ + int magicindex = MAGIC_getMagicArray( ITEM_getInt( itemindex, ITEM_MAGICID)); + if( magicindex == -1 ) { + snprintf(CHAR_statusSendBuffer,sizeof(CHAR_statusSendBuffer), + "J%d|0|", num ); + return CHAR_statusSendBuffer; + } + snprintf(CHAR_statusSendBuffer,sizeof(CHAR_statusSendBuffer), + "J%d|1|%d|%d|%d|", + num, + ITEM_getInt( itemindex, ITEM_MAGICUSEMP), + MAGIC_getInt( magicindex, MAGIC_FIELD), + MAGIC_getInt( magicindex, MAGIC_TARGET)); + strlength = strlen( CHAR_statusSendBuffer ); + + for( i = 0 ; i < arraysizeof( getMagicDataArray ) ; i ++ ){ + char token[256]; + char escapebuffer[128]; + snprintf( token, + sizeof( token ), + "%s" STATUSSENDDELIMITER, + makeEscapeString( MAGIC_getChar(magicindex, + getMagicDataArray[i]), + escapebuffer,sizeof(escapebuffer) + )); + strcpysafe( CHAR_statusSendBuffer + strlength, + sizeof( CHAR_statusSendBuffer ) - strlength, + token ); + strlength += strlen( token ); + if( strlength >= sizeof( CHAR_statusSendBuffer ) ) + return CHAR_statusSendBuffer; + } + return CHAR_statusSendBuffer; + } + } + break; + + case 'w': +{ + int num; + int i,petskillloop, pindex; + char tmp[16]; + int getPetSkillDataArray[]= { + PETSKILL_NAME, + PETSKILL_COMMENT, + }; + + num = tolower( category[1] ) - '0'; + if( num < 0 || num >= CHAR_MAXPETHAVE ){ + print( "宠物特技资料失败 (%c)%d \n", num, num ); + break; + } + + pindex = CHAR_getCharPet( index, num ); + if( !CHAR_CHECKINDEX(pindex)){ + return NULL; + } + snprintf( tmp, sizeof( tmp), "W%d|", num); + strcpysafe( CHAR_statusSendBuffer, sizeof( CHAR_statusSendBuffer), + tmp); + strlength += strlen( tmp); + if( strlength >= arraysizeof( CHAR_statusSendBuffer) ) { + return CHAR_statusSendBuffer; + } + for( petskillloop = 0; petskillloop < CHAR_MAXPETSKILLHAVE; petskillloop ++ ) { + int skillid = CHAR_getPetSkill( pindex, petskillloop); + int petskillindex = PETSKILL_getPetskillArray( skillid ); + if( PETSKILL_CHECKINDEX( petskillindex) ) { + char token[256]; + snprintf( token, sizeof( token), + "%d|%d|%d|", + + PETSKILL_getInt( petskillindex, PETSKILL_ID), + PETSKILL_getInt( petskillindex, PETSKILL_FIELD), + PETSKILL_getInt( petskillindex, PETSKILL_TARGET) + ); + strcpysafe( CHAR_statusSendBuffer + strlength, + sizeof(CHAR_statusSendBuffer) - strlength, + token ); + strlength += strlen( token ); + if( strlength >= arraysizeof(CHAR_statusSendBuffer)) { + return CHAR_statusSendBuffer; + } + + for( i = 0 ; i < arraysizeof( getPetSkillDataArray ) ; i ++ ){ + char escapebuffer[128]; + snprintf( token, + sizeof( token ), + "%s" STATUSSENDDELIMITER, + makeEscapeString( + PETSKILL_getChar(petskillindex, + getPetSkillDataArray[i]), + escapebuffer,sizeof(escapebuffer) + )); + strcpysafe( CHAR_statusSendBuffer + strlength, + sizeof( CHAR_statusSendBuffer ) - strlength, + token ); + strlength += strlen( token ); + if( strlength >= sizeof( CHAR_statusSendBuffer )) { + return CHAR_statusSendBuffer; + } + } + } + else { + char token[256]; + snprintf( token, sizeof( token),"|||||"); + strcpysafe( CHAR_statusSendBuffer + strlength, + sizeof(CHAR_statusSendBuffer) - strlength, + token ); + strlength += strlen( token ); + if( strlength >= arraysizeof(CHAR_statusSendBuffer) ) { + return CHAR_statusSendBuffer; + } + } + } + return CHAR_statusSendBuffer; +} + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + case 'y': +{ + int num = 0, f_num = 0; + int i,petskillloop, pindex; + char tmp[16]; + int getPetSkillDataArray[]= { + PETSKILL_NAME, + PETSKILL_COMMENT, + }; + + num = tolower( category[1] ) - '0'; + if( num < 0 || num >= CHAR_MAXPETHAVE ){ + print( "宠物特技资料失败 (%c)%d \n", num, num ); + break; + } + + pindex = CHAR_getCharPet( index, num ); + if( !CHAR_CHECKINDEX(pindex)){ + return NULL; + } + snprintf( tmp, sizeof( tmp), "W%d|", num); + strcpysafe( CHAR_statusSendBuffer, sizeof( CHAR_statusSendBuffer), + tmp); + strlength += strlen( tmp); + if( strlength >= arraysizeof( CHAR_statusSendBuffer) ) { + return CHAR_statusSendBuffer; + } + + if( CHAR_getWorkInt( pindex, CHAR_WORKOBLIVION) > 0 ) + f_num = CHAR_getWorkInt( pindex, CHAR_WORKMODOBLIVION ) + 1;// 遗忘宠技数量 + + for( petskillloop = 0; petskillloop < CHAR_MAXPETSKILLHAVE; petskillloop ++ ) { + int skillid = CHAR_getPetSkill( pindex, petskillloop); + int petskillindex = PETSKILL_getPetskillArray( skillid ); + if( PETSKILL_CHECKINDEX( petskillindex) ) { + char token[256]; + int field = -1, target = -1; + int oblivion = CHAR_getWorkInt( pindex, CHAR_WORKOBLIVION ); + int p_id = PETSKILL_getInt( petskillindex, PETSKILL_ID); + int rand_num = RAND( 0, 100 ); + + // 中了遗忘 + if( (oblivion > 0) && ( f_num > 0 ) && ( rand_num <= 60 ) && ( p_id != 1 ) ){ + field = PETSKILL_FIELD_MAP; + target = PETSKILL_TARGET_NONE; + f_num --; + }else{ + field = PETSKILL_getInt( petskillindex, PETSKILL_FIELD); + target = PETSKILL_getInt( petskillindex, PETSKILL_TARGET); + } + + snprintf( token, sizeof( token),"%d|%d|%d|", +// PETSKILL_getInt( petskillindex, PETSKILL_ID), + p_id, + field, target + ); + strcpysafe( CHAR_statusSendBuffer + strlength, + sizeof(CHAR_statusSendBuffer) - strlength, + token ); + strlength += strlen( token ); + if( strlength >= arraysizeof(CHAR_statusSendBuffer)) { + return CHAR_statusSendBuffer; + } + + for( i = 0 ; i < arraysizeof( getPetSkillDataArray ) ; i ++ ){ + char escapebuffer[128]; + snprintf( token, + sizeof( token ), + "%s" STATUSSENDDELIMITER, + makeEscapeString( + PETSKILL_getChar(petskillindex, + getPetSkillDataArray[i]), + escapebuffer,sizeof(escapebuffer) + )); + strcpysafe( CHAR_statusSendBuffer + strlength, + sizeof( CHAR_statusSendBuffer ) - strlength, + token ); + strlength += strlen( token ); + if( strlength >= sizeof( CHAR_statusSendBuffer )) { + return CHAR_statusSendBuffer; + } + } + } + else { + char token[256]; + snprintf( token, sizeof( token),"|||||"); + strcpysafe( CHAR_statusSendBuffer + strlength, + sizeof(CHAR_statusSendBuffer) - strlength, + token ); + strlength += strlen( token ); + if( strlength >= arraysizeof(CHAR_statusSendBuffer) ) { + return CHAR_statusSendBuffer; + } + } + } + return CHAR_statusSendBuffer; +} +#endif + +#ifdef _PETSKILL_DAMAGETOHP + case 'o': +{ + int getPetSkillDataArray[]= { + PETSKILL_NAME, + PETSKILL_COMMENT, + }; + int i,petskillloop, pindex=index; + int num = 0;//, f_num = 0; + char tmp[16]; + + num = tolower( category[1] ) - '0'; + if( num < 0 || num >= CHAR_MAXPETHAVE ){ + print( "宠物特技资料失败 (%c)%d \n", num, num ); + break; + } + + pindex = CHAR_getCharPet( index, num ); + if( !CHAR_CHECKINDEX(pindex)){ + return NULL; + } + snprintf( tmp, sizeof( tmp), "W%d|", num); + strcpysafe( CHAR_statusSendBuffer, sizeof( CHAR_statusSendBuffer), + tmp); + strlength += strlen( tmp); + if( strlength >= arraysizeof( CHAR_statusSendBuffer) ) { + return CHAR_statusSendBuffer; + } + + for( petskillloop = 0; petskillloop < CHAR_MAXPETSKILLHAVE; petskillloop ++ ) { + int skillid = CHAR_getPetSkill( pindex, petskillloop); + int petskillindex = PETSKILL_getPetskillArray( skillid ); + if( PETSKILL_CHECKINDEX( petskillindex) ) { + char token[256]; + int field = -1, target = -1; + //int oblivion = CHAR_getWorkInt( pindex, CHAR_WORKOBLIVION ); + int p_id = PETSKILL_getInt( petskillindex, PETSKILL_ID); + + //生命大於50%且技能名称若为 浴血狂袭 技能不能选 + if( ( CHAR_getInt( pindex, CHAR_HP ) > CHAR_getWorkInt( pindex, CHAR_WORKMAXHP )*0.5 + && strcmp(PETSKILL_getChar( petskillindex, PETSKILL_NAME),"浴血狂袭" ) == 0 ) +#ifdef _PETSKILL_EXPLODE + || ( CHAR_getInt( pindex, CHAR_HP ) < (CHAR_getWorkInt( pindex, CHAR_WORKMAXHP ) >> 1 ) + && strcmp(PETSKILL_getChar( petskillindex, PETSKILL_NAME),"爆裂攻击" ) == 0 ) +#endif + ){ + field = PETSKILL_FIELD_MAP; + target = PETSKILL_TARGET_NONE; + }else{ + field = PETSKILL_getInt( petskillindex, PETSKILL_FIELD); + target = PETSKILL_getInt( petskillindex, PETSKILL_TARGET); + } + + snprintf( token, sizeof( token),"%d|%d|%d|", +// PETSKILL_getInt( petskillindex, PETSKILL_ID), + p_id, + field, target + ); + strcpysafe( CHAR_statusSendBuffer + strlength, + sizeof(CHAR_statusSendBuffer) - strlength, + token ); + strlength += strlen( token ); + if( strlength >= arraysizeof(CHAR_statusSendBuffer)) { + return CHAR_statusSendBuffer; + } + + for( i = 0 ; i < arraysizeof( getPetSkillDataArray ) ; i ++ ){ + char escapebuffer[128]; + snprintf( token, + sizeof( token ), + "%s" STATUSSENDDELIMITER, + makeEscapeString( + PETSKILL_getChar(petskillindex, + getPetSkillDataArray[i]), + escapebuffer,sizeof(escapebuffer) + )); + strcpysafe( CHAR_statusSendBuffer + strlength, + sizeof( CHAR_statusSendBuffer ) - strlength, + token ); + strlength += strlen( token ); + if( strlength >= sizeof( CHAR_statusSendBuffer )) { + return CHAR_statusSendBuffer; + } + } + } + else { + char token[256]; + snprintf( token, sizeof( token),"|||||"); + strcpysafe( CHAR_statusSendBuffer + strlength, + sizeof(CHAR_statusSendBuffer) - strlength, + token ); + strlength += strlen( token ); + if( strlength >= arraysizeof(CHAR_statusSendBuffer) ) { + return CHAR_statusSendBuffer; + } + } + } + return CHAR_statusSendBuffer; +} +#endif + +#ifdef _PETSKILL_BECOMEFOX + case 'a': +{ + int getPetSkillDataArray[]= { + PETSKILL_NAME, + PETSKILL_COMMENT, + }; + int i,petskillloop, pindex=index; + int num = 0;//, f_num = 0; + char tmp[16]; + + num = tolower( category[1] ) - '0'; + if( num < 0 || num >= CHAR_MAXPETHAVE ){ + print( "宠物特技资料失败 (%c)%d \n", num, num ); + break; + } + print( "宠物特技资料" ); + pindex = CHAR_getCharPet( index, num ); + if( !CHAR_CHECKINDEX(pindex)){ + return NULL; + } + snprintf( tmp, sizeof( tmp), "W%d|", num); + strcpysafe( CHAR_statusSendBuffer, sizeof( CHAR_statusSendBuffer), + tmp); + strlength += strlen( tmp); + if( strlength >= arraysizeof( CHAR_statusSendBuffer) ) { + return CHAR_statusSendBuffer; + } + + for( petskillloop = 0; petskillloop < CHAR_MAXPETSKILLHAVE; petskillloop ++ ) { + int skillid = CHAR_getPetSkill( pindex, petskillloop); + int petskillindex = PETSKILL_getPetskillArray( skillid ); + if( PETSKILL_CHECKINDEX( petskillindex) ) { + char token[256]; + int field = -1, target = -1; + //int oblivion = CHAR_getWorkInt( pindex, CHAR_WORKOBLIVION ); + int p_id = PETSKILL_getInt( petskillindex, PETSKILL_ID); + + //技能名称若为 待机 攻击 防御 技能才能选 + print("\n技能名称:%s",PETSKILL_getChar( petskillindex, PETSKILL_NAME)); + if( strcmp(PETSKILL_getChar( petskillindex, PETSKILL_NAME),"待机" ) == 0 + || strcmp(PETSKILL_getChar( petskillindex, PETSKILL_NAME),"攻击" ) == 0 + || strcmp(PETSKILL_getChar( petskillindex, PETSKILL_NAME),"防御" ) == 0){ + field = PETSKILL_getInt( petskillindex, PETSKILL_FIELD); + target = PETSKILL_getInt( petskillindex, PETSKILL_TARGET); + }else{ + field = PETSKILL_FIELD_MAP; + target = PETSKILL_TARGET_NONE; + } + + snprintf( token, sizeof( token),"%d|%d|%d|", +// PETSKILL_getInt( petskillindex, PETSKILL_ID), + p_id, + field, target + ); + strcpysafe( CHAR_statusSendBuffer + strlength, + sizeof(CHAR_statusSendBuffer) - strlength, + token ); + strlength += strlen( token ); + if( strlength >= arraysizeof(CHAR_statusSendBuffer)) { + return CHAR_statusSendBuffer; + } + + for( i = 0 ; i < arraysizeof( getPetSkillDataArray ) ; i ++ ){ + char escapebuffer[128]; + snprintf( token, + sizeof( token ), + "%s" STATUSSENDDELIMITER, + makeEscapeString( + PETSKILL_getChar(petskillindex, + getPetSkillDataArray[i]), + escapebuffer,sizeof(escapebuffer) + )); + strcpysafe( CHAR_statusSendBuffer + strlength, + sizeof( CHAR_statusSendBuffer ) - strlength, + token ); + strlength += strlen( token ); + if( strlength >= sizeof( CHAR_statusSendBuffer )) { + return CHAR_statusSendBuffer; + } + } + } + else { + char token[256]; + snprintf( token, sizeof( token),"|||||"); + strcpysafe( CHAR_statusSendBuffer + strlength, + sizeof(CHAR_statusSendBuffer) - strlength, + token ); + strlength += strlen( token ); + if( strlength >= arraysizeof(CHAR_statusSendBuffer) ) { + return CHAR_statusSendBuffer; + } + } + } + return CHAR_statusSendBuffer; +} +#endif + + default: + break; + } + + CHAR_statusSendBuffer[0] = '\0'; + return CHAR_statusSendBuffer; +} + +//BOOL CHAR_sendStatusString( int charaindex, char* category ) +BOOL _CHAR_sendStatusString( int charaindex, char* category, char* file, int line ) +{ + char* string; + + //print("\nsend_S:%s:%d ", file, line); + + if( CHAR_getInt(charaindex,CHAR_WHICHTYPE) != CHAR_TYPEPLAYER ){ + return FALSE; + } + string = CHAR_makeStatusString( charaindex, category ); + + if( string != NULL ){ + int fd; + fd = getfdFromCharaIndex( charaindex ); + if( fd != -1 ){ + lssproto_S_send( fd, string ); + return TRUE; + } + } + return FALSE; +} + +void CHAR_inputOwnTitle( int index ,char* name ) +{ + if( !CHAR_CHECKINDEX( index ) ) return; + + if( CHAR_getFlg( index,CHAR_ISDIE ) )return; + + CHAR_setChar( index, CHAR_OWNTITLE ,name); + + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( index, CHAR_WORKOBJINDEX) ); + + CHAR_send_P_StatusString( index, CHAR_P_STRING_OWNTITLE ); +} + + +void CHAR_selectTitle( int index, int titleindex ) +{ + if( !CHAR_CHECKINDEX( index ) )return; + + if( CHAR_getFlg( index,CHAR_ISDIE ) )return; + + if( titleindex == -1 ){ + CHAR_setInt( index, CHAR_INDEXOFEQTITLE, titleindex); + }else if( titleindex < 0 || titleindex >= CHAR_TITLEMAXHAVE ) { + return; + } + else{ + + int title = CHAR_getCharHaveTitle( index,titleindex ); + + if( TITLE_getTitleIndex( title) != -1 ){ + CHAR_setInt( index, CHAR_INDEXOFEQTITLE, titleindex); + } + } + + CHAR_sendStatusString( index, "T" ); + CHAR_send_P_StatusString( index, CHAR_P_STRING_TITLE ); +} + + +void CHAR_deleteTitle( int index, int titleindex ) +{ + int title; + + if( !CHAR_CHECKINDEX( index ) )return; + /* 韶氏匹中月凛反分户 */ + if( CHAR_getFlg( index,CHAR_ISDIE ) )return; + + if( titleindex < 0 || titleindex >= CHAR_TITLEMAXHAVE )return; + title = CHAR_getCharHaveTitle( index,titleindex ); + /*if( TITLE_CHECKTABLEINDEX( title ) == FALSE )*/ + if( TITLE_getTitleIndex( title) == -1 ) { + return; + } + CHAR_setCharHaveTitle( index,titleindex,-1 ); + + /* 愤坌互银匀化中凶支勾卅日壬}公木手卅仄卞允月 */ + if( CHAR_getInt(index, CHAR_INDEXOFEQTITLE) == titleindex ) + CHAR_setInt(index, CHAR_INDEXOFEQTITLE, -1 ); + + /* + * 旦 □正旦树 毛霜月[ + */ + CHAR_sendStatusString( index, "T" ); + CHAR_send_P_StatusString( index, CHAR_P_STRING_TITLE ); +} + +static void CHAR_initcharWorkInt( index ) +{ + float hp; + static struct substitutionTable{ + CHAR_WORKDATAINT workindex; + CHAR_DATAINT intindex; + }subtbl[]={ + { CHAR_WORKMAXMP, CHAR_MAXMP }, + { CHAR_WORKFIXFIREAT, CHAR_FIREAT }, + { CHAR_WORKFIXWATERAT, CHAR_WATERAT}, + { CHAR_WORKFIXEARTHAT, CHAR_EARTHAT}, + { CHAR_WORKFIXWINDAT, CHAR_WINDAT }, + { CHAR_WORKFIXCHARM, CHAR_CHARM }, + { CHAR_WORKFIXLUCK, CHAR_LUCK }, + { CHAR_WORKFIXLUCK, CHAR_LUCK }, + { CHAR_WORKMODPOISON, CHAR_POISON }, + { CHAR_WORKMODPARALYSIS,CHAR_PARALYSIS }, + { CHAR_WORKMODSLEEP, CHAR_SLEEP }, + { CHAR_WORKMODSTONE, CHAR_STONE }, + { CHAR_WORKMODDRUNK, CHAR_DRUNK }, + { CHAR_WORKMODCONFUSION, CHAR_CONFUSION } + }; + int i; + for( i=0 ; i 0 ){ + CHAR_setWorkInt( index, CHAR_WORKFIXEARTHAT + (i + 2) % 4, attr * -1); + } + } + +#ifdef _MAGIC_RESIST_EQUIT // WON ADD 职业抗性装备 + { + // 火冰电抗性 + //for( i=0; i<3; i++) + // CHAR_setWorkInt( index, CHAR_WORK_F_RESIST+i, CHAR_getInt( index, PROFESSION_FIRE_R+i ) ); + } +#endif + + + CHAR_setWorkInt( index, CHAR_WORKFIXDEX, + CHAR_getInt( index, CHAR_DEX) * 0.01 ); + CHAR_setWorkInt( index, CHAR_WORKFIXVITAL, + CHAR_getInt( index, CHAR_VITAL) * 0.01 ); + + CHAR_setWorkInt( index, CHAR_WORKFIXSTR, + CHAR_getInt( index, CHAR_STR) * 0.01 * 1.0 +//#ifdef _BATTLE_NEWPOWER +// + CHAR_getInt( index, CHAR_DEX) * 0.01 * 0.05 +// + CHAR_getInt( index, CHAR_VITAL) * 0.01 * 0.05 ); // 耐力 +//#else + + CHAR_getInt( index, CHAR_TOUGH) * 0.01 * 0.1 + + CHAR_getInt( index, CHAR_VITAL) * 0.01 * 0.1 + + CHAR_getInt( index, CHAR_DEX) * 0.01 * 0.05 ); +//#endif + CHAR_setWorkInt( index, CHAR_WORKFIXTOUGH, + CHAR_getInt( index, CHAR_TOUGH) * 0.01 * 1.0 +//#ifdef _BATTLE_NEWPOWER +// + CHAR_getInt( index, CHAR_DEX) * 0.01 * 0.05 +// + CHAR_getInt( index, CHAR_VITAL) * 0.01 * 0.05 ); // 力量 +//#else + + CHAR_getInt(index,CHAR_STR) * 0.01 * 0.1 + + CHAR_getInt(index,CHAR_VITAL) * 0.01 * 0.1 + + CHAR_getInt(index,CHAR_DEX) * 0.01 * 0.05 ); +//#endif + +#ifdef _ITEMSET5_TXT + { + CHAR_setWorkInt( index, CHAR_WORKFIXARRANGE, 0); + CHAR_setWorkInt( index, CHAR_WORKFIXSEQUENCE, 0); + CHAR_setWorkInt( index, CHAR_WORKATTACHPILE, 0); + CHAR_setWorkInt( index, CHAR_WORKHITRIGHT, 0); + } +#endif + + + +#ifdef _ITEMSET6_TXT + { + CHAR_setWorkInt( index, CHAR_WORKNEGLECTGUARD, 0); + } +#endif + + CHAR_setWorkInt( index, CHAR_WORKATTACKPOWER, + CHAR_getWorkInt(index,CHAR_WORKFIXSTR) ); + CHAR_setWorkInt( index, CHAR_WORKDEFENCEPOWER, + CHAR_getWorkInt(index,CHAR_WORKFIXTOUGH) ); + CHAR_setWorkInt( index, CHAR_WORKQUICK, + CHAR_getWorkInt( index, CHAR_WORKFIXDEX)); + + hp = ( CHAR_getInt(index,CHAR_VITAL) * 4 + + CHAR_getInt(index,CHAR_STR) * 1 + + CHAR_getInt(index,CHAR_TOUGH) * 1 + + CHAR_getInt(index,CHAR_DEX) * 1 ) * 0.01; + + CHAR_setWorkInt( index, CHAR_WORKMAXHP, (int)hp ); + CHAR_setWorkInt( index, CHAR_WORKMAXMP, CHAR_getInt( index, CHAR_MAXMP)); + +#ifdef _ADD_DEAMGEDEFC + CHAR_setWorkInt( index, CHAR_WORKOTHERDMAGE, 0); + CHAR_setWorkInt( index, CHAR_WORKOTHERDEFC, 0); +#endif + + if( CHAR_getInt( index, CHAR_WHICHTYPE) == CHAR_TYPEPET) { + int hostindex; + CHAR_setWorkInt( index, CHAR_WORKFIXAI, 0); + hostindex = CHAR_getWorkInt( index, CHAR_WORKPLAYERINDEX); + if( CHAR_CHECKINDEX( hostindex)) { + int ai; + int modai = CHAR_getInt( index, CHAR_MODAI); + double R; + if( modai <= 0 ) modai = 100; + R = 1.10; + ai = ( (CHAR_getInt( hostindex, CHAR_LV) + * CHAR_getWorkInt( hostindex, CHAR_WORKFIXCHARM ) + * R) + / + (CHAR_getInt( index, CHAR_LV)* modai) * 100 ) ; + if( ai > 100 ) ai = 100; + + ai += CHAR_getInt( index, CHAR_VARIABLEAI) * 0.01; + if( CHAR_getInt( hostindex, CHAR_TRANSMIGRATION ) > 0 ){ + // shan 120 -> 140 + ai += ( CHAR_GetLevel() - CHAR_getInt( hostindex, CHAR_LV ) ) / 2; + } + if( ai < 0 ) ai = 0; + if( ai > 100 ) ai = 100; + CHAR_setWorkInt( index, CHAR_WORKFIXAI, ai); + } + } +} + +int _CHAR_complianceParameter( int index, char *FILE, int LINE) +{ + //print("\ncompPara:%s:%d", FILE, LINE); + + if( !CHAR_CHECKINDEX( index)) return 0; + + CHAR_initcharWorkInt( index ); + ITEM_equipEffect( index ); + + CHAR_setWorkInt(index, CHAR_WORKATTACKPOWER, + CHAR_getWorkInt( index, CHAR_WORKFIXSTR ) ); + CHAR_setWorkInt(index, CHAR_WORKDEFENCEPOWER, + CHAR_getWorkInt( index, CHAR_WORKFIXTOUGH ) ); + CHAR_setWorkInt(index, CHAR_WORKQUICK, + CHAR_getWorkInt( index, CHAR_WORKFIXDEX ) ); + +#ifdef _ITEMSET5_TXT + CHAR_setWorkInt(index, CHAR_WORKARRANGEPOWER, + CHAR_getWorkInt( index, CHAR_WORKFIXARRANGE ) ); + CHAR_setWorkInt(index, CHAR_WORKSEQUENCEPOWER, + CHAR_getWorkInt( index, CHAR_WORKFIXSEQUENCE ) ); +#endif + + Other_DefcharWorkInt( index); + CHAR_setInt( index, CHAR_HP, min( CHAR_getInt(index,CHAR_HP), CHAR_getWorkInt( index, CHAR_WORKMAXHP))); + CHAR_setInt( index, CHAR_MP, min( CHAR_getInt(index,CHAR_MP), CHAR_getWorkInt( index, CHAR_WORKMAXMP))); + + if( CHAR_getInt( index, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER ){ + if( CHAR_getWorkInt( index, CHAR_WORKPETFOLLOW ) != -1 ){ + int petindex = CHAR_getWorkInt( index, CHAR_WORKPETFOLLOW ); + if( !CHAR_CHECKINDEX( petindex) ){ + CHAR_setWorkInt( index, CHAR_WORKPETFOLLOW, -1); + }else{ + if( CHAR_getInt( petindex, CHAR_WHICHTYPE) == CHAR_TYPEPET && + !CHAR_CHECKINDEX( CHAR_getWorkInt( petindex, CHAR_WORKPLAYERINDEX)) ){ + CHAR_setWorkInt( index, CHAR_WORKPETFOLLOW, petindex); + CHAR_setWorkInt( petindex, CHAR_WORKPLAYERINDEX, index); + } + } + } + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + { + int i, add_pile = 0; + int old_pile = CHAR_getWorkInt( index, CHAR_WORKATTACHPILE); + + for( i=0; i NowTime.tv_sec +#ifdef _NPCCHANGE_PLAYERIMG + || CHAR_getWorkInt( index, CHAR_WORKNPCMETAMO) > 0 +#endif +#ifdef _PETSKILL_BECOMEPIG + || CHAR_getInt( index, CHAR_BECOMEPIG) > -1 +#endif + ){ + newimagenumber = oldimagenumber; //不恢复成原本的图 + } +#endif + // Arminius 8.9 airplane + if (oldimagenumber==100259) newimagenumber=100259; +#ifdef _VARY_WOLF + if( (CHAR_getInt( index, CHAR_WHICHTYPE) == CHAR_TYPEPET) && + (CHAR_getWorkInt( index, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE) && + oldimagenumber == 101428 ){ + newimagenumber = 101428; + } +#endif + +#ifdef _ENEMY_FALLGROUND + if( CHAR_getInt( index, CHAR_WHICHTYPE) == CHAR_TYPEENEMY ) { + return 0; + }else { +#endif + if( newimagenumber == -1 ) { + CHAR_setInt(index,CHAR_BASEIMAGENUMBER, basebaseimagenumber); + }else { + CHAR_setInt(index,CHAR_BASEIMAGENUMBER,newimagenumber); + } + +#ifdef _ENEMY_FALLGROUND + } +#endif +#ifdef _NEW_RIDEPETS + if( (CHAR_getWorkInt(index, CHAR_WORKITEMMETAMO)>NowTime.tv_sec) + || (CHAR_getWorkInt(index,CHAR_WORKNPCMETAMO)>0)){ + return 0; + } +#endif + // Robin 0725 + if( CHAR_getInt(index, CHAR_RIDEPET) != -1 ){ + int i; +#ifndef _NEW_RIDEPETS + int big4fm =0; +#endif +#ifdef _NEW_RIDEPETS + BOOL FindGraNo = FALSE; +#endif + int petindex = CHAR_getCharPet( index, CHAR_getInt(index, CHAR_RIDEPET) ); +#ifndef _NEW_RIDEPETS + int leaderGraNo = 100700 + + ((CHAR_getInt( index, CHAR_BASEBASEIMAGENUMBER)-100000)/20)*10 + + CHAR_getInt( index, CHAR_FMSPRITE)*5; + switch( CHAR_getWorkInt( index, CHAR_WORKFMFLOOR) ){ + + case 1041: + big4fm = 1; + break; + case 2031: + big4fm = 2; + break; + case 3031: + big4fm = 3; + break; + case 4031: + big4fm = 4; + break; + default: + big4fm = 0; + } +#endif + for( i=0; i< arraysizeof(ridePetTable) ; i++ ) { +#ifdef _NEW_RIDEPETS + if( (( CHAR_getInt( index, CHAR_BASEIMAGENUMBER) == ridePetTable[i].charNo ) || + ( CHAR_getInt( index, CHAR_BASEBASEIMAGENUMBER) == ridePetTable[i].charNo )) +#else + if( ( CHAR_getInt( index, CHAR_BASEBASEIMAGENUMBER) == ridePetTable[i].charNo ) +#endif + && ( CHAR_getInt( petindex, CHAR_BASEBASEIMAGENUMBER) == ridePetTable[i].petNo ) ) { + CHAR_setInt( index, CHAR_BASEIMAGENUMBER, ridePetTable[i].rideNo ); +#ifdef _NEW_RIDEPETS + FindGraNo = TRUE; +#endif + break; + } +#ifndef _NEW_RIDEPETS + else if( ( leaderGraNo == ridePetTable[i].charNo ) + && ( CHAR_getInt( petindex, CHAR_BASEBASEIMAGENUMBER) == ridePetTable[i].petNo ) +#ifdef _EVERYONE_RIDE + && big4fm != 0 ){ +#else + && CHAR_getInt( index, CHAR_FMLEADERFLAG ) == FMMEMBER_LEADER ){ +#endif + CHAR_setInt( index, CHAR_BASEIMAGENUMBER, ridePetTable[i].rideNo ); + break; + } +#endif + } + +#ifdef _NEW_RIDEPETS + { + int ti=-1, Noindex, image=-1; + int petNo = CHAR_getInt( petindex, CHAR_BASEBASEIMAGENUMBER); + int playerNo = CHAR_getInt( index, CHAR_BASEBASEIMAGENUMBER); + + int playerlowsride = CHAR_getInt( index, CHAR_LOWRIDEPETS); + if( (ti = RIDEPET_getPETindex( petNo, playerlowsride )) >= 0 ) { + if( (Noindex = RIDEPET_getNOindex( playerNo)) >= 0 ){ + if( (image = RIDEPET_getRIDEno( Noindex,ti)) >= 0 ) { + FindGraNo = TRUE; + CHAR_setInt( index, CHAR_BASEIMAGENUMBER, image ); + } + } + } + } + if( FindGraNo == FALSE ){ + CHAR_setInt( index , CHAR_RIDEPET, -1 ); + CHAR_setInt( index , CHAR_BASEIMAGENUMBER , CHAR_getInt( index, CHAR_BASEBASEIMAGENUMBER) ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( index, CHAR_WORKOBJINDEX )); + CHAR_send_P_StatusString( index, CHAR_P_STRING_RIDEPET ); + } +#endif + } + } + return 1; +} + +/*====================================================================== + 平乓仿及失奶 丞毛健丹楮醒 + ======================================================================*/ + +/*====================苇月====================*/ +/*------------------------------------------------------------ + * 轾隙烂匹}公及 轾及平乓仿弁正卞苇月奶矛件玄毛 戏今六月 + * 娄醒 + * charaindex int 平乓仿奶件犯永弁旦 + * dir int 轾 + * 忒曰袄 + * 卅仄 + ------------------------------------------------------------*/ +void CHAR_Look( int charaindex, int dir ) +{ + int fl ,x,y; + OBJECT object; + + /* 奶件犯永弁旦及民尼永弁 */ + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return; + + if( dir < 0 ) { + dir = CHAR_getInt(charaindex,CHAR_DIR); + } + VALIDATEDIR(dir); + if( CHAR_getInt( charaindex, CHAR_DIR) != dir ) { + CHAR_setInt(charaindex,CHAR_DIR,dir); + /* 轾 晶仄凶失弁扑亦件毛霜耨允月 */ + CHAR_sendWatchEvent(CHAR_getWorkInt(charaindex,CHAR_WORKOBJINDEX), + CHAR_ACTTURN,NULL,0,TRUE); + } + + fl = CHAR_getInt(charaindex,CHAR_FLOOR); + CHAR_getCoordinationDir( CHAR_getInt(charaindex,CHAR_DIR), + CHAR_getInt(charaindex,CHAR_X), + CHAR_getInt(charaindex,CHAR_Y), + 1, &x, &y ); + + //CHAR_talkToCli( charaindex, -1, "调查四周环境。", CHAR_COLORWHITE ); + + for( object=MAP_getTopObj(fl,x,y) ; object ; + object = NEXT_OBJECT(object) ){ + int objindex = GET_OBJINDEX(object); + if( OBJECT_getType(objindex) == OBJTYPE_CHARA ){ + typedef void (*LOOKF)(int,int); + LOOKF lf; + lf = (LOOKF)CHAR_getFunctionPointer( + OBJECT_getIndex(objindex),CHAR_LOOKEDFUNC); + if( lf ) lf(OBJECT_getIndex(objindex),charaindex); + } + } +} + +BOOL _CHAR_makeObjectCString( char *file, int line, int objindex,char* buf, int buflen ) +{ + char objindexbuf[64]; + if( CHECKOBJECT(objindex) == FALSE ) return FALSE; + + switch( OBJECT_getType(objindex) ){ + case OBJTYPE_NOUSE: + return FALSE; + break; + case OBJTYPE_CHARA: + { + int charaindex = OBJECT_getIndex(objindex); + char escapename[256]; + char escapetitle[256]; + // shan add +1 + char tmp[128]; + int namecolor; +#ifdef _TRANS_6 +#ifdef _TRANS_7 + int namecolortbl[] = { CHAR_COLORWHITE, CHAR_COLORYELLOW, CHAR_COLORGREEN, + CHAR_COLORCYAN, CHAR_COLORRED, CHAR_COLORPURPLE, CHAR_COLORBLUE2,CHAR_COLORGRAY};//转生後的颜色 +#else + int namecolortbl[] = { CHAR_COLORWHITE, CHAR_COLORYELLOW, CHAR_COLORGREEN, + CHAR_COLORCYAN, CHAR_COLORRED, CHAR_COLORPURPLE, CHAR_COLORBLUE2};//转生後的颜色 +#endif +#else + int namecolortbl[] = { CHAR_COLORWHITE, CHAR_COLORYELLOW, CHAR_COLORGREEN, + CHAR_COLORCYAN, CHAR_COLORRED, CHAR_COLORPURPLE}; +#endif + int ridepet = BATTLE_getRidePet( charaindex ); + char petname[64] = ""; + char escapepetname[256]; + int petlevel = 0; + + if( !CHAR_getFlg(charaindex,CHAR_ISVISIBLE) )return FALSE; + namecolor = CHAR_getInt( charaindex, CHAR_TRANSMIGRATION); +#ifdef _TRANS_6 +#ifdef _TRANS_7 + if( namecolor > 7 ) namecolor = 7; +#else + if( namecolor > 6 ) namecolor = 6; +#endif +#else + if( namecolor > 5 ) namecolor = 5; +#endif + if( namecolor < 0 ) namecolor = 0; + + // shan add begin + if( CHAR_getWorkInt(charaindex, CHAR_WORKFMINDEXI) >= 0 + && CHAR_getWorkInt(charaindex, CHAR_WORKFMINDEXI) < FAMILY_MAXNUM + && CHAR_getInt( charaindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER + && CHAR_getWorkInt(charaindex, CHAR_WORKFMSETUPFLAG)!=1) +#ifdef _ITEM_SETLOVER + if(strlen( CHAR_getChar( charaindex, CHAR_LOVE)) > 0 && + strlen(CHAR_getChar(charaindex,CHAR_LOVERID))>0 && + strlen(CHAR_getChar(charaindex,CHAR_LOVERNAME))>0) + sprintf(tmp, "%s§♂%s♀",CHAR_getChar( charaindex, CHAR_FMNAME),CHAR_getChar( charaindex, CHAR_LOVERNAME)); + else + sprintf(tmp, "%s",CHAR_getChar( charaindex, CHAR_FMNAME)); +#else + sprintf(tmp, "%s",CHAR_getChar( charaindex, CHAR_FMNAME)); +#endif + else +#ifdef _ITEM_SETLOVER + if(strlen( CHAR_getChar( charaindex, CHAR_LOVE)) > 0 && + strlen(CHAR_getChar(charaindex,CHAR_LOVERID))>0 && + strlen(CHAR_getChar(charaindex,CHAR_LOVERNAME))>0) + sprintf(tmp, "♂%s♀",CHAR_getChar( charaindex, CHAR_LOVERNAME)); + else + strcpy(tmp, ""); +#else + strcpy(tmp, ""); +#endif + + // Robin 0730 + if( ridepet >= 0 ){ + if( ! strcmp( CHAR_getChar( ridepet, CHAR_USERPETNAME), "") ) + strcpy( petname, CHAR_getChar( ridepet, CHAR_NAME )); + else + strcpy( petname, CHAR_getChar( ridepet, CHAR_USERPETNAME )); + petlevel = CHAR_getInt( ridepet, CHAR_LV); + } +#ifdef _OBJSEND_C + #ifdef _CHAR_PROFESSION // WON ADD 人物职业 + #ifdef _ALLDOMAN // (不可开) Syu ADD 排行榜NPC + snprintf( buf, buflen, "%d|%d|%s|%d|%d|%d|%d|%d|%d|%s|%s|%d|%d|%d|%s|%s|%d|%d|%d|%d|%d", + #else + snprintf( buf, buflen, "%d|%d|%s|%d|%d|%d|%d|%d|%d|%s|%s|%d|%d|%d|%s|%s|%d|%d|%d|%d", + #endif + #else + snprintf( buf, buflen, "%d|%d|%s|%d|%d|%d|%d|%d|%d|%s|%s|%d|%d|%d|%s|%s|%d", + #endif + OBJTYPE_CHARA, +#else + #ifdef _GM_IDENTIFY + snprintf( buf, buflen, "%d|%s|%d|%d|%d|%d|%d|%d|%s|%s|%d|%d|%d|%s|%s|%d|%s", //多出了gm名称这个栏位 + #else + snprintf( buf, buflen, "%d|%s|%d|%d|%d|%d|%d|%d|%s|%s|%d|%d|%d|%s|%s|%d", + #endif +#endif + CHAR_getInt( charaindex, CHAR_WHICHTYPE), + cnv10to62( objindex,objindexbuf, sizeof(objindexbuf)), + OBJECT_getX(objindex), + OBJECT_getY(objindex), + CHAR_getInt( charaindex, CHAR_DIR), + CHAR_getInt( charaindex,CHAR_BASEIMAGENUMBER ), + CHAR_getInt( charaindex,CHAR_LV ), + namecolortbl[namecolor], + makeEscapeString( CHAR_getChar( charaindex,CHAR_NAME ), escapename, sizeof(escapename)), + makeEscapeString(CHAR_getChar(charaindex,CHAR_OWNTITLE), escapetitle,sizeof(escapetitle)), + CHAR_getFlg( charaindex,CHAR_ISOVERED ), + CHAR_getFlg( charaindex,CHAR_HAVEHEIGHT ), + CHAR_getInt( charaindex, CHAR_POPUPNAMECOLOR), + tmp, + makeEscapeString( petname, escapepetname, sizeof(escapepetname)), + petlevel +#ifdef _CHAR_PROFESSION // WON ADD 人物职业 + ,CHAR_getInt( charaindex, PROFESSION_CLASS) // 职业别 + ,CHAR_getInt( charaindex, PROFESSION_LEVEL) // 职业等级 +// ,CHAR_getInt( charaindex, PROFESSION_EXP) // 职业经验值 + ,CHAR_getInt( charaindex, PROFESSION_SKILL_POINT) // 技能点数 +#endif +#ifdef _ALLDOMAN // (不可开) Syu ADD 排行榜NPC + ,CHAR_getInt( charaindex, CHAR_HEROFLOOR ) // 英雄战场楼层 +#endif +#ifdef _GM_IDENTIFY + ,CHAR_getChar(charaindex, CHAR_GMIDENTIFY) //gm的名称 +#endif +#ifdef _PETSKILL_BECOMEPIG + // ,CHAR_getInt(charaindex, CHAR_BECOMEPIG) +#endif + ); + break; + } + case OBJTYPE_ITEM: + { + int itemindex = OBJECT_getIndex(objindex); + int nameint; + int leaklevel; + int color; + char bufbuf[256]; + char *temp; + leaklevel = ITEM_getInt( itemindex,ITEM_LEAKLEVEL ); + + nameint = ITEM_SECRETNAME; +// if( leaklevel >=1 ) { +// nameint = ITEM_SECRETNAME; +// }else { +// nameint = ITEM_NAME; +// } + color = CHAR_COLORWHITE; + if (ITEM_getChar( itemindex, ITEM_CDKEY) == NULL){ + return FALSE; + break; + } + temp=ITEM_getChar( itemindex, ITEM_CDKEY); + if( temp && strlen( temp ) ) { + color = CHAR_COLORGREEN; + }else { + if( ITEM_getInt( itemindex, ITEM_MERGEFLG) ) { + color = CHAR_COLORYELLOW; + } + } +#ifdef _OBJSEND_C + snprintf( buf, buflen, "%d|%s|%d|%d|%d|%d|%s", + OBJTYPE_ITEM, +#else + snprintf( buf, buflen, "%s|%d|%d|%d|%d|%s", +#endif + cnv10to62( objindex,objindexbuf, sizeof(objindexbuf)), + OBJECT_getX(objindex), OBJECT_getY(objindex), + ITEM_getInt( itemindex,ITEM_BASEIMAGENUMBER ), + color, + makeEscapeString( ITEM_getChar( itemindex,nameint), bufbuf, sizeof(bufbuf)) + ); + break; + } + case OBJTYPE_GOLD: +#ifdef _OBJSEND_C + snprintf( buf, buflen, "%d|%s|%d|%d|%d", + OBJTYPE_GOLD, +#else + snprintf( buf, buflen, "%s|%d|%d|%d", +#endif + cnv10to62( objindex,objindexbuf, sizeof(objindexbuf)), + OBJECT_getX(objindex),OBJECT_getY(objindex), + OBJECT_getIndex(objindex) ); + break; +#ifdef _OBJSEND_C +#ifdef _NPCSERVER_NEW + case OBJTYPE_NPCSCHARA: + { + char bufbuf[256]; + snprintf( buf, buflen, "%d|%s|%s|%d|%d|%d|%d", + OBJTYPE_NPCSCHARA, + cnv10to62( objindex,objindexbuf, sizeof(objindexbuf)), + makeEscapeString( OBJECT_getName( objindex), bufbuf, sizeof(bufbuf)), + OBJECT_getNpcdir( objindex), + OBJECT_getNpcImage( objindex), + OBJECT_getX(objindex), + OBJECT_getY(objindex)); + } + break; +#endif +#endif + default: + return FALSE; + break; + } + return TRUE; +} + +void CHAR_sendCSpecifiedObjindex( int fd, int index) +{ + char introduction[512]; + if( CHECKOBJECTUSE( index ) + && CHAR_makeObjectCString( index, introduction, + sizeof(introduction) ) ){ + lssproto_C_send( fd,introduction ); + }else{ + char mesg[32]; + cnv10to62( index, mesg, sizeof( mesg)); + lssproto_C_send( fd, mesg ); + } +} + +void CHAR_sendSpecifiedobjindexCToCharaindex(int charaindex,int objindex) +{ + int fd; + fd = getfdFromCharaIndex(charaindex); + if( fd == -1)return; + CHAR_sendCSpecifiedObjindex(fd,objindex); +} + +void CHAR_sendCToArroundCharacter( int objindex ) +{ + char introduction[512]; + int x,y,fl; + int i,j; + + if( CHAR_makeObjectCString( objindex,introduction, sizeof(introduction) ) == FALSE ) return; + + x = OBJECT_getX(objindex); + y = OBJECT_getY(objindex); + fl =OBJECT_getFloor(objindex); + + for( i = x - CHAR_DEFAULTSEESIZ/2 ; + i <= x +CHAR_DEFAULTSEESIZ/2 ; i ++ ){ + for( j = y - CHAR_DEFAULTSEESIZ/2; + j <= y + CHAR_DEFAULTSEESIZ/2; j ++ ){ + OBJECT object; + for( object = MAP_getTopObj( fl, i,j); + object; + object = NEXT_OBJECT(object) ){ + int objindexwk = GET_OBJINDEX( object); + if( OBJECT_getType(objindexwk) == OBJTYPE_CHARA ){ + int index = OBJECT_getIndex(objindexwk); + if( CHAR_getInt( index, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + int fd; + if( CHAR_getWorkInt( index, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE) continue; + fd = getfdFromCharaIndex( index); + if( fd == -1 )continue; + lssproto_C_send( fd,introduction ); + } + } + } + } + } +} + +void CHAR_sendCDArroundChar_Main( int fl, int x, int y, int objindex, BOOL mode ) +{ +#define CHAR_CDSEESIZ CHAR_DEFAULTSEESIZ+10 + + int i,j; + char cdmsg[64*2]; + cnv10to62( objindex,cdmsg, sizeof(cdmsg)); + for( i = x - CHAR_CDSEESIZ/2 ; i <= x +CHAR_CDSEESIZ/2 ; i ++ ){ + for( j = y - CHAR_CDSEESIZ/2; j <= y + CHAR_CDSEESIZ/2; j ++ ){ + OBJECT object; + for( object = MAP_getTopObj( fl, i,j); object; + object = NEXT_OBJECT(object) ){ + + int objindexwk = GET_OBJINDEX( object); + if( OBJECT_getType(objindexwk) == OBJTYPE_CHARA ){ + int index = OBJECT_getIndex( objindexwk); + if( CHAR_getInt( index,CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER) { + if( objindexwk != objindex ) { + int fd; + fd = getfdFromCharaIndex(index); + if( fd == -1 )continue; + if( CHAR_getWorkInt( index, CHAR_WORKBATTLEMODE) + == BATTLE_CHARMODE_NONE ) + { + CONNECT_appendCDbuf( fd, cdmsg, strlen( cdmsg)); + CDflush( index); + } + } + } + } + } + } + } +} + +void CHAR_sendCDArroundChar( int fl, int x, int y, int objindex ) +{ + CHAR_sendCDArroundChar_Main( fl,x,y,objindex,FALSE); +} + +void CHAR_sendArroundCharaData( int charaindex ) +{ + int fd; + int i,j,x, y,fl; + char introduction[512*2]; + char c_msg[1024*96]; + int strpos = 0; + char cabuf[128*2]; + fd = getfdFromCharaIndex( charaindex ); + if( fd == -1 )return; + c_msg[0] = '\0'; + fl = CHAR_getInt( charaindex, CHAR_FLOOR); + x = CHAR_getInt( charaindex, CHAR_X); + y = CHAR_getInt( charaindex, CHAR_Y); + + for( i = x-CHAR_DEFAULTSEESIZ/2 ; i <= x+CHAR_DEFAULTSEESIZ/2 ; i++ ){ + for( j = y-CHAR_DEFAULTSEESIZ/2 ; j <= y+CHAR_DEFAULTSEESIZ/2 ; j ++ ) { + OBJECT object; + for( object = MAP_getTopObj(fl,i,j) ; object ; object = NEXT_OBJECT(object ) ){ + int introlen; + int objindex = GET_OBJINDEX(object); + int c_index = OBJECT_getIndex( objindex); + + if( OBJECT_getType(objindex) == OBJTYPE_NOUSE ) continue; + if( OBJECT_getType(objindex) == OBJTYPE_CHARA && + !CHAR_getFlg(OBJECT_getIndex(objindex), CHAR_ISVISIBLE) ){ + continue; + } + if( OBJECT_getType( objindex) == OBJTYPE_CHARA) { + if( CHAR_getInt( c_index, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + /* 苇尹凶平乓仿互醮棉汹五及褪卅日壬伉□母□ 憎CA毛霜月 */ + if( CHAR_getWorkInt( c_index, CHAR_WORKPARTYMODE )== CHAR_PARTY_LEADER ){ + if( CHAR_makeCAOPT1String( objindex, cabuf, sizeof( cabuf), CHAR_ACTLEADER,1 )) { + CONNECT_appendCAbuf( fd,cabuf,strlen(cabuf)); + } + } + // Robin 0611 trade + /* 角色交易中 */ + if( CHAR_getWorkInt( c_index, CHAR_WORKTRADEMODE ) != CHAR_TRADE_FREE ) { + if( CHAR_makeCAOPT1String( objindex, cabuf, sizeof( cabuf), CHAR_ACTTRADE,1 )){ + CONNECT_appendCAbuf( fd,cabuf,strlen(cabuf)); + } + } + +#ifdef _ANGEL_SUMMON + if( CHAR_getWorkInt( c_index, CHAR_WORKANGELMODE ) == TRUE ) { + if( CHAR_makeCAOPT1String( objindex, cabuf, sizeof( cabuf), CHAR_ACTANGEL,1 )){ + CONNECT_appendCAbuf( fd,cabuf,strlen(cabuf)); + } + } +#endif + +#ifdef _MIND_ICON + //print("\nshan--->(batlmode)->%d", CHAR_getWorkInt( c_index, CHAR_WORKBATTLEMODE )); + if(CHAR_getWorkInt( c_index, CHAR_MIND_NUM) && + CHAR_getWorkInt( c_index, CHAR_WORKBATTLEMODE ) == BATTLE_CHARMODE_NONE){ + if( CHAR_makeCAOPT1String( objindex, cabuf, sizeof( cabuf), + CHAR_MIND, CHAR_getWorkInt( c_index, CHAR_MIND_NUM))){ + CONNECT_appendCAbuf( fd, cabuf, strlen(cabuf)); + //print("\nshan---->(1)cabuf-->%s", cabuf); + } + } +#endif + +#ifdef _STREET_VENDOR + if(CHAR_getWorkInt(c_index,CHAR_WORKSTREETVENDOR) == 1 && + CHAR_getWorkInt(c_index,CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE){ + if(CHAR_makeCAOPTString(objindex,cabuf,sizeof(cabuf), + CHAR_STREETVENDOR_OPEN,CHAR_getWorkChar(c_index,CHAR_STREETVENDOR_NAME))){ + CONNECT_appendCAbuf(fd,cabuf,strlen(cabuf)); + } + } +#endif + +#ifdef _ITEM_CRACKER + if(CHAR_getWorkInt( c_index, CHAR_WORKITEM_CRACKER)&& + CHAR_getWorkInt( c_index, CHAR_WORKBATTLEMODE ) == BATTLE_CHARMODE_NONE) + { + if( CHAR_makeCAOPT1String( objindex, cabuf, sizeof( cabuf), + CHAR_ITEM_CRACKER, CHAR_getWorkInt( c_index, CHAR_WORKITEM_CRACKER))) + { + CONNECT_appendCAbuf( fd, cabuf, strlen(cabuf)); + } + } +#endif + if( CHAR_getWorkInt( c_index, CHAR_WORKBATTLEMODE ) != BATTLE_CHARMODE_NONE ){ + if( CHAR_getWorkInt( c_index, CHAR_WORKBATTLEWATCH) == TRUE ) { + if( CHAR_makeCAOPT1String( objindex, cabuf, sizeof( cabuf), CHAR_ACTBATTLEWATCH, 1)) { + CONNECT_appendCAbuf( fd, cabuf, strlen( cabuf)); + } + }else { + int battleno = CHAR_getWorkInt( c_index, CHAR_WORKBATTLEINDEX); + int sideno = CHAR_getWorkInt( c_index, CHAR_WORKBATTLESIDE); + int helpno = FALSE; + if( BATTLE_CHECKINDEX( battleno ) == FALSE ){ + }else { + helpno = (BattleArray[ battleno].Side[ + CHAR_getWorkInt( c_index, CHAR_WORKBATTLESIDE)].flg & BSIDE_FLG_HELP_OK)?TRUE:FALSE; + } + if( CHAR_makeCAOPT3String( objindex, cabuf, sizeof( cabuf), CHAR_ACTBATTLE, + battleno,sideno,helpno)){ + CONNECT_appendCAbuf( fd,cabuf,strlen(cabuf)); + + } + } + } + if( CHAR_getWorkInt( c_index, CHAR_WORKACTION ) != -1 ) { + if( CHAR_makeCADefaultString( objindex, cabuf, sizeof( cabuf), + CHAR_getWorkInt( c_index, CHAR_WORKACTION))){ + CONNECT_appendCAbuf( fd,cabuf,strlen(cabuf)); + + } + } + }else if( CHAR_getInt( c_index, CHAR_WHICHTYPE ) == CHAR_TYPEPET ) { + if( CHAR_getWorkInt( c_index, CHAR_WORKACTION ) != -1 ){ + if( CHAR_makeCADefaultString( objindex, cabuf, sizeof( cabuf), + CHAR_getWorkInt( c_index, CHAR_WORKACTION))){ + CONNECT_appendCAbuf( fd,cabuf,strlen(cabuf)); + } + } + } +#ifdef _ADD_ACTION + else { //npc + + if( CHAR_CHECKINDEX( c_index) ) { + if( CHAR_getWorkInt( c_index, CHAR_WORKACTION ) > 0 ) { + if( CHAR_makeCADefaultString( objindex, cabuf, sizeof( cabuf), + CHAR_getWorkInt( c_index, CHAR_WORKACTION))) { + CONNECT_appendCAbuf( fd,cabuf,strlen(cabuf)); + + } + } + } + } +#endif + } + if( c_index == charaindex) continue; + if( CHAR_makeObjectCString( objindex, introduction, sizeof( introduction))){ + introlen = strlen( introduction); + introduction[introlen] = ','; + introduction[introlen+1] = '\0'; + + strcpysafe( &c_msg[strpos], sizeof( c_msg) - strpos, + introduction); + strpos += strlen( introduction); + } + } + } + } + dchop( c_msg, "," ); + if( strlen( c_msg) == 0 ) return; + lssproto_C_send( fd, c_msg); +} + +BOOL _CHAR_warpToSpecificPoint( char *file, int line, int charaindex, int floor, int x, int y) +{ + int objindex; + int per; + objindex = CHAR_getWorkInt(charaindex,CHAR_WORKOBJINDEX); + if( !MAP_IsValidCoordinate( floor, x, y )) { + print( "error: invalid Coordinate fl[%d] x[%d] y[%d] %s:%d from %s:%d\n", + floor, x, y, __FILE__, __LINE__, file, line); + return FALSE; + } + CHAR_sendCDArroundChar_Main( OBJECT_getFloor(objindex), + OBJECT_getX(objindex), + OBJECT_getY(objindex), + objindex, TRUE ); + + CHAR_setInt( charaindex,CHAR_FLOOR,floor); + CHAR_setInt( charaindex,CHAR_X,x); + CHAR_setInt( charaindex,CHAR_Y,y); + { + int of,ox,oy; + of = OBJECT_setFloor(objindex,floor); + ox = OBJECT_setX(objindex,x); + oy = OBJECT_setY(objindex,y); + if( !MAP_objmove( objindex,of,ox,oy,floor,x,y ) ){ + fprint( "ERROR MAP_OBJMOVE objindex=%d\n",objindex ); + } + } + per = ENCOUNT_getEncountPercentMin( charaindex, floor,x,y); + if( per != -1 ) { + CHAR_setWorkInt( charaindex, CHAR_WORKENCOUNTPROBABILITY_MIN, per); + } + per = ENCOUNT_getEncountPercentMax( charaindex, floor,x,y); + if( per != -1 ) { + CHAR_setWorkInt( charaindex, CHAR_WORKENCOUNTPROBABILITY_MAX, per); + } + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + CHAR_setWorkInt( charaindex, CHAR_ENCOUNT_FIX, 0); +#endif + + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER ) { + CAflush( charaindex ); + { + int i; + char* statuscat[]={"C","E",}; + for( i=0 ; i -1) && (CHAR_CHECKINDEX( petindex )) ) + + CHAR_warpToSpecificPoint( petindex, floor, x, y ); + } +#ifdef _STATUS_WATERWORD //水世界状态 + if( MAP_getMapFloorType( floor) == 1 ){ + CHAR_setWorkInt( charaindex, CHAR_WORKMAPFLOORTYPE, 1); + }else { + CHAR_setWorkInt( charaindex, CHAR_WORKMAPFLOORTYPE, 0); + } +#endif +#ifdef _MAP_TIME + // 如果进入的地图是这些编号的话,设定倒数 + if(floor >= 30017 && floor <= 30021){ + if(CHAR_getWorkInt(charaindex,CHAR_WORK_MAP_TIME) <= 0) CHAR_setWorkInt(charaindex,CHAR_WORK_MAP_TIME,60); + } + // 如果进入正常的地图 + else CHAR_setWorkInt(charaindex,CHAR_WORK_MAP_TIME,0); +#endif + +#ifdef _ANGEL_SUMMON + if( CHAR_getWorkInt( charaindex, CHAR_WORKANGELMODE ) == TRUE ) { + CHAR_sendAngelMark( objindex, 1); + } +#endif + + }else if( OBJECT_getType( objindex) == OBJTYPE_CHARA ){ + MAP_sendArroundChar( charaindex ); + } + + return TRUE; +} + +static void CHAR_walk_check( int charaindex ) +{ + if( strlen( CHAR_getWorkChar( charaindex ,CHAR_WORKWALKARRAY ) ) != 0 ){ + struct timeval old; + old.tv_sec = CHAR_getWorkInt(charaindex,CHAR_WORKWALKSTARTSEC); + old.tv_usec = CHAR_getWorkInt(charaindex,CHAR_WORKWALKSTARTMSEC); + if( time_diff_us(NowTime,old) >= CHAR_getInt(charaindex,CHAR_WALKINTERVAL)*1000.0 ) { + CHAR_walkcall( charaindex ); + }else { + } + } +} + +static BOOL CHAR_callLoop( int charaindex ) +{ + unsigned int timediff_us; + struct timeval old; + int loopinterval, iRet = FALSE; + loopinterval = CHAR_getInt(charaindex,CHAR_LOOPINTERVAL); + if( loopinterval <= 0 )return FALSE; + + //print("\n CHAR_callLoop:%d", charaindex); + + old.tv_sec = CHAR_getWorkInt(charaindex,CHAR_WORKLOOPSTARTSEC); + old.tv_usec = CHAR_getWorkInt(charaindex,CHAR_WORKLOOPSTARTMSEC); + timediff_us = time_diff_us( NowTime , old ); + + if( timediff_us >= loopinterval*1000.0 ){ + int (*loopfunc)(int)=NULL; + loopfunc =(int(*)(int))CHAR_getFunctionPointer( charaindex, CHAR_LOOPFUNC); + if( loopfunc ){ + loopfunc(charaindex); + iRet = TRUE; + } +#ifdef _USER_CHARLOOPS + loopfunc =(int(*)(int))CHAR_getFunctionPointer( charaindex, CHAR_LOOPFUNCTEMP1); + if( loopfunc ){ + loopfunc(charaindex); + iRet = TRUE; + } +#endif + if( iRet == FALSE ){ + CHAR_setInt( charaindex, CHAR_LOOPINTERVAL, 0); + } + + CHAR_setWorkInt(charaindex,CHAR_WORKLOOPSTARTSEC, NowTime.tv_sec); + CHAR_setWorkInt(charaindex,CHAR_WORKLOOPSTARTMSEC, NowTime.tv_usec); + } + return iRet; +} + + +int EnemyMoveNum = 10; +void CHAR_Loop( void ) +{ + int charnum=CHAR_getCharNum(); + int playernum = CHAR_getPlayerMaxNum(); + int petnum = CHAR_getPetMaxNum(); + static int charcnt = 0; + int i, movecnt=0; + + + if( charcnt == -1 ) { + charcnt = CHAR_getCharNum(); + } + + // 玩家用的loop + for( i=0 ; i< playernum ; i++ ){ + if( CHAR_getCharUse(i) == FALSE )continue; + CHAR_walk_check( i ); + CHAR_callLoop( i ); +#ifdef _TEACHER_SYSTEM + // 有获得导师声望 + if(CHAR_getWorkInt(i,CHAR_WORK_GET_TEACHER_FAME) > 0){ + int iAddTFame = CHAR_getInt(i,CHAR_TEACHER_FAME) + CHAR_getWorkInt(i,CHAR_WORK_GET_TEACHER_FAME); + int iAddFame = CHAR_getInt(i,CHAR_FAME) + CHAR_getWorkInt(i,CHAR_WORK_GET_TEACHER_FAME); + + // 加导师声望(导师声望最大值和个人声望最大值一样) + if(iAddTFame > MAX_PERSONALFAME) iAddTFame = MAX_PERSONALFAME; + else if(iAddTFame < 0) iAddTFame = 0; + CHAR_setInt(i,CHAR_TEACHER_FAME,iAddTFame); + // 加声望 + if(iAddFame > MAX_PERSONALFAME) iAddFame = MAX_PERSONALFAME; + else if(iAddFame < 0) iAddFame = 0; + CHAR_setInt(i,CHAR_FAME,iAddFame); + // 清为 0 + CHAR_setWorkInt(i,CHAR_WORK_GET_TEACHER_FAME,0); + // 若有家族,上传给ac保持二边资料同步 + if(CHAR_getInt(i,CHAR_FMLEADERFLAG) > 0 && CHAR_getInt(i,CHAR_FMLEADERFLAG) != FMMEMBER_APPLY){ + char tmpbuf1[16]; + + sprintf(tmpbuf1,"%d",iAddFame); + saacproto_ACFixFMData_send(acfd, + CHAR_getChar(i,CHAR_FMNAME), + CHAR_getInt(i,CHAR_FMINDEX), + CHAR_getWorkInt(i,CHAR_WORKFMINDEXI), + FM_FIX_FMFEED, + "0", // 只是为了同步资料,所以设为0,不动到家族的资料 + tmpbuf1, // 同步个人声望资料 + CHAR_getWorkInt(i,CHAR_WORKFMCHARINDEX), + CONNECT_getFdid(getfdFromCharaIndex(i)) + ); + } + } +#endif + } + + // 玩家以外的Object用的loop + for( i = 0, movecnt = 0 ; i < (petnum/2) ; i++, charcnt++ ){ + if( charcnt >= charnum )charcnt = playernum ; + if( CHAR_getCharUse(charcnt) == FALSE )continue; + if( CHAR_callLoop(charcnt) == TRUE ){ + if( ++movecnt >= EnemyMoveNum )break; + } + } + +} + +char* CHAR_appendNameAndTitle( int charaindex, char* src, char* buf, + int buflen ) +{ + if( buflen > 0 ){ + if( CHAR_CHECKINDEX(charaindex) == FALSE ) + snprintf( buf,buflen,"%s",src ); + else{ + int titleindex = CHAR_getInt(charaindex,CHAR_INDEXOFEQTITLE); + if( titleindex == -1 ) + snprintf( buf,buflen, "%s:%s", + CHAR_getChar(charaindex,CHAR_NAME), src ); + else + snprintf( buf,buflen, "%s(%s):%s", + CHAR_getChar(charaindex,CHAR_NAME), + TITLE_makeTitleStatusString(charaindex, + titleindex), src ); + } + } + return buf; +} + +void CHAR_getCoordinationDir( int dir , int x, int y ,int c, + int *xout , int *yout ) +{ + *xout = x + CHAR_getDX(dir) * c; + *yout = y + CHAR_getDY(dir) * c; +} + +BOOL CHAR_createCharacter( int type, int floor, int x, int y,int dir, + int* charaindex, int* objindex, BOOL seemap ) +{ + Char ch; + Object ob; + if( !CHAR_getDefaultChar( &ch,type ) )return FALSE; + + ch.data[CHAR_FLOOR] = floor; + ch.data[CHAR_X] = x; + ch.data[CHAR_Y] = y; + ch.data[CHAR_DIR] = dir; + + *charaindex = CHAR_initCharOneArray( &ch ); + if( *charaindex == -1 )return FALSE; + + ob.type = OBJTYPE_CHARA; + ob.index = *charaindex; + ob.floor = floor; + ob.x = x; + ob.y = y; + + if( seemap && MAP_walkAble( *charaindex, floor,x,y ) == FALSE ){ + CHAR_endCharOneArray( *charaindex ); + return FALSE; + } + + *objindex = initObjectOne( &ob ); + if( *objindex == -1 ){ + CHAR_endCharOneArray(*charaindex); + return FALSE; + } + CHAR_setWorkInt( *charaindex,CHAR_WORKOBJINDEX,*objindex); + + /* 生永玄伐□弁毛垫丹 */ + + CHAR_sendWatchEvent( *objindex,CHAR_ACTSTAND,NULL,0,TRUE); + + return TRUE; +} + +void CHAR_ObjectDelete( int objindex ) +{ + CHAR_sendCDArroundChar( OBJECT_getFloor(objindex), + OBJECT_getX(objindex), + OBJECT_getY(objindex), + objindex ); +#ifdef _MAP_WARPPOINT + if( OBJECT_getType( objindex) == OBJTYPE_WARPPOINT ){ + print("Delete OBJTYPE_WARPPOINT endObjectOne( %d) [%d,%d,%d] \n ", objindex, + OBJECT_getFloor(objindex), OBJECT_getX(objindex), + OBJECT_getY(objindex) ); + } +#endif + endObjectOne(objindex); +} + +/*------------------------------------------------------------ + * 平乓仿毛绰轮允月[左皮斥尼弁玄手绰轮允月[ + * 生永玄伐□弁及支曰酸仄毛卅仁允凶户及手及 + * 娄醒 + * charaindex int 平乓仿奶件犯永永弁旦 + * 忒曰袄 + * 卅仄 + ------------------------------------------------------------*/ +void CHAR_CharaDelete( int charaindex ) +{ + /* 左皮斥尼弁玄毛绰轮 */ + CHAR_ObjectDelete( CHAR_getWorkInt( charaindex,CHAR_WORKOBJINDEX ) ); + /* 平乓仿及绰轮 */ + CHAR_endCharOneArray( charaindex ); +} +/*------------------------------------------------------------ + * 皿伊奶乩□及 匀化中月矢永玄毛壅允 + ------------------------------------------------------------*/ +void CHAR_CharaDeleteHavePet( int charaindex) +{ + int i; + int pindex; + + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ) { + pindex = CHAR_getCharPet( charaindex, i); + if( CHAR_CHECKINDEX( pindex)) { + CHAR_endCharOneArray( pindex ); + } + } + for( i = 0; i < CHAR_MAXPOOLPETHAVE; i ++ ) { + pindex = CHAR_getCharPoolPet( charaindex, i); + if( CHAR_CHECKINDEX( pindex)) { + CHAR_endCharOneArray( pindex ); + } + } +} +/*------------------------------------------------------------ + * 减变升啼卅升毛 蜇允月[ + * mode int 0: 愤坌卞反CA霜日卅中 + * 1: 愤坌卞手CA霜月 + ------------------------------------------------------------*/ +int CHAR_sendAction( int charaindex, int action, int mode) +{ + /* 霜日木化 凶失弁扑亦件午CA毛域谯今六月 □皮伙 */ + static int table[] = { + CHAR_ACTATTACK,CHAR_ACTDAMAGE,CHAR_ACTDOWN,CHAR_ACTACTIONSTAND, + CHAR_ACTACTIONWALK,CHAR_ACTSIT,CHAR_ACTHAND,CHAR_ACTPLEASURE, + CHAR_ACTANGRY,CHAR_ACTSAD,CHAR_ACTGUARD, CHAR_ACTNOD, CHAR_ACTTHROW + }; + if( action < 0 || action >= arraysizeof( table)) return FALSE; + + /* 璃曰卞失弁扑亦件毛霜耨允月 */ + CHAR_sendWatchEvent( + CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX), + table[action], + NULL,0,mode); + + /* 失弁扑亦件及瓒 */ + CHAR_setWorkInt( charaindex, CHAR_WORKACTION, table[action]); + + return TRUE; +} +/*------------------------------------------------------------ + * 愤坌互爵 匹丐月午中丹仪毛霜耨允月[ + ------------------------------------------------------------*/ +void CHAR_sendBattleEffect( int charaindex, int onoff) +{ + int opt[3]; + + if( onoff == 1) { + opt[0] = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX); + opt[1] = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLESIDE); + opt[2] = (BattleArray[CHAR_getWorkInt( charaindex, + CHAR_WORKBATTLEINDEX)].Side[ + CHAR_getWorkInt( charaindex, + CHAR_WORKBATTLESIDE)].flg & BSIDE_FLG_HELP_OK) ? TRUE:FALSE; + } + else { + opt[0] = -1; + opt[1] = -1; + opt[2] = 0; + } + + CHAR_sendWatchEvent( CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX), + CHAR_ACTBATTLE,opt,arraysizeof(opt),TRUE); +} + +/*------------------------------------------------------------ + * 交易中传送讯息 add code Shan 2001/06/30 + ------------------------------------------------------------*/ +void CHAR_sendTradeEffect( int charaindex, int onoff) +{ + int opt[1]; + + if( onoff == 1) { + opt[0] = 1; + } + else { + opt[0] = -1; + } + CHAR_sendWatchEvent( CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX), + CHAR_ACTTRADE,opt,arraysizeof(opt),TRUE); +} + +#ifdef _ANGEL_SUMMON +void CHAR_sendAngelEffect( int charaindex, int onoff) +{ + int opt[1]; + + if( onoff == 1) { + opt[0] = 1; + } + else { + opt[0] = -1; + } + CHAR_sendWatchEvent( CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX), + CHAR_ACTANGEL,opt,arraysizeof(opt),TRUE); +} +#endif + +#ifdef _MIND_ICON +void CHAR_sendMindEffect( int charaindex, int onoff) +{ + int opt[1]; + + if(onoff>0){ + opt[0] = onoff; + } + else{ + opt[0] = 0; + } + CHAR_sendWatchEvent( CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX), + CHAR_MIND, opt, arraysizeof(opt), FALSE); +} +#endif +#ifdef _ITEM_CRACKER +void CHAR_sendCrackerEffect( int charaindex, int onoff) +{ + int opt[1]; + opt[0] = onoff; + CHAR_sendWatchEvent( CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX), + CHAR_ITEM_CRACKER, opt, arraysizeof(opt), FALSE); +} +#endif + +void CHAR_inputUserPetName( int index , int havepetindex, char* name ) +{ + int petindex; + //char category[3]; + char *mycdkey=NULL, *cdkey = NULL; + BOOL changenameflg = FALSE; + + if( !CHAR_CHECKINDEX( index ) ) return; + + petindex = CHAR_getCharPet( index, havepetindex); + if( !CHAR_CHECKINDEX( petindex)) return; + + if (CHAR_getInt(petindex, CHAR_PETFAMILY) == 1){ + CHAR_talkToCli(index, -1, "家族守护兽无法修改名字!", CHAR_COLORYELLOW); + return; + } + + mycdkey = CHAR_getChar( index, CHAR_CDKEY); + cdkey = CHAR_getChar( petindex, CHAR_CDKEY); + if( cdkey == NULL ) { + print( "can't get CDKEY\n"); + }else { + if( strlen( cdkey) == 0 || strcmp( cdkey, mycdkey) == 0 ) { + changenameflg = TRUE; + } + } + if( !changenameflg) { + CHAR_talkToCli( index, -1, "无法为宠物命名。", CHAR_COLORYELLOW ); + return; + } + + CHAR_setChar( petindex, CHAR_USERPETNAME ,name); + + if( strlen( name ) == 0 || + strcmp( CHAR_getChar( petindex, CHAR_NAME), name) == 0 ){ + CHAR_setChar( petindex, CHAR_CDKEY, ""); + }else { + CHAR_setChar( petindex, CHAR_CDKEY, mycdkey); + } + CHAR_send_K_StatusString( index, havepetindex, CHAR_K_STRING_USERPETNAME); +} + +static void CHAR_setLuck( int charaindex) +{ + LSTIME nowlstime; + LSTIME mylstime; + struct { + int prob; + int luck; + }lucktbl[] = { + { 60, 1 }, /* 40% */ + { 30, 2 }, /* 30% */ + { 10, 3 }, /* 20% */ + { 3, 4 }, /* 7% */ + { 0, 5 } /* 3% */ + }; + + if( !CHAR_CHECKINDEX( charaindex)) return; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE) != CHAR_TYPEPLAYER) return; + + RealTimeToLSTime( NowTime.tv_sec, &nowlstime); + RealTimeToLSTime( CHAR_getInt( charaindex, CHAR_LASTTIMESETLUCK), &mylstime); + + /* LS凛棉匹ㄠ 动晓烦匀化中木壬CHAR_LUCK毛凳蕙允月 */ + if( nowlstime.day != mylstime.day || nowlstime.year != mylstime.year ) { + int i,r; + r = RAND( 0, 99); + for( i = 0; i < arraysizeof( lucktbl); i ++ ) { + if( r >= lucktbl[i].prob ) { + CHAR_setInt( charaindex, CHAR_LUCK, lucktbl[i].luck); + CHAR_setInt( charaindex, CHAR_LASTTIMESETLUCK, NowTime.tv_sec); + return; + } + } + } +} +void CHAR_JoinBattle_WindowResult( int charaindex, int select, char *data) +{ + int ret = FALSE; + int fd = getfdFromCharaIndex( charaindex); + +#if 1 // 修正利用参战重复加入战斗 Robin + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE) { + CHAR_talkToCli( charaindex, -1, " 重复加入战斗! ", CHAR_COLORRED); + print("\n 改封包!!重复加入战斗!:%s ", CHAR_getChar( charaindex, CHAR_CDKEY) ); + //lssproto_EN_send( fd, FALSE, 0 ); + return; + } +#endif + if( select != WINDOW_BUTTONTYPE_CANCEL && + CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE) == CHAR_PARTY_NONE ){ + while( 1 ) { + int selected; + int bcharaindex; + if( fd == -1 ) break; + selected = atoi( data)-1; + + if( !CHAR_CHECKINDEX( CONNECT_getBattlecharaindex(fd,selected))) { + break; + } + if( CHAR_getWorkInt( CONNECT_getBattlecharaindex(fd,selected), + CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE){ + break; + } + if( BattleArray[ CHAR_getWorkInt( + CONNECT_getBattlecharaindex( fd,selected), + CHAR_WORKBATTLEINDEX)].type != BATTLE_TYPE_P_vs_E ){ + break; + } + bcharaindex = CONNECT_getBattlecharaindex( fd,selected); + if( !(BattleArray[CHAR_getWorkInt( bcharaindex, + CHAR_WORKBATTLEINDEX)].Side[ + CHAR_getWorkInt( bcharaindex, + CHAR_WORKBATTLESIDE)].flg + & BSIDE_FLG_HELP_OK)){ + break; + } + if(NPC_Util_CharDistance( charaindex, + CONNECT_getBattlecharaindex( + fd,selected) )> 1){ + break; + } + if( BATTLE_RescueEntry( charaindex, + CONNECT_getBattlecharaindex(fd,selected) )){ + CHAR_talkToCli( charaindex, -1, "无法参战。", + CHAR_COLORYELLOW); + }else { + ret = TRUE; + } + + break; + } + } + if( ret == FALSE ) { + if( fd != -1 ) { + lssproto_EN_send( fd, FALSE, 0 ); + } + } +} +void CHAR_JoinDuel_WindowResult( int charaindex, int select, char *data) +{ + int ret = FALSE; + int fd = getfdFromCharaIndex( charaindex); + /* 手丹域蘸民尼永弁允月 */ + if( select != WINDOW_BUTTONTYPE_CANCEL && + CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE) != CHAR_PARTY_CLIENT ) + { + /* 生旦玄互丹匀午云仄中及匹ㄠ蘸分仃伙□皿毛银丹 */ + while( 1 ) { + int selected; + int enemyindex; + + if( fd == -1 ) break; + selected = atoi( data)-1; + /* 躲卅index井 */ + if( !CHAR_CHECKINDEX( CONNECT_getDuelcharaindex(fd,selected)) ) { + break; + } + /* 爵 井升丹井 */ + if( CHAR_getWorkInt( CONNECT_getDuelcharaindex(fd,selected), + CHAR_WORKBATTLEMODE) + != BATTLE_CHARMODE_NONE) + { + break; + } + /* duel第井 */ + if( !CHAR_getFlg( CONNECT_getDuelcharaindex(fd,selected), + CHAR_ISDUEL)) + { + break; + } + /* ㄠ汹动 卞中月井(它奴件玉它匹 中宁歹六仄化月棉卞 仃月啃) */ + if(NPC_Util_CharDistance( charaindex, + CONNECT_getDuelcharaindex(fd,selected) ) + > 1) + { + break; + } + // 及蟆及平乓仿及奶件犯永弁旦 + enemyindex = CONNECT_getDuelcharaindex( fd,selected); + // 锹澎互褪卅日公及引引巨件市它件玄今六月互 + // 阂间卅日褪毛裟氏匹仁月 + if( CHAR_getWorkInt( enemyindex, CHAR_WORKPARTYMODE ) + == CHAR_PARTY_CLIENT ) + { + enemyindex = CHAR_getWorkInt( enemyindex, CHAR_WORKPARTYINDEX1 ); + // 卅兮井褪互中卅中 + if( enemyindex < 0 ) break; + } + /* 锹澎互皿伊奶乩□匹卅中仪手丐月 */ + if( CHAR_getWorkInt( enemyindex, CHAR_WHICHTYPE) != CHAR_TYPEPLAYER){ + break; + } + ret = BATTLE_CreateVsPlayer( charaindex, enemyindex ); + if( ret != 0 ){ + CHAR_talkToCli( charaindex, -1, + "遭遇失败!", CHAR_COLORYELLOW); + ret = FALSE; + } + else { + ret = TRUE; + } + break; + } + } + if( ret == FALSE ) { + /* 瑛绊霜耨 */ + if( fd != -1 ) { + lssproto_EN_send( fd, FALSE, 0 ); + } + } +} +void CHAR_SelectCard_WindowResult( int charaindex, int select, char *data) +{ + if( select != WINDOW_BUTTONTYPE_CANCEL ){ + while( 1 ) { + int selected; + int fd; + fd = getfdFromCharaIndex( charaindex); + if( fd == -1 ) break; + selected = atoi( data)-1; + if( !CHAR_CHECKINDEX( + CONNECT_getTradecardcharaindex(fd,selected))) { + break; + } + if( CHAR_getWorkInt( CONNECT_getTradecardcharaindex(fd,selected), + CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE){ + break; + } + if(!CHAR_getFlg( CONNECT_getTradecardcharaindex(fd,selected), + CHAR_ISTRADECARD)){ + break; + } + if( NPC_Util_CharDistance( charaindex, + CONNECT_getTradecardcharaindex + (fd,selected) ) > 1){ + break; + } + ADDRESSBOOK_addAddressBook( charaindex, + CONNECT_getTradecardcharaindex( + fd,selected)); + break; + } + } +} + +void CHAR_JoinParty_WindowResult( int charaindex , int select, char *data) +{ + int ret = FALSE; + int fd = getfdFromCharaIndex( charaindex); + /* 手丹域蘸民尼永弁允月 */ + if( select != WINDOW_BUTTONTYPE_CANCEL && + /* 愤坌互由□ 奴赚氏匹凶日蛲 */ + CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE) == CHAR_PARTY_NONE ) + { + /* 生旦玄互丹匀午云仄中及匹ㄠ蘸分仃伙□皿毛银丹 */ + while( 1 ) { + int parray; + int selected; + int toindex = -1; + if( fd == -1 ) break; + selected = atoi( data)-1; + + /* 躲卅index井 + * (褐邰“它奴件玉它匹 中宁歹六仄化月棉卞 + * 躲卅index卞卅月第 岭互丐月) + */ + if( !CHAR_CHECKINDEX( + CONNECT_getJoinpartycharaindex(fd,selected))) { + break; + } + /* 褪互中凶日娄匀舰曰请允 */ + if( CHAR_getWorkInt( CONNECT_getJoinpartycharaindex( + fd,selected), CHAR_WORKPARTYMODE) + == CHAR_PARTY_NONE ) + { + toindex = CONNECT_getJoinpartycharaindex( fd,selected ); + } + else { + toindex = CHAR_getPartyIndex( + CONNECT_getJoinpartycharaindex(fd,selected), 0); + if( !CHAR_CHECKINDEX( toindex) ) { + print( " %s:%d err\n", __FILE__, __LINE__); + break; + } + } + /* ㄠ汹动 卞中月井(它奴件玉它匹 中宁歹六仄化月棉卞 仃月啃) */ + if( NPC_Util_CharDistance( charaindex, toindex ) > 1) { + break; + } + /* 爵 反分户 */ + if( CHAR_getWorkInt( toindex, CHAR_WORKBATTLEMODE) + != BATTLE_CHARMODE_NONE) + { + break; + } + /* 醮棉袱第乒□玉井 */ + if( !CHAR_getFlg( toindex, CHAR_ISPARTY)) { + break; + } + + /* 锹澎由□ 奴及谛醒反 井" */ + parray = CHAR_getEmptyPartyArray( toindex) ; + if( parray == -1 ) break; + +#ifdef _DEATH_CONTEND + if(CHAR_getInt(toindex,CHAR_PKLISTTEAMNUM) == -1 && CHAR_getInt(charaindex,CHAR_PKLISTTEAMNUM) == -1){ + }else if(CHAR_getInt(charaindex,CHAR_PKLISTLEADER) > 0 || + CHAR_getInt(toindex, CHAR_PKLISTTEAMNUM) < 0 || + CHAR_getInt(charaindex, CHAR_PKLISTTEAMNUM) < 0 || + CHAR_getInt(toindex,CHAR_PKLISTTEAMNUM) != CHAR_getInt(charaindex,CHAR_PKLISTTEAMNUM) || + CHAR_getInt(toindex,CHAR_WHICHTYPE) != CHAR_TYPEPLAYER){ + CHAR_talkToCli( charaindex, -1, "队伍不同,无法加入团队。", CHAR_COLORYELLOW); + ret = FALSE; + break; + } +#endif + + /* 由□ 奴卞 日六月 */ + CHAR_JoinParty_Main( charaindex, toindex); + + ret = TRUE; + + break; + } + } + if( ret == FALSE ) { + CHAR_talkToCli( charaindex, -1, "无法加入团队。", + CHAR_COLORYELLOW); + } + /* 瑛绊霜耨 */ + if( fd != -1 ) { + lssproto_PR_send( fd, 1, ret); + } +} +void CHAR_JoinBattleWatch_WindowResult( int charaindex, int select, char *data) +{ + int ret = FALSE; + int fd = getfdFromCharaIndex( charaindex); + /* 手丹域蘸民尼永弁允月 */ + if( select != WINDOW_BUTTONTYPE_CANCEL ) { + /* 生旦玄互丹匀午云仄中及匹ㄠ蘸分仃伙□皿毛银丹 */ + while( 1 ) { + int selected; + if( fd == -1 ) break; + selected = atoi( data)-1; + + /* 躲卅index井 + * (褐邰“它奴件玉它匹 中宁歹六仄化月棉卞 + * 躲卅index卞卅月第 岭互丐月) + */ + if( !CHAR_CHECKINDEX( CONNECT_getBattlecharaindex(fd,selected))) { + break; + } + /* 爵 井升丹井 */ + if( CHAR_getWorkInt( CONNECT_getBattlecharaindex(fd,selected), + CHAR_WORKBATTLEMODE) + == BATTLE_CHARMODE_NONE) + { + break; + } + /* ㄠ汹动 卞中月井(它奴件玉它匹 中宁歹六仄化月棉卞 仃月啃) */ + if(NPC_Util_CharDistance( charaindex, + CONNECT_getBattlecharaindex( + fd,selected) ) + > 1) + { + break; + } + /* 巨件玄伉□今六月 */ + if( BATTLE_WatchEntry( charaindex, + CONNECT_getBattlecharaindex(fd,selected) + )) + { + CHAR_talkToCli( charaindex, -1, "无法观战。", + CHAR_COLORYELLOW); + } + else { + ret = TRUE; + } + + break; + } + } + if( ret == FALSE ) { + /* 瑛绊霜耨 */ + if( fd != -1 ) { + lssproto_EN_send( fd, FALSE, 0 ); + } + } +} + +#ifdef _FM_MODIFY +extern void NPC_FmDengonWindowTalked( int index, int talker, int seqno, int select, char *data); +#endif + +void CHAR_processWindow(int charaindex, int seqno, int select, + int objindex, char* data ) +{ + if( CHECKOBJECTUSE(objindex)) { + if( OBJECT_getType(objindex) == OBJTYPE_CHARA ) { + typedef void (*WINDF)(int,int,int, int,char*); + WINDF windowtalkedfunc=NULL; + windowtalkedfunc = (WINDF)CHAR_getFunctionPointer( + OBJECT_getIndex(objindex),CHAR_WINDOWTALKEDFUNC); + if( windowtalkedfunc ) { + windowtalkedfunc( OBJECT_getIndex(objindex), charaindex, + seqno, select, data); + } + } +#ifdef _NPCSERVER_NEW //CHAR_WINDOWTALKEDFUNC + else if( OBJECT_getType(objindex) == OBJTYPE_NPCSCHARA ) { + int npcindex = OBJECT_getNpcIndex( objindex); + if( npcfd != -1 ) + NPCS_NpcWinMess_send( objindex, npcindex, charaindex, data, seqno, select); + } +#endif + }else { + if( seqno == CHAR_WINDOWTYPE_SELECTBATTLE) { + CHAR_JoinBattle_WindowResult( charaindex, select, data); + }else if( seqno == CHAR_WINDOWTYPE_SELECTDUEL) { + CHAR_JoinDuel_WindowResult( charaindex, select, data); + }else if( seqno == CHAR_WINDOWTYPE_SELECTTRADECARD) { + CHAR_SelectCard_WindowResult( charaindex, select, data); + }else{ + if( seqno == CHAR_WINDOWTYPE_SELECTPARTY) { + CHAR_JoinParty_WindowResult( charaindex, select, data); + }else { + if( seqno == CHAR_WINDOWTYPE_SELECTBATTLEWATCH) { + CHAR_JoinBattleWatch_WindowResult( charaindex, select, data); + }else if( seqno >= CHAR_WINDOWTYPE_SELECTRENAMEITEM_PAGE1 && + seqno <= CHAR_WINDOWTYPE_SELECTRENAMEITEM_RENAME_ATTENTION ){ + ITEM_useRenameItem_WindowResult( charaindex, seqno, select, data); + } +#ifdef _PETSKILL_CANNEDFOOD + else if( seqno == ITEM_WINDOWTYPE_SELECTPETSKILL_SELECT ){ + ITEM_usePetSkillCanned_WindowResult( charaindex, seqno, select, data); + } +#endif + } + } +#ifdef _FM_MODIFY + if(seqno >= CHAR_WINDOWTYPE_FM_DENGON || seqno <= CHAR_WINDOWTYPE_FM_DPSELECT) + NPC_FmDengonWindowTalked(0,charaindex,seqno,select,data); +#endif + } +} + +void CHAR_PartyUpdate( int charaindex, int senddata ){ + int i, ownerindex, mode, pindex, pno; + mode = CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE ); + if( mode == CHAR_PARTY_NONE )return; + if( mode == CHAR_PARTY_LEADER ){ + ownerindex = charaindex; + }else{ + ownerindex = CHAR_getWorkInt( charaindex, CHAR_WORKPARTYINDEX1 ); + } + + for( pno = 0; pno < CHAR_PARTYMAX; pno ++ ){ + pindex = CHAR_getWorkInt( ownerindex, CHAR_WORKPARTYINDEX1+pno ); + if( pindex == charaindex )break; + } + if( pno == CHAR_PARTYMAX )return; + for( i = 0; i < CHAR_PARTYMAX; i ++ ){ + pindex = CHAR_getWorkInt( ownerindex, CHAR_WORKPARTYINDEX1+i ); + if( pindex == charaindex )continue; + if( pindex < 0 )continue; + CHAR_send_N_StatusString( pindex, pno, senddata ); + } +} + +static int CHAR_getObjectByPosition( int myobjindex, int fl, int x, int y, + int *objbuf, int objbuflen) +{ + int i,j; + int cnt = 0; + + for( i = x-CHAR_DEFAULTSEESIZ/2 ; i <= x+CHAR_DEFAULTSEESIZ/2 ; i++ ){ + for( j = y-CHAR_DEFAULTSEESIZ/2 ; j <= y+CHAR_DEFAULTSEESIZ/2 ; + j ++ ) + { + OBJECT object; + for( object = MAP_getTopObj(fl,i,j) ; + object ; + object = NEXT_OBJECT(object ) ) + { + int objindex = GET_OBJINDEX(object); + if( OBJECT_getType(objindex) == OBJTYPE_NOUSE ) continue; + if( OBJECT_getType( objindex) == OBJTYPE_CHARA && + !CHAR_getFlg( OBJECT_getIndex( objindex), CHAR_ISVISIBLE)) + { + continue; + } + /* 愤坌反中中方 */ + if( objindex == myobjindex) continue; + + objbuf[cnt] = objindex; + cnt ++; + if( cnt >= objbuflen) return cnt; + } + } + } + return cnt; +} +static void CHAR_setMyPosition_sendData( int charaindex,int prev_x, int prev_y, int x, int y) +{ + int CurrentObjCollection[CHAR_DEFAULTSEESIZ*CHAR_DEFAULTSEESIZ*10]; + int PrevObjCollection[CHAR_DEFAULTSEESIZ*CHAR_DEFAULTSEESIZ*10]; + int curcnt,prevcnt; + int objindex; + int fl; + char introduction[512]; + char c_msg[1024*96]; + char buf[64]; + int strpos; + int fd; + int i,j; + char cabuf[128]; + char myintroduction[512]; + char cd_msg[128]; + + fd = CHAR_getWorkInt( charaindex, CHAR_WORKFD); + if( fd == -1 )return; + + objindex = CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX); + fl = CHAR_getInt( charaindex, CHAR_FLOOR); + + curcnt = CHAR_getObjectByPosition( objindex, fl,x,y, CurrentObjCollection, sizeof(CurrentObjCollection)); + prevcnt = CHAR_getObjectByPosition( objindex, fl, prev_x, prev_y, PrevObjCollection, sizeof(PrevObjCollection)); + strpos = 0; + c_msg[0] = '\0'; + if( !CHAR_makeObjectCString( objindex, myintroduction,sizeof( myintroduction))){ + myintroduction[0] = '\0'; + } + + for( i = 0 ; i < curcnt; i ++ ) { + int findflg = FALSE; + for( j = 0; j < prevcnt; j ++ ) { + if( CurrentObjCollection[i] == PrevObjCollection[j] ) { + findflg = TRUE; + break; + } + } + if( !findflg ) { + int introlen; + int c_index = OBJECT_getIndex( CurrentObjCollection[i]); + if( CHAR_makeObjectCString( CurrentObjCollection[i], introduction, + sizeof( introduction))) + { + introlen = strlen( introduction); + introduction[introlen] = ','; + introduction[introlen+1] = '\0'; + + strcpysafe( &c_msg[strpos], sizeof( c_msg) - strpos, + introduction); + strpos += strlen( introduction); + if( strpos >= sizeof( c_msg)) break; + } + if( strlen( myintroduction) != 0 ) { + if( OBJECT_getType( CurrentObjCollection[i] ) == OBJTYPE_CHARA ) { + if( CHAR_getInt( c_index, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER) { + int tofd = getfdFromCharaIndex( c_index ); + CDsend( tofd); + lssproto_C_send( tofd, myintroduction); + } + } + } + if( OBJECT_getType( CurrentObjCollection[i]) == OBJTYPE_CHARA ) { + if( CHAR_getInt( c_index, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER && + CHAR_getWorkInt( c_index, CHAR_WORKPARTYMODE ) + == CHAR_PARTY_LEADER ){ + if( CHAR_makeCAOPT1String( CurrentObjCollection[i], cabuf, sizeof( cabuf), + CHAR_ACTLEADER,1 )){ + CONNECT_appendCAbuf( fd,cabuf,strlen(cabuf)); + } + } + + // Robin 0611 trade + /* 角色交易中 */ + if( CHAR_getInt( c_index, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER && + CHAR_getWorkInt( c_index, CHAR_WORKTRADEMODE ) != CHAR_TRADE_FREE ) { + if( CHAR_makeCAOPT1String( objindex, cabuf, sizeof( cabuf), CHAR_ACTTRADE,1 )) + { + CONNECT_appendCAbuf( fd,cabuf,strlen(cabuf)); + } + } + +#ifdef _ANGEL_SUMMON + if( CHAR_getInt( c_index, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER && + CHAR_getWorkInt( c_index, CHAR_WORKANGELMODE ) == TRUE ) { + if( CHAR_makeCAOPT1String( objindex, cabuf, sizeof( cabuf), CHAR_ACTANGEL,1 )) + { + CONNECT_appendCAbuf( fd,cabuf,strlen(cabuf)); + } + } +#endif + +#ifdef _MIND_ICON + if( CHAR_getInt( c_index, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER && + CHAR_getWorkInt( c_index, CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE && + CHAR_getWorkInt( c_index, CHAR_MIND_NUM)) + { + if( CHAR_makeCAOPT1String( objindex, cabuf, sizeof( cabuf), + CHAR_MIND, CHAR_getWorkInt( c_index, CHAR_MIND_NUM))) + { + CONNECT_appendCAbuf( fd, cabuf, strlen( cabuf)); + //print("\nshan---->(2)cabuf-->%s", cabuf); + } + } +#endif +#ifdef _STREET_VENDOR + if(CHAR_getWorkInt(c_index,CHAR_WORKSTREETVENDOR) == 1 && + CHAR_getWorkInt(c_index,CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE){ + if(CHAR_makeCAOPTString(objindex,cabuf,sizeof(cabuf), + CHAR_STREETVENDOR_OPEN,CHAR_getWorkChar(c_index,CHAR_STREETVENDOR_NAME))) + CONNECT_appendCAbuf(fd,cabuf,strlen(cabuf)); + } +#endif +#ifdef _ITEM_CRACKER + if( CHAR_getInt( c_index, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER && + CHAR_getWorkInt( c_index, CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE && + CHAR_getWorkInt( c_index, CHAR_WORKITEM_CRACKER)) + { + if( CHAR_makeCAOPT1String( objindex, cabuf, sizeof( cabuf), + CHAR_ITEM_CRACKER, CHAR_getWorkInt( c_index, CHAR_WORKITEM_CRACKER))) + { + CONNECT_appendCAbuf( fd, cabuf, strlen( cabuf)); + } + } +#endif + /* 愤坌互褪匹锹澎互爵 匹卅中卅日锹澎卞伉□母□ 憎CA毛霜月 */ + if( CHAR_getInt( c_index, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER && + CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE ) + == CHAR_PARTY_LEADER && + CHAR_getWorkInt( c_index, CHAR_WORKBATTLEMODE) + == BATTLE_CHARMODE_NONE) + { + int tofd = getfdFromCharaIndex( c_index ); + if( tofd != -1 ) { + if( CHAR_makeCAOPT1String( CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX), + cabuf, sizeof( cabuf), + CHAR_ACTLEADER,1 )) + { + CONNECT_appendCAbuf( tofd,cabuf,strlen(cabuf)); + } + } + } + /* 苇尹凶平乓仿互爵 卅日爵 失奶戊件 憎 毛霜月 */ + if( CHAR_getInt( c_index, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER && + CHAR_getWorkInt( c_index, CHAR_WORKBATTLEMODE ) + != BATTLE_CHARMODE_NONE ) + { + /* 棋爵CA */ + if( CHAR_getWorkInt( c_index, CHAR_WORKBATTLEWATCH) == TRUE ) { + if( CHAR_makeCAOPT1String( CurrentObjCollection[i], cabuf, + sizeof( cabuf), + CHAR_ACTBATTLEWATCH, + 1)) + { + CONNECT_appendCAbuf( fd, cabuf, strlen( cabuf)); + } + } + else { + int battleno = CHAR_getWorkInt( c_index, + CHAR_WORKBATTLEINDEX); + int sideno = CHAR_getWorkInt( c_index, + CHAR_WORKBATTLESIDE); + int helpno = (BattleArray[CHAR_getWorkInt( c_index, + CHAR_WORKBATTLEINDEX)].Side[ + CHAR_getWorkInt( c_index, + CHAR_WORKBATTLESIDE)].flg & BSIDE_FLG_HELP_OK) ? TRUE:FALSE; + /* HelpNo = 1 反移 */ + if( CHAR_makeCAOPT3String( CurrentObjCollection[i], cabuf, sizeof( cabuf), + CHAR_ACTBATTLE, + battleno,sideno,helpno + )) + { + CONNECT_appendCAbuf( fd,cabuf,strlen(cabuf)); + } + } + } + /* 苇尹凶平乓仿互窒井及失弁扑亦件毛仄化中木壬霜月[ */ + if( ( CHAR_getInt( c_index, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER || + CHAR_getInt( c_index, CHAR_WHICHTYPE ) == CHAR_TYPEPET ) && + CHAR_getWorkInt( c_index, CHAR_WORKACTION ) != -1 ) + { + if( CHAR_makeCADefaultString( CurrentObjCollection[i], cabuf, sizeof( cabuf), + CHAR_getWorkInt( c_index, CHAR_WORKACTION))) + { + CONNECT_appendCAbuf( fd,cabuf,strlen(cabuf)); + } + } + } + } + } + dchop( c_msg, "," ); + if( strlen( c_msg) != 0 ) { + lssproto_C_send( fd, c_msg); + } + + /* 愤坌及CD综岳 */ + cnv10to62( objindex,cd_msg, sizeof(cd_msg)); + + for( i = 0 ; i < prevcnt; i ++ ) { + int findflg = FALSE; + /* 蟆及匏 卞中月左皮斥尼弁玄匹]蜇箕及甄 卞中卅中 + * 左皮斥尼弁玄卅日壅允屯五左皮斥尼弁玄分 + */ + for( j = 0; j < curcnt; j ++ ) { + if( PrevObjCollection[i] == CurrentObjCollection[j] ) { + findflg = TRUE; + break; + } + } + if( !findflg ) { + cnv10to62( PrevObjCollection[i], buf, sizeof( buf)); + CONNECT_appendCDbuf( fd, buf, strlen( buf)); + + /* 锹澎卞手 霜月 */ + if( OBJECT_getType( PrevObjCollection[i]) == OBJTYPE_CHARA ) { + int tocharaindex = OBJECT_getIndex( PrevObjCollection[i]); + if( CHAR_getInt( tocharaindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER) { + int tofd = CHAR_getWorkInt( tocharaindex, CHAR_WORKFD); + if( tofd != -1 ) { + CONNECT_appendCDbuf( tofd, cd_msg, strlen( cd_msg)); + CDsend( tofd); + } + } + } + } + } + CDsend( fd); + + +} +BOOL CHAR_setMyPosition( int index, int x, int y, BOOL CAFlg) +{ + return CHAR_setMyPosition_main( index,x,y,-1,CAFlg); +} + +BOOL CHAR_setMyPosition_main( int index, int x, int y, int setdir, BOOL CAFlg) +{ + int objindex; + int prev_x,prev_y; + int fl; + + prev_x = CHAR_getInt( index, CHAR_X); + prev_y = CHAR_getInt( index, CHAR_Y); + if( prev_x == x && prev_y == y ) { + return FALSE; + } + + if( CHAR_getWorkInt( index, CHAR_WORKPARTYMODE) == CHAR_PARTY_CLIENT) { + return FALSE; + } + + if( CHAR_getFlg( index, CHAR_ISWARP)) return FALSE; + + objindex = CHAR_getWorkInt(index,CHAR_WORKOBJINDEX); + fl = CHAR_getInt( index, CHAR_FLOOR); + + if( !MAP_IsValidCoordinate( fl, x, y )) { + print( "error: invalid Coordinate fl[%d] x[%d] y[%d] %s:%d\n", + fl, x, y, __FILE__, __LINE__); + CONNECT_setCloseRequest( CHAR_getWorkInt( index, CHAR_WORKFD), 1); + return FALSE; + } + + if( ABS( x - prev_x) > CHAR_DEFAULTSEESIZ/2 || + ABS( y - prev_y) > CHAR_DEFAULTSEESIZ/2 ) + { + CHAR_sendCDArroundChar( fl,prev_x,prev_y,objindex ); + } + + if( ABS( x - prev_x) <= 1 && ABS( y - prev_y ) <= 1){ + POINT start,end; + int dir; + start.x = CHAR_getInt( index, CHAR_X); + start.y = CHAR_getInt( index, CHAR_Y); + end.x = x; + end.y = y; + dir = NPC_Util_getDirFromTwoPoint( &start, &end); + if( dir != -1 ) { + CHAR_walk( index, dir, 0); + } + } + else { + CHAR_setInt( index, CHAR_X,x); + CHAR_setInt( index, CHAR_Y,y); + if( setdir >= 0 && setdir < 8) CHAR_setInt( index, CHAR_DIR, setdir); + { + int of,ox,oy; + of = OBJECT_setFloor(objindex,fl); + ox = OBJECT_setX(objindex,x); + oy = OBJECT_setY(objindex,y); + + if( !MAP_objmove( objindex,of,ox,oy,fl,x,y ) ){ + fprint( "ERROR MAP_OBJMOVE objindex=%d\n",objindex ); + return FALSE; + } + } + if( ABS( x - prev_x) > CHAR_DEFAULTSEESIZ/2 || + ABS( y - prev_y) > CHAR_DEFAULTSEESIZ/2 ) + { + CHAR_sendWatchEvent(objindex,CHAR_ACTWARP,NULL,0,FALSE); + } + else if( CAFlg == TRUE ) { + CHAR_sendWatchEvent(objindex,CHAR_ACTWARP,NULL,0,FALSE); + } + } + + if( CHAR_getWorkInt( index, CHAR_WORKPARTYMODE) == CHAR_PARTY_LEADER ) { + if( ABS( x - prev_x) <= 1 && ABS( y - prev_y ) <= 1){ + int i; + int prevparty_x = prev_x; + int prevparty_y = prev_y; + for( i = 1; i < CHAR_PARTYMAX; i ++ ) { + int toindex = CHAR_getWorkInt( index, i + CHAR_WORKPARTYINDEX1); + if( CHAR_CHECKINDEX(toindex) ) { + int client_x = prevparty_x; + int client_y = prevparty_y; + int dir; + POINT start, end; + + prevparty_x = CHAR_getInt( toindex, CHAR_X); + prevparty_y = CHAR_getInt( toindex, CHAR_Y); + start.x = prevparty_x; + start.y = prevparty_y; + + end.x = client_x; + end.y = client_y; + + dir = NPC_Util_getDirFromTwoPoint( &start, &end); + if( dir != - 1 ) { + CHAR_walk( toindex, dir, 0); + } + } + } + } + + else if( ABS( x - prev_x) > CHAR_DEFAULTSEESIZ/2 || + ABS( y - prev_y) > CHAR_DEFAULTSEESIZ/2 ) + { + int i; + for( i = 1; i < CHAR_PARTYMAX; i ++ ) { + int toindex = CHAR_getWorkInt( index, i + CHAR_WORKPARTYINDEX1); + if( CHAR_CHECKINDEX(toindex) ) { + CHAR_warpToSpecificPoint( toindex,fl , x,y); + } + } + } + } + + if( ABS( x - prev_x) <= CHAR_DEFAULTSEESIZ/2 && + ABS( y - prev_y) <= CHAR_DEFAULTSEESIZ/2 ) + { + CHAR_setMyPosition_sendData( index, prev_x, prev_y, x, y); + } + + return TRUE; +} + + +static char CHAR_P_statusSendBuffer[STRINGBUFSIZ]; + + + +static char *CHAR_make_P_StatusString( int charaindex, unsigned int indextable ) +{ + int i,j; + int ret = 0; + int strlength; + char buf[64]; + struct { + unsigned int kind; + int intdataindex; + int gettype; + }chk[] = { + { CHAR_P_STRING_HP, CHAR_HP, 0 }, + { CHAR_P_STRING_MAXHP, CHAR_WORKMAXHP, 1 }, + { CHAR_P_STRING_MP, CHAR_MP, 0 }, + { CHAR_P_STRING_MAXMP, CHAR_WORKMAXMP, 1 }, + { CHAR_P_STRING_EXP, CHAR_EXP, 0 }, + { CHAR_P_STRING_LV, CHAR_LV, 0 }, + { CHAR_P_STRING_ATK, CHAR_WORKATTACKPOWER, 1 }, + { CHAR_P_STRING_DEF, CHAR_WORKDEFENCEPOWER, 1 }, + { CHAR_P_STRING_QUICK, CHAR_WORKQUICK, 1 }, + { CHAR_P_STRING_CHARM, CHAR_WORKFIXCHARM, 1 }, + { CHAR_P_STRING_LUCK, CHAR_WORKFIXLUCK, 1 }, + { CHAR_P_STRING_GOLD, CHAR_GOLD, 0 }, + { CHAR_P_STRING_TITLE, CHAR_INDEXOFEQTITLE, 0 }, + { CHAR_P_STRING_NAME, CHAR_NAME, 2 }, + { CHAR_P_STRING_OWNTITLE, CHAR_OWNTITLE, 2 }, + { CHAR_P_STRING_VITAL, CHAR_VITAL, 10 }, + { CHAR_P_STRING_STR, CHAR_STR, 10 }, + { CHAR_P_STRING_TOUGH, CHAR_TOUGH, 10 }, + { CHAR_P_STRING_DEX, CHAR_DEX, 10 }, + { CHAR_P_STRING_EARTH, CHAR_WORKFIXEARTHAT, 11 }, + { CHAR_P_STRING_WATER, CHAR_WORKFIXWATERAT, 11 }, + { CHAR_P_STRING_FIRE, CHAR_WORKFIXFIREAT, 11 }, + { CHAR_P_STRING_WIND, CHAR_WORKFIXWINDAT, 11 }, + { CHAR_P_STRING_DUELPOINT, CHAR_DUELPOINT, 0 }, + { CHAR_P_STRING_TRANSMIGRATION, CHAR_TRANSMIGRATION, 0}, + { CHAR_P_STRING_RIDEPET, CHAR_RIDEPET, 0}, + { CHAR_P_STRING_LEARNRIDE, CHAR_LEARNRIDE, 0}, + { CHAR_P_STRING_BASEBASEIMAGENUMBER, CHAR_BASEBASEIMAGENUMBER, 0}, + { CHAR_P_STRING_SKYWALKER, CHAR_WORKSKYWALKER, 1}, + { CHAR_P_STRING_DEBUGMODE, CHAR_WORKDEBUGMODE, 1}, +/* +#ifdef _CHAR_PROFESSION +#ifdef _SEND_PROF_DATA + { CHAR_P_STRING_PROFESSION, PROFESSION_CLASS, 20}, +#endif +#endif +*/ + }; + + snprintf( CHAR_P_statusSendBuffer, sizeof( CHAR_P_statusSendBuffer), + "P%s|", cnv10to62( indextable, buf,sizeof(buf))); + strlength = strlen( CHAR_P_statusSendBuffer ); + + for( i = 1; i < sizeof( int) * 8; i ++ ){ + if( indextable & (1 << i) ) { + char tmp[256]; + BOOL found = FALSE; + for( j = 0; j < arraysizeof( chk); j ++ ) { + if( chk[j].kind == 1 << i ) { + if( chk[j].gettype == 0 ) { + ret = CHAR_getInt( charaindex,chk[j].intdataindex); + snprintf( tmp, sizeof( tmp), "%d|", ret); + }else if( chk[j].gettype == 1 ) { + ret = CHAR_getWorkInt( charaindex,chk[j].intdataindex); + snprintf( tmp, sizeof( tmp), "%d|", ret); + }else if( chk[j].gettype == 10 ) { + ret = CHAR_getInt( charaindex, chk[j].intdataindex)/100; + snprintf( tmp, sizeof( tmp), "%d|", ret); + }else if( chk[j].gettype == 11 ) { + ret = CHAR_getWorkInt( charaindex, chk[j].intdataindex); + if( ret < 0) ret = 0; + snprintf( tmp, sizeof( tmp), "%d|", ret); + }else if( chk[j].gettype == 2 ) { + char escapebuffer[128]; + char *a = CHAR_getChar( charaindex, chk[j].intdataindex); + + snprintf( tmp,sizeof( tmp ), + "%s|", + makeEscapeString( a, escapebuffer, + sizeof(escapebuffer) + )); + } +/* +#ifdef _CHAR_PROFESSION +#ifdef _SEND_PROF_DATA + else if( chk[j].gettype == 20 ) { + int k; + char tempbuf[256]; + strcpy( tmp, ""); + for( k=0; k<11; k++){ + ret = CHAR_getInt( charaindex, chk[j].intdataindex + k ); + snprintf( tempbuf, sizeof( tempbuf), "%d|", ret); + strcat( tmp, tempbuf); + } + } +#endif +#endif +*/ + found = TRUE; + break; + } + } + if( !found) { + if( indextable & CHAR_P_STRING_NEXTEXP ) { + ret = CHAR_GetLevelExp( charaindex, CHAR_getInt( charaindex, CHAR_LV ) + 1 ); + snprintf( tmp, sizeof( tmp), "%d|", ret); + found = TRUE; + } + } + if( !found) { + print( "找不到指定的参数[%d]\n",indextable); + }else { + strcpysafe( &CHAR_P_statusSendBuffer[ strlength], + sizeof( CHAR_P_statusSendBuffer) - strlength, + tmp); + + strlength += strlen( tmp ); + if( strlength >= sizeof( CHAR_P_statusSendBuffer ) ) { + return CHAR_P_statusSendBuffer; + } + } + } + } + return CHAR_P_statusSendBuffer; +} + + + +BOOL CHAR_send_P_StatusString( int charaindex, unsigned int indextable ) +{ + char* string; + //if( indextable >= ( CHAR_P_STRING_BASEBASEIMAGENUMBER << 1)) { + if( indextable >= ( CHAR_P_STRING_SKYWALKER << 1)) { + //if( indextable >= ( CHAR_P_STRING_DEBUGMODE << 1)) { + print( "send_P invalid index[%d]\n", indextable); + return FALSE; + } + + if( CHAR_getInt(charaindex,CHAR_WHICHTYPE) != CHAR_TYPEPLAYER ){ + return FALSE; + } + + string = CHAR_make_P_StatusString( charaindex, indextable ); + + if( string != NULL ){ + int fd; + fd = getfdFromCharaIndex( charaindex ); + if( fd != -1 ){ + lssproto_S_send( fd, string ); + return TRUE; + } + } + return FALSE; +} +static char CHAR_N_statusSendBuffer[STRINGBUFSIZ]; +/*------------------------------------------------------------ + * 弁仿奶失件玄卞霜月 { 及 侬 毛综岳允月[ + * 娄醒 + * charaindex int 平乓仿奶件犯弁永旦 + * indextable int P 毛霜月由仿丢□正及螂宁 [ + *------------------------------------------------------------*/ +static char *CHAR_make_N_StatusString( int charaindex, int num, unsigned int indextable ) +{ + int i,j; + int nindex = -1; + int ret = 0; + int strlength; + char buf[64]; + struct { + unsigned int kind; + int intdataindex; + int gettype; + }chk[] = { + { CHAR_N_STRING_OBJINDEX, CHAR_WORKOBJINDEX, 1 }, + { CHAR_N_STRING_LV, CHAR_LV, 0 }, + { CHAR_N_STRING_MAXHP, CHAR_WORKMAXHP, 1 }, + { CHAR_N_STRING_HP, CHAR_HP, 0 }, + { CHAR_N_STRING_MP, CHAR_MP, 0 }, + { CHAR_N_STRING_NAME, CHAR_NAME, 2 }, + + + }; + /* 醮棉旦 □正旦犯□正 */ + /* 凝民尼永弁 */ + if( num < 0 || num >= CHAR_PARTYMAX ){ + print( "朋友模式失败 (%c)%d \n", num, num ); + return NULL; + } + /* 醮棉及奶件犯永弁旦毛潸 */ + nindex = CHAR_getPartyIndex( charaindex, num); + + if( nindex == -1 ){ + /* 鬼支仃升 snprintf 允月 */ + snprintf( CHAR_N_statusSendBuffer,sizeof(CHAR_N_statusSendBuffer), + "N%d|0|", num ); + return CHAR_N_statusSendBuffer; + } + + snprintf( CHAR_N_statusSendBuffer, sizeof( CHAR_N_statusSendBuffer), + "N%d|%s|", num,cnv10to62( indextable, buf,sizeof(buf))); + strlength = strlen( CHAR_N_statusSendBuffer ); + + /* indextable及 匹 匀化中月申永玄毛赐 卞譬屯月 */ + for( i = 1; i < sizeof( int) * 8; i ++ ){ + if( indextable & (1 << i) ) { + char tmp[256]; + BOOL found = FALSE; + /* 匀化中月申永玄午]chk卞甲永玄允月井譬屯月 */ + for( j = 0; j < arraysizeof( chk); j ++ ) { + if( chk[j].kind == 1 << i ) { + /* 域谯仄凶及匹袄毛潸 允月 */ + /* 醒袄烟及犯□正 */ + if( chk[j].gettype == 0 ) { + ret = CHAR_getInt( nindex,chk[j].intdataindex); + snprintf( tmp, sizeof( tmp), "%d|", ret); + } + else if( chk[j].gettype == 1 ) { + ret = CHAR_getWorkInt( nindex,chk[j].intdataindex); + snprintf( tmp, sizeof( tmp), "%d|", ret); + } + else if( chk[j].gettype == 10 ) { + ret = CHAR_getInt( nindex, chk[j].intdataindex)/100; + snprintf( tmp, sizeof( tmp), "%d|", ret); + } + else if( chk[j].gettype == 11 ) { + ret = CHAR_getWorkInt( nindex, chk[j].intdataindex); + if( ret < 0) ret = 0; + snprintf( tmp, sizeof( tmp), "%d|", ret); + } + /* 侬 烟及犯□正 */ + else if( chk[j].gettype == 2 ) { + char escapebuffer[128]; + char *a = CHAR_getChar( nindex, chk[j].intdataindex); + + snprintf( tmp,sizeof( tmp ), + "%s|", + makeEscapeString( a, escapebuffer, + sizeof(escapebuffer) + )); + } + found = TRUE; + break; + } + } + /* 职及正奶皿及犯□正井手仄木卅中 */ + if( !found) { + /* 仇仇井日反ㄠ勾ㄠ勾 */ + } + if( !found) { + print( "找不到指定的参数[%d]\n",indextable); + } + else { + strcpysafe( &CHAR_N_statusSendBuffer[ strlength], + sizeof( CHAR_N_statusSendBuffer) - strlength, + tmp); + + strlength += strlen( tmp ); + if( strlength >= sizeof( CHAR_N_statusSendBuffer ) ) { + return CHAR_N_statusSendBuffer; + } + } + } + } + return CHAR_N_statusSendBuffer; +} +/*------------------------------------------------------------ + * S P 旦 □正旦毛霜月[民尼永弁允月及匹}晓匹反民尼永弁仄卅仁化方中[ + * 娄醒 + * charaindex int 平乓仿奶件犯弁永旦 + * num int 醮棉 寞 + * indextable int P 毛霜月由仿丢□正及螂宁 [ + * 忒曰袄 + * 霜匀凶[TRUE(1) + * 霜木卅井匀凶[FALSE(0) + *------------------------------------------------------------*/ +BOOL CHAR_send_N_StatusString( int charaindex, int num, unsigned int indextable ) +{ + char* string; + + if( indextable >= (CHAR_N_STRING_NAME << 1)) { + print( "send_N invalid index[%d]\n", indextable); + return FALSE; + } + + if( CHAR_getInt(charaindex,CHAR_WHICHTYPE) != CHAR_TYPEPLAYER ){ + return FALSE; + } + string = CHAR_make_N_StatusString( charaindex, num, indextable ); + if( string != NULL ){ + int fd; + fd = getfdFromCharaIndex( charaindex ); + if( fd != -1 ){ + lssproto_S_send( fd, string ); + return TRUE; + } + } + return FALSE; +} + +static char CHAR_K_statusSendBuffer[STRINGBUFSIZ]; +static char *CHAR_make_K_StatusString( int charaindex, int num, unsigned int indextable ) +{ + int i,j; + int ret = 0; + int strlength; + int pindex; + char buf[64]; + struct { + unsigned int kind; + int intdataindex; + int gettype; + }chk[] = { + { CHAR_K_STRING_BASEIMAGENUMBER, CHAR_BASEIMAGENUMBER, 0 }, + { CHAR_K_STRING_HP, CHAR_HP, 0 }, + { CHAR_K_STRING_MAXHP, CHAR_WORKMAXHP, 1 }, + { CHAR_K_STRING_MP, CHAR_MP, 0 }, + { CHAR_K_STRING_MAXHP, CHAR_WORKMAXMP, 1 }, + { CHAR_K_STRING_EXP, CHAR_EXP, 0 }, + { CHAR_K_STRING_LV, CHAR_LV, 0 }, + { CHAR_K_STRING_ATK, CHAR_WORKATTACKPOWER, 1 }, + { CHAR_K_STRING_DEF, CHAR_WORKDEFENCEPOWER, 1 }, + { CHAR_K_STRING_QUICK, CHAR_WORKQUICK, 1 }, + { CHAR_K_STRING_AI, CHAR_WORKFIXAI, 1 }, + { CHAR_K_STRING_EARTH, CHAR_WORKFIXEARTHAT, 11}, + { CHAR_K_STRING_WATER, CHAR_WORKFIXWATERAT, 11}, + { CHAR_K_STRING_FIRE, CHAR_WORKFIXFIREAT, 11}, + { CHAR_K_STRING_WIND, CHAR_WORKFIXWINDAT, 11}, + { CHAR_K_STRING_SLOT, CHAR_SLOT, 0 }, + { CHAR_K_STRING_NAME, CHAR_NAME, 2 }, + { CHAR_K_STRING_USERPETNAME, CHAR_USERPETNAME, 2 }, + + }; + /* 凝民尼永弁 */ + if( num < 0 || num >= CHAR_MAXPETHAVE ){ + print( "宠物模式失败 (%c)%d \n", num, num ); + return NULL; + } + /* 矢永玄及奶件犯永弁旦毛潸 */ + pindex = CHAR_getCharPet( charaindex, num ); + if( pindex == -1 ){ + /* 鬼支仃升 snprintf 允月 */ + snprintf(CHAR_K_statusSendBuffer,sizeof(CHAR_K_statusSendBuffer), + "K%d|0|", num ); + return CHAR_K_statusSendBuffer; + } + + snprintf( CHAR_K_statusSendBuffer, sizeof( CHAR_K_statusSendBuffer), + "K%d|%s|", num, cnv10to62( indextable, buf,sizeof(buf))); + strlength = strlen( CHAR_K_statusSendBuffer ); + + for( i = 1; i < sizeof( int) * 8; i ++ ){ + if( indextable & (1 << i) ) { + char tmp[256]; + BOOL found = FALSE; + for( j = 0; j < arraysizeof( chk); j ++ ) { + if( chk[j].kind == 1 << i ) { + if( chk[j].gettype == 0 ) { + ret = CHAR_getInt( pindex,chk[j].intdataindex); + snprintf( tmp, sizeof( tmp), "%d|", ret); + } + else if( chk[j].gettype == 1 ) { + ret = CHAR_getWorkInt( pindex,chk[j].intdataindex); + snprintf( tmp, sizeof( tmp), "%d|", ret); + } + else if( chk[j].gettype == 10 ) { + ret = CHAR_getInt( pindex, chk[j].intdataindex)/100; + snprintf( tmp, sizeof( tmp), "%d|", ret); + } + else if( chk[j].gettype == 11 ) { + ret = CHAR_getWorkInt( pindex, chk[j].intdataindex); + if( ret < 0) ret = 0; + snprintf( tmp, sizeof( tmp), "%d|", ret); + } + /* 侬 烟及犯□正 */ + else if( chk[j].gettype == 2 ) { + char escapebuffer[128]; + char *a = CHAR_getChar( pindex, chk[j].intdataindex); + + snprintf( tmp,sizeof( tmp ), + "%s|", + makeEscapeString( a, escapebuffer, + sizeof(escapebuffer) + )); + } + found = TRUE; + break; + } + } + if( !found) { + if( indextable & CHAR_K_STRING_NEXTEXP ) { + ret = CHAR_GetLevelExp( pindex, CHAR_getInt( pindex, CHAR_LV ) + 1 ); + snprintf( tmp, sizeof( tmp), "%d|", ret); + found = TRUE; + } + if( indextable & CHAR_K_STRING_CHANGENAMEFLG ) { + BOOL changenameflg = FALSE; + char *mycdkey, *cdkey = NULL; + mycdkey = CHAR_getChar( charaindex, CHAR_CDKEY); + { + cdkey = CHAR_getChar( pindex, CHAR_CDKEY); + if( cdkey == NULL ) { + print( "can't get CDKEY\n"); + }else { + if( strlen( cdkey) == 0 || + strcmp( cdkey, mycdkey) == 0 ){ + changenameflg = TRUE; + } + } + } + snprintf( tmp, sizeof( tmp), "%d|", changenameflg); + found = TRUE; + } + } + if( !found) { + print( "找不到指定的参数[%d]\n",indextable); + }else { + strcpysafe( &CHAR_K_statusSendBuffer[ strlength], + sizeof( CHAR_K_statusSendBuffer) - strlength, + tmp); + + strlength += strlen( tmp ); + if( strlength >= sizeof( CHAR_K_statusSendBuffer ) ) { + return CHAR_K_statusSendBuffer; + } + } + } + } + return CHAR_K_statusSendBuffer; +} +/*------------------------------------------------------------ + * S K 旦 □正旦毛霜月[民尼永弁允月及匹}晓匹反民尼永弁仄卅仁化方中[ + * 娄醒 + * charaindex int 平乓仿奶件犯弁永旦 + * indextable int P 毛霜月由仿丢□正及螂宁 [ + * 忒曰袄 + * 霜匀凶[TRUE(1) + * 霜木卅井匀凶[FALSE(0) + *------------------------------------------------------------*/ +BOOL CHAR_send_K_StatusString( int charaindex, int num, unsigned int indextable ) +{ + char* string; + + if( indextable >= (CHAR_K_STRING_USERPETNAME << 1)) { + print( "send_K invalid index[%d]\n", indextable); + return FALSE; + } + + if( CHAR_getInt(charaindex,CHAR_WHICHTYPE) != CHAR_TYPEPLAYER ){ + return FALSE; + } + string = CHAR_make_K_StatusString( charaindex, num, indextable ); + if( string != NULL ){ + int fd; + fd = getfdFromCharaIndex( charaindex ); + if( fd != -1 ){ + lssproto_S_send( fd, string ); + return TRUE; + } + } + return FALSE; +} + + + +//------------------------------------------------------------ +// 皿伊奶乩□及 毛笛遥 +//------------------------------------------------------------ +void CHAR_AddCharm( int charaindex, int iValue ) +{ + int iWork; + iWork = CHAR_getInt( charaindex, CHAR_CHARM ) + iValue; + iWork = max( 0, iWork ); // 凝ㄟ + iWork = min( 100, iWork ); // ㄠㄟㄟ + CHAR_setInt( charaindex, CHAR_CHARM, iWork ); +} + +//------------------------------------------------------------ +// 矢永玄及镝擦蘸 祭袄毛笛遥允月[ +//------------------------------------------------------------ +void CHAR_PetAddVariableAi( int petindex, int iValue ) +{ + int iWork; + iWork = CHAR_getInt( petindex, CHAR_VARIABLEAI ) + iValue; + iWork = min( CHAR_MAXVARIABLEAI, iWork ); + iWork = max( CHAR_MINVARIABLEAI, iWork ); + CHAR_setInt( petindex, CHAR_VARIABLEAI, iWork ); + +} + +//------------------------------------------------------------ +// 犯□正矛□旦卞瓒 允月平□ 蟆 毛综岳允月[ +//------------------------------------------------------------ +int CHAR_makeDBKey( int charaindex, char *pszBuffer, int size ){ + + char *cdkey; + char buff[512]; + char escapebuf[1024]; + + pszBuffer[0] = 0; // 赓渝祭 + cdkey = CHAR_getChar( charaindex, CHAR_CDKEY); + if( cdkey == NULL )return FALSE; // 瓒 匹五卅中 + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return FALSE; + + // 平□反 cdkey_ 蟆 + snprintf( buff, sizeof(buff), + "%s_%s", cdkey, CHAR_getChar( charaindex, CHAR_NAME ) ); + makeEscapeString( buff, escapebuf, sizeof(escapebuf)); + strcpysafe( pszBuffer, size, escapebuf); + + return TRUE; +} + + +//------------------------------------------------------------ +// +// 犯□正矛□旦及嫩 毛凳蕙 +// +// DuelPoint 及 DBUpdateEntry毛霜月 +//------------------------------------------------------------ +BOOL CHAR_send_DpDBUpdate( int charaindex ) +{ + int fd,dp; + char szKey[256]; + if( CHAR_makeDBKey( charaindex, szKey, sizeof( szKey ) ) == FALSE ){ + return FALSE; + } + dp = CHAR_getInt( charaindex, CHAR_DUELPOINT ); + fd = getfdFromCharaIndex( charaindex); + if( fd != -1 ) { + char info[512]; + //char escapebuff[1024]; + /* "等级|几战|几胜|几败|几连胜|最高连胜数" */ + snprintf( info, sizeof( info), + "%d,%d,%d,%d,%d,%d", + CHAR_getInt( charaindex, CHAR_LV), + CHAR_getInt( charaindex, CHAR_DUELBATTLECOUNT), + CHAR_getInt( charaindex, CHAR_DUELWINCOUNT), + CHAR_getInt( charaindex, CHAR_DUELLOSECOUNT), + CHAR_getInt( charaindex, CHAR_DUELSTWINCOUNT), + CHAR_getInt( charaindex, CHAR_DUELMAXSTWINCOUNT)); + saacproto_DBUpdateEntryInt_send( + acfd, DB_DUELPOINT, szKey, max(dp,0), info, + CONNECT_getFdid( fd ) ,0 ); + } + + return TRUE; +} + +char *CHAR_getUseName( int charaindex ) +{ + char *pName=NULL; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET ){ + pName = CHAR_getChar( charaindex, CHAR_USERPETNAME ); + if( pName[0] == 0 ){ + pName = CHAR_getChar( charaindex, CHAR_NAME ); + } + }else{ +// if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ) +// pName = CHAR_getChar( charaindex, CHAR_OWNTITLE ); +// if( pName == NULL || strlen(pName) <= 0 ) + pName = CHAR_getChar( charaindex, CHAR_NAME ); + } + return pName; +} + +// Robin extend_of_CHAR_getUseName() 2001/02/15 +char *CHAR_getUseID( int charaindex ) +{ + char *pName; + // 矢永玄分匀凶日白伉□生□丞卞允月 + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPET ){ + pName = "NO_USER"; + }else{ + pName = CHAR_getChar( charaindex, CHAR_CDKEY ); + } + return pName; +} + +BOOL CHAR_send_DpDBUpdate_AddressBook( int charaindex, int mode ) +{ + int fd; + char szKey[256]; + if( CHAR_makeDBKey( charaindex, szKey, sizeof( szKey ) ) == FALSE ){ + return FALSE; + } + + fd = getfdFromCharaIndex( charaindex); + if( fd != -1 ) { + char msgbuf[512]; + snprintf( msgbuf, sizeof( msgbuf), + "%d|%d|%d|%d|%d|", + (mode == 0 ) ? 0 : getServernumber(), + CHAR_getInt( charaindex, CHAR_LV), + CHAR_getInt( charaindex, CHAR_DUELPOINT), + CHAR_getInt( charaindex, CHAR_FACEIMAGENUMBER), + CHAR_getInt( charaindex, CHAR_TRANSMIGRATION) ); + + saacproto_DBUpdateEntryString_send( + acfd, DB_ADDRESSBOOK, szKey, msgbuf, CONNECT_getFdid( fd ),0 ); + + saacproto_Broadcast_send( acfd, CHAR_getChar( charaindex, CHAR_CDKEY), + CHAR_getChar( charaindex, CHAR_NAME), "param", 0); + + } + return TRUE; +} + +void CHAR_sendBattleWatch( int objindex, int onoff) +{ + int opt[1]; + opt[0] = onoff; + CHAR_sendWatchEvent( objindex,CHAR_ACTBATTLEWATCH,opt,1,TRUE); +} +/*------------------------------------------------------------ + * 隙烂今木凶 毛莫曰及谛卞矢永玄丢□伙及梢请毛允月[ + * 娄醒 + * charaindex int chara 匹及奶件犯弁永旦 + * 忒曰袄 + * 卅仄 + ------------------------------------------------------------*/ +void CHAR_sendPMEToArroundCharacterFLXY( int petindex, int fl, int x, int y, + int dir, int flg, int no ) +{ + int i,j; + int objindex; + int graphicsno; + char buff[2048]; + + objindex = CHAR_getWorkInt( petindex, CHAR_WORKOBJINDEX); + graphicsno = CHAR_getInt( petindex, CHAR_BASEIMAGENUMBER); + if( CHAR_makeObjectCString( objindex, buff, sizeof( buff)) == FALSE ) { + buff[0] = '\0'; + } + + for( i = x - CHAR_DEFAULTSEESIZ/2 ; + i <= x +CHAR_DEFAULTSEESIZ/2 ; i ++ ){ + for( j = y - CHAR_DEFAULTSEESIZ/2; + j <= y + CHAR_DEFAULTSEESIZ/2; j ++ ){ + + OBJECT object; + for( object = MAP_getTopObj( fl, i,j); + object; + object = NEXT_OBJECT(object) ){ + int objindexwk = GET_OBJINDEX( object); + if( OBJECT_getType(objindexwk) == OBJTYPE_CHARA ){ + int index = OBJECT_getIndex(objindexwk); + if( CHAR_getInt( index,CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + int fd; + if( CHAR_getWorkInt( index, CHAR_WORKBATTLEMODE) + != BATTLE_CHARMODE_NONE) continue; + fd = getfdFromCharaIndex( index); + if( fd == -1 )continue; + lssproto_PME_send( fd, objindex, graphicsno, + x,y, dir,flg,no,buff + ); + } + } + } + } + } +} +/*------------------------------------------------------------ + * charaindex 匹隙烂今木凶 毛莫曰及谛卞矢永玄丢□伙及梢请毛允月[ + * 娄醒 + * charaindex int chara 匹及奶件犯弁永旦 + * 忒曰袄 + * 卅仄 + ------------------------------------------------------------*/ +void CHAR_sendPMEToArroundCharacter( int charaindex, int petindex, int flg, int no ) +{ + int dirx[9],diry[9]; + int i; + int fl,x,y; + int dir; + for( i = 0 ; i < 7 ; i ++ ){ + dirx[i+2] = CHAR_getDX(CHAR_getInt(charaindex,CHAR_DIR) + i+1); + diry[i+2] = CHAR_getDY(CHAR_getInt(charaindex,CHAR_DIR) + i+1); + } + dirx[0] = CHAR_getDX(CHAR_getInt(charaindex,CHAR_DIR)); + diry[0] = CHAR_getDY(CHAR_getInt(charaindex,CHAR_DIR)); + dirx[1] = 0; + diry[1] = 0; + + fl = CHAR_getInt( charaindex,CHAR_FLOOR ); + dir = CHAR_getInt( charaindex, CHAR_DIR); + + /* 仁 轾潸 */ + for( i = 0 ; i < 9 ; i ++ ){ + int x = CHAR_getInt( charaindex, CHAR_X) + dirx[i]; + int y = CHAR_getInt( charaindex, CHAR_Y) + diry[i]; + /* 矢永玄毛 仃月桦赭井譬屯月 */ + if( PET_isPutPoint( fl, x, y ) == TRUE ) { + break; + } + } + /* 卅仃木壬箫葭 */ + if( i == 9 ) i = 1; + + x = CHAR_getInt(charaindex,CHAR_X)+dirx[i]; + y = CHAR_getInt(charaindex,CHAR_Y)+diry[i]; + + CHAR_sendPMEToArroundCharacterFLXY( petindex, + fl, x, y, dir, flg, no); +} +/*------------------------------------------------------------ + * SE毛 日允[ + * 耨葭毛 艘卞]苇尹月 区坌霜耨允月 + * 娄醒 + * fl,x,y 耨葭及甄 + * senumber 及 寞[sndcnf.h毛辅寰及仇午[ + * sw 日允井鞅户月井 0 : 鞅户月 1 : 日允 + ------------------------------------------------------------*/ +void CHAR_sendSEoArroundCharacter( int fl, int x, int y, int senumber, int sw ) +{ + int i,j; + + for( i = x - CHAR_DEFAULTSEESIZ/2 ; + i <= x +CHAR_DEFAULTSEESIZ/2 ; i ++ ){ + for( j = y - CHAR_DEFAULTSEESIZ/2; + j <= y + CHAR_DEFAULTSEESIZ/2; j ++ ){ + + OBJECT object; + for( object = MAP_getTopObj( fl, i,j); + object; + object = NEXT_OBJECT(object) ){ + int objindexwk = GET_OBJINDEX( object); + if( OBJECT_getType(objindexwk) == OBJTYPE_CHARA ){ + int index = OBJECT_getIndex(objindexwk); + if( CHAR_getInt( index,CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + int fd; + if( CHAR_getWorkInt( index, CHAR_WORKBATTLEMODE) + != BATTLE_CHARMODE_NONE) continue; + fd = getfdFromCharaIndex( index); + if( fd == -1 )continue; + lssproto_SE_send( fd,x, y, senumber, sw ); + } + } + } + } + } +} +/*====================梢请涩烂====================*/ + + +#ifndef _SEND_EFFECT // WON ADD AC送下雪、下雨等特效 + +#define CHAR_EFFECT_SETTINGBUFFER 256 +typedef struct tagCHAR_effectsetting +{ + int floor; // 白夫失 + int effect; // 梢请 寞 + int level; // 梢请及伊矛伙[ 蜇及雄今[ + int sendflg; // 憎巨白尼弁玄毛霜匀凶井升丹井[ + char month[CHAR_EFFECT_SETTINGBUFFER]; // 垫允月畸 + char day[CHAR_EFFECT_SETTINGBUFFER]; // 垫允月 + char hour[CHAR_EFFECT_SETTINGBUFFER]; // 垫允月凛棉 + char min[CHAR_EFFECT_SETTINGBUFFER]; // 垫允月坌 + char expire[CHAR_EFFECT_SETTINGBUFFER]; // 垫仄化中月赢今[( + +}CHAR_effectsetting; + +CHAR_effectsetting* CHAR_effect; +int CHAR_effectnum; + +#endif + + + +/*------------------------------------------------------------ + * 梢请涩烂及赓渝祭毛允月[ + * 娄醒 + * filename char* 涩烂白央奶伙 + * 忒曰袄 + * 岳 TRUE(1) + * 撩 FALSE(0) + *------------------------------------------------------------*/ +BOOL CHAR_initEffectSetting( char* filename ) +{ + FILE* f; + char line[256]; + int linenum=0; + + int effectreadlen=0; + + f = fopen(filename,"r"); + if( f == NULL ){ + errorprint; + return FALSE; + } + + CHAR_effectnum=0; + + /* 引内 躲卅垫互窒垫丐月井升丹井譬屯月 */ + while( fgets( line, sizeof( line ), f ) ){ + linenum ++; + if( line[0] == '#' )continue; /* comment */ + if( line[0] == '\n' )continue; /* none */ + chomp( line ); + + CHAR_effectnum++; + } + + if( fseek( f, 0, SEEK_SET ) == -1 ){ + fprint( "Seek Error\n" ); + fclose(f); + return FALSE; + } + + CHAR_effect = allocateMemory( sizeof(CHAR_effectsetting) + * CHAR_effectnum ); + if( CHAR_effect == NULL ){ + fprint( "Can't allocate Memory %d\n" , + sizeof(CHAR_effectsetting)*CHAR_effectnum); + fclose( f ); + return FALSE; + } + /* 赓渝祭 */ +{ + int i; + for( i = 0; i < CHAR_effectnum; i ++ ) { + CHAR_effect[i].floor = 0; + CHAR_effect[i].effect = 0; + CHAR_effect[i].level = 0; + CHAR_effect[i].sendflg = 0; + CHAR_effect[i].month[0] = '\0'; + CHAR_effect[i].day[0] = '\0'; + CHAR_effect[i].hour[0] = '\0'; + CHAR_effect[i].min[0] = '\0'; + CHAR_effect[i].expire[0] = '\0'; + + } +} + + /* 引凶 心 允 */ + linenum = 0; + while( fgets( line, sizeof( line ), f ) ){ + linenum ++; + if( line[0] == '#' )continue; /* comment */ + if( line[0] == '\n' )continue; /* none */ + chomp( line ); + + /* 垫毛帮溥允月 */ + /* 引内 tab 毛 " " 卞 五晶尹月 */ + replaceString( line, '\t' , ' ' ); + /* 粮仄凶 " " 毛夫午勾卞允月 */ + deleteSequentChar( line, " " ); + + /* 仇仇引匹帮溥仄化}燮 互 旦矢□旦分匀凶日 */ + /* 引卅中 */ + if( line[0] == ' ' )continue; + + { + char token[256]; + int ret; + + /* 夫午勾户及玄□弁件毛苇月 */ + ret = getStringFromIndexWithDelim( line," ",1,token, + sizeof(token)); + if( ret==FALSE ){ + fprint("文件秩序错误:%s 第%d行\n",filename,linenum); + continue; + } + CHAR_effect[effectreadlen].floor = atoi(token); + + /* 2勾户及玄□弁件毛苇月 */ + ret = getStringFromIndexWithDelim( line," ",2,token, + sizeof(token)); + if( ret==FALSE ){ + fprint("文件秩序错误:%s 第%d行\n",filename,linenum); + continue; + } + + CHAR_effect[effectreadlen].effect = atoi( token ); + + /* 3勾户及玄□弁件毛苇月 */ + ret = getStringFromIndexWithDelim( line," ",3,token, + sizeof(token)); + if( ret ==FALSE){ + fprint("文件秩序错误:%s 第%d行\n",filename,linenum); + continue; + } + + CHAR_effect[effectreadlen].level = atoi( token ); + + /* 4勾户及玄□弁件毛苇月 */ + ret = getStringFromIndexWithDelim( line," ",4,token, + sizeof(token)); + if( ret ==FALSE){ + fprint("文件秩序错误:%s 第%d行\n",filename,linenum); + continue; + } + strcpysafe( CHAR_effect[effectreadlen].month, + sizeof( CHAR_effect[effectreadlen].month), + token); + + /* 5勾户及玄□弁件毛苇月 */ + ret = getStringFromIndexWithDelim( line," ",5,token, + sizeof(token)); + if( ret ==FALSE){ + fprint("文件秩序错误:%s 第%d行\n",filename,linenum); + continue; + } + strcpysafe( CHAR_effect[effectreadlen].day, + sizeof( CHAR_effect[effectreadlen].day), + token); + + /* 6勾户及玄□弁件毛苇月 */ + ret = getStringFromIndexWithDelim( line," ",6,token, + sizeof(token)); + if( ret ==FALSE){ + fprint("文件秩序错误:%s 第%d行\n",filename,linenum); + continue; + } + strcpysafe( CHAR_effect[effectreadlen].hour, + sizeof( CHAR_effect[effectreadlen].hour), + token); + + /* 7勾户及玄□弁件毛苇月 */ + ret = getStringFromIndexWithDelim( line," ",7,token, + sizeof(token)); + if( ret ==FALSE){ + fprint("文件秩序错误:%s 第%d行\n",filename,linenum); + continue; + } + strcpysafe( CHAR_effect[effectreadlen].min, + sizeof( CHAR_effect[effectreadlen].min), + token); + + /* 8勾户及玄□弁件毛苇月 */ + ret = getStringFromIndexWithDelim( line," ",8,token, + sizeof(token)); + if( ret ==FALSE){ + fprint("文件秩序错误:%s 第%d行\n",filename,linenum); + continue; + } + strcpysafe( CHAR_effect[effectreadlen].expire, + sizeof( CHAR_effect[effectreadlen].expire), + token); + + effectreadlen ++; + } + } + fclose(f); + + CHAR_effectnum = effectreadlen; + + print( "有效设置总数 %d...", CHAR_effectnum ); +#ifdef DEBUG + + { + int i; + for( i=0; i tim && NowTime.tv_sec < tim+atoi(CHAR_effect[num].expire)) { + flg = TRUE; + break; + } + } + if( !flg ) break; + } + } + // 坌互隙烂 仄分匀凶日手丹OK + + returnflg = TRUE; + break; + } + return returnflg; +} +//------------------------------------------------------------------------- +// 平乓仿弁正□及匏 午凛棉毛葭卞] +// 巨白尼弁玄毛霜月 邰互丐木壬霜月 +//------------------------------------------------------------------------- +void CHAR_checkEffect( int charaindex) +{ + int i; + int fl = CHAR_getInt( charaindex, CHAR_FLOOR); + int fd = getfdFromCharaIndex( charaindex); + + // 巨白尼弁玄域绎壅允 + lssproto_EF_send( fd, 0, 0, ""); + CHAR_setWorkInt( charaindex, CHAR_WORKEFFECT, 0); + + for( i = 0; i < CHAR_effectnum; i ++){ + // 白夫失互域谯仄凶凛分仃 + if( CHAR_effect[i].floor == fl) { + // 椭瘀毛譬屯引允[ + if( CHAR_checkEffectTime( i)){ + // 巨白尼弁玄毛霜月 + lssproto_EF_send( fd, CHAR_effect[i].effect, CHAR_effect[i].level, ""); + if( CHAR_effect[i].level == 0 ) { + CHAR_setWorkInt( charaindex, CHAR_WORKEFFECT, + CHAR_getWorkInt( charaindex, CHAR_WORKEFFECT) & + ~CHAR_effect[i].effect); + } + else { + CHAR_setWorkInt( charaindex, CHAR_WORKEFFECT, + CHAR_getWorkInt( charaindex, CHAR_WORKEFFECT) | + CHAR_effect[i].effect); + } + } + } + } +} + +void CHAR_checkEffectLoop( void) +{ + int i,j; + int playernum = CHAR_getPlayerMaxNum(); + int player; + int efnum = 0; + + struct { + int floor; + int effect; + BOOL on; + BOOL off; + } ef[2048]; + + memset( &ef, 0, sizeof( ef)); + + for( i = 0; i < CHAR_effectnum; i ++){ + + if( CHAR_checkEffectTime( i)){ + if( !CHAR_effect[i].sendflg) { + + for( player = 0 ; player < playernum; player ++ ) { + if( CHAR_getInt( player, CHAR_FLOOR) == CHAR_effect[i].floor ) { + int fd = getfdFromCharaIndex( player); + lssproto_EF_send( fd, CHAR_effect[i].effect, CHAR_effect[i].level, ""); + if( CHAR_effect[i].level == 0 ) { + CHAR_setWorkInt( player, CHAR_WORKEFFECT, + CHAR_getWorkInt( player, CHAR_WORKEFFECT) & + ~CHAR_effect[i].effect); + } + else { + CHAR_setWorkInt( player, CHAR_WORKEFFECT, + CHAR_getWorkInt( player, CHAR_WORKEFFECT) | + CHAR_effect[i].effect); + } + } + } + CHAR_effect[i].sendflg = TRUE; + + } + + for( j = 0; j < efnum; j ++ ) { + if( ef[j].floor == CHAR_effect[i].floor && + ef[j].effect == CHAR_effect[i].effect) + { + ef[j].on = TRUE; + break; + } + } + if( j == efnum ) { + ef[j].floor = CHAR_effect[i].floor; + ef[j].effect = CHAR_effect[i].effect; + ef[j].on = TRUE; + efnum++; + if( efnum >= arraysizeof( ef)) { + print( "err buffer over %s:%d\n", __FILE__, __LINE__); + efnum --; + } + } + } + else { + if( CHAR_effect[i].sendflg) { + + for( j = 0; j < efnum; j ++ ) { + if( ef[j].floor == CHAR_effect[i].floor && + ef[j].effect == CHAR_effect[i].effect) + { + ef[j].off = TRUE; + break; + } + } + if( j == efnum ) { + ef[j].floor = CHAR_effect[i].floor; + ef[j].effect = CHAR_effect[i].effect; + ef[j].off = TRUE; + efnum++; + if( efnum >= arraysizeof( ef)) { + print( "err buffer over %s:%d\n", __FILE__, __LINE__); + efnum --; + } + } + CHAR_effect[i].sendflg = FALSE; + } + } + } + + for( i = 0; i < efnum; i ++ ) { + if( ef[i].on == FALSE && ef[i].off == TRUE ) { + + for( player = 0 ; player < playernum; player ++ ) { + if( CHAR_getInt( player, CHAR_FLOOR) == ef[i].floor ) { + int fd = getfdFromCharaIndex( player); + lssproto_EF_send( fd, 0, 0, ""); + CHAR_setWorkInt( player, CHAR_WORKEFFECT, 0); + } + } + } + } +} + +float GetRecoveryRate( int charaindex ){ + float fBai = 1.0; + + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + fBai = 1.0 + 0.00010 * CHAR_getInt( charaindex, CHAR_VITAL ); + }else{ + + fBai = 1.0 + 0.00005 * CHAR_getInt( charaindex, CHAR_VITAL ); + } + return fBai; + +} + + +#define CHARDATASIZE (1024*256) +#define SPACESTRING "|" + +static int makeSaveCharString( char *out , int outlen , + char *nm , char *opt , char *info ) +{ + char nmwork[256]; + char optwork[512]; + char infowork[CHARDATASIZE]; + char outwork[CHARDATASIZE]; + char *nmwork_p , *optwork_p , *infowork_p; + int l; + + strncpy( nmwork , nm , sizeof( nmwork )); + nmwork[strlen( nm)]=0; + + strncpy( optwork , opt , sizeof( optwork )); + optwork[strlen(opt)]=0; + + strncpy( infowork , info , sizeof( infowork )); + infowork[strlen(info)]=0; + + nmwork_p = makeEscapeString( nm , nmwork ,sizeof( nmwork )); + optwork_p = makeEscapeString( opt , optwork , sizeof( optwork )); + infowork_p = makeEscapeString( info , infowork , sizeof( infowork )); + + snprintf( outwork ,sizeof( outwork ) , + "%s" SPACESTRING "%s" SPACESTRING "%s" , + nmwork_p , optwork_p , infowork_p ); + + l = strlen( outwork ); + outwork[ strlen( outwork)+1] = 0; + if( l >= (outlen-1)){ + return -1; + } + + memcpy( out , outwork , l + 1 ); + + return 0; +} + +#ifdef _STORECHAR +int storeCharaData( void ){ + int i, charamax; + FILE *fp; + struct tm *pLtime; + char szFileName[256], *chardata; + char outbuff[CHARDATASIZE]; + Char* ch; + + print("\n保存运行中的数据\n"); + + pLtime = localtime( &NowTime.tv_sec ); + + charamax = getFdnum(); + + for( i = 0; i < charamax; i ++ ){ + int hash, dir, j; + char charId[32]; + char pathname[128]; + + if( CHAR_getCharUse( i ) == FALSE )continue; + + strcpy( charId, CHAR_getChar( i, CHAR_CDKEY ) ); + print(" 档案号:%s", charId); + + hash = 0; + for( j=0; jtm_year+1900, + pLtime->tm_mon+1, + pLtime->tm_mday, + pLtime->tm_hour, + pLtime->tm_min + ); + + fp = fopen( szFileName, "w" ); + if( fp == NULL )continue; + + ch = CHAR_getCharPointer( i ); + if( !ch )continue; + + chardata = CHAR_makeStringFromCharData( ch ); + + if( makeSaveCharString( outbuff , sizeof( outbuff ), + CHAR_getChar( i, CHAR_NAME ), + CHAR_makeOptionString( ch ), + chardata ) == 0 + ){ + + fprintf( fp, outbuff ); + }else{ + fprintf( fp, "本□皮撩 \n" ); + } + + fclose( fp ); + } + return 0; +} + +#endif + +#ifdef _LASTERR_FUNCTION +DebugBreakPoint LastFunction[10]; +static int lastfunctionNum = 0; +void LastFunction_Init() +{ + int i; + for( i=0; i<10; i++) { + memset( LastFunction[i].FILE, 0, sizeof( char)*256); + memset( LastFunction[i].funName, 0, sizeof( char)*256); + LastFunction[i].line = -1; + } +} +void LastFunction_Add( char *file, int line, char *funName) +{ + lastfunctionNum ++; + if( lastfunctionNum >= 10 ) + lastfunctionNum = 0; + + strcpy( LastFunction[ lastfunctionNum].FILE, file); + LastFunction[ lastfunctionNum].line = line; + strcpy( LastFunction[ lastfunctionNum].funName, funName); +} + +int LastFunction_Get( int lasts, char *file, int *line, char *funName) +{ + if( lasts < 0 || lasts >= 10 ) + return -1; + strcpy( file, LastFunction[ lasts].FILE); + *line = LastFunction[ lasts].line = line; + strcpy( funName, LastFunction[ lasts].funName); + return lastfunctionNum; +} +#endif + + + +#ifdef _FIX_METAMORIDE +BOOL CHAR_CHECKJOINENEMY( int index) +{ + int masterindex=-1; + if( CHAR_getWorkInt( index, CHAR_WORKPARTYMODE) == CHAR_PARTY_CLIENT ) { + masterindex = CHAR_getWorkInt( index, CHAR_WORKPARTYINDEX1); + if( !CHAR_CHECKINDEX( masterindex) ) { + print( "err masterindex:%d %s:%d !!\n", masterindex,__FILE__, __LINE__); + return FALSE; + } + if( CHAR_getInt( masterindex, CHAR_WHICHTYPE) == CHAR_TYPEBUS) { + return TRUE; //JOIN ENEMY + } + } + + return FALSE; +} +#endif + + // WON ADD 修正道具的设定问题 +void fix_item_bug(int charaindex, int itemindex) +{ + + if (ITEM_CHECKINDEX(itemindex)){ + switch( ITEM_getInt(itemindex,ITEM_ID) ){ + case 19700: ITEM_setChar( itemindex, ITEM_ARGUMENT, "KPET:901_902_903_904"); break; // 鞭炮 + case 20242: ITEM_setChar( itemindex, ITEM_ARGUMENT, "KPET:957_958_959_960"); break; // 雄黄酒 + case 1292: ITEM_setInt( itemindex, ITEM_MAXDAMAGECRUSHE, 0); ITEM_setInt( itemindex, ITEM_DAMAGECRUSHE, 0); break; // 灵力铠 + case 19646: ITEM_setInt( itemindex, ITEM_MAXDAMAGECRUSHE, 0); ITEM_setInt( itemindex, ITEM_DAMAGECRUSHE, 0); break; // 灵力铠 + case 1478: ITEM_setChar( itemindex, ITEM_ARGUMENT, "HP:30"); break; // 洛克服 + case 20282: ITEM_setChar( itemindex, ITEM_EFFECTSTRING, "攻+25 伤+25 敏-4 魅+5"); ITEM_setInt( itemindex, ITEM_MODIFYQUICK, -4 ); break; // 铁枪1 + case 20283: ITEM_setChar( itemindex, ITEM_EFFECTSTRING, "攻+50 伤+50 敏-10 魅+10"); ITEM_setInt( itemindex, ITEM_MODIFYQUICK, -10 ); break; // 铁枪2 + case 20284: ITEM_setChar( itemindex, ITEM_EFFECTSTRING, "攻+100 伤+100 敏-20 魅+15"); ITEM_setInt( itemindex, ITEM_MODIFYQUICK, -20 ); break; // 铁枪3 + case 1210: ITEM_setChar( itemindex, ITEM_EFFECTSTRING, "攻 +4 防 -4 敏 +4 魅 +2"); break; // 碧玉的石手环 + case 1203: ITEM_setChar( itemindex, ITEM_EFFECTSTRING, "攻 +2 防 +2 敏 -2 魅 +1"); break; // 皮的手环(红) + case 1204: ITEM_setChar( itemindex, ITEM_EFFECTSTRING, "攻 -2 防 +2 敏 +2 魅 +1"); break; // 皮的手环(绿) + case 1205: ITEM_setChar( itemindex, ITEM_EFFECTSTRING, "攻 +2 防 -2 敏 +2 魅 +1"); break; // 皮的手环(青) + case 1483: ITEM_setInt( itemindex, ITEM_MODIFYCHARM, 5); break; // 库沙达号角 + case 20147: ITEM_setChar(itemindex,ITEM_INGNAME0,"木"); ITEM_setChar(itemindex,ITEM_INGNAME1,"骨"); ITEM_setInt(itemindex,ITEM_INGVALUE0, 1125 ); ITEM_setInt(itemindex,ITEM_INGVALUE1, 1125 ); break; // 双头叉 + default: + break; + } + } +} + + +#ifdef _NPCSERVER_NEW +BOOL NPCSERVER_CreateObjindexFromServer( int fd, int npcindex, char *Name, int image, + int dir, int floor, int x, int y) +{ + int objindex; + Object obj; + + obj.type = OBJTYPE_NPCSCHARA; + obj.index= -1; + memset( obj.objname, 0, sizeof( obj.objname)); + memcpy( obj.objname, Name, strlen( Name)+1); + obj.npcsindex = npcindex; + obj.imagenum = image; + obj.dir = dir; + obj.x = x; + obj.y = y; + obj.floor = floor; + objindex = initObjectOne( &obj ); + if( objindex == -1 ){ + return FALSE; + } + + return TRUE; +} +#endif + +#ifdef _PET_LOSTPET +BOOL CHAR_CharSaveLostPet( int petindex, int type)//地上0 溜宠 1 宠邮 2 +{ + int lv, cost=0; + char* CdKey=NULL; + char* Uniquecode; + char* petname; + + char lostpetstring[1024*2]; + char *petstring; + + if( !CHAR_CHECKINDEX( petindex) ) return FALSE; +//存入 + petstring = CHAR_makePetStringFromPetIndex( petindex); + if( petstring == NULL ) return FALSE; + CdKey = CHAR_getChar( petindex, CHAR_OWNERCDKEY); + if( CdKey == NULL ) return FALSE; + Uniquecode = CHAR_getChar( petindex, CHAR_UNIQUECODE); + if( Uniquecode == NULL ) return FALSE; + lv = CHAR_getInt( petindex, CHAR_LV); + petname = CHAR_getChar( petindex, CHAR_NAME); + + if( type == 1 ){ + cost = lv*300; + }else if( type == 2){ + cost = lv*1000; + }else{ + cost = lv*10000; + } + + sprintf( lostpetstring, "%s|%s|%d|%d|%s|%d#%s#%d", + CdKey, petname, lv, cost, Uniquecode, (int)time( NULL), petstring, + type); + + print("保存最后宠物:%s-%d\n", lostpetstring, strlen(lostpetstring)); + { + char buf[10][2048]={"","","","","","","","","",""}; + char line[2048]; + int count=0, i, start=0; + FILE *fp=NULL; + char filename[256]; + +/* + sprintf( filename, "lostpet/%s.txt", CdKey); + if( (fp=fopen( filename, "a+")) != NULL ){ + fprintf( fp, "%s\n", petstring); + fclose( fp); + }else{ + print("Can't Add %s \n", filename); + } + +*/ + + + sprintf( filename, "lostpet/%s.txt", CdKey); + if( (fp=fopen( filename, "r")) != NULL ){ + while( fgets( line , sizeof( line ) , fp ) && count < 7){ + if( strlen(line) <= 0 ) continue; + strcpy( buf[ count++] , line); + } + fclose( fp); + }else{ + print("Can't Read %s \n", filename); + } + + if( (fp=fopen( filename, "w+")) == NULL ){ + print("Can't Write %s \n", filename); + return FALSE; + } + if( strlen( buf[ 6]) > 0 ){ + start=2; + } + for( i=start; i<7; i++){ + if( strlen( buf[i]) > 0 ) { + print("Write %s \n", buf[i]); + fprintf( fp, "%s", buf[i]); + } + } + fprintf( fp, "%s\n", lostpetstring); + + fclose( fp); + } + return TRUE; +} +/* +while( fgets( line , sizeof( line ) , fp ) && count < 7){ +*/ +#endif + +#ifdef _ALLDOMAN +void InitHeroList( void) +{ + saacproto_UpdataStele_send ( acfd , "FirstLoad", "LoadHerolist" , "华义" , 0 , 0 , 0 , 999 ) ; +} +#endif + +#ifdef _STREET_VENDOR +void CHAR_sendStreetVendor(int charaindex,char *message) +{ + char szAction[2],szTemp[21],szMessage[4]; + int count = 0,i,j,iItemIndex = 0,iPetIndex = 0,iPileNum = 0,iMaxPileNum = 0; + int ix,iy,iPlayerNum = 0,tofd = -1,objbuf[16]; + + if(!getStringFromIndexWithDelim(message,"|",1,szAction,sizeof(szAction))) return; + // 开启摆摊介面 + if(szAction[0] == 'O'){ + CHAR_getCoordinationDir(CHAR_getInt(charaindex,CHAR_DIR),CHAR_getInt(charaindex,CHAR_X), + CHAR_getInt(charaindex,CHAR_Y),1,&ix,&iy); + // 取得前方玩家数量 + iPlayerNum = CHAR_getSameCoordinateObjects(objbuf,arraysizeof(objbuf),CHAR_getInt(charaindex,CHAR_FLOOR),ix,iy); + // 没有人 + if(iPlayerNum == 0){ + // 检查自己站的座标有没有人也在摆摊 + iPlayerNum = CHAR_getSameCoordinateObjects(objbuf,arraysizeof(objbuf), + CHAR_getInt(charaindex,CHAR_FLOOR), + CHAR_getInt(charaindex,CHAR_X), + CHAR_getInt(charaindex,CHAR_Y)); + // 不只自己一个人 + if(iPlayerNum > 1){ + // 检查别人有没有摆摊 + for(i=0;i 0){ + if(CHAR_getWorkInt(charaindex,CHAR_WORKSTREETVENDOR) == 1){ + // 修改内容中设成未摆摊 + CHAR_setWorkInt(charaindex,CHAR_WORKSTREETVENDOR,-1); + CHAR_sendStreetVendorDataToCli(charaindex,charaindex); + } + // 已在交易中但要改内容,关闭对方视窗 + else if(CHAR_getWorkInt(charaindex,CHAR_WORKSTREETVENDOR) == 2){ + int toindex = CHAR_getWorkInt(charaindex,CHAR_WORKSTREETVENDOR_WHO); + + if(toindex != -1 && CHAR_CHECKINDEX(toindex)){ + CHAR_setWorkInt(toindex,CHAR_WORKSTREETVENDOR,-1); + CHAR_setWorkInt(toindex,CHAR_WORKSTREETVENDOR_WHO,-1); + lssproto_STREET_VENDOR_send(getfdFromCharaIndex(toindex),"C|"); + CHAR_talkToCli(toindex,-1,"店家取消交易",CHAR_COLORYELLOW); + CHAR_setWorkInt(charaindex,CHAR_WORKSTREETVENDOR_WHO,-1); + // 清除交易图示 + CHAR_sendTradeEffect(charaindex,0); + CHAR_sendTradeEffect(toindex,0); + } + // 修改内容中,设成未摆摊 + CHAR_setWorkInt(charaindex,CHAR_WORKSTREETVENDOR,-1); + CHAR_sendStreetVendorDataToCli(charaindex,charaindex); + } + return; + } + // 检查对方是否卖完 + for(j=0;j 0){ + if(CHAR_getWorkInt(charaindex,CHAR_WORKSTREETVENDOR) == 1){ + // 修改内容中设成未摆摊 + CHAR_setWorkInt(charaindex,CHAR_WORKSTREETVENDOR,-1); + CHAR_sendStreetVendorDataToCli(charaindex,charaindex); + } + // 已在交易中但要改内容,关闭对方视窗 + else if(CHAR_getWorkInt(charaindex,CHAR_WORKSTREETVENDOR) == 2){ + int toindex = CHAR_getWorkInt(charaindex,CHAR_WORKSTREETVENDOR_WHO); + + if(toindex != -1 && CHAR_CHECKINDEX(toindex)){ + CHAR_setWorkInt(toindex,CHAR_WORKSTREETVENDOR,-1); + CHAR_setWorkInt(toindex,CHAR_WORKSTREETVENDOR_WHO,-1); + lssproto_STREET_VENDOR_send(getfdFromCharaIndex(toindex),"C|"); + CHAR_talkToCli(toindex,-1,"店家取消交易",CHAR_COLORYELLOW); + CHAR_setWorkInt(charaindex,CHAR_WORKSTREETVENDOR_WHO,-1); + // 清除交易图示 + CHAR_sendTradeEffect(charaindex,0); + CHAR_sendTradeEffect(toindex,0); + } + // 修改内容中,设成未摆摊 + CHAR_setWorkInt(charaindex,CHAR_WORKSTREETVENDOR,-1); + CHAR_sendStreetVendorDataToCli(charaindex,charaindex); + } + } + // 设定成摆摊 + else{ + sprintf(szMessage,"O|"); + lssproto_STREET_VENDOR_send(getfdFromCharaIndex(charaindex),szMessage); + } + return; + } + } + } + } + // 摆摊 + else if(szAction[0] == 'S'){ + int price; + + // 清除所有旧资料 + for(i=0;i 10000000) price = 10000000; + CHAR_setStreetVendor(charaindex,i,SV_PRICE,price); + } + if(!getStringFromIndexWithDelim(message,"|",6+(i-1)*3,szTemp,sizeof(szTemp))) return; + + // 检查cli端送来的资料 + for(i=0;i CHAR_getMaxHaveGold(toindex)){ + // 身上不够放,存入个人银行 + if(CHAR_getInt(toindex,CHAR_BANKGOLD) + iPrice > CHAR_MAXBANKGOLDHAVE){ + CHAR_talkToCli(charaindex,-1,"店家放不下石币了,交易取消。",CHAR_COLORRED); + CHAR_talkToCli(toindex,-1,"你身上及个人银行存款已满",CHAR_COLORRED); + break; + } + CHAR_talkToCli(toindex,-1,"贩卖所得已存入个人银行",CHAR_COLORRED); + bPutToBank = TRUE; + } + // 若是道具 + if(iKind == 0){ + iItemIndex = CHAR_getItemIndex(toindex,iFieldIndex); + // 道具不存在 + if(!ITEM_CHECKINDEX(iItemIndex)){ + CHAR_clearStreetVendor(toindex,iBuyIndex); + printf("\nCHAR_sendStreetVendor(B):找不到道具!!!!!!!\n"); + continue; + } + // 丢在地上会消失的道具不可贩卖 + if(ITEM_getInt(iItemIndex,ITEM_VANISHATDROP) == 1){ + CHAR_clearStreetVendor(toindex,iBuyIndex); + CHAR_talkToCli(charaindex,-1,"丢在地上会消失的道具不可贩卖,该选项取消",CHAR_COLORYELLOW); + CHAR_talkToCli(toindex,-1,"侦测到有丢在地上会消失的道具在贩卖,帐号已记录!",CHAR_COLORRED); + LogStreetVendor( + CHAR_getUseName(toindex), + CHAR_getUseID(toindex), + "", + "", + ITEM_getChar(iItemIndex,ITEM_NAME), + -1, + iPrice, + "StreetVendor(卖方改封包)", + CHAR_getInt(toindex,CHAR_FLOOR), + CHAR_getInt(toindex,CHAR_X), + CHAR_getInt(toindex,CHAR_Y), + -1,-1,-1, + ITEM_getChar(iItemIndex,ITEM_UNIQUECODE) + ); + continue; + } + // 议价物品不能卖 + if(iPrice == 0){ + LogStreetVendor( + CHAR_getUseName(toindex), + CHAR_getUseID(toindex), + CHAR_getUseName(charaindex), + CHAR_getUseID(charaindex), + ITEM_getChar(iItemIndex,ITEM_NAME), + -1, + iPrice, + "StreetVendor(买方改封包)", + CHAR_getInt(toindex,CHAR_FLOOR), + CHAR_getInt(toindex,CHAR_X), + CHAR_getInt(toindex,CHAR_Y), + CHAR_getInt(charaindex,CHAR_FLOOR), + CHAR_getInt(charaindex,CHAR_X), + CHAR_getInt(charaindex,CHAR_Y), + ITEM_getChar(iItemIndex,ITEM_UNIQUECODE) + ); + continue; + } + // 检查物品堆叠 + iPileNum = ITEM_getInt(iItemIndex,ITEM_USEPILENUMS); + // 买方最大堆叠数 + iMaxPileNum = CHAR_getMyMaxPilenum(charaindex); + // 若物品的堆叠数比身上的最大堆叠数少,把卖方的物品清掉,把物品新增至买方 + if(iPileNum - iMaxPileNum <= 0){ + if(!ITEM_CHECKINDEX(iItemIndex)){ + CHAR_talkToCli(charaindex,-1,"交易失败(1)。",CHAR_COLORRED); + break; + } +#ifdef _ITEM_PILENUMS + // 道具数量为0 + if(ITEM_getInt(iItemIndex,ITEM_USEPILENUMS) <= 0){ + CHAR_talkToCli(charaindex,-1,"交易失败(2)。",CHAR_COLORRED); + break; + } +#endif + // 新增买方的 + if((iRet = CHAR_addItemSpecificItemIndex(charaindex,iItemIndex)) >= CHAR_MAXITEMHAVE){ + CHAR_talkToCli(charaindex,-1,"道具栏满了。",CHAR_COLORRED); + break; + } + CHAR_sendItemDataOne(charaindex,iRet); + // 清掉卖方的 + CHAR_setItemIndex(toindex,iFieldIndex,-1); + CHAR_sendItemDataOne(toindex,iFieldIndex); + CHAR_clearStreetVendor(toindex,iBuyIndex); + // 扣钱 + CHAR_setInt(charaindex,CHAR_GOLD,CHAR_getInt(charaindex,CHAR_GOLD) - iPrice); + CHAR_send_P_StatusString(charaindex,CHAR_P_STRING_GOLD); + // 加钱 + if(bPutToBank) CHAR_setInt(toindex,CHAR_BANKGOLD,CHAR_getInt(toindex,CHAR_BANKGOLD) + iPrice); + else CHAR_setInt(toindex,CHAR_GOLD,CHAR_getInt(toindex,CHAR_GOLD) + iPrice); + CHAR_send_P_StatusString(toindex,CHAR_P_STRING_GOLD); + sprintf(szMsg,"道具 %s 交易完成",ITEM_getChar(iItemIndex,ITEM_NAME)); + CHAR_talkToCli(charaindex,-1,szMsg,CHAR_COLORWHITE); + sprintf(szMsg,"%s 买走了道具 %s",CHAR_getUseName(charaindex),ITEM_getChar(iItemIndex,ITEM_NAME)); + CHAR_talkToCli(toindex,-1,szMsg,CHAR_COLORWHITE); + LogStreetVendor( + CHAR_getUseName(toindex), + CHAR_getUseID(toindex), + CHAR_getUseName(charaindex), + CHAR_getUseID(charaindex), + ITEM_getChar(iItemIndex,ITEM_NAME), + -1, + iPrice, + "StreetVendor(道具)", + CHAR_getInt(toindex,CHAR_FLOOR), + CHAR_getInt(toindex,CHAR_X), + CHAR_getInt(toindex,CHAR_Y), + CHAR_getInt(charaindex,CHAR_FLOOR), + CHAR_getInt(charaindex,CHAR_X), + CHAR_getInt(charaindex,CHAR_Y), + ITEM_getChar(iItemIndex,ITEM_UNIQUECODE) + ); + } + else CHAR_talkToCli(charaindex,-1,"身上堆叠数上限不足。",CHAR_COLORRED); + } + // 若是宠物 + else if(iKind == 1){ + int iEmptyPetField; + + iPetIndex = CHAR_getCharPet(toindex,iFieldIndex); + // 宠物不存在 + if(!CHAR_CHECKINDEX(iPetIndex)){ + CHAR_clearStreetVendor(toindex,iBuyIndex); + printf("\nCHAR_sendStreetVendor(B):找不到宠物!!!!!!!\n"); + continue; + } + if(CHAR_getInt(iPetIndex,CHAR_PETFAMILY) == 1){ + CHAR_talkToCli(charaindex,-1,"家族守护兽无法贩卖,该选项取消",CHAR_COLORYELLOW); + CHAR_clearStreetVendor(toindex,iBuyIndex); + LogStreetVendor( + CHAR_getUseName(toindex), + CHAR_getUseID(toindex), + "", + "", + CHAR_getChar(iPetIndex,CHAR_NAME), + -1, + iPrice, + "StreetVendor(卖方改封包)", + CHAR_getInt(toindex,CHAR_FLOOR), + CHAR_getInt(toindex,CHAR_X), + CHAR_getInt(toindex,CHAR_Y), + -1,-1,-1, + CHAR_getChar(iPetIndex,CHAR_UNIQUECODE) + ); + continue; + } + if(CHAR_getInt(toindex,CHAR_RIDEPET) == CHAR_getStreetVendor(toindex,iBuyIndex,SV_INDEX)){ + CHAR_talkToCli(charaindex,-1,"骑乘中的宠物无法贩卖,该选项取消",CHAR_COLORYELLOW); + CHAR_clearStreetVendor(toindex,iBuyIndex); + LogStreetVendor( + CHAR_getUseName(toindex), + CHAR_getUseID(toindex), + "", + "", + CHAR_getChar(iPetIndex,CHAR_NAME), + -1, + iPrice, + "StreetVendor(卖方改封包)", + CHAR_getInt(toindex,CHAR_FLOOR), + CHAR_getInt(toindex,CHAR_X), + CHAR_getInt(toindex,CHAR_Y), + -1,-1,-1, + CHAR_getChar(iPetIndex,CHAR_UNIQUECODE) + ); + continue; + } + + // 议价物品不能卖 + if(iPrice == 0){ + LogStreetVendor( + CHAR_getUseName(toindex), + CHAR_getUseID(toindex), + CHAR_getUseName(charaindex), + CHAR_getUseID(charaindex), + CHAR_getChar(iPetIndex,CHAR_NAME), + -1, + iPrice, + "StreetVendor(买方改封包)", + CHAR_getInt(toindex,CHAR_FLOOR), + CHAR_getInt(toindex,CHAR_X), + CHAR_getInt(toindex,CHAR_Y), + CHAR_getInt(charaindex,CHAR_FLOOR), + CHAR_getInt(charaindex,CHAR_X), + CHAR_getInt(charaindex,CHAR_Y), + CHAR_getChar(iPetIndex,CHAR_UNIQUECODE) + ); + continue; + } + // 检查玩家有无装备驯兽戒指,检查玩家有没有转生过 + if(CHAR_getWorkInt(charaindex,CHAR_PickAllPet) == FALSE && CHAR_getInt(charaindex,CHAR_TRANSMIGRATION) < 1){ + // 检查玩家等级有没有比宠物高 + if(CHAR_getInt(iPetIndex,CHAR_LV) > (CHAR_getInt(charaindex,CHAR_LV) + 5)){ + CHAR_talkToCli(charaindex,-1,"你无法照顾该宠物。",CHAR_COLORRED); + continue; + } + } + // 以下是宠物交换 + iEmptyPetField = CHAR_getCharPetElement(charaindex); + // 身上有空栏位 + if(iEmptyPetField > -1){ + // 清卖方 + CHAR_setCharPet(toindex,iFieldIndex,-1); + CHAR_clearStreetVendor(toindex,iBuyIndex); + sprintf(szMsg,"K%d",iFieldIndex); + CHAR_sendStatusString(toindex,szMsg); + // 设定买方 + CHAR_setCharPet(charaindex,iEmptyPetField,iPetIndex); + CHAR_setWorkInt(iPetIndex,CHAR_WORKPLAYERINDEX,charaindex); + CHAR_setChar(iPetIndex,CHAR_OWNERCDKEY,CHAR_getChar(charaindex,CHAR_CDKEY)); + CHAR_setChar(iPetIndex,CHAR_OWNERCHARANAME,CHAR_getChar(charaindex,CHAR_NAME)); + CHAR_complianceParameter(iPetIndex); + sprintf(szMsg,"K%d",iEmptyPetField); + CHAR_sendStatusString(charaindex,szMsg); + sprintf(szMsg,"W%d",iEmptyPetField); + CHAR_sendStatusString(charaindex,szMsg); + // 扣钱 + CHAR_setInt(charaindex,CHAR_GOLD,CHAR_getInt(charaindex,CHAR_GOLD) - iPrice); + CHAR_send_P_StatusString(charaindex,CHAR_P_STRING_GOLD); + // 加钱 + if(bPutToBank) CHAR_setInt(toindex,CHAR_BANKGOLD,CHAR_getInt(toindex,CHAR_BANKGOLD) + iPrice); + else CHAR_setInt(toindex,CHAR_GOLD,CHAR_getInt(toindex,CHAR_GOLD) + iPrice); + CHAR_send_P_StatusString(toindex,CHAR_P_STRING_GOLD); + sprintf(szMsg,"%s 买走了宠物 %s",CHAR_getUseName(charaindex),CHAR_getChar(iPetIndex,CHAR_NAME)); + CHAR_talkToCli(charaindex,-1,szMsg,CHAR_COLORWHITE); + sprintf(szMsg,"宠物 %s 交易完成!",CHAR_getChar(iPetIndex,CHAR_NAME)); + CHAR_talkToCli(toindex,-1,szMsg,CHAR_COLORWHITE); + LogStreetVendor( + CHAR_getUseName(toindex), + CHAR_getUseID(toindex), + CHAR_getUseName(charaindex), + CHAR_getUseID(charaindex), + CHAR_getChar(iPetIndex,CHAR_NAME), + CHAR_getInt(iPetIndex,CHAR_LV), + iPrice, + "StreetVendor(宠物)", + CHAR_getInt(toindex,CHAR_FLOOR), + CHAR_getInt(toindex,CHAR_X), + CHAR_getInt(toindex,CHAR_Y), + CHAR_getInt(charaindex,CHAR_FLOOR), + CHAR_getInt(charaindex,CHAR_X), + CHAR_getInt(charaindex,CHAR_Y), + CHAR_getChar(iPetIndex,CHAR_UNIQUECODE) + ); + } + // 玩家宠物栏位满了 + else CHAR_talkToCli(charaindex,-1,"身上宠物栏栏位不足!",CHAR_COLORRED); + } + // 错的内容 + else{ + CHAR_clearStreetVendor(toindex,iBuyIndex); + printf("\nCHAR_sendStreetVendor(B):错的内容!!!!!!!\n"); + } + } + // 卖方设定为摆摊,清除买方状态 + CHAR_setWorkInt(charaindex,CHAR_WORKSTREETVENDOR,-1); + CHAR_setWorkInt(toindex,CHAR_WORKSTREETVENDOR,1); + // 清除交易图示 + CHAR_sendTradeEffect(charaindex,0); + CHAR_sendTradeEffect(toindex,0); + CHAR_setWorkInt(toindex,CHAR_WORKSTREETVENDOR_WHO,-1); + CHAR_setWorkInt(charaindex,CHAR_WORKSTREETVENDOR_WHO,-1); + } + else printf("StreetVendor交易找不到对方(%s)\n",CHAR_getChar(charaindex,CHAR_NAME)); + } +} + +void CHAR_sendStreetVendorDataToCli(int charaindex,int toindex) +{ + int i,count = 0; + + // 送贩卖内容给玩家自己,要修改贩卖内容 + if(charaindex == toindex){ + char szMsg[512],szTemp[512],szTemp1[16]; + + memset(szTemp,0,sizeof(szTemp)); + for(i=0;i=48){ + for(j=0;j 0 && strlen(CHAR_getChar(charaindex,CHAR_TEACHER_NAME)) > 0) bHasTeacher = TRUE; + // 检查正前方有没有人 + CHAR_getCoordinationDir(CHAR_getInt(charaindex,CHAR_DIR),CHAR_getInt(charaindex,CHAR_X), + CHAR_getInt(charaindex,CHAR_Y),1,&ix,&iy); + // 取得前方玩家数量 + iPlayerNum = CHAR_getSameCoordinateObjects(objbuf,arraysizeof(objbuf),CHAR_getInt(charaindex,CHAR_FLOOR),ix,iy); + // 没有人 + if(iPlayerNum == 0){ + // 已有导师,显示导师资料 + if(bHasTeacher){ + // 向 ac 要资料 + saacproto_ACCheckCharacterOnLine_send(acfd,charaindex,CHAR_getChar(charaindex,CHAR_TEACHER_ID), + CHAR_getChar(charaindex,CHAR_TEACHER_NAME), + R_F_TEACHER_SYSTEM); + } + // 没有导师,显示说明 + else lssproto_TEACHER_SYSTEM_send(getfdFromCharaIndex(charaindex),"M|"); + } + // 有人 + else{ + // 已有导师 + if(bHasTeacher){ + // 请玩家先取消原本的导师再进行找新导师动作 + CHAR_talkToCli(charaindex,-1,"请先取消原本的导师再找其他人作为你的导师",CHAR_COLORRED); + } + else{ + int objindex,index; + char szFindName[256]; + + if(iPlayerNum == 1){ + // 询问是否要对方当你的导师 + objindex = objbuf[0]; + index = OBJECT_getIndex(objindex); + + if(OBJECT_getType(objindex) != OBJTYPE_CHARA) break; + if(CHAR_getInt(index,CHAR_WHICHTYPE) != CHAR_TYPEPLAYER) break; + if(index == charaindex) break; + // 检查对方是否为自己的学生 + if(strcmp(CHAR_getChar(index,CHAR_TEACHER_ID),CHAR_getChar(charaindex,CHAR_CDKEY)) == 0 && + strcmp(CHAR_getChar(index,CHAR_TEACHER_NAME),CHAR_getChar(charaindex,CHAR_NAME)) == 0){ + CHAR_talkToCli(charaindex,-1,"对方为你的学生,无法让对方成为你的导师",CHAR_COLORRED); + break; + } + sprintf(szMsg,"C|%s|%d",CHAR_getChar(index,CHAR_NAME),index); + lssproto_TEACHER_SYSTEM_send(getfdFromCharaIndex(charaindex),szMsg); + } + // 超过一人,询问要找谁当导师 + else{ + int iGetNum = 0; + char szBuf[1024]; + + memset(szBuf,0,sizeof(szBuf)); + for(i=0;i 0 && tickettime > nowtime+20 ) { + continue; + } + // 时限不到20秒 + else if( tickettime < nowtime+20 && tickettime >= nowtime ) { + sprintf( msg, "时间票剩馀时间%d秒。", tickettime - nowtime); + CHAR_talkToCli( i, -1, msg, CHAR_COLORYELLOW); + } + + // 超过时限 + else if( tickettime < nowtime ) { + int floor, x, y; + int totaltime; + char msg[1024]; + if( CHAR_getWorkInt( i, CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE) { + CHAR_talkToCli( i, -1, "时间已到,谢谢光顾。", CHAR_COLORYELLOW); + if( CHAR_getWorkInt( i, CHAR_WORKTICKETTIMESTART) > 0 ) { + totaltime = nowtime - CHAR_getWorkInt( i, CHAR_WORKTICKETTIMESTART); + sprintf( msg, "总入场时间%d分%d秒。", totaltime/60, totaltime%60); + CHAR_talkToCli( i, -1, msg, CHAR_COLORYELLOW); + } + CHAR_setWorkInt( i, CHAR_WORKTICKETTIME, 0); + CHAR_setWorkInt( i, CHAR_WORKTICKETTIMESTART, 0); + /* + if( CHAR_getElderPosition( CHAR_getInt( i, CHAR_LASTTALKELDER), &floor, &x, &y ) != TRUE ) { + CHAR_warpToSpecificPoint( i, 1006, 15, 15); + } + else { + CHAR_warpToSpecificPoint( i, floor, x, y); + } + */ + CHAR_warpToSpecificPoint( i, 7001, 41, 6); + } + else { + CHAR_talkToCli( i, -1, "时间已到,将於战斗结束时离开。", CHAR_COLORYELLOW); + // 移至 BATTLE_Exit() 处理 + } + } + } + +} +#endif diff --git a/gmsv/char/char_angel.c b/gmsv/char/char_angel.c new file mode 100644 index 0000000..72d6d91 --- /dev/null +++ b/gmsv/char/char_angel.c @@ -0,0 +1,685 @@ +#include "version.h" +#ifdef _ANGEL_SUMMON +#include +#include +#include +#include // shan +#include +#include +#include +#include +#include "common.h" +#include "char_base.h" +#include "char_data.h" +#include "char.h" +#include "lssproto_serv.h" +#include "item.h" +#include "item_event.h" +#include "buf.h" +#include "object.h" +#include "map_deal.h" +#include "saacproto_cli.h" +#include "readmap.h" +#include "handletime.h" +#include "char_event.h" +#include "npccreate.h" +#include "addressbook.h" +#include "item_event.h" +#include "magic_base.h" +#include "magic.h" +#include "chatmagic.h" +#include "configfile.h" +#include "log.h" +#include "anim_tbl.h" +#include "encount.h" +#include "battle.h" +#include "pet_skill.h" +#include "util.h" +#include "enemy.h" +#include "npcutil.h" +#include "pet.h" +#include "family.h" +#include "defend.h" +#include "npcserver.h" + + +struct MissionInfo missionlist[MAXMISSION]; +int mission_num =0; +struct MissionTable missiontable[MAXMISSIONTABLE]; + +//#define ANGELITEM 2884 //20701 //使者的信物 道具编号 +//#define HEROITEM 2885 //20702 //勇者的信物 道具编号 + +extern int AngelReady; + +char* getMissionNameInfo( int charaindex, char* nameinfo) +{ + sprintf( nameinfo, "%s:%s", CHAR_getChar( charaindex, CHAR_CDKEY), CHAR_getChar( charaindex, CHAR_NAME) ); + return nameinfo; +} + +int checkIfAngel( int charaindex) +{ + int i; + char nameinfo[512]; + + //sprintf( nameinfo, "%s:%s", CHAR_getChar( charaindex, CHAR_CDKEY), CHAR_getChar( charaindex, CHAR_NAME) ); + getMissionNameInfo( charaindex, nameinfo); + for( i =0; i + +// CoolFish: 2001/10/12 _UNIQUE_P_I +#include + + +#include "char_base.h" +#include "char_data.h" +#include "item.h" +#include "buf.h" +#include "magic.h" +#include "function.h" +#include "npccreate.h" +#include "configfile.h" +#include "title.h" +#include "pet.h" +#include "pet_skill.h" +#include "anim_tbl.h" +#include "enemy.h" +#include "saacproto_cli.h" + +// CoolFish: 2001/10/29 +#include "log.h" + +Char* CHAR_chara; + +static int CHAR_charanum; +static int CHAR_playernum; +static int CHAR_petnum; +static int CHAR_othersnum; + +// CoolFish: 2001/10/11 +#ifdef _UNIQUE_P_I +#define MAX_UNIQUE_P_I 1000 +static int unique_p = 0; +static int unique_i = 0; +#endif + +typedef struct tagINITCHARCOUNTER{ + int startcnt; + int cnt; + int endcnt; +}INITCHARCOUNTER; +static INITCHARCOUNTER initCharCounter[3] = { + {-1,-1,-1},{-1,-1,-1},{-1,-1,-1} +}; + + +tagRidePetTable ridePetTable[296] = +{ + { 101000, 100000, 100352, 331 }, + { 101001, 100005, 100352, 331 }, + { 101002, 100010, 100352, 331 }, + { 101003, 100015, 100352, 331 }, + { 101004, 100000, 100329, 309 }, + { 101005, 100005, 100327, 307 }, + { 101006, 100010, 100330, 310 }, + { 101007, 100015, 100328, 308 }, +// { 101008, 100700, 100372, 351 }, +// { 101009, 100705, 100373, 352 }, +#ifdef _GM_METAMO_RIDE + { 101000, 100700, 100352, 331 }, + { 101001, 100700, 100352, 331 }, + { 101002, 100700, 100352, 331 }, + { 101003, 100700, 100352, 331 }, + { 101004, 100700, 100329, 309 }, + { 101005, 100700, 100327, 307 }, + { 101006, 100700, 100330, 310 }, + { 101007, 100700, 100328, 308 }, + { 101000, 100705, 100352, 331 }, + { 101001, 100705, 100352, 331 }, + { 101002, 100705, 100352, 331 }, + { 101003, 100705, 100352, 331 }, + { 101004, 100705, 100329, 309 }, + { 101005, 100705, 100327, 307 }, + { 101006, 100705, 100330, 310 }, + { 101007, 100705, 100328, 308 }, +#endif + + { 101010, 100020, 100396, 483 }, + { 101011, 100025, 100396, 483 }, + { 101012, 100030, 100396, 483 }, + { 101013, 100035, 100396, 483 }, + { 101014, 100020, 100328, 308 }, + { 101015, 100025, 100329, 309 }, + { 101016, 100030, 100327, 307 }, + { 101017, 100035, 100330, 310 }, +// { 101018, 100710, 100372, 351 }, +// { 101019, 100715, 100373, 352 }, +#ifdef _GM_METAMO_RIDE + { 101010, 100710, 100396, 483 }, + { 101011, 100710, 100396, 483 }, + { 101012, 100710, 100396, 483 }, + { 101013, 100710, 100396, 483 }, + { 101014, 100710, 100328, 308 }, + { 101015, 100710, 100329, 309 }, + { 101016, 100710, 100327, 307 }, + { 101017, 100710, 100330, 310 }, + { 101010, 100715, 100396, 483 }, + { 101011, 100715, 100396, 483 }, + { 101012, 100715, 100396, 483 }, + { 101013, 100715, 100396, 483 }, + { 101014, 100715, 100328, 308 }, + { 101015, 100715, 100329, 309 }, + { 101016, 100715, 100327, 307 }, + { 101017, 100715, 100330, 310 }, + + { 100420, 100710, 100369, 348 }, + { 100425, 100710, 100370, 349 }, + { 100445, 100710, 100904, 1642 }, + + { 100420, 100715, 100369, 348 }, + { 100425, 100715, 100370, 349 }, + { 100445, 100715, 100904, 1642 }, +#endif + + { 101020, 100040, 100351, 330 }, + { 101021, 100045, 100351, 330 }, + { 101022, 100050, 100351, 330 }, + { 101023, 100055, 100351, 330 }, + { 101024, 100040, 100328, 308 }, + { 101025, 100045, 100330, 310 }, + { 101026, 100050, 100327, 307 }, + { 101027, 100055, 100329, 309 }, +// { 101028, 100720, 100372, 351 }, +// { 101029, 100725, 100373, 352 }, +#ifdef _GM_METAMO_RIDE + { 101020, 100720, 100351, 330 }, + { 101021, 100720, 100351, 330 }, + { 101022, 100720, 100351, 330 }, + { 101023, 100720, 100351, 330 }, + { 101024, 100720, 100328, 308 }, + { 101025, 100720, 100330, 310 }, + { 101026, 100720, 100327, 307 }, + { 101027, 100720, 100329, 309 }, + { 101020, 100725, 100351, 330 }, + { 101021, 100725, 100351, 330 }, + { 101022, 100725, 100351, 330 }, + { 101023, 100725, 100351, 330 }, + { 101024, 100725, 100328, 308 }, + { 101025, 100725, 100330, 310 }, + { 101026, 100725, 100327, 307 }, + { 101027, 100725, 100329, 309 }, +#endif + + { 101030, 100060, 100353, 332 }, + { 101031, 100065, 100353, 332 }, + { 101032, 100070, 100353, 332 }, + { 101033, 100075, 100353, 332 }, + { 101034, 100060, 100329, 309 }, + { 101035, 100065, 100327, 307 }, + { 101036, 100070, 100330, 310 }, + { 101037, 100075, 100328, 308 }, +// { 101038, 100730, 100372, 351 }, +// { 101039, 100735, 100373, 352 }, +#ifdef _GM_METAMO_RIDE + { 101030, 100730, 100353, 332 }, + { 101031, 100730, 100353, 332 }, + { 101032, 100730, 100353, 332 }, + { 101033, 100730, 100353, 332 }, + { 101034, 100730, 100329, 309 }, + { 101035, 100730, 100327, 307 }, + { 101036, 100730, 100330, 310 }, + { 101037, 100730, 100328, 308 }, + { 101030, 100735, 100353, 332 }, + { 101031, 100735, 100353, 332 }, + { 101032, 100735, 100353, 332 }, + { 101033, 100735, 100353, 332 }, + { 101034, 100735, 100329, 309 }, + { 101035, 100735, 100327, 307 }, + { 101036, 100735, 100330, 310 }, + { 101037, 100735, 100328, 308 }, +#endif + + { 101040, 100080, 100396, 483 }, + { 101041, 100085, 100396, 483 }, + { 101042, 100090, 100396, 483 }, + { 101043, 100095, 100396, 483 }, + { 101044, 100080, 100328, 308 }, + { 101045, 100085, 100327, 307 }, + { 101046, 100090, 100330, 310 }, + { 101047, 100095, 100329, 309 }, +// { 101048, 100740, 100372, 351 }, +// { 101049, 100745, 100373, 352 }, +#ifdef _GM_METAMO_RIDE + { 101040, 100740, 100396, 483 }, + { 101041, 100740, 100396, 483 }, + { 101042, 100740, 100396, 483 }, + { 101043, 100740, 100396, 483 }, + { 101044, 100740, 100328, 308 }, + { 101045, 100740, 100327, 307 }, + { 101046, 100740, 100330, 310 }, + { 101047, 100740, 100329, 309 }, + { 101040, 100740, 100396, 483 }, + { 101041, 100740, 100396, 483 }, + { 101042, 100740, 100396, 483 }, + { 101043, 100740, 100396, 483 }, + { 101044, 100740, 100328, 308 }, + { 101045, 100740, 100327, 307 }, + { 101046, 100740, 100330, 310 }, + { 101047, 100740, 100329, 309 }, +#endif + + { 101050, 100100, 100353, 332 }, + { 101051, 100105, 100353, 332 }, + { 101052, 100110, 100353, 332 }, + { 101053, 100115, 100353, 332 }, + { 101054, 100100, 100329, 309 }, + { 101055, 100105, 100328, 308 }, + { 101056, 100110, 100330, 310 }, + { 101057, 100115, 100327, 307 }, +// { 101058, 100750, 100372, 351 }, +// { 101059, 100755, 100373, 352 }, +#ifdef _GM_METAMO_RIDE + { 101050, 100750, 100353, 332 }, + { 101051, 100750, 100353, 332 }, + { 101052, 100750, 100353, 332 }, + { 101053, 100750, 100353, 332 }, + { 101054, 100750, 100329, 309 }, + { 101055, 100750, 100328, 308 }, + { 101056, 100750, 100330, 310 }, + { 101057, 100750, 100327, 307 }, + { 101050, 100755, 100353, 332 }, + { 101051, 100755, 100353, 332 }, + { 101052, 100755, 100353, 332 }, + { 101053, 100755, 100353, 332 }, + { 101054, 100755, 100329, 309 }, + { 101055, 100755, 100328, 308 }, + { 101056, 100755, 100330, 310 }, + { 101057, 100755, 100327, 307 }, +#endif + + { 101060, 100120, 100354, 333 }, + { 101061, 100125, 100354, 333 }, + { 101062, 100130, 100354, 333 }, + { 101063, 100135, 100354, 333 }, + { 101064, 100120, 100327, 307 }, + { 101065, 100125, 100330, 310 }, + { 101066, 100130, 100328, 308 }, + { 101067, 100135, 100329, 309 }, +// { 101068, 100760, 100372, 351 }, +// { 101069, 100765, 100373, 352 }, +#ifdef _GM_METAMO_RIDE + { 101060, 100760, 100354, 333 }, + { 101061, 100760, 100354, 333 }, + { 101062, 100760, 100354, 333 }, + { 101063, 100760, 100354, 333 }, + { 101064, 100760, 100327, 307 }, + { 101065, 100760, 100330, 310 }, + { 101066, 100760, 100328, 308 }, + { 101067, 100760, 100329, 309 }, + { 101060, 100765, 100354, 333 }, + { 101061, 100765, 100354, 333 }, + { 101062, 100765, 100354, 333 }, + { 101063, 100765, 100354, 333 }, + { 101064, 100765, 100327, 307 }, + { 101065, 100765, 100330, 310 }, + { 101066, 100765, 100328, 308 }, + { 101067, 100765, 100329, 309 }, +#endif + + { 101070, 100140, 100354, 333 }, + { 101071, 100145, 100354, 333 }, + { 101072, 100150, 100354, 333 }, + { 101073, 100155, 100354, 333 }, + { 101074, 100140, 100327, 307 }, + { 101075, 100145, 100329, 309 }, + { 101076, 100150, 100330, 310 }, + { 101077, 100155, 100328, 308 }, +// { 101078, 100770, 100372, 351 }, +// { 101079, 100775, 100373, 352 }, +#ifdef _GM_METAMO_RIDE + { 101070, 100770, 100354, 333 }, + { 101071, 100770, 100354, 333 }, + { 101072, 100770, 100354, 333 }, + { 101073, 100770, 100354, 333 }, + { 101074, 100770, 100327, 307 }, + { 101075, 100770, 100329, 309 }, + { 101076, 100770, 100330, 310 }, + { 101077, 100770, 100328, 308 }, + { 101070, 100775, 100354, 333 }, + { 101071, 100775, 100354, 333 }, + { 101072, 100775, 100354, 333 }, + { 101073, 100775, 100354, 333 }, + { 101074, 100775, 100327, 307 }, + { 101075, 100775, 100329, 309 }, + { 101076, 100775, 100330, 310 }, + { 101077, 100775, 100328, 308 }, +#endif + + { 101080, 100160, 100352, 331 }, + { 101081, 100165, 100352, 331 }, + { 101082, 100170, 100352, 331 }, + { 101083, 100175, 100352, 331 }, + { 101084, 100160, 100330, 310 }, + { 101085, 100165, 100329, 309 }, + { 101086, 100170, 100327, 307 }, + { 101087, 100175, 100328, 308 }, +// { 101088, 100780, 100372, 351 }, +// { 101089, 100785, 100373, 352 }, +#ifdef _GM_METAMO_RIDE + { 101040, 100780, 100396, 483 }, + { 101041, 100780, 100396, 483 }, + { 101042, 100780, 100396, 483 }, + { 101043, 100780, 100396, 483 }, + { 101044, 100780, 100328, 308 }, + { 101045, 100780, 100327, 307 }, + { 101046, 100780, 100330, 310 }, + { 101047, 100780, 100329, 309 }, + { 101080, 100785, 100352, 331 }, + { 101081, 100785, 100352, 331 }, + { 101082, 100785, 100352, 331 }, + { 101083, 100785, 100352, 331 }, + { 101084, 100785, 100330, 310 }, + { 101085, 100785, 100329, 309 }, + { 101086, 100785, 100327, 307 }, + { 101087, 100785, 100328, 308 }, +#endif + + { 101090, 100180, 100351, 330 }, + { 101091, 100185, 100351, 330 }, + { 101092, 100190, 100351, 330 }, + { 101093, 100195, 100351, 330 }, + { 101094, 100180, 100328, 308 }, + { 101095, 100185, 100330, 310 }, + { 101096, 100190, 100329, 309 }, + { 101097, 100195, 100327, 307 }, +// { 101098, 100790, 100372, 351 }, +// { 101099, 100795, 100373, 352 }, +#ifdef _GM_METAMO_RIDE + { 101090, 100790, 100351, 330 }, + { 101091, 100790, 100351, 330 }, + { 101092, 100790, 100351, 330 }, + { 101093, 100790, 100351, 330 }, + { 101094, 100790, 100328, 308 }, + { 101095, 100790, 100330, 310 }, + { 101096, 100790, 100329, 309 }, + { 101097, 100790, 100327, 307 }, + { 101090, 100795, 100351, 330 }, + { 101091, 100795, 100351, 330 }, + { 101092, 100795, 100351, 330 }, + { 101093, 100795, 100351, 330 }, + { 101094, 100795, 100328, 308 }, + { 101095, 100795, 100330, 310 }, + { 101096, 100795, 100329, 309 }, + { 101097, 100795, 100327, 307 }, +#endif + + { 101100, 100200, 100353, 332 }, + { 101101, 100205, 100353, 332 }, + { 101102, 100210, 100353, 332 }, + { 101103, 100215, 100353, 332 }, + { 101104, 100200, 100329, 309 }, + { 101105, 100205, 100328, 308 }, + { 101106, 100210, 100327, 307 }, + { 101107, 100215, 100330, 310 }, +// { 101108, 100800, 100372, 351 }, +// { 101109, 100805, 100373, 352 }, +#ifdef _GM_METAMO_RIDE + { 101100, 100800, 100353, 332 }, + { 101101, 100800, 100353, 332 }, + { 101102, 100800, 100353, 332 }, + { 101103, 100800, 100353, 332 }, + { 101104, 100800, 100329, 309 }, + { 101105, 100800, 100328, 308 }, + { 101106, 100800, 100327, 307 }, + { 101107, 100800, 100330, 310 }, + { 101100, 100805, 100353, 332 }, + { 101101, 100805, 100353, 332 }, + { 101102, 100805, 100353, 332 }, + { 101103, 100805, 100353, 332 }, + { 101104, 100805, 100329, 309 }, + { 101105, 100805, 100328, 308 }, + { 101106, 100805, 100327, 307 }, + { 101107, 100805, 100330, 310 }, +#endif + + { 101110, 100220, 100396, 483 }, + { 101111, 100225, 100396, 483 }, + { 101112, 100230, 100396, 483 }, + { 101113, 100235, 100396, 483 }, + { 101114, 100220, 100330, 310 }, + { 101115, 100225, 100327, 307 }, + { 101116, 100230, 100329, 309 }, + { 101117, 100235, 100328, 308 }, +// { 101118, 100810, 100372, 351 }, +// { 101119, 100815, 100373, 352 }, +#ifdef _GM_METAMO_RIDE + { 101110, 100810, 100396, 483 }, + { 101111, 100810, 100396, 483 }, + { 101112, 100810, 100396, 483 }, + { 101113, 100810, 100396, 483 }, + { 101114, 100810, 100330, 310 }, + { 101115, 100810, 100327, 307 }, + { 101116, 100810, 100329, 309 }, + { 101117, 100810, 100328, 308 }, + { 101110, 100815, 100396, 483 }, + { 101111, 100815, 100396, 483 }, + { 101112, 100815, 100396, 483 }, + { 101113, 100815, 100396, 483 }, + { 101114, 100815, 100330, 310 }, + { 101115, 100815, 100327, 307 }, + { 101116, 100815, 100329, 309 }, + { 101117, 100815, 100328, 308 }, +#endif + + { 101179, 101177, 101178, 1804}, + { 101179, 101178, 101177, 1926}, +}; + +#ifdef _NEW_RIDEPETS + +tagRideCodeMode RideCodeMode[] = { + { 100374, RIDE_PET0 }, /*骑宠帖拉所伊朵*/ + { 100358, RIDE_PET1 }, /*骑宠玛恩摩洛斯*/ + { 100362, RIDE_PET2 }, /*骑宠朵拉比斯*/ + { 100279, RIDE_PET3 }, /*骑宠拉奇鲁哥*/ + { 100288, RIDE_PET4 }, /*骑宠扬奇洛斯*/ + { 100283, RIDE_PET5 }, /*骑宠卡达鲁卡斯*/ + { 100346, RIDE_PET6 }, /*骑宠卡卡金宝*/ + { 100310, RIDE_PET7 }, /*骑宠格尔格*/ + { 100372, RIDE_PET8 }, /*骑宠左迪洛斯*/ + { 100373, RIDE_PET9 }, /*骑宠巴朵兰恩*/ + { 101532, RIDE_PET10 }, /*镲宠史卡鲁*/ + { 101576, RIDE_PET11 }, /*骑宠罗多克雷*/ +}; + +tagRideNoList RideNoList[] = { + {{ 101305, 101306, 101307, 101308, 101309, 101310, 101311, 101312, 101008, 101009, 101978, 101989},0}, //小矮子 + {{ 101313, 101314, 101315, 101316, 101317, 101318, 101319, 101320, 101018, 101019, 101986, 101988},0}, //赛亚人 + {{ 101321, 101322, 101323, 101324, 101325, 101326, 101327, 101328, 101028, 101029, 101975, 101965},0}, //辫子男孩 + {{ 101329, 101330, 101331, 101332, 101333, 101334, 101335, 101336, 101038, 101039, 101976, 101966},0}, //酷哥 + {{ 101337, 101338, 101339, 101340, 101341, 101342, 101343, 101344, 101048, 101049, 101984, 101973},0}, //熊皮男 + {{ 101345, 101346, 101347, 101348, 101349, 101350, 101351, 101352, 101058, 101059, 101985, 101974},0}, //大个 + {{ 101353, 101354, 101355, 101356, 101357, 101358, 101359, 101360, 101068, 101069, 101977, 101967},0}, //小矮妹 + {{ 101361, 101362, 101363, 101364, 101365, 101366, 101367, 101368, 101078, 101079, 101979, 101968},0}, //熊皮妹 + {{ 101369, 101370, 101371, 101372, 101373, 101374, 101375, 101376, 101088, 101089, 101981, 101970},0}, //帽子妹 + {{ 101377, 101378, 101379, 101380, 101381, 101382, 101383, 101384, 101098, 101099, 101980, 101969},0}, //短法发夹妹 + {{ 101385, 101386, 101387, 101388, 101389, 101390, 101391, 101392, 101108, 101109, 101983, 101972},0}, //手套女 + {{ 101393, 101394, 101395, 101396, 101397, 101398, 101399, 101400, 101118, 101119, 101982, 101970},0}, //辣妹 +}; + +tagRidePetList RPlistMode[] = { + { 100000, 0, 1 }, { 100005, 0, 1 }, { 100010, 0, 1 }, { 100015, 0, 1 }, { 100700, 0, 1 }, { 100705, 0, 1 }, //小矮子 + { 100020, 1, 1 }, { 100025, 1, 1 }, { 100030, 1, 1 }, { 100035, 1, 1 }, { 100710, 1, 1 }, { 100715, 1, 1 },//赛亚人 + { 100040, 2, 1 }, { 100045, 2, 1 }, { 100050, 2, 1 }, { 100055, 2, 1 }, { 100720, 2, 1 }, { 100725, 2, 1 }, //辫子男孩 + { 100060, 3, 1 }, { 100065, 3, 1 }, { 100070, 3, 1 }, { 100075, 3, 1 }, { 100730, 3, 1 }, { 100735, 3, 1 }, //酷哥 + { 100080, 4, 1 }, { 100085, 4, 1 }, { 100090, 4, 1 }, { 100095, 4, 1 }, { 100740, 4, 1 }, { 100745, 4, 1 }, //熊皮男 + { 100100, 5, 1 }, { 100105, 5, 1 }, { 100110, 5, 1 }, { 100115, 5, 1 }, { 100750, 5, 1 }, { 100755, 5, 1 }, //大个 + { 100120, 6, 2 }, { 100125, 6, 2 }, { 100130, 6, 2 }, { 100135, 6, 2 }, { 100760, 6, 2 }, { 100765, 6, 2 }, //小矮妹 + { 100140, 7, 2 }, { 100145, 7, 2 }, { 100150, 7, 2 }, { 100155, 7, 2 }, { 100770, 7, 2 }, { 100775, 7, 2 }, //熊皮妹 + { 100160, 8, 2 }, { 100165, 8, 2 }, { 100170, 8, 2 }, { 100175, 8, 2 }, { 100780, 8, 2 }, { 100785, 8, 2 }, //帽子妹 + { 100180, 9, 2 }, { 100185, 9, 2 }, { 100190, 9, 2 }, { 100195, 9, 2 }, { 100790, 9, 2 }, { 100795, 9, 2 }, //短发夹妹 + { 100200, 10, 2 }, { 100205, 10, 2 }, { 100210, 10, 2 }, { 100215, 10, 2 }, { 100800, 10, 2 }, { 100805, 10, 2 }, //手套女 + { 100220, 11, 2 }, { 100225, 11, 2 }, { 100230, 11, 2 }, { 100235, 11, 2 }, { 100810, 11, 2 }, { 100815, 11, 2 }, //辣妹 +}; + +int RIDEPET_getNOindex( int baseNo) +{ + int i; + for( i=0; i< sizeof(RPlistMode)/sizeof(tagRidePetList); i++ ) { + if( RPlistMode[i].charNo == baseNo ) { + return RPlistMode[i].Noindex; + } + } + return -1; +} + +int RIDEPET_getPETindex( int PetNo, int learnCode) +{ + int i; + for( i=0; i< sizeof(RideCodeMode)/sizeof(tagRideCodeMode); i++ ) { + if( RideCodeMode[i].petNo == PetNo && + (RideCodeMode[i].learnCode & learnCode) ) { + return i; + } + } + return -1; +} + +int RIDEPET_getRIDEno( int index, int ti) +{ + if( index < 0 || index >= sizeof( RideNoList)/sizeof( tagRideNoList) ) + return -1; + if( ti < 0 || ti >= MAXNOINDEX ) + return -1; + + return RideNoList[index].RideNo[ti]; +} +#endif + +#ifdef _EMENY_CHANCEMAN +int CHAR_getSexInt( int baseNo ) +{ + int i; + for( i=0; i< sizeof(RPlistMode)/sizeof(tagRidePetList); i++ ) { + if( RPlistMode[i].charNo == baseNo ) { + return RPlistMode[i].sex; + } + } + return -1; +} +#endif + +#ifdef _PET_EVOLUTION +#define MAXTABLE_X 29 +#define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2, 5}, + { 0, 4, 0, 4, 0, 6, 0, 6, 0, 4, 0, 4, 0, 6, 0, 6, 0, 4, 0, 4, 0, 6, 0, 4, 0, 6, 0, 4, 0}, + { 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2}, + + { 3, 8,10, 3, 8,10, 3, 8,10, 3, 8,10, 3, 8,10, 3, 8,10, 3, 8,10, 3, 8,10, 3, 8,10, 3, 8}, + {10, 3, 8,10, 3, 8,10, 3, 8,10, 3, 8,10, 3, 8,10, 3, 8,10, 3, 8,10, 3, 8,10, 3, 8,10, 3}, + { 2, 1, 2, 1, 5, 1, 5, 1, 2, 1, 2, 1, 5, 1, 5, 1, 2, 1, 2, 1, 5, 1, 5, 1, 2, 1, 2, 5, 1}, + { 6, 9, 6, 9, 6, 0, 6, 0, 6, 9, 6, 9, 6, 0, 6, 0, 6, 9, 6, 9, 6, 0, 6, 0, 6, 9, 6, 0, 6} +}; + +int PropertyTable[4][4]={ + { 0, 4, 5, 6}, + { 7, 1, 8, 9}, + {10,11, 2,12}, + {13,14,15, 3}, +}; +#define MAXFTABLE_X 11 +#define MAXFTABLE_Y 16 +int FusionTable[MAXFTABLE_X][MAXFTABLE_Y]={ + { 989, 990, 991, 992, 989, 992, 989, 990, 990, 990, 991, 991, 991, 992, 989, 992}, + {1001,1002,1003,1004,1001,1001,1004,1001,1002,1002,1003,1003,1003,1004,1004,1003}, + {1005,1006,1007,1008,1005,1005,1005,1006,1006,1006,1007,1006,1007,1008,1008,1008}, + {1021,1025,1023,1024,1025,1021,1021,1022,1022,1022,1023,1023,1023,1021,1024,1024}, + {1030,1031,1032,1033,1030,1030,1030,1031,1031,1031,1032,1031,1032,1030,1033,1033}, + {1017,1018,1019,1020,1018,1017,1017,1018,1019,1018,1019,1019,1020,1017,1020,1020}, + {1009,1010,1011,1012,1010,1009,1009,1010,1010,1010,1011,1011,1011,1012,1012,1011}, + { 993, 994, 995, 996, 994, 993, 993, 994, 995, 994, 995, 993, 996, 993, 996, 996}, + {1026,1027,1028,1029,1026,1026,1026,1026,1028,1027,1028,1028,1029,1029,1029,1029}, + { 997, 998, 999, 999,1000, 997, 997,1000, 998, 998,1000, 998, 999, 999, 999, 999}, + {1013,1014,1015,1016,1013,1013,1016,1013,1015,1014,1015,1015,1015,1016,1016,1016} +}; + +int EVOLUTION_getPetFusionCode( int petid) +{ + int petarray = ENEMYTEMP_getEnemyTempArrayFromTempNo( petid); + return ENEMYTEMP_getInt( petarray, E_T_FUSIONCODE); +} + +int EVOLUTION_getPetTable( int charaindex, int petindex1, int petindex2) +{ + int table1,table2; + + if( !CHAR_CHECKINDEX( petindex1) ) return -1; + if( !CHAR_CHECKINDEX( petindex2) ) return -1; + + table2 = EVOLUTION_getPetFusionCode( CHAR_getInt( petindex1, CHAR_PETID)); + table1 = EVOLUTION_getPetFusionCode( CHAR_getInt( petindex2, CHAR_PETID)); + + if( table1 < 0 || table1 >= MAXTABLE_X ) return -1; + if( table2 < 0 || table2 >= MAXTABLE_Y ) return -1; + return PetTable[table1][table2]; +} + +int EVOLUTION_getPropertyTable( int charaindex, int petindex1, int petindex2) +{ + int i, k1=0, k2=0; + int table1,table2; + int Property1[4]={-1,-1,-1,-1}; + int Property2[4]={-1,-1,-1,-1}; + + if( !CHAR_CHECKINDEX( petindex1) ) return -1; + if( !CHAR_CHECKINDEX( petindex2) ) return -1; + + for( i=0; i<4; i++) { + if( CHAR_getInt( petindex1, CHAR_EARTHAT+i) > 0 ){ + Property1[k1] = i; + k1++; + } + if( CHAR_getInt( petindex2, CHAR_EARTHAT+i) > 0 ){ + Property2[k2] = i; + k2++; + } + } + if( k1 == 0 || k2 == 0 ) return -1; + + if( k1 <= 1 ) { + table1 = Property1[ 0]; + }else{ + table1 = Property1[ (rand()%(k1-1)) ]; + } + if( k2 <= 1 ) { + table2 = Property2[ 0]; + }else { + table2 = Property2[ (rand()%(k2-1)) ]; + } + + if( table1 < 0 || table1 >= 4 ) return -1; + if( table2 < 0 || table2 >= 4 ) return -1; + + return PropertyTable[table1][table2]; +} + +int EVOLUTION_getFusionTable( int charaindex, int px, int py) +{ + if( px >= MAXFTABLE_X || px < 0 ) return -1; + if( py >= MAXFTABLE_Y || py < 0 ) return -1; + return FusionTable[px][py]; +} +#endif + +#ifdef _CHAR_FIXDATADEF +/* +typedef struct _tagPetSetIntData{ + char com[256]; + int type; +}PetSetIntData; + +PetSetIntData PET_SetIntData[ ]={ +}; +*/ +#endif + +static char* CHAR_setintdata[CHAR_DATAINTNUM]={ + /* dci , PLAYER, */ + "pn", /* CHAR_DATAPLACENUMBER */ + + "bi", /* CHAR_BASEIMAGENUMBER */ + "bbi", /* CHAR_BASEBASEIMAGENUMBER */ + "fb", /* CHAR_FACEIMAGENUMBER */ + "fl", /* CHAR_FLOOR */ + "x", /* CHAR_X */ + "y", /* CHAR_Y */ + "dir", /* CHAR_DIR 12凛毛0卞凛煌璃曰卞 */ + "lv", /* CHAR_LV */ + "gld", /* CHAR_GOLD */ + + "hp", /* CHAR_HP */ + "mp", /* CHAR_MP */ + "mmp", /* CHAR_MAXMP */ + + "vi", /* CHAR_VITAL */ + "str", /* CHAR_STR */ + "tou", /* CHAR_TOUGH */ + "dx", /* CHAR_DEX */ + + "chr", /* CHAR_CHARM */ + "luc", /* CHAR_LUCK */ + "aea", /* 哗箪岭 */ + "awa", /* 箪岭 */ + "afi", /* 绍箪岭 */ + "awi", /* 氘箪岭 */ + + "slt", /* CHAR_SLOT */ + "cr", /* CHAR_CRITIAL */ + "cou", /* CHAR_COUNTER */ + "rar", /* CHAR_RARE */ + "rst", /* CHAR_RADARSTRLENGTH */ + "cvo", /* CHAR_CHATVOLUME */ + "ml", /* CHAR_MERCHANTLEVEL */ + "hl", /* CHAR_HEALERLEVEL */ + "di", /* CHAR_DETERMINEITEM */ + "ieqt", /* CHAR_INDEXOFEQTITLE */ + "poi", /* CHAR_POISON */ + "par", /* CHAR_PARALYSIS */ + "sil", /* CHAR_SILENCE */ + "sto", /* CHAR_STONE */ + "dar", /* CHAR_DARKNESS */ + "con", /* CHAR_CONFUSION */ + "loc", /* CHAR_LOGINCOUNT */ + "dc", /* CHAR_DEADCOUNT */ + "wc", /* CHAR_WALKCOUNT */ + "tc", /* CHAR_TALKCOUNT */ + "dmc", /* CHAR_DAMAGECOUNT */ + "gpc", /* CHAR_GETPETCOUNT */ + "kpc", /* CHAR_KILLPETCOUNT */ + "dpc", /* CHAR_DEADPETCOUNT */ + "smc", /* CHAR_SENDMAILCOUNT */ + "mic", /* CHAR_MERGEITEMCOUNT */ + "dbc", /* CHAR_DUELBATTLECOUNT */ + "dwc", /* CHAR_DUELWINCOUNT */ + "dlc", /* CHAR_DUELLOSECOUNT */ + "dswc", /* CHAR_DUELSTWINCOUNT */ + "dmswc", /* CHAR_DUELMAXSTWINCOUNT */ + "wht", /* CHAR_WHICHTYPE */ + "wint", /* CHAR_WALKNTERVAL */ + "lint", /* CHAR_LOOPINTERVAL */ +#ifdef _NEWOPEN_MAXEXP + "exp", /* CHAR_OLDEXP */ + "nexp", /* CHAR_EXP */ +#else + "exp", /* CHAR_EXP */ +#endif + "lte", /* CHAR_LASTTALKELDER */ + "skup", /* CHAR_SKILLUPPOINT */ + "lvup", /* CHAR_LEVELUPPOINT */ + "ity", /* CHAR_IMAGETYPE */ + "nc", /* CHAR_NAMECOLOR */ + "pnc", /* CHAR_POPUPNAMECOLOR */ + "llt", /* CHAR_LASTTIMESETLUCK */ + "duel", /* CHAR_DUELPOINT */ + "evt", /* CHAR_EVENT */ + "evt2", /* CHAR_EVENT2 */ + "evt3", /* CHAR_EVENT3 */ +#ifdef _NEWEVENT + "evt4", /* CHAR_EVENT4 */ + "evt5", /* CHAR_EVENT5 */ + "evt6", /* CHAR_EVENT6 */ +#endif +#ifdef _ADD_NEWEVENT // WON 多增任务旗标 + "evt7", /* CHAR_EVENT7 */ + "evt8", // CHAR_ENDEVENT8, 224~255 精灵召唤专用 +#endif + + "nev", /* CHAR_NOWEVENT */ + "nev2", /* CHAR_NOWEVENT2 */ + "nev3", /* CHAR_NOWEVENT3 */ +#ifdef _NEWEVENT + "nev4", /* CHAR_NOWEVENT4 */ + "nev5", /* CHAR_NOWEVENT5 */ + "nev6", /* CHAR_NOWEVENT6 */ +#endif +#ifdef _ADD_NEWEVENT // WON 多增任务旗标 + "nev7", /* CHAR_NOWEVENT7 */ + "nev8", // CHAR_NOWEVENT8, 224~255 精灵召唤专用 +#endif + + "trn", /* CHAR_TRANSMIGRATION */ + "teq", /* CHAR_TRANSEQUATION */ + + "ini", /* CHAR_INITDATA */ + "silent", /* CHAR_SILENT */ + "fmi", // CoolFish: Family 2001/5/24 家族 index + "fmlf", // CoolFish: Family 2001/5/24 是否为家族族长 + "fmspr", // CoolFish: Family 2001/7/13 家族守护精灵 + + "bankgld", /* CHAR_BANKGOLD */ + "ridepet", /* CHAR_RIDEPET */ + "learnride", /* CHAR_LEARNRIDE */ +#ifdef _NEW_RIDEPETS + "lowridepet", //CHAR_LOWRIDEPETS +#endif + "limitlv", // Arminius 7.30 pet limit level +#ifdef _PET_FUSION + "fusioncode", //CHAR_FUSIONCODE + "fusionindex", //CHAR_FUSIONINDEX + "fusionraise", //CHAR_FUSIONRAISE + "fusionbe", //CHAR_FUSIONBEIT + "futimelimit", //CHAR_FUSIONTIMELIMIT +#endif +#ifdef _DEATH_CONTEND + "pkltnum", //CHAR_PKLISTTEAMNUM, + "pkleader", //CHAR_PKLISTLEADER, +#endif + +#ifdef _PERSONAL_FAME // Arminius 8.30: 家族个人声望 + "fame", +#endif + +#ifdef _NEWSAVE + "sindex", /* CHAR_SAVEINDEXNUMBER */ +#endif + +#ifdef __ATTACK_MAGIC + "earth_exp", // 玩家的地魔法熟练度 + "water_exp", // 玩家的水魔法熟练度 + "fire_exp", // 玩家的火魔法熟练度 + "wind_exp", // 玩家的风魔法熟练度 + "earth_resist", // 玩家的地魔法抗性 + "water_resist", // 玩家的水魔法抗性 + "fire_resist", // 玩家的火魔法抗性 + "wind_resist", // 玩家的风魔法抗性 + "earth_attmagic_exp", // 玩家的地魔法熟练度经验值 + "water_attmagic_exp", // 玩家的水魔法熟练度经验值 + "fire_attmagic_exp", // 玩家的火魔法熟练度经验值 + "wind_attmagic_exp", // 玩家的风魔法熟练度经验值 + "earth_defmagic_exp", // 玩家的地魔法抗性经验值 + "water_defmagic_exp", // 玩家的水魔法抗性经验值 + "fire_defmagic_exp", // 玩家的火魔法抗性经验值 + "wind_defmagic_exp", // 玩家的风魔法抗性经验值 +#endif + +#ifdef _GAMBLE_BANK //个人银行 + "personaglod", //CHAR_PERSONAGOLD, +#endif +#ifdef _DROPSTAKENEW + "gamblenums", //CHAR_GAMBLENUM +#endif +#ifdef _ADD_ACTION //npc动作 + "actsty", //CHAR_ACTIONSTYLE +#endif +#ifdef _AUCTIONEER + "aucgold", // CHAR_AUCGOLD 拍卖所得 +#endif +#ifdef _PET_EVOLUTION + "evbasevtl",// CHAR_EVOLUTIONBASE, + "evbasestr",// CHAR_EVOLUTIONBASE, + "evbasetgh",// CHAR_EVOLUTIONBASE, + "evbasedex",// CHAR_EVOLUTIONBASE, +#endif + +#ifdef _ACTION_BULLSCR + "abullstart", //CHAR_ABULLSTART + "abullscore", //CHAR_ABULLSCORE, + "abulltime", //CHAR_ABULLTIME, + "abullstarttime", //CHAR_ABULLSTARTTIME +#endif + +#ifdef _ACTION_GMQUE + "gmqueflg", //CHAR_GMQUEFLG, + "gmquenum", //CHAR_GMQUENUMS, +#endif + + +#ifdef _FAMILYBANKSTONELOG + "fmbankgold", //家族银行存款 +#endif + +#ifdef _FM_JOINLIMIT + "fmtimelimit", // CHAR_FMTIMELIMIT, +#endif + +#ifdef _CHAR_PROFESSION // WON ADD 人物职业 + "profession_class", + "profession_level", +// "profession_exp", + "profession_skill_point", + "attachpile", + "profession_fire_p", + "profession_ice_p", + "profession_thunder_p", + "profession_fire_r", + "profession_ice_r", + "profession_thunder_r", +#endif +#ifdef _ALLDOMAN // (不可开) Syu ADD 排行榜NPC + "herofloor", +#endif +#ifdef _PETSKILL_BECOMEPIG + "becomepig", + "becomepig_bbi", +#endif + "leavetime", // CHAR_LASTLEAVETIME +#ifdef _NEW_MANOR_LAW + "momentum", // CHAR_MOMENTUM +#endif + +#ifdef _ITEM_ADDEXP2 + "aexp", // CHAR_ADDEXPPOWER + "aexpt", // CHAR_ADDEXPTIME +#endif + +#ifdef _ANGEL_SUMMON + "herocnt", // CHAR_HEROCNT +#endif +#ifdef _TEACHER_SYSTEM + "tsf", // CHAR_TEACHER_FAME, // 导师领导声望 +#endif + +#ifdef _RACEMAN + "checkin", // CHAR_CHECKIN + "catchcnt1", // CHAR_CATCHCNT1 + "catchcnt2", // CHAR_CATCHCNT2 + "catchcnt3", // CHAR_CATCHCNT3 + "catchcnt4", // CHAR_CATCHCNT4 + "catchcnt5", // CHAR_CATCHCNT5 + "kindcnt1", //CHAR_KINDCNT1, /* (0~31) */ + "kindcnt2", //CHAR_KINDCNT2, /* (32~63) */ + "kindcnt3", //CHAR_KINDCNT3, /* (64~95) */ + "kindcnt4", //CHAR_KINDCNT4, /* (96~127) */ + "kindcnt5", //CHAR_KINDCNT5, /* (128~159) */ + "kindcnt6", //CHAR_KINDCNT6, /* (160~191) */ + "kindcnt7", //CHAR_KINDCNT7, /* (192~223) */ + "kindcnt8", //CHAR_KINDCNT8, /* (224~255) */ + "kindcnt9", //CHAR_KINDCNT9, /* (256~287) */ + "kindcnt10", //CHAR_KINDCNT10, /* (288~319) */ +#endif +#ifdef _GM_ITEM + "gmtime", // 玩家GM命令次数 +#endif +}; + +static char* CHAR_setchardata[CHAR_DATACHARNUM]={ + /* dcc , PLAYER */ + "name" , /* CHAR_NAME */ + "ownt" , /* CHAR_OWNTITLE*/ + "arg", /* CHAR_NPCARGUMENT */ + "ocd", /* CHAR_OWNERCDKEY */ + "ocn", /* CHAR_OWNERCHARANAME */ + "fmname", // CoolFish: Family 2001/5/24 家族名称 CHAR_FMNAME +#ifdef _UNIQUE_P_I + "ucode", // CoolFish: 2001/10/11 UNIQUE_P_I CHAR_UNIQUECODE +#endif +#ifdef _ACTION_GMQUE + //人物 npc 使用 + "gmque", //CHAR_GMQUESTR1, + //"temp2", //CHAR_GMQUESTR2, + //"temp3", //CHAR_GMQUESTR3, + //"temp4", //CHAR_GMQUESTR4, +#endif + +#ifdef _GM_IDENTIFY + "gmidentify", //gm名称 +#endif +#ifdef _TEACHER_SYSTEM + "tsi", // 导师帐号 + "tsn", // 导师名字 +#endif + +#ifdef _ITEM_SETLOVER + "love", // 结婚判断 + "lovrrid", // 爱人帐号 + "lovrrneme", // 爱人名字 +#endif + +#ifdef _GM_ITEM + "gmfunction", // 玩家GM命令 +#endif +}; + +INLINE BOOL _CHAR_CHECKINDEX( char *file, int line, int index ) +{ + if( CHAR_charanum<=index || index<0 ) { + return FALSE; + } + if( CHAR_chara[(index)].use == FALSE ) { + return FALSE; + } + return TRUE; +} + +static INLINE BOOL CHAR_CHECKINTDATAINDEX(int index) +{ + if( CHAR_DATAINTNUM<=index || index<0 )return FALSE; + return TRUE; +} + +static INLINE BOOL CHAR_CHECKCHARDATAINDEX(int index) +{ + if( CHAR_DATACHARNUM<=index || index<0 )return FALSE; + return TRUE; +} + +static INLINE BOOL CHAR_CHECKFLGDATAINDEX( int index ) +{ + if( CHAR_FLGNUM<=index || index<0 )return FALSE; + return TRUE; +} + +static INLINE BOOL CHAR_CHECKCHARWORKDATAINDEX(int index) +{ + if( CHAR_WORKDATACHARNUM<=index || index<0 )return FALSE; + return TRUE; +} + +static INLINE BOOL CHAR_CHECKCHARFUNCTABLEINDEX(int index) +{ + if( CHAR_FUNCTABLENUM <= index || index < 0 )return FALSE; + return TRUE; +} + +INLINE BOOL _CHAR_CHECKITEMINDEX( char *file, int line, int charaindex, int ti ) +{ + if( 0 <= ti && ti < CHAR_MAXITEMHAVE ) return TRUE; + return FALSE; +} + +static INLINE BOOL CHAR_CHECKSKILLINDEX( int skillindex ) +{ + if( skillindex<0 || CHAR_SKILLMAXHAVE <= skillindex )return FALSE; + return TRUE; +} +static INLINE BOOL CHAR_CHECKADDRESSBOOKINDEX( int aindex ) +{ + if( aindex < 0 || ADDRESSBOOK_MAX <= aindex ) return FALSE; + return TRUE; +} + +static INLINE BOOL CHAR_CHECKTITLEINDEX( int titleindex ) +{ + if( titleindex<0 || CHAR_TITLEMAXHAVE <= titleindex )return FALSE; + return TRUE; +} + +INLINE BOOL _CHAR_CHECKPETINDEX( char *file, int line, int petindex ) +{ + if( petindex < 0 || CHAR_MAXPETHAVE <= petindex ) { + if( petindex != -1 ) { + print( "err %s:%d \n", file, line); + } + return FALSE; + } + return TRUE; +} + +INLINE BOOL _CHAR_CHECKPOOLPETINDEX( char *file, int line, int petindex ) +{ + if( petindex < 0 || CHAR_MAXPOOLPETHAVE <= petindex ) { + + if( petindex != -1 ) { + print( "err %s:%d :%d \n", file, line, petindex); + } + return FALSE; + } + return TRUE; +} + +INLINE BOOL _CHAR_CHECKPETSKILLINDEX( char *file, int line, int havepetskillindex ) +{ + if( havepetskillindex < 0 || CHAR_MAXPETSKILLHAVE <= havepetskillindex ) { + if( havepetskillindex != -1 ) { + print( "err %s:%d \n", file, line); + } + return FALSE; + } + return TRUE; +} + +INLINE int CHAR_getIntStrict( int index ,CHAR_DATAINT element,int* error) +{ + if(!CHAR_CHECKINDEX(index))return *error=FALSE; + if(!CHAR_CHECKINTDATAINDEX(element))return *error=FALSE; + return CHAR_chara[index].data[element]; +} + +INLINE int CHAR_getInt( int index , CHAR_DATAINT element) +{ + return CHAR_chara[index].data[element]; +} + +INLINE int CHAR_setIntStrict( int index ,CHAR_DATAINT element,int data, + int* error) +{ + int buf; + if(!CHAR_CHECKINDEX(index))return *error=FALSE; + if(!CHAR_CHECKINTDATAINDEX(element))return *error=FALSE; + buf = CHAR_chara[index].data[element]; + CHAR_chara[index].data[element] = data; + return buf; +} + +INLINE int _CHAR_setInt( char *file, int line, int index ,CHAR_DATAINT element, int data) +{ + int buf; + if( !CHAR_CHECKINDEX( index) ) { + //print(" err CHAR_setInt index:%d. !:%s-%d\n", index, file, line); + return -1; + } + if( CHAR_DATAPLACENUMBER > element || element >= CHAR_DATAINTNUM ) { + print(" err CHAR_setInt element:%d.%s :%s-%d\n", element, CHAR_getChar( index, CHAR_CDKEY),file, line); + return -1; + } + buf = CHAR_chara[index].data[element]; + CHAR_chara[index].data[element] = data; + return buf; +} + +#ifdef _FIX_SETWORKINT +INLINE int _CHAR_getWorkInt( char *file, int line, int index ,CHAR_WORKDATAINT element) +#else +INLINE int CHAR_getWorkInt( int index ,CHAR_WORKDATAINT element) +#endif +{ + if( CHAR_WORKBATTLEMODE > element || element >= CHAR_WORKDATAINTNUM ) { + print("err Get WorkInt element=%d :: file:%s %d!\n", element, file, line); + return -1; + } + return CHAR_chara[index].workint[element]; +} + +#ifdef _FIX_SETWORKINT +INLINE int _CHAR_setWorkInt( char *file, int line, int index ,CHAR_WORKDATAINT element, int data) +#else +INLINE int CHAR_setWorkInt( int index ,CHAR_WORKDATAINT element, int data) +#endif +{ + int buf; + if( !CHAR_CHECKINDEX( index) ) { + //print( "err Set WorkInt index:%d:%s[%d].\n", index, file, line); + return -1; + } + if( CHAR_WORKBATTLEMODE > element || element >= CHAR_WORKDATAINTNUM ) { +#ifdef _FIX_SETWORKINT + print("err Set WorkInt element=%d.%s:%s[%d]!\n", element, CHAR_getChar( index, CHAR_CDKEY), file, line); +#else + print("err Set WorkInt element=%d.%s!\n", element, CHAR_getChar( index, CHAR_CDKEY) ); +#endif + return -1; + } + + buf = CHAR_chara[index].workint[element]; + CHAR_chara[index].workint[element] = data; + return buf; +} + +INLINE char* _CHAR_getChar( char *file, int line, int index ,CHAR_DATACHAR element ) +{ + if(!CHAR_CHECKINDEX(index)) { + print( "err _CHAR_getChar %s:%d index[%d] !!\n", file, line, index); + return NULL; + } + if(!CHAR_CHECKCHARDATAINDEX(element)) { + print( "err _CHAR_getChar %s:%d element[%d] !!\n", file, line, element); + return NULL; + } + return CHAR_chara[index].string[element].string; +} + +INLINE BOOL _CHAR_setChar( char *file, int line, int index ,CHAR_DATACHAR element, char* new ) +{ + if(!CHAR_CHECKINDEX(index)) { + print( "err _CHAR_setChar %s:%d !\n", file, line); + return FALSE; + } + if(!CHAR_CHECKCHARDATAINDEX(element)) { + print( "err _CHAR_setChar %s:%d !\n", file, line); + return FALSE; + } + strcpysafe( CHAR_chara[index].string[element].string, + sizeof(CHAR_chara[index].string[element].string), + new ); + return TRUE; +} + +static INLINE char* CHAR_getCharfunctable( int index ,CHAR_FUNCTABLE element ) +{ + if(!CHAR_CHECKINDEX(index))return NULL; + if(!CHAR_CHECKCHARFUNCTABLEINDEX(element))return NULL; + + + return CHAR_chara[index].charfunctable[element].string; +} + +INLINE char* _CHAR_getWorkChar( char *file, int line, int index ,CHAR_WORKDATACHAR element ) +{ + if(!CHAR_CHECKINDEX(index)) { + print( "err %s:%d \n", file, line); + return NULL; + } + if(!CHAR_CHECKCHARWORKDATAINDEX(element)) { + print( "err %s:%d \n", file, line); + return NULL; + } + return CHAR_chara[index].workchar[element].string; +} + +INLINE BOOL _CHAR_setWorkChar( char *file, int line, int index ,CHAR_WORKDATACHAR element, + char* new ) +{ + if(!CHAR_CHECKINDEX(index)) { + print( "err %s:%d \n", file, line); + return FALSE; + } + if(!CHAR_CHECKCHARWORKDATAINDEX(element)) { + print( "err %s:%d \n", file, line); + return FALSE; + } + strcpysafe( CHAR_chara[index].workchar[element].string, + sizeof(CHAR_chara[index].workchar[element].string), + new ); + return TRUE; +} + +static char CHAR_flgbitmaskpattern[]= +{ + 0x01, + 0x02, + 0x04, + 0x08, + 0x10, + 0x20, + 0x40, + 0x80, +}; + +INLINE BOOL _CHAR_getFlg( char *file, int line, int index ,CHAR_DATAFLG element ) +{ + int elementnum; + int bitnum; + if(!CHAR_CHECKINDEX(index)) { + //print( "err %s:%d from %s:%d \n", __FILE__, __LINE__,file, line); + return FALSE; + } + if(!CHAR_CHECKFLGDATAINDEX(element)) { + //print( "err %s:%d from %s:%d \n", __FILE__, __LINE__,file, line); + return FALSE; + } + elementnum = element / (sizeof( char )*8); + bitnum = element % (sizeof( char )*8); + + + if( CHAR_chara[index].flg[elementnum] + & CHAR_flgbitmaskpattern[bitnum]) + return TRUE; + else + return FALSE; + +} + +INLINE char _CHAR_setFlg( char *file, int line, int index , CHAR_DATACHAR element, int newdata ) +{ + int buf; + int elementnum; + int bitnum; + char bitpattern; + + if(!CHAR_CHECKINDEX(index)) { + print( "err %s:%d \n", file, line); + return FALSE; + } + if(!CHAR_CHECKFLGDATAINDEX(element)) { + print( "err %s:%d \n", file, line); + return FALSE; + } + elementnum = element / (sizeof( char )*8); + bitnum = element % (sizeof( char )*8); + + /* 樯及袄毛转 */ + buf = CHAR_chara[index].flg[elementnum] + & CHAR_flgbitmaskpattern[bitnum]; + + if( newdata != 0 ){ + bitpattern = CHAR_flgbitmaskpattern[bitnum]; + CHAR_chara[index].flg[elementnum] |= bitpattern; + + }else{ + bitpattern = ~CHAR_flgbitmaskpattern[bitnum]; + CHAR_chara[index].flg[elementnum] &= bitpattern; + } + + if( buf )return 1; + else return 0; +} + +INLINE int _CHAR_getItemIndex( char *file, int line, int charaindex ,int ti) +{ + if( !CHAR_CHECKINDEX( charaindex)) { + print( "err %s:%d from %s:%d\n", __FILE__, __LINE__,file, line); + return -1; + } + if( !CHAR_CHECKITEMINDEX( charaindex, ti) ){ + print( "err %s:%d from %s:%d \n", __FILE__, __LINE__,file, line); + return -1; + } + return CHAR_chara[charaindex].indexOfExistItems[ti]; +} + +INLINE int _CHAR_setItemIndex( char *file, int line, int index ,int iindex,int id ) +{ + int buf; + if( !CHAR_CHECKINDEX(index)) { + print( "err %s:%d \n", file, line); + return -1; + } + if( CHAR_MAXITEMHAVE <= iindex || iindex < 0 ) { + print( "err %s:%d \n", file, line); + return -1; + } + +// CoolFish: 2001/10/12 +#ifdef _UNIQUE_P_I + if ( (id != -1) && (ITEM_getChar(id, ITEM_UNIQUECODE) != NULL) ) // shan add hjj + ITEM_setItemUniCode(id); +#endif + +#ifdef _ITEM_TIME_LIMIT + if( (id != -1) && ITEM_getWorkInt( id, ITEM_WORKTIMELIMIT) == -1 ){ + char *arg, *p=NULL, tmp[16]=""; + long iTmp; + time_t iTime; + + time(&iTime); + iTmp = iTime; + arg = ITEM_getChar( id, ITEM_ARGUMENT); + if(arg && (p=strstr( arg, "Time")) != NULL ){ + //andy_log + print("%s setTime arg:%s \n", ITEM_getChar( id, ITEM_NAME), arg); + strcpy( tmp, (p+4)); + iTmp += atoi(tmp)*60; + ITEM_setWorkInt( id, ITEM_WORKTIMELIMIT, iTmp); + } + } +#endif + buf = CHAR_chara[index].indexOfExistItems[iindex]; + CHAR_chara[index].indexOfExistItems[iindex] = id; + return buf; +} +INLINE int _CHAR_getPoolItemIndex( char *file, int line, int index ,int iindex) +{ + if( !CHAR_CHECKINDEX(index)) { + print( "err %s:%d from %s:%d\n", __FILE__, __LINE__,file, line); + return -1; + } + if( CHAR_MAXPOOLITEMHAVE <= iindex || iindex < 0 ) { + print( "err %s:%d from %s:%d \n", __FILE__, __LINE__,file, line); + return -1; + } + return CHAR_chara[index].indexOfExistPoolItems[iindex]; +} +INLINE int _CHAR_setPoolItemIndex( char *file, int line, int index ,int iindex,int id ) +{ + int buf; + if( !CHAR_CHECKINDEX(index)) { + print( "err %s:%d \n", file, line); + return -1; + } + if( CHAR_MAXPOOLITEMHAVE <= iindex || iindex < 0 ) { + print( "err %s:%d \n", file, line); + return -1; + } + buf = CHAR_chara[index].indexOfExistPoolItems[iindex]; + CHAR_chara[index].indexOfExistPoolItems[iindex] = id; + return buf; +} + +INLINE BOOL CHAR_setAddressbookEntry( int index , int aindex , + ADDRESSBOOK_entry *a ) +{ + if( !CHAR_CHECKINDEX(index))return FALSE; + if( !CHAR_CHECKADDRESSBOOKINDEX( aindex ))return FALSE; + + memcpy( & CHAR_chara[index].addressBook[aindex] , a , + sizeof(ADDRESSBOOK_entry )); + + return TRUE; +} + +INLINE ADDRESSBOOK_entry* CHAR_getAddressbookEntry( int index , + int aindex) +{ + if( !CHAR_CHECKINDEX(index))return (ADDRESSBOOK_entry*)NULL; + if( !CHAR_CHECKADDRESSBOOKINDEX( aindex )) + return (ADDRESSBOOK_entry*) NULL; + + return &CHAR_chara[index].addressBook[aindex]; +} + +INLINE Char* CHAR_getCharPointer( int index ) +{ + if( !CHAR_CHECKINDEX(index) )return NULL; + return &CHAR_chara[index]; +} + +INLINE int CHAR_getCharNum( void ) +{ + return CHAR_charanum; +} + +INLINE int CHAR_getPlayerMaxNum( void ) +{ + return CHAR_playernum; +} + +INLINE int CHAR_getPetMaxNum( void ) +{ + return CHAR_petnum; +} +INLINE int CHAR_getOthersMaxNum( void ) +{ + return CHAR_othersnum; +} + +INLINE BOOL CHAR_getCharUse( int index ) +{ + if( !CHAR_CHECKINDEX(index)) + return FALSE; + return CHAR_chara[index].use; +} + +INLINE CHAR_HaveSkill* CHAR_getCharHaveSkill( int index,int sindex ) +{ + if( !CHAR_CHECKINDEX(index))return NULL; + if( !CHAR_CHECKSKILLINDEX(sindex))return NULL; + return &CHAR_chara[index].haveSkill[sindex]; +} +//------------------------------------------------------------------------ +//人物index 技能位置 索引 +INLINE int _CHAR_getIntPSkill( char *file, int line, int index, int skillti, SKILL_DATAINT ti) +{ + if( !CHAR_CHECKINDEX( index) ) return -1; + if( !CHAR_CHECKSKILLINDEX( skillti) ) return -1; + if( ti >= SKILL_DATAINTNUM || ti < 0 ){ + print(" getIntPSkill() SKILL_DATAINT (%d) err -%s:%d!!\n", ti , file, line); + return -1; + } + if( CHAR_chara[index].haveSkill[skillti].skill.data[ti] <= 0 ) return -1; + return CHAR_chara[index].haveSkill[skillti].skill.data[ti]; +} +//人物index 技能位置 索引 欲设定值 +INLINE void _CHAR_setIntPSkill( char *file, int line, int index, int skillti, SKILL_DATAINT ti, int data) +{ + if( !CHAR_CHECKINDEX( index) ) return; + if( !CHAR_CHECKSKILLINDEX( skillti) ) return; + if( ti >= SKILL_DATAINTNUM || ti < 0 ){ + print(" getIntPSkill() SKILL_DATAINT (%d) err -%s:%d!!\n", ti , file, line); + return; + } +// if( CHAR_chara[index].haveSkill[sindex].use > 0 ) + CHAR_chara[index].haveSkill[skillti].skill.data[ti] = data; +} +//------------------------------------------------------------------------ + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 +int CHAR_getCharSkill( int index,int sindex ) +{ + CHAR_HaveSkill* hskill; + + hskill = CHAR_getCharHaveSkill( index, sindex ); + + if(hskill != NULL) + return SKILL_getInt( &hskill->skill, SKILL_IDENTITY); + else + return -1; + +} + +int CHAR_setCharSkill( int index,int sindex, int new ) +{ + CHAR_HaveSkill* hskill; + + if( !CHAR_CHECKINDEX(index)) return -1; + if( !CHAR_CHECKSKILLINDEX(sindex)) return -1; + + hskill = CHAR_getCharHaveSkill( index, sindex ); + SKILL_setInt( &hskill->skill, SKILL_IDENTITY, new); + return TRUE; +} +#endif + +INLINE int CHAR_getCharHaveTitle( int charaindex,int tindex ) +{ + if( !CHAR_CHECKINDEX(charaindex))return 0; + if( !CHAR_CHECKTITLEINDEX(tindex))return 0; + return CHAR_chara[charaindex].indexOfHaveTitle[tindex]; +} + +INLINE int CHAR_setCharHaveTitle( int charaindex,int tindex, int new ) +{ + int ret; + if( !CHAR_CHECKINDEX(charaindex))return 0; + if( !CHAR_CHECKTITLEINDEX(tindex))return 0; + if( new != -1 ) + if( TITLE_getTitleIndex( new) == -1 ) return 0; + ret = CHAR_getCharHaveTitle( charaindex,tindex); + CHAR_chara[charaindex].indexOfHaveTitle[tindex] = new; + return ret; +} + +INLINE int CHAR_getCharPet( int charaindex,int petindex ) +{ + if( !CHAR_CHECKINDEX(charaindex))return -1; + if( !CHAR_CHECKPETINDEX(petindex))return -1; + return CHAR_chara[charaindex].unionTable.indexOfPet[petindex]; +} + +INLINE int CHAR_setCharPet( int charaindex,int petindex, int new ) +{ + int ret; + if( !CHAR_CHECKINDEX(charaindex))return -1; + if( !CHAR_CHECKPETINDEX(petindex))return -1; + ret = CHAR_getCharPet( charaindex,petindex); + +// CoolFish: 2001/10/12 +#ifdef _UNIQUE_P_I + if (new != -1) + CHAR_setPetUniCode(new); +#endif + + CHAR_chara[charaindex].unionTable.indexOfPet[petindex] = new; + return ret; +} + +INLINE int CHAR_getCharPoolPet( int charaindex,int petindex ) +{ + if( !CHAR_CHECKINDEX(charaindex))return -1; + if( !CHAR_CHECKPOOLPETINDEX(petindex))return -1; + return CHAR_chara[charaindex].indexOfPoolPet[petindex]; +} + +INLINE int CHAR_setCharPoolPet( int charaindex,int petindex, int new ) +{ + int ret; + if( !CHAR_CHECKINDEX(charaindex))return -1; + if( !CHAR_CHECKPOOLPETINDEX(petindex))return -1; + ret = CHAR_getCharPoolPet( charaindex,petindex); + + CHAR_chara[charaindex].indexOfPoolPet[petindex] = new; + return ret; +} + +int CHAR_getCharPetElement( int charaindex ) +{ + int i; + if( !CHAR_CHECKINDEX(charaindex))return -1; + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ) { + if( CHAR_getCharPet( charaindex,i) == -1 ) break; + } + return ( i == CHAR_MAXPETHAVE ? -1:i ); + +} + +int CHAR_getCharPoolPetElement( int charaindex ) +{ + int i; + int limit; + if( !CHAR_CHECKINDEX(charaindex))return -1; + + //andy_reEdit 2003/09/18 + limit = (CHAR_getInt(charaindex,CHAR_TRANSMIGRATION)*2)+5; + limit = min( limit, CHAR_MAXPOOLPETHAVE); + for( i = 0; i < limit; i ++ ) { + if( CHAR_getCharPoolPet( charaindex,i) == -1 ) break; + } + return ( i == limit ? -1:i ); + +} + +int CHAR_getCharPoolItemIndexElement( int charaindex ) +{ + int i; + int limit; + if( !CHAR_CHECKINDEX(charaindex))return -1; + //andy_reEdit 2003/09/18 + limit = (CHAR_getInt(charaindex,CHAR_TRANSMIGRATION)*4)+10; + limit = min( limit, CHAR_MAXPOOLITEMHAVE); + for( i = 0; i < limit; i ++ ) { + if( CHAR_getPoolItemIndex( charaindex,i) == -1 ) break; + } + // Robin fix + //return ( i == CHAR_MAXPOOLITEMHAVE ? -1:i ); + return ( i >= limit ? -1:i ); + +} + +int CHAR_getEmptyCharPoolItemIndexNum( int charaindex) +{ + int i, cnt = 0; + int limit; + if( !CHAR_CHECKINDEX(charaindex))return 0; + //andy_reEdit 2003/09/18 + limit = (CHAR_getInt(charaindex,CHAR_TRANSMIGRATION)*4)+10; + limit = min( limit, CHAR_MAXPOOLITEMHAVE); + + for( i = 0; i < limit; i ++ ) { + if( CHAR_getPoolItemIndex( charaindex, i) == -1 ) cnt++; + } + return cnt; +} + +INLINE int _CHAR_getPetSkill( char *file, int line, int petindex, int havepetskillindex ) +{ + if( !CHAR_CHECKINDEX(petindex)) { + print( "err %s:%d from %s:%d\n", __FILE__, __LINE__, file, line); + return -1; + } + if( !CHAR_CHECKPETSKILLINDEX(havepetskillindex)) { + print( "err %s:%d from %s:%d\n", __FILE__, __LINE__, file, line); + return -1; + } + return CHAR_chara[petindex].unionTable.indexOfPetskill[havepetskillindex]; +} + +INLINE int _CHAR_setPetSkill( char *file, int line, int petindex,int havepetskillindex, int new ) +{ + int ret; + if( !CHAR_CHECKINDEX(petindex)) { + print( "err %s:%d from %s:%d\n", __FILE__, __LINE__, file, line); + return -1; + } + if( !CHAR_CHECKPETSKILLINDEX(havepetskillindex)) { + print( "err %s:%d from %s:%d\n", __FILE__, __LINE__, file, line); + return -1; + } + ret = CHAR_getPetSkill( petindex,havepetskillindex); + CHAR_chara[petindex].unionTable.indexOfPetskill[havepetskillindex] = new; + return ret; +} + +int _CHAR_getPetSkillElement( char *file, int line, int petindex ) +{ + int i; + if( !CHAR_CHECKINDEX(petindex)) { + print( "err %s:%d from %s:%d\n", __FILE__, __LINE__, file, line); + return -1; + } + for( i = 0; i < CHAR_MAXPETSKILLHAVE; i ++ ) { + if( CHAR_getPetSkill( petindex,i) == -1 ) break; + } + return ( i == CHAR_MAXPETSKILLHAVE ? -1:i ); + +} + +INLINE int CHAR_getCharMakeSequenceNumber( int charaindex ) +{ + if( !CHAR_CHECKINDEX(charaindex))return -1; + return CHAR_chara[charaindex].CharMakeSequenceNumber; +} + +void CHAR_constructFunctable( int charaindex ) +{ + int i; + if( !CHAR_CHECKINDEX(charaindex))return; + for( i=CHAR_FIRSTFUNCTION; i < CHAR_LASTFUNCTION ; i++ ) + CHAR_chara[charaindex].functable[i-CHAR_FIRSTFUNCTION] + = getFunctionPointerFromName( CHAR_getCharfunctable( charaindex,i ) ); +} + +void* CHAR_getFunctionPointer( int charaindex, int functype ) +{ + if( !CHAR_CHECKINDEX(charaindex) )return NULL; + if( functype < CHAR_FIRSTFUNCTION || functype >= CHAR_LASTFUNCTION ) + return NULL; + + return CHAR_chara[charaindex].functable[functype]; +} + +BOOL CHAR_initCharArray( int pnum, int petnum,int onum ) +{ + int i; + + BOOL CHAR_checksetdata( void ); + if( CHAR_checksetdata() == FALSE ){ + print(" err CHAR_checksetdata() FALSE !!\n"); + return FALSE; + } + + //andy_log + print("#"); + + CHAR_initSeekGraphicNumberFromString(); + CHAR_initChatMagic(); + CHAR_charanum = pnum + petnum +onum; + + //andy_log + print("#"); + + CHAR_chara = allocateMemory( sizeof( Char ) * CHAR_charanum ); + if( CHAR_chara == NULL ){ + print("无法分配人物内存 !!\n"); + return FALSE; + } + + + //andy_log + print("人物内存: %4.2f...", ((float)sizeof( Char )*CHAR_charanum)/1024); + + for( i = 0 ; i < CHAR_charanum ; i ++ ){ + memset( &CHAR_chara[i], 0 , sizeof( Char )); + + } + for( i = 0 ; i < pnum ; i ++ ){ +#ifdef _NPC_SEPARATEDATA + CHAR_InitCharTempNum( &CHAR_chara[i] ); +#endif + } + CHAR_playernum = pnum; + CHAR_petnum = petnum; + CHAR_othersnum = onum; + + return TRUE; +} + +BOOL CHAR_endCharArray( void ) +{ +#ifdef _NPC_SEPARATEDATA + CHAR_EndCharTempNum(); +#endif + freeMemory( CHAR_chara ); + CHAR_charanum = 0; + return TRUE; +} + +BOOL CHAR_getCharOnArrayPercentage( int mode, int *max, int *min, int *cnt) +{ + int po=0, Dnums=0; + po = initCharCounter[0].endcnt; + *cnt = -1; + while( 1){ + if( !CHAR_chara[po].use ){ + }else{ + Dnums++; + } + po++; + if( po >= initCharCounter[mode].endcnt ){ + break; + } + } + *cnt = Dnums; + *max = initCharCounter[mode].endcnt - initCharCounter[mode].startcnt; + *min = 0; + + return TRUE; +} + +int CHAR_initCharOneArray( Char* ch ) +{ + int i; + int mode; + int ret = TRUE; + int first; + static unsigned int CharMakeSequenceNumber = 0; + if( initCharCounter[0].startcnt == -1 ) { + initCharCounter[0].startcnt = 0; + initCharCounter[0].cnt = initCharCounter[0].startcnt; + initCharCounter[0].endcnt = CHAR_playernum; + + initCharCounter[1].startcnt = initCharCounter[0].endcnt; + initCharCounter[1].cnt = initCharCounter[0].endcnt; + initCharCounter[1].endcnt = CHAR_playernum + CHAR_petnum; + + initCharCounter[2].startcnt = initCharCounter[1].endcnt; + initCharCounter[2].cnt = initCharCounter[1].endcnt; + initCharCounter[2].endcnt = CHAR_charanum; + } + if( ch->data[CHAR_WHICHTYPE] == CHAR_TYPEPLAYER ){ + mode = 0; + }else if( CHAR_TYPEPET == ch->data[CHAR_WHICHTYPE] ) { + mode = 1; + }else{ + mode = 2; + } + i = initCharCounter[mode].cnt; + first = TRUE; + while( 1 ){ + if( !first && i >= initCharCounter[mode].cnt ) { + ret = FALSE; + break; + } + if( CHAR_chara[i].use == FALSE ){ + ret = TRUE; + break; + }else{ + i++; + if( i >= initCharCounter[mode].endcnt ){ + i = initCharCounter[mode].startcnt; + first = FALSE; + } + } + } + if( ret ){ + typedef BOOL (*INITFUNC)(int index); + INITFUNC initfunc; + +#ifdef _NPC_SEPARATEDATA + ch->tempint = CHAR_chara[i].tempint; + CHAR_getDefaultCharTempNum( ch); +#endif + memset( &CHAR_chara[i] , 0, sizeof( Char ) ); + memcpy( &CHAR_chara[i] , ch , sizeof( Char ) ); + + initfunc = (INITFUNC)getFunctionPointerFromName( + ch->charfunctable[CHAR_INITFUNC].string ); + if( initfunc ) { + if( initfunc( i ) == FALSE ){ + CHAR_chara[i].use = FALSE; + ret = FALSE; + } + } + if( ret ){ + CHAR_chara[i].use = TRUE; + CHAR_constructFunctable( i ); + if( i + 1 >= initCharCounter[mode].endcnt ) { + initCharCounter[mode].cnt + = initCharCounter[mode].startcnt; + }else { + initCharCounter[mode].cnt = i+1; + } + CHAR_chara[i].CharMakeSequenceNumber = CharMakeSequenceNumber++; + if( CharMakeSequenceNumber == 0xffffffff) CharMakeSequenceNumber = 0; + } + }else{ + fprint( "Error: Char full\n" ); + } + return ret ? i: -1; +} + +void CHAR_removeHaveItem( Char* ch ) +{ + int i; + if( ch == NULL )return; + for( i=0 ; iindexOfExistItems[i]; + ch->indexOfExistItems[i] = -1; + ITEM_endExistItemsOne( itemindex ); + } +} + +void CHAR_removeHavePoolItem( Char* ch ) +{ + int i; + if( ch == NULL )return; + for( i=0 ; iindexOfExistPoolItems[i]; + ch->indexOfExistPoolItems[i] = -1; + ITEM_endExistItemsOne( itemindex ); + } +} + +void CHAR_endCharData( Char* ch ) +{ + if( ch == NULL ){ + return; + } + CHAR_removeHaveItem( ch ); + CHAR_removeHavePoolItem( ch); + +#ifdef _CHAR_POOLITEM +// CHAR_removeHaveDepotItem( ch ); +#endif +#ifdef _CHAR_POOLPET +// CHAR_removeHaveDepotPet( ch ); +#endif + + ch->use = FALSE; +} + +void CHAR_endCharOneArray( int index ) +{ + Char* ch = NULL; + if( !CHAR_CHECKINDEX( index) ) return; + ch = CHAR_getCharPointer(index); + + if( ch == NULL ){ + print( "CHAR_endCharOneArray err ch == NULL :%d\n", index); + return; + } + CHAR_endCharData( ch ); +} +static char CHAR_dataString[STRINGBUFSIZ*16*2]; +BOOL CHAR_checksetdata( void ) +{ + int i; + char* strings[CHAR_DATAINTNUM + CHAR_DATACHARNUM]; + int stringnum=0; + for(i = 0; i < CHAR_DATAINTNUM ; i ++ ){ + if( CHAR_setintdata[i][0] != '#' ) + strings[stringnum++] = CHAR_setintdata[i]; + } + for( i = 0 ; i < CHAR_DATACHARNUM ; i ++ ){ + if( CHAR_setchardata[i][0] != '#' ) + strings[stringnum++] = CHAR_setchardata[i]; + } + if( ! checkStringsUnique( strings, stringnum , 1 ) ){ + fprint( "set????data is overlapped.\nIt is not allowed\n"); + return FALSE; + } + return TRUE; +} + +#define FLGRESERVESTRING "flg" +#define ITEMRESERVESTRING "item" +#define POOLITEMRESERVESTRING "poolitem" +#define SKILLRESERVESTRING "skill" +#define TITLERESERVESTRING "title" +#define ADDRESSBOOKRESERVESTRING "adr" +#define PETSERVERSTRING "pet" +#define PETITEMRESERVESTRING "pitem" +#define PETSKILLSERVERSTRING "psk" +#define POOLPETSERVERSTRING "poolpet" +#define ITEMPOOLRESERVESTRING "itempool" + +#define DATAENDCHECKPOINT "DATAEND" + + + + +#ifdef _CHAR_POOLITEM +#define DEPOTITEMRESERVESTRING "Depotitem" +#endif +#ifdef _CHAR_POOLPET +#define DEPOTPETRESERVESTRING "Depotpet" +#endif + +char* CHAR_makeStringFromCharData( Char* one ) +{ + int i; + int petnum; + int strlength=0; + + if (!one) return NULL; + + memset( CHAR_dataString, 0, sizeof(CHAR_dataString)); + for( i = 0 ; i < CHAR_DATAINTNUM ; i ++ ){ + char linedata[256]; + snprintf( linedata , sizeof(linedata), + "%s=%d" CHAR_DELIMITER, + CHAR_setintdata[i], + one->data[i] ); + strcpysafe( &CHAR_dataString[strlength], + sizeof( CHAR_dataString ) - strlength, + linedata ); + strlength += strlen( linedata ); + if( strlength > sizeof( CHAR_dataString ) ) { + fprint( "err chardata buffer over\n"); + goto RETURN; + } + } + for( i = 0 ; i < CHAR_DATACHARNUM ; i ++ ){ + char linedata[256]; + char escapebuffer[256]; + snprintf( linedata , sizeof(linedata), + "%s=%s" CHAR_DELIMITER, + CHAR_setchardata[i], + makeEscapeString( one->string[i].string, escapebuffer, + sizeof( escapebuffer) )); + + strcpysafe( &CHAR_dataString[strlength], + sizeof( CHAR_dataString ) - strlength, + linedata ); + strlength += strlen( linedata ); + if( strlength > sizeof( CHAR_dataString ) ) { + fprint( "err chardata buffer over\n"); + goto RETURN; + } + } + for( i = 0 ; i < arraysizeof( one->flg ) ; i ++ ){ + char linedata[128]; + snprintf( linedata , sizeof(linedata), + FLGRESERVESTRING "%d=%d" CHAR_DELIMITER, + i, one->flg[i]); + + strcpysafe( &CHAR_dataString[strlength], + sizeof( CHAR_dataString ) - strlength, + linedata ); + strlength += strlen( linedata ); + if( strlength > sizeof( CHAR_dataString ) ) { + fprint( "err chardata buffer over\n"); + goto RETURN; + } + } + + for( i = 0 ; i < CHAR_SKILLMAXHAVE ; i ++ ){ + char linedata[128]; + char *skillstring=NULL; + if( one->haveSkill[i].use == TRUE) + skillstring = SKILL_makeStringFromSkillData( + &one->haveSkill[i].skill ); + if( skillstring == NULL ) continue; + snprintf( linedata , sizeof( linedata ), + SKILLRESERVESTRING "%d=%s" CHAR_DELIMITER, + i,skillstring ); + strcpysafe( &CHAR_dataString[strlength], + sizeof( CHAR_dataString ) - strlength, + linedata ); + strlength += strlen( linedata ); + if( strlength > sizeof( CHAR_dataString ) ) { + fprint( "err chardata buffer over\n"); + goto RETURN; + } + } + + for( i = 0 ; i < CHAR_MAXITEMHAVE ; i ++ ){ + char linedata[2048]; + char *itemstring=NULL; + if( one->indexOfExistItems[i] != -1 ) + itemstring = ITEM_makeStringFromItemIndex( + one->indexOfExistItems[i], 0); + if( itemstring == NULL )continue; + snprintf( linedata , sizeof( linedata ), + ITEMRESERVESTRING "%d=%s" CHAR_DELIMITER, + i, itemstring); + strcpysafe( &CHAR_dataString[strlength], + sizeof( CHAR_dataString ) - strlength, + linedata ); + + strlength += strlen( linedata ); + if( strlength > sizeof( CHAR_dataString ) ) { + fprint( "err chardata buffer over\n"); + goto RETURN; + } + } + + for( i = 0 ; i < CHAR_MAXPOOLITEMHAVE ; i ++ ){ + char linedata[2048]; + char *itemstring=NULL; + if( one->indexOfExistPoolItems[i] != -1 ) + itemstring = ITEM_makeStringFromItemIndex( + one->indexOfExistPoolItems[i], 0); + if( itemstring == NULL )continue; + snprintf( linedata , sizeof( linedata ), + POOLITEMRESERVESTRING "%d=%s" CHAR_DELIMITER, + i, itemstring); + strcpysafe( &CHAR_dataString[strlength], + sizeof( CHAR_dataString ) - strlength, + linedata ); + strlength += strlen( linedata ); + if( strlength > sizeof( CHAR_dataString ) ) { + fprint( "err chardata buffer over\n"); + goto RETURN; + } + } + + for( i = 0 ; i < CHAR_TITLEMAXHAVE ; i ++ ){ + char linedata[128]; + if( one->indexOfHaveTitle[i]< 0 || one->indexOfHaveTitle[i] >= CHAR_TITLEMAXHAVE ) { + continue; + } + snprintf( linedata , sizeof( linedata ), + TITLERESERVESTRING "%d=%d" CHAR_DELIMITER, + i, one->indexOfHaveTitle[i] ); + strcpysafe( &CHAR_dataString[strlength], + sizeof( CHAR_dataString ) - strlength, + linedata ); + strlength += strlen( linedata ); + if( strlength > sizeof( CHAR_dataString ) ) { + fprint( "err chardata buffer over\n"); + goto RETURN; + } + } + for( i=0 ; i < ADDRESSBOOK_MAX ; i++ ){ + char linedata[512]; + char *p; + p = ADDRESSBOOK_makeAddressbookString(&one->addressBook[i]); + if( strlen( p) == 0 ) { + continue; + } + snprintf( linedata ,sizeof(linedata), + ADDRESSBOOKRESERVESTRING "%d=%s" CHAR_DELIMITER, + i,p + ); + strcpysafe( &CHAR_dataString[strlength], + sizeof( CHAR_dataString ) - strlength, + linedata ); + strlength += strlen( linedata ); + if( strlength > sizeof( CHAR_dataString ) ) { + fprint( "err chardata buffer over\n"); + goto RETURN; + } + } + for( petnum = 0; petnum < CHAR_MAXPETHAVE; petnum ++ ) { + int petindex; + char linedata[4096*2]; + char *petstring; + petindex = one->unionTable.indexOfPet[petnum]; + if( !CHAR_CHECKINDEX(petindex))continue; + petstring = CHAR_makePetStringFromPetIndex( petindex); + if( petstring == NULL ) continue; + snprintf( linedata , sizeof(linedata), + PETSERVERSTRING "%d=%s" CHAR_DELIMITER,petnum,petstring ); + strcpysafe( &CHAR_dataString[strlength], + sizeof( CHAR_dataString ) - strlength, + linedata ); + strlength += strlen( linedata ); + if( strlength > sizeof( CHAR_dataString ) ) { + fprint( "err chardata buffer over\n"); + goto RETURN; + } + } + + for( petnum = 0; petnum < CHAR_MAXPOOLPETHAVE; petnum ++ ) { + int petindex; + char linedata[4096*2]; + char *petstring; + petindex = one->indexOfPoolPet[petnum]; + if( !CHAR_CHECKINDEX(petindex))continue; + petstring = CHAR_makePetStringFromPetIndex( petindex); + if( petstring == NULL ) continue; + + //andy_log + if( strstr( petstring, "name:") == NULL || + strstr( petstring, "ownt:") == NULL ) { + LodBadPetString( "petstring", "poolpet string buffer err:", petnum); + fprint( "ANDY err poolpet string buffer err:\n%s\n", petstring); + goto RETURN; + } + + snprintf( linedata , sizeof(linedata), + POOLPETSERVERSTRING "%d=%s" CHAR_DELIMITER,petnum,petstring ); + + strcpysafe( &CHAR_dataString[strlength], + sizeof( CHAR_dataString ) - strlength, + linedata ); + strlength += strlen( linedata ); + if( strlength > sizeof( CHAR_dataString ) ) { + fprint( "err chardata buffer over\n"); + goto RETURN; + } + } +#ifdef _CHAR_FIXDATADEF + { + char linedata[1024]; + memset( linedata, 0, sizeof(linedata)); + snprintf( linedata , sizeof(linedata), + DATAENDCHECKPOINT "=%d" CHAR_DELIMITER, (int)time(NULL)/1000); + + strcpysafe( &CHAR_dataString[strlength], + sizeof( CHAR_dataString ) - strlength, linedata ); + + if( strlength > sizeof( CHAR_dataString ) ) { + LodBadPetString( "DATAENDCHECKPOINT", "err chardata buffer over", -1); + fprint( "err chardata buffer over:DATAENDCHECKPOINT !\n"); + goto MAKESTRINGERR; + } + } +#endif + +RETURN: + if( strstr( CHAR_dataString, DATAENDCHECKPOINT) == NULL ){ + LodBadPetString( CHAR_dataString, "err mk dataString no end", -1); + } + + return CHAR_dataString; +MAKESTRINGERR: + return NULL; +} + +char* CHAR_makeStringFromCharIndex( int index ) +{ + if( 0 <= index && index <= CHAR_charanum /* index OK*/ + && CHAR_chara[index].use == TRUE ) + /* OK */; + else + return NULL; + return CHAR_makeStringFromCharData(&CHAR_chara[index]); + +} + +BOOL CHAR_makeCharFromStringToArg( char* data, Char* one) +{ + int i; + int readindex=1, rightData=0; + + if( data[0] == '\0' ) + return FALSE; +DebugPoint=51; + { + char name[4096]; + char *sp = strstr( data, "name="); + char *sp2 = strstr( data, "ownt="); + if( sp && sp2 ){ + snprintf( name, sp2-sp-5, "%s", sp+5 ); + print("\n开始登陆人物名称:%s ", name ); + }else + print("\n开始登陆人物名称错误! "); + + if( data[strlen(data)-2] != '\n' ){ + print("\n 登陆错误!:%s ",data+strlen(data)-20 ); + } + + if( strlen(name) > 16 ){ + print("人物名称过长!! 人物名称:%s 长度:%d ", name ,strlen(name) ); + } + } + + memset( one , 0 , sizeof( Char )); +DebugPoint=52; + CHAR_getDefaultChar(one, 0); + // Robin 0726 default RidePet + one->data[CHAR_RIDEPET] = -1; + strcpysafe( one->string[CHAR_FMNAME].string, + sizeof( one->string[CHAR_FMNAME].string), "\0" ); + one->data[CHAR_FMINDEX] = -1; +#ifdef _PETSKILL_BECOMEPIG + one->data[CHAR_BECOMEPIG] = -1; + one->data[CHAR_BECOMEPIG_BBI] = 100250; +#endif + +DebugPoint=53; + while( 1 ){ + BOOL ret; + char linebuf[4096]; + char firstToken[256]; + char secondToken[4096]; + memset( linebuf, 0, sizeof( linebuf)); + memset( firstToken, 0, sizeof( firstToken)); + memset( secondToken, 0, sizeof( secondToken)); +DebugPoint=54; + ret = getStringFromIndexWithDelim( data ,CHAR_DELIMITER, + readindex, + linebuf, sizeof( linebuf ) ); +DebugPoint=55; + if( ret == FALSE )break; + if( linebuf[0] == '#' || + linebuf[0] == '\n' || + linebuf[0] == '\0' ){ + readindex ++; + continue; + } +DebugPoint=56; + ret = getStringFromIndexWithDelim( linebuf , "=" , 1 , + firstToken , + sizeof(firstToken) ); + if( ret == FALSE ) return FALSE; +DebugPoint=57; + strcpysafe( secondToken , sizeof( secondToken ), + linebuf + strlen(firstToken) + strlen("=") ); +DebugPoint=58; + for( i = 0 ; i < CHAR_DATAINTNUM ; i ++ ){ + if( strcmp(firstToken ,CHAR_setintdata[i] ) == 0 ){ + one->data[i] = atoi( secondToken ); + goto NEXT; + } + } +DebugPoint=59; + for( i = 0 ; i < CHAR_DATACHARNUM ; i ++ ){ + if( strcmp( firstToken ,CHAR_setchardata[i] ) == 0 ){ + strcpysafe( one->string[i].string, + sizeof(one->string[i].string), + makeStringFromEscaped(secondToken) ); + if( strlen( one->string[i].string ) > 128 ){ + print(" CHARDATA_to_long!!:%s:%d ", one->string[i].string, strlen( one->string[i].string ) ); + one->string[i].string[0]=0; + } + goto NEXT; + } + } +DebugPoint=60; + if( strncmp( firstToken , FLGRESERVESTRING, + strlen( FLGRESERVESTRING ) ) == 0 ){ + int flgindex; + flgindex = atoi( firstToken+strlen(FLGRESERVESTRING) ); + if( flgindex < 0 || arraysizeof( one->flg ) <= flgindex ) + ; + else + one->flg[flgindex] = atoi( secondToken ); + + goto NEXT; + } +DebugPoint=61; + if( strncmp( firstToken , ITEMRESERVESTRING, + strlen( ITEMRESERVESTRING ) ) == 0 ){ + int itemindex; + if( strcmp( secondToken, NULLITEM) == 0 ) + goto NEXT; + itemindex = atoi( firstToken+strlen(ITEMRESERVESTRING) ); + if( itemindex < 0 || CHAR_MAXITEMHAVE <= itemindex + || one->indexOfExistItems[itemindex] != -1 ){ + ; + }else{ + ITEM_Item itmone; + BOOL ret; + + ret = ITEM_makeExistItemsFromStringToArg( secondToken, &itmone, 0); + + if( ret == TRUE ){ + int existitemindex; + existitemindex = ITEM_initExistItemsOne( &itmone ); + one->indexOfExistItems[itemindex] = existitemindex; + } + } + goto NEXT; + } +DebugPoint=62; + if( strncmp( firstToken , POOLITEMRESERVESTRING, + strlen( POOLITEMRESERVESTRING ) ) == 0 ){ + int itemindex; + if( strcmp( secondToken, NULLITEM) == 0 ) + goto NEXT; + itemindex = atoi( firstToken+strlen(POOLITEMRESERVESTRING) ); + if( itemindex < 0 || CHAR_MAXPOOLITEMHAVE <= itemindex + || one->indexOfExistPoolItems[itemindex] != -1 ){ + ; + }else{ + ITEM_Item itmone; + BOOL ret; + ret = ITEM_makeExistItemsFromStringToArg( secondToken , &itmone, 0 ); + + if( ret == TRUE ){ + int existitemindex; + existitemindex = ITEM_initExistItemsOne( &itmone ); + one->indexOfExistPoolItems[itemindex] = existitemindex; + } + } + goto NEXT; + } +DebugPoint=63; + if( strncmp( firstToken , SKILLRESERVESTRING, + strlen( SKILLRESERVESTRING ) ) == 0 ){ + int skillindex; + if( strcmp( secondToken, NULLSKILL) == 0 ) + goto NEXT; + skillindex =atoi( firstToken+strlen(SKILLRESERVESTRING) ); + if( skillindex < 0 || CHAR_SKILLMAXHAVE <= skillindex + || one->haveSkill[skillindex].use == TRUE ){ + }else{ + BOOL ret; + Skill skillone; + ret=SKILL_makeSkillFromStringToArg(secondToken,&skillone); + + if( ret == TRUE ){ + memcpy( &one->haveSkill[skillindex].skill , &skillone, + sizeof( Skill )); + one->haveSkill[skillindex].use = TRUE; + } + } + goto NEXT; + } +DebugPoint=64; + if( strncmp( firstToken , TITLERESERVESTRING, + strlen( TITLERESERVESTRING ) ) == 0 ){ + int titlenumber=atoi(firstToken+strlen(TITLERESERVESTRING)); + if( titlenumber < 0 || CHAR_TITLEMAXHAVE <= titlenumber ){ + }else{ + int titleindex = atoi( secondToken ); + if( TITLE_getTitleIndex( titleindex) != -1) + one->indexOfHaveTitle[titlenumber] = titleindex; + } + goto NEXT; + } +DebugPoint=65; + if( strncmp( firstToken , ADDRESSBOOKRESERVESTRING, + strlen( ADDRESSBOOKRESERVESTRING ) ) == 0 ){ + int addressnumber = atoi( firstToken + +strlen(ADDRESSBOOKRESERVESTRING)); + if( addressnumber < 0 || ADDRESSBOOK_MAX <= addressnumber ){ + }else{ + ADDRESSBOOK_makeAddressbookEntry( secondToken, + &one + ->addressBook[ + addressnumber]); + } + goto NEXT; + } +DebugPoint=66; + if( strncmp( firstToken , PETSERVERSTRING, + strlen( PETSERVERSTRING ) ) == 0 ){ + Char ch; + int ret; + int petnumber = atoi( firstToken+strlen(PETSERVERSTRING)); + if( !CHAR_CHECKPETINDEX( petnumber)) goto NEXT; + ret = CHAR_makePetFromStringToArg(secondToken,&ch, petnumber); + if( ret == TRUE ){ + int petindex = PET_initCharOneArray( &ch ); + if( petindex < 0 ){ + print( "宠物制作失败。\n"); + } + one->unionTable.indexOfPet[petnumber] = petindex; + goto NEXT; + }else{ + LodBadPetString( data, "错误总计", petnumber); + + fprint( "错误 宠物字符串 无法作成\n"); + return FALSE; + } + } +DebugPoint=67; + if( strncmp( firstToken , POOLPETSERVERSTRING, strlen( POOLPETSERVERSTRING ) ) == 0 ){ + + Char ch; + int ret; + int petnumber = atoi( firstToken+strlen(POOLPETSERVERSTRING)); + if( !CHAR_CHECKPOOLPETINDEX( petnumber)) goto NEXT; + ret = CHAR_makePetFromStringToArg( secondToken, &ch, petnumber); + if( ret == TRUE ) { + int petindex = PET_initCharOneArray( &ch ); + if( petindex < 0 ) { + fprint( "错误 宠物 无法作成\n"); + } + one->indexOfPoolPet[petnumber] = petindex; + goto NEXT; + }else{ + LodBadPetString( data, "err *total", petnumber); + fprint( "错误 合成宠物字符串 无法作成\n"); + return FALSE; + } + } + + if( strncmp( firstToken , DATAENDCHECKPOINT, strlen( DATAENDCHECKPOINT ) ) == 0 ){ + rightData=1; + goto NEXT; + } + + + print( "??? : %s[%s]\n" , linebuf, firstToken ); + NEXT: + readindex++; + } +DebugPoint=68; + // Robin 0913 bad_chardata + { + char name[4096]; + char* sp = strstr( data, "name="); + // shan add + char *sp2 = strstr( data, "ownt="); + if( sp && sp2 ){ + snprintf( name, sp2-sp-5, "%s", sp+5 ); + print("\n登陆成功 人物名称:%s ", name ); + } + else + print("\n登陆成功 人物名称错误! "); + + if( data[strlen(data)-2] != '\n' ){ + print("\n玩家登陆出错! "); + //return FALSE; + } + } +// if( rightData != 1 ){ +// return FALSE; +// } + return TRUE; +} +static char CHAR_petdataString[4096]; + +char *CHAR_makePetStringFromPetIndex( int petindex) +{ + int i; + int strlength = 0; + + memset( CHAR_petdataString, 0, sizeof(CHAR_petdataString)); + + for( i = 0 ; i < CHAR_DATAINTNUM ; i ++ ){ + char linedata[512]; + +#ifdef _SIMPLIFY_PETSTRING + if( CHAR_getInt( petindex, i) == 0 ) continue; +#endif + snprintf( linedata , sizeof(linedata), + "%s:%d" NONCHAR_DELIMITER, CHAR_setintdata[i], CHAR_getInt( petindex,i) ); + strcpysafe( &CHAR_petdataString[strlength], + sizeof( CHAR_petdataString ) - strlength, linedata ); + strlength += strlen( linedata ); + if( strlength > sizeof( CHAR_petdataString ) ) { + fprint( "err petdata buffer over\n"); + return NULL; + } + } + + for( i = 0 ; i < CHAR_DATACHARNUM ; i ++ ){ + char linedata[512]; + char escapebuffer[512]; +#ifdef _SIMPLIFY_PETSTRING + if( *CHAR_getChar( petindex, i) == NULL + && strcmp( CHAR_setchardata[i], "name") + && strcmp( CHAR_setchardata[i], "ownt") ) + continue; +#endif + snprintf( linedata , sizeof(linedata), + "%s:%s" NONCHAR_DELIMITER, + CHAR_setchardata[i], + makeEscapeString( CHAR_getChar(petindex, i), escapebuffer, + sizeof( escapebuffer) )); + + strcpysafe( &CHAR_petdataString[strlength], + sizeof( CHAR_petdataString ) - strlength, + linedata ); + strlength += strlen( linedata ); + if( strlength > sizeof( CHAR_petdataString ) ) { + fprint( "错误 宠物数据缓冲不足\n"); + return NULL; + } + } + + for( i = 0; i < CHAR_MAXPETSKILLHAVE; i ++ ) { + int petskillid; + char linedata[512]; + petskillid = CHAR_getPetSkill( petindex, i); + if( PETSKILL_getPetskillArray( petskillid) == -1 ) continue; + snprintf( linedata , sizeof(linedata), + PETSKILLSERVERSTRING "%d:%d" NONCHAR_DELIMITER,i ,petskillid ); + strcpysafe( &CHAR_petdataString[strlength], + sizeof( CHAR_petdataString ) - strlength, linedata ); + strlength += strlen( linedata ); + if( strlength > sizeof( CHAR_petdataString ) ) { + fprint( "错误 宠物数据缓冲不足\n"); + return NULL; + } + } + +#ifndef _SIMPLIFY_ITEMSTRING + for( i = 0 ; i < CHAR_MAXITEMHAVE ; i ++ ){ + char linedata[2048]; + char *itemstring=NULL; + if( CHAR_getItemIndex( petindex, i) != -1 ) + itemstring = ITEM_makeStringFromItemIndex( + CHAR_getItemIndex( petindex, i), 1); + if( itemstring == NULL )continue; + snprintf( linedata , sizeof( linedata ), + PETITEMRESERVESTRING "%d:%s" NONCHAR_DELIMITER, + i, itemstring); + strcpysafe( &CHAR_petdataString[strlength], + sizeof( CHAR_petdataString ) - strlength, + linedata ); + + strlength += strlen( linedata ); + if( strlength > sizeof( CHAR_petdataString ) ) { + fprint( "错误 宠物数据缓冲不足\n"); + return NULL; + } + } +#endif + + if( strstr( CHAR_petdataString, "name:") == NULL || + strstr( CHAR_petdataString, "ownt:") == NULL ){ + LodBadPetString( CHAR_petdataString, "名字 错误", -1); + } + return CHAR_petdataString; +} +void LodBadPetString( char *data, char *err, int ti) +{ + FILE *fp=NULL; + if( data == NULL || strlen( data) <= 0 ) return; + if( (fp=fopen( "badpetstring.txt", "a+")) == NULL ) return; + fprintf( fp, "ti:%d %s:%s\n", ti, err, data); + + fclose( fp); +} +int CHAR_makePetFromStringToArg( char *src, Char *ch, int ti) +{ + int readnum = 1; + int rc; + BOOL found; + char buff[4096]; + char petfirstToken[256]; + char petsecondToken[4096]; + int i, findE=0; + + memset( ch, 0, sizeof( Char)); + CHAR_getDefaultChar(ch, 31010); + + if( strstr( src, "name:") == NULL || + strstr( src, "ownt:") == NULL ){//findE + LodBadPetString( src, "make name err", ti); + fprint( "err PetString make name err\n"); + return -1; + } + + while( 1 ) { + rc = getStringFromIndexWithDelim( src, NONCHAR_DELIMITER, readnum, buff, sizeof( buff )); + if( rc == TRUE ) { + if( buff[0] == '#' || buff[0] == '\n' || buff[0] == '\0' ){ + readnum ++; + continue; + } + } + if( rc == TRUE ) { + readnum ++; + rc = getStringFromIndexWithDelim( buff , ":" , 1 , + petfirstToken , + sizeof(petfirstToken) ); + if( rc == FALSE ) break; + strcpysafe( petsecondToken , sizeof( petsecondToken ), + buff + strlen(petfirstToken) + strlen(":") ); +// rc = getStringFromIndexWithDelim( buff , ":" , 2 , +// petsecondToken , +// sizeof(petsecondToken) ); + + found = FALSE; + for( i = 0 ; i < CHAR_DATAINTNUM ; i ++ ){ + if( strcmp(petfirstToken ,CHAR_setintdata[i] ) == 0 ){ + ch->data[i] = atoi( petsecondToken ); + found = TRUE; + break; + } + } + if( !found ) { + for( i = 0 ; i < CHAR_DATACHARNUM ; i ++ ){ + if( strcmp( petfirstToken ,CHAR_setchardata[i] ) == 0 ){ + strcpysafe( ch->string[i].string, + sizeof(ch->string[i].string), + makeStringFromEscaped(petsecondToken) ); + found = TRUE; + findE = 1; + break; + } + } + } + if( !found) { +#ifndef _SIMPLIFY_ITEMSTRING + if( strncmp( petfirstToken , PETITEMRESERVESTRING, + strlen( PETITEMRESERVESTRING ) ) == 0 ) + { + int itemindex; + itemindex = atoi( petfirstToken+strlen(PETITEMRESERVESTRING) ); + if( itemindex < 0 || CHAR_MAXITEMHAVE <= itemindex + || ch->indexOfExistItems[itemindex] != -1 ){ + ; + }else{ + ITEM_Item itmone; + BOOL ret; + + ret = ITEM_makeExistItemsFromStringToArg( petsecondToken , + &itmone,1); + + if( ret == TRUE ){ + int existitemindex; + existitemindex = ITEM_initExistItemsOne( &itmone ); + ch->indexOfExistItems[itemindex] = existitemindex; + found = TRUE; + break; + } + } + } +#endif + + } + if( !found ) { + if( strncmp( petfirstToken , PETSKILLSERVERSTRING, + strlen( PETSKILLSERVERSTRING ) ) == 0 ){ + int petskillnum = atoi( petfirstToken + strlen( PETSKILLSERVERSTRING)); + if( CHAR_CHECKPETSKILLINDEX( petskillnum) ) { + int petskillid = atoi( petsecondToken ); + if( PETSKILL_getPetskillArray(petskillid) != -1) { + ch->unionTable.indexOfPetskill[petskillnum] = petskillid; + found = TRUE; + } + } + } + } + if( !found) { + fprint( "makePetFromString err?: %s : %s [%s] \n" , src, buff, petfirstToken ); + } + }else { + break; + } + } + + if( findE == 0 ){//findE + LodBadPetString( src, "make charstr err", ti); + fprint( "err PetString make charstr err\n"); + return -1; + } + + return TRUE; +} + +#ifdef _PERSONAL_FAME // Arminius 8.30: 家族个人声望 + +void CHAR_earnFame(int index, int fame) +{ + int oldfame=CHAR_getInt(index, CHAR_FAME)+fame; +#ifdef _NEW_MANOR_LAW + int momentum = CHAR_getInt(index,CHAR_MOMENTUM) + fame; +#endif + + if (oldfame>MAX_PERSONALFAME) oldfame=MAX_PERSONALFAME; + if (oldfame<0) oldfame=0; + CHAR_setInt(index, CHAR_FAME, oldfame); +#ifdef _NEW_MANOR_LAW + if(momentum > MAX_PERSONAL_MOMENTUM) momentum = MAX_PERSONAL_MOMENTUM; + else if(momentum < 0) momentum = 0; + CHAR_setInt(index,CHAR_MOMENTUM,momentum); +#endif +} +#endif + +// CoolFish: 2001/10/11 Unique Pet Code +#ifdef _UNIQUE_P_I +void CHAR_setPetUniCode(int petindex) +{ + if( strcmp( CHAR_getChar(petindex, CHAR_UNIQUECODE), "" ) == 0 || + strstr( CHAR_getChar(petindex, CHAR_UNIQUECODE), "_" ) != NULL || + strstr( CHAR_getChar(petindex, CHAR_UNIQUECODE), UNIQUE_KEYCODEPET ) == NULL ){ + char petbuf[256]; + time_t t1; + time(&t1); + sprintf(petbuf, "%ld%s%d%d", t1, UNIQUE_KEYCODEPET, getServernumber(), unique_p); + unique_p++; + if (unique_p >= MAX_UNIQUE_P_I) + unique_p = 0; + CHAR_setChar(petindex, CHAR_UNIQUECODE, petbuf); + } +} + +void ITEM_setItemUniCode(int itemindex) +{ + if( strcmp( ITEM_getChar(itemindex, ITEM_UNIQUECODE), "") == 0 || + strstr( ITEM_getChar(itemindex, ITEM_UNIQUECODE), "_") != NULL ){ + char itembuf[256]; + time_t t1; + time(&t1); + + sprintf(itembuf, "%ld%s%d%d%d", t1, "i", unique_i, getServernumber(), UNIQUE_KEYCODEITEM); + + unique_i++; + if (unique_i >= MAX_UNIQUE_P_I) + unique_i = 0; + ITEM_setChar(itemindex, ITEM_UNIQUECODE, itembuf); + } +} + +void CHAR_DetainSameItem( int charaindex, int itemindex) +{ + ITEM_setWorkInt( itemindex, ITEM_WORKCHARAINDEX, 100000); + ITEM_setWorkInt( itemindex, ITEM_WORKOBJINDEX, -1); + + LogItem( + CHAR_getChar( charaindex, CHAR_NAME), + CHAR_getChar( charaindex, CHAR_CDKEY), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID), +#endif + "SysDeleteSame(系统删除重覆道具)", + CHAR_getInt( charaindex, CHAR_FLOOR), + CHAR_getInt( charaindex, CHAR_X), + CHAR_getInt( charaindex, CHAR_Y), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); +// ITEM_endExistItemsOne( itemindex); +} + +void CHAR_DetainSamePet( int charaindex, int petindex) +{ + CHAR_setWorkInt( petindex, CHAR_WORKPLAYERINDEX, 100000); + CHAR_setChar( petindex, CHAR_OWNERCDKEY, "SYS"); + CHAR_setChar( petindex, CHAR_OWNERCHARANAME, "SYS"); + CHAR_complianceParameter( petindex ); + LogPet( + CHAR_getChar( charaindex, CHAR_NAME), + CHAR_getChar( charaindex, CHAR_CDKEY), + CHAR_getChar( petindex, CHAR_NAME), + CHAR_getInt( petindex, CHAR_LV), + "SysDeleteSame(删除重覆宠物)", + CHAR_getInt( charaindex, CHAR_FLOOR), + CHAR_getInt( charaindex, CHAR_X), + CHAR_getInt( charaindex, CHAR_Y), + CHAR_getChar( petindex, CHAR_UNIQUECODE) // shan 2001/12/14 + ); +// CHAR_endCharOneArray( petindex ); +} + +void CHAR_DetainSameUCodePet( int charaindex, int petindex, int Ti) +{ + if( Ti == -1 ){ + int i; + for( i = 0; i < CHAR_MAXPETHAVE; i++ ) { + int pindex = CHAR_getCharPet( charaindex, i); + if( !CHAR_CHECKINDEX( pindex) ) continue; + if( pindex == petindex ) break; + } + if( i >= CHAR_MAXPETHAVE ) return; + CHAR_setCharPet( charaindex, i, -1); + }else{ + CHAR_setCharPet( charaindex, Ti, -1); + } + CHAR_DetainSamePet( charaindex, petindex); +} + +void CHAR_DetainSameUCodePoolPet( int charaindex, int petindex, int Ti) +{ + if( Ti == -1 ){ + int i; + for( i = 0; i < CHAR_MAXPETHAVE; i++ ) { + int pindex = CHAR_getCharPet( charaindex, i); + if( !CHAR_CHECKINDEX( pindex) ) continue; + if( pindex == petindex ) break; + } + if( i >= CHAR_MAXPETHAVE ) return; + CHAR_setCharPoolPet( charaindex, i, -1); + }else{ + CHAR_setCharPoolPet( charaindex, Ti, -1); + } + CHAR_DetainSamePet( charaindex, petindex); +} + +void CHAR_DetainSameUCodeItem( int charaindex, int itemindex, int Ti) +{ + if( Ti == -1 ){ + int i; + for( i = 0; i < CHAR_MAXITEMHAVE; i++ ) { + int iindex = CHAR_getItemIndex( charaindex, i); + if( !ITEM_CHECKINDEX( iindex) ) continue; + if( iindex == itemindex ) break; + } + if( i >= CHAR_MAXITEMHAVE ) return; + CHAR_setItemIndex( charaindex, i, -1); + }else{ + CHAR_setItemIndex( charaindex, Ti, -1); + } + CHAR_DetainSameItem( charaindex, itemindex); +} + +void CHAR_DetainSameUCodePoolItem( int charaindex, int itemindex, int Ti) +{ + if( Ti == -1 ){ + int i; + for( i = 0; i < CHAR_MAXPOOLITEMHAVE; i++ ) { + int iindex = CHAR_getPoolItemIndex( charaindex, i); + if( !ITEM_CHECKINDEX( iindex) ) continue; + if( iindex == itemindex ) break; + } + if( i >= CHAR_MAXPOOLITEMHAVE ) return; + CHAR_setPoolItemIndex( charaindex, i, -1); + }else{ + CHAR_setPoolItemIndex( charaindex, Ti, -1); + } + CHAR_DetainSameItem( charaindex, itemindex); +} + +void Check_P_I_UniCode( int charaindex) +{ +#ifdef _CHECK_UCODE + int i = 0, j = 0; + int petindex, itemindex; + + int MAXPLAYER = CHAR_getPlayerMaxNum(); + int MAXPET = CHAR_getPetMaxNum(); + int MAXITEM = ITEM_getITEM_itemnum(); + + for( i=0; i < CHAR_MAXPETHAVE; i++ ) { + petindex = CHAR_getCharPet( charaindex, i); + if( !CHAR_CHECKINDEX( petindex) ) continue; + for( j=MAXPLAYER; j CHAR_GetOldLevelExp( level+1) ){ + Myexp = 0; + }else if( Myexp >= defexp ){ + Myexp = Myexp - defexp; + } + if( Myexp < 0 ) Myexp = 0; + + CHAR_setInt( charaindex, CHAR_EXP, Myexp); + CHAR_setInt( charaindex, CHAR_OLDEXP, 0); + + CHAR_send_P_StatusString( charaindex ,CHAR_P_STRING_EXP|CHAR_P_STRING_LV); + return Myexp; +} + +INLINE int CHAR_HandleExp( int charaindex ) +{ + int needexp, level, Myexp; + if( !CHAR_CHECKINDEX( charaindex) ) return -1; + level = CHAR_getInt( charaindex, CHAR_LV); + Myexp = CHAR_getInt( charaindex, CHAR_EXP); + if( (needexp = CHAR_GetLevelExp( charaindex, level+1)) < 0 ) return -1; + Myexp = Myexp - needexp; + if( Myexp < 0 ) Myexp = 0; + CHAR_setInt( charaindex, CHAR_EXP, Myexp); + return Myexp; +} +#endif + +#ifdef _FIX_TSKILLCAN +BOOL CHAR_PETSKILLCAN( int toindex) +{ + int i, j, itemindex, petindex; + int FixItem[20]={ + 20270, 20271, 20272, 20273, 20274, + 20275, 20276, 20277, 20278, 20279, + 20280, 20281, 20282, 20283, 20284, + 20287, 20288, 20289, 20290, 20291 + }; + for (i = CHAR_STARTITEMARRAY; i < CHAR_MAXITEMHAVE; i ++) { + itemindex = CHAR_getItemIndex( toindex, i); + if( !ITEM_CHECKINDEX( itemindex)) continue; + for( j=0; j<20; j++){ + if( ITEM_getInt( itemindex, ITEM_ID) == FixItem[j] ){ + ITEM_setInt( itemindex, ITEM_CANMERGEFROM, 0); + } + } + if( ITEM_getInt( itemindex, ITEM_ID) != 1623 )continue; + CHAR_setItemIndex( toindex, i, -1 ); + ITEM_endExistItemsOne( itemindex); + CHAR_sendItemDataOne( toindex, i); + } + + for (i = 0; i < CHAR_MAXPOOLITEMHAVE; i++){ + int itemindex = CHAR_getPoolItemIndex(toindex, i); + if( !ITEM_CHECKINDEX( itemindex)) continue; + for( j=0; j<20; j++){ + if( ITEM_getInt( itemindex, ITEM_ID) == FixItem[j] ){ + ITEM_setInt( itemindex, ITEM_CANMERGEFROM, 0); + } + } + if( ITEM_getInt( itemindex, ITEM_ID) != 1623 )continue; + CHAR_setPoolItemIndex( toindex, i, -1); + ITEM_endExistItemsOne( itemindex); + } + + for( i=0; i < CHAR_MAXPETHAVE; i++) { + char szPet[128]; + BOOL Finds = FALSE; + petindex = CHAR_getCharPet( toindex, i); + if( !CHAR_CHECKINDEX( petindex) ) continue; + + {//清除狂暴攻击 + int j; + for( j=0; j (surplus*mypile) || itempile <= 0 ){ + return -1; + } + + if( mypile >= itempile ){ + ret = CHAR_addItemSpecificItemIndex( charaindex, itemindex); + if( ret < 0 || ret >= CHAR_MAXITEMHAVE ) { + ITEM_endExistItemsOne( itemindex); + return -1; + } + CHAR_sendItemDataOne( charaindex, ret); + }else{ + int newindex[10]={ -1,-1,-1,-1,-1, + -1,-1,-1,-1,-1}; + int i, ti=0, ItemID, MaxPile; + MaxPile = itempile; + ItemID = ITEM_getInt( itemindex, ITEM_ID); + while( MaxPile > 0 ){ + if( ti >= 10 ) return -1; + newindex[ti] = ITEM_makeItemAndRegist( ItemID); + if( !ITEM_CHECKINDEX( newindex[ti]) ) return -1; + if( mypile > MaxPile ) mypile = MaxPile; + ITEM_setInt( newindex[ti], ITEM_USEPILENUMS, mypile); + ti++; + MaxPile -= mypile; + if( MaxPile < 0 ) return -1; + } + for( i=0; i<10; i++ ){ + if( newindex[i] == -1 ) break; + ret = CHAR_addItemSpecificItemIndex( charaindex, newindex[i]); + if( ret < 0 || ret >= CHAR_MAXITEMHAVE ) { + ITEM_endExistItemsOne( newindex[i]); + return -1; + } + CHAR_sendItemDataOne( charaindex, ret); + } + ITEM_endExistItemsOne( itemindex); + } + return ret; +#endif +} + + +INLINE int _CHAR_DelItem( char *file, int line, int charaindex, int ti, int num, int flg) +{ +// char token[256]; + int pilenum; + int itemindex = CHAR_getItemIndex( charaindex , ti ); + if( !ITEM_CHECKINDEX(itemindex) ) return 0; +#ifdef _ITEM_PILENUMS + pilenum = ITEM_getInt( itemindex, ITEM_USEPILENUMS); + if( pilenum < num ) return FALSE; + pilenum = pilenum - num; + ITEM_setInt( itemindex, ITEM_USEPILENUMS, pilenum); + if( pilenum <= 0 ){ +#endif +/* + if( flg == 1 ){ + sprintf( token, "交出%s。", ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW); + } +*/ + CHAR_setItemIndex( charaindex, ti, -1); + ITEM_endExistItemsOne( itemindex); +#ifdef _ITEM_PILENUMS + } +#endif + CHAR_sendItemDataOne( charaindex, ti); + + return 1; +} + +int CHAR_getMaxHaveGold( int charaindex) +{ + int MaxGold; +#ifdef _FIX_MAX_GOLD // WON ADD 增加人物金钱上限 + int trans = CHAR_getInt( charaindex, CHAR_TRANSMIGRATION); + MaxGold = 1000000 + trans*( 1800000); +#else + MaxGold = CHAR_MAXGOLDHAVE; +#endif + + return MaxGold; +} + +INLINE int _CHAR_AddGold( char *file, int line, int charaindex, int gold) +{ + char token[256]; + int MyGold, MaxGold; + + MaxGold = CHAR_getMaxHaveGold( charaindex); + MyGold = CHAR_getInt( charaindex, CHAR_GOLD); + MyGold = (MyGold>MaxGold)?MaxGold:MyGold; + gold = (gold>MaxGold)?MaxGold:gold; + sprintf( token, "得到%d石币", gold); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW); + MyGold += gold; + + if( MyGold > MaxGold ){ + int reGolds=0; + int MyGBGold = CHAR_getInt( charaindex, CHAR_PERSONAGOLD); + reGolds = MyGold - MaxGold; + MyGBGold += reGolds; + MyGBGold = (MyGBGold > CHAR_MAXPERSONAGOLD)?CHAR_MAXPERSONAGOLD:MyGBGold; + CHAR_setInt( charaindex, CHAR_PERSONAGOLD, MyGBGold); + sprintf( token,"存款:%d ,银行剩馀:%d 。", reGolds, CHAR_getInt( charaindex, CHAR_PERSONAGOLD )); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW); + LogBankStone( CHAR_getChar( charaindex, CHAR_NAME ), CHAR_getChar( charaindex, CHAR_CDKEY ), + charaindex, reGolds, + "GB_Bank_save(宝箱)", + CHAR_getInt( charaindex, CHAR_FLOOR), + CHAR_getInt( charaindex, CHAR_X ), CHAR_getInt( charaindex, CHAR_Y ), + CHAR_getInt( charaindex, CHAR_GOLD ), + CHAR_getInt( charaindex, CHAR_PERSONAGOLD ) + ); + MyGold = MaxGold; + } + CHAR_setInt( charaindex, CHAR_GOLD, MyGold); + CHAR_send_P_StatusString( charaindex, CHAR_P_STRING_GOLD); + + return 1; +} + +INLINE int _CHAR_DelGold( char *file, int line, int charaindex, int gold) +{ + char token[256]; + int MyGold, MaxGold; + + MaxGold = CHAR_getMaxHaveGold( charaindex); + MyGold = CHAR_getInt( charaindex, CHAR_GOLD); + MyGold = (MyGold>MaxGold)?MaxGold:MyGold; + gold = (gold>MaxGold)?MaxGold:gold; + + if( MyGold < gold ){ + sprintf( token, "没有足够的石币!(%d石币)", gold); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW); + return 0; + } + MyGold -= gold; + MyGold = ( MyGold < 0 )?0:MyGold; + CHAR_setInt( charaindex, CHAR_GOLD, MyGold); + CHAR_send_P_StatusString( charaindex, CHAR_P_STRING_GOLD); + return 1; +} + + +#ifdef _CHAR_POOLITEM +INLINE int _CHAR_getDepotItemIndex( char *file, int line, int index ,int iindex) +{ + if( !CHAR_CHECKINDEX(index)) { + print( "err %s:%d from %s:%d\n", __FILE__, __LINE__,file, line); + return -1; + } + if( CHAR_MAXDEPOTITEMHAVE <= iindex || iindex < 0 ) { + print( "err %s:%d from %s:%d \n", __FILE__, __LINE__,file, line); + return -1; + } + + if( !CHAR_CheckDepotItem( index) ){ + print( "err %s:%d from %s:%d\n", __FILE__, __LINE__,file, line); + return -1; + } + + return CHAR_chara[index].indexOfExistDepotItems[iindex]; +} + +INLINE int _CHAR_setDepotItemIndex( char *file, int line, int index ,int iindex,int id ) +{ + int buf; + if( !CHAR_CHECKINDEX(index)) { + print( "err %s:%d \n", file, line); + return -1; + } + if( CHAR_MAXDEPOTITEMHAVE <= iindex || iindex < 0 ) { + print( "err %s:%d \n", file, line); + return -1; + } + if( !CHAR_CheckDepotItem( index) ){ + print( "err %s:%d from %s:%d\n", __FILE__, __LINE__,file, line); + return -1; + } + buf = CHAR_chara[index].indexOfExistDepotItems[iindex]; + CHAR_chara[index].indexOfExistDepotItems[iindex] = id; + return buf; +} +void CHAR_removeHaveDepotItem( Char* ch ) +{ + if( ch == NULL )return; + if( ch->indexOfExistDepotItems == NULL ) return; + freeMemory( ch->indexOfExistDepotItems ); + ch->indexOfExistDepotItems = NULL; +} + +void CHAR_removeDepotItem( int charaindex) +{ + int i,itemindex; + Char* ch = NULL; + if( !CHAR_CHECKINDEX( charaindex) ) return; + if( !CHAR_CheckDepotItem( charaindex) ) return; //仓库未存在 + ch = CHAR_getCharPointer( charaindex); + if( ch == NULL ){ + print( "removeDepotItem err ch == NULL :%d\n", charaindex); + return; + } + + for( i=0; iindexOfExistDepotItems[i]; + if( !ITEM_CHECKINDEX( itemindex) ) continue; + itemstring = ITEM_makeStringFromItemIndex( ch->indexOfExistDepotItems[i], 0); + if( itemstring == NULL )continue; + + snprintf( linedata , sizeof( linedata ), + DEPOTITEMRESERVESTRING "%d=%s" CHAR_DELIMITER, i, itemstring); + + strcpysafe( &CHAR_dataString[strlength], sizeof( CHAR_dataString ) - strlength, + linedata ); + strlength += strlen( linedata ); + if( strlength > sizeof( CHAR_dataString ) ) { + return NULL; + } + } + return CHAR_dataString; +} + +BOOL CHAR_makeDepotItemStringToChar( int charaindex, char* data) +{ + int readindex=1, itemindex; + Char* ch = NULL; + BOOL ret; + char firstToken[256], secondToken[4096], linebuf[4096]; + + if( data[0] == '\0' ) + return -1; + if( !CHAR_CHECKINDEX( charaindex) ) return FALSE; + ch = CHAR_getCharPointer( charaindex); + if( ch == NULL ){ + print( "makeDepotItem err ch == NULL :%d\n", charaindex); + return FALSE; + } + + while( 1 ){ + memset( linebuf, 0, sizeof( linebuf)); + memset( firstToken, 0, sizeof( firstToken)); + memset( secondToken, 0, sizeof( secondToken)); + ret = getStringFromIndexWithDelim( data ,CHAR_DELIMITER, + readindex, linebuf, sizeof( linebuf ) ); + if( ret == FALSE )break; + if( linebuf[0] == '#' || linebuf[0] == '\n' || linebuf[0] == '\0' ){ + goto NEXT; + } + if( (ret=getStringFromIndexWithDelim( linebuf , "=" , 1 , + firstToken, sizeof(firstToken) )) == FALSE ) return FALSE; + strcpysafe( secondToken , sizeof( secondToken ), + linebuf + strlen( firstToken) + strlen("=") ); + + if( strncmp( firstToken, DEPOTITEMRESERVESTRING, strlen( DEPOTITEMRESERVESTRING)) == 0 ){ + if( strcmp( secondToken, NULLITEM) == 0 ) goto NEXT; + itemindex = atoi( firstToken+strlen(DEPOTITEMRESERVESTRING) ); + if( itemindex < 0 || CHAR_MAXDEPOTITEMHAVE <= itemindex + || ch->indexOfExistDepotItems[itemindex] != -1 ){ + ; + }else{ + ITEM_Item itmone; + ret = ITEM_makeExistItemsFromStringToArg( secondToken , &itmone, 0 ); + if( ret == TRUE ){ + int existitemindex; + existitemindex = ITEM_initExistItemsOne( &itmone ); + ch->indexOfExistDepotItems[itemindex] = existitemindex; + } + } + goto NEXT; + } + print( "??? : %s[%s]\n" , linebuf, firstToken ); +NEXT: + readindex++; + } + return TRUE; +} + +void CHAR_ShowMyDepotItems( int charaindex) +{ + int i, itemindex; + + print( "\nShowMyDepotItems:\n"); + if( !CHAR_CheckDepotItem( charaindex) ) return; + for( i=0; iindexOfExistDepotItems == NULL ) return FALSE; + return TRUE; +} + +#endif + + +#ifdef _CHAR_POOLPET +INLINE int _CHAR_getDepotPetIndex( char *file, int line, int index ,int iindex) +{ + if( !CHAR_CHECKINDEX(index)) { + print( "err %s:%d from %s:%d\n", __FILE__, __LINE__,file, line); + return -1; + } + if( CHAR_MAXDEPOTPETHAVE <= iindex || iindex < 0 ) { + print( "err %s:%d from %s:%d \n", __FILE__, __LINE__,file, line); + return -1; + } + + if( !CHAR_CheckDepotPet( index) ){ + print( "err %s:%d from %s:%d\n", __FILE__, __LINE__,file, line); + return -1; + } + + return CHAR_chara[index].indexOfExistDepotPets[iindex]; +} + +INLINE int _CHAR_setDepotPetIndex( char *file, int line, int index ,int iindex,int id ) +{ + int buf; + if( !CHAR_CHECKINDEX(index)) { + print( "err %s:%d \n", file, line); + return -1; + } + if( CHAR_MAXDEPOTPETHAVE <= iindex || iindex < 0 ) { + print( "err %s:%d \n", file, line); + return -1; + } + if( !CHAR_CheckDepotPet( index) ){ + print( "err %s:%d from %s:%d\n", __FILE__, __LINE__,file, line); + return -1; + } + buf = CHAR_chara[index].indexOfExistDepotPets[iindex]; + CHAR_chara[index].indexOfExistDepotPets[iindex] = id; + return buf; +} +void CHAR_removeHaveDepotPet( Char* ch ) +{ + if( ch == NULL )return; + if( ch->indexOfExistDepotPets == NULL ) return; + freeMemory( ch->indexOfExistDepotPets ); + ch->indexOfExistDepotPets = NULL; +} + +void CHAR_removeDepotPet( int charaindex) +{ + int i,petindex; + Char* ch = NULL; + if( !CHAR_CHECKINDEX( charaindex) ) return; + if( !CHAR_CheckDepotPet( charaindex) ) return; //仓库未存在 + ch = CHAR_getCharPointer( charaindex); + if( ch == NULL ){ + print( "removeDepotPet err ch == NULL :%d\n", charaindex); + return; + } + + for( i=0; iindexOfExistDepotPets[i]; + if( !CHAR_CHECKINDEX( petindex) ) continue; + petstring = CHAR_makePetStringFromPetIndex( ch->indexOfExistDepotPets[i]); + if( petstring == NULL )continue; + + snprintf( linedata , sizeof( linedata ), + DEPOTPETRESERVESTRING "%d=%s" CHAR_DELIMITER, i, petstring); + + strcpysafe( &CHAR_dataString[strlength], sizeof( CHAR_dataString ) - strlength, + linedata ); + strlength += strlen( linedata ); + if( strlength > sizeof( CHAR_dataString ) ) { + return NULL; + } + } + return CHAR_dataString; +} + +BOOL CHAR_makeDepotPetStringToChar( int charaindex, char* data) +{ + int readindex=1, petindex; + Char* ch = NULL; + BOOL ret; + char firstToken[256], secondToken[4096], linebuf[4096]; + + if( data[0] == '\0' ) + return -1; + if( !CHAR_CHECKINDEX( charaindex) ) return FALSE; + ch = CHAR_getCharPointer( charaindex); + if( ch == NULL ){ + print( "makeDepotPet err ch == NULL :%d\n", charaindex); + return FALSE; + } + + while( 1 ){ + memset( linebuf, 0, sizeof( linebuf)); + memset( firstToken, 0, sizeof( firstToken)); + memset( secondToken, 0, sizeof( secondToken)); + ret = getStringFromIndexWithDelim( data ,CHAR_DELIMITER, + readindex, linebuf, sizeof( linebuf ) ); + if( ret == FALSE )break; + if( linebuf[0] == '#' || linebuf[0] == '\n' || linebuf[0] == '\0' ){ + goto NEXT; + } + if( (ret=getStringFromIndexWithDelim( linebuf , "=" , 1 , + firstToken, sizeof(firstToken) )) == FALSE ) return FALSE; + strcpysafe( secondToken , sizeof( secondToken ), + linebuf + strlen( firstToken) + strlen("=") ); + + if( strncmp( firstToken, DEPOTPETRESERVESTRING, strlen( DEPOTPETRESERVESTRING)) == 0 ){ + if( strcmp( secondToken, NULLITEM) == 0 ) goto NEXT; + petindex = atoi( firstToken+strlen(DEPOTPETRESERVESTRING) ); + if( petindex < 0 || CHAR_MAXDEPOTPETHAVE <= petindex + || ch->indexOfExistDepotPets[petindex] != -1 ){ + ; + }else{ + Char petone; + ret = CHAR_makePetFromStringToArg( secondToken , &petone, 0 ); + if( ret == TRUE ){ + int existpetindex; + existpetindex = PET_initCharOneArray( &petone ); + ch->indexOfExistDepotPets[petindex] = existpetindex; + CHAR_setWorkInt( existpetindex, CHAR_WORKPLAYERINDEX, charaindex); + CHAR_complianceParameter( existpetindex); + } + } + goto NEXT; + } + print( "??? : %s[%s]\n" , linebuf, firstToken ); +NEXT: + readindex++; + } + return TRUE; +} + +void CHAR_ShowMyDepotPets( int charaindex) +{ + int i, petindex; + + print( "\nShowMyDepotPets:\n"); + if( !CHAR_CheckDepotPet( charaindex) ) return; + for( i=0; iindexOfExistDepotPets == NULL ) return FALSE; + return TRUE; +} + +#endif + + + +#ifdef _NPC_SEPARATEDATA +void CHAR_showTempInt( int index) +{ + int j; + CHAR_chara[index].tempint = allocateMemory( sizeof( int ) * 10 ); + //andy_log + print("\n CHAR_chara[%d].tempint: %x\n", index, CHAR_chara[index].tempint ); + for( j=0; j<10; j++){ + print("%d,", CHAR_chara[index].tempint[j] ); + } + //andy_log + print("]\n"); +} + +BOOL CHAR_InitCharTempNum( Char* ch ) +{ + int j; + ch->tempint = allocateMemory( sizeof( int ) * 10 ); + print("\n init temp:%x,", ch->tempint ); + for( j=0; j<10; j++){ + ch->tempint[j] = 0; + print("%d,", ch->tempint[j] ); + } + return TRUE; +} + +void CHAR_EndCharTempNum( void ) +{ + int i; + + for( i = 0 ; i < CHAR_charanum ; i ++ ){ + freeMemory( CHAR_chara[i].tempint ); + } + +} + +void CHAR_getDefaultCharTempNum( Char* ch ) +{ + int j; + if( ch->tempint == NULL ) return; + for( j=0; j<10; j++){ + ch->tempint[j] = -1; + print("%d,", ch->tempint[j] ); + } +} +#endif + +#ifdef _STREET_VENDOR +BOOL CHAR_setStreetVendor(int charindex,int index,int set,int num) +{ + if(!CHAR_CHECKINDEX(charindex)) return FALSE; + if(index < 0 || index > MAX_SELL_ITEM) return FALSE; + switch(set){ + case SV_PILE: + CHAR_chara[charindex].StreetVendor[index].pile = num; + break; + case SV_PRICE: + CHAR_chara[charindex].StreetVendor[index].price = num; + break; + case SV_INDEX: + CHAR_chara[charindex].StreetVendor[index].index = num; + break; + case SV_KIND: + CHAR_chara[charindex].StreetVendor[index].kind = num; + break; + } + CHAR_chara[charindex].StreetVendor[index].usage = TRUE; + return TRUE; +} + +INLINE void CHAR_clearStreetVendor(int charindex,int index) +{ + if(!CHAR_CHECKINDEX(charindex)) return; + if(index < 0 || index > MAX_SELL_ITEM) return; + CHAR_chara[charindex].StreetVendor[index].index = -1; + CHAR_chara[charindex].StreetVendor[index].price = 0; + CHAR_chara[charindex].StreetVendor[index].pile = 0; + CHAR_chara[charindex].StreetVendor[index].kind = -1; + CHAR_chara[charindex].StreetVendor[index].usage = FALSE; +} + +int CHAR_getStreetVendor(int charindex,int index,int set) +{ + if(!CHAR_CHECKINDEX(charindex)) return -1; + if(index < 0 || index > MAX_SELL_ITEM) return -1; + switch(set){ + case SV_PILE: + return CHAR_chara[charindex].StreetVendor[index].pile; + case SV_PRICE: + return CHAR_chara[charindex].StreetVendor[index].price; + case SV_INDEX: + return CHAR_chara[charindex].StreetVendor[index].index; + case SV_KIND: + return CHAR_chara[charindex].StreetVendor[index].kind; + case SV_USAGE: + return CHAR_chara[charindex].StreetVendor[index].usage; + } + return -1; +} +#endif + +#ifdef _CHAR_POOLPET +int CHAR_getCharDepotPetElement( int charaindex ) +{ + int i; + int limit; + if( !CHAR_CHECKINDEX(charaindex))return -1; + + //andy_reEdit 2003/09/18 + //limit = (CHAR_getInt(charaindex,CHAR_TRANSMIGRATION)*2)+5; + //limit = min( limit, CHAR_MAXPOOLPETHAVE); + limit = CHAR_MAXDEPOTPETHAVE; + for( i = 0; i < limit; i ++ ) { + if( CHAR_getDepotPetIndex( charaindex,i) == -1 ) break; + } + return ( i == limit ? -1:i ); +} +#endif diff --git a/gmsv/char/char_base.c.bak b/gmsv/char/char_base.c.bak new file mode 100644 index 0000000..870cffa --- /dev/null +++ b/gmsv/char/char_base.c.bak @@ -0,0 +1,3654 @@ +#include "version.h" +#include + +// CoolFish: 2001/10/12 _UNIQUE_P_I +#include + + +#include "char_base.h" +#include "char_data.h" +#include "item.h" +#include "buf.h" +#include "magic.h" +#include "function.h" +#include "npccreate.h" +#include "configfile.h" +#include "title.h" +#include "pet.h" +#include "pet_skill.h" +#include "anim_tbl.h" +#include "enemy.h" +#include "saacproto_cli.h" + +// CoolFish: 2001/10/29 +#include "log.h" + +Char* CHAR_chara; + +static int CHAR_charanum; +static int CHAR_playernum; +static int CHAR_petnum; +static int CHAR_othersnum; + +// CoolFish: 2001/10/11 +#ifdef _UNIQUE_P_I +#define MAX_UNIQUE_P_I 1000 +static int unique_p = 0; +static int unique_i = 0; +#endif + +typedef struct tagINITCHARCOUNTER{ + int startcnt; + int cnt; + int endcnt; +}INITCHARCOUNTER; +static INITCHARCOUNTER initCharCounter[3] = { + {-1,-1,-1},{-1,-1,-1},{-1,-1,-1} +}; + + +tagRidePetTable ridePetTable[122] = +{ + { 101000, 100000, 100352, 331 }, + { 101001, 100005, 100352, 331 }, + { 101002, 100010, 100352, 331 }, + { 101003, 100015, 100352, 331 }, + { 101004, 100000, 100329, 309 }, + { 101005, 100005, 100327, 307 }, + { 101006, 100010, 100330, 310 }, + { 101007, 100015, 100328, 308 }, + { 101008, 100700, 100372, 351 }, + { 101009, 100705, 100373, 352 }, + + { 101010, 100020, 100396, 483 }, + { 101011, 100025, 100396, 483 }, + { 101012, 100030, 100396, 483 }, + { 101013, 100035, 100396, 483 }, + { 101014, 100020, 100328, 308 }, + { 101015, 100025, 100329, 309 }, + { 101016, 100030, 100327, 307 }, + { 101017, 100035, 100330, 310 }, + { 101018, 100710, 100372, 351 }, + { 101019, 100715, 100373, 352 }, + + { 101020, 100040, 100351, 330 }, + { 101021, 100045, 100351, 330 }, + { 101022, 100050, 100351, 330 }, + { 101023, 100055, 100351, 330 }, + { 101024, 100040, 100328, 308 }, + { 101025, 100045, 100330, 310 }, + { 101026, 100050, 100327, 307 }, + { 101027, 100055, 100329, 309 }, + { 101028, 100720, 100372, 351 }, + { 101029, 100725, 100373, 352 }, + + { 101030, 100060, 100353, 332 }, + { 101031, 100065, 100353, 332 }, + { 101032, 100070, 100353, 332 }, + { 101033, 100075, 100353, 332 }, + { 101034, 100060, 100329, 309 }, + { 101035, 100065, 100327, 307 }, + { 101036, 100070, 100330, 310 }, + { 101037, 100075, 100328, 308 }, + { 101038, 100730, 100372, 351 }, + { 101039, 100735, 100373, 352 }, + + { 101040, 100080, 100396, 483 }, + { 101041, 100085, 100396, 483 }, + { 101042, 100090, 100396, 483 }, + { 101043, 100095, 100396, 483 }, + { 101044, 100080, 100328, 308 }, + { 101045, 100085, 100327, 307 }, + { 101046, 100090, 100330, 310 }, + { 101047, 100095, 100329, 309 }, + { 101048, 100740, 100372, 351 }, + { 101049, 100745, 100373, 352 }, + + { 101050, 100100, 100353, 332 }, + { 101051, 100105, 100353, 332 }, + { 101052, 100110, 100353, 332 }, + { 101053, 100115, 100353, 332 }, + { 101054, 100100, 100329, 309 }, + { 101055, 100105, 100328, 308 }, + { 101056, 100110, 100330, 310 }, + { 101057, 100115, 100327, 307 }, + { 101058, 100750, 100372, 351 }, + { 101059, 100755, 100373, 352 }, + + { 101060, 100120, 100354, 333 }, + { 101061, 100125, 100354, 333 }, + { 101062, 100130, 100354, 333 }, + { 101063, 100135, 100354, 333 }, + { 101064, 100120, 100327, 307 }, + { 101065, 100125, 100330, 310 }, + { 101066, 100130, 100328, 308 }, + { 101067, 100135, 100329, 309 }, + { 101068, 100760, 100372, 351 }, + { 101069, 100765, 100373, 352 }, + + { 101070, 100140, 100354, 333 }, + { 101071, 100145, 100354, 333 }, + { 101072, 100150, 100354, 333 }, + { 101073, 100155, 100354, 333 }, + { 101074, 100140, 100327, 307 }, + { 101075, 100145, 100329, 309 }, + { 101076, 100150, 100330, 310 }, + { 101077, 100155, 100328, 308 }, + { 101078, 100770, 100372, 351 }, + { 101079, 100775, 100373, 352 }, + + { 101080, 100160, 100352, 331 }, + { 101081, 100165, 100352, 331 }, + { 101082, 100170, 100352, 331 }, + { 101083, 100175, 100352, 331 }, + { 101084, 100160, 100330, 310 }, + { 101085, 100165, 100329, 309 }, + { 101086, 100170, 100327, 307 }, + { 101087, 100175, 100328, 308 }, + { 101088, 100780, 100372, 351 }, + { 101089, 100785, 100373, 352 }, + + { 101090, 100180, 100351, 330 }, + { 101091, 100185, 100351, 330 }, + { 101092, 100190, 100351, 330 }, + { 101093, 100195, 100351, 330 }, + { 101094, 100180, 100328, 308 }, + { 101095, 100185, 100330, 310 }, + { 101096, 100190, 100329, 309 }, + { 101097, 100195, 100327, 307 }, + { 101098, 100790, 100372, 351 }, + { 101099, 100795, 100373, 352 }, + + { 101100, 100200, 100353, 332 }, + { 101101, 100205, 100353, 332 }, + { 101102, 100210, 100353, 332 }, + { 101103, 100215, 100353, 332 }, + { 101104, 100200, 100329, 309 }, + { 101105, 100205, 100328, 308 }, + { 101106, 100210, 100327, 307 }, + { 101107, 100215, 100330, 310 }, + { 101108, 100800, 100372, 351 }, + { 101109, 100805, 100373, 352 }, + + { 101110, 100220, 100396, 483 }, + { 101111, 100225, 100396, 483 }, + { 101112, 100230, 100396, 483 }, + { 101113, 100235, 100396, 483 }, + { 101114, 100220, 100330, 310 }, + { 101115, 100225, 100327, 307 }, + { 101116, 100230, 100329, 309 }, + { 101117, 100235, 100328, 308 }, + { 101118, 100810, 100372, 351 }, + { 101119, 100815, 100373, 352 }, + + { 101179, 101177, 101178, 1804}, + { 101179, 101178, 101177, 1926}, +}; + +#ifdef _NEW_RIDEPETS + +tagRideCodeMode RideCodeMode[] = { + { 100374, RIDE_PET0 }, /*骑宠帖拉所伊朵*/ + { 100358, RIDE_PET1 }, /*骑宠巴朵兰恩*/ + { 100362, RIDE_PET2 }, /*骑宠左迪洛斯*/ + { 100279, RIDE_PET3 }, /*骑宠格尔格*/ + { 100288, RIDE_PET4 }, /*骑宠玛恩摩洛斯*/ + { 100283, RIDE_PET5 }, /*骑宠拉奇鲁哥*/ + { 100346, RIDE_PET6 }, /*骑宠卡达鲁卡斯*/ + { 100310, RIDE_PET7 }, /*骑宠扬奇洛斯*/ + { 100372, RIDE_PET8 }, /*骑宠卡卡金宝*/ + { 100373, RIDE_PET9 }, /*骑宠朵拉比斯*/ + { 101576, RIDE_PET10 }, /*镲宠罗多克雷*/ + { 101532, RIDE_PET11 }, /*骑宠史卡鲁*/ +}; + +tagRideNoList RideNoList[] = { + {{ 101305, 101306, 101307, 101308, 101309, 101310, 101311, 101312, 101008, 101009, 101989, 101978},0}, //小矮子 + {{ 101313, 101314, 101315, 101316, 101317, 101318, 101319, 101320, 101018, 101019, 101988, 101986},0}, //赛亚人 + {{ 101321, 101322, 101323, 101324, 101325, 101326, 101327, 101328, 101028, 101029, 101965, 101975},0}, //辫子男孩 + {{ 101329, 101330, 101331, 101332, 101333, 101334, 101335, 101336, 101038, 101039, 101966, 101976},0}, //酷哥 + {{ 101337, 101338, 101339, 101340, 101341, 101342, 101343, 101344, 101048, 101049, 101973, 101984},0}, //熊皮男 + {{ 101345, 101346, 101347, 101348, 101349, 101350, 101351, 101352, 101058, 101059, 101974, 101985},0}, //大个 + {{ 101353, 101354, 101355, 101356, 101357, 101358, 101359, 101360, 101068, 101069, 101967, 101977},0}, //小矮妹 + {{ 101361, 101362, 101363, 101364, 101365, 101366, 101367, 101368, 101078, 101079, 101968, 101979},0}, //熊皮妹 + {{ 101369, 101370, 101371, 101372, 101373, 101374, 101375, 101376, 101088, 101089, 101970, 101981},0}, //帽子妹 + {{ 101377, 101378, 101379, 101380, 101381, 101382, 101383, 101384, 101098, 101099, 101969, 101980},0}, //短法发夹妹 + {{ 101385, 101386, 101387, 101388, 101389, 101390, 101391, 101392, 101108, 101109, 101972, 101983},0}, //手套女 + {{ 101393, 101394, 101395, 101396, 101397, 101398, 101399, 101400, 101118, 101119, 101970, 101982},0}, //辣妹 +}; + +tagRidePetList RPlistMode[] = { + { 100000, 0, 1 }, { 100005, 0, 1 }, { 100010, 0, 1 }, { 100015, 0, 1 }, //小矮子 + { 100020, 1, 1 }, { 100025, 1, 1 }, { 100030, 1, 1 }, { 100035, 1, 1 }, //赛亚人 + { 100040, 2, 1 }, { 100045, 2, 1 }, { 100050, 2, 1 }, { 100055, 2, 1 }, //辫子男孩 + { 100060, 3, 1 }, { 100065, 3, 1 }, { 100070, 3, 1 }, { 100075, 3, 1 }, //酷哥 + { 100080, 4, 1 }, { 100085, 4, 1 }, { 100090, 4, 1 }, { 100095, 4, 1 }, //熊皮男 + { 100100, 5, 1 }, { 100105, 5, 1 }, { 100110, 5, 1 }, { 100115, 5, 1 }, //大个 + { 100120, 6, 2 }, { 100125, 6, 2 }, { 100130, 6, 2 }, { 100135, 6, 2 }, //小矮妹 + { 100140, 7, 2 }, { 100145, 7, 2 }, { 100150, 7, 2 }, { 100155, 7, 2 }, //熊皮妹 + { 100160, 8, 2 }, { 100165, 8, 2 }, { 100170, 8, 2 }, { 100175, 8, 2 }, //帽子妹 + { 100180, 9, 2 }, { 100185, 9, 2 }, { 100190, 9, 2 }, { 100195, 9, 2 }, //短发夹妹 + { 100200, 10, 2 }, { 100205, 10, 2 }, { 100210, 10, 2 }, { 100215, 10, 2 }, //手套女 + { 100220, 11, 2 }, { 100225, 11, 2 }, { 100230, 11, 2 }, { 100235, 11, 2 }, //辣妹 +}; + +int RIDEPET_getNOindex( int baseNo) +{ + int i; + for( i=0; i< sizeof(RPlistMode)/sizeof(tagRidePetList); i++ ) { + if( RPlistMode[i].charNo == baseNo ) { + return RPlistMode[i].Noindex; + } + } + return -1; +} + +int RIDEPET_getPETindex( int PetNo, int learnCode) +{ + int i; + for( i=0; i< sizeof(RideCodeMode)/sizeof(tagRideCodeMode); i++ ) { + if( RideCodeMode[i].petNo == PetNo && + (RideCodeMode[i].learnCode & learnCode) ) { + return i; + } + } + return -1; +} + +int RIDEPET_getRIDEno( int index, int ti) +{ + if( index < 0 || index >= sizeof( RideNoList)/sizeof( tagRideNoList) ) + return -1; + if( ti < 0 || ti >= MAXNOINDEX ) + return -1; + + return RideNoList[index].RideNo[ti]; +} +#endif + +#ifdef _EMENY_CHANCEMAN +int CHAR_getSexInt( int baseNo ) +{ + int i; + for( i=0; i< sizeof(RPlistMode)/sizeof(tagRidePetList); i++ ) { + if( RPlistMode[i].charNo == baseNo ) { + return RPlistMode[i].sex; + } + } + return -1; +} +#endif + +#ifdef _PET_EVOLUTION +#define MAXTABLE_X 29 +#define MAXTABLE_Y 29 +int PetTable[MAXTABLE_X][MAXTABLE_Y]={ + //0 4 9 14 19 24 + { 1, 2, 5, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 5, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5}, + { 2, 5, 1, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1}, + { 5, 1, 2, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2}, + { 1, 2, 5, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5}, + { 2, 5, 1, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1}, + + { 2, 1, 2, 1, 2, 2, 2, 5, 5, 1, 2, 5, 2, 1, 2, 1, 2, 5, 2, 1, 2, 1, 2, 5, 2, 5, 2, 1, 2}, + { 1, 2, 5, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 1}, + { 2, 5, 1, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 2}, + {10, 3,10, 3,10, 8,10, 8,10, 3,10, 3,10, 8,10, 8,10, 3,10, 3,10, 8,10, 8,10, 8,10, 3,10}, + { 3, 8, 3, 8, 3,10, 3,10, 8, 3, 3, 8, 3, 8, 3,10, 3,10, 3, 8, 3, 8, 3,10, 3,10, 3, 8, 3}, + + { 3, 8,10,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 5, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5}, + { 0, 4, 0, 4, 0, 6, 0, 6, 0, 4, 0, 4, 0, 6, 0, 6, 0, 4, 0, 4, 0, 6, 0, 4, 0, 6, 0, 4, 0}, + { 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2, 5, 1, 2}, + + { 3, 8,10, 3, 8,10, 3, 8,10, 3, 8,10, 3, 8,10, 3, 8,10, 3, 8,10, 3, 8,10, 3, 8,10, 3, 8}, + {10, 3, 8,10, 3, 8,10, 3, 8,10, 3, 8,10, 3, 8,10, 3, 8,10, 3, 8,10, 3, 8,10, 3, 8,10, 3}, + { 2, 1, 2, 1, 5, 1, 5, 1, 2, 1, 2, 1, 5, 1, 5, 1, 2, 1, 2, 1, 5, 1, 5, 1, 2, 1, 2, 5, 1}, + { 6, 9, 6, 9, 6, 0, 6, 0, 6, 9, 6, 9, 6, 0, 6, 0, 6, 9, 6, 9, 6, 0, 6, 0, 6, 9, 6, 0, 6} +}; + +int PropertyTable[4][4]={ + { 0, 4, 5, 6}, + { 7, 1, 8, 9}, + {10,11, 2,12}, + {13,14,15, 3}, +}; +#define MAXFTABLE_X 11 +#define MAXFTABLE_Y 16 +int FusionTable[MAXFTABLE_X][MAXFTABLE_Y]={ + { 989, 990, 991, 992, 989, 992, 989, 990, 990, 990, 991, 991, 991, 992, 989, 992}, + {1001,1002,1003,1004,1001,1001,1004,1001,1002,1002,1003,1003,1003,1004,1004,1003}, + {1005,1006,1007,1008,1005,1005,1005,1006,1006,1006,1007,1006,1007,1008,1008,1008}, + {1021,1025,1023,1024,1025,1021,1021,1022,1022,1022,1023,1023,1023,1021,1024,1024}, + {1030,1031,1032,1033,1030,1030,1030,1031,1031,1031,1032,1031,1032,1030,1033,1033}, + {1017,1018,1019,1020,1018,1017,1017,1018,1019,1018,1019,1019,1020,1017,1020,1020}, + {1009,1010,1011,1012,1010,1009,1009,1010,1010,1010,1011,1011,1011,1012,1012,1011}, + { 993, 994, 995, 996, 994, 993, 993, 994, 995, 994, 995, 993, 996, 993, 996, 996}, + {1026,1027,1028,1029,1026,1026,1026,1026,1028,1027,1028,1028,1029,1029,1029,1029}, + { 997, 998, 999, 999,1000, 997, 997,1000, 998, 998,1000, 998, 999, 999, 999, 999}, + {1013,1014,1015,1016,1013,1013,1016,1013,1015,1014,1015,1015,1015,1016,1016,1016} +}; + +int EVOLUTION_getPetFusionCode( int petid) +{ + int petarray = ENEMYTEMP_getEnemyTempArrayFromTempNo( petid); + return ENEMYTEMP_getInt( petarray, E_T_FUSIONCODE); +} + +int EVOLUTION_getPetTable( int charaindex, int petindex1, int petindex2) +{ + int table1,table2; + + if( !CHAR_CHECKINDEX( petindex1) ) return -1; + if( !CHAR_CHECKINDEX( petindex2) ) return -1; + + table2 = EVOLUTION_getPetFusionCode( CHAR_getInt( petindex1, CHAR_PETID)); + table1 = EVOLUTION_getPetFusionCode( CHAR_getInt( petindex2, CHAR_PETID)); + + if( table1 < 0 || table1 >= MAXTABLE_X ) return -1; + if( table2 < 0 || table2 >= MAXTABLE_Y ) return -1; + return PetTable[table1][table2]; +} + +int EVOLUTION_getPropertyTable( int charaindex, int petindex1, int petindex2) +{ + int i, k1=0, k2=0; + int table1,table2; + int Property1[4]={-1,-1,-1,-1}; + int Property2[4]={-1,-1,-1,-1}; + + if( !CHAR_CHECKINDEX( petindex1) ) return -1; + if( !CHAR_CHECKINDEX( petindex2) ) return -1; + + for( i=0; i<4; i++) { + if( CHAR_getInt( petindex1, CHAR_EARTHAT+i) > 0 ){ + Property1[k1] = i; + k1++; + } + if( CHAR_getInt( petindex2, CHAR_EARTHAT+i) > 0 ){ + Property2[k2] = i; + k2++; + } + } + if( k1 == 0 || k2 == 0 ) return -1; + + if( k1 <= 1 ) { + table1 = Property1[ 0]; + }else{ + table1 = Property1[ (rand()%(k1-1)) ]; + } + if( k2 <= 1 ) { + table2 = Property2[ 0]; + }else { + table2 = Property2[ (rand()%(k2-1)) ]; + } + + if( table1 < 0 || table1 >= 4 ) return -1; + if( table2 < 0 || table2 >= 4 ) return -1; + + return PropertyTable[table1][table2]; +} + +int EVOLUTION_getFusionTable( int charaindex, int px, int py) +{ + if( px >= MAXFTABLE_X || px < 0 ) return -1; + if( py >= MAXFTABLE_Y || py < 0 ) return -1; + return FusionTable[px][py]; +} +#endif + +#ifdef _CHAR_FIXDATADEF +/* +typedef struct _tagPetSetIntData{ + char com[256]; + int type; +}PetSetIntData; + +PetSetIntData PET_SetIntData[ ]={ +}; +*/ +#endif + +static char* CHAR_setintdata[CHAR_DATAINTNUM]={ + /* dci , PLAYER, */ + "pn", /* CHAR_DATAPLACENUMBER */ + + "bi", /* CHAR_BASEIMAGENUMBER */ + "bbi", /* CHAR_BASEBASEIMAGENUMBER */ + "fb", /* CHAR_FACEIMAGENUMBER */ + "fl", /* CHAR_FLOOR */ + "x", /* CHAR_X */ + "y", /* CHAR_Y */ + "dir", /* CHAR_DIR 12凛毛0卞凛煌璃曰卞 */ + "lv", /* CHAR_LV */ + "gld", /* CHAR_GOLD */ + + "hp", /* CHAR_HP */ + "mp", /* CHAR_MP */ + "mmp", /* CHAR_MAXMP */ + + "vi", /* CHAR_VITAL */ + "str", /* CHAR_STR */ + "tou", /* CHAR_TOUGH */ + "dx", /* CHAR_DEX */ + + "chr", /* CHAR_CHARM */ + "luc", /* CHAR_LUCK */ + "aea", /* 哗箪岭 */ + "awa", /* 箪岭 */ + "afi", /* 绍箪岭 */ + "awi", /* 氘箪岭 */ + + "slt", /* CHAR_SLOT */ + "cr", /* CHAR_CRITIAL */ + "cou", /* CHAR_COUNTER */ + "rar", /* CHAR_RARE */ + "rst", /* CHAR_RADARSTRLENGTH */ + "cvo", /* CHAR_CHATVOLUME */ + "ml", /* CHAR_MERCHANTLEVEL */ + "hl", /* CHAR_HEALERLEVEL */ + "di", /* CHAR_DETERMINEITEM */ + "ieqt", /* CHAR_INDEXOFEQTITLE */ + "poi", /* CHAR_POISON */ + "par", /* CHAR_PARALYSIS */ + "sil", /* CHAR_SILENCE */ + "sto", /* CHAR_STONE */ + "dar", /* CHAR_DARKNESS */ + "con", /* CHAR_CONFUSION */ + "loc", /* CHAR_LOGINCOUNT */ + "dc", /* CHAR_DEADCOUNT */ + "wc", /* CHAR_WALKCOUNT */ + "tc", /* CHAR_TALKCOUNT */ + "dmc", /* CHAR_DAMAGECOUNT */ + "gpc", /* CHAR_GETPETCOUNT */ + "kpc", /* CHAR_KILLPETCOUNT */ + "dpc", /* CHAR_DEADPETCOUNT */ + "smc", /* CHAR_SENDMAILCOUNT */ + "mic", /* CHAR_MERGEITEMCOUNT */ + "dbc", /* CHAR_DUELBATTLECOUNT */ + "dwc", /* CHAR_DUELWINCOUNT */ + "dlc", /* CHAR_DUELLOSECOUNT */ + "dswc", /* CHAR_DUELSTWINCOUNT */ + "dmswc", /* CHAR_DUELMAXSTWINCOUNT */ + "wht", /* CHAR_WHICHTYPE */ + "wint", /* CHAR_WALKNTERVAL */ + "lint", /* CHAR_LOOPINTERVAL */ +#ifdef _NEWOPEN_MAXEXP + "exp", /* CHAR_OLDEXP */ + "nexp", /* CHAR_EXP */ +#else + "exp", /* CHAR_EXP */ +#endif + "lte", /* CHAR_LASTTALKELDER */ + "skup", /* CHAR_SKILLUPPOINT */ + "lvup", /* CHAR_LEVELUPPOINT */ + "ity", /* CHAR_IMAGETYPE */ + "nc", /* CHAR_NAMECOLOR */ + "pnc", /* CHAR_POPUPNAMECOLOR */ + "llt", /* CHAR_LASTTIMESETLUCK */ + "duel", /* CHAR_DUELPOINT */ + "evt", /* CHAR_EVENT */ + "evt2", /* CHAR_EVENT2 */ + "evt3", /* CHAR_EVENT3 */ +#ifdef _NEWEVENT + "evt4", /* CHAR_EVENT4 */ + "evt5", /* CHAR_EVENT5 */ + "evt6", /* CHAR_EVENT6 */ +#endif +#ifdef _ADD_NEWEVENT // WON 多增任务旗标 + "evt7", /* CHAR_EVENT7 */ + "evt8", // CHAR_ENDEVENT8, 224~255 精灵召唤专用 +#endif + + "nev", /* CHAR_NOWEVENT */ + "nev2", /* CHAR_NOWEVENT2 */ + "nev3", /* CHAR_NOWEVENT3 */ +#ifdef _NEWEVENT + "nev4", /* CHAR_NOWEVENT4 */ + "nev5", /* CHAR_NOWEVENT5 */ + "nev6", /* CHAR_NOWEVENT6 */ +#endif +#ifdef _ADD_NEWEVENT // WON 多增任务旗标 + "nev7", /* CHAR_NOWEVENT7 */ + "nev8", // CHAR_NOWEVENT8, 224~255 精灵召唤专用 +#endif + + "trn", /* CHAR_TRANSMIGRATION */ + "teq", /* CHAR_TRANSEQUATION */ + + "ini", /* CHAR_INITDATA */ + "silent", /* CHAR_SILENT */ + "fmi", // CoolFish: Family 2001/5/24 家族 index + "fmlf", // CoolFish: Family 2001/5/24 是否为家族族长 + "fmspr", // CoolFish: Family 2001/7/13 家族守护精灵 + + "bankgld", /* CHAR_BANKGOLD */ + "ridepet", /* CHAR_RIDEPET */ + "learnride", /* CHAR_LEARNRIDE */ +#ifdef _NEW_RIDEPETS + "lowridepet", //CHAR_LOWRIDEPETS +#endif + "limitlv", // Arminius 7.30 pet limit level +#ifdef _PET_FUSION + "fusioncode", //CHAR_FUSIONCODE + "fusionindex", //CHAR_FUSIONINDEX + "fusionraise", //CHAR_FUSIONRAISE + "fusionbe", //CHAR_FUSIONBEIT + "futimelimit", //CHAR_FUSIONTIMELIMIT +#endif +#ifdef _DEATH_CONTEND + "pkltnum", //CHAR_PKLISTTEAMNUM, + "pkleader", //CHAR_PKLISTLEADER, +#endif + +#ifdef _PERSONAL_FAME // Arminius 8.30: 家族个人声望 + "fame", +#endif + +#ifdef _NEWSAVE + "sindex", /* CHAR_SAVEINDEXNUMBER */ +#endif + +#ifdef __ATTACK_MAGIC + "earth_exp", // 玩家的地魔法熟练度 + "water_exp", // 玩家的水魔法熟练度 + "fire_exp", // 玩家的火魔法熟练度 + "wind_exp", // 玩家的风魔法熟练度 + "earth_resist", // 玩家的地魔法抗性 + "water_resist", // 玩家的水魔法抗性 + "fire_resist", // 玩家的火魔法抗性 + "wind_resist", // 玩家的风魔法抗性 + "earth_attmagic_exp", // 玩家的地魔法熟练度经验值 + "water_attmagic_exp", // 玩家的水魔法熟练度经验值 + "fire_attmagic_exp", // 玩家的火魔法熟练度经验值 + "wind_attmagic_exp", // 玩家的风魔法熟练度经验值 + "earth_defmagic_exp", // 玩家的地魔法抗性经验值 + "water_defmagic_exp", // 玩家的水魔法抗性经验值 + "fire_defmagic_exp", // 玩家的火魔法抗性经验值 + "wind_defmagic_exp", // 玩家的风魔法抗性经验值 +#endif + +#ifdef _GAMBLE_BANK //个人银行 + "personaglod", //CHAR_PERSONAGOLD, +#endif +#ifdef _DROPSTAKENEW + "gamblenums", //CHAR_GAMBLENUM +#endif +#ifdef _ADD_ACTION //npc动作 + "actsty", //CHAR_ACTIONSTYLE +#endif +#ifdef _AUCTIONEER + "aucgold", // CHAR_AUCGOLD 拍卖所得 +#endif +#ifdef _PET_EVOLUTION + "evbasevtl",// CHAR_EVOLUTIONBASE, + "evbasestr",// CHAR_EVOLUTIONBASE, + "evbasetgh",// CHAR_EVOLUTIONBASE, + "evbasedex",// CHAR_EVOLUTIONBASE, +#endif + +#ifdef _ACTION_BULLSCR + "abullstart", //CHAR_ABULLSTART + "abullscore", //CHAR_ABULLSCORE, + "abulltime", //CHAR_ABULLTIME, + "abullstarttime", //CHAR_ABULLSTARTTIME +#endif + +#ifdef _ACTION_GMQUE + "gmqueflg", //CHAR_GMQUEFLG, + "gmquenum", //CHAR_GMQUENUMS, +#endif + + +#ifdef _FAMILYBANKSTONELOG + "fmbankgold", //家族银行存款 +#endif + +#ifdef _FM_JOINLIMIT + "fmtimelimit", // CHAR_FMTIMELIMIT, +#endif + +#ifdef _CHAR_PROFESSION // WON ADD 人物职业 + "profession_class", + "profession_level", +// "profession_exp", + "profession_skill_point", + "attachpile", + "profession_fire_p", + "profession_ice_p", + "profession_thunder_p", + "profession_fire_r", + "profession_ice_r", + "profession_thunder_r", +#endif +#ifdef _ALLDOMAN // (不可开) Syu ADD 排行榜NPC + "herofloor", +#endif +#ifdef _PETSKILL_BECOMEPIG + "becomepig", + "becomepig_bbi", +#endif + "leavetime", // CHAR_LASTLEAVETIME +#ifdef _NEW_MANOR_LAW + "momentum", // CHAR_MOMENTUM +#endif + +#ifdef _ITEM_ADDEXP2 + "aexp", // CHAR_ADDEXPPOWER + "aexpt", // CHAR_ADDEXPTIME +#endif + +#ifdef _ANGEL_SUMMON + "herocnt", // CHAR_HEROCNT +#endif +#ifdef _TEACHER_SYSTEM + "tsf", // CHAR_TEACHER_FAME, // 导师领导声望 +#endif + +#ifdef _RACEMAN + "checkin", // CHAR_CHECKIN + "catchcnt1", // CHAR_CATCHCNT1 + "catchcnt2", // CHAR_CATCHCNT2 + "catchcnt3", // CHAR_CATCHCNT3 + "catchcnt4", // CHAR_CATCHCNT4 + "catchcnt5", // CHAR_CATCHCNT5 + "kindcnt1", //CHAR_KINDCNT1, /* (0~31) */ + "kindcnt2", //CHAR_KINDCNT2, /* (32~63) */ + "kindcnt3", //CHAR_KINDCNT3, /* (64~95) */ + "kindcnt4", //CHAR_KINDCNT4, /* (96~127) */ + "kindcnt5", //CHAR_KINDCNT5, /* (128~159) */ + "kindcnt6", //CHAR_KINDCNT6, /* (160~191) */ + "kindcnt7", //CHAR_KINDCNT7, /* (192~223) */ + "kindcnt8", //CHAR_KINDCNT8, /* (224~255) */ + "kindcnt9", //CHAR_KINDCNT9, /* (256~287) */ + "kindcnt10", //CHAR_KINDCNT10, /* (288~319) */ +#endif + +}; + +static char* CHAR_setchardata[CHAR_DATACHARNUM]={ + /* dcc , PLAYER */ + "name" , /* CHAR_NAME */ + "ownt" , /* CHAR_OWNTITLE*/ + "arg", /* CHAR_NPCARGUMENT */ + "ocd", /* CHAR_OWNERCDKEY */ + "ocn", /* CHAR_OWNERCHARANAME */ + "fmname", // CoolFish: Family 2001/5/24 家族名称 CHAR_FMNAME +#ifdef _UNIQUE_P_I + "ucode", // CoolFish: 2001/10/11 UNIQUE_P_I CHAR_UNIQUECODE +#endif +#ifdef _ACTION_GMQUE + //人物 npc 使用 + "gmque", //CHAR_GMQUESTR1, + //"temp2", //CHAR_GMQUESTR2, + //"temp3", //CHAR_GMQUESTR3, + //"temp4", //CHAR_GMQUESTR4, +#endif + +#ifdef _GM_IDENTIFY + "gmidentify", //gm名称 +#endif +#ifdef _TEACHER_SYSTEM + "tsi", // 导师帐号 + "tsn", // 导师名字 +#endif + +#ifdef _ITEM_SETLOVER + "love", // 结婚判断 + "lovrrid", // 爱人帐号 + "lovrrneme", // 爱人名字 +#endif +}; + +INLINE BOOL _CHAR_CHECKINDEX( char *file, int line, int index ) +{ + if( CHAR_charanum<=index || index<0 ) { + return FALSE; + } + if( CHAR_chara[(index)].use == FALSE ) { + return FALSE; + } + return TRUE; +} + +static INLINE BOOL CHAR_CHECKINTDATAINDEX(int index) +{ + if( CHAR_DATAINTNUM<=index || index<0 )return FALSE; + return TRUE; +} + +static INLINE BOOL CHAR_CHECKCHARDATAINDEX(int index) +{ + if( CHAR_DATACHARNUM<=index || index<0 )return FALSE; + return TRUE; +} + +static INLINE BOOL CHAR_CHECKFLGDATAINDEX( int index ) +{ + if( CHAR_FLGNUM<=index || index<0 )return FALSE; + return TRUE; +} + +static INLINE BOOL CHAR_CHECKCHARWORKDATAINDEX(int index) +{ + if( CHAR_WORKDATACHARNUM<=index || index<0 )return FALSE; + return TRUE; +} + +static INLINE BOOL CHAR_CHECKCHARFUNCTABLEINDEX(int index) +{ + if( CHAR_FUNCTABLENUM <= index || index < 0 )return FALSE; + return TRUE; +} + +INLINE BOOL _CHAR_CHECKITEMINDEX( char *file, int line, int charaindex, int ti ) +{ + if( 0 <= ti && ti < CHAR_MAXITEMHAVE ) return TRUE; + return FALSE; +} + +static INLINE BOOL CHAR_CHECKSKILLINDEX( int skillindex ) +{ + if( skillindex<0 || CHAR_SKILLMAXHAVE <= skillindex )return FALSE; + return TRUE; +} +static INLINE BOOL CHAR_CHECKADDRESSBOOKINDEX( int aindex ) +{ + if( aindex < 0 || ADDRESSBOOK_MAX <= aindex ) return FALSE; + return TRUE; +} + +static INLINE BOOL CHAR_CHECKTITLEINDEX( int titleindex ) +{ + if( titleindex<0 || CHAR_TITLEMAXHAVE <= titleindex )return FALSE; + return TRUE; +} + +INLINE BOOL _CHAR_CHECKPETINDEX( char *file, int line, int petindex ) +{ + if( petindex < 0 || CHAR_MAXPETHAVE <= petindex ) { + if( petindex != -1 ) { + print( "err %s:%d \n", file, line); + } + return FALSE; + } + return TRUE; +} + +INLINE BOOL _CHAR_CHECKPOOLPETINDEX( char *file, int line, int petindex ) +{ + if( petindex < 0 || CHAR_MAXPOOLPETHAVE <= petindex ) { + + if( petindex != -1 ) { + print( "err %s:%d :%d \n", file, line, petindex); + } + return FALSE; + } + return TRUE; +} + +INLINE BOOL _CHAR_CHECKPETSKILLINDEX( char *file, int line, int havepetskillindex ) +{ + if( havepetskillindex < 0 || CHAR_MAXPETSKILLHAVE <= havepetskillindex ) { + if( havepetskillindex != -1 ) { + print( "err %s:%d \n", file, line); + } + return FALSE; + } + return TRUE; +} + +INLINE int CHAR_getIntStrict( int index ,CHAR_DATAINT element,int* error) +{ + if(!CHAR_CHECKINDEX(index))return *error=FALSE; + if(!CHAR_CHECKINTDATAINDEX(element))return *error=FALSE; + return CHAR_chara[index].data[element]; +} + +INLINE int CHAR_getInt( int index , CHAR_DATAINT element) +{ + return CHAR_chara[index].data[element]; +} + +INLINE int CHAR_setIntStrict( int index ,CHAR_DATAINT element,int data, + int* error) +{ + int buf; + if(!CHAR_CHECKINDEX(index))return *error=FALSE; + if(!CHAR_CHECKINTDATAINDEX(element))return *error=FALSE; + buf = CHAR_chara[index].data[element]; + CHAR_chara[index].data[element] = data; + return buf; +} + +INLINE int _CHAR_setInt( char *file, int line, int index ,CHAR_DATAINT element, int data) +{ + int buf; + if( !CHAR_CHECKINDEX( index) ) { + print(" err CHAR_setInt index:%d. !:%s-%d\n", index, file, line); + return -1; + } + if( CHAR_DATAPLACENUMBER > element || element >= CHAR_DATAINTNUM ) { + print(" err CHAR_setInt element:%d.%s :%s-%d\n", element, CHAR_getChar( index, CHAR_CDKEY),file, line); + return -1; + } + buf = CHAR_chara[index].data[element]; + CHAR_chara[index].data[element] = data; + return buf; +} + +#ifdef _FIX_SETWORKINT +INLINE int _CHAR_getWorkInt( char *file, int line, int index ,CHAR_WORKDATAINT element) +#else +INLINE int CHAR_getWorkInt( int index ,CHAR_WORKDATAINT element) +#endif +{ + if( CHAR_WORKBATTLEMODE > element || element >= CHAR_WORKDATAINTNUM ) { + print("err Get WorkInt element=%d :: file:%s %d!\n", element, file, line); + return -1; + } + return CHAR_chara[index].workint[element]; +} + +#ifdef _FIX_SETWORKINT +INLINE int _CHAR_setWorkInt( char *file, int line, int index ,CHAR_WORKDATAINT element, int data) +#else +INLINE int CHAR_setWorkInt( int index ,CHAR_WORKDATAINT element, int data) +#endif +{ + int buf; + if( !CHAR_CHECKINDEX( index) ) { + print( "err Set WorkInt index:%d:%s[%d].\n", index, file, line); + return -1; + } + if( CHAR_WORKBATTLEMODE > element || element >= CHAR_WORKDATAINTNUM ) { +#ifdef _FIX_SETWORKINT + print("err Set WorkInt element=%d.%s:%s[%d]!\n", element, CHAR_getChar( index, CHAR_CDKEY), file, line); +#else + print("err Set WorkInt element=%d.%s!\n", element, CHAR_getChar( index, CHAR_CDKEY) ); +#endif + return -1; + } + + buf = CHAR_chara[index].workint[element]; + CHAR_chara[index].workint[element] = data; + return buf; +} + +INLINE char* _CHAR_getChar( char *file, int line, int index ,CHAR_DATACHAR element ) +{ + if(!CHAR_CHECKINDEX(index)) { + print( "err _CHAR_getChar %s:%d index[%d] !!\n", file, line, index); + return NULL; + } + if(!CHAR_CHECKCHARDATAINDEX(element)) { + print( "err _CHAR_getChar %s:%d element[%d] !!\n", file, line, element); + return NULL; + } + return CHAR_chara[index].string[element].string; +} + +INLINE BOOL _CHAR_setChar( char *file, int line, int index ,CHAR_DATACHAR element, char* new ) +{ + if(!CHAR_CHECKINDEX(index)) { + print( "err _CHAR_setChar %s:%d !\n", file, line); + return FALSE; + } + if(!CHAR_CHECKCHARDATAINDEX(element)) { + print( "err _CHAR_setChar %s:%d !\n", file, line); + return FALSE; + } + strcpysafe( CHAR_chara[index].string[element].string, + sizeof(CHAR_chara[index].string[element].string), + new ); + return TRUE; +} + +static INLINE char* CHAR_getCharfunctable( int index ,CHAR_FUNCTABLE element ) +{ + if(!CHAR_CHECKINDEX(index))return NULL; + if(!CHAR_CHECKCHARFUNCTABLEINDEX(element))return NULL; + + + return CHAR_chara[index].charfunctable[element].string; +} + +INLINE char* _CHAR_getWorkChar( char *file, int line, int index ,CHAR_WORKDATACHAR element ) +{ + if(!CHAR_CHECKINDEX(index)) { + print( "err %s:%d \n", file, line); + return NULL; + } + if(!CHAR_CHECKCHARWORKDATAINDEX(element)) { + print( "err %s:%d \n", file, line); + return NULL; + } + return CHAR_chara[index].workchar[element].string; +} + +INLINE BOOL _CHAR_setWorkChar( char *file, int line, int index ,CHAR_WORKDATACHAR element, + char* new ) +{ + if(!CHAR_CHECKINDEX(index)) { + print( "err %s:%d \n", file, line); + return FALSE; + } + if(!CHAR_CHECKCHARWORKDATAINDEX(element)) { + print( "err %s:%d \n", file, line); + return FALSE; + } + strcpysafe( CHAR_chara[index].workchar[element].string, + sizeof(CHAR_chara[index].workchar[element].string), + new ); + return TRUE; +} + +static char CHAR_flgbitmaskpattern[]= +{ + 0x01, + 0x02, + 0x04, + 0x08, + 0x10, + 0x20, + 0x40, + 0x80, +}; + +INLINE BOOL _CHAR_getFlg( char *file, int line, int index ,CHAR_DATAFLG element ) +{ + int elementnum; + int bitnum; + if(!CHAR_CHECKINDEX(index)) { + //print( "err %s:%d from %s:%d \n", __FILE__, __LINE__,file, line); + return FALSE; + } + if(!CHAR_CHECKFLGDATAINDEX(element)) { + //print( "err %s:%d from %s:%d \n", __FILE__, __LINE__,file, line); + return FALSE; + } + elementnum = element / (sizeof( char )*8); + bitnum = element % (sizeof( char )*8); + + + if( CHAR_chara[index].flg[elementnum] + & CHAR_flgbitmaskpattern[bitnum]) + return TRUE; + else + return FALSE; + +} + +INLINE char _CHAR_setFlg( char *file, int line, int index , CHAR_DATACHAR element, int newdata ) +{ + int buf; + int elementnum; + int bitnum; + char bitpattern; + + if(!CHAR_CHECKINDEX(index)) { + print( "err %s:%d \n", file, line); + return FALSE; + } + if(!CHAR_CHECKFLGDATAINDEX(element)) { + print( "err %s:%d \n", file, line); + return FALSE; + } + elementnum = element / (sizeof( char )*8); + bitnum = element % (sizeof( char )*8); + + /* 樯及袄毛转 */ + buf = CHAR_chara[index].flg[elementnum] + & CHAR_flgbitmaskpattern[bitnum]; + + if( newdata != 0 ){ + bitpattern = CHAR_flgbitmaskpattern[bitnum]; + CHAR_chara[index].flg[elementnum] |= bitpattern; + + }else{ + bitpattern = ~CHAR_flgbitmaskpattern[bitnum]; + CHAR_chara[index].flg[elementnum] &= bitpattern; + } + + if( buf )return 1; + else return 0; +} + +INLINE int _CHAR_getItemIndex( char *file, int line, int charaindex ,int ti) +{ + if( !CHAR_CHECKINDEX( charaindex)) { + print( "err %s:%d from %s:%d\n", __FILE__, __LINE__,file, line); + return -1; + } + if( !CHAR_CHECKITEMINDEX( charaindex, ti) ){ + print( "err %s:%d from %s:%d \n", __FILE__, __LINE__,file, line); + return -1; + } + return CHAR_chara[charaindex].indexOfExistItems[ti]; +} + +INLINE int _CHAR_setItemIndex( char *file, int line, int index ,int iindex,int id ) +{ + int buf; + if( !CHAR_CHECKINDEX(index)) { + print( "err %s:%d \n", file, line); + return -1; + } + if( CHAR_MAXITEMHAVE <= iindex || iindex < 0 ) { + print( "err %s:%d \n", file, line); + return -1; + } + +// CoolFish: 2001/10/12 +#ifdef _UNIQUE_P_I + if ( (id != -1) && (ITEM_getChar(id, ITEM_UNIQUECODE) != NULL) ) // shan add hjj + ITEM_setItemUniCode(id); +#endif + +#ifdef _ITEM_TIME_LIMIT + if( (id != -1) && ITEM_getWorkInt( id, ITEM_WORKTIMELIMIT) == -1 ){ + char *arg, *p=NULL, tmp[16]=""; + long iTmp; + time_t iTime; + + time(&iTime); + iTmp = iTime; + arg = ITEM_getChar( id, ITEM_ARGUMENT); + if(arg && (p=strstr( arg, "Time")) != NULL ){ + //andy_log + print("%s setTime arg:%s \n", ITEM_getChar( id, ITEM_NAME), arg); + strcpy( tmp, (p+4)); + iTmp += atoi(tmp)*60; + ITEM_setWorkInt( id, ITEM_WORKTIMELIMIT, iTmp); + } + } +#endif + buf = CHAR_chara[index].indexOfExistItems[iindex]; + CHAR_chara[index].indexOfExistItems[iindex] = id; + return buf; +} +INLINE int _CHAR_getPoolItemIndex( char *file, int line, int index ,int iindex) +{ + if( !CHAR_CHECKINDEX(index)) { + print( "err %s:%d from %s:%d\n", __FILE__, __LINE__,file, line); + return -1; + } + if( CHAR_MAXPOOLITEMHAVE <= iindex || iindex < 0 ) { + print( "err %s:%d from %s:%d \n", __FILE__, __LINE__,file, line); + return -1; + } + return CHAR_chara[index].indexOfExistPoolItems[iindex]; +} +INLINE int _CHAR_setPoolItemIndex( char *file, int line, int index ,int iindex,int id ) +{ + int buf; + if( !CHAR_CHECKINDEX(index)) { + print( "err %s:%d \n", file, line); + return -1; + } + if( CHAR_MAXPOOLITEMHAVE <= iindex || iindex < 0 ) { + print( "err %s:%d \n", file, line); + return -1; + } + buf = CHAR_chara[index].indexOfExistPoolItems[iindex]; + CHAR_chara[index].indexOfExistPoolItems[iindex] = id; + return buf; +} + +INLINE BOOL CHAR_setAddressbookEntry( int index , int aindex , + ADDRESSBOOK_entry *a ) +{ + if( !CHAR_CHECKINDEX(index))return FALSE; + if( !CHAR_CHECKADDRESSBOOKINDEX( aindex ))return FALSE; + + memcpy( & CHAR_chara[index].addressBook[aindex] , a , + sizeof(ADDRESSBOOK_entry )); + + return TRUE; +} + +INLINE ADDRESSBOOK_entry* CHAR_getAddressbookEntry( int index , + int aindex) +{ + if( !CHAR_CHECKINDEX(index))return (ADDRESSBOOK_entry*)NULL; + if( !CHAR_CHECKADDRESSBOOKINDEX( aindex )) + return (ADDRESSBOOK_entry*) NULL; + + return &CHAR_chara[index].addressBook[aindex]; +} + +INLINE Char* CHAR_getCharPointer( int index ) +{ + if( !CHAR_CHECKINDEX(index) )return NULL; + return &CHAR_chara[index]; +} + +INLINE int CHAR_getCharNum( void ) +{ + return CHAR_charanum; +} + +INLINE int CHAR_getPlayerMaxNum( void ) +{ + return CHAR_playernum; +} + +INLINE int CHAR_getPetMaxNum( void ) +{ + return CHAR_petnum; +} +INLINE int CHAR_getOthersMaxNum( void ) +{ + return CHAR_othersnum; +} + +INLINE BOOL CHAR_getCharUse( int index ) +{ + if( !CHAR_CHECKINDEX(index)) + return FALSE; + return CHAR_chara[index].use; +} + +INLINE CHAR_HaveSkill* CHAR_getCharHaveSkill( int index,int sindex ) +{ + if( !CHAR_CHECKINDEX(index))return NULL; + if( !CHAR_CHECKSKILLINDEX(sindex))return NULL; + return &CHAR_chara[index].haveSkill[sindex]; +} +//------------------------------------------------------------------------ +//人物index 技能位置 索引 +INLINE int _CHAR_getIntPSkill( char *file, int line, int index, int skillti, SKILL_DATAINT ti) +{ + if( !CHAR_CHECKINDEX( index) ) return -1; + if( !CHAR_CHECKSKILLINDEX( skillti) ) return -1; + if( ti >= SKILL_DATAINTNUM || ti < 0 ){ + print(" getIntPSkill() SKILL_DATAINT (%d) err -%s:%d!!\n", ti , file, line); + return -1; + } + if( CHAR_chara[index].haveSkill[skillti].skill.data[ti] <= 0 ) return -1; + return CHAR_chara[index].haveSkill[skillti].skill.data[ti]; +} +//人物index 技能位置 索引 欲设定值 +INLINE void _CHAR_setIntPSkill( char *file, int line, int index, int skillti, SKILL_DATAINT ti, int data) +{ + if( !CHAR_CHECKINDEX( index) ) return; + if( !CHAR_CHECKSKILLINDEX( skillti) ) return; + if( ti >= SKILL_DATAINTNUM || ti < 0 ){ + print(" getIntPSkill() SKILL_DATAINT (%d) err -%s:%d!!\n", ti , file, line); + return; + } +// if( CHAR_chara[index].haveSkill[sindex].use > 0 ) + CHAR_chara[index].haveSkill[skillti].skill.data[ti] = data; +} +//------------------------------------------------------------------------ + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 +int CHAR_getCharSkill( int index,int sindex ) +{ + CHAR_HaveSkill* hskill; + + hskill = CHAR_getCharHaveSkill( index, sindex ); + + if(hskill != NULL) + return SKILL_getInt( &hskill->skill, SKILL_IDENTITY); + else + return -1; + +} + +int CHAR_setCharSkill( int index,int sindex, int new ) +{ + CHAR_HaveSkill* hskill; + + if( !CHAR_CHECKINDEX(index)) return -1; + if( !CHAR_CHECKSKILLINDEX(sindex)) return -1; + + hskill = CHAR_getCharHaveSkill( index, sindex ); + SKILL_setInt( &hskill->skill, SKILL_IDENTITY, new); + return TRUE; +} +#endif + +INLINE int CHAR_getCharHaveTitle( int charaindex,int tindex ) +{ + if( !CHAR_CHECKINDEX(charaindex))return 0; + if( !CHAR_CHECKTITLEINDEX(tindex))return 0; + return CHAR_chara[charaindex].indexOfHaveTitle[tindex]; +} + +INLINE int CHAR_setCharHaveTitle( int charaindex,int tindex, int new ) +{ + int ret; + if( !CHAR_CHECKINDEX(charaindex))return 0; + if( !CHAR_CHECKTITLEINDEX(tindex))return 0; + if( new != -1 ) + if( TITLE_getTitleIndex( new) == -1 ) return 0; + ret = CHAR_getCharHaveTitle( charaindex,tindex); + CHAR_chara[charaindex].indexOfHaveTitle[tindex] = new; + return ret; +} + +INLINE int CHAR_getCharPet( int charaindex,int petindex ) +{ + if( !CHAR_CHECKINDEX(charaindex))return -1; + if( !CHAR_CHECKPETINDEX(petindex))return -1; + return CHAR_chara[charaindex].unionTable.indexOfPet[petindex]; +} + +INLINE int CHAR_setCharPet( int charaindex,int petindex, int new ) +{ + int ret; + if( !CHAR_CHECKINDEX(charaindex))return -1; + if( !CHAR_CHECKPETINDEX(petindex))return -1; + ret = CHAR_getCharPet( charaindex,petindex); + +// CoolFish: 2001/10/12 +#ifdef _UNIQUE_P_I + if (new != -1) + CHAR_setPetUniCode(new); +#endif + + CHAR_chara[charaindex].unionTable.indexOfPet[petindex] = new; + return ret; +} + +INLINE int CHAR_getCharPoolPet( int charaindex,int petindex ) +{ + if( !CHAR_CHECKINDEX(charaindex))return -1; + if( !CHAR_CHECKPOOLPETINDEX(petindex))return -1; + return CHAR_chara[charaindex].indexOfPoolPet[petindex]; +} + +INLINE int CHAR_setCharPoolPet( int charaindex,int petindex, int new ) +{ + int ret; + if( !CHAR_CHECKINDEX(charaindex))return -1; + if( !CHAR_CHECKPOOLPETINDEX(petindex))return -1; + ret = CHAR_getCharPoolPet( charaindex,petindex); + + CHAR_chara[charaindex].indexOfPoolPet[petindex] = new; + return ret; +} + +int CHAR_getCharPetElement( int charaindex ) +{ + int i; + if( !CHAR_CHECKINDEX(charaindex))return -1; + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ) { + if( CHAR_getCharPet( charaindex,i) == -1 ) break; + } + return ( i == CHAR_MAXPETHAVE ? -1:i ); + +} + +int CHAR_getCharPoolPetElement( int charaindex ) +{ + int i; + int limit; + if( !CHAR_CHECKINDEX(charaindex))return -1; + + //andy_reEdit 2003/09/18 + limit = (CHAR_getInt(charaindex,CHAR_TRANSMIGRATION)*2)+5; + limit = min( limit, CHAR_MAXPOOLPETHAVE); + for( i = 0; i < limit; i ++ ) { + if( CHAR_getCharPoolPet( charaindex,i) == -1 ) break; + } + return ( i == limit ? -1:i ); + +} + +int CHAR_getCharPoolItemIndexElement( int charaindex ) +{ + int i; + int limit; + if( !CHAR_CHECKINDEX(charaindex))return -1; + //andy_reEdit 2003/09/18 + limit = (CHAR_getInt(charaindex,CHAR_TRANSMIGRATION)*4)+10; + limit = min( limit, CHAR_MAXPOOLITEMHAVE); + for( i = 0; i < limit; i ++ ) { + if( CHAR_getPoolItemIndex( charaindex,i) == -1 ) break; + } + // Robin fix + //return ( i == CHAR_MAXPOOLITEMHAVE ? -1:i ); + return ( i >= limit ? -1:i ); + +} + +int CHAR_getEmptyCharPoolItemIndexNum( int charaindex) +{ + int i, cnt = 0; + int limit; + if( !CHAR_CHECKINDEX(charaindex))return 0; + //andy_reEdit 2003/09/18 + limit = (CHAR_getInt(charaindex,CHAR_TRANSMIGRATION)*4)+10; + limit = min( limit, CHAR_MAXPOOLITEMHAVE); + + for( i = 0; i < limit; i ++ ) { + if( CHAR_getPoolItemIndex( charaindex, i) == -1 ) cnt++; + } + return cnt; +} + +INLINE int _CHAR_getPetSkill( char *file, int line, int petindex, int havepetskillindex ) +{ + if( !CHAR_CHECKINDEX(petindex)) { + print( "err %s:%d from %s:%d\n", __FILE__, __LINE__, file, line); + return -1; + } + if( !CHAR_CHECKPETSKILLINDEX(havepetskillindex)) { + print( "err %s:%d from %s:%d\n", __FILE__, __LINE__, file, line); + return -1; + } + return CHAR_chara[petindex].unionTable.indexOfPetskill[havepetskillindex]; +} + +INLINE int _CHAR_setPetSkill( char *file, int line, int petindex,int havepetskillindex, int new ) +{ + int ret; + if( !CHAR_CHECKINDEX(petindex)) { + print( "err %s:%d from %s:%d\n", __FILE__, __LINE__, file, line); + return -1; + } + if( !CHAR_CHECKPETSKILLINDEX(havepetskillindex)) { + print( "err %s:%d from %s:%d\n", __FILE__, __LINE__, file, line); + return -1; + } + ret = CHAR_getPetSkill( petindex,havepetskillindex); + CHAR_chara[petindex].unionTable.indexOfPetskill[havepetskillindex] = new; + return ret; +} + +int _CHAR_getPetSkillElement( char *file, int line, int petindex ) +{ + int i; + if( !CHAR_CHECKINDEX(petindex)) { + print( "err %s:%d from %s:%d\n", __FILE__, __LINE__, file, line); + return -1; + } + for( i = 0; i < CHAR_MAXPETSKILLHAVE; i ++ ) { + if( CHAR_getPetSkill( petindex,i) == -1 ) break; + } + return ( i == CHAR_MAXPETSKILLHAVE ? -1:i ); + +} + +INLINE int CHAR_getCharMakeSequenceNumber( int charaindex ) +{ + if( !CHAR_CHECKINDEX(charaindex))return -1; + return CHAR_chara[charaindex].CharMakeSequenceNumber; +} + +void CHAR_constructFunctable( int charaindex ) +{ + int i; + if( !CHAR_CHECKINDEX(charaindex))return; + for( i=CHAR_FIRSTFUNCTION; i < CHAR_LASTFUNCTION ; i++ ) + CHAR_chara[charaindex].functable[i-CHAR_FIRSTFUNCTION] + = getFunctionPointerFromName( CHAR_getCharfunctable( charaindex,i ) ); +} + +void* CHAR_getFunctionPointer( int charaindex, int functype ) +{ + if( !CHAR_CHECKINDEX(charaindex) )return NULL; + if( functype < CHAR_FIRSTFUNCTION || functype >= CHAR_LASTFUNCTION ) + return NULL; + + return CHAR_chara[charaindex].functable[functype]; +} + +BOOL CHAR_initCharArray( int pnum, int petnum,int onum ) +{ + int i; + + BOOL CHAR_checksetdata( void ); + if( CHAR_checksetdata() == FALSE ){ + print(" err CHAR_checksetdata() FALSE !!\n"); + return FALSE; + } + + //andy_log + print("#"); + + CHAR_initSeekGraphicNumberFromString(); + CHAR_initChatMagic(); + CHAR_charanum = pnum + petnum +onum; + + //andy_log + print("#"); + + CHAR_chara = allocateMemory( sizeof( Char ) * CHAR_charanum ); + if( CHAR_chara == NULL ){ + print("无法分配人物内存 !!\n"); + return FALSE; + } + + + //andy_log + print("人物内存: %4.2f...", ((float)sizeof( Char )*CHAR_charanum)/1024); + + for( i = 0 ; i < CHAR_charanum ; i ++ ){ + memset( &CHAR_chara[i], 0 , sizeof( Char )); + + } + for( i = 0 ; i < pnum ; i ++ ){ +#ifdef _NPC_SEPARATEDATA + CHAR_InitCharTempNum( &CHAR_chara[i] ); +#endif + } + CHAR_playernum = pnum; + CHAR_petnum = petnum; + CHAR_othersnum = onum; + + return TRUE; +} + +BOOL CHAR_endCharArray( void ) +{ +#ifdef _NPC_SEPARATEDATA + CHAR_EndCharTempNum(); +#endif + freeMemory( CHAR_chara ); + CHAR_charanum = 0; + return TRUE; +} + +BOOL CHAR_getCharOnArrayPercentage( int mode, int *max, int *min, int *cnt) +{ + int po=0, Dnums=0; + po = initCharCounter[0].endcnt; + *cnt = -1; + while( 1){ + if( !CHAR_chara[po].use ){ + }else{ + Dnums++; + } + po++; + if( po >= initCharCounter[mode].endcnt ){ + break; + } + } + *cnt = Dnums; + *max = initCharCounter[mode].endcnt - initCharCounter[mode].startcnt; + *min = 0; + + return TRUE; +} + +int CHAR_initCharOneArray( Char* ch ) +{ + int i; + int mode; + int ret = TRUE; + int first; + static unsigned int CharMakeSequenceNumber = 0; + if( initCharCounter[0].startcnt == -1 ) { + initCharCounter[0].startcnt = 0; + initCharCounter[0].cnt = initCharCounter[0].startcnt; + initCharCounter[0].endcnt = CHAR_playernum; + + initCharCounter[1].startcnt = initCharCounter[0].endcnt; + initCharCounter[1].cnt = initCharCounter[0].endcnt; + initCharCounter[1].endcnt = CHAR_playernum + CHAR_petnum; + + initCharCounter[2].startcnt = initCharCounter[1].endcnt; + initCharCounter[2].cnt = initCharCounter[1].endcnt; + initCharCounter[2].endcnt = CHAR_charanum; + } + if( ch->data[CHAR_WHICHTYPE] == CHAR_TYPEPLAYER ){ + mode = 0; + }else if( CHAR_TYPEPET == ch->data[CHAR_WHICHTYPE] ) { + mode = 1; + }else{ + mode = 2; + } + i = initCharCounter[mode].cnt; + first = TRUE; + while( 1 ){ + if( !first && i >= initCharCounter[mode].cnt ) { + ret = FALSE; + break; + } + if( CHAR_chara[i].use == FALSE ){ + ret = TRUE; + break; + }else{ + i++; + if( i >= initCharCounter[mode].endcnt ){ + i = initCharCounter[mode].startcnt; + first = FALSE; + } + } + } + if( ret ){ + typedef BOOL (*INITFUNC)(int index); + INITFUNC initfunc; + +#ifdef _NPC_SEPARATEDATA + ch->tempint = CHAR_chara[i].tempint; + CHAR_getDefaultCharTempNum( ch); +#endif + memset( &CHAR_chara[i] , 0, sizeof( Char ) ); + memcpy( &CHAR_chara[i] , ch , sizeof( Char ) ); + + initfunc = (INITFUNC)getFunctionPointerFromName( + ch->charfunctable[CHAR_INITFUNC].string ); + if( initfunc ) { + if( initfunc( i ) == FALSE ){ + CHAR_chara[i].use = FALSE; + ret = FALSE; + } + } + if( ret ){ + CHAR_chara[i].use = TRUE; + CHAR_constructFunctable( i ); + if( i + 1 >= initCharCounter[mode].endcnt ) { + initCharCounter[mode].cnt + = initCharCounter[mode].startcnt; + }else { + initCharCounter[mode].cnt = i+1; + } + CHAR_chara[i].CharMakeSequenceNumber = CharMakeSequenceNumber++; + if( CharMakeSequenceNumber == 0xffffffff) CharMakeSequenceNumber = 0; + } + }else{ + fprint( "Error: Char full\n" ); + } + return ret ? i: -1; +} + +void CHAR_removeHaveItem( Char* ch ) +{ + int i; + if( ch == NULL )return; + for( i=0 ; iindexOfExistItems[i]; + ch->indexOfExistItems[i] = -1; + ITEM_endExistItemsOne( itemindex ); + } +} + +void CHAR_removeHavePoolItem( Char* ch ) +{ + int i; + if( ch == NULL )return; + for( i=0 ; iindexOfExistPoolItems[i]; + ch->indexOfExistPoolItems[i] = -1; + ITEM_endExistItemsOne( itemindex ); + } +} + +void CHAR_endCharData( Char* ch ) +{ + if( ch == NULL ){ + return; + } + CHAR_removeHaveItem( ch ); + CHAR_removeHavePoolItem( ch); + +#ifdef _CHAR_POOLITEM +// CHAR_removeHaveDepotItem( ch ); +#endif +#ifdef _CHAR_POOLPET +// CHAR_removeHaveDepotPet( ch ); +#endif + + ch->use = FALSE; +} + +void CHAR_endCharOneArray( int index ) +{ + Char* ch = NULL; + if( !CHAR_CHECKINDEX( index) ) return; + ch = CHAR_getCharPointer(index); + + if( ch == NULL ){ + print( "CHAR_endCharOneArray err ch == NULL :%d\n", index); + return; + } + CHAR_endCharData( ch ); +} +static char CHAR_dataString[STRINGBUFSIZ*16*2]; +BOOL CHAR_checksetdata( void ) +{ + int i; + char* strings[CHAR_DATAINTNUM + CHAR_DATACHARNUM]; + int stringnum=0; + for(i = 0; i < CHAR_DATAINTNUM ; i ++ ){ + if( CHAR_setintdata[i][0] != '#' ) + strings[stringnum++] = CHAR_setintdata[i]; + } + for( i = 0 ; i < CHAR_DATACHARNUM ; i ++ ){ + if( CHAR_setchardata[i][0] != '#' ) + strings[stringnum++] = CHAR_setchardata[i]; + } + if( ! checkStringsUnique( strings, stringnum , 1 ) ){ + fprint( "set????data is overlapped.\nIt is not allowed\n"); + return FALSE; + } + return TRUE; +} + +#define FLGRESERVESTRING "flg" +#define ITEMRESERVESTRING "item" +#define POOLITEMRESERVESTRING "poolitem" +#define SKILLRESERVESTRING "skill" +#define TITLERESERVESTRING "title" +#define ADDRESSBOOKRESERVESTRING "adr" +#define PETSERVERSTRING "pet" +#define PETITEMRESERVESTRING "pitem" +#define PETSKILLSERVERSTRING "psk" +#define POOLPETSERVERSTRING "poolpet" +#define ITEMPOOLRESERVESTRING "itempool" + +#define DATAENDCHECKPOINT "DATAEND" + + + + +#ifdef _CHAR_POOLITEM +#define DEPOTITEMRESERVESTRING "Depotitem" +#endif +#ifdef _CHAR_POOLPET +#define DEPOTPETRESERVESTRING "Depotpet" +#endif + +char* CHAR_makeStringFromCharData( Char* one ) +{ + int i; + int petnum; + int strlength=0; + + if (!one) return NULL; + + memset( CHAR_dataString, 0, sizeof(CHAR_dataString)); + for( i = 0 ; i < CHAR_DATAINTNUM ; i ++ ){ + char linedata[256]; + snprintf( linedata , sizeof(linedata), + "%s=%d" CHAR_DELIMITER, + CHAR_setintdata[i], + one->data[i] ); + strcpysafe( &CHAR_dataString[strlength], + sizeof( CHAR_dataString ) - strlength, + linedata ); + strlength += strlen( linedata ); + if( strlength > sizeof( CHAR_dataString ) ) { + fprint( "err chardata buffer over\n"); + goto RETURN; + } + } + for( i = 0 ; i < CHAR_DATACHARNUM ; i ++ ){ + char linedata[256]; + char escapebuffer[256]; + snprintf( linedata , sizeof(linedata), + "%s=%s" CHAR_DELIMITER, + CHAR_setchardata[i], + makeEscapeString( one->string[i].string, escapebuffer, + sizeof( escapebuffer) )); + + strcpysafe( &CHAR_dataString[strlength], + sizeof( CHAR_dataString ) - strlength, + linedata ); + strlength += strlen( linedata ); + if( strlength > sizeof( CHAR_dataString ) ) { + fprint( "err chardata buffer over\n"); + goto RETURN; + } + } + for( i = 0 ; i < arraysizeof( one->flg ) ; i ++ ){ + char linedata[128]; + snprintf( linedata , sizeof(linedata), + FLGRESERVESTRING "%d=%d" CHAR_DELIMITER, + i, one->flg[i]); + + strcpysafe( &CHAR_dataString[strlength], + sizeof( CHAR_dataString ) - strlength, + linedata ); + strlength += strlen( linedata ); + if( strlength > sizeof( CHAR_dataString ) ) { + fprint( "err chardata buffer over\n"); + goto RETURN; + } + } + + for( i = 0 ; i < CHAR_SKILLMAXHAVE ; i ++ ){ + char linedata[128]; + char *skillstring=NULL; + if( one->haveSkill[i].use == TRUE) + skillstring = SKILL_makeStringFromSkillData( + &one->haveSkill[i].skill ); + if( skillstring == NULL ) continue; + snprintf( linedata , sizeof( linedata ), + SKILLRESERVESTRING "%d=%s" CHAR_DELIMITER, + i,skillstring ); + strcpysafe( &CHAR_dataString[strlength], + sizeof( CHAR_dataString ) - strlength, + linedata ); + strlength += strlen( linedata ); + if( strlength > sizeof( CHAR_dataString ) ) { + fprint( "err chardata buffer over\n"); + goto RETURN; + } + } + + for( i = 0 ; i < CHAR_MAXITEMHAVE ; i ++ ){ + char linedata[2048]; + char *itemstring=NULL; + if( one->indexOfExistItems[i] != -1 ) + itemstring = ITEM_makeStringFromItemIndex( + one->indexOfExistItems[i], 0); + if( itemstring == NULL )continue; + snprintf( linedata , sizeof( linedata ), + ITEMRESERVESTRING "%d=%s" CHAR_DELIMITER, + i, itemstring); + strcpysafe( &CHAR_dataString[strlength], + sizeof( CHAR_dataString ) - strlength, + linedata ); + + strlength += strlen( linedata ); + if( strlength > sizeof( CHAR_dataString ) ) { + fprint( "err chardata buffer over\n"); + goto RETURN; + } + } + + for( i = 0 ; i < CHAR_MAXPOOLITEMHAVE ; i ++ ){ + char linedata[2048]; + char *itemstring=NULL; + if( one->indexOfExistPoolItems[i] != -1 ) + itemstring = ITEM_makeStringFromItemIndex( + one->indexOfExistPoolItems[i], 0); + if( itemstring == NULL )continue; + snprintf( linedata , sizeof( linedata ), + POOLITEMRESERVESTRING "%d=%s" CHAR_DELIMITER, + i, itemstring); + strcpysafe( &CHAR_dataString[strlength], + sizeof( CHAR_dataString ) - strlength, + linedata ); + strlength += strlen( linedata ); + if( strlength > sizeof( CHAR_dataString ) ) { + fprint( "err chardata buffer over\n"); + goto RETURN; + } + } + + for( i = 0 ; i < CHAR_TITLEMAXHAVE ; i ++ ){ + char linedata[128]; + if( one->indexOfHaveTitle[i]< 0 || one->indexOfHaveTitle[i] >= CHAR_TITLEMAXHAVE ) { + continue; + } + snprintf( linedata , sizeof( linedata ), + TITLERESERVESTRING "%d=%d" CHAR_DELIMITER, + i, one->indexOfHaveTitle[i] ); + strcpysafe( &CHAR_dataString[strlength], + sizeof( CHAR_dataString ) - strlength, + linedata ); + strlength += strlen( linedata ); + if( strlength > sizeof( CHAR_dataString ) ) { + fprint( "err chardata buffer over\n"); + goto RETURN; + } + } + for( i=0 ; i < ADDRESSBOOK_MAX ; i++ ){ + char linedata[512]; + char *p; + p = ADDRESSBOOK_makeAddressbookString(&one->addressBook[i]); + if( strlen( p) == 0 ) { + continue; + } + snprintf( linedata ,sizeof(linedata), + ADDRESSBOOKRESERVESTRING "%d=%s" CHAR_DELIMITER, + i,p + ); + strcpysafe( &CHAR_dataString[strlength], + sizeof( CHAR_dataString ) - strlength, + linedata ); + strlength += strlen( linedata ); + if( strlength > sizeof( CHAR_dataString ) ) { + fprint( "err chardata buffer over\n"); + goto RETURN; + } + } + for( petnum = 0; petnum < CHAR_MAXPETHAVE; petnum ++ ) { + int petindex; + char linedata[4096*2]; + char *petstring; + petindex = one->unionTable.indexOfPet[petnum]; + if( !CHAR_CHECKINDEX(petindex))continue; + petstring = CHAR_makePetStringFromPetIndex( petindex); + if( petstring == NULL ) continue; + snprintf( linedata , sizeof(linedata), + PETSERVERSTRING "%d=%s" CHAR_DELIMITER,petnum,petstring ); + strcpysafe( &CHAR_dataString[strlength], + sizeof( CHAR_dataString ) - strlength, + linedata ); + strlength += strlen( linedata ); + if( strlength > sizeof( CHAR_dataString ) ) { + fprint( "err chardata buffer over\n"); + goto RETURN; + } + } + + for( petnum = 0; petnum < CHAR_MAXPOOLPETHAVE; petnum ++ ) { + int petindex; + char linedata[4096*2]; + char *petstring; + petindex = one->indexOfPoolPet[petnum]; + if( !CHAR_CHECKINDEX(petindex))continue; + petstring = CHAR_makePetStringFromPetIndex( petindex); + if( petstring == NULL ) continue; + + //andy_log + if( strstr( petstring, "name:") == NULL || + strstr( petstring, "ownt:") == NULL ) { + LodBadPetString( "petstring", "poolpet string buffer err:", petnum); + fprint( "ANDY err poolpet string buffer err:\n%s\n", petstring); + goto RETURN; + } + + snprintf( linedata , sizeof(linedata), + POOLPETSERVERSTRING "%d=%s" CHAR_DELIMITER,petnum,petstring ); + + strcpysafe( &CHAR_dataString[strlength], + sizeof( CHAR_dataString ) - strlength, + linedata ); + strlength += strlen( linedata ); + if( strlength > sizeof( CHAR_dataString ) ) { + fprint( "err chardata buffer over\n"); + goto RETURN; + } + } +#ifdef _CHAR_FIXDATADEF + { + char linedata[1024]; + memset( linedata, 0, sizeof(linedata)); + snprintf( linedata , sizeof(linedata), + DATAENDCHECKPOINT "=%d" CHAR_DELIMITER, (int)time(NULL)/1000); + + strcpysafe( &CHAR_dataString[strlength], + sizeof( CHAR_dataString ) - strlength, linedata ); + + if( strlength > sizeof( CHAR_dataString ) ) { + LodBadPetString( "DATAENDCHECKPOINT", "err chardata buffer over", -1); + fprint( "err chardata buffer over:DATAENDCHECKPOINT !\n"); + goto MAKESTRINGERR; + } + } +#endif + +RETURN: + if( strstr( CHAR_dataString, DATAENDCHECKPOINT) == NULL ){ + LodBadPetString( CHAR_dataString, "err mk dataString no end", -1); + } + + return CHAR_dataString; +MAKESTRINGERR: + return NULL; +} + +char* CHAR_makeStringFromCharIndex( int index ) +{ + if( 0 <= index && index <= CHAR_charanum /* index OK*/ + && CHAR_chara[index].use == TRUE ) + /* OK */; + else + return NULL; + return CHAR_makeStringFromCharData(&CHAR_chara[index]); + +} + +BOOL CHAR_makeCharFromStringToArg( char* data, Char* one) +{ + int i; + int readindex=1, rightData=0; + + if( data[0] == '\0' ) + return FALSE; +DebugPoint=51; + { + char name[4096]; + char *sp = strstr( data, "name="); + char *sp2 = strstr( data, "ownt="); + if( sp && sp2 ){ + snprintf( name, sp2-sp-5, "%s", sp+5 ); + print("\n开始登陆人物名称:%s ", name ); + }else + print("\n开始登陆人物名称错误! "); + + if( data[strlen(data)-2] != '\n' ){ + print("\n 登陆错误!:%s ",data+strlen(data)-20 ); + } + + if( strlen(name) > 16 ){ + print("人物名称过长!! 人物名称:%s 长度:%d ", name ,strlen(name) ); + } + } + + memset( one , 0 , sizeof( Char )); +DebugPoint=52; + CHAR_getDefaultChar(one, 0); + // Robin 0726 default RidePet + one->data[CHAR_RIDEPET] = -1; + strcpysafe( one->string[CHAR_FMNAME].string, + sizeof( one->string[CHAR_FMNAME].string), "\0" ); + one->data[CHAR_FMINDEX] = -1; +#ifdef _PETSKILL_BECOMEPIG + one->data[CHAR_BECOMEPIG] = -1; + one->data[CHAR_BECOMEPIG_BBI] = 100250; +#endif + +DebugPoint=53; + while( 1 ){ + BOOL ret; + char linebuf[4096]; + char firstToken[256]; + char secondToken[4096]; + memset( linebuf, 0, sizeof( linebuf)); + memset( firstToken, 0, sizeof( firstToken)); + memset( secondToken, 0, sizeof( secondToken)); +DebugPoint=54; + ret = getStringFromIndexWithDelim( data ,CHAR_DELIMITER, + readindex, + linebuf, sizeof( linebuf ) ); +DebugPoint=55; + if( ret == FALSE )break; + if( linebuf[0] == '#' || + linebuf[0] == '\n' || + linebuf[0] == '\0' ){ + readindex ++; + continue; + } +DebugPoint=56; + ret = getStringFromIndexWithDelim( linebuf , "=" , 1 , + firstToken , + sizeof(firstToken) ); + if( ret == FALSE ) return FALSE; +DebugPoint=57; + strcpysafe( secondToken , sizeof( secondToken ), + linebuf + strlen(firstToken) + strlen("=") ); +DebugPoint=58; + for( i = 0 ; i < CHAR_DATAINTNUM ; i ++ ){ + if( strcmp(firstToken ,CHAR_setintdata[i] ) == 0 ){ + one->data[i] = atoi( secondToken ); + goto NEXT; + } + } +DebugPoint=59; + for( i = 0 ; i < CHAR_DATACHARNUM ; i ++ ){ + if( strcmp( firstToken ,CHAR_setchardata[i] ) == 0 ){ + strcpysafe( one->string[i].string, + sizeof(one->string[i].string), + makeStringFromEscaped(secondToken) ); + if( strlen( one->string[i].string ) > 128 ){ + print(" CHARDATA_to_long!!:%s:%d ", one->string[i].string, strlen( one->string[i].string ) ); + one->string[i].string[0]=0; + } + goto NEXT; + } + } +DebugPoint=60; + if( strncmp( firstToken , FLGRESERVESTRING, + strlen( FLGRESERVESTRING ) ) == 0 ){ + int flgindex; + flgindex = atoi( firstToken+strlen(FLGRESERVESTRING) ); + if( flgindex < 0 || arraysizeof( one->flg ) <= flgindex ) + ; + else + one->flg[flgindex] = atoi( secondToken ); + + goto NEXT; + } +DebugPoint=61; + if( strncmp( firstToken , ITEMRESERVESTRING, + strlen( ITEMRESERVESTRING ) ) == 0 ){ + int itemindex; + if( strcmp( secondToken, NULLITEM) == 0 ) + goto NEXT; + itemindex = atoi( firstToken+strlen(ITEMRESERVESTRING) ); + if( itemindex < 0 || CHAR_MAXITEMHAVE <= itemindex + || one->indexOfExistItems[itemindex] != -1 ){ + ; + }else{ + ITEM_Item itmone; + BOOL ret; + + ret = ITEM_makeExistItemsFromStringToArg( secondToken, &itmone, 0); + + if( ret == TRUE ){ + int existitemindex; + existitemindex = ITEM_initExistItemsOne( &itmone ); + one->indexOfExistItems[itemindex] = existitemindex; + } + } + goto NEXT; + } +DebugPoint=62; + if( strncmp( firstToken , POOLITEMRESERVESTRING, + strlen( POOLITEMRESERVESTRING ) ) == 0 ){ + int itemindex; + if( strcmp( secondToken, NULLITEM) == 0 ) + goto NEXT; + itemindex = atoi( firstToken+strlen(POOLITEMRESERVESTRING) ); + if( itemindex < 0 || CHAR_MAXPOOLITEMHAVE <= itemindex + || one->indexOfExistPoolItems[itemindex] != -1 ){ + ; + }else{ + ITEM_Item itmone; + BOOL ret; + ret = ITEM_makeExistItemsFromStringToArg( secondToken , &itmone, 0 ); + + if( ret == TRUE ){ + int existitemindex; + existitemindex = ITEM_initExistItemsOne( &itmone ); + one->indexOfExistPoolItems[itemindex] = existitemindex; + } + } + goto NEXT; + } +DebugPoint=63; + if( strncmp( firstToken , SKILLRESERVESTRING, + strlen( SKILLRESERVESTRING ) ) == 0 ){ + int skillindex; + if( strcmp( secondToken, NULLSKILL) == 0 ) + goto NEXT; + skillindex =atoi( firstToken+strlen(SKILLRESERVESTRING) ); + if( skillindex < 0 || CHAR_SKILLMAXHAVE <= skillindex + || one->haveSkill[skillindex].use == TRUE ){ + }else{ + BOOL ret; + Skill skillone; + ret=SKILL_makeSkillFromStringToArg(secondToken,&skillone); + + if( ret == TRUE ){ + memcpy( &one->haveSkill[skillindex].skill , &skillone, + sizeof( Skill )); + one->haveSkill[skillindex].use = TRUE; + } + } + goto NEXT; + } +DebugPoint=64; + if( strncmp( firstToken , TITLERESERVESTRING, + strlen( TITLERESERVESTRING ) ) == 0 ){ + int titlenumber=atoi(firstToken+strlen(TITLERESERVESTRING)); + if( titlenumber < 0 || CHAR_TITLEMAXHAVE <= titlenumber ){ + }else{ + int titleindex = atoi( secondToken ); + if( TITLE_getTitleIndex( titleindex) != -1) + one->indexOfHaveTitle[titlenumber] = titleindex; + } + goto NEXT; + } +DebugPoint=65; + if( strncmp( firstToken , ADDRESSBOOKRESERVESTRING, + strlen( ADDRESSBOOKRESERVESTRING ) ) == 0 ){ + int addressnumber = atoi( firstToken + +strlen(ADDRESSBOOKRESERVESTRING)); + if( addressnumber < 0 || ADDRESSBOOK_MAX <= addressnumber ){ + }else{ + ADDRESSBOOK_makeAddressbookEntry( secondToken, + &one + ->addressBook[ + addressnumber]); + } + goto NEXT; + } +DebugPoint=66; + if( strncmp( firstToken , PETSERVERSTRING, + strlen( PETSERVERSTRING ) ) == 0 ){ + Char ch; + int ret; + int petnumber = atoi( firstToken+strlen(PETSERVERSTRING)); + if( !CHAR_CHECKPETINDEX( petnumber)) goto NEXT; + ret = CHAR_makePetFromStringToArg(secondToken,&ch, petnumber); + if( ret == TRUE ){ + int petindex = PET_initCharOneArray( &ch ); + if( petindex < 0 ){ + print( "宠物制作失败。\n"); + } + one->unionTable.indexOfPet[petnumber] = petindex; + goto NEXT; + }else{ + LodBadPetString( data, "错误总计", petnumber); + + fprint( "错误 宠物字符串 无法作成\n"); + return FALSE; + } + } +DebugPoint=67; + if( strncmp( firstToken , POOLPETSERVERSTRING, strlen( POOLPETSERVERSTRING ) ) == 0 ){ + + Char ch; + int ret; + int petnumber = atoi( firstToken+strlen(POOLPETSERVERSTRING)); + if( !CHAR_CHECKPOOLPETINDEX( petnumber)) goto NEXT; + ret = CHAR_makePetFromStringToArg( secondToken, &ch, petnumber); + if( ret == TRUE ) { + int petindex = PET_initCharOneArray( &ch ); + if( petindex < 0 ) { + fprint( "错误 宠物 无法作成\n"); + } + one->indexOfPoolPet[petnumber] = petindex; + goto NEXT; + }else{ + LodBadPetString( data, "err *total", petnumber); + fprint( "错误 合成宠物字符串 无法作成\n"); + return FALSE; + } + } + + if( strncmp( firstToken , DATAENDCHECKPOINT, strlen( DATAENDCHECKPOINT ) ) == 0 ){ + rightData=1; + goto NEXT; + } + + + print( "??? : %s[%s]\n" , linebuf, firstToken ); + NEXT: + readindex++; + } +DebugPoint=68; + // Robin 0913 bad_chardata + { + char name[4096]; + char* sp = strstr( data, "name="); + // shan add + char *sp2 = strstr( data, "ownt="); + if( sp && sp2 ){ + snprintf( name, sp2-sp-5, "%s", sp+5 ); + print("\n登陆成功 人物名称:%s ", name ); + } + else + print("\n登陆成功 人物名称错误! "); + + if( data[strlen(data)-2] != '\n' ){ + print("\n玩家登陆出错! "); + //return FALSE; + } + } +// if( rightData != 1 ){ +// return FALSE; +// } + return TRUE; +} +static char CHAR_petdataString[4096]; + +char *CHAR_makePetStringFromPetIndex( int petindex) +{ + int i; + int strlength = 0; + + memset( CHAR_petdataString, 0, sizeof(CHAR_petdataString)); + + for( i = 0 ; i < CHAR_DATAINTNUM ; i ++ ){ + char linedata[512]; + +#ifdef _SIMPLIFY_PETSTRING + if( CHAR_getInt( petindex, i) == 0 ) continue; +#endif + snprintf( linedata , sizeof(linedata), + "%s:%d" NONCHAR_DELIMITER, CHAR_setintdata[i], CHAR_getInt( petindex,i) ); + strcpysafe( &CHAR_petdataString[strlength], + sizeof( CHAR_petdataString ) - strlength, linedata ); + strlength += strlen( linedata ); + if( strlength > sizeof( CHAR_petdataString ) ) { + fprint( "err petdata buffer over\n"); + return NULL; + } + } + + for( i = 0 ; i < CHAR_DATACHARNUM ; i ++ ){ + char linedata[512]; + char escapebuffer[512]; +#ifdef _SIMPLIFY_PETSTRING + if( *CHAR_getChar( petindex, i) == NULL + && strcmp( CHAR_setchardata[i], "name") + && strcmp( CHAR_setchardata[i], "ownt") ) + continue; +#endif + snprintf( linedata , sizeof(linedata), + "%s:%s" NONCHAR_DELIMITER, + CHAR_setchardata[i], + makeEscapeString( CHAR_getChar(petindex, i), escapebuffer, + sizeof( escapebuffer) )); + + strcpysafe( &CHAR_petdataString[strlength], + sizeof( CHAR_petdataString ) - strlength, + linedata ); + strlength += strlen( linedata ); + if( strlength > sizeof( CHAR_petdataString ) ) { + fprint( "错误 宠物数据缓冲不足\n"); + return NULL; + } + } + + for( i = 0; i < CHAR_MAXPETSKILLHAVE; i ++ ) { + int petskillid; + char linedata[512]; + petskillid = CHAR_getPetSkill( petindex, i); + if( PETSKILL_getPetskillArray( petskillid) == -1 ) continue; + snprintf( linedata , sizeof(linedata), + PETSKILLSERVERSTRING "%d:%d" NONCHAR_DELIMITER,i ,petskillid ); + strcpysafe( &CHAR_petdataString[strlength], + sizeof( CHAR_petdataString ) - strlength, linedata ); + strlength += strlen( linedata ); + if( strlength > sizeof( CHAR_petdataString ) ) { + fprint( "错误 宠物数据缓冲不足\n"); + return NULL; + } + } + +#ifndef _SIMPLIFY_ITEMSTRING + for( i = 0 ; i < CHAR_MAXITEMHAVE ; i ++ ){ + char linedata[2048]; + char *itemstring=NULL; + if( CHAR_getItemIndex( petindex, i) != -1 ) + itemstring = ITEM_makeStringFromItemIndex( + CHAR_getItemIndex( petindex, i), 1); + if( itemstring == NULL )continue; + snprintf( linedata , sizeof( linedata ), + PETITEMRESERVESTRING "%d:%s" NONCHAR_DELIMITER, + i, itemstring); + strcpysafe( &CHAR_petdataString[strlength], + sizeof( CHAR_petdataString ) - strlength, + linedata ); + + strlength += strlen( linedata ); + if( strlength > sizeof( CHAR_petdataString ) ) { + fprint( "错误 宠物数据缓冲不足\n"); + return NULL; + } + } +#endif + + if( strstr( CHAR_petdataString, "name:") == NULL || + strstr( CHAR_petdataString, "ownt:") == NULL ){ + LodBadPetString( CHAR_petdataString, "名字 错误", -1); + } + return CHAR_petdataString; +} +void LodBadPetString( char *data, char *err, int ti) +{ + FILE *fp=NULL; + if( data == NULL || strlen( data) <= 0 ) return; + if( (fp=fopen( "badpetstring.txt", "a+")) == NULL ) return; + fprintf( fp, "ti:%d %s:%s\n", ti, err, data); + + fclose( fp); +} +int CHAR_makePetFromStringToArg( char *src, Char *ch, int ti) +{ + int readnum = 1; + int rc; + BOOL found; + char buff[4096]; + char petfirstToken[256]; + char petsecondToken[4096]; + int i, findE=0; + + memset( ch, 0, sizeof( Char)); + CHAR_getDefaultChar(ch, 31010); + + if( strstr( src, "name:") == NULL || + strstr( src, "ownt:") == NULL ){//findE + LodBadPetString( src, "make name err", ti); + fprint( "err PetString make name err\n"); + return -1; + } + + while( 1 ) { + rc = getStringFromIndexWithDelim( src, NONCHAR_DELIMITER, readnum, buff, sizeof( buff )); + if( rc == TRUE ) { + if( buff[0] == '#' || buff[0] == '\n' || buff[0] == '\0' ){ + readnum ++; + continue; + } + } + if( rc == TRUE ) { + readnum ++; + rc = getStringFromIndexWithDelim( buff , ":" , 1 , + petfirstToken , + sizeof(petfirstToken) ); + if( rc == FALSE ) break; + strcpysafe( petsecondToken , sizeof( petsecondToken ), + buff + strlen(petfirstToken) + strlen(":") ); +// rc = getStringFromIndexWithDelim( buff , ":" , 2 , +// petsecondToken , +// sizeof(petsecondToken) ); + + found = FALSE; + for( i = 0 ; i < CHAR_DATAINTNUM ; i ++ ){ + if( strcmp(petfirstToken ,CHAR_setintdata[i] ) == 0 ){ + ch->data[i] = atoi( petsecondToken ); + found = TRUE; + break; + } + } + if( !found ) { + for( i = 0 ; i < CHAR_DATACHARNUM ; i ++ ){ + if( strcmp( petfirstToken ,CHAR_setchardata[i] ) == 0 ){ + strcpysafe( ch->string[i].string, + sizeof(ch->string[i].string), + makeStringFromEscaped(petsecondToken) ); + found = TRUE; + findE = 1; + break; + } + } + } + if( !found) { +#ifndef _SIMPLIFY_ITEMSTRING + if( strncmp( petfirstToken , PETITEMRESERVESTRING, + strlen( PETITEMRESERVESTRING ) ) == 0 ) + { + int itemindex; + itemindex = atoi( petfirstToken+strlen(PETITEMRESERVESTRING) ); + if( itemindex < 0 || CHAR_MAXITEMHAVE <= itemindex + || ch->indexOfExistItems[itemindex] != -1 ){ + ; + }else{ + ITEM_Item itmone; + BOOL ret; + + ret = ITEM_makeExistItemsFromStringToArg( petsecondToken , + &itmone,1); + + if( ret == TRUE ){ + int existitemindex; + existitemindex = ITEM_initExistItemsOne( &itmone ); + ch->indexOfExistItems[itemindex] = existitemindex; + found = TRUE; + break; + } + } + } +#endif + + } + if( !found ) { + if( strncmp( petfirstToken , PETSKILLSERVERSTRING, + strlen( PETSKILLSERVERSTRING ) ) == 0 ){ + int petskillnum = atoi( petfirstToken + strlen( PETSKILLSERVERSTRING)); + if( CHAR_CHECKPETSKILLINDEX( petskillnum) ) { + int petskillid = atoi( petsecondToken ); + if( PETSKILL_getPetskillArray(petskillid) != -1) { + ch->unionTable.indexOfPetskill[petskillnum] = petskillid; + found = TRUE; + } + } + } + } + if( !found) { + fprint( "makePetFromString err?: %s : %s [%s] \n" , src, buff, petfirstToken ); + } + }else { + break; + } + } + + if( findE == 0 ){//findE + LodBadPetString( src, "make charstr err", ti); + fprint( "err PetString make charstr err\n"); + return -1; + } + + return TRUE; +} + +#ifdef _PERSONAL_FAME // Arminius 8.30: 家族个人声望 + +void CHAR_earnFame(int index, int fame) +{ + int oldfame=CHAR_getInt(index, CHAR_FAME)+fame; +#ifdef _NEW_MANOR_LAW + int momentum = CHAR_getInt(index,CHAR_MOMENTUM) + fame; +#endif + + if (oldfame>MAX_PERSONALFAME) oldfame=MAX_PERSONALFAME; + if (oldfame<0) oldfame=0; + CHAR_setInt(index, CHAR_FAME, oldfame); +#ifdef _NEW_MANOR_LAW + if(momentum > MAX_PERSONAL_MOMENTUM) momentum = MAX_PERSONAL_MOMENTUM; + else if(momentum < 0) momentum = 0; + CHAR_setInt(index,CHAR_MOMENTUM,momentum); +#endif +} +#endif + +// CoolFish: 2001/10/11 Unique Pet Code +#ifdef _UNIQUE_P_I +void CHAR_setPetUniCode(int petindex) +{ + if( strcmp( CHAR_getChar(petindex, CHAR_UNIQUECODE), "" ) == 0 || + strstr( CHAR_getChar(petindex, CHAR_UNIQUECODE), "_" ) != NULL || + strstr( CHAR_getChar(petindex, CHAR_UNIQUECODE), UNIQUE_KEYCODEPET ) == NULL ){ + char petbuf[256]; + time_t t1; + time(&t1); + sprintf(petbuf, "%ld%s%d%d", t1, UNIQUE_KEYCODEPET, getServernumber(), unique_p); + unique_p++; + if (unique_p >= MAX_UNIQUE_P_I) + unique_p = 0; + CHAR_setChar(petindex, CHAR_UNIQUECODE, petbuf); + } +} + +void ITEM_setItemUniCode(int itemindex) +{ + if( strcmp( ITEM_getChar(itemindex, ITEM_UNIQUECODE), "") == 0 || + strstr( ITEM_getChar(itemindex, ITEM_UNIQUECODE), "_") != NULL ){ + char itembuf[256]; + time_t t1; + time(&t1); + + sprintf(itembuf, "%ld%s%d%d%d", t1, "i", unique_i, getServernumber(), UNIQUE_KEYCODEITEM); + + unique_i++; + if (unique_i >= MAX_UNIQUE_P_I) + unique_i = 0; + ITEM_setChar(itemindex, ITEM_UNIQUECODE, itembuf); + } +} + +void CHAR_DetainSameItem( int charaindex, int itemindex) +{ + ITEM_setWorkInt( itemindex, ITEM_WORKCHARAINDEX, 100000); + ITEM_setWorkInt( itemindex, ITEM_WORKOBJINDEX, -1); + + LogItem( + CHAR_getChar( charaindex, CHAR_NAME), + CHAR_getChar( charaindex, CHAR_CDKEY), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID), +#endif + "SysDeleteSame(系统删除重覆道具)", + CHAR_getInt( charaindex, CHAR_FLOOR), + CHAR_getInt( charaindex, CHAR_X), + CHAR_getInt( charaindex, CHAR_Y), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); +// ITEM_endExistItemsOne( itemindex); +} + +void CHAR_DetainSamePet( int charaindex, int petindex) +{ + CHAR_setWorkInt( petindex, CHAR_WORKPLAYERINDEX, 100000); + CHAR_setChar( petindex, CHAR_OWNERCDKEY, "SYS"); + CHAR_setChar( petindex, CHAR_OWNERCHARANAME, "SYS"); + CHAR_complianceParameter( petindex ); + LogPet( + CHAR_getChar( charaindex, CHAR_NAME), + CHAR_getChar( charaindex, CHAR_CDKEY), + CHAR_getChar( petindex, CHAR_NAME), + CHAR_getInt( petindex, CHAR_LV), + "SysDeleteSame(删除重覆宠物)", + CHAR_getInt( charaindex, CHAR_FLOOR), + CHAR_getInt( charaindex, CHAR_X), + CHAR_getInt( charaindex, CHAR_Y), + CHAR_getChar( petindex, CHAR_UNIQUECODE) // shan 2001/12/14 + ); +// CHAR_endCharOneArray( petindex ); +} + +void CHAR_DetainSameUCodePet( int charaindex, int petindex, int Ti) +{ + if( Ti == -1 ){ + int i; + for( i = 0; i < CHAR_MAXPETHAVE; i++ ) { + int pindex = CHAR_getCharPet( charaindex, i); + if( !CHAR_CHECKINDEX( pindex) ) continue; + if( pindex == petindex ) break; + } + if( i >= CHAR_MAXPETHAVE ) return; + CHAR_setCharPet( charaindex, i, -1); + }else{ + CHAR_setCharPet( charaindex, Ti, -1); + } + CHAR_DetainSamePet( charaindex, petindex); +} + +void CHAR_DetainSameUCodePoolPet( int charaindex, int petindex, int Ti) +{ + if( Ti == -1 ){ + int i; + for( i = 0; i < CHAR_MAXPETHAVE; i++ ) { + int pindex = CHAR_getCharPet( charaindex, i); + if( !CHAR_CHECKINDEX( pindex) ) continue; + if( pindex == petindex ) break; + } + if( i >= CHAR_MAXPETHAVE ) return; + CHAR_setCharPoolPet( charaindex, i, -1); + }else{ + CHAR_setCharPoolPet( charaindex, Ti, -1); + } + CHAR_DetainSamePet( charaindex, petindex); +} + +void CHAR_DetainSameUCodeItem( int charaindex, int itemindex, int Ti) +{ + if( Ti == -1 ){ + int i; + for( i = 0; i < CHAR_MAXITEMHAVE; i++ ) { + int iindex = CHAR_getItemIndex( charaindex, i); + if( !ITEM_CHECKINDEX( iindex) ) continue; + if( iindex == itemindex ) break; + } + if( i >= CHAR_MAXITEMHAVE ) return; + CHAR_setItemIndex( charaindex, i, -1); + }else{ + CHAR_setItemIndex( charaindex, Ti, -1); + } + CHAR_DetainSameItem( charaindex, itemindex); +} + +void CHAR_DetainSameUCodePoolItem( int charaindex, int itemindex, int Ti) +{ + if( Ti == -1 ){ + int i; + for( i = 0; i < CHAR_MAXPOOLITEMHAVE; i++ ) { + int iindex = CHAR_getPoolItemIndex( charaindex, i); + if( !ITEM_CHECKINDEX( iindex) ) continue; + if( iindex == itemindex ) break; + } + if( i >= CHAR_MAXPOOLITEMHAVE ) return; + CHAR_setPoolItemIndex( charaindex, i, -1); + }else{ + CHAR_setPoolItemIndex( charaindex, Ti, -1); + } + CHAR_DetainSameItem( charaindex, itemindex); +} + +void Check_P_I_UniCode( int charaindex) +{ +#ifdef _CHECK_UCODE + int i = 0, j = 0; + int petindex, itemindex; + + int MAXPLAYER = CHAR_getPlayerMaxNum(); + int MAXPET = CHAR_getPetMaxNum(); + int MAXITEM = ITEM_getITEM_itemnum(); + + for( i=0; i < CHAR_MAXPETHAVE; i++ ) { + petindex = CHAR_getCharPet( charaindex, i); + if( !CHAR_CHECKINDEX( petindex) ) continue; + for( j=MAXPLAYER; j CHAR_GetOldLevelExp( level+1) ){ + Myexp = 0; + }else if( Myexp >= defexp ){ + Myexp = Myexp - defexp; + } + if( Myexp < 0 ) Myexp = 0; + + CHAR_setInt( charaindex, CHAR_EXP, Myexp); + CHAR_setInt( charaindex, CHAR_OLDEXP, 0); + + CHAR_send_P_StatusString( charaindex ,CHAR_P_STRING_EXP|CHAR_P_STRING_LV); + return Myexp; +} + +INLINE int CHAR_HandleExp( int charaindex ) +{ + int needexp, level, Myexp; + if( !CHAR_CHECKINDEX( charaindex) ) return -1; + level = CHAR_getInt( charaindex, CHAR_LV); + Myexp = CHAR_getInt( charaindex, CHAR_EXP); + if( (needexp = CHAR_GetLevelExp( charaindex, level+1), 0) < 0 ) return -1; + Myexp = Myexp - needexp; + if( Myexp < 0 ) Myexp = 0; + CHAR_setInt( charaindex, CHAR_EXP, Myexp); + return Myexp; +} +#endif + +#ifdef _FIX_TSKILLCAN +BOOL CHAR_PETSKILLCAN( int toindex) +{ + int i, j, itemindex, petindex; + int FixItem[20]={ + 20270, 20271, 20272, 20273, 20274, + 20275, 20276, 20277, 20278, 20279, + 20280, 20281, 20282, 20283, 20284, + 20287, 20288, 20289, 20290, 20291 + }; + for (i = CHAR_STARTITEMARRAY; i < CHAR_MAXITEMHAVE; i ++) { + itemindex = CHAR_getItemIndex( toindex, i); + if( !ITEM_CHECKINDEX( itemindex)) continue; + for( j=0; j<20; j++){ + if( ITEM_getInt( itemindex, ITEM_ID) == FixItem[j] ){ + ITEM_setInt( itemindex, ITEM_CANMERGEFROM, 0); + } + } + if( ITEM_getInt( itemindex, ITEM_ID) != 1623 )continue; + CHAR_setItemIndex( toindex, i, -1 ); + ITEM_endExistItemsOne( itemindex); + CHAR_sendItemDataOne( toindex, i); + } + + for (i = 0; i < CHAR_MAXPOOLITEMHAVE; i++){ + int itemindex = CHAR_getPoolItemIndex(toindex, i); + if( !ITEM_CHECKINDEX( itemindex)) continue; + for( j=0; j<20; j++){ + if( ITEM_getInt( itemindex, ITEM_ID) == FixItem[j] ){ + ITEM_setInt( itemindex, ITEM_CANMERGEFROM, 0); + } + } + if( ITEM_getInt( itemindex, ITEM_ID) != 1623 )continue; + CHAR_setPoolItemIndex( toindex, i, -1); + ITEM_endExistItemsOne( itemindex); + } + + for( i=0; i < CHAR_MAXPETHAVE; i++) { + char szPet[128]; + BOOL Finds = FALSE; + petindex = CHAR_getCharPet( toindex, i); + if( !CHAR_CHECKINDEX( petindex) ) continue; + + {//清除狂暴攻击 + int j; + for( j=0; j (surplus*mypile) || itempile <= 0 ){ + return -1; + } + + if( mypile >= itempile ){ + ret = CHAR_addItemSpecificItemIndex( charaindex, itemindex); + if( ret < 0 || ret >= CHAR_MAXITEMHAVE ) { + ITEM_endExistItemsOne( itemindex); + return -1; + } + CHAR_sendItemDataOne( charaindex, ret); + }else{ + int newindex[10]={ -1,-1,-1,-1,-1, + -1,-1,-1,-1,-1}; + int i, ti=0, ItemID, MaxPile; + MaxPile = itempile; + ItemID = ITEM_getInt( itemindex, ITEM_ID); + while( MaxPile > 0 ){ + if( ti >= 10 ) return -1; + newindex[ti] = ITEM_makeItemAndRegist( ItemID); + if( !ITEM_CHECKINDEX( newindex[ti]) ) return -1; + if( mypile > MaxPile ) mypile = MaxPile; + ITEM_setInt( newindex[ti], ITEM_USEPILENUMS, mypile); + ti++; + MaxPile -= mypile; + if( MaxPile < 0 ) return -1; + } + for( i=0; i<10; i++ ){ + if( newindex[i] == -1 ) break; + ret = CHAR_addItemSpecificItemIndex( charaindex, newindex[i]); + if( ret < 0 || ret >= CHAR_MAXITEMHAVE ) { + ITEM_endExistItemsOne( newindex[i]); + return -1; + } + CHAR_sendItemDataOne( charaindex, ret); + } + ITEM_endExistItemsOne( itemindex); + } + return ret; +#endif +} + + +INLINE int _CHAR_DelItem( char *file, int line, int charaindex, int ti, int num, int flg) +{ +// char token[256]; + int pilenum; + int itemindex = CHAR_getItemIndex( charaindex , ti ); + if( !ITEM_CHECKINDEX(itemindex) ) return 0; +#ifdef _ITEM_PILENUMS + pilenum = ITEM_getInt( itemindex, ITEM_USEPILENUMS); + if( pilenum < num ) return FALSE; + pilenum = pilenum - num; + ITEM_setInt( itemindex, ITEM_USEPILENUMS, pilenum); + if( pilenum <= 0 ){ +#endif +/* + if( flg == 1 ){ + sprintf( token, "交出%s。", ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW); + } +*/ + CHAR_setItemIndex( charaindex, ti, -1); + ITEM_endExistItemsOne( itemindex); +#ifdef _ITEM_PILENUMS + } +#endif + CHAR_sendItemDataOne( charaindex, ti); + + return 1; +} + +int CHAR_getMaxHaveGold( int charaindex) +{ + int MaxGold; +#ifdef _FIX_MAX_GOLD // WON ADD 增加人物金钱上限 + int trans = CHAR_getInt( charaindex, CHAR_TRANSMIGRATION); + MaxGold = 1000000 + trans*( 1800000); +#else + MaxGold = CHAR_MAXGOLDHAVE; +#endif + + return MaxGold; +} + +INLINE int _CHAR_AddGold( char *file, int line, int charaindex, int gold) +{ + char token[256]; + int MyGold, MaxGold; + + MaxGold = CHAR_getMaxHaveGold( charaindex); + MyGold = CHAR_getInt( charaindex, CHAR_GOLD); + MyGold = (MyGold>MaxGold)?MaxGold:MyGold; + gold = (gold>MaxGold)?MaxGold:gold; + sprintf( token, "得到%d石币", gold); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW); + MyGold += gold; + + if( MyGold > MaxGold ){ + int reGolds=0; + int MyGBGold = CHAR_getInt( charaindex, CHAR_PERSONAGOLD); + reGolds = MyGold - MaxGold; + MyGBGold += reGolds; + MyGBGold = (MyGBGold > CHAR_MAXPERSONAGOLD)?CHAR_MAXPERSONAGOLD:MyGBGold; + CHAR_setInt( charaindex, CHAR_PERSONAGOLD, MyGBGold); + sprintf( token,"存款:%d ,银行剩馀:%d 。", reGolds, CHAR_getInt( charaindex, CHAR_PERSONAGOLD )); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW); + LogBankStone( CHAR_getChar( charaindex, CHAR_NAME ), CHAR_getChar( charaindex, CHAR_CDKEY ), + charaindex, reGolds, + "GB_Bank_save(宝箱)", + CHAR_getInt( charaindex, CHAR_FLOOR), + CHAR_getInt( charaindex, CHAR_X ), CHAR_getInt( charaindex, CHAR_Y ), + CHAR_getInt( charaindex, CHAR_GOLD ), + CHAR_getInt( charaindex, CHAR_PERSONAGOLD ) + ); + MyGold = MaxGold; + } + CHAR_setInt( charaindex, CHAR_GOLD, MyGold); + CHAR_send_P_StatusString( charaindex, CHAR_P_STRING_GOLD); + + return 1; +} + +INLINE int _CHAR_DelGold( char *file, int line, int charaindex, int gold) +{ + char token[256]; + int MyGold, MaxGold; + + MaxGold = CHAR_getMaxHaveGold( charaindex); + MyGold = CHAR_getInt( charaindex, CHAR_GOLD); + MyGold = (MyGold>MaxGold)?MaxGold:MyGold; + gold = (gold>MaxGold)?MaxGold:gold; + + if( MyGold < gold ){ + sprintf( token, "没有足够的石币!(%d石币)", gold); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW); + return 0; + } + MyGold -= gold; + MyGold = ( MyGold < 0 )?0:MyGold; + CHAR_setInt( charaindex, CHAR_GOLD, MyGold); + CHAR_send_P_StatusString( charaindex, CHAR_P_STRING_GOLD); + return 1; +} + + +#ifdef _CHAR_POOLITEM +INLINE int _CHAR_getDepotItemIndex( char *file, int line, int index ,int iindex) +{ + if( !CHAR_CHECKINDEX(index)) { + print( "err %s:%d from %s:%d\n", __FILE__, __LINE__,file, line); + return -1; + } + if( CHAR_MAXDEPOTITEMHAVE <= iindex || iindex < 0 ) { + print( "err %s:%d from %s:%d \n", __FILE__, __LINE__,file, line); + return -1; + } + + if( !CHAR_CheckDepotItem( index) ){ + print( "err %s:%d from %s:%d\n", __FILE__, __LINE__,file, line); + return -1; + } + + return CHAR_chara[index].indexOfExistDepotItems[iindex]; +} + +INLINE int _CHAR_setDepotItemIndex( char *file, int line, int index ,int iindex,int id ) +{ + int buf; + if( !CHAR_CHECKINDEX(index)) { + print( "err %s:%d \n", file, line); + return -1; + } + if( CHAR_MAXDEPOTITEMHAVE <= iindex || iindex < 0 ) { + print( "err %s:%d \n", file, line); + return -1; + } + if( !CHAR_CheckDepotItem( index) ){ + print( "err %s:%d from %s:%d\n", __FILE__, __LINE__,file, line); + return -1; + } + buf = CHAR_chara[index].indexOfExistDepotItems[iindex]; + CHAR_chara[index].indexOfExistDepotItems[iindex] = id; + return buf; +} +void CHAR_removeHaveDepotItem( Char* ch ) +{ + if( ch == NULL )return; + if( ch->indexOfExistDepotItems == NULL ) return; + freeMemory( ch->indexOfExistDepotItems ); + ch->indexOfExistDepotItems = NULL; +} + +void CHAR_removeDepotItem( int charaindex) +{ + int i,itemindex; + Char* ch = NULL; + if( !CHAR_CHECKINDEX( charaindex) ) return; + if( !CHAR_CheckDepotItem( charaindex) ) return; //仓库未存在 + ch = CHAR_getCharPointer( charaindex); + if( ch == NULL ){ + print( "removeDepotItem err ch == NULL :%d\n", charaindex); + return; + } + + for( i=0; iindexOfExistDepotItems[i]; + if( !ITEM_CHECKINDEX( itemindex) ) continue; + itemstring = ITEM_makeStringFromItemIndex( ch->indexOfExistDepotItems[i], 0); + if( itemstring == NULL )continue; + + snprintf( linedata , sizeof( linedata ), + DEPOTITEMRESERVESTRING "%d=%s" CHAR_DELIMITER, i, itemstring); + + strcpysafe( &CHAR_dataString[strlength], sizeof( CHAR_dataString ) - strlength, + linedata ); + strlength += strlen( linedata ); + if( strlength > sizeof( CHAR_dataString ) ) { + return NULL; + } + } + return CHAR_dataString; +} + +BOOL CHAR_makeDepotItemStringToChar( int charaindex, char* data) +{ + int readindex=1, itemindex; + Char* ch = NULL; + BOOL ret; + char firstToken[256], secondToken[4096], linebuf[4096]; + + if( data[0] == '\0' ) + return -1; + if( !CHAR_CHECKINDEX( charaindex) ) return FALSE; + ch = CHAR_getCharPointer( charaindex); + if( ch == NULL ){ + print( "makeDepotItem err ch == NULL :%d\n", charaindex); + return FALSE; + } + + while( 1 ){ + memset( linebuf, 0, sizeof( linebuf)); + memset( firstToken, 0, sizeof( firstToken)); + memset( secondToken, 0, sizeof( secondToken)); + ret = getStringFromIndexWithDelim( data ,CHAR_DELIMITER, + readindex, linebuf, sizeof( linebuf ) ); + if( ret == FALSE )break; + if( linebuf[0] == '#' || linebuf[0] == '\n' || linebuf[0] == '\0' ){ + goto NEXT; + } + if( (ret=getStringFromIndexWithDelim( linebuf , "=" , 1 , + firstToken, sizeof(firstToken) )) == FALSE ) return FALSE; + strcpysafe( secondToken , sizeof( secondToken ), + linebuf + strlen( firstToken) + strlen("=") ); + + if( strncmp( firstToken, DEPOTITEMRESERVESTRING, strlen( DEPOTITEMRESERVESTRING)) == 0 ){ + if( strcmp( secondToken, NULLITEM) == 0 ) goto NEXT; + itemindex = atoi( firstToken+strlen(DEPOTITEMRESERVESTRING) ); + if( itemindex < 0 || CHAR_MAXDEPOTITEMHAVE <= itemindex + || ch->indexOfExistDepotItems[itemindex] != -1 ){ + ; + }else{ + ITEM_Item itmone; + ret = ITEM_makeExistItemsFromStringToArg( secondToken , &itmone, 0 ); + if( ret == TRUE ){ + int existitemindex; + existitemindex = ITEM_initExistItemsOne( &itmone ); + ch->indexOfExistDepotItems[itemindex] = existitemindex; + } + } + goto NEXT; + } + print( "??? : %s[%s]\n" , linebuf, firstToken ); +NEXT: + readindex++; + } + return TRUE; +} + +void CHAR_ShowMyDepotItems( int charaindex) +{ + int i, itemindex; + + print( "\nShowMyDepotItems:\n"); + if( !CHAR_CheckDepotItem( charaindex) ) return; + for( i=0; iindexOfExistDepotItems == NULL ) return FALSE; + return TRUE; +} + +#endif + + +#ifdef _CHAR_POOLPET +INLINE int _CHAR_getDepotPetIndex( char *file, int line, int index ,int iindex) +{ + if( !CHAR_CHECKINDEX(index)) { + print( "err %s:%d from %s:%d\n", __FILE__, __LINE__,file, line); + return -1; + } + if( CHAR_MAXDEPOTPETHAVE <= iindex || iindex < 0 ) { + print( "err %s:%d from %s:%d \n", __FILE__, __LINE__,file, line); + return -1; + } + + if( !CHAR_CheckDepotPet( index) ){ + print( "err %s:%d from %s:%d\n", __FILE__, __LINE__,file, line); + return -1; + } + + return CHAR_chara[index].indexOfExistDepotPets[iindex]; +} + +INLINE int _CHAR_setDepotPetIndex( char *file, int line, int index ,int iindex,int id ) +{ + int buf; + if( !CHAR_CHECKINDEX(index)) { + print( "err %s:%d \n", file, line); + return -1; + } + if( CHAR_MAXDEPOTPETHAVE <= iindex || iindex < 0 ) { + print( "err %s:%d \n", file, line); + return -1; + } + if( !CHAR_CheckDepotPet( index) ){ + print( "err %s:%d from %s:%d\n", __FILE__, __LINE__,file, line); + return -1; + } + buf = CHAR_chara[index].indexOfExistDepotPets[iindex]; + CHAR_chara[index].indexOfExistDepotPets[iindex] = id; + return buf; +} +void CHAR_removeHaveDepotPet( Char* ch ) +{ + if( ch == NULL )return; + if( ch->indexOfExistDepotPets == NULL ) return; + freeMemory( ch->indexOfExistDepotPets ); + ch->indexOfExistDepotPets = NULL; +} + +void CHAR_removeDepotPet( int charaindex) +{ + int i,petindex; + Char* ch = NULL; + if( !CHAR_CHECKINDEX( charaindex) ) return; + if( !CHAR_CheckDepotPet( charaindex) ) return; //仓库未存在 + ch = CHAR_getCharPointer( charaindex); + if( ch == NULL ){ + print( "removeDepotPet err ch == NULL :%d\n", charaindex); + return; + } + + for( i=0; iindexOfExistDepotPets[i]; + if( !CHAR_CHECKINDEX( petindex) ) continue; + petstring = CHAR_makePetStringFromPetIndex( ch->indexOfExistDepotPets[i]); + if( petstring == NULL )continue; + + snprintf( linedata , sizeof( linedata ), + DEPOTPETRESERVESTRING "%d=%s" CHAR_DELIMITER, i, petstring); + + strcpysafe( &CHAR_dataString[strlength], sizeof( CHAR_dataString ) - strlength, + linedata ); + strlength += strlen( linedata ); + if( strlength > sizeof( CHAR_dataString ) ) { + return NULL; + } + } + return CHAR_dataString; +} + +BOOL CHAR_makeDepotPetStringToChar( int charaindex, char* data) +{ + int readindex=1, petindex; + Char* ch = NULL; + BOOL ret; + char firstToken[256], secondToken[4096], linebuf[4096]; + + if( data[0] == '\0' ) + return -1; + if( !CHAR_CHECKINDEX( charaindex) ) return FALSE; + ch = CHAR_getCharPointer( charaindex); + if( ch == NULL ){ + print( "makeDepotPet err ch == NULL :%d\n", charaindex); + return FALSE; + } + + while( 1 ){ + memset( linebuf, 0, sizeof( linebuf)); + memset( firstToken, 0, sizeof( firstToken)); + memset( secondToken, 0, sizeof( secondToken)); + ret = getStringFromIndexWithDelim( data ,CHAR_DELIMITER, + readindex, linebuf, sizeof( linebuf ) ); + if( ret == FALSE )break; + if( linebuf[0] == '#' || linebuf[0] == '\n' || linebuf[0] == '\0' ){ + goto NEXT; + } + if( (ret=getStringFromIndexWithDelim( linebuf , "=" , 1 , + firstToken, sizeof(firstToken) )) == FALSE ) return FALSE; + strcpysafe( secondToken , sizeof( secondToken ), + linebuf + strlen( firstToken) + strlen("=") ); + + if( strncmp( firstToken, DEPOTPETRESERVESTRING, strlen( DEPOTPETRESERVESTRING)) == 0 ){ + if( strcmp( secondToken, NULLITEM) == 0 ) goto NEXT; + petindex = atoi( firstToken+strlen(DEPOTPETRESERVESTRING) ); + if( petindex < 0 || CHAR_MAXDEPOTPETHAVE <= petindex + || ch->indexOfExistDepotPets[petindex] != -1 ){ + ; + }else{ + Char petone; + ret = CHAR_makePetFromStringToArg( secondToken , &petone, 0 ); + if( ret == TRUE ){ + int existpetindex; + existpetindex = PET_initCharOneArray( &petone ); + ch->indexOfExistDepotPets[petindex] = existpetindex; + CHAR_setWorkInt( existpetindex, CHAR_WORKPLAYERINDEX, charaindex); + CHAR_complianceParameter( existpetindex); + } + } + goto NEXT; + } + print( "??? : %s[%s]\n" , linebuf, firstToken ); +NEXT: + readindex++; + } + return TRUE; +} + +void CHAR_ShowMyDepotPets( int charaindex) +{ + int i, petindex; + + print( "\nShowMyDepotPets:\n"); + if( !CHAR_CheckDepotPet( charaindex) ) return; + for( i=0; iindexOfExistDepotPets == NULL ) return FALSE; + return TRUE; +} + +#endif + + + +#ifdef _NPC_SEPARATEDATA +void CHAR_showTempInt( int index) +{ + int j; + CHAR_chara[index].tempint = allocateMemory( sizeof( int ) * 10 ); + //andy_log + print("\n CHAR_chara[%d].tempint: %x\n", index, CHAR_chara[index].tempint ); + for( j=0; j<10; j++){ + print("%d,", CHAR_chara[index].tempint[j] ); + } + //andy_log + print("]\n"); +} + +BOOL CHAR_InitCharTempNum( Char* ch ) +{ + int j; + ch->tempint = allocateMemory( sizeof( int ) * 10 ); + print("\n init temp:%x,", ch->tempint ); + for( j=0; j<10; j++){ + ch->tempint[j] = 0; + print("%d,", ch->tempint[j] ); + } + return TRUE; +} + +void CHAR_EndCharTempNum( void ) +{ + int i; + + for( i = 0 ; i < CHAR_charanum ; i ++ ){ + freeMemory( CHAR_chara[i].tempint ); + } + +} + +void CHAR_getDefaultCharTempNum( Char* ch ) +{ + int j; + if( ch->tempint == NULL ) return; + for( j=0; j<10; j++){ + ch->tempint[j] = -1; + print("%d,", ch->tempint[j] ); + } +} +#endif + +#ifdef _STREET_VENDOR +BOOL CHAR_setStreetVendor(int charindex,int index,int set,int num) +{ + if(!CHAR_CHECKINDEX(charindex)) return FALSE; + if(index < 0 || index > MAX_SELL_ITEM) return FALSE; + switch(set){ + case SV_PILE: + CHAR_chara[charindex].StreetVendor[index].pile = num; + break; + case SV_PRICE: + CHAR_chara[charindex].StreetVendor[index].price = num; + break; + case SV_INDEX: + CHAR_chara[charindex].StreetVendor[index].index = num; + break; + case SV_KIND: + CHAR_chara[charindex].StreetVendor[index].kind = num; + break; + } + CHAR_chara[charindex].StreetVendor[index].usage = TRUE; + return TRUE; +} + +INLINE void CHAR_clearStreetVendor(int charindex,int index) +{ + if(!CHAR_CHECKINDEX(charindex)) return; + if(index < 0 || index > MAX_SELL_ITEM) return; + CHAR_chara[charindex].StreetVendor[index].index = -1; + CHAR_chara[charindex].StreetVendor[index].price = 0; + CHAR_chara[charindex].StreetVendor[index].pile = 0; + CHAR_chara[charindex].StreetVendor[index].kind = -1; + CHAR_chara[charindex].StreetVendor[index].usage = FALSE; +} + +int CHAR_getStreetVendor(int charindex,int index,int set) +{ + if(!CHAR_CHECKINDEX(charindex)) return -1; + if(index < 0 || index > MAX_SELL_ITEM) return -1; + switch(set){ + case SV_PILE: + return CHAR_chara[charindex].StreetVendor[index].pile; + case SV_PRICE: + return CHAR_chara[charindex].StreetVendor[index].price; + case SV_INDEX: + return CHAR_chara[charindex].StreetVendor[index].index; + case SV_KIND: + return CHAR_chara[charindex].StreetVendor[index].kind; + case SV_USAGE: + return CHAR_chara[charindex].StreetVendor[index].usage; + } + return -1; +} +#endif + +#ifdef _CHAR_POOLPET +int CHAR_getCharDepotPetElement( int charaindex ) +{ + int i; + int limit; + if( !CHAR_CHECKINDEX(charaindex))return -1; + + //andy_reEdit 2003/09/18 + //limit = (CHAR_getInt(charaindex,CHAR_TRANSMIGRATION)*2)+5; + //limit = min( limit, CHAR_MAXPOOLPETHAVE); + limit = CHAR_MAXDEPOTPETHAVE; + for( i = 0; i < limit; i ++ ) { + if( CHAR_getDepotPetIndex( charaindex,i) == -1 ) break; + } + return ( i == limit ? -1:i ); +} +#endif diff --git a/gmsv/char/char_data.c b/gmsv/char/char_data.c new file mode 100644 index 0000000..03dfa0e --- /dev/null +++ b/gmsv/char/char_data.c @@ -0,0 +1,1908 @@ +#include "version.h" +#include +#include +#ifdef _REDHAT_V9 +#include +#endif + +#include "readmap.h" +#include "common.h" +#include "util.h" +#include "anim_tbl.h" +#include "battle.h" +#include "char.h" +#include "char_data.h" +#include "buf.h" +#include "item.h" +#include "log.h" +#include "pet.h" +#include "enemy.h" +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 +#include "char_base.h" +#include "configfile.h" +#endif + + +#include "defaultPlayer.h" +#include "defaultGroundEnemy.h" + + +#include "ls2data.dat" + +// CoolFish: Family 2001/7/28 +#include "family.h" +#include "saacproto_cli.h" + +#ifdef _PET_LIMITLEVEL +void CHAR_CheckPetDoLimitlevel( int petindex , int toindex, int level); +#endif + + +typedef struct tagdefaultCharcterGet +{ + int imagenumber; + Char* initchardata; + LevelUpPattern* lvpattern; + CHAR_ImageType imgtype; +}defaultCharacterGet; + +static defaultCharacterGet CHAR_defaultCharacterGet[]= +{ + /* CHAR_DEFAULTPLAYER */ +//阂间裆ㄠ + {SPR_001em,&player,&lvplayer00,CHAR_IMAGETYPE_CHILDBOY}, + {SPR_002em,&player,&lvplayer00,CHAR_IMAGETYPE_CHILDBOY}, + {SPR_003em,&player,&lvplayer00,CHAR_IMAGETYPE_CHILDBOY}, + {SPR_004em,&player,&lvplayer00,CHAR_IMAGETYPE_CHILDBOY}, + +//剂 ㄠ + {SPR_011em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY}, + {SPR_012em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY}, + {SPR_013em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY}, + {SPR_014em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY}, + +//剂 ㄡ + {SPR_021em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY}, + {SPR_022em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY}, + {SPR_023em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY}, + {SPR_024em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY}, + +//剂 ㄢ + {SPR_031em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY}, + {SPR_032em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY}, + {SPR_033em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY}, + {SPR_034em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY}, + +//敛 ㄠ + {SPR_041em,&player,&lvplayer00,CHAR_IMAGETYPE_MAN}, + {SPR_042em,&player,&lvplayer00,CHAR_IMAGETYPE_MAN}, + {SPR_043em,&player,&lvplayer00,CHAR_IMAGETYPE_MAN}, + {SPR_044em,&player,&lvplayer00,CHAR_IMAGETYPE_MAN}, + +//敛 ㄡ + {SPR_051em,&player,&lvplayer00,CHAR_IMAGETYPE_MAN}, + {SPR_052em,&player,&lvplayer00,CHAR_IMAGETYPE_MAN}, + {SPR_053em,&player,&lvplayer00,CHAR_IMAGETYPE_MAN}, + {SPR_054em,&player,&lvplayer00,CHAR_IMAGETYPE_MAN}, + +//阂间辉ㄠ + {SPR_061em,&player,&lvplayer00,CHAR_IMAGETYPE_CHILDGIRL}, + {SPR_062em,&player,&lvplayer00,CHAR_IMAGETYPE_CHILDGIRL}, + {SPR_063em,&player,&lvplayer00,CHAR_IMAGETYPE_CHILDGIRL}, + {SPR_064em,&player,&lvplayer00,CHAR_IMAGETYPE_CHILDGIRL}, + +//剂辉ㄠ + {SPR_071em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL}, + {SPR_072em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL}, + {SPR_073em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL}, + {SPR_074em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL}, + +//剂辉ㄡ + {SPR_081em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL}, + {SPR_082em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL}, + {SPR_083em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL}, + {SPR_084em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL}, + +//剂辉ㄢ + {SPR_091em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL}, + {SPR_092em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL}, + {SPR_093em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL}, + {SPR_094em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL}, + +//辉岭ㄠ + {SPR_101em,&player,&lvplayer00,CHAR_IMAGETYPE_WOMAN}, + {SPR_102em,&player,&lvplayer00,CHAR_IMAGETYPE_WOMAN}, + {SPR_103em,&player,&lvplayer00,CHAR_IMAGETYPE_WOMAN}, + {SPR_104em,&player,&lvplayer00,CHAR_IMAGETYPE_WOMAN}, + +//辉岭ㄡ + {SPR_111em,&player,&lvplayer00,CHAR_IMAGETYPE_WOMAN}, + {SPR_112em,&player,&lvplayer00,CHAR_IMAGETYPE_WOMAN}, + {SPR_113em,&player,&lvplayer00,CHAR_IMAGETYPE_WOMAN}, + {SPR_114em,&player,&lvplayer00,CHAR_IMAGETYPE_WOMAN}, + + {SPR_pet001,&player,&lvplayer00,CHAR_IMAGETYPE_DOG}, + {SPR_pet002,&player,&lvplayer00,CHAR_IMAGETYPE_DOG}, + {SPR_pet003,&player,&lvplayer00,CHAR_IMAGETYPE_DOG}, + {SPR_pet004,&player,&lvplayer00,CHAR_IMAGETYPE_DOG}, + {SPR_pet011,&player,&lvplayer00,CHAR_IMAGETYPE_DOG}, +}; + +BOOL CHAR_getDefaultChar( Char* nc , int imagenumber ) +{ + int i, j; + int defcharaindex; + + Char* defaultchar; + defaultchar = CHAR_defaultCharacterGet[arraysizeof(CHAR_defaultCharacterGet) - 1].initchardata; + + memset( nc,0,sizeof(Char) ); + defcharaindex = 0; + for( i = 0 ; i < arraysizeof( CHAR_defaultCharacterGet ) ; i ++ ){ + if( CHAR_defaultCharacterGet[i].imagenumber == imagenumber ){ + defaultchar = CHAR_defaultCharacterGet[i].initchardata; + defcharaindex = i; + break; + } + } + nc->data[CHAR_IMAGETYPE] = CHAR_defaultCharacterGet[defcharaindex].imgtype; + nc->use = TRUE; + +#ifdef _CHAR_FIXDATADEF + for( j = 0 ; j < CHAR_DATAINTNUM ; j ++ ){ + if( j < CHAR_INITDATA ) nc->data[j] = defaultchar->data[j]; + else nc->data[j] = 0; + } +#else + for( j = 0 ; j < CHAR_DATAINTNUM ; j ++ ) + nc->data[j] = defaultchar->data[j]; +#endif + for( j = 0 ; j < arraysizeof( nc->flg ) ; j ++ ) + nc->flg[j] = defaultchar->flg[j]; + + for( j = 0 ; j < CHAR_DATACHARNUM ; j ++ ) + nc->string[j].string[0] = '\0'; + for( j = 0 ; j < CHAR_MAXITEMHAVE ; j ++ ) + nc->indexOfExistItems[j] = -1; + for( j = 0 ; j < CHAR_MAXPOOLITEMHAVE ; j ++ ) + nc->indexOfExistPoolItems[j] = -1; + for( j = 0 ; j < CHAR_MAXPETSKILLHAVE ; j ++ ) + nc->unionTable.indexOfPetskill[j] = -1; + for( j = 0 ; j < CHAR_MAXPOOLPETHAVE ; j ++ ) + nc->indexOfPoolPet[j] = -1; + for( j = 0 ; j < CHAR_SKILLMAXHAVE ; j ++ ) + nc->haveSkill[j].use = FALSE; + for( j = 0 ; j < CHAR_TITLEMAXHAVE ; j ++ ) + nc->indexOfHaveTitle[j] = -1; + for( j=0 ; jaddressBook[j],0,sizeof(nc->addressBook[j]) ); + for( j = 0 ; j < CHAR_WORKDATAINTNUM ; j ++ ) + nc->workint[j] = 0; + for( j = 0 ; j < CHAR_WORKDATACHARNUM ; j ++ ) + nc->workchar[j].string[0] = '\0'; + nc->workint[CHAR_WORKFD] = -1; + nc->workint[CHAR_WORKCHATROOMNUM] = -1; +#ifdef _DEATH_CONTEND + nc->data[CHAR_PKLISTTEAMNUM] = -1; + nc->data[CHAR_PKLISTLEADER] = -1; +#endif +#ifdef _NPC_SEPARATEDATA + CHAR_getDefaultCharTempNum( nc); +#endif + + return TRUE; +} + +static int CHAR_playerImageNumber[]= +{ + /* CHAR_DEFAULTPLAYER */ + SPR_001em,SPR_002em,SPR_003em,SPR_004em,SPR_011em,SPR_012em, + SPR_013em,SPR_014em,SPR_021em,SPR_022em,SPR_023em,SPR_024em, + SPR_031em,SPR_032em,SPR_033em,SPR_034em,SPR_041em,SPR_042em, + SPR_043em,SPR_044em,SPR_051em,SPR_052em,SPR_053em,SPR_054em, + SPR_061em,SPR_062em,SPR_063em,SPR_064em,SPR_071em,SPR_072em, + SPR_073em,SPR_074em,SPR_081em,SPR_082em,SPR_083em,SPR_084em, + SPR_091em,SPR_092em,SPR_093em,SPR_094em,SPR_101em,SPR_102em, + SPR_103em,SPR_104em,SPR_111em,SPR_112em,SPR_113em,SPR_114em +}; + +BOOL CHAR_checkPlayerImageNumber( int imagenumber) +{ + int i; + for( i = 0; i < arraysizeof( CHAR_playerImageNumber); i ++ ) { + if( imagenumber == CHAR_playerImageNumber[i] ) break; + } + if( i == arraysizeof( CHAR_playerImageNumber)) return FALSE; + else return TRUE; +} +/*------------------------------------------------------------ + * 涌 飓 寞及民尼永弁 + * + * 涌 飓 寞反动票及白巧□穴永玄匹瑁引匀化中月 + * number = 窒谛 井 + * CG_CHR_MAKE_FACE + (number*100) + ( 缙 number * 25) + ( 寞 * 5 ) + 轼 寞 + * + ------------------------------------------------------------*/ +BOOL CHAR_checkFaceImageNumber( int imagenumber, int faceimagenumber) +{ + int image = imagenumber - SPR_001em; + int number; + int color; + number = (faceimagenumber - CG_CHR_MAKE_FACE)/ 100*20; + color = ((faceimagenumber - CG_CHR_MAKE_FACE)% 100) / 25*5; + if( image != number + color ) return FALSE; + return TRUE; +} +// 平乓仿 飓 □皮伙[ㄠ 丐凶曰隶 ㄤ潘 +int CHAR_eqimagetbl[][5]={ + // 允匹 {{{{ 轺徇 键 菰 + { SPR_001em,SPR_001ax,SPR_001cl,SPR_001sp,SPR_001bw }, + { SPR_002em,SPR_002ax,SPR_002cl,SPR_002sp,SPR_002bw }, + { SPR_003em,SPR_003ax,SPR_003cl,SPR_003sp,SPR_003bw }, + { SPR_004em,SPR_004ax,SPR_004cl,SPR_004sp,SPR_004bw }, + { SPR_011em,SPR_011ax,SPR_011cl,SPR_011sp,SPR_011bw }, + { SPR_012em,SPR_012ax,SPR_012cl,SPR_012sp,SPR_012bw }, + { SPR_013em,SPR_013ax,SPR_013cl,SPR_013sp,SPR_013bw }, + { SPR_014em,SPR_014ax,SPR_014cl,SPR_014sp,SPR_014bw }, + { SPR_021em,SPR_021ax,SPR_021cl,SPR_021sp,SPR_021bw }, + { SPR_022em,SPR_022ax,SPR_022cl,SPR_022sp,SPR_022bw }, + { SPR_023em,SPR_023ax,SPR_023cl,SPR_023sp,SPR_023bw }, + { SPR_024em,SPR_024ax,SPR_024cl,SPR_024sp,SPR_024bw }, + { SPR_021em,SPR_021ax,SPR_021cl,SPR_021sp,SPR_021bw }, + { SPR_031em,SPR_031ax,SPR_031cl,SPR_031sp,SPR_031bw }, + { SPR_032em,SPR_032ax,SPR_032cl,SPR_032sp,SPR_032bw }, + { SPR_033em,SPR_033ax,SPR_033cl,SPR_033sp,SPR_033bw }, + { SPR_034em,SPR_034ax,SPR_034cl,SPR_034sp,SPR_034bw }, + { SPR_041em,SPR_041ax,SPR_041cl,SPR_041sp,SPR_041bw }, + { SPR_042em,SPR_042ax,SPR_042cl,SPR_042sp,SPR_042bw }, + { SPR_043em,SPR_043ax,SPR_043cl,SPR_043sp,SPR_043bw }, + { SPR_044em,SPR_044ax,SPR_044cl,SPR_044sp,SPR_044bw }, + + { SPR_051em,SPR_051ax,SPR_051cl,SPR_051sp,SPR_051bw }, + { SPR_052em,SPR_052ax,SPR_052cl,SPR_052sp,SPR_052bw }, + { SPR_053em,SPR_053ax,SPR_053cl,SPR_053sp,SPR_053bw }, + { SPR_054em,SPR_054ax,SPR_054cl,SPR_054sp,SPR_054bw }, + + { SPR_061em,SPR_061ax,SPR_061cl,SPR_061sp,SPR_061bw }, + { SPR_062em,SPR_062ax,SPR_062cl,SPR_062sp,SPR_062bw }, + { SPR_063em,SPR_063ax,SPR_063cl,SPR_063sp,SPR_063bw }, + { SPR_064em,SPR_064ax,SPR_064cl,SPR_064sp,SPR_064bw }, + + { SPR_071em,SPR_071ax,SPR_071cl,SPR_071sp,SPR_071bw }, + { SPR_072em,SPR_072ax,SPR_072cl,SPR_072sp,SPR_072bw }, + { SPR_073em,SPR_073ax,SPR_073cl,SPR_073sp,SPR_073bw }, + { SPR_074em,SPR_074ax,SPR_074cl,SPR_074sp,SPR_074bw }, + + { SPR_081em,SPR_081ax,SPR_081cl,SPR_081sp,SPR_081bw }, + { SPR_082em,SPR_082ax,SPR_082cl,SPR_082sp,SPR_082bw }, + { SPR_083em,SPR_083ax,SPR_083cl,SPR_083sp,SPR_083bw }, + { SPR_084em,SPR_084ax,SPR_084cl,SPR_084sp,SPR_084bw }, + + { SPR_091em,SPR_091ax,SPR_091cl,SPR_091sp,SPR_091bw }, + { SPR_092em,SPR_092ax,SPR_092cl,SPR_092sp,SPR_092bw }, + { SPR_093em,SPR_093ax,SPR_093cl,SPR_093sp,SPR_093bw }, + { SPR_094em,SPR_094ax,SPR_094cl,SPR_094sp,SPR_094bw }, + + { SPR_101em,SPR_101ax,SPR_101cl,SPR_101sp,SPR_101bw }, + { SPR_102em,SPR_102ax,SPR_102cl,SPR_102sp,SPR_102bw }, + { SPR_103em,SPR_103ax,SPR_103cl,SPR_103sp,SPR_103bw }, + { SPR_104em,SPR_104ax,SPR_104cl,SPR_104sp,SPR_104bw }, + + { SPR_111em,SPR_111ax,SPR_111cl,SPR_111sp,SPR_111bw }, + { SPR_112em,SPR_112ax,SPR_112cl,SPR_112sp,SPR_112bw }, + { SPR_113em,SPR_113ax,SPR_113cl,SPR_113sp,SPR_113bw }, + { SPR_114em,SPR_114ax,SPR_114cl,SPR_114sp,SPR_114bw }, + + { SPR_091em,SPR_091ax,SPR_091cl,SPR_091sp,SPR_091bw }, + { SPR_092em,SPR_092ax,SPR_092cl,SPR_092sp,SPR_092bw }, + + { SPR_pet001,SPR_pet001,SPR_pet001,SPR_pet001,SPR_pet001}, + { SPR_pet002,SPR_pet002,SPR_pet002,SPR_pet002,SPR_pet002}, + { SPR_pet003,SPR_pet003,SPR_pet003,SPR_pet003,SPR_pet003}, + { SPR_pet004,SPR_pet004,SPR_pet004,SPR_pet004,SPR_pet004}, + + { SPR_pet011,SPR_pet011,SPR_pet011,SPR_pet011,SPR_pet011}, + + { SPR_121em,SPR_121ax,SPR_121cl,SPR_121sp,SPR_121bw }, + { SPR_122em,SPR_122ax,SPR_122cl,SPR_122sp,SPR_122bw }, + + { SPR_131em,SPR_131ax,SPR_131cl,SPR_131sp,SPR_131bw }, + { SPR_132em,SPR_132ax,SPR_132cl,SPR_132sp,SPR_132bw }, + { SPR_133em,SPR_133ax,SPR_133cl,SPR_133sp,SPR_133bw }, + + { SPR_141em,SPR_141ax,SPR_141cl,SPR_141sp,SPR_141bw }, + { SPR_142em,SPR_142ax,SPR_142cl,SPR_142sp,SPR_142bw }, + + { SPR_151em,SPR_151ax,SPR_151cl,SPR_151sp,SPR_151bw }, + { SPR_152em,SPR_152ax,SPR_152cl,SPR_152sp,SPR_152bw }, + + { SPR_161em,SPR_161ax,SPR_161cl,SPR_161sp,SPR_161bw }, + { SPR_162em,SPR_162ax,SPR_162cl,SPR_162sp,SPR_162bw }, + +}; + +/*------------------------------------------------------------ + * 隶 午 飓 寞井日蕙仄中 飓 寞毛 月[ + * 娄醒 + * basebaseimagenumber int 葭卞卅月 飓 寞 + * category ITEM_CATEGORY 失奶 丞及市 打伉 + * 忒曰袄 + * 蕙仄中 飓 寞[巨仿□及凛反}-1 + ------------------------------------------------------------*/ +int CHAR_getNewImagenumberFromEquip( int basebaseimagenumber, + ITEM_CATEGORY category ) +{ + int i; + /* ITEM_CATEGORY 民尼永弁 */ + if( category < 0 || category > arraysizeof(CHAR_eqimagetbl[0]) ) + return -1; + for( i=0 ; i rx )swap(lx,rx); + if( ly > ry )swap(ly,ry); + + CHAR_invarea[invreadlen].area.x = lx; + CHAR_invarea[invreadlen].area.y = ly; + CHAR_invarea[invreadlen].area.width = rx-lx; + CHAR_invarea[invreadlen].area.height= ry-ly; + invreadlen ++; + } + } + fclose(f); + CHAR_invareanum = invreadlen; + print( "有效不可战斗有效数是 %d...", CHAR_invareanum ); +#if 0 +{ + int i,j; + for( i=0; i 3 ) { + return FALSE; + } + index=hometown; +#endif + if( index >= arraysizeof( elders ) ){ + return FALSE; + } + + ch->data[CHAR_FLOOR] = elders[index].floor; + ch->data[CHAR_X] = elders[index].x; + ch->data[CHAR_Y] = elders[index].y; + ch->data[CHAR_LASTTALKELDER] = index; + point = ch->data[CHAR_SAVEPOINT]; + + +#ifdef _DELBORNPLACE //Syu ADD 6.0 统一出生於新手村 + if( getMuseum() ) { + ch->data[CHAR_FLOOR] = 815; + ch->data[CHAR_X] = 29; + ch->data[CHAR_Y] = 40; + ch->data[CHAR_LASTTALKELDER] = 35; + // point = point | (1<<35) ; + point = point | (1<data[CHAR_FLOOR] = 9000; + ch->data[CHAR_X] = 40; + ch->data[CHAR_Y] = 40; + } +#endif + + ch->data[CHAR_SAVEPOINT] = point; + + if( MAP_checkCoordinates( ch->data[CHAR_FLOOR], ch->data[CHAR_X], + ch->data[CHAR_Y] ) == FALSE ){ + return FALSE; + } + + return TRUE; +} + +/*------------------------------------------------------------ + * 巨伙母□及桦赭毛 月 + * 娄醒 + * elderindex int 巨伙母□奶件犯永弁旦 + * fl int* 白夫失毛熬仃潸月桦赭 + * x int* x毛熬仃潸月桦赭 + * y int* y毛熬仃潸月桦赭 + * 娄醒 + * 岳 TRUE(1) + * 撩 FALSE(0) + ------------------------------------------------------------*/ +BOOL CHAR_getElderPosition( int elderindex, int* fl, int* x, int* y ) +{ + if( elderindex<0 || arraysizeof(elders)<=elderindex )return FALSE; + + *fl = elders[elderindex].floor; + *x = elders[elderindex].x; + *y = elders[elderindex].y; + return TRUE; +} +/*------------------------------------------------------------ + * 赢 NPC互愤坌及赓渝祭及午五卞}赢 卞踏五仇戈及分[ + * 公及凶户及奶件正□白尼奶旦 + * 娄醒 + * index int 左□田□匹 撩 仄凶日FALSE 毛井尹允 + * fl int 匏 及树 + * x int + * y int + * NPC及伙□民件井日银歹木月及分[ + ------------------------------------------------------------*/ +BOOL CHAR_ElderSetPosition( int elderindex ,int fl,int x ,int y) +{ + if( elderindex < ELDERINDEXSTART || + elderindex >= MAXELDERS ){ + return FALSE; + } + + elders[elderindex].floor = fl; + elders[elderindex].x = x; + elders[elderindex].y = y; + return TRUE; +} + + +void CHAR_setInitValues( Char* ch ) +{ + +#ifndef _PROFESSION_SKILL // WON ADD 人物职业技能 + + static int CHAR_titleindextbl[] ={ 0,1,2,3,4,5,6 }; + int elderindex; + int i; + BOOL magician=FALSE; + BOOL priest=FALSE; + + elderindex = ch->data[CHAR_LASTTALKELDER]; + if( 0 <= elderindex + && elderindex < arraysizeof( CHAR_titleindextbl ) ) + ch->indexOfHaveTitle[0] = CHAR_titleindextbl[elderindex]; + + + for( i=0 ; ihaveSkill[i].use ){ + int j; + int skindex=ch->haveSkill[i].skill.data[SKILL_IDENTITY]; + + for( j=0 ; jdata[CHAR_GOLD] = 20; + + if( skindex == SKILL_MAGICIAN ) + magician = TRUE; + else if( skindex == SKILL_PRIEST ) + priest = TRUE; + + } + } + + if( magician || priest ) CHAR_addItemToChar( ch, 802 ); + +#endif +} + + +#if 1 +static int EnemyExpTbl[]={ +0, // 0 +2, // 1 +4, // 2 +6, // 3 +8, // 4 +10, // 5 +12, // 6 +14, // 7 +16, // 8 +18, // 9 +20, // 10 +26, // 11 +32, // 12 +38, // 13 +44, // 14 +50, // 15 +60, // 16 +70, // 17 +80, // 18 +90, // 19 +100, // 20 +115, // 21 +130, // 22 +145, // 23 +160, // 24 +175, // 25 +190, // 26 +205, // 27 +220, // 28 +235, // 29 +250, // 30 +270, // 31 +290, // 32 +310, // 33 +330, // 34 +350, // 35 +375, // 36 +400, // 37 +425, // 38 +450, // 39 +475, // 40 +500, // 41 +525, // 42 +550, // 43 +575, // 44 +600, // 45 +625, // 46 +650, // 47 +675, // 48 +700, // 49 +725, // 50 +750, // 51 +775, // 52 +800, // 53 +825, // 54 +850, // 55 +875, // 56 +900, // 57 +925, // 58 +950, // 59 +980, // 60 +1010, // 61 +1040, // 62 +1070, // 63 +1100, // 64 +1130, // 65 +1160, // 66 +1190, // 67 +1220, // 68 +1250, // 69 +1280, // 70 +1310, // 71 +1345, // 72 +1380, // 73 +1415, // 74 +1450, // 75 +1485, // 76 +1520, // 77 +1555, // 78 +1590, // 79 +1630, // 80 +1670, // 81 +1710, // 82 +1750, // 83 +1790, // 84 +1830, // 85 +1870, // 86 +1910, // 87 +1950, // 88 +1990 // 89 +}; // 90 + + + + + + + + + + + + + + + + +// 酵烂读卅烦董袄煌遥 +int GetEnemyExp( int level ){ +/* + int exp = 0; + if( level < 5 ){ + exp = 2 * level; + }else + if( level < 10 ){ + exp = 10 * level; + }else + if( level < 20 ){ + exp = 15 * level; + }else + if( level < 30 ){ + exp = 30 * level; + }else + if( level < 40 ){ + exp = 50 * level; + }else + if( level < 50 ){ + exp =60 * level; + }else + if( level < 60 ){ + exp =60 * level; + }else{ + exp =70 * level; + } +*/ + if( level >= arraysizeof( EnemyExpTbl ) )level = arraysizeof( EnemyExpTbl )-1; + return EnemyExpTbl[level]; +} +#endif + +#ifdef _NEWOPEN_MAXEXP +/*static int NeedLevelUpTbls[] = { + 0, 0, + 2, 6, 18, 37, 67, 110, 170, + 246, 344, 464, 610, 782, 986, 1221, + 1491, 1798, 2146, 2534, 2968, 3448, 3978, + 4558, 5194, 5885, 6635, 7446, 8322, 9262, + 10272, 11352, 12506, 13734, 15042, 16429, 17899, + 19454, 21098, 22830, 24656, 26576, 28594, 30710, + 32930, 35253, 37683, 40222, 42874, 45638, 48520, + 51520, 54642, 57886, 61258, 64757, 68387, 72150, + 76050, 80086, 84264, 106110, 113412, 121149, 129352, + 138044, 147256, 157019, 167366, 178334, 189958, 202282, + 215348, 229205, 243901, 259495, 276041, 293606, 312258, + 332071, 353126, 375511, 399318, 424655, 451631, 480370, + 511007, 543686, 578571, 615838, 655680, 698312, 743971, + 792917, 845443, 901868, 962554, 1027899, 1098353, 1174420, + 1256663, 1345723, 1442322, 1547281, 1661531, 1786143, 1922340, + 2071533, 2235351, 2415689, 2614754, 2835137, 3079892, 3352633, + 3657676, 4000195, 4386445, 4824041, 5322323, 5892866, 6550125, + 12326614, 15496114, 20025638, 26821885, 37698249, 56734876, 68097265, + 68290815, 68487425, 68687119, 68889921, 69095855, 69304945, 69517215, + 69732689, 69951391, 70173345, 70398575, 70627105, 70858959, 71244161, + 71342735, 71584705, 71830095, 72078929, 72331231, 72587025, 72846335, + 73109185, 73615599, 73655601, 73929215, 74206465, 74487375, 74771969, + 75060271, 75352305, 75648095, 75947665, 76421039, 76563241, 76874295, + 77189225, 77508055, 77830809, 78157511, 78488185, 78822855, 79161545, + 79724279, 79856081, 80206975, 80561985, 80921135, 81284449, 81651951, + 82023665, 82399615, 82779825, 83434319, 83558121, 83951255, 84348745, + 84750615, 85156889, 85567591, 85982745, 86402375, 86826505, 87575159, + 87693361, 88131135, 88573505, 89020495, 89472129, 89928431, 90389425, + 90855135, 91325585, 91800799 +}; +*/ +#endif +static int LevelUpTbl[] = { // 经验值 等级 换算表 +0, // 0 EX=(lv^4)/10 +0, // 1 + 2, 8, 25, 62, 129, + 240, 409, 656, 1000, 1464, // 11 + 2073, 2856, 3841, 5062, 6553, // 16 + 8352, 10497, 13032, 16000, 19448, 23425, // 22 + 27984, 33177, 39062, 45697, 53144, 61465, // 28 + 70728, 81000, 92352, 104857, 118592, 133633, // 34 + 150062, 167961, 187416, 208513, 231344, 256000, // 40 + 282576, 311169, 341880, 374809, 410062, 447745, // 46 + 487968, 530841, 576480, 625000, 676520, 731161, // 52 + 789048, 850305, 915062, 983449, 1055600, 1131649, // 58 + 1211736, 1296000, + 1402110, // 61 EX=(lv^4)/(10-0.125*(lv-60)) + 1515521, 1636671, 1766022, 1904066, 2051322, 2208342, // 67 + 2375708, 2554041, 2744000, 2946281, 3161630, 3390834, // 73 + 3634736, 3894230, 4170272, 4463878, 4776136, 5108207, // 79 + 5461333, 5836843, 6236162, 6660816, 7112448, 7592818, // 85 + 8103824, 8647511, 9226082, 9841920, 10497600, 11195912, // 91 + 11939882, 12732800, 13578242, 14480111, 15442664, 16470563, // 97 + 17568917, 18743336, 20000000, 21345723, 22788045, 24335325, // 103 + 25996856, 27783000, 29705340, 31776872, 34012224, 36427912, // 109 + 39042666, 41877804, 44957696, 48310329, 51968004, 55968200, // 115 + 60354645, 65178685, 70501009, 76393874, 82944000, + + 95270613, // 121 Nuke 0624 EX=(lv^4)/(2.5-0.25*(lv-120)) + 110766728, 130792366, 157614250, 195312500, // 125 + 252047376, // 126 EX=lv^4+60000000*(lv-126)^2 Nuke 0816 + 320144641, 388435456, 456922881, 525610000, 594499921, 663595776, // 132 + 732900721, 802417936, 872150625, 942102016,1012275361,1082673936, // 138 + 1153301041,1224160000 // 140 +}; + +int CHAR_GetLevel() +{ + return arraysizeof( LevelUpTbl )-1; +} +int CHAR_GetLevelExp( int charaindex, int level) +{ +#ifdef _NEWOPEN_MAXEXP +#ifdef _USER_EXP_CF + if(level>getMaxLevel())level=getMaxLevel(); + if(level>getYBLevel()) + if (CHAR_getInt(charaindex, CHAR_WHICHTYPE)==CHAR_TYPEPET) { + if(CHAR_getInt(charaindex,CHAR_TRANSMIGRATION)= arraysizeof( NeedLevelUpTbls ) ){ + return -1; + } + return NeedLevelUpTbls[level];*/ +#else + if( level >= arraysizeof( LevelUpTbl ) ){ + return -1; + } + return LevelUpTbl[level]; +#endif +} + +int CHAR_GetOldLevelExp( int level) +{ + if( level >= arraysizeof( LevelUpTbl ) ){ + return -1; + } + return LevelUpTbl[level]; +} + +int CHAR_LevelUpCheck( int charaindex , int toindex) +{ + int exp, level, nextexp, iRet = FALSE; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return 0; + exp = CHAR_getInt( charaindex, CHAR_EXP ); + while( 1 ){ + level = CHAR_getInt( charaindex, CHAR_LV ); + nextexp = CHAR_GetLevelExp( charaindex, level+1); + if( nextexp < 0 ) + break; + // Arminius 7.30 pet limit lv + if (CHAR_getInt(charaindex, CHAR_WHICHTYPE)==CHAR_TYPEPET) { + + if (level >= CHAR_getInt(charaindex, CHAR_LIMITLEVEL) && + CHAR_getInt(charaindex, CHAR_LIMITLEVEL) > 0 ) { +#ifdef _NEWOPEN_MAXEXP + CHAR_setInt( charaindex, CHAR_EXP , 0); +#else +#ifdef _PET_LIMITLEVEL + if( CHAR_getInt( charaindex, CHAR_PETID) == 718 +#ifdef _PET_2LIMITLEVEL + || CHAR_getInt( charaindex, CHAR_PETID) == 401 +#endif + ) { + nextexp = CHAR_GetLevelExp( charaindex, CHAR_getInt(charaindex, CHAR_LIMITLEVEL)); + CHAR_setInt( charaindex, CHAR_EXP , nextexp ); + } +#endif +#endif + break; + } + } + if( exp >= nextexp ){ + iRet ++; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + CHAR_setInt( charaindex, CHAR_DUELPOINT, + CHAR_getInt( charaindex, CHAR_DUELPOINT) + (level+1)*10 ); + } +#ifdef _PET_LIMITLEVEL + else { + CHAR_CheckPetDoLimitlevel( charaindex, toindex, level ); + } +#endif + +#ifdef _NEWOPEN_MAXEXP + if( level >= CHAR_MAXUPLEVEL ){ + }else{ + if( CHAR_HandleExp( charaindex) != -1 ){ + exp = CHAR_getInt( charaindex, CHAR_EXP ); + CHAR_setInt( charaindex, CHAR_LV, level+1 ); + } + } +#else + CHAR_setInt( charaindex, CHAR_LV, level+1 ); +#endif + }else{ + break; + } + } + return iRet; +} + +#ifdef _PET_LIMITLEVEL +void CHAR_CheckPetDoLimitlevel( int petindex , int toindex, int level) +{ + int LevelUpPoint,vital,str,tgh,dex; + int j,k; + char token[56]; +#define RAND(x,y) ((x-1)+1+ (int)( (double)(y-(x-1))*rand()/(RAND_MAX+1.0)) ) + + if( CHAR_getInt( petindex, CHAR_PETID) == 718 +#ifdef _PET_2LIMITLEVEL + || CHAR_getInt( petindex, CHAR_PETID) == 401 +#endif + ) { + LevelUpPoint = CHAR_getInt( petindex, CHAR_ALLOCPOINT ); + vital = (int )(( LevelUpPoint >> 24 ) & 0xFF); + str = (int)(( LevelUpPoint >> 16 ) & 0xFF); + tgh = (int)(( LevelUpPoint >> 8 ) & 0xFF); + dex = (int)(( LevelUpPoint >> 0 ) & 0xFF); + + if( strcmp( CHAR_getChar( petindex, CHAR_OWNERCDKEY), CHAR_getChar( toindex, CHAR_CDKEY) ) || + strcmp( CHAR_getChar( petindex, CHAR_OWNERCHARANAME), CHAR_getChar( toindex, CHAR_NAME) )){ + sprintf(token,"我不认识你呀!快把我还给我主人!"); + //andy 1/11 reEdit + vital -= RAND(2,10); if (vital<0) vital=0; + str -= RAND(2,10); if (str<0) str=0; + tgh -= RAND(2,10); if (tgh<0) tgh=0; + dex -= RAND(2,10); if (dex<0) dex=0; + LevelUpPoint = (vital<<24)+(str<<16)+(tgh<<8)+(dex<<0); + + CHAR_setInt( petindex, CHAR_ALLOCPOINT , LevelUpPoint); + CHAR_talkToCli( toindex, petindex, token, CHAR_COLORWHITE); + + LogPetPointChange( + CHAR_getChar( toindex, CHAR_NAME ), + CHAR_getChar( toindex, CHAR_CDKEY ), + CHAR_getChar( petindex, CHAR_NAME), + petindex, 2, + CHAR_getInt( petindex, CHAR_LV), + "No_master(玛蕾不对主人)", + CHAR_getInt( toindex,CHAR_FLOOR), + CHAR_getInt( toindex,CHAR_X ), + CHAR_getInt( toindex,CHAR_Y ) + ); + } + + if( ( level % 20 ) == 0 ) { + for( j=0; j < 3; j++) { + k = RAND( 0, 3); + if( k == 0 ) + vital--; + if( k == 1 ) + str--; + if( k == 2 ) + tgh--; + if( k == 3 ) + dex--; + } + if( vital < 0 ) vital =0; + if( str < 0 ) str =0; + if( tgh < 0 ) tgh =0; + if( dex < 0 ) dex =0; + LevelUpPoint = (vital<<24)+(str<<16)+(tgh<<8)+(dex<<0); + CHAR_setInt( petindex, CHAR_ALLOCPOINT , LevelUpPoint); + //print("\n << ( level % 20 ) == 0 >> "); + LogPetPointChange( + CHAR_getChar( toindex, CHAR_NAME ), + CHAR_getChar( toindex, CHAR_CDKEY ), + CHAR_getChar( petindex, CHAR_NAME), + petindex,3, + CHAR_getInt( petindex, CHAR_LV), + "level%20", + CHAR_getInt( toindex,CHAR_FLOOR), + CHAR_getInt( toindex,CHAR_X ), + CHAR_getInt( toindex,CHAR_Y ) + ); + } + } +} +#endif +int CHAR_PetTakeDrop( int petindex, int floor, int ox, int oy) //强制丢弃宠物升级 +{ + int x, y, objindex; + + x = rand()%10; + y = rand()%10; + + //丢下宠物 CHAR_endCharOneArray + objindex = PET_dropPetAbsolute( petindex,floor,x,y, FALSE ); + if( objindex == -1 ) { + return -1; + } + CHAR_setWorkInt( petindex,CHAR_WORKOBJINDEX,objindex ); + CHAR_setInt( petindex, CHAR_FLOOR, floor); + CHAR_setInt( petindex, CHAR_X, x); + CHAR_setInt( petindex, CHAR_Y, y); + CHAR_sendCToArroundCharacter( objindex); + + return floor; +} + +int CHAR_PetTakeLevelUp( int petindex, int lv)//强制宠物升级 +{ + int k; + for( k = 1; k < lv; k ++ ){ + CHAR_PetLevelUp( petindex ); + CHAR_PetAddVariableAi( petindex, AI_FIX_PETLEVELUP ); + CHAR_setInt( petindex, CHAR_LV, CHAR_getInt( petindex, CHAR_LV) +1 ); + } + + CHAR_complianceParameter( petindex ); + return k; +} + +#ifdef _NEW_MANOR_LAW +extern struct FM_POINTLIST fmpointlist; +#endif + +int CHAR_PetLevelUp( int petindex ) +{ + struct _RankRandTbl{ + int min; + int max; + }RankRandTbl[] = { + { 450, 500 }, + { 470, 520 }, + { 490, 540 }, + { 510, 560 }, + { 530, 580 }, + { 550, 600 }, + }; + + float Param[4] = { 0.0, 0.0, 0.0, 0.0 }; + int LevelUpPoint, petrank; + float str, vital, dex, tgh, fRand, i; +#ifdef _TEACHER_SYSTEM + int iGetFame = 0; +#endif + // 娄醒民尼永弁 + if( CHAR_CHECKINDEX( petindex ) == FALSE ) return -1; + if( CHAR_getInt( petindex, CHAR_WHICHTYPE ) != CHAR_TYPEPET )return -1; + + LevelUpPoint = CHAR_getInt( petindex, CHAR_ALLOCPOINT ); + + // 矢永玄及仿件弁 + petrank = CHAR_getInt( petindex, CHAR_PETRANK ); + if( petrank < 0 || petrank > 5 ) petrank = 0; + + // 潸 + vital = (float)(( LevelUpPoint >> 24 ) & 0xFF); + str = (float)(( LevelUpPoint >> 16 ) & 0xFF); + tgh = (float)(( LevelUpPoint >> 8 ) & 0xFF); + dex = (float)(( LevelUpPoint >> 0 ) & 0xFF); + + // ㄠㄟ荚ㄣ 扔奶戊夫毛蕊匀化备嫩 卞ㄠ箫允 + for( i = 0; i < 10; i ++ ){ + Param[RAND( 0, 3 )] += 1.0; + } + + // 仿件弁卞方月 区及仿件母丞 + fRand = (float)RAND( RankRandTbl[petrank].min, RankRandTbl[petrank].max ) + * 0.01; + + // 喃曰蕊曰禾奶件玄方曰煌遥 + vital = (float)vital * fRand + Param[0] * fRand; + str = (float)str * fRand + Param[1] * fRand; + tgh = (float)tgh * fRand + Param[2] * fRand; + dex = (float)dex * fRand + Param[3] * fRand; + + // 煌遥 + CHAR_setInt( petindex, CHAR_VITAL, + CHAR_getInt( petindex, CHAR_VITAL ) + (int)vital ); + CHAR_setInt( petindex, CHAR_STR, + CHAR_getInt( petindex, CHAR_STR ) + (int)str ); + CHAR_setInt( petindex, CHAR_TOUGH, + CHAR_getInt( petindex, CHAR_TOUGH ) + (int)tgh ); + CHAR_setInt( petindex, CHAR_DEX, + CHAR_getInt( petindex, CHAR_DEX ) + (int)dex ); + + // CoolFish: 饲育家族声望更新 + { + int level = CHAR_getInt(petindex, CHAR_LV); + int exp1 = 0, exp2 = 0, feedpoint = 0; + if (level > 30){ + char tmpbuf[128]; +#ifdef _NEW_MANOR_LAW + char tmpbuf1[16]; +#endif + int ownerindex = CHAR_getWorkInt(petindex, CHAR_WORKPLAYERINDEX); +#ifdef _FMVER21 +#else + if (CHAR_getInt(ownerindex, CHAR_FMINDEX) < 0) return 0; + if (CHAR_getInt(ownerindex, CHAR_FMLEADERFLAG) <= 0 ) return 0; + if (strcmp(CHAR_getChar(ownerindex, CHAR_FMNAME), "") == 0) return 0; +#endif + if (CHAR_CHECKINDEX(ownerindex)){ + exp1 = CHAR_GetLevelExp( petindex, level); + exp2 = CHAR_GetLevelExp( petindex,level - 1); + +#ifdef _PERSONAL_FAME // Arminius 8.30: 家族个人声望 + feedpoint = (exp1 - exp2) / 20000; // 减半 +#else + feedpoint = (exp1 - exp2) / 10000; +#endif + sprintf(tmpbuf, "%d", feedpoint); + if (feedpoint > 0){ + // CoolFish: 2001/10/03 + int fd = getfdFromCharaIndex(ownerindex); +#ifdef _PERSONAL_FAME // Arminius 8.30: 家族个人声望 + CHAR_earnFame(ownerindex, feedpoint); +#endif +#ifdef _NEW_MANOR_LAW + sprintf(tmpbuf1, "%d", CHAR_getInt(ownerindex,CHAR_FAME)); +#endif +#ifdef _FMVER21 + if (CHAR_getInt(ownerindex, CHAR_FMLEADERFLAG) > 0 + && CHAR_getInt(ownerindex, CHAR_FMLEADERFLAG) != FMMEMBER_APPLY){ + saacproto_ACFixFMData_send(acfd, + CHAR_getChar(ownerindex, CHAR_FMNAME), + CHAR_getInt(ownerindex, CHAR_FMINDEX), + CHAR_getWorkInt(ownerindex, CHAR_WORKFMINDEXI), + FM_FIX_FMFEED, tmpbuf, +#ifndef _NEW_MANOR_LAW + "", +#else + tmpbuf1, +#endif + // CoolFish: 2001/10/03 + CHAR_getWorkInt(ownerindex, CHAR_WORKFMCHARINDEX), + CONNECT_getFdid(fd)); + // CHAR_getWorkInt(ownerindex, CHAR_WORKFMCHARINDEX), 0); +#ifdef _NEW_MANOR_LAW + { + int i; + for(i=0;i 0){ + // 检查有没有导师 + if(strlen(CHAR_getChar(ownerindex,CHAR_TEACHER_ID)) > 0 && strlen(CHAR_getChar(ownerindex,CHAR_TEACHER_NAME)) > 0){ + int iPlayernum = CHAR_getPlayerMaxNum(),i; + char szMsg[128]; + + // 检查导师在不在线上 + for(i=0;i 0 )return 0;//检查是否为融合宠 + for( i=0; i<4; i++) { + work[i] = 0; + } + if( PET_getBaseAndSkill( charaindex, Subindex1, base, petskill, 0) == FALSE ) + return 0; + if( CHAR_getInt( Subindex1, CHAR_LV) < 80 ){//等级销弱 + for( i=0; i<4; i++) { + base[i] = base[i]*0.8; + } + } + for( i=0; i<4; i++) { + work[i] = base[i]; + } + for( i=0; i<7; i++) { + skill[i] = petskill[i]; + } + if( !CHAR_CHECKINDEX( Subindex2)) return 1; + if( EVOLUTION_getPetFusionCode( CHAR_getInt( Subindex2, CHAR_PETID) ) < 0 ){ + return 0; + } + + if( CHAR_getInt( Subindex2, CHAR_FUSIONBEIT) == 1 || + CHAR_getInt( Subindex2, CHAR_FUSIONRAISE) > 0 )return 0;//检查是否为融合宠 + + if( PET_getBaseAndSkill( charaindex, Subindex2, base, NULL, 0) == FALSE ) + return 0; + if( CHAR_getInt( Subindex2, CHAR_LV) < 80 ){//等级销弱 + for( i=0; i<4; i++) { + base[i] = base[i]*0.8; + } + } + for( i=0; i<4; i++) { + work[i] += base[i]; + } + return 2; +} + +BOOL PETFUSION_FusionPetMain( int charaindex, int Mainindex, int *work, int *skill) +{ + int i; + int base[4]={0,0,0,0}; + int petskill[7]={-1,-1,-1,-1,-1,-1,-1}; + if( !CHAR_CHECKINDEX( Mainindex)) return FALSE; + if( EVOLUTION_getPetFusionCode( CHAR_getInt( Mainindex, CHAR_PETID) ) < 0 ){ + return 0; + } + if( CHAR_getInt( Mainindex, CHAR_FUSIONBEIT) == 1 || + CHAR_getInt( Mainindex, CHAR_FUSIONRAISE) > 0 )return FALSE;//检查是否为融合宠 + + if( PET_getBaseAndSkill( charaindex, Mainindex, base, petskill, 0) == FALSE ) + return -1; + if( CHAR_getInt( Mainindex, CHAR_LV) < 80 ){//等级销弱 + for( i=0; i<4; i++) { + base[i] = base[i]*0.8; + } + } + for( i=0; i<4; i++) { + work[i] += base[i]*0.6; + } + for( i=0; i<7; i++) { + skill[i] = petskill[i]; + } + + return TRUE; +} + +BOOL PETFUSION_DelPet( int toindex, int Mainindex, int Subindex1, int Subindex2, int flg) +{ + int i, j, cnt=0; + int petindex[3]; + + + petindex[0] = Mainindex; + petindex[1] = Subindex1; + petindex[2] = Subindex2; + + for( i=0; i<3; i++) { + if( !CHAR_CHECKINDEX( petindex[i] ) ) continue; + for( j=0; j= CHAR_MAXPETHAVE){ + + }else { + char szPet[256]; + char msgbuf[256]; + CHAR_setCharPet( toindex, j, -1); + snprintf( szPet, sizeof( szPet ), "K%d", j); + CHAR_sendStatusString( toindex, szPet ); + + snprintf( msgbuf,sizeof( msgbuf), "交出%s。", CHAR_getChar( petindex[i], CHAR_NAME)); + CHAR_talkToCli( toindex, -1, msgbuf, CHAR_COLORYELLOW); + LogPet( + CHAR_getChar( toindex, CHAR_NAME ), + CHAR_getChar( toindex, CHAR_CDKEY ), + CHAR_getChar( petindex[i], CHAR_NAME), + CHAR_getInt( petindex[i], CHAR_LV), + "TenseiDel", + CHAR_getInt( toindex,CHAR_FLOOR), + CHAR_getInt( toindex,CHAR_X ), + CHAR_getInt( toindex,CHAR_Y ), + CHAR_getChar( petindex[i], CHAR_UNIQUECODE) // shan 2001/12/14 + ); + } + CHAR_endCharOneArray( petindex[i] ); + cnt++; + } + if( cnt >= flg ) + return TRUE; + return FALSE; +} + +int PETFUSION_Evolution( int charaindex, int petindex) +{ + char buf[256], buf1[256]; + int newindex=-1; + CHAR_setInt( petindex, CHAR_FUSIONTIMELIMIT, -1); + + sprintf( buf, "蛋〈%s〉孵化成", CHAR_getChar( petindex, CHAR_NAME)); + newindex = EVOLUTION_createPetFromEnemyIndex( charaindex, petindex, 0); + if( !CHAR_CHECKINDEX( newindex) ){ + CHAR_talkToCli( charaindex, -1, "宠物孵化发生错误。", CHAR_COLORYELLOW); + return -1; + } + sprintf( buf1, "〈%s〉。", CHAR_getChar( newindex, CHAR_NAME)); + strcat( buf, buf1); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + + LogPetFeed( + CHAR_getChar( charaindex, CHAR_NAME), + CHAR_getChar( charaindex, CHAR_CDKEY), + CHAR_getChar( petindex, CHAR_NAME), + petindex, + CHAR_getInt( petindex, CHAR_LV), + buf, // Key + CHAR_getInt( charaindex, CHAR_FLOOR), + CHAR_getInt( charaindex, CHAR_X), + CHAR_getInt( charaindex, CHAR_Y), + CHAR_getChar( petindex, CHAR_UNIQUECODE) ); + + return newindex; +} +#endif + +#ifdef _PET_TRANS +int PETTRANS_getPetBase( int petindex, int *work, int *petrank) +{ + int i, total=-1; + if( !CHAR_CHECKINDEX( petindex) ){ + total = 0; + *petrank = 1; + for( i=0; i<4; i++) { + work[i] = 50; + total += work[i]; + } + }else{ + int LevelUpPoint = CHAR_getInt( petindex, CHAR_ALLOCPOINT ); + *petrank = CHAR_getInt( petindex, CHAR_PETRANK ); + work[0] = (float)(( LevelUpPoint >> 24 ) & 0xFF); + work[1] = (float)(( LevelUpPoint >> 16 ) & 0xFF); + work[2] = (float)(( LevelUpPoint >> 8 ) & 0xFF); + work[3] = (float)(( LevelUpPoint >> 0 ) & 0xFF); + total = ( work[0] + work[1] + work[2] + work[3] ); + if( total > 150 ) total = 150; + if( total < 0 ) total = 0; + } + return total; +} + +#ifdef _PET_2TRANS +int NPC_PetTransManGetAns( int total1, int total2, int LV, int rank, int tran ) +#else +int NPC_PetTransManGetAns( int total1, int total2, int LV, int rank ) +#endif +{ + int ans=0 , TransLV = 100; + float total = 0.00; + int Fx=1; + + if( LV > 130 ) LV = 130; + total = ( (float)total1/100 ); // 玛蕾最高 total1=200 + total = total*total*total*total*total; + if( total < 1 ) total = 0; + else total= total*1.3; // 所以total最大=41.6 最小=0 + + Fx = (int)((5-rank)*1.2)+5; // rank=0~6 所以 Fx最大=11(rank=0)最小=4(rank=6) + ans = (int)total + total2 + ((LV-TransLV)/Fx); //42+150+30/11=194 + +#ifdef _PET_2TRANS + if( tran == 0 ){ + if( ans > 150 ) + ans = 150; + } + else{ + if( ans > 200 ) + ans = 200; + } +#else + if( ans > 150 ) { + ans = 150; + } +#endif + print("\n ans = %d", ans); + return ans; +} + +int PETTRANS_PetTransManStatus( int toindex, int petindex1, int petindex2) +{ + int petrank=0,i; + int total1,total2,total,petLV,ans; + int petID,enemynum,ret=-1; + int work[4]={0,0,0,0}; + int base[4]={0,0,0,0}; + +#define RAND(x,y) ((x-1)+1+ (int)( (double)(y-(x-1))*rand()/(RAND_MAX+1.0)) ) + total1 = PETTRANS_getPetBase( petindex1, work, &petrank); + total2 = PETTRANS_getPetBase( petindex2, base, &petrank); + petLV = CHAR_getInt( petindex2, CHAR_LV); +#ifdef _PET_2TRANS + ans = NPC_PetTransManGetAns( total1, total2, petLV, petrank, CHAR_getInt( petindex2, CHAR_TRANSMIGRATION ) ); +#else + ans = NPC_PetTransManGetAns( total1, total2, petLV, petrank ); +#endif + total = total1 + (total2*4); + total2 = 0; + for( i=0; i<4; i++) { + work[i] = work[i]*4; + total2 += work[i]; + } + total = total1 + total2; + for( i=0; i<4; i++) { + base[i] = (ans * (base[i]+work[i])) /total; + } + enemynum = ENEMY_getEnemyNum(); + petID = CHAR_getInt( petindex2, CHAR_PETID); + for( i=0; i CHAR_getWorkInt( charaindex, CHAR_WORKMAXHP) ){ + Myhp = CHAR_getWorkInt( charaindex, CHAR_WORKMAXHP); + } + CHAR_setInt( charaindex, CHAR_HP, Myhp); + CHAR_complianceParameter( charaindex ); + CHAR_send_P_StatusString( charaindex, CHAR_P_STRING_HP); + for( i=0; i CHAR_getWorkInt( petindex, CHAR_WORKMAXHP) ){ + Myhp = CHAR_getWorkInt( petindex, CHAR_WORKMAXHP); + } + CHAR_setInt( petindex, CHAR_HP, Myhp); + CHAR_send_K_StatusString( charaindex, i, CHAR_K_STRING_HP|CHAR_K_STRING_AI); + } + break; + case 2://MP + Myhp = CHAR_getInt( charaindex, CHAR_MP); + dnums = CHAR_getWorkInt( charaindex, CHAR_WORKCHIKULAMP); + Myhp += dnums; + if( Myhp > CHAR_getWorkInt( charaindex, CHAR_WORKMAXMP) ){ + Myhp = CHAR_getWorkInt( charaindex, CHAR_WORKMAXMP); + } + CHAR_setInt( charaindex, CHAR_MP, Myhp); + CHAR_complianceParameter( charaindex ); + CHAR_send_P_StatusString( charaindex, CHAR_P_STRING_MP); + break; + } +} +#endif + +#ifdef _STATUS_WATERWORD //水世界状态 +void CHAR_CheckWaterStatus( int charaindex) +{ + if( !CHAR_CHECKINDEX( charaindex) ) return; + if( CHAR_getWorkInt( charaindex, CHAR_WORKSTATUSWATER) == -1 ){ + return; + } + if( CHAR_getWorkInt( charaindex, CHAR_WORKSTATUSWATER) > 0 ){ + CHAR_setWorkInt( charaindex, CHAR_WORKSTATUSWATER, + CHAR_getWorkInt( charaindex, CHAR_WORKSTATUSWATER) -1 ); + + if( CHAR_getWorkInt( charaindex, CHAR_WORKSTATUSWATER) != 0 && + CHAR_getWorkInt( charaindex, CHAR_WORKSTATUSWATER)%10 == 0 ){ + char buf1[256]; + sprintf( buf1, "水中呼吸时间剩馀%d分。", + CHAR_getWorkInt( charaindex, CHAR_WORKSTATUSWATER)); + CHAR_talkToCli( charaindex, -1, buf1, CHAR_COLORYELLOW); + } + } + + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE ){ + return; + } + if( CHAR_getWorkInt( charaindex, CHAR_WORKMAPFLOORTYPE) == 1 && + CHAR_getWorkInt( charaindex, CHAR_WORKSTATUSWATER) <= 0 ){//水世界 + char token[256]; + int defhp=0; + int maxhp = CHAR_getWorkInt( charaindex, CHAR_WORKMAXHP); + int myhp = CHAR_getInt( charaindex, CHAR_HP); + defhp = (maxhp*0.033); + if( defhp <= 0 ) defhp = 1; + myhp = myhp - defhp; + sprintf( token, "因无法呼吸,扣%d HP。", defhp); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW); + + if( myhp <= 0 ){ + myhp = 1; + if(CHAR_getInt(charaindex,CHAR_FLOOR) == 151 || CHAR_getInt(charaindex,CHAR_FLOOR) == 160 + || CHAR_getInt(charaindex,CHAR_FLOOR) == 161 ) CHAR_warpToSpecificPoint(charaindex,702,213,27); + else CHAR_warpToSpecificPoint( charaindex, 200,102,1021); + } + CHAR_setInt( charaindex, CHAR_HP, myhp); + CHAR_send_P_StatusString( charaindex, CHAR_P_STRING_HP); + } + +} +#endif + +int CHAR_findSurplusPetBox( int charaindex ) +{ + int i, remnants=0; + for( i=0; i +#include +#ifdef _REDHAT_V9 +#include +#endif + +#include "readmap.h" +#include "common.h" +#include "util.h" +#include "anim_tbl.h" +#include "battle.h" +#include "char.h" +#include "char_data.h" +#include "buf.h" +#include "item.h" +#include "log.h" +#include "pet.h" +#include "enemy.h" +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 +#include "char_base.h" +#include "configfile.h" +#endif + + +#include "defaultPlayer.h" +#include "defaultGroundEnemy.h" + + +#include "ls2data.dat" + +// CoolFish: Family 2001/7/28 +#include "family.h" +#include "saacproto_cli.h" + +#ifdef _PET_LIMITLEVEL +void CHAR_CheckPetDoLimitlevel( int petindex , int toindex, int level); +#endif + + +typedef struct tagdefaultCharcterGet +{ + int imagenumber; + Char* initchardata; + LevelUpPattern* lvpattern; + CHAR_ImageType imgtype; +}defaultCharacterGet; + +static defaultCharacterGet CHAR_defaultCharacterGet[]= +{ + /* CHAR_DEFAULTPLAYER */ +//阂间裆ㄠ + {SPR_001em,&player,&lvplayer00,CHAR_IMAGETYPE_CHILDBOY}, + {SPR_002em,&player,&lvplayer00,CHAR_IMAGETYPE_CHILDBOY}, + {SPR_003em,&player,&lvplayer00,CHAR_IMAGETYPE_CHILDBOY}, + {SPR_004em,&player,&lvplayer00,CHAR_IMAGETYPE_CHILDBOY}, + +//剂 ㄠ + {SPR_011em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY}, + {SPR_012em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY}, + {SPR_013em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY}, + {SPR_014em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY}, + +//剂 ㄡ + {SPR_021em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY}, + {SPR_022em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY}, + {SPR_023em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY}, + {SPR_024em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY}, + +//剂 ㄢ + {SPR_031em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY}, + {SPR_032em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY}, + {SPR_033em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY}, + {SPR_034em,&player,&lvplayer00,CHAR_IMAGETYPE_BOY}, + +//敛 ㄠ + {SPR_041em,&player,&lvplayer00,CHAR_IMAGETYPE_MAN}, + {SPR_042em,&player,&lvplayer00,CHAR_IMAGETYPE_MAN}, + {SPR_043em,&player,&lvplayer00,CHAR_IMAGETYPE_MAN}, + {SPR_044em,&player,&lvplayer00,CHAR_IMAGETYPE_MAN}, + +//敛 ㄡ + {SPR_051em,&player,&lvplayer00,CHAR_IMAGETYPE_MAN}, + {SPR_052em,&player,&lvplayer00,CHAR_IMAGETYPE_MAN}, + {SPR_053em,&player,&lvplayer00,CHAR_IMAGETYPE_MAN}, + {SPR_054em,&player,&lvplayer00,CHAR_IMAGETYPE_MAN}, + +//阂间辉ㄠ + {SPR_061em,&player,&lvplayer00,CHAR_IMAGETYPE_CHILDGIRL}, + {SPR_062em,&player,&lvplayer00,CHAR_IMAGETYPE_CHILDGIRL}, + {SPR_063em,&player,&lvplayer00,CHAR_IMAGETYPE_CHILDGIRL}, + {SPR_064em,&player,&lvplayer00,CHAR_IMAGETYPE_CHILDGIRL}, + +//剂辉ㄠ + {SPR_071em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL}, + {SPR_072em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL}, + {SPR_073em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL}, + {SPR_074em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL}, + +//剂辉ㄡ + {SPR_081em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL}, + {SPR_082em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL}, + {SPR_083em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL}, + {SPR_084em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL}, + +//剂辉ㄢ + {SPR_091em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL}, + {SPR_092em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL}, + {SPR_093em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL}, + {SPR_094em,&player,&lvplayer00,CHAR_IMAGETYPE_GIRL}, + +//辉岭ㄠ + {SPR_101em,&player,&lvplayer00,CHAR_IMAGETYPE_WOMAN}, + {SPR_102em,&player,&lvplayer00,CHAR_IMAGETYPE_WOMAN}, + {SPR_103em,&player,&lvplayer00,CHAR_IMAGETYPE_WOMAN}, + {SPR_104em,&player,&lvplayer00,CHAR_IMAGETYPE_WOMAN}, + +//辉岭ㄡ + {SPR_111em,&player,&lvplayer00,CHAR_IMAGETYPE_WOMAN}, + {SPR_112em,&player,&lvplayer00,CHAR_IMAGETYPE_WOMAN}, + {SPR_113em,&player,&lvplayer00,CHAR_IMAGETYPE_WOMAN}, + {SPR_114em,&player,&lvplayer00,CHAR_IMAGETYPE_WOMAN}, + + {SPR_pet001,&player,&lvplayer00,CHAR_IMAGETYPE_DOG}, + {SPR_pet002,&player,&lvplayer00,CHAR_IMAGETYPE_DOG}, + {SPR_pet003,&player,&lvplayer00,CHAR_IMAGETYPE_DOG}, + {SPR_pet004,&player,&lvplayer00,CHAR_IMAGETYPE_DOG}, + {SPR_pet011,&player,&lvplayer00,CHAR_IMAGETYPE_DOG}, +}; + +BOOL CHAR_getDefaultChar( Char* nc , int imagenumber ) +{ + int i, j; + int defcharaindex; + + Char* defaultchar; + defaultchar = CHAR_defaultCharacterGet[arraysizeof(CHAR_defaultCharacterGet) - 1].initchardata; + + memset( nc,0,sizeof(Char) ); + defcharaindex = 0; + for( i = 0 ; i < arraysizeof( CHAR_defaultCharacterGet ) ; i ++ ){ + if( CHAR_defaultCharacterGet[i].imagenumber == imagenumber ){ + defaultchar = CHAR_defaultCharacterGet[i].initchardata; + defcharaindex = i; + break; + } + } + nc->data[CHAR_IMAGETYPE] = CHAR_defaultCharacterGet[defcharaindex].imgtype; + nc->use = TRUE; + +#ifdef _CHAR_FIXDATADEF + for( j = 0 ; j < CHAR_DATAINTNUM ; j ++ ){ + if( j < CHAR_INITDATA ) nc->data[j] = defaultchar->data[j]; + else nc->data[j] = 0; + } +#else + for( j = 0 ; j < CHAR_DATAINTNUM ; j ++ ) + nc->data[j] = defaultchar->data[j]; +#endif + for( j = 0 ; j < arraysizeof( nc->flg ) ; j ++ ) + nc->flg[j] = defaultchar->flg[j]; + + for( j = 0 ; j < CHAR_DATACHARNUM ; j ++ ) + nc->string[j].string[0] = '\0'; + for( j = 0 ; j < CHAR_MAXITEMHAVE ; j ++ ) + nc->indexOfExistItems[j] = -1; + for( j = 0 ; j < CHAR_MAXPOOLITEMHAVE ; j ++ ) + nc->indexOfExistPoolItems[j] = -1; + for( j = 0 ; j < CHAR_MAXPETSKILLHAVE ; j ++ ) + nc->unionTable.indexOfPetskill[j] = -1; + for( j = 0 ; j < CHAR_MAXPOOLPETHAVE ; j ++ ) + nc->indexOfPoolPet[j] = -1; + for( j = 0 ; j < CHAR_SKILLMAXHAVE ; j ++ ) + nc->haveSkill[j].use = FALSE; + for( j = 0 ; j < CHAR_TITLEMAXHAVE ; j ++ ) + nc->indexOfHaveTitle[j] = -1; + for( j=0 ; jaddressBook[j],0,sizeof(nc->addressBook[j]) ); + for( j = 0 ; j < CHAR_WORKDATAINTNUM ; j ++ ) + nc->workint[j] = 0; + for( j = 0 ; j < CHAR_WORKDATACHARNUM ; j ++ ) + nc->workchar[j].string[0] = '\0'; + nc->workint[CHAR_WORKFD] = -1; + nc->workint[CHAR_WORKCHATROOMNUM] = -1; +#ifdef _DEATH_CONTEND + nc->data[CHAR_PKLISTTEAMNUM] = -1; + nc->data[CHAR_PKLISTLEADER] = -1; +#endif +#ifdef _NPC_SEPARATEDATA + CHAR_getDefaultCharTempNum( nc); +#endif + + return TRUE; +} + +static int CHAR_playerImageNumber[]= +{ + /* CHAR_DEFAULTPLAYER */ + SPR_001em,SPR_002em,SPR_003em,SPR_004em,SPR_011em,SPR_012em, + SPR_013em,SPR_014em,SPR_021em,SPR_022em,SPR_023em,SPR_024em, + SPR_031em,SPR_032em,SPR_033em,SPR_034em,SPR_041em,SPR_042em, + SPR_043em,SPR_044em,SPR_051em,SPR_052em,SPR_053em,SPR_054em, + SPR_061em,SPR_062em,SPR_063em,SPR_064em,SPR_071em,SPR_072em, + SPR_073em,SPR_074em,SPR_081em,SPR_082em,SPR_083em,SPR_084em, + SPR_091em,SPR_092em,SPR_093em,SPR_094em,SPR_101em,SPR_102em, + SPR_103em,SPR_104em,SPR_111em,SPR_112em,SPR_113em,SPR_114em +}; + +BOOL CHAR_checkPlayerImageNumber( int imagenumber) +{ + int i; + for( i = 0; i < arraysizeof( CHAR_playerImageNumber); i ++ ) { + if( imagenumber == CHAR_playerImageNumber[i] ) break; + } + if( i == arraysizeof( CHAR_playerImageNumber)) return FALSE; + else return TRUE; +} +/*------------------------------------------------------------ + * 涌 飓 寞及民尼永弁 + * + * 涌 飓 寞反动票及白巧□穴永玄匹瑁引匀化中月 + * number = 窒谛 井 + * CG_CHR_MAKE_FACE + (number*100) + ( 缙 number * 25) + ( 寞 * 5 ) + 轼 寞 + * + ------------------------------------------------------------*/ +BOOL CHAR_checkFaceImageNumber( int imagenumber, int faceimagenumber) +{ + int image = imagenumber - SPR_001em; + int number; + int color; + number = (faceimagenumber - CG_CHR_MAKE_FACE)/ 100*20; + color = ((faceimagenumber - CG_CHR_MAKE_FACE)% 100) / 25*5; + if( image != number + color ) return FALSE; + return TRUE; +} +// 平乓仿 飓 □皮伙[ㄠ 丐凶曰隶 ㄤ潘 +int CHAR_eqimagetbl[][5]={ + // 允匹 {{{{ 轺徇 键 菰 + { SPR_001em,SPR_001ax,SPR_001cl,SPR_001sp,SPR_001bw }, + { SPR_002em,SPR_002ax,SPR_002cl,SPR_002sp,SPR_002bw }, + { SPR_003em,SPR_003ax,SPR_003cl,SPR_003sp,SPR_003bw }, + { SPR_004em,SPR_004ax,SPR_004cl,SPR_004sp,SPR_004bw }, + { SPR_011em,SPR_011ax,SPR_011cl,SPR_011sp,SPR_011bw }, + { SPR_012em,SPR_012ax,SPR_012cl,SPR_012sp,SPR_012bw }, + { SPR_013em,SPR_013ax,SPR_013cl,SPR_013sp,SPR_013bw }, + { SPR_014em,SPR_014ax,SPR_014cl,SPR_014sp,SPR_014bw }, + { SPR_021em,SPR_021ax,SPR_021cl,SPR_021sp,SPR_021bw }, + { SPR_022em,SPR_022ax,SPR_022cl,SPR_022sp,SPR_022bw }, + { SPR_023em,SPR_023ax,SPR_023cl,SPR_023sp,SPR_023bw }, + { SPR_024em,SPR_024ax,SPR_024cl,SPR_024sp,SPR_024bw }, + { SPR_021em,SPR_021ax,SPR_021cl,SPR_021sp,SPR_021bw }, + { SPR_031em,SPR_031ax,SPR_031cl,SPR_031sp,SPR_031bw }, + { SPR_032em,SPR_032ax,SPR_032cl,SPR_032sp,SPR_032bw }, + { SPR_033em,SPR_033ax,SPR_033cl,SPR_033sp,SPR_033bw }, + { SPR_034em,SPR_034ax,SPR_034cl,SPR_034sp,SPR_034bw }, + { SPR_041em,SPR_041ax,SPR_041cl,SPR_041sp,SPR_041bw }, + { SPR_042em,SPR_042ax,SPR_042cl,SPR_042sp,SPR_042bw }, + { SPR_043em,SPR_043ax,SPR_043cl,SPR_043sp,SPR_043bw }, + { SPR_044em,SPR_044ax,SPR_044cl,SPR_044sp,SPR_044bw }, + + { SPR_051em,SPR_051ax,SPR_051cl,SPR_051sp,SPR_051bw }, + { SPR_052em,SPR_052ax,SPR_052cl,SPR_052sp,SPR_052bw }, + { SPR_053em,SPR_053ax,SPR_053cl,SPR_053sp,SPR_053bw }, + { SPR_054em,SPR_054ax,SPR_054cl,SPR_054sp,SPR_054bw }, + + { SPR_061em,SPR_061ax,SPR_061cl,SPR_061sp,SPR_061bw }, + { SPR_062em,SPR_062ax,SPR_062cl,SPR_062sp,SPR_062bw }, + { SPR_063em,SPR_063ax,SPR_063cl,SPR_063sp,SPR_063bw }, + { SPR_064em,SPR_064ax,SPR_064cl,SPR_064sp,SPR_064bw }, + + { SPR_071em,SPR_071ax,SPR_071cl,SPR_071sp,SPR_071bw }, + { SPR_072em,SPR_072ax,SPR_072cl,SPR_072sp,SPR_072bw }, + { SPR_073em,SPR_073ax,SPR_073cl,SPR_073sp,SPR_073bw }, + { SPR_074em,SPR_074ax,SPR_074cl,SPR_074sp,SPR_074bw }, + + { SPR_081em,SPR_081ax,SPR_081cl,SPR_081sp,SPR_081bw }, + { SPR_082em,SPR_082ax,SPR_082cl,SPR_082sp,SPR_082bw }, + { SPR_083em,SPR_083ax,SPR_083cl,SPR_083sp,SPR_083bw }, + { SPR_084em,SPR_084ax,SPR_084cl,SPR_084sp,SPR_084bw }, + + { SPR_091em,SPR_091ax,SPR_091cl,SPR_091sp,SPR_091bw }, + { SPR_092em,SPR_092ax,SPR_092cl,SPR_092sp,SPR_092bw }, + { SPR_093em,SPR_093ax,SPR_093cl,SPR_093sp,SPR_093bw }, + { SPR_094em,SPR_094ax,SPR_094cl,SPR_094sp,SPR_094bw }, + + { SPR_101em,SPR_101ax,SPR_101cl,SPR_101sp,SPR_101bw }, + { SPR_102em,SPR_102ax,SPR_102cl,SPR_102sp,SPR_102bw }, + { SPR_103em,SPR_103ax,SPR_103cl,SPR_103sp,SPR_103bw }, + { SPR_104em,SPR_104ax,SPR_104cl,SPR_104sp,SPR_104bw }, + + { SPR_111em,SPR_111ax,SPR_111cl,SPR_111sp,SPR_111bw }, + { SPR_112em,SPR_112ax,SPR_112cl,SPR_112sp,SPR_112bw }, + { SPR_113em,SPR_113ax,SPR_113cl,SPR_113sp,SPR_113bw }, + { SPR_114em,SPR_114ax,SPR_114cl,SPR_114sp,SPR_114bw }, + + { SPR_091em,SPR_091ax,SPR_091cl,SPR_091sp,SPR_091bw }, + { SPR_092em,SPR_092ax,SPR_092cl,SPR_092sp,SPR_092bw }, + + { SPR_pet001,SPR_pet001,SPR_pet001,SPR_pet001,SPR_pet001}, + { SPR_pet002,SPR_pet002,SPR_pet002,SPR_pet002,SPR_pet002}, + { SPR_pet003,SPR_pet003,SPR_pet003,SPR_pet003,SPR_pet003}, + { SPR_pet004,SPR_pet004,SPR_pet004,SPR_pet004,SPR_pet004}, + + { SPR_pet011,SPR_pet011,SPR_pet011,SPR_pet011,SPR_pet011}, + + { SPR_121em,SPR_121ax,SPR_121cl,SPR_121sp,SPR_121bw }, + { SPR_122em,SPR_122ax,SPR_122cl,SPR_122sp,SPR_122bw }, + + { SPR_131em,SPR_131ax,SPR_131cl,SPR_131sp,SPR_131bw }, + { SPR_132em,SPR_132ax,SPR_132cl,SPR_132sp,SPR_132bw }, + { SPR_133em,SPR_133ax,SPR_133cl,SPR_133sp,SPR_133bw }, + + { SPR_141em,SPR_141ax,SPR_141cl,SPR_141sp,SPR_141bw }, + { SPR_142em,SPR_142ax,SPR_142cl,SPR_142sp,SPR_142bw }, + + { SPR_151em,SPR_151ax,SPR_151cl,SPR_151sp,SPR_151bw }, + { SPR_152em,SPR_152ax,SPR_152cl,SPR_152sp,SPR_152bw }, + + { SPR_161em,SPR_161ax,SPR_161cl,SPR_161sp,SPR_161bw }, + { SPR_162em,SPR_162ax,SPR_162cl,SPR_162sp,SPR_162bw }, + +}; + +/*------------------------------------------------------------ + * 隶 午 飓 寞井日蕙仄中 飓 寞毛 月[ + * 娄醒 + * basebaseimagenumber int 葭卞卅月 飓 寞 + * category ITEM_CATEGORY 失奶 丞及市 打伉 + * 忒曰袄 + * 蕙仄中 飓 寞[巨仿□及凛反}-1 + ------------------------------------------------------------*/ +int CHAR_getNewImagenumberFromEquip( int basebaseimagenumber, + ITEM_CATEGORY category ) +{ + int i; + /* ITEM_CATEGORY 民尼永弁 */ + if( category < 0 || category > arraysizeof(CHAR_eqimagetbl[0]) ) + return -1; + for( i=0 ; i rx )swap(lx,rx); + if( ly > ry )swap(ly,ry); + + CHAR_invarea[invreadlen].area.x = lx; + CHAR_invarea[invreadlen].area.y = ly; + CHAR_invarea[invreadlen].area.width = rx-lx; + CHAR_invarea[invreadlen].area.height= ry-ly; + invreadlen ++; + } + } + fclose(f); + CHAR_invareanum = invreadlen; + print( "有效不可战斗有效数是 %d...", CHAR_invareanum ); +#if 0 +{ + int i,j; + for( i=0; i 3 ) { + return FALSE; + } + index=hometown; +#endif + if( index >= arraysizeof( elders ) ){ + return FALSE; + } + + ch->data[CHAR_FLOOR] = elders[index].floor; + ch->data[CHAR_X] = elders[index].x; + ch->data[CHAR_Y] = elders[index].y; + ch->data[CHAR_LASTTALKELDER] = index; + point = ch->data[CHAR_SAVEPOINT]; + + +#ifdef _DELBORNPLACE //Syu ADD 6.0 统一出生於新手村 + if( getMuseum() ) { + ch->data[CHAR_FLOOR] = 815; + ch->data[CHAR_X] = 29; + ch->data[CHAR_Y] = 40; + ch->data[CHAR_LASTTALKELDER] = 35; + // point = point | (1<<35) ; + point = point | (1<data[CHAR_FLOOR] = 9000; + ch->data[CHAR_X] = 40; + ch->data[CHAR_Y] = 40; + } +#endif + + ch->data[CHAR_SAVEPOINT] = point; + + if( MAP_checkCoordinates( ch->data[CHAR_FLOOR], ch->data[CHAR_X], + ch->data[CHAR_Y] ) == FALSE ){ + return FALSE; + } + + return TRUE; +} + +/*------------------------------------------------------------ + * 巨伙母□及桦赭毛 月 + * 娄醒 + * elderindex int 巨伙母□奶件犯永弁旦 + * fl int* 白夫失毛熬仃潸月桦赭 + * x int* x毛熬仃潸月桦赭 + * y int* y毛熬仃潸月桦赭 + * 娄醒 + * 岳 TRUE(1) + * 撩 FALSE(0) + ------------------------------------------------------------*/ +BOOL CHAR_getElderPosition( int elderindex, int* fl, int* x, int* y ) +{ + if( elderindex<0 || arraysizeof(elders)<=elderindex )return FALSE; + + *fl = elders[elderindex].floor; + *x = elders[elderindex].x; + *y = elders[elderindex].y; + return TRUE; +} +/*------------------------------------------------------------ + * 赢 NPC互愤坌及赓渝祭及午五卞}赢 卞踏五仇戈及分[ + * 公及凶户及奶件正□白尼奶旦 + * 娄醒 + * index int 左□田□匹 撩 仄凶日FALSE 毛井尹允 + * fl int 匏 及树 + * x int + * y int + * NPC及伙□民件井日银歹木月及分[ + ------------------------------------------------------------*/ +BOOL CHAR_ElderSetPosition( int elderindex ,int fl,int x ,int y) +{ + if( elderindex < ELDERINDEXSTART || + elderindex >= MAXELDERS ){ + return FALSE; + } + + elders[elderindex].floor = fl; + elders[elderindex].x = x; + elders[elderindex].y = y; + return TRUE; +} + + +void CHAR_setInitValues( Char* ch ) +{ + +#ifndef _PROFESSION_SKILL // WON ADD 人物职业技能 + + static int CHAR_titleindextbl[] ={ 0,1,2,3,4,5,6 }; + int elderindex; + int i; + BOOL magician=FALSE; + BOOL priest=FALSE; + + elderindex = ch->data[CHAR_LASTTALKELDER]; + if( 0 <= elderindex + && elderindex < arraysizeof( CHAR_titleindextbl ) ) + ch->indexOfHaveTitle[0] = CHAR_titleindextbl[elderindex]; + + + for( i=0 ; ihaveSkill[i].use ){ + int j; + int skindex=ch->haveSkill[i].skill.data[SKILL_IDENTITY]; + + for( j=0 ; jdata[CHAR_GOLD] = 20; + + if( skindex == SKILL_MAGICIAN ) + magician = TRUE; + else if( skindex == SKILL_PRIEST ) + priest = TRUE; + + } + } + + if( magician || priest ) CHAR_addItemToChar( ch, 802 ); + +#endif +} + + +#if 1 +static int EnemyExpTbl[]={ +0, // 0 +2, // 1 +4, // 2 +6, // 3 +8, // 4 +10, // 5 +12, // 6 +14, // 7 +16, // 8 +18, // 9 +20, // 10 +26, // 11 +32, // 12 +38, // 13 +44, // 14 +50, // 15 +60, // 16 +70, // 17 +80, // 18 +90, // 19 +100, // 20 +115, // 21 +130, // 22 +145, // 23 +160, // 24 +175, // 25 +190, // 26 +205, // 27 +220, // 28 +235, // 29 +250, // 30 +270, // 31 +290, // 32 +310, // 33 +330, // 34 +350, // 35 +375, // 36 +400, // 37 +425, // 38 +450, // 39 +475, // 40 +500, // 41 +525, // 42 +550, // 43 +575, // 44 +600, // 45 +625, // 46 +650, // 47 +675, // 48 +700, // 49 +725, // 50 +750, // 51 +775, // 52 +800, // 53 +825, // 54 +850, // 55 +875, // 56 +900, // 57 +925, // 58 +950, // 59 +980, // 60 +1010, // 61 +1040, // 62 +1070, // 63 +1100, // 64 +1130, // 65 +1160, // 66 +1190, // 67 +1220, // 68 +1250, // 69 +1280, // 70 +1310, // 71 +1345, // 72 +1380, // 73 +1415, // 74 +1450, // 75 +1485, // 76 +1520, // 77 +1555, // 78 +1590, // 79 +1630, // 80 +1670, // 81 +1710, // 82 +1750, // 83 +1790, // 84 +1830, // 85 +1870, // 86 +1910, // 87 +1950, // 88 +1990 // 89 +}; // 90 + + + + + + + + + + + + + + + + +// 酵烂读卅烦董袄煌遥 +int GetEnemyExp( int level ){ +/* + int exp = 0; + if( level < 5 ){ + exp = 2 * level; + }else + if( level < 10 ){ + exp = 10 * level; + }else + if( level < 20 ){ + exp = 15 * level; + }else + if( level < 30 ){ + exp = 30 * level; + }else + if( level < 40 ){ + exp = 50 * level; + }else + if( level < 50 ){ + exp =60 * level; + }else + if( level < 60 ){ + exp =60 * level; + }else{ + exp =70 * level; + } +*/ + if( level >= arraysizeof( EnemyExpTbl ) )level = arraysizeof( EnemyExpTbl )-1; + return EnemyExpTbl[level]; +} +#endif + +#ifdef _NEWOPEN_MAXEXP +/*static int NeedLevelUpTbls[] = { + 0, 0, + 2, 6, 18, 37, 67, 110, 170, + 246, 344, 464, 610, 782, 986, 1221, + 1491, 1798, 2146, 2534, 2968, 3448, 3978, + 4558, 5194, 5885, 6635, 7446, 8322, 9262, + 10272, 11352, 12506, 13734, 15042, 16429, 17899, + 19454, 21098, 22830, 24656, 26576, 28594, 30710, + 32930, 35253, 37683, 40222, 42874, 45638, 48520, + 51520, 54642, 57886, 61258, 64757, 68387, 72150, + 76050, 80086, 84264, 106110, 113412, 121149, 129352, + 138044, 147256, 157019, 167366, 178334, 189958, 202282, + 215348, 229205, 243901, 259495, 276041, 293606, 312258, + 332071, 353126, 375511, 399318, 424655, 451631, 480370, + 511007, 543686, 578571, 615838, 655680, 698312, 743971, + 792917, 845443, 901868, 962554, 1027899, 1098353, 1174420, + 1256663, 1345723, 1442322, 1547281, 1661531, 1786143, 1922340, + 2071533, 2235351, 2415689, 2614754, 2835137, 3079892, 3352633, + 3657676, 4000195, 4386445, 4824041, 5322323, 5892866, 6550125, + 12326614, 15496114, 20025638, 26821885, 37698249, 56734876, 68097265, + 68290815, 68487425, 68687119, 68889921, 69095855, 69304945, 69517215, + 69732689, 69951391, 70173345, 70398575, 70627105, 70858959, 71244161, + 71342735, 71584705, 71830095, 72078929, 72331231, 72587025, 72846335, + 73109185, 73615599, 73655601, 73929215, 74206465, 74487375, 74771969, + 75060271, 75352305, 75648095, 75947665, 76421039, 76563241, 76874295, + 77189225, 77508055, 77830809, 78157511, 78488185, 78822855, 79161545, + 79724279, 79856081, 80206975, 80561985, 80921135, 81284449, 81651951, + 82023665, 82399615, 82779825, 83434319, 83558121, 83951255, 84348745, + 84750615, 85156889, 85567591, 85982745, 86402375, 86826505, 87575159, + 87693361, 88131135, 88573505, 89020495, 89472129, 89928431, 90389425, + 90855135, 91325585, 91800799 +}; +*/ +#endif +static int LevelUpTbl[] = { // 经验值 等级 换算表 +0, // 0 EX=(lv^4)/10 +0, // 1 + 2, 8, 25, 62, 129, + 240, 409, 656, 1000, 1464, // 11 + 2073, 2856, 3841, 5062, 6553, // 16 + 8352, 10497, 13032, 16000, 19448, 23425, // 22 + 27984, 33177, 39062, 45697, 53144, 61465, // 28 + 70728, 81000, 92352, 104857, 118592, 133633, // 34 + 150062, 167961, 187416, 208513, 231344, 256000, // 40 + 282576, 311169, 341880, 374809, 410062, 447745, // 46 + 487968, 530841, 576480, 625000, 676520, 731161, // 52 + 789048, 850305, 915062, 983449, 1055600, 1131649, // 58 + 1211736, 1296000, + 1402110, // 61 EX=(lv^4)/(10-0.125*(lv-60)) + 1515521, 1636671, 1766022, 1904066, 2051322, 2208342, // 67 + 2375708, 2554041, 2744000, 2946281, 3161630, 3390834, // 73 + 3634736, 3894230, 4170272, 4463878, 4776136, 5108207, // 79 + 5461333, 5836843, 6236162, 6660816, 7112448, 7592818, // 85 + 8103824, 8647511, 9226082, 9841920, 10497600, 11195912, // 91 + 11939882, 12732800, 13578242, 14480111, 15442664, 16470563, // 97 + 17568917, 18743336, 20000000, 21345723, 22788045, 24335325, // 103 + 25996856, 27783000, 29705340, 31776872, 34012224, 36427912, // 109 + 39042666, 41877804, 44957696, 48310329, 51968004, 55968200, // 115 + 60354645, 65178685, 70501009, 76393874, 82944000, + + 95270613, // 121 Nuke 0624 EX=(lv^4)/(2.5-0.25*(lv-120)) + 110766728, 130792366, 157614250, 195312500, // 125 + 252047376, // 126 EX=lv^4+60000000*(lv-126)^2 Nuke 0816 + 320144641, 388435456, 456922881, 525610000, 594499921, 663595776, // 132 + 732900721, 802417936, 872150625, 942102016,1012275361,1082673936, // 138 + 1153301041,1224160000 // 140 +}; + +int CHAR_GetLevel() +{ + return arraysizeof( LevelUpTbl )-1; +} +int CHAR_GetLevelExp( int candp, int level, int corp ) +{ +#ifdef _NEWOPEN_MAXEXP +#ifdef _USER_EXP_CF + if(corp=0){ + if(CHAR_getInt(candp,CHAR_TRANSMIGRATION)<6){ + if(level>140) + return -1; + }else{ + if(level>160) + return -1; + } + }else{ + if(CHAR_getInt(candp,CHAR_TRANSMIGRATION)<2){ + if(level>140) + return -1; + }else{ + if(level>160) + return -1; + } + return getNeedLevelUpTbls(level); +#endif +/* if( level >= arraysizeof( NeedLevelUpTbls ) ){ + return -1; + } + return NeedLevelUpTbls[level];*/ +#else + if( level >= arraysizeof( LevelUpTbl ) ){ + return -1; + } + return LevelUpTbl[level]; +#endif +} + +int CHAR_GetOldLevelExp( int level) +{ + if( level >= arraysizeof( LevelUpTbl ) ){ + return -1; + } + return LevelUpTbl[level]; +} + +int CHAR_LevelUpCheck( int charaindex , int toindex) +{ + int exp, level, nextexp, iRet = FALSE; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return 0; + exp = CHAR_getInt( charaindex, CHAR_EXP ); + while( 1 ){ + level = CHAR_getInt( charaindex, CHAR_LV ); + nextexp = CHAR_GetLevelExp( charaindex, level+1, 0 ); + if( nextexp < 0 ) + break; + // Arminius 7.30 pet limit lv + if (CHAR_getInt(charaindex, CHAR_WHICHTYPE)==CHAR_TYPEPET) { + + if (level >= CHAR_getInt(charaindex, CHAR_LIMITLEVEL) && + CHAR_getInt(charaindex, CHAR_LIMITLEVEL) > 0 ) { +#ifdef _NEWOPEN_MAXEXP + CHAR_setInt( charaindex, CHAR_EXP , 0); +#else +#ifdef _PET_LIMITLEVEL + if( CHAR_getInt( charaindex, CHAR_PETID) == 718 +#ifdef _PET_2LIMITLEVEL + || CHAR_getInt( charaindex, CHAR_PETID) == 401 +#endif + ) { + nextexp = CHAR_GetLevelExp( charaindex, CHAR_getInt(charaindex, CHAR_LIMITLEVEL), 0 ); + CHAR_setInt( charaindex, CHAR_EXP , nextexp ); + } +#endif +#endif + break; + } + } + if( exp >= nextexp ){ + iRet ++; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + CHAR_setInt( charaindex, CHAR_DUELPOINT, + CHAR_getInt( charaindex, CHAR_DUELPOINT) + (level+1)*10 ); + } +#ifdef _PET_LIMITLEVEL + else { + CHAR_CheckPetDoLimitlevel( charaindex, toindex, level ); + } +#endif + +#ifdef _NEWOPEN_MAXEXP + if( level >= CHAR_MAXUPLEVEL ){ + }else{ + if( CHAR_HandleExp( charaindex) != -1 ){ + exp = CHAR_getInt( charaindex, CHAR_EXP ); + CHAR_setInt( charaindex, CHAR_LV, level+1 ); + } + } +#else + CHAR_setInt( charaindex, CHAR_LV, level+1 ); +#endif + }else{ + break; + } + } + return iRet; +} + +#ifdef _PET_LIMITLEVEL +void CHAR_CheckPetDoLimitlevel( int petindex , int toindex, int level) +{ + int LevelUpPoint,vital,str,tgh,dex; + int j,k; + char token[56]; +#define RAND(x,y) ((x-1)+1+ (int)( (double)(y-(x-1))*rand()/(RAND_MAX+1.0)) ) + + if( CHAR_getInt( petindex, CHAR_PETID) == 718 +#ifdef _PET_2LIMITLEVEL + || CHAR_getInt( petindex, CHAR_PETID) == 401 +#endif + ) { + LevelUpPoint = CHAR_getInt( petindex, CHAR_ALLOCPOINT ); + vital = (int )(( LevelUpPoint >> 24 ) & 0xFF); + str = (int)(( LevelUpPoint >> 16 ) & 0xFF); + tgh = (int)(( LevelUpPoint >> 8 ) & 0xFF); + dex = (int)(( LevelUpPoint >> 0 ) & 0xFF); + + if( strcmp( CHAR_getChar( petindex, CHAR_OWNERCDKEY), CHAR_getChar( toindex, CHAR_CDKEY) ) || + strcmp( CHAR_getChar( petindex, CHAR_OWNERCHARANAME), CHAR_getChar( toindex, CHAR_NAME) )){ + sprintf(token,"我不认识你呀!快把我还给我主人!"); + //andy 1/11 reEdit + vital -= RAND(2,10); if (vital<0) vital=0; + str -= RAND(2,10); if (str<0) str=0; + tgh -= RAND(2,10); if (tgh<0) tgh=0; + dex -= RAND(2,10); if (dex<0) dex=0; + LevelUpPoint = (vital<<24)+(str<<16)+(tgh<<8)+(dex<<0); + + CHAR_setInt( petindex, CHAR_ALLOCPOINT , LevelUpPoint); + CHAR_talkToCli( toindex, petindex, token, CHAR_COLORWHITE); + + LogPetPointChange( + CHAR_getChar( toindex, CHAR_NAME ), + CHAR_getChar( toindex, CHAR_CDKEY ), + CHAR_getChar( petindex, CHAR_NAME), + petindex, 2, + CHAR_getInt( petindex, CHAR_LV), + "No_master(玛蕾不对主人)", + CHAR_getInt( toindex,CHAR_FLOOR), + CHAR_getInt( toindex,CHAR_X ), + CHAR_getInt( toindex,CHAR_Y ) + ); + } + + if( ( level % 20 ) == 0 ) { + for( j=0; j < 3; j++) { + k = RAND( 0, 3); + if( k == 0 ) + vital--; + if( k == 1 ) + str--; + if( k == 2 ) + tgh--; + if( k == 3 ) + dex--; + } + if( vital < 0 ) vital =0; + if( str < 0 ) str =0; + if( tgh < 0 ) tgh =0; + if( dex < 0 ) dex =0; + LevelUpPoint = (vital<<24)+(str<<16)+(tgh<<8)+(dex<<0); + CHAR_setInt( petindex, CHAR_ALLOCPOINT , LevelUpPoint); + //print("\n << ( level % 20 ) == 0 >> "); + LogPetPointChange( + CHAR_getChar( toindex, CHAR_NAME ), + CHAR_getChar( toindex, CHAR_CDKEY ), + CHAR_getChar( petindex, CHAR_NAME), + petindex,3, + CHAR_getInt( petindex, CHAR_LV), + "level%20", + CHAR_getInt( toindex,CHAR_FLOOR), + CHAR_getInt( toindex,CHAR_X ), + CHAR_getInt( toindex,CHAR_Y ) + ); + } + } +} +#endif +int CHAR_PetTakeDrop( int petindex, int floor, int ox, int oy) //强制丢弃宠物升级 +{ + int x, y, objindex; + + x = rand()%10; + y = rand()%10; + + //丢下宠物 CHAR_endCharOneArray + objindex = PET_dropPetAbsolute( petindex,floor,x,y, FALSE ); + if( objindex == -1 ) { + return -1; + } + CHAR_setWorkInt( petindex,CHAR_WORKOBJINDEX,objindex ); + CHAR_setInt( petindex, CHAR_FLOOR, floor); + CHAR_setInt( petindex, CHAR_X, x); + CHAR_setInt( petindex, CHAR_Y, y); + CHAR_sendCToArroundCharacter( objindex); + + return floor; +} + +int CHAR_PetTakeLevelUp( int petindex, int lv)//强制宠物升级 +{ + int k; + for( k = 1; k < lv; k ++ ){ + CHAR_PetLevelUp( petindex ); + CHAR_PetAddVariableAi( petindex, AI_FIX_PETLEVELUP ); + CHAR_setInt( petindex, CHAR_LV, CHAR_getInt( petindex, CHAR_LV) +1 ); + } + + CHAR_complianceParameter( petindex ); + return k; +} + +#ifdef _NEW_MANOR_LAW +extern struct FM_POINTLIST fmpointlist; +#endif + +int CHAR_PetLevelUp( int petindex ) +{ + struct _RankRandTbl{ + int min; + int max; + }RankRandTbl[] = { + { 450, 500 }, + { 470, 520 }, + { 490, 540 }, + { 510, 560 }, + { 530, 580 }, + { 550, 600 }, + }; + + float Param[4] = { 0.0, 0.0, 0.0, 0.0 }; + int LevelUpPoint, petrank; + float str, vital, dex, tgh, fRand, i; +#ifdef _TEACHER_SYSTEM + int iGetFame = 0; +#endif + // 娄醒民尼永弁 + if( CHAR_CHECKINDEX( petindex ) == FALSE ) return -1; + if( CHAR_getInt( petindex, CHAR_WHICHTYPE ) != CHAR_TYPEPET )return -1; + + LevelUpPoint = CHAR_getInt( petindex, CHAR_ALLOCPOINT ); + + // 矢永玄及仿件弁 + petrank = CHAR_getInt( petindex, CHAR_PETRANK ); + if( petrank < 0 || petrank > 5 ) petrank = 0; + + // 潸 + vital = (float)(( LevelUpPoint >> 24 ) & 0xFF); + str = (float)(( LevelUpPoint >> 16 ) & 0xFF); + tgh = (float)(( LevelUpPoint >> 8 ) & 0xFF); + dex = (float)(( LevelUpPoint >> 0 ) & 0xFF); + + // ㄠㄟ荚ㄣ 扔奶戊夫毛蕊匀化备嫩 卞ㄠ箫允 + for( i = 0; i < 10; i ++ ){ + Param[RAND( 0, 3 )] += 1.0; + } + + // 仿件弁卞方月 区及仿件母丞 + fRand = (float)RAND( RankRandTbl[petrank].min, RankRandTbl[petrank].max ) + * 0.01; + + // 喃曰蕊曰禾奶件玄方曰煌遥 + vital = (float)vital * fRand + Param[0] * fRand; + str = (float)str * fRand + Param[1] * fRand; + tgh = (float)tgh * fRand + Param[2] * fRand; + dex = (float)dex * fRand + Param[3] * fRand; + + // 煌遥 + CHAR_setInt( petindex, CHAR_VITAL, + CHAR_getInt( petindex, CHAR_VITAL ) + (int)vital ); + CHAR_setInt( petindex, CHAR_STR, + CHAR_getInt( petindex, CHAR_STR ) + (int)str ); + CHAR_setInt( petindex, CHAR_TOUGH, + CHAR_getInt( petindex, CHAR_TOUGH ) + (int)tgh ); + CHAR_setInt( petindex, CHAR_DEX, + CHAR_getInt( petindex, CHAR_DEX ) + (int)dex ); + + // CoolFish: 饲育家族声望更新 + { + int level = CHAR_getInt(petindex, CHAR_LV); + int exp1 = 0, exp2 = 0, feedpoint = 0; + if (level > 30){ + char tmpbuf[128]; +#ifdef _NEW_MANOR_LAW + char tmpbuf1[16]; +#endif + int ownerindex = CHAR_getWorkInt(petindex, CHAR_WORKPLAYERINDEX); +#ifdef _FMVER21 +#else + if (CHAR_getInt(ownerindex, CHAR_FMINDEX) < 0) return 0; + if (CHAR_getInt(ownerindex, CHAR_FMLEADERFLAG) <= 0 ) return 0; + if (strcmp(CHAR_getChar(ownerindex, CHAR_FMNAME), "") == 0) return 0; +#endif + if (CHAR_CHECKINDEX(ownerindex)){ + exp1 = CHAR_GetLevelExp( petindex, level, 1); + exp2 = CHAR_GetLevelExp( petindex,level - 1, 1); + +#ifdef _PERSONAL_FAME // Arminius 8.30: 家族个人声望 + feedpoint = (exp1 - exp2) / 20000; // 减半 +#else + feedpoint = (exp1 - exp2) / 10000; +#endif + sprintf(tmpbuf, "%d", feedpoint); + if (feedpoint > 0){ + // CoolFish: 2001/10/03 + int fd = getfdFromCharaIndex(ownerindex); +#ifdef _PERSONAL_FAME // Arminius 8.30: 家族个人声望 + CHAR_earnFame(ownerindex, feedpoint); +#endif +#ifdef _NEW_MANOR_LAW + sprintf(tmpbuf1, "%d", CHAR_getInt(ownerindex,CHAR_FAME)); +#endif +#ifdef _FMVER21 + if (CHAR_getInt(ownerindex, CHAR_FMLEADERFLAG) > 0 + && CHAR_getInt(ownerindex, CHAR_FMLEADERFLAG) != FMMEMBER_APPLY){ + saacproto_ACFixFMData_send(acfd, + CHAR_getChar(ownerindex, CHAR_FMNAME), + CHAR_getInt(ownerindex, CHAR_FMINDEX), + CHAR_getWorkInt(ownerindex, CHAR_WORKFMINDEXI), + FM_FIX_FMFEED, tmpbuf, +#ifndef _NEW_MANOR_LAW + "", +#else + tmpbuf1, +#endif + // CoolFish: 2001/10/03 + CHAR_getWorkInt(ownerindex, CHAR_WORKFMCHARINDEX), + CONNECT_getFdid(fd)); + // CHAR_getWorkInt(ownerindex, CHAR_WORKFMCHARINDEX), 0); +#ifdef _NEW_MANOR_LAW + { + int i; + for(i=0;i 0){ + // 检查有没有导师 + if(strlen(CHAR_getChar(ownerindex,CHAR_TEACHER_ID)) > 0 && strlen(CHAR_getChar(ownerindex,CHAR_TEACHER_NAME)) > 0){ + int iPlayernum = CHAR_getPlayerMaxNum(),i; + char szMsg[128]; + + // 检查导师在不在线上 + for(i=0;i 0 )return 0;//检查是否为融合宠 + for( i=0; i<4; i++) { + work[i] = 0; + } + if( PET_getBaseAndSkill( charaindex, Subindex1, base, petskill, 0) == FALSE ) + return 0; + if( CHAR_getInt( Subindex1, CHAR_LV) < 80 ){//等级销弱 + for( i=0; i<4; i++) { + base[i] = base[i]*0.8; + } + } + for( i=0; i<4; i++) { + work[i] = base[i]; + } + for( i=0; i<7; i++) { + skill[i] = petskill[i]; + } + if( !CHAR_CHECKINDEX( Subindex2)) return 1; + if( EVOLUTION_getPetFusionCode( CHAR_getInt( Subindex2, CHAR_PETID) ) < 0 ){ + return 0; + } + + if( CHAR_getInt( Subindex2, CHAR_FUSIONBEIT) == 1 || + CHAR_getInt( Subindex2, CHAR_FUSIONRAISE) > 0 )return 0;//检查是否为融合宠 + + if( PET_getBaseAndSkill( charaindex, Subindex2, base, NULL, 0) == FALSE ) + return 0; + if( CHAR_getInt( Subindex2, CHAR_LV) < 80 ){//等级销弱 + for( i=0; i<4; i++) { + base[i] = base[i]*0.8; + } + } + for( i=0; i<4; i++) { + work[i] += base[i]; + } + return 2; +} + +BOOL PETFUSION_FusionPetMain( int charaindex, int Mainindex, int *work, int *skill) +{ + int i; + int base[4]={0,0,0,0}; + int petskill[7]={-1,-1,-1,-1,-1,-1,-1}; + if( !CHAR_CHECKINDEX( Mainindex)) return FALSE; + if( EVOLUTION_getPetFusionCode( CHAR_getInt( Mainindex, CHAR_PETID) ) < 0 ){ + return 0; + } + if( CHAR_getInt( Mainindex, CHAR_FUSIONBEIT) == 1 || + CHAR_getInt( Mainindex, CHAR_FUSIONRAISE) > 0 )return FALSE;//检查是否为融合宠 + + if( PET_getBaseAndSkill( charaindex, Mainindex, base, petskill, 0) == FALSE ) + return -1; + if( CHAR_getInt( Mainindex, CHAR_LV) < 80 ){//等级销弱 + for( i=0; i<4; i++) { + base[i] = base[i]*0.8; + } + } + for( i=0; i<4; i++) { + work[i] += base[i]*0.6; + } + for( i=0; i<7; i++) { + skill[i] = petskill[i]; + } + + return TRUE; +} + +BOOL PETFUSION_DelPet( int toindex, int Mainindex, int Subindex1, int Subindex2, int flg) +{ + int i, j, cnt=0; + int petindex[3]; + + + petindex[0] = Mainindex; + petindex[1] = Subindex1; + petindex[2] = Subindex2; + + for( i=0; i<3; i++) { + if( !CHAR_CHECKINDEX( petindex[i] ) ) continue; + for( j=0; j= CHAR_MAXPETHAVE){ + + }else { + char szPet[256]; + char msgbuf[256]; + CHAR_setCharPet( toindex, j, -1); + snprintf( szPet, sizeof( szPet ), "K%d", j); + CHAR_sendStatusString( toindex, szPet ); + + snprintf( msgbuf,sizeof( msgbuf), "交出%s。", CHAR_getChar( petindex[i], CHAR_NAME)); + CHAR_talkToCli( toindex, -1, msgbuf, CHAR_COLORYELLOW); + LogPet( + CHAR_getChar( toindex, CHAR_NAME ), + CHAR_getChar( toindex, CHAR_CDKEY ), + CHAR_getChar( petindex[i], CHAR_NAME), + CHAR_getInt( petindex[i], CHAR_LV), + "TenseiDel", + CHAR_getInt( toindex,CHAR_FLOOR), + CHAR_getInt( toindex,CHAR_X ), + CHAR_getInt( toindex,CHAR_Y ), + CHAR_getChar( petindex[i], CHAR_UNIQUECODE) // shan 2001/12/14 + ); + } + CHAR_endCharOneArray( petindex[i] ); + cnt++; + } + if( cnt >= flg ) + return TRUE; + return FALSE; +} + +int PETFUSION_Evolution( int charaindex, int petindex) +{ + char buf[256], buf1[256]; + int newindex=-1; + CHAR_setInt( petindex, CHAR_FUSIONTIMELIMIT, -1); + + sprintf( buf, "蛋〈%s〉孵化成", CHAR_getChar( petindex, CHAR_NAME)); + newindex = EVOLUTION_createPetFromEnemyIndex( charaindex, petindex, 0); + if( !CHAR_CHECKINDEX( newindex) ){ + CHAR_talkToCli( charaindex, -1, "宠物孵化发生错误。", CHAR_COLORYELLOW); + return -1; + } + sprintf( buf1, "〈%s〉。", CHAR_getChar( newindex, CHAR_NAME)); + strcat( buf, buf1); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + + LogPetFeed( + CHAR_getChar( charaindex, CHAR_NAME), + CHAR_getChar( charaindex, CHAR_CDKEY), + CHAR_getChar( petindex, CHAR_NAME), + petindex, + CHAR_getInt( petindex, CHAR_LV), + buf, // Key + CHAR_getInt( charaindex, CHAR_FLOOR), + CHAR_getInt( charaindex, CHAR_X), + CHAR_getInt( charaindex, CHAR_Y), + CHAR_getChar( petindex, CHAR_UNIQUECODE) ); + + return newindex; +} +#endif + +#ifdef _PET_TRANS +int PETTRANS_getPetBase( int petindex, int *work, int *petrank) +{ + int i, total=-1; + if( !CHAR_CHECKINDEX( petindex) ){ + total = 0; + *petrank = 1; + for( i=0; i<4; i++) { + work[i] = 50; + total += work[i]; + } + }else{ + int LevelUpPoint = CHAR_getInt( petindex, CHAR_ALLOCPOINT ); + *petrank = CHAR_getInt( petindex, CHAR_PETRANK ); + work[0] = (float)(( LevelUpPoint >> 24 ) & 0xFF); + work[1] = (float)(( LevelUpPoint >> 16 ) & 0xFF); + work[2] = (float)(( LevelUpPoint >> 8 ) & 0xFF); + work[3] = (float)(( LevelUpPoint >> 0 ) & 0xFF); + total = ( work[0] + work[1] + work[2] + work[3] ); + if( total > 150 ) total = 150; + if( total < 0 ) total = 0; + } + return total; +} + +#ifdef _PET_2TRANS +int NPC_PetTransManGetAns( int total1, int total2, int LV, int rank, int tran ) +#else +int NPC_PetTransManGetAns( int total1, int total2, int LV, int rank ) +#endif +{ + int ans=0 , TransLV = 100; + float total = 0.00; + int Fx=1; + + if( LV > 130 ) LV = 130; + total = ( (float)total1/100 ); // 玛蕾最高 total1=200 + total = total*total*total*total*total; + if( total < 1 ) total = 0; + else total= total*1.3; // 所以total最大=41.6 最小=0 + + Fx = (int)((5-rank)*1.2)+5; // rank=0~6 所以 Fx最大=11(rank=0)最小=4(rank=6) + ans = (int)total + total2 + ((LV-TransLV)/Fx); //42+150+30/11=194 + +#ifdef _PET_2TRANS + if( tran == 0 ){ + if( ans > 150 ) + ans = 150; + } + else{ + if( ans > 200 ) + ans = 200; + } +#else + if( ans > 150 ) { + ans = 150; + } +#endif + print("\n ans = %d", ans); + return ans; +} + +int PETTRANS_PetTransManStatus( int toindex, int petindex1, int petindex2) +{ + int petrank=0,i; + int total1,total2,total,petLV,ans; + int petID,enemynum,ret=-1; + int work[4]={0,0,0,0}; + int base[4]={0,0,0,0}; + +#define RAND(x,y) ((x-1)+1+ (int)( (double)(y-(x-1))*rand()/(RAND_MAX+1.0)) ) + total1 = PETTRANS_getPetBase( petindex1, work, &petrank); + total2 = PETTRANS_getPetBase( petindex2, base, &petrank); + petLV = CHAR_getInt( petindex2, CHAR_LV); +#ifdef _PET_2TRANS + ans = NPC_PetTransManGetAns( total1, total2, petLV, petrank, CHAR_getInt( petindex2, CHAR_TRANSMIGRATION ) ); +#else + ans = NPC_PetTransManGetAns( total1, total2, petLV, petrank ); +#endif + total = total1 + (total2*4); + total2 = 0; + for( i=0; i<4; i++) { + work[i] = work[i]*4; + total2 += work[i]; + } + total = total1 + total2; + for( i=0; i<4; i++) { + base[i] = (ans * (base[i]+work[i])) /total; + } + enemynum = ENEMY_getEnemyNum(); + petID = CHAR_getInt( petindex2, CHAR_PETID); + for( i=0; i CHAR_getWorkInt( charaindex, CHAR_WORKMAXHP) ){ + Myhp = CHAR_getWorkInt( charaindex, CHAR_WORKMAXHP); + } + CHAR_setInt( charaindex, CHAR_HP, Myhp); + CHAR_complianceParameter( charaindex ); + CHAR_send_P_StatusString( charaindex, CHAR_P_STRING_HP); + for( i=0; i CHAR_getWorkInt( petindex, CHAR_WORKMAXHP) ){ + Myhp = CHAR_getWorkInt( petindex, CHAR_WORKMAXHP); + } + CHAR_setInt( petindex, CHAR_HP, Myhp); + CHAR_send_K_StatusString( charaindex, i, CHAR_K_STRING_HP|CHAR_K_STRING_AI); + } + break; + case 2://MP + Myhp = CHAR_getInt( charaindex, CHAR_MP); + dnums = CHAR_getWorkInt( charaindex, CHAR_WORKCHIKULAMP); + Myhp += dnums; + if( Myhp > CHAR_getWorkInt( charaindex, CHAR_WORKMAXMP) ){ + Myhp = CHAR_getWorkInt( charaindex, CHAR_WORKMAXMP); + } + CHAR_setInt( charaindex, CHAR_MP, Myhp); + CHAR_complianceParameter( charaindex ); + CHAR_send_P_StatusString( charaindex, CHAR_P_STRING_MP); + break; + } +} +#endif + +#ifdef _STATUS_WATERWORD //水世界状态 +void CHAR_CheckWaterStatus( int charaindex) +{ + if( !CHAR_CHECKINDEX( charaindex) ) return; + if( CHAR_getWorkInt( charaindex, CHAR_WORKSTATUSWATER) == -1 ){ + return; + } + if( CHAR_getWorkInt( charaindex, CHAR_WORKSTATUSWATER) > 0 ){ + CHAR_setWorkInt( charaindex, CHAR_WORKSTATUSWATER, + CHAR_getWorkInt( charaindex, CHAR_WORKSTATUSWATER) -1 ); + + if( CHAR_getWorkInt( charaindex, CHAR_WORKSTATUSWATER) != 0 && + CHAR_getWorkInt( charaindex, CHAR_WORKSTATUSWATER)%10 == 0 ){ + char buf1[256]; + sprintf( buf1, "水中呼吸时间剩馀%d分。", + CHAR_getWorkInt( charaindex, CHAR_WORKSTATUSWATER)); + CHAR_talkToCli( charaindex, -1, buf1, CHAR_COLORYELLOW); + } + } + + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE ){ + return; + } + if( CHAR_getWorkInt( charaindex, CHAR_WORKMAPFLOORTYPE) == 1 && + CHAR_getWorkInt( charaindex, CHAR_WORKSTATUSWATER) <= 0 ){//水世界 + char token[256]; + int defhp=0; + int maxhp = CHAR_getWorkInt( charaindex, CHAR_WORKMAXHP); + int myhp = CHAR_getInt( charaindex, CHAR_HP); + defhp = (maxhp*0.033); + if( defhp <= 0 ) defhp = 1; + myhp = myhp - defhp; + sprintf( token, "因无法呼吸,扣%d HP。", defhp); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW); + + if( myhp <= 0 ){ + myhp = 1; + if(CHAR_getInt(charaindex,CHAR_FLOOR) == 151 || CHAR_getInt(charaindex,CHAR_FLOOR) == 160 + || CHAR_getInt(charaindex,CHAR_FLOOR) == 161 ) CHAR_warpToSpecificPoint(charaindex,702,213,27); + else CHAR_warpToSpecificPoint( charaindex, 200,102,1021); + } + CHAR_setInt( charaindex, CHAR_HP, myhp); + CHAR_send_P_StatusString( charaindex, CHAR_P_STRING_HP); + } + +} +#endif + +int CHAR_findSurplusPetBox( int charaindex ) +{ + int i, remnants=0; + for( i=0; i + +#include "common.h" +#include "char.h" +#include "item_event.h" +#include "net.h" +#include "item.h" +#include "object.h" +#include "lssproto_serv.h" +#include "util.h" +#include "char_data.h" +#include "readmap.h" +#include "map_deal.h" +#include "item.h" +#include "saacproto_cli.h" +#include "npccreate.h" +#include "handletime.h" +#include "anim_tbl.h" +#include "family.h" + +#define SPR_kmydam CG_HIT_MARK_00 +BOOL CHAR_allprewalk( int index,int* dir,int* mode) +{ + int poisonvalue; + poisonvalue = CHAR_getInt(index, CHAR_POISON ); + if( poisonvalue >= 1 ){ + CHAR_setInt(index,CHAR_HP , CHAR_getInt(index,CHAR_HP) + - poisonvalue ); + CHAR_setWorkInt(index,CHAR_WORKLASTATTACKCHARAINDEX,-2); + { + int opt[2] = { SPR_kmydam,poisonvalue}; + CHAR_sendWatchEvent( CHAR_getWorkInt(index,CHAR_WORKOBJINDEX), + CHAR_ACTDAMAGE,opt,2,TRUE); + + CHAR_sendStatusString( index,"M"); + } + poisonvalue--; + if( poisonvalue <= 0)poisonvalue = 1; + CHAR_setInt(index,CHAR_POISON,poisonvalue); + } + if( CHAR_getInt(index,CHAR_CONFUSION) != 0 ) + *dir = RAND(0,7); + if( CHAR_getInt(index,CHAR_STONE) != 0 ) + return FALSE; + return TRUE; +} + +void CHAR_allpostwalk( int index ) +{ + return; +} + +BOOL CHAR_makeCADefaultString( int objindex,char* buf,int buflen, int act ) +{ + char objindexbuf[64]; + /* 民尼永弁 */ + if( CHECKOBJECT(objindex) == FALSE ) return FALSE; + if( OBJECT_getType(objindex) != OBJTYPE_CHARA ) return FALSE; + snprintf( buf,buflen,"%s|%d|%d|%d|%d", + cnv10to62( objindex,objindexbuf, sizeof(objindexbuf)), + OBJECT_getX(objindex), OBJECT_getY(objindex), + act, + CHAR_getInt(OBJECT_getIndex(objindex),CHAR_DIR)); + return TRUE; +} + +static void CHAR_makeCADAMAGEStringFromSpecifiedCoordinate( + int x , int y, char* buf,int buflen,int ef1,int damagevalue ) +{ + snprintf( buf,buflen,"%d|%d|%d|%d|%d|%d|%d", + -1,x,y, CHAR_ACTDAMAGE,0, ef1,damagevalue); +} + +BOOL CHAR_makeCAOPT1String( int objindex,char* buf, int buflen, int act,int opt1 ) +{ + char objindexbuf[64]; + if( CHECKOBJECT(objindex) == FALSE ) return FALSE; + if( OBJECT_getType(objindex) != OBJTYPE_CHARA ) return FALSE; + snprintf( buf,buflen,"%s|%d|%d|%d|%d|%d", + cnv10to62( objindex,objindexbuf, sizeof(objindexbuf)), + OBJECT_getX(objindex), OBJECT_getY(objindex), + act, + CHAR_getInt(OBJECT_getIndex(objindex),CHAR_DIR), opt1); + return TRUE; +} + +#ifdef _STREET_VENDOR +BOOL CHAR_makeCAOPTString(int objindex,char* buf,int buflen,int act,char *string) +{ + char objindexbuf[64]; + + if(CHECKOBJECT(objindex) == FALSE ) return FALSE; + if(OBJECT_getType(objindex) != OBJTYPE_CHARA ) return FALSE; + snprintf( buf,buflen,"%s|%d|%d|%d|%d|%s", + cnv10to62(objindex,objindexbuf, sizeof(objindexbuf)), + OBJECT_getX(objindex), OBJECT_getY(objindex),act, + CHAR_getInt(OBJECT_getIndex(objindex),CHAR_DIR),string); + return TRUE; +} +#endif + +BOOL CHAR_makeCAOPT3String( int objindex,char* buf, int buflen, int act,int opt1,int opt2,int opt3 ) +{ + char objindexbuf[64]; + + if( CHECKOBJECT(objindex) == FALSE ) return FALSE; + if( OBJECT_getType(objindex) != OBJTYPE_CHARA ) return FALSE; + snprintf( buf,buflen,"%s|%d|%d|%d|%d|%d|%d|%d", + cnv10to62( objindex,objindexbuf, sizeof(objindexbuf)), + OBJECT_getX(objindex), OBJECT_getY(objindex), + act, + CHAR_getInt(OBJECT_getIndex(objindex),CHAR_DIR), + opt1,opt2,opt3); + return TRUE; +} + +void CHAR_playerWatchfunc( int objmeindex, int objmoveindex, + CHAR_ACTION act, int x, int y, int dir, int* opt, int optlen ) +{ + int fd; + int meindex; + if( !CHECKOBJECTUSE(objmeindex) )return; + if( !CHECKOBJECTUSE(objmoveindex))return; + if( OBJECT_getType(objmeindex) != OBJTYPE_CHARA )return; + + meindex = OBJECT_getIndex(objmeindex); + if( CHAR_getInt( meindex,CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER )return; + + fd = getfdFromCharaIndex( meindex ); + if( fd == -1 )return; + switch( OBJECT_getType(objmoveindex) ){ + case OBJTYPE_CHARA: + { + char buf[128]; + if( !CHAR_getFlg( OBJECT_getIndex(objmoveindex),CHAR_ISVISIBLE) ) + return; + + switch( act ){ + case CHAR_ACTSTAND: + case CHAR_ACTWALK: + case CHAR_ACTATTACK: + case CHAR_ACTDEAD: + case CHAR_ACTMAGIC: + case CHAR_ACTITEM: + case CHAR_ACTDOWN: + case CHAR_ACTSIT: + case CHAR_ACTHAND: + case CHAR_ACTPLEASURE: + case CHAR_ACTANGRY: + case CHAR_ACTSAD: + case CHAR_ACTDAMAGE: + case CHAR_ACTGUARD: + case CHAR_ACTTURN: + case CHAR_ACTWARP: + case CHAR_ACTACTIONWALK: + case CHAR_ACTNOD: + case CHAR_ACTTHROW: + case CHAR_ACTACTIONSTAND: + if( CHAR_makeCADefaultString(objmoveindex,buf,sizeof(buf),act) ) { + CONNECT_appendCAbuf( fd,buf,strlen(buf)); + } + break; + // shan begin + case CHAR_ACTTRADE: + if( optlen == 1 ) + if( CHAR_makeCAOPT1String( objmoveindex, buf, + sizeof( buf), act, opt[0] ) ) + CONNECT_appendCAbuf( fd, buf, strlen(buf)); + break; + +#ifdef _ANGEL_SUMMON + case CHAR_ACTANGEL: + if( optlen == 1 ) + if( CHAR_makeCAOPT1String( objmoveindex, buf, + sizeof( buf), act, opt[0] ) ) + CONNECT_appendCAbuf( fd, buf, strlen(buf)); + break; +#endif + + // shan end +#ifdef _MIND_ICON + case CHAR_MIND: + if( optlen == 1 ) + if( CHAR_makeCAOPT1String( objmoveindex, buf, + sizeof(buf), act, opt[0])) + CONNECT_appendCAbuf( fd, buf, strlen(buf)); + break; +#endif +#ifdef _STREET_VENDOR + case CHAR_STREETVENDOR_OPEN: + if(CHAR_makeCAOPTString(objmoveindex,buf,sizeof(buf), + act,CHAR_getWorkChar(OBJECT_getIndex(objmoveindex),CHAR_STREETVENDOR_NAME))) + CONNECT_appendCAbuf(fd,buf,strlen(buf)); + break; + case CHAR_STREETVENDOR_CLOSE: + if(CHAR_makeCAOPTString(objmoveindex,buf,sizeof(buf), + act,CHAR_getWorkChar(OBJECT_getIndex(objmoveindex),CHAR_STREETVENDOR_NAME))) + CONNECT_appendCAbuf(fd,buf,strlen(buf)); + break; +#endif +#ifdef _ITEM_CRACKER + case CHAR_ITEM_CRACKER: + if( optlen == 1 ) + if( CHAR_makeCAOPT1String( objmoveindex, buf, + sizeof(buf), act, opt[0])) + CONNECT_appendCAbuf( fd, buf, strlen(buf)); + break; +#endif + case CHAR_ACTEFFECT: + if( optlen == 1 ) + if( CHAR_makeCAOPT1String(objmoveindex,buf, + sizeof(buf),act,opt[0] ) ) + CONNECT_appendCAbuf( fd,buf,strlen(buf)); + break; + case CHAR_ACTPOPUPNAME: + case CHAR_ACTLEADER: + case CHAR_ACTBATTLEWATCH: + if( optlen == 1 ) + if( CHAR_makeCAOPT1String(objmoveindex,buf, + sizeof(buf),act,opt[0] ) ) + CONNECT_appendCAbuf( fd,buf,strlen(buf)); + break; + case CHAR_ACTBATTLE: + if( optlen == 3 ) + if( CHAR_makeCAOPT3String( objmoveindex,buf, sizeof(buf), + act,opt[0],opt[1],opt[2] ) ) + CONNECT_appendCAbuf( fd,buf,strlen(buf)); + break; + default: + break; + } + + break; + } + case OBJTYPE_ITEM: + case OBJTYPE_GOLD: + CHAR_sendSpecifiedobjindexCToCharaindex(meindex,objmoveindex); + break; + default: + break; + } + +} + +void CHAR_sendWallDamage( int charaindex,int x, int y, int damage ) +{ + int fd; + char cabuf[256]=""; + + fd = getfdFromCharaIndex(charaindex); + if( fd == -1 )return; + + CHAR_makeCADAMAGEStringFromSpecifiedCoordinate( + x,y,cabuf,sizeof(cabuf),SPR_kmydam,damage ); + CONNECT_appendCAbuf( fd,cabuf,strlen(cabuf)); +} + + + +static struct ParamShow +{ + int paramindex; /* 由仿丢□正及奶件犯永弁旦 */ + char* offmessage; /* 匀凶凛及丢永本□斥 侬 */ +}pShow[]={ + {CHAR_PARALYSIS, CHAR_RECOVERPARALYSISSTRING}, + {CHAR_SLEEP, CHAR_RECOVERSILENCESTRING}, + {CHAR_STONE, CHAR_RECOVERSTONESTRING}, + {CHAR_DRUNK, CHAR_RECOVERDARKNESSSTRING}, + {CHAR_CONFUSION, CHAR_RECOVERCONFUSIONSTRING}, +}; + +void CHAR_recoveryStatus( int charaindex ) +{ + int i; + int cure=FALSE; + if( !CHAR_CHECKINDEX(charaindex) )return; + + for( i=0 ; i < arraysizeof(pShow) ; i ++ ){ + if( CHAR_getInt(charaindex,pShow[i].paramindex) > 0 ){ + int old; + old = CHAR_setInt(charaindex,pShow[i].paramindex, + CHAR_getInt(charaindex, + pShow[i].paramindex) - 1 ); + if( old == 1 ){ + if( CHAR_getInt(charaindex,CHAR_WHICHTYPE) == CHAR_TYPEPLAYER){ + CHAR_talkToCli( charaindex,-1, pShow[i].offmessage, + CHAR_COLORWHITE ); + } + cure = TRUE; + } + } + } + if( cure ){ + CHAR_sendStatusString( charaindex, "P" ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( + charaindex, CHAR_WORKOBJINDEX) ); + } +} + +static BOOL CHAR_clairvoyance_gold(int objindex,char* buf ) +{ + if( OBJECT_getType( objindex ) == OBJTYPE_GOLD ){ + *buf = 'G'; + return TRUE; + } + return FALSE; +} + +static BOOL CHAR_clairvoyance_item(int objindex,char* buf ) +{ + if( OBJECT_getType( objindex ) == OBJTYPE_ITEM){ + *buf = 'I'; + return TRUE; + } + return FALSE; +} + +static BOOL CHAR_clairvoyance_player(int objindex,char* buf ) +{ + if( OBJECT_getType( objindex ) == OBJTYPE_CHARA + && CHAR_getInt(OBJECT_getIndex(objindex),CHAR_WHICHTYPE) + == CHAR_TYPEPLAYER ){ + *buf = 'P'; + return TRUE; + } + return FALSE; +} + +static BOOL CHAR_clairvoyance_enemy(int objindex,char* buf ) +{ + if( OBJECT_getType( objindex ) == OBJTYPE_CHARA + && CHAR_getInt(OBJECT_getIndex(objindex),CHAR_WHICHTYPE) + == CHAR_TYPEENEMY ){ + *buf = 'E'; + return TRUE; + } + return FALSE; +} + +static char CHAR_clairvoyanceString[STRINGBUFSIZ]; + +static void CHAR_clairvoyance( int charaindex ) +{ + char onebuf[128]; + int stringlen=0; + int clairvoyancelevel; + int centerx,centery,fl; + int i,j; + BOOL sendclairvoyance=FALSE; + +#define CHAR_CLAIRVOYANCEWIDTH 81 + BOOL (*clairvoyancefunc[])(int,char*) ={ + CHAR_clairvoyance_gold, + CHAR_clairvoyance_item, + CHAR_clairvoyance_player, + CHAR_clairvoyance_enemy, + }; + if( CHAR_getWorkInt( charaindex, CHAR_WORKLOOPSTARTSEC)%10 != 0 ) + return; + + clairvoyancelevel = CHAR_getInt(charaindex,CHAR_RADARSTRENGTH ); + + if( clairvoyancelevel <= 0 )return; + if( clairvoyancelevel > arraysizeof( clairvoyancefunc ) ) + clairvoyancelevel = arraysizeof( clairvoyancefunc ); + + centerx = CHAR_getInt(charaindex,CHAR_X); + centery = CHAR_getInt(charaindex,CHAR_Y); + fl = CHAR_getInt(charaindex,CHAR_FLOOR); + + + for( i = centerx - CHAR_CLAIRVOYANCEWIDTH/2 ; + i < centerx + CHAR_CLAIRVOYANCEWIDTH/2 ; i ++ ){ + for( j = centery - CHAR_CLAIRVOYANCEWIDTH/2 ; + j < centery + CHAR_CLAIRVOYANCEWIDTH/2 ; j ++ ){ + OBJECT object; + for( object = MAP_getTopObj(fl,i,j) ; object ; + object = NEXT_OBJECT( object ) ){ + int objindex = GET_OBJINDEX(object); + int loop; + + if( OBJECT_getType(objindex) == OBJTYPE_NOUSE )continue; + if( OBJECT_getType(objindex) == OBJTYPE_CHARA + && OBJECT_getIndex(objindex) == charaindex) continue; + for( loop = 0 ; loop < clairvoyancelevel ; loop ++ ){ + BOOL ret; + char id; + ret = clairvoyancefunc[loop](objindex,&id); + if( ret == TRUE ){ + sendclairvoyance=TRUE; + snprintf( onebuf,sizeof(onebuf), + "%d|%d|%c|",i,j,id ); + strcpysafe( CHAR_clairvoyanceString + stringlen, + sizeof(CHAR_clairvoyanceString) + - stringlen, onebuf); + stringlen += strlen(onebuf); + if( stringlen > sizeof(CHAR_clairvoyanceString) ) + goto RETURN; + } + } + } + } + } + +RETURN: + if( stringlen >= 1 ){ + int fd; + fd = getfdFromCharaIndex( charaindex ); + dchop( CHAR_clairvoyanceString, "|" ); + if( fd != -1 ) + lssproto_R_send( fd, CHAR_clairvoyanceString ); + }else if( !sendclairvoyance ){ + int fd; + fd = getfdFromCharaIndex( charaindex ); + if( fd != -1 ) + lssproto_R_send( fd, "" ); + } +} + +void CHAR_loopFunc( int charaindex ) +{ + CHAR_recoveryStatus( charaindex ); + CHAR_clairvoyance( charaindex ); +} + +void CHAR_playerresurrect( int charaindex, int hp ) +{ + CHAR_setInt(charaindex,CHAR_BASEIMAGENUMBER, + CHAR_getInt(charaindex,CHAR_BASEBASEIMAGENUMBER)); + CHAR_setFlg(charaindex,CHAR_ISDIE, 0); + CHAR_setFlg(charaindex,CHAR_ISATTACKED, 1); + CHAR_setFlg(charaindex,CHAR_ISOVERED, 0); + if( hp >= CHAR_getWorkInt(charaindex,CHAR_WORKMAXHP) ) + hp = CHAR_getWorkInt(charaindex,CHAR_WORKMAXHP); + else if( hp <= 0 ) + hp = 1; + CHAR_setInt(charaindex,CHAR_HP, hp); +} + +int CHAR_die( int charaindex ) +{ + CHAR_DischargeParty( charaindex, 0); + { + int bymonster = 0; + int attackindex = CHAR_getWorkInt(charaindex, + CHAR_WORKLASTATTACKCHARAINDEX); + if( attackindex == -2 ) + bymonster = 0; + else if( CHAR_CHECKINDEX(attackindex) == TRUE ){ + if( CHAR_getInt(attackindex,CHAR_WHICHTYPE) + == CHAR_TYPEENEMY ){ + bymonster = 1; + }else{ + bymonster = 2; + } + } + if( bymonster == 0 || bymonster == 1 ){ + int i; + for( i=0 ; i= 1 ){ + int randomindex = RAND(0,itemhavenum-1); + CHAR_DropItem(charaindex,eqindex[randomindex]); + + } + } + + CHAR_DropMoney(charaindex, + CHAR_getInt(charaindex,CHAR_GOLD)/2 ); + CHAR_setInt(charaindex,CHAR_GOLD,0); + } + CHAR_complianceParameter(charaindex); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt(charaindex, CHAR_WORKOBJINDEX) ); + CHAR_setInt(charaindex,CHAR_DEADCOUNT, + CHAR_getInt(charaindex,CHAR_DEADCOUNT)+1); + { + int i; + BOOL old=FALSE; + for( i=0 ; i 0 ){ + old = TRUE; + } + if( CHAR_setInt( charaindex, CHAR_POISON, 0 ) > 0 )old=TRUE; + if( old ) + CHAR_sendCToArroundCharacter( CHAR_getInt(charaindex, CHAR_WORKOBJINDEX)); + } + CHAR_sendStatusString( charaindex, "P"); + CHAR_sendStatusString( charaindex, "I"); + CHAR_setFlg(charaindex,CHAR_ISDIE,1); + CHAR_setFlg(charaindex,CHAR_ISATTACKED,0); + return 0; +} + +void CHAR_playerTalkedfunc( int charaindex, int talkindex,char* message, int color, int channel ) +{ + int fd; + char lastbuf[4096]; + char mesgbuf[4096]; + char escapebuf[4096]; + int fmindex = CHAR_getInt( charaindex, CHAR_FMINDEX ); + fd = getfdFromCharaIndex( charaindex ); + if( fd == -1 )return; + if( (channel>-1) && (fmindex>0) ){ + if( channel == 0 ){ +#ifndef _CHANNEL_MODIFY + snprintf( lastbuf,sizeof(lastbuf),"P|[族]%s", +#else + snprintf( lastbuf,sizeof(lastbuf),"P|F|[族]%s", +#endif + makeEscapeString( CHAR_appendNameAndTitle(talkindex, message, mesgbuf,sizeof(mesgbuf)), + escapebuf,sizeof(escapebuf) )); + } +#ifdef _FMVER21 + else if( channel == FAMILY_MAXCHANNEL && CHAR_getInt( talkindex, CHAR_FMLEADERFLAG ) == FMMEMBER_LEADER ){ +#else + else if( channel == FAMILY_MAXCHANNEL && CHAR_getInt( talkindex, CHAR_FMLEADERFLAG ) == 1 ){ +#endif +#ifndef _CHANNEL_MODIFY + snprintf( lastbuf,sizeof(lastbuf),"P|[族长广播]%s", +#else + snprintf( lastbuf,sizeof(lastbuf),"P|F|[族长广播]%s", +#endif + makeEscapeString(CHAR_appendNameAndTitle(talkindex, message,mesgbuf,sizeof(mesgbuf)), + escapebuf,sizeof(escapebuf) )); + }else{ + snprintf( lastbuf,sizeof(lastbuf),"P|[%d]%s",channel, + makeEscapeString(CHAR_appendNameAndTitle(talkindex, message,mesgbuf,sizeof(mesgbuf)), + escapebuf,sizeof(escapebuf) )); + } + }else{ +#ifdef _CHANNEL_MODIFY + if(CHAR_getFlg(talkindex,CHAR_ISPARTYCHAT) && (CHAR_getWorkInt(talkindex,CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE)) + snprintf( lastbuf,sizeof(lastbuf),"P|T|[队]%s", + makeEscapeString(CHAR_appendNameAndTitle(talkindex, message,mesgbuf,sizeof(mesgbuf)), + escapebuf,sizeof(escapebuf) )); + else +#ifdef _FONT_SIZE + snprintf( lastbuf,sizeof(lastbuf),"P|P|%s|%d", + makeEscapeString(CHAR_appendNameAndTitle(talkindex, message,mesgbuf,sizeof(mesgbuf)), + escapebuf,sizeof(escapebuf) ), CHAR_getWorkInt( talkindex, CHAR_WORKFONTSIZE) ); +#else + snprintf( lastbuf,sizeof(lastbuf),"P|P|%s", + makeEscapeString(CHAR_appendNameAndTitle(talkindex, message,mesgbuf,sizeof(mesgbuf)), + escapebuf,sizeof(escapebuf) )); +#endif + +#else + snprintf( lastbuf,sizeof(lastbuf),"P|%s", + makeEscapeString(CHAR_appendNameAndTitle(talkindex, message,mesgbuf,sizeof(mesgbuf)), + escapebuf,sizeof(escapebuf) )); +#endif + } + lssproto_TK_send( fd, CHAR_getWorkInt( talkindex, CHAR_WORKOBJINDEX ),lastbuf, color); +} diff --git a/gmsv/char/char_item.c b/gmsv/char/char_item.c new file mode 100644 index 0000000..f6636b0 --- /dev/null +++ b/gmsv/char/char_item.c @@ -0,0 +1,2355 @@ +#include "version.h" +#include + +#include "readmap.h" +#include "map_deal.h" +#include "object.h" +#include "char.h" +#include "char_base.h" +#include "item.h" +#include "lssproto_serv.h" +#include "handletime.h" +#include "log.h" +#include "item_event.h" +#include "battle.h" +#include "petmail.h" +#ifdef _MARKET_TRADE +#include "item_trade.h" +#endif +#ifdef _DROPSTAKENEW +#define CASINOTOKENID 20121 // 游乐场彩券代号 +#define MAXCASINOMAPNUM 150 // 游乐场地图上限 +#define MAXACCUMULATION 1000000 // 积分上限 +typedef struct tagCasinoMapTable +{ + int casinofl; // 游乐场图层 + int casinox; // 游乐场X座标 + int casinoy; // 游乐场Y座标 + int casinotype; // 赌注类型 + int dropflag; // 是否可下注 flag + char casinoinfo[64]; // 赌注类型说明 + int accumulation; // 积分 + int stakenum; // 彩券数量 +}CasinoMapTable; +CasinoMapTable casinomap[MAXCASINOMAPNUM] = +{ + { 7008, 13, 13, DICE_BIG, 1, "骰子-大", 1, 0}, + { 7008, 14, 13, DICE_BIG, 1, "骰子-大", 1, 0}, + { 7008, 15, 13, DICE_BIG, 1, "骰子-大", 1, 0}, + { 7008, 16, 13, DICE_BIG, 1, "骰子-大", 1, 0}, + { 7008, 17, 13, DICE_BIG, 1, "骰子-大", 1, 0}, + { 7008, 13, 14, DICE_BIG, 1, "骰子-大", 1, 0}, + { 7008, 14, 14, DICE_BIG, 1, "骰子-大", 1, 0}, + { 7008, 15, 14, DICE_BIG, 1, "骰子-大", 1, 0}, + { 7008, 16, 14, DICE_BIG, 1, "骰子-大", 1, 0}, + { 7008, 17, 14, DICE_BIG, 1, "骰子-大", 1, 0}, + { 7008, 13, 15, DICE_BIG, 1, "骰子-大", 1, 0}, + { 7008, 14, 15, DICE_BIG, 1, "骰子-大", 1, 0}, + { 7008, 15, 15, DICE_BIG, 1, "骰子-大", 1, 0}, + { 7008, 16, 15, DICE_BIG, 1, "骰子-大", 1, 0}, + { 7008, 17, 15, DICE_BIG, 1, "骰子-大", 1, 0}, + { 7008, 8, 13, DICE_SMALL, 1, "骰子-小", 1, 0}, + { 7008, 9, 13, DICE_SMALL, 1, "骰子-小", 1, 0}, + { 7008, 10, 13, DICE_SMALL, 1, "骰子-小", 1, 0}, + { 7008, 11, 13, DICE_SMALL, 1, "骰子-小", 1, 0}, + { 7008, 12, 13, DICE_SMALL, 1, "骰子-小", 1, 0}, + { 7008, 8, 14, DICE_SMALL, 1, "骰子-小", 1, 0}, + { 7008, 9, 14, DICE_SMALL, 1, "骰子-小", 1, 0}, + { 7008, 10, 14, DICE_SMALL, 1, "骰子-小", 1, 0}, + { 7008, 11, 14, DICE_SMALL, 1, "骰子-小", 1, 0}, + { 7008, 12, 14, DICE_SMALL, 1, "骰子-小", 1, 0}, + { 7008, 8, 15, DICE_SMALL, 1, "骰子-小", 1, 0}, + { 7008, 9, 15, DICE_SMALL, 1, "骰子-小", 1, 0}, + { 7008, 10, 15, DICE_SMALL, 1, "骰子-小", 1, 0}, + { 7008, 11, 15, DICE_SMALL, 1, "骰子-小", 1, 0}, + { 7008, 12, 15, DICE_SMALL, 1, "骰子-小", 1, 0}, + + { 7005, 22, 21, PET_RACE1, 1, "竞速场-宠物1", 2, 0}, + { 7005, 23, 21, PET_RACE1, 1, "竞速场-宠物1", 2, 0}, + { 7005, 24, 21, PET_RACE1, 1, "竞速场-宠物1", 2, 0}, + { 7005, 25, 21, PET_RACE1, 1, "竞速场-宠物1", 2, 0}, + { 7005, 26, 21, PET_RACE1, 1, "竞速场-宠物1", 2, 0}, + { 7005, 27, 21, PET_RACE1, 1, "竞速场-宠物1", 2, 0}, + { 7005, 28, 21, PET_RACE1, 1, "竞速场-宠物1", 2, 0}, + { 7005, 22, 24, PET_RACE2, 1, "竞速场-宠物2", 2, 0}, + { 7005, 23, 24, PET_RACE2, 1, "竞速场-宠物2", 2, 0}, + { 7005, 24, 24, PET_RACE2, 1, "竞速场-宠物2", 2, 0}, + { 7005, 25, 24, PET_RACE2, 1, "竞速场-宠物2", 2, 0}, + { 7005, 26, 24, PET_RACE2, 1, "竞速场-宠物2", 2, 0}, + { 7005, 27, 24, PET_RACE2, 1, "竞速场-宠物2", 2, 0}, + { 7005, 28, 24, PET_RACE2, 1, "竞速场-宠物2", 2, 0}, + { 7005, 22, 27, PET_RACE3, 1, "竞速场-宠物3", 2, 0}, + { 7005, 23, 27, PET_RACE3, 1, "竞速场-宠物3", 2, 0}, + { 7005, 24, 27, PET_RACE3, 1, "竞速场-宠物3", 2, 0}, + { 7005, 25, 27, PET_RACE3, 1, "竞速场-宠物3", 2, 0}, + { 7005, 26, 27, PET_RACE3, 1, "竞速场-宠物3", 2, 0}, + { 7005, 27, 27, PET_RACE3, 1, "竞速场-宠物3", 2, 0}, + { 7005, 28, 27, PET_RACE3, 1, "竞速场-宠物3", 2, 0}, + + { 7003, 21, 15, ROULETTE1, 1, "轮盘红1", 1, 0}, { 7003, 17, 15, ROULETTE3, 1, "轮盘红3", 1, 0}, + { 7003, 13, 15, ROULETTE5, 1, "轮盘红5", 1, 0}, { 7003, 21, 21, ROULETTE6, 1, "轮盘红6", 1, 0}, + { 7003, 17, 21, ROULETTE8, 1, "轮盘红8", 1, 0}, { 7003, 15, 21, ROULETTE9, 1, "轮盘红9", 1, 0}, + { 7003, 13, 21, ROULETTE10, 1, "轮盘红10", 1, 0}, { 7003, 13, 18, ROULETTE13, 1, "轮盘红13", 1, 0}, + { 7003, 9, 21, ROULETTE17, 1, "轮盘红17", 1, 0}, { 7003, 21, 18, ROULETTE18, 1, "轮盘红18", 1, 0}, + + { 7003, 19, 15, ROULETTE22, 1, "轮盘绿2", 1, 0}, { 7003, 15, 15, ROULETTE24, 1, "轮盘绿4", 1, 0}, + { 7003, 19, 21, ROULETTE27, 1, "轮盘绿7", 1, 0}, { 7003, 11, 15, ROULETTE31, 1, "轮盘绿11", 1, 0}, + { 7003, 9, 15, ROULETTE32, 1, "轮盘绿12", 1, 0}, { 7003, 11, 18, ROULETTE34, 1, "轮盘绿14", 1, 0}, + { 7003, 9, 18, ROULETTE35, 1, "轮盘绿15", 1, 0}, { 7003, 11, 21, ROULETTE36, 1, "轮盘绿16", 1, 0}, + { 7003, 19, 18, ROULETTE39, 1, "轮盘绿19", 1, 0}, { 7003, 17, 18, ROULETTE40, 1, "轮盘绿20", 1, 0}, + { 7003, 17, 24, ROULETTE41, 1, "轮盘红", 1, 0}, { 7003, 16, 24, ROULETTE41, 1, "轮盘红", 1, 0}, + { 7003, 17, 25, ROULETTE41, 1, "轮盘红", 1, 0}, { 7003, 16, 25, ROULETTE41, 1, "轮盘红", 1, 0}, + { 7003, 14, 24, ROULETTE42, 1, "轮盘绿", 1, 0}, { 7003, 13, 24, ROULETTE42, 1, "轮盘绿", 1, 0}, + { 7003, 14, 25, ROULETTE42, 1, "轮盘绿", 1, 0}, { 7003, 13, 25, ROULETTE42, 1, "轮盘绿", 1, 0}, + + // WON ADD 修正地图上单双的错误 + { 7003, 11, 24, ROULETTE43, 1, "轮盘单", 1, 0}, { 7003, 10, 24, ROULETTE43, 1, "轮盘单", 1, 0}, + { 7003, 11, 25, ROULETTE43, 1, "轮盘单", 1, 0}, { 7003, 10, 25, ROULETTE43, 1, "轮盘单", 1, 0}, + { 7003, 20, 24, ROULETTE44, 1, "轮盘双", 1, 0}, { 7003, 19, 24, ROULETTE44, 1, "轮盘双", 1, 0}, + { 7003, 20, 25, ROULETTE44, 1, "轮盘双", 1, 0}, { 7003, 19, 25, ROULETTE44, 1, "轮盘双", 1, 0}, + + + + { 7003, 20, 15, (ROULETTE1<<16)+ROULETTE22, 1, "双号红1绿2", 1, 0}, + { 7003, 18, 15, (ROULETTE3<<16)+ROULETTE22, 1, "双号红3绿2", 1, 0}, + { 7003, 16, 15, (ROULETTE3<<16)+ROULETTE24, 1, "双号红3绿4", 1, 0}, + { 7003, 14, 15, (ROULETTE5<<16)+ROULETTE24, 1, "双号红5绿4", 1, 0}, + { 7003, 12, 15, (ROULETTE5<<16)+ROULETTE31, 1, "双号红5绿11", 1, 0}, + { 7003, 10, 15, (ROULETTE32<<16)+ROULETTE31, 1, "双号绿12绿11", 1, 0}, + + { 7003, 20, 18, (ROULETTE18<<16)+ROULETTE39, 1, "双号红18绿19", 1, 0}, + { 7003, 18, 18, (ROULETTE40<<16)+ROULETTE39, 1, "双号绿20绿19", 1, 0}, + { 7003, 16, 18, (ROULETTE40<<16)+ROULETTE45, 1, "双号绿20黑00", 1, 0}, + { 7003, 14, 18, (ROULETTE13<<16)+ROULETTE45, 1, "双号红13黑00", 1, 0}, + { 7003, 12, 18, (ROULETTE13<<16)+ROULETTE34, 1, "双号红13绿14", 1, 0}, + { 7003, 10, 18, (ROULETTE35<<16)+ROULETTE34, 1, "双号绿15绿14", 1, 0}, + + { 7003, 20, 21, (ROULETTE6<<16) +ROULETTE27, 1, "双号红6绿7", 1, 0}, + { 7003, 18, 21, (ROULETTE8<<16) +ROULETTE27, 1, "双号红8绿7", 1, 0}, + { 7003, 16, 21, (ROULETTE8<<16) + ROULETTE9, 1, "双号红8红9", 1, 0}, + { 7003, 14, 21, (ROULETTE10<<16)+ ROULETTE9, 1, "双号红10红9", 1, 0}, + { 7003, 12, 21, (ROULETTE10<<16)+ROULETTE36, 1, "双号红10绿16", 1, 0}, + { 7003, 10, 21, (ROULETTE17<<16)+ROULETTE36, 1, "双号红17绿16", 1, 0}, + { 7003, 8, 15, ROULETTE51, 1, "横列1", 1, 0}, //横列 + { 7003, 8, 18, ROULETTE52, 1, "横列2", 1, 0}, + { 7003, 8, 21, ROULETTE53, 1, "横列3", 1, 0}, + { 7003, 6, 15, ROULETTE61, 1, "号码1-10", 1, 0}, //1到10 + { 7003, 5, 15, ROULETTE61, 1, "号码1-10", 1, 0}, + { 7003, 6, 16, ROULETTE61, 1, "号码1-10", 1, 0}, + { 7003, 5, 16, ROULETTE61, 1, "号码1-10", 1, 0}, + { 7003, 24, 15, ROULETTE62, 1, "号码11-20", 1, 0}, //10到11 + { 7003, 23, 15, ROULETTE62, 1, "号码11-20", 1, 0}, + { 7003, 24, 16, ROULETTE62, 1, "号码11-20", 1, 0}, + { 7003, 23, 16, ROULETTE62, 1, "号码11-20", 1, 0}, + { 7003, 15, 18, ROULETTE45, 1, "轮盘(00)", 1, 0}, + +}; +#endif + + +static char CHAR_sendItemBuffer[STRINGBUFSIZ]; +BOOL CHAR_sendItemDataOne( int charaindex, int haveitemindex) +{ + int itemgrp[1]; + itemgrp[0] = haveitemindex; + return CHAR_sendItemData( charaindex, itemgrp, 1); +} + +BOOL CHAR_sendItemData( int charaindex, int *itemgroup, int num) +{ + int i; + int strlength = 0; + int fd; + + if( num <= 0 || num > CHAR_MAXITEMHAVE) return FALSE; + + if( CHAR_getInt(charaindex,CHAR_WHICHTYPE) != CHAR_TYPEPLAYER ) { + return FALSE; + } + for( i = 0; i < num; i ++ ) { + char token[512]; + int itemindex; +DebugPoint = 200; + if( !CHAR_CHECKITEMINDEX( charaindex, itemgroup[i])) { + continue; + } + itemindex = CHAR_getItemIndex( charaindex, itemgroup[i] ); + if( itemindex >= 0 ) { + snprintf( token ,sizeof(token),"%s|" , + ITEM_makeItemStatusString( itemgroup[i],itemindex ) ); + }else { + snprintf( token ,sizeof(token),"%s|" , + ITEM_makeItemFalseStringWithNum( itemgroup[i]) ); + } + strcpysafe( CHAR_sendItemBuffer + strlength, + sizeof(CHAR_sendItemBuffer) - strlength, token ); + strlength += strlen( token ); + if( strlength >= arraysizeof(CHAR_sendItemBuffer) ) { + break; + } + } + dchop( CHAR_sendItemBuffer , "|" ); + fd = getfdFromCharaIndex( charaindex ); + if( fd != -1 ){ + lssproto_I_send( fd, CHAR_sendItemBuffer ); + return TRUE; + } + return FALSE; +} + +static void CHAR_sendItemDetachEvent( int charaindex,int itemid ) +{ + char mesg[256]; + + snprintf( mesg, sizeof( mesg), "卸下%s ", ITEM_getAppropriateName(itemid) ); + CHAR_talkToCli(charaindex,-1,mesg,CHAR_COLORWHITE); +#ifdef _ITEM_METAMO + if( ITEM_getEquipPlace( charaindex, itemid) == CHAR_BODY + && CHAR_getWorkInt( charaindex, CHAR_WORKITEMMETAMO) != 0 ) { + CHAR_setWorkInt( charaindex, CHAR_WORKITEMMETAMO, 0); + CHAR_setWorkInt( charaindex, CHAR_WORKNPCMETAMO, 0 ); //与npc对话後的变身也要变回来 + CHAR_complianceParameter( charaindex); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( charaindex , CHAR_WORKOBJINDEX )); + CHAR_send_P_StatusString( charaindex , CHAR_P_STRING_BASEBASEIMAGENUMBER); + CHAR_talkToCli( charaindex, -1, "变身失效了!", CHAR_COLORWHITE); + } +#endif + { + typedef void (*DETACHFUNC)(int,int); + DETACHFUNC def; + def=(DETACHFUNC)ITEM_getFunctionPointer(itemid,ITEM_DETACHFUNC); + if( def ) { + def( charaindex,itemid ); + } + } +} + +static void CHAR_sendItemAttachEvent( int charaindex,int itemid ) +{ + char mesg[256]; + snprintf( mesg, sizeof( mesg), "装备%s ", + ITEM_getAppropriateName(itemid) ); + CHAR_talkToCli(charaindex,-1,mesg,CHAR_COLORWHITE); + { + typedef void (*ATTACHFUNC)(int,int); + ATTACHFUNC atf; + atf=(ATTACHFUNC)ITEM_getFunctionPointer(itemid,ITEM_ATTACHFUNC); + if( atf ) + atf( charaindex,itemid ); + } +} + + +int CHAR_findSurplusItemBox( int charaindex ) +{ + int i, remnants=0, itemindex; + for(i=CHAR_STARTITEMARRAY; i< CHAR_MAXITEMHAVE; i++){ + itemindex = CHAR_getItemIndex( charaindex , i ); + if( itemindex == -1 ) remnants++; + } + return remnants; +} + + +static int CHAR_findEmptyItemBoxFromChar( Char* ch ) +{ + int i; + + for( i = CHAR_STARTITEMARRAY ; i < CHAR_MAXITEMHAVE ; i ++ ){ + int itemindex; + itemindex = ch->indexOfExistItems[i]; + if( itemindex == -1 )return i; + } + + return -1; +} + +static int CHAR_findEmptyPoolItemBoxFromChar( Char* ch ) +{ + int i; + for( i=0; iindexOfExistPoolItems[i]; + if( itemindex == -1 ) return i; + } + return -1; +} + +int CHAR_findEmptyPoolItemBox( int index ) +{ + Char* ch; + if( !CHAR_CHECKINDEX( index ) )return -1; + ch = CHAR_getCharPointer(index); + if( ch != NULL ) + return CHAR_findEmptyPoolItemBoxFromChar( ch ); + else + return -1; +} + +int CHAR_findEmptyItemBox( int index ) +{ + Char* ch; + + if( !CHAR_CHECKINDEX( index ) )return -1; + ch = CHAR_getCharPointer(index); + if( ch != NULL ) + return CHAR_findEmptyItemBoxFromChar( ch ); + else + return -1; + +} + +#define LACKOFCLASS {CHAR_talkToCli(index,-1,"能力不足无法装备。",CHAR_COLORWHITE);} +#define CANNOTEQUIP {CHAR_talkToCli(index,-1,"无法装备该项物品。",CHAR_COLORWHITE);} +#define CANNOTEQUIP2 {CHAR_talkToCli(index,-1,"无法同时装备两项同种类的物品。",CHAR_COLORWHITE);} +#define CANNOTEXCHANGE {CHAR_talkToCli(index,-1,"无法交换此两项物品。",CHAR_COLORWHITE);} +#define CANNOTMOVE {CHAR_talkToCli(index,-1,"无法移动该项物品。",CHAR_COLORWHITE);} + +static BOOL CHAR_sendSIToCli( int charindex , int from , int to ) +{ + int fd = getfdFromCharaIndex( charindex ); + if( fd != -1 ){ + lssproto_SI_send( fd , from, to ); + return TRUE; + } + return FALSE; +} + +static BOOL CHAR_moveItemFromItemBoxToEquip( int index, int fromindex, + int toindex ) +{ + int fromid,toid; + int fromeqplace; + BOOL flg = FALSE; + + if( !CHAR_CHECKINDEX( index ) )return FALSE; + + fromid = CHAR_getItemIndex(index,fromindex); + toid = CHAR_getItemIndex(index,toindex); + if( !ITEM_CHECKINDEX( fromid) ) + return FALSE; + + if( CHAR_getInt( index, CHAR_TRANSMIGRATION ) <= 0 ){ + if( ITEM_getInt(fromid,ITEM_LEVEL) > CHAR_getInt(index,CHAR_LV) ){ + LACKOFCLASS; + return FALSE; + } + } +#ifdef _ITEMSET4_TXT + if( CHAR_getInt( index, CHAR_STR) < ITEM_getInt( fromid, ITEM_NEEDSTR) ) return FALSE; + if( CHAR_getInt( index, CHAR_DEX) < ITEM_getInt( fromid, ITEM_NEEDDEX) ) return FALSE; + if( CHAR_getInt( index, CHAR_TRANSMIGRATION) < ITEM_getInt( fromid, ITEM_NEEDTRANS) ) return FALSE; +#ifdef _CHAR_PROFESSION // WON ADD 人物职业 + if( ITEM_getInt( fromid, ITEM_NEEDPROFESSION) != 0 ){ + if( CHAR_getInt( index, PROFESSION_CLASS ) != ITEM_getInt( fromid, ITEM_NEEDPROFESSION) ) + return FALSE; + } +#endif +#endif + +#ifdef _FIXBUG_ATTACKBOW + { + if( CHAR_getWorkInt( index, CHAR_WORKITEMMETAMO) > 0 || + CHAR_getWorkInt( index, CHAR_WORKNPCMETAMO) > 0 + || CHAR_getWorkInt( index, CHAR_WORKFOXROUND ) != -1){ //若是变成小狐狸 + + int armtype = ITEM_getInt( fromid, ITEM_TYPE ); + + if( armtype == ITEM_BOW || armtype == ITEM_BOUNDTHROW || + armtype == ITEM_BREAKTHROW || armtype == ITEM_BOOMERANG) { + CHAR_talkToCli( index, -1, "变身无法使用远距离武器!", CHAR_COLORYELLOW ); + return FALSE; + } + } + } +#endif + +#ifdef _ANGEL_SUMMON + //if( !strcmp( ITEM_getChar( fromid, ITEM_USEFUNC), "ITEM_AngelToken") ) { + if( ITEM_getInt( fromid, ITEM_ID) == ANGELITEM ) { + int mindex; + char nameinfo[64]; + + mindex = checkIfAngel( index); + getMissionNameInfo( index, nameinfo); + if( mindex < 0 || + strcmp( ITEM_getChar( fromid, ITEM_ANGELINFO), missiontable[mindex].angelinfo) || + strcmp( ITEM_getChar( fromid, ITEM_HEROINFO), missiontable[mindex].heroinfo) || + strcmp( ITEM_getChar( fromid, ITEM_ANGELINFO), nameinfo) ) { + + CHAR_talkToCli( index, -1, "这并不是属於你的信物,无法装备。", CHAR_COLORYELLOW ); + return FALSE; + } + } +#endif + + fromeqplace = ITEM_getEquipPlace( index, fromid ); + if( fromeqplace == -1 ){ + CANNOTEQUIP; + return FALSE; + } + //if( BATTLE_GetWepon( charaindex ) != ITEM_BOW ) + + if( fromeqplace == CHAR_DECORATION1 ) { + int checkplace = ( toindex == CHAR_DECORATION1) + ? CHAR_DECORATION2:CHAR_DECORATION1; + int otheritemindex; + + if( toindex == CHAR_DECORATION1 || toindex == CHAR_DECORATION2 ) { + otheritemindex = CHAR_getItemIndex( index, checkplace); + if( ITEM_CHECKINDEX( otheritemindex )) { + int otheritemtype = ITEM_getInt( otheritemindex, ITEM_TYPE); + int myitemtype = ITEM_getInt( CHAR_getItemIndex( index, fromindex) , ITEM_TYPE); + if( otheritemtype == myitemtype) { + if( toid < 0 ) { + CANNOTEQUIP2; + }else { + CANNOTEXCHANGE; + } + return FALSE; + } + } + flg = TRUE; + } + }else { + if( toindex == fromeqplace) flg = TRUE; + } + if( flg ){ + CHAR_setItemIndex(index,toindex,fromid); + CHAR_setItemIndex(index,fromindex,toid); + if( toid != -1 ) { + CHAR_sendItemDetachEvent( index, toid ); + } +#ifdef _CHECK_ITEM_MODIFY + ITEM_checkItemModify( index, fromid); +#endif + CHAR_sendItemAttachEvent( index, fromid ); + CHAR_sendSIToCli( index, fromindex,toindex ); + }else { + CANNOTEQUIP; + return FALSE; + } + +#if 0 //#ifdef _ANGEL_SUMMON + //if( !strcmp( ITEM_getChar( fromid, ITEM_USEFUNC), "ITEM_AngelToken") ) { + if( ITEM_getInt( fromid, ITEM_ID) == ANGELITEM ) { + print(" 装备使者信物 "); + CHAR_talkToCli( index, -1, "你受到了精灵保护,不会被敌人攻击。", CHAR_COLORYELLOW ); + //CHAR_setWorkInt( index, CHAR_WORKANGELMODE, TRUE); + CHAR_sendAngelMark( CHAR_getWorkInt( index, CHAR_WORKOBJINDEX), 1); + } +#endif + + return TRUE; +} + +static BOOL CHAR_moveItemFromEquipToItemBox(int index, int fromindex, + int toindex) +{ + int fromid,toid; + + if( !CHAR_CHECKINDEX( index )) return FALSE; + + fromid = CHAR_getItemIndex(index,fromindex); + toid = CHAR_getItemIndex(index,toindex); + if( fromid < 0 ) + return FALSE; + else if( toid < 0 ){ + CHAR_setItemIndex(index,toindex,fromid); + CHAR_setItemIndex(index,fromindex,-1); + CHAR_sendItemDetachEvent( index,fromid ); + CHAR_sendSIToCli( index,fromindex,toindex); +#if 0 //#ifdef _ANGEL_SUMMON + //if( !strcmp( ITEM_getChar( fromid, ITEM_USEFUNC), "ITEM_AngelToken") ) { + if( ITEM_getInt( fromid, ITEM_ID) == ANGELITEM ) { + print(" 卸下使者信物 "); + CHAR_setWorkInt( index, CHAR_WORKANGELMODE, FALSE); + CHAR_sendAngelMark( CHAR_getWorkInt( index, CHAR_WORKOBJINDEX), 0); + } +#endif + return TRUE; + } + + return CHAR_moveItemFromItemBoxToEquip(index, toindex,fromindex); +} + +#ifdef _ITEM_PILENUMS +int CHAR_getMyMaxPilenum( int charaindex) +{ + int maxpile; + maxpile = CHAR_getInt( charaindex, CHAR_TRANSMIGRATION) + + (CHAR_getInt( charaindex, CHAR_TRANSMIGRATION)/5) * 2 + 3; + +/* +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + maxpile += CHAR_getInt( charaindex, ATTACHPILE ); +#endif +*/ + +#ifdef _EQUIT_ADDPILE + maxpile += CHAR_getWorkInt( charaindex, CHAR_WORKATTACHPILE); + maxpile = (maxpile<0)?0:maxpile; +#endif + return maxpile; +} + +BOOL CHAR_PileItemFromItemBoxToItemBox( int charaindex, int fromindex, int toindex) +{ + int maxpile, fromid, toid; + if( !CHAR_CHECKINDEX( charaindex) ) return FALSE; + fromid = CHAR_getItemIndex( charaindex, fromindex); + toid = CHAR_getItemIndex( charaindex, toindex); + + maxpile = CHAR_getMyMaxPilenum( charaindex); + + if( ITEM_CHECKINDEX( toid) && ITEM_CHECKINDEX( fromid) && + (ITEM_getInt( toid, ITEM_ID) == ITEM_getInt( fromid, ITEM_ID)) && + (ITEM_getInt( toid, ITEM_CANBEPILE) == 1) && + (ITEM_getInt( toid, ITEM_USEPILENUMS) < maxpile) && + (ITEM_getInt( fromid, ITEM_USEPILENUMS) < maxpile) ){ + int formpilenum , pilenum, defpilenum; + + pilenum = ITEM_getInt( toid, ITEM_USEPILENUMS); + formpilenum = ITEM_getInt( fromid, ITEM_USEPILENUMS); + defpilenum = ((maxpile-pilenum)>formpilenum)? formpilenum:(maxpile-pilenum); + formpilenum = formpilenum - defpilenum; + pilenum = pilenum + defpilenum; + ITEM_setInt( toid, ITEM_USEPILENUMS, pilenum); + ITEM_setInt( fromid, ITEM_USEPILENUMS, formpilenum); + + if( formpilenum <= 0 ){ + CHAR_setItemIndex( charaindex, fromindex ,-1); + ITEM_endExistItemsOne( fromid); + } + return TRUE; + } + return FALSE; +} +#endif + +static BOOL CHAR_moveItemFromItemBoxToItemBox( int index, int fromindex, int toindex) +{ + int fromid, toid; + + if( !CHAR_CHECKINDEX( index ) ) return FALSE; +#ifdef _ITEM_PILENUMS + if( CHAR_PileItemFromItemBoxToItemBox( index, fromindex, toindex) == TRUE ){ + CHAR_sendItemDataOne( index, toindex); + CHAR_sendItemDataOne( index, fromindex); + return TRUE; + } +#endif + fromid = CHAR_getItemIndex( index, fromindex); + toid = CHAR_getItemIndex( index, toindex); + + CHAR_setItemIndex(index,toindex, CHAR_setItemIndex( index, fromindex, toid)); + CHAR_sendSIToCli( index,fromindex,toindex); + + return TRUE; +} + +void CHAR_moveEquipItem( int index, int fromindex, int toindex ) +{ +#define MOVEITEM_NONE 0 +#define MOVEITEM_EQUIPTOITEM 1 << 0 +#define MOVEITEM_ITEMTOEQUIP 1 << 1 +#define MOVEITEM_ITEMTOITEM 1 << 2 + + int fromid; /* item 匹及奶件犯永弁旦 */ + + + unsigned int moved_any = 0; + while( 1) { + if( !CHAR_CHECKINDEX( index ) )break; + if( CHAR_getFlg( index,CHAR_ISDIE ) )break; + if( fromindex < 0 || fromindex >= CHAR_MAXITEMHAVE || + toindex < 0 || toindex >= CHAR_MAXITEMHAVE ) + break; + + fromid = CHAR_getItemIndex(index,fromindex); + if( fromid == -1 || fromid == -2 )break; + if( fromindex == toindex )break; + if( fromindex < CHAR_EQUIPPLACENUM ){ + if( toindex < CHAR_EQUIPPLACENUM ){ + if( CHAR_getItemIndex(index,toindex) < 0 ){ + CANNOTMOVE; + }else{ + CANNOTEXCHANGE; + } + + }else { + moved_any |= CHAR_moveItemFromEquipToItemBox( + index, fromindex, toindex ) + ? MOVEITEM_EQUIPTOITEM : MOVEITEM_NONE; + if( moved_any & MOVEITEM_EQUIPTOITEM) { + char category[3]; + snprintf( category,sizeof( category),"J%d", fromindex); + CHAR_sendStatusString( index , category); + } + } + }else{ + if( toindex < CHAR_EQUIPPLACENUM ) { + moved_any |= CHAR_moveItemFromItemBoxToEquip( + index, fromindex , toindex ) + ? MOVEITEM_ITEMTOEQUIP : MOVEITEM_NONE; + if( moved_any & MOVEITEM_ITEMTOEQUIP) { + char category[3]; + snprintf( category,sizeof( category),"J%d", toindex); + CHAR_sendStatusString( index , category); + } + }else { + moved_any |= CHAR_moveItemFromItemBoxToItemBox( index,fromindex,toindex ) + ? MOVEITEM_ITEMTOITEM : MOVEITEM_NONE; + } + } + CHAR_complianceParameter( index ); + CHAR_sendCToArroundCharacter(CHAR_getWorkInt(index, CHAR_WORKOBJINDEX)); + break; + } + + if( (moved_any & MOVEITEM_EQUIPTOITEM) || (moved_any & MOVEITEM_ITEMTOEQUIP)){ + int i; + CHAR_send_P_StatusString( index, + CHAR_P_STRING_HP|CHAR_P_STRING_MAXHP| + CHAR_P_STRING_MP|CHAR_P_STRING_MAXMP| + CHAR_P_STRING_ATK|CHAR_P_STRING_DEF| + CHAR_P_STRING_QUICK|CHAR_P_STRING_CHARM| + CHAR_P_STRING_LUCK|CHAR_P_STRING_EARTH| + CHAR_P_STRING_WATER|CHAR_P_STRING_FIRE| + CHAR_P_STRING_WIND + ); + if( CHAR_getWorkInt( index,CHAR_WORKBATTLEMODE ) == BATTLE_CHARMODE_NONE ){ + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ) { + int petindex = CHAR_getCharPet( index, i); + if( CHAR_CHECKINDEX( petindex) ) { + char category[3]; + CHAR_complianceParameter( petindex ); + snprintf( category, sizeof( category), "K%d",i); + CHAR_sendStatusString( index, category ); + } + } + } + + } + if( !moved_any ) { + CHAR_sendSIToCli( index,-1,-1); + } +} + +int CHAR_addItemToChar( Char* ch, int itemid ) +{ + int itembox; + itembox = CHAR_findEmptyItemBoxFromChar( ch ); + if( itembox == -1 )return -1; + + return ch->indexOfExistItems[itembox]=ITEM_makeItemAndRegist(itemid); +} + +int CHAR_addItem( int charaindex, int itemid ) +{ + Char* ch; + ch = CHAR_getCharPointer(charaindex); + if( ch != NULL ){ + int ret = CHAR_addItemToChar( ch,itemid ); + if( ret == -1 )return ret; + ITEM_setWorkInt(ret,ITEM_WORKCHARAINDEX,charaindex); + ITEM_setWorkInt(ret,ITEM_WORKOBJINDEX,-1); + return ret; + }else + return -1; +} + + +void CHAR_ItemUse( int charaindex, int to_charaindex, int haveitemindex ) +{ + void (*usefunc)(int,int,int)=NULL; + int itemindex; + if( !CHAR_CHECKINDEX( charaindex ) ){ + print( "ANDY charaindex=%d err\n", charaindex); + return; + } + if( CHAR_CHECKITEMINDEX( charaindex, haveitemindex) == FALSE ){ + print( "ANDY haveitemindex=%d err\n", haveitemindex); + return; + } + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if( CHAR_getFlg( charaindex, CHAR_ISDIE ) ){ + print( "ANDY charaindex=%d is CHAR_ISDIE err\n", charaindex); + return; + } +#ifdef _STREET_VENDOR + // 摆摊中不可使用道具 + if(CHAR_getWorkInt(charaindex,CHAR_WORKSTREETVENDOR) > -1){ + print("StreetVendor use item charaindex=%d,name=%s\n",charaindex,CHAR_getChar(charaindex,CHAR_NAME)); + return; + } +#endif + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE ) { + if( CHAR_getInt( to_charaindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER) { + int action = ITEM_getInt( itemindex, ITEM_USEACTION); + if( action != -1 ) { + CHAR_sendAction( to_charaindex, action, TRUE); + } + } + } + //不等於料理 和 其他 + if( ITEM_getInt( itemindex,ITEM_TYPE) != ITEM_OTHER && + ITEM_getInt( itemindex,ITEM_TYPE) != ITEM_DISH ) { + CHAR_EquipPlace ep; + + ep = ITEM_getEquipPlace( charaindex, itemindex ); + if( ep == -1 )return; + if( ep == CHAR_DECORATION1 ) { + int flg = FALSE; + int toitemindex1 = CHAR_getItemIndex( charaindex, ep); + int toitemindex2 = CHAR_getItemIndex( charaindex, CHAR_DECORATION2); + int searchindex = -1; + int fromitemtype = ITEM_getInt( itemindex, ITEM_TYPE); + + if( !ITEM_CHECKINDEX( toitemindex1)) searchindex = toitemindex2; + else if(!ITEM_CHECKINDEX( toitemindex2)) searchindex = toitemindex1; + if( searchindex != -1 ) { + if( fromitemtype != ITEM_getInt( searchindex, ITEM_TYPE)) { + flg = TRUE; + ep = ( searchindex == toitemindex1) + ? CHAR_DECORATION2:CHAR_DECORATION1; + } + } + if( !flg) { + if( fromitemtype != ITEM_getInt( toitemindex2, ITEM_TYPE)) { + ep = CHAR_DECORATION1; + }else if( fromitemtype != ITEM_getInt( toitemindex1, ITEM_TYPE)) { + ep = CHAR_DECORATION2; + }else { + ep = CHAR_DECORATION1; + } + } + } + CHAR_moveEquipItem( charaindex, haveitemindex,ep ); + return; + } + + usefunc = (void(*)(int,int,int)) + ITEM_getFunctionPointer( itemindex,ITEM_USEFUNC ); + if( usefunc ){ + { + LogItem( + CHAR_getChar( charaindex, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( charaindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), /* 失奶 丞 寞 */ +#endif + "Use(使用道具)", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + } + usefunc(charaindex, to_charaindex, haveitemindex); + }else{ + char ansmsg[256]; + strcpysafe( ansmsg, sizeof(ansmsg), + "什麽也没有发生。"); + CHAR_talkToCli( charaindex, -1, ansmsg, CHAR_COLORWHITE ); + } +} + +BOOL CHAR_DropItemFXY( int charaindex, int itemcharaindex, int fl, + int x, int y, int* objindex ) +{ + int itemindex; + itemindex = CHAR_getItemIndex(charaindex,itemcharaindex); + if( ITEM_CHECKINDEX(itemindex) == FALSE )return -3; + if( MAP_walkAbleFromPoint( fl,x,y, FALSE ) == FALSE ){ + return -2; + } + + { + OBJECT object; + for( object=MAP_getTopObj(fl,x,y) ; object; object = NEXT_OBJECT(object ) ){ + int objindex = GET_OBJINDEX(object); + switch( OBJECT_getType(objindex) ){ + case OBJTYPE_NOUSE: + break; + case OBJTYPE_ITEM: +#ifdef _DROPSTAKENEW + if(ITEM_getInt(itemindex, ITEM_ID) == CASINOTOKENID) + { + int i = 0; + int dropflag = 0; + ITEM_Item *itm; + for(i = 0; i < arraysizeof(casinomap); i++){ + if(CHAR_getInt(charaindex, CHAR_FLOOR) == casinomap[i].casinofl){ + if(x == casinomap[i].casinox && y == casinomap[i].casinoy){ + dropflag = 1; + break; + } + } + } + if(dropflag == 1){ + if( (itm = ITEM_getItemPointer( itemindex)) == NULL ) return -1; + strcpysafe( itm->string[ITEM_WATCHFUNC].string, + sizeof(itm->string[ITEM_WATCHFUNC].string), "ITEM_DeleteTimeWatched" ); + + break; + }else{ + + return -1; + } + } +#endif + case OBJTYPE_GOLD: + { + + return -1; + } + case OBJTYPE_CHARA: + { + typedef BOOL (*ITEMPUTFUNC)(int,int); + ITEMPUTFUNC ipfunc; + ipfunc = (ITEMPUTFUNC)CHAR_getFunctionPointer( + OBJECT_getIndex(objindex),CHAR_ITEMPUTFUNC) ; + + if( ipfunc && ipfunc(OBJECT_getIndex(objindex), + itemindex) == TRUE) + return -3; + break; + } + default: + break; + } + } + + *objindex = CHAR_DropItemAbsolute( itemindex,fl,x,y, FALSE ); + + if( *objindex == -1 ) + return -3; + { + LogItem( + CHAR_getChar( charaindex, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( charaindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), /* 失奶 丞 寞 */ +#endif + "Drop(丢出道具)", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + + ); + } + return 0; + } +} + + +#ifdef _ITEM_PILENUMS //andy_edit 2003/04/01 + +void CHAR_SendDropItem_Stats( int charaindex, int itemindex, int itemcharaindex, int flg) +{ + if( flg == 1 ){ + CHAR_setItemIndex( charaindex, itemcharaindex , -1); + } + CHAR_sendItemDataOne( charaindex, itemcharaindex); + + if( CHAR_complianceParameter( charaindex ) ){ + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX)); + } + + if( 0 <= itemcharaindex && itemcharaindex < CHAR_STARTITEMARRAY && + CHAR_getInt( charaindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER ){ //如果丢弃物为装备 + if( ITEM_CHECKINDEX( itemindex) ) + CHAR_sendItemDetachEvent( charaindex, itemindex ); + + CHAR_send_P_StatusString( charaindex, + CHAR_P_STRING_HP|CHAR_P_STRING_MAXHP| + CHAR_P_STRING_MP|CHAR_P_STRING_MAXMP| + CHAR_P_STRING_ATK|CHAR_P_STRING_DEF| + CHAR_P_STRING_QUICK|CHAR_P_STRING_CHARM| + CHAR_P_STRING_LUCK|CHAR_P_STRING_EARTH| + CHAR_P_STRING_WATER|CHAR_P_STRING_FIRE| + CHAR_P_STRING_WIND ); + +#if 0 //#ifdef _ANGEL_SUMMON + if( ITEM_getInt( itemindex, ITEM_ID) == ANGELITEM ) { + print(" 卸下使者信物 "); + CHAR_setWorkInt( index, CHAR_WORKANGELMODE, FALSE); + CHAR_sendAngelMark( CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX), 0); + } +#endif + + } +} +#ifdef _DROPSTAKENEW +void CHAR_DropStakeByDropItem( int charaindex, int itemcharaindex, int itemindex, int fl, int x, int y) +{ + int j, k, casinoflag = 0, dropflag; + char tmpbuf[256]; + dropflag = CHAR_getWorkInt( charaindex, CHAR_WORKSTAKEFLAG); + if( dropflag >= MAXSTAKENUM){ + snprintf( tmpbuf, sizeof( tmpbuf), "你已经下注五次了,无法再下注!"); + CHAR_talkToCli(charaindex, -1, tmpbuf, CHAR_COLORYELLOW); + return; + } + for (j = 0; j < arraysizeof( casinomap); j++){ + if( CHAR_getInt( charaindex, CHAR_FLOOR) != casinomap[j].casinofl ) continue; + if( x != casinomap[j].casinox || y != casinomap[j].casinoy ) continue; + if( casinomap[j].dropflag == 0 ){ + CHAR_talkToCli( charaindex, -1, "现在无法下注!", CHAR_COLORYELLOW); + return; + }else{ + int objindex; + objindex = CHAR_DropItemAbsolute( itemindex, fl, x, y, FALSE ); + if( objindex == -1 ) return; + ITEM_setInt( itemindex, ITEM_PUTTIME, NowTime.tv_sec+30*60); + CHAR_sendWatchEvent( objindex, CHAR_ACTSTAND, NULL, 0, TRUE); + casinoflag = 1; + snprintf(tmpbuf, sizeof(tmpbuf), "你在 %s 下注了一张彩券", casinomap[j].casinoinfo); + for(k = 0; k < MAXSTAKENUM; k++){//下注设定 + if(CHAR_getWorkInt(charaindex, CHAR_WORKSTAKETYPE1 + k) != 0) continue; + CHAR_setWorkInt(charaindex, CHAR_WORKSTAKETYPE1 + k, casinomap[j].casinotype); + dropflag++; + break; + } + CHAR_talkToCli(charaindex, -1, tmpbuf, CHAR_COLORYELLOW); +#ifdef _FIX_GAMBLENUM + if (dropflag <= MAXSTAKENUM){ //做扣点的动作 + int nAcc = CHAR_getInt(charaindex, CHAR_GAMBLENUM); + nAcc -= casinomap[j].accumulation; + CHAR_setInt(charaindex, CHAR_GAMBLENUM, nAcc); + } +#endif + dropflag = ( dropflag >= MAXSTAKENUM )?MAXSTAKENUM:dropflag; + CHAR_setWorkInt(charaindex, CHAR_WORKSTAKEFLAG, dropflag); + break; + } + } + + if( casinoflag == 0) return; + LogItem(CHAR_getChar(charaindex, CHAR_NAME), + CHAR_getChar(charaindex, CHAR_CDKEY), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt(itemindex, ITEM_ID), +#endif + "StakeDrop(丢出彩券)", + CHAR_getInt(charaindex,CHAR_FLOOR), + CHAR_getInt(charaindex,CHAR_X), + CHAR_getInt(charaindex,CHAR_Y), + ITEM_getChar(itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + CHAR_SendDropItem_Stats( charaindex, itemindex, itemcharaindex, 1); + +} +#endif + +BOOL CHAR_FindAroundUsabilitySpace( int charaindex, int itemindex, int *fl, int *x, int *y) +{ + int dropx, dropy, i; + BOOL Find = FALSE; + int myfl = CHAR_getInt( charaindex, CHAR_FLOOR); + + for( i = 0 ; i < 8 ; i ++ ){ + OBJECT object; + Find = FALSE; + dropx = CHAR_getInt( charaindex, CHAR_X) + CHAR_getDX( CHAR_getInt( charaindex, CHAR_DIR) + i); + dropy = CHAR_getInt( charaindex, CHAR_Y) + CHAR_getDY( CHAR_getInt( charaindex, CHAR_DIR) + i); + if( MAP_walkAbleFromPoint( myfl, dropx, dropy, FALSE ) == FALSE ) continue; + for( object = MAP_getTopObj( myfl, dropx, dropy) ; object ; object = NEXT_OBJECT(object ) ){ + int objindex = GET_OBJINDEX(object); + if( !CHECKOBJECTUSE( objindex)) continue; + if( OBJECT_getType( objindex) == OBJTYPE_CHARA ){ + typedef BOOL (*ITEMPUTFUNC)(int,int); + ITEMPUTFUNC ipfunc; + ipfunc = (ITEMPUTFUNC)CHAR_getFunctionPointer( OBJECT_getIndex(objindex),CHAR_ITEMPUTFUNC) ; + if( ipfunc && ipfunc( OBJECT_getIndex( objindex), itemindex) == TRUE) + return FALSE; + }else{ + Find = TRUE; + break; + } + } + if( Find == FALSE ){ + *fl = myfl; + *x = dropx; + *y = dropy; + return TRUE; + } + } + return FALSE; +} + +void CHAR_DropItem( int charaindex, int itemcharaindex ) +{ + int itemindex, fl, x, y, ret, objindex, beDropOne = 1; + + if( !CHAR_CHECKINDEX( charaindex ) ) return; + + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ) != BATTLE_CHARMODE_NONE ){ + CHAR_talkToCli( charaindex, -1, "战斗状态中无法丢道具装备。", CHAR_COLORYELLOW ); + return; + } +#ifdef _AVID_TRADETRYBUG //丢道具装备 + if( CHAR_getWorkInt(charaindex, CHAR_WORKTRADEMODE) != CHAR_TRADE_FREE){ + CHAR_talkToCli( charaindex, -1, "交易状态中无法丢道具装备。", CHAR_COLORYELLOW ); + return; + } +#endif + + itemindex = CHAR_getItemIndex( charaindex, itemcharaindex); + if( !ITEM_CHECKINDEX( itemindex)) return; + + if( ITEM_getInt( itemindex, ITEM_ID) == CASINOTOKENID && + ( CHAR_getInt( charaindex, CHAR_FLOOR ) == 7008 || + CHAR_getInt( charaindex, CHAR_FLOOR ) == 7005 || + CHAR_getInt( charaindex, CHAR_FLOOR ) == 7003 ) ){ + + int dropx, dropy, dropfl; + dropfl = CHAR_getInt( charaindex, CHAR_FLOOR); + dropx = CHAR_getInt( charaindex, CHAR_X) + CHAR_getDX( CHAR_getInt( charaindex, CHAR_DIR)); + dropy = CHAR_getInt( charaindex, CHAR_Y) + CHAR_getDY( CHAR_getInt( charaindex, CHAR_DIR)); + CHAR_DropStakeByDropItem( charaindex, itemcharaindex, itemindex, dropfl, dropx, dropy); + return; + } + //找出周围空间 + if( CHAR_FindAroundUsabilitySpace( charaindex, itemindex, &fl, &x, &y) == FALSE ){ + CHAR_talkToCli( charaindex, -1, "周围的地面已经满了。", CHAR_COLORYELLOW ); + return; + } + +#ifdef _ITEM_PILENUMS + if( ITEM_getInt( itemindex, ITEM_CANBEPILE) == 1 && + ITEM_getInt( itemindex, ITEM_USEPILENUMS) > 1 ){ + int ret; + int nums = ITEM_getInt( itemindex, ITEM_USEPILENUMS); + ret = ITEM_makeItemAndRegist( ITEM_getInt( itemindex, ITEM_ID) ); + if( !ITEM_CHECKINDEX( ret)) return; + ITEM_setInt( itemindex, ITEM_USEPILENUMS, nums -1 ); + itemindex = ret; + beDropOne = 0; + } +#endif + //找到空间 + ret = ITEM_eventDrop( itemindex, charaindex, itemcharaindex ); + if( ret == 1 ){ //-1 物品不存在 1 消失 0 一般物品 + CHAR_SendDropItem_Stats( charaindex, itemindex, itemcharaindex, beDropOne); + return; + }else { + objindex = CHAR_DropItemAbsolute( itemindex, fl, x, y, FALSE ); + if( objindex == -1 ) return; + ITEM_setInt( itemindex, ITEM_PUTTIME, NowTime.tv_sec); + { + LogItem( + CHAR_getChar( charaindex, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( charaindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), /* 失奶 丞 寞 */ +#endif + "Drop(丢出道具)", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + } + CHAR_sendWatchEvent( objindex, CHAR_ACTSTAND, NULL, 0, TRUE); + } + CHAR_SendDropItem_Stats( charaindex, itemindex, itemcharaindex, beDropOne); +} +#else +void CHAR_DropItem( int charaindex, int itemcharaindex ) +{ + int dirx[9],diry[9]; + int i, j; + int floor, objindex=-1; + int droped =0; + int count_item =0, count_chara =0; + int fl, x, y; + int itemindex = CHAR_getItemIndex(charaindex,itemcharaindex); + + if( !CHAR_CHECKINDEX( charaindex ) ) return; + if( !ITEM_CHECKINDEX( itemindex) ) return; +#ifdef _AVID_TRADETRYBUG //丢道具装备 + if( CHAR_getWorkInt(charaindex, CHAR_WORKTRADEMODE) != CHAR_TRADE_FREE){ + CHAR_talkToCli( charaindex, -1, "交易状态中无法丢道具装备。", CHAR_COLORYELLOW ); + return; + } +#endif + +#ifdef _DROPCHECK2 + fl = CHAR_getInt( charaindex, CHAR_FLOOR); + x = CHAR_getInt( charaindex, CHAR_X); + y = CHAR_getInt( charaindex, CHAR_Y); + + for( i = x-CHAR_DEFAULTSEESIZ/2 ; i <= x+CHAR_DEFAULTSEESIZ/2 ; i++ ){ + for( j = y-CHAR_DEFAULTSEESIZ/2 ; j <= y+CHAR_DEFAULTSEESIZ/2 ; j ++ ){ + OBJECT object; + for( object = MAP_getTopObj(fl,i,j); object ; object = NEXT_OBJECT(object ) ) { + int objindex = GET_OBJINDEX(object); + if( OBJECT_getType(objindex) == OBJTYPE_NOUSE ) continue; + if( OBJECT_getType(objindex) == OBJTYPE_ITEM || OBJECT_getType(objindex) == OBJTYPE_GOLD ) { + count_item++; + } + if( OBJECT_getType(objindex) == OBJTYPE_CHARA ) { + count_chara++; + } + } + } + +#ifdef _DROPSTAKENEW + if(ITEM_getInt(itemindex, ITEM_ID) == CASINOTOKENID){ + int k = 0; + int casinodropflag = 0; + for(k = 0; k < arraysizeof(casinomap); k++){ + if(fl == casinomap[k].casinofl){ + if(x >= casinomap[k].casinox - 1 && x <= casinomap[k].casinox + 1){ + if(y >= casinomap[k].casinoy - 1 && y <= casinomap[k].casinoy + 1){ + casinodropflag = 1; + break; + } + } + } + } + if(casinodropflag == 0){ +#endif + if( count_item > 80 || count_chara > 80 ) { + CHAR_talkToCli( charaindex, -1, "这里的物品已经太多了,不能再丢了。", CHAR_COLORYELLOW ); + return; + } +#ifdef _DROPSTAKENEW + } + } +#endif + } +#endif + + for( i = 1 ; i < 8 ; i ++ ){ + dirx[i] = CHAR_getDX(CHAR_getInt(charaindex,CHAR_DIR) + i); + diry[i] = CHAR_getDY(CHAR_getInt(charaindex,CHAR_DIR) + i); + } + dirx[0] = CHAR_getDX(CHAR_getInt(charaindex,CHAR_DIR)); + diry[0] = CHAR_getDY(CHAR_getInt(charaindex,CHAR_DIR)); + dirx[8] = 0; + diry[8] = 0; + floor = CHAR_getInt( charaindex,CHAR_FLOOR ); + { + int ret; + if( 0 <= itemcharaindex && itemcharaindex < CHAR_STARTITEMARRAY ){ //如果丢弃物为装备 + CHAR_sendItemDetachEvent( charaindex, itemindex ); + } + ret = ITEM_eventDrop( itemindex, charaindex, itemcharaindex ); + if( ret == 1 ){ //-1 物品不存在 1 消失 0 一般物品 + itemindex = -1; + goto END; + }else if( ret == -1 ){ + print( "%s:%d err\n", __FILE__,__LINE__); + return; + }else{ + ; + } + } +#ifdef _MARKET_TRADE + { + int user_floor = CHAR_getInt( charaindex, CHAR_FLOOR); + int item_x = CHAR_getInt( charaindex, CHAR_X)+dirx[0]; + int item_y = CHAR_getInt( charaindex, CHAR_Y)+diry[0]; + if( MAP_TRADEDROP( charaindex, itemindex, user_floor, item_x, item_y) == TRUE ) { + return; + } + } +#endif + droped = 0; + for( i = 0 ; i < 9 ; i ++ ){ + int x=CHAR_getInt(charaindex,CHAR_X)+dirx[i]; + int y=CHAR_getInt(charaindex,CHAR_Y)+diry[i]; +#ifdef _DROPSTAKENEW + // 判断物品是否为彩券 + if(ITEM_getInt(itemindex, ITEM_ID) == CASINOTOKENID){ + int j = 0, k = 0; + int bdropstake = 0; + int casinoflag = 0; + for (j = 0; j < arraysizeof(casinomap); j++){ + if (CHAR_getInt(charaindex, CHAR_FLOOR) == casinomap[j].casinofl){ + if (x == casinomap[j].casinox && y == casinomap[j].casinoy){ + char tmpbuf[256]; + int dropflag = CHAR_getWorkInt(charaindex, CHAR_WORKSTAKEFLAG); + casinoflag = 1; + if(casinomap[j].dropflag == 0){ + CHAR_talkToCli(charaindex, -1, "现在无法下注!", CHAR_COLORYELLOW); + return; + }else{ + snprintf(tmpbuf, sizeof(tmpbuf), "你在 %s 下注了一张彩券", casinomap[j].casinoinfo); + if(dropflag >= MAXSTAKENUM){ + snprintf(tmpbuf, sizeof(tmpbuf), "你已经下注五次了,无法再下注!"); + CHAR_talkToCli(charaindex, -1, tmpbuf, CHAR_COLORYELLOW); + return; + } + for(k = 0; k < MAXSTAKENUM; k++){ + if(CHAR_getWorkInt(charaindex, CHAR_WORKSTAKETYPE1 + k) == 0){ + CHAR_setWorkInt(charaindex, CHAR_WORKSTAKETYPE1 + k, casinomap[j].casinotype); + casinomap[j].stakenum = casinomap[j].stakenum + 1; + if(casinomap[j].stakenum >= 100000000) + casinomap[j].stakenum = 100000000; + dropflag++; + if(casinomap[j].stakenum <= 1) + bdropstake = 1; + break; + } + } + } + CHAR_talkToCli(charaindex, -1, tmpbuf, CHAR_COLORYELLOW); +#ifdef _FIX_GAMBLENUM + //做扣点的动作 + if (dropflag <= MAXSTAKENUM){ + int nAcc = CHAR_getInt(charaindex, CHAR_GAMBLENUM); + nAcc -= casinomap[j].accumulation; + CHAR_setInt(charaindex, CHAR_GAMBLENUM, nAcc); + } +#endif + if (dropflag >= MAXSTAKENUM){ + dropflag = 0; + for (k = 0; k < MAXSTAKENUM ; k++){ + if (CHAR_getWorkInt(charaindex, CHAR_WORKSTAKETYPE1 + k) > 0) + dropflag++; + } + CHAR_setWorkInt(charaindex, CHAR_WORKSTAKEFLAG, dropflag); + }else{ + CHAR_setWorkInt(charaindex, CHAR_WORKSTAKEFLAG, dropflag); + } + continue; + } + } + } + + // 此地方的彩券数量超过一张以上 + if(bdropstake == 0 && casinoflag != 0){ + CHAR_setItemIndex(charaindex, itemcharaindex ,-1); + CHAR_sendItemDataOne(charaindex, itemcharaindex); + LogItem(CHAR_getChar(charaindex, CHAR_NAME), + CHAR_getChar(charaindex, CHAR_CDKEY), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt(itemindex, ITEM_ID), +#endif + "StakeDrop(丢出彩券)", + CHAR_getInt(charaindex,CHAR_FLOOR), + CHAR_getInt(charaindex,CHAR_X), + CHAR_getInt(charaindex,CHAR_Y), + ITEM_getChar(itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + + ); + return; + } + } +#endif + { + int ret = CHAR_DropItemFXY( charaindex,itemcharaindex, + CHAR_getInt(charaindex,CHAR_FLOOR), x, y, &objindex ); + switch( ret ){ + case 0: + droped = 1; +#ifdef _ITEM_ORNAMENTS // WON FIX + if( ITEM_getWorkInt( itemindex, ITEM_CANPICKUP) > 0 ){ + ITEM_setInt( itemindex, ITEM_PUTTIME, NowTime.tv_sec + 60*5); + }else{ + ITEM_setInt( itemindex, ITEM_PUTTIME, NowTime.tv_sec); + } +#else + ITEM_setInt( itemindex, ITEM_PUTTIME, NowTime.tv_sec); +#endif + goto END; + break; + case -1: + case -2: + break; + case -3: + default: + return; + break; + } +#ifdef _DROPSTAKENEW + } +#endif + } +#ifdef _DROPCHECK + if( droped != 1 ) { + CHAR_talkToCli( charaindex, -1, "周围的地面已经满了。", CHAR_COLORYELLOW ); + return; + } +#endif +END: + CHAR_sendWatchEvent( objindex, CHAR_ACTSTAND, NULL, 0, TRUE); + CHAR_setItemIndex( charaindex, itemcharaindex ,-1); +{ + char category[3]; + snprintf( category,sizeof( category),"J%d", itemcharaindex); + CHAR_sendStatusString( charaindex , category); +} + if( CHAR_complianceParameter( charaindex ) ){ + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX) ); + } + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER) { + CHAR_send_P_StatusString( charaindex, + CHAR_P_STRING_HP|CHAR_P_STRING_MAXHP| + CHAR_P_STRING_MP|CHAR_P_STRING_MAXMP| + CHAR_P_STRING_ATK|CHAR_P_STRING_DEF| + CHAR_P_STRING_QUICK|CHAR_P_STRING_CHARM| + CHAR_P_STRING_LUCK|CHAR_P_STRING_EARTH| + CHAR_P_STRING_WATER|CHAR_P_STRING_FIRE| + CHAR_P_STRING_WIND + ); + CHAR_sendItemDataOne( charaindex, itemcharaindex); + } + return; +} +#endif + +int CHAR_DropItemAbsolute( int itemindex, int floor, int x, int y, + BOOL net) +{ + Object object; + int objindex; + + if( !ITEM_CHECKINDEX( itemindex) )return FALSE; + + object.type = OBJTYPE_ITEM; + object.index = itemindex; + object.x = x; + object.y = y; + object.floor = floor; + objindex = initObjectOne( &object ); + ITEM_setWorkInt( itemindex,ITEM_WORKOBJINDEX, objindex ); + ITEM_setWorkInt( itemindex,ITEM_WORKCHARAINDEX, -1 ); + if( net ) + CHAR_sendWatchEvent( objindex,CHAR_ACTSTAND,NULL,0,TRUE); + + return objindex; +} + +int CHAR_addItemSpecificItemIndex( int charaindex, int itemindex ) +{ + int emptyindex; + if( CHAR_CHECKINDEX( charaindex) == FALSE) return -1; + if( ITEM_CHECKINDEX( itemindex) == FALSE) return -1; + emptyindex = CHAR_findEmptyItemBox( charaindex ); + if( emptyindex == -1 ){ + return CHAR_MAXITEMHAVE; + }else{ + CHAR_setItemIndex(charaindex,emptyindex,itemindex); + ITEM_setWorkInt(itemindex,ITEM_WORKCHARAINDEX,charaindex); + ITEM_setWorkInt(itemindex,ITEM_WORKOBJINDEX,-1); + } + return emptyindex; +} + +static int CHAR_PickUpItemFXY( int charaindex, int fl ,int x , int y , + int* contents,int* objindex ) +{ + OBJECT object; + + for( object=MAP_getTopObj(fl,x,y) ; object ; object = NEXT_OBJECT(object ) ){ + int index = GET_OBJINDEX(object); + int objtype = OBJECT_getType(index); + if( objtype == OBJTYPE_NOUSE )continue; + else if( objtype == OBJTYPE_ITEM ){ + int ret; + int itemindex = OBJECT_getIndex( index); +#ifdef _MARKET_TRADE //买 + if( ITEM_getWorkInt( itemindex, ITEM_WORKTRADETYPE) == TRADETYPE_SELL ) { + MAP_TRADEPICKUP( charaindex, itemindex, fl, x, y, TRADEITEMTYPE); + return -1; + } +#endif +#ifdef _ITEM_ORNAMENTS + if( ITEM_getWorkInt( itemindex, ITEM_CANPICKUP) > 0 ){ + return -1; + } +#endif +#ifdef _DROPSTAKENEW + // 判断物品是否为彩券 + if(ITEM_getInt(itemindex, ITEM_ID) == CASINOTOKENID){ + int i = 0; + int bdropstake = 0, casinoflag = 0, emptyitemindexinchara = -1; + for(i = 0; i < arraysizeof(casinomap); i++){ + if(fl == casinomap[i].casinofl){ + if(x == casinomap[i].casinox && y == casinomap[i].casinoy){ + int j = 0, stakeflag = 0; + int pickupflag = 0; + casinoflag = 1; + if(casinomap[i].dropflag == 0){ + CHAR_talkToCli(charaindex, -1, "现在已经无法取回下注彩券了!", CHAR_COLORYELLOW); + return -1; + } + stakeflag = CHAR_getWorkInt(charaindex, CHAR_WORKSTAKEFLAG); + if(stakeflag == 0){ + CHAR_talkToCli(charaindex, -1, "您并没有下注,所以无法取回彩券!", CHAR_COLORYELLOW); + return -1; + } + for(j = 0; j < MAXSTAKENUM; j++){ + if(CHAR_getWorkInt(charaindex, CHAR_WORKSTAKETYPE1 + j) == casinomap[i].casinotype){ + emptyitemindexinchara = CHAR_findEmptyItemBox(charaindex); + if(emptyitemindexinchara < 0) return -2; + CHAR_setWorkInt(charaindex, CHAR_WORKSTAKETYPE1 + j, 0); + casinomap[i].stakenum = casinomap[i].stakenum - 1; + stakeflag--; + pickupflag = 1; +#ifdef _FIX_GAMBLENUM + //做加点的动作 + { + int nAcc = CHAR_getInt(charaindex, CHAR_GAMBLENUM); + nAcc += casinomap[i].accumulation; + CHAR_setInt(charaindex, CHAR_GAMBLENUM, nAcc); + } +#endif + if(casinomap[i].stakenum <= 0){ + bdropstake = 1; + casinomap[i].stakenum = 0; + } + break; + } + } + if(stakeflag < 0){ + stakeflag = 0; + for(j = 0; j < MAXSTAKENUM; j++){ + if(CHAR_getWorkInt(charaindex, CHAR_WORKSTAKETYPE1 + j) > 0) + stakeflag++; + } + CHAR_setWorkInt(charaindex, CHAR_WORKSTAKEFLAG, stakeflag); + }else + CHAR_setWorkInt(charaindex, CHAR_WORKSTAKEFLAG, stakeflag); + if(pickupflag == 0){ + CHAR_talkToCli(charaindex, -1, "您没有在此下注,所以无法取回彩券!", CHAR_COLORYELLOW); + return -1; + } + } + } + } + + if(bdropstake == 0 && casinoflag != 0){// 此地方的彩券数量超过一张以上 + char tmpbuf[256]; + if(emptyitemindexinchara != -1){ + int itemid=-1, ret=-1; + itemid = ITEM_makeItemAndRegist(CASINOTOKENID); + if(itemid == -1) return -1; + ret = CHAR_addItemSpecificItemIndex( charaindex, itemid); + if( ret < 0 || ret >= CHAR_MAXITEMHAVE ) { + ITEM_endExistItemsOne( itemid ); + return -1; + } + } + CHAR_sendItemDataOne(charaindex, emptyitemindexinchara); + snprintf(tmpbuf, sizeof(tmpbuf), "拾回%s,已将下注取消!", + ITEM_getChar(itemindex, ITEM_NAME)); + CHAR_talkToCli(charaindex, -1, tmpbuf, CHAR_COLORWHITE); + // 记录捡回记录 + LogItem(CHAR_getChar(charaindex, CHAR_NAME), + CHAR_getChar(charaindex, CHAR_CDKEY), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt(itemindex, ITEM_ID), +#endif + "StakePickUp(捡起彩券)", + CHAR_getInt(charaindex,CHAR_FLOOR), + CHAR_getInt(charaindex,CHAR_X), + CHAR_getInt(charaindex,CHAR_Y), + ITEM_getChar(itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + return -1; + } + } +#endif + ret = CHAR_addItemSpecificItemIndex( charaindex, itemindex ); + if(ret == CHAR_MAXITEMHAVE ){ + return -2; + }else if( ret != -1 ) { + typedef void (*PICKUPFUNC)( int, int); + PICKUPFUNC pickupfunc = NULL; + pickupfunc = (PICKUPFUNC)ITEM_getFunctionPointer( + itemindex, ITEM_PICKUPFUNC); + if( pickupfunc) pickupfunc( charaindex, itemindex); + + *contents = OBJECT_getIndex(index); + *objindex = index; + CHAR_sendItemDataOne( charaindex, ret); + return 0; + } + }else if( objtype == OBJTYPE_GOLD ){ + int MaxGold; + long dropgoldamount = 0, newamountgold = 0, Minus = 0, newgold = 0; + long mygold = (long) CHAR_getInt( charaindex, CHAR_GOLD ); + MaxGold = CHAR_getMaxHaveGold( charaindex); + if ((mygold <0) || (mygold > MaxGold))return -2; + dropgoldamount = OBJECT_getIndex(index); + newamountgold = (unsigned int) CHAR_getInt( charaindex,CHAR_GOLD ) + dropgoldamount; + Minus = newamountgold - MaxGold; + if( Minus > 0 ) { + newgold = Minus; + *contents = dropgoldamount - Minus; + }else { + newgold = 0; + *contents = dropgoldamount; + } + OBJECT_setIndex( index, newgold); + CHAR_setInt( charaindex, CHAR_GOLD, min( newamountgold, MaxGold ) ); + *objindex = index; + return 1; + }else if( objtype == OBJTYPE_CHARA ) { + int pindex = OBJECT_getIndex( index); + if( !CHAR_CHECKINDEX( pindex) ) continue; + if( CHAR_getInt( pindex, CHAR_WHICHTYPE) == CHAR_TYPEPET ) { + int havepetindex = CHAR_getCharPetElement( charaindex); + if( havepetindex == -1 ) { + if( CHAR_getWorkInt( pindex, CHAR_WORKPETFOLLOWMODE) != CHAR_PETFOLLOW_NOW ) + return -3; + } + if( CHAR_getWorkInt( charaindex, CHAR_PickAllPet) != TRUE ) { + if( (CHAR_getInt( pindex, CHAR_LV) - CHAR_getInt( charaindex, CHAR_LV) > 5 ) + && (CHAR_getInt( charaindex, CHAR_TRANSMIGRATION ) <= 0 )) { + return -4; + } + } + /*if( !strcmp( CHAR_getChar( pindex, CHAR_OWNERCDKEY), "SYSTEM_WAYI" ) && + !strcmp( CHAR_getChar( pindex, CHAR_OWNERCHARANAME), "SYSTEM_WAYI" ) ){ + }else{ + if( strcmp( CHAR_getChar( pindex, CHAR_OWNERCDKEY), CHAR_getChar( charaindex, CHAR_CDKEY) ) || + strcmp( CHAR_getChar( pindex, CHAR_OWNERCHARANAME), CHAR_getChar( charaindex, CHAR_NAME) )){ + return -5; + } + }*/ +#ifdef _MARKET_TRADE + if( CHAR_getWorkInt( pindex, CHAR_WORKTRADETYP) == TRADETYPE_SELL ) { //买宠 + MAP_TRADEPICKUP( charaindex, pindex, fl, x, y, TRADEPETTYPE ); + return -1; + } +#endif + if( CHAR_getWorkInt( pindex, CHAR_WORKPETFOLLOWMODE) == CHAR_PETFOLLOW_NOW ){ + CHAR_pickupFollowPet( charaindex, pindex ); + return -1; + } + if( CHAR_getInt( pindex, CHAR_MAILMODE) != CHAR_PETMAIL_NONE){ + if( strcmp( CHAR_getChar( pindex, CHAR_OWNERCDKEY), + CHAR_getChar( charaindex, CHAR_CDKEY)) != 0 || + strcmp( CHAR_getChar( pindex, CHAR_OWNERCHARANAME), + CHAR_getChar( charaindex, CHAR_NAME))!= 0 ){ + return -5; + }else if( CHAR_getInt( pindex, CHAR_MAILMODE) != CHAR_PETMAIL_IDLE5){ + return -5; + } + } + if( CHAR_getInt( pindex, CHAR_MAILMODE) != CHAR_PETMAIL_NONE){ + Char *ch; + CHAR_setInt( pindex, CHAR_MAILMODE, CHAR_PETMAIL_NONE); + CHAR_setInt( pindex, CHAR_PETMAILIDLETIME, 0); + PETMAIL_delPetMailTotalnums( 1); //手动捡起mail PET + ch = CHAR_getCharPointer( pindex); + if( ch != NULL ) { + strcpysafe( ch->charfunctable[CHAR_LOOPFUNC].string, + sizeof( ch->charfunctable[CHAR_LOOPFUNC]), ""); + CHAR_constructFunctable( pindex); + } + } + CHAR_setWorkInt( pindex, CHAR_WORKPLAYERINDEX, charaindex); + CHAR_setCharPet( charaindex, havepetindex, pindex); +#ifdef _PET_TALK + if( CHAR_getInt( pindex, CHAR_PETID) != 718 ) { +#endif + CHAR_setChar( pindex, CHAR_OWNERCDKEY, + CHAR_getChar( charaindex, CHAR_CDKEY)); + CHAR_setChar( pindex, CHAR_OWNERCHARANAME, + CHAR_getChar( charaindex, CHAR_NAME)); +#ifdef _PET_TALK + } +#endif + CHAR_complianceParameter( pindex); +{ + char category[3]; + snprintf( category,sizeof( category),"K%d",havepetindex); + CHAR_sendStatusString( charaindex, category); + snprintf( category,sizeof( category),"W%d",havepetindex); + CHAR_sendStatusString( charaindex, category); +} + CHAR_setInt( pindex, CHAR_PUTPETTIME, 0); + *contents = pindex; + *objindex = index; + return 2; + } + } + } + return -1; +} + +void CHAR_PickUpItem( int charaindex, int dir ) +{ + int i; + int dirx[2],diry[2]; + int searchloopcount=0; + + if( !CHAR_CHECKINDEX(charaindex) )return; + if( CHAR_getFlg( charaindex,CHAR_ISDIE ) )return; + if( CHAR_getWorkInt( charaindex,CHAR_WORKBATTLEMODE ) )return; + if( dir < 0 ){ + searchloopcount = 1; + dirx[0] = 0; + diry[0] = 0; + }else{ + if( dir != CHAR_getInt( charaindex, CHAR_DIR)) { + VALIDATEDIR(dir); + CHAR_setInt(charaindex,CHAR_DIR,dir); + CHAR_sendWatchEvent(CHAR_getWorkInt(charaindex,CHAR_WORKOBJINDEX), + CHAR_ACTSTAND,NULL,0,FALSE); + } + dirx[0] = CHAR_getDX(CHAR_getInt(charaindex,CHAR_DIR)); + diry[0] = CHAR_getDY(CHAR_getInt(charaindex,CHAR_DIR)); + dirx[1] = 0; + diry[1] = 0; + searchloopcount=2; + } + for( i = 0 ; i < searchloopcount ; i ++ ){ + int contents,objindex; + int fl = CHAR_getInt(charaindex,CHAR_FLOOR); + + int y = CHAR_getInt(charaindex,CHAR_Y)+diry[i]; + int x = CHAR_getInt(charaindex,CHAR_X)+dirx[i]; + int ret = CHAR_PickUpItemFXY( charaindex,fl,x,y,&contents, + &objindex); + switch( ret ){ + case 0: + CHAR_ObjectDelete(objindex); + { + char mesg[256]; +#ifdef _DROPSTAKENEW + int j = 0; + int dropflag = 0; + for(j = 0; j < arraysizeof(casinomap); j++) + { + if(CHAR_getInt(charaindex, CHAR_FLOOR) == casinomap[j].casinofl) + { + if(x == casinomap[j].casinox && y == casinomap[j].casinoy) + { + dropflag = 1; + break; + } + } + } + if(ITEM_getInt(contents, ITEM_ID) == CASINOTOKENID && dropflag == 1) + snprintf( mesg,sizeof(mesg), "拾回%s,已将下注取消!", + ITEM_getAppropriateName(contents)); + else +#endif + snprintf( mesg,sizeof(mesg), "拾获 %s", + ITEM_getAppropriateName(contents) ); + CHAR_talkToCli(charaindex,-1,mesg,CHAR_COLORWHITE); + } + + { + LogItem( + CHAR_getChar( charaindex, CHAR_NAME ), + CHAR_getChar( charaindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + contents, +#else + ITEM_getInt(contents, ITEM_ID), +#endif + "PickUp(捡起道具)", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + ITEM_getChar( contents, ITEM_UNIQUECODE), + ITEM_getChar( contents, ITEM_NAME), + ITEM_getInt( contents, ITEM_ID) + ); + } + + return; + break; + case 1: + CHAR_send_P_StatusString( charaindex, CHAR_P_STRING_GOLD); + + if( OBJECT_getIndex( objindex) == 0 ) { + CHAR_ObjectDelete(objindex); + }else { + CHAR_sendWatchEvent(objindex,CHAR_ACTSTAND,NULL,0,TRUE); + } + { + char mesg[256]; + if( contents == 0 ) { + snprintf( mesg,sizeof(mesg), "无法再拾获Stone了。" ); + }else { + snprintf( mesg,sizeof(mesg), "拾获 %d Stone",contents ); + } + CHAR_talkToCli(charaindex,-1,mesg,CHAR_COLORWHITE); + } + if( contents != 0 ){ + LogStone( + -1, + CHAR_getChar( charaindex, CHAR_NAME ), + CHAR_getChar( charaindex, CHAR_CDKEY ), + contents, + CHAR_getInt( charaindex, CHAR_GOLD ), + "PickUp(拾获金钱)", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ) + ); + } + return; + break; + case 2: //宠物 + CHAR_ObjectDelete(objindex); + CHAR_setWorkInt( contents, CHAR_WORKOBJINDEX, -1); + { + char mesg[256]; + char *p = NULL; + p = CHAR_getChar( contents, CHAR_USERPETNAME); + if( strlen( p) == 0 ) { + p = CHAR_getChar( contents, CHAR_NAME); + } + + snprintf( mesg,sizeof(mesg), "拾获 %s", p); + CHAR_talkToCli(charaindex,-1,mesg,CHAR_COLORWHITE); + } + // 矢永玄毛胶匀凶夫弘 + LogPet( + CHAR_getChar( charaindex, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( charaindex, CHAR_CDKEY ), + CHAR_getChar( contents, CHAR_NAME), + CHAR_getInt( contents, CHAR_LV), + "PickUp(捡宠)", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + CHAR_getChar( contents, CHAR_UNIQUECODE) // shan 2001/12/14 + ); + return; + break; + // Robin 0701 petFollow + case 3: + + /* 引歹曰卞仇木毛壅六午中丹 */ + CHAR_ObjectDelete(objindex); + CHAR_setWorkInt( contents, CHAR_WORKOBJINDEX, -1); + { + char mesg[256]; + char *p = NULL; + p = CHAR_getChar( contents, CHAR_USERPETNAME); + if( strlen( p) == 0 ) { + p = CHAR_getChar( contents, CHAR_NAME); + } + + snprintf( mesg,sizeof(mesg), "拾回 %s", p); + CHAR_talkToCli(charaindex,-1,mesg,CHAR_COLORWHITE); + } + // 矢永玄毛胶匀凶夫弘 + LogPet( + CHAR_getChar( charaindex, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( charaindex, CHAR_CDKEY ), + CHAR_getChar( contents, CHAR_NAME), + CHAR_getInt( contents, CHAR_LV), + "FollowPickUp(收回溜宠)", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + CHAR_getChar( contents, CHAR_UNIQUECODE) // shan 2001/12/14 + ); + + return; + break; + case -1: + break; + case -2: + CHAR_talkToCli( charaindex,-1,"道具栏已满。", CHAR_COLORYELLOW); + break; + case -3: + CHAR_talkToCli( charaindex,-1,"宠物数已满。", CHAR_COLORYELLOW); + break; + case -4: + CHAR_talkToCli( charaindex,-1,"无法照顾该宠物。", CHAR_COLORYELLOW); + break; + case -5: + CHAR_talkToCli( charaindex,-1,"无法拾获该宠物。", CHAR_COLORYELLOW); + break; + case -6: + CHAR_talkToCli( charaindex,-1,"无法拾获该道具。", CHAR_COLORYELLOW); + break; + default: + return; + } + } + return; +} + +/*------------------------------------------------------------ + * 云嗯毛甄 隙烂匹 公丹午允月[CHAR_DropMoney井日及心匹银丹仪[ + * 娄醒 + * charaindex int 平乓仿奶件犯永弁旦 + * itemindex int 失奶 丞奶件犯永弁旦(平乓仿犯□正及 匹及) + * fl int 白夫失 + * x int x + * y int y + * force BOOL 仇及袄互恳分午 泫 允 + * objindex int* 中凶失奶 丞及 Object 匹及奶件犯弁永旦 + * 忒曰袄 + * 撩 (公氏卅卞云嗯毛 匀化中卅中) -1 + * 撩 (哗溥读卞分户) -2 + * 公木动陆及撩 -3 + * 撩 (公仇卞反公及汹及云嗯反聂允亢月) -4 + * 允匹卞职及失奶 丞互 切化中月 -5 + * 汹互 匹 [ -6 + * 岳 0 + ------------------------------------------------------------*/ +static BOOL CHAR_DropMoneyFXY( int charaindex, int amount, int fl , int x, + int y, BOOL force, int* objindex ) +{ + OBJECT object; + int MaxGold; + int mygold = CHAR_getInt( charaindex, CHAR_GOLD ); + if( amount <= 0 )return -6; + if( amount > mygold ) + return -1; + + MaxGold = CHAR_getMaxHaveGold( charaindex); + if ((mygold <0) || (mygold > MaxGold)) return -1; + + if( MAP_walkAbleFromPoint( fl,x,y,FALSE ) == FALSE )return -2; + for( object=MAP_getTopObj(fl,x,y) ; object; + object = NEXT_OBJECT(object) ){ + int index = GET_OBJINDEX(object); + int objtype = OBJECT_getType(index); + + if( objtype == OBJTYPE_NOUSE ) continue; + else if( objtype == OBJTYPE_GOLD ){ + long tmpamount = OBJECT_getIndex(index) + amount; + if( tmpamount > MaxGold ) + return -4; + OBJECT_setIndex(index,tmpamount); + CHAR_setInt(charaindex,CHAR_GOLD, + (unsigned int)CHAR_getInt(charaindex, + CHAR_GOLD ) + - amount ); + *objindex = index; +#ifdef _DEL_DROP_GOLD + OBJECT_setTime( index, NowTime.tv_sec); +#endif + if( amount >= 100 ){ /* 云嗯毛 中凶夫弘 */ + LogStone(-1,CHAR_getChar( charaindex, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( charaindex, CHAR_CDKEY ), /* 交□扒□ID */ + amount, /* 嗯喊 */ + CHAR_getInt( charaindex, CHAR_GOLD ), + "Drop(放置金钱)", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ) + ); + } + return 0; + }else if( objtype == OBJTYPE_ITEM ){ + if( force==TRUE ) + continue; + else + /* 允匹卞失奶 丞互丐月及匹分户 */ + return -5; + } + } + + /* 仇仇引匹谗琼允月午中丹仪反蕙筋瓒 允月 */ + { + Object one; + one.type = OBJTYPE_GOLD; + one.x = x; + one.y = y; + one.floor = fl; + + if( amount > MaxGold ) + return -4; + + one.index = amount; + *objindex = initObjectOne( &one ); + /* 左皮斥尼弁玄瓒 允月 */ + if( *objindex == -1 ) + /* 瓒 撩 */ + return -3; + + /*云嗯毛蛹日允*/ + CHAR_setInt(charaindex,CHAR_GOLD, + (unsigned int)CHAR_getInt(charaindex,CHAR_GOLD ) + - amount ); +#ifdef _DEL_DROP_GOLD + OBJECT_setTime( *objindex, NowTime.tv_sec); +#endif + if( amount >= 100 ){ /* 云嗯毛 中凶夫弘 */ + LogStone(-1,CHAR_getChar( charaindex, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( charaindex, CHAR_CDKEY ), /* 交□扒□ID */ + amount, /* 嗯喊 */ + CHAR_getInt( charaindex, CHAR_GOLD ), + "Drop(放置金钱)", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ) + ); + } + return 0; + } +} + +/*------------------------------------------------------------ + * 云嗯毛 允楮醒[ 及蟆井日 允[ + * 娄醒 + * charaindex int 平乓仿奶件犯永弁旦 + * amount int 云嗯及汹 + * + * 忒曰袄 + * 卅仄 + ------------------------------------------------------------*/ +void CHAR_DropMoney( int charaindex, int amount ) +{ + int dirx[9],diry[9]; + int ret; + int i; + int objindex, MaxGold; + + if( !CHAR_CHECKINDEX( charaindex ) )return; + +#ifdef _AVID_TRADETRYBUG //丢出石币 + if( CHAR_getWorkInt( charaindex, CHAR_WORKTRADEMODE) == CHAR_TRADE_TRADING ){ + CHAR_talkToCli( charaindex, -1, "交易状态中无法丢出石币。", CHAR_COLORYELLOW ); + return; + } +#endif + + MaxGold = CHAR_getMaxHaveGold( charaindex); + if( CHAR_getFlg( charaindex,CHAR_ISDIE ) )return; + + //ANDY_ADD 12/28 + { + int money=0; + money = CHAR_getInt( charaindex, CHAR_GOLD ); + if( money < 0 ) { + CHAR_setInt( charaindex, CHAR_GOLD, 0); + return; + } + if( (amount > money) || (money > MaxGold)) { + if( money > MaxGold ) { + CHAR_setInt( charaindex, CHAR_GOLD, 0 ); + print("\n ERR: %s(stone%d) dropMoney%d > CHAR_MAXGOLDHAVE !!", + CHAR_getChar(charaindex, CHAR_CDKEY), money, amount); + }else { + print("\n ERR: %s dropMoney > CHAR_GOLD !!", CHAR_getChar(charaindex, CHAR_CDKEY)); + } + CHAR_send_P_StatusString( charaindex, CHAR_P_STRING_GOLD); + return; + } + } + //ANDY_END + for( i = 0 ; i < 7 ; i ++ ){ + dirx[i+2] = CHAR_getDX( CHAR_getInt(charaindex,CHAR_DIR) + i+1 ); + diry[i+2] = CHAR_getDY( CHAR_getInt(charaindex,CHAR_DIR) + i+1 ); + } + + dirx[0] = CHAR_getDX(CHAR_getInt(charaindex,CHAR_DIR)); + diry[0] = CHAR_getDY(CHAR_getInt(charaindex,CHAR_DIR)); + dirx[1] = 0; + diry[1] = 0; + + for( i = 0 ; i < 9 ; i ++ ){ + int x = CHAR_getInt(charaindex,CHAR_X) + dirx[i]; + int y = CHAR_getInt(charaindex,CHAR_Y) + diry[i]; + +// CoolFish 2002/04/06 下注处不可丢置石币 +#ifdef _DROPSTAKENEW + { + int j = 0; + for(j = 0; j < arraysizeof(casinomap); j++) + { + if(CHAR_getInt(charaindex, CHAR_FLOOR) == casinomap[j].casinofl) + { + if (x == casinomap[j].casinox && y == casinomap[j].casinoy) + { + CHAR_talkToCli(charaindex, -1, "这里不能放置石币!", CHAR_COLORYELLOW); + return; + } + } + } + } +#endif + ret = CHAR_DropMoneyFXY( charaindex,amount, + CHAR_getInt(charaindex,CHAR_FLOOR), + x,y, FALSE, &objindex ); + switch( ret ){ + case 0: + goto END; + break; + case -1: + return; + break; + case -3: + return; + break; + case -2: + case -4: + case -5: + case -6: + break; + default: + break; + } + } + + { + int x = CHAR_getInt(charaindex,CHAR_X) + dirx[1]; + int y = CHAR_getInt(charaindex,CHAR_Y) + diry[1]; + + ret = CHAR_DropMoneyFXY( charaindex,amount, + CHAR_getInt(charaindex,CHAR_FLOOR), + x,y, TRUE, &objindex ); + switch( ret ){ + case 0: + goto END; + break; + case -1: + break; + case -3: + return; + break; + case -2: + case -4: + case -5: + break; + default: + break; + } + return; + } + +END: + CHAR_sendWatchEvent(objindex,CHAR_ACTSTAND,NULL,0,TRUE ); + CHAR_send_P_StatusString( charaindex, CHAR_P_STRING_GOLD); + return; +} + +static int CHAR_findEmptyItemBoxNoFromChar( Char* ch ) +{ + int i, j=0;; + for( i = CHAR_STARTITEMARRAY ; i < CHAR_MAXITEMHAVE ; i ++ ){ + int itemindex; + itemindex = ch->indexOfExistItems[i]; + if( itemindex == -1 ) j++; + } + return j; +} + +int CHAR_findEmptyItemBoxNo( int index ) +{ + Char* ch; + + if( !CHAR_CHECKINDEX( index ) )return -1; + ch = CHAR_getCharPointer(index); + if( ch != NULL ) + return CHAR_findEmptyItemBoxNoFromChar( ch ); + else + return -1; + +} + +// CoolFish: Trade 2001/4/4 +int CHAR_findTotalEmptyItem( int index ) +{ + int i, totaleptitem = 0; + Char* ch; + + if( !CHAR_CHECKINDEX( index ) )return -1; + ch = CHAR_getCharPointer(index); + if( ch != NULL ){ + for (i = CHAR_STARTITEMARRAY; i < CHAR_MAXITEMHAVE; i++){ + int itemindex = 0; + itemindex = ch->indexOfExistItems[i]; + if (itemindex == -1) totaleptitem++; + } + return totaleptitem; + } + + return -1; +} + +// Robin 0707 petFollow +int CHAR_pickupFollowPet( int charaindex, int pickupindex ) +{ + int petindex; + int objindex; + int havepetindex; + char category[3]; + + if( !CHAR_CHECKINDEX( charaindex ) ) return FALSE; + + if( pickupindex != -1 ) + petindex = pickupindex; + else + petindex = CHAR_getWorkInt( charaindex, CHAR_WORKPETFOLLOW ); + + if( !CHAR_CHECKINDEX( petindex ) ) + { + CHAR_setWorkInt( charaindex, CHAR_WORKPETFOLLOW, -1 ); + return FALSE; + } + + havepetindex = CHAR_getCharPetElement( charaindex); + if( havepetindex == -1 ) { + CHAR_talkToCli(charaindex,-1,"宠物栏已满!无法拾回!",CHAR_COLORYELLOW); + return FALSE; + } + + objindex = CHAR_getWorkInt( petindex, CHAR_WORKOBJINDEX ); + print(" objindex02:%d ", objindex); + + if( (pickupindex == -1) || (pickupindex == CHAR_getWorkInt( charaindex, CHAR_WORKPETFOLLOW ) ) ) + CHAR_setWorkInt( charaindex, CHAR_WORKPETFOLLOW, -1 ); + + /* CDKEY 午平乓仿 互域谯仄卅中午五反胶尹卅中 */ + if( strcmp( CHAR_getChar( petindex, CHAR_OWNERCDKEY), CHAR_getChar( charaindex, CHAR_CDKEY)) != 0 || + strcmp( CHAR_getChar( petindex, CHAR_OWNERCHARANAME), CHAR_getChar( charaindex, CHAR_NAME)) != 0 ) + { + //CHAR_setWorkInt( charaindex, CHAR_WORKPETFOLLOW, -1 ); + + return FALSE; + } + + + //CHAR_setWorkInt( charaindex, CHAR_WORKPETFOLLOW, -1 ); + + CHAR_ObjectDelete(objindex); + + CHAR_setWorkInt( petindex, CHAR_WORKPETFOLLOWMODE, CHAR_PETFOLLOW_NONE ); + + CHAR_setWorkInt( petindex, CHAR_WORKPLAYERINDEX, charaindex); + CHAR_setCharPet( charaindex, havepetindex, petindex); + +#ifdef _PET_TALK + if( CHAR_getInt( petindex, CHAR_PETID) != 718 ) { +#endif + CHAR_setChar( petindex, CHAR_OWNERCDKEY, CHAR_getChar( charaindex, CHAR_CDKEY)); + CHAR_setChar( petindex, CHAR_OWNERCHARANAME, CHAR_getChar( charaindex, CHAR_NAME)); +#ifdef _PET_TALK + } +#endif + + snprintf( category,sizeof( category),"K%d",havepetindex); + CHAR_sendStatusString( charaindex, category); + snprintf( category,sizeof( category),"W%d",havepetindex); + CHAR_sendStatusString( charaindex, category); + + CHAR_setInt( petindex, CHAR_PUTPETTIME, 0); + CHAR_setWorkInt( petindex, CHAR_WORKPETFOLLOWCOUNT, 0); + + + CHAR_setWorkInt( petindex, CHAR_WORKOBJINDEX, -1); + + { + char mesg[256]; + char *p = NULL; + p = CHAR_getChar( petindex, CHAR_USERPETNAME); + if( strlen( p) == 0 ) { + p = CHAR_getChar( petindex, CHAR_NAME); + } + snprintf( mesg,sizeof(mesg), "拾回 %s", p); + CHAR_talkToCli(charaindex,-1,mesg,CHAR_COLORYELLOW); + } + // 矢永玄毛胶匀凶夫弘 + LogPet( + CHAR_getChar( charaindex, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( charaindex, CHAR_CDKEY ), + CHAR_getChar( petindex, CHAR_NAME), + CHAR_getInt( petindex, CHAR_LV), + "FollowPickUp(收回溜宠)", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + CHAR_getChar( petindex, CHAR_UNIQUECODE) // shan 2001/12/14 + ); + + return TRUE; + +} +#ifdef _GAMBLE_ROULETTE +int NPC_MAPCLEANGOLD( int meindex , int floor) +{ + OBJECT object; + int x,y,fl; + int End_type; + fl = floor; + + for( End_type = 0; End_type < arraysizeof(casinomap) ; End_type++ ) { + if( floor != casinomap[ End_type].casinofl ) + continue; + x = casinomap[ End_type].casinox; + y = casinomap[ End_type].casinoy; + + for( object=MAP_getTopObj(fl,x,y) ; object ; object = NEXT_OBJECT(object ) ) { + int index = GET_OBJINDEX(object); + int objtype = OBJECT_getType(index); + int itemindex = OBJECT_getIndex( index); + + if( objtype == OBJTYPE_NOUSE )continue; + if( objtype == OBJTYPE_ITEM ){ + if(ITEM_getInt(itemindex, ITEM_ID) == CASINOTOKENID) { + ITEM_endExistItemsOne( itemindex); + OBJECT_setIndex( index, 0); + CHAR_ObjectDelete(index); //清除 + print(" clean( %d )", index ); + } + break; + } + } + casinomap[End_type].stakenum = 0; + } + return 1; +} +#endif + +#ifdef _DROPSTAKENEW +// casinotype : flg = 0 不分type,针对整层type做设定;扩充参数 +// mapdropflag : TRUE = 可以下注; +int SetCasinoMap(int npcindex, int casinotype, int mapdropflag) +{ + int npcfloor = CHAR_getInt(npcindex, CHAR_FLOOR); + int i = 0; + if (casinotype < 0 || mapdropflag < 0) + return -1; + for (i = 0; i < arraysizeof(casinomap); i++) + { + if (npcfloor == casinomap[i].casinofl) + { + if (casinotype != 0) + { + if (casinomap[i].casinotype == casinotype) + casinomap[i].dropflag = mapdropflag; + } + else + casinomap[i].dropflag = mapdropflag; + } + } + return 1; +} + +// 计算积分 +int CasinoAccumulation(int charindex, int npcindex, int floor, int wincasinotype) +{ + int i = 0; + int accumulation = CHAR_getInt(charindex, CHAR_GAMBLENUM); + char tmpbuf[256]; + for (i = 0; i < MAXSTAKENUM; i++) + { + if (CHAR_getWorkInt(charindex, CHAR_WORKSTAKETYPE1 + i) == wincasinotype) + { + int j = 0; + for (j = 0; j < arraysizeof(casinomap); j++) + { + if (casinomap[j].casinotype == wincasinotype) + { +#ifdef _FIX_GAMBLENUM + // 加 原本积分及WIN积分 + accumulation = accumulation + casinomap[j].accumulation * 2; +#else + accumulation += casinomap[j].accumulation; +#endif + CHAR_setWorkInt(charindex, CHAR_WORKSTAKETYPE1 + i, 0); + break; + } + } + } + + else if (CHAR_getWorkInt(charindex, CHAR_WORKSTAKETYPE1 + i) != 0) + { + int j = 0; + for (j = 0; j < arraysizeof(casinomap); j++) + { + if (casinomap[j].casinotype == CHAR_getWorkInt(charindex, CHAR_WORKSTAKETYPE1 + i)) + { +#ifndef _FIX_GAMBLENUM + accumulation -= casinomap[j].accumulation; +#endif + CHAR_setWorkInt(charindex, CHAR_WORKSTAKETYPE1 + i, 0); + break; + } + } + } + } + CHAR_setWorkInt(charindex, CHAR_WORKSTAKEFLAG, 0); + if (accumulation < 0) + accumulation = 0; + else if (accumulation > MAXACCUMULATION) + accumulation = MAXACCUMULATION; + CHAR_setInt(charindex, CHAR_GAMBLENUM, accumulation); + snprintf(tmpbuf, sizeof(tmpbuf), "您现在总共有%4d点游乐场积分", accumulation); + CHAR_talkToCli(charindex, npcindex, tmpbuf, CHAR_COLORWHITE); + return 1; +} + +int CasinoPay(int npcindex, int wincasinotype) +{ + int npcfloor = CHAR_getInt(npcindex, CHAR_FLOOR); + int i = 0; + int playernum = CHAR_getPlayerMaxNum(); + if (wincasinotype < 0) return FALSE; + for (i = 0; i < playernum; i++) + { + if (CHAR_getCharUse(i) == FALSE) continue; + if (!CHAR_CHECKINDEX(i)) continue; + if (CHAR_getInt(i, CHAR_FLOOR) == npcfloor) + { + // 查询玩家是否有下注 + if (CHAR_getWorkInt(i, CHAR_WORKSTAKEFLAG) == 0) + continue; + // 计算积分 + CasinoAccumulation(i, npcindex, npcfloor, wincasinotype); + } + } + // 清除此层地面彩券 + for (i = 0; i < arraysizeof(casinomap); i++) + { + OBJECT object; + if (casinomap[i].casinofl != npcfloor) continue; + for (object = MAP_getTopObj(casinomap[i].casinofl, casinomap[i].casinox, + casinomap[i].casinoy); object; object = NEXT_OBJECT(object)) + { + int index = GET_OBJINDEX(object); + int objtype = OBJECT_getType(index); + int itemindex = OBJECT_getIndex( index); + if (objtype == OBJTYPE_NOUSE) continue; + else if (objtype == OBJTYPE_ITEM) + { + if(ITEM_getInt(itemindex, ITEM_ID) == CASINOTOKENID) + { + OBJECT_setIndex(index, 0); + CHAR_ObjectDelete(index); + } + } + } + casinomap[i].stakenum = 0; + } + return TRUE; +} +#endif + + diff --git a/gmsv/char/char_item.c.bak b/gmsv/char/char_item.c.bak new file mode 100644 index 0000000..0356076 --- /dev/null +++ b/gmsv/char/char_item.c.bak @@ -0,0 +1,2355 @@ +#include "version.h" +#include + +#include "readmap.h" +#include "map_deal.h" +#include "object.h" +#include "char.h" +#include "char_base.h" +#include "item.h" +#include "lssproto_serv.h" +#include "handletime.h" +#include "log.h" +#include "item_event.h" +#include "battle.h" +#include "petmail.h" +#ifdef _MARKET_TRADE +#include "item_trade.h" +#endif +#ifdef _DROPSTAKENEW +#define CASINOTOKENID 20121 // 游乐场彩券代号 +#define MAXCASINOMAPNUM 150 // 游乐场地图上限 +#define MAXACCUMULATION 1000000 // 积分上限 +typedef struct tagCasinoMapTable +{ + int casinofl; // 游乐场图层 + int casinox; // 游乐场X座标 + int casinoy; // 游乐场Y座标 + int casinotype; // 赌注类型 + int dropflag; // 是否可下注 flag + char casinoinfo[64]; // 赌注类型说明 + int accumulation; // 积分 + int stakenum; // 彩券数量 +}CasinoMapTable; +CasinoMapTable casinomap[MAXCASINOMAPNUM] = +{ + { 7008, 13, 13, DICE_BIG, 1, "骰子-大", 1, 0}, + { 7008, 14, 13, DICE_BIG, 1, "骰子-大", 1, 0}, + { 7008, 15, 13, DICE_BIG, 1, "骰子-大", 1, 0}, + { 7008, 16, 13, DICE_BIG, 1, "骰子-大", 1, 0}, + { 7008, 17, 13, DICE_BIG, 1, "骰子-大", 1, 0}, + { 7008, 13, 14, DICE_BIG, 1, "骰子-大", 1, 0}, + { 7008, 14, 14, DICE_BIG, 1, "骰子-大", 1, 0}, + { 7008, 15, 14, DICE_BIG, 1, "骰子-大", 1, 0}, + { 7008, 16, 14, DICE_BIG, 1, "骰子-大", 1, 0}, + { 7008, 17, 14, DICE_BIG, 1, "骰子-大", 1, 0}, + { 7008, 13, 15, DICE_BIG, 1, "骰子-大", 1, 0}, + { 7008, 14, 15, DICE_BIG, 1, "骰子-大", 1, 0}, + { 7008, 15, 15, DICE_BIG, 1, "骰子-大", 1, 0}, + { 7008, 16, 15, DICE_BIG, 1, "骰子-大", 1, 0}, + { 7008, 17, 15, DICE_BIG, 1, "骰子-大", 1, 0}, + { 7008, 8, 13, DICE_SMALL, 1, "骰子-小", 1, 0}, + { 7008, 9, 13, DICE_SMALL, 1, "骰子-小", 1, 0}, + { 7008, 10, 13, DICE_SMALL, 1, "骰子-小", 1, 0}, + { 7008, 11, 13, DICE_SMALL, 1, "骰子-小", 1, 0}, + { 7008, 12, 13, DICE_SMALL, 1, "骰子-小", 1, 0}, + { 7008, 8, 14, DICE_SMALL, 1, "骰子-小", 1, 0}, + { 7008, 9, 14, DICE_SMALL, 1, "骰子-小", 1, 0}, + { 7008, 10, 14, DICE_SMALL, 1, "骰子-小", 1, 0}, + { 7008, 11, 14, DICE_SMALL, 1, "骰子-小", 1, 0}, + { 7008, 12, 14, DICE_SMALL, 1, "骰子-小", 1, 0}, + { 7008, 8, 15, DICE_SMALL, 1, "骰子-小", 1, 0}, + { 7008, 9, 15, DICE_SMALL, 1, "骰子-小", 1, 0}, + { 7008, 10, 15, DICE_SMALL, 1, "骰子-小", 1, 0}, + { 7008, 11, 15, DICE_SMALL, 1, "骰子-小", 1, 0}, + { 7008, 12, 15, DICE_SMALL, 1, "骰子-小", 1, 0}, + + { 7005, 22, 21, PET_RACE1, 1, "竞速场-宠物1", 2, 0}, + { 7005, 23, 21, PET_RACE1, 1, "竞速场-宠物1", 2, 0}, + { 7005, 24, 21, PET_RACE1, 1, "竞速场-宠物1", 2, 0}, + { 7005, 25, 21, PET_RACE1, 1, "竞速场-宠物1", 2, 0}, + { 7005, 26, 21, PET_RACE1, 1, "竞速场-宠物1", 2, 0}, + { 7005, 27, 21, PET_RACE1, 1, "竞速场-宠物1", 2, 0}, + { 7005, 28, 21, PET_RACE1, 1, "竞速场-宠物1", 2, 0}, + { 7005, 22, 24, PET_RACE2, 1, "竞速场-宠物2", 2, 0}, + { 7005, 23, 24, PET_RACE2, 1, "竞速场-宠物2", 2, 0}, + { 7005, 24, 24, PET_RACE2, 1, "竞速场-宠物2", 2, 0}, + { 7005, 25, 24, PET_RACE2, 1, "竞速场-宠物2", 2, 0}, + { 7005, 26, 24, PET_RACE2, 1, "竞速场-宠物2", 2, 0}, + { 7005, 27, 24, PET_RACE2, 1, "竞速场-宠物2", 2, 0}, + { 7005, 28, 24, PET_RACE2, 1, "竞速场-宠物2", 2, 0}, + { 7005, 22, 27, PET_RACE3, 1, "竞速场-宠物3", 2, 0}, + { 7005, 23, 27, PET_RACE3, 1, "竞速场-宠物3", 2, 0}, + { 7005, 24, 27, PET_RACE3, 1, "竞速场-宠物3", 2, 0}, + { 7005, 25, 27, PET_RACE3, 1, "竞速场-宠物3", 2, 0}, + { 7005, 26, 27, PET_RACE3, 1, "竞速场-宠物3", 2, 0}, + { 7005, 27, 27, PET_RACE3, 1, "竞速场-宠物3", 2, 0}, + { 7005, 28, 27, PET_RACE3, 1, "竞速场-宠物3", 2, 0}, + + { 7003, 21, 15, ROULETTE1, 1, "轮盘红1", 1, 0}, { 7003, 17, 15, ROULETTE3, 1, "轮盘红3", 1, 0}, + { 7003, 13, 15, ROULETTE5, 1, "轮盘红5", 1, 0}, { 7003, 21, 21, ROULETTE6, 1, "轮盘红6", 1, 0}, + { 7003, 17, 21, ROULETTE8, 1, "轮盘红8", 1, 0}, { 7003, 15, 21, ROULETTE9, 1, "轮盘红9", 1, 0}, + { 7003, 13, 21, ROULETTE10, 1, "轮盘红10", 1, 0}, { 7003, 13, 18, ROULETTE13, 1, "轮盘红13", 1, 0}, + { 7003, 9, 21, ROULETTE17, 1, "轮盘红17", 1, 0}, { 7003, 21, 18, ROULETTE18, 1, "轮盘红18", 1, 0}, + + { 7003, 19, 15, ROULETTE22, 1, "轮盘绿2", 1, 0}, { 7003, 15, 15, ROULETTE24, 1, "轮盘绿4", 1, 0}, + { 7003, 19, 21, ROULETTE27, 1, "轮盘绿7", 1, 0}, { 7003, 11, 15, ROULETTE31, 1, "轮盘绿11", 1, 0}, + { 7003, 9, 15, ROULETTE32, 1, "轮盘绿12", 1, 0}, { 7003, 11, 18, ROULETTE34, 1, "轮盘绿14", 1, 0}, + { 7003, 9, 18, ROULETTE35, 1, "轮盘绿15", 1, 0}, { 7003, 11, 21, ROULETTE36, 1, "轮盘绿16", 1, 0}, + { 7003, 19, 18, ROULETTE39, 1, "轮盘绿19", 1, 0}, { 7003, 17, 18, ROULETTE40, 1, "轮盘绿20", 1, 0}, + { 7003, 17, 24, ROULETTE41, 1, "轮盘红", 1, 0}, { 7003, 16, 24, ROULETTE41, 1, "轮盘红", 1, 0}, + { 7003, 17, 25, ROULETTE41, 1, "轮盘红", 1, 0}, { 7003, 16, 25, ROULETTE41, 1, "轮盘红", 1, 0}, + { 7003, 14, 24, ROULETTE42, 1, "轮盘绿", 1, 0}, { 7003, 13, 24, ROULETTE42, 1, "轮盘绿", 1, 0}, + { 7003, 14, 25, ROULETTE42, 1, "轮盘绿", 1, 0}, { 7003, 13, 25, ROULETTE42, 1, "轮盘绿", 1, 0}, + + // WON ADD 修正地图上单双的错误 + { 7003, 11, 24, ROULETTE43, 1, "轮盘单", 1, 0}, { 7003, 10, 24, ROULETTE43, 1, "轮盘单", 1, 0}, + { 7003, 11, 25, ROULETTE43, 1, "轮盘单", 1, 0}, { 7003, 10, 25, ROULETTE43, 1, "轮盘单", 1, 0}, + { 7003, 20, 24, ROULETTE44, 1, "轮盘双", 1, 0}, { 7003, 19, 24, ROULETTE44, 1, "轮盘双", 1, 0}, + { 7003, 20, 25, ROULETTE44, 1, "轮盘双", 1, 0}, { 7003, 19, 25, ROULETTE44, 1, "轮盘双", 1, 0}, + + + + { 7003, 20, 15, (ROULETTE1<<16)+ROULETTE22, 1, "双号红1绿2", 1, 0}, + { 7003, 18, 15, (ROULETTE3<<16)+ROULETTE22, 1, "双号红3绿2", 1, 0}, + { 7003, 16, 15, (ROULETTE3<<16)+ROULETTE24, 1, "双号红3绿4", 1, 0}, + { 7003, 14, 15, (ROULETTE5<<16)+ROULETTE24, 1, "双号红5绿4", 1, 0}, + { 7003, 12, 15, (ROULETTE5<<16)+ROULETTE31, 1, "双号红5绿11", 1, 0}, + { 7003, 10, 15, (ROULETTE32<<16)+ROULETTE31, 1, "双号绿12绿11", 1, 0}, + + { 7003, 20, 18, (ROULETTE18<<16)+ROULETTE39, 1, "双号红18绿19", 1, 0}, + { 7003, 18, 18, (ROULETTE40<<16)+ROULETTE39, 1, "双号绿20绿19", 1, 0}, + { 7003, 16, 18, (ROULETTE40<<16)+ROULETTE45, 1, "双号绿20黑00", 1, 0}, + { 7003, 14, 18, (ROULETTE13<<16)+ROULETTE45, 1, "双号红13黑00", 1, 0}, + { 7003, 12, 18, (ROULETTE13<<16)+ROULETTE34, 1, "双号红13绿14", 1, 0}, + { 7003, 10, 18, (ROULETTE35<<16)+ROULETTE34, 1, "双号绿15绿14", 1, 0}, + + { 7003, 20, 21, (ROULETTE6<<16) +ROULETTE27, 1, "双号红6绿7", 1, 0}, + { 7003, 18, 21, (ROULETTE8<<16) +ROULETTE27, 1, "双号红8绿7", 1, 0}, + { 7003, 16, 21, (ROULETTE8<<16) + ROULETTE9, 1, "双号红8红9", 1, 0}, + { 7003, 14, 21, (ROULETTE10<<16)+ ROULETTE9, 1, "双号红10红9", 1, 0}, + { 7003, 12, 21, (ROULETTE10<<16)+ROULETTE36, 1, "双号红10绿16", 1, 0}, + { 7003, 10, 21, (ROULETTE17<<16)+ROULETTE36, 1, "双号红17绿16", 1, 0}, + { 7003, 8, 15, ROULETTE51, 1, "横列1", 1, 0}, //横列 + { 7003, 8, 18, ROULETTE52, 1, "横列2", 1, 0}, + { 7003, 8, 21, ROULETTE53, 1, "横列3", 1, 0}, + { 7003, 6, 15, ROULETTE61, 1, "号码1-10", 1, 0}, //1到10 + { 7003, 5, 15, ROULETTE61, 1, "号码1-10", 1, 0}, + { 7003, 6, 16, ROULETTE61, 1, "号码1-10", 1, 0}, + { 7003, 5, 16, ROULETTE61, 1, "号码1-10", 1, 0}, + { 7003, 24, 15, ROULETTE62, 1, "号码11-20", 1, 0}, //10到11 + { 7003, 23, 15, ROULETTE62, 1, "号码11-20", 1, 0}, + { 7003, 24, 16, ROULETTE62, 1, "号码11-20", 1, 0}, + { 7003, 23, 16, ROULETTE62, 1, "号码11-20", 1, 0}, + { 7003, 15, 18, ROULETTE45, 1, "轮盘(00)", 1, 0}, + +}; +#endif + + +static char CHAR_sendItemBuffer[STRINGBUFSIZ]; +BOOL CHAR_sendItemDataOne( int charaindex, int haveitemindex) +{ + int itemgrp[1]; + itemgrp[0] = haveitemindex; + return CHAR_sendItemData( charaindex, itemgrp, 1); +} + +BOOL CHAR_sendItemData( int charaindex, int *itemgroup, int num) +{ + int i; + int strlength = 0; + int fd; + + if( num <= 0 || num > CHAR_MAXITEMHAVE) return FALSE; + + if( CHAR_getInt(charaindex,CHAR_WHICHTYPE) != CHAR_TYPEPLAYER ) { + return FALSE; + } + for( i = 0; i < num; i ++ ) { + char token[512]; + int itemindex; +DebugPoint = 200; + if( !CHAR_CHECKITEMINDEX( charaindex, itemgroup[i])) { + continue; + } + itemindex = CHAR_getItemIndex( charaindex, itemgroup[i] ); + if( itemindex >= 0 ) { + snprintf( token ,sizeof(token),"%s|" , + ITEM_makeItemStatusString( itemgroup[i],itemindex ) ); + }else { + snprintf( token ,sizeof(token),"%s|" , + ITEM_makeItemFalseStringWithNum( itemgroup[i]) ); + } + strcpysafe( CHAR_sendItemBuffer + strlength, + sizeof(CHAR_sendItemBuffer) - strlength, token ); + strlength += strlen( token ); + if( strlength >= arraysizeof(CHAR_sendItemBuffer) ) { + break; + } + } + dchop( CHAR_sendItemBuffer , "|" ); + fd = getfdFromCharaIndex( charaindex ); + if( fd != -1 ){ + lssproto_I_send( fd, CHAR_sendItemBuffer ); + return TRUE; + } + return FALSE; +} + +static void CHAR_sendItemDetachEvent( int charaindex,int itemid ) +{ + char mesg[256]; + + snprintf( mesg, sizeof( mesg), "卸下%s ", ITEM_getAppropriateName(itemid) ); + CHAR_talkToCli(charaindex,-1,mesg,CHAR_COLORWHITE); +#ifdef _ITEM_METAMO + if( ITEM_getEquipPlace( charaindex, itemid) == CHAR_BODY + && CHAR_getWorkInt( charaindex, CHAR_WORKITEMMETAMO) != 0 ) { + CHAR_setWorkInt( charaindex, CHAR_WORKITEMMETAMO, 0); + CHAR_setWorkInt( charaindex, CHAR_WORKNPCMETAMO, 0 ); //与npc对话後的变身也要变回来 + CHAR_complianceParameter( charaindex); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( charaindex , CHAR_WORKOBJINDEX )); + CHAR_send_P_StatusString( charaindex , CHAR_P_STRING_BASEBASEIMAGENUMBER); + CHAR_talkToCli( charaindex, -1, "变身失效了!", CHAR_COLORWHITE); + } +#endif + { + typedef void (*DETACHFUNC)(int,int); + DETACHFUNC def; + def=(DETACHFUNC)ITEM_getFunctionPointer(itemid,ITEM_DETACHFUNC); + if( def ) { + def( charaindex,itemid ); + } + } +} + +static void CHAR_sendItemAttachEvent( int charaindex,int itemid ) +{ + char mesg[256]; + snprintf( mesg, sizeof( mesg), "装备%s ", + ITEM_getAppropriateName(itemid) ); + CHAR_talkToCli(charaindex,-1,mesg,CHAR_COLORWHITE); + { + typedef void (*ATTACHFUNC)(int,int); + ATTACHFUNC atf; + atf=(ATTACHFUNC)ITEM_getFunctionPointer(itemid,ITEM_ATTACHFUNC); + if( atf ) + atf( charaindex,itemid ); + } +} + + +int CHAR_findSurplusItemBox( int charaindex ) +{ + int i, remnants=0, itemindex; + for(i=CHAR_STARTITEMARRAY; i< CHAR_MAXITEMHAVE; i++){ + itemindex = CHAR_getItemIndex( charaindex , i ); + if( itemindex == -1 ) remnants++; + } + return remnants; +} + + +static int CHAR_findEmptyItemBoxFromChar( Char* ch ) +{ + int i; + + for( i = CHAR_STARTITEMARRAY ; i < CHAR_MAXITEMHAVE ; i ++ ){ + int itemindex; + itemindex = ch->indexOfExistItems[i]; + if( itemindex == -1 )return i; + } + + return -1; +} + +static int CHAR_findEmptyPoolItemBoxFromChar( Char* ch ) +{ + int i; + for( i=0; iindexOfExistPoolItems[i]; + if( itemindex == -1 ) return i; + } + return -1; +} + +int CHAR_findEmptyPoolItemBox( int index ) +{ + Char* ch; + if( !CHAR_CHECKINDEX( index ) )return -1; + ch = CHAR_getCharPointer(index); + if( ch != NULL ) + return CHAR_findEmptyPoolItemBoxFromChar( ch ); + else + return -1; +} + +int CHAR_findEmptyItemBox( int index ) +{ + Char* ch; + + if( !CHAR_CHECKINDEX( index ) )return -1; + ch = CHAR_getCharPointer(index); + if( ch != NULL ) + return CHAR_findEmptyItemBoxFromChar( ch ); + else + return -1; + +} + +#define LACKOFCLASS {CHAR_talkToCli(index,-1,"能力不足无法装备。",CHAR_COLORWHITE);} +#define CANNOTEQUIP {CHAR_talkToCli(index,-1,"无法装备该项物品。",CHAR_COLORWHITE);} +#define CANNOTEQUIP2 {CHAR_talkToCli(index,-1,"无法同时装备两项同种类的物品。",CHAR_COLORWHITE);} +#define CANNOTEXCHANGE {CHAR_talkToCli(index,-1,"无法交换此两项物品。",CHAR_COLORWHITE);} +#define CANNOTMOVE {CHAR_talkToCli(index,-1,"无法移动该项物品。",CHAR_COLORWHITE);} + +static BOOL CHAR_sendSIToCli( int charindex , int from , int to ) +{ + int fd = getfdFromCharaIndex( charindex ); + if( fd != -1 ){ + lssproto_SI_send( fd , from, to ); + return TRUE; + } + return FALSE; +} + +static BOOL CHAR_moveItemFromItemBoxToEquip( int index, int fromindex, + int toindex ) +{ + int fromid,toid; + int fromeqplace; + BOOL flg = FALSE; + + if( !CHAR_CHECKINDEX( index ) )return FALSE; + + fromid = CHAR_getItemIndex(index,fromindex); + toid = CHAR_getItemIndex(index,toindex); + if( !ITEM_CHECKINDEX( fromid) ) + return FALSE; + + if( CHAR_getInt( index, CHAR_TRANSMIGRATION ) <= 0 ){ + if( ITEM_getInt(fromid,ITEM_LEVEL) > CHAR_getInt(index,CHAR_LV) ){ + LACKOFCLASS; + return FALSE; + } + } +#ifdef _ITEMSET4_TXT + if( CHAR_getInt( index, CHAR_STR) < ITEM_getInt( fromid, ITEM_NEEDSTR) ) return FALSE; + if( CHAR_getInt( index, CHAR_DEX) < ITEM_getInt( fromid, ITEM_NEEDDEX) ) return FALSE; + if( CHAR_getInt( index, CHAR_TRANSMIGRATION) < ITEM_getInt( fromid, ITEM_NEEDTRANS) ) return FALSE; +#ifdef _CHAR_PROFESSION // WON ADD 人物职业 + if( ITEM_getInt( fromid, ITEM_NEEDPROFESSION) != 0 ){ + if( CHAR_getInt( index, PROFESSION_CLASS ) != ITEM_getInt( fromid, ITEM_NEEDPROFESSION) ) + return FALSE; + } +#endif +#endif + +#ifdef _FIXBUG_ATTACKBOW + { + if( CHAR_getWorkInt( index, CHAR_WORKITEMMETAMO) > 0 || + CHAR_getWorkInt( index, CHAR_WORKNPCMETAMO) > 0 + || CHAR_getWorkInt( index, CHAR_WORKFOXROUND ) != -1){ //若是变成小狐狸 + + int armtype = ITEM_getInt( fromid, ITEM_TYPE ); + + if( armtype == ITEM_BOW || armtype == ITEM_BOUNDTHROW || + armtype == ITEM_BREAKTHROW || armtype == ITEM_BOOMERANG) { + CHAR_talkToCli( index, -1, "变身无法使用远距离武器!", CHAR_COLORYELLOW ); + return FALSE; + } + } + } +#endif + +#ifdef _ANGEL_SUMMON + //if( !strcmp( ITEM_getChar( fromid, ITEM_USEFUNC), "ITEM_AngelToken") ) { + if( ITEM_getInt( fromid, ITEM_ID) == ANGELITEM ) { + int mindex; + char nameinfo[64]; + + mindex = checkIfAngel( index); + getMissionNameInfo( index, nameinfo); + if( mindex < 0 || + strcmp( ITEM_getChar( fromid, ITEM_ANGELINFO), missiontable[mindex].angelinfo) || + strcmp( ITEM_getChar( fromid, ITEM_HEROINFO), missiontable[mindex].heroinfo) || + strcmp( ITEM_getChar( fromid, ITEM_ANGELINFO), nameinfo) ) { + + CHAR_talkToCli( index, -1, "这并不是属於你的信物,无法装备。", CHAR_COLORYELLOW ); + return FALSE; + } + } +#endif + + fromeqplace = ITEM_getEquipPlace( index, fromid ); + if( fromeqplace == -1 ){ + CANNOTEQUIP; + return FALSE; + } + //if( BATTLE_GetWepon( charaindex ) != ITEM_BOW ) + + if( fromeqplace == CHAR_DECORATION1 ) { + int checkplace = ( toindex == CHAR_DECORATION1) + ? CHAR_DECORATION2:CHAR_DECORATION1; + int otheritemindex; + + if( toindex == CHAR_DECORATION1 || toindex == CHAR_DECORATION2 ) { + otheritemindex = CHAR_getItemIndex( index, checkplace); + if( ITEM_CHECKINDEX( otheritemindex )) { + int otheritemtype = ITEM_getInt( otheritemindex, ITEM_TYPE); + int myitemtype = ITEM_getInt( CHAR_getItemIndex( index, fromindex) , ITEM_TYPE); + if( otheritemtype == myitemtype) { + if( toid < 0 ) { + CANNOTEQUIP2; + }else { + CANNOTEXCHANGE; + } + return FALSE; + } + } + flg = TRUE; + } + }else { + if( toindex == fromeqplace) flg = TRUE; + } + if( flg ){ + CHAR_setItemIndex(index,toindex,fromid); + CHAR_setItemIndex(index,fromindex,toid); + if( toid != -1 ) { + CHAR_sendItemDetachEvent( index, toid ); + } +#ifdef _CHECK_ITEM_MODIFY + ITEM_checkItemModify( index, fromid); +#endif + CHAR_sendItemAttachEvent( index, fromid ); + CHAR_sendSIToCli( index, fromindex,toindex ); + }else { + CANNOTEQUIP; + return FALSE; + } + +#if 0 //#ifdef _ANGEL_SUMMON + //if( !strcmp( ITEM_getChar( fromid, ITEM_USEFUNC), "ITEM_AngelToken") ) { + if( ITEM_getInt( fromid, ITEM_ID) == ANGELITEM ) { + print(" 装备使者信物 "); + CHAR_talkToCli( index, -1, "你受到了精灵保护,不会被敌人攻击。", CHAR_COLORYELLOW ); + //CHAR_setWorkInt( index, CHAR_WORKANGELMODE, TRUE); + CHAR_sendAngelMark( CHAR_getWorkInt( index, CHAR_WORKOBJINDEX), 1); + } +#endif + + return TRUE; +} + +static BOOL CHAR_moveItemFromEquipToItemBox(int index, int fromindex, + int toindex) +{ + int fromid,toid; + + if( !CHAR_CHECKINDEX( index )) return FALSE; + + fromid = CHAR_getItemIndex(index,fromindex); + toid = CHAR_getItemIndex(index,toindex); + if( fromid < 0 ) + return FALSE; + else if( toid < 0 ){ + CHAR_setItemIndex(index,toindex,fromid); + CHAR_setItemIndex(index,fromindex,-1); + CHAR_sendItemDetachEvent( index,fromid ); + CHAR_sendSIToCli( index,fromindex,toindex); +#if 0 //#ifdef _ANGEL_SUMMON + //if( !strcmp( ITEM_getChar( fromid, ITEM_USEFUNC), "ITEM_AngelToken") ) { + if( ITEM_getInt( fromid, ITEM_ID) == ANGELITEM ) { + print(" 卸下使者信物 "); + CHAR_setWorkInt( index, CHAR_WORKANGELMODE, FALSE); + CHAR_sendAngelMark( CHAR_getWorkInt( index, CHAR_WORKOBJINDEX), 0); + } +#endif + return TRUE; + } + + return CHAR_moveItemFromItemBoxToEquip(index, toindex,fromindex); +} + +#ifdef _ITEM_PILENUMS +int CHAR_getMyMaxPilenum( int charaindex) +{ + int maxpile; + maxpile = CHAR_getInt( charaindex, CHAR_TRANSMIGRATION) + + (CHAR_getInt( charaindex, CHAR_TRANSMIGRATION)/5) * 2 + 3; + +/* +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + maxpile += CHAR_getInt( charaindex, ATTACHPILE ); +#endif +*/ + +#ifdef _EQUIT_ADDPILE + maxpile += CHAR_getWorkInt( charaindex, CHAR_WORKATTACHPILE); + maxpile = (maxpile<0)?0:maxpile; +#endif + return maxpile; +} + +BOOL CHAR_PileItemFromItemBoxToItemBox( int charaindex, int fromindex, int toindex) +{ + int maxpile, fromid, toid; + if( !CHAR_CHECKINDEX( charaindex) ) return FALSE; + fromid = CHAR_getItemIndex( charaindex, fromindex); + toid = CHAR_getItemIndex( charaindex, toindex); + + maxpile = CHAR_getMyMaxPilenum( charaindex); + + if( ITEM_CHECKINDEX( toid) && ITEM_CHECKINDEX( fromid) && + (ITEM_getInt( toid, ITEM_ID) == ITEM_getInt( fromid, ITEM_ID)) && + (ITEM_getInt( toid, ITEM_CANBEPILE) == 1) && + (ITEM_getInt( toid, ITEM_USEPILENUMS) < maxpile) && + (ITEM_getInt( fromid, ITEM_USEPILENUMS) < maxpile) ){ + int formpilenum , pilenum, defpilenum; + + pilenum = ITEM_getInt( toid, ITEM_USEPILENUMS); + formpilenum = ITEM_getInt( fromid, ITEM_USEPILENUMS); + defpilenum = ((maxpile-pilenum)>formpilenum)? formpilenum:(maxpile-pilenum); + formpilenum = formpilenum - defpilenum; + pilenum = pilenum + defpilenum; + ITEM_setInt( toid, ITEM_USEPILENUMS, pilenum); + ITEM_setInt( fromid, ITEM_USEPILENUMS, formpilenum); + + if( formpilenum <= 0 ){ + CHAR_setItemIndex( charaindex, fromindex ,-1); + ITEM_endExistItemsOne( fromid); + } + return TRUE; + } + return FALSE; +} +#endif + +static BOOL CHAR_moveItemFromItemBoxToItemBox( int index, int fromindex, int toindex) +{ + int fromid, toid; + + if( !CHAR_CHECKINDEX( index ) ) return FALSE; +#ifdef _ITEM_PILENUMS + if( CHAR_PileItemFromItemBoxToItemBox( index, fromindex, toindex) == TRUE ){ + CHAR_sendItemDataOne( index, toindex); + CHAR_sendItemDataOne( index, fromindex); + return TRUE; + } +#endif + fromid = CHAR_getItemIndex( index, fromindex); + toid = CHAR_getItemIndex( index, toindex); + + CHAR_setItemIndex(index,toindex, CHAR_setItemIndex( index, fromindex, toid)); + CHAR_sendSIToCli( index,fromindex,toindex); + + return TRUE; +} + +void CHAR_moveEquipItem( int index, int fromindex, int toindex ) +{ +#define MOVEITEM_NONE 0 +#define MOVEITEM_EQUIPTOITEM 1 << 0 +#define MOVEITEM_ITEMTOEQUIP 1 << 1 +#define MOVEITEM_ITEMTOITEM 1 << 2 + + int fromid; /* item 匹及奶件犯永弁旦 */ + + + unsigned int moved_any = 0; + while( 1) { + if( !CHAR_CHECKINDEX( index ) )break; + if( CHAR_getFlg( index,CHAR_ISDIE ) )break; + if( fromindex < 0 || fromindex >= CHAR_MAXITEMHAVE || + toindex < 0 || toindex >= CHAR_MAXITEMHAVE ) + break; + + fromid = CHAR_getItemIndex(index,fromindex); + if( fromid == -1 || fromid == -2 )break; + if( fromindex == toindex )break; + if( fromindex < CHAR_EQUIPPLACENUM ){ + if( toindex < CHAR_EQUIPPLACENUM ){ + if( CHAR_getItemIndex(index,toindex) < 0 ){ + CANNOTMOVE; + }else{ + CANNOTEXCHANGE; + } + + }else { + moved_any |= CHAR_moveItemFromEquipToItemBox( + index, fromindex, toindex ) + ? MOVEITEM_EQUIPTOITEM : MOVEITEM_NONE; + if( moved_any & MOVEITEM_EQUIPTOITEM) { + char category[3]; + snprintf( category,sizeof( category),"J%d", fromindex); + CHAR_sendStatusString( index , category); + } + } + }else{ + if( toindex < CHAR_EQUIPPLACENUM ) { + moved_any |= CHAR_moveItemFromItemBoxToEquip( + index, fromindex , toindex ) + ? MOVEITEM_ITEMTOEQUIP : MOVEITEM_NONE; + if( moved_any & MOVEITEM_ITEMTOEQUIP) { + char category[3]; + snprintf( category,sizeof( category),"J%d", toindex); + CHAR_sendStatusString( index , category); + } + }else { + moved_any |= CHAR_moveItemFromItemBoxToItemBox( index,fromindex,toindex ) + ? MOVEITEM_ITEMTOITEM : MOVEITEM_NONE; + } + } + CHAR_complianceParameter( index ); + CHAR_sendCToArroundCharacter(CHAR_getWorkInt(index, CHAR_WORKOBJINDEX)); + break; + } + + if( (moved_any & MOVEITEM_EQUIPTOITEM) || (moved_any & MOVEITEM_ITEMTOEQUIP)){ + int i; + CHAR_send_P_StatusString( index, + CHAR_P_STRING_HP|CHAR_P_STRING_MAXHP| + CHAR_P_STRING_MP|CHAR_P_STRING_MAXMP| + CHAR_P_STRING_ATK|CHAR_P_STRING_DEF| + CHAR_P_STRING_QUICK|CHAR_P_STRING_CHARM| + CHAR_P_STRING_LUCK|CHAR_P_STRING_EARTH| + CHAR_P_STRING_WATER|CHAR_P_STRING_FIRE| + CHAR_P_STRING_WIND + ); + if( CHAR_getWorkInt( index,CHAR_WORKBATTLEMODE ) == BATTLE_CHARMODE_NONE ){ + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ) { + int petindex = CHAR_getCharPet( index, i); + if( CHAR_CHECKINDEX( petindex) ) { + char category[3]; + CHAR_complianceParameter( petindex ); + snprintf( category, sizeof( category), "K%d",i); + CHAR_sendStatusString( index, category ); + } + } + } + + } + if( !moved_any ) { + CHAR_sendSIToCli( index,-1,-1); + } +} + +int CHAR_addItemToChar( Char* ch, int itemid ) +{ + int itembox; + itembox = CHAR_findEmptyItemBoxFromChar( ch ); + if( itembox == -1 )return -1; + + return ch->indexOfExistItems[itembox]=ITEM_makeItemAndRegist(itemid); +} + +int CHAR_addItem( int charaindex, int itemid ) +{ + Char* ch; + ch = CHAR_getCharPointer(charaindex); + if( ch != NULL ){ + int ret = CHAR_addItemToChar( ch,itemid ); + if( ret == -1 )return ret; + ITEM_setWorkInt(ret,ITEM_WORKCHARAINDEX,charaindex); + ITEM_setWorkInt(ret,ITEM_WORKOBJINDEX,-1); + return ret; + }else + return -1; +} + + +void CHAR_ItemUse( int charaindex, int to_charaindex, int haveitemindex ) +{ + void (*usefunc)(int,int,int)=NULL; + int itemindex; + if( !CHAR_CHECKINDEX( charaindex ) ){ + print( "ANDY charaindex=%d err\n", charaindex); + return; + } + if( CHAR_CHECKITEMINDEX( charaindex, haveitemindex) == FALSE ){ + print( "ANDY haveitemindex=%d err\n", haveitemindex); + return; + } + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if( CHAR_getFlg( charaindex, CHAR_ISDIE ) ){ + print( "ANDY charaindex=%d is CHAR_ISDIE err\n", charaindex); + return; + } +#ifdef _STREET_VENDOR + // 摆摊中不可使用道具 + if(CHAR_getWorkInt(charaindex,CHAR_WORKSTREETVENDOR) > -1){ + print("StreetVendor use item charaindex=%d,name=%s\n",charaindex,CHAR_getChar(charaindex,CHAR_NAME)); + return; + } +#endif + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE ) { + if( CHAR_getInt( to_charaindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER) { + int action = ITEM_getInt( itemindex, ITEM_USEACTION); + if( action != -1 ) { + CHAR_sendAction( to_charaindex, action, TRUE); + } + } + } + //不等於料理 和 其他 + if( ITEM_getInt( itemindex,ITEM_TYPE) != ITEM_OTHER && + ITEM_getInt( itemindex,ITEM_TYPE) != ITEM_DISH ) { + CHAR_EquipPlace ep; + + ep = ITEM_getEquipPlace( charaindex, itemindex ); + if( ep == -1 )return; + if( ep == CHAR_DECORATION1 ) { + int flg = FALSE; + int toitemindex1 = CHAR_getItemIndex( charaindex, ep); + int toitemindex2 = CHAR_getItemIndex( charaindex, CHAR_DECORATION2); + int searchindex = -1; + int fromitemtype = ITEM_getInt( itemindex, ITEM_TYPE); + + if( !ITEM_CHECKINDEX( toitemindex1)) searchindex = toitemindex2; + else if(!ITEM_CHECKINDEX( toitemindex2)) searchindex = toitemindex1; + if( searchindex != -1 ) { + if( fromitemtype != ITEM_getInt( searchindex, ITEM_TYPE)) { + flg = TRUE; + ep = ( searchindex == toitemindex1) + ? CHAR_DECORATION2:CHAR_DECORATION1; + } + } + if( !flg) { + if( fromitemtype != ITEM_getInt( toitemindex2, ITEM_TYPE)) { + ep = CHAR_DECORATION1; + }else if( fromitemtype != ITEM_getInt( toitemindex1, ITEM_TYPE)) { + ep = CHAR_DECORATION2; + }else { + ep = CHAR_DECORATION1; + } + } + } + CHAR_moveEquipItem( charaindex, haveitemindex,ep ); + return; + } + + usefunc = (void(*)(int,int,int)) + ITEM_getFunctionPointer( itemindex,ITEM_USEFUNC ); + if( usefunc ){ + { + LogItem( + CHAR_getChar( charaindex, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( charaindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), /* 失奶 丞 寞 */ +#endif + "Use(使用道具)", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + } + usefunc(charaindex, to_charaindex, haveitemindex); + }else{ + char ansmsg[256]; + strcpysafe( ansmsg, sizeof(ansmsg), + "什麽也没有发生。"); + CHAR_talkToCli( charaindex, -1, ansmsg, CHAR_COLORWHITE ); + } +} + +BOOL CHAR_DropItemFXY( int charaindex, int itemcharaindex, int fl, + int x, int y, int* objindex ) +{ + int itemindex; + itemindex = CHAR_getItemIndex(charaindex,itemcharaindex); + if( ITEM_CHECKINDEX(itemindex) == FALSE )return -3; + if( MAP_walkAbleFromPoint( fl,x,y, FALSE ) == FALSE ){ + return -2; + } + + { + OBJECT object; + for( object=MAP_getTopObj(fl,x,y) ; object; object = NEXT_OBJECT(object ) ){ + int objindex = GET_OBJINDEX(object); + switch( OBJECT_getType(objindex) ){ + case OBJTYPE_NOUSE: + break; + case OBJTYPE_ITEM: +#ifdef _DROPSTAKENEW + if(ITEM_getInt(itemindex, ITEM_ID) == CASINOTOKENID) + { + int i = 0; + int dropflag = 0; + ITEM_Item *itm; + for(i = 0; i < arraysizeof(casinomap); i++){ + if(CHAR_getInt(charaindex, CHAR_FLOOR) == casinomap[i].casinofl){ + if(x == casinomap[i].casinox && y == casinomap[i].casinoy){ + dropflag = 1; + break; + } + } + } + if(dropflag == 1){ + if( (itm = ITEM_getItemPointer( itemindex)) == NULL ) return -1; + strcpysafe( itm->string[ITEM_WATCHFUNC].string, + sizeof(itm->string[ITEM_WATCHFUNC].string), "ITEM_DeleteTimeWatched" ); + + break; + }else{ + + return -1; + } + } +#endif + case OBJTYPE_GOLD: + { + + return -1; + } + case OBJTYPE_CHARA: + { + typedef BOOL (*ITEMPUTFUNC)(int,int); + ITEMPUTFUNC ipfunc; + ipfunc = (ITEMPUTFUNC)CHAR_getFunctionPointer( + OBJECT_getIndex(objindex),CHAR_ITEMPUTFUNC) ; + + if( ipfunc && ipfunc(OBJECT_getIndex(objindex), + itemindex) == TRUE) + return -3; + break; + } + default: + break; + } + } + + *objindex = CHAR_DropItemAbsolute( itemindex,fl,x,y, FALSE ); + + if( *objindex == -1 ) + return -3; + { + LogItem( + CHAR_getChar( charaindex, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( charaindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), /* 失奶 丞 寞 */ +#endif + "Drop(丢出道具)", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + + ); + } + return 0; + } +} + + +#ifdef _ITEM_PILENUMS //andy_edit 2003/04/01 + +void CHAR_SendDropItem_Stats( int charaindex, int itemindex, int itemcharaindex, int flg) +{ + if( flg == 1 ){ + CHAR_setItemIndex( charaindex, itemcharaindex , -1); + } + CHAR_sendItemDataOne( charaindex, itemcharaindex); + + if( CHAR_complianceParameter( charaindex ) ){ + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX)); + } + + if( 0 <= itemcharaindex && itemcharaindex < CHAR_STARTITEMARRAY && + CHAR_getInt( charaindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER ){ //如果丢弃物为装备 + if( ITEM_CHECKINDEX( itemindex) ) + CHAR_sendItemDetachEvent( charaindex, itemindex ); + + CHAR_send_P_StatusString( charaindex, + CHAR_P_STRING_HP|CHAR_P_STRING_MAXHP| + CHAR_P_STRING_MP|CHAR_P_STRING_MAXMP| + CHAR_P_STRING_ATK|CHAR_P_STRING_DEF| + CHAR_P_STRING_QUICK|CHAR_P_STRING_CHARM| + CHAR_P_STRING_LUCK|CHAR_P_STRING_EARTH| + CHAR_P_STRING_WATER|CHAR_P_STRING_FIRE| + CHAR_P_STRING_WIND ); + +#if 0 //#ifdef _ANGEL_SUMMON + if( ITEM_getInt( itemindex, ITEM_ID) == ANGELITEM ) { + print(" 卸下使者信物 "); + CHAR_setWorkInt( index, CHAR_WORKANGELMODE, FALSE); + CHAR_sendAngelMark( CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX), 0); + } +#endif + + } +} +#ifdef _DROPSTAKENEW +void CHAR_DropStakeByDropItem( int charaindex, int itemcharaindex, int itemindex, int fl, int x, int y) +{ + int j, k, casinoflag = 0, dropflag; + char tmpbuf[256]; + dropflag = CHAR_getWorkInt( charaindex, CHAR_WORKSTAKEFLAG); + if( dropflag >= MAXSTAKENUM){ + snprintf( tmpbuf, sizeof( tmpbuf), "你已经下注五次了,无法再下注!"); + CHAR_talkToCli(charaindex, -1, tmpbuf, CHAR_COLORYELLOW); + return; + } + for (j = 0; j < arraysizeof( casinomap); j++){ + if( CHAR_getInt( charaindex, CHAR_FLOOR) != casinomap[j].casinofl ) continue; + if( x != casinomap[j].casinox || y != casinomap[j].casinoy ) continue; + if( casinomap[j].dropflag == 0 ){ + CHAR_talkToCli( charaindex, -1, "现在无法下注!", CHAR_COLORYELLOW); + return; + }else{ + int objindex; + objindex = CHAR_DropItemAbsolute( itemindex, fl, x, y, FALSE ); + if( objindex == -1 ) return; + ITEM_setInt( itemindex, ITEM_PUTTIME, NowTime.tv_sec+30*60); + CHAR_sendWatchEvent( objindex, CHAR_ACTSTAND, NULL, 0, TRUE); + casinoflag = 1; + snprintf(tmpbuf, sizeof(tmpbuf), "你在 %s 下注了一张彩券", casinomap[j].casinoinfo); + for(k = 0; k < MAXSTAKENUM; k++){//下注设定 + if(CHAR_getWorkInt(charaindex, CHAR_WORKSTAKETYPE1 + k) != 0) continue; + CHAR_setWorkInt(charaindex, CHAR_WORKSTAKETYPE1 + k, casinomap[j].casinotype); + dropflag++; + break; + } + CHAR_talkToCli(charaindex, -1, tmpbuf, CHAR_COLORYELLOW); +#ifdef _FIX_GAMBLENUM + if (dropflag <= MAXSTAKENUM){ //做扣点的动作 + int nAcc = CHAR_getInt(charaindex, CHAR_GAMBLENUM); + nAcc -= casinomap[j].accumulation; + CHAR_setInt(charaindex, CHAR_GAMBLENUM, nAcc); + } +#endif + dropflag = ( dropflag >= MAXSTAKENUM )?MAXSTAKENUM:dropflag; + CHAR_setWorkInt(charaindex, CHAR_WORKSTAKEFLAG, dropflag); + break; + } + } + + if( casinoflag == 0) return; + LogItem(CHAR_getChar(charaindex, CHAR_NAME), + CHAR_getChar(charaindex, CHAR_CDKEY), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt(itemindex, ITEM_ID), +#endif + "StakeDrop(丢出彩券)", + CHAR_getInt(charaindex,CHAR_FLOOR), + CHAR_getInt(charaindex,CHAR_X), + CHAR_getInt(charaindex,CHAR_Y), + ITEM_getChar(itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + CHAR_SendDropItem_Stats( charaindex, itemindex, itemcharaindex, 1); + +} +#endif + +BOOL CHAR_FindAroundUsabilitySpace( int charaindex, int itemindex, int *fl, int *x, int *y) +{ + int dropx, dropy, i; + BOOL Find = FALSE; + int myfl = CHAR_getInt( charaindex, CHAR_FLOOR); + + for( i = 0 ; i < 8 ; i ++ ){ + OBJECT object; + Find = FALSE; + dropx = CHAR_getInt( charaindex, CHAR_X) + CHAR_getDX( CHAR_getInt( charaindex, CHAR_DIR) + i); + dropy = CHAR_getInt( charaindex, CHAR_Y) + CHAR_getDY( CHAR_getInt( charaindex, CHAR_DIR) + i); + if( MAP_walkAbleFromPoint( myfl, dropx, dropy, FALSE ) == FALSE ) continue; + for( object = MAP_getTopObj( myfl, dropx, dropy) ; object ; object = NEXT_OBJECT(object ) ){ + int objindex = GET_OBJINDEX(object); + if( !CHECKOBJECTUSE( objindex)) continue; + if( OBJECT_getType( objindex) == OBJTYPE_CHARA ){ + typedef BOOL (*ITEMPUTFUNC)(int,int); + ITEMPUTFUNC ipfunc; + ipfunc = (ITEMPUTFUNC)CHAR_getFunctionPointer( OBJECT_getIndex(objindex),CHAR_ITEMPUTFUNC) ; + if( ipfunc && ipfunc( OBJECT_getIndex( objindex), itemindex) == TRUE) + return FALSE; + }else{ + Find = TRUE; + break; + } + } + if( Find == FALSE ){ + *fl = myfl; + *x = dropx; + *y = dropy; + return TRUE; + } + } + return FALSE; +} + +void CHAR_DropItem( int charaindex, int itemcharaindex ) +{ + int itemindex, fl, x, y, ret, objindex, beDropOne = 1; + + if( !CHAR_CHECKINDEX( charaindex ) ) return; + + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ) != BATTLE_CHARMODE_NONE ){ + CHAR_talkToCli( charaindex, -1, "战斗状态中无法丢道具装备。", CHAR_COLORYELLOW ); + return; + } +#ifdef _AVID_TRADETRYBUG //丢道具装备 + if( CHAR_getWorkInt(charaindex, CHAR_WORKTRADEMODE) != CHAR_TRADE_FREE){ + CHAR_talkToCli( charaindex, -1, "交易状态中无法丢道具装备。", CHAR_COLORYELLOW ); + return; + } +#endif + + itemindex = CHAR_getItemIndex( charaindex, itemcharaindex); + if( !ITEM_CHECKINDEX( itemindex)) return; + + if( ITEM_getInt( itemindex, ITEM_ID) == CASINOTOKENID && + ( CHAR_getInt( charaindex, CHAR_FLOOR ) == 7008 || + CHAR_getInt( charaindex, CHAR_FLOOR ) == 7005 || + CHAR_getInt( charaindex, CHAR_FLOOR ) == 7003 ) ){ + + int dropx, dropy, dropfl; + dropfl = CHAR_getInt( charaindex, CHAR_FLOOR); + dropx = CHAR_getInt( charaindex, CHAR_X) + CHAR_getDX( CHAR_getInt( charaindex, CHAR_DIR)); + dropy = CHAR_getInt( charaindex, CHAR_Y) + CHAR_getDY( CHAR_getInt( charaindex, CHAR_DIR)); + CHAR_DropStakeByDropItem( charaindex, itemcharaindex, itemindex, dropfl, dropx, dropy); + return; + } + //找出周围空间 + if( CHAR_FindAroundUsabilitySpace( charaindex, itemindex, &fl, &x, &y) == FALSE ){ + CHAR_talkToCli( charaindex, -1, "周围的地面已经满了。", CHAR_COLORYELLOW ); + return; + } + +#ifdef _ITEM_PILENUMS + if( ITEM_getInt( itemindex, ITEM_CANBEPILE) == 1 && + ITEM_getInt( itemindex, ITEM_USEPILENUMS) > 1 ){ + int ret; + int nums = ITEM_getInt( itemindex, ITEM_USEPILENUMS); + ret = ITEM_makeItemAndRegist( ITEM_getInt( itemindex, ITEM_ID) ); + if( !ITEM_CHECKINDEX( ret)) return; + ITEM_setInt( itemindex, ITEM_USEPILENUMS, nums -1 ); + itemindex = ret; + beDropOne = 0; + } +#endif + //找到空间 + ret = ITEM_eventDrop( itemindex, charaindex, itemcharaindex ); + if( ret == 1 ){ //-1 物品不存在 1 消失 0 一般物品 + CHAR_SendDropItem_Stats( charaindex, itemindex, itemcharaindex, beDropOne); + return; + }else { + objindex = CHAR_DropItemAbsolute( itemindex, fl, x, y, FALSE ); + if( objindex == -1 ) return; + ITEM_setInt( itemindex, ITEM_PUTTIME, NowTime.tv_sec); + { + LogItem( + CHAR_getChar( charaindex, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( charaindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), /* 失奶 丞 寞 */ +#endif + "Drop(丢出道具)", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + } + CHAR_sendWatchEvent( objindex, CHAR_ACTSTAND, NULL, 0, TRUE); + } + CHAR_SendDropItem_Stats( charaindex, itemindex, itemcharaindex, beDropOne); +} +#else +void CHAR_DropItem( int charaindex, int itemcharaindex ) +{ + int dirx[9],diry[9]; + int i, j; + int floor, objindex=-1; + int droped =0; + int count_item =0, count_chara =0; + int fl, x, y; + int itemindex = CHAR_getItemIndex(charaindex,itemcharaindex); + + if( !CHAR_CHECKINDEX( charaindex ) ) return; + if( !ITEM_CHECKINDEX( itemindex) ) return; +#ifdef _AVID_TRADETRYBUG //丢道具装备 + if( CHAR_getWorkInt(charaindex, CHAR_WORKTRADEMODE) != CHAR_TRADE_FREE){ + CHAR_talkToCli( charaindex, -1, "交易状态中无法丢道具装备。", CHAR_COLORYELLOW ); + return; + } +#endif + +#ifdef _DROPCHECK2 + fl = CHAR_getInt( charaindex, CHAR_FLOOR); + x = CHAR_getInt( charaindex, CHAR_X); + y = CHAR_getInt( charaindex, CHAR_Y); + + for( i = x-CHAR_DEFAULTSEESIZ/2 ; i <= x+CHAR_DEFAULTSEESIZ/2 ; i++ ){ + for( j = y-CHAR_DEFAULTSEESIZ/2 ; j <= y+CHAR_DEFAULTSEESIZ/2 ; j ++ ){ + OBJECT object; + for( object = MAP_getTopObj(fl,i,j); object ; object = NEXT_OBJECT(object ) ) { + int objindex = GET_OBJINDEX(object); + if( OBJECT_getType(objindex) == OBJTYPE_NOUSE ) continue; + if( OBJECT_getType(objindex) == OBJTYPE_ITEM || OBJECT_getType(objindex) == OBJTYPE_GOLD ) { + count_item++; + } + if( OBJECT_getType(objindex) == OBJTYPE_CHARA ) { + count_chara++; + } + } + } + +#ifdef _DROPSTAKENEW + if(ITEM_getInt(itemindex, ITEM_ID) == CASINOTOKENID){ + int k = 0; + int casinodropflag = 0; + for(k = 0; k < arraysizeof(casinomap); k++){ + if(fl == casinomap[k].casinofl){ + if(x >= casinomap[k].casinox - 1 && x <= casinomap[k].casinox + 1){ + if(y >= casinomap[k].casinoy - 1 && y <= casinomap[k].casinoy + 1){ + casinodropflag = 1; + break; + } + } + } + } + if(casinodropflag == 0){ +#endif + if( count_item > 80 || count_chara > 80 ) { + CHAR_talkToCli( charaindex, -1, "这里的物品已经太多了,不能再丢了。", CHAR_COLORYELLOW ); + return; + } +#ifdef _DROPSTAKENEW + } + } +#endif + } +#endif + + for( i = 1 ; i < 8 ; i ++ ){ + dirx[i] = CHAR_getDX(CHAR_getInt(charaindex,CHAR_DIR) + i); + diry[i] = CHAR_getDY(CHAR_getInt(charaindex,CHAR_DIR) + i); + } + dirx[0] = CHAR_getDX(CHAR_getInt(charaindex,CHAR_DIR)); + diry[0] = CHAR_getDY(CHAR_getInt(charaindex,CHAR_DIR)); + dirx[8] = 0; + diry[8] = 0; + floor = CHAR_getInt( charaindex,CHAR_FLOOR ); + { + int ret; + if( 0 <= itemcharaindex && itemcharaindex < CHAR_STARTITEMARRAY ){ //如果丢弃物为装备 + CHAR_sendItemDetachEvent( charaindex, itemindex ); + } + ret = ITEM_eventDrop( itemindex, charaindex, itemcharaindex ); + if( ret == 1 ){ //-1 物品不存在 1 消失 0 一般物品 + itemindex = -1; + goto END; + }else if( ret == -1 ){ + print( "%s:%d err\n", __FILE__,__LINE__); + return; + }else{ + ; + } + } +#ifdef _MARKET_TRADE + { + int user_floor = CHAR_getInt( charaindex, CHAR_FLOOR); + int item_x = CHAR_getInt( charaindex, CHAR_X)+dirx[0]; + int item_y = CHAR_getInt( charaindex, CHAR_Y)+diry[0]; + if( MAP_TRADEDROP( charaindex, itemindex, user_floor, item_x, item_y) == TRUE ) { + return; + } + } +#endif + droped = 0; + for( i = 0 ; i < 9 ; i ++ ){ + int x=CHAR_getInt(charaindex,CHAR_X)+dirx[i]; + int y=CHAR_getInt(charaindex,CHAR_Y)+diry[i]; +#ifdef _DROPSTAKENEW + // 判断物品是否为彩券 + if(ITEM_getInt(itemindex, ITEM_ID) == CASINOTOKENID){ + int j = 0, k = 0; + int bdropstake = 0; + int casinoflag = 0; + for (j = 0; j < arraysizeof(casinomap); j++){ + if (CHAR_getInt(charaindex, CHAR_FLOOR) == casinomap[j].casinofl){ + if (x == casinomap[j].casinox && y == casinomap[j].casinoy){ + char tmpbuf[256]; + int dropflag = CHAR_getWorkInt(charaindex, CHAR_WORKSTAKEFLAG); + casinoflag = 1; + if(casinomap[j].dropflag == 0){ + CHAR_talkToCli(charaindex, -1, "现在无法下注!", CHAR_COLORYELLOW); + return; + }else{ + snprintf(tmpbuf, sizeof(tmpbuf), "你在 %s 下注了一张彩券", casinomap[j].casinoinfo); + if(dropflag >= MAXSTAKENUM){ + snprintf(tmpbuf, sizeof(tmpbuf), "你已经下注五次了,无法再下注!"); + CHAR_talkToCli(charaindex, -1, tmpbuf, CHAR_COLORYELLOW); + return; + } + for(k = 0; k < MAXSTAKENUM; k++){ + if(CHAR_getWorkInt(charaindex, CHAR_WORKSTAKETYPE1 + k) == 0){ + CHAR_setWorkInt(charaindex, CHAR_WORKSTAKETYPE1 + k, casinomap[j].casinotype); + casinomap[j].stakenum = casinomap[j].stakenum + 1; + if(casinomap[j].stakenum >= 100000000) + casinomap[j].stakenum = 100000000; + dropflag++; + if(casinomap[j].stakenum <= 1) + bdropstake = 1; + break; + } + } + } + CHAR_talkToCli(charaindex, -1, tmpbuf, CHAR_COLORYELLOW); +#ifdef _FIX_GAMBLENUM + //做扣点的动作 + if (dropflag <= MAXSTAKENUM){ + int nAcc = CHAR_getInt(charaindex, CHAR_GAMBLENUM); + nAcc -= casinomap[j].accumulation; + CHAR_setInt(charaindex, CHAR_GAMBLENUM, nAcc); + } +#endif + if (dropflag >= MAXSTAKENUM){ + dropflag = 0; + for (k = 0; k < MAXSTAKENUM ; k++){ + if (CHAR_getWorkInt(charaindex, CHAR_WORKSTAKETYPE1 + k) > 0) + dropflag++; + } + CHAR_setWorkInt(charaindex, CHAR_WORKSTAKEFLAG, dropflag); + }else{ + CHAR_setWorkInt(charaindex, CHAR_WORKSTAKEFLAG, dropflag); + } + continue; + } + } + } + + // 此地方的彩券数量超过一张以上 + if(bdropstake == 0 && casinoflag != 0){ + CHAR_setItemIndex(charaindex, itemcharaindex ,-1); + CHAR_sendItemDataOne(charaindex, itemcharaindex); + LogItem(CHAR_getChar(charaindex, CHAR_NAME), + CHAR_getChar(charaindex, CHAR_CDKEY), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt(itemindex, ITEM_ID), +#endif + "StakeDrop(丢出彩券)", + CHAR_getInt(charaindex,CHAR_FLOOR), + CHAR_getInt(charaindex,CHAR_X), + CHAR_getInt(charaindex,CHAR_Y), + ITEM_getChar(itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + + ); + return; + } + } +#endif + { + int ret = CHAR_DropItemFXY( charaindex,itemcharaindex, + CHAR_getInt(charaindex,CHAR_FLOOR), x, y, &objindex ); + switch( ret ){ + case 0: + droped = 1; +#ifdef _ITEM_ORNAMENTS // WON FIX + if( ITEM_getWorkInt( itemindex, ITEM_CANPICKUP) > 0 ){ + ITEM_setInt( itemindex, ITEM_PUTTIME, NowTime.tv_sec + 60*5); + }else{ + ITEM_setInt( itemindex, ITEM_PUTTIME, NowTime.tv_sec); + } +#else + ITEM_setInt( itemindex, ITEM_PUTTIME, NowTime.tv_sec); +#endif + goto END; + break; + case -1: + case -2: + break; + case -3: + default: + return; + break; + } +#ifdef _DROPSTAKENEW + } +#endif + } +#ifdef _DROPCHECK + if( droped != 1 ) { + CHAR_talkToCli( charaindex, -1, "周围的地面已经满了。", CHAR_COLORYELLOW ); + return; + } +#endif +END: + CHAR_sendWatchEvent( objindex, CHAR_ACTSTAND, NULL, 0, TRUE); + CHAR_setItemIndex( charaindex, itemcharaindex ,-1); +{ + char category[3]; + snprintf( category,sizeof( category),"J%d", itemcharaindex); + CHAR_sendStatusString( charaindex , category); +} + if( CHAR_complianceParameter( charaindex ) ){ + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX) ); + } + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER) { + CHAR_send_P_StatusString( charaindex, + CHAR_P_STRING_HP|CHAR_P_STRING_MAXHP| + CHAR_P_STRING_MP|CHAR_P_STRING_MAXMP| + CHAR_P_STRING_ATK|CHAR_P_STRING_DEF| + CHAR_P_STRING_QUICK|CHAR_P_STRING_CHARM| + CHAR_P_STRING_LUCK|CHAR_P_STRING_EARTH| + CHAR_P_STRING_WATER|CHAR_P_STRING_FIRE| + CHAR_P_STRING_WIND + ); + CHAR_sendItemDataOne( charaindex, itemcharaindex); + } + return; +} +#endif + +int CHAR_DropItemAbsolute( int itemindex, int floor, int x, int y, + BOOL net) +{ + Object object; + int objindex; + + if( !ITEM_CHECKINDEX( itemindex) )return FALSE; + + object.type = OBJTYPE_ITEM; + object.index = itemindex; + object.x = x; + object.y = y; + object.floor = floor; + objindex = initObjectOne( &object ); + ITEM_setWorkInt( itemindex,ITEM_WORKOBJINDEX, objindex ); + ITEM_setWorkInt( itemindex,ITEM_WORKCHARAINDEX, -1 ); + if( net ) + CHAR_sendWatchEvent( objindex,CHAR_ACTSTAND,NULL,0,TRUE); + + return objindex; +} + +int CHAR_addItemSpecificItemIndex( int charaindex, int itemindex ) +{ + int emptyindex; + if( CHAR_CHECKINDEX( charaindex) == FALSE) return -1; + if( ITEM_CHECKINDEX( itemindex) == FALSE) return -1; + emptyindex = CHAR_findEmptyItemBox( charaindex ); + if( emptyindex == -1 ){ + return CHAR_MAXITEMHAVE; + }else{ + CHAR_setItemIndex(charaindex,emptyindex,itemindex); + ITEM_setWorkInt(itemindex,ITEM_WORKCHARAINDEX,charaindex); + ITEM_setWorkInt(itemindex,ITEM_WORKOBJINDEX,-1); + } + return emptyindex; +} + +static int CHAR_PickUpItemFXY( int charaindex, int fl ,int x , int y , + int* contents,int* objindex ) +{ + OBJECT object; + + for( object=MAP_getTopObj(fl,x,y) ; object ; object = NEXT_OBJECT(object ) ){ + int index = GET_OBJINDEX(object); + int objtype = OBJECT_getType(index); + if( objtype == OBJTYPE_NOUSE )continue; + else if( objtype == OBJTYPE_ITEM ){ + int ret; + int itemindex = OBJECT_getIndex( index); +#ifdef _MARKET_TRADE //买 + if( ITEM_getWorkInt( itemindex, ITEM_WORKTRADETYPE) == TRADETYPE_SELL ) { + MAP_TRADEPICKUP( charaindex, itemindex, fl, x, y, TRADEITEMTYPE); + return -1; + } +#endif +#ifdef _ITEM_ORNAMENTS + if( ITEM_getWorkInt( itemindex, ITEM_CANPICKUP) > 0 ){ + return -1; + } +#endif +#ifdef _DROPSTAKENEW + // 判断物品是否为彩券 + if(ITEM_getInt(itemindex, ITEM_ID) == CASINOTOKENID){ + int i = 0; + int bdropstake = 0, casinoflag = 0, emptyitemindexinchara = -1; + for(i = 0; i < arraysizeof(casinomap); i++){ + if(fl == casinomap[i].casinofl){ + if(x == casinomap[i].casinox && y == casinomap[i].casinoy){ + int j = 0, stakeflag = 0; + int pickupflag = 0; + casinoflag = 1; + if(casinomap[i].dropflag == 0){ + CHAR_talkToCli(charaindex, -1, "现在已经无法取回下注彩券了!", CHAR_COLORYELLOW); + return -1; + } + stakeflag = CHAR_getWorkInt(charaindex, CHAR_WORKSTAKEFLAG); + if(stakeflag == 0){ + CHAR_talkToCli(charaindex, -1, "您并没有下注,所以无法取回彩券!", CHAR_COLORYELLOW); + return -1; + } + for(j = 0; j < MAXSTAKENUM; j++){ + if(CHAR_getWorkInt(charaindex, CHAR_WORKSTAKETYPE1 + j) == casinomap[i].casinotype){ + emptyitemindexinchara = CHAR_findEmptyItemBox(charaindex); + if(emptyitemindexinchara < 0) return -2; + CHAR_setWorkInt(charaindex, CHAR_WORKSTAKETYPE1 + j, 0); + casinomap[i].stakenum = casinomap[i].stakenum - 1; + stakeflag--; + pickupflag = 1; +#ifdef _FIX_GAMBLENUM + //做加点的动作 + { + int nAcc = CHAR_getInt(charaindex, CHAR_GAMBLENUM); + nAcc += casinomap[i].accumulation; + CHAR_setInt(charaindex, CHAR_GAMBLENUM, nAcc); + } +#endif + if(casinomap[i].stakenum <= 0){ + bdropstake = 1; + casinomap[i].stakenum = 0; + } + break; + } + } + if(stakeflag < 0){ + stakeflag = 0; + for(j = 0; j < MAXSTAKENUM; j++){ + if(CHAR_getWorkInt(charaindex, CHAR_WORKSTAKETYPE1 + j) > 0) + stakeflag++; + } + CHAR_setWorkInt(charaindex, CHAR_WORKSTAKEFLAG, stakeflag); + }else + CHAR_setWorkInt(charaindex, CHAR_WORKSTAKEFLAG, stakeflag); + if(pickupflag == 0){ + CHAR_talkToCli(charaindex, -1, "您没有在此下注,所以无法取回彩券!", CHAR_COLORYELLOW); + return -1; + } + } + } + } + + if(bdropstake == 0 && casinoflag != 0){// 此地方的彩券数量超过一张以上 + char tmpbuf[256]; + if(emptyitemindexinchara != -1){ + int itemid=-1, ret=-1; + itemid = ITEM_makeItemAndRegist(CASINOTOKENID); + if(itemid == -1) return -1; + ret = CHAR_addItemSpecificItemIndex( charaindex, itemid); + if( ret < 0 || ret >= CHAR_MAXITEMHAVE ) { + ITEM_endExistItemsOne( itemid ); + return -1; + } + } + CHAR_sendItemDataOne(charaindex, emptyitemindexinchara); + snprintf(tmpbuf, sizeof(tmpbuf), "拾回%s,已将下注取消!", + ITEM_getChar(itemindex, ITEM_NAME)); + CHAR_talkToCli(charaindex, -1, tmpbuf, CHAR_COLORWHITE); + // 记录捡回记录 + LogItem(CHAR_getChar(charaindex, CHAR_NAME), + CHAR_getChar(charaindex, CHAR_CDKEY), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt(itemindex, ITEM_ID), +#endif + "StakePickUp(捡起彩券)", + CHAR_getInt(charaindex,CHAR_FLOOR), + CHAR_getInt(charaindex,CHAR_X), + CHAR_getInt(charaindex,CHAR_Y), + ITEM_getChar(itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + return -1; + } + } +#endif + ret = CHAR_addItemSpecificItemIndex( charaindex, itemindex ); + if(ret == CHAR_MAXITEMHAVE ){ + return -2; + }else if( ret != -1 ) { + typedef void (*PICKUPFUNC)( int, int); + PICKUPFUNC pickupfunc = NULL; + pickupfunc = (PICKUPFUNC)ITEM_getFunctionPointer( + itemindex, ITEM_PICKUPFUNC); + if( pickupfunc) pickupfunc( charaindex, itemindex); + + *contents = OBJECT_getIndex(index); + *objindex = index; + CHAR_sendItemDataOne( charaindex, ret); + return 0; + } + }else if( objtype == OBJTYPE_GOLD ){ + int MaxGold; + long dropgoldamount = 0, newamountgold = 0, Minus = 0, newgold = 0; + long mygold = (long) CHAR_getInt( charaindex, CHAR_GOLD ); + MaxGold = CHAR_getMaxHaveGold( charaindex); + if ((mygold <0) || (mygold > MaxGold))return -2; + dropgoldamount = OBJECT_getIndex(index); + newamountgold = (unsigned int) CHAR_getInt( charaindex,CHAR_GOLD ) + dropgoldamount; + Minus = newamountgold - MaxGold; + if( Minus > 0 ) { + newgold = Minus; + *contents = dropgoldamount - Minus; + }else { + newgold = 0; + *contents = dropgoldamount; + } + OBJECT_setIndex( index, newgold); + CHAR_setInt( charaindex, CHAR_GOLD, min( newamountgold, MaxGold ) ); + *objindex = index; + return 1; + }else if( objtype == OBJTYPE_CHARA ) { + int pindex = OBJECT_getIndex( index); + if( !CHAR_CHECKINDEX( pindex) ) continue; + if( CHAR_getInt( pindex, CHAR_WHICHTYPE) == CHAR_TYPEPET ) { + int havepetindex = CHAR_getCharPetElement( charaindex); + if( havepetindex == -1 ) { + if( CHAR_getWorkInt( pindex, CHAR_WORKPETFOLLOWMODE) != CHAR_PETFOLLOW_NOW ) + return -3; + } + if( CHAR_getWorkInt( charaindex, CHAR_PickAllPet) != TRUE ) { + if( (CHAR_getInt( pindex, CHAR_LV) - CHAR_getInt( charaindex, CHAR_LV) > 5 ) + && (CHAR_getInt( charaindex, CHAR_TRANSMIGRATION ) <= 0 )) { + return -4; + } + } + /*if( !strcmp( CHAR_getChar( pindex, CHAR_OWNERCDKEY), "SYSTEM_WAYI" ) && + !strcmp( CHAR_getChar( pindex, CHAR_OWNERCHARANAME), "SYSTEM_WAYI" ) ){ + }else{ + if( strcmp( CHAR_getChar( pindex, CHAR_OWNERCDKEY), CHAR_getChar( charaindex, CHAR_CDKEY) ) || + strcmp( CHAR_getChar( pindex, CHAR_OWNERCHARANAME), CHAR_getChar( charaindex, CHAR_NAME) )){ + return -5; + } + }*/ +#ifdef _MARKET_TRADE + if( CHAR_getWorkInt( pindex, CHAR_WORKTRADETYP) == TRADETYPE_SELL ) { //买宠 + MAP_TRADEPICKUP( charaindex, pindex, fl, x, y, TRADEPETTYPE ); + return -1; + } +#endif + if( CHAR_getWorkInt( pindex, CHAR_WORKPETFOLLOWMODE) == CHAR_PETFOLLOW_NOW ){ + CHAR_pickupFollowPet( charaindex, pindex ); + return -1; + } + /*if( CHAR_getInt( pindex, CHAR_MAILMODE) != CHAR_PETMAIL_NONE){ + if( strcmp( CHAR_getChar( pindex, CHAR_OWNERCDKEY), + CHAR_getChar( charaindex, CHAR_CDKEY)) != 0 || + strcmp( CHAR_getChar( pindex, CHAR_OWNERCHARANAME), + CHAR_getChar( charaindex, CHAR_NAME))!= 0 ){ + return -5; + }else if( CHAR_getInt( pindex, CHAR_MAILMODE) != CHAR_PETMAIL_IDLE5){ + return -5; + } + }*/ + if( CHAR_getInt( pindex, CHAR_MAILMODE) != CHAR_PETMAIL_NONE){ + Char *ch; + CHAR_setInt( pindex, CHAR_MAILMODE, CHAR_PETMAIL_NONE); + CHAR_setInt( pindex, CHAR_PETMAILIDLETIME, 0); + PETMAIL_delPetMailTotalnums( 1); //手动捡起mail PET + ch = CHAR_getCharPointer( pindex); + if( ch != NULL ) { + strcpysafe( ch->charfunctable[CHAR_LOOPFUNC].string, + sizeof( ch->charfunctable[CHAR_LOOPFUNC]), ""); + CHAR_constructFunctable( pindex); + } + } + CHAR_setWorkInt( pindex, CHAR_WORKPLAYERINDEX, charaindex); + CHAR_setCharPet( charaindex, havepetindex, pindex); +#ifdef _PET_TALK + if( CHAR_getInt( pindex, CHAR_PETID) != 718 ) { +#endif + CHAR_setChar( pindex, CHAR_OWNERCDKEY, + CHAR_getChar( charaindex, CHAR_CDKEY)); + CHAR_setChar( pindex, CHAR_OWNERCHARANAME, + CHAR_getChar( charaindex, CHAR_NAME)); +#ifdef _PET_TALK + } +#endif + CHAR_complianceParameter( pindex); +{ + char category[3]; + snprintf( category,sizeof( category),"K%d",havepetindex); + CHAR_sendStatusString( charaindex, category); + snprintf( category,sizeof( category),"W%d",havepetindex); + CHAR_sendStatusString( charaindex, category); +} + CHAR_setInt( pindex, CHAR_PUTPETTIME, 0); + *contents = pindex; + *objindex = index; + return 2; + } + } + } + return -1; +} + +void CHAR_PickUpItem( int charaindex, int dir ) +{ + int i; + int dirx[2],diry[2]; + int searchloopcount=0; + + if( !CHAR_CHECKINDEX(charaindex) )return; + if( CHAR_getFlg( charaindex,CHAR_ISDIE ) )return; + if( CHAR_getWorkInt( charaindex,CHAR_WORKBATTLEMODE ) )return; + if( dir < 0 ){ + searchloopcount = 1; + dirx[0] = 0; + diry[0] = 0; + }else{ + if( dir != CHAR_getInt( charaindex, CHAR_DIR)) { + VALIDATEDIR(dir); + CHAR_setInt(charaindex,CHAR_DIR,dir); + CHAR_sendWatchEvent(CHAR_getWorkInt(charaindex,CHAR_WORKOBJINDEX), + CHAR_ACTSTAND,NULL,0,FALSE); + } + dirx[0] = CHAR_getDX(CHAR_getInt(charaindex,CHAR_DIR)); + diry[0] = CHAR_getDY(CHAR_getInt(charaindex,CHAR_DIR)); + dirx[1] = 0; + diry[1] = 0; + searchloopcount=2; + } + for( i = 0 ; i < searchloopcount ; i ++ ){ + int contents,objindex; + int fl = CHAR_getInt(charaindex,CHAR_FLOOR); + + int y = CHAR_getInt(charaindex,CHAR_Y)+diry[i]; + int x = CHAR_getInt(charaindex,CHAR_X)+dirx[i]; + int ret = CHAR_PickUpItemFXY( charaindex,fl,x,y,&contents, + &objindex); + switch( ret ){ + case 0: + CHAR_ObjectDelete(objindex); + { + char mesg[256]; +#ifdef _DROPSTAKENEW + int j = 0; + int dropflag = 0; + for(j = 0; j < arraysizeof(casinomap); j++) + { + if(CHAR_getInt(charaindex, CHAR_FLOOR) == casinomap[j].casinofl) + { + if(x == casinomap[j].casinox && y == casinomap[j].casinoy) + { + dropflag = 1; + break; + } + } + } + if(ITEM_getInt(contents, ITEM_ID) == CASINOTOKENID && dropflag == 1) + snprintf( mesg,sizeof(mesg), "拾回%s,已将下注取消!", + ITEM_getAppropriateName(contents)); + else +#endif + snprintf( mesg,sizeof(mesg), "拾获 %s", + ITEM_getAppropriateName(contents) ); + CHAR_talkToCli(charaindex,-1,mesg,CHAR_COLORWHITE); + } + + { + LogItem( + CHAR_getChar( charaindex, CHAR_NAME ), + CHAR_getChar( charaindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + contents, +#else + ITEM_getInt(contents, ITEM_ID), +#endif + "PickUp(捡起道具)", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + ITEM_getChar( contents, ITEM_UNIQUECODE), + ITEM_getChar( contents, ITEM_NAME), + ITEM_getInt( contents, ITEM_ID) + ); + } + + return; + break; + case 1: + CHAR_send_P_StatusString( charaindex, CHAR_P_STRING_GOLD); + + if( OBJECT_getIndex( objindex) == 0 ) { + CHAR_ObjectDelete(objindex); + }else { + CHAR_sendWatchEvent(objindex,CHAR_ACTSTAND,NULL,0,TRUE); + } + { + char mesg[256]; + if( contents == 0 ) { + snprintf( mesg,sizeof(mesg), "无法再拾获Stone了。" ); + }else { + snprintf( mesg,sizeof(mesg), "拾获 %d Stone",contents ); + } + CHAR_talkToCli(charaindex,-1,mesg,CHAR_COLORWHITE); + } + if( contents != 0 ){ + LogStone( + -1, + CHAR_getChar( charaindex, CHAR_NAME ), + CHAR_getChar( charaindex, CHAR_CDKEY ), + contents, + CHAR_getInt( charaindex, CHAR_GOLD ), + "PickUp(拾获金钱)", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ) + ); + } + return; + break; + case 2: //宠物 + CHAR_ObjectDelete(objindex); + CHAR_setWorkInt( contents, CHAR_WORKOBJINDEX, -1); + { + char mesg[256]; + char *p = NULL; + p = CHAR_getChar( contents, CHAR_USERPETNAME); + if( strlen( p) == 0 ) { + p = CHAR_getChar( contents, CHAR_NAME); + } + + snprintf( mesg,sizeof(mesg), "拾获 %s", p); + CHAR_talkToCli(charaindex,-1,mesg,CHAR_COLORWHITE); + } + // 矢永玄毛胶匀凶夫弘 + LogPet( + CHAR_getChar( charaindex, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( charaindex, CHAR_CDKEY ), + CHAR_getChar( contents, CHAR_NAME), + CHAR_getInt( contents, CHAR_LV), + "PickUp(捡宠)", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + CHAR_getChar( contents, CHAR_UNIQUECODE) // shan 2001/12/14 + ); + return; + break; + // Robin 0701 petFollow + case 3: + + /* 引歹曰卞仇木毛壅六午中丹 */ + CHAR_ObjectDelete(objindex); + CHAR_setWorkInt( contents, CHAR_WORKOBJINDEX, -1); + { + char mesg[256]; + char *p = NULL; + p = CHAR_getChar( contents, CHAR_USERPETNAME); + if( strlen( p) == 0 ) { + p = CHAR_getChar( contents, CHAR_NAME); + } + + snprintf( mesg,sizeof(mesg), "拾回 %s", p); + CHAR_talkToCli(charaindex,-1,mesg,CHAR_COLORWHITE); + } + // 矢永玄毛胶匀凶夫弘 + LogPet( + CHAR_getChar( charaindex, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( charaindex, CHAR_CDKEY ), + CHAR_getChar( contents, CHAR_NAME), + CHAR_getInt( contents, CHAR_LV), + "FollowPickUp(收回溜宠)", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + CHAR_getChar( contents, CHAR_UNIQUECODE) // shan 2001/12/14 + ); + + return; + break; + case -1: + break; + case -2: + CHAR_talkToCli( charaindex,-1,"道具栏已满。", CHAR_COLORYELLOW); + break; + case -3: + CHAR_talkToCli( charaindex,-1,"宠物数已满。", CHAR_COLORYELLOW); + break; + case -4: + CHAR_talkToCli( charaindex,-1,"无法照顾该宠物。", CHAR_COLORYELLOW); + break; + case -5: + CHAR_talkToCli( charaindex,-1,"无法拾获该宠物。", CHAR_COLORYELLOW); + break; + case -6: + CHAR_talkToCli( charaindex,-1,"无法拾获该道具。", CHAR_COLORYELLOW); + break; + default: + return; + } + } + return; +} + +/*------------------------------------------------------------ + * 云嗯毛甄 隙烂匹 公丹午允月[CHAR_DropMoney井日及心匹银丹仪[ + * 娄醒 + * charaindex int 平乓仿奶件犯永弁旦 + * itemindex int 失奶 丞奶件犯永弁旦(平乓仿犯□正及 匹及) + * fl int 白夫失 + * x int x + * y int y + * force BOOL 仇及袄互恳分午 泫 允 + * objindex int* 中凶失奶 丞及 Object 匹及奶件犯弁永旦 + * 忒曰袄 + * 撩 (公氏卅卞云嗯毛 匀化中卅中) -1 + * 撩 (哗溥读卞分户) -2 + * 公木动陆及撩 -3 + * 撩 (公仇卞反公及汹及云嗯反聂允亢月) -4 + * 允匹卞职及失奶 丞互 切化中月 -5 + * 汹互 匹 [ -6 + * 岳 0 + ------------------------------------------------------------*/ +static BOOL CHAR_DropMoneyFXY( int charaindex, int amount, int fl , int x, + int y, BOOL force, int* objindex ) +{ + OBJECT object; + int MaxGold; + int mygold = CHAR_getInt( charaindex, CHAR_GOLD ); + if( amount <= 0 )return -6; + if( amount > mygold ) + return -1; + + MaxGold = CHAR_getMaxHaveGold( charaindex); + if ((mygold <0) || (mygold > MaxGold)) return -1; + + if( MAP_walkAbleFromPoint( fl,x,y,FALSE ) == FALSE )return -2; + for( object=MAP_getTopObj(fl,x,y) ; object; + object = NEXT_OBJECT(object) ){ + int index = GET_OBJINDEX(object); + int objtype = OBJECT_getType(index); + + if( objtype == OBJTYPE_NOUSE ) continue; + else if( objtype == OBJTYPE_GOLD ){ + long tmpamount = OBJECT_getIndex(index) + amount; + if( tmpamount > MaxGold ) + return -4; + OBJECT_setIndex(index,tmpamount); + CHAR_setInt(charaindex,CHAR_GOLD, + (unsigned int)CHAR_getInt(charaindex, + CHAR_GOLD ) + - amount ); + *objindex = index; +#ifdef _DEL_DROP_GOLD + OBJECT_setTime( index, NowTime.tv_sec); +#endif + if( amount >= 100 ){ /* 云嗯毛 中凶夫弘 */ + LogStone(-1,CHAR_getChar( charaindex, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( charaindex, CHAR_CDKEY ), /* 交□扒□ID */ + amount, /* 嗯喊 */ + CHAR_getInt( charaindex, CHAR_GOLD ), + "Drop(放置金钱)", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ) + ); + } + return 0; + }else if( objtype == OBJTYPE_ITEM ){ + if( force==TRUE ) + continue; + else + /* 允匹卞失奶 丞互丐月及匹分户 */ + return -5; + } + } + + /* 仇仇引匹谗琼允月午中丹仪反蕙筋瓒 允月 */ + { + Object one; + one.type = OBJTYPE_GOLD; + one.x = x; + one.y = y; + one.floor = fl; + + if( amount > MaxGold ) + return -4; + + one.index = amount; + *objindex = initObjectOne( &one ); + /* 左皮斥尼弁玄瓒 允月 */ + if( *objindex == -1 ) + /* 瓒 撩 */ + return -3; + + /*云嗯毛蛹日允*/ + CHAR_setInt(charaindex,CHAR_GOLD, + (unsigned int)CHAR_getInt(charaindex,CHAR_GOLD ) + - amount ); +#ifdef _DEL_DROP_GOLD + OBJECT_setTime( *objindex, NowTime.tv_sec); +#endif + if( amount >= 100 ){ /* 云嗯毛 中凶夫弘 */ + LogStone(-1,CHAR_getChar( charaindex, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( charaindex, CHAR_CDKEY ), /* 交□扒□ID */ + amount, /* 嗯喊 */ + CHAR_getInt( charaindex, CHAR_GOLD ), + "Drop(放置金钱)", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ) + ); + } + return 0; + } +} + +/*------------------------------------------------------------ + * 云嗯毛 允楮醒[ 及蟆井日 允[ + * 娄醒 + * charaindex int 平乓仿奶件犯永弁旦 + * amount int 云嗯及汹 + * + * 忒曰袄 + * 卅仄 + ------------------------------------------------------------*/ +void CHAR_DropMoney( int charaindex, int amount ) +{ + int dirx[9],diry[9]; + int ret; + int i; + int objindex, MaxGold; + + if( !CHAR_CHECKINDEX( charaindex ) )return; + +#ifdef _AVID_TRADETRYBUG //丢出石币 + if( CHAR_getWorkInt( charaindex, CHAR_WORKTRADEMODE) == CHAR_TRADE_TRADING ){ + CHAR_talkToCli( charaindex, -1, "交易状态中无法丢出石币。", CHAR_COLORYELLOW ); + return; + } +#endif + + MaxGold = CHAR_getMaxHaveGold( charaindex); + if( CHAR_getFlg( charaindex,CHAR_ISDIE ) )return; + + //ANDY_ADD 12/28 + { + int money=0; + money = CHAR_getInt( charaindex, CHAR_GOLD ); + if( money < 0 ) { + CHAR_setInt( charaindex, CHAR_GOLD, 0); + return; + } + if( (amount > money) || (money > MaxGold)) { + if( money > MaxGold ) { + CHAR_setInt( charaindex, CHAR_GOLD, 0 ); + print("\n ERR: %s(stone%d) dropMoney%d > CHAR_MAXGOLDHAVE !!", + CHAR_getChar(charaindex, CHAR_CDKEY), money, amount); + }else { + print("\n ERR: %s dropMoney > CHAR_GOLD !!", CHAR_getChar(charaindex, CHAR_CDKEY)); + } + CHAR_send_P_StatusString( charaindex, CHAR_P_STRING_GOLD); + return; + } + } + //ANDY_END + for( i = 0 ; i < 7 ; i ++ ){ + dirx[i+2] = CHAR_getDX( CHAR_getInt(charaindex,CHAR_DIR) + i+1 ); + diry[i+2] = CHAR_getDY( CHAR_getInt(charaindex,CHAR_DIR) + i+1 ); + } + + dirx[0] = CHAR_getDX(CHAR_getInt(charaindex,CHAR_DIR)); + diry[0] = CHAR_getDY(CHAR_getInt(charaindex,CHAR_DIR)); + dirx[1] = 0; + diry[1] = 0; + + for( i = 0 ; i < 9 ; i ++ ){ + int x = CHAR_getInt(charaindex,CHAR_X) + dirx[i]; + int y = CHAR_getInt(charaindex,CHAR_Y) + diry[i]; + +// CoolFish 2002/04/06 下注处不可丢置石币 +#ifdef _DROPSTAKENEW + { + int j = 0; + for(j = 0; j < arraysizeof(casinomap); j++) + { + if(CHAR_getInt(charaindex, CHAR_FLOOR) == casinomap[j].casinofl) + { + if (x == casinomap[j].casinox && y == casinomap[j].casinoy) + { + CHAR_talkToCli(charaindex, -1, "这里不能放置石币!", CHAR_COLORYELLOW); + return; + } + } + } + } +#endif + ret = CHAR_DropMoneyFXY( charaindex,amount, + CHAR_getInt(charaindex,CHAR_FLOOR), + x,y, FALSE, &objindex ); + switch( ret ){ + case 0: + goto END; + break; + case -1: + return; + break; + case -3: + return; + break; + case -2: + case -4: + case -5: + case -6: + break; + default: + break; + } + } + + { + int x = CHAR_getInt(charaindex,CHAR_X) + dirx[1]; + int y = CHAR_getInt(charaindex,CHAR_Y) + diry[1]; + + ret = CHAR_DropMoneyFXY( charaindex,amount, + CHAR_getInt(charaindex,CHAR_FLOOR), + x,y, TRUE, &objindex ); + switch( ret ){ + case 0: + goto END; + break; + case -1: + break; + case -3: + return; + break; + case -2: + case -4: + case -5: + break; + default: + break; + } + return; + } + +END: + CHAR_sendWatchEvent(objindex,CHAR_ACTSTAND,NULL,0,TRUE ); + CHAR_send_P_StatusString( charaindex, CHAR_P_STRING_GOLD); + return; +} + +static int CHAR_findEmptyItemBoxNoFromChar( Char* ch ) +{ + int i, j=0;; + for( i = CHAR_STARTITEMARRAY ; i < CHAR_MAXITEMHAVE ; i ++ ){ + int itemindex; + itemindex = ch->indexOfExistItems[i]; + if( itemindex == -1 ) j++; + } + return j; +} + +int CHAR_findEmptyItemBoxNo( int index ) +{ + Char* ch; + + if( !CHAR_CHECKINDEX( index ) )return -1; + ch = CHAR_getCharPointer(index); + if( ch != NULL ) + return CHAR_findEmptyItemBoxNoFromChar( ch ); + else + return -1; + +} + +// CoolFish: Trade 2001/4/4 +int CHAR_findTotalEmptyItem( int index ) +{ + int i, totaleptitem = 0; + Char* ch; + + if( !CHAR_CHECKINDEX( index ) )return -1; + ch = CHAR_getCharPointer(index); + if( ch != NULL ){ + for (i = CHAR_STARTITEMARRAY; i < CHAR_MAXITEMHAVE; i++){ + int itemindex = 0; + itemindex = ch->indexOfExistItems[i]; + if (itemindex == -1) totaleptitem++; + } + return totaleptitem; + } + + return -1; +} + +// Robin 0707 petFollow +int CHAR_pickupFollowPet( int charaindex, int pickupindex ) +{ + int petindex; + int objindex; + int havepetindex; + char category[3]; + + if( !CHAR_CHECKINDEX( charaindex ) ) return FALSE; + + if( pickupindex != -1 ) + petindex = pickupindex; + else + petindex = CHAR_getWorkInt( charaindex, CHAR_WORKPETFOLLOW ); + + if( !CHAR_CHECKINDEX( petindex ) ) + { + CHAR_setWorkInt( charaindex, CHAR_WORKPETFOLLOW, -1 ); + return FALSE; + } + + havepetindex = CHAR_getCharPetElement( charaindex); + if( havepetindex == -1 ) { + CHAR_talkToCli(charaindex,-1,"宠物栏已满!无法拾回!",CHAR_COLORYELLOW); + return FALSE; + } + + objindex = CHAR_getWorkInt( petindex, CHAR_WORKOBJINDEX ); + print(" objindex02:%d ", objindex); + + if( (pickupindex == -1) || (pickupindex == CHAR_getWorkInt( charaindex, CHAR_WORKPETFOLLOW ) ) ) + CHAR_setWorkInt( charaindex, CHAR_WORKPETFOLLOW, -1 ); + + /* CDKEY 午平乓仿 互域谯仄卅中午五反胶尹卅中 */ + if( strcmp( CHAR_getChar( petindex, CHAR_OWNERCDKEY), CHAR_getChar( charaindex, CHAR_CDKEY)) != 0 || + strcmp( CHAR_getChar( petindex, CHAR_OWNERCHARANAME), CHAR_getChar( charaindex, CHAR_NAME)) != 0 ) + { + //CHAR_setWorkInt( charaindex, CHAR_WORKPETFOLLOW, -1 ); + + return FALSE; + } + + + //CHAR_setWorkInt( charaindex, CHAR_WORKPETFOLLOW, -1 ); + + CHAR_ObjectDelete(objindex); + + CHAR_setWorkInt( petindex, CHAR_WORKPETFOLLOWMODE, CHAR_PETFOLLOW_NONE ); + + CHAR_setWorkInt( petindex, CHAR_WORKPLAYERINDEX, charaindex); + CHAR_setCharPet( charaindex, havepetindex, petindex); + +#ifdef _PET_TALK + if( CHAR_getInt( petindex, CHAR_PETID) != 718 ) { +#endif + CHAR_setChar( petindex, CHAR_OWNERCDKEY, CHAR_getChar( charaindex, CHAR_CDKEY)); + CHAR_setChar( petindex, CHAR_OWNERCHARANAME, CHAR_getChar( charaindex, CHAR_NAME)); +#ifdef _PET_TALK + } +#endif + + snprintf( category,sizeof( category),"K%d",havepetindex); + CHAR_sendStatusString( charaindex, category); + snprintf( category,sizeof( category),"W%d",havepetindex); + CHAR_sendStatusString( charaindex, category); + + CHAR_setInt( petindex, CHAR_PUTPETTIME, 0); + CHAR_setWorkInt( petindex, CHAR_WORKPETFOLLOWCOUNT, 0); + + + CHAR_setWorkInt( petindex, CHAR_WORKOBJINDEX, -1); + + { + char mesg[256]; + char *p = NULL; + p = CHAR_getChar( petindex, CHAR_USERPETNAME); + if( strlen( p) == 0 ) { + p = CHAR_getChar( petindex, CHAR_NAME); + } + snprintf( mesg,sizeof(mesg), "拾回 %s", p); + CHAR_talkToCli(charaindex,-1,mesg,CHAR_COLORYELLOW); + } + // 矢永玄毛胶匀凶夫弘 + LogPet( + CHAR_getChar( charaindex, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( charaindex, CHAR_CDKEY ), + CHAR_getChar( petindex, CHAR_NAME), + CHAR_getInt( petindex, CHAR_LV), + "FollowPickUp(收回溜宠)", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + CHAR_getChar( petindex, CHAR_UNIQUECODE) // shan 2001/12/14 + ); + + return TRUE; + +} +#ifdef _GAMBLE_ROULETTE +int NPC_MAPCLEANGOLD( int meindex , int floor) +{ + OBJECT object; + int x,y,fl; + int End_type; + fl = floor; + + for( End_type = 0; End_type < arraysizeof(casinomap) ; End_type++ ) { + if( floor != casinomap[ End_type].casinofl ) + continue; + x = casinomap[ End_type].casinox; + y = casinomap[ End_type].casinoy; + + for( object=MAP_getTopObj(fl,x,y) ; object ; object = NEXT_OBJECT(object ) ) { + int index = GET_OBJINDEX(object); + int objtype = OBJECT_getType(index); + int itemindex = OBJECT_getIndex( index); + + if( objtype == OBJTYPE_NOUSE )continue; + if( objtype == OBJTYPE_ITEM ){ + if(ITEM_getInt(itemindex, ITEM_ID) == CASINOTOKENID) { + ITEM_endExistItemsOne( itemindex); + OBJECT_setIndex( index, 0); + CHAR_ObjectDelete(index); //清除 + print(" clean( %d )", index ); + } + break; + } + } + casinomap[End_type].stakenum = 0; + } + return 1; +} +#endif + +#ifdef _DROPSTAKENEW +// casinotype : flg = 0 不分type,针对整层type做设定;扩充参数 +// mapdropflag : TRUE = 可以下注; +int SetCasinoMap(int npcindex, int casinotype, int mapdropflag) +{ + int npcfloor = CHAR_getInt(npcindex, CHAR_FLOOR); + int i = 0; + if (casinotype < 0 || mapdropflag < 0) + return -1; + for (i = 0; i < arraysizeof(casinomap); i++) + { + if (npcfloor == casinomap[i].casinofl) + { + if (casinotype != 0) + { + if (casinomap[i].casinotype == casinotype) + casinomap[i].dropflag = mapdropflag; + } + else + casinomap[i].dropflag = mapdropflag; + } + } + return 1; +} + +// 计算积分 +int CasinoAccumulation(int charindex, int npcindex, int floor, int wincasinotype) +{ + int i = 0; + int accumulation = CHAR_getInt(charindex, CHAR_GAMBLENUM); + char tmpbuf[256]; + for (i = 0; i < MAXSTAKENUM; i++) + { + if (CHAR_getWorkInt(charindex, CHAR_WORKSTAKETYPE1 + i) == wincasinotype) + { + int j = 0; + for (j = 0; j < arraysizeof(casinomap); j++) + { + if (casinomap[j].casinotype == wincasinotype) + { +#ifdef _FIX_GAMBLENUM + // 加 原本积分及WIN积分 + accumulation = accumulation + casinomap[j].accumulation * 2; +#else + accumulation += casinomap[j].accumulation; +#endif + CHAR_setWorkInt(charindex, CHAR_WORKSTAKETYPE1 + i, 0); + break; + } + } + } + + else if (CHAR_getWorkInt(charindex, CHAR_WORKSTAKETYPE1 + i) != 0) + { + int j = 0; + for (j = 0; j < arraysizeof(casinomap); j++) + { + if (casinomap[j].casinotype == CHAR_getWorkInt(charindex, CHAR_WORKSTAKETYPE1 + i)) + { +#ifndef _FIX_GAMBLENUM + accumulation -= casinomap[j].accumulation; +#endif + CHAR_setWorkInt(charindex, CHAR_WORKSTAKETYPE1 + i, 0); + break; + } + } + } + } + CHAR_setWorkInt(charindex, CHAR_WORKSTAKEFLAG, 0); + if (accumulation < 0) + accumulation = 0; + else if (accumulation > MAXACCUMULATION) + accumulation = MAXACCUMULATION; + CHAR_setInt(charindex, CHAR_GAMBLENUM, accumulation); + snprintf(tmpbuf, sizeof(tmpbuf), "您现在总共有%4d点游乐场积分", accumulation); + CHAR_talkToCli(charindex, npcindex, tmpbuf, CHAR_COLORWHITE); + return 1; +} + +int CasinoPay(int npcindex, int wincasinotype) +{ + int npcfloor = CHAR_getInt(npcindex, CHAR_FLOOR); + int i = 0; + int playernum = CHAR_getPlayerMaxNum(); + if (wincasinotype < 0) return FALSE; + for (i = 0; i < playernum; i++) + { + if (CHAR_getCharUse(i) == FALSE) continue; + if (!CHAR_CHECKINDEX(i)) continue; + if (CHAR_getInt(i, CHAR_FLOOR) == npcfloor) + { + // 查询玩家是否有下注 + if (CHAR_getWorkInt(i, CHAR_WORKSTAKEFLAG) == 0) + continue; + // 计算积分 + CasinoAccumulation(i, npcindex, npcfloor, wincasinotype); + } + } + // 清除此层地面彩券 + for (i = 0; i < arraysizeof(casinomap); i++) + { + OBJECT object; + if (casinomap[i].casinofl != npcfloor) continue; + for (object = MAP_getTopObj(casinomap[i].casinofl, casinomap[i].casinox, + casinomap[i].casinoy); object; object = NEXT_OBJECT(object)) + { + int index = GET_OBJINDEX(object); + int objtype = OBJECT_getType(index); + int itemindex = OBJECT_getIndex( index); + if (objtype == OBJTYPE_NOUSE) continue; + else if (objtype == OBJTYPE_ITEM) + { + if(ITEM_getInt(itemindex, ITEM_ID) == CASINOTOKENID) + { + OBJECT_setIndex(index, 0); + CHAR_ObjectDelete(index); + } + } + } + casinomap[i].stakenum = 0; + } + return TRUE; +} +#endif + + diff --git a/gmsv/char/char_party.c b/gmsv/char/char_party.c new file mode 100644 index 0000000..cc643ae --- /dev/null +++ b/gmsv/char/char_party.c @@ -0,0 +1,635 @@ +#include "version.h" +#include + +#include "readmap.h" +#include "object.h" +#include "char.h" +#include "char_base.h" +#include "battle.h" +#include "lssproto_serv.h" +#include "npcutil.h" +#include "npc_bus.h" +#include "npc_airplane.h" // Arminius 7.10 Airplane +#include "family.h" // shan + +#ifdef _ITEM_QUITPARTY +#include "init.h" +#endif +// shan add +extern struct FM_PKFLOOR fmpkflnum[FAMILY_FMPKFLOOR]; + +/*------------------------------------------------------------ + * 由□ 奴楮 及末□旦 + ------------------------------------------------------------*/ + +/*------------------------------------------------------------ + * 坞中化中月由□ 奴 毛茧允 + * 卅仃木壬-1毛忒允[ + ------------------------------------------------------------*/ +int CHAR_getEmptyPartyArray( int charaindex) +{ + int i = -1; + int rc = FALSE; + int toindex; + if( CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE) == CHAR_PARTY_NONE ) { + toindex = charaindex; + } + else { + toindex = CHAR_getPartyIndex( charaindex, 0); + } + if( CHAR_CHECKINDEX( toindex)){ + for( i = 1; i < CHAR_PARTYMAX; i ++ ) { + if( CHAR_getWorkInt( toindex, i + CHAR_WORKPARTYINDEX1) == -1 ) { + rc = TRUE; + break; + } + } + } + return( rc ? i: -1); +} +/*------------------------------------------------------------ + * 端卞由□ 奴卞 月质 + * + * charaindex int 愤坌 + * targetindex int 月锹澎及谛 + ------------------------------------------------------------*/ +void CHAR_JoinParty_Main( int charaindex, int targetindex) +{ + int firstflg = FALSE; + int i; + char c[3]; + char buf[64]; + int toindex; + int parray; + + /* 褪互中凶日娄匀舰曰请允 */ + if( CHAR_getWorkInt( targetindex, CHAR_WORKPARTYMODE) == CHAR_PARTY_NONE ) { + toindex = targetindex; + } + else { + toindex = CHAR_getPartyIndex( targetindex, 0); + if( !CHAR_CHECKINDEX( toindex) ) { + print( " %s:%d err\n", __FILE__, __LINE__); + return; + } + } + + + /* 锹澎由□ 奴及谛醒反 井" */ + parray = CHAR_getEmptyPartyArray( toindex) ; + if( parray == -1 ) { + print( "%s : %d err\n", __FILE__,__LINE__); + return; + } + /* 窒手 仄 褪及凛反褪卞卅匀凶CA毛霜耨允月 */ + if( CHAR_getWorkInt( toindex, CHAR_WORKPARTYMODE) == CHAR_PARTY_NONE ) { + CHAR_sendLeader( CHAR_getWorkInt( toindex, CHAR_WORKOBJINDEX), 1); + /* 锹澎及橇谪及踏五晶尹 */ + /* 褪卞卅月 */ + CHAR_setWorkInt( toindex, CHAR_WORKPARTYMODE, 1); + CHAR_setWorkInt( toindex, CHAR_WORKPARTYINDEX1, toindex); + firstflg = TRUE; + } + CHAR_setWorkInt( toindex, parray + CHAR_WORKPARTYINDEX1, charaindex); + + CHAR_setWorkChar( charaindex, CHAR_WORKWALKARRAY, ""); + + CHAR_setWorkInt( charaindex, CHAR_WORKPARTYMODE, CHAR_PARTY_CLIENT); + + CHAR_setWorkInt( charaindex, CHAR_WORKPARTYINDEX1, toindex); + + if( firstflg ) { + CHAR_sendStatusString( toindex, "N0"); + } + + + for( i = 0; i < CHAR_PARTYMAX; i ++ ) { + int index = CHAR_getWorkInt( toindex, i + CHAR_WORKPARTYINDEX1); + if( CHAR_CHECKINDEX(index)) { + snprintf( c, sizeof(c), "N%d", i); + CHAR_sendStatusString( charaindex, c); + } + } + + snprintf( buf,sizeof( buf), "%s 加入团队!", + CHAR_getChar( charaindex, CHAR_NAME)); + + for( i = 0; i < CHAR_PARTYMAX; i ++ ) { + int index = CHAR_getWorkInt( toindex, i + CHAR_WORKPARTYINDEX1); + if( CHAR_CHECKINDEX(index)) { + if( index != charaindex ) { + snprintf( c, sizeof(c), "N%d", parray); + CHAR_sendStatusString( index, c); + CHAR_talkToCli( index, -1, buf, CHAR_COLORYELLOW); + } + else { + CHAR_talkToCli( index, -1, "加入团队!", CHAR_COLORYELLOW); + } + } + } +} +/*------------------------------------------------------------ + * 由□ 奴卞 欠丹午允月[ + ------------------------------------------------------------*/ +BOOL CHAR_JoinParty( int charaindex ) +{ + + int result = -1; + int x,y; + OBJECT object; + int found = FALSE; + int fd; + int cnt; + int i; + + fd = getfdFromCharaIndex( charaindex ); + if( fd == -1 ) { + print( "%s : %d err\n", __FILE__, __LINE__); + return FALSE; + } + + /* 愤坌互由□ 奴赚氏匹凶日蛲 */ + if( CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE ) { + lssproto_PR_send( fd, 1, FALSE); + return FALSE; + } + + /* 及蟆及甄 毛 月 */ + CHAR_getCoordinationDir( CHAR_getInt( charaindex, CHAR_DIR ) , + CHAR_getInt( charaindex , CHAR_X ), + CHAR_getInt( charaindex , CHAR_Y ) , + 1 , &x , &y ); + + /* 赓渝祭允月 */ + for( i = 0; i < CONNECT_WINDOWBUFSIZE; i ++ ) { + CONNECT_setJoinpartycharaindex(fd,i,-1); + } + cnt = 0; + + /*愤坌及 及蟆及平乓仿毛潸 允月 */ + + for( object = MAP_getTopObj( CHAR_getInt( charaindex, CHAR_FLOOR),x,y) ; + object ; + object = NEXT_OBJECT(object ) ) + { + int toindex; + int parray; + int objindex = GET_OBJINDEX(object); + int targetindex = -1; + + /* 平乓仿弁正□元扎卅中 */ + if( OBJECT_getType( objindex) != OBJTYPE_CHARA) continue; + toindex = OBJECT_getIndex( objindex); + + // shan begin + if( CHAR_getInt(charaindex, CHAR_FMINDEX) > 0 && CHAR_getInt(toindex, CHAR_FMINDEX) >0){ + for( i = 0; i < FAMILY_FMPKFLOOR; i++){ + if( fmpkflnum[i].fl == CHAR_getInt( charaindex, CHAR_FLOOR) ) + if( CHAR_getInt(charaindex, CHAR_FMINDEX) != CHAR_getInt(toindex, CHAR_FMINDEX) ){ + lssproto_PR_send( fd, 1, FALSE); + return FALSE; + } + } + } + // shan end + + /* 皿伊奶乩□及凛 */ + if( CHAR_getInt( toindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER ){ + found = TRUE; + /* 锹澎互阂分匀凶日褪毛娄匀舰曰请允 */ + if( CHAR_getWorkInt( toindex, CHAR_WORKPARTYMODE) == CHAR_PARTY_CLIENT ) { + targetindex = CHAR_getWorkInt( toindex, CHAR_WORKPARTYINDEX1); + if( !CHAR_CHECKINDEX( targetindex) ) { + print( " %s:%d err\n", __FILE__, __LINE__); + continue; + } + if( CHAR_getInt( targetindex, CHAR_WHICHTYPE) == CHAR_TYPEBUS) { + continue; + } + } + else { + targetindex = toindex; + } + + /* 褪午 ㄠ汹动 卞中月井 */ + if( NPC_Util_CharDistance( charaindex, targetindex ) > 1) { + continue; + } + + /* 爵 反匹卅中仪[*/ + if( CHAR_getWorkInt( targetindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE ){ + continue; + } + /* 醮棉袱第乒□玉井 */ + if( !CHAR_getFlg( targetindex, CHAR_ISPARTY) ) continue; + +#ifdef _ANGEL_SUMMON + if( CHAR_getWorkInt( targetindex, CHAR_WORKANGELMODE) == TRUE) { + CHAR_talkToCli( charaindex, -1, "使者不可以当领队。", CHAR_COLORYELLOW); + continue; + } +#endif +#ifdef _ESCAPE_RESET // 使用恶宝逃跑後x分钟内不可与人组队 + if( getStayEncount( getfdFromCharaIndex(targetindex) ) ) { + //print(" 恶宝中组队 "); + if( time(NULL) - CHAR_getWorkInt( targetindex, CHAR_WORKLASTESCAPE) < 5*60 ) { + //print(" 恶宝逃跑後组队 "); + CHAR_talkToCli( charaindex, -1, "此人暂时不可以当领队。", CHAR_COLORYELLOW); + continue; + } + } +#endif + } + /* 穴件乒旦田旦互中月凛反]谛棉方曰穸燮允月[ */ + else if( CHAR_getInt( toindex, CHAR_WHICHTYPE) == CHAR_TYPEBUS ) { + targetindex = toindex; + cnt = 0; + if( !NPC_BusCheckJoinParty( toindex, charaindex, TRUE)) { + /* 椭瘀毛 凶今卅井匀凶[醮棉 月及反蔽歹月[谛棉及质 手仄卅中[ + * 支支仇仄中及匹[ + */ + break; + } + { // Arminius 7.10 Airplane + int busimg=CHAR_getInt(toindex, CHAR_BASEIMAGENUMBER); + if ((busimg!=100355) && (busimg!=100461)) { + CHAR_setInt(charaindex,CHAR_BASEIMAGENUMBER,busimg); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( charaindex , + CHAR_WORKOBJINDEX )); + // Robin debug 01/11/21 + if( CHAR_getInt( charaindex, CHAR_RIDEPET) != -1 ) { + CHAR_setInt( charaindex, CHAR_RIDEPET, -1); + CHAR_send_P_StatusString( charaindex, CHAR_P_STRING_RIDEPET); + } + /* + CHAR_sendPMEToArroundCharacterFLXY(charaindex, + CHAR_getInt( charaindex, CHAR_FLOOR), + CHAR_getInt( charaindex, CHAR_X), + CHAR_getInt( charaindex, CHAR_Y), + 0,1,CHAR_getInt( charaindex, CHAR_PETMAILEFFECT) + ); + */ + } + } + } + /* 皿伊奶乩□坭反穴件乒旦田旦动陆反 骰允月 */ + else { + continue; + } + /* 锹澎由□ 奴及谛醒反 井" */ + parray = CHAR_getEmptyPartyArray( targetindex) ; + if( parray == -1 ) continue; + + /* 仇仇引匹仁木壬 */ + CONNECT_setJoinpartycharaindex( fd,cnt,toindex); + cnt++; + if( cnt == CONNECT_WINDOWBUFSIZE ) break; + + /* 穴件乒旦田旦 苇仄分中]伙□皿毛 仃月[ */ + if( CHAR_getInt( targetindex, CHAR_WHICHTYPE) == CHAR_TYPEBUS ) break; + + } + + if( cnt == 0 ) { + if( found == TRUE) { + CHAR_talkToCli( charaindex, -1, "无法加入团队。", CHAR_COLORYELLOW); + } + result = FALSE; + }else if( cnt == 1 ) { +#ifdef _DEATH_CONTEND + int toindex = CONNECT_getJoinpartycharaindex( fd, 0); + if(CHAR_getInt(toindex,CHAR_PKLISTTEAMNUM) == -1 && CHAR_getInt(charaindex,CHAR_PKLISTTEAMNUM) == -1){ + }else if( CHAR_getInt( charaindex, CHAR_PKLISTLEADER ) > 0 || + CHAR_getInt( toindex, CHAR_PKLISTTEAMNUM) < 0 || + CHAR_getInt( charaindex, CHAR_PKLISTTEAMNUM) < 0 || + CHAR_getInt( toindex, CHAR_PKLISTTEAMNUM) != CHAR_getInt( charaindex, CHAR_PKLISTTEAMNUM) || + CHAR_getInt(toindex,CHAR_WHICHTYPE) != CHAR_TYPEPLAYER){ + + CHAR_talkToCli( charaindex, -1, "队伍不同,无法加入团队。", CHAR_COLORYELLOW); + result = FALSE; + }else{ +#endif + CHAR_JoinParty_Main( charaindex, CONNECT_getJoinpartycharaindex(fd,0)); + result = TRUE; +#ifdef _DEATH_CONTEND + } +#endif + }else { + int strlength; + char msgbuf[1024]; + char escapebuf[2048]; +#ifdef _DEATH_CONTEND + int toindex = CONNECT_getJoinpartycharaindex( fd, 0); + if(CHAR_getInt(toindex,CHAR_PKLISTTEAMNUM) == -1 && CHAR_getInt(charaindex,CHAR_PKLISTTEAMNUM) == -1){ + }else if( CHAR_getInt( charaindex, CHAR_PKLISTLEADER ) > 0 || + CHAR_getInt( toindex, CHAR_PKLISTTEAMNUM) < 0 || + CHAR_getInt( charaindex, CHAR_PKLISTTEAMNUM) < 0 || + CHAR_getInt( toindex, CHAR_PKLISTTEAMNUM) != CHAR_getInt( charaindex, CHAR_PKLISTTEAMNUM) || + CHAR_getInt(toindex,CHAR_WHICHTYPE) != CHAR_TYPEPLAYER){ + + CHAR_talkToCli( charaindex, -1, "队伍不同,无法加入团队。", CHAR_COLORYELLOW); + result = FALSE; + } +#endif + strcpy( msgbuf, "1\n和谁组成团队呢?\n"); + strlength = strlen( msgbuf); + for( i = 0; + CONNECT_getJoinpartycharaindex( fd,i ) != -1 + && i< CONNECT_WINDOWBUFSIZE; + i ++ ){ + char *a = CHAR_getChar( + CONNECT_getJoinpartycharaindex(fd,i) , CHAR_NAME); + char buf[256]; + snprintf( buf, sizeof( buf),"%s\n", a); + if( strlength + strlen( buf) > arraysizeof( msgbuf)){ + print( "%s:%d视窗讯息buffer不足。\n", + __FILE__,__LINE__); + break; + } + strcpy( &msgbuf[strlength], buf); + strlength += strlen(buf); + } + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_SELECT, + WINDOW_BUTTONTYPE_CANCEL, + CHAR_WINDOWTYPE_SELECTPARTY, + -1, + makeEscapeString( msgbuf, escapebuf, sizeof(escapebuf))); + + + } + + if( result != -1 ) { + lssproto_PR_send( fd, 1, result); + } + + return result; +} + +static BOOL CHAR_DischargePartySub( int charaindex, int msgflg) +{ + char buf[64], c[3]; + int toindex,flg,i; +#ifdef _ITEM_QUITPARTY + int j = 0,k; +#endif + + + if( CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE) == CHAR_PARTY_LEADER ) { + int pindex, airplaneflag=0; + // Arminius 7.10 Airplane + if( CHAR_getInt(charaindex, CHAR_WHICHTYPE) == CHAR_TYPEBUS ) { + if ((CHAR_getInt(charaindex, CHAR_BASEIMAGENUMBER) !=100355) && + (CHAR_getInt(charaindex, CHAR_BASEIMAGENUMBER) !=100461)){ + airplaneflag=1; + } + } + for( i = 0; i < CHAR_PARTYMAX; i ++ ) { + pindex = CHAR_getWorkInt( charaindex, i + CHAR_WORKPARTYINDEX1); + if( CHAR_CHECKINDEX( pindex) ) { + int fd = getfdFromCharaIndex( pindex ); + CHAR_setWorkInt( pindex, CHAR_WORKPARTYINDEX1, -1); + CHAR_setWorkInt( pindex, CHAR_WORKPARTYMODE, CHAR_PARTY_NONE); + if( msgflg ){ + CHAR_talkToCli( pindex, -1, "团队已解散!", CHAR_COLORYELLOW); +#ifdef _ITEM_QUITPARTY + // won fix + for( j=0;j=0){ + int fl,x,y; + CHAR_getElderPosition( CHAR_getInt( charaindex, CHAR_LASTTALKELDER), + &fl, &x, &y ); + CHAR_warpToSpecificPoint(charaindex, fl, x, y); + } + } + } + } + CHAR_setWorkInt( charaindex, CHAR_WORKPARTYINDEX1, -1); + for( i = 0; i < CHAR_PARTYMAX; i ++ ) { + int index = CHAR_getWorkInt( toindex, i + CHAR_WORKPARTYINDEX1); + if( CHAR_CHECKINDEX(index) ){ + if( index == charaindex) { + myarray = i; + break; + } + } + } + if( myarray == CHAR_PARTYMAX) { + print( "DischargeParty(): 真奇怪!"); + return FALSE; + } + CHAR_setWorkInt( toindex, CHAR_WORKPARTYINDEX1 + myarray, -1); + snprintf( buf,sizeof( buf), "%s 脱离团队!", + CHAR_getChar( charaindex, CHAR_NAME)); + if( msgflg ){ + CHAR_talkToCli( charaindex, -1, "脱离团队!", CHAR_COLORYELLOW); +#ifdef _ITEM_QUITPARTY + // won fix + for( i=0;i 1) { + int parent_dir; + start.x = CHAR_getInt( index, CHAR_X); + start.y = CHAR_getInt( index, CHAR_Y); + parent_dir = NPC_Util_getDirFromTwoPoint( &start,&end ); + end = start; + if( parent_dir != -1 ) { + CHAR_walk( index, parent_dir, 0); + } + } + previndex = index; + } + } + } + + } + + return TRUE; +} +BOOL CHAR_DischargeParty( int charaindex, int flg) +{ + return CHAR_DischargePartySub( charaindex, 1); +} + +BOOL CHAR_DischargePartyNoMsg( int charaindex) +{ + return CHAR_DischargePartySub( charaindex, 0); +} + + +/*------------------------------------------------------------ + * 愤坌互伉□母□井升丹井毛霜耨允月[ + ------------------------------------------------------------*/ +void CHAR_sendLeader( int objindex, int leader) +{ + int opt[1]; + opt[0] = leader; + CHAR_sendWatchEvent( objindex,CHAR_ACTLEADER,opt,1,TRUE); +} +/*------------------------------------------------------------ + * 醮棉毛赐 CHAR_WORKPARTYINDEX)隙烂匹平乓仿index毛娄匀舰月[ + * 愤坌互褪匹手阂匹手 [ + ------------------------------------------------------------*/ +int CHAR_getPartyIndex( int index, int num) +{ + int nindex = -1; + + /* 醮棉及奶件犯永弁旦毛潸 */ + /* 褪及桦宁 */ + if( CHAR_getWorkInt( index, CHAR_WORKPARTYMODE) == CHAR_PARTY_LEADER ) { + nindex = CHAR_getWorkInt( index, CHAR_WORKPARTYINDEX1 + num ); + } + /* 阂及桦宁 */ + else { + int oyaindex = CHAR_getWorkInt( index, CHAR_WORKPARTYINDEX1); + if( CHAR_CHECKINDEX( oyaindex)) { + nindex = CHAR_getWorkInt( oyaindex, CHAR_WORKPARTYINDEX1+num); + } + } + return nindex; +} +/*------------------------------------------------------------ + * 丢永本□斥毛霜耨允月[ + * 醮棉互中木壬公及醮棉卞手丢永本□斥毛霜耨允月[ + ------------------------------------------------------------*/ +void CHAR_talkToCliAndParty( int talkedcharaindex,int talkcharaindex, + char* message, CHAR_COLOR color ) +{ + int i; + /* 引内愤坌 */ + CHAR_talkToCli( talkedcharaindex, talkcharaindex, message, color); + + for( i = 0; i < CHAR_PARTYMAX; i ++ ) { + int index = CHAR_getPartyIndex( talkedcharaindex, i); + if( CHAR_CHECKINDEX( index) && + index != talkedcharaindex) + { + CHAR_talkToCli( index, talkcharaindex, message, color); + } + } +} + diff --git a/gmsv/char/char_talk.c b/gmsv/char/char_talk.c new file mode 100644 index 0000000..b9491ae --- /dev/null +++ b/gmsv/char/char_talk.c @@ -0,0 +1,1561 @@ +#include "version.h" +#include +#include +#include + +#include "readmap.h" +#include "object.h" +#include "char.h" +#include "char_base.h" +#include "chatmagic.h" +#include "battle.h" +#include "log.h" +#include "configfile.h" +#include "lssproto_serv.h" +#include "saacproto_cli.h" +#include "family.h" +#ifdef _CHAR_PROFESSION +#include "profession_skill.h" +#endif +#ifdef _M_SERVER +#include "mclient.h" +#endif + +#ifdef _NPCSERVER_NEW +#include "npcserver.h" +#endif + +#include "net.h" + +extern int channelMember[FAMILY_MAXNUM][FAMILY_MAXCHANNEL][FAMILY_MAXMEMBER]; + +#ifdef _CHANNEL_MODIFY +int *piOccChannelMember = NULL; +#endif +/*------------------------------------------------------------ + * 民乓永玄楮 及末□旦 + ------------------------------------------------------------*/ +#define DEBUGCDKEYNUM 100 +struct tagDebugCDKey { + int use; + char cdkey[9]; +}; +static struct tagDebugCDKey DebugCDKey[DEBUGCDKEYNUM]; + +/*====================民乓永玄 芊====================*/ +typedef void (*CHATMAGICFUNC)(int,char*); +typedef struct tagCHAR_ChatMagicTable +{ + char* magicname; + CHATMAGICFUNC func; + BOOL isdebug; + int hash; + int level; + char* usestring; +}CHAR_ChatMagicTable; + +static CHAR_ChatMagicTable CHAR_cmtbl[]={ + //工程师专用 + { "programming_engineer", CHAR_CHAT_DEBUG_engineer, TRUE, 0, 3, ""}, + { "petlevelup", CHAR_CHAT_DEBUG_petlevelup, TRUE, 0, 2, "宠物栏号 等级 (账号)"}, + { "petexpup", CHAR_CHAT_DEBUG_petexpup, TRUE, 0, 2, "宠物栏号 经验 (账号)"}, + { "help", CHAR_CHAT_DEBUG_help, TRUE, 0, 1, "指令/all"}, + { "showtemp", CHAR_CHAT_DEBUG_showtemp, TRUE, 0, 3, "waei"}, +#ifdef _EQUIT_NEGLECTGUARD + { "setneguard", CHAR_CHAT_DEBUG_setneguard, TRUE, 0, 3, "waei"}, +#endif + { "reload_pkteamlist", CHAR_CHAT_DEBUG_reloadpkteamlist, TRUE, 0, 2, ""}, + { "set_battle", CHAR_CHAT_DEBUG_setBattle, TRUE, 0, 2, ""}, + +#ifdef _DEATH_CONTEND + { "updatepklist", CHAR_CHAT_DEBUG_updatepklist, TRUE, 0, 3, "无"}, +#endif + //人物属性 + { "info", CHAR_CHAT_DEBUG_info, TRUE, 0, 1, "数值"}, + { "level", CHAR_CHAT_DEBUG_level, TRUE, 0, 1, "数值 (账号)"}, + { "settrans", CHAR_CHAT_DEBUG_setTrans, TRUE, 0, 2, "数值 (账号)"}, + { "exp", CHAR_CHAT_DEBUG_exp, TRUE, 0, 2, "数值 (账号)"}, + { "hp", CHAR_CHAT_DEBUG_hp, TRUE, 0, 2, "数值 (账号)"}, + { "mp", CHAR_CHAT_DEBUG_mp, TRUE, 0, 2, "数值 (账号)"}, + { "setmp", CHAR_CHAT_DEBUG_setmp, TRUE, 0, 2, "数值 (账号)"}, + { "str", CHAR_CHAT_DEBUG_str, TRUE, 0, 2, "数值*100 (账号)"}, + { "dex", CHAR_CHAT_DEBUG_dex, TRUE, 0, 2, "数值*100 (账号)"}, + { "tgh", CHAR_CHAT_DEBUG_tgh, TRUE, 0, 2, "数值*100 (账号)"}, + { "vital", CHAR_CHAT_DEBUG_vital, TRUE, 0, 2, "数值*100 (账号)"}, + { "luck", CHAR_CHAT_DEBUG_luck, TRUE, 0, 2, "数值 (账号)"}, + { "superman", CHAR_CHAT_DEBUG_superman, TRUE, 0, 2, "(账号)"}, + { "dp", CHAR_CHAT_DEBUG_dp, TRUE, 0, 2, "数值 (账号)"}, +#ifdef _EQUIT_ARRANGE + { "arrange", CHAR_CHAT_DEBUG_arrange, TRUE, 0, 3, "数值"}, +#endif + +#ifdef _EQUIT_SEQUENCE + { "sequence", CHAR_CHAT_DEBUG_sequence, TRUE, 0, 3, "数值"}, +#endif + + //系统 + { "announce", CHAR_CHAT_DEBUG_announce, TRUE, 0, 1, "字串"}, + { "loginannounce", CHAR_CHAT_DEBUG_loginannounce, TRUE, 0, 1, "字串"}, + { "sysinfo", CHAR_CHAT_DEBUG_sysinfo, TRUE, 0, 1, "无"}, + { "effect", CHAR_CHAT_DEBUG_effect, TRUE, 0, 1, "alloff/地图号 特效"}, + { "remserver", CHAR_CHAT_DEBUG_remserver, TRUE, 0, 2, "on/off"}, + { "reset", CHAR_CHAT_DEBUG_reset, TRUE, 0, 2, "enemy/encount/magic/warppoint/petskill/pettalk/npc/all"}, + { "clean_floor", CHAR_CHAT_DEBUG_cleanfloor, TRUE, 0, 3, "地图号"}, + { "printcount", CHAR_CHAT_printcount, TRUE, 0, 1, ""}, +#ifdef _M_SERVER + { "reloadmsip", CHAR_CHAT_DEBUG_reloadmsip, TRUE, 0, 3, "address port"}, +#endif + { "enemyrestart", CHAR_CHAT_DEBUG_enemyrestart, TRUE, 0, 3, "无"}, + { "cleanfreepet", CHAR_CHAT_DEBUG_cleanfreepet, TRUE, 0, 3, "无"}, + +#ifdef _GMRELOAD + { "gmreload", CHAR_CHAT_DEBUG_gmreload, TRUE, 0, 3, "all/cdkey level"}, +#endif + + { "waeikickall", CHAR_CHAT_DEBUG_waeikickall, TRUE, 0, 3, "无"}, + { "checktrade", CHAR_CHAT_DEBUG_checktrade, TRUE, 0, 3, "waei"}, + //工具 初级GM + { "debug", CHAR_CHAT_DEBUG_debug, TRUE, 0, 1, "密码 debug on/off"}, + { "metamo", CHAR_CHAT_DEBUG_metamo, TRUE, 0, 1, "变身图号 (账号)"}, + { "checklock", CHAR_CHAT_DEBUG_checklock, TRUE, 0, 1, "帐号"}, + { "shutup", CHAR_CHAT_DEBUG_shutup, TRUE, 0, 1, "帐号 ON/OFF"}, +#ifdef _WAEI_KICK + { "gmkick", CHAR_CHAT_DEBUG_gmkick, TRUE, 0, 1, "帐号 LSLOCK/KICK/DEUNLOCK/UNLOCKALL/LOCK/TYPE/UNLOCK"}, +#endif + { "battlein", CHAR_CHAT_DEBUG_battlein, TRUE, 0, 1, "无"}, + { "battleout", CHAR_CHAT_DEBUG_battleout, TRUE, 0, 1, "无"}, + { "battlewatch", CHAR_CHAT_DEBUG_battlewatch, TRUE, 0, 1, "无"}, + { "getuser", CHAR_CHAT_DEBUG_getuser, TRUE, 0, 1, "人物名 地图号 (npc)"}, + { "warp", CHAR_CHAT_DEBUG_warp, TRUE, 0, 1, "floor x y"}, + { "waeikick", CHAR_CHAT_DEBUG_waeikick, TRUE, 0, 1, "帐号"}, + { "jail", CHAR_CHAT_DEBUG_jail, TRUE, 0, 1, "帐号"}, + { "send", CHAR_CHAT_DEBUG_send, TRUE, 0, 1, "floor x y 帐号"}, +#ifdef _SendTo + { "sendto", CHAR_CHAT_DEBUG_Sendto, TRUE, 0, 1, "帐号"}, +#endif + { "noenemy", CHAR_CHAT_DEBUG_noenemy, TRUE, 0, 1, "on/off"}, + { "watchevent", CHAR_CHAT_DEBUG_watchevent, TRUE, 0, 1, "无"}, +#ifdef _SEND_EFFECT // WON ADD AC送下雪、下雨等特效 + { "sendeffect", CHAR_CHAT_DEBUG_sendeffect, TRUE, 0, 1, ""}, +#endif + { "silent", CHAR_CHAT_DEBUG_silent, TRUE, 0, 2, "帐号 分钟"},//禁言 + { "unlock", CHAR_CHAT_DEBUG_unlock, TRUE, 0, 2, "帐号"}, + { "eventclean", CHAR_CHAT_DEBUG_eventclean, TRUE, 0, 2, "all/旗标 帐号 人物名"}, + { "eventsetend", CHAR_CHAT_DEBUG_eventsetend, TRUE, 0, 2, "all/旗标 帐号 人物名"}, + { "eventsetnow", CHAR_CHAT_DEBUG_eventsetnow, TRUE, 0, 2, "all/旗标 帐号 人物名"}, + + { "playerspread", CHAR_CHAT_DEBUG_playerspread, TRUE, 0, 3, "waei"}, + { "shutupall", CHAR_CHAT_DEBUG_shutupall, TRUE, 0, 3, "无"}, + { "unlockserver", CHAR_CHAT_DEBUG_unlockserver, TRUE, 0, 3, "无"}, + { "shutdown", CHAR_CHAT_DEBUG_shutdown, TRUE, 0, 3, ""}, + + //制成 + { "delitem", CHAR_CHAT_DEBUG_delitem, TRUE, 0, 1, "all/位置"}, + { "delpet", CHAR_CHAT_DEBUG_deletepet, TRUE, 0, 1, "all/位置"}, + { "additem", CHAR_CHAT_DEBUG_additem, TRUE, 0, 2, "道具ID ((数量) (账号))"}, + { "petmake", CHAR_CHAT_DEBUG_petmake, TRUE, 0, 2, "宠物ID ((等级) (账号))"}, + { "gold", CHAR_CHAT_DEBUG_gold, TRUE, 0, 2, "数量 (账号)"}, + + //家族工具 + { "manorpk", CHAR_CHAT_DEBUG_manorpk, TRUE, 0, 2, "allpeace/peace 庄园编号"}, + { "fixfmleader", CHAR_CHAT_DEBUG_fixfmleader, TRUE, 0, 2, "帐号 1"}, + { "fixfmpk", CHAR_CHAT_DEBUG_fixfmpk, TRUE, 0, 3, ""}, + { "fixfmdata", CHAR_CHAT_DEBUG_fixfmdata, TRUE, 0, 2, ""}, + + //测试用 + + +#ifdef _CHAR_POOLITEM + { "saveditem", CHAR_CHAT_DEBUG_saveditem, TRUE, 0, 3, ""}, + { "insertditem", CHAR_CHAT_DEBUG_insertditem, TRUE, 0, 3, ""}, + { "showdepot", CHAR_CHAT_DEBUG_ShowMyDepotItems, TRUE, 0, 3, ""}, + { "insidedepot", CHAR_CHAT_DEBUG_InSideMyDepotItems, TRUE, 0, 3, ""}, +#endif + +#ifdef _CHAR_POOLPET + { "savedpet", CHAR_CHAT_DEBUG_savedpet, TRUE, 0, 3, ""}, + { "insertdpet", CHAR_CHAT_DEBUG_insertdpet, TRUE, 0, 3, ""}, + { "showdepotpet", CHAR_CHAT_DEBUG_ShowMyDepotPets, TRUE, 0, 3, ""}, + { "insidedepotpet", CHAR_CHAT_DEBUG_InSideMyDepotPets, TRUE, 0, 3, ""}, +#endif + + +#ifdef _TEST_DROPITEMS + { "dropmypet", CHAR_CHAT_DEBUG_dropmypet, TRUE, 0, 3, "宠物编号"}, + { "dropmyitem", CHAR_CHAT_DEBUG_dropmyitem, TRUE, 0, 2, "道具编号/(0/1)"}, +#endif +#ifdef _CHAR_PROFESSION // WON ADD 人物职业 + { "addsk", CHAR_CHAT_DEBUG_addsk, TRUE, 0, 2, ""}, + { "delsk", CHAR_CHAT_DEBUG_delsk, TRUE, 0, 2, ""}, +#endif +#ifdef _TEST_PETCREATE + { "create_pet", CHAR_CHAT_DEBUG_createpet, TRUE, 0, 3, ""}, +#endif + { "checktime", CHAR_CHAT_DEBUG_checktime, TRUE, 0, 3, ""}, + +#ifdef _GAMBLE_BANK + { "setgamblenum", CHAR_CHAT_DEBUG_setgamblenum, TRUE, 0, 3, ""}, +#endif + // WON ADD 当机指令 + { "crash", CHAR_CHAT_DEBUG_crash, TRUE, 0, 3, ""}, +#ifdef _PETSKILL_SETDUCK + { "setDuck", CHAR_CHAT_DEBUG_SetDuck, TRUE, 0, 3, ""}, +#endif + +#ifdef _TYPE_TOXICATION + { "setTox", CHAR_CHAT_DEBUG_Toxication, TRUE, 0, 3, ""}, +#endif +#ifdef _ACTION_BULLSCR + { "setascore", CHAR_CHAT_DEBUG_setascore, TRUE, 0, 3, ""}, + { "getascore", CHAR_CHAT_DEBUG_getascore, TRUE, 0, 2, "all/start/score/btime/stime"}, +#endif + { "showMem", CHAR_CHAT_DEBUG_showMem, TRUE, 0, 2, "无"}, +#ifdef _NEW_PLAYERGOLD + { "acnewplayer", CHAR_CHAT_DEBUG_acnewplayer, TRUE, 0, 3, ""}, + { "loadnewplayer", CHAR_CHAT_DEBUG_loadnewplayer, TRUE, 0, 3, ""}, +#endif +#ifdef _ACTION_GMQUE // ANDY GM活动功能 永保留 + { "cleanqute", CHAR_CHAT_DEBUG_cleanqute, TRUE, 0, 3, ""}, +#endif +#ifdef _CHAR_PROFESSION // WON ADD 人物职业 + { "profession", CHAR_CHAT_DEBUG_show_profession,TRUE, 0, 2, ""}, + { "set_regist", CHAR_CHAT_DEBUG_set_regist, TRUE, 0, 1, ""}, +#endif + { "samecode", CHAR_CHAT_DEBUG_samecode, TRUE, 0, 3, ""}, +#ifdef _GM_IDENTIFY + { "gmidentify", CHAR_CHAR_DEBUG_gmidentify, TRUE, 0, 3, ""}, +#endif + +#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令 + { "reloadfm", CHAR_CHAR_DEBUG_reloadfm, TRUE, 0, 1, ""}, + { "fmpk", CHAR_CHAR_DEBUG_fmpk, TRUE, 0, 1, ""}, + { "fmpk_clean", CHAR_CHAR_DEBUG_fmpk_clean, TRUE, 0, 1, ""}, +#endif +#ifdef _NEW_MANOR_LAW + // 设定个人气势 + { "set_momentum",CHAR_CHAT_DEBUG_set_momentum,TRUE,0,2,"[set_momentum ]"}, + // 设定家族拥有庄园 + { "set_manor_owner",CHAR_CHAT_DEBUG_set_manor_owner,TRUE,0,2,"[set_manor_owner ]"}, + // 设定庄园挑战时间,设定的时间为目前每个挑战时期的经过时间(单位:分),ex:现在是休战期,共需要经过五天才会进 + // 入挑战期,则下指令设定为 5 ,则会由五天的等待期变成了只等五分钟 + { "set_schedule_time",CHAR_CHAT_DEBUG_set_schedule_time,TRUE,0,2,"[set_schedule_time ]"}, +#endif + +#ifdef _ANGEL_SUMMON + { "angelinfo", CHAR_CHAT_DEBUG_angelinfo, TRUE, 0, 2, ""}, + { "angelclean", CHAR_CHAT_DEBUG_angelclean, TRUE, 0, 2, ""}, + { "angelcreate", CHAR_CHAT_DEBUG_angelcreate, TRUE, 0, 2, ""}, + { "missionreload", CHAR_CHAT_DEBUG_missionreload, TRUE, 0, 2, ""}, +#endif + + { "itemreload", CHAR_CHAT_DEBUG_itemreload, TRUE, 0, 2, ""}, + + { "skywalker", CHAR_CHAT_DEBUG_skywalker, TRUE, 0, 1, ""}, +#ifdef _ITEM_ADDEXP + { "itemaddexp", CHAR_CHAT_DEBUG_itemaddexp, TRUE, 0, 1, ""}, +#endif + +#ifdef _DEF_FMFREETIME + { "fmfreetime", CHAR_CHAT_DEBUG_fmfreetime, TRUE, 0, 1, "帐号 人物名称"}, +#endif +#ifdef _DEF_GETYOU + { "getyou", CHAR_CHAT_DEBUG_getyou, TRUE, 0, 1, "格数 1~3"}, +#endif +#ifdef _DEF_NEWSEND + { "newsend", CHAR_CHAT_DEBUG_newsend, TRUE, 0, 1, "floor x y 帐号 无/要说的话"}, +#endif +#ifdef _DEF_SUPERSEND + { "supersend", CHAR_CHAT_DEBUG_supersend, TRUE, 0, 3, "floor x y 格数 无/要说的话"}, +#endif +#ifdef _FONT_SIZE + { "fsize", CHAR_CHAT_DEBUG_fsize, TRUE, 0, 1, ""}, +#endif +#ifdef _JOBDAILY + { "rejobdaily", CHAR_CHAT_DEBUG_rejobdaily, TRUE, 0, 3, "无"}, +#endif +#ifdef _RACEMAN + { "changeask", CHAR_CHAT_DEBUG_changeask, TRUE, 0, 2, "帐号 宠证id 0/1"}, +#endif +#ifdef _CREATE_MM_1_2 + { "MM", CHAR_CHAT_DEBUG_MM, TRUE, 0, 3, "MM 1/2 (账号)"}, +#endif +#ifdef _GM_ITEM + { "gmfunction", CHAR_CHAT_DEBUG_GMFUNCTION, TRUE, 0, 3, "命令 次数 (账号)"}, +#endif + +#ifdef _GM_RIDE + { "setride", CHAR_CHAT_DEBUG_SETRIDE, TRUE, 0, 3, "骑宠号 (账号)"}, + { "mvride", CHAR_CHAT_DEBUG_MVRIDE, TRUE, 0, 3, "骑宠号 (账号)"}, +#endif + +#ifdef _LOCK_IP + { "lockip", CHAR_CHAT_DEBUG_LOCK_IP, TRUE, 0, 3, "IP|登陆次数"}, + { "dislockip", CHAR_CHAT_DEBUG_DISPLAY_LOCK_IP, TRUE, 0, 3, ""}, +#endif +///////////////////////////////////////////////////////////////////////// + //工程师专用 +// { "programming_engineer", CHAR_CHAT_DEBUG_engineer, TRUE, 0, 3, ""}, + { "宠物等级", CHAR_CHAT_DEBUG_petlevelup, TRUE, 0, 2, "宠物栏号 等级 (账号)"}, + { "宠物经验", CHAR_CHAT_DEBUG_petexpup, TRUE, 0, 2, "宠物栏号 经验 (账号)"}, + { "帮助", CHAR_CHAT_DEBUG_help, TRUE, 0, 1, "指令/all"}, +// { "showtemp", CHAR_CHAT_DEBUG_showtemp, TRUE, 0, 3, "waei"}, +#ifdef _EQUIT_NEGLECTGUARD +// { "setneguard", CHAR_CHAT_DEBUG_setneguard, TRUE, 0, 3, "waei"}, +#endif +// { "reload_pkteamlist", CHAR_CHAT_DEBUG_reloadpkteamlist, TRUE, 0, 2, ""}, +// { "set_battle", CHAR_CHAT_DEBUG_setBattle, TRUE, 0, 2, ""}, + +#ifdef _DEATH_CONTEND +// { "updatepklist", CHAR_CHAT_DEBUG_updatepklist, TRUE, 0, 3, "无"}, +#endif + //人物属性 + { "人物信息", CHAR_CHAT_DEBUG_info, TRUE, 0, 1, "数值"}, + { "等级", CHAR_CHAT_DEBUG_level, TRUE, 0, 1, "数值 (账号)"}, + { "转生", CHAR_CHAT_DEBUG_setTrans, TRUE, 0, 2, "数值 (账号)"}, + { "经验", CHAR_CHAT_DEBUG_exp, TRUE, 0, 2, "数值 (账号)"}, + { "血", CHAR_CHAT_DEBUG_hp, TRUE, 0, 2, "数值 (账号)"}, + { "魔法", CHAR_CHAT_DEBUG_mp, TRUE, 0, 2, "数值 (账号)"}, + { "设置魔法", CHAR_CHAT_DEBUG_setmp, TRUE, 0, 2, "数值 (账号)"}, + { "腕力", CHAR_CHAT_DEBUG_str, TRUE, 0, 2, "数值*100 (账号)"}, + { "敏捷", CHAR_CHAT_DEBUG_dex, TRUE, 0, 2, "数值*100 (账号)"}, + { "耐力", CHAR_CHAT_DEBUG_tgh, TRUE, 0, 2, "数值*100 (账号)"}, + { "体力", CHAR_CHAT_DEBUG_vital, TRUE, 0, 2, "数值*100 (账号)"}, + { "运气", CHAR_CHAT_DEBUG_luck, TRUE, 0, 2, "数值 (账号)"}, + { "超人", CHAR_CHAT_DEBUG_superman, TRUE, 0, 2, "(账号)"}, + { "dp", CHAR_CHAT_DEBUG_dp, TRUE, 0, 2, "数值 (账号)"}, +#ifdef _EQUIT_ARRANGE + { "格档", CHAR_CHAT_DEBUG_arrange, TRUE, 0, 3, "数值"}, +#endif + +#ifdef _EQUIT_SEQUENCE + { "顺序", CHAR_CHAT_DEBUG_sequence, TRUE, 0, 3, "数值"}, +#endif + + //系统 + { "公告", CHAR_CHAT_DEBUG_announce, TRUE, 0, 1, "字串"}, + { "登陆公告", CHAR_CHAT_DEBUG_loginannounce, TRUE, 0, 1, "字串"}, + { "系统信息", CHAR_CHAT_DEBUG_sysinfo, TRUE, 0, 1, "无"}, + { "地图特效", CHAR_CHAT_DEBUG_effect, TRUE, 0, 1, "alloff/地图号 特效"}, +// { "remserver", CHAR_CHAT_DEBUG_remserver, TRUE, 0, 2, "on/off"}, +// { "reset", CHAR_CHAT_DEBUG_reset, TRUE, 0, 2, "enemy/encount/magic/warppoint/petskill/pettalk/npc/all"}, + { "清除地图物品", CHAR_CHAT_DEBUG_cleanfloor, TRUE, 0, 3, "地图号"}, +// { "printcount", CHAR_CHAT_printcount, TRUE, 0, 1, ""}, +#ifdef _M_SERVER +// { "reloadmsip", CHAR_CHAT_DEBUG_reloadmsip, TRUE, 0, 3, "address port"}, +#endif + { "重读宠物资料", CHAR_CHAT_DEBUG_enemyrestart, TRUE, 0, 3, "无"}, + { "清除地上宠物", CHAR_CHAT_DEBUG_cleanfreepet, TRUE, 0, 3, "无"}, + +#ifdef _GMRELOAD + { "读取GM设置", CHAR_CHAT_DEBUG_gmreload, TRUE, 0, 3, "all/cdkey level"}, +#endif + + { "踢除所有玩家", CHAR_CHAT_DEBUG_waeikickall, TRUE, 0, 3, "无"}, +// { "checktrade", CHAR_CHAT_DEBUG_checktrade, TRUE, 0, 3, "waei"}, + //工具 初级GM + { "调试", CHAR_CHAT_DEBUG_debug, TRUE, 0, 1, "密码 调试 on/off"}, + { "造型", CHAR_CHAT_DEBUG_metamo, TRUE, 0, 1, "变身图号 (账号)"}, + { "锁定帐号", CHAR_CHAT_DEBUG_checklock, TRUE, 0, 1, "帐号"}, + { "封嘴", CHAR_CHAT_DEBUG_shutup, TRUE, 0, 1, "帐号 ON/OFF"}, +#ifdef _WAEI_KICK +// { "gmkick", CHAR_CHAT_DEBUG_gmkick, TRUE, 0, 1, "帐号 LSLOCK/KICK/DEUNLOCK/UNLOCKALL/LOCK/TYPE/UNLOCK"}, +#endif + { "加入战斗", CHAR_CHAT_DEBUG_battlein, TRUE, 0, 1, "无"}, + { "结束战斗", CHAR_CHAT_DEBUG_battleout, TRUE, 0, 1, "无"}, + { "观看战斗", CHAR_CHAT_DEBUG_battlewatch, TRUE, 0, 1, "无"}, + { "显示信息", CHAR_CHAT_DEBUG_getuser, TRUE, 0, 1, "人物名 地图号 (npc)"}, + { "踢除玩家", CHAR_CHAT_DEBUG_waeikick, TRUE, 0, 1, "帐号"}, + { "关入监狱", CHAR_CHAT_DEBUG_jail, TRUE, 0, 1, "帐号"}, + { "传送", CHAR_CHAT_DEBUG_send, TRUE, 0, 1, "地图编号 x y 帐号"}, +#ifdef _SendTo + { "传送到玩家", CHAR_CHAT_DEBUG_Sendto, TRUE, 0, 1, "帐号"}, +#endif + { "不遇敌", CHAR_CHAT_DEBUG_noenemy, TRUE, 0, 1, "on/off"}, + { "显示完成任务", CHAR_CHAT_DEBUG_watchevent, TRUE, 0, 1, "无"}, +#ifdef _SEND_EFFECT // WON ADD AC送下雪、下雨等特效 + { "特效", CHAR_CHAT_DEBUG_sendeffect, TRUE, 0, 1, ""}, +#endif + { "禁言", CHAR_CHAT_DEBUG_silent, TRUE, 0, 2, "帐号 分钟"},//禁言 + { "踢人", CHAR_CHAT_DEBUG_unlock, TRUE, 0, 2, "帐号"}, + { "清除旗标", CHAR_CHAT_DEBUG_eventclean, TRUE, 0, 2, "all/旗标 帐号 人物名"}, + { "增加旗标", CHAR_CHAT_DEBUG_eventsetend, TRUE, 0, 2, "all/旗标 帐号 人物名"}, + { "重新任务", CHAR_CHAT_DEBUG_eventsetnow, TRUE, 0, 2, "all/旗标 帐号 人物名"}, + + { "人物地区显示", CHAR_CHAT_DEBUG_playerspread, TRUE, 0, 3, "waei"}, +// { "shutupall", CHAR_CHAT_DEBUG_shutupall, TRUE, 0, 3, "无"}, + { "解除服务器", CHAR_CHAT_DEBUG_unlockserver, TRUE, 0, 3, "无"}, + { "关服", CHAR_CHAT_DEBUG_shutdown, TRUE, 0, 3, "分钟"}, + + //制成 + { "删除物品", CHAR_CHAT_DEBUG_delitem, TRUE, 0, 1, "all/位置"}, + { "删除宠物", CHAR_CHAT_DEBUG_deletepet, TRUE, 0, 1, "all/位置"}, + { "制作物品", CHAR_CHAT_DEBUG_additem, TRUE, 0, 2, "道具ID ((数量) (账号))"}, + { "制作宠物", CHAR_CHAT_DEBUG_petmake, TRUE, 0, 2, "宠物ID ((等级) (账号))"}, + { "金钱", CHAR_CHAT_DEBUG_gold, TRUE, 0, 2, "数量 (账号)"}, + + //家族工具 +// { "manorpk", CHAR_CHAT_DEBUG_manorpk, TRUE, 0, 2, "allpeace/peace 庄园编号"}, + { "修改族长", CHAR_CHAT_DEBUG_fixfmleader, TRUE, 0, 2, "帐号 1"}, +// { "fixfmpk", CHAR_CHAT_DEBUG_fixfmpk, TRUE, 0, 3, ""}, +// { "fixfmdata", CHAR_CHAT_DEBUG_fixfmdata, TRUE, 0, 2, ""}, + + //测试用 + + +#ifdef _CHAR_POOLITEM +// { "saveditem", CHAR_CHAT_DEBUG_saveditem, TRUE, 0, 3, ""}, +// { "insertditem", CHAR_CHAT_DEBUG_insertditem, TRUE, 0, 3, ""}, +// { "showdepot", CHAR_CHAT_DEBUG_ShowMyDepotItems, TRUE, 0, 3, ""}, +// { "insidedepot", CHAR_CHAT_DEBUG_InSideMyDepotItems, TRUE, 0, 3, ""}, +#endif + +#ifdef _CHAR_POOLPET +// { "savedpet", CHAR_CHAT_DEBUG_savedpet, TRUE, 0, 3, ""}, +// { "insertdpet", CHAR_CHAT_DEBUG_insertdpet, TRUE, 0, 3, ""}, +// { "showdepotpet", CHAR_CHAT_DEBUG_ShowMyDepotPets, TRUE, 0, 3, ""}, +// { "insidedepotpet", CHAR_CHAT_DEBUG_InSideMyDepotPets, TRUE, 0, 3, ""}, +#endif + + +#ifdef _TEST_DROPITEMS + { "满地宠物", CHAR_CHAT_DEBUG_dropmypet, TRUE, 0, 3, "宠物编号"}, + { "满地宠物", CHAR_CHAT_DEBUG_dropmyitem, TRUE, 0, 2, "道具编号/(0/1)"}, +#endif +#ifdef _CHAR_PROFESSION // WON ADD 人物职业 + { "添加技能", CHAR_CHAT_DEBUG_addsk, TRUE, 0, 2, ""}, + { "删除技能", CHAR_CHAT_DEBUG_delsk, TRUE, 0, 2, ""}, +#endif +#ifdef _TEST_PETCREATE +// { "create_pet", CHAR_CHAT_DEBUG_createpet, TRUE, 0, 3, ""}, +#endif + { "显示时间", CHAR_CHAT_DEBUG_checktime, TRUE, 0, 3, ""}, + +#ifdef _GAMBLE_BANK + { "积分", CHAR_CHAT_DEBUG_setgamblenum, TRUE, 0, 3, ""}, +#endif + // WON ADD 当机指令 +// { "crash", CHAR_CHAT_DEBUG_crash, TRUE, 0, 3, ""}, +#ifdef _PETSKILL_SETDUCK +// { "setDuck", CHAR_CHAT_DEBUG_SetDuck, TRUE, 0, 3, ""}, +#endif + +#ifdef _TYPE_TOXICATION +// { "setTox", CHAR_CHAT_DEBUG_Toxication, TRUE, 0, 3, ""}, +#endif +#ifdef _ACTION_BULLSCR +// { "setascore", CHAR_CHAT_DEBUG_setascore, TRUE, 0, 3, ""}, +// { "getascore", CHAR_CHAT_DEBUG_getascore, TRUE, 0, 2, "all/start/score/btime/stime"}, +#endif + { "显示内存", CHAR_CHAT_DEBUG_showMem, TRUE, 0, 2, "无"}, +#ifdef _NEW_PLAYERGOLD +// { "acnewplayer", CHAR_CHAT_DEBUG_acnewplayer, TRUE, 0, 3, ""}, +// { "loadnewplayer", CHAR_CHAT_DEBUG_loadnewplayer, TRUE, 0, 3, ""}, +#endif +#ifdef _ACTION_GMQUE // ANDY GM活动功能 永保留 +// { "cleanqute", CHAR_CHAT_DEBUG_cleanqute, TRUE, 0, 3, ""}, +#endif +#ifdef _CHAR_PROFESSION // WON ADD 人物职业 +// { "职业", CHAR_CHAT_DEBUG_show_profession,TRUE, 0, 2, ""}, +// { "set_regist", CHAR_CHAT_DEBUG_set_regist, TRUE, 0, 1, ""}, +#endif +// { "samecode", CHAR_CHAT_DEBUG_samecode, TRUE, 0, 3, ""}, +#ifdef _GM_IDENTIFY +// { "gmidentify", CHAR_CHAR_DEBUG_gmidentify, TRUE, 0, 3, ""}, +#endif + +#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令 +// { "reloadfm", CHAR_CHAR_DEBUG_reloadfm, TRUE, 0, 1, ""}, +// { "fmpk", CHAR_CHAR_DEBUG_fmpk, TRUE, 0, 1, ""}, +// { "fmpk_clean", CHAR_CHAR_DEBUG_fmpk_clean, TRUE, 0, 1, ""}, +#endif +#ifdef _NEW_MANOR_LAW + // 设定个人气势 + { "个人气势",CHAR_CHAT_DEBUG_set_momentum,TRUE,0,2,"[个人气势 <名称> <数值>]"}, + // 设定家族拥有庄园 + { "庄园",CHAR_CHAT_DEBUG_set_manor_owner,TRUE,0,2,"[庄园 <庄园id> <0 or 1> <家族名 or 家族ID>]"}, + // 设定庄园挑战时间,设定的时间为目前每个挑战时期的经过时间(单位:分),ex:现在是休战期,共需要经过五天才会进 + // 入挑战期,则下指令设定为 5 ,则会由五天的等待期变成了只等五分钟 + { "庄园挑战时间",CHAR_CHAT_DEBUG_set_schedule_time,TRUE,0,2,"[set_schedule_time ]"}, +#endif + +#ifdef _ANGEL_SUMMON + { "精灵召唤", CHAR_CHAT_DEBUG_angelinfo, TRUE, 0, 2, ""}, + { "清除精灵召唤", CHAR_CHAT_DEBUG_angelclean, TRUE, 0, 2, ""}, + { "创建精灵召唤", CHAR_CHAT_DEBUG_angelcreate, TRUE, 0, 2, ""}, + { "重读使者任务", CHAR_CHAT_DEBUG_missionreload, TRUE, 0, 2, ""}, +#endif + + { "读取物品", CHAR_CHAT_DEBUG_itemreload, TRUE, 0, 2, ""}, + + { "天行者", CHAR_CHAT_DEBUG_skywalker, TRUE, 0, 1, ""}, +#ifdef _ITEM_ADDEXP +// { "itemaddexp", CHAR_CHAT_DEBUG_itemaddexp, TRUE, 0, 1, ""}, +#endif + +#ifdef _DEF_FMFREETIME +// { "fmfreetime", CHAR_CHAT_DEBUG_fmfreetime, TRUE, 0, 1, "帐号 人物名称"}, +#endif +#ifdef _DEF_GETYOU + { "获取账号", CHAR_CHAT_DEBUG_getyou, TRUE, 0, 1, "格数 1~3"}, +#endif +#ifdef _DEF_NEWSEND + { "传送玩家", CHAR_CHAT_DEBUG_newsend, TRUE, 0, 1, "地图编号 x y 帐号 无/要说的话"}, +#endif +#ifdef _DEF_SUPERSEND + { "群体传送", CHAR_CHAT_DEBUG_supersend, TRUE, 0, 3, "地图编号 x y 格数 无/要说的话"}, +#endif +#ifdef _FONT_SIZE + { "字体大小", CHAR_CHAT_DEBUG_fsize, TRUE, 0, 1, ""}, +#endif +#ifdef _JOBDAILY +// { "rejobdaily", CHAR_CHAT_DEBUG_rejobdaily, TRUE, 0, 3, "无"}, +#endif +#ifdef _RACEMAN +// { "changeask", CHAR_CHAT_DEBUG_changeask, TRUE, 0, 2, "帐号 宠证id 0/1"}, +#endif +#ifdef _GM_ITEM + { "权限", CHAR_CHAT_DEBUG_GMFUNCTION, TRUE, 0, 3, "命令 次数 (账号)"}, +#endif + +#ifdef _GM_RIDE + { "设置骑乘", CHAR_CHAT_DEBUG_SETRIDE, TRUE, 0, 3, "骑宠号 (账号)"}, + { "移除骑乘", CHAR_CHAT_DEBUG_MVRIDE, TRUE, 0, 3, "骑宠号 (账号)"}, +#endif + +#ifdef _LOCK_IP + { "锁定IP", CHAR_CHAT_DEBUG_LOCK_IP, TRUE, 0, 3, "IP|登陆次数"}, + { "显示锁定IP", CHAR_CHAT_DEBUG_DISPLAY_LOCK_IP, TRUE, 0, 3, ""}, +#endif + +}; + +void CHAR_initDebugChatCdkey( void) +{ + int i; + for( i = 0; i < DEBUGCDKEYNUM; i ++ ) { + DebugCDKey[i].use = FALSE; + DebugCDKey[i].cdkey[0] = '\0'; + } +} +/*------------------------------------------------------------ + * 民乓永玄 芊及甩永扑亘袄毛综月[ + * 娄醒}忒曰袄 + * 卅仄 + ------------------------------------------------------------*/ +void CHAR_initChatMagic(void) +{ + int i; + for( i=0 ; i 8 ) { + return -1; + } + for( i = 0; i < DEBUGCDKEYNUM; i ++ ) { + if( DebugCDKey[i].use == FALSE) { + if( mode == 0 ) { + DebugCDKey[i].use = TRUE; + strcpysafe( DebugCDKey[i].cdkey, sizeof( DebugCDKey[i].cdkey), cdkey); + found = TRUE; + break; + } + } + else { + if( mode == 1 ) { + if( strcmp( DebugCDKey[i].cdkey, cdkey) == 0 ) { + DebugCDKey[i].use = FALSE; + DebugCDKey[i].cdkey[0] = '\0'; + found = TRUE; + } + } + } + + } + if( !found ) return -1; + return i; +} + +static CHATMAGICFUNC CHAR_getChatMagicFuncPointer(char* name, BOOL isDebug) +{ + int i; + int hash = hashpjw( name ); + for( i=0 ; i= arraysizeof( CHAR_cmtbl) ) return -1; + if( CHAR_cmtbl[ ti].isdebug == isDebug && + CHAR_cmtbl[ ti].level <= level ){ + sprintf( name,"%s", CHAR_cmtbl[ ti].magicname ); + sprintf( usestring, "%s", CHAR_cmtbl[ ti].usestring ); + return 1; + } + return 0; +} + +int CHAR_getChatMagicFuncMaxNum( void) +{ + return arraysizeof( CHAR_cmtbl); +} + +/*------------------------------------------------------------ + * 民乓永玄 芊 + * 娄醒 + * charaindex int 平乓仿奶件犯永弁旦 + * message char* 丢永本□斥 + * isDebug BOOL 犯田永弘民乓永玄 芊井升丹井 + * 忒曰袄 + * 卅仄 + ------------------------------------------------------------*/ +static BOOL CHAR_useChatMagic( int charaindex, char* data, BOOL isDebug) +{ + char magicname[256]; + int ret; + int i; + int gmLevel = 0, magicLevel; + + CHATMAGICFUNC func; + +#ifdef _GMRELOAD + extern struct GMINFO gminfo[GMMAXNUM]; +#else +#endif + char *p = CHAR_getChar( charaindex, CHAR_CDKEY); + if( !p ) { + fprint( "err nothing cdkey\n"); + return FALSE; + } + + if( getChatMagicCDKeyCheck() == 1 ){ //第一次确认GM帐号 + if( CHAR_getWorkInt( charaindex, CHAR_WORKFLG) & WORKFLG_DEBUGMODE ) { + gmLevel = CHAR_getWorkInt( charaindex, CHAR_WORKGMLEVEL); + }else{ + + +#ifdef _GMRELOAD + for (i = 0; i < GMMAXNUM; i++){ + if (strcmp( p, gminfo[i].cdkey) == 0){ + gmLevel = gminfo[i].level; + CHAR_setWorkInt( charaindex, CHAR_WORKGMLEVEL, gmLevel); + break; + } + } +#else +#endif + if( i >= GMMAXNUM ){ + for( i = 0; i < DEBUGCDKEYNUM; i ++ ) { + if( DebugCDKey[i].use && strcmp( p, DebugCDKey[i].cdkey) == 0 ) { + break; + } + } + if( i >= DEBUGCDKEYNUM ) return FALSE; + } + } + + }else { + gmLevel = 3; + CHAR_setWorkInt( charaindex, CHAR_WORKGMLEVEL, gmLevel); + } + + ret = getStringFromIndexWithDelim( data, " ", 1, magicname, sizeof( magicname)); + if( ret == FALSE)return FALSE; + + // Robin 0618 chaeck GM Level + magicLevel = CHAR_getChatMagicFuncLevel( magicname, isDebug); + if( gmLevel < magicLevel ) + return FALSE; + + func = CHAR_getChatMagicFuncPointer(magicname,isDebug); + if( func ){ + LogGM( CHAR_getUseName( charaindex), CHAR_getChar( charaindex, CHAR_CDKEY), data, + CHAR_getInt( charaindex, CHAR_FLOOR), CHAR_getInt( charaindex, CHAR_X), + CHAR_getInt( charaindex, CHAR_Y) ); + func( charaindex, data + strlen( magicname)+1); + return TRUE; + }else{ + return FALSE; + } +} + +/*------------------------------------------------------------ + * 祥汹井日汔毛菲户月 + * 娄醒 + * volume int 祥汹 + * 忒曰袄 + * 穴永皿匹及穴旦 + ------------------------------------------------------------*/ +static int CHAR_getRangeFromVolume( int volume ) +{ + static int chatvol[]={ + 3,5,7,9,11,13,15,17,19,21,23,25,27,29,31 + }; + + if( volume < 0 )return 0; + else if( arraysizeof( chatvol ) <= volume ) { + return chatvol[arraysizeof(chatvol)-1]; + } + return chatvol[volume]; +} +/*------------------------------------------------------------ + * 擘及示伉亘□丞毛茧月[条卅中支曰井凶[ + * 娄醒 + * mesg char* 仄扎屯月蜕邯 + * 忒曰袄 + * -1 及午五反仇公仇公 + * 0 及午五反孔勾丹 + * 1 方曰云云五中午}仃勾卞勾中化中月 ! 及醒 + ------------------------------------------------------------*/ +static int CHAR_getVolume( char* mesg ) +{ + int stringlen = strlen( mesg ); + if( stringlen == 0 ) + return 0; + else if( stringlen == 1 ){ + if( mesg[0] == '!')return 1; + else return 0; + }else if( stringlen == 2 ){ + if( mesg[1] == '!'){ + if( mesg[0] == '!' )return 2; + else return 1; + }else + return 0; + }else{ + /* 3动晓 */ + if( mesg[stringlen-1] == '.' ){ + /* 仇公仇公及第 岭丐曰 */ + if( mesg[stringlen-2] == '.' && mesg[stringlen-3] == '.' ){ + /* 仇公仇公 */ + return -1; + } + return 0; + }else{ + /* 仇仇井日 ! 毛醒尹月*/ + int exnum=0; + int i; + for( i=stringlen-1; i>=0 ; i-- ){ + if( mesg[i] != '!' ) + break; + else + exnum++; + } + return exnum; + } + } +} + +/*------------------------------------------------------------ + * 丢永本□斥及 井日丢永本□斥及 坌毛潸曰请允 + * 娄醒 + * message char* 丢永本□斥 + * kind char* p or s or i卅及丢永本□斥 + * kindlen int kind 及赢今 + * body char** 丢永本□斥 及禾奶件正□及伞 桦赭 + * 忒曰袄 + * 卅仄 + ------------------------------------------------------------*/ +void CHAR_getMessageBody(char* message,char* kind,int kindlen,char** body) +{ + int firstchar; + + /* 1 侬 毛切之匀仁[1 侬匹丐月仇午反lssproto.html互忡据 */ + // Nuke +1: For invalid message attack + *body = 0; + firstchar = message[0]; + if( firstchar == 'P' || + firstchar == 'S' || + firstchar == 'D' + + // CoolFish: Trade 2001/4/18 + || firstchar == 'C' + || firstchar == 'T' + || firstchar == 'W' + + // CoolFish: Family 2001/5/28 + || firstchar == 'A' + || firstchar == 'J' + || firstchar == 'E' + || firstchar == 'M' + + || firstchar == 'B' + || firstchar == 'X' + || firstchar == 'R' + || firstchar == 'L' + + ){ + if( kindlen >= 2 ){ + kind[0] = firstchar; + kind[1] = '\0'; + } else { + return; + } + } else { + return; + } + + *body = message + 2; +} + + +static BOOL CHAR_Talk_check( int talkerindex, int talkedindex, int micflg ) +{ +#if 1 + if( !CHAR_getFlg( talkerindex, CHAR_ISPARTYCHAT )){ + int talker_b_mode = CHAR_getWorkInt( talkerindex, CHAR_WORKBATTLEMODE); + int talked_b_mode = CHAR_getWorkInt( talkedindex, CHAR_WORKBATTLEMODE); + if( talker_b_mode != BATTLE_CHARMODE_NONE + && CHAR_getInt( talkedindex, CHAR_WHICHTYPE) != CHAR_TYPEPLAYER){ + return FALSE; + } + if( micflg != 0 )return TRUE; + if( talker_b_mode != BATTLE_CHARMODE_NONE && talked_b_mode != BATTLE_CHARMODE_NONE){ + if( CHAR_getWorkInt( talkerindex, CHAR_WORKBATTLEINDEX) + != CHAR_getWorkInt( talkedindex, CHAR_WORKBATTLEINDEX)){ + return FALSE; + } + }else if( talker_b_mode != BATTLE_CHARMODE_NONE || talked_b_mode != BATTLE_CHARMODE_NONE){ + return FALSE; + } + return TRUE; + } + if( CHAR_getInt( talkerindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER) { + int talker_b_mode = CHAR_getWorkInt( talkerindex, CHAR_WORKBATTLEMODE); + int talked_b_mode = CHAR_getWorkInt( talkedindex, CHAR_WORKBATTLEMODE); + + if( talker_b_mode != BATTLE_CHARMODE_NONE && CHAR_getInt( talkedindex, CHAR_WHICHTYPE) != CHAR_TYPEPLAYER){ + return FALSE; + } + if( micflg != 0 )return TRUE; + if( CHAR_getWorkInt( talkerindex, CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE ){ + if( CHAR_getWorkInt( talkedindex, CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE){ + if( CHAR_getWorkInt( talkerindex, CHAR_WORKPARTYINDEX1) + == CHAR_getWorkInt( talkedindex, CHAR_WORKPARTYINDEX1) ){ + return TRUE; + } + } + }else { + if( talker_b_mode != BATTLE_CHARMODE_NONE && talked_b_mode != BATTLE_CHARMODE_NONE){ + if( CHAR_getWorkInt( talkerindex, CHAR_WORKBATTLEINDEX) + != CHAR_getWorkInt( talkedindex, CHAR_WORKBATTLEINDEX)){ + return FALSE; + } + }else if( talker_b_mode != BATTLE_CHARMODE_NONE || + talked_b_mode != BATTLE_CHARMODE_NONE){ + return FALSE; + } + return TRUE; + } + } + return FALSE; + +#else + int MyBattleMode; + int ToBattleMode; + + MyBattleMode = CHAR_getWorkInt( talkerindex, CHAR_WORKBATTLEMODE); + ToBattleMode = CHAR_getWorkInt( talkedindex, CHAR_WORKBATTLEMODE); + + /* 爵 及凛 */ + if( MyBattleMode == BATTLE_CHARMODE_NONE ) { + if( ToBattleMode == BATTLE_CHARMODE_NONE ) { + return TRUE; + } + else { + return FALSE; + } + } + /* 爵 及凛 */ + else { + /* 爵 仄化中卅中谛卞反霜日卅中[ */ + if( ToBattleMode == BATTLE_CHARMODE_NONE) { + return FALSE; + } + /* 元爵 匹 元扔奶玉及谛卞仄井霜耨请 卅中 */ + if( CHAR_getWorkInt( talkerindex, CHAR_WORKBATTLEINDEX) + == CHAR_getWorkInt( talkedindex, CHAR_WORKBATTLEINDEX) && + CHAR_getWorkInt( talkerindex, CHAR_WORKBATTLESIDE) + == CHAR_getWorkInt( talkedindex, CHAR_WORKBATTLESIDE ) ) + { + return TRUE; + } + else { + return FALSE; + } + } + return FALSE; +#endif +} +#ifdef _TELLCHANNEL // (不可开) Syu ADD 密语频道 +static int TalkCount = 0 ; +void OneByOneTkChannel ( int fd , char *tmp1 , char *tmp2 , int color ) +{ + int i ; + int myindex ; + int playernum = CHAR_getPlayerMaxNum(); + char buf[512]; + int IndexList[10] = { 0 } ; + int IndexCount = 0 ; + char *addr; + int target; + myindex = CONNECT_getCharaindex(fd); + +DebugPoint=300; + if( strlen( tmp2) > (sizeof(buf)-1) ) return; +DebugPoint=301; + memset ( IndexList , -1 , sizeof( IndexList ) ); +DebugPoint=302; + + for( i = 0 ; i < playernum ; i++) { + if( CHAR_getCharUse(i) != FALSE ) { + if (!CHAR_CHECKINDEX(i)) + continue; + if ( strcmp ( tmp1 , CHAR_getChar( i , CHAR_NAME ) ) == 0 ) { + IndexList[ IndexCount ] = i ; + IndexCount ++ ; + if ( IndexCount >= 10 ) break; + } + } + } +DebugPoint=303; + if ( IndexCount == 1 ) { +DebugPoint=304; + if ( myindex == IndexList[0] ) + return; +#ifdef _CHANNEL_MODIFY + if(CHAR_getFlg(IndexList[0],CHAR_ISTELL) == FALSE){ + snprintf(buf,sizeof(buf) - 1,"%s 关闭了此频道" ,tmp1); + CHAR_talkToCli(myindex,-1,buf,color); + return; + } +#endif +#ifndef _CHANNEL_MODIFY + snprintf( buf, sizeof( buf)-1, "你告诉%s:%s" , tmp1 , tmp2 ) ; + CHAR_talkToCli( myindex, -1, buf , color); + snprintf( buf , sizeof( buf)-1,"%s告诉你:%s" , CHAR_getChar ( myindex , CHAR_NAME ) , tmp2 ) ; + CHAR_talkToCli( IndexList[0] , -1, buf , color); +#else + snprintf(buf,sizeof(buf) - 1,"P|M|你告诉%s:%s",tmp1,tmp2); + lssproto_TK_send(fd,CHAR_getWorkInt(myindex,CHAR_WORKOBJINDEX),buf,color); + snprintf(buf,sizeof(buf) - 1,"P|M|%s告诉你:%s",CHAR_getChar(myindex,CHAR_NAME),tmp2); + lssproto_TK_send(getfdFromCharaIndex(IndexList[0]),CHAR_getWorkInt(IndexList[0],CHAR_WORKOBJINDEX),buf,color); +#endif + TalkCount ++ ; + }else if ( IndexCount > 1 && IndexCount < 10 ) { +DebugPoint=305; + print( "\nSyu log 进入同名Func" ); + if ( ( addr = strstr ( tmp2 , "/T" ) ) != NULL ) { + addr = addr + 2 ; + target = atoi ( addr ) ; + print ( "\nSyu log addr => %s , target => %d " , addr , target ) ; + addr = strtok ( tmp2 , "/T" ) ; + if (!CHAR_CHECKINDEX(IndexList[target])) + return; + if ( strcmp ( tmp1 , CHAR_getChar ( IndexList[ target ] , CHAR_NAME ) ) == 0 && + IndexList[ target ] != -1 ) { + if ( myindex == IndexList[ target ] ) + return ; +#ifdef _CHANNEL_MODIFY + if(CHAR_getFlg(IndexList[target],CHAR_ISTELL) == FALSE){ + snprintf(buf,sizeof(buf) - 1,"%s 关闭了此频道" ,tmp1); + CHAR_talkToCli(myindex,-1,buf,color); + return; + } +#endif +#ifndef _CHANNEL_MODIFY + snprintf( buf , sizeof( buf)-1, "你告诉%s:%s" , tmp1 , addr ) ; + CHAR_talkToCli( myindex, -1, buf , color); + snprintf( buf , sizeof( buf)-1, "%s告诉你:%s" , CHAR_getChar ( myindex , CHAR_NAME ) , addr ) ; + CHAR_talkToCli( IndexList[ target ] , -1, buf , color); +#else + snprintf(buf,sizeof(buf) - 1,"P|M|你告诉%s:%s",tmp1,addr); + lssproto_TK_send(fd,CHAR_getWorkInt(myindex,CHAR_WORKOBJINDEX),buf,color); + snprintf(buf,sizeof(buf) - 1,"P|M|%s告诉你:%s",CHAR_getChar(myindex,CHAR_NAME),addr); + lssproto_TK_send(getfdFromCharaIndex(IndexList[target]),CHAR_getWorkInt(IndexList[target],CHAR_WORKOBJINDEX),buf,color); +#endif + TalkCount ++ ; + } + }else { +DebugPoint=306; + for ( i = 0 ; i < 10 ; i ++ ) { + if ( IndexList[ i ] == -1 ) break; + if (!CHAR_CHECKINDEX(IndexList[i])) break; +#ifndef _CHANNEL_MODIFY + sprintf( buf , "TK|%d|%d|%d|%s|%s" , + i , + CHAR_getInt ( IndexList[ i ] , CHAR_TRANSMIGRATION ) , + CHAR_getInt ( IndexList[ i ] , CHAR_LV ) , + CHAR_getChar ( IndexList[ i ] , CHAR_NAME ) , + CHAR_getChar ( IndexList[ i ] , CHAR_OWNTITLE ) + ) ; + CHAR_talkToCli( myindex , -1, buf , color); +#else + sprintf( buf , "P|TK|%d|%d|%d|%s|%s" , + i , + CHAR_getInt ( IndexList[ i ] , CHAR_TRANSMIGRATION ) , + CHAR_getInt ( IndexList[ i ] , CHAR_LV ) , + CHAR_getChar ( IndexList[ i ] , CHAR_NAME ) , + CHAR_getChar ( IndexList[ i ] , CHAR_OWNTITLE ) + ) ; + lssproto_TK_send(fd,CHAR_getWorkInt(myindex,CHAR_WORKOBJINDEX),buf,color); +#endif + } +#ifndef _CHANNEL_MODIFY + snprintf( buf , sizeof( buf)-1, "TE|%s" , tmp2 ) ; + CHAR_talkToCli ( myindex , -1 , buf , color ) ; +#else + snprintf( buf , sizeof( buf)-1, "P|TE|%s" , tmp2 ) ; + lssproto_TK_send(fd,CHAR_getWorkInt(myindex,CHAR_WORKOBJINDEX),buf,color); +#endif + } + }else if ( IndexCount == 0 ) { +DebugPoint=307; + sprintf( buf , "没有这个人或不位於这个星球" ) ; + CHAR_talkToCli( myindex, -1, buf , color); + } +DebugPoint=308; +// print ( "\nSyu log TkChannel use ratio : %d " , TalkCount ) ; +} +#endif + + +void CHAR_Talk( int fd, int index,char* message,int color, int area ) +{ + char firstToken[64]; + char messageeraseescape[512]; + char* messagebody; + int mesgvolume=0; + int lastvolume=0; + int fl,x,y; + int stringlen; + int micflg = 0; +#ifdef _TELLCHANNEL // (不可开) Syu ADD 密语频道 + char tmp1[128] ; + char *tmp2; +#endif + int fmindexi = CHAR_getWorkInt( index, CHAR_WORKFMINDEXI ); + int channel = CHAR_getWorkInt( index, CHAR_WORKFMCHANNEL ); + int quickchannel = CHAR_getWorkInt( index, CHAR_WORKFMCHANNELQUICK ); + { + char *cdkey = CHAR_getChar( index, CHAR_CDKEY); + char *charname = CHAR_getChar( index, CHAR_NAME); + if( strlen(message) > 3 ){ + if( CHAR_getWorkInt( index, CHAR_WORKFLG) & WORKFLG_DEBUGMODE ) { + // shan begin + if(strstr( message, "[")&&strstr( message, "]")){ + }else{ + // original + LogTalk( charname, cdkey, CHAR_getInt( index, CHAR_FLOOR), + CHAR_getInt( index, CHAR_X), CHAR_getInt( index, CHAR_Y), + message ); + } + // end + } + } + } + //bg|0|r0|fc|d4B8|p0|bn|10|bt|10| + // Nuke +1 08/27: For invalid message attack + if (*message==0) return; + CHAR_getMessageBody(message,firstToken,sizeof(firstToken), + &messagebody); + // Nuke +1: For invalid message attack + if (!messagebody) return; + + strcpysafe( messageeraseescape,sizeof(messageeraseescape), + messagebody ); + makeStringFromEscaped( messageeraseescape ); + stringlen = strlen( messageeraseescape ); + if( stringlen <= 0 ) return; +#ifdef _TELLCHANNEL // (不可开) Syu ADD 密语频道 + if (messageeraseescape[0]== '/' && messageeraseescape[1]== 't' && + messageeraseescape[2]== 'e' && messageeraseescape[3]== 'l' && + messageeraseescape[4]== 'l'){ +DebugPoint=310; + getStringFromIndexWithDelim( message , " ", 2, tmp1, sizeof(tmp1)); + if ( (tmp2 = strstr ( message , tmp1 )) != NULL ) { + //strcpy ( message , tmp2 + strlen ( tmp1 ) + 1 ) ; + message = tmp2 + strlen(tmp1) + 1 ; + if( message == NULL || strlen( message ) <= 0 ) + return; + } +DebugPoint=308; + OneByOneTkChannel ( fd , tmp1 , message , color ) ; +DebugPoint=309; + return; + } +#endif + +#ifdef _M_SERVER + if (messageeraseescape[0]== '/' && messageeraseescape[1]== 'G' && + messageeraseescape[2]== 'M' && messageeraseescape[3]== '/' ){ + if( mfd != -1 ) { + int fdid=CONNECT_getFdid(fd); + + if( MSBUF_CHECKbuflen( strlen(messageeraseescape), 0.8) == FALSE ){ + print("\n msbuf full !!"); + CHAR_talkToCli(index,-1,"线上服务系统忙碌,请稍候再试",CHAR_COLORRED); + return; + } + + mproto_Que_Send( mfd, fdid, index, messageeraseescape+4); + return; + }else { + CHAR_talkToCli(index,-1,"暂时不提供此服务",CHAR_COLORRED); + return; + } + } +#endif +#ifdef _CHANNEL_MODIFY + // 家族频道 + if(messageeraseescape[0] == '/' && messageeraseescape[1] == 'F' && messageeraseescape[2] == 'M'){ + sprintf(messageeraseescape,"%s",messageeraseescape + 3); + } + else channel = -1; + + // 职业频道 + if(messageeraseescape[0] == '/' && messageeraseescape[1] == 'O' && + messageeraseescape[2] == 'C' && messageeraseescape[3] == 'C'){ + int i,pclass = CHAR_getInt(index,PROFESSION_CLASS) - 1,TalkTo; + char buf[512]; + + sprintf(messageeraseescape,"%s",messageeraseescape + 4); + for(i=0;i -1){ + // 如果对方有开频道 + if(CHAR_getFlg(TalkTo,CHAR_ISOCC) == TRUE){ + char escapebuf[2048]; + //snprintf(buf,sizeof(buf) - 1,"P|O|[职]%s",messageeraseescape); + snprintf(buf,sizeof(buf) - 1,"P|O|[职]%s", makeEscapeString( messageeraseescape, escapebuf, sizeof(escapebuf)) ); + lssproto_TK_send(getfdFromCharaIndex(TalkTo),CHAR_getWorkInt(TalkTo,CHAR_WORKOBJINDEX),buf,color); + } + } + } + return; + } +#endif + if( messageeraseescape[0] == '[' + && messageeraseescape[stringlen-1] == ']' ){ + char* pass; + // Arminius: limit ip +2 + unsigned long ip; + int a,b,c,d,ck; + messageeraseescape[stringlen-1] = '\0'; + // Arminius: limit ip + ip=CONNECT_get_userip(fd); + + a=(ip % 0x100); ip=ip / 0x100; + b=(ip % 0x100); ip=ip / 0x100; + c=(ip % 0x100); ip=ip / 0x100; + d=(ip % 0x100); + //andy_log + +#ifdef _kr_ip // WON ADD 不锁gm指令ip + ck=1; +#else + ck= ( ( (a==218) && (b==12) && (c==166) ) + || ( (a==218) && (b==12) ) // 研发内网 + || (a==218) + || ( (a==218) && (b==12) && (c==166) && (d==8) ) // 台北wayi + || ( (a==61) ) + || ( (a==221) ) + || ( (a==218) && (b==12) ) + || ( (a==60) && (b==10) ) + || ( (a==60) ) + || ( (a==10) && (b==64) && (c==97) && (d==249) ) // 客服 + || ( (a==10) && (b==220) && (c==189) && (d==234) ) + || ( (a==23) && (b==126) && (c==114) && (d==204) ) // 新加坡 + || ( (a==23) && (b==126) && (c==114) && (d==205) ) // 新加坡 + || ( (a==21) && (b==106) && (c==116) && (d==71) ) // 韩国 + || ( (a==21) && (b==106) && (c==116) && (d==72) ) // 韩国 + || ( (a==21) && (b==106) && (c==116) && (d==74) ) // 韩国 + || ( (a==21) && (b==106) && (c==110) && (d==12) ) // 韩国 + || ( (a==21) && (b==106) && (c==110) && (d==13) ) // 韩国 + ); +#endif + + pass = strstr( messageeraseescape+1, getChatMagicPasswd()); + if( (pass == messageeraseescape+1)&&(ck) ){ + CHAR_useChatMagic( index,messageeraseescape + 1 + + strlen(getChatMagicPasswd()) + 1, TRUE); + print( "\nGM[%d,%d,%d,%d]使用%s]\n", a, b, c, d,messageeraseescape); + }else{ + if( CHAR_getWorkInt( index, CHAR_WORKFLG ) & WORKFLG_DEBUGMODE ) { + CHAR_useChatMagic( index,messageeraseescape + 1,TRUE); + print( "\nGM[%d,%d,%d,%d]使用%s]\n", a, b, c, d,messageeraseescape); + }else{ +#ifdef _GM_ITEM + if(CHAR_getInt( index, CHAR_GMTIME)>0){ + char magicname[32]; + char token[64]; + getStringFromIndexWithDelim( messageeraseescape + 1, " ", 1, magicname, sizeof( magicname)); + if(!strcmp( CHAR_getChar( index, CHAR_GMFUNCTION), magicname)){ + CHAR_useChatMagic( index,messageeraseescape + 1,TRUE); + print( "\n玩家[%d,%d,%d,%d]使用%s]次数剩下%d\n", a, b, c, d,messageeraseescape, CHAR_getInt( index, CHAR_GMTIME) - 1); + CHAR_setInt( index , CHAR_GMTIME, CHAR_getInt( index, CHAR_GMTIME) - 1 ); + if(CHAR_getInt( index, CHAR_GMTIME) > 0){ + sprintf( token, "你还能使用%s权限%d次!", CHAR_getChar( index, CHAR_GMFUNCTION),CHAR_getInt( index, CHAR_GMTIME)); + CHAR_talkToCli( index, -1,token, CHAR_COLORRED ); + }else{ + sprintf( token, "你已经没有使用%s权限了!", CHAR_getChar( index, CHAR_GMFUNCTION)); + CHAR_talkToCli( index, -1,token, CHAR_COLORRED ); + } + }else if(!strcmp( "help", magicname) || !strcmp( "帮助", magicname)){ + getStringFromIndexWithDelim( messageeraseescape + 1, " ", 2, magicname, sizeof( magicname)); + if(!strcmp( CHAR_getChar( index, CHAR_GMFUNCTION), magicname)){ + CHAR_useChatMagic( index,messageeraseescape + 1,TRUE); + print( "\n玩家[%d,%d,%d,%d]使用%s]\n", a, b, c, d,messageeraseescape); + } + } + }else +#endif + CHAR_useChatMagic( index,messageeraseescape + 1,FALSE); + } + } + messageeraseescape[stringlen-1] = ']'; + return; + }else { + if( CHAR_getWorkInt( index, CHAR_WORKFLG) & WORKFLG_DEBUGMODE ) { + if( strstr( messageeraseescape, "[") != NULL || + strstr( messageeraseescape, "]") != NULL ){ + return; + } + } + } + mesgvolume = CHAR_getVolume( messageeraseescape ); + if( area == 0 ) area = 3; + if( mesgvolume == -1 ) lastvolume = -1; + else lastvolume = area - 1 + mesgvolume; + if( CHAR_getWorkInt( index, CHAR_WORKFLG ) & WORKFLG_MICMODE ){ + lastvolume = 15; + micflg = 1; + } + fl = CHAR_getInt( index, CHAR_FLOOR) ; + x = CHAR_getInt( index, CHAR_X) ; + y = CHAR_getInt( index, CHAR_Y) ; + // Robin 0705 channel + if( messageeraseescape[0] == ':'){ + if( (channel == -1) && (quickchannel != -1) ) + channel = quickchannel; + else if( channel != -1 ) + channel = -1; + } + { + typedef void (*TALKF)(int,int,char*,int,int); + TALKF talkedfunc=NULL; + talkedfunc = (TALKF)CHAR_getFunctionPointer(index, CHAR_TALKEDFUNC); + if( talkedfunc ) { + talkedfunc(index,index,messageeraseescape,color, channel); + } + + } + if( lastvolume == -1 ){ + int j; + int xx[2]={ x, x+CHAR_getDX(CHAR_getInt(index,CHAR_DIR))}; + int yy[2]={ y, y+CHAR_getDY(CHAR_getInt(index,CHAR_DIR))}; + BOOL talk=FALSE; + for( j=0 ; j<2 ; j ++ ){ + OBJECT object; + for( object=MAP_getTopObj(fl,xx[j],yy[j]) ; object ; object = NEXT_OBJECT( object ) ){ + int objindex = GET_OBJINDEX(object); + int toindex = OBJECT_getIndex( objindex); + if( OBJECT_getType(objindex) == OBJTYPE_CHARA && toindex != index ){ + if( CHAR_Talk_check( index, toindex, 0 )) { + typedef void (*TALKF)(int,int,char*,int,int); + TALKF talkedfunc=NULL; + talkedfunc = (TALKF)CHAR_getFunctionPointer( toindex, CHAR_TALKEDFUNC); + if( talkedfunc ) { + talkedfunc(toindex, index,messageeraseescape,color,-1); + } + if( CHAR_getInt(toindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER){ + talk = TRUE; + } + } + } +#ifdef _NPCSERVER_NEW + else if( OBJECT_getType(objindex) == OBJTYPE_NPCSCHARA){ + talk = TRUE; + } +#endif + } + } + if( talk )CHAR_setInt(index,CHAR_TALKCOUNT, CHAR_getInt( index, CHAR_TALKCOUNT) + 1); + }else{ + int range = CHAR_getRangeFromVolume( lastvolume ); + int i,j; + BOOL talk=FALSE; + BOOL channelTalk=FALSE; + int partyindex[CHAR_PARTYMAX]; + for( i = 0; i < CHAR_PARTYMAX; i ++ ) { + partyindex[i] = -1; + } +#ifndef _CHANNEL_MODIFY + if( CHAR_getWorkInt( index, CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE ) +#else + if(CHAR_getWorkInt( index, CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE && channel < 0) +#endif + { + for( i = 0; i < CHAR_PARTYMAX; i ++ ) { + int toindex = CHAR_getPartyIndex( index, i); + if( CHAR_CHECKINDEX( toindex) && toindex != index) { + typedef void (*TALKF)(int,int,char*,int,int); + TALKF talkedfunc=NULL; + talkedfunc = (TALKF)CHAR_getFunctionPointer( toindex, CHAR_TALKEDFUNC); + if( talkedfunc ) + talkedfunc( toindex,index, messageeraseescape, color, -1 ); + talk = TRUE; + partyindex[i] = toindex; + } + } + } + if( channel > -1 && fmindexi >= 0 ) { + int i, tindex; + + channelTalk = TRUE; + i = 0; +#ifdef _FMVER21 + if( channel == FAMILY_MAXCHANNEL && CHAR_getInt( index, CHAR_FMLEADERFLAG ) == FMMEMBER_LEADER) +#else + if( channel == FAMILY_MAXCHANNEL && CHAR_getInt( index, CHAR_FMLEADERFLAG ) == 1) +#endif + { + char buf[512]; + sprintf(buf, "[族长广播]%s: %s", CHAR_getChar( index, CHAR_NAME ), messageeraseescape); + saacproto_ACFMAnnounce_send( acfd, + CHAR_getChar( index, CHAR_FMNAME), + CHAR_getInt( index, CHAR_FMINDEX), + CHAR_getWorkInt( index, CHAR_WORKFMINDEXI), + buf, + color + ); + return; + } + else + + for(i=0;i= 0 && tindex != index) { + typedef void (*TALKF)(int,int,char*,int,int); + TALKF talkedfunc=NULL; +#ifdef _CHANNEL_MODIFY + if(CHAR_getFlg(tindex,CHAR_ISFM) == FALSE) continue; +#endif + + talkedfunc = (TALKF)CHAR_getFunctionPointer(tindex,CHAR_TALKEDFUNC); + + if( talkedfunc ) + talkedfunc( tindex,index, messageeraseescape, color, channel ); + } + } + + talk = TRUE; + + }else { + for( i=x-range/2 ; i<=x+range/2 ; i++ ){ + for( j=y-range/2 ; j<=y+range/2 ; j++ ){ + OBJECT object; + for( object = MAP_getTopObj( fl,i,j ) ; object ; object = NEXT_OBJECT(object) ){ + int objindex = GET_OBJINDEX(object); + int toindex = OBJECT_getIndex( objindex); + if( OBJECT_getType(objindex) == OBJTYPE_CHARA && toindex != index ){ + int k; + for( k = 0; k < CHAR_PARTYMAX; k ++ ) { + if( toindex == partyindex[k] ) { + break; + } + } + if( k != CHAR_PARTYMAX ) + continue; + if( CHAR_Talk_check( index, toindex, micflg ) ) { + typedef void (*TALKF)(int,int,char*,int,int); + TALKF talkedfunc=NULL; + talkedfunc = (TALKF)CHAR_getFunctionPointer( toindex, CHAR_TALKEDFUNC); + if( talkedfunc ) { + talkedfunc( toindex,index, messageeraseescape, color, -1 ); + } + if( CHAR_getInt( toindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER){ + talk = TRUE; + } + } + } +#ifdef _NPCSERVER_NEW + else if( OBJECT_getType( objindex) == OBJTYPE_NPCSCHARA){ + int npcsindex = OBJECT_getNpcIndex( objindex); + if( npcfd == -1) continue; + if( CHAR_getWorkInt( index, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE ) + break; + NPCS_AskNpcTalk_send( objindex, npcsindex, index, messageeraseescape); + } +#endif + } + } + } + } + if( talk ) { + CHAR_setInt(index,CHAR_TALKCOUNT, CHAR_getInt(index,CHAR_TALKCOUNT) + 1); + } + if( CHAR_getInt( index, CHAR_POPUPNAMECOLOR) != color ) { + CHAR_setInt( index, CHAR_POPUPNAMECOLOR, color); + if( talk) { + int opt[1]; + opt[0] = color; + CHAR_sendWatchEvent( CHAR_getWorkInt( index, CHAR_WORKOBJINDEX), + CHAR_ACTPOPUPNAME,opt,1,FALSE); + } + } + } +} + +#ifdef _FONT_SIZE +BOOL CHAR_talkToCliExt( int talkedcharaindex,int talkcharaindex, + char* message, CHAR_COLOR color, int fontsize ) +{ + static char lastbuf[2048]; + static char escapebuf[2048]; + static char mesgbuf[1024]; + int fd; + int talkchar=-1; + + if( !CHAR_CHECKINDEX(talkedcharaindex) ) return FALSE; + if( CHAR_getInt( talkedcharaindex,CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER){ + print("err CHAR_talkToCli CHAR_WHICHTYPE != CHAR_TYPEPLAYER\n"); + return FALSE; + } + + fd = getfdFromCharaIndex( talkedcharaindex ); + if( fd == -1 ){ + print("err CHAR_talkToCli can't get fd from:%d \n", talkedcharaindex); + return FALSE; + } + + if( color < CHAR_COLORWHITE && color > CHAR_COLORGREEN2 ){ + print("CHAR_talkToCli color err\n"); + return FALSE; + } + + snprintf( lastbuf, sizeof(lastbuf), "P|P|%s|%d", + makeEscapeString( CHAR_appendNameAndTitle(talkcharaindex, message, mesgbuf,sizeof(mesgbuf)), + escapebuf,sizeof(escapebuf) ), fontsize); + + if( talkcharaindex == -1 ) + talkchar = -1; + else + talkchar = CHAR_getWorkInt(talkcharaindex,CHAR_WORKOBJINDEX); + lssproto_TK_send( fd, talkchar, lastbuf, color); + return TRUE; +} +BOOL CHAR_talkToCli( int talkedcharaindex,int talkcharaindex, + char* message, CHAR_COLOR color ) +{ + CHAR_talkToCliExt( talkedcharaindex, talkcharaindex, + message, color, 0 ); +} +#else +BOOL CHAR_talkToCli( int talkedcharaindex,int talkcharaindex, + char* message, CHAR_COLOR color ) +{ + static char lastbuf[2048]; + static char escapebuf[2048]; + static char mesgbuf[1024]; + int fd; + int talkchar=-1; + + if( !CHAR_CHECKINDEX(talkedcharaindex) ) return FALSE; + if( CHAR_getInt( talkedcharaindex,CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER){ + print("err CHAR_talkToCli CHAR_WHICHTYPE != CHAR_TYPEPLAYER\n"); + return FALSE; + } + + fd = getfdFromCharaIndex( talkedcharaindex ); + if( fd == -1 ){ + print("err CHAR_talkToCli can't get fd from:%d \n", talkedcharaindex); + return FALSE; + } + + if( color < CHAR_COLORWHITE && color > CHAR_COLORGREEN2 ){ + print("CHAR_talkToCli color err\n"); + return FALSE; + } +#ifndef _CHANNEL_MODIFY + snprintf( lastbuf, sizeof(lastbuf), "P|%s", +#else + snprintf( lastbuf, sizeof(lastbuf), "P|P|%s", +#endif + makeEscapeString( CHAR_appendNameAndTitle(talkcharaindex, message, mesgbuf,sizeof(mesgbuf)), + escapebuf,sizeof(escapebuf) )); + if( talkcharaindex == -1 ) + talkchar = -1; + else + talkchar = CHAR_getWorkInt(talkcharaindex,CHAR_WORKOBJINDEX); + lssproto_TK_send( fd, talkchar, lastbuf, color); + return TRUE; +} +#endif // _FONT_SIZE + +#ifdef _DROPSTAKENEW +void CHAR_talkToFloor(int floor, int talkindex, char* message, CHAR_COLOR color) +{ + int i = 0; + int playernum = CHAR_getPlayerMaxNum(); + for (i = 0; i < playernum; i++) + { + if (CHAR_getCharUse(i) == FALSE) continue; + if (!CHAR_CHECKINDEX(i)) continue; + if (CHAR_getInt(i, CHAR_FLOOR) == floor) + { + if (CHAR_getWorkInt(i, CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE) + CHAR_talkToCli(i, talkindex, message, color); + } + } +} +#endif + +#ifdef _CHANNEL_MODIFY +// 初始化职业频道 +int InitOccChannel(void) +{ + if(piOccChannelMember == NULL){ + piOccChannelMember = (int*)calloc( 1,(PROFESSION_CLASS_NUM - 1) * getFdnum() * sizeof(int)); + if(piOccChannelMember == NULL){ + printf("Char_talk.c:InitOccChannel() memory allocate failed!\n"); + return 0; + } + memset(piOccChannelMember,-1,(PROFESSION_CLASS_NUM - 1) * getFdnum() * sizeof(int)); + } + return 1; +} +#endif diff --git a/gmsv/char/char_walk.c b/gmsv/char/char_walk.c new file mode 100644 index 0000000..19270c5 --- /dev/null +++ b/gmsv/char/char_walk.c @@ -0,0 +1,1308 @@ +#include "version.h" +#include +#include +#include +//??? +#include "common.h" +#include "handletime.h" +#include "object.h" +#include "char_base.h" +#include "char.h" +#include "char_event.h" +#include "lssproto_serv.h" +#include "readmap.h" +#include "map_deal.h" +#include "npccreate.h" +#include "encount.h" +#include "npcutil.h" +#include "battle.h" +#include "net.h" +#include "configfile.h" +#include "npc_npcenemy.h" + +static void CHAR_sendCharaAtWalk( int charaindex, int of, int ox, int oy, int xflg, int yflg ); +static void CHAR_sendCDCharaAtWalk( int charaindex, int of, int ox, int oy, int xflg, int yflg ); + +static CHAR_WALKRET CHAR_walk_turn( int index, int dir ) +{ + int fx,fy,ff; + OBJECT object; + + if(!CHAR_CHECKINDEX( index ))return CHAR_WALKSYSTEMERROR; + CHAR_setInt(index,CHAR_DIR,dir); + fx = CHAR_getInt(index,CHAR_X); + fy = CHAR_getInt(index,CHAR_Y); + ff = CHAR_getInt(index,CHAR_FLOOR); + CHAR_sendWatchEvent( CHAR_getWorkInt(index, CHAR_WORKOBJINDEX), + CHAR_ACTTURN,NULL,0,FALSE); + CHAR_setWorkInt( index, CHAR_WORKACTION, CHAR_ACTTURN); + for( object = MAP_getTopObj(ff,fx,fy) ; object ; + object = NEXT_OBJECT(object ) ){ + typedef void (*POSTOFUNC)(int,int); + POSTOFUNC pfunc=NULL; + int objindex = GET_OBJINDEX(object); + + switch( OBJECT_getType(objindex) ){ + case OBJTYPE_CHARA: + pfunc = (POSTOFUNC)CHAR_getFunctionPointer( + OBJECT_getIndex(objindex), + CHAR_POSTOVERFUNC); + break; + case OBJTYPE_ITEM: + pfunc = (POSTOFUNC)ITEM_getFunctionPointer( + OBJECT_getIndex(objindex), + ITEM_POSTOVERFUNC); + break; + case OBJTYPE_GOLD: + break; + default: + break; + } + if( pfunc )pfunc( OBJECT_getIndex(objindex),index ); + } + return CHAR_WALKSUCCESSED; +} + + +/*------------------------------------------------------------ + * n 汹 汹中凶map毛霜月 + * 娄醒 + * index int 平乓仿及奶件犯永弁旦 + * fl int 白夫失ID + * ox int 蟆及橇谪及x + * oy int 蟆及橇谪及y + * fx int 汹中凶 及x + * fy int 汹中凶 及y + * 忒曰袄 + * 卅仄 + ------------------------------------------------------------*/ +static void CHAR_sendMapAtWalk( int index, int fl ,int ox ,int oy, + int fx, int fy ) +{ + /* + * 蜇箕及袄午}蟆引匹及袄及犒毛苇月 + * 仇丹允月午}伐□皿NPC手棵签分[ + */ + int vx,vy; + const int seesiz = MAP_CHAR_DEFAULTSEESIZ; + + if( !CHAR_CHECKINDEX( index ) )return; + + vx = fx - ox; + vy = fy - oy; + + if( ABS(vx) >= seesiz/2 || /* 犒互 五中 */ + ABS(vy) >= seesiz/2 ){ /* 犒互 五中 */ + return; + + }else{ + RECT send,get; + char* mapdata; + int oldlux = ox - (int)(seesiz/2); + int oldluy = oy - (int)(seesiz/2); + int absx = ABS(vx); + int absy = ABS(vy); + /* + * 夫午勾聂户卞旦正□玄毛潸月及午}vx , vy 井日1夫仁及互禾奶件玄 + * 蟆午井今卅日卅中方丹卞} + * clipRect 反 w,h 0 毛心午户化中月 + */ + + /* == 0 及凛反霜日卅仁化方中 */ + if( vx != 0 ){ + if( vx > 0 ){ + send.x = oldlux + seesiz; + send.width = absx; + }else if( vx < 0 ){ + send.x = oldlux - absx; + send.width = absx; + } + + if( vy >= 0 ){ + send.y = oldluy; + send.height = seesiz + absy; + }else{ + send.y = oldluy - absy; + send.height = seesiz + absy; + } +{ + int tilesum, objsum,eventsum; + mapdata = MAP_getChecksumFromRECT(fl,&send,&get,&tilesum, &objsum,&eventsum ); + if( mapdata != NULL + && !( get.width == 0 && get.height == 0 ) ){ + int fd = getfdFromCharaIndex( index ); + if( fd != -1 ) + lssproto_MC_send( fd,fl,get.x,get.y, + get.x+get.width, + get.y+get.height, + tilesum, + objsum, + eventsum, + mapdata ); + } +} + } + + /* == 0 及凛反霜日卅仁化方中 */ + if( vy != 0 ){ + if( vy > 0 ){ + send.y = oldluy + seesiz; + send.height = absy; + }else{ + send.y = oldluy - absy; + send.height = absy; + } + if( vx >= 0 ){ + send.x = oldlux; + send.width = seesiz + absx; + }else if( vx < 0 ){ + send.x = oldlux - absx; + send.width = seesiz + absx; + } +{ + int tilesum, objsum,eventsum; + mapdata = MAP_getChecksumFromRECT(fl,&send,&get, &tilesum, &objsum,&eventsum); + if( mapdata != NULL + && !( get.width == 0 && get.height == 0 ) ){ + int fd = getfdFromCharaIndex( index ); + if( fd != -1 ) + lssproto_MC_send( fd,fl,get.x,get.y, + get.x+get.width, + get.y+get.height, + tilesum, + objsum, + eventsum, + mapdata ); + + } +} + } + } + +} +static CHAR_WALKRET CHAR_walk_move( int charaindex, int dir ); +/*------------------------------------------------------------ + * 啖 允月[ + * 娄醒 + * index int 平乓仿及奶件犯永弁旦 + * dir int 轾 + * 忒曰袄 + * CHAR_WALKRET + ------------------------------------------------------------*/ +static CHAR_WALKRET CHAR_walk_move( int charaindex, int dir ) +{ + int i; + int fx,fy,ff; + int ox,oy,of; + int objbuf[128]; + int objbufindex=0; + int notover=FALSE; + int retvalue=CHAR_WALKSUCCESSED; + + if( !CHAR_CHECKINDEX( charaindex )) return CHAR_WALKSYSTEMERROR; + ox = CHAR_getInt(charaindex,CHAR_X); + oy = CHAR_getInt(charaindex,CHAR_Y); + of = CHAR_getInt(charaindex,CHAR_FLOOR); + CHAR_getCoordinationDir( dir,ox,oy,1,&fx,&fy); + ff = of; + + if( CHAR_getInt( charaindex,CHAR_WHICHTYPE ) == CHAR_TYPEENEMY ){ + RECT walkr; + POINT nextp; + int npccreateindex; + npccreateindex = CHAR_getInt( charaindex,CHAR_NPCCREATEINDEX ); + if( CHAR_isInvincibleArea( ff,fx,fy)) { + CHAR_setInt(charaindex,CHAR_DIR,dir); + retvalue = CHAR_WALKEXTEND; + goto CHAR_AFTERWALK; + } + if( NPC_isBoundarySet( npccreateindex ) && + NPC_createGetRECT( npccreateindex,&walkr ) == TRUE ) + { + nextp.x = fx; + nextp.y = fy; + if( PointInRect( &walkr,&nextp ) == FALSE ){ + CHAR_setInt(charaindex,CHAR_DIR,dir); + retvalue = CHAR_WALKEXTEND; + goto CHAR_AFTERWALK; + } + }else{ + ; + } + } + + + if( CHAR_getFlg( charaindex, CHAR_ISBIG ) == 1 ){ + static POINT offset[5]={ + { 0,-1}, + {-1, 0}, + { 0, 0}, + { 1, 0}, + { 0, 1}, + }; + int k; + for( k=0 ; k<5; k++ ){ + if( !MAP_walkAble( charaindex, ff, fx+offset[k].x, + fy+offset[k].y )){ + CHAR_setInt(charaindex,CHAR_DIR,dir); + retvalue = CHAR_WALK1357; + goto CHAR_AFTERWALK; + } + } + + }else{ + if( CHAR_getDX(dir)*CHAR_getDY(dir) == 0 ){ + if( !MAP_walkAble( charaindex,ff, fx, fy ) ){ + CHAR_setInt(charaindex,CHAR_DIR,dir); + retvalue = CHAR_WALK1357; + goto CHAR_AFTERWALK; + } + }else{ + int xflg,yflg; + if( !MAP_walkAble( charaindex,ff, fx, fy ) ){ + CHAR_setInt(charaindex,CHAR_DIR,dir); + retvalue = CHAR_WALK1357; + goto CHAR_AFTERWALK; + } + + xflg = MAP_walkAble( charaindex,of, ox+CHAR_getDX(dir), oy ); + yflg = MAP_walkAble( charaindex,of, ox, oy+CHAR_getDY(dir) ); + + if( !xflg || !yflg ) { + CHAR_setInt(charaindex,CHAR_DIR,dir); + retvalue = CHAR_WALK1357; + goto CHAR_AFTERWALK; + } + } + } + objbufindex = CHAR_getSameCoordinateObjects( objbuf, arraysizeof( objbuf ), ff,fx,fy ); + for( i = 0 ; i < objbufindex ; i ++ ){ + int objindex= objbuf[i]; + switch( OBJECT_getType(objindex) ){ + case OBJTYPE_CHARA: + if( !CHAR_getFlg( OBJECT_getIndex(objindex),CHAR_ISOVERED) ) + notover= TRUE; + break; + case OBJTYPE_ITEM: + if( !ITEM_getInt( OBJECT_getIndex(objindex), ITEM_ISOVERED ) ) + notover= TRUE; + break; + case OBJTYPE_GOLD: + break; + default: + break; + } + } + if( notover == TRUE ){ + CHAR_setInt(charaindex,CHAR_DIR,dir); + retvalue = CHAR_WALKHITOBJECT; + }else{ + for( i = 0 ; i < objbufindex ; i ++ ){ + typedef void (*PREOFUNC)(int,int); + PREOFUNC pfunc=NULL; + int objindex=objbuf[i]; + switch( OBJECT_getType(objindex) ){ + case OBJTYPE_CHARA: + pfunc = (PREOFUNC)CHAR_getFunctionPointer( + OBJECT_getIndex(objindex), + CHAR_PREOVERFUNC); + break; + case OBJTYPE_ITEM: + pfunc = (PREOFUNC)ITEM_getFunctionPointer( + OBJECT_getIndex(objindex), + ITEM_PREOVERFUNC); + break; + case OBJTYPE_GOLD: + break; + default: + break; + } + if( pfunc )pfunc( OBJECT_getIndex(objindex),charaindex ); + } + + CHAR_setInt(charaindex,CHAR_X,fx); + CHAR_setInt(charaindex,CHAR_Y,fy); + CHAR_setInt(charaindex,CHAR_FLOOR,ff); + CHAR_setInt(charaindex,CHAR_DIR,dir); + + { + int objindex; + int ox,oy,of; + objindex = CHAR_getWorkInt( charaindex,CHAR_WORKOBJINDEX ); + of = OBJECT_setFloor(objindex, + CHAR_getInt(charaindex,CHAR_FLOOR)); + ox = OBJECT_setX(objindex,CHAR_getInt(charaindex,CHAR_X)); + oy = OBJECT_setY(objindex,CHAR_getInt(charaindex,CHAR_Y)); + if( !MAP_objmove( objindex, of,ox,oy,ff,fx,fy ) ){ + /* 仇氏卅氏升丹仄方丹手卅中 */ + fprint( "ERROR MAP_OBJMOVE objindex=%d(%s)\n",objindex, + CHAR_getUseName( charaindex ) ); + } + } + + CHAR_setInt(charaindex,CHAR_WALKCOUNT, + CHAR_getInt(charaindex,CHAR_WALKCOUNT) + 1 ); + + + for( i = 0 ; i < objbufindex ; i ++ ){ + typedef void (*POSTOFUNC)(int,int); + POSTOFUNC pfunc=NULL; + int objindex=objbuf[i]; + + switch( OBJECT_getType(objindex) ){ + case OBJTYPE_CHARA: + pfunc = (POSTOFUNC)CHAR_getFunctionPointer( + OBJECT_getIndex(objindex), + CHAR_POSTOVERFUNC); + break; + case OBJTYPE_ITEM: + pfunc = (POSTOFUNC)ITEM_getFunctionPointer( OBJECT_getIndex(objindex), ITEM_POSTOVERFUNC); + break; + case OBJTYPE_GOLD: + break; + default: + break; + } + if( pfunc )pfunc( OBJECT_getIndex(objindex),charaindex ); + } + objbufindex = CHAR_getSameCoordinateObjects(objbuf, arraysizeof(objbuf), of, ox, oy ); + for( i=0 ;i 0 ) { + CHAR_setWorkInt( charaindex, CHAR_WORK_TOHELOS_COUNT, count -1); + if( count -1 == 0 ) { + CHAR_talkToCli( charaindex, -1, "道具的效力已到。", CHAR_COLORWHITE); + } + } + par = ENCOUNT_getEncountPercentMin( charaindex, of,ox,oy); + if( par != -1 ) { + if( CHAR_getWorkInt( charaindex, CHAR_WORKENCOUNTPROBABILITY_MIN) != par ){ + flg = TRUE; + CHAR_setWorkInt( charaindex, CHAR_WORKENCOUNTPROBABILITY_MIN, par); + } + } + + par = ENCOUNT_getEncountPercentMax( charaindex, of,ox,oy); + if( par != -1 ) { + if( CHAR_getWorkInt( charaindex, CHAR_WORKENCOUNTPROBABILITY_MAX) != par ){ + flg = TRUE; + CHAR_setWorkInt( charaindex, CHAR_WORKENCOUNTPROBABILITY_MAX, par); + } + } + // Arminius 7.12 login announce + /* + { + int enfd = getfdFromCharaIndex( charaindex ); + if (CONNECT_get_announced(enfd)==0) { + // Robin 0720 + //AnnounceToPlayer(charaindex); + AnnounceToPlayerWN( enfd ); + CONNECT_set_announced(enfd,1); + } + } + */ + // Arminius 6.22 check Encounter + // Nuke 0622: Provide No Enemy function + { + int enfd = getfdFromCharaIndex( charaindex ); + int eqen = getEqNoenemy( enfd ); // Arminius 7.2: Ra's amulet + int noen = getNoenemy(enfd); + + // Arminius 7.31 cursed stone + if (getStayEncount(enfd)>0) { +#ifdef _ESCAPE_RESET // 恶宝解除後逃跑时间重新归零 + CHAR_setWorkInt( charaindex, CHAR_WORKLASTESCAPE, 0); +#endif + clearStayEncount(enfd); + } + //print("\n enfd=%d,eqen=%d,noen=%d", enfd, eqen, noen); + + // Arminius 7.2 Ra's amulet + if (eqen>=200) { + noen=1; + } else if (eqen>=120) { + if ((ff==100)||(ff==200)||(ff==300)||(ff==400)||(ff==500)) noen=1; + } else if (eqen>=80) { + if ((ff==100)||(ff==200)||(ff==300)||(ff==400)) noen=1; + } else if (eqen>=40) { + if ((ff==100)||(ff==200)) noen=1; + } + + + //print("\n noen=%d", noen); + if (noen==0) { + int maxep = CHAR_getWorkInt(charaindex, CHAR_WORKENCOUNTPROBABILITY_MAX); + int minep = CHAR_getWorkInt(charaindex, CHAR_WORKENCOUNTPROBABILITY_MIN); + int cep = CONNECT_get_CEP(enfd); + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + int temp=0; + int p_cep = CHAR_getWorkInt(charaindex, CHAR_ENCOUNT_FIX); + if( p_cep != 0 ){ + if( CHAR_getWorkInt( charaindex, CHAR_ENCOUNT_NUM) < (int)time(NULL) ){ + CHAR_talkToCli( charaindex, -1, "技能效用结束。", CHAR_COLORYELLOW); + CHAR_setWorkInt( charaindex, CHAR_ENCOUNT_FIX, 0); + CHAR_setWorkInt( charaindex, CHAR_ENCOUNT_NUM, 0); + } + temp = cep * (100 + p_cep ) / 100; + }else{ + temp = cep; + } +#endif + + if (cepmaxep) cep=maxep; + if (CHAR_getWorkInt(charaindex,CHAR_WORKBATTLEMODE)==BATTLE_CHARMODE_NONE) { + int entflag; + entflag=1; + { + int objindex,index; + OBJECT obj; + for ( obj = MAP_getTopObj( ff, fx, fy); obj; obj = NEXT_OBJECT( obj)) { + objindex = GET_OBJINDEX( obj); + if (OBJECT_getType( objindex) == OBJTYPE_CHARA) { + int etype; + index = OBJECT_getIndex( objindex); + if (!CHAR_CHECKINDEX( index)) continue; + if( CHAR_getInt( index, CHAR_WHICHTYPE) == CHAR_TYPENPCENEMY && + CHAR_getWorkInt( index, CHAR_WORKEVENTTYPE) == CHAR_EVENT_ENEMY ) { + CHAR_setInt( charaindex, CHAR_X, ox); + CHAR_setInt( charaindex, CHAR_Y, oy); + lssproto_XYD_send( getfdFromCharaIndex(charaindex), + CHAR_getInt( charaindex, CHAR_X ), + CHAR_getInt( charaindex, CHAR_Y ), + CHAR_getInt( charaindex, CHAR_DIR ) ); + break; + } + etype = CHAR_getWorkInt( index, CHAR_WORKEVENTTYPE); + if (etype!=CHAR_EVENT_NONE) { + if (etype==CHAR_EVENT_WARP) entflag=0; + } + } + } + } + + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + if( rand()%120 < temp ){ +#else + if (rand()%120 0 ) { + int Rnum=0; + int RandEnemy = getEqRandenemy( enfd); + Rnum = RAND(0,100); + if( Rnum > RandEnemy ) { +#endif + //encounter!! + cep = minep; + lssproto_EN_recv(enfd, + CHAR_getInt(charaindex,CHAR_X), + CHAR_getInt(charaindex,CHAR_Y)); +#ifdef _Item_MoonAct + } + }else{ + cep = minep; + lssproto_EN_recv(enfd, + CHAR_getInt(charaindex,CHAR_X), + CHAR_getInt(charaindex,CHAR_Y)); + } +#endif + } + } else { + if (cep start.x ) end.x --; + else if( end.x < start.x ) end.x ++; + if( end.y > start.y ) end.y --; + else if( end.y < start.y ) end.y ++; + + parent_dir = NPC_Util_getDirFromTwoPoint( &start,&end ); + if( parent_dir != -1 ) { + if( CHAR_walk( petindex, parent_dir, 0) == CHAR_WALKSUCCESSED ) + { + CHAR_setWorkInt( petindex, CHAR_WORKPETFOLLOWCOUNT, + 1 + CHAR_getWorkInt( petindex, CHAR_WORKPETFOLLOWCOUNT) ); + if( CHAR_getWorkInt( petindex, CHAR_WORKPETFOLLOWCOUNT) > 1000 ){ + CHAR_setWorkInt( petindex, CHAR_WORKPETFOLLOWCOUNT, 0); + CHAR_pickupFollowPet( toindex, petindex ); + } + + } + } + }else { + CHAR_setWorkInt( toindex, CHAR_WORKPETFOLLOW, -1); + } + + } + +#endif + + } + } + else { + /* 赓渝祭仄卅云允 */ + CHAR_setWorkInt( index, i+CHAR_WORKPARTYINDEX1, -1); + } + } + } +#if 1 + // Robin 0702 petFollow + if( CHAR_getWorkInt( index, CHAR_WORKPETFOLLOW) != -1 ) { + int petindex = CHAR_getWorkInt( index, CHAR_WORKPETFOLLOW); + if( CHAR_CHECKINDEX(petindex) ) { + int parent_dir; + /* 阂及匏 午]褪及汹五蟆及匏 井日 轾毛菲户月 */ + /* 汹仁 */ + end.x = CHAR_getInt( index, CHAR_X); + end.y = CHAR_getInt( index, CHAR_Y); + start.x = CHAR_getInt( petindex, CHAR_X); + start.y = CHAR_getInt( petindex, CHAR_Y); + + if( end.x > start.x ) end.x --; + else if( end.x < start.x ) end.x ++; + if( end.y > start.y ) end.y --; + else if( end.y < start.y ) end.y ++; + + parent_dir = NPC_Util_getDirFromTwoPoint( &start,&end ); + + //if( (end.x == start.x) && (end.x == start.y) ) + // parent_dir = -1; + + /* 弘仿犯奴它旦左皿扑亦件汹五毛 蜇允月啃卞] + * 戚及阂反蟆及阂及 毛馨丹方丹卞允月 + */ + //print(" pdir:%d sx:%d sy:%d ex:%d ey:%d ", + // parent_dir, start.x, start.y, end.x, end.y ); + //end = start; + + if( parent_dir != -1 ) { + if( CHAR_walk( petindex, parent_dir, 0) == CHAR_WALKSUCCESSED ) + { + CHAR_setWorkInt( petindex, CHAR_WORKPETFOLLOWCOUNT, + 1 + CHAR_getWorkInt( petindex, CHAR_WORKPETFOLLOWCOUNT) ); + if( CHAR_getWorkInt( petindex, CHAR_WORKPETFOLLOWCOUNT) > 1000 ) + { + /* + CHAR_setInt( petindex, CHAR_VARIABLEAI, + 200 + CHAR_getInt( petindex, CHAR_VARIABLEAI) ); + */ + CHAR_setWorkInt( petindex, CHAR_WORKPETFOLLOWCOUNT, 0); + CHAR_pickupFollowPet( index, petindex ); + } + } + } + } + else { + /* 赓渝祭仄卅云允 */ + CHAR_setWorkInt( index, CHAR_WORKPETFOLLOW, -1); + } + + } + +#endif + + } + } + + /* 99/03/09 By Kawata */ + /* walk及瑛绊}WALKARRAY互弁伉失今木化中月桦宁互丐月及匹 + * 潸曰 仄化戊疋月 + */ + strcpysafe( tmp ,sizeof(tmp), + CHAR_getWorkChar(index,CHAR_WORKWALKARRAY)); + if( strlen( tmp) > 0 ) { + CHAR_setWorkChar(index,CHAR_WORKWALKARRAY,&tmp[1]); + } + + /* 凛棉毛褡户月 */ + CHAR_setWorkInt( index, CHAR_WORKWALKSTARTSEC , NowTime.tv_sec ); + CHAR_setWorkInt( index, CHAR_WORKWALKSTARTMSEC , NowTime.tv_usec ); +} + + + +/*------------------------------------------------------------ + * 汹五铵户毛瓒 允月[ + * 娄醒 + * index int 平乓仿 匹及奶件犯永弁旦 + * dir char* 轾 侬 + * id int ID + * 忒曰袄 + * 卅仄 + ------------------------------------------------------------*/ +void CHAR_walk_start(int index, int x, int y, char* dir, BOOL mapsendmode ) +{ + + if( !CHAR_CHECKINDEX( index ) )return; + + // Nuke 08/27: Stop wap + /* + { + int ox, oy; + const int seesiz = MAP_CHAR_DEFAULTSEESIZ; + ox = CHAR_getInt(index,CHAR_X); + oy = CHAR_getInt(index,CHAR_Y); + if ( ABS(x - ox) > seesiz || ABS(y - oy) > seesiz ) { + CHAR_talkToCli(index, -1, "因座标错误而断线。", CHAR_COLORYELLOW); + CONNECT_setCloseRequest(getfdFromCharaIndex(index) , 1); + return; + } + } + */ + + + + if( CHAR_getFlg( index,CHAR_ISDIE ) )return; + CHAR_setWorkChar( index,CHAR_WORKWALKARRAY, dir ); + CHAR_setWorkInt( index, CHAR_WORKWALKSTARTSEC , NowTime.tv_sec ); + CHAR_setWorkInt( index, CHAR_WORKWALKSTARTMSEC , NowTime.tv_usec ); + + CHAR_setMyPosition( index, x, y, FALSE); + if( mapsendmode ) { + int ox,oy; + char buf[64]; + int len; + int i; + strcpysafe( buf, sizeof(buf), + CHAR_getWorkChar( index, CHAR_WORKWALKARRAY)); + + len = strlen( buf ); + ox = CHAR_getInt(index,CHAR_X); + oy = CHAR_getInt(index,CHAR_Y); + + for( i = 0; i < len; i ++ ) { + int dir,mode; + int fx,fy; + CHAR_ctodirmode( buf[i], &dir ,&mode ); + if( mode == 0 ) { + CHAR_getCoordinationDir( dir,ox,oy,1,&fx,&fy); + ox = fx; + oy = fy; + } + } + + CHAR_sendMapAtWalk(index, + CHAR_getInt( index, CHAR_FLOOR), + CHAR_getInt( index, CHAR_X), + CHAR_getInt( index, CHAR_Y), + ox,oy); + } + + if( strlen( dir ) >= 1 ) CHAR_walkcall( index ); +} +/*------------------------------------------------------------ + * 汹五及 赓 + * 娄醒 + * index int 平乓仿 匹及奶件犯永弁旦 + * dir char* 轾 侬 + * id int ID + * 忒曰袄 + * 卅仄 + ------------------------------------------------------------*/ +void CHAR_walk_init( int fd, int x, int y, char *direction, BOOL mapsendmode) +{ + if( strlen( direction) > 32) { + print( "walkarray length over\n"); + return; + } + // Nuke +1 : For acceleration avoidance + if (checkWalkTime(fd) < 0) { + CONNECT_setCloseRequest(fd,1); + print("Walk drop "); + return; + } + + if( CHAR_getWorkInt( CONNECT_getCharaindex(fd), CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE){ + return ; + } + if( CHAR_getWorkInt( CONNECT_getCharaindex(fd), CHAR_WORKPARTYMODE ) != CHAR_PARTY_CLIENT ){ + CHAR_walk_start( CONNECT_getCharaindex(fd), x, y, direction, mapsendmode ); + }else { + int dir, mode; + CHAR_ctodirmode( direction[0], &dir ,&mode ); + if( mode == 0 ) { + //print( "玩家并非领队也非单人玩家。\n"); + }else { + CHAR_walk_start( CONNECT_getCharaindex(fd), + x,y,direction, FALSE ); + } + } +} + +void CHAR_sendCharaAtWalk( int charaindex, int of,int ox,int oy,int xflg, int yflg ) +{ + int fd = -1; + int i,j,fl, x, y; + char introduction[512]; + char c_msg[1024*96]; + int strpos = 0; + int seesiz = CHAR_DEFAULTSEESIZ/2; + char cabuf[128]; + char myintroduction[512]; + int whichtype; + + whichtype = CHAR_getInt( charaindex, CHAR_WHICHTYPE); + if( whichtype == CHAR_TYPEPLAYER) { + fd = getfdFromCharaIndex( charaindex ); + if( fd == -1 )return; + } + if( xflg > 1 || xflg < -1 ) { + print( "%s:%d: arg err[xflg]\n",__FILE__, __LINE__); + return; + } + if( yflg > 1 || yflg < -1 ) { + print( "%s:%d: arg err[yflg]\n",__FILE__, __LINE__); + return; + } + fl = CHAR_getInt( charaindex, CHAR_FLOOR); + x = CHAR_getInt( charaindex, CHAR_X); + y = CHAR_getInt( charaindex, CHAR_Y); + + if( of != fl || ABS(x - ox) > seesiz/2 || ABS(y - oy) > seesiz/2 ) + return; + + c_msg[0] = '\0'; + if( !CHAR_makeObjectCString( CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX), myintroduction, sizeof( myintroduction))){ + myintroduction[0] = '\0'; + } + if( xflg != 0) { + i = x + seesiz * xflg; + for( j = y-seesiz ; j <= y+seesiz ;j ++ ) { + OBJECT object; + for( object = MAP_getTopObj(fl,i,j) ; object ; object = NEXT_OBJECT(object ) ){ + int introlen; + int objindex = GET_OBJINDEX(object); + int c_index = OBJECT_getIndex( objindex); + + if( OBJECT_getType(objindex) == OBJTYPE_NOUSE ) continue; + if( OBJECT_getType(objindex) == OBJTYPE_CHARA && !CHAR_getFlg(OBJECT_getIndex(objindex), CHAR_ISVISIBLE) ){ + continue; + } + if( strlen( myintroduction) != 0 ) { + if( OBJECT_getType( objindex) == OBJTYPE_CHARA ) { + if( CHAR_getInt( c_index, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER ) { + int tofd = getfdFromCharaIndex( c_index ); + CDsend( tofd); + lssproto_C_send( tofd, myintroduction); + } + } + } + if( whichtype == CHAR_TYPEPLAYER) { + /* Make C*/ + if( CHAR_makeObjectCString( objindex, introduction, sizeof( introduction))){ + introlen = strlen( introduction); + introduction[introlen] = ','; + introduction[introlen+1] = '\0'; + strcpysafe( &c_msg[strpos], sizeof( c_msg) - strpos, introduction); + strpos += strlen( introduction); + } + if( OBJECT_getType(objindex) == OBJTYPE_CHARA ) { + if( CHAR_getInt( c_index, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER && + CHAR_getWorkInt( c_index, CHAR_WORKPARTYMODE ) == CHAR_PARTY_LEADER ){ + if( CHAR_makeCAOPT1String( objindex, cabuf, sizeof( cabuf), CHAR_ACTLEADER,1 )){ + CONNECT_appendCAbuf( fd,cabuf,strlen(cabuf)); + } + } + if( CHAR_getInt( c_index, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER && + CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE ) == CHAR_PARTY_LEADER && + CHAR_getWorkInt( c_index, CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE){ + int tofd = getfdFromCharaIndex( c_index ); + if( tofd != -1 ) { + if( CHAR_makeCAOPT1String( CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX), + cabuf, sizeof( cabuf), CHAR_ACTLEADER,1 )){ + CONNECT_appendCAbuf( tofd,cabuf,strlen(cabuf)); + } + } + } + if( CHAR_getInt( c_index, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER && + CHAR_getWorkInt( c_index, CHAR_WORKBATTLEMODE ) != BATTLE_CHARMODE_NONE ){ + if( CHAR_getWorkInt( c_index, CHAR_WORKBATTLEWATCH) == TRUE ) { + if( CHAR_makeCAOPT1String( objindex, cabuf, sizeof( cabuf), + CHAR_ACTBATTLEWATCH, 1)){ + CONNECT_appendCAbuf( fd, cabuf, strlen( cabuf)); + } + }else { + int battleno = CHAR_getWorkInt( c_index, CHAR_WORKBATTLEINDEX); + int sideno = CHAR_getWorkInt( c_index,CHAR_WORKBATTLESIDE); + int helpno; + if( !BATTLE_CHECKINDEX( battleno) ) { + //print(" %s[%d]: BATTLE_CHECKINDEX( %d) err!!\n", __FILE__, __LINE__, battleno); + }else { + helpno = (BattleArray[ battleno].Side[ sideno].flg & BSIDE_FLG_HELP_OK) ? TRUE:FALSE; + /* HelpNo = 1 反移 */ + if( CHAR_makeCAOPT3String( objindex, cabuf, sizeof( cabuf), + CHAR_ACTBATTLE, battleno,sideno,helpno )){ + CONNECT_appendCAbuf( fd,cabuf,strlen(cabuf)); + } + } + } + } + if( ( CHAR_getInt( c_index, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER || + CHAR_getInt( c_index, CHAR_WHICHTYPE ) == CHAR_TYPEPET ) && + CHAR_getWorkInt( c_index, CHAR_WORKACTION ) != -1 ) { + if( CHAR_makeCADefaultString( objindex, cabuf, sizeof( cabuf), + CHAR_getWorkInt( c_index, CHAR_WORKACTION))){ + CONNECT_appendCAbuf( fd,cabuf,strlen(cabuf)); + } + } +#ifdef _ADD_ACTION + else if( CHAR_getWorkInt( c_index, CHAR_WORKACTION ) > 0 ) { + if( CHAR_makeCADefaultString( objindex, cabuf, sizeof( cabuf), + CHAR_getWorkInt( c_index, CHAR_WORKACTION))){ + CONNECT_appendCAbuf( fd,cabuf,strlen(cabuf)); + } + } +#endif +#ifdef _STREET_VENDOR + if(CHAR_getInt(c_index,CHAR_WHICHTYPE) == CHAR_TYPEPLAYER && + CHAR_getWorkInt(c_index,CHAR_WORKSTREETVENDOR) == 1 && + CHAR_getWorkInt(c_index,CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE){ + if(CHAR_makeCAOPTString(objindex,cabuf,sizeof(cabuf), + CHAR_STREETVENDOR_OPEN,CHAR_getWorkChar(c_index,CHAR_STREETVENDOR_NAME))){ + CONNECT_appendCAbuf(fd,cabuf,strlen(cabuf)); + } + } +#endif + +#ifdef _ANGEL_SUMMON + if( CHAR_getInt( c_index, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER && + CHAR_getWorkInt( c_index, CHAR_WORKANGELMODE ) == TRUE ){ + if( CHAR_makeCAOPT1String( objindex, cabuf, sizeof( cabuf), CHAR_ACTANGEL,1 )){ + CONNECT_appendCAbuf( fd,cabuf,strlen(cabuf)); + } + } +#endif + } + } + } + } + } + if( yflg != 0) { + j = y + seesiz * yflg; + for( i = x-seesiz ; i <= x+seesiz ;i ++ ) { + OBJECT object; + for( object = MAP_getTopObj(fl,i,j) ; object ; object = NEXT_OBJECT(object ) ){ + int introlen; + int objindex = GET_OBJINDEX(object); + int c_index = OBJECT_getIndex( objindex); + if( OBJECT_getType(objindex) == OBJTYPE_NOUSE ) continue; + if( OBJECT_getType(objindex) == OBJTYPE_CHARA && + !CHAR_getFlg(OBJECT_getIndex(objindex), CHAR_ISVISIBLE) ){ + continue; + } + if( strlen( myintroduction) != 0 ) { + if( OBJECT_getType( objindex) == OBJTYPE_CHARA ) { + if( CHAR_getInt( c_index, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER ) { + int tofd = getfdFromCharaIndex( c_index ); + CDsend( tofd); + lssproto_C_send( tofd, myintroduction); + } + } + } + if( whichtype == CHAR_TYPEPLAYER ) { + /* Make C*/ + if( CHAR_makeObjectCString( objindex, introduction, sizeof( introduction))){ + introlen = strlen( introduction); + introduction[introlen] = ','; + introduction[introlen+1] = '\0'; + strcpysafe( &c_msg[strpos], sizeof( c_msg) - strpos, introduction); + strpos += strlen( introduction); + } + if( OBJECT_getType(objindex) == OBJTYPE_CHARA ) { + if( CHAR_getInt( c_index, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER && + CHAR_getWorkInt( c_index, CHAR_WORKPARTYMODE ) == CHAR_PARTY_LEADER ){ + if( CHAR_makeCAOPT1String( objindex, cabuf, sizeof( cabuf), + CHAR_ACTLEADER,1 )){ + CONNECT_appendCAbuf( fd,cabuf,strlen(cabuf)); + } + } + if( CHAR_getInt( c_index, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER && + CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE ) == CHAR_PARTY_LEADER && + CHAR_getWorkInt( c_index, CHAR_WORKBATTLEMODE)== BATTLE_CHARMODE_NONE){ + int tofd = getfdFromCharaIndex( c_index ); + if( tofd != -1 ) { + if( CHAR_makeCAOPT1String( CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX), + cabuf, sizeof( cabuf), CHAR_ACTLEADER,1 )){ + CONNECT_appendCAbuf( tofd,cabuf,strlen(cabuf)); + } + } + } + if( CHAR_getInt( c_index, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER && + CHAR_getWorkInt( c_index, CHAR_WORKBATTLEMODE ) != BATTLE_CHARMODE_NONE ){ + if( CHAR_getWorkInt( c_index, CHAR_WORKBATTLEWATCH) == TRUE ) { + if( CHAR_makeCAOPT1String( objindex, cabuf, sizeof( cabuf), + CHAR_ACTBATTLEWATCH,1)){ + CONNECT_appendCAbuf( fd, cabuf, strlen( cabuf)); + } + }else { + int battleno = CHAR_getWorkInt( c_index, CHAR_WORKBATTLEINDEX); + int sideno = CHAR_getWorkInt( c_index, CHAR_WORKBATTLESIDE); + int helpno = (BattleArray[CHAR_getWorkInt( c_index, + CHAR_WORKBATTLEINDEX)].Side[ + CHAR_getWorkInt( c_index, + CHAR_WORKBATTLESIDE)].flg & BSIDE_FLG_HELP_OK) ? TRUE:FALSE; + + if( CHAR_makeCAOPT3String( objindex, cabuf, sizeof( cabuf), + CHAR_ACTBATTLE, battleno,sideno,helpno )){ + CONNECT_appendCAbuf( fd,cabuf,strlen(cabuf)); + } + } + } + if( ( CHAR_getInt( c_index, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER || + CHAR_getInt( c_index, CHAR_WHICHTYPE ) == CHAR_TYPEPET ) && + CHAR_getWorkInt( c_index, CHAR_WORKACTION ) != -1 ) { + if( CHAR_makeCADefaultString( objindex, cabuf, sizeof( cabuf), + CHAR_getWorkInt( c_index, CHAR_WORKACTION))){ + CONNECT_appendCAbuf( fd,cabuf,strlen(cabuf)); + } + } +#ifdef _ADD_ACTION + else if( CHAR_getWorkInt( c_index, CHAR_WORKACTION ) > 0 ) { + if( CHAR_makeCADefaultString( objindex, cabuf, sizeof( cabuf), + CHAR_getWorkInt( c_index, CHAR_WORKACTION))){ + CONNECT_appendCAbuf( fd,cabuf,strlen(cabuf)); + } + } +#endif +#ifdef _STREET_VENDOR + if(CHAR_getInt(c_index,CHAR_WHICHTYPE) == CHAR_TYPEPLAYER && + CHAR_getWorkInt(c_index,CHAR_WORKSTREETVENDOR) == 1 && + CHAR_getWorkInt(c_index,CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE){ + if(CHAR_makeCAOPTString(objindex,cabuf,sizeof(cabuf), + CHAR_STREETVENDOR_OPEN,CHAR_getWorkChar(c_index,CHAR_STREETVENDOR_NAME))){ + CONNECT_appendCAbuf(fd,cabuf,strlen(cabuf)); + } + } +#endif + +#ifdef _ANGEL_SUMMON + if( CHAR_getInt( c_index, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER && + CHAR_getWorkInt( c_index, CHAR_WORKANGELMODE ) == TRUE ){ + if( CHAR_makeCAOPT1String( objindex, cabuf, sizeof( cabuf), + CHAR_ACTANGEL,1 )){ + CONNECT_appendCAbuf( fd,cabuf,strlen(cabuf)); + } + } +#endif + + } + } + } + } + } + dchop( c_msg, "," ); + if( strlen( c_msg) != 0 ) { + CDflush( charaindex); + lssproto_C_send( fd, c_msg); + } +} + +static void CHAR_sendCDCharaAtWalk( int charaindex, int of, int ox, int oy, int xflg, int yflg ){ + int i,j,fl, x, y; + int seesiz = CHAR_DEFAULTSEESIZ/2; + int fd, tofd; + if( xflg > 1 || xflg < -1 ) { + print( "%s:%d: arg err[xflg]\n",__FILE__, __LINE__); + return; + } + if( yflg > 1 || yflg < -1 ) { + print( "%s:%d: arg err[yflg]\n",__FILE__, __LINE__); + return; + } + fl = CHAR_getInt( charaindex, CHAR_FLOOR); + x = CHAR_getInt( charaindex, CHAR_X); + y = CHAR_getInt( charaindex, CHAR_Y); + + if( of != fl || /* 白夫失互啜丹 */ + ABS(x - ox) > seesiz/2 || /* 犒互 五中 */ + ABS(y - oy) > seesiz/2 ) /* 犒互 五中 */ + return; + + fd = getfdFromCharaIndex( charaindex ); + if( xflg != 0) { + i = x + (seesiz * xflg + xflg)*-1; + for( j = y-seesiz +(yflg*-1) ; j <= y+seesiz +(yflg*-1) ;j ++ ) { + OBJECT object; + for( object = MAP_getTopObj(fl,i,j) ; + object ; + object = NEXT_OBJECT(object ) ) + { + int objindex = GET_OBJINDEX(object); + char buf[64]; + if( OBJECT_getType(objindex) == OBJTYPE_NOUSE ) continue; + if( OBJECT_getType(objindex) == OBJTYPE_CHARA && + !CHAR_getFlg(OBJECT_getIndex(objindex), CHAR_ISVISIBLE) ){ + continue; + } + if( fd != -1) { + cnv10to62( objindex, buf, sizeof( buf)); + CONNECT_appendCDbuf( fd, buf, strlen( buf)); + } + if( OBJECT_getType( objindex) == OBJTYPE_CHARA) { + int tocharaindex = OBJECT_getIndex( objindex); + if( CHAR_getInt( tocharaindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER ) { + if( CHAR_getWorkInt( tocharaindex, CHAR_WORKBATTLEMODE) + == BATTLE_CHARMODE_NONE ) { + tofd = getfdFromCharaIndex( tocharaindex ); + if( tofd != -1 ) { + cnv10to62( CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX), + buf, sizeof( buf)); + CONNECT_appendCDbuf( tofd, buf, strlen( buf)); + CAsend( tofd); + CDsend( tofd); + } + } + } + } + } + } + } + if( yflg != 0) { + j = y + (seesiz * yflg + yflg)*-1; + for( i = x-seesiz + (xflg*-1) ; i <= x+seesiz + (xflg*-1) ;i ++ ) { + OBJECT object; + for( object = MAP_getTopObj(fl,i,j) ; object ; object = NEXT_OBJECT(object ) ){ + int objindex = GET_OBJINDEX(object); + char buf[64]; + if( OBJECT_getType(objindex) == OBJTYPE_NOUSE ) continue; + if( OBJECT_getType(objindex) == OBJTYPE_CHARA && + !CHAR_getFlg(OBJECT_getIndex(objindex), CHAR_ISVISIBLE) ){ + continue; + } + if( fd != -1 ) { + cnv10to62( objindex, buf, sizeof( buf)); + CONNECT_appendCDbuf( fd, buf, strlen( buf)); + } + if( OBJECT_getType( objindex) == OBJTYPE_CHARA) { + int tocharaindex = OBJECT_getIndex( objindex); + if( CHAR_getInt( tocharaindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER ){ + if( CHAR_getWorkInt( tocharaindex, CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE ){ + tofd = getfdFromCharaIndex( tocharaindex ); + if( tofd != -1 ) { + cnv10to62( CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX), buf, sizeof( buf)); + CONNECT_appendCDbuf( tofd, buf, strlen( buf)); + CAsend( tofd); + CDsend( tofd); + } + } + } + } + } + } + } + CDsend( fd); +} + +void CHAR_ctodirmode(char moji , int* dir , int* mode) +{ + *mode = 1; + if( 'a' <= moji && moji <= 'h' )*mode = 0; + + *dir = tolower(moji) - 'a'; +} diff --git a/gmsv/char/chatmagic.c b/gmsv/char/chatmagic.c new file mode 100644 index 0000000..2ace480 --- /dev/null +++ b/gmsv/char/chatmagic.c @@ -0,0 +1,5828 @@ +#include "version.h" +#include +#include +#include +#include +#include +#include +#include +#include "common.h" +#include "char.h" +#include "util.h" +#include "buf.h" +#include "npcutil.h" +#include "char_base.h" +#include "object.h" +#include "char_data.h" +#include "handletime.h" +#include "chatmagic.h" +#include "configfile.h" +#include "readmap.h" +#include "map_deal.h" +#include "lssproto_serv.h" +#include "log.h" +#include "battle.h" +#include "pet.h" +#include "enemy.h" +#include "encount.h" +#include "magic_base.h" +#include "magic.h" +#include "pet_skill.h" +#include "pet_event.h" +#include "item_gen.h" +#include "mclient.h" +#include "npc_eventaction.h" +#include "map_warppoint.h" +#include "npc_manorsman.h" +#include "net.h" +#include "saacproto_cli.h" +#include "npc_scheduleman.h" +#include "trade.h" +#include "npccreate.h" +#ifdef _DEATH_CONTEND +#include "deathcontend.h" +#endif + +#ifdef _CHAR_PROFESSION // WON ADD 人物职业 +#include "profession_skill.h" +#endif +#include "char_talk.h" + +// WON ADD 修正族长问题 +#include "family.h" + +#include "petmail.h" + +#ifdef _WON_TEST // WON TEST +#include "unpipc.h" +#endif + +// WON ADD 重新读取ITEMSET.TXT +#include "item.h" +#include "npc_raceman.h" + + +extern tagRidePetTable ridePetTable[296]; +extern int *pWorkAttackPower; +extern time_t initTime; +int *pWorkAttackPower = NULL; + +struct GMINFO gminfo[GMMAXNUM]; + +#define LSGENWORKINGBUFFER 65536*4 + +void CHAR_CHAT_DEBUG_warp( int charindex , char *message ) +{ + char token[100]; + int fl,x,y; + easyGetTokenFromString( message , 1 , token, sizeof(token)); + fl = atoi( token ); + easyGetTokenFromString( message , 2 , token , sizeof(token)); + x = atoi( token ); + easyGetTokenFromString( message , 3 , token , sizeof(token)); + y = atoi( token ); + + CHAR_warpToSpecificPoint(charindex, fl, x, y); + +} + + +void CHAR_CHAT_DEBUG_hp( int charindex , char *message ) +{ + CHAR_setInt( charindex , CHAR_HP,atoi( message ) ); + CHAR_complianceParameter( charindex ); + CHAR_send_P_StatusString( charindex , CHAR_P_STRING_HP); +} +void CHAR_CHAT_DEBUG_setmp( int charindex , char *message ) +{ + int i; + char setmp[15]; + char cdkey[CDKEYLEN]; + char token[128]; + int playernum = CHAR_getPlayerMaxNum(); + easyGetTokenFromString( message , 1 , setmp, sizeof(setmp)); + easyGetTokenFromString( message , 2 , cdkey, sizeof(cdkey)); + if(strlen(cdkey)>0){ + for(i=0;i=playernum) + { + CHAR_talkToCli( charindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + CHAR_setInt( i , CHAR_MAXMP, atoi( setmp ) ); + CHAR_setInt( i , CHAR_MP, atoi( setmp ) ); + CHAR_complianceParameter( i ); + CHAR_send_P_StatusString( i , CHAR_P_STRING_MP); + sprintf( token, "[GM]%s把你的MP设置为%d!", CHAR_getChar( charindex, CHAR_NAME),(int)atoi(setmp)/100); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "玩家%s的MP的设置为%d!", CHAR_getChar( i, CHAR_NAME),(int)atoi(setmp)/100); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + }else{ + CHAR_setInt( charindex , CHAR_MAXMP, atoi( setmp ) ); + CHAR_setInt( charindex , CHAR_MP, atoi( setmp ) ); + CHAR_complianceParameter( charindex ); + CHAR_send_P_StatusString( charindex , CHAR_P_STRING_MP); + sprintf( token, "MP设置为%d!",(int)atoi(setmp)/100); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + } +} + +void CHAR_CHAT_DEBUG_mp( int charindex , char *message ) +{ + int Mymp; + CHAR_setInt( charindex , CHAR_MP, atoi( message ) ); + Mymp = CHAR_getWorkInt( charindex , CHAR_WORKMAXMP); + if( Mymp > CHAR_getWorkInt( charindex , CHAR_WORKMAXMP) ) + CHAR_setInt( charindex , CHAR_MP, CHAR_getWorkInt( charindex , CHAR_WORKMAXMP)); + + CHAR_complianceParameter( charindex ); + //CHAR_sendStatusString( charindex , "P"); + CHAR_send_P_StatusString( charindex , CHAR_P_STRING_MP); + +} + +void CHAR_CHAT_DEBUG_str( int charindex , char *message ) +{ + int i; + char str[15]; + char cdkey[CDKEYLEN]; + char token[128]; + int playernum = CHAR_getPlayerMaxNum(); + easyGetTokenFromString( message , 1 , str, sizeof(str)); + easyGetTokenFromString( message , 2 , cdkey, sizeof(cdkey)); + if(strlen(cdkey)>0){ + for(i=0;i=playernum) + { + CHAR_talkToCli( charindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + CHAR_setInt( i , CHAR_STR,atoi( str ) ); + CHAR_complianceParameter( i ); + //CHAR_sendStatusString( charindex , "P"); + CHAR_send_P_StatusString( i ,CHAR_P_STRING_STR|CHAR_P_STRING_MAXHP|CHAR_P_STRING_ATK); + sprintf( token, "[GM]%s把你的腕力设置为%d!", CHAR_getChar( charindex, CHAR_NAME),(int)atoi(str)/100); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "玩家%s的腕力设置为%d!", CHAR_getChar( i, CHAR_NAME),(int)atoi(str)/100); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + }else{ + CHAR_setInt( charindex , CHAR_STR,atoi( str ) ); + CHAR_complianceParameter( charindex ); + //CHAR_sendStatusString( charindex , "P"); + CHAR_send_P_StatusString( charindex ,CHAR_P_STRING_STR|CHAR_P_STRING_MAXHP|CHAR_P_STRING_ATK); + sprintf( token, "腕力设置为%d!",(int)atoi(str)/100); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + } +} + +void CHAR_CHAT_DEBUG_tgh( int charindex , char *message ) +{ + int i; + char tgh[15]; + char cdkey[CDKEYLEN]; + char token[128]; + int playernum = CHAR_getPlayerMaxNum(); + easyGetTokenFromString( message , 1 , tgh, sizeof(tgh)); + easyGetTokenFromString( message , 2 , cdkey, sizeof(cdkey)); + if(strlen(cdkey)>0){ + for(i=0;i=playernum) + { + CHAR_talkToCli( charindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + CHAR_setInt( i , CHAR_TOUGH,atoi( tgh ) ); + CHAR_complianceParameter( i ); + //CHAR_sendStatusString( charindex , "P"); + CHAR_send_P_StatusString( i ,CHAR_P_STRING_TOUGH|CHAR_P_STRING_MAXHP|CHAR_P_STRING_DEF); + sprintf( token, "[GM]%s把你的耐力设置为%d!", CHAR_getChar( charindex, CHAR_NAME),(int)atoi(tgh)/100); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "玩家%s的耐力设置为%d!", CHAR_getChar( i, CHAR_NAME),(int)atoi(tgh)/100); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + }else{ + CHAR_setInt( charindex , CHAR_TOUGH,atoi( tgh ) ); + CHAR_complianceParameter( charindex ); + //CHAR_sendStatusString( charindex , "P"); + CHAR_send_P_StatusString( charindex ,CHAR_P_STRING_TOUGH|CHAR_P_STRING_MAXHP|CHAR_P_STRING_DEF); + sprintf( token, "耐力设置为%d!",(int)atoi(tgh)/100); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + } +} + +void CHAR_CHAT_DEBUG_dex( int charindex , char *message ) +{ + int i; + char dex[15]; + char cdkey[CDKEYLEN]; + char token[128]; + int playernum = CHAR_getPlayerMaxNum(); + easyGetTokenFromString( message , 1 , dex, sizeof(dex)); + easyGetTokenFromString( message , 2 , cdkey, sizeof(cdkey)); + if(strlen(cdkey)>0){ + for(i=0;i=playernum) + { + CHAR_talkToCli( charindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + CHAR_setInt( i , CHAR_DEX,atoi( dex ) ); + CHAR_complianceParameter( i ); + //CHAR_sendStatusString( charindex , "P"); + CHAR_send_P_StatusString( i ,CHAR_P_STRING_DEX|CHAR_P_STRING_MAXHP|CHAR_P_STRING_ATK|CHAR_P_STRING_QUICK); + sprintf( token, "[GM]%s把你的敏捷设置为%d!", CHAR_getChar( charindex, CHAR_NAME),(int)atoi(dex)/100); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "玩家%s的敏捷设置为%d!", CHAR_getChar( i, CHAR_NAME),(int)atoi(dex)/100); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + }else{ + CHAR_setInt( charindex , CHAR_DEX,atoi( dex ) ); + CHAR_complianceParameter( charindex ); + //CHAR_sendStatusString( charindex , "P"); + CHAR_send_P_StatusString( charindex ,CHAR_P_STRING_DEX|CHAR_P_STRING_MAXHP|CHAR_P_STRING_ATK|CHAR_P_STRING_QUICK); + sprintf( token, "敏捷设置为%d!",(int)atoi(dex)/100); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + } +} +void CHAR_CHAT_DEBUG_vital( int charindex , char *message ) +{ + int i; + char vital[15]; + char cdkey[CDKEYLEN]; + char token[128]; + int playernum = CHAR_getPlayerMaxNum(); + easyGetTokenFromString( message , 1 , vital, sizeof(vital)); + easyGetTokenFromString( message , 2 , cdkey, sizeof(cdkey)); + if(strlen(cdkey)>0){ + for(i=0;i=playernum) + { + CHAR_talkToCli( charindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + CHAR_setInt( i , CHAR_VITAL,atoi( vital ) ); + CHAR_complianceParameter( i ); + //CHAR_sendStatusString( charindex , "P"); + CHAR_send_P_StatusString( i ,CHAR_P_STRING_VITAL|CHAR_P_STRING_MAXHP|CHAR_P_STRING_DEF); + sprintf( token, "[GM]%s把你的体力设置为%d!", CHAR_getChar( charindex, CHAR_NAME),(int)atoi(vital)/100); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "玩家%s的体力设置为%d!", CHAR_getChar( i, CHAR_NAME),(int)atoi(vital)/100); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + }else{ + CHAR_setInt( charindex , CHAR_VITAL,atoi( vital ) ); + CHAR_complianceParameter( charindex ); + //CHAR_sendStatusString( charindex , "P"); + CHAR_send_P_StatusString( charindex ,CHAR_P_STRING_VITAL|CHAR_P_STRING_MAXHP|CHAR_P_STRING_DEF); + sprintf( token, "体力设置为%d!",(int)atoi(vital)/100); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + } +} +void CHAR_CHAT_DEBUG_luck( int charindex , char *message ) +{ + int i; + char buf[64]; + int luck; + char cdkey[CDKEYLEN]; + char token[128]; + int playernum = CHAR_getPlayerMaxNum(); + easyGetTokenFromString( message , 1 , buf, sizeof(buf)); + luck=atoi(buf); + easyGetTokenFromString( message , 2 , cdkey, sizeof(cdkey)); + if(luck<1)luck=1; + if(luck>5)luck=5; + if(strlen(cdkey)>0){ + for(i=0;i=playernum) + { + CHAR_talkToCli( charindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + CHAR_setInt( i , CHAR_LUCK,luck); + CHAR_complianceParameter( i ); + //CHAR_sendStatusString( charindex , "P"); + CHAR_send_P_StatusString( i , CHAR_P_STRING_LUCK); + sprintf( token, "[GM]%s把你的运气设置为%d!", CHAR_getChar( charindex, CHAR_NAME),luck); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "玩家%s的运气设置为%d!", CHAR_getChar( i, CHAR_NAME),luck); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + }else{ + CHAR_setInt( charindex , CHAR_LUCK,luck); + CHAR_complianceParameter( charindex ); + //CHAR_sendStatusString( charindex , "P"); + CHAR_send_P_StatusString( charindex , CHAR_P_STRING_LUCK); + sprintf( token, "运气设置为%d!",luck); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + } +} + +void CHAR_CHAT_DEBUG_gold( int charindex , char *message ) +{ + int i, MaxGold, money; + char cdkey[CDKEYLEN]; + char buf[64]; + char token[128]; + int playernum = CHAR_getPlayerMaxNum(); + easyGetTokenFromString( message , 1 , buf, sizeof(buf)); + money = atoi( buf ); + easyGetTokenFromString( message , 2 , cdkey, sizeof(cdkey)); + MaxGold = CHAR_getMaxHaveGold( charindex); + if( money > MaxGold ) + money = MaxGold; + if(strlen(cdkey)>0){ + for(i=0;i=playernum) + { + CHAR_talkToCli( charindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + CHAR_setInt( i , CHAR_GOLD , money ); + CHAR_complianceParameter( i ); + CHAR_send_P_StatusString( i , CHAR_P_STRING_GOLD); + sprintf( token, "[GM]%s把你的金钱设置为%d!", CHAR_getChar( charindex, CHAR_NAME),money); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "玩家%s的金钱设置为%d!", CHAR_getChar( i, CHAR_NAME),money); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + }else{ + CHAR_setInt( charindex , CHAR_GOLD , money ); + CHAR_complianceParameter( charindex ); + CHAR_send_P_StatusString( charindex , CHAR_P_STRING_GOLD); + sprintf( token, "金钱设置为%d!",money); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + } +} + +#ifdef _TEST_DROPITEMS +void CHAR_CHAT_DEBUG_dropmypet( int charindex, char *message ) +{ + char buf[256]; + int petID, x, y, floor, objindex, petindex, count=0; + int i, j, k, petarray, cLeve=1; + + if( getStringFromIndexWithDelim( message, " ", 1, buf, sizeof( buf)) == FALSE ) return; + petID = atoi( buf); + if( getStringFromIndexWithDelim( message, " ", 2, buf, sizeof( buf)) != FALSE ){ + cLeve = atoi( buf); + } + + floor = CHAR_getInt( charindex, CHAR_FLOOR); + x = CHAR_getInt( charindex, CHAR_X); + y = CHAR_getInt( charindex, CHAR_Y); + if( getStringFromIndexWithDelim( message, " ", 3, buf, sizeof( buf)) != FALSE ){ + floor = atoi( buf); + } + if( getStringFromIndexWithDelim( message, " ", 4, buf, sizeof( buf)) != FALSE ){ + x = atoi( buf); + } + if( getStringFromIndexWithDelim( message, " ", 5, buf, sizeof( buf)) != FALSE ){ + y = atoi( buf); + } + for( i=(x-3); i<(x+3); i++) { + for( j=(y-3); j<(y+3); j++) { + petarray = ENEMY_getEnemyArrayFromId( petID); + petindex = ENEMY_TEST_createPetIndex( petarray ); + if( !CHAR_CHECKINDEX( petindex) ){ + CHAR_talkToCli( charindex, -1, "err Can't create pet", CHAR_COLORYELLOW); + return; + } + CHAR_complianceParameter( petindex ); + objindex = PET_dropPetAbsolute( petindex, floor, i, j, FALSE ); + if( objindex == -1 ){ + CHAR_talkToCli( charindex, -1, "err Can't Drop", CHAR_COLORYELLOW); + return; + } + for( k = 1; k < cLeve; k ++ ){ //升级 + CHAR_PetLevelUp( petindex ); + CHAR_PetAddVariableAi( petindex, AI_FIX_PETLEVELUP ); + CHAR_setInt( petindex, CHAR_LV, CHAR_getInt( petindex, CHAR_LV) +1 ); + } + CHAR_complianceParameter( petindex ); + CHAR_setInt( petindex , CHAR_HP , CHAR_getWorkInt( petindex , CHAR_WORKMAXHP ) ); + + CHAR_setWorkInt( petindex, CHAR_WORKOBJINDEX, objindex ); + CHAR_setInt( petindex, CHAR_FLOOR, floor); + CHAR_setInt( petindex, CHAR_X, i); + CHAR_setInt( petindex, CHAR_Y, j); + CHAR_sendCToArroundCharacter( objindex); + CHAR_setInt( petindex, CHAR_PUTPETTIME, NowTime.tv_sec); + CHAR_setChar( petindex, CHAR_OWNERCDKEY, "SYSTEM_WAYI" ); + CHAR_setChar( petindex, CHAR_OWNERCHARANAME, "SYSTEM_WAYI" ); + count++; + } + } + sprintf( buf, "总共丢掷 %d只宠物。", count); + CHAR_talkToCli( charindex, -1, buf, CHAR_COLORYELLOW); + + +} + +void CHAR_CHAT_DEBUG_dropmyitem( int charindex, char *message ) +{ + char buf[256]; + int itemID, SitemID, maxflg=0,emptyitemindexinchara, i, j; + int floor, x, y, objindex; + + if( getStringFromIndexWithDelim( message, " ", 1, buf, sizeof( buf)) == FALSE ) return; + SitemID = atoi( buf); + if( getStringFromIndexWithDelim( message, " ", 2, buf, sizeof( buf)) != FALSE ){ + maxflg = atoi( buf); + } + floor = CHAR_getInt( charindex, CHAR_FLOOR); + x = CHAR_getInt( charindex, CHAR_X); + y = CHAR_getInt( charindex, CHAR_Y); + if( getStringFromIndexWithDelim( message, " ", 3, buf, sizeof( buf)) != FALSE ){ + floor = atoi( buf); + } + if( getStringFromIndexWithDelim( message, " ", 4, buf, sizeof( buf)) != FALSE ){ + x = atoi( buf); + } + if( getStringFromIndexWithDelim( message, " ", 5, buf, sizeof( buf)) != FALSE ){ + y = atoi( buf); + } + itemID = SitemID; + + + for( i=(x-3); i<(x+3); i++) { + for( j=(y-3); j<(y+3); j++) { + int ret = 0 , count=0; + int itemindex; + while( count < 10 ){ + count++; + itemindex = ITEM_makeItemAndRegist( itemID ); + if( maxflg == 1 ) itemID++; + if( !ITEM_CHECKINDEX( itemindex)) continue; + break; + } + emptyitemindexinchara = CHAR_findEmptyItemBox( charindex ); + + CHAR_setItemIndex( charindex, emptyitemindexinchara, itemindex ); + ITEM_setWorkInt(itemindex, ITEM_WORKOBJINDEX,-1); + ITEM_setWorkInt(itemindex, ITEM_WORKCHARAINDEX,charindex); + CHAR_sendItemDataOne( charindex, emptyitemindexinchara); + //drop + if( (ret = CHAR_DropItemFXY( charindex, emptyitemindexinchara, + floor, i, j, &objindex )) != 0 ){ + char buf[256]; + sprintf( buf, "错误%d", ret); + CHAR_talkToCli( charindex, -1, buf, CHAR_COLORYELLOW); + } + ITEM_setInt(itemindex,ITEM_PUTTIME,NowTime.tv_sec); + CHAR_sendWatchEvent(objindex,CHAR_ACTSTAND,NULL,0,TRUE); + CHAR_setItemIndex(charindex, emptyitemindexinchara ,-1); + CHAR_sendItemDataOne(charindex, emptyitemindexinchara); + CHAR_sendCToArroundCharacter(CHAR_getWorkInt( charindex, CHAR_WORKOBJINDEX)); + } + } + { + char buf[256]; + sprintf( buf, "最後ID%d", itemID-1); + CHAR_talkToCli( charindex, -1, buf, CHAR_COLORYELLOW); + } +} +#endif + +void CHAR_CHAT_DEBUG_additem( int charindex , char *message ) +{ + + int emptyitemindexinchara, itemindex; + int i; + int num = 0; + int itemid; + char buf[64]; + char msgbuf[128]; + char cdkey[CDKEYLEN]; + easyGetTokenFromString( message , 1 , buf, sizeof(buf)); + itemid = atoi( buf); + easyGetTokenFromString( message , 2 , buf, sizeof(buf)); + num = atoi( buf); + easyGetTokenFromString( message , 3 , cdkey, sizeof(cdkey)); + + if( num <= 0 ) num = 1; + + if(strlen(cdkey)>0){ + int playernum = CHAR_getPlayerMaxNum(); + int j; + for(j=0;j=playernum) + { + CHAR_talkToCli( charindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + for( i = 0; i < num; i ++ ) { + emptyitemindexinchara = CHAR_findEmptyItemBox( j ); + + if( emptyitemindexinchara < 0 ){ + sprintf( msgbuf, "玩家%s物品栏位不足。", CHAR_getChar( j, CHAR_NAME )); + CHAR_talkToCli( charindex, -1, msgbuf, CHAR_COLORYELLOW); + sprintf( msgbuf, "你的%s物品栏位不足。", CHAR_getChar( j, CHAR_NAME )); + CHAR_talkToCli( j, -1, msgbuf, CHAR_COLORYELLOW); + return; + } + + itemindex = ITEM_makeItemAndRegist( itemid ); + + if( itemindex != -1 ){ + CHAR_setItemIndex( j, emptyitemindexinchara, itemindex ); + ITEM_setWorkInt(itemindex, ITEM_WORKOBJINDEX,-1); + ITEM_setWorkInt(itemindex, ITEM_WORKCHARAINDEX,charindex); + CHAR_sendItemDataOne( j, emptyitemindexinchara); + LogItem( + CHAR_getChar( charindex, CHAR_NAME ), + CHAR_getChar( charindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + atoi( message), +#endif + "AddItem(制作道具GM)", + CHAR_getInt( charindex,CHAR_FLOOR), + CHAR_getInt( charindex,CHAR_X ), + CHAR_getInt( charindex,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + + ); + snprintf( msgbuf, sizeof( msgbuf), "[GM]%s给你制作%s成功\。", + CHAR_getChar( charindex, CHAR_NAME ),ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( j, -1,msgbuf, CHAR_COLORYELLOW); + snprintf( msgbuf, sizeof( msgbuf), "成功为%s制作 %s\。", + CHAR_getChar( j, CHAR_NAME ),ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( charindex, -1,msgbuf, CHAR_COLORYELLOW); + }else{ + sprintf( msgbuf, "制作道具失败。" ); + CHAR_talkToCli( charindex, -1,msgbuf, CHAR_COLORYELLOW); + } + } + }else{ + for( i = 0; i < num; i ++ ) { + emptyitemindexinchara = CHAR_findEmptyItemBox( charindex ); + + if( emptyitemindexinchara < 0 ){ + sprintf( msgbuf, "物品栏位不足。" ); + + CHAR_talkToCli( charindex, -1, msgbuf, CHAR_COLORYELLOW); + + return; + } + + itemindex = ITEM_makeItemAndRegist( itemid ); + + if( itemindex != -1 ){ + CHAR_setItemIndex( charindex, emptyitemindexinchara, itemindex ); + ITEM_setWorkInt(itemindex, ITEM_WORKOBJINDEX,-1); + ITEM_setWorkInt(itemindex, ITEM_WORKCHARAINDEX,charindex); + CHAR_sendItemDataOne( charindex, emptyitemindexinchara); + LogItem( + CHAR_getChar( charindex, CHAR_NAME ), + CHAR_getChar( charindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + atoi( message), +#endif + "AddItem(制作道具GM)", + CHAR_getInt( charindex,CHAR_FLOOR), + CHAR_getInt( charindex,CHAR_X ), + CHAR_getInt( charindex,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + + ); + snprintf( msgbuf, sizeof( msgbuf), "制作%s成功\。", + ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( charindex, -1,msgbuf, CHAR_COLORYELLOW); + }else{ + sprintf( msgbuf, "制作道具失败。" ); + CHAR_talkToCli( charindex, -1, msgbuf, CHAR_COLORYELLOW); + } + } + } +} + + +void CHAR_CHAT_DEBUG_metamo( int charindex , char *message ) +{ + char metamoid[7]; + char cdkey[CDKEYLEN]; + char token[128]; + int i=0; + int playernum = CHAR_getPlayerMaxNum(); + easyGetTokenFromString( message , 1 , metamoid, sizeof(metamoid)); + easyGetTokenFromString( message , 2 , cdkey, sizeof(cdkey)); + if(strlen(cdkey)>0){ + for(i=0;i=playernum) + { + CHAR_talkToCli( charindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + CHAR_setInt( i , CHAR_BASEIMAGENUMBER , atoi( metamoid ) ); + CHAR_setInt( i , CHAR_BASEBASEIMAGENUMBER , atoi( metamoid ) ); + + CHAR_complianceParameter( i ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( i , CHAR_WORKOBJINDEX )); + CHAR_send_P_StatusString( i , CHAR_P_STRING_BASEBASEIMAGENUMBER); + sprintf( token, "[GM]%s把你的人物形象设置为%d!", CHAR_getChar( charindex, CHAR_NAME),(int)atoi(metamoid)); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "玩家%s的人物形象设置为%d!", CHAR_getChar( i, CHAR_NAME),(int)atoi(metamoid)); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + }else{ + CHAR_setInt( charindex , CHAR_BASEIMAGENUMBER , atoi( metamoid ) ); + CHAR_setInt( charindex , CHAR_BASEBASEIMAGENUMBER , atoi( metamoid ) ); + + CHAR_complianceParameter( charindex ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( charindex , CHAR_WORKOBJINDEX )); + CHAR_send_P_StatusString( charindex , CHAR_P_STRING_BASEBASEIMAGENUMBER); + sprintf( token, "人物形象设置为%d!",(int)atoi(metamoid)); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + } +} + +void CHAR_CHAT_DEBUG_info( int charindex , char *message ) +{ + char line[256]; + int index; + + if( strlen( message) != 0 ) { + index = atoi( message); + } + else { + index = charindex; + } + if( !CHAR_CHECKINDEX( index)) { + CHAR_talkToCli( charindex, -1 , "该index无法使用。" , CHAR_COLORWHITE ); + return; + } + + snprintf( line, sizeof( line), + "name:%s i:%d B:%d BB:%d LV:%d EXP:%d MakeSeq:%d", + CHAR_getChar( index, CHAR_NAME), + charindex, + CHAR_getInt( index, CHAR_BASEIMAGENUMBER ), + CHAR_getInt( index, CHAR_BASEBASEIMAGENUMBER ), + CHAR_getInt( index, CHAR_LV ), + CHAR_getInt( index, CHAR_EXP ), + CHAR_getCharMakeSequenceNumber( index)); + + CHAR_talkToCli( charindex, -1 , line , CHAR_COLORWHITE ); + + snprintf( line, sizeof( line), + "Gold:%d HP:%d MP/MHP:%d/%d" , + CHAR_getInt( index, CHAR_GOLD ), + CHAR_getInt( index, CHAR_HP ), + CHAR_getInt( index, CHAR_MP ), + CHAR_getInt( index, CHAR_MAXMP )); + CHAR_talkToCli( charindex, -1 , line , CHAR_COLORWHITE ); + + + if( CHAR_getInt( index, CHAR_WHICHTYPE ) == CHAR_TYPEPET ){ + snprintf( line, sizeof(line), + "体:%d 力:%d 丈:%d 早:%d 耐:%d 攻:%d 守:%d 敏:%d 忠修:%d 忠变:%.2f 编码:%s", + CHAR_getInt( index, CHAR_VITAL )/100, + CHAR_getInt( index, CHAR_STR )/100, + CHAR_getInt( index, CHAR_TOUGH )/100, + CHAR_getInt( index, CHAR_DEX )/100, + CHAR_getWorkInt( index, CHAR_WORKFIXVITAL ), + CHAR_getWorkInt( index, CHAR_WORKATTACKPOWER ), + CHAR_getWorkInt( index, CHAR_WORKDEFENCEPOWER ),//CHAR_WORKFIXDEX + CHAR_getWorkInt( index, CHAR_WORKQUICK ), + CHAR_getInt( index, CHAR_MODAI ), + CHAR_getInt( index, CHAR_VARIABLEAI ) * 0.01, + CHAR_getChar( index, CHAR_UNIQUECODE) ); + }else{ + snprintf( line, sizeof(line), + "体:%d 力:%d 丈:%d 早:%d 耐:%d 攻:%d 守:%d 魅:%d 运:%d", + CHAR_getInt( index, CHAR_VITAL )/100, + CHAR_getInt( index, CHAR_STR )/100, + CHAR_getInt( index, CHAR_TOUGH )/100, + CHAR_getInt( index, CHAR_DEX )/100, + CHAR_getWorkInt( index, CHAR_WORKFIXVITAL ), + CHAR_getWorkInt( index, CHAR_WORKATTACKPOWER ), + CHAR_getWorkInt( index, CHAR_WORKDEFENCEPOWER ), + CHAR_getWorkInt( index, CHAR_WORKFIXCHARM ), + CHAR_getWorkInt( index, CHAR_WORKFIXLUCK )); + } + CHAR_talkToCli( charindex, -1 , line , CHAR_COLORWHITE ); + + + snprintf( line, sizeof(line), + "土:%d 水:%d 火:%d 风:%d", + CHAR_getWorkInt( index, CHAR_WORKFIXEARTHAT ), + CHAR_getWorkInt( index, CHAR_WORKFIXWATERAT ), + CHAR_getWorkInt( index, CHAR_WORKFIXFIREAT ), + CHAR_getWorkInt( index, CHAR_WORKFIXWINDAT )); + CHAR_talkToCli( charindex, -1 , line , CHAR_COLORWHITE ); + + snprintf( line, sizeof( line), + "Sk Itm:%d ChV:%d Rad:%d" , + CHAR_MAXITEMHAVE, + CHAR_getInt( index, CHAR_CHATVOLUME ), + CHAR_getInt( index, CHAR_RADARSTRENGTH ) ); + CHAR_talkToCli( charindex, -1 , line , CHAR_COLORWHITE ); + + + snprintf( line, sizeof( line), + "Status 毒:%d 麻:%d 默:%d 石:%d 暗:%d 乱:%d" , + CHAR_getInt( index , CHAR_POISON ), + CHAR_getInt( index , CHAR_PARALYSIS ), + CHAR_getInt( index , CHAR_SLEEP ), + CHAR_getInt( index , CHAR_STONE ), + CHAR_getInt( index , CHAR_DRUNK ), + CHAR_getInt( index , CHAR_CONFUSION ) ); + CHAR_talkToCli( charindex, -1 , line , CHAR_COLORWHITE ); + +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + snprintf( line, sizeof( line), +#ifdef _NEW_MANOR_LAW + "TitInd:%d FL:%d X:%d Y:%d DIR:%d FAME:%d MOMENTUM:%d" , +#else + "TitInd:%d FL:%d X:%d Y:%d DIR:%d FAME:%d" , +#endif + CHAR_getInt( index , CHAR_INDEXOFEQTITLE ), + CHAR_getInt( index , CHAR_FLOOR ), + CHAR_getInt( index , CHAR_X ), + CHAR_getInt( index , CHAR_Y ), + CHAR_getInt( index , CHAR_DIR ), + CHAR_getInt( index , CHAR_FAME) +#ifdef _NEW_MANOR_LAW + ,CHAR_getInt( index , CHAR_MOMENTUM) +#endif + ); +#else + snprintf( line, sizeof( line), + "TitInd:%d FL:%d X:%d Y:%d DIR:%d" , + CHAR_getInt( index , CHAR_INDEXOFEQTITLE ), + CHAR_getInt( index , CHAR_FLOOR ), + CHAR_getInt( index , CHAR_X ), + CHAR_getInt( index , CHAR_Y ), + CHAR_getInt( index , CHAR_DIR ) ); +#endif + CHAR_talkToCli( charindex, -1 , line , CHAR_COLORWHITE ); + + + snprintf( line, sizeof( line), + "walk:%d dead:%d ItemMergecnt:%d" , + CHAR_getInt( index , CHAR_WALKCOUNT ) , + CHAR_getInt( index , CHAR_DEADCOUNT ) , + CHAR_getInt( index, CHAR_MERGEITEMCOUNT) + ); + CHAR_talkToCli( charindex, -1 , line , CHAR_COLORWHITE ); + + if( CHAR_getInt( index, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER) { + snprintf( line, sizeof( line), + "petindex [%d][%d][%d][%d][%d] " , + CHAR_getCharPet( index, 0), + CHAR_getCharPet( index, 1), + CHAR_getCharPet( index, 2), + CHAR_getCharPet( index, 3), + CHAR_getCharPet( index, 4)); + } + else { + snprintf( line, sizeof( line), + "PetskillIndex [%d][%d][%d][%d][%d][%d][%d] " , + CHAR_getPetSkill( index, 0), + CHAR_getPetSkill( index, 1), + CHAR_getPetSkill( index, 2), + CHAR_getPetSkill( index, 3), + CHAR_getPetSkill( index, 4), + CHAR_getPetSkill( index, 5), + CHAR_getPetSkill( index, 6)); + } + + CHAR_talkToCli( charindex, -1 , line , CHAR_COLORWHITE ); + if( CHAR_getInt( index, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER) { + snprintf( line, sizeof( line), + "poolpetindex [%d][%d][%d][%d][%d] " , + CHAR_getCharPoolPet( index, 0), + CHAR_getCharPoolPet( index, 1), + CHAR_getCharPoolPet( index, 2), + CHAR_getCharPoolPet( index, 3), + CHAR_getCharPoolPet( index, 4)); + CHAR_talkToCli( charindex, -1 , line , CHAR_COLORWHITE ); + + snprintf( line, sizeof( line), + "poolpetindex [%d][%d][%d][%d][%d] " , + CHAR_getCharPoolPet( index, 5), + CHAR_getCharPoolPet( index, 6), + CHAR_getCharPoolPet( index, 7), + CHAR_getCharPoolPet( index, 8), + CHAR_getCharPoolPet( index, 9)); + CHAR_talkToCli( charindex, -1 , line , CHAR_COLORWHITE ); + } + + snprintf( line, sizeof( line), + "levelup [%d], 累积 %d 赌场积分[%d]" , + CHAR_getInt( index, CHAR_LEVELUPPOINT), + CHAR_getWorkInt( index, CHAR_WORKULTIMATE), + CHAR_getInt( index, CHAR_GAMBLENUM) ); + CHAR_talkToCli( charindex, -1 , line , CHAR_COLORWHITE ); + +} + +void CHAR_CHAT_DEBUG_sysinfo( int charindex , char *message ) +{ + char msg[1024],name[256]; + int i; + time_t new_t; + int dd,hh,mm,ss; + + int items=0 , chars=0, golds=0, nouses=0; + int players=0,pets=0,others=0; + int whichtype= -1; + int objnum = OBJECT_getNum(); + + + int itemnum = ITEM_getITEM_itemnum(); + int itemuse =0; + + makeEscapeString( getGameserverID(), name, sizeof( name)); + sprintf( msg, "GSID:%s GSNAME:%s", getGameserverID(), name); + CHAR_talkToCli( charindex, -1, msg, CHAR_COLORYELLOW); + + + for( i=0 ; i0){ + for(i=0;i=playernum) + { + CHAR_talkToCli( charaindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + CHAR_setInt(i,CHAR_LV, atoi( message )); + CHAR_send_P_StatusString( i , CHAR_P_STRING_LV); + sprintf( token, "[GM]%s把你的等级设置为%d!", CHAR_getChar( charaindex, CHAR_NAME),level); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "玩家%s的等级设置为%d!", CHAR_getChar( i, CHAR_NAME),level); + CHAR_talkToCli( charaindex, -1,token, CHAR_COLORYELLOW ); + }else{ + CHAR_setInt(charaindex,CHAR_LV, atoi( message )); + CHAR_send_P_StatusString( charaindex , CHAR_P_STRING_LV); + sprintf( token, "等级设置为%d!",level); + CHAR_talkToCli( charaindex, -1,token, CHAR_COLORYELLOW ); + } +} + + +void CHAR_CHAT_DEBUG_exp( int charaindex, char* message ) +{ + int i; + char exp[15]; + char cdkey[CDKEYLEN]; + char token[128]; + int playernum = CHAR_getPlayerMaxNum(); + easyGetTokenFromString( message , 1 , exp, sizeof(exp)); + easyGetTokenFromString( message , 2 , cdkey, sizeof(cdkey)); + if(strlen(cdkey)>0){ + for(i=0;i=playernum) + { + CHAR_talkToCli( charaindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + CHAR_setMaxExp( i, atoi( exp )); + CHAR_send_P_StatusString( i , CHAR_P_STRING_EXP); + sprintf( token, "[GM]%s把你的经验设置为%d!", CHAR_getChar( charaindex, CHAR_NAME),(int)atoi(exp)); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "玩家%s的经验设置为%d!", CHAR_getChar( i, CHAR_NAME),(int)atoi(exp)); + CHAR_talkToCli( charaindex, -1,token, CHAR_COLORYELLOW ); + }else{ + CHAR_setMaxExp( charaindex, atoi( exp )); + CHAR_send_P_StatusString( charaindex , CHAR_P_STRING_EXP); + sprintf( token, "经验设置为%d!",(int)atoi(exp)/100); + CHAR_talkToCli( charaindex, -1,token, CHAR_COLORYELLOW ); + } +} + +void CHAR_CHAT_DEBUG_delitem( int charindex , char *message ) +{ + int itemid; + + if( strcmp( message, "all") == 0 ) { + int i; + for( i = CHAR_STARTITEMARRAY; i < CHAR_MAXITEMHAVE; i ++ ) { + itemid = CHAR_getItemIndex(charindex, i); + if( itemid != -1 ) { + { + LogItem( + CHAR_getChar( charindex, CHAR_NAME ), + CHAR_getChar( charindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemid, +#else + ITEM_getInt( itemid, ITEM_ID ), +#endif + "DelItem(删除道具GM)", + CHAR_getInt( charindex,CHAR_FLOOR), + CHAR_getInt( charindex,CHAR_X ), + CHAR_getInt( charindex,CHAR_Y ), + ITEM_getChar( itemid, ITEM_UNIQUECODE), + ITEM_getChar( itemid, ITEM_NAME), + ITEM_getInt( itemid, ITEM_ID) + ); + } + CHAR_DelItem( charindex, i); + } + } + }else { + int equipplace; + equipplace = atoi( message); + if( equipplace < CHAR_STARTITEMARRAY || equipplace > CHAR_MAXITEMHAVE -1 ) { + CHAR_talkToCli( charindex, -1, "号码不正确。", CHAR_COLORWHITE); + return; + } + itemid = CHAR_getItemIndex(charindex, equipplace); + if( itemid == -1 ) return; + { + LogItem( + CHAR_getChar( charindex, CHAR_NAME ), + CHAR_getChar( charindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemid, +#else + ITEM_getInt( itemid, ITEM_ID ), +#endif + "DelItem(删除道具GM)", + CHAR_getInt( charindex,CHAR_FLOOR), + CHAR_getInt( charindex,CHAR_X ), + CHAR_getInt( charindex,CHAR_Y ), + ITEM_getChar( itemid, ITEM_UNIQUECODE), + ITEM_getChar( itemid, ITEM_NAME), + ITEM_getInt( itemid, ITEM_ID) + ); + } + CHAR_DelItem( charindex, equipplace); + } +} + +#ifdef _CHAR_PROFESSION // WON ADD 人物职业 +void CHAR_CHAT_DEBUG_addsk( int charaindex, char* message ) +{ + + CHAR_HaveSkill *pSkil; + int skill, i, level=1; + + char msg1[20], msg2[20]; + + getStringFromIndexWithDelim( message, " ", 1, msg1, sizeof( msg1)); + getStringFromIndexWithDelim( message, " ", 2, msg2, sizeof( msg2)); + + skill = atoi(msg1); + level = atoi(msg2); + + if( level > 100 ){ + CHAR_talkToCli( charaindex, -1, "等级不正确", CHAR_COLORWHITE); + return; + } + if( level < 1 ) level = 1; + + for( i = 0; i < CHAR_SKILLMAXHAVE; i ++ ){ + int skill_id = -1; + + pSkil = CHAR_getCharHaveSkill( charaindex, i ); + skill_id = SKILL_getInt( &pSkil->skill, SKILL_IDENTITY); + if( skill == skill_id && skill_id != -1 ){ + CHAR_talkToCli(charaindex,-1, "你已经学习过此技能", CHAR_COLORYELLOW); + return; + } + + if( pSkil == NULL ) continue; + if( pSkil->use != 0 ) continue; + + break; + } + + if( i >= CHAR_SKILLMAXHAVE ){ + CHAR_talkToCli(charaindex,-1, "技能数量已达上限", CHAR_COLORYELLOW); + return; + }else{ + level *= 100; + SKILL_makeSkillData( &pSkil->skill, skill, level); + pSkil->use = TRUE; + } + + CHAR_sendStatusString( charaindex , "S"); + + return; +} + +void CHAR_CHAT_DEBUG_delsk( int charaindex, char* message ) +{ + int i; + CHAR_HaveSkill *pSkil; + + if( strcmp( message, "all" ) == 0 ){ +// CHAR_talkToCli( charaindex, -1, "清除所有技能", CHAR_COLORWHITE); + for( i = CHAR_SKILLMAXHAVE-1; i >= 0; i -- ){ + pSkil = CHAR_getCharHaveSkill( charaindex, i ); + if( pSkil == NULL )continue; + if( pSkil->use == 0 )continue; + SKILL_makeSkillData( &pSkil->skill, 0, 0 ); + pSkil->use = 0; + } + } + + for( i = CHAR_SKILLMAXHAVE-1; i >= 0; i -- ){ + pSkil = CHAR_getCharHaveSkill( charaindex, i ); + if( pSkil == NULL )continue; + if( pSkil->use == 0 )continue; + print( "SKILUSE %d\n", pSkil->use ); + break; + } + + if( i < 0 ){ +// CHAR_talkToCli( charaindex, -1, "已无法再削减了。", CHAR_COLORWHITE); + ;; + }else{ + SKILL_makeSkillData( &pSkil->skill, 0, 0 ); + pSkil->use = 0; + } + + CHAR_sendStatusString( charaindex , "S"); +} +#endif + +void CHAR_CHAT_Kusabana( int charaindex, char* message ){ + + int dir, ff, fx, fy; + int tile, obj; + + ff = CHAR_getInt( charaindex, CHAR_FLOOR ); + fx = CHAR_getInt( charaindex, CHAR_X ); + fy = CHAR_getInt( charaindex, CHAR_Y ); + dir = CHAR_getInt( charaindex, CHAR_DIR ); + + fx += CHAR_getDX(dir); + fy += CHAR_getDY(dir); + + if( MAP_getTileAndObjData( ff, fx, fy, &tile, &obj) == FALSE )return; + +#if 0 + { char szBuffer[256]; + snprintf( szBuffer, sizeof( szBuffer ), "TILE = %d, OBJ = %d", + tile, obj ); + CHAR_talkToCli( charaindex, -1, szBuffer, CHAR_COLORWHITE); + } +#else + + if( obj != 0 ){ + CHAR_talkToCli( charaindex, -1, "有零件。", CHAR_COLORWHITE); + return; + } + + if( MAP_walkAbleFromPoint( ff, fx, fy, FALSE ) == FALSE ){ + CHAR_talkToCli( charaindex, -1, "无法走了。", CHAR_COLORWHITE); + return; + } + + MAP_setObjData( ff, fx, fy, 3416, 100 ); + + +#if 1 + { + char *stringdata; + RECT seekr , retr; + seekr.x = fx; + seekr.y = fy; + seekr.width = 1; + seekr.height = 1; + stringdata = MAP_getdataFromRECT(ff,&seekr,&retr); + if( stringdata ){ + + if( CHAR_getInt( charaindex , CHAR_WHICHTYPE ) + == CHAR_TYPEPLAYER ){ + int fd = getfdFromCharaIndex( charaindex ); + lssproto_M_send(fd,ff, + retr.x,retr.y, + retr.x+retr.width,retr.y+retr.height, + stringdata ); + } + } else { + } + } +#endif +#endif + + return ; +} + + +void CHAR_CHAT_Fukuwa( int charaindex, char* message ){ + int dir, ff, fx, fy, objindex, vs_index, vs_fd, stringlen; + OBJECT obj; + char szBuffer[2048]; + + stringlen = strlen( message ); + + if( message[0] == '[' && message[stringlen-1] == ']' ){ + CHAR_talkToCli( charaindex, -1, "语言没有转换。", CHAR_COLORWHITE); + return ; + } + + ff = CHAR_getInt( charaindex, CHAR_FLOOR ); + fx = CHAR_getInt( charaindex, CHAR_X ); + fy = CHAR_getInt( charaindex, CHAR_Y ); + dir = CHAR_getInt( charaindex, CHAR_DIR ); + + fx += CHAR_getDX(dir); + fy += CHAR_getDY(dir); + + stringlen = strlen( message ); + + + snprintf( szBuffer, sizeof( szBuffer ), "P|%s", message ); + + for( obj=MAP_getTopObj( ff, fx, fy ); obj; obj=NEXT_OBJECT(obj) ){ + objindex = GET_OBJINDEX(obj); + if( OBJECT_getType(objindex) != OBJTYPE_CHARA )continue; + vs_index = OBJECT_getIndex(objindex); + vs_fd = getfdFromCharaIndex( vs_index ); + CHAR_Talk( vs_fd, vs_index, + szBuffer, CHAR_COLORWHITE, 3 ); + break; + } + +} + +void CHAR_CHAT_DEBUG_superman( int charaindex, char* message ) +{ +#define CHAT_CHAT_DEBUG_SUPERMAN_PARAMDEF 100000 + int i; + char hp[15]; + char cdkey[CDKEYLEN]; + char token[128]; + int playernum = CHAR_getPlayerMaxNum(); + easyGetTokenFromString( message , 1 , hp, sizeof(hp)); + easyGetTokenFromString( message , 2 , cdkey, sizeof(cdkey)); + if(strlen(cdkey)>0){ + for(i=0;i=playernum) + { + CHAR_talkToCli( charaindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + CHAR_setInt(charaindex,CHAR_SKILLUPPOINT, 32); + CHAR_Skillupsend(charaindex); + CHAR_setInt( charaindex , CHAR_HP, CHAT_CHAT_DEBUG_SUPERMAN_PARAMDEF); + CHAR_setInt( charaindex , CHAR_MP,CHAT_CHAT_DEBUG_SUPERMAN_PARAMDEF ); + CHAR_setInt( charaindex , CHAR_MAXMP,CHAT_CHAT_DEBUG_SUPERMAN_PARAMDEF ); + CHAR_setInt( charaindex , CHAR_STR,CHAT_CHAT_DEBUG_SUPERMAN_PARAMDEF ); + CHAR_setInt( charaindex , CHAR_TOUGH,CHAT_CHAT_DEBUG_SUPERMAN_PARAMDEF ); + CHAR_setInt( charaindex , CHAR_DEX , CHAT_CHAT_DEBUG_SUPERMAN_PARAMDEF ); + CHAR_setInt( charaindex,CHAR_LV, getMaxLevel()); + + CHAR_complianceParameter( charaindex ); + CHAR_sendStatusString( charaindex , "P"); + + sprintf( token, "[GM]%s把你为超人状态!", CHAR_getChar( charaindex, CHAR_NAME)); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "玩家%s设置为超人状态!", CHAR_getChar( i, CHAR_NAME)); + CHAR_talkToCli( charaindex, -1,token, CHAR_COLORYELLOW ); + }else{ + CHAR_setInt(charaindex,CHAR_SKILLUPPOINT, 32); + CHAR_Skillupsend(charaindex); + CHAR_setInt( charaindex , CHAR_HP, CHAT_CHAT_DEBUG_SUPERMAN_PARAMDEF); + CHAR_setInt( charaindex , CHAR_MP,CHAT_CHAT_DEBUG_SUPERMAN_PARAMDEF ); + CHAR_setInt( charaindex , CHAR_MAXMP,CHAT_CHAT_DEBUG_SUPERMAN_PARAMDEF ); + CHAR_setInt( charaindex , CHAR_STR,CHAT_CHAT_DEBUG_SUPERMAN_PARAMDEF ); + CHAR_setInt( charaindex , CHAR_TOUGH,CHAT_CHAT_DEBUG_SUPERMAN_PARAMDEF ); + CHAR_setInt( charaindex , CHAR_DEX , CHAT_CHAT_DEBUG_SUPERMAN_PARAMDEF ); + CHAR_setInt( charaindex,CHAR_LV, getMaxLevel()); + + CHAR_complianceParameter( charaindex ); + CHAR_sendStatusString( charaindex , "P"); + + CHAR_talkToCli( charaindex, -1,"设置超人状态!", CHAR_COLORYELLOW ); + } +#undef CHAT_CHAT_DEBUG_SUPERMAN_PARAMDEF + +} + +void CHAR_CHAT_printcount( int charaindex, char* message ) +{ + char msgbuf[512]; + + snprintf( msgbuf,sizeof( msgbuf), + "你说了 %d 次话,走了 %d 步路,死了 %d 次", + CHAR_getInt( charaindex, CHAR_TALKCOUNT), + CHAR_getInt( charaindex, CHAR_WALKCOUNT), + CHAR_getInt( charaindex, CHAR_DEADCOUNT) + ); + CHAR_talkToCli( charaindex, -1, msgbuf, CHAR_COLORWHITE); + +} + +void CHAR_CHAT_DEBUG_battlein( int charaindex, char* message ) +{ + int fd = getfdFromCharaIndex( charaindex ); + if( fd != -1) { + lssproto_EN_recv( fd, + CHAR_getInt( charaindex, CHAR_X), + CHAR_getInt( charaindex, CHAR_Y)); + } +} + +void CHAR_CHAT_DEBUG_battleout( int charaindex, char* message ) +{ + + BATTLE_WatchStop( charaindex ); +} + +void CHAR_CHAT_DEBUG_petmake( int charaindex, char* message ) +{ + int ret; + int enemynum; + int enemyid; + int i,j; + int level=-1; + char buf[10]; + char cdkey[CDKEYLEN]; + char token[128]; + int playernum = CHAR_getPlayerMaxNum(); + easyGetTokenFromString( message , 1 , buf, sizeof(buf)); + enemyid=atoi(buf); + easyGetTokenFromString( message , 2 , buf, sizeof(buf)); + level=atoi(buf); + easyGetTokenFromString( message , 3 , cdkey, sizeof(cdkey)); + if(strlen(cdkey)>0){ + for(j=0;j=playernum) + { + CHAR_talkToCli( charaindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + enemynum = ENEMY_getEnemyNum(); + for( i = 0; i < enemynum; i ++ ) { + if( ENEMY_getInt( i, ENEMY_ID) == enemyid) { + break; + } + } + if( i == enemynum )return; + + ret = ENEMY_createPetFromEnemyIndex( j, i); + if( !CHAR_CHECKINDEX( ret))return; + snprintf( token,sizeof( token), "宠物制作成功\!",ret); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORWHITE); + sprintf( token, "[GM]%s制作了只宠物给你!index[%d]", CHAR_getChar( charaindex, CHAR_NAME),ret); + CHAR_talkToCli( j, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "给玩家%s的宠物制作成功!index[%d]", CHAR_getChar( j, CHAR_NAME),ret); + CHAR_talkToCli( charaindex, -1,token, CHAR_COLORYELLOW ); + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ){ + if( CHAR_getCharPet( j, i ) == ret )break; + } + if( i == CHAR_MAXPETHAVE )i = 0; + + if( CHAR_CHECKINDEX( ret ) == TRUE ){ + CHAR_setMaxExpFromLevel( ret, CHAR_getInt( ret, CHAR_LV )); + } + if( level != -1 ){ + if( level > getMaxLevel() ) level = getMaxLevel(); + if( level < 0 ) level = 0; + level = level - CHAR_getInt( ret, CHAR_LV ); + if( level > 0 ){ + int k; + for( k = 1; k <= level; k ++ ){ //升级 + CHAR_PetLevelUp( ret ); + CHAR_PetAddVariableAi( ret, AI_FIX_PETLEVELUP ); + CHAR_setInt( ret, CHAR_LV, CHAR_getInt( ret, CHAR_LV) +1 ); + } + } + } + + snprintf( token, sizeof( token ), "K%d", i ); + CHAR_sendStatusString( j, token ); + snprintf( token, sizeof( token ), "W%d", i ); + CHAR_sendStatusString( j, token ); + }else{ + enemynum = ENEMY_getEnemyNum(); + for( i = 0; i < enemynum; i ++ ) { + if( ENEMY_getInt( i, ENEMY_ID) == enemyid) { + break; + } + } + if( i == enemynum )return; + + ret = ENEMY_createPetFromEnemyIndex(charaindex, i); + if( !CHAR_CHECKINDEX( ret))return; + snprintf( token,sizeof( token), "宠物制作成功\!index[%d]",ret); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORWHITE); + + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ){ + if( CHAR_getCharPet( charaindex, i ) == ret )break; + } + if( i == CHAR_MAXPETHAVE )i = 0; + + if( CHAR_CHECKINDEX( ret ) == TRUE ){ + CHAR_setMaxExpFromLevel( ret, CHAR_getInt( ret, CHAR_LV )); + } + if( level != -1 ){ + if( level > 200 ) level = 200; + if( level < 0 ) level = 0; + level = level - CHAR_getInt( ret, CHAR_LV ); + if( level > 0 ){ + int k; + for( k = 1; k <= level; k ++ ){ //升级 + CHAR_PetLevelUp( ret ); + CHAR_PetAddVariableAi( ret, AI_FIX_PETLEVELUP ); + CHAR_setInt( ret, CHAR_LV, CHAR_getInt( ret, CHAR_LV) +1 ); + } + } } + + + snprintf( token, sizeof( token ), "K%d", i ); + CHAR_sendStatusString( charaindex, token ); + snprintf( token, sizeof( token ), "W%d", i ); + CHAR_sendStatusString( charaindex, token ); + } +} + +void CHAR_CHAT_DEBUG_deletepet( int charaindex, char* message ) +{ + int i, pindex; + char category[12]; + int playernum = CHAR_getPlayerMaxNum(); + + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ) { + pindex = CHAR_getCharPet( charaindex, i); + if( CHAR_CHECKINDEX( pindex)) { + CHAR_endCharOneArray( pindex ); + CHAR_setCharPet( charaindex, i, -1); + snprintf( category, sizeof( category), "K%d",i); + CHAR_sendStatusString( charaindex, category ); + snprintf( category, sizeof( category), "W%d",i); + CHAR_sendStatusString( charaindex, category ); + } + } + + CHAR_talkToCli( charaindex, -1, "清除身上所有宠物。", CHAR_COLORWHITE); + +} + +#define MAXMESS_LISTNUM 8 +#define ALLRESET (MAXMESS_LISTNUM - 1) + +void CHAR_CHAT_DEBUG_reset( int charaindex, char* message ) +{ + int i; +// int objindex; +// int objmaxnum = OBJECT_getNum(); + char mess[MAXMESS_LISTNUM][256]={ "enemy", "encount", "magic", "warppoint", "petskill", "pettalk", "npc", "all"}; + + for( i=0; i= MAXMESS_LISTNUM ){ + CHAR_talkToCli( charaindex, -1, "指令错误", CHAR_COLORRED);//CHAR_COLORYELLOW + return; + } + switch( i){ + case ALLRESET: + case 0: + if( !ENEMYTEMP_reinitEnemy() || !ENEMY_reinitEnemy() ){ + CHAR_talkToCli( charaindex, -1, "重新读取敌人基本资料失败。", CHAR_COLORRED); + return; + } + if( i != ALLRESET ) break; + case 1: + if( !GROUP_reinitGroup() || !ENCOUNT_reinitEncount() ){ + CHAR_talkToCli( charaindex, -1, "重新读取遭遇团队资料失败。", CHAR_COLORRED); + } + if( i != ALLRESET ) break; + case 2: + if( !MAGIC_reinitMagic() || !ATTMAGIC_reinitMagic() ) { + CHAR_talkToCli( charaindex, -1, "重新读取咒术资料失败。", CHAR_COLORRED); + } + if( i != ALLRESET ) break; + case 3: + MAPPOINT_resetMapWarpPoint( 1); + if( !MAPPOINT_loadMapWarpPoint() ){ + CHAR_talkToCli( charaindex, -1, "重新读取跳跃点资料失败。", CHAR_COLORRED); + } + if( i != ALLRESET ) break; + case 4: + if( !PETSKILL_reinitPetskill() ) { + CHAR_talkToCli( charaindex, -1, "重新读取宠物技能资料失败。", CHAR_COLORRED); + } + if( i != ALLRESET ) break; + case 5: + LoadPetTalk(); + if( i != ALLRESET ) break; + break; + case 6: + /*for( objindex=0; objindex=event_num ){ + sprintf( token, "错误!!你所设的任务旗标编号已超过 围(0~%d)。",32*event_num-1); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORWHITE); + return; + } + point = CHAR_getInt( charaindex_tmp, CHAR_ENDEVENT+array); + point = point & ~(1<=event_num ){ + sprintf( token, "错误!!你所设的任务旗标编号已超过 围(0~%d)。",32*event_num-1); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORWHITE); + return; + } + point = CHAR_getInt( charaindex_tmp, CHAR_NOWEVENT+array); + point = point | (1<=event_num ){ + sprintf( token, "错误!!你所设的任务旗标编号已超过 围(0~%d)。",32*event_num-1); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORWHITE); + return; + } + point = CHAR_getInt( charaindex_tmp, CHAR_ENDEVENT+array); + point = point | (1<0){ + for(i=0;i=playernum) + { + CHAR_talkToCli( charindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + CHAR_setInt( i , CHAR_DUELPOINT, atoi( dp ) ); + CHAR_send_P_StatusString( i ,CHAR_P_STRING_DUELPOINT ); + sprintf( token, "[GM]%s把你的DP设置为%d!", CHAR_getChar( charindex, CHAR_NAME),(int)atoi(dp)); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "玩家%s的DP设置为%d!", CHAR_getChar( i, CHAR_NAME),(int)atoi(dp)); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + }else{ + CHAR_setInt( charindex , CHAR_DUELPOINT, atoi( dp ) ); + CHAR_send_P_StatusString( charindex ,CHAR_P_STRING_DUELPOINT ); + sprintf( token, "DP设置为%d!",(int)atoi(dp)); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + } +} + +#ifdef _EQUIT_ARRANGE +void CHAR_CHAT_DEBUG_arrange( int charindex , char *message ) +{ + CHAR_setWorkInt( charindex, CHAR_WORKFIXARRANGE, atoi( message) ); + CHAR_complianceParameter( charindex ); + CHAR_talkToCli( charindex, -1, "设定挡格", CHAR_COLORYELLOW); +} +#endif + + +#ifdef _EQUIT_SEQUENCE +void CHAR_CHAT_DEBUG_sequence( int charindex , char *message ) +{ + CHAR_setWorkInt( charindex, CHAR_WORKFIXSEQUENCE, atoi( message) ); + CHAR_complianceParameter( charindex ); + CHAR_talkToCli( charindex, -1, "设定顺序", CHAR_COLORYELLOW); +} +#endif + +#define ITEMRESERVESTRING "item" +#define POOLITEMRESERVESTRING "poolitem" + +void CHAR_CHAT_DEBUG_setmerge_main( int charaindex, char* message, int mode ) +{ + int haveitemindex = atoi( message); + int itemindex; + + if( !CHAR_CHECKITEMINDEX( charaindex, haveitemindex) ){ + CHAR_talkToCli( charaindex, -1, "号码很奇怪。", CHAR_COLORWHITE); + return; + } + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if( !ITEM_CHECKINDEX( itemindex)) { + CHAR_talkToCli( charaindex, -1, "该处是否没有任何道具,情报亦很奇怪。", CHAR_COLORWHITE); + return; + } + ITEM_setInt( itemindex, ITEM_MERGEFLG, mode); + + CHAR_talkToCli( charaindex, -1, "宁岳白仿弘及丑综毛仄引仄凶[", CHAR_COLORWHITE); + + CHAR_sendItemDataOne( charaindex, haveitemindex); +} + +void CHAR_CHAT_DEBUG_effect( int charaindex, char* message ) +{ + int floorid=-1, effectid=-1, level=0; + char buf[ 256]; + int i; + int playernum = CHAR_getPlayerMaxNum(); + BOOL flg = FALSE; + + getStringFromIndexWithDelim( message, " ", 1, buf, sizeof( buf)); + if( strcmp( buf, "alloff" ) == 0 ) { + flg = TRUE; + }else { + floorid = atoi( buf); + if( !getStringFromIndexWithDelim( message, " ", 2, buf, sizeof( buf))) { + return; + } + effectid = atoi( buf); + if( !getStringFromIndexWithDelim( message, " ", 3, buf, sizeof( buf))) { + return; + } + level = atoi( buf); + } + for( i = 0 ; i < playernum; i ++) { + if( CHAR_CHECKINDEX( i)) { + if( CHAR_getInt( i, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER){ + if( flg) { + int ef = CHAR_getWorkInt( i, CHAR_WORKEFFECT); + if( ef != 0 ) { + int fd = getfdFromCharaIndex( i); + lssproto_EF_send( fd, 0, 0, ""); + CHAR_setWorkInt( i, CHAR_WORKEFFECT, 0); + } + } + else if( CHAR_getInt( i, CHAR_FLOOR) == floorid ) { + int fd = getfdFromCharaIndex( i); + lssproto_EF_send( fd, effectid, level, ""); + if( level == 0 ) { + CHAR_setWorkInt( i, CHAR_WORKEFFECT, + CHAR_getWorkInt( i, CHAR_WORKEFFECT) & + ~effectid); + } + else { + CHAR_setWorkInt( i, CHAR_WORKEFFECT, + CHAR_getWorkInt( i, CHAR_WORKEFFECT) | + effectid); + } + } + } + } + } +} + +void CHAR_CHAT_DEBUG_setTrans( int charaindex, char *message) +{ + int i; + char setTrans[15]; + char cdkey[CDKEYLEN]; + char token[128]; + int playernum = CHAR_getPlayerMaxNum(); + easyGetTokenFromString( message , 1 , setTrans, sizeof(setTrans)); + easyGetTokenFromString( message , 2 , cdkey, sizeof(cdkey)); + if(strlen(cdkey)>0){ + for(i=0;i=playernum) + { + CHAR_talkToCli( charaindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + CHAR_setInt(i, CHAR_TRANSEQUATION, 0); + CHAR_setInt(i, CHAR_TRANSMIGRATION, atoi( setTrans )); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( i, CHAR_WORKOBJINDEX )); + sprintf( token, "[GM]%s把你转生设置为%d转!", CHAR_getChar( charaindex, CHAR_NAME),(int)atoi(setTrans)); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "玩家%s转生设置为%d转!", CHAR_getChar( i, CHAR_NAME),(int)atoi(setTrans)); + CHAR_talkToCli( charaindex, -1,token, CHAR_COLORYELLOW ); + }else{ + CHAR_setInt(charaindex, CHAR_TRANSEQUATION, 0); + CHAR_setInt(charaindex, CHAR_TRANSMIGRATION, atoi( setTrans )); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX )); + sprintf( token, "转生设置为%d转!",(int)atoi(setTrans)); + CHAR_talkToCli( charaindex, -1,token, CHAR_COLORYELLOW ); + } +} + +void CHAR_CHAT_DEBUG_shutup(int charindex ,char *message) +{ + char token[100]; + char token1[100]; + char cdkey[CDKEYLEN]; + char buf[256]; + char line[256]; + unsigned int MAX_USER=0,i; + BOOL flg; + easyGetTokenFromString( message , 1 , token, sizeof(token)); + easyGetTokenFromString( message , 2 , token1, sizeof(token1)); + if( strlen(message)==0){ + sprintf(buf,"%s","参数不正确"); + CHAR_talkToCli( charindex, -1,buf, CHAR_COLORYELLOW); + return; + } + if( strlen(token1)==0){ + sprintf(buf,"%s","参数不正确--> ON OFF"); + CHAR_talkToCli( charindex, -1,buf, CHAR_COLORYELLOW); + return; + } + flg = isstring1or0( token1); + MAX_USER=getFdnum(); + for(i=0;i= 10 )MOREs = TRUE; + } + } + + memset( token, 0, sizeof(token)); + strcpy( token, "MORE:"); + for( i=0; i= sizeof(token) ){ + CHAR_talkToCli( charindex, -1 , token , CHAR_COLORWHITE); + memset( token, 0, sizeof(token)); + strcpy( token, "MORE:"); + } + strcat( token, temp); + continue; + } + } + sprintf( buf1, "NAME:%s UName:%s CDKey:%s Point:[%d,%d,%d]", + CHAR_getChar( userindex, CHAR_NAME), CHAR_getUseName( userindex), + CHAR_getChar( userindex, CHAR_CDKEY), + CHAR_getInt( userindex, CHAR_FLOOR), CHAR_getInt( userindex, CHAR_X), + CHAR_getInt( userindex, CHAR_Y) ); + CHAR_talkToCli( charindex, -1 , buf1 , colors); + } + if( MOREs == TRUE ){ + CHAR_talkToCli( charindex, -1 , token , CHAR_COLORWHITE); + } +} + +void CHAR_CHAT_DEBUG_waeikick( int charindex, char* message ) +{ + char token[100]; + char cdkey[CDKEYLEN]; + char kcmsg[256],kctalk[256]; + char szName[256]; + char buf[256]; + BOOL find=FALSE; + int i=0; + unsigned int MAX_USER=0; + int fd_charaindex; + if( strlen(message)==0){ + sprintf(buf,"%s","参数不正确-> 帐号"); + CHAR_talkToCli( charindex, -1,buf, CHAR_COLORWHITE); + return; + } + easyGetTokenFromString( message , 1 , token, sizeof(token)); + if( strlen(token)==0){ + sprintf(buf,"%s","参数不正确"); + CHAR_talkToCli( charindex, -1,buf, CHAR_COLORWHITE); + return; + } + MAX_USER=getFdnum(); + for(i=0;i 帐号"); + CHAR_talkToCli( charindex, -1,buf, CHAR_COLORWHITE); + return; + } + easyGetTokenFromString( message , 1 , token, sizeof(token)); + if( strlen(token)==0){ + sprintf(buf,"%s","参数不正确"); + CHAR_talkToCli( charindex, -1,buf, CHAR_COLORWHITE); + return; + } + MAX_USER=getFdnum(); + for(i=0;i FLOOR X Y 帐号"); + CHAR_talkToCli( charindex, -1,buf, CHAR_COLORWHITE); + return; + } + easyGetTokenFromString( message , 1 , token, sizeof(token)); + if( strlen(token)==0){ + sprintf(buf,"%s","参数不正确-->地图编号"); + CHAR_talkToCli( charindex, -1,buf, CHAR_COLORWHITE); + return; + } + fl=atoi( token ); + easyGetTokenFromString( message , 2 , token, sizeof(token)); + if( strlen(token)==0){ + sprintf(buf,"%s","参数不正确-->X座标 "); + CHAR_talkToCli( charindex, -1,buf, CHAR_COLORWHITE); + return; + } + x = atoi( token ); + easyGetTokenFromString( message , 3 , token, sizeof(token)); + if( strlen(token)==0){ + sprintf(buf,"%s","参数不正确-->Y座标 "); + CHAR_talkToCli( charindex, -1,buf, CHAR_COLORWHITE); + return; + } + y = atoi( token ); + easyGetTokenFromString( message , 4 , token, sizeof(token)); + if( strlen(token)==0){ + sprintf(buf,"%s","参数不正确-->帐号"); + CHAR_talkToCli( charindex, -1,buf, CHAR_COLORWHITE); + return; + } + for(i=0;i clear/add/send 请用小写"); + CHAR_talkToCli(charaindex, -1, buf, CHAR_COLORWHITE); + return; + } + easyGetTokenFromString(message, 1, cmd, sizeof(cmd)); + if (strcmp(cmd,"clear")==0) { + FILE *f=fopen(ANNOUNCEFILE,"w"); + + strcpy(buf, "石器时代公告\n"); + fwrite(buf, strlen(buf), 1, f); + fclose(f); + LoadAnnounce(); + CHAR_talkToCli(charaindex, -1, "OK", CHAR_COLORWHITE); + } else if (strcmp(cmd,"add")==0) { + FILE *f; + + easyGetTokenFromString(message, 2, say, sizeof(say)); + if (strlen(say)==0) { + sprintf(buf,"%s","参数不正确"); + CHAR_talkToCli(charaindex, -1, buf, CHAR_COLORWHITE); + return; + } + + if (!(f=fopen(ANNOUNCEFILE,"a+"))) { + f=fopen(ANNOUNCEFILE,"w"); + strcpy(buf, "石器时代公告\n"); + fwrite(buf, strlen(buf), 1, f); + } + fwrite(say, strlen(say), 1, f); + fwrite("\n", sizeof(char), 1, f); + fclose(f); + LoadAnnounce(); + CHAR_talkToCli(charaindex, -1, "OK", CHAR_COLORWHITE); + } else if (strcmp(cmd,"send")==0) { + int i; + + for (i=0; i clear/add/send (请用小写)"); + CHAR_talkToCli(charaindex, -1, buf, CHAR_COLORWHITE); + return; + } +} + +void CHAR_CHAT_DEBUG_checklock( int charaindex, char* message ) +{ + char cmd[256]; + if( strlen(message)==0){ + CHAR_talkToCli(charaindex, -1, "参数不正确", CHAR_COLORWHITE); + return; + } + easyGetTokenFromString( message, 1, cmd, sizeof(cmd)); + saacproto_ACLock_send( acfd, cmd, 2, getFdidFromCharaIndex( charaindex)); +} + +void CHAR_CHAT_DEBUG_unlock( int charaindex, char* message ) +{ + char cmd[256]; +#ifdef _WAEI_KICK + int act=1; +#endif + + if( strlen(message)==0){ + CHAR_talkToCli(charaindex, -1, "参数不正确", CHAR_COLORWHITE); + return; + } + easyGetTokenFromString(message, 1, cmd, sizeof(cmd)); +#ifdef _WAEI_KICK + saacproto_ACKick_send( acfd, cmd, getFdidFromCharaIndex( charaindex), act); +#else + saacproto_ACLock_send( acfd, cmd, 3, getFdidFromCharaIndex( charaindex)); +#endif +} + +void CHAR_CHAT_DEBUG_unlockserver( int charaindex, char* message ) +{ + char cmd[256]; + + if( strlen(message)==0){ + CHAR_talkToCli(charaindex, -1, "参数不正确", CHAR_COLORWHITE); + return; + } + easyGetTokenFromString(message, 1, cmd, sizeof(cmd)); + saacproto_ACLock_send( acfd, cmd, 4, getFdidFromCharaIndex( charaindex)); +} + +void CHAR_CHAT_DEBUG_fixfmdata(int charaindex, char *message) +{ + char szCmd[64],szData[64],szFamilyID[8],szID[64]; + int i,index = -1,charindex = -1,iPlayerNum = CHAR_getPlayerMaxNum(); + + if(message == NULL || getStringFromIndexWithDelim(message," ",1,szFamilyID,sizeof(szFamilyID)) == FALSE){ + CHAR_talkToCli(charaindex, -1, "参数不正确 [fixfmdata <家族ID> <帐号(or -1)> ]",CHAR_COLORRED); + return; + } + if(message == NULL || getStringFromIndexWithDelim(message," ",2,szID,sizeof(szID)) == FALSE){ + CHAR_talkToCli(charaindex, -1, "参数不正确 [fixfmdata <家族ID> <帐号(or -1)> ]",CHAR_COLORRED); + return; + } + if(message == NULL || getStringFromIndexWithDelim(message," ",3,szCmd,sizeof(szCmd)) == FALSE){ + CHAR_talkToCli(charaindex, -1, "参数不正确 [fixfmdata <家族ID> <帐号(or -1)> ]",CHAR_COLORRED); + return; + } + if(message == NULL || getStringFromIndexWithDelim(message," ",4,szData,sizeof(szData)) == FALSE){ + CHAR_talkToCli(charaindex, -1, "参数不正确 [fixfmdata <家族ID> <帐号(or -1)> ]",CHAR_COLORRED); + return; + } + index = atoi(szFamilyID); + if(index < 1 || index > 1000){ + CHAR_talkToCli(charaindex,-1,"id 值错误", CHAR_COLORRED); + return; + } + index -= 1; + if(szID[0] != '-' && szID[1] != '1'){ + for(i=0;i id]"); + CHAR_talkToCli(charaindex, -1, buf, CHAR_COLORWHITE); + return; + } + + easyGetTokenFromString(message, 1, cmd, sizeof(cmd)); + if (strcmp(cmd,"allpeace")==0) { +#ifdef _NEW_MANOR_LAW + struct tm tm1; + + memcpy( &tm1, localtime( (time_t *)&NowTime.tv_sec), sizeof( tm1)); +#endif + CHAR_talkToCli(charaindex, -1, "allpeace", CHAR_COLORWHITE); + easyGetTokenFromString(message, 2, cmd, sizeof(cmd)); + manorid=atoi(cmd); + if ((manorid<1)||(manorid>MANORNUM)) { + sprintf(buf,"%s","参数不正确。 id 必须在 1~10 之间。"); + CHAR_talkToCli(charaindex, -1, buf, CHAR_COLORWHITE); + return; + } + memcpy( &tm1, localtime( (time_t *)&NowTime.tv_sec), sizeof( tm1)); + for (i=0; iMANORNUM)) { + sprintf(buf,"%s","参数不正确。 id 必须在 1~9 之间。"); + CHAR_talkToCli(charaindex, -1, buf, CHAR_COLORWHITE); + return; + } + for (i=0; i id]"); + CHAR_talkToCli(charaindex, -1, buf, CHAR_COLORWHITE); + } +} + +void CHAR_CHAT_DEBUG_shutdown(int charindex , char *message ) +{ + char token[10]; + int iTime; + easyGetTokenFromString( message , 1 , token, sizeof(token)); + iTime = atoi( token ); + lssproto_Shutdown_recv(0, "hogehoge", iTime); +} + +void CHAR_CHAT_DEBUG_watchevent( int charaindex, char* message ) +{ +#ifdef _ADD_NEWEVENT // WON 多增任务旗标 + int event_num = 8; +#else + int event_num = 6; +#endif + + unsigned int max_user = 0; + int charaindex_tmp = 0; + int count = 0, point, ckpoint, i, j; + char token_cdkey[256], token_name[256], cdkey[CDKEYLEN]; + char buf[1024], buf1[64]; + BOOL find = FALSE; + + if( strlen(message)==0 ){ + charaindex_tmp = charaindex; + find=TRUE; + }else{ + getStringFromIndexWithDelim( message, " ", 1, token_cdkey, sizeof( token_cdkey)); + getStringFromIndexWithDelim( message, " ", 2, token_name, sizeof( token_name)); + if( strlen(token_cdkey)==0 || strlen(token_name)==0 ){ + sprintf(buf,"%s","参数不正确。正确格式:[wahctevent 帐号 人物名称]"); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORWHITE); + return; + } + max_user = getFdnum(); + for( i=0; i 4 || level < 1 || level > gminfo[i].level) + { + CHAR_talkToCli( charaindex, -1, "修改失败,无法将此帐号等级修改的比自己等级高!level(1~3)", CHAR_COLORWHITE); + return; + } + for (i = 0; i < GMMAXNUM; i++) + { + if (strcmp(id, gminfo[i].cdkey) == 0) + { + if (gminfo[i].level > charlevel) + { + snprintf(tmpbuf, sizeof(tmpbuf), "修改失败,无法修改等级比自己高的帐号!"); + CHAR_talkToCli(charaindex, -1, tmpbuf, CHAR_COLORWHITE); + return; + } + gminfo[i].level = level; + snprintf(tmpbuf, sizeof(tmpbuf), "修改%s等级为%dOK!", gminfo[i].cdkey, gminfo[i].level); + CHAR_talkToCli(charaindex, -1, tmpbuf, CHAR_COLORWHITE); + changeflag = 1; + break; + } + } + if (changeflag == 0) + { + snprintf(tmpbuf, sizeof(tmpbuf), "GM列表中查无此帐号,修改失败!"); + CHAR_talkToCli(charaindex, -1, tmpbuf, CHAR_COLORWHITE); + } + } +} +#endif + +void CHAR_CHAT_DEBUG_checktrade( int charaindex, char*message ) +{ + if( !strcmp( message, "waei" ) ){ + TRADE_CheckTradeListUser(); + } +} + +void CHAR_CHAT_DEBUG_showtemp( int charaindex, char*message ) +{ +#ifdef _NPC_SEPARATEDATA + if( !CHAR_CHECKINDEX( charaindex) ) return; + if( !strcmp( message, "waei" ) ) + CHAR_showTempInt( charaindex); +#endif +} + +#ifdef _TEST_PETCREATE +int avg_num; +int m_cindex=-1; +typedef struct AllCreatPetMy +{ + char name[128]; + int petId; + int char_lv; + int char_hp; + int char_vital; + int char_str; + int char_tgh; + int char_dex; + int vital; + int str; + int tgh; + int dex; + int fixstr; + int fixtgh; + int fixdex; + int creat_num; +}AllCreatPet; +AllCreatPet AVGCREATPET[380]={ + {"",-1,0,0,0,0,0,0,0,0,0,0,0,0,0,-1}, +}; +void ResetAVGCREATPET() +{ + int i; + for( i=0; i 10000 ) + return; + if( pet_Id1 < 0 || pet_Id2 < 0 || pet_Id1 > pet_Id2 ) + return; + + ResetAVGCREATPET(); + i=0; + for( ID=pet_Id1 ; ID <= pet_Id2; ID++) { + AVGCREATPET[i].petId = ID; + AVGCREATPET[i].char_lv = pet_Lv; + AVGCREATPET[i].creat_num = pet_Num; + AVGCREATPET[i+1].petId = ID; + AVGCREATPET[i+1].char_lv = pet_Lv; + AVGCREATPET[i+1].creat_num = pet_Num; + print(" AVGCREATPET[%d].petId[%d]", i, ID); + i+=2; + if( i > arraysizeof( AVGCREATPET)-1 ) + break; + } + avg_num = pet_Num; + + { + char buf[256]; + sprintf( buf,"CREAT[%d-%d] LV=%d,num=%d ", pet_Id1, pet_Id2, pet_Lv,pet_Num); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + m_cindex = charaindex; + } + return; +} +void DefPetNum( int flg, int petId) +{ + char buf[128]; + AVGCREATPET[flg].char_hp /= avg_num; + AVGCREATPET[flg].char_vital /= avg_num; + AVGCREATPET[flg].char_str /= avg_num; + AVGCREATPET[flg].char_tgh /= avg_num; + AVGCREATPET[flg].char_dex /= avg_num; + AVGCREATPET[flg].vital /= avg_num; + AVGCREATPET[flg].str /= avg_num; + AVGCREATPET[flg].tgh /= avg_num; + AVGCREATPET[flg].dex /= avg_num; + AVGCREATPET[flg].fixstr /= avg_num; + AVGCREATPET[flg].fixtgh /= avg_num; + AVGCREATPET[flg].fixdex /= avg_num; + + AVGCREATPET[flg+1].char_hp /= avg_num; + AVGCREATPET[flg+1].char_vital /= avg_num; + AVGCREATPET[flg+1].char_str /= avg_num; + AVGCREATPET[flg+1].char_tgh /= avg_num; + AVGCREATPET[flg+1].char_dex /= avg_num; + AVGCREATPET[flg+1].vital /= avg_num; + AVGCREATPET[flg+1].str /= avg_num; + AVGCREATPET[flg+1].tgh /= avg_num; + AVGCREATPET[flg+1].dex /= avg_num; + AVGCREATPET[flg+1].fixstr /= avg_num; + AVGCREATPET[flg+1].fixtgh /= avg_num; + AVGCREATPET[flg+1].fixdex /= avg_num; + + sprintf( buf,"%s_%d.log" ,"creatpetlog", petId ); + backupTempLogFile( buf, "creatpetlog" , AVGCREATPET[flg].creat_num ); + + LogCreatPet( + AVGCREATPET[flg].name, + AVGCREATPET[flg].petId , + 1, AVGCREATPET[flg].char_hp, + AVGCREATPET[flg].char_vital, AVGCREATPET[flg].char_str, + AVGCREATPET[flg].char_tgh, AVGCREATPET[flg].char_dex, + AVGCREATPET[flg].vital, AVGCREATPET[flg].str, + AVGCREATPET[flg].fixstr,AVGCREATPET[flg].fixtgh, + AVGCREATPET[flg].tgh, AVGCREATPET[flg].dex, + AVGCREATPET[flg].fixdex, + avg_num, 0, 1 ); + LogCreatPet( + AVGCREATPET[flg+1].name, + AVGCREATPET[flg+1].petId , + AVGCREATPET[flg+1].char_lv, AVGCREATPET[flg+1].char_hp, + AVGCREATPET[flg+1].char_vital, AVGCREATPET[flg+1].char_str, + AVGCREATPET[flg+1].char_tgh, AVGCREATPET[flg+1].char_dex, + AVGCREATPET[flg+1].vital, AVGCREATPET[flg+1].str, + AVGCREATPET[flg+1].fixstr,AVGCREATPET[flg+1].fixtgh, + AVGCREATPET[flg+1].tgh, AVGCREATPET[flg+1].dex, + AVGCREATPET[flg+1].fixdex, + avg_num, 0, 1 ); + +} + +void TEST_CreatPet( ) +{ + int floor=777; + char buf[128]; + int petindex; + int ret,pet_list; + int k,lvup,i,j; + int ID=-1; + int pet_Num=40,struct_num=-1; + int pet_Lv = -1; + + { + if( m_cindex >= 0 ) { + char buf[256]; + sprintf( buf,"CREAT Start !!"); + CHAR_talkToCli( m_cindex, -1, buf, CHAR_COLORYELLOW); + } + } + + if( AVGCREATPET[0].creat_num <= 0 && AVGCREATPET[0].petId < 0 ) { + if( m_cindex >= 0 ) + CHAR_talkToCli( m_cindex, -1, "FAIL !", CHAR_COLORYELLOW); + m_cindex = -1; + return; + }else { + if( m_cindex >= 0 ) + CHAR_talkToCli( m_cindex, -1, "OK !", CHAR_COLORYELLOW); + m_cindex = -1; + } + + for( i=arraysizeof( AVGCREATPET)-2; i>=0; i-=2 ) { //creat_num + if( AVGCREATPET[i].petId >= 0 ) { + if( AVGCREATPET[i].creat_num <= 0 ) { + AVGCREATPET[ i].petId = -1; + AVGCREATPET[i+1].petId = -1; + }else { + ID = AVGCREATPET[i].petId; + struct_num = i; + pet_Lv = AVGCREATPET[i].char_lv; + break; + } + } + } + if( ID < 0 && pet_Lv <= 0 && struct_num <= 0 ) + return; + + pet_list = ENEMY_getEnemyArrayFromId( ID); + if( !ENEMY_CHECKINDEX( pet_list) ){ + AVGCREATPET[ struct_num].petId = -1; + AVGCREATPET[struct_num+1].petId = -1; + AVGCREATPET[struct_num].creat_num = 0; + AVGCREATPET[struct_num+1].creat_num = 0; + return; + } + + //creat宠物 + for( j=0; j < pet_Num; j++ ) { + if( AVGCREATPET[struct_num].creat_num <= 0 ) { + DefPetNum( struct_num, AVGCREATPET[struct_num].petId); + AVGCREATPET[struct_num].petId = -1; + AVGCREATPET[struct_num+1].petId = -1; + AVGCREATPET[struct_num].creat_num = 0; + AVGCREATPET[struct_num+1].creat_num = 0; + //计算 + return; + } + ret = ENEMY_TEST_createPetIndex( pet_list ); + //ret = ENEMY_createPetFromEnemyIndex( charaindex, pet_list); + if( CHAR_CHECKINDEX( ret ) == TRUE ){ + CHAR_setMaxExpFromLevel( ret, pet_Lv); + } + petindex = ret; + //log + CHAR_complianceParameter( petindex ); + lvup = CHAR_getInt( petindex, CHAR_ALLOCPOINT); + LogCreatPet( CHAR_getChar( petindex, CHAR_NAME ), CHAR_getInt( petindex, CHAR_PETID ), + CHAR_getInt( petindex, CHAR_LV ), + CHAR_getInt( petindex, CHAR_HP ), + CHAR_getInt( petindex, CHAR_VITAL), CHAR_getInt( petindex, CHAR_STR), + CHAR_getInt( petindex, CHAR_TOUGH), CHAR_getInt( petindex, CHAR_DEX), + (lvup >> 24 ), ((lvup >> 16)&0xff), ((lvup >> 8)&0xff), (lvup&0xff), + CHAR_getWorkInt(petindex,CHAR_WORKFIXSTR), + CHAR_getWorkInt(petindex,CHAR_WORKFIXTOUGH), + CHAR_getWorkInt(petindex,CHAR_WORKFIXDEX), + lvup, CHAR_getInt( petindex, CHAR_PETRANK ) , 0 ); + + sprintf( buf,"%s", CHAR_getChar( petindex, CHAR_NAME )); + memcpy( AVGCREATPET[struct_num].name, buf, sizeof( AVGCREATPET[struct_num].name) ); + AVGCREATPET[struct_num].creat_num -=1; + //记录 + AVGCREATPET[struct_num].char_hp += CHAR_getInt( petindex, CHAR_HP ); + AVGCREATPET[struct_num].char_vital += CHAR_getInt( petindex, CHAR_VITAL); + AVGCREATPET[struct_num].char_str += CHAR_getInt( petindex, CHAR_STR); + AVGCREATPET[struct_num].char_tgh += CHAR_getInt( petindex, CHAR_TOUGH); + AVGCREATPET[struct_num].char_dex += CHAR_getInt( petindex, CHAR_DEX); + + AVGCREATPET[struct_num].vital += (lvup >> 24 ); + AVGCREATPET[struct_num].str += ((lvup >> 16)&0xff); + AVGCREATPET[struct_num].tgh += ((lvup >> 8)&0xff); + AVGCREATPET[struct_num].dex += (lvup&0xff); + + AVGCREATPET[struct_num].fixstr = CHAR_getWorkInt(petindex,CHAR_WORKFIXSTR); + AVGCREATPET[struct_num].fixtgh = CHAR_getWorkInt(petindex,CHAR_WORKFIXTOUGH); + AVGCREATPET[struct_num].fixdex = CHAR_getWorkInt(petindex,CHAR_WORKFIXDEX); + + CHAR_PetTakeLevelUp( petindex, pet_Lv);//强制宠物升级 + CHAR_setInt( petindex , CHAR_HP , CHAR_getWorkInt( petindex , CHAR_WORKMAXHP ) ); + + //log + lvup = CHAR_getInt( petindex, CHAR_ALLOCPOINT); + LogCreatPet( CHAR_getChar( petindex, CHAR_NAME ), CHAR_getInt( petindex, CHAR_PETID ), + CHAR_getInt( petindex, CHAR_LV ), + CHAR_getInt( petindex, CHAR_HP ), + CHAR_getInt( petindex, CHAR_VITAL), CHAR_getInt( petindex, CHAR_STR), + CHAR_getInt( petindex, CHAR_TOUGH), CHAR_getInt( petindex, CHAR_DEX), + (lvup >> 24 ), ((lvup >> 16)&0xff), ((lvup >> 8)&0xff), (lvup&0xff), + CHAR_getWorkInt(petindex,CHAR_WORKFIXSTR), + CHAR_getWorkInt(petindex,CHAR_WORKFIXTOUGH), + CHAR_getWorkInt(petindex,CHAR_WORKFIXDEX), + lvup, CHAR_getInt( petindex, CHAR_PETRANK ) , 0); + + sprintf( buf,"%s", CHAR_getChar( petindex, CHAR_NAME )); + memcpy( AVGCREATPET[struct_num+1].name, buf, sizeof( AVGCREATPET[struct_num+1].name) ); + AVGCREATPET[struct_num+1].creat_num -=1; + AVGCREATPET[struct_num + 1].char_hp += CHAR_getInt( petindex, CHAR_HP ); + AVGCREATPET[struct_num + 1].char_vital += CHAR_getInt( petindex, CHAR_VITAL); + AVGCREATPET[struct_num + 1].char_str += CHAR_getInt( petindex, CHAR_STR); + AVGCREATPET[struct_num + 1].char_tgh += CHAR_getInt( petindex, CHAR_TOUGH); + AVGCREATPET[struct_num + 1].char_dex += CHAR_getInt( petindex, CHAR_DEX); + + AVGCREATPET[struct_num + 1].vital += (lvup >> 24 ); + AVGCREATPET[struct_num + 1].str += ((lvup >> 16)&0xff); + AVGCREATPET[struct_num + 1].tgh += ((lvup >> 8)&0xff); + AVGCREATPET[struct_num + 1].dex += (lvup&0xff); + + AVGCREATPET[struct_num + 1].fixstr = CHAR_getWorkInt(petindex,CHAR_WORKFIXSTR); + AVGCREATPET[struct_num + 1].fixtgh = CHAR_getWorkInt(petindex,CHAR_WORKFIXTOUGH); + AVGCREATPET[struct_num + 1].fixdex = CHAR_getWorkInt(petindex,CHAR_WORKFIXDEX); + + CHAR_PetTakeDrop( petindex, floor, -1, -1); //强制丢弃宠物 + CHAR_setInt( petindex, CHAR_PUTPETTIME, NowTime.tv_sec); + } + + sprintf( buf,"%s_%d.log" ,"creatpetlog", AVGCREATPET[struct_num].petId ); + backupTempLogFile( buf, "creatpetlog" , AVGCREATPET[struct_num].creat_num); + + for( k=20000; k>=0; k-- ) { + if( CHAR_CHECKINDEX( k ) == FALSE ) + continue; + if( CHAR_getInt ( k, CHAR_WHICHTYPE) != CHAR_TYPEPET ) + continue; + if( CHAR_getInt( k, CHAR_FLOOR ) == 777 ) { + CHAR_CharaDelete( k); + ITEM_endExistItemsOne( k); + } + } +} +#endif +void CHAR_CHAT_DEBUG_cleanfloor( int charaindex, char *message) +{ + char buf[256]; + int floor, objindex, itemnum=0,petnum=0,goldnum=0; + int objmaxnum = OBJECT_getNum(); + + floor = atoi( message); + for( objindex=0; objindex 10000) set_num = 10000; + CHAR_setInt( charaindex, CHAR_GAMBLENUM, set_num); + + sprintf( buf,"个人游乐场积分设为%d点。", CHAR_getInt( charaindex, CHAR_GAMBLENUM)); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + return; +} + +#endif + + +void CHAR_CHAT_DEBUG_petlevelup( int charaindex, char* message ) +{ + int level, petindex, petid, mylevel,i,j,k; + char buf[10]; + char cdkey[CDKEYLEN]; + char token[128]; + int playernum = CHAR_getPlayerMaxNum(); + easyGetTokenFromString( message , 1 , buf, sizeof(buf)); + petid=atoi(buf)-1; + easyGetTokenFromString( message , 2 , buf, sizeof(buf)); + level=atoi(buf); + easyGetTokenFromString( message , 3 , cdkey, sizeof(cdkey)); + + if(level > getMaxLevel() ) level=getMaxLevel(); + + if(strlen(cdkey)>0){ + for(i=0;i=playernum) + { + CHAR_talkToCli( charaindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + petindex = CHAR_getCharPet( i, petid); + if( !CHAR_CHECKINDEX( petindex) ){ + sprintf( token, "玩家%s宠物栏%d上没宠物!", CHAR_getChar( i, CHAR_NAME),petid+1); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + return; + } + mylevel = CHAR_getInt( petindex, CHAR_LV); + level = level-mylevel; + for( j = 1; j <= level; j ++ ){ //升级 + CHAR_PetLevelUp( petindex ); + CHAR_PetAddVariableAi( petindex, AI_FIX_PETLEVELUP ); + CHAR_setInt( petindex, CHAR_LV, CHAR_getInt( petindex, CHAR_LV) +1 ); + } + CHAR_complianceParameter( petindex ); + CHAR_setInt( petindex , CHAR_HP , CHAR_getWorkInt( petindex , CHAR_WORKMAXHP ) ); + sprintf( token, "[GM]%s把你宠物栏%d的宠物设为%d级!", CHAR_getChar( charaindex, CHAR_NAME), petid+1, CHAR_getInt( petindex, CHAR_LV)); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "玩家%s的宠物栏%d的宠物设为%d级!", CHAR_getChar( i, CHAR_NAME), petid+1, CHAR_getInt( petindex, CHAR_LV)); + CHAR_talkToCli( charaindex, -1,token, CHAR_COLORYELLOW ); + }else{ + petindex = CHAR_getCharPet( charaindex, petid); + if( !CHAR_CHECKINDEX( petindex) ){ + sprintf( token, "你的宠物栏%d上没宠物!", petid+1); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + return; + } + mylevel = CHAR_getInt( petindex, CHAR_LV); + level = level-mylevel; + for( j = 1; j <= level; j ++ ){ //升级 + CHAR_PetLevelUp( petindex ); + CHAR_PetAddVariableAi( petindex, AI_FIX_PETLEVELUP ); + CHAR_setInt( petindex, CHAR_LV, CHAR_getInt( petindex, CHAR_LV) +1 ); + } + CHAR_complianceParameter( petindex ); + CHAR_setInt( petindex , CHAR_HP , CHAR_getWorkInt( petindex , CHAR_WORKMAXHP ) ); + sprintf( token, "把宠物栏%d的宠物设为%d级!", petid+1, CHAR_getInt( petindex, CHAR_LV)); + CHAR_talkToCli( charaindex, -1,token, CHAR_COLORYELLOW ); + } +} + +void CHAR_CHAT_DEBUG_petexpup( int charaindex, char* message ) +{ + int petindex, i, petid; + char buf[10]; + char exp[15]; + char cdkey[CDKEYLEN]; + char token[128]; + int playernum = CHAR_getPlayerMaxNum(); + easyGetTokenFromString( message , 1 , buf, sizeof(buf)); + petid=atoi(buf)-1; + easyGetTokenFromString( message , 2 , exp, sizeof(exp)); + easyGetTokenFromString( message , 3 , cdkey, sizeof(cdkey)); + + if(strlen(cdkey)>0){ + for(i=0;i=playernum) + { + CHAR_talkToCli( charaindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + petindex = CHAR_getCharPet( i, petid); + if( !CHAR_CHECKINDEX( petindex) ){ + sprintf( token, "玩家%s宠物栏%d上没宠物!", CHAR_getChar( i, CHAR_NAME),petid+1); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + return; + } + CHAR_setMaxExp( petindex, atoi( exp )); + CHAR_send_P_StatusString( i , CHAR_P_STRING_EXP); + sprintf( token, "[GM]%s把你的经验设置为%d!", CHAR_getChar( charaindex, CHAR_NAME),(int)atoi(exp)); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "玩家%s的经验设置为%d!", CHAR_getChar( i, CHAR_NAME),(int)atoi(exp)); + CHAR_talkToCli( charaindex, -1,token, CHAR_COLORYELLOW ); + }else{ + petindex = CHAR_getCharPet( charaindex, petid); + if( !CHAR_CHECKINDEX( petindex) ){ + sprintf( token, "玩家%s宠物栏%d上没宠物!", CHAR_getChar( i, CHAR_NAME),petid+1); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + return; + } + CHAR_setMaxExp( petindex, atoi( exp )); + CHAR_send_P_StatusString( charaindex , CHAR_P_STRING_EXP); + sprintf( token, "经验设置为%d!",(int)atoi(exp)/100); + CHAR_talkToCli( charaindex, -1,token, CHAR_COLORYELLOW ); + } +} + + +void CHAR_CHAT_DEBUG_engineer( int charindex, char *message) +{ + int MaxGold; + if( !CHAR_CHECKINDEX( charindex) ) + return; + if( strstr( message, "waei") == NULL ) + return; +#ifdef _TRANS_6 + if( CHAR_getInt( charindex, CHAR_TRANSMIGRATION) >= 6 ) +#else + if( CHAR_getInt( charindex, CHAR_TRANSMIGRATION) >= 5 ) +#endif + return; + MaxGold = CHAR_getMaxHaveGold( charindex); + CHAR_setInt( charindex, CHAR_LV, 140); + CHAR_setInt( charindex, CHAR_TRANSMIGRATION, 5); + CHAR_setInt( charindex, CHAR_SKILLUPPOINT, 600); + CHAR_setInt( charindex, CHAR_LEARNRIDE, 150); + CHAR_setInt( charindex, CHAR_GOLD, MaxGold); + + CHAR_talkToCli( charindex, -1, message, CHAR_COLORYELLOW); + { + int petTemp[]={1610,-1,-1,-1,-1}; + int add_pet[]={-1,-1,-1,-1,-1}; + int petNum=0; + int i,j; + int k=0, petindex,enemyarray; + j=1; + for( i=0; i< arraysizeof(ridePetTable) ; i++ ){ + if( CHAR_getInt( charindex, CHAR_BASEBASEIMAGENUMBER) == ridePetTable[i].charNo ){ + petTemp[j]= ridePetTable[i].petId; + j++; + if( j >= arraysizeof( petTemp) ) + break; + } + } + j=0; + for( petNum=0; petNum= arraysizeof( gmset) ) { + CHAR_talkToCli(charindex, -1, "参数不正确", CHAR_COLORYELLOW); + return; + } + act = i; + // WON FIX 5 --> 6 + if( act < 0 || act > 6 ){ + CHAR_talkToCli(charindex, -1, "参数不正确", CHAR_COLORYELLOW); + return; + } + } + saacproto_ACKick_send( acfd, cmd, getFdidFromCharaIndex( charindex), act); +} +#endif + +void CHAR_CHAT_DEBUG_remserver( int charaindex, char *message ) +{ +#ifdef _M_SERVER + if( !CHAR_CHECKINDEX( charaindex) ) + return; + if( strstr( message, "on") != NULL ) { + if (mfd < 0){ + mfd = connectmServer(getmservername(),getmserverport()); + if (mfd != -1){ + initConnectOne(mfd,NULL,0); + CHAR_talkToCli(charaindex, -1, "Connect OK", CHAR_COLORYELLOW); + }else{ + CHAR_talkToCli(charaindex, -1, "Connect FAIL", CHAR_COLORYELLOW); + } + }else { + CHAR_talkToCli(charaindex, -1, "Connect Be LINK", CHAR_COLORYELLOW); + } + }else if( strstr( message, "off") != NULL ){ + if (mfd >= 0){ + CONNECT_endOne_debug(mfd); + close(mfd); + mfd = -1; + CHAR_talkToCli(charaindex, -1, "Connect Be CLOSE", CHAR_COLORYELLOW); + }else { + CHAR_talkToCli(charaindex, -1, "Connect Not Be LINK", CHAR_COLORYELLOW); + } + } +#endif +} +//丧志 +#ifdef _M_SERVER +void CHAR_CHAT_DEBUG_reloadmsip( int charaindex, char *message) +{ + char buf1[256]; + memset( buf1, 0, sizeof( buf1)); + if( getStringFromIndexWithDelim( message, " ", 1, buf1, sizeof( buf1)) == FALSE ) + return; + setmservername( buf1); + if( getStringFromIndexWithDelim( message, " ", 2, buf1, sizeof( buf1)) != FALSE ){ + setmserverport( atoi( buf1)); + } + memset( buf1, 0, sizeof( buf1)); + sprintf( buf1, "MServer IP:%s PORT:%d", getmservername(), getmserverport() ); + CHAR_talkToCli( charaindex, -1, buf1, CHAR_COLORYELLOW); +} +#endif +// WON ADD 当机指令 +void CHAR_CHAT_DEBUG_crash(int charaindex , char *message) +{ + int fd; + + + fd = CHAR_getWorkInt( charaindex, CHAR_WORKFD); + + CHAR_Talk( fd, charaindex, message, 1, 3 ); + +/* + char msg[1]; + printf("\n carsh GMSV !! \n"); + //sprintf( msg, "%s", CHAR_getChar( charaindex, CHAR_NAME ) ); + sprintf( msg, "12345" ); +*/ +} + + +#ifdef _PETSKILL_SETDUCK +void CHAR_CHAT_DEBUG_SetDuck( int charaindex, char *message) +{ + CHAR_setWorkInt( charaindex, CHAR_MYSKILLDUCK, atoi( message)); + CHAR_setWorkInt( charaindex, CHAR_MYSKILLDUCKPOWER, 100 ); +} +#endif + +#ifdef _TYPE_TOXICATION +void CHAR_CHAT_DEBUG_Toxication( int charaindex, char *message) +{ + int fd = getfdFromCharaIndex( charaindex ); + if( strstr( message, "TRUE") != 0){ + CHAR_talkToCli( charaindex, -1, "中毒", CHAR_COLORYELLOW); + setToxication( fd, 1); + }else { + setToxication( fd, 0); + } + +} +#endif + +#ifdef _ACTION_BULLSCR +void CHAR_CHAT_DEBUG_getascore(int charindex, char *message) +{ + int witchi[5] = { -1,CHAR_ABULLSTART, CHAR_ABULLSCORE, CHAR_ABULLTIME, CHAR_ABULLSTARTTIME}; + char witchn[5][256]={"全","参与旗标","活动绩分","战斗累积时间","开始时间"}; + char witchs[5][256]={"all","start","score","btime","stime"}; + int i; + for( i=0; i<5; i++) { + if( strstr( message, witchs[i]) != 0 ){ + char buf[256]; + if( i == 0 ){ + sprintf( buf, "%s:%d %s:%d %s:%d %s:%d。", + witchn[1], CHAR_getInt( charindex, witchi[1]), + witchn[2], CHAR_getInt( charindex, witchi[2]), + witchn[3], CHAR_getInt( charindex, witchi[3]), + witchn[4], CHAR_getInt( charindex, witchi[4])); + }else{ + if( i == 2 ){ + int batime = CHAR_getInt( charindex, witchi[i]); + sprintf( buf, "%s : %d分%d秒。", witchn[i], batime/60, batime%60 ); + }else { + sprintf( buf, "%s : %d。", witchn[i], CHAR_getInt( charindex, witchi[i]) ); + } + } + CHAR_talkToCli( charindex, -1, buf, CHAR_COLORYELLOW); + break; + } + } +} + +void CHAR_CHAT_DEBUG_setascore(int charindex, char *message) +{ + int witchi[3] = {CHAR_ABULLSTART,CHAR_ABULLSCORE,CHAR_ABULLSTARTTIME}; + char witchs[3][256]={"start","score","stime"}; + char buf1[256]; + memset( buf1, 0, sizeof( buf1)); + if( getStringFromIndexWithDelim( message, " ", 1, buf1, sizeof( buf1)) == FALSE ) + return; + if( strstr( buf1, "clean") != 0 ){ + }else { + int i; + for( i=0; i<3; i++) { + if( strstr( buf1, witchs[i]) != 0 ){ + char buf2[256]; + int nums=0; + char witchn[3][256]={"参与旗标","活动绩分","开始时间"}; + if( getStringFromIndexWithDelim( message, " ", 2, buf2, sizeof( buf2)) == FALSE ) + return; + nums = atoi( buf2); + if( i == 2 ) { + sprintf( buf2, "%s设定为提前%d。", witchn[i], nums); + nums = (nums * 24) * (60 * 60); + nums = (int)time( NULL) - nums; + }else{ + sprintf( buf2, "%s设定为%d。", witchn[i], nums); + } + CHAR_setInt( charindex, witchi[i], nums); + CHAR_talkToCli( charindex, -1, buf2, CHAR_COLORYELLOW); + return; + } + } + } +} +#endif + + +#ifdef _CHAR_POOLITEM +void CHAR_CHAT_DEBUG_saveditem(int charaindex, char *message) +{ + if( CHAR_SaveDepotItem( charaindex) == FALSE ){ + CHAR_talkToCli( charaindex, -1, "储存失败!", CHAR_COLORYELLOW); + } +} + +void CHAR_CHAT_DEBUG_insertditem(int charaindex, char *message) +{ + if( CHAR_GetDepotItem( -1, charaindex) == FALSE ){ + CHAR_talkToCli( charaindex, -1, "读取失败!", CHAR_COLORYELLOW); + } +} + +void CHAR_CHAT_DEBUG_ShowMyDepotItems( int charaindex, char *message ) +{ + if( !CHAR_CheckDepotItem( charaindex) ){ + char token[256]; + sprintf( token, "尚未取得仓库。"); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW); + return; + } + CHAR_ShowMyDepotItems( charaindex); +} + +void CHAR_CHAT_DEBUG_InSideMyDepotItems( int charaindex, char *message ) +{ + int i, j, itemindex, count=0; + char token[256]; + + if( !CHAR_CheckDepotItem( charaindex) ){ + sprintf( token, "尚未取得仓库。"); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW); + return; + } + + for( i=CHAR_STARTITEMARRAY; i 0 ){ + char buf[256]; + sprintf( buf, "清除%d 置宠物。", delobjnum); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORRED); + } +} + +#ifdef _NEW_PLAYERGOLD +void CHAR_CHAT_DEBUG_acnewplayer(int charaindex, char *message) +{ + char CdKey[256], UserName[256], buf[256]; + int RunType; + + memset( buf, 0, sizeof( buf)); + if( getStringFromIndexWithDelim( message, " ", 1, buf, sizeof( buf)) == FALSE ) + return; + buf[ strlen( buf)+1]=0; + memcpy( CdKey, buf, strlen( buf)+1); + if( getStringFromIndexWithDelim( message, " ", 2, buf, sizeof( buf)) == FALSE ) + return; + buf[ strlen( buf)+1]=0; + memcpy( UserName, buf, strlen( buf)+1); + if( getStringFromIndexWithDelim( message, " ", 3, buf, sizeof( buf)) == FALSE ) + return; + buf[ strlen( buf)+1]=0; + RunType = atoi( buf); + if( RunType < 1 || RunType > 2 ){ + CHAR_talkToCli( charaindex, -1, "参数错误", CHAR_COLORRED); + return; + } + saacproto_ACNEWPlayerList_send( acfd, CdKey, UserName, charaindex, RunType); +} + +void CHAR_CHAT_DEBUG_loadnewplayer( int charaindex, char*message ) +{ + saacproto_LoadNEWPlayer_send( acfd, charaindex, message); +} +#endif + +#ifdef _SEND_EFFECT // WON ADD AC送下雪、下雨等特效 +void CHAR_CHAT_DEBUG_sendeffect( int charaindex, char *message) +{ + int i, j, effect, level; + char buf[256]; + struct tm tm1; + int playernum = CHAR_getPlayerMaxNum(); + int player; + int efnum = 0; + + struct { + int floor; + int effect; + BOOL on; + BOOL off; + } ef[2048]; + + + memcpy( &tm1, localtime( (time_t *)&NowTime.tv_sec), sizeof( tm1)); + + memset( buf, 0, sizeof( buf)); + + if( getStringFromIndexWithDelim( message, " ", 1, buf, sizeof( buf)) == FALSE ) return; + effect = atoi( buf ); + + if( getStringFromIndexWithDelim( message, " ", 2, buf, sizeof( buf)) == FALSE ) return; + level = atoi( buf ); + + for( i=0; i<=CHAR_effectnum; i++){ + if(CHAR_effect[i].floor){ + CHAR_effect[i].effect = effect; + CHAR_effect[i].level = level; + CHAR_effect[i].sendflg = FALSE; + snprintf( CHAR_effect[i].month , sizeof( CHAR_effect[i].month) , "%d" , tm1.tm_mon+1); + snprintf( CHAR_effect[i].day , sizeof( CHAR_effect[i].day) , "%d" , tm1.tm_mday); + snprintf( CHAR_effect[i].hour , sizeof( CHAR_effect[i].hour) , "%d" , tm1.tm_hour); + snprintf( CHAR_effect[i].min , sizeof( CHAR_effect[i].min) , "%d" , tm1.tm_min); + snprintf( CHAR_effect[i].expire , sizeof( CHAR_effect[i].expire), "300000" ); + }// if + }// for i + + + memset( &ef, 0, sizeof( ef)); + + for( i = 0; i < CHAR_effectnum; i ++){ + if( !CHAR_effect[i].sendflg) { + for( player = 0 ; player < playernum; player ++ ) { + if( !CHAR_CHECKINDEX( player ) ) continue; + if( CHAR_getInt( player, CHAR_FLOOR) == CHAR_effect[i].floor ) { + int fd = getfdFromCharaIndex( player); + lssproto_EF_send( fd, CHAR_effect[i].effect, CHAR_effect[i].level, ""); + if( CHAR_effect[i].level == 0 ) { + CHAR_setWorkInt( player, CHAR_WORKEFFECT, + CHAR_getWorkInt( player, CHAR_WORKEFFECT) & + ~CHAR_effect[i].effect); + }else { + CHAR_setWorkInt( player, CHAR_WORKEFFECT, + CHAR_getWorkInt( player, CHAR_WORKEFFECT) | + CHAR_effect[i].effect); + } + } + } + CHAR_effect[i].sendflg = TRUE; + } + + for( j = 0; j < efnum; j ++ ) { + if( ef[j].floor == CHAR_effect[i].floor && ef[j].effect == CHAR_effect[i].effect) + { + ef[j].on = TRUE; + break; + } + } + if( j == efnum ) { + ef[j].floor = CHAR_effect[i].floor; + ef[j].effect = CHAR_effect[i].effect; + ef[j].on = TRUE; + efnum++; + if( efnum >= arraysizeof( ef)) { + print( "err buffer over %s:%d\n", __FILE__, __LINE__); + efnum --; + } + } + } + + for( i = 0; i < efnum; i ++ ) { + if( ef[i].on == FALSE && ef[i].off == TRUE ) { + for( player = 0 ; player < playernum; player ++ ) { + if( !CHAR_CHECKINDEX( player ) ) continue; + if( CHAR_getInt( player, CHAR_FLOOR) == ef[i].floor ) { + int fd = getfdFromCharaIndex( player); + lssproto_EF_send( fd, 0, 0, ""); + CHAR_setWorkInt( player, CHAR_WORKEFFECT, 0); + } + } + } + } +} +#endif + +void CHAR_CHAT_DEBUG_checktime( int charaindex, char *message) +{ + time_t newsec; + char buf[256]; + char WKday[7][32]={"日","一","二","叁","四","五","六"}; + struct tm *p; + + + newsec = time( NULL); + p = localtime( &newsec); +// newsec = localtime( &newsec); + sprintf( buf, "今天:%d年%d月%d日 %s %d:%d:%d ...newsec:%ld。", + (1900+p->tm_year), (1+p->tm_mon), p->tm_mday, WKday[p->tm_wday], + p->tm_hour, p->tm_min, p->tm_sec, newsec ); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORRED); + //p = (struct tm *)calloc( 1, sizeof( struct tm) ); + //if( p == NULL ) return; + if( getStringFromIndexWithDelim( message, "/", 1, buf, sizeof( buf)) == FALSE ) return; + print("ANDY 1.buf:%s\n", buf); + p->tm_year = atoi( buf)-1900; + if( getStringFromIndexWithDelim( message, "/", 2, buf, sizeof( buf)) == FALSE ) return; + print("ANDY 2.buf:%s\n", buf); + p->tm_mon = atoi( buf)-1; + if( getStringFromIndexWithDelim( message, "/", 3, buf, sizeof( buf)) == FALSE ) return; + print("ANDY 3.buf:%s\n", buf); + p->tm_mday = atoi( buf); + if( getStringFromIndexWithDelim( message, "/", 4, buf, sizeof( buf)) == FALSE ) return; + p->tm_wday = atoi( buf); + if( p->tm_wday < 0 || p->tm_wday >= 7 ) p->tm_wday = 0; + if( getStringFromIndexWithDelim( message, "/", 5, buf, sizeof( buf)) == FALSE ) return; + p->tm_hour = atoi( buf); + if( getStringFromIndexWithDelim( message, "/", 6, buf, sizeof( buf)) == FALSE ) return; + p->tm_min = atoi( buf); + if( getStringFromIndexWithDelim( message, "/", 7, buf, sizeof( buf)) == FALSE ) return; + p->tm_sec = atoi( buf); + + newsec = mktime( p); + sprintf( buf, "确认1:%d年%d月%d日 %s %d:%d:%d ...newsec:%ld。", + (1900+p->tm_year), (1+p->tm_mon), p->tm_mday, WKday[p->tm_wday], + p->tm_hour, p->tm_min, p->tm_sec, newsec ); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORRED); + + p = localtime( &newsec); + sprintf( buf, "确认2:%d年%d月%d日 %s %d:%d:%d ...newsec:%ld..time:%d。", + (1900+p->tm_year), (1+p->tm_mon), p->tm_mday, WKday[p->tm_wday], + p->tm_hour, p->tm_min, p->tm_sec, newsec, (int)time(NULL)); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORRED); +} + + + +#ifdef _ACTION_GMQUE +void CHAR_CHAT_DEBUG_cleanqute( int charaindex, char *message) +{ + char cdkey[256], name[256]; + int i; + int playernum = CHAR_getPlayerMaxNum(); + + memset( cdkey, 0, sizeof( cdkey) ); + memset( name, 0, sizeof( name) ); + + if( getStringFromIndexWithDelim( message, " ", 1, cdkey, sizeof( cdkey)) == FALSE ) return; + if( getStringFromIndexWithDelim( message, " ", 2, name, sizeof( name)) == FALSE ) return; + + for( i=0; i 0){ + int i,pclass = CHAR_getInt(charaindex,PROFESSION_CLASS) - 1; + for(i=0;i 0 ){ + array = PROFESSION_SKILL_getskillArray( skillid ); + memset(token, 0, sizeof(token)); + sprintf( token, "P%d(%s) ", i+1, PROFESSION_SKILL_getChar(array, PROFESSION_SKILL_NAME) ); + if( strcmp(token, "") != 0) + strcat( msg, token ); + } + } + CHAR_talkToCli( charaindex, -1, msg, CHAR_COLORRED); + } + + + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( charaindex , CHAR_WORKOBJINDEX )); + +} +#endif + +void CHAR_CHAT_DEBUG_samecode( int charaindex, char *message) +{ + char buf1[256], buf2[256]; + char cmd[3][256]={ + "pet", "item", "set" + }; + int type=-1, j, total = 0; + BOOL checkn = FALSE; + int MAXPLAYER = CHAR_getPlayerMaxNum(); + int MAXITEM = ITEM_getITEM_itemnum(); + int MAXPET = CHAR_getPetMaxNum(); + + if( getStringFromIndexWithDelim( message, " ", 1, buf1, sizeof( buf1) ) == FALSE )return; + for( j=0; j<3; j++){ + if( strstr( buf1, cmd[j]) != NULL ){ + type = j; + break; + } + } + if( j >= 3 ){ + CHAR_talkToCli( charaindex, -1, "参数错误!", CHAR_COLORRED); + return; + } + + switch( type){ + case 0: + if( getStringFromIndexWithDelim( message, " ", 2, buf1, sizeof( buf1) ) == TRUE ){ + checkn = TRUE; + } + for( j=MAXPLAYER; j 帐号 分钟"); + CHAR_talkToCli( charindex, -1,buf, CHAR_COLORWHITE); + return; + } + //flg = isstring1or0( token1); + minu = atoi( token1 ); + MAX_USER=getFdnum(); + for(i=0;i--token=%s",token); + if(strcmp(token,cdkey)==0){ + int index = CONNECT_getCharaindex( i ); + //print("\n--find-->cdkey %s",cdkey); + + //CONNECT_set_shutup(i,TRUE); + + // Robin + CHAR_setInt(index,CHAR_SILENT, minu*60); + //CHAR_setInt(index,CHAR_SILENT, (int)NowTime.tv_sec +(minu*60) ); + { + CHAR_setWorkInt( index, CHAR_WORKLOGINTIME, (int)NowTime.tv_sec); + } + //print(" set_silent:%s:%dmin ", cdkey, minu); + + //print("\n= 220 ){ + CHAR_talkToCli( charindex, -1, token, CHAR_COLORYELLOW); + strcpy( token, "可用GM指令:"); + } + strcat( token, buf2); + continue; + }else{ + if( strstr( buf1, buf) != NULL || + strstr( buf2, buf) != NULL ){ + sprintf( token, "GM指令:[%s %s]", buf1, buf2); + CHAR_talkToCli( charindex, -1, token, CHAR_COLORYELLOW); + } + continue; + } + } + if( type == 1 ) + CHAR_talkToCli( charindex, -1, token, CHAR_COLORYELLOW); +} + +#ifdef _GM_IDENTIFY +void CHAR_CHAR_DEBUG_gmidentify( int charaindex, char* message ) +{ + int i; + int MAX_USER=getFdnum(); //玩家数量 + CHAR_setChar(charaindex, CHAR_GMIDENTIFY, message); //设定gm字串 + CHAR_sendCToArroundCharacter(CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX )); //传送给周围的人 + //for(i=0;i= iPlayerNum){ + CHAR_talkToCli(charaindex,-1,"找不到这名玩家",CHAR_COLORYELLOW); + return; + } + CHAR_setInt(i,CHAR_MOMENTUM,id); + sprintf(szMsg,"目前气势值: %d",CHAR_getInt(i,CHAR_MOMENTUM)/100); + CHAR_talkToCli(charaindex,-1,szMsg,CHAR_COLORYELLOW); + sprintf(buf,"%d",id); + fd = getfdFromCharaIndex(i); + saacproto_ACFixFMData_send(acfd, + CHAR_getChar(i,CHAR_FMNAME),CHAR_getInt(i,CHAR_FMINDEX),CHAR_getWorkInt(i,CHAR_WORKFMINDEXI), + FM_FIX_FMMOMENTUM,buf,"",CHAR_getWorkInt(i,CHAR_WORKFMCHARINDEX),CONNECT_getFdid(fd)); + return; +} + +void CHAR_CHAT_DEBUG_set_manor_owner( int charindex, char* message ) +{ + int i,index = -1,iUseFlag; + char szId[8],szUseFlag[2],szFamilyNameOrID[64],szToken[4096],szFamilyIndex[8],szGetFamilyName[64]; + + if(message == NULL || getStringFromIndexWithDelim(message," ",1,szId,sizeof(szId)) == FALSE){ + CHAR_talkToCli(charindex,-1, "参数不正确 [set_manor_owner 庄园id(1~9) 使用旗标(0:名称 1:id) 家族名称或id]", CHAR_COLORRED); + return; + } + if(atoi(szId) < 1 || atoi(szId) > MANORNUM){ + CHAR_talkToCli(charindex,-1, "庄园ID值不正确(1~9)", CHAR_COLORRED); + return; + } + if(getStringFromIndexWithDelim(message," ",2,szUseFlag,sizeof(szUseFlag)) == FALSE){ + CHAR_talkToCli(charindex,-1, "参数不正确 [set_manor_owner 庄园id(1~9) 使用旗标(0:名称 1:id) 家族名称或id]", CHAR_COLORRED); + return; + } + iUseFlag = atoi(szUseFlag); + if(iUseFlag < 0 || iUseFlag > 1){ + CHAR_talkToCli(charindex,-1, "使用旗标值不正确(0:名称 1:id)", CHAR_COLORRED); + return; + } + if(getStringFromIndexWithDelim(message," ",3,szFamilyNameOrID,sizeof(szFamilyNameOrID)) == FALSE){ + CHAR_talkToCli(charindex,-1, "参数不正确 [set_manor_owner 庄园id(1~9) 使用旗标(0:名称 1:id) 家族名称或id]", CHAR_COLORRED); + return; + } + if(iUseFlag == 1){ + // 检查是否都是数字 + for(i=0;i '9' || szFamilyNameOrID < '0'){ + CHAR_talkToCli(charindex,-1, "家族id格式错误", CHAR_COLORRED); + return; + } + } + for(i=0;;i++){ + if(getStringFromIndexWithDelim(familyListBuf,"|",i,szToken,sizeof(szToken))){ + if((getStringFromIndexWithDelim(szToken," ",1,szFamilyIndex,sizeof(szFamilyIndex))) && + (getStringFromIndexWithDelim(szToken," ",2,szGetFamilyName,sizeof(szGetFamilyName)))){ + if(strcmp(szFamilyNameOrID,szFamilyIndex) == 0){ + index = atoi(szFamilyIndex) - 1; + break; + } + } + } + else break; + } + if(index == -1){ + CHAR_talkToCli(charindex,-1,"找不到此家族资料", CHAR_COLORRED); + return; + } + sprintf(szToken,"庄园 %s 设定给 %s 家族",szId,szGetFamilyName); + saacproto_ACFixFMPoint_send(acfd,szGetFamilyName,index+1,index,szGetFamilyName,index+1,index,atoi(szId)); + } + else{ + for(i=0;;i++){ + if(getStringFromIndexWithDelim(familyListBuf,"|",i,szToken,sizeof(szToken))){ + if((getStringFromIndexWithDelim(szToken," ",1,szFamilyIndex,sizeof(szFamilyIndex))) && + (getStringFromIndexWithDelim(szToken," ",2,szGetFamilyName,sizeof(szGetFamilyName)))){ + if(strcmp(szFamilyNameOrID,szGetFamilyName) == 0){ + index = atoi(szFamilyIndex) - 1; + break; + } + } + } + else break; + } + + if(index == -1){ + CHAR_talkToCli(charindex,-1,"找不到此家族资料", CHAR_COLORRED); + return; + } + sprintf(szToken,"庄园 %s 设定给 %s 家族",szId,szFamilyNameOrID); + saacproto_ACFixFMPoint_send(acfd,szFamilyNameOrID,index+1,index,szFamilyNameOrID,index+1,index,atoi(szId)); + } + CHAR_talkToCli(charindex,-1,szToken,CHAR_COLORRED); +} + +void CHAR_CHAT_DEBUG_set_schedule_time( int charindex, char* message ) +{ + struct tm tm1; + int i,char_max = CHAR_getCharNum(); + char szId[8],szTime[12],szMsg[128]; + + if(message == NULL || getStringFromIndexWithDelim(message," ",1,szId,sizeof(szId)) == FALSE){ + CHAR_talkToCli(charindex,-1, "参数不正确 [set_schedule_time 庄园id(1~9) 时间(分)]", CHAR_COLORRED); + return; + } + if(atoi(szId) < 1 || atoi(szId) > MANORNUM){ + CHAR_talkToCli(charindex,-1, "庄园ID值不正确", CHAR_COLORRED); + return; + } + if(getStringFromIndexWithDelim(message," ",2,szTime,sizeof(szTime)) == FALSE){ + CHAR_talkToCli(charindex,-1, "参数不正确 [set_schedule_time 庄园id(1~9) 时间(分)]", CHAR_COLORRED); + return; + } + for(i=0;i=MAXMISSIONTABLE) { + CHAR_talkToCli( charindex, -1, "编号不正确", CHAR_COLORYELLOW); + return; + } + if( missiontable[mindex].flag == MISSION_NONE ) { + CHAR_talkToCli( charindex, -1, "无此资料", CHAR_COLORYELLOW); + return; + } + + saacproto_ACMissionTable_send( acfd, mindex, 3, "", ""); + + sprintf( msg, " GM指令 清除任务资料 i:%d 使者:%s 勇者:%s m:%d flg:%d time:%d lt:%d ", + mindex, missiontable[mindex].angelinfo, missiontable[mindex].heroinfo, + missiontable[mindex].mission, missiontable[mindex].flag, + missiontable[mindex].time, missiontable[mindex].limittime ); + CHAR_talkToCli( charindex, -1, msg, CHAR_COLORYELLOW); + LogAngel( msg); +} + +void CHAR_CHAT_DEBUG_angelcreate(int charindex ,char *message) // 制造使者与勇者配对 +{ + char angelid[256], heroid[256], msg[1024], buf[256]; + int i, clean =FALSE; + int MAXCHARA=0; + int angelindex =-1, heroindex =-1, mission =-1; + + if( getStringFromIndexWithDelim( message, " ", 1, angelid, sizeof(angelid) ) == FALSE ){ + CHAR_talkToCli( charindex, -1, "参数不正确 [angelcreate 使者帐号 勇者帐号 任务编号]", CHAR_COLORRED); + return; + } + if( getStringFromIndexWithDelim( message, " ", 2, heroid, sizeof(heroid) ) == FALSE ){ + CHAR_talkToCli( charindex, -1, "参数不正确 [angelcreate 使者帐号 勇者帐号 任务编号]", CHAR_COLORRED); + return; + } + if( getStringFromIndexWithDelim( message, " ", 3, buf, sizeof(buf) ) == FALSE ){ + CHAR_talkToCli( charindex, -1, "参数不正确 [angelcreate 使者帐号 勇者帐号 任务编号]", CHAR_COLORRED); + return; + } + mission = atoi( buf); + //if( mission <= 0 || mission >= MAXMISSION || missionlist[mission].id <= 0) { + if( mission >= MAXMISSION ) { + CHAR_talkToCli( charindex, -1, "任务编号不正确", CHAR_COLORRED); + return; + } + + MAXCHARA = CHAR_getPlayerMaxNum(); + for( i=0; i= Playernum ){ + sprintf(buf,"%s\n","失败!查无此帐号。"); + CHAR_talkToCli(charaindex, -1, buf, CHAR_COLORRED); + }else{ + if(!CHAR_getInt( i , CHAR_FMTIMELIMIT )){ + sprintf(buf,"%s\n","设定完成。"); + CHAR_talkToCli(charaindex, -1, buf, CHAR_COLORYELLOW); + } + } +} +#endif + +#ifdef _DEF_GETYOU +void CHAR_CHAT_DEBUG_getyou(int charaindex,char *message) +{ + int floor,x,y,i,j,fd,area; + char cdkey[CDKEYLEN],areabuf[5]; + char szName[256],buf[256]; + OBJECT object; + char line[256]; + int o,chara_index; + int getnum = 0; + + getStringFromIndexWithDelim( message, " ", 1, areabuf , sizeof( areabuf )); + area = atoi(areabuf); + if( area <= 0 || area > 3 ){ + sprintf(buf,"%s","没有输入 围或 围超出限制,请输入1~3"); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + return; + } + floor=CHAR_getInt( charaindex, CHAR_FLOOR ); + x=CHAR_getInt( charaindex, CHAR_X ); + y=CHAR_getInt( charaindex, CHAR_Y ); + for(i=y-area;i<=y+area;i++){ + for(j=x-area;j<=x+area;j++){ + for( object = MAP_getTopObj(floor,j,i) ; object ;object = NEXT_OBJECT(object ) ){ + o = GET_OBJINDEX(object); + if( OBJECT_getType(o) == OBJTYPE_CHARA ){ + chara_index=OBJECT_getIndex(o); + if( CHAR_getInt( chara_index, CHAR_WHICHTYPE) != CHAR_TYPEPLAYER ) continue; + if( chara_index == charaindex ) continue; //找到自己了 + if( ( fd = getfdFromCharaIndex(chara_index) ) != -1 ){ + getnum++; + CONNECT_getCharname( fd, szName, sizeof( szName ) ); //人物名称 + CONNECT_getCdkey( fd, cdkey, sizeof( cdkey )); //帐号 + //CHAR_getChar( chara_index, CHAR_NAME); + snprintf( line, sizeof( line), "第%d个找到[%s]的帐号是[%s]",getnum,szName,cdkey); + CHAR_talkToCli( charaindex, -1,line, CHAR_COLORRED); + print("第%d个找到[%s]的帐号是[%s]\n",getnum,szName,cdkey); + } + } + } + } + } + if(!getnum) CHAR_talkToCli( charaindex, -1, " 围内没有人", CHAR_COLORYELLOW); +} +#endif + +#ifdef _DEF_NEWSEND +void CHAR_CHAT_DEBUG_newsend(int charindex ,char *message) +{ + char buf[256]; + char token[100]; + char szName[256]; + char cdkey[CDKEYLEN]; + char line[256]; + char say[128]; + int fl,x,y,i; + unsigned int MAX_USER=0; + MAX_USER=getFdnum(); + if( strlen(message)==0){ + sprintf(buf,"%s","参数不正确-> FLOOR X Y 无/要说的话"); + CHAR_talkToCli( charindex, -1,buf, CHAR_COLORWHITE); + return; + } + easyGetTokenFromString( message , 1 , token, sizeof(token)); + if( strlen(token)==0){ + sprintf(buf,"%s","参数不正确-->地图编号"); + CHAR_talkToCli( charindex, -1,buf, CHAR_COLORWHITE); + return; + } + fl=atoi( token ); + easyGetTokenFromString( message , 2 , token, sizeof(token)); + if( strlen(token)==0){ + sprintf(buf,"%s","参数不正确-->X座标 "); + CHAR_talkToCli( charindex, -1,buf, CHAR_COLORWHITE); + return; + } + x = atoi( token ); + easyGetTokenFromString( message , 3 , token, sizeof(token)); + if( strlen(token)==0){ + sprintf(buf,"%s","参数不正确-->Y座标 "); + CHAR_talkToCli( charindex, -1,buf, CHAR_COLORWHITE); + return; + } + y = atoi( token ); + easyGetTokenFromString( message , 4 , token, sizeof(token)); + if( strlen(token)==0){ + sprintf(buf,"%s","参数不正确-->帐号"); + CHAR_talkToCli( charindex, -1,buf, CHAR_COLORWHITE); + return; + } + easyGetTokenFromString( message , 5 , say , sizeof(say)); + + for(i=0;i FLOOR X Y 帐号 格数 无/要说的话"); + CHAR_talkToCli( charaindex, -1,buf, CHAR_COLORWHITE); + return; + } + easyGetTokenFromString( message , 1 , token, sizeof(token)); + if( strlen(token)==0){ + sprintf(buf,"%s","参数不正确-->地图编号"); + CHAR_talkToCli( charaindex, -1,buf, CHAR_COLORWHITE); + return; + } + tofl=atoi( token ); + easyGetTokenFromString( message , 2 , token, sizeof(token)); + if( strlen(token)==0){ + sprintf(buf,"%s","参数不正确-->X座标 "); + CHAR_talkToCli( charaindex, -1,buf, CHAR_COLORWHITE); + return; + } + toX = atoi( token ); + easyGetTokenFromString( message , 3 , token, sizeof(token)); + if( strlen(token)==0){ + sprintf(buf,"%s","参数不正确-->Y座标 "); + CHAR_talkToCli( charaindex, -1,buf, CHAR_COLORWHITE); + return; + } + toY = atoi( token ); + easyGetTokenFromString( message , 4 , cdkeytoken , sizeof(cdkeytoken)); + if( strlen(cdkeytoken)==0){ + sprintf(buf,"%s","参数不正确-->帐号"); + CHAR_talkToCli( charaindex, -1,buf, CHAR_COLORWHITE); + return; + } + easyGetTokenFromString( message , 5 , token, sizeof(token)); + area = atoi( token ); + if( strlen(token)==0 || area <= 0 || area > 3 ){ + sprintf(buf,"%s","参数不正确-->格数(1~3)"); + CHAR_talkToCli( charaindex, -1,buf, CHAR_COLORWHITE); + return; + } + easyGetTokenFromString( message , 6 , say , sizeof(say)); //说话 + + MAX_USER=getFdnum(); + for(k=0;k0){ + for(i=0;i=playernum) + { + CHAR_talkToCli( charaindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + CHAR_setWorkInt( i, CHAR_WORKFONTSIZE, atoi( fsize )); + //CHAR_send_P_StatusString( charaindex , CHAR_P_STRING_LV); + sprintf( token, "[GM]%把你的字体设置为%d!", CHAR_getChar( charaindex, CHAR_NAME),(int)atoi(fsize)); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "玩家%s的字体设置为%d!", CHAR_getChar( i, CHAR_NAME),(int)atoi(fsize)); + CHAR_talkToCli( charaindex, -1,token, CHAR_COLORYELLOW ); + }else{ + CHAR_setWorkInt( charaindex, CHAR_WORKFONTSIZE, atoi( fsize )); + sprintf( token, "字体设置为%d!",(int)atoi(fsize)); + CHAR_talkToCli( charaindex, -1,token, CHAR_COLORYELLOW ); + } +} +#endif + +#ifdef _JOBDAILY +void CHAR_CHAT_DEBUG_rejobdaily(int charaindex ,char *message) +{ + print("Reading Jobdaily File..."); + CHAR_talkToCli( charaindex, -1, "重新读取任务日志列表...", CHAR_COLORYELLOW); + if(!LoadJobdailyfile()){ + CHAR_talkToCli( charaindex, -1, "读取失败", CHAR_COLORYELLOW); + print("fail!!\n"); + return; + } + print("done\n"); + CHAR_talkToCli( charaindex, -1, "读取完成", CHAR_COLORYELLOW); +} +#endif + +#ifdef _RACEMAN +extern int asktotal; + +void CHAR_CHAT_DEBUG_changeask(int charaindex, char *message) +{ + char cdkey[64] , free[64] , buf[256] , item[64]; + int i ,toindex=0, Playernum = CHAR_getPlayerMaxNum(); + int itemindex,itemid; + unsigned int askno,asklv,temp; + int petNo,intNo,shift,base; + + easyGetTokenFromString( message , 1 , cdkey , sizeof(cdkey)); + if( strlen(cdkey)==0){ + sprintf(buf,"%s","没有帐号。正确格式:[changeask 帐号 人物名称 宠证id 0/1]"); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + return; + } + easyGetTokenFromString( message , 2 , item, sizeof(item)); + if( strlen(item)==0){ + sprintf(buf,"%s","没有宠证id。正确格式:[changeask 帐号 宠证id 0/1]"); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + return; + } + easyGetTokenFromString( message , 3 , free , sizeof(free)); + if( strlen(free)==0 ){ + sprintf(buf,"%s","最後的参数错误。正确格式:[changeask 帐号 宠证id 0/1]"); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + return; + } + + + for( i=0;i=Playernum){ + sprintf(buf,"%s","找不到这个人,请确认帐号"); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + return; + } + //找道具 + for( i = 0 ; i < CHAR_MAXITEMHAVE ; i++ ) { + itemindex=CHAR_getItemIndex( toindex , i ); + if( ITEM_CHECKINDEX( itemindex) ) { + itemid=ITEM_getInt( itemindex ,ITEM_ID ); + if(itemid==atoi(item)){ //找到猎宠证 + if(atoi(free)==1){ + //设定解过 + petNo = ( CHAR_getInt( toindex , CHAR_CHECKIN ) & 0x7FC00000 ) >> 22 ; + intNo = petNo / 32 ; + shift = petNo % 32 ; + base = 1 << shift; + CHAR_setInt( toindex , CHAR_KINDCNT1 + intNo , CHAR_getInt( toindex , CHAR_KINDCNT1 + intNo ) | base ); + CHAR_setInt( toindex,CHAR_CATCHCNT5,CHAR_getInt( toindex,CHAR_CATCHCNT5 ) +1 ); + } + //给下一题 + if(CHAR_getInt( toindex,CHAR_CATCHCNT5 ) >= asktotal ){ + sprintf( buf,"恭喜你达到猎宠大赛终极目标,祝您抽中大奖"); + }else{ + askno = Raceman_getokask( toindex , rand() % asktotal ); + asklv = asktable[askno].lowlv + rand()%((asktable[askno].highlv+1)-asktable[askno].lowlv); + temp = (askno << 22) & 0x7FC00000; + temp = temp | ((asklv << 14) & 0x003FC000); + temp = temp | ((asktable[askno].bbi - 100000) & 0x00003FFF); + CHAR_setInt( toindex , CHAR_CHECKIN , temp ); + if( asktable[askno].highlv == 0 ) + sprintf( buf,"请抓给我等级%d『以上』的%s好吗。您目前记录%d种", asktable[askno].lowlv , asktable[askno].petname, CHAR_getInt( toindex,CHAR_CATCHCNT5 ) ); + else + sprintf( buf,"请抓给我『只能』等级%d的%s好吗。您目前记录%d种", asklv , asktable[askno].petname, CHAR_getInt( toindex,CHAR_CATCHCNT5 ) ); + } + ITEM_setChar( itemindex, ITEM_EFFECTSTRING, buf); + CHAR_sendItemDataOne( toindex , i ); + break; + } + } + } + if( i >= CHAR_MAXITEMHAVE ){ + sprintf(buf,"%s","找不到猎宠证!"); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + return; + }else{ + sprintf(buf,"%s","设定完成"); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + } +} +#endif + +#ifdef _CREATE_MM_1_2 +void CHAR_CHAT_DEBUG_MM( int charaindex , char *message ) +{ + int ret; + int enemynum; + int enemyid; + int index; + int i,j; + int work[4]={50,50,50,50}; + int LevelUpPoint; + char buf[10]; + char cdkey[CDKEYLEN]; + char token[128]; + int playernum = CHAR_getPlayerMaxNum(); + easyGetTokenFromString( message , 1 , buf, sizeof(buf)); + index=atoi(buf); + easyGetTokenFromString( message , 2 , cdkey, sizeof(cdkey)); + if(index==1)enemyid=1479; + else if(index==2)enemyid=2547; + else{ + CHAR_talkToCli( charaindex, -1, "目前只能制作1/2代玛蕾菲雅!", CHAR_COLORYELLOW ); + return;} + + if(strlen(cdkey)>0){ + for(j=0;j=playernum) + { + CHAR_talkToCli( charaindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + enemynum = ENEMY_getEnemyNum(); + for( i = 0; i < enemynum; i ++ ) { + if( ENEMY_getInt( i, ENEMY_ID) == enemyid) { + break; + } + } + if( i == enemynum )return; + + ret = ENEMY_createPetFromEnemyIndex( j, i); + if( !CHAR_CHECKINDEX( ret))return; + snprintf( token,sizeof( token), "制作极品%d代玛蕾菲雅成功\!index[%d]",index,ret); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORWHITE); + sprintf( token, "[GM]%s制作了只极品%d代玛蕾菲雅给你!index[%d]", CHAR_getChar( charaindex, CHAR_NAME),index,ret); + CHAR_talkToCli( j, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "给玩家%s制作了只极品%d代玛蕾菲雅!index[%d]", CHAR_getChar( j, CHAR_NAME),index,ret); + CHAR_talkToCli( charaindex, -1,token, CHAR_COLORYELLOW ); + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ){ + if( CHAR_getCharPet( j, i ) == ret )break; + } + if( i == CHAR_MAXPETHAVE )i = 0; + + if( CHAR_CHECKINDEX( ret ) == TRUE ){ + CHAR_setMaxExpFromLevel( ret, CHAR_getInt( ret, CHAR_LV )); + } + int k; + LevelUpPoint = ( work[3]<< 24) + ( work[0]<< 16) + ( work[1]<< 8) + ( work[2]<< 0); + CHAR_setInt( ret, CHAR_ALLOCPOINT, LevelUpPoint); + for( k = 1; k < 79; k ++ ){ //升级 + if(k%5==0){ + LevelUpPoint = ( work[3]<< 24) + ( work[0]<< 16) + ( work[1]<< 8) + ( work[2]<< 0); + CHAR_setInt( ret, CHAR_ALLOCPOINT, LevelUpPoint); + } + CHAR_PetLevelUp( ret ); + CHAR_PetAddVariableAi( ret, AI_FIX_PETLEVELUP ); + CHAR_setInt( ret, CHAR_LV, CHAR_getInt( ret, CHAR_LV) +1 ); + } + + snprintf( token, sizeof( token ), "K%d", i ); + CHAR_sendStatusString( j, token ); + snprintf( token, sizeof( token ), "W%d", i ); + CHAR_sendStatusString( j, token ); + }else{ + enemynum = ENEMY_getEnemyNum(); + for( i = 0; i < enemynum; i ++ ) { + if( ENEMY_getInt( i, ENEMY_ID) == enemyid) { + break; + } + } + if( i == enemynum )return; + + ret = ENEMY_createPetFromEnemyIndex(charaindex, i); + if( !CHAR_CHECKINDEX( ret))return; + snprintf( token,sizeof( token), "制作极品%d代玛蕾菲雅成功\!index[%d]",index,ret); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORWHITE); + + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ){ + if( CHAR_getCharPet( charaindex, i ) == ret )break; + } + if( i == CHAR_MAXPETHAVE )i = 0; + + if( CHAR_CHECKINDEX( ret ) == TRUE ){ + CHAR_setMaxExpFromLevel( ret, CHAR_getInt( ret, CHAR_LV )); + } + int k; + LevelUpPoint = ( work[3]<< 24) + ( work[0]<< 16) + ( work[1]<< 8) + ( work[2]<< 0); + CHAR_setInt( ret, CHAR_ALLOCPOINT, LevelUpPoint); + for( k = 1; k < 79; k ++ ){ //升级 + if(k%5==0){ + LevelUpPoint = ( work[3]<< 24) + ( work[0]<< 16) + ( work[1]<< 8) + ( work[2]<< 0); + CHAR_setInt( ret, CHAR_ALLOCPOINT, LevelUpPoint); + } + CHAR_PetLevelUp( ret ); + CHAR_PetAddVariableAi( ret, AI_FIX_PETLEVELUP ); + CHAR_setInt( ret, CHAR_LV, CHAR_getInt( ret, CHAR_LV) +1 ); + } + + snprintf( token, sizeof( token ), "K%d", i ); + CHAR_sendStatusString( charaindex, token ); + snprintf( token, sizeof( token ), "W%d", i ); + CHAR_sendStatusString( charaindex, token ); + } +} +#endif + +#ifdef _SendTo +void CHAR_CHAT_DEBUG_Sendto( int charaindex , char *message ) +{ + char cdkey[CDKEYLEN]; + char token[128]; + int i; + int playernum = CHAR_getPlayerMaxNum(); + easyGetTokenFromString( message , 1 , cdkey, sizeof(cdkey)); + if(strlen(cdkey)>0){ + for(i=0;i=playernum) + { + CHAR_talkToCli( charaindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + if(!strcmp(CHAR_getChar(charaindex,CHAR_CDKEY),cdkey)) + { + CHAR_DischargePartyNoMsg( charaindex);//解散团队 + int floor, x, y; + char token[256]; + floor = CHAR_getInt( i, CHAR_FLOOR); + x = CHAR_getInt( i, CHAR_X); + y = CHAR_getInt( i, CHAR_Y); + + CHAR_warpToSpecificPoint( charaindex, floor, x, y ); + sprintf( token, "已传送到玩家%s身边!", CHAR_getChar( i, CHAR_NAME)); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW ); + return; + } + } +} +#endif + +#ifdef _GM_ITEM +void CHAR_CHAT_DEBUG_GMFUNCTION( int charindex , char *message ) +{ + int i; + char gmtime[4]; + char gmfunction[16]; + char cdkey[CDKEYLEN]; + char token[128]; + int playernum = CHAR_getPlayerMaxNum(); + easyGetTokenFromString( message , 1 , gmfunction, sizeof(gmfunction)); + easyGetTokenFromString( message , 2 , gmtime, sizeof(gmtime)); + easyGetTokenFromString( message , 3 , cdkey, sizeof(cdkey)); + if(strlen(cdkey)>0){ + for(i=0;i=playernum) + { + CHAR_talkToCli( charindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + CHAR_setChar( i , CHAR_GMFUNCTION, gmfunction ); + CHAR_setInt( i , CHAR_GMTIME, atoi( gmtime ) ); + sprintf( token, "[GM]%s给你使用%s权限%d次!",CHAR_getChar( charindex, CHAR_NAME), gmfunction, atoi( gmtime )); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "相关使用请查看[help %s]无需GM密码!",CHAR_getChar( charindex, CHAR_GMFUNCTION), gmfunction); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "给玩家%s使用%s权限%d次!", CHAR_getChar( i, CHAR_NAME), gmfunction, atoi( gmtime )); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + }else{ + CHAR_setChar( charindex , CHAR_GMFUNCTION, gmfunction ); + CHAR_setInt( charindex , CHAR_GMTIME, atoi( gmtime ) ); + sprintf( token, "设置使用%s权限%d次!", gmfunction,atoi( gmtime ), gmfunction); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + } +} +#endif + +#ifdef _GM_RIDE +void CHAR_CHAT_DEBUG_SETRIDE( int charindex , char *message ) +{ + int i,rideindex; + char buf[16]; + char cdkey[CDKEYLEN]; + char token[128]; + int playernum = CHAR_getPlayerMaxNum(); + easyGetTokenFromString( message , 1 , buf, sizeof(buf)); + rideindex=atoi(buf); + easyGetTokenFromString( message , 2 , cdkey, sizeof(cdkey)); + if(rideindex<1 || rideindex>12) + { + CHAR_talkToCli( charindex, -1,"骑宠编号必须为1~12", CHAR_COLORRED ); + return; + } + typedef struct{ + char name[16]; + int Code; + }tagNewRideCode; + tagNewRideCode NewRides[12]={ + { "帖拉所伊朵", RIDE_PET0}, + { "玛恩摩洛斯", RIDE_PET1}, + { "朵拉比斯", RIDE_PET2}, + { "拉奇鲁哥", RIDE_PET3}, + { "扬奇洛斯", RIDE_PET4}, + { "卡达鲁卡斯", RIDE_PET5}, + { "卡卡金宝", RIDE_PET6}, + { "格尔格", RIDE_PET7}, + { "左迪洛斯", RIDE_PET8}, + { "巴朵兰恩", RIDE_PET9}, + { "史卡鲁", RIDE_PET10}, + { "罗多克雷", RIDE_PET11} + }; + if(strlen(cdkey)>0){ + for(i=0;i=playernum) + { + CHAR_talkToCli( charindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + int LRCode = CHAR_getInt( i, CHAR_LOWRIDEPETS); + + LRCode = LRCode|NewRides[rideindex-1].Code; + CHAR_setInt( i, CHAR_LOWRIDEPETS, LRCode); + + sprintf( token, "[GM]%s给你骑乘骑宠%s的资格!",CHAR_getChar( charindex, CHAR_NAME), NewRides[rideindex-1].name); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "给玩家骑乘骑宠%s的资格!", CHAR_getChar( i, CHAR_NAME), NewRides[rideindex-1].name); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + }else{ + int LRCode = CHAR_getInt( charindex, CHAR_LOWRIDEPETS); + LRCode = LRCode|NewRides[rideindex-1].Code; + CHAR_setInt( charindex, CHAR_LOWRIDEPETS, LRCode); + + sprintf( token, "设置骑乘骑宠%s的资格!", NewRides[rideindex-1].name); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + } + CHAR_sendStatusString( charindex, "x"); +} + +void CHAR_CHAT_DEBUG_MVRIDE( int charindex , char *message ) +{ + int i,rideindex; + char buf[16]; + char cdkey[CDKEYLEN]; + char token[128]; + int playernum = CHAR_getPlayerMaxNum(); + easyGetTokenFromString( message , 1 , buf, sizeof(buf)); + rideindex=atoi(buf); + easyGetTokenFromString( message , 2 , cdkey, sizeof(cdkey)); + if(rideindex<1 || rideindex>12) + { + CHAR_talkToCli( charindex, -1,"骑宠编号必须为1~12", CHAR_COLORRED ); + return; + } + typedef struct{ + char name[16]; + int Code; + }tagNewRideCode; + tagNewRideCode NewRides[12]={ + { "帖拉所伊朵", RIDE_PET0}, + { "玛恩摩洛斯", RIDE_PET1}, + { "朵拉比斯", RIDE_PET2}, + { "拉奇鲁哥", RIDE_PET3}, + { "扬奇洛斯", RIDE_PET4}, + { "卡达鲁卡斯", RIDE_PET5}, + { "卡卡金宝", RIDE_PET6}, + { "格尔格", RIDE_PET7}, + { "左迪洛斯", RIDE_PET8}, + { "巴朵兰恩", RIDE_PET9}, + { "史卡鲁", RIDE_PET10}, + { "罗多克雷", RIDE_PET11} + }; + if(strlen(cdkey)>0){ + for(i=0;i=playernum) + { + CHAR_talkToCli( charindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + int LRCode = CHAR_getInt( i, CHAR_LOWRIDEPETS); + + LRCode = LRCode^NewRides[rideindex-1].Code; + CHAR_setInt( i, CHAR_LOWRIDEPETS, LRCode); + + sprintf( token, "[GM]%移除你骑乘骑宠%s的资格!",CHAR_getChar( charindex, CHAR_NAME), NewRides[rideindex-1].name); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "移除玩家骑乘骑宠%s的资格!!", CHAR_getChar( i, CHAR_NAME), NewRides[rideindex-1].name); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + }else{ + int LRCode = CHAR_getInt( charindex, CHAR_LOWRIDEPETS); + LRCode = LRCode^NewRides[rideindex-1].Code; + CHAR_setInt( charindex, CHAR_LOWRIDEPETS, LRCode); + + sprintf( token, "移除骑乘骑宠%s的资格!", NewRides[rideindex-1].name); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + } + CHAR_sendStatusString( charindex, "x"); +} +#endif + +#ifdef _LOCK_IP +void CHAR_CHAT_DEBUG_LOCK_IP( int charindex , char *message ) +{ + char buf[4]; + int a,b,c,d,locktime; + char token[128]; + getStringFromIndexWithDelim(message,".", 1, buf, sizeof(buf)); + a=atoi(buf); + getStringFromIndexWithDelim(message,".", 2, buf, sizeof(buf)); + b=atoi(buf); + getStringFromIndexWithDelim(message,".", 3, buf, sizeof(buf)); + c=atoi(buf); + getStringFromIndexWithDelim(message,".", 4, buf, sizeof(buf)); + d=atoi(buf); + getStringFromIndexWithDelim(message," ", 2, buf, sizeof(buf)); + locktime=atoi(buf); + if(setLockip(a,b,c,d,locktime)){ + sprintf( token, "添加锁定IP %d.%d.%d.%d 登陆%d 成功!", a,b,c,d,locktime); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + if(!saveLockip()) + CHAR_talkToCli( charindex, -1,"写入文件失败", CHAR_COLORYELLOW ); + }else{ + sprintf( token, "添加锁定IP %d.%d.%d.%d 登陆%d 失败!", a,b,c,d,locktime); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + CHAR_talkToCli( charindex, -1,"最大锁定100个IP", CHAR_COLORYELLOW ); + } +} + +void CHAR_CHAT_DEBUG_DISPLAY_LOCK_IP( int charindex , char *message ) +{ + int i; + char token[64]; + for(i=0;i +#include +#include +#include +#include +#include +#include +#include "common.h" +#include "char.h" +#include "util.h" +#include "buf.h" +#include "npcutil.h" +#include "char_base.h" +#include "object.h" +#include "char_data.h" +#include "handletime.h" +#include "chatmagic.h" +#include "configfile.h" +#include "readmap.h" +#include "map_deal.h" +#include "lssproto_serv.h" +#include "log.h" +#include "battle.h" +#include "pet.h" +#include "enemy.h" +#include "encount.h" +#include "magic_base.h" +#include "magic.h" +#include "pet_skill.h" +#include "pet_event.h" +#include "item_gen.h" +#include "mclient.h" +#include "npc_eventaction.h" +#include "map_warppoint.h" +#include "npc_manorsman.h" +#include "net.h" +#include "saacproto_cli.h" +#include "npc_scheduleman.h" +#include "trade.h" +#include "npccreate.h" +#ifdef _DEATH_CONTEND +#include "deathcontend.h" +#endif + +#ifdef _CHAR_PROFESSION // WON ADD 人物职业 +#include "profession_skill.h" +#endif +#include "char_talk.h" + +// WON ADD 修正族长问题 +#include "family.h" + +#include "petmail.h" + +#ifdef _WON_TEST // WON TEST +#include "unpipc.h" +#endif + +// WON ADD 重新读取ITEMSET.TXT +#include "item.h" +#include "npc_raceman.h" + + +extern tagRidePetTable ridePetTable[146]; +extern int *pWorkAttackPower; +extern time_t initTime; +int *pWorkAttackPower = NULL; + +struct GMINFO gminfo[GMMAXNUM]; + +#define LSGENWORKINGBUFFER 65536*4 + +void CHAR_CHAT_DEBUG_warp( int charindex , char *message ) +{ + char token[100]; + int fl,x,y; + easyGetTokenFromString( message , 1 , token, sizeof(token)); + fl = atoi( token ); + easyGetTokenFromString( message , 2 , token , sizeof(token)); + x = atoi( token ); + easyGetTokenFromString( message , 3 , token , sizeof(token)); + y = atoi( token ); + + CHAR_warpToSpecificPoint(charindex, fl, x, y); + +} + + +void CHAR_CHAT_DEBUG_hp( int charindex , char *message ) +{ + CHAR_setInt( charindex , CHAR_HP,atoi( message ) ); + CHAR_complianceParameter( charindex ); + CHAR_send_P_StatusString( charindex , CHAR_P_STRING_HP); +} +void CHAR_CHAT_DEBUG_setmp( int charindex , char *message ) +{ + int i; + char setmp[15]; + char cdkey[CDKEYLEN]; + char token[255]; + int playernum = CHAR_getPlayerMaxNum(); + easyGetTokenFromString( message , 1 , setmp, sizeof(setmp)); + easyGetTokenFromString( message , 2 , cdkey, sizeof(cdkey)); + if(strlen(cdkey)>0){ + for(i=0;i=playernum) + { + CHAR_talkToCli( charindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + CHAR_setInt( i , CHAR_MAXMP, atoi( setmp ) ); + CHAR_setInt( i , CHAR_MP, atoi( setmp ) ); + CHAR_complianceParameter( i ); + CHAR_send_P_StatusString( i , CHAR_P_STRING_MP); + sprintf( token, "[GM]%s把你的MP设置为%d!", CHAR_getChar( charindex, CHAR_NAME),(int)atoi(setmp)/100); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "玩家%s的MP的设置为%d!", CHAR_getChar( i, CHAR_NAME),(int)atoi(setmp)/100); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + }else{ + CHAR_setInt( charindex , CHAR_MAXMP, atoi( setmp ) ); + CHAR_setInt( charindex , CHAR_MP, atoi( setmp ) ); + CHAR_complianceParameter( charindex ); + CHAR_send_P_StatusString( charindex , CHAR_P_STRING_MP); + sprintf( token, "MP设置为%d!",(int)atoi(setmp)/100); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + } +} + +void CHAR_CHAT_DEBUG_mp( int charindex , char *message ) +{ + int Mymp; + CHAR_setInt( charindex , CHAR_MP, atoi( message ) ); + Mymp = CHAR_getWorkInt( charindex , CHAR_WORKMAXMP); + if( Mymp > CHAR_getWorkInt( charindex , CHAR_WORKMAXMP) ) + CHAR_setInt( charindex , CHAR_MP, CHAR_getWorkInt( charindex , CHAR_WORKMAXMP)); + + CHAR_complianceParameter( charindex ); + //CHAR_sendStatusString( charindex , "P"); + CHAR_send_P_StatusString( charindex , CHAR_P_STRING_MP); + +} + +void CHAR_CHAT_DEBUG_str( int charindex , char *message ) +{ + int i; + char str[15]; + char cdkey[CDKEYLEN]; + char token[255]; + int playernum = CHAR_getPlayerMaxNum(); + easyGetTokenFromString( message , 1 , str, sizeof(str)); + easyGetTokenFromString( message , 2 , cdkey, sizeof(cdkey)); + if(strlen(cdkey)>0){ + for(i=0;i=playernum) + { + CHAR_talkToCli( charindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + CHAR_setInt( i , CHAR_STR,atoi( str ) ); + CHAR_complianceParameter( i ); + //CHAR_sendStatusString( charindex , "P"); + CHAR_send_P_StatusString( i ,CHAR_P_STRING_STR|CHAR_P_STRING_MAXHP|CHAR_P_STRING_ATK); + sprintf( token, "[GM]%s把你的腕力设置为%d!", CHAR_getChar( charindex, CHAR_NAME),(int)atoi(str)/100); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "玩家%s的腕力设置为%d!", CHAR_getChar( i, CHAR_NAME),(int)atoi(str)/100); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + }else{ + CHAR_setInt( charindex , CHAR_STR,atoi( str ) ); + CHAR_complianceParameter( charindex ); + //CHAR_sendStatusString( charindex , "P"); + CHAR_send_P_StatusString( charindex ,CHAR_P_STRING_STR|CHAR_P_STRING_MAXHP|CHAR_P_STRING_ATK); + sprintf( token, "腕力设置为%d!",(int)atoi(str)/100); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + } +} + +void CHAR_CHAT_DEBUG_tgh( int charindex , char *message ) +{ + int i; + char tgh[15]; + char cdkey[CDKEYLEN]; + char token[255]; + int playernum = CHAR_getPlayerMaxNum(); + easyGetTokenFromString( message , 1 , tgh, sizeof(tgh)); + easyGetTokenFromString( message , 2 , cdkey, sizeof(cdkey)); + if(strlen(cdkey)>0){ + for(i=0;i=playernum) + { + CHAR_talkToCli( charindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + CHAR_setInt( i , CHAR_TOUGH,atoi( tgh ) ); + CHAR_complianceParameter( i ); + //CHAR_sendStatusString( charindex , "P"); + CHAR_send_P_StatusString( i ,CHAR_P_STRING_TOUGH|CHAR_P_STRING_MAXHP|CHAR_P_STRING_DEF); + sprintf( token, "[GM]%s把你的耐力设置为%d!", CHAR_getChar( charindex, CHAR_NAME),(int)atoi(tgh)/100); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "玩家%s的耐力设置为%d!", CHAR_getChar( i, CHAR_NAME),(int)atoi(tgh)/100); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + }else{ + CHAR_setInt( charindex , CHAR_TOUGH,atoi( tgh ) ); + CHAR_complianceParameter( charindex ); + //CHAR_sendStatusString( charindex , "P"); + CHAR_send_P_StatusString( charindex ,CHAR_P_STRING_TOUGH|CHAR_P_STRING_MAXHP|CHAR_P_STRING_DEF); + sprintf( token, "耐力设置为%d!",(int)atoi(tgh)/100); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + } +} + +void CHAR_CHAT_DEBUG_dex( int charindex , char *message ) +{ + int i; + char dex[15]; + char cdkey[CDKEYLEN]; + char token[255]; + int playernum = CHAR_getPlayerMaxNum(); + easyGetTokenFromString( message , 1 , dex, sizeof(dex)); + easyGetTokenFromString( message , 2 , cdkey, sizeof(cdkey)); + if(strlen(cdkey)>0){ + for(i=0;i=playernum) + { + CHAR_talkToCli( charindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + CHAR_setInt( i , CHAR_DEX,atoi( dex ) ); + CHAR_complianceParameter( i ); + //CHAR_sendStatusString( charindex , "P"); + CHAR_send_P_StatusString( i ,CHAR_P_STRING_DEX|CHAR_P_STRING_MAXHP|CHAR_P_STRING_ATK|CHAR_P_STRING_QUICK); + sprintf( token, "[GM]%s把你的敏捷设置为%d!", CHAR_getChar( charindex, CHAR_NAME),(int)atoi(dex)/100); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "玩家%s的敏捷设置为%d!", CHAR_getChar( i, CHAR_NAME),(int)atoi(dex)/100); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + }else{ + CHAR_setInt( charindex , CHAR_DEX,atoi( dex ) ); + CHAR_complianceParameter( charindex ); + //CHAR_sendStatusString( charindex , "P"); + CHAR_send_P_StatusString( charindex ,CHAR_P_STRING_DEX|CHAR_P_STRING_MAXHP|CHAR_P_STRING_ATK|CHAR_P_STRING_QUICK); + sprintf( token, "敏捷设置为%d!",(int)atoi(dex)/100); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + } +} +void CHAR_CHAT_DEBUG_vital( int charindex , char *message ) +{ + int i; + char vital[15]; + char cdkey[CDKEYLEN]; + char token[255]; + int playernum = CHAR_getPlayerMaxNum(); + easyGetTokenFromString( message , 1 , vital, sizeof(vital)); + easyGetTokenFromString( message , 2 , cdkey, sizeof(cdkey)); + if(strlen(cdkey)>0){ + for(i=0;i=playernum) + { + CHAR_talkToCli( charindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + CHAR_setInt( i , CHAR_VITAL,atoi( vital ) ); + CHAR_complianceParameter( i ); + //CHAR_sendStatusString( charindex , "P"); + CHAR_send_P_StatusString( i ,CHAR_P_STRING_VITAL|CHAR_P_STRING_MAXHP|CHAR_P_STRING_DEF); + sprintf( token, "[GM]%s把你的体力设置为%d!", CHAR_getChar( charindex, CHAR_NAME),(int)atoi(vital)/100); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "玩家%s的体力设置为%d!", CHAR_getChar( i, CHAR_NAME),(int)atoi(vital)/100); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + }else{ + CHAR_setInt( charindex , CHAR_VITAL,atoi( vital ) ); + CHAR_complianceParameter( charindex ); + //CHAR_sendStatusString( charindex , "P"); + CHAR_send_P_StatusString( charindex ,CHAR_P_STRING_VITAL|CHAR_P_STRING_MAXHP|CHAR_P_STRING_DEF); + sprintf( token, "体力设置为%d!",(int)atoi(vital)/100); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + } +} +void CHAR_CHAT_DEBUG_luck( int charindex , char *message ) +{ + int i; + char buf[64]; + int luck; + char cdkey[CDKEYLEN]; + char token[255]; + int playernum = CHAR_getPlayerMaxNum(); + easyGetTokenFromString( message , 1 , buf, sizeof(buf)); + luck=atoi(buf); + easyGetTokenFromString( message , 2 , cdkey, sizeof(cdkey)); + if(luck<1)luck=1; + if(luck>5)luck=5; + if(strlen(cdkey)>0){ + for(i=0;i=playernum) + { + CHAR_talkToCli( charindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + CHAR_setInt( i , CHAR_LUCK,luck); + CHAR_complianceParameter( i ); + //CHAR_sendStatusString( charindex , "P"); + CHAR_send_P_StatusString( i , CHAR_P_STRING_LUCK); + sprintf( token, "[GM]%s把你的运气设置为%d!", CHAR_getChar( charindex, CHAR_NAME),luck); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "玩家%s的运气设置为%d!", CHAR_getChar( i, CHAR_NAME),luck); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + }else{ + CHAR_setInt( charindex , CHAR_LUCK,luck); + CHAR_complianceParameter( charindex ); + //CHAR_sendStatusString( charindex , "P"); + CHAR_send_P_StatusString( charindex , CHAR_P_STRING_LUCK); + sprintf( token, "运气设置为%d!",luck); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + } +} + +void CHAR_CHAT_DEBUG_gold( int charindex , char *message ) +{ + int i, MaxGold, money; + char cdkey[CDKEYLEN]; + char buf[64]; + char token[255]; + int playernum = CHAR_getPlayerMaxNum(); + easyGetTokenFromString( message , 1 , buf, sizeof(buf)); + money = atoi( buf ); + easyGetTokenFromString( message , 2 , cdkey, sizeof(cdkey)); + MaxGold = CHAR_getMaxHaveGold( charindex); + if( money > MaxGold ) + money = MaxGold; + if(strlen(cdkey)>0){ + for(i=0;i=playernum) + { + CHAR_talkToCli( charindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + CHAR_setInt( i , CHAR_GOLD , money ); + CHAR_complianceParameter( i ); + CHAR_send_P_StatusString( i , CHAR_P_STRING_GOLD); + sprintf( token, "[GM]%s把你的金钱设置为%d!", CHAR_getChar( charindex, CHAR_NAME),money); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "玩家%s的金钱设置为%d!", CHAR_getChar( i, CHAR_NAME),money); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + }else{ + CHAR_setInt( charindex , CHAR_GOLD , money ); + CHAR_complianceParameter( charindex ); + CHAR_send_P_StatusString( charindex , CHAR_P_STRING_GOLD); + sprintf( token, "金钱设置为%d!",money); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + } +} + +#ifdef _TEST_DROPITEMS +void CHAR_CHAT_DEBUG_dropmypet( int charindex, char *message ) +{ + char buf[256]; + int petID, x, y, floor, objindex, petindex, count=0; + int i, j, k, petarray, cLeve=1; + + if( getStringFromIndexWithDelim( message, " ", 1, buf, sizeof( buf)) == FALSE ) return; + petID = atoi( buf); + if( getStringFromIndexWithDelim( message, " ", 2, buf, sizeof( buf)) != FALSE ){ + cLeve = atoi( buf); + } + + floor = CHAR_getInt( charindex, CHAR_FLOOR); + x = CHAR_getInt( charindex, CHAR_X); + y = CHAR_getInt( charindex, CHAR_Y); + if( getStringFromIndexWithDelim( message, " ", 3, buf, sizeof( buf)) != FALSE ){ + floor = atoi( buf); + } + if( getStringFromIndexWithDelim( message, " ", 4, buf, sizeof( buf)) != FALSE ){ + x = atoi( buf); + } + if( getStringFromIndexWithDelim( message, " ", 5, buf, sizeof( buf)) != FALSE ){ + y = atoi( buf); + } + for( i=(x-3); i<(x+3); i++) { + for( j=(y-3); j<(y+3); j++) { + petarray = ENEMY_getEnemyArrayFromId( petID); + petindex = ENEMY_TEST_createPetIndex( petarray ); + if( !CHAR_CHECKINDEX( petindex) ){ + CHAR_talkToCli( charindex, -1, "err Can't create pet", CHAR_COLORYELLOW); + return; + } + CHAR_complianceParameter( petindex ); + objindex = PET_dropPetAbsolute( petindex, floor, i, j, FALSE ); + if( objindex == -1 ){ + CHAR_talkToCli( charindex, -1, "err Can't Drop", CHAR_COLORYELLOW); + return; + } + for( k = 1; k < cLeve; k ++ ){ //升级 + CHAR_PetLevelUp( petindex ); + CHAR_PetAddVariableAi( petindex, AI_FIX_PETLEVELUP ); + CHAR_setInt( petindex, CHAR_LV, CHAR_getInt( petindex, CHAR_LV) +1 ); + } + CHAR_complianceParameter( petindex ); + CHAR_setInt( petindex , CHAR_HP , CHAR_getWorkInt( petindex , CHAR_WORKMAXHP ) ); + + CHAR_setWorkInt( petindex, CHAR_WORKOBJINDEX, objindex ); + CHAR_setInt( petindex, CHAR_FLOOR, floor); + CHAR_setInt( petindex, CHAR_X, i); + CHAR_setInt( petindex, CHAR_Y, j); + CHAR_sendCToArroundCharacter( objindex); + CHAR_setInt( petindex, CHAR_PUTPETTIME, NowTime.tv_sec); + CHAR_setChar( petindex, CHAR_OWNERCDKEY, "SYSTEM_WAYI" ); + CHAR_setChar( petindex, CHAR_OWNERCHARANAME, "SYSTEM_WAYI" ); + count++; + } + } + sprintf( buf, "总共丢掷 %d只宠物。", count); + CHAR_talkToCli( charindex, -1, buf, CHAR_COLORYELLOW); + + +} + +void CHAR_CHAT_DEBUG_dropmyitem( int charindex, char *message ) +{ + char buf[256]; + int itemID, SitemID, maxflg=0,emptyitemindexinchara, i, j; + int floor, x, y, objindex; + + if( getStringFromIndexWithDelim( message, " ", 1, buf, sizeof( buf)) == FALSE ) return; + SitemID = atoi( buf); + if( getStringFromIndexWithDelim( message, " ", 2, buf, sizeof( buf)) != FALSE ){ + maxflg = atoi( buf); + } + floor = CHAR_getInt( charindex, CHAR_FLOOR); + x = CHAR_getInt( charindex, CHAR_X); + y = CHAR_getInt( charindex, CHAR_Y); + if( getStringFromIndexWithDelim( message, " ", 3, buf, sizeof( buf)) != FALSE ){ + floor = atoi( buf); + } + if( getStringFromIndexWithDelim( message, " ", 4, buf, sizeof( buf)) != FALSE ){ + x = atoi( buf); + } + if( getStringFromIndexWithDelim( message, " ", 5, buf, sizeof( buf)) != FALSE ){ + y = atoi( buf); + } + itemID = SitemID; + + + for( i=(x-3); i<(x+3); i++) { + for( j=(y-3); j<(y+3); j++) { + int ret = 0 , count=0; + int itemindex; + while( count < 10 ){ + count++; + itemindex = ITEM_makeItemAndRegist( itemID ); + if( maxflg == 1 ) itemID++; + if( !ITEM_CHECKINDEX( itemindex)) continue; + break; + } + emptyitemindexinchara = CHAR_findEmptyItemBox( charindex ); + + CHAR_setItemIndex( charindex, emptyitemindexinchara, itemindex ); + ITEM_setWorkInt(itemindex, ITEM_WORKOBJINDEX,-1); + ITEM_setWorkInt(itemindex, ITEM_WORKCHARAINDEX,charindex); + CHAR_sendItemDataOne( charindex, emptyitemindexinchara); + //drop + if( (ret = CHAR_DropItemFXY( charindex, emptyitemindexinchara, + floor, i, j, &objindex )) != 0 ){ + char buf[256]; + sprintf( buf, "错误%d", ret); + CHAR_talkToCli( charindex, -1, buf, CHAR_COLORYELLOW); + } + ITEM_setInt(itemindex,ITEM_PUTTIME,NowTime.tv_sec); + CHAR_sendWatchEvent(objindex,CHAR_ACTSTAND,NULL,0,TRUE); + CHAR_setItemIndex(charindex, emptyitemindexinchara ,-1); + CHAR_sendItemDataOne(charindex, emptyitemindexinchara); + CHAR_sendCToArroundCharacter(CHAR_getWorkInt( charindex, CHAR_WORKOBJINDEX)); + } + } + { + char buf[256]; + sprintf( buf, "最後ID%d", itemID-1); + CHAR_talkToCli( charindex, -1, buf, CHAR_COLORYELLOW); + } +} +#endif + +void CHAR_CHAT_DEBUG_additem( int charindex , char *message ) +{ + + int emptyitemindexinchara, itemindex; + int i; + int num = 0; + int itemid; + char buf[64]; + char msgbuf[128]; + char cdkey[CDKEYLEN]; + easyGetTokenFromString( message , 1 , buf, sizeof(buf)); + itemid = atoi( buf); + easyGetTokenFromString( message , 2 , buf, sizeof(buf)); + num = atoi( buf); + easyGetTokenFromString( message , 3 , cdkey, sizeof(cdkey)); + + if( num <= 0 ) num = 1; + + if(strlen(cdkey)>0){ + int playernum = CHAR_getPlayerMaxNum(); + int j; + for(j=0;j=playernum) + { + CHAR_talkToCli( charindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + for( i = 0; i < num; i ++ ) { + emptyitemindexinchara = CHAR_findEmptyItemBox( j ); + + if( emptyitemindexinchara < 0 ){ + sprintf( msgbuf, "玩家%s物品栏位不足。", CHAR_getChar( j, CHAR_NAME )); + CHAR_talkToCli( charindex, -1, msgbuf, CHAR_COLORYELLOW); + sprintf( msgbuf, "你的%s物品栏位不足。", CHAR_getChar( j, CHAR_NAME )); + CHAR_talkToCli( j, -1, msgbuf, CHAR_COLORYELLOW); + return; + } + + itemindex = ITEM_makeItemAndRegist( itemid ); + + if( itemindex != -1 ){ + CHAR_setItemIndex( j, emptyitemindexinchara, itemindex ); + ITEM_setWorkInt(itemindex, ITEM_WORKOBJINDEX,-1); + ITEM_setWorkInt(itemindex, ITEM_WORKCHARAINDEX,charindex); + CHAR_sendItemDataOne( j, emptyitemindexinchara); + LogItem( + CHAR_getChar( charindex, CHAR_NAME ), + CHAR_getChar( charindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + atoi( message), +#endif + "AddItem(制作道具GM)", + CHAR_getInt( charindex,CHAR_FLOOR), + CHAR_getInt( charindex,CHAR_X ), + CHAR_getInt( charindex,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + + ); + snprintf( msgbuf, sizeof( msgbuf), "[GM]%s给你制作%s成功\。", + CHAR_getChar( charindex, CHAR_NAME ),ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( j, -1,msgbuf, CHAR_COLORYELLOW); + snprintf( msgbuf, sizeof( msgbuf), "成功为%s制作 %s\。", + CHAR_getChar( j, CHAR_NAME ),ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( charindex, -1,msgbuf, CHAR_COLORYELLOW); + }else{ + sprintf( msgbuf, "制作道具失败。" ); + CHAR_talkToCli( charindex, -1,msgbuf, CHAR_COLORYELLOW); + } + } + }else{ + for( i = 0; i < num; i ++ ) { + emptyitemindexinchara = CHAR_findEmptyItemBox( charindex ); + + if( emptyitemindexinchara < 0 ){ + sprintf( msgbuf, "物品栏位不足。" ); + + CHAR_talkToCli( charindex, -1, msgbuf, CHAR_COLORYELLOW); + + return; + } + + itemindex = ITEM_makeItemAndRegist( itemid ); + + if( itemindex != -1 ){ + CHAR_setItemIndex( charindex, emptyitemindexinchara, itemindex ); + ITEM_setWorkInt(itemindex, ITEM_WORKOBJINDEX,-1); + ITEM_setWorkInt(itemindex, ITEM_WORKCHARAINDEX,charindex); + CHAR_sendItemDataOne( charindex, emptyitemindexinchara); + LogItem( + CHAR_getChar( charindex, CHAR_NAME ), + CHAR_getChar( charindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + atoi( message), +#endif + "AddItem(制作道具GM)", + CHAR_getInt( charindex,CHAR_FLOOR), + CHAR_getInt( charindex,CHAR_X ), + CHAR_getInt( charindex,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + + ); + snprintf( msgbuf, sizeof( msgbuf), "制作%s成功\。", + ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( charindex, -1,msgbuf, CHAR_COLORYELLOW); + }else{ + sprintf( msgbuf, "制作道具失败。" ); + CHAR_talkToCli( charindex, -1, msgbuf, CHAR_COLORYELLOW); + } + } + } +} + + +void CHAR_CHAT_DEBUG_metamo( int charindex , char *message ) +{ + char metamoid[7]; + char cdkey[CDKEYLEN]; + char token[255]; + int i=0; + int playernum = CHAR_getPlayerMaxNum(); + easyGetTokenFromString( message , 1 , metamoid, sizeof(metamoid)); + easyGetTokenFromString( message , 2 , cdkey, sizeof(cdkey)); + if(strlen(cdkey)>0){ + for(i=0;i=playernum) + { + CHAR_talkToCli( charindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + CHAR_setInt( i , CHAR_BASEIMAGENUMBER , atoi( metamoid ) ); + CHAR_setInt( i , CHAR_BASEBASEIMAGENUMBER , atoi( metamoid ) ); + + CHAR_complianceParameter( i ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( i , CHAR_WORKOBJINDEX )); + CHAR_send_P_StatusString( i , CHAR_P_STRING_BASEBASEIMAGENUMBER); + sprintf( token, "[GM]%s把你的人物形象设置为%d!", CHAR_getChar( charindex, CHAR_NAME),(int)atoi(metamoid)); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "玩家%s的人物形象设置为%d!", CHAR_getChar( i, CHAR_NAME),(int)atoi(metamoid)); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + }else{ + CHAR_setInt( charindex , CHAR_BASEIMAGENUMBER , atoi( metamoid ) ); + CHAR_setInt( charindex , CHAR_BASEBASEIMAGENUMBER , atoi( metamoid ) ); + + CHAR_complianceParameter( charindex ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( charindex , CHAR_WORKOBJINDEX )); + CHAR_send_P_StatusString( charindex , CHAR_P_STRING_BASEBASEIMAGENUMBER); + sprintf( token, "人物形象设置为%d!",(int)atoi(metamoid)); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + } +} + +void CHAR_CHAT_DEBUG_info( int charindex , char *message ) +{ + char line[256]; + int index; + + if( strlen( message) != 0 ) { + index = atoi( message); + } + else { + index = charindex; + } + if( !CHAR_CHECKINDEX( index)) { + CHAR_talkToCli( charindex, -1 , "该index无法使用。" , CHAR_COLORWHITE ); + return; + } + + snprintf( line, sizeof( line), + "name:%s i:%d B:%d BB:%d LV:%d EXP:%d MakeSeq:%d", + CHAR_getChar( index, CHAR_NAME), + charindex, + CHAR_getInt( index, CHAR_BASEIMAGENUMBER ), + CHAR_getInt( index, CHAR_BASEBASEIMAGENUMBER ), + CHAR_getInt( index, CHAR_LV ), + CHAR_getInt( index, CHAR_EXP ), + CHAR_getCharMakeSequenceNumber( index)); + + CHAR_talkToCli( charindex, -1 , line , CHAR_COLORWHITE ); + + snprintf( line, sizeof( line), + "Gold:%d HP:%d MP/MHP:%d/%d" , + CHAR_getInt( index, CHAR_GOLD ), + CHAR_getInt( index, CHAR_HP ), + CHAR_getInt( index, CHAR_MP ), + CHAR_getInt( index, CHAR_MAXMP )); + CHAR_talkToCli( charindex, -1 , line , CHAR_COLORWHITE ); + + + if( CHAR_getInt( index, CHAR_WHICHTYPE ) == CHAR_TYPEPET ){ + snprintf( line, sizeof(line), + "体:%d 力:%d 丈:%d 早:%d 耐:%d 攻:%d 守:%d 敏:%d 忠修:%d 忠变:%.2f 编码:%s", + CHAR_getInt( index, CHAR_VITAL )/100, + CHAR_getInt( index, CHAR_STR )/100, + CHAR_getInt( index, CHAR_TOUGH )/100, + CHAR_getInt( index, CHAR_DEX )/100, + CHAR_getWorkInt( index, CHAR_WORKFIXVITAL ), + CHAR_getWorkInt( index, CHAR_WORKATTACKPOWER ), + CHAR_getWorkInt( index, CHAR_WORKDEFENCEPOWER ),//CHAR_WORKFIXDEX + CHAR_getWorkInt( index, CHAR_WORKQUICK ), + CHAR_getInt( index, CHAR_MODAI ), + CHAR_getInt( index, CHAR_VARIABLEAI ) * 0.01, + CHAR_getChar( index, CHAR_UNIQUECODE) ); + }else{ + snprintf( line, sizeof(line), + "体:%d 力:%d 丈:%d 早:%d 耐:%d 攻:%d 守:%d 魅:%d 运:%d", + CHAR_getInt( index, CHAR_VITAL )/100, + CHAR_getInt( index, CHAR_STR )/100, + CHAR_getInt( index, CHAR_TOUGH )/100, + CHAR_getInt( index, CHAR_DEX )/100, + CHAR_getWorkInt( index, CHAR_WORKFIXVITAL ), + CHAR_getWorkInt( index, CHAR_WORKATTACKPOWER ), + CHAR_getWorkInt( index, CHAR_WORKDEFENCEPOWER ), + CHAR_getWorkInt( index, CHAR_WORKFIXCHARM ), + CHAR_getWorkInt( index, CHAR_WORKFIXLUCK )); + } + CHAR_talkToCli( charindex, -1 , line , CHAR_COLORWHITE ); + + + snprintf( line, sizeof(line), + "土:%d 水:%d 火:%d 风:%d", + CHAR_getWorkInt( index, CHAR_WORKFIXEARTHAT ), + CHAR_getWorkInt( index, CHAR_WORKFIXWATERAT ), + CHAR_getWorkInt( index, CHAR_WORKFIXFIREAT ), + CHAR_getWorkInt( index, CHAR_WORKFIXWINDAT )); + CHAR_talkToCli( charindex, -1 , line , CHAR_COLORWHITE ); + + snprintf( line, sizeof( line), + "Sk Itm:%d ChV:%d Rad:%d" , + CHAR_MAXITEMHAVE, + CHAR_getInt( index, CHAR_CHATVOLUME ), + CHAR_getInt( index, CHAR_RADARSTRENGTH ) ); + CHAR_talkToCli( charindex, -1 , line , CHAR_COLORWHITE ); + + + snprintf( line, sizeof( line), + "Status 毒:%d 麻:%d 默:%d 石:%d 暗:%d 乱:%d" , + CHAR_getInt( index , CHAR_POISON ), + CHAR_getInt( index , CHAR_PARALYSIS ), + CHAR_getInt( index , CHAR_SLEEP ), + CHAR_getInt( index , CHAR_STONE ), + CHAR_getInt( index , CHAR_DRUNK ), + CHAR_getInt( index , CHAR_CONFUSION ) ); + CHAR_talkToCli( charindex, -1 , line , CHAR_COLORWHITE ); + +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + snprintf( line, sizeof( line), +#ifdef _NEW_MANOR_LAW + "TitInd:%d FL:%d X:%d Y:%d DIR:%d FAME:%d MOMENTUM:%d" , +#else + "TitInd:%d FL:%d X:%d Y:%d DIR:%d FAME:%d" , +#endif + CHAR_getInt( index , CHAR_INDEXOFEQTITLE ), + CHAR_getInt( index , CHAR_FLOOR ), + CHAR_getInt( index , CHAR_X ), + CHAR_getInt( index , CHAR_Y ), + CHAR_getInt( index , CHAR_DIR ), + CHAR_getInt( index , CHAR_FAME) +#ifdef _NEW_MANOR_LAW + ,CHAR_getInt( index , CHAR_MOMENTUM) +#endif + ); +#else + snprintf( line, sizeof( line), + "TitInd:%d FL:%d X:%d Y:%d DIR:%d" , + CHAR_getInt( index , CHAR_INDEXOFEQTITLE ), + CHAR_getInt( index , CHAR_FLOOR ), + CHAR_getInt( index , CHAR_X ), + CHAR_getInt( index , CHAR_Y ), + CHAR_getInt( index , CHAR_DIR ) ); +#endif + CHAR_talkToCli( charindex, -1 , line , CHAR_COLORWHITE ); + + + snprintf( line, sizeof( line), + "walk:%d dead:%d ItemMergecnt:%d" , + CHAR_getInt( index , CHAR_WALKCOUNT ) , + CHAR_getInt( index , CHAR_DEADCOUNT ) , + CHAR_getInt( index, CHAR_MERGEITEMCOUNT) + ); + CHAR_talkToCli( charindex, -1 , line , CHAR_COLORWHITE ); + + if( CHAR_getInt( index, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER) { + snprintf( line, sizeof( line), + "petindex [%d][%d][%d][%d][%d] " , + CHAR_getCharPet( index, 0), + CHAR_getCharPet( index, 1), + CHAR_getCharPet( index, 2), + CHAR_getCharPet( index, 3), + CHAR_getCharPet( index, 4)); + } + else { + snprintf( line, sizeof( line), + "PetskillIndex [%d][%d][%d][%d][%d][%d][%d] " , + CHAR_getPetSkill( index, 0), + CHAR_getPetSkill( index, 1), + CHAR_getPetSkill( index, 2), + CHAR_getPetSkill( index, 3), + CHAR_getPetSkill( index, 4), + CHAR_getPetSkill( index, 5), + CHAR_getPetSkill( index, 6)); + } + + CHAR_talkToCli( charindex, -1 , line , CHAR_COLORWHITE ); + if( CHAR_getInt( index, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER) { + snprintf( line, sizeof( line), + "poolpetindex [%d][%d][%d][%d][%d] " , + CHAR_getCharPoolPet( index, 0), + CHAR_getCharPoolPet( index, 1), + CHAR_getCharPoolPet( index, 2), + CHAR_getCharPoolPet( index, 3), + CHAR_getCharPoolPet( index, 4)); + CHAR_talkToCli( charindex, -1 , line , CHAR_COLORWHITE ); + + snprintf( line, sizeof( line), + "poolpetindex [%d][%d][%d][%d][%d] " , + CHAR_getCharPoolPet( index, 5), + CHAR_getCharPoolPet( index, 6), + CHAR_getCharPoolPet( index, 7), + CHAR_getCharPoolPet( index, 8), + CHAR_getCharPoolPet( index, 9)); + CHAR_talkToCli( charindex, -1 , line , CHAR_COLORWHITE ); + } + + snprintf( line, sizeof( line), + "levelup [%d], 累积 %d 赌场积分[%d]" , + CHAR_getInt( index, CHAR_LEVELUPPOINT), + CHAR_getWorkInt( index, CHAR_WORKULTIMATE), + CHAR_getInt( index, CHAR_GAMBLENUM) ); + CHAR_talkToCli( charindex, -1 , line , CHAR_COLORWHITE ); + +} + +void CHAR_CHAT_DEBUG_sysinfo( int charindex , char *message ) +{ + char msg[1024],name[256]; + int i; + time_t new_t; + int dd,hh,mm,ss; + + int items=0 , chars=0, golds=0, nouses=0; + int players=0,pets=0,others=0; + int whichtype= -1; + int objnum = OBJECT_getNum(); + + + int itemnum = ITEM_getITEM_itemnum(); + int itemuse =0; + + makeEscapeString( getGameserverID(), name, sizeof( name)); + sprintf( msg, "GSID:%s GSNAME:%s", getGameserverID(), name); + CHAR_talkToCli( charindex, -1, msg, CHAR_COLORYELLOW); + + + for( i=0 ; i0){ + for(i=0;i=playernum) + { + CHAR_talkToCli( charaindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + CHAR_setInt(i,CHAR_LV, atoi( message )); + CHAR_send_P_StatusString( i , CHAR_P_STRING_LV); + sprintf( token, "[GM]%s把你的等级设置为%d!", CHAR_getChar( charaindex, CHAR_NAME),level); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "玩家%s的等级设置为%d!", CHAR_getChar( i, CHAR_NAME),level); + CHAR_talkToCli( charaindex, -1,token, CHAR_COLORYELLOW ); + }else{ + CHAR_setInt(charaindex,CHAR_LV, atoi( message )); + CHAR_send_P_StatusString( charaindex , CHAR_P_STRING_LV); + sprintf( token, "等级设置为%d!",level); + CHAR_talkToCli( charaindex, -1,token, CHAR_COLORYELLOW ); + } +} + + +void CHAR_CHAT_DEBUG_exp( int charaindex, char* message ) +{ + int i; + char exp[15]; + char cdkey[CDKEYLEN]; + char token[255]; + int playernum = CHAR_getPlayerMaxNum(); + easyGetTokenFromString( message , 1 , exp, sizeof(exp)); + easyGetTokenFromString( message , 2 , cdkey, sizeof(cdkey)); + if(strlen(cdkey)>0){ + for(i=0;i=playernum) + { + CHAR_talkToCli( charaindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + CHAR_setMaxExp( i, atoi( exp )); + CHAR_send_P_StatusString( i , CHAR_P_STRING_EXP); + sprintf( token, "[GM]%s把你的经验设置为%d!", CHAR_getChar( charaindex, CHAR_NAME),(int)atoi(exp)); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "玩家%s的经验设置为%d!", CHAR_getChar( i, CHAR_NAME),(int)atoi(exp)); + CHAR_talkToCli( charaindex, -1,token, CHAR_COLORYELLOW ); + }else{ + CHAR_setMaxExp( charaindex, atoi( exp )); + CHAR_send_P_StatusString( charaindex , CHAR_P_STRING_EXP); + sprintf( token, "经验设置为%d!",(int)atoi(exp)/100); + CHAR_talkToCli( charaindex, -1,token, CHAR_COLORYELLOW ); + } +} + +void CHAR_CHAT_DEBUG_delitem( int charindex , char *message ) +{ + int itemid; + + if( strcmp( message, "all") == 0 ) { + int i; + for( i = CHAR_STARTITEMARRAY; i < CHAR_MAXITEMHAVE; i ++ ) { + itemid = CHAR_getItemIndex(charindex, i); + if( itemid != -1 ) { + { + LogItem( + CHAR_getChar( charindex, CHAR_NAME ), + CHAR_getChar( charindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemid, +#else + ITEM_getInt( itemid, ITEM_ID ), +#endif + "DelItem(删除道具GM)", + CHAR_getInt( charindex,CHAR_FLOOR), + CHAR_getInt( charindex,CHAR_X ), + CHAR_getInt( charindex,CHAR_Y ), + ITEM_getChar( itemid, ITEM_UNIQUECODE), + ITEM_getChar( itemid, ITEM_NAME), + ITEM_getInt( itemid, ITEM_ID) + ); + } + CHAR_DelItem( charindex, i); + } + } + }else { + int equipplace; + equipplace = atoi( message); + if( equipplace < CHAR_STARTITEMARRAY || equipplace > CHAR_MAXITEMHAVE -1 ) { + CHAR_talkToCli( charindex, -1, "号码不正确。", CHAR_COLORWHITE); + return; + } + itemid = CHAR_getItemIndex(charindex, equipplace); + if( itemid == -1 ) return; + { + LogItem( + CHAR_getChar( charindex, CHAR_NAME ), + CHAR_getChar( charindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemid, +#else + ITEM_getInt( itemid, ITEM_ID ), +#endif + "DelItem(删除道具GM)", + CHAR_getInt( charindex,CHAR_FLOOR), + CHAR_getInt( charindex,CHAR_X ), + CHAR_getInt( charindex,CHAR_Y ), + ITEM_getChar( itemid, ITEM_UNIQUECODE), + ITEM_getChar( itemid, ITEM_NAME), + ITEM_getInt( itemid, ITEM_ID) + ); + } + CHAR_DelItem( charindex, equipplace); + } +} + +#ifdef _CHAR_PROFESSION // WON ADD 人物职业 +void CHAR_CHAT_DEBUG_addsk( int charaindex, char* message ) +{ + + CHAR_HaveSkill *pSkil; + int skill, i, j, level=1; + char cdkey[CDKEYLEN]; + char msg1[20], msg2[20]; + int playernum = CHAR_getPlayerMaxNum(); + + getStringFromIndexWithDelim( message, " ", 1, msg1, sizeof( msg1)); + getStringFromIndexWithDelim( message, " ", 2, msg2, sizeof( msg2)); + getStringFromIndexWithDelim( message, " ", 3, cdkey, sizeof( cdkey)); + skill = atoi(msg1); + level = atoi(msg2); + + if( level > 100 ){ + CHAR_talkToCli( charaindex, -1, "等级不正确", CHAR_COLORWHITE); + return; + } + if( level < 1 ) level = 1; + + if(strlen(cdkey)>0){ + for(j=0;j=playernum) + { + CHAR_talkToCli( charaindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + + for( i = 0; i < CHAR_SKILLMAXHAVE; i ++ ){ + int skill_id = -1; + + pSkil = CHAR_getCharHaveSkill( j, i ); + skill_id = SKILL_getInt( &pSkil->skill, SKILL_IDENTITY); + if( skill == skill_id && skill_id != -1 ){ + CHAR_talkToCli(j,-1, "你已经学习过此技能", CHAR_COLORYELLOW); + CHAR_talkToCli(charaindex,-1, "玩家已经学习过此技能", CHAR_COLORYELLOW); + return; + } + + if( pSkil == NULL ) continue; + if( pSkil->use != 0 ) continue; + + break; + } + + if( i >= CHAR_SKILLMAXHAVE ){ + CHAR_talkToCli(j,-1, "技能数量已达上限", CHAR_COLORYELLOW); + CHAR_talkToCli(charaindex,-1, "玩家技能数量已达上限", CHAR_COLORYELLOW); + return; + }else{ + level *= 100; + SKILL_makeSkillData( &pSkil->skill, skill, level); + pSkil->use = TRUE; + } + + CHAR_sendStatusString( j , "S"); + + return;} + else{ + for( i = 0; i < CHAR_SKILLMAXHAVE; i ++ ){ + int skill_id = -1; + + pSkil = CHAR_getCharHaveSkill( charaindex, i ); + skill_id = SKILL_getInt( &pSkil->skill, SKILL_IDENTITY); + if( skill == skill_id && skill_id != -1 ){ + CHAR_talkToCli(charaindex,-1, "你已经学习过此技能", CHAR_COLORYELLOW); + return; + } + + if( pSkil == NULL ) continue; + if( pSkil->use != 0 ) continue; + + break; + } + + if( i >= CHAR_SKILLMAXHAVE ){ + CHAR_talkToCli(charaindex,-1, "技能数量已达上限", CHAR_COLORYELLOW); + return; + }else{ + level *= 100; + SKILL_makeSkillData( &pSkil->skill, skill, level); + pSkil->use = TRUE; + } + + CHAR_sendStatusString( charaindex , "S"); + + return;} +} + +void CHAR_CHAT_DEBUG_delsk( int charaindex, char* message ) +{ + int i; + CHAR_HaveSkill *pSkil; + + if( strcmp( message, "all" ) == 0 ){ +// CHAR_talkToCli( charaindex, -1, "清除所有技能", CHAR_COLORWHITE); + for( i = CHAR_SKILLMAXHAVE-1; i >= 0; i -- ){ + pSkil = CHAR_getCharHaveSkill( charaindex, i ); + if( pSkil == NULL )continue; + if( pSkil->use == 0 )continue; + SKILL_makeSkillData( &pSkil->skill, 0, 0 ); + pSkil->use = 0; + } + } + + for( i = CHAR_SKILLMAXHAVE-1; i >= 0; i -- ){ + pSkil = CHAR_getCharHaveSkill( charaindex, i ); + if( pSkil == NULL )continue; + if( pSkil->use == 0 )continue; + print( "SKILUSE %d\n", pSkil->use ); + break; + } + + if( i < 0 ){ +// CHAR_talkToCli( charaindex, -1, "已无法再削减了。", CHAR_COLORWHITE); + ;; + }else{ + SKILL_makeSkillData( &pSkil->skill, 0, 0 ); + pSkil->use = 0; + } + + CHAR_sendStatusString( charaindex , "S"); +} +#endif + +void CHAR_CHAT_Kusabana( int charaindex, char* message ){ + + int dir, ff, fx, fy; + int tile, obj; + + ff = CHAR_getInt( charaindex, CHAR_FLOOR ); + fx = CHAR_getInt( charaindex, CHAR_X ); + fy = CHAR_getInt( charaindex, CHAR_Y ); + dir = CHAR_getInt( charaindex, CHAR_DIR ); + + fx += CHAR_getDX(dir); + fy += CHAR_getDY(dir); + + if( MAP_getTileAndObjData( ff, fx, fy, &tile, &obj) == FALSE )return; + +#if 0 + { char szBuffer[256]; + snprintf( szBuffer, sizeof( szBuffer ), "TILE = %d, OBJ = %d", + tile, obj ); + CHAR_talkToCli( charaindex, -1, szBuffer, CHAR_COLORWHITE); + } +#else + + if( obj != 0 ){ + CHAR_talkToCli( charaindex, -1, "有零件。", CHAR_COLORWHITE); + return; + } + + if( MAP_walkAbleFromPoint( ff, fx, fy, FALSE ) == FALSE ){ + CHAR_talkToCli( charaindex, -1, "无法走了。", CHAR_COLORWHITE); + return; + } + + MAP_setObjData( ff, fx, fy, 3416, 100 ); + + +#if 1 + { + char *stringdata; + RECT seekr , retr; + seekr.x = fx; + seekr.y = fy; + seekr.width = 1; + seekr.height = 1; + stringdata = MAP_getdataFromRECT(ff,&seekr,&retr); + if( stringdata ){ + + if( CHAR_getInt( charaindex , CHAR_WHICHTYPE ) + == CHAR_TYPEPLAYER ){ + int fd = getfdFromCharaIndex( charaindex ); + lssproto_M_send(fd,ff, + retr.x,retr.y, + retr.x+retr.width,retr.y+retr.height, + stringdata ); + } + } else { + } + } +#endif +#endif + + return ; +} + + +void CHAR_CHAT_Fukuwa( int charaindex, char* message ){ + int dir, ff, fx, fy, objindex, vs_index, vs_fd, stringlen; + OBJECT obj; + char szBuffer[2048]; + + stringlen = strlen( message ); + + if( message[0] == '[' && message[stringlen-1] == ']' ){ + CHAR_talkToCli( charaindex, -1, "语言没有转换。", CHAR_COLORWHITE); + return ; + } + + ff = CHAR_getInt( charaindex, CHAR_FLOOR ); + fx = CHAR_getInt( charaindex, CHAR_X ); + fy = CHAR_getInt( charaindex, CHAR_Y ); + dir = CHAR_getInt( charaindex, CHAR_DIR ); + + fx += CHAR_getDX(dir); + fy += CHAR_getDY(dir); + + stringlen = strlen( message ); + + + snprintf( szBuffer, sizeof( szBuffer ), "P|%s", message ); + + for( obj=MAP_getTopObj( ff, fx, fy ); obj; obj=NEXT_OBJECT(obj) ){ + objindex = GET_OBJINDEX(obj); + if( OBJECT_getType(objindex) != OBJTYPE_CHARA )continue; + vs_index = OBJECT_getIndex(objindex); + vs_fd = getfdFromCharaIndex( vs_index ); + CHAR_Talk( vs_fd, vs_index, + szBuffer, CHAR_COLORWHITE, 3 ); + break; + } + +} + +void CHAR_CHAT_DEBUG_superman( int charaindex, char* message ) +{ +#define CHAT_CHAT_DEBUG_SUPERMAN_PARAMDEF 100000 + int i; + char hp[15]; + char cdkey[CDKEYLEN]; + char token[255]; + int playernum = CHAR_getPlayerMaxNum(); + easyGetTokenFromString( message , 1 , hp, sizeof(hp)); + easyGetTokenFromString( message , 2 , cdkey, sizeof(cdkey)); + if(strlen(cdkey)>0){ + for(i=0;i=playernum) + { + CHAR_talkToCli( charaindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + CHAR_setInt(charaindex,CHAR_SKILLUPPOINT, 32); + CHAR_Skillupsend(charaindex); + CHAR_setInt( charaindex , CHAR_HP, CHAT_CHAT_DEBUG_SUPERMAN_PARAMDEF); + CHAR_setInt( charaindex , CHAR_MP,CHAT_CHAT_DEBUG_SUPERMAN_PARAMDEF ); + CHAR_setInt( charaindex , CHAR_MAXMP,CHAT_CHAT_DEBUG_SUPERMAN_PARAMDEF ); + CHAR_setInt( charaindex , CHAR_STR,CHAT_CHAT_DEBUG_SUPERMAN_PARAMDEF ); + CHAR_setInt( charaindex , CHAR_TOUGH,CHAT_CHAT_DEBUG_SUPERMAN_PARAMDEF ); + CHAR_setInt( charaindex , CHAR_DEX , CHAT_CHAT_DEBUG_SUPERMAN_PARAMDEF ); + CHAR_setInt( charaindex,CHAR_LV, 200); + + CHAR_complianceParameter( charaindex ); + CHAR_sendStatusString( charaindex , "P"); + + sprintf( token, "[GM]%s把你为超人状态!", CHAR_getChar( charaindex, CHAR_NAME)); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "玩家%s设置为超人状态!", CHAR_getChar( i, CHAR_NAME)); + CHAR_talkToCli( charaindex, -1,token, CHAR_COLORYELLOW ); + }else{ + CHAR_setInt(charaindex,CHAR_SKILLUPPOINT, 32); + CHAR_Skillupsend(charaindex); + CHAR_setInt( charaindex , CHAR_HP, CHAT_CHAT_DEBUG_SUPERMAN_PARAMDEF); + CHAR_setInt( charaindex , CHAR_MP,CHAT_CHAT_DEBUG_SUPERMAN_PARAMDEF ); + CHAR_setInt( charaindex , CHAR_MAXMP,CHAT_CHAT_DEBUG_SUPERMAN_PARAMDEF ); + CHAR_setInt( charaindex , CHAR_STR,CHAT_CHAT_DEBUG_SUPERMAN_PARAMDEF ); + CHAR_setInt( charaindex , CHAR_TOUGH,CHAT_CHAT_DEBUG_SUPERMAN_PARAMDEF ); + CHAR_setInt( charaindex , CHAR_DEX , CHAT_CHAT_DEBUG_SUPERMAN_PARAMDEF ); + CHAR_setInt( charaindex,CHAR_LV, 200); + + CHAR_complianceParameter( charaindex ); + CHAR_sendStatusString( charaindex , "P"); + + CHAR_talkToCli( charaindex, -1,"设置超人状态!", CHAR_COLORYELLOW ); + } +#undef CHAT_CHAT_DEBUG_SUPERMAN_PARAMDEF + +} + +void CHAR_CHAT_printcount( int charaindex, char* message ) +{ + char msgbuf[512]; + + snprintf( msgbuf,sizeof( msgbuf), + "你说了 %d 次话,走了 %d 步路,死了 %d 次", + CHAR_getInt( charaindex, CHAR_TALKCOUNT), + CHAR_getInt( charaindex, CHAR_WALKCOUNT), + CHAR_getInt( charaindex, CHAR_DEADCOUNT) + ); + CHAR_talkToCli( charaindex, -1, msgbuf, CHAR_COLORWHITE); + +} + +void CHAR_CHAT_DEBUG_battlein( int charaindex, char* message ) +{ + int fd = getfdFromCharaIndex( charaindex ); + if( fd != -1) { + lssproto_EN_recv( fd, + CHAR_getInt( charaindex, CHAR_X), + CHAR_getInt( charaindex, CHAR_Y)); + } +} + +void CHAR_CHAT_DEBUG_battleout( int charaindex, char* message ) +{ + + BATTLE_WatchStop( charaindex ); +} + +void CHAR_CHAT_DEBUG_petmake( int charaindex, char* message ) +{ + int ret; + int enemynum; + int enemyid; + int i,j; + int level=-1; + char buf[10]; + char cdkey[CDKEYLEN]; + char token[255]; + int playernum = CHAR_getPlayerMaxNum(); + easyGetTokenFromString( message , 1 , buf, sizeof(buf)); + enemyid=atoi(buf); + easyGetTokenFromString( message , 2 , buf, sizeof(buf)); + level=atoi(buf); + easyGetTokenFromString( message , 3 , cdkey, sizeof(cdkey)); + if(strlen(cdkey)>0){ + for(j=0;j=playernum) + { + CHAR_talkToCli( charaindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + enemynum = ENEMY_getEnemyNum(); + for( i = 0; i < enemynum; i ++ ) { + if( ENEMY_getInt( i, ENEMY_ID) == enemyid) { + break; + } + } + if( i == enemynum )return; + + ret = ENEMY_createPetFromEnemyIndex( j, i); + if( !CHAR_CHECKINDEX( ret))return; + snprintf( token,sizeof( token), "宠物制作成功\!",ret); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORWHITE); + sprintf( token, "[GM]%s制作了只宠物给你!index[%d]", CHAR_getChar( charaindex, CHAR_NAME),ret); + CHAR_talkToCli( j, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "给玩家%s的宠物制作成功!index[%d]", CHAR_getChar( j, CHAR_NAME),ret); + CHAR_talkToCli( charaindex, -1,token, CHAR_COLORYELLOW ); + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ){ + if( CHAR_getCharPet( j, i ) == ret )break; + } + if( i == CHAR_MAXPETHAVE )i = 0; + + if( CHAR_CHECKINDEX( ret ) == TRUE ){ + CHAR_setMaxExpFromLevel( ret, CHAR_getInt( ret, CHAR_LV )); + } + if( level != -1 ){ + if( level > 200 ) level = 200; + if( level < 0 ) level = 0; + level = level - CHAR_getInt( ret, CHAR_LV ); + if( level > 0 ){ + int k; + for( k = 1; k <= level; k ++ ){ //升级 + CHAR_PetLevelUp( ret ); + CHAR_PetAddVariableAi( ret, AI_FIX_PETLEVELUP ); + CHAR_setInt( ret, CHAR_LV, CHAR_getInt( ret, CHAR_LV) +1 ); + } + } + } + + snprintf( token, sizeof( token ), "K%d", i ); + CHAR_sendStatusString( j, token ); + snprintf( token, sizeof( token ), "W%d", i ); + CHAR_sendStatusString( j, token ); + }else{ + enemynum = ENEMY_getEnemyNum(); + for( i = 0; i < enemynum; i ++ ) { + if( ENEMY_getInt( i, ENEMY_ID) == enemyid) { + break; + } + } + if( i == enemynum )return; + + ret = ENEMY_createPetFromEnemyIndex(charaindex, i); + if( !CHAR_CHECKINDEX( ret))return; + snprintf( token,sizeof( token), "宠物制作成功\!index[%d]",ret); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORWHITE); + + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ){ + if( CHAR_getCharPet( charaindex, i ) == ret )break; + } + if( i == CHAR_MAXPETHAVE )i = 0; + + if( CHAR_CHECKINDEX( ret ) == TRUE ){ + CHAR_setMaxExpFromLevel( ret, CHAR_getInt( ret, CHAR_LV )); + } + if( level != -1 ){ + if( level > 200 ) level = 200; + if( level < 0 ) level = 0; + level = level - CHAR_getInt( ret, CHAR_LV ); + if( level > 0 ){ + int k; + for( k = 1; k <= level; k ++ ){ //升级 + CHAR_PetLevelUp( ret ); + CHAR_PetAddVariableAi( ret, AI_FIX_PETLEVELUP ); + CHAR_setInt( ret, CHAR_LV, CHAR_getInt( ret, CHAR_LV) +1 ); + } + } } + + + snprintf( token, sizeof( token ), "K%d", i ); + CHAR_sendStatusString( charaindex, token ); + snprintf( token, sizeof( token ), "W%d", i ); + CHAR_sendStatusString( charaindex, token ); + } +} + +void CHAR_CHAT_DEBUG_deletepet( int charaindex, char* message ) +{ + int i, pindex; + char category[12]; + int playernum = CHAR_getPlayerMaxNum(); + + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ) { + pindex = CHAR_getCharPet( charaindex, i); + if( CHAR_CHECKINDEX( pindex)) { + CHAR_endCharOneArray( pindex ); + CHAR_setCharPet( charaindex, i, -1); + snprintf( category, sizeof( category), "K%d",i); + CHAR_sendStatusString( charaindex, category ); + snprintf( category, sizeof( category), "W%d",i); + CHAR_sendStatusString( charaindex, category ); + } + } + + CHAR_talkToCli( charaindex, -1, "清除身上所有宠物。", CHAR_COLORWHITE); + +} + +#define MAXMESS_LISTNUM 8 +#define ALLRESET (MAXMESS_LISTNUM - 1) + +void CHAR_CHAT_DEBUG_reset( int charaindex, char* message ) +{ + int i; + char mess[MAXMESS_LISTNUM][256]={ "enemy", "encount", "magic", "warppoint", "petskill", "pettalk", "npc", "all"}; + + for( i=0; i= MAXMESS_LISTNUM ){ + CHAR_talkToCli( charaindex, -1, "指令错误", CHAR_COLORRED);//CHAR_COLORYELLOW + return; + } + switch( i){ + case ALLRESET: + case 0: + if( !ENEMYTEMP_reinitEnemy() || !ENEMY_reinitEnemy() ){ + CHAR_talkToCli( charaindex, -1, "重新读取敌人基本资料失败。", CHAR_COLORRED); + return; + } + if( i != ALLRESET ) break; + case 1: + if( !GROUP_reinitGroup() || !ENCOUNT_reinitEncount() ){ + CHAR_talkToCli( charaindex, -1, "重新读取遭遇团队资料失败。", CHAR_COLORRED); + } + if( i != ALLRESET ) break; + case 2: + if( !MAGIC_reinitMagic() || !ATTMAGIC_reinitMagic() ) { + CHAR_talkToCli( charaindex, -1, "重新读取咒术资料失败。", CHAR_COLORRED); + } + if( i != ALLRESET ) break; + case 3: + MAPPOINT_resetMapWarpPoint( 1); + if( !MAPPOINT_loadMapWarpPoint() ){ + CHAR_talkToCli( charaindex, -1, "重新读取跳跃点资料失败。", CHAR_COLORRED); + } + if( i != ALLRESET ) break; + case 4: + if( !PETSKILL_reinitPetskill() ) { + CHAR_talkToCli( charaindex, -1, "重新读取宠物技能资料失败。", CHAR_COLORRED); + } + if( i != ALLRESET ) break; + case 5: + LoadPetTalk(); + if( i != ALLRESET ) break; + break; + case 6: + CHAR_talkToCli( charaindex, -1, "未开放", CHAR_COLORRED); + return; + if( i != ALLRESET ) break; + break; + } + CHAR_talkToCli( charaindex, -1, "重新读取游戏资料。", CHAR_COLORYELLOW); +} + +void CHAR_CHAT_DEBUG_enemyrestart( int charaindex, char* message ) +{ + if( ENEMYTEMP_reinitEnemy()) { + CHAR_talkToCli( charaindex, -1, "再次读取敌人基本资料。", CHAR_COLORWHITE); + }else { + CHAR_talkToCli( charaindex, -1, "再次读取敌人基本资料失败。", CHAR_COLORWHITE); + } + + if( ENEMY_reinitEnemy()) { + CHAR_talkToCli( charaindex, -1, "再次读取敌人资料。", CHAR_COLORWHITE); + }else { + CHAR_talkToCli( charaindex, -1, "再次读取敌人基本资料失败。", CHAR_COLORWHITE); + } + + if( GROUP_reinitGroup()) { + CHAR_talkToCli( charaindex, -1, "再次读取团队资料。", CHAR_COLORWHITE); + }else { + CHAR_talkToCli( charaindex, -1, "再次读取团队资料失败。", CHAR_COLORWHITE); + } + if( ENCOUNT_reinitEncount()) { + CHAR_talkToCli( charaindex, -1, "再次读取遭遇资料。", CHAR_COLORWHITE); + } + else { + CHAR_talkToCli( charaindex, -1, "再次读取遭遇资料失败。", CHAR_COLORWHITE); + } + + if( MAGIC_reinitMagic()) { + CHAR_talkToCli( charaindex, -1, "再次读取咒术资料。", CHAR_COLORWHITE); + } + else { + CHAR_talkToCli( charaindex, -1, "再次读取咒术资料失败。", CHAR_COLORWHITE); + } + +#ifdef __ATTACK_MAGIC + if( ATTMAGIC_reinitMagic() ) + CHAR_talkToCli( charaindex , -1 , "再次读取咒术资料。" , CHAR_COLORWHITE ); + else + CHAR_talkToCli( charaindex , -1 , "再次读取咒术资料失败。" , CHAR_COLORWHITE ); +#endif + if( PETSKILL_reinitPetskill()) { + CHAR_talkToCli( charaindex, -1, "再次读取宠物技能资料。", CHAR_COLORWHITE); + } + else { + CHAR_talkToCli( charaindex, -1, "再次读取宠物技能资料失败。", CHAR_COLORWHITE); + } + + LoadPetTalk(); // Arminius 8.15 pet talk + CHAR_talkToCli( charaindex, -1, "再次读取宠物讲话资料。", CHAR_COLORWHITE); + +} + +void CHAR_CHAT_DEBUG_battlewatch( int charaindex, char* message ) +{ + int fd = getfdFromCharaIndex( charaindex ); + if( fd != -1) { + lssproto_LB_recv( fd, + CHAR_getInt( charaindex, CHAR_X), + CHAR_getInt( charaindex, CHAR_Y)); + } +} + +// shan 2001/12/18 Begin 由於改变过多,故将原先的function注掉 +void CHAR_CHAT_DEBUG_eventclean( int charaindex, char* message ) +{ +#ifdef _ADD_NEWEVENT // WON 多增任务旗标 + int event_num = 8; +#else + int event_num = 6; +#endif + + int point; + int shiftbit; + int eventno=0; + char token[1024]; + int array; + int shift; + char token_cdkey[256]="", token_name[256]="", cdkey[CDKEYLEN], token_flag[256]=""; + unsigned int max_user = 0; + BOOL find = FALSE; + BOOL ret1, ret2; + int charaindex_tmp = 0; + int i; + + getStringFromIndexWithDelim( message, " ", 1, token_flag, sizeof( token)); + ret1 = getStringFromIndexWithDelim( message, " ", 2, token_cdkey, sizeof( token_cdkey)); + ret2 = getStringFromIndexWithDelim( message, " ", 3, token_name, sizeof( token_name)); + shiftbit = atoi(token_flag); + eventno = atoi(token_flag); + + if( shiftbit!=-1 && ret1==FALSE && ret2==FALSE ){ + charaindex_tmp = charaindex; + find=TRUE; + }else{ + if( shiftbit==-1 || strlen(token_cdkey)==0 || strlen(token_name)==0 ){ + sprintf( token, "%s", "参数不正确。正确格式:[eventsetend 任务旗标 帐号 人物名称]"); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORWHITE); + return; + } + max_user = getFdnum(); + for( i=0; i=event_num ){ + sprintf( token, "错误!!你所设的任务旗标编号已超过 围(0~%d)。",32*event_num-1); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORWHITE); + return; + } + point = CHAR_getInt( charaindex_tmp, CHAR_ENDEVENT+array); + point = point & ~(1<=event_num ){ + sprintf( token, "错误!!你所设的任务旗标编号已超过 围(0~%d)。",32*event_num-1); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORWHITE); + return; + } + point = CHAR_getInt( charaindex_tmp, CHAR_NOWEVENT+array); + point = point | (1<=event_num ){ + sprintf( token, "错误!!你所设的任务旗标编号已超过 围(0~%d)。",32*event_num-1); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORWHITE); + return; + } + point = CHAR_getInt( charaindex_tmp, CHAR_ENDEVENT+array); + point = point | (1<0){ + for(i=0;i=playernum) + { + CHAR_talkToCli( charindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + CHAR_setInt( i , CHAR_DUELPOINT, atoi( dp ) ); + CHAR_send_P_StatusString( i ,CHAR_P_STRING_DUELPOINT ); + sprintf( token, "[GM]%s把你的DP设置为%d!", CHAR_getChar( charindex, CHAR_NAME),(int)atoi(dp)); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "玩家%s的DP设置为%d!", CHAR_getChar( i, CHAR_NAME),(int)atoi(dp)); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + }else{ + CHAR_setInt( charindex , CHAR_DUELPOINT, atoi( dp ) ); + CHAR_send_P_StatusString( charindex ,CHAR_P_STRING_DUELPOINT ); + sprintf( token, "DP设置为%d!",(int)atoi(dp)); + CHAR_talkToCli( charindex, -1,token, CHAR_COLORYELLOW ); + } +} + +#ifdef _EQUIT_ARRANGE +void CHAR_CHAT_DEBUG_arrange( int charindex , char *message ) +{ + CHAR_setWorkInt( charindex, CHAR_WORKFIXARRANGE, atoi( message) ); + CHAR_complianceParameter( charindex ); + CHAR_talkToCli( charindex, -1, "设定挡格", CHAR_COLORYELLOW); +} +#endif + + +#ifdef _EQUIT_SEQUENCE +void CHAR_CHAT_DEBUG_sequence( int charindex , char *message ) +{ + CHAR_setWorkInt( charindex, CHAR_WORKFIXSEQUENCE, atoi( message) ); + CHAR_complianceParameter( charindex ); + CHAR_talkToCli( charindex, -1, "设定顺序", CHAR_COLORYELLOW); +} +#endif + +#define ITEMRESERVESTRING "item" +#define POOLITEMRESERVESTRING "poolitem" + +void CHAR_CHAT_DEBUG_setmerge_main( int charaindex, char* message, int mode ) +{ + int haveitemindex = atoi( message); + int itemindex; + + if( !CHAR_CHECKITEMINDEX( charaindex, haveitemindex) ){ + CHAR_talkToCli( charaindex, -1, "号码很奇怪。", CHAR_COLORWHITE); + return; + } + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if( !ITEM_CHECKINDEX( itemindex)) { + CHAR_talkToCli( charaindex, -1, "该处是否没有任何道具,情报亦很奇怪。", CHAR_COLORWHITE); + return; + } + ITEM_setInt( itemindex, ITEM_MERGEFLG, mode); + + CHAR_talkToCli( charaindex, -1, "宁岳白仿弘及丑综毛仄引仄凶[", CHAR_COLORWHITE); + + CHAR_sendItemDataOne( charaindex, haveitemindex); +} + +void CHAR_CHAT_DEBUG_effect( int charaindex, char* message ) +{ + int floorid=-1, effectid=-1, level=0; + char buf[ 256]; + int i; + int playernum = CHAR_getPlayerMaxNum(); + BOOL flg = FALSE; + + getStringFromIndexWithDelim( message, " ", 1, buf, sizeof( buf)); + if( strcmp( buf, "alloff" ) == 0 ) { + flg = TRUE; + }else { + floorid = atoi( buf); + if( !getStringFromIndexWithDelim( message, " ", 2, buf, sizeof( buf))) { + return; + } + effectid = atoi( buf); + if( !getStringFromIndexWithDelim( message, " ", 3, buf, sizeof( buf))) { + return; + } + level = atoi( buf); + } + for( i = 0 ; i < playernum; i ++) { + if( CHAR_CHECKINDEX( i)) { + if( CHAR_getInt( i, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER){ + if( flg) { + int ef = CHAR_getWorkInt( i, CHAR_WORKEFFECT); + if( ef != 0 ) { + int fd = getfdFromCharaIndex( i); + lssproto_EF_send( fd, 0, 0, ""); + CHAR_setWorkInt( i, CHAR_WORKEFFECT, 0); + } + } + else if( CHAR_getInt( i, CHAR_FLOOR) == floorid ) { + int fd = getfdFromCharaIndex( i); + lssproto_EF_send( fd, effectid, level, ""); + if( level == 0 ) { + CHAR_setWorkInt( i, CHAR_WORKEFFECT, + CHAR_getWorkInt( i, CHAR_WORKEFFECT) & + ~effectid); + } + else { + CHAR_setWorkInt( i, CHAR_WORKEFFECT, + CHAR_getWorkInt( i, CHAR_WORKEFFECT) | + effectid); + } + } + } + } + } +} + +void CHAR_CHAT_DEBUG_setTrans( int charaindex, char *message) +{ + int i; + char setTrans[15]; + char cdkey[CDKEYLEN]; + char token[255]; + int playernum = CHAR_getPlayerMaxNum(); + easyGetTokenFromString( message , 1 , setTrans, sizeof(setTrans)); + easyGetTokenFromString( message , 2 , cdkey, sizeof(cdkey)); + if(strlen(cdkey)>0){ + for(i=0;i=playernum) + { + CHAR_talkToCli( charaindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + CHAR_setInt(i, CHAR_TRANSEQUATION, 0); + CHAR_setInt(i, CHAR_TRANSMIGRATION, atoi( setTrans )); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( i, CHAR_WORKOBJINDEX )); + sprintf( token, "[GM]%s把你转生设置为%d转!", CHAR_getChar( charaindex, CHAR_NAME),(int)atoi(setTrans)); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "玩家%s转生设置为%d转!", CHAR_getChar( i, CHAR_NAME),(int)atoi(setTrans)); + CHAR_talkToCli( charaindex, -1,token, CHAR_COLORYELLOW ); + }else{ + CHAR_setInt(charaindex, CHAR_TRANSEQUATION, 0); + CHAR_setInt(charaindex, CHAR_TRANSMIGRATION, atoi( setTrans )); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX )); + sprintf( token, "转生设置为%d转!",(int)atoi(setTrans)); + CHAR_talkToCli( charaindex, -1,token, CHAR_COLORYELLOW ); + } +} + +void CHAR_CHAT_DEBUG_shutup(int charindex ,char *message) +{ + char token[100]; + char token1[100]; + char cdkey[CDKEYLEN]; + char buf[256]; + char line[256]; + unsigned int MAX_USER=0,i; + BOOL flg; + easyGetTokenFromString( message , 1 , token, sizeof(token)); + easyGetTokenFromString( message , 2 , token1, sizeof(token1)); + if( strlen(message)==0){ + sprintf(buf,"%s","参数不正确"); + CHAR_talkToCli( charindex, -1,buf, CHAR_COLORYELLOW); + return; + } + if( strlen(token1)==0){ + sprintf(buf,"%s","参数不正确--> ON OFF"); + CHAR_talkToCli( charindex, -1,buf, CHAR_COLORYELLOW); + return; + } + flg = isstring1or0( token1); + MAX_USER=getFdnum(); + for(i=0;i= 10 )MOREs = TRUE; + } + } + + memset( token, 0, sizeof(token)); + strcpy( token, "MORE:"); + for( i=0; i= sizeof(token) ){ + CHAR_talkToCli( charindex, -1 , token , CHAR_COLORWHITE); + memset( token, 0, sizeof(token)); + strcpy( token, "MORE:"); + } + strcat( token, temp); + continue; + } + } + sprintf( buf1, "NAME:%s UName:%s CDKey:%s Point:[%d,%d,%d]", + CHAR_getChar( userindex, CHAR_NAME), CHAR_getUseName( userindex), + CHAR_getChar( userindex, CHAR_CDKEY), + CHAR_getInt( userindex, CHAR_FLOOR), CHAR_getInt( userindex, CHAR_X), + CHAR_getInt( userindex, CHAR_Y) ); + CHAR_talkToCli( charindex, -1 , buf1 , colors); + } + if( MOREs == TRUE ){ + CHAR_talkToCli( charindex, -1 , token , CHAR_COLORWHITE); + } +} + +void CHAR_CHAT_DEBUG_waeikick( int charindex, char* message ) +{ + char token[100]; + char cdkey[CDKEYLEN]; + char kcmsg[256],kctalk[256]; + char szName[256]; + char buf[256]; + BOOL find=FALSE; + int i=0; + unsigned int MAX_USER=0; + int fd_charaindex; + if( strlen(message)==0){ + sprintf(buf,"%s","参数不正确-> 帐号"); + CHAR_talkToCli( charindex, -1,buf, CHAR_COLORWHITE); + return; + } + easyGetTokenFromString( message , 1 , token, sizeof(token)); + if( strlen(token)==0){ + sprintf(buf,"%s","参数不正确"); + CHAR_talkToCli( charindex, -1,buf, CHAR_COLORWHITE); + return; + } + MAX_USER=getFdnum(); + for(i=0;i 帐号"); + CHAR_talkToCli( charindex, -1,buf, CHAR_COLORWHITE); + return; + } + easyGetTokenFromString( message , 1 , token, sizeof(token)); + if( strlen(token)==0){ + sprintf(buf,"%s","参数不正确"); + CHAR_talkToCli( charindex, -1,buf, CHAR_COLORWHITE); + return; + } + MAX_USER=getFdnum(); + for(i=0;i FLOOR X Y 帐号"); + CHAR_talkToCli( charindex, -1,buf, CHAR_COLORWHITE); + return; + } + easyGetTokenFromString( message , 1 , token, sizeof(token)); + if( strlen(token)==0){ + sprintf(buf,"%s","参数不正确-->地图编号"); + CHAR_talkToCli( charindex, -1,buf, CHAR_COLORWHITE); + return; + } + fl=atoi( token ); + easyGetTokenFromString( message , 2 , token, sizeof(token)); + if( strlen(token)==0){ + sprintf(buf,"%s","参数不正确-->X座标 "); + CHAR_talkToCli( charindex, -1,buf, CHAR_COLORWHITE); + return; + } + x = atoi( token ); + easyGetTokenFromString( message , 3 , token, sizeof(token)); + if( strlen(token)==0){ + sprintf(buf,"%s","参数不正确-->Y座标 "); + CHAR_talkToCli( charindex, -1,buf, CHAR_COLORWHITE); + return; + } + y = atoi( token ); + easyGetTokenFromString( message , 4 , token, sizeof(token)); + if( strlen(token)==0){ + sprintf(buf,"%s","参数不正确-->帐号"); + CHAR_talkToCli( charindex, -1,buf, CHAR_COLORWHITE); + return; + } + for(i=0;i clear/add/send 请用小写"); + CHAR_talkToCli(charaindex, -1, buf, CHAR_COLORWHITE); + return; + } + easyGetTokenFromString(message, 1, cmd, sizeof(cmd)); + if (strcmp(cmd,"clear")==0) { + FILE *f=fopen(ANNOUNCEFILE,"w"); + + strcpy(buf, "石器时代公告\n"); + fwrite(buf, strlen(buf), 1, f); + fclose(f); + LoadAnnounce(); + CHAR_talkToCli(charaindex, -1, "OK", CHAR_COLORWHITE); + } else if (strcmp(cmd,"add")==0) { + FILE *f; + + easyGetTokenFromString(message, 2, say, sizeof(say)); + if (strlen(say)==0) { + sprintf(buf,"%s","参数不正确"); + CHAR_talkToCli(charaindex, -1, buf, CHAR_COLORWHITE); + return; + } + + if (!(f=fopen(ANNOUNCEFILE,"a+"))) { + f=fopen(ANNOUNCEFILE,"w"); + strcpy(buf, "石器时代公告\n"); + fwrite(buf, strlen(buf), 1, f); + } + fwrite(say, strlen(say), 1, f); + fwrite("\n", sizeof(char), 1, f); + fclose(f); + LoadAnnounce(); + CHAR_talkToCli(charaindex, -1, "OK", CHAR_COLORWHITE); + } else if (strcmp(cmd,"send")==0) { + int i; + + for (i=0; i clear/add/send (请用小写)"); + CHAR_talkToCli(charaindex, -1, buf, CHAR_COLORWHITE); + return; + } +} + +void CHAR_CHAT_DEBUG_checklock( int charaindex, char* message ) +{ + char cmd[256]; + if( strlen(message)==0){ + CHAR_talkToCli(charaindex, -1, "参数不正确", CHAR_COLORWHITE); + return; + } + easyGetTokenFromString( message, 1, cmd, sizeof(cmd)); + saacproto_ACLock_send( acfd, cmd, 2, getFdidFromCharaIndex( charaindex)); +} + +void CHAR_CHAT_DEBUG_unlock( int charaindex, char* message ) +{ + char cmd[256]; +#ifdef _WAEI_KICK + int act=1; +#endif + + if( strlen(message)==0){ + CHAR_talkToCli(charaindex, -1, "参数不正确", CHAR_COLORWHITE); + return; + } + easyGetTokenFromString(message, 1, cmd, sizeof(cmd)); +#ifdef _WAEI_KICK + saacproto_ACKick_send( acfd, cmd, getFdidFromCharaIndex( charaindex), act); +#else + saacproto_ACLock_send( acfd, cmd, 3, getFdidFromCharaIndex( charaindex)); +#endif +} + +void CHAR_CHAT_DEBUG_unlockserver( int charaindex, char* message ) +{ + char cmd[256]; + + if( strlen(message)==0){ + CHAR_talkToCli(charaindex, -1, "参数不正确", CHAR_COLORWHITE); + return; + } + easyGetTokenFromString(message, 1, cmd, sizeof(cmd)); + saacproto_ACLock_send( acfd, cmd, 4, getFdidFromCharaIndex( charaindex)); +} + +void CHAR_CHAT_DEBUG_fixfmdata(int charaindex, char *message) +{ + char szCmd[64],szData[64],szFamilyID[8],szID[64]; + int i,index = -1,charindex = -1,iPlayerNum = CHAR_getPlayerMaxNum(); + + if(message == NULL || getStringFromIndexWithDelim(message," ",1,szFamilyID,sizeof(szFamilyID)) == FALSE){ + CHAR_talkToCli(charaindex, -1, "参数不正确 [fixfmdata <家族ID> <帐号(or -1)> ]",CHAR_COLORRED); + return; + } + if(message == NULL || getStringFromIndexWithDelim(message," ",2,szID,sizeof(szID)) == FALSE){ + CHAR_talkToCli(charaindex, -1, "参数不正确 [fixfmdata <家族ID> <帐号(or -1)> ]",CHAR_COLORRED); + return; + } + if(message == NULL || getStringFromIndexWithDelim(message," ",3,szCmd,sizeof(szCmd)) == FALSE){ + CHAR_talkToCli(charaindex, -1, "参数不正确 [fixfmdata <家族ID> <帐号(or -1)> ]",CHAR_COLORRED); + return; + } + if(message == NULL || getStringFromIndexWithDelim(message," ",4,szData,sizeof(szData)) == FALSE){ + CHAR_talkToCli(charaindex, -1, "参数不正确 [fixfmdata <家族ID> <帐号(or -1)> ]",CHAR_COLORRED); + return; + } + index = atoi(szFamilyID); + if(index < 1 || index > 1000){ + CHAR_talkToCli(charaindex,-1,"id 值错误", CHAR_COLORRED); + return; + } + index -= 1; + if(szID[0] != '-' && szID[1] != '1'){ + for(i=0;i id]"); + CHAR_talkToCli(charaindex, -1, buf, CHAR_COLORWHITE); + return; + } + + easyGetTokenFromString(message, 1, cmd, sizeof(cmd)); + if (strcmp(cmd,"allpeace")==0) { +#ifdef _NEW_MANOR_LAW + struct tm tm1; + + memcpy( &tm1, localtime( (time_t *)&NowTime.tv_sec), sizeof( tm1)); +#endif + CHAR_talkToCli(charaindex, -1, "allpeace", CHAR_COLORWHITE); + easyGetTokenFromString(message, 2, cmd, sizeof(cmd)); + manorid=atoi(cmd); + if ((manorid<1)||(manorid>MANORNUM)) { + sprintf(buf,"%s","参数不正确。 id 必须在 1~9 之间。"); + CHAR_talkToCli(charaindex, -1, buf, CHAR_COLORWHITE); + return; + } + memcpy( &tm1, localtime( (time_t *)&NowTime.tv_sec), sizeof( tm1)); + for (i=0; iMANORNUM)) { + sprintf(buf,"%s","参数不正确。 id 必须在 1~9 之间。"); + CHAR_talkToCli(charaindex, -1, buf, CHAR_COLORWHITE); + return; + } + for (i=0; i id]"); + CHAR_talkToCli(charaindex, -1, buf, CHAR_COLORWHITE); + } +} + +void CHAR_CHAT_DEBUG_shutdown(int charindex , char *message ) +{ + char token[10]; + int iTime; + easyGetTokenFromString( message , 1 , token, sizeof(token)); + iTime = atoi( token ); + lssproto_Shutdown_recv(0, "hogehoge", iTime); +} + +void CHAR_CHAT_DEBUG_watchevent( int charaindex, char* message ) +{ +#ifdef _ADD_NEWEVENT // WON 多增任务旗标 + int event_num = 8; +#else + int event_num = 6; +#endif + + unsigned int max_user = 0; + int charaindex_tmp = 0; + int count = 0, point, ckpoint, i, j; + char token_cdkey[256], token_name[256], cdkey[CDKEYLEN]; + char buf[1024], buf1[64]; + BOOL find = FALSE; + + if( strlen(message)==0 ){ + charaindex_tmp = charaindex; + find=TRUE; + }else{ + getStringFromIndexWithDelim( message, " ", 1, token_cdkey, sizeof( token_cdkey)); + getStringFromIndexWithDelim( message, " ", 2, token_name, sizeof( token_name)); + if( strlen(token_cdkey)==0 || strlen(token_name)==0 ){ + sprintf(buf,"%s","参数不正确。正确格式:[wahctevent 帐号 人物名称]"); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORWHITE); + return; + } + max_user = getFdnum(); + for( i=0; i 4 || level < 1 || level > gminfo[i].level) + { + CHAR_talkToCli( charaindex, -1, "修改失败,无法将此帐号等级修改的比自己等级高!level(1~3)", CHAR_COLORWHITE); + return; + } + for (i = 0; i < GMMAXNUM; i++) + { + if (strcmp(id, gminfo[i].cdkey) == 0) + { + if (gminfo[i].level > charlevel) + { + snprintf(tmpbuf, sizeof(tmpbuf), "修改失败,无法修改等级比自己高的帐号!"); + CHAR_talkToCli(charaindex, -1, tmpbuf, CHAR_COLORWHITE); + return; + } + gminfo[i].level = level; + snprintf(tmpbuf, sizeof(tmpbuf), "修改%s等级为%dOK!", gminfo[i].cdkey, gminfo[i].level); + CHAR_talkToCli(charaindex, -1, tmpbuf, CHAR_COLORWHITE); + changeflag = 1; + break; + } + } + if (changeflag == 0) + { + snprintf(tmpbuf, sizeof(tmpbuf), "GM列表中查无此帐号,修改失败!"); + CHAR_talkToCli(charaindex, -1, tmpbuf, CHAR_COLORWHITE); + } + } +} +#endif + +void CHAR_CHAT_DEBUG_checktrade( int charaindex, char*message ) +{ + if( !strcmp( message, "waei" ) ){ + TRADE_CheckTradeListUser(); + } +} + +void CHAR_CHAT_DEBUG_showtemp( int charaindex, char*message ) +{ +#ifdef _NPC_SEPARATEDATA + if( !CHAR_CHECKINDEX( charaindex) ) return; + if( !strcmp( message, "waei" ) ) + CHAR_showTempInt( charaindex); +#endif +} + +#ifdef _TEST_PETCREATE +int avg_num; +int m_cindex=-1; +typedef struct AllCreatPetMy +{ + char name[128]; + int petId; + int char_lv; + int char_hp; + int char_vital; + int char_str; + int char_tgh; + int char_dex; + int vital; + int str; + int tgh; + int dex; + int fixstr; + int fixtgh; + int fixdex; + int creat_num; +}AllCreatPet; +AllCreatPet AVGCREATPET[380]={ + {"",-1,0,0,0,0,0,0,0,0,0,0,0,0,0,-1}, +}; +void ResetAVGCREATPET() +{ + int i; + for( i=0; i 10000 ) + return; + if( pet_Id1 < 0 || pet_Id2 < 0 || pet_Id1 > pet_Id2 ) + return; + + ResetAVGCREATPET(); + i=0; + for( ID=pet_Id1 ; ID <= pet_Id2; ID++) { + AVGCREATPET[i].petId = ID; + AVGCREATPET[i].char_lv = pet_Lv; + AVGCREATPET[i].creat_num = pet_Num; + AVGCREATPET[i+1].petId = ID; + AVGCREATPET[i+1].char_lv = pet_Lv; + AVGCREATPET[i+1].creat_num = pet_Num; + print(" AVGCREATPET[%d].petId[%d]", i, ID); + i+=2; + if( i > arraysizeof( AVGCREATPET)-1 ) + break; + } + avg_num = pet_Num; + + { + char buf[256]; + sprintf( buf,"CREAT[%d-%d] LV=%d,num=%d ", pet_Id1, pet_Id2, pet_Lv,pet_Num); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + m_cindex = charaindex; + } + return; +} +void DefPetNum( int flg, int petId) +{ + char buf[128]; + AVGCREATPET[flg].char_hp /= avg_num; + AVGCREATPET[flg].char_vital /= avg_num; + AVGCREATPET[flg].char_str /= avg_num; + AVGCREATPET[flg].char_tgh /= avg_num; + AVGCREATPET[flg].char_dex /= avg_num; + AVGCREATPET[flg].vital /= avg_num; + AVGCREATPET[flg].str /= avg_num; + AVGCREATPET[flg].tgh /= avg_num; + AVGCREATPET[flg].dex /= avg_num; + AVGCREATPET[flg].fixstr /= avg_num; + AVGCREATPET[flg].fixtgh /= avg_num; + AVGCREATPET[flg].fixdex /= avg_num; + + AVGCREATPET[flg+1].char_hp /= avg_num; + AVGCREATPET[flg+1].char_vital /= avg_num; + AVGCREATPET[flg+1].char_str /= avg_num; + AVGCREATPET[flg+1].char_tgh /= avg_num; + AVGCREATPET[flg+1].char_dex /= avg_num; + AVGCREATPET[flg+1].vital /= avg_num; + AVGCREATPET[flg+1].str /= avg_num; + AVGCREATPET[flg+1].tgh /= avg_num; + AVGCREATPET[flg+1].dex /= avg_num; + AVGCREATPET[flg+1].fixstr /= avg_num; + AVGCREATPET[flg+1].fixtgh /= avg_num; + AVGCREATPET[flg+1].fixdex /= avg_num; + + sprintf( buf,"%s_%d.log" ,"creatpetlog", petId ); + backupTempLogFile( buf, "creatpetlog" , AVGCREATPET[flg].creat_num ); + + LogCreatPet( + AVGCREATPET[flg].name, + AVGCREATPET[flg].petId , + 1, AVGCREATPET[flg].char_hp, + AVGCREATPET[flg].char_vital, AVGCREATPET[flg].char_str, + AVGCREATPET[flg].char_tgh, AVGCREATPET[flg].char_dex, + AVGCREATPET[flg].vital, AVGCREATPET[flg].str, + AVGCREATPET[flg].fixstr,AVGCREATPET[flg].fixtgh, + AVGCREATPET[flg].tgh, AVGCREATPET[flg].dex, + AVGCREATPET[flg].fixdex, + avg_num, 0, 1 ); + LogCreatPet( + AVGCREATPET[flg+1].name, + AVGCREATPET[flg+1].petId , + AVGCREATPET[flg+1].char_lv, AVGCREATPET[flg+1].char_hp, + AVGCREATPET[flg+1].char_vital, AVGCREATPET[flg+1].char_str, + AVGCREATPET[flg+1].char_tgh, AVGCREATPET[flg+1].char_dex, + AVGCREATPET[flg+1].vital, AVGCREATPET[flg+1].str, + AVGCREATPET[flg+1].fixstr,AVGCREATPET[flg+1].fixtgh, + AVGCREATPET[flg+1].tgh, AVGCREATPET[flg+1].dex, + AVGCREATPET[flg+1].fixdex, + avg_num, 0, 1 ); + +} + +void TEST_CreatPet( ) +{ + int floor=777; + char buf[128]; + int petindex; + int ret,pet_list; + int k,lvup,i,j; + int ID=-1; + int pet_Num=40,struct_num=-1; + int pet_Lv = -1; + + { + if( m_cindex >= 0 ) { + char buf[256]; + sprintf( buf,"CREAT Start !!"); + CHAR_talkToCli( m_cindex, -1, buf, CHAR_COLORYELLOW); + } + } + + if( AVGCREATPET[0].creat_num <= 0 && AVGCREATPET[0].petId < 0 ) { + if( m_cindex >= 0 ) + CHAR_talkToCli( m_cindex, -1, "FAIL !", CHAR_COLORYELLOW); + m_cindex = -1; + return; + }else { + if( m_cindex >= 0 ) + CHAR_talkToCli( m_cindex, -1, "OK !", CHAR_COLORYELLOW); + m_cindex = -1; + } + + for( i=arraysizeof( AVGCREATPET)-2; i>=0; i-=2 ) { //creat_num + if( AVGCREATPET[i].petId >= 0 ) { + if( AVGCREATPET[i].creat_num <= 0 ) { + AVGCREATPET[ i].petId = -1; + AVGCREATPET[i+1].petId = -1; + }else { + ID = AVGCREATPET[i].petId; + struct_num = i; + pet_Lv = AVGCREATPET[i].char_lv; + break; + } + } + } + if( ID < 0 && pet_Lv <= 0 && struct_num <= 0 ) + return; + + pet_list = ENEMY_getEnemyArrayFromId( ID); + if( !ENEMY_CHECKINDEX( pet_list) ){ + AVGCREATPET[ struct_num].petId = -1; + AVGCREATPET[struct_num+1].petId = -1; + AVGCREATPET[struct_num].creat_num = 0; + AVGCREATPET[struct_num+1].creat_num = 0; + return; + } + + //creat宠物 + for( j=0; j < pet_Num; j++ ) { + if( AVGCREATPET[struct_num].creat_num <= 0 ) { + DefPetNum( struct_num, AVGCREATPET[struct_num].petId); + AVGCREATPET[struct_num].petId = -1; + AVGCREATPET[struct_num+1].petId = -1; + AVGCREATPET[struct_num].creat_num = 0; + AVGCREATPET[struct_num+1].creat_num = 0; + //计算 + return; + } + ret = ENEMY_TEST_createPetIndex( pet_list ); + //ret = ENEMY_createPetFromEnemyIndex( charaindex, pet_list); + if( CHAR_CHECKINDEX( ret ) == TRUE ){ + CHAR_setMaxExpFromLevel( ret, pet_Lv); + } + petindex = ret; + //log + CHAR_complianceParameter( petindex ); + lvup = CHAR_getInt( petindex, CHAR_ALLOCPOINT); + LogCreatPet( CHAR_getChar( petindex, CHAR_NAME ), CHAR_getInt( petindex, CHAR_PETID ), + CHAR_getInt( petindex, CHAR_LV ), + CHAR_getInt( petindex, CHAR_HP ), + CHAR_getInt( petindex, CHAR_VITAL), CHAR_getInt( petindex, CHAR_STR), + CHAR_getInt( petindex, CHAR_TOUGH), CHAR_getInt( petindex, CHAR_DEX), + (lvup >> 24 ), ((lvup >> 16)&0xff), ((lvup >> 8)&0xff), (lvup&0xff), + CHAR_getWorkInt(petindex,CHAR_WORKFIXSTR), + CHAR_getWorkInt(petindex,CHAR_WORKFIXTOUGH), + CHAR_getWorkInt(petindex,CHAR_WORKFIXDEX), + lvup, CHAR_getInt( petindex, CHAR_PETRANK ) , 0 ); + + sprintf( buf,"%s", CHAR_getChar( petindex, CHAR_NAME )); + memcpy( AVGCREATPET[struct_num].name, buf, sizeof( AVGCREATPET[struct_num].name) ); + AVGCREATPET[struct_num].creat_num -=1; + //记录 + AVGCREATPET[struct_num].char_hp += CHAR_getInt( petindex, CHAR_HP ); + AVGCREATPET[struct_num].char_vital += CHAR_getInt( petindex, CHAR_VITAL); + AVGCREATPET[struct_num].char_str += CHAR_getInt( petindex, CHAR_STR); + AVGCREATPET[struct_num].char_tgh += CHAR_getInt( petindex, CHAR_TOUGH); + AVGCREATPET[struct_num].char_dex += CHAR_getInt( petindex, CHAR_DEX); + + AVGCREATPET[struct_num].vital += (lvup >> 24 ); + AVGCREATPET[struct_num].str += ((lvup >> 16)&0xff); + AVGCREATPET[struct_num].tgh += ((lvup >> 8)&0xff); + AVGCREATPET[struct_num].dex += (lvup&0xff); + + AVGCREATPET[struct_num].fixstr = CHAR_getWorkInt(petindex,CHAR_WORKFIXSTR); + AVGCREATPET[struct_num].fixtgh = CHAR_getWorkInt(petindex,CHAR_WORKFIXTOUGH); + AVGCREATPET[struct_num].fixdex = CHAR_getWorkInt(petindex,CHAR_WORKFIXDEX); + + CHAR_PetTakeLevelUp( petindex, pet_Lv);//强制宠物升级 + CHAR_setInt( petindex , CHAR_HP , CHAR_getWorkInt( petindex , CHAR_WORKMAXHP ) ); + + //log + lvup = CHAR_getInt( petindex, CHAR_ALLOCPOINT); + LogCreatPet( CHAR_getChar( petindex, CHAR_NAME ), CHAR_getInt( petindex, CHAR_PETID ), + CHAR_getInt( petindex, CHAR_LV ), + CHAR_getInt( petindex, CHAR_HP ), + CHAR_getInt( petindex, CHAR_VITAL), CHAR_getInt( petindex, CHAR_STR), + CHAR_getInt( petindex, CHAR_TOUGH), CHAR_getInt( petindex, CHAR_DEX), + (lvup >> 24 ), ((lvup >> 16)&0xff), ((lvup >> 8)&0xff), (lvup&0xff), + CHAR_getWorkInt(petindex,CHAR_WORKFIXSTR), + CHAR_getWorkInt(petindex,CHAR_WORKFIXTOUGH), + CHAR_getWorkInt(petindex,CHAR_WORKFIXDEX), + lvup, CHAR_getInt( petindex, CHAR_PETRANK ) , 0); + + sprintf( buf,"%s", CHAR_getChar( petindex, CHAR_NAME )); + memcpy( AVGCREATPET[struct_num+1].name, buf, sizeof( AVGCREATPET[struct_num+1].name) ); + AVGCREATPET[struct_num+1].creat_num -=1; + AVGCREATPET[struct_num + 1].char_hp += CHAR_getInt( petindex, CHAR_HP ); + AVGCREATPET[struct_num + 1].char_vital += CHAR_getInt( petindex, CHAR_VITAL); + AVGCREATPET[struct_num + 1].char_str += CHAR_getInt( petindex, CHAR_STR); + AVGCREATPET[struct_num + 1].char_tgh += CHAR_getInt( petindex, CHAR_TOUGH); + AVGCREATPET[struct_num + 1].char_dex += CHAR_getInt( petindex, CHAR_DEX); + + AVGCREATPET[struct_num + 1].vital += (lvup >> 24 ); + AVGCREATPET[struct_num + 1].str += ((lvup >> 16)&0xff); + AVGCREATPET[struct_num + 1].tgh += ((lvup >> 8)&0xff); + AVGCREATPET[struct_num + 1].dex += (lvup&0xff); + + AVGCREATPET[struct_num + 1].fixstr = CHAR_getWorkInt(petindex,CHAR_WORKFIXSTR); + AVGCREATPET[struct_num + 1].fixtgh = CHAR_getWorkInt(petindex,CHAR_WORKFIXTOUGH); + AVGCREATPET[struct_num + 1].fixdex = CHAR_getWorkInt(petindex,CHAR_WORKFIXDEX); + + CHAR_PetTakeDrop( petindex, floor, -1, -1); //强制丢弃宠物 + CHAR_setInt( petindex, CHAR_PUTPETTIME, NowTime.tv_sec); + } + + sprintf( buf,"%s_%d.log" ,"creatpetlog", AVGCREATPET[struct_num].petId ); + backupTempLogFile( buf, "creatpetlog" , AVGCREATPET[struct_num].creat_num); + + for( k=20000; k>=0; k-- ) { + if( CHAR_CHECKINDEX( k ) == FALSE ) + continue; + if( CHAR_getInt ( k, CHAR_WHICHTYPE) != CHAR_TYPEPET ) + continue; + if( CHAR_getInt( k, CHAR_FLOOR ) == 777 ) { + CHAR_CharaDelete( k); + ITEM_endExistItemsOne( k); + } + } +} +#endif +void CHAR_CHAT_DEBUG_cleanfloor( int charaindex, char *message) +{ + char buf[256]; + int floor, objindex, itemnum=0,petnum=0,goldnum=0; + int objmaxnum = OBJECT_getNum(); + + floor = atoi( message); + for( objindex=0; objindex 10000) set_num = 10000; + CHAR_setInt( charaindex, CHAR_GAMBLENUM, set_num); + + sprintf( buf,"个人游乐场积分设为%d点。", CHAR_getInt( charaindex, CHAR_GAMBLENUM)); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + return; +} + +#endif + + +void CHAR_CHAT_DEBUG_petlevelup( int charaindex, char* message ) +{ + int level, petindex, petid, mylevel,i,j,k; + char buf[10]; + char cdkey[CDKEYLEN]; + char token[255]; + int playernum = CHAR_getPlayerMaxNum(); + easyGetTokenFromString( message , 1 , buf, sizeof(buf)); + level=atoi(buf); + easyGetTokenFromString( message , 2 , buf, sizeof(buf)); + petid=atoi(buf)-1; + easyGetTokenFromString( message , 3 , cdkey, sizeof(cdkey)); + + if(level > 200 ) level=200; + + if(strlen(cdkey)>0){ + for(i=0;i=playernum) + { + CHAR_talkToCli( charaindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + petindex = CHAR_getCharPet( i, petid); + if( !CHAR_CHECKINDEX( petindex) ){ + sprintf( token, "玩家%s宠物栏%d上没宠物!", CHAR_getChar( i, CHAR_NAME),petid); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + return; + } + mylevel = CHAR_getInt( petindex, CHAR_LV); + level = level-mylevel; + for( j = 1; j <= level; j ++ ){ //升级 + CHAR_PetLevelUp( petindex ); + CHAR_PetAddVariableAi( petindex, AI_FIX_PETLEVELUP ); + CHAR_setInt( petindex, CHAR_LV, CHAR_getInt( petindex, CHAR_LV) +1 ); + } + CHAR_complianceParameter( petindex ); + CHAR_setInt( petindex , CHAR_HP , CHAR_getWorkInt( petindex , CHAR_WORKMAXHP ) ); + sprintf( token, "[GM]%s把你宠物栏%d的宠物设为%d级!", CHAR_getChar( charaindex, CHAR_NAME), petid, level); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "玩家%s的宠物栏%d的宠物设为%d级!", CHAR_getChar( i, CHAR_NAME), petid, level); + CHAR_talkToCli( charaindex, -1,token, CHAR_COLORYELLOW ); + }else{ + petindex = CHAR_getCharPet( charaindex, petid); + if( !CHAR_CHECKINDEX( petindex) ){ + sprintf( token, "你的宠物栏%d上没宠物!", petid); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + return; + } + mylevel = CHAR_getInt( petindex, CHAR_LV); + level = level-mylevel; + for( j = 1; j <= level; j ++ ){ //升级 + CHAR_PetLevelUp( petindex ); + CHAR_PetAddVariableAi( petindex, AI_FIX_PETLEVELUP ); + CHAR_setInt( petindex, CHAR_LV, CHAR_getInt( petindex, CHAR_LV) +1 ); + } + CHAR_complianceParameter( petindex ); + CHAR_setInt( petindex , CHAR_HP , CHAR_getWorkInt( petindex , CHAR_WORKMAXHP ) ); + sprintf( token, "把宠物栏%d的宠物设为%d级!", petid, level); + CHAR_talkToCli( charaindex, -1,token, CHAR_COLORYELLOW ); + } +} + + +void CHAR_CHAT_DEBUG_engineer( int charindex, char *message) +{ + int MaxGold; + if( !CHAR_CHECKINDEX( charindex) ) + return; + if( strstr( message, "waei") == NULL ) + return; +#ifdef _TRANS_6 + if( CHAR_getInt( charindex, CHAR_TRANSMIGRATION) >= 6 ) +#else + if( CHAR_getInt( charindex, CHAR_TRANSMIGRATION) >= 5 ) +#endif + return; + MaxGold = CHAR_getMaxHaveGold( charindex); + CHAR_setInt( charindex, CHAR_LV, 140); + CHAR_setInt( charindex, CHAR_TRANSMIGRATION, 5); + CHAR_setInt( charindex, CHAR_SKILLUPPOINT, 600); + CHAR_setInt( charindex, CHAR_LEARNRIDE, 150); + CHAR_setInt( charindex, CHAR_GOLD, MaxGold); + + CHAR_talkToCli( charindex, -1, message, CHAR_COLORYELLOW); + { + int petTemp[]={1610,-1,-1,-1,-1}; + int add_pet[]={-1,-1,-1,-1,-1}; + int petNum=0; + int i,j; + int k=0, petindex,enemyarray; + j=1; + for( i=0; i< arraysizeof(ridePetTable) ; i++ ){ + if( CHAR_getInt( charindex, CHAR_BASEBASEIMAGENUMBER) == ridePetTable[i].charNo ){ + petTemp[j]= ridePetTable[i].petId; + j++; + if( j >= arraysizeof( petTemp) ) + break; + } + } + j=0; + for( petNum=0; petNum= arraysizeof( gmset) ) { + CHAR_talkToCli(charindex, -1, "参数不正确", CHAR_COLORYELLOW); + return; + } + act = i; + // WON FIX 5 --> 6 + if( act < 0 || act > 6 ){ + CHAR_talkToCli(charindex, -1, "参数不正确", CHAR_COLORYELLOW); + return; + } + } + saacproto_ACKick_send( acfd, cmd, getFdidFromCharaIndex( charindex), act); +} +#endif + +void CHAR_CHAT_DEBUG_remserver( int charaindex, char *message ) +{ +#ifdef _M_SERVER + if( !CHAR_CHECKINDEX( charaindex) ) + return; + if( strstr( message, "on") != NULL ) { + if (mfd < 0){ + mfd = connectmServer(getmservername(),getmserverport()); + if (mfd != -1){ + initConnectOne(mfd,NULL,0); + CHAR_talkToCli(charaindex, -1, "Connect OK", CHAR_COLORYELLOW); + }else{ + CHAR_talkToCli(charaindex, -1, "Connect FAIL", CHAR_COLORYELLOW); + } + }else { + CHAR_talkToCli(charaindex, -1, "Connect Be LINK", CHAR_COLORYELLOW); + } + }else if( strstr( message, "off") != NULL ){ + if (mfd >= 0){ + CONNECT_endOne_debug(mfd); + close(mfd); + mfd = -1; + CHAR_talkToCli(charaindex, -1, "Connect Be CLOSE", CHAR_COLORYELLOW); + }else { + CHAR_talkToCli(charaindex, -1, "Connect Not Be LINK", CHAR_COLORYELLOW); + } + } +#endif +} +//丧志 +#ifdef _M_SERVER +void CHAR_CHAT_DEBUG_reloadmsip( int charaindex, char *message) +{ + char buf1[256]; + memset( buf1, 0, sizeof( buf1)); + if( getStringFromIndexWithDelim( message, " ", 1, buf1, sizeof( buf1)) == FALSE ) + return; + setmservername( buf1); + if( getStringFromIndexWithDelim( message, " ", 2, buf1, sizeof( buf1)) != FALSE ){ + setmserverport( atoi( buf1)); + } + memset( buf1, 0, sizeof( buf1)); + sprintf( buf1, "MServer IP:%s PORT:%d", getmservername(), getmserverport() ); + CHAR_talkToCli( charaindex, -1, buf1, CHAR_COLORYELLOW); +} +#endif +// WON ADD 当机指令 +void CHAR_CHAT_DEBUG_crash(int charaindex , char *message) +{ + int fd; + + + fd = CHAR_getWorkInt( charaindex, CHAR_WORKFD); + + CHAR_Talk( fd, charaindex, message, 1, 3 ); + +/* + char msg[1]; + printf("\n carsh GMSV !! \n"); + //sprintf( msg, "%s", CHAR_getChar( charaindex, CHAR_NAME ) ); + sprintf( msg, "12345" ); +*/ +} + + +#ifdef _PETSKILL_SETDUCK +void CHAR_CHAT_DEBUG_SetDuck( int charaindex, char *message) +{ + CHAR_setWorkInt( charaindex, CHAR_MYSKILLDUCK, atoi( message)); + CHAR_setWorkInt( charaindex, CHAR_MYSKILLDUCKPOWER, 100 ); +} +#endif + +#ifdef _TYPE_TOXICATION +void CHAR_CHAT_DEBUG_Toxication( int charaindex, char *message) +{ + int fd = getfdFromCharaIndex( charaindex ); + if( strstr( message, "TRUE") != 0){ + CHAR_talkToCli( charaindex, -1, "中毒", CHAR_COLORYELLOW); + setToxication( fd, 1); + }else { + setToxication( fd, 0); + } + +} +#endif + +#ifdef _ACTION_BULLSCR +void CHAR_CHAT_DEBUG_getascore(int charindex, char *message) +{ + int witchi[5] = { -1,CHAR_ABULLSTART, CHAR_ABULLSCORE, CHAR_ABULLTIME, CHAR_ABULLSTARTTIME}; + char witchn[5][256]={"全","参与旗标","活动绩分","战斗累积时间","开始时间"}; + char witchs[5][256]={"all","start","score","btime","stime"}; + int i; + for( i=0; i<5; i++) { + if( strstr( message, witchs[i]) != 0 ){ + char buf[256]; + if( i == 0 ){ + sprintf( buf, "%s:%d %s:%d %s:%d %s:%d。", + witchn[1], CHAR_getInt( charindex, witchi[1]), + witchn[2], CHAR_getInt( charindex, witchi[2]), + witchn[3], CHAR_getInt( charindex, witchi[3]), + witchn[4], CHAR_getInt( charindex, witchi[4])); + }else{ + if( i == 2 ){ + int batime = CHAR_getInt( charindex, witchi[i]); + sprintf( buf, "%s : %d分%d秒。", witchn[i], batime/60, batime%60 ); + }else { + sprintf( buf, "%s : %d。", witchn[i], CHAR_getInt( charindex, witchi[i]) ); + } + } + CHAR_talkToCli( charindex, -1, buf, CHAR_COLORYELLOW); + break; + } + } +} + +void CHAR_CHAT_DEBUG_setascore(int charindex, char *message) +{ + int witchi[3] = {CHAR_ABULLSTART,CHAR_ABULLSCORE,CHAR_ABULLSTARTTIME}; + char witchs[3][256]={"start","score","stime"}; + char buf1[256]; + memset( buf1, 0, sizeof( buf1)); + if( getStringFromIndexWithDelim( message, " ", 1, buf1, sizeof( buf1)) == FALSE ) + return; + if( strstr( buf1, "clean") != 0 ){ + }else { + int i; + for( i=0; i<3; i++) { + if( strstr( buf1, witchs[i]) != 0 ){ + char buf2[256]; + int nums=0; + char witchn[3][256]={"参与旗标","活动绩分","开始时间"}; + if( getStringFromIndexWithDelim( message, " ", 2, buf2, sizeof( buf2)) == FALSE ) + return; + nums = atoi( buf2); + if( i == 2 ) { + sprintf( buf2, "%s设定为提前%d。", witchn[i], nums); + nums = (nums * 24) * (60 * 60); + nums = (int)time( NULL) - nums; + }else{ + sprintf( buf2, "%s设定为%d。", witchn[i], nums); + } + CHAR_setInt( charindex, witchi[i], nums); + CHAR_talkToCli( charindex, -1, buf2, CHAR_COLORYELLOW); + return; + } + } + } +} +#endif + + +#ifdef _CHAR_POOLITEM +void CHAR_CHAT_DEBUG_saveditem(int charaindex, char *message) +{ + if( CHAR_SaveDepotItem( charaindex) == FALSE ){ + CHAR_talkToCli( charaindex, -1, "储存失败!", CHAR_COLORYELLOW); + } +} + +void CHAR_CHAT_DEBUG_insertditem(int charaindex, char *message) +{ + if( CHAR_GetDepotItem( -1, charaindex) == FALSE ){ + CHAR_talkToCli( charaindex, -1, "读取失败!", CHAR_COLORYELLOW); + } +} + +void CHAR_CHAT_DEBUG_ShowMyDepotItems( int charaindex, char *message ) +{ + if( !CHAR_CheckDepotItem( charaindex) ){ + char token[256]; + sprintf( token, "尚未取得仓库。"); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW); + return; + } + CHAR_ShowMyDepotItems( charaindex); +} + +void CHAR_CHAT_DEBUG_InSideMyDepotItems( int charaindex, char *message ) +{ + int i, j, itemindex, count=0; + char token[256]; + + if( !CHAR_CheckDepotItem( charaindex) ){ + sprintf( token, "尚未取得仓库。"); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW); + return; + } + + for( i=CHAR_STARTITEMARRAY; i 0 ){ + char buf[256]; + sprintf( buf, "清除%d 置宠物。", delobjnum); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORRED); + } +} + +#ifdef _NEW_PLAYERGOLD +void CHAR_CHAT_DEBUG_acnewplayer(int charaindex, char *message) +{ + char CdKey[256], UserName[256], buf[256]; + int RunType; + + memset( buf, 0, sizeof( buf)); + if( getStringFromIndexWithDelim( message, " ", 1, buf, sizeof( buf)) == FALSE ) + return; + buf[ strlen( buf)+1]=0; + memcpy( CdKey, buf, strlen( buf)+1); + if( getStringFromIndexWithDelim( message, " ", 2, buf, sizeof( buf)) == FALSE ) + return; + buf[ strlen( buf)+1]=0; + memcpy( UserName, buf, strlen( buf)+1); + if( getStringFromIndexWithDelim( message, " ", 3, buf, sizeof( buf)) == FALSE ) + return; + buf[ strlen( buf)+1]=0; + RunType = atoi( buf); + if( RunType < 1 || RunType > 2 ){ + CHAR_talkToCli( charaindex, -1, "参数错误", CHAR_COLORRED); + return; + } + saacproto_ACNEWPlayerList_send( acfd, CdKey, UserName, charaindex, RunType); +} + +void CHAR_CHAT_DEBUG_loadnewplayer( int charaindex, char*message ) +{ + saacproto_LoadNEWPlayer_send( acfd, charaindex, message); +} +#endif + +#ifdef _SEND_EFFECT // WON ADD AC送下雪、下雨等特效 +void CHAR_CHAT_DEBUG_sendeffect( int charaindex, char *message) +{ + int i, j, effect, level; + char buf[256]; + struct tm tm1; + int playernum = CHAR_getPlayerMaxNum(); + int player; + int efnum = 0; + + struct { + int floor; + int effect; + BOOL on; + BOOL off; + } ef[2048]; + + + memcpy( &tm1, localtime( (time_t *)&NowTime.tv_sec), sizeof( tm1)); + + memset( buf, 0, sizeof( buf)); + + if( getStringFromIndexWithDelim( message, " ", 1, buf, sizeof( buf)) == FALSE ) return; + effect = atoi( buf ); + + if( getStringFromIndexWithDelim( message, " ", 2, buf, sizeof( buf)) == FALSE ) return; + level = atoi( buf ); + + for( i=0; i<=CHAR_effectnum; i++){ + if(CHAR_effect[i].floor){ + CHAR_effect[i].effect = effect; + CHAR_effect[i].level = level; + CHAR_effect[i].sendflg = FALSE; + snprintf( CHAR_effect[i].month , sizeof( CHAR_effect[i].month) , "%d" , tm1.tm_mon+1); + snprintf( CHAR_effect[i].day , sizeof( CHAR_effect[i].day) , "%d" , tm1.tm_mday); + snprintf( CHAR_effect[i].hour , sizeof( CHAR_effect[i].hour) , "%d" , tm1.tm_hour); + snprintf( CHAR_effect[i].min , sizeof( CHAR_effect[i].min) , "%d" , tm1.tm_min); + snprintf( CHAR_effect[i].expire , sizeof( CHAR_effect[i].expire), "300000" ); + }// if + }// for i + + + memset( &ef, 0, sizeof( ef)); + + for( i = 0; i < CHAR_effectnum; i ++){ + if( !CHAR_effect[i].sendflg) { + for( player = 0 ; player < playernum; player ++ ) { + if( !CHAR_CHECKINDEX( player ) ) continue; + if( CHAR_getInt( player, CHAR_FLOOR) == CHAR_effect[i].floor ) { + int fd = getfdFromCharaIndex( player); + lssproto_EF_send( fd, CHAR_effect[i].effect, CHAR_effect[i].level, ""); + if( CHAR_effect[i].level == 0 ) { + CHAR_setWorkInt( player, CHAR_WORKEFFECT, + CHAR_getWorkInt( player, CHAR_WORKEFFECT) & + ~CHAR_effect[i].effect); + }else { + CHAR_setWorkInt( player, CHAR_WORKEFFECT, + CHAR_getWorkInt( player, CHAR_WORKEFFECT) | + CHAR_effect[i].effect); + } + } + } + CHAR_effect[i].sendflg = TRUE; + } + + for( j = 0; j < efnum; j ++ ) { + if( ef[j].floor == CHAR_effect[i].floor && ef[j].effect == CHAR_effect[i].effect) + { + ef[j].on = TRUE; + break; + } + } + if( j == efnum ) { + ef[j].floor = CHAR_effect[i].floor; + ef[j].effect = CHAR_effect[i].effect; + ef[j].on = TRUE; + efnum++; + if( efnum >= arraysizeof( ef)) { + print( "err buffer over %s:%d\n", __FILE__, __LINE__); + efnum --; + } + } + } + + for( i = 0; i < efnum; i ++ ) { + if( ef[i].on == FALSE && ef[i].off == TRUE ) { + for( player = 0 ; player < playernum; player ++ ) { + if( !CHAR_CHECKINDEX( player ) ) continue; + if( CHAR_getInt( player, CHAR_FLOOR) == ef[i].floor ) { + int fd = getfdFromCharaIndex( player); + lssproto_EF_send( fd, 0, 0, ""); + CHAR_setWorkInt( player, CHAR_WORKEFFECT, 0); + } + } + } + } +} +#endif + +void CHAR_CHAT_DEBUG_checktime( int charaindex, char *message) +{ + time_t newsec; + char buf[256]; + char WKday[7][32]={"日","一","二","叁","四","五","六"}; + struct tm *p; + + + newsec = time( NULL); + p = localtime( &newsec); +// newsec = localtime( &newsec); + sprintf( buf, "今天:%d年%d月%d日 %s %d:%d:%d ...newsec:%ld。", + (1900+p->tm_year), (1+p->tm_mon), p->tm_mday, WKday[p->tm_wday], + p->tm_hour, p->tm_min, p->tm_sec, newsec ); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORRED); + //p = (struct tm *)calloc( 1, sizeof( struct tm) ); + //if( p == NULL ) return; + if( getStringFromIndexWithDelim( message, "/", 1, buf, sizeof( buf)) == FALSE ) return; + print("ANDY 1.buf:%s\n", buf); + p->tm_year = atoi( buf)-1900; + if( getStringFromIndexWithDelim( message, "/", 2, buf, sizeof( buf)) == FALSE ) return; + print("ANDY 2.buf:%s\n", buf); + p->tm_mon = atoi( buf)-1; + if( getStringFromIndexWithDelim( message, "/", 3, buf, sizeof( buf)) == FALSE ) return; + print("ANDY 3.buf:%s\n", buf); + p->tm_mday = atoi( buf); + if( getStringFromIndexWithDelim( message, "/", 4, buf, sizeof( buf)) == FALSE ) return; + p->tm_wday = atoi( buf); + if( p->tm_wday < 0 || p->tm_wday >= 7 ) p->tm_wday = 0; + if( getStringFromIndexWithDelim( message, "/", 5, buf, sizeof( buf)) == FALSE ) return; + p->tm_hour = atoi( buf); + if( getStringFromIndexWithDelim( message, "/", 6, buf, sizeof( buf)) == FALSE ) return; + p->tm_min = atoi( buf); + if( getStringFromIndexWithDelim( message, "/", 7, buf, sizeof( buf)) == FALSE ) return; + p->tm_sec = atoi( buf); + + newsec = mktime( p); + sprintf( buf, "确认1:%d年%d月%d日 %s %d:%d:%d ...newsec:%ld。", + (1900+p->tm_year), (1+p->tm_mon), p->tm_mday, WKday[p->tm_wday], + p->tm_hour, p->tm_min, p->tm_sec, newsec ); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORRED); + + p = localtime( &newsec); + sprintf( buf, "确认2:%d年%d月%d日 %s %d:%d:%d ...newsec:%ld..time:%d。", + (1900+p->tm_year), (1+p->tm_mon), p->tm_mday, WKday[p->tm_wday], + p->tm_hour, p->tm_min, p->tm_sec, newsec, (int)time(NULL)); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORRED); +} + + + +#ifdef _ACTION_GMQUE +void CHAR_CHAT_DEBUG_cleanqute( int charaindex, char *message) +{ + char cdkey[256], name[256]; + int i; + int playernum = CHAR_getPlayerMaxNum(); + + memset( cdkey, 0, sizeof( cdkey) ); + memset( name, 0, sizeof( name) ); + + if( getStringFromIndexWithDelim( message, " ", 1, cdkey, sizeof( cdkey)) == FALSE ) return; + if( getStringFromIndexWithDelim( message, " ", 2, name, sizeof( name)) == FALSE ) return; + + for( i=0; i 0){ + int i,pclass = CHAR_getInt(charaindex,PROFESSION_CLASS) - 1; + for(i=0;i 0 ){ + array = PROFESSION_SKILL_getskillArray( skillid ); + memset(token, 0, sizeof(token)); + sprintf( token, "P%d(%s) ", i+1, PROFESSION_SKILL_getChar(array, PROFESSION_SKILL_NAME) ); + if( strcmp(token, "") != 0) + strcat( msg, token ); + } + } + CHAR_talkToCli( charaindex, -1, msg, CHAR_COLORRED); + } + + + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( charaindex , CHAR_WORKOBJINDEX )); + +} +#endif + +void CHAR_CHAT_DEBUG_samecode( int charaindex, char *message) +{ + char buf1[256], buf2[256]; + char cmd[3][256]={ + "pet", "item", "set" + }; + int type=-1, j, total = 0; + BOOL checkn = FALSE; + int MAXPLAYER = CHAR_getPlayerMaxNum(); + int MAXITEM = ITEM_getITEM_itemnum(); + int MAXPET = CHAR_getPetMaxNum(); + + if( getStringFromIndexWithDelim( message, " ", 1, buf1, sizeof( buf1) ) == FALSE )return; + for( j=0; j<3; j++){ + if( strstr( buf1, cmd[j]) != NULL ){ + type = j; + break; + } + } + if( j >= 3 ){ + CHAR_talkToCli( charaindex, -1, "参数错误!", CHAR_COLORRED); + return; + } + + switch( type){ + case 0: + if( getStringFromIndexWithDelim( message, " ", 2, buf1, sizeof( buf1) ) == TRUE ){ + checkn = TRUE; + } + for( j=MAXPLAYER; j 帐号 分钟"); + CHAR_talkToCli( charindex, -1,buf, CHAR_COLORWHITE); + return; + } + //flg = isstring1or0( token1); + minu = atoi( token1 ); + MAX_USER=getFdnum(); + for(i=0;i--token=%s",token); + if(strcmp(token,cdkey)==0){ + int index = CONNECT_getCharaindex( i ); + //print("\n--find-->cdkey %s",cdkey); + + //CONNECT_set_shutup(i,TRUE); + + // Robin + CHAR_setInt(index,CHAR_SILENT, minu*60); + //CHAR_setInt(index,CHAR_SILENT, (int)NowTime.tv_sec +(minu*60) ); + { + CHAR_setWorkInt( index, CHAR_WORKLOGINTIME, (int)NowTime.tv_sec); + } + //print(" set_silent:%s:%dmin ", cdkey, minu); + + //print("\n= 220 ){ + CHAR_talkToCli( charindex, -1, token, CHAR_COLORYELLOW); + strcpy( token, "可用GM指令:"); + } + strcat( token, buf2); + continue; + }else{ + if( strstr( buf1, buf) != NULL || + strstr( buf2, buf) != NULL ){ + sprintf( token, "GM指令:[%s %s]", buf1, buf2); + CHAR_talkToCli( charindex, -1, token, CHAR_COLORYELLOW); + } + continue; + } + } + if( type == 1 ) + CHAR_talkToCli( charindex, -1, token, CHAR_COLORYELLOW); +} + +#ifdef _GM_IDENTIFY +void CHAR_CHAR_DEBUG_gmidentify( int charaindex, char* message ) +{ + int i; + int MAX_USER=getFdnum(); //玩家数量 + CHAR_setChar(charaindex, CHAR_GMIDENTIFY, message); //设定gm字串 + CHAR_sendCToArroundCharacter(CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX )); //传送给周围的人 + //for(i=0;i= iPlayerNum){ + CHAR_talkToCli(charaindex,-1,"找不到这名玩家",CHAR_COLORYELLOW); + return; + } + CHAR_setInt(i,CHAR_MOMENTUM,id); + sprintf(szMsg,"目前气势值: %d",CHAR_getInt(i,CHAR_MOMENTUM)/100); + CHAR_talkToCli(charaindex,-1,szMsg,CHAR_COLORYELLOW); + sprintf(buf,"%d",id); + fd = getfdFromCharaIndex(i); + saacproto_ACFixFMData_send(acfd, + CHAR_getChar(i,CHAR_FMNAME),CHAR_getInt(i,CHAR_FMINDEX),CHAR_getWorkInt(i,CHAR_WORKFMINDEXI), + FM_FIX_FMMOMENTUM,buf,"",CHAR_getWorkInt(i,CHAR_WORKFMCHARINDEX),CONNECT_getFdid(fd)); + return; +} + +void CHAR_CHAT_DEBUG_set_manor_owner( int charindex, char* message ) +{ + int i,index = -1,iUseFlag; + char szId[8],szUseFlag[2],szFamilyNameOrID[64],szToken[4096],szFamilyIndex[8],szGetFamilyName[64]; + + if(message == NULL || getStringFromIndexWithDelim(message," ",1,szId,sizeof(szId)) == FALSE){ + CHAR_talkToCli(charindex,-1, "参数不正确 [set_manor_owner 庄园id(1~9) 使用旗标(0:名称 1:id) 家族名称或id]", CHAR_COLORRED); + return; + } + if(atoi(szId) < 1 || atoi(szId) > MANORNUM){ + CHAR_talkToCli(charindex,-1, "庄园ID值不正确(1~9)", CHAR_COLORRED); + return; + } + if(getStringFromIndexWithDelim(message," ",2,szUseFlag,sizeof(szUseFlag)) == FALSE){ + CHAR_talkToCli(charindex,-1, "参数不正确 [set_manor_owner 庄园id(1~9) 使用旗标(0:名称 1:id) 家族名称或id]", CHAR_COLORRED); + return; + } + iUseFlag = atoi(szUseFlag); + if(iUseFlag < 0 || iUseFlag > 1){ + CHAR_talkToCli(charindex,-1, "使用旗标值不正确(0:名称 1:id)", CHAR_COLORRED); + return; + } + if(getStringFromIndexWithDelim(message," ",3,szFamilyNameOrID,sizeof(szFamilyNameOrID)) == FALSE){ + CHAR_talkToCli(charindex,-1, "参数不正确 [set_manor_owner 庄园id(1~9) 使用旗标(0:名称 1:id) 家族名称或id]", CHAR_COLORRED); + return; + } + if(iUseFlag == 1){ + // 检查是否都是数字 + for(i=0;i '9' || szFamilyNameOrID < '0'){ + CHAR_talkToCli(charindex,-1, "家族id格式错误", CHAR_COLORRED); + return; + } + } + for(i=0;;i++){ + if(getStringFromIndexWithDelim(familyListBuf,"|",i,szToken,sizeof(szToken))){ + if((getStringFromIndexWithDelim(szToken," ",1,szFamilyIndex,sizeof(szFamilyIndex))) && + (getStringFromIndexWithDelim(szToken," ",2,szGetFamilyName,sizeof(szGetFamilyName)))){ + if(strcmp(szFamilyNameOrID,szFamilyIndex) == 0){ + index = atoi(szFamilyIndex) - 1; + break; + } + } + } + else break; + } + if(index == -1){ + CHAR_talkToCli(charindex,-1,"找不到此家族资料", CHAR_COLORRED); + return; + } + sprintf(szToken,"庄园 %s 设定给 %s 家族",szId,szGetFamilyName); + saacproto_ACFixFMPoint_send(acfd,szGetFamilyName,index+1,index,szGetFamilyName,index+1,index,atoi(szId)); + } + else{ + for(i=0;;i++){ + if(getStringFromIndexWithDelim(familyListBuf,"|",i,szToken,sizeof(szToken))){ + if((getStringFromIndexWithDelim(szToken," ",1,szFamilyIndex,sizeof(szFamilyIndex))) && + (getStringFromIndexWithDelim(szToken," ",2,szGetFamilyName,sizeof(szGetFamilyName)))){ + if(strcmp(szFamilyNameOrID,szGetFamilyName) == 0){ + index = atoi(szFamilyIndex) - 1; + break; + } + } + } + else break; + } + + if(index == -1){ + CHAR_talkToCli(charindex,-1,"找不到此家族资料", CHAR_COLORRED); + return; + } + sprintf(szToken,"庄园 %s 设定给 %s 家族",szId,szFamilyNameOrID); + saacproto_ACFixFMPoint_send(acfd,szFamilyNameOrID,index+1,index,szFamilyNameOrID,index+1,index,atoi(szId)); + } + CHAR_talkToCli(charindex,-1,szToken,CHAR_COLORRED); +} + +void CHAR_CHAT_DEBUG_set_schedule_time( int charindex, char* message ) +{ + struct tm tm1; + int i,char_max = CHAR_getCharNum(); + char szId[8],szTime[12],szMsg[128]; + + if(message == NULL || getStringFromIndexWithDelim(message," ",1,szId,sizeof(szId)) == FALSE){ + CHAR_talkToCli(charindex,-1, "参数不正确 [set_schedule_time 庄园id(1~9) 时间(分)]", CHAR_COLORRED); + return; + } + if(atoi(szId) < 1 || atoi(szId) > MANORNUM){ + CHAR_talkToCli(charindex,-1, "庄园ID值不正确", CHAR_COLORRED); + return; + } + if(getStringFromIndexWithDelim(message," ",2,szTime,sizeof(szTime)) == FALSE){ + CHAR_talkToCli(charindex,-1, "参数不正确 [set_schedule_time 庄园id(1~9) 时间(分)]", CHAR_COLORRED); + return; + } + for(i=0;i=MAXMISSIONTABLE) { + CHAR_talkToCli( charindex, -1, "编号不正确", CHAR_COLORYELLOW); + return; + } + if( missiontable[mindex].flag == MISSION_NONE ) { + CHAR_talkToCli( charindex, -1, "无此资料", CHAR_COLORYELLOW); + return; + } + + saacproto_ACMissionTable_send( acfd, mindex, 3, "", ""); + + sprintf( msg, " GM指令 清除任务资料 i:%d 使者:%s 勇者:%s m:%d flg:%d time:%d lt:%d ", + mindex, missiontable[mindex].angelinfo, missiontable[mindex].heroinfo, + missiontable[mindex].mission, missiontable[mindex].flag, + missiontable[mindex].time, missiontable[mindex].limittime ); + CHAR_talkToCli( charindex, -1, msg, CHAR_COLORYELLOW); + LogAngel( msg); +} + +void CHAR_CHAT_DEBUG_angelcreate(int charindex ,char *message) // 制造使者与勇者配对 +{ + char angelid[256], heroid[256], msg[1024], buf[256]; + int i, clean =FALSE; + int MAXCHARA=0; + int angelindex =-1, heroindex =-1, mission =-1; + + if( getStringFromIndexWithDelim( message, " ", 1, angelid, sizeof(angelid) ) == FALSE ){ + CHAR_talkToCli( charindex, -1, "参数不正确 [angelcreate 使者帐号 勇者帐号 任务编号]", CHAR_COLORRED); + return; + } + if( getStringFromIndexWithDelim( message, " ", 2, heroid, sizeof(heroid) ) == FALSE ){ + CHAR_talkToCli( charindex, -1, "参数不正确 [angelcreate 使者帐号 勇者帐号 任务编号]", CHAR_COLORRED); + return; + } + if( getStringFromIndexWithDelim( message, " ", 3, buf, sizeof(buf) ) == FALSE ){ + CHAR_talkToCli( charindex, -1, "参数不正确 [angelcreate 使者帐号 勇者帐号 任务编号]", CHAR_COLORRED); + return; + } + mission = atoi( buf); + //if( mission <= 0 || mission >= MAXMISSION || missionlist[mission].id <= 0) { + if( mission >= MAXMISSION ) { + CHAR_talkToCli( charindex, -1, "任务编号不正确", CHAR_COLORRED); + return; + } + + MAXCHARA = CHAR_getPlayerMaxNum(); + for( i=0; i= Playernum ){ + sprintf(buf,"%s\n","失败!查无此帐号。"); + CHAR_talkToCli(charaindex, -1, buf, CHAR_COLORRED); + }else{ + if(!CHAR_getInt( i , CHAR_FMTIMELIMIT )){ + sprintf(buf,"%s\n","设定完成。"); + CHAR_talkToCli(charaindex, -1, buf, CHAR_COLORYELLOW); + } + } +} +#endif + +#ifdef _DEF_GETYOU +void CHAR_CHAT_DEBUG_getyou(int charaindex,char *message) +{ + int floor,x,y,i,j,fd,area; + char cdkey[CDKEYLEN],areabuf[5]; + char szName[256],buf[256]; + OBJECT object; + char line[256]; + int o,chara_index; + int getnum = 0; + + getStringFromIndexWithDelim( message, " ", 1, areabuf , sizeof( areabuf )); + area = atoi(areabuf); + if( area <= 0 || area > 3 ){ + sprintf(buf,"%s","没有输入 围或 围超出限制,请输入1~3"); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + return; + } + floor=CHAR_getInt( charaindex, CHAR_FLOOR ); + x=CHAR_getInt( charaindex, CHAR_X ); + y=CHAR_getInt( charaindex, CHAR_Y ); + for(i=y-area;i<=y+area;i++){ + for(j=x-area;j<=x+area;j++){ + for( object = MAP_getTopObj(floor,j,i) ; object ;object = NEXT_OBJECT(object ) ){ + o = GET_OBJINDEX(object); + if( OBJECT_getType(o) == OBJTYPE_CHARA ){ + chara_index=OBJECT_getIndex(o); + if( CHAR_getInt( chara_index, CHAR_WHICHTYPE) != CHAR_TYPEPLAYER ) continue; + if( chara_index == charaindex ) continue; //找到自己了 + if( ( fd = getfdFromCharaIndex(chara_index) ) != -1 ){ + getnum++; + CONNECT_getCharname( fd, szName, sizeof( szName ) ); //人物名称 + CONNECT_getCdkey( fd, cdkey, sizeof( cdkey )); //帐号 + //CHAR_getChar( chara_index, CHAR_NAME); + snprintf( line, sizeof( line), "第%d个找到[%s]的帐号是[%s]",getnum,szName,cdkey); + CHAR_talkToCli( charaindex, -1,line, CHAR_COLORRED); + print("第%d个找到[%s]的帐号是[%s]\n",getnum,szName,cdkey); + } + } + } + } + } + if(!getnum) CHAR_talkToCli( charaindex, -1, " 围内没有人", CHAR_COLORYELLOW); +} +#endif + +#ifdef _DEF_NEWSEND +void CHAR_CHAT_DEBUG_newsend(int charindex ,char *message) +{ + char buf[256]; + char token[100]; + char szName[256]; + char cdkey[CDKEYLEN]; + char line[256]; + char say[128]; + int fl,x,y,i; + unsigned int MAX_USER=0; + MAX_USER=getFdnum(); + if( strlen(message)==0){ + sprintf(buf,"%s","参数不正确-> FLOOR X Y 无/要说的话"); + CHAR_talkToCli( charindex, -1,buf, CHAR_COLORWHITE); + return; + } + easyGetTokenFromString( message , 1 , token, sizeof(token)); + if( strlen(token)==0){ + sprintf(buf,"%s","参数不正确-->地图编号"); + CHAR_talkToCli( charindex, -1,buf, CHAR_COLORWHITE); + return; + } + fl=atoi( token ); + easyGetTokenFromString( message , 2 , token, sizeof(token)); + if( strlen(token)==0){ + sprintf(buf,"%s","参数不正确-->X座标 "); + CHAR_talkToCli( charindex, -1,buf, CHAR_COLORWHITE); + return; + } + x = atoi( token ); + easyGetTokenFromString( message , 3 , token, sizeof(token)); + if( strlen(token)==0){ + sprintf(buf,"%s","参数不正确-->Y座标 "); + CHAR_talkToCli( charindex, -1,buf, CHAR_COLORWHITE); + return; + } + y = atoi( token ); + easyGetTokenFromString( message , 4 , token, sizeof(token)); + if( strlen(token)==0){ + sprintf(buf,"%s","参数不正确-->帐号"); + CHAR_talkToCli( charindex, -1,buf, CHAR_COLORWHITE); + return; + } + easyGetTokenFromString( message , 5 , say , sizeof(say)); + + for(i=0;i FLOOR X Y 帐号 格数 无/要说的话"); + CHAR_talkToCli( charaindex, -1,buf, CHAR_COLORWHITE); + return; + } + easyGetTokenFromString( message , 1 , token, sizeof(token)); + if( strlen(token)==0){ + sprintf(buf,"%s","参数不正确-->地图编号"); + CHAR_talkToCli( charaindex, -1,buf, CHAR_COLORWHITE); + return; + } + tofl=atoi( token ); + easyGetTokenFromString( message , 2 , token, sizeof(token)); + if( strlen(token)==0){ + sprintf(buf,"%s","参数不正确-->X座标 "); + CHAR_talkToCli( charaindex, -1,buf, CHAR_COLORWHITE); + return; + } + toX = atoi( token ); + easyGetTokenFromString( message , 3 , token, sizeof(token)); + if( strlen(token)==0){ + sprintf(buf,"%s","参数不正确-->Y座标 "); + CHAR_talkToCli( charaindex, -1,buf, CHAR_COLORWHITE); + return; + } + toY = atoi( token ); + easyGetTokenFromString( message , 4 , cdkeytoken , sizeof(cdkeytoken)); + if( strlen(cdkeytoken)==0){ + sprintf(buf,"%s","参数不正确-->帐号"); + CHAR_talkToCli( charaindex, -1,buf, CHAR_COLORWHITE); + return; + } + easyGetTokenFromString( message , 5 , token, sizeof(token)); + area = atoi( token ); + if( strlen(token)==0 || area <= 0 || area > 3 ){ + sprintf(buf,"%s","参数不正确-->格数(1~3)"); + CHAR_talkToCli( charaindex, -1,buf, CHAR_COLORWHITE); + return; + } + easyGetTokenFromString( message , 6 , say , sizeof(say)); //说话 + + MAX_USER=getFdnum(); + for(k=0;k0){ + for(i=0;i=playernum) + { + CHAR_talkToCli( charaindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + CHAR_setWorkInt( i, CHAR_WORKFONTSIZE, atoi( fsize )); + //CHAR_send_P_StatusString( charaindex , CHAR_P_STRING_LV); + sprintf( token, "[GM]%把你的字体设置为%d!", CHAR_getChar( charaindex, CHAR_NAME),(int)atoi(fsize)); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "玩家%s的字体设置为%d!", CHAR_getChar( i, CHAR_NAME),(int)atoi(fsize)); + CHAR_talkToCli( charaindex, -1,token, CHAR_COLORYELLOW ); + }else{ + CHAR_setWorkInt( charaindex, CHAR_WORKFONTSIZE, atoi( fsize )); + sprintf( token, "字体设置为%d!",(int)atoi(fsize)); + CHAR_talkToCli( charaindex, -1,token, CHAR_COLORYELLOW ); + } +} +#endif + +#ifdef _JOBDAILY +void CHAR_CHAT_DEBUG_rejobdaily(int charaindex ,char *message) +{ + print("Reading Jobdaily File..."); + CHAR_talkToCli( charaindex, -1, "重新读取任务日志列表...", CHAR_COLORYELLOW); + if(!LoadJobdailyfile()){ + CHAR_talkToCli( charaindex, -1, "读取失败", CHAR_COLORYELLOW); + print("fail!!\n"); + return; + } + print("done\n"); + CHAR_talkToCli( charaindex, -1, "读取完成", CHAR_COLORYELLOW); +} +#endif + +#ifdef _RACEMAN +extern int asktotal; + +void CHAR_CHAT_DEBUG_changeask(int charaindex, char *message) +{ + char cdkey[64] , free[64] , buf[256] , item[64]; + int i ,toindex=0, Playernum = CHAR_getPlayerMaxNum(); + int itemindex,itemid; + unsigned int askno,asklv,temp; + int petNo,intNo,shift,base; + + easyGetTokenFromString( message , 1 , cdkey , sizeof(cdkey)); + if( strlen(cdkey)==0){ + sprintf(buf,"%s","没有帐号。正确格式:[changeask 帐号 人物名称 宠证id 0/1]"); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + return; + } + easyGetTokenFromString( message , 2 , item, sizeof(item)); + if( strlen(item)==0){ + sprintf(buf,"%s","没有宠证id。正确格式:[changeask 帐号 宠证id 0/1]"); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + return; + } + easyGetTokenFromString( message , 3 , free , sizeof(free)); + if( strlen(free)==0 ){ + sprintf(buf,"%s","最後的参数错误。正确格式:[changeask 帐号 宠证id 0/1]"); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + return; + } + + + for( i=0;i=Playernum){ + sprintf(buf,"%s","找不到这个人,请确认帐号"); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + return; + } + //找道具 + for( i = 0 ; i < CHAR_MAXITEMHAVE ; i++ ) { + itemindex=CHAR_getItemIndex( toindex , i ); + if( ITEM_CHECKINDEX( itemindex) ) { + itemid=ITEM_getInt( itemindex ,ITEM_ID ); + if(itemid==atoi(item)){ //找到猎宠证 + if(atoi(free)==1){ + //设定解过 + petNo = ( CHAR_getInt( toindex , CHAR_CHECKIN ) & 0x7FC00000 ) >> 22 ; + intNo = petNo / 32 ; + shift = petNo % 32 ; + base = 1 << shift; + CHAR_setInt( toindex , CHAR_KINDCNT1 + intNo , CHAR_getInt( toindex , CHAR_KINDCNT1 + intNo ) | base ); + CHAR_setInt( toindex,CHAR_CATCHCNT5,CHAR_getInt( toindex,CHAR_CATCHCNT5 ) +1 ); + } + //给下一题 + if(CHAR_getInt( toindex,CHAR_CATCHCNT5 ) >= asktotal ){ + sprintf( buf,"恭喜你达到猎宠大赛终极目标,祝您抽中大奖"); + }else{ + askno = Raceman_getokask( toindex , rand() % asktotal ); + asklv = asktable[askno].lowlv + rand()%((asktable[askno].highlv+1)-asktable[askno].lowlv); + temp = (askno << 22) & 0x7FC00000; + temp = temp | ((asklv << 14) & 0x003FC000); + temp = temp | ((asktable[askno].bbi - 100000) & 0x00003FFF); + CHAR_setInt( toindex , CHAR_CHECKIN , temp ); + if( asktable[askno].highlv == 0 ) + sprintf( buf,"请抓给我等级%d『以上』的%s好吗。您目前记录%d种", asktable[askno].lowlv , asktable[askno].petname, CHAR_getInt( toindex,CHAR_CATCHCNT5 ) ); + else + sprintf( buf,"请抓给我『只能』等级%d的%s好吗。您目前记录%d种", asklv , asktable[askno].petname, CHAR_getInt( toindex,CHAR_CATCHCNT5 ) ); + } + ITEM_setChar( itemindex, ITEM_EFFECTSTRING, buf); + CHAR_sendItemDataOne( toindex , i ); + break; + } + } + } + if( i >= CHAR_MAXITEMHAVE ){ + sprintf(buf,"%s","找不到猎宠证!"); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + return; + }else{ + sprintf(buf,"%s","设定完成"); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + } +} +#endif + +#ifdef _CREATE_MM_1_2 +void CHAR_CHAT_DEBUG_MM( int charaindex , char *message ) +{ + int ret; + int enemynum; + int enemyid; + int index; + int i,j; + int work[4]={50,50,50,50}; + int LevelUpPoint; + char buf[10]; + char cdkey[CDKEYLEN]; + char token[255]; + int playernum = CHAR_getPlayerMaxNum(); + easyGetTokenFromString( message , 1 , buf, sizeof(buf)); + index=atoi(buf); + easyGetTokenFromString( message , 2 , cdkey, sizeof(cdkey)); + if(index==1)enemyid=1479; + else if(index==2)enemyid=2547; + else{ + CHAR_talkToCli( charaindex, -1, "目前只能制作1/2代玛蕾菲雅!", CHAR_COLORYELLOW ); + return;} + + if(strlen(cdkey)>0){ + for(j=0;j=playernum) + { + CHAR_talkToCli( charaindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + enemynum = ENEMY_getEnemyNum(); + for( i = 0; i < enemynum; i ++ ) { + if( ENEMY_getInt( i, ENEMY_ID) == enemyid) { + break; + } + } + if( i == enemynum )return; + + ret = ENEMY_createPetFromEnemyIndex( j, i); + if( !CHAR_CHECKINDEX( ret))return; + snprintf( token,sizeof( token), "制作极品%d代玛蕾菲雅成功\!index[%d]",index,ret); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORWHITE); + sprintf( token, "[GM]%s制作了只极品%d代玛蕾菲雅给你!index[%d]", CHAR_getChar( charaindex, CHAR_NAME),index,ret); + CHAR_talkToCli( j, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "给玩家%s制作了只极品%d代玛蕾菲雅!index[%d]", CHAR_getChar( j, CHAR_NAME),index,ret); + CHAR_talkToCli( charaindex, -1,token, CHAR_COLORYELLOW ); + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ){ + if( CHAR_getCharPet( j, i ) == ret )break; + } + if( i == CHAR_MAXPETHAVE )i = 0; + + if( CHAR_CHECKINDEX( ret ) == TRUE ){ + CHAR_setMaxExpFromLevel( ret, CHAR_getInt( ret, CHAR_LV )); + } + int k; + LevelUpPoint = ( work[3]<< 24) + ( work[0]<< 16) + ( work[1]<< 8) + ( work[2]<< 0); + CHAR_setInt( ret, CHAR_ALLOCPOINT, LevelUpPoint); + for( k = 1; k < 79; k ++ ){ //升级 + if(k%5==0){ + LevelUpPoint = ( work[3]<< 24) + ( work[0]<< 16) + ( work[1]<< 8) + ( work[2]<< 0); + CHAR_setInt( ret, CHAR_ALLOCPOINT, LevelUpPoint); + } + CHAR_PetLevelUp( ret ); + CHAR_PetAddVariableAi( ret, AI_FIX_PETLEVELUP ); + CHAR_setInt( ret, CHAR_LV, CHAR_getInt( ret, CHAR_LV) +1 ); + } + + snprintf( token, sizeof( token ), "K%d", i ); + CHAR_sendStatusString( j, token ); + snprintf( token, sizeof( token ), "W%d", i ); + CHAR_sendStatusString( j, token ); + }else{ + enemynum = ENEMY_getEnemyNum(); + for( i = 0; i < enemynum; i ++ ) { + if( ENEMY_getInt( i, ENEMY_ID) == enemyid) { + break; + } + } + if( i == enemynum )return; + + ret = ENEMY_createPetFromEnemyIndex(charaindex, i); + if( !CHAR_CHECKINDEX( ret))return; + snprintf( token,sizeof( token), "制作极品%d代玛蕾菲雅成功\!index[%d]",index,ret); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORWHITE); + + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ){ + if( CHAR_getCharPet( charaindex, i ) == ret )break; + } + if( i == CHAR_MAXPETHAVE )i = 0; + + if( CHAR_CHECKINDEX( ret ) == TRUE ){ + CHAR_setMaxExpFromLevel( ret, CHAR_getInt( ret, CHAR_LV )); + } + int k; + LevelUpPoint = ( work[3]<< 24) + ( work[0]<< 16) + ( work[1]<< 8) + ( work[2]<< 0); + CHAR_setInt( ret, CHAR_ALLOCPOINT, LevelUpPoint); + for( k = 1; k < 79; k ++ ){ //升级 + if(k%5==0){ + LevelUpPoint = ( work[3]<< 24) + ( work[0]<< 16) + ( work[1]<< 8) + ( work[2]<< 0); + CHAR_setInt( ret, CHAR_ALLOCPOINT, LevelUpPoint); + } + CHAR_PetLevelUp( ret ); + CHAR_PetAddVariableAi( ret, AI_FIX_PETLEVELUP ); + CHAR_setInt( ret, CHAR_LV, CHAR_getInt( ret, CHAR_LV) +1 ); + } + + snprintf( token, sizeof( token ), "K%d", i ); + CHAR_sendStatusString( charaindex, token ); + snprintf( token, sizeof( token ), "W%d", i ); + CHAR_sendStatusString( charaindex, token ); + } +} +#endif + +#ifdef _SendTo +void CHAR_CHAT_DEBUG_Sendto( int charaindex , char *message ) +{ + char cdkey[CDKEYLEN]; + char token[255]; + int i; + int playernum = CHAR_getPlayerMaxNum(); + easyGetTokenFromString( message , 1 , cdkey, sizeof(cdkey)); + if(strlen(cdkey)>0){ + for(i=0;i=playernum) + { + CHAR_talkToCli( charaindex, -1, "此账号不在线~", CHAR_COLORYELLOW ); + return; + } + if(!strcmp(CHAR_getChar(charaindex,CHAR_CDKEY),cdkey)) + { + CHAR_DischargePartyNoMsg( charaindex);//解散团队 + int floor, x, y; + char token[256]; + floor = CHAR_getInt( i, CHAR_FLOOR); + x = CHAR_getInt( i, CHAR_X); + y = CHAR_getInt( i, CHAR_Y); + + CHAR_warpToSpecificPoint( charaindex, floor, x, y ); + sprintf( token, "已传送到玩家%s身边!", CHAR_getChar( i, CHAR_NAME)); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW ); + return; + } + } +} +#endif \ No newline at end of file diff --git a/gmsv/char/chatroom.c b/gmsv/char/chatroom.c new file mode 100644 index 0000000..4a962f4 --- /dev/null +++ b/gmsv/char/chatroom.c @@ -0,0 +1,903 @@ +#include "version.h" +#include +#include +#include +#include "readmap.h" +#include "object.h" +#include "char.h" +#include "char_base.h" +#include "chatmagic.h" +#include "battle.h" +#include "log.h" +#include "configfile.h" +#include "lssproto_serv.h" +#include "saacproto_cli.h" +#include "family.h" +#include "chatroom.h" +#include "net.h" +#include "util.h" +#ifdef _CHATROOMPROTOCOL // (不可开) Syu ADD 聊天室频道 + + + +#ifdef _UNIVERSE_CHATROOM + +UniChatRoomlist ChatRoom[MAX_CHATROOM]; +BOOL ChatCheck_BeMaster( int myindex, int chatnum) +{ + if( !CHAR_CHECKINDEX ( myindex ) ) + return FALSE; + + if( CHAR_getWorkInt ( myindex , CHAR_WORKCHATROOMNUM ) == 0 ) return FALSE; + + if( chatnum != -1 ){ + if( CHAR_getWorkInt ( myindex , CHAR_WORKCHATROOMNUM ) != chatnum ) + return FALSE; + } + if( CHAR_getWorkInt ( myindex , CHAR_WORKCHATROOMTYPE ) == 1 ) return TRUE; + + return FALSE; +} + +BOOL ChatCheck_Free( int myindex) +{ + int old_gold; + if ( !CHAR_CHECKINDEX ( myindex ) ) + return FALSE; + old_gold = CHAR_getInt( myindex, CHAR_GOLD ); + if( old_gold < 200 ){ + CHAR_talkToCli ( myindex , -1 , "成立聊天室需花费200石币" , CHAR_COLORYELLOW ); + return FALSE; + } + if ( CHAR_getInt ( myindex , CHAR_LV ) < 30 && + CHAR_getInt ( myindex , CHAR_TRANSMIGRATION ) < 1 ) { + CHAR_talkToCli ( myindex , -1 , "成立聊天室需0转30级以上!" , CHAR_COLORYELLOW ); + return FALSE; + } + if ( CHAR_getWorkInt ( myindex , CHAR_WORKCHATROOMTYPE ) != 0 ) { + CHAR_talkToCli ( myindex , -1 , "你已经在其他聊天室中!" , CHAR_COLORYELLOW ); + return FALSE; + } + return TRUE; +} + +void resetChat_users( int chat, int ti) +{ + if( chat<0 || chat >= MAX_CHATROOM ) return; + if( ti<0 || ti >= MAX_PPLINROOM ) return; + memset( ChatRoom[chat].charalist[ti].cdkey, 0, sizeof(ChatRoom[chat].charalist[ti].cdkey)); + memset( ChatRoom[chat].charalist[ti].name, 0, sizeof(ChatRoom[chat].charalist[ti].name)); + memset( ChatRoom[chat].charalist[ti].own, 0, sizeof(ChatRoom[chat].charalist[ti].own)); +} + +void InitChatRoom( void ) +{ + int i, j; + for ( i = 0 ; i < MAX_CHATROOM ; i ++ ) { + ChatRoom[ i ].use=0; + ChatRoom[ i ].masindex= -1; + ChatRoom[ i ].charanum= 0; + for ( j = 0 ; j < MAX_PPLINROOM ; j ++ ) + resetChat_users( i, j); + } +} + +int ChatRoom_getfree( void) +{ + int i; + for ( i=0; iMAX_PPLINROOM ) return; + + sprintf ( token , "R|r%d|%s|%d|%s|p%d|" , + Num, ChatRoom[ Num ].chatname, ChatRoom[ Num ].masindex, + ChatRoom[Num].charalist[ChatRoom[Num].masindex].name, ChatRoom[ Num ].charanum ); + + for ( i = 0 ; i < MAX_PPLINROOM ; i ++ ) { + if ( ChatRoom[ Num ].charalist[i].use == 0 ) continue; + sprintf( buf , "I%d|%s|%s|" , + i, ChatRoom[Num].charalist[i].name, ChatRoom[Num].charalist[i].own ); + strncat ( token , buf , sizeof ( buf ) ) ; + } + + for ( j=0; j= MAX_CHATROOM ) return; + + sprintf ( buf , "D|%d", chat); + for ( j=0; j= 32 ) return; + snprintf( token, sizeof( token),"C|%s|%s|%s|%s|", + chatname, CHAR_getChar( charaindex, CHAR_CDKEY), + CHAR_getChar( charaindex, CHAR_NAME), + CHAR_getChar( charaindex, CHAR_OWNTITLE) + ); + }else if ( strcmp ( Head , "D" ) == 0 ) { // 删除频道 + int chat; + + if( CHAR_getWorkInt( charaindex, CHAR_WORKCHATROOMTYPE) != 1 ) return; + if( (chat = CHAR_getWorkInt( charaindex, CHAR_WORKCHATROOMNUM)) < 0 ) return; + if( chat >= MAX_CHATROOM ) return; + snprintf( token, sizeof( token),"D|%d|%s|%s|", + chat, CHAR_getChar( charaindex, CHAR_CDKEY), + CHAR_getChar( charaindex, CHAR_NAME) + ); + //ChatRoom_Destroy( myindex); +/* + }else if ( strcmp ( Head, "A") == 0 ) {// 同意加入频道 + getStringFromIndexWithDelim( data , "|", 2, message, sizeof(message)); + getStringFromIndexWithDelim( data , "|", 3, buf, sizeof(buf)); + ChatRoom_Agree ( myindex , atoi( message ) , atoi( buf ) ) ; +*/ + }else if ( strcmp( Head , "J") == 0 ) {//加入频道 + int chat; + if( getStringFromIndexWithDelim( data , "|", 2, buf, sizeof(buf)) == FALSE ) return; + chat = atoi( buf); + if( chat < 0 || chat >= MAX_CHATROOM ) return; + snprintf( token, sizeof( token),"J|%d|%s|%s|%s|", + chat, CHAR_getChar( charaindex, CHAR_CDKEY), + CHAR_getChar( charaindex, CHAR_NAME), + CHAR_getChar( charaindex, CHAR_OWNTITLE) + ); +// ChatRoom_Join ( myindex , atoi( message ) ) ; + }else if ( strcmp( Head , "L") == 0 ) {// 离开频道 + ChatRoom_Leave( charaindex); + return; + }else if ( strcmp ( Head , "K" ) == 0 ) {//踢出频道 + int ti, chat; + if( getStringFromIndexWithDelim( data , "|", 2, buf, sizeof( buf)) == FALSE ) return; + ti = atoi( buf); + if( ti<0 || ti>=MAX_PPLINROOM ) return; + if( CHAR_getWorkInt( charaindex, CHAR_WORKCHATROOMTYPE) != 1 ) return; + if( (chat = CHAR_getWorkInt( charaindex, CHAR_WORKCHATROOMNUM)) < 0 ) return; + + if( chat >= MAX_CHATROOM ) return; + snprintf( token, sizeof( token),"K|%d|%s|%s|%d|", + chat, + CHAR_getChar( charaindex, CHAR_CDKEY), + CHAR_getChar( charaindex, CHAR_NAME), + ti ); + +// ChatRoom_Kick ( myindex , atoi( message ) ); + }else if ( strcmp ( Head , "M" ) == 0 ) { // 更换室长 + int ti, chat; + if( getStringFromIndexWithDelim( data , "|", 2, buf, sizeof(buf)) == FALSE ) return; + ti = atoi( buf); + if( CHAR_getWorkInt( charaindex, CHAR_WORKCHATROOMTYPE) != 1 ) return; + if( (chat = CHAR_getWorkInt( charaindex, CHAR_WORKCHATROOMNUM)) < 0 ) return; + if( chat >= MAX_CHATROOM ) return; + if( ChatRoom[chat].charalist[ti].use == 0 ) return; + snprintf( token, sizeof( token),"M|%d|%s|%s|%d|", + chat, + CHAR_getChar( charaindex, CHAR_CDKEY), + CHAR_getChar( charaindex, CHAR_NAME), + ti ); +// ChatRoom_Make ( myindex , atoi( message ) ); + }else if ( strcmp ( Head , "T" ) == 0 ) {// 频道讯息 + int chat; + if( getStringFromIndexWithDelim( data , "|", 2, buf, sizeof(buf)) == FALSE ) return; + if( CHAR_getWorkInt( charaindex, CHAR_WORKCHATROOMTYPE) == 0 ) return; + if( (chat = CHAR_getWorkInt( charaindex, CHAR_WORKCHATROOMNUM)) < 0 ) return; + if( chat >= MAX_CHATROOM ) return; + snprintf( token, sizeof( token),"T|%d|%s|", chat, buf); + +// ChatRoom_Message ( myindex , message ) ; + }else if ( strcmp ( Head , "B" ) == 0 ) {// 聊天室清单 + ChatRoom_List ( fd ); + return; + } + + fd = getfdFromCharaIndex( charaindex); + saacproto_ACUniChatroom_send( acfd, charaindex, CONNECT_getFdid(fd), + CHAR_getChar( charaindex, CHAR_CDKEY), token); +} + +void saac_ChatRoom_recvall ( int fd , char *result, char *data, int charaindex, int clifdid) +{ + char Head[4], buf[256]; + int chat; + + charaindex = getCharindexFromFdid(clifdid); + //andy_log + print( "saac CR:%s.\n", data); + if( getStringFromIndexWithDelim( data , "|", 1, Head, sizeof(Head)) == FALSE ) return; + + if( strcmp( Head, "C") == 0 ) { // 成立频道 +// int fd = getfdFromCharaIndex( charaindex); +// if( getStringFromIndexWithDelim( data , "|", 2, result, sizeof(result)) == FALSE ) return; + if( !strcmp( result, SUCCESSFUL) ){ + + if( getStringFromIndexWithDelim( data , "|", 3, buf, sizeof(buf)) == FALSE ) return; + chat = atoi( buf); + if( chat < 0 || chat >= MAX_CHATROOM ) return; + if( getStringFromIndexWithDelim( data , "|", 4, ChatRoom[chat].chatname, + sizeof(ChatRoom[chat].chatname)) == FALSE ) return; + if( getStringFromIndexWithDelim( data , "|", 5, buf, sizeof(buf)) == FALSE ) return; + ChatRoom[chat].masindex = atoi( buf); + if( getStringFromIndexWithDelim( data , "|", 6, + ChatRoom[chat].charalist[0].cdkey, sizeof(ChatRoom[chat].charalist[0].cdkey)) == FALSE ) return; + if( getStringFromIndexWithDelim( data , "|", 7, + ChatRoom[chat].charalist[0].name, sizeof(ChatRoom[chat].charalist[0].name)) == FALSE ) return; + if( getStringFromIndexWithDelim( data , "|", 8, + ChatRoom[chat].charalist[0].own, sizeof(ChatRoom[chat].charalist[0].own)) == FALSE ) return; + ChatRoom[chat].charalist[0].use=1; + if( CHAR_DelGold( charaindex, 200) == 0 ) return; + ChatRoom[chat].use = 1; + CHAR_setWorkInt ( charaindex , CHAR_WORKCHATROOMTYPE , 1 ) ; + CHAR_setWorkInt ( charaindex , CHAR_WORKCHATROOMNUM , chat ) ; + CHAR_talkToCli ( charaindex , -1 , "成立聊天室扣除200石币。" , CHAR_COLORYELLOW ); + + ChatRoom_Refresh( chat); + }else{ + CHAR_talkToCli ( charaindex , -1 , "无法成立聊天室,聊天频道已满或条件不足!" , CHAR_COLORYELLOW ); + } + }else if( strcmp( Head, "U") == 0 ) { + int k=2, ti; + char bufarg[512]; + if( getStringFromIndexWithDelim( data , ",", 1, bufarg, sizeof(bufarg)) == FALSE ) return; + if( getStringFromIndexWithDelim( bufarg , "|", 2, buf, sizeof(buf)) == FALSE ) return; + chat = atoi( buf); + if( chat < 0 || chat >= MAX_CHATROOM ) return; + if( getStringFromIndexWithDelim( bufarg , "|", 3, buf, sizeof(buf)) == FALSE ) return; + ChatRoom[chat].use = atoi( buf); + if( getStringFromIndexWithDelim( bufarg , "|", 4, + ChatRoom[chat].chatname, sizeof(ChatRoom[chat].chatname)) == FALSE ) return; + if( getStringFromIndexWithDelim( bufarg , "|", 5, buf, sizeof(buf)) == FALSE ) return; + ChatRoom[chat].masindex = atoi( buf); + if( getStringFromIndexWithDelim( bufarg , "|", 6, buf, sizeof(buf)) == FALSE ) return; + ChatRoom[chat].charanum = atoi( buf); + + while( getStringFromIndexWithDelim( data , ",", k, bufarg, sizeof( bufarg) ) ){ + k++; + if( bufarg[0] == 0 || strlen( bufarg) <= 0 ) continue; + if( getStringFromIndexWithDelim( bufarg , "|", 1, buf, sizeof(buf)) == FALSE ) return; + ti = atoi( buf); + if( getStringFromIndexWithDelim( bufarg , "|", 2, + ChatRoom[chat].charalist[ti].cdkey, sizeof(ChatRoom[chat].charalist[ti].cdkey)) == FALSE ) return; + if( getStringFromIndexWithDelim( bufarg , "|", 3, + ChatRoom[chat].charalist[ti].name, sizeof(ChatRoom[chat].charalist[ti].name)) == FALSE ) return; + if( getStringFromIndexWithDelim( bufarg , "|", 4, + ChatRoom[chat].charalist[ti].own, sizeof(ChatRoom[chat].charalist[ti].own)) == FALSE ) return; + ChatRoom[chat].charalist[ti].use = 1; + } + ChatRoom_Refresh( chat); + }else if( strcmp( Head, "D") == 0 ) { + ChatRoom_Destroy ( data); + }else if( strcmp( Head, "L") == 0 ) { + int chat, ti; + if( getStringFromIndexWithDelim( data , "|", 2, buf, sizeof( buf)) == FALSE ) return; + chat = atoi(buf); + if( chat < 0 || chat >= MAX_CHATROOM ) return; + if( getStringFromIndexWithDelim( data , "|", 3, buf, sizeof( buf)) == FALSE ) return; + ti = atoi(buf); + if( ti<0||ti>=MAX_PPLINROOM)return; + ChatRoom[chat].charalist[ti].use = 0; + ChatRoom_Refresh( chat); + }else if( strcmp( Head, "M") == 0 ) { + int ti, chat, j; + int playernum = CHAR_getPlayerMaxNum(); + if( getStringFromIndexWithDelim( data , "|", 2, buf, sizeof( buf)) == FALSE ) return; + chat = atoi( buf); + if( chat < 0 || chat >= MAX_CHATROOM ) return; + if( getStringFromIndexWithDelim( data , "|", 3, buf, sizeof( buf)) == FALSE ) return; + ti = atoi( buf); + if( ti<0 || ti>=MAX_PPLINROOM )return; + if( ChatRoom[chat].charalist[ti].use == 0 ) return; + for ( j=0; j= MAX_CHATROOM ) return; + if( getStringFromIndexWithDelim( data , "|", 3, buf, sizeof( buf)) == FALSE ) return; + ti = atoi( buf); + if( ti<0 || ti>=MAX_PPLINROOM ) return; +//andy_log +print( "\nK|%d|%d|\n", chat, ti); + + for ( j=0; j= MAX_CHATROOM ) return; + if( getStringFromIndexWithDelim( data , "|", 3, result, sizeof( result)) == FALSE ) return; + if( !strcmp( result, "FULL") ){ + CHAR_talkToCli( charaindex, -1, "该频道已满!", CHAR_COLORYELLOW); + }else if( !strcmp( result, "OK") ){ + CHAR_talkToCli( charaindex, -1, "加入聊天频道!", CHAR_COLORYELLOW); + CHAR_setWorkInt( charaindex, CHAR_WORKCHATROOMNUM, chat); + CHAR_setWorkInt( charaindex, CHAR_WORKCHATROOMTYPE, 2); + } + ChatRoom_Refresh( chat); + }else if( !strcmp( Head, "T") ) {//频道讯息 + int j; + char message[256]; + int playernum = CHAR_getPlayerMaxNum(); + if( getStringFromIndexWithDelim( data , "|", 2, buf, sizeof( buf)) == FALSE ) return; + chat = atoi( buf); + if( chat < 0 || chat >= MAX_CHATROOM ) return; + if( getStringFromIndexWithDelim( data , "|", 3, buf, sizeof( buf)) == FALSE ) return; + snprintf ( message, sizeof ( message ) , "T|%s" , buf ); + for ( j=0; j 0 ) { + i = CHAR_getWorkInt ( myindex , CHAR_WORKCHATROOMNUM ) ; + + // WON FIX + if( i < 0 ) return; + + for ( j = 0 ; j < MAX_PPLINROOM ; j ++ ) { + if ( !CHAR_CHECKINDEX ( ChatRoom[ i ].MemberList[ j ] ) ) + continue; + snprintf ( buf , sizeof ( buf ) , "T|%s" , message ) ; + fd = getfdFromCharaIndex ( ChatRoom[ i ].MemberList[ j ] ); + lssproto_CHATROOM_send ( fd , buf ) ; + } + } +} + +void ChatRoom_Kick ( int myindex , int toindex ) +{ + int i , fd ; + int Num = CHAR_getWorkInt ( myindex , CHAR_WORKCHATROOMNUM ); + if ( !CHAR_CHECKINDEX ( myindex ) ) + return ; + if ( !CHAR_CHECKINDEX ( toindex ) ) + return ; + if ( myindex == toindex ) return; + if ( CHAR_getWorkInt ( myindex , CHAR_WORKCHATROOMTYPE ) == 1 ) { + if ( Num != CHAR_getWorkInt ( toindex , CHAR_WORKCHATROOMNUM ) ) + return; + else { + CHAR_setWorkInt ( toindex , CHAR_WORKCHATROOMTYPE , 0 ) ; + CHAR_setWorkInt ( toindex , CHAR_WORKCHATROOMNUM , -1) ; + //CHAR_talkToCli ( toindex , -1 , "室长将你踢出聊天室!" , CHAR_COLORRED ) ; + fd = getfdFromCharaIndex( toindex ); + lssproto_CHATROOM_send ( fd , "K|" ) ; + ChatRoom[ Num ].NowPeople --; + for ( i = 0 ; i < MAX_PPLINROOM ; i ++ ) { + if ( ChatRoom[ Num ].MemberList[ i ] == toindex ) { + ChatRoom[ Num ].MemberList[ i ] = -1 ; + break; + } + } + } + } + ChatRoom_Refresh ( Num ) ; +} + +void ChatRoom_Make ( int myindex , int toindex ) +{ + int Num = CHAR_getWorkInt ( myindex , CHAR_WORKCHATROOMNUM ); + if ( !CHAR_CHECKINDEX ( myindex ) ) + return ; + if ( !CHAR_CHECKINDEX ( toindex ) ) + return ; + if ( CHAR_getWorkInt ( myindex , CHAR_WORKCHATROOMTYPE ) == 1 ) { + if ( Num != CHAR_getWorkInt ( toindex , CHAR_WORKCHATROOMNUM ) ) + return; + else if ( CHAR_getInt ( toindex , CHAR_LV ) >= 30 || + CHAR_getInt ( toindex , CHAR_TRANSMIGRATION ) >= 1 ) { + CHAR_setWorkInt ( myindex , CHAR_WORKCHATROOMTYPE , 2 ) ; + CHAR_setWorkInt ( toindex , CHAR_WORKCHATROOMTYPE , 1 ) ; + CHAR_talkToCli ( toindex , -1 , "你现在是聊天室的室长!" , CHAR_COLORRED ) ; + + ChatRoom[ Num ].Maker = toindex ; + } + else { + CHAR_talkToCli ( myindex , -1 , "您选择的继任人物等级不足以担任室长!" , CHAR_COLORRED ) ; + } + } + ChatRoom_Refresh ( Num ) ; +} + +void ChatRoom_Leave ( int myindex ) +{ + int i , NextMaker = -1 ; + int Num = CHAR_getWorkInt ( myindex , CHAR_WORKCHATROOMNUM ); + if ( !CHAR_CHECKINDEX ( myindex ) ) + return ; + if ( CHAR_getWorkInt ( myindex , CHAR_WORKCHATROOMTYPE ) == 1 ) { + for ( i = 0 ; i < MAX_PPLINROOM ; i ++ ) { + if ( ChatRoom[ Num ].MemberList[ i ] != myindex && + ChatRoom[ Num ].MemberList[ i ] != -1 ) { + if ( CHAR_CHECKINDEX ( ChatRoom[ Num ].MemberList[ i ] ) ) { + if ( CHAR_getInt ( ChatRoom[ Num ].MemberList[ i ] , CHAR_LV ) >= 30 || + CHAR_getInt ( ChatRoom[ Num ].MemberList[ i ] , CHAR_TRANSMIGRATION ) >= 1 ) { + NextMaker = ChatRoom[ Num ].MemberList[ i ] ; + break; + } + } + } + } + if ( NextMaker != -1 ) { + ChatRoom_Make( myindex , NextMaker ) ; + CHAR_setWorkInt ( myindex , CHAR_WORKCHATROOMTYPE , 0) ; + CHAR_setWorkInt ( myindex , CHAR_WORKCHATROOMNUM, -1) ; + ChatRoom[ Num ].NowPeople --; + for ( i = 0 ; i < MAX_PPLINROOM ; i ++ ) { + if ( ChatRoom[ Num ].MemberList[ i ] == myindex ) { + ChatRoom[ Num ].MemberList[ i ] = -1 ; + break; + } + } + }else{ + ChatRoom_Destroy( myindex ) ; + return ; + } + + }else if ( CHAR_getWorkInt ( myindex , CHAR_WORKCHATROOMTYPE ) == 2 ) { + CHAR_setWorkInt ( myindex, CHAR_WORKCHATROOMTYPE, 0) ; + CHAR_setWorkInt ( myindex, CHAR_WORKCHATROOMNUM, -1) ; + ChatRoom[ Num ].NowPeople --; + for ( i = 0 ; i < MAX_PPLINROOM ; i ++ ) { + if ( ChatRoom[ Num ].MemberList[ i ] == myindex ) { + ChatRoom[ Num ].MemberList[ i ] = -1 ; + break; + } + } + } + ChatRoom_Refresh ( Num ) ; +} + +void ChatRoom_Join ( int myindex , int num ) +{ + int fd ; + char buf[64]; + if ( !CHAR_CHECKINDEX ( myindex ) ) + return ; + if ( CHAR_getWorkInt ( myindex , CHAR_WORKCHATROOMTYPE ) != 0 ) + return ; + if ( ChatRoom[ num ].useFlag == TRUE && ChatRoom[ num ].NowPeople < MAX_PPLINROOM ) { + sprintf ( buf , "J|%s|%d" , CHAR_getChar( myindex , CHAR_NAME ) , myindex ) ; + fd = getfdFromCharaIndex( ChatRoom[ num ].Maker ); + lssproto_CHATROOM_send ( fd , buf ); + }else if ( ChatRoom[ num ].NowPeople >= MAX_PPLINROOM ) + CHAR_talkToCli ( myindex , -1 , "聊天室人数已满!" , CHAR_COLORRED ) ; + +} + +void ChatRoom_Agree ( int myindex , int toindex , int YesNo ) { + int i ; + int Num = CHAR_getWorkInt ( myindex , CHAR_WORKCHATROOMNUM ); + if ( !CHAR_CHECKINDEX ( myindex ) ) + return ; + if ( !CHAR_CHECKINDEX ( toindex ) ) + return ; + if ( CHAR_getWorkInt ( toindex , CHAR_WORKCHATROOMTYPE ) != 0 ) + return; + if ( CHAR_getWorkInt ( myindex , CHAR_WORKCHATROOMTYPE ) == 1 ) { + if ( ChatRoom[ Num ].NowPeople < MAX_PPLINROOM && YesNo == 1 ) { + CHAR_setWorkInt ( toindex , CHAR_WORKCHATROOMTYPE , 2 ) ; + CHAR_setWorkInt ( toindex , CHAR_WORKCHATROOMNUM , Num ) ; + ChatRoom[ Num ].NowPeople ++ ; + for ( i = 0 ; i < MAX_PPLINROOM ; i ++ ) { + if ( ChatRoom[ Num ].MemberList[ i ] == -1 ) { + ChatRoom[ Num ].MemberList[ i ] = toindex ; + break; + } + } + }else if ( YesNo == 0 ) { + CHAR_talkToCli ( toindex , -1 , "您申请的聊天室室长拒绝您的加入!" , CHAR_COLORRED ) ; + }else if ( ChatRoom[ Num ].NowPeople >= MAX_PPLINROOM ) { + CHAR_talkToCli ( toindex , -1 , "您申请的聊天室人数已满!" , CHAR_COLORRED ) ; + CHAR_talkToCli ( myindex , -1 , "聊天室人数已满!" , CHAR_COLORRED ) ; + } + } + ChatRoom_Refresh ( Num ) ; +} + +void ChatRoom_List ( int fd ) +{ + int i ; + char buf[128]; + char token[2048] = "B|"; + for ( i = 0 ; i < MAX_CHATROOM ; i ++ ) { + if ( ChatRoom[ i ].useFlag == TRUE ) { + sprintf ( buf , "聊天室%2d资讯:室名=>%20s , 室长=>%16s , 人数=>%2d" , + i , + ChatRoom[ i ].RoomName , + CHAR_getChar ( ChatRoom[ i ].Maker , CHAR_NAME ) , + ChatRoom[ i ].NowPeople ); + + sprintf ( buf , "r%d|%s|%d|%s|p%d|" , + i , + ChatRoom[ i ].RoomName , + ChatRoom[ i ].Maker , + CHAR_getChar ( ChatRoom[ i ].Maker , CHAR_NAME ) , + ChatRoom[ i ].NowPeople ); + strncat ( token , buf , sizeof ( buf ) ) ; + } + } + lssproto_CHATROOM_send ( fd , token ) ; +} + +void ChatRoom_Refresh ( int Num ) +{ + int fd , i , RoomLeader = -1 ; + char token[2048] ; + char token2[2096] ; + char buf[64] ; + if ( ChatRoom[ Num ].useFlag == TRUE ) { + sprintf ( token , "R|r%d|%s|%d|%s|p%d|" , + Num , + ChatRoom[ Num ].RoomName , + ChatRoom[ Num ].Maker , + CHAR_getChar ( ChatRoom[ Num ].Maker , CHAR_NAME ) , + ChatRoom[ Num ].NowPeople ); + for ( i = 0 ; i < MAX_PPLINROOM ; i ++ ) { + if ( ChatRoom[ Num ].MemberList[ i ] != -1 ) { + sprintf( buf , "I%d|%s|%s|" , + ChatRoom[ Num ].MemberList[ i ] , + CHAR_getChar ( ChatRoom[ Num ].MemberList[ i ] , CHAR_NAME ) , + CHAR_getChar ( ChatRoom[ Num ].MemberList[ i ] , CHAR_OWNTITLE ) + ); + strncat ( token , buf , sizeof ( buf ) ) ; + } + } + } + for ( i = 0 ; i < MAX_PPLINROOM ; i ++ ) { + if ( ChatRoom[ Num ].MemberList[ i ] != -1 ) { + if ( CHAR_getWorkInt ( ChatRoom[ Num ].MemberList[ i ] , CHAR_WORKCHATROOMTYPE ) == 1 ) RoomLeader = 1; + else RoomLeader = 0 ; + sprintf ( token2 , "%s%d|" , token , RoomLeader ) ; + fd= getfdFromCharaIndex ( ChatRoom[ Num ].MemberList[ i ] ); + lssproto_CHATROOM_send ( fd , token2 ) ; + } + } +} + +void ChatRoom_recvall ( int fd , char *data ) +{ + char Head[4]; + char message[1024]; + char buf[16]; + int myindex ; + + myindex = CONNECT_getCharaindex(fd); + if ( !CHAR_CHECKINDEX ( myindex ) )return ; + getStringFromIndexWithDelim( data , "|", 1, Head, sizeof(Head)); + getStringFromIndexWithDelim( data , "|", 2, message, sizeof(message)); + + if ( strcmp ( Head , "C" ) == 0 ) { // 成立频道 + if ( !ChatRoom_Create ( myindex , message ) ) + print("\nSyu log Create Channel Error" ); + }else if ( strcmp ( Head , "D" ) == 0 ) { // 删除频道 + if ( !ChatRoom_Destroy ( myindex ) ) + print("\nSyu log Destroy Channel Error" ) ; + }else if ( strcmp ( Head , "A" ) == 0 ) {// 同意加入频道 + getStringFromIndexWithDelim( data , "|", 2, message, sizeof(message)); + getStringFromIndexWithDelim( data , "|", 3, buf, sizeof(buf)); + ChatRoom_Agree ( myindex , atoi( message ) , atoi( buf ) ) ; + }else if ( strcmp ( Head , "J" ) == 0 ) {// 申请频道 + getStringFromIndexWithDelim( data , "|", 2, message, sizeof(message)); + ChatRoom_Join ( myindex , atoi( message ) ) ; + }else if ( strcmp ( Head , "L" ) == 0 ) {// 离开频道 + ChatRoom_Leave ( myindex ) ; + }else if ( strcmp ( Head , "K" ) == 0 ) {//踢出频道 + getStringFromIndexWithDelim( data , "|", 2, message, sizeof(message)); + ChatRoom_Kick ( myindex , atoi( message ) ); + }else if ( strcmp ( Head , "M" ) == 0 ) { // 更换室长 + getStringFromIndexWithDelim( data , "|", 2, message, sizeof(message)); + ChatRoom_Make ( myindex , atoi( message ) ); + }else if ( strcmp ( Head , "T" ) == 0 ) {// 频道讯息 + getStringFromIndexWithDelim( data , "|", 2, message, sizeof(message)); + ChatRoom_Message ( myindex , message ) ; + }else if ( strcmp ( Head , "B" ) == 0 ) {// 聊天室清单 + ChatRoom_List ( fd ); + }else + print("\nSyu log None"); +} + +#endif +#endif diff --git a/gmsv/char/deathcontend.c b/gmsv/char/deathcontend.c new file mode 100644 index 0000000..8162754 --- /dev/null +++ b/gmsv/char/deathcontend.c @@ -0,0 +1,2022 @@ +#include "version.h" +#include +#include +#include "util.h" +#include "char.h" +#include "char_data.h" +#include "char_base.h" +#include "battle.h" +#include "configfile.h" +#include "saacproto_cli.h" +#include "buf.h" +#include "log.h" + +#ifdef _DEATH_CONTEND + +#include "deathcontend.h" + +PkTeamLists *PkTeamList=NULL; + +PKProcedures PKProcedure[MAXJOINTEAM]; + +static char chartslist[65536*3]; + +static char ABattlelist[65536*2]; +static char ABLevelup[65536*2]; + +static int maxteam = 0; + +static int PKListSort[550]; + +//正式赛 +ArrangeBattleC *NowABattle[MAXBAHEAD][MAXBAFLOOR][MAXNOWBATTLE]; +ArrangeBattleC *headABattle[MAXBAHEAD]; +ArrangeBattleC *InBattle[MAXBATTLEPAGE]; + +static int maxfloor=0; +static int maxbati=0; +int ABFloor[MAXBAHEAD]; + +/* +struct { + int floor; + int x; + int y; + int use; +}PK_WATCHMAP[MAXJOINTEAM][MAXWATCHMAP]={ + {}, + + +}; +*/ +struct { + int floor; + int x; + int y; + int use; +}PK_BATTLEMAP[MAXJOINTEAM]={ +// { 8240, 13, 14, 0}, { 8240, 13, 27, 0}, { 8240, 26, 14, 0}, { 8240, 26, 27, 0}, + + { 8240, 13, 14, 0}, { 8240, 13, 27, 0}, { 8240, 26, 14, 0}, { 8240, 26, 27, 0}, + { 8241, 13, 14, 0}, { 8241, 13, 27, 0}, { 8241, 26, 14, 0}, { 8241, 26, 27, 0}, + { 8242, 13, 14, 0}, { 8242, 13, 27, 0}, { 8242, 26, 14, 0}, { 8242, 26, 27, 0}, + { 8243, 13, 14, 0}, { 8243, 13, 27, 0}, { 8243, 26, 14, 0}, { 8243, 26, 27, 0}, + { 8244, 13, 14, 0}, { 8244, 13, 27, 0}, { 8244, 26, 14, 0}, { 8244, 26, 27, 0}, + + { 8245, 13, 14, 0}, { 8245, 13, 27, 0}, { 8245, 26, 14, 0}, { 8245, 26, 27, 0}, + { 8246, 13, 14, 0}, { 8246, 13, 27, 0}, { 8246, 26, 14, 0}, { 8246, 26, 27, 0}, + { 8247, 13, 14, 0}, { 8247, 13, 27, 0}, { 8247, 26, 14, 0}, { 8247, 26, 27, 0}, + { 8248, 13, 14, 0}, { 8248, 13, 27, 0}, { 8248, 26, 14, 0}, { 8248, 26, 27, 0}, + { 8249, 13, 14, 0}, { 8249, 13, 27, 0}, { 8249, 26, 14, 0}, { 8249, 26, 27, 0}, + +}; + +void PKLIST_shoutToAll( char *token, int teamnum, int floor) +{ + int i; + int playernum = CHAR_getPlayerMaxNum(); + + LogPkContend( token, "shoutToAll", 0, 0, 0, 1); + + for( i=0 ; i= maxteam ) return; + for( k=0;k= maxteam ) return; + PkTeamList[ti].use = 0; + PkTeamList[ti].teamnum = -1; + memset( PkTeamList[ti].teamname, 0, sizeof( PkTeamList[ti].teamname ) ); + memset( PkTeamList[ti].pathdir, 0, sizeof( PkTeamList[ti].pathdir) ); + memset( PkTeamList[ti].leadercdkey, 0, sizeof( PkTeamList[ti].leadercdkey ) ); + PkTeamList[ti].win = 0; + PkTeamList[ti].lost = 0; + PkTeamList[ti].battleplay = 0; + PkTeamList[ti].score = 0; + PkTeamList[ti].inside = 1; + PkTeamList[ti].read = 1; +} +//----------------------------------------------------------- + +int PKLIST_InitPkTeamList( int teamnum ) +{ + int i; + if( PkTeamList != NULL || teamnum <= 0 ) return -1; + maxteam = teamnum; + PkTeamList = (PkTeamLists *)calloc( 1, sizeof( struct _tagPkTeamLists) * maxteam ); + if( PkTeamList == NULL ){ + print( "ANDY err Can't calloc PkTeamList :%d !!\n", + sizeof( struct _tagPkTeamLists) * maxteam ); + return -1; + } + print( "PkTeamList calloc size :%d ..\n", + sizeof( struct _tagPkTeamLists) * maxteam ); + + for( i=0; i= DEFMAXBATTLENUM ){ + CHAR_talkToCli( charaindex, -1, "对战场次已满!", CHAR_COLORYELLOW); + return FALSE; + } + if( PkTeamList[array].BHistory[k].use == 0 ) continue; + if( PkTeamList[array].BHistory[k].teamnum == toteamnum ) return FALSE; + } + return TRUE; +} + +int PKLIST_CHECKPkTeamNew( int teamnum, int charaindex, char *cdkey ) +{ + int k; + int array; + array = PKLIST_GetPkTeamListArray( teamnum, cdkey); + if( array == -1 ){ + CHAR_talkToCli( charaindex, -1, "无法取得队伍资料!", CHAR_COLORYELLOW); + return -1; + } + for( k=0; k= DEFMAXBATTLENUM ){ + CHAR_talkToCli( charaindex, -1, "对战场次已满!", CHAR_COLORYELLOW); + return -1; + } + return k; +} + +BOOL PKLIST_LoadPkTeamListDataSub( int ti, char *data) +{ + int oldinside = -1; + char buf[512]; + if( getStringFromIndexWithDelim( data, "|", 1, buf, sizeof( buf)) == FALSE ) return FALSE; + PkTeamList[ti].teamnum = atoi( buf); + if( getStringFromIndexWithDelim( data, "|", 2, buf, sizeof( buf)) == FALSE ) return FALSE; + sprintf( PkTeamList[ti].pathdir, "%s", buf); + if( getStringFromIndexWithDelim( data, "|", 3, buf, sizeof( buf)) == FALSE ) return FALSE; + sprintf( PkTeamList[ti].teamname, "%s", buf); + if( getStringFromIndexWithDelim( data, "|", 4, buf, sizeof( buf)) == FALSE ) return FALSE; + sprintf( PkTeamList[ti].leadercdkey, "%s", buf); + if( getStringFromIndexWithDelim( data, "|", 5, buf, sizeof( buf)) == FALSE ) return FALSE; + PkTeamList[ti].win = atoi( buf); + if( getStringFromIndexWithDelim( data, "|", 6, buf, sizeof( buf)) == FALSE ) return FALSE; + PkTeamList[ti].lost = atoi( buf); + if( getStringFromIndexWithDelim( data, "|", 7, buf, sizeof( buf)) == FALSE ) return FALSE; + PkTeamList[ti].battleplay = atoi( buf); + if( getStringFromIndexWithDelim( data, "|", 8, buf, sizeof( buf)) == FALSE ) return FALSE; + PkTeamList[ti].score = atoi( buf); + + oldinside = PkTeamList[ti].inside; + if( getStringFromIndexWithDelim( data, "|", 9, buf, sizeof( buf)) == FALSE ) return FALSE; + PkTeamList[ti].inside = atoi( buf); + + if( PkTeamList[ti].inside == 2 && PkTeamList[ti].inside != oldinside ){//广播 + char token[256]; + int i; + int playernum = CHAR_getPlayerMaxNum(); + sprintf( token, "%s 队,达成比赛规定积分,积分:%d。", + PkTeamList[ti].teamname, PkTeamList[ti].score ); + + for( i=0; i= MAXTEAMMANNUM ) break; + } + if( count <= 0 ) return FALSE; + + return TRUE; +} + +BOOL PKLIST_LoadPkTeamListDataBHistory( int ti, char *data) +{ + int k=1, count=0; + char buf[256], buf1[64]; + while( getStringFromIndexWithDelim( data, "|", k, buf, sizeof( buf)) !=FALSE ) { + k++; + if( getStringFromIndexWithDelim( buf, ",", 1, buf1, sizeof( buf1)) == FALSE ) continue; + PkTeamList[ti].BHistory[count].teamnum = atoi( buf1); + if( getStringFromIndexWithDelim( buf, ",", 2, buf1, sizeof( buf1)) == FALSE ) continue; + PkTeamList[ti].BHistory[count].flg = atoi( buf1); + + PkTeamList[ti].BHistory[count].use = 1; + count++; + if( count >= MAXBATTLENUM ) break; + } + return TRUE; +} + +// teamlist.ini 内容 +// teamnum|teamname|leadercdkeky|leadername|cdkey|name|cdkey|name|cdkey|name|cdkey|name + +void PKLIST_LoadInitPkTeamListData(void) +{ + FILE *fp = NULL; + int count = 0,i; + char szReadData[1024],buf[1024],buf1[1024]; + + if((fp = fopen("data//pkdata//teamlist.txt","r")) != NULL){ + fclose(fp); + return; + } + if((fp = fopen("data//pkdata//teamlist.ini","r")) == NULL){ + print("can't find data/pkdata/teamlist.ini\n"); + return; + } + while(1){ + memset(szReadData,0,sizeof(szReadData)); + memset(buf,0,sizeof(buf)); + if(fgets(szReadData,1024,fp) == NULL) break; + if(getStringFromIndexWithDelim(szReadData,"|",1,buf,sizeof(buf)) == FALSE){ + print("err get teamindex data:%s\n",szReadData); + continue; + } + PkTeamList[count].teamnum = atoi(buf); + sprintf(PkTeamList[count].pathdir,"NOUSE"); + if(getStringFromIndexWithDelim(szReadData,"|",2,buf,sizeof(buf)) == FALSE){ + print("err get teamindex data:%s\n",szReadData); + continue; + } + sprintf(PkTeamList[count].teamname,"%s",buf); + if(getStringFromIndexWithDelim(szReadData,"|",3,buf,sizeof(buf)) == FALSE){ + print("err get leadercdkey data:%s\n",szReadData); + continue; + } + sprintf(PkTeamList[count].leadercdkey,"%s",buf); + for(i=0;i=maxteam ){ + print("err 1 buf:%s\n", buf); + continue; + } + if( getStringFromIndexWithDelim( buf, "_", 2, buf1, sizeof( buf1)) == FALSE ){ + print("err 2 buf:%s\n", buf); + continue; + } + if( PKLIST_LoadPkTeamListDataSub( array, buf1 ) == FALSE ){ + print("err 3 buf:%s\n", buf); + continue; + } + if( getStringFromIndexWithDelim( buf, "_", 3, buf1, sizeof( buf1)) == FALSE ){ + print("err 4 buf:%s\n", buf); + continue; + } + if( PKLIST_LoadPkTeamListDataMyTeamMans( array, buf1) == FALSE ){ + print("err 5 buf:%s\n", buf); + continue; + } + if( getStringFromIndexWithDelim( buf, "_", 4, buf1, sizeof( buf1)) != FALSE ){ + if( PKLIST_LoadPkTeamListDataBHistory( array, buf1) == FALSE ){ + print("err 7 buf:%s\n", buf); + continue; + } + } + + teamcount++; + } + //andy_log + print("\nteamcount:%d \n", teamcount); + if( teamcount <= 0 ) return TRUE; + return TRUE; +} +*/ + +void PKLIST_InsertTeamNum( int charaindex ) +{ + int i, k; + char *cdkey, *name; + if( !CHAR_CHECKINDEX( charaindex) ) return; + cdkey = CHAR_getChar( charaindex, CHAR_CDKEY); + name = CHAR_getChar( charaindex, CHAR_NAME); + + for( i=0; i= (int)time(NULL) ) return; + side = (j+1)%2; + + if( PKProcedure[battlearray].Team[side].use == 0 ) return; + if( (tonum = PKProcedure[battlearray].Team[side].teamnum ) < 0 ) return; + + if( (toarray = PKLIST_GetPkTeamListArrayFromNum( tonum)) == -1 || + PKLIST_GetTeamLeaderCdkey( tonum, tocdkey ) == FALSE ){ + print("Can't Get Data tonum:%d err !!\n", tonum); + return; + } + break; + } + //andy_log + print("NPC_PKLIST_PlayerLogout_Exit( %d) \n", charaindex); + if( (menum=CHAR_getInt( charaindex, CHAR_PKLISTTEAMNUM)) < 0 ) return; + + if( (aB1=ABATTLE_getInBattle( menum))==NULL ) return; + if( (aBo=aB1->top) == NULL ) return; + if( (aB1=aBo->next[0]) == NULL || (aB2=aBo->next[1]) == NULL ) return; + + if( aB1->teamnum == menum ){ + sprintf( token, "%s 队 胜 %s 队。", aB2->teamname, aB1->teamname ); + LogPkContend( aB2->teamname , aB1->teamname, 0, 0, 0, 0); + ABATTLE_RecordBattle( -1, aB1->teamname, "", aB2->teamname, "胜"); + tonum = aB2->teamnum; + ABATTLE_EnterBattle( aB2); + }else{ + sprintf( token, "%s 队 胜 %s 队。", aB1->teamname, aB2->teamname ); + LogPkContend( aB1->teamname , aB2->teamname, 0, 0, 0, 0); + ABATTLE_RecordBattle( -1, aB1->teamname, "胜", aB2->teamname, ""); + tonum = aB1->teamnum; + ABATTLE_EnterBattle( aB1); + } + for( i=0; i= (int)time(NULL) ) return; + side = (j+1)%2; + + if( PKProcedure[battlearray].Team[side].use == 0 ) return; + if( (tonum = PKProcedure[battlearray].Team[side].teamnum ) < 0 ) return; + + if( (toarray = PKLIST_GetPkTeamListArrayFromNum( tonum)) == -1 || + PKLIST_GetTeamLeaderCdkey( tonum, tocdkey ) == FALSE ){ + print("Can't Get Data tonum:%d err !!\n", tonum); + return; + } + + PKLIST_LOCKTeam( menum); + PKLIST_LOCKTeam( tonum); + //saacproto_PkListUpDate_send( acfd , tocdkey, mecdkey,tonum, menum, 0, 0); + PKLIST_UpData(tocdkey,mecdkey,tonum,menum,0,0); + + sprintf( token, "%s 队 胜 %s 队。", + PkTeamList[toarray].teamname, PkTeamList[mearray].teamname); + + LogPkContend( PkTeamList[toarray].teamname, PkTeamList[mearray].teamname, + CHAR_getInt( charaindex, CHAR_FLOOR), + CHAR_getInt( charaindex, CHAR_X), CHAR_getInt( charaindex, CHAR_Y), 0); + + PKLIST_DelPKProcedures( battlearray, 0, PKTYPE_WAIT); + PKLIST_DelPKProcedures( battlearray, 1, PKTYPE_WAIT); + + { //广播胜负 + int i; + int playernum = CHAR_getPlayerMaxNum(); + for( i=0; itop == NULL || aB2->top == NULL || + aB1->top != aB2->top ) return 0; + + if( winside == 0 ){ + sprintf( token, "%s 队 胜 %s 队。", aB1->teamname, aB2->teamname ); + LogPkContend( aB1->teamname , aB2->teamname, 0, 0, 0, 0); + ABATTLE_RecordBattle( -1, aB1->teamname, "胜", aB2->teamname, ""); + ABATTLE_EnterBattle( aB1); + }else{ + sprintf( token, "%s 队 胜 %s 队。", aB2->teamname, aB1->teamname ); + LogPkContend( aB2->teamname , aB1->teamname, 0, 0, 0, 0); + ABATTLE_RecordBattle( -1, aB1->teamname, "", aB2->teamname, "胜"); + ABATTLE_EnterBattle( aB2); + } + + for( i=0; itop ) InBattle[i] = NULL; + } + + { //广播胜负 + int i; + int playernum = CHAR_getPlayerMaxNum(); + for( i=0; i=40 ) return; + if( side<0 || side >1 ) return; + + PKProcedure[ti].use = 0; + PKProcedure[ti].type = type; + PKProcedure[ti].Team[side].use = 0; + PKProcedure[ti].Team[side].teamnum = -1; + PKProcedure[ti].Team[side].fd = -1; + +} + +BOOL PKLIST_CheckPklistInServerMap( int ti, int side) +{ + if( !CHAR_CHECKINDEX( PKProcedure[ti].Team[side].toindex) || + PKLIST_GetPkTeamListArrayFromNum( PKProcedure[ti].Team[side].teamnum ) == -1 || + PKProcedure[ti].Team[side].fd != getfdFromCharaIndex( PKProcedure[ti].Team[side].toindex) || + CHAR_getInt( PKProcedure[ti].Team[side].toindex, CHAR_FLOOR ) == 8250 ){ + return FALSE; + } + return TRUE; +} + +BOOL PKLIST_CheckPKSameTeam( int charaindex ) +{ + int teamnum, i, meti; + char szMsg[128]; + + if( !CHAR_CHECKINDEX( charaindex) ){ + print( "CHAR_CHECKINDEX err !!\n"); + return FALSE; + } + + if( (teamnum=CHAR_getInt( charaindex, CHAR_PKLISTTEAMNUM)) < 0 ){ + print( "CHAR_PKLISTTEAMNUM err !!\n"); + return FALSE; + } + if( (meti=PKLIST_GetPkTeamListArrayFromNum( teamnum )) == -1 ){ + print( "GetPkTeamListArray err !!\n"); + return FALSE; + } +#ifdef _DEATH_CONTENDAB + if( CHAR_getInt( charaindex, CHAR_PKLISTLEADER) != 1 ){ + return FALSE; + } +#else + if( PkTeamList[meti].battleplay >= DEFMAXBATTLENUM ){ + CHAR_talkToCli( charaindex, -1, "对战场数已满!", CHAR_COLORYELLOW); + return FALSE; + } + + if( CHAR_getInt( charaindex, CHAR_PKLISTLEADER) != 1 ){ + CHAR_talkToCli( charaindex, -1, "只有参赛队伍的队长才能加入赛程喔!", CHAR_COLORYELLOW); + return FALSE; + } +#endif + if( CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE) != CHAR_PARTY_LEADER ){ + return TRUE; + } + + for( i=0; i<5; i++){ + int pindex = CHAR_getWorkInt( charaindex, CHAR_WORKPARTYINDEX1+i); + if( !CHAR_CHECKINDEX( pindex) ) continue; + if( teamnum != CHAR_getInt( pindex, CHAR_PKLISTTEAMNUM) ){ + CHAR_talkToCli( charaindex, -1, "你的队里怎会有不同队伍的人呢?", CHAR_COLORYELLOW); + return FALSE; + } + } + for( i=0; i<5; i++){ + int pindex = CHAR_getWorkInt( charaindex, CHAR_WORKPARTYINDEX1+i); + if(!CHAR_CHECKINDEX(pindex)) continue; + if(CHAR_getInt(pindex,CHAR_LV) < 120){ + sprintf(szMsg,"你的队里 %s 等级 %d 未达比赛标准喔!",CHAR_getChar(pindex,CHAR_NAME),CHAR_getInt(pindex,CHAR_LV)); + CHAR_talkToCli(charaindex,-1,szMsg,CHAR_COLORYELLOW); + return FALSE; + } + if(CHAR_getInt(pindex,CHAR_TRANSMIGRATION) < 3){ + sprintf(szMsg,"你的队里 %s 转生数 %d 转,未达比赛标准喔!",CHAR_getChar(pindex,CHAR_NAME),CHAR_getInt(pindex,CHAR_TRANSMIGRATION)); + CHAR_talkToCli(charaindex,-1,szMsg,CHAR_COLORYELLOW); + return FALSE; + } + } + return TRUE; +} + + +BOOL PKLIST_CheckPKReapetTeam( int menum, int tonum) +{ + int meti, k, toti; + if( (meti=PKLIST_GetPkTeamListArrayFromNum( menum )) == -1 ){ + return FALSE; + } + for( k=0; k (int)time(NULL) ){ + return FALSE; + } + return TRUE; + +} + +void PKLIST_LOCKTeam( int menum) +{ + int meti=-1; + if( (meti=PKLIST_GetPkTeamListArrayFromNum( menum )) == -1 ){ + return; + } + PkTeamList[meti].read = (int)time(NULL)+60; +} + +void PKLIST_UNLOCKTeam( int menum) +{ + int meti=-1; + if( (meti=PKLIST_GetPkTeamListArrayFromNum( menum )) == -1 ){ + return; + } + PkTeamList[meti].read = 0; +} + +void PKLIST_Sort_PKListSort( void) +{ + int i, j, k, last=-1; + char data[65535*3], buf[512]; + for( i=0; i=0; k-- ){ + if( PkTeamList[i].score <= 0 ) continue; + if( PKListSort[k] == -1 ){ + last = k; + continue; + } + if( PkTeamList[i].score > PkTeamList[PKListSort[k]].score ){ + last = k; + continue; + } + break; + } + if( last == -1 ) continue; + for( j=548; j>=last; j-- ){ + PKListSort[j+1] = PKListSort[j]; + } + PKListSort[last]=i; + } + memset(data,0,sizeof(data)); + for(i=0;i<550;i++){ + if(PKListSort[i] == -1) continue; + + sprintf(buf, "%s|%d|%d|%d|%d ", + PkTeamList[PKListSort[i]].teamname, + PkTeamList[PKListSort[i]].win, PkTeamList[PKListSort[i]].lost, + PkTeamList[PKListSort[i]].battleplay, PkTeamList[PKListSort[i]].score ); + strcat(data,buf); + } + PKLIST_HandleChartsMess(0,data,2,0); +} + +//正式赛 + +void ABATTLE_InitABattle( int maxnums ) +{ + int i,j,k; + if( maxnums<1 || maxnums >= MAXBAFLOOR) return; + memset( ABLevelup, 0, sizeof(ABLevelup)); + for( k=0; ktop = NULL; + for( j=0; jfl = 0; + headABattle[i]->code = j; + break; + } + if( j >= MAXNOWBATTLE ) return; + ABATTLE_CreateNet( headABattle[i], i, 0, maxnums); + } + { + FILE *fp=NULL; + int count=0; + char buf[256], buf1[256], buf2[256], filename[256]; + + for( i=0; iteamnum = atoi( buf1); + snprintf( NowABattle[i][maxnums][count]->teamname, + sizeof( NowABattle[i][maxnums][count]->teamname),"%s", buf2); + if( NowABattle[i][maxnums][count]->teamnum >= 0 ) + NowABattle[i][maxnums][count]->use = 1; + + //andy_log + print("NowABattle[%d][%d][%d]. %x[%d,%d,%s]\n", + i, maxnums, count, + NowABattle[i][maxnums][count], + NowABattle[i][maxnums][count]->use, + NowABattle[i][maxnums][count]->teamnum, + NowABattle[i][maxnums][count]->teamname ); + + count++; + } + fclose( fp); + //remove( filename); + } + } + + maxbati = MAXBAHEAD; + maxfloor = maxnums; +} + +int ABATTLE_CreateNet( ArrangeBattleC *now, int ti, int fl, int maxfl) +{ + int i,j; + ArrangeBattleC *news=NULL; + //andy_log + print( "CreateNet( %d,%d)\n", ti, fl); + + if( fl != 0 ){ + for( j=0; j NowABattle[%d][%d][%d]\n", ti, fl, j); + NowABattle[ti][fl][j] = now; + now->fl = fl; + now->code = j; + break; + } + if( j >= MAXNOWBATTLE ) return 0; + } + if( fl < maxfl ){ + for( i=0; i<2; i++){ + + news=NULL; + if( (news = ArrangeBattleC_getNew()) == NULL ){ + //andy_log + print("err can't get news NULL\n"); + return 0; + } + now->next[i] = news; + news->top = now; + if( ABATTLE_CreateNet( news, ti, fl+1, maxfl) == 0 ){ + //andy_log + print("err net free %x \n", news); + free( news ); + now->next[i] = NULL; + return 0; + } + } + } + + return 1; +} + +void ABATTLE_ShowNet( ArrangeBattleC *now, int fl) +{ + int i; + if( now == NULL ) return; + + if( now->fl == fl ){ + print(" [%d,%d,%s] %x,top:%x\n", now->use, now->teamnum, now->teamname, now, + now->top ); + } + + for( i=0; i<2; i++){ + if( now->next[i] == NULL )continue; + ABATTLE_ShowNet( now->next[i], fl); + } +} + +void ABATTLE_ShowBattlefromFl( int ti, int fl) +{ + int j, total=0; + if( fl<0 ) return; + if( ti<0 || ti >= MAXBAHEAD ) return; + print("headABattle:%x\n", headABattle); + ABATTLE_ShowNet( headABattle[ti], fl); + print("\nNOWBATTLE:\n"); + if( fl<0 || fl >= MAXBAFLOOR) return; + + + for( j=0; juse, NowABattle[ti][fl][j]->teamnum, + NowABattle[ti][fl][j]->teamname, NowABattle[ti][fl][j], + NowABattle[ti][fl][j]->top ); + total++; + } + print("\ntotal:%d\n", total); +} + +BOOL ABATTLE_InsertBattle( ArrangeBattleC *aB) +{ + ArrangeBattleC *aBo=NULL; + int i; + if( aB == NULL ) return FALSE; + for( i=0; inext[0])==NULL || aBo->use == 0 || aBo->type > 0 ) return FALSE; + if( (aBo=aB->next[1])==NULL || aBo->use == 0 || aBo->type > 0 ) return FALSE; + InBattle[i] = aB; + InBattle[i]->next[0]->type =1; + InBattle[i]->next[1]->type =1; + + print("InsertBattle[%d,%s vs %d,%s]\n", + InBattle[i]->next[0]->teamnum, InBattle[i]->next[0]->teamname, + InBattle[i]->next[1]->teamnum, InBattle[i]->next[1]->teamname ); +#ifdef _DEATH_CONTENDTEST + aB->time = (int)time(NULL)+30; //战斗时间 +#else + aB->time = (int)time(NULL)+(5*60); //战斗时间 +#endif + aB->type = 1; // 战斗旗标 + return TRUE; + } + return FALSE; +} + +void ABATTLE_EnterBattle( ArrangeBattleC *aB) +{ + ArrangeBattleC *aBtop=NULL; + ArrangeBattleC *aBo=NULL; + + if( (aBtop=aB->top) == NULL ){ + //andy_log + print("del (aBtop=aB->top) NULL !\n"); + return; + } + + aBtop->teamnum = aB->teamnum; + snprintf( aBtop->teamname, sizeof(aBtop->teamname),"%s", aB->teamname); + aBtop->type = 0; + aBtop->use = 1; + + if( (aBo=aBtop->next[0]) != NULL ){ + aBo->use=0; + aBo->teamnum=-1; + } + if( (aBo=aBtop->next[1]) != NULL ){ + aBo->use=0; + aBo->teamnum=-1; + } +} + +void ABATTLE_EliminateBattlefromFl( ArrangeBattleC *aB) +{ + ArrangeBattleC *aBtop=NULL; + if( aB == NULL ) return; + aB->use=0; + aB->type = 0; + aB->teamnum = -1; + free( aB); +} + +int ABATTLE_FindBattlefromFl( int ti, int fl) +{ + int i, j, side=0, count=0; + ArrangeBattleC *aBo=NULL; + ArrangeBattleC *aB1=NULL; + ArrangeBattleC *aB2=NULL; + + //andy_log + print( "FindBattlefromFl(%d,%d)\n", ti, fl); + for( i=0; inext[j]) == NULL || aB1->use == 0 || aB1->type > 0 )continue; + + side = (j+1)%2; + aB2=aBo->next[side]; + + if( aB2 == NULL || aB2->use == 0 || aB2->teamnum == -1 ){ //没有对手 + }else{ + if( ABATTLE_InsertBattle( aBo) == FALSE ){ + return -1; + }else{ + char token[256]; + int playernum = CHAR_getPlayerMaxNum(); + sprintf( token, "%s队 VS %s队 5分钟後决斗。", aB1->teamname, aB2->teamname ); + PKLIST_shoutToAll( token, -1, -1); + count++; + // 把排入赛程的人员传入地图 8250 + for(i=0;iteamnum || CHAR_getInt(i,CHAR_PKLISTTEAMNUM) == aB2->teamnum) && + CHAR_getInt(i,CHAR_FLOOR) != 8250){ + printf("send!!\n"); + CHAR_warpToSpecificPoint(i,8250,15,15); + } + else printf("has not send!!(teamnum:%d,floor:%d)\n",CHAR_getInt(i,CHAR_PKLISTTEAMNUM),CHAR_getInt(i,CHAR_FLOOR)); + } + //if( count >= 2) return count; + return count; + } + } + } + } + return count; +} + +void ABATTLE_CheckBattlefromFl(int charindex, int ti,int battleindex) +{ + int i = ti, count = 0,floor=0; + //ABFloor[MAXBAHEAD]; + //andy_log + print("ABATTLE_CheckBattlefromFl(%d,%d )..\n",ti,battleindex); + //for( i=0; iuse == 1 && headABattle[i]->teamnum != -1 ){ + char token[256]; + sprintf( token, "恭喜 %s 队,取得分组优胜,晋级下一阶段。", headABattle[i]->teamname ); + PKLIST_shoutToAll( token, -1, 8250); + ABATTLE_RecordBattle( i, headABattle[i]->teamname, "晋级8强", "NULL", ""); + + } + if( (fp=fopen( "nbattle.txt", "a+")) != NULL ){ + fprintf( fp, "%d %d|%s|\n", + i, headABattle[i]->teamnum, headABattle[i]->teamname); + fclose( fp); + } + } + } + +} + +int ABATTLE_CheckBattlefromFl_sub(int charindex, int ti, int fl, int battleindex) +{ + int i = battleindex; + char token[256]; + ArrangeBattleC *aBo=NULL; + ArrangeBattleC *aB1=NULL; + ArrangeBattleC *aB2=NULL; + + //andy_log + print("CheckBattlefromFl_sub( %d, %d, %d)\n", ti, fl, battleindex); + + for( i=0; inext[0]; + aB2=aBo->next[1]; + if( (aB1 == NULL || aB1->use == 0 ) && + (aB2 == NULL || aB2->use == 0 ) ){//两队都不成立 + if( aB1 != NULL ) free( aB1); + if( aB2 != NULL ) free( aB2); + aBo->next[0] = NULL; + aBo->next[1] = NULL; + continue; + }else if( aB1 == NULL || aB1->use == 0 || aB1->teamnum == -1 ){ //0不成立 + ABATTLE_EliminateBattlefromFl( aB1); + aBo->next[0] = NULL; + if( aB2 != NULL && aB2->use != 0 && aB2->type == 0 ){ + ABATTLE_EnterBattle( aB2); + } + return fl; + }else if( aB2 == NULL || aB2->use == 0 || aB2->teamnum == -1 ){ //1不成立 + ABATTLE_EliminateBattlefromFl( aB2); + aBo->next[1] = NULL; + if( aB1 != NULL && aB1->use != 0 && aB1->type == 0 ){ + ABATTLE_EnterBattle( aB1); + } + return fl; + }else{ + //andy_log + print("两者成立!.%d.%x[%d,%s] %x[%d,%s]\n", i, + aB1, aB1->teamnum, aB1->teamname, + aB2, aB2->teamnum, aB2->teamname ); + return fl; + } + } + + return (fl-1); +} + +//确认赛程战斗状态 包含时间 +BOOL ABATTLE_CheckInABattle( int ti) +{ + ArrangeBattleC *aB=NULL; + ArrangeBattleC *aB1=NULL; + ArrangeBattleC *aB2=NULL; + int i; + int playernum = CHAR_getPlayerMaxNum(); + char token[256]; + + if( ti<0 || ti>MAXBATTLEPAGE ) return FALSE; + if( (aB=InBattle[ti]) == NULL ) return FALSE; + + aB1=aB->next[0]; + aB2=aB->next[1]; + + switch( aB->type){ + case 0: + break; + case 1: //已排入赛程 5分钟後进场 + if( aB->time < (int)time(NULL) ){ + if( aB1 == NULL || aB1->use == 0 || + aB2 == NULL || aB2->use == 0 ) return FALSE; + sprintf( token, "%s队 VS %s队,赛程即将开始,请两队做好准备。", + aB1->teamname, aB2->teamname ); + //PKLIST_shoutToAll( token, aB1->teamnum, 8250); + PKLIST_shoutToAll( token, aB2->teamnum, 8250); +#ifdef _DEATH_CONTENDTEST + aB->time=(int)time(NULL)+30; +#else + aB->time=(int)time(NULL)+(2*60); +#endif + aB->type=2; + // 把排入赛程的人员传入地图 8250 + for(i=0;iteamnum || CHAR_getInt(i,CHAR_PKLISTTEAMNUM) == aB2->teamnum) && + CHAR_getInt(i,CHAR_FLOOR) != 8250){ + printf("send!!\n"); + CHAR_warpToSpecificPoint(i,8250,15,15); + } + else printf("has not send!!(teamnum:%d,floor:%d)\n",CHAR_getInt(i,CHAR_PKLISTTEAMNUM),CHAR_getInt(i,CHAR_FLOOR)); + } + } + break; + case 2: //已排入赛程 进场3分钟 并判断队长是否存在 并广播 + { + int playernum = CHAR_getPlayerMaxNum(); + for( i=0 ; itoindex) && + aB1->teamnum == CHAR_getInt( i, CHAR_PKLISTTEAMNUM) && + CHAR_getInt( i, CHAR_PKLISTLEADER) == 1 && + PKLIST_CheckPKSameTeam( i) == TRUE ){ + + int stime = ((aB->time)-(int)time(NULL)); + sprintf( token, "请快找齐你的所有队员,并组好队,%d秒後将进行传送。", (stime<0)?0:stime); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW); + aB1->toindex = i; + continue; + + } + if( aB2!=NULL && !CHAR_CHECKINDEX( aB2->toindex) && + aB2->teamnum == CHAR_getInt( i, CHAR_PKLISTTEAMNUM) && + CHAR_getInt( i, CHAR_PKLISTLEADER) == 1 && + PKLIST_CheckPKSameTeam( i) == TRUE ){ + int stime = ((aB->time)-(int)time(NULL)); + sprintf( token, "请快找齐你的所有队员,并组好队,%d秒後将进行传送。", (stime<0)?0:stime); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW); + aB2->toindex = i; + continue; + } + } + } + // 把排入赛程的人员传入地图 8250 + for(i=0;iteamnum || CHAR_getInt(i,CHAR_PKLISTTEAMNUM) == aB2->teamnum) && + CHAR_getInt(i,CHAR_FLOOR) != 8250) CHAR_warpToSpecificPoint(i,8250,15,15); + } + + if( aB->time < (int)time(NULL) ){ + char token[256]; + + sprintf( token, "%s队 VS %s队,赛程开始。", aB1->teamname, aB2->teamname ); + PKLIST_shoutToAll( token, -1, 8250); + + if( CHAR_CHECKINDEX( aB1->toindex) && CHAR_CHECKINDEX( aB2->toindex) ){ + PKLIST_warpOne( aB2->toindex, PK_BATTLEMAP[ti].floor, PK_BATTLEMAP[ti].x+1, PK_BATTLEMAP[ti].y); + PKLIST_warpOne( aB1->toindex, PK_BATTLEMAP[ti].floor, PK_BATTLEMAP[ti].x, PK_BATTLEMAP[ti].y); +#ifdef _DEATH_CONTENDTEST + aB->time=(int)time(NULL)+5; +#else + aB->time=(int)time(NULL)+(20); +#endif + aB->type=3; + return TRUE; + }else if( !CHAR_CHECKINDEX( aB1->toindex) && !CHAR_CHECKINDEX( aB2->toindex) ){ + sprintf( token, "%s队(%d),%s队(%d),因队长未在时间内到场,视为弃权。",aB1->teamname,aB1->toindex, + aB2->teamname,aB2->toindex); + ABATTLE_RecordBattle( ti, aB1->teamname, "未", aB2->teamname, "未"); + aB1->use = 0; + aB2->use = 0; + }else if( !CHAR_CHECKINDEX( aB1->toindex) ) { + sprintf( token, "%s队(%d),因队长未在时间内到场,视为弃权。",aB1->teamname,aB1->toindex); + aB1->use = 0; + ABATTLE_RecordBattle( ti, aB1->teamname, "未", "NULL", ""); + ABATTLE_EnterBattle( aB2); + }else if( !CHAR_CHECKINDEX( aB2->toindex) ){ + sprintf( token, "%s队(%d),因队长未在时间内到场,视为弃权。",aB2->teamname,aB2->toindex); + aB2->use = 0; + ABATTLE_RecordBattle( ti, aB2->teamname, "未", "NULL", ""); + ABATTLE_EnterBattle( aB1); + } + PKLIST_shoutToAll( token, -1, 8250); + InBattle[ti] = NULL; + return FALSE; + } + break; + case 3: //已排入赛程 队伍到齐 5分钟内 强制战斗 + aB->type=4; + aB->time=(int)time(NULL)+(2*60); + break; + case 4: + if( aB->time < (int)time(NULL) ){//强制战斗 + if( CHAR_getWorkInt( aB1->toindex, CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE ){ + //andy_log + print("强制战斗 %s vs %s \n", aB1->teamname, aB2->teamname); + BATTLE_CreateVsPlayer( aB1->toindex, aB2->toindex ); + aB->type = 5; + } + } + break; + } + + return TRUE; +} + +void ABATTLE_MakeInABattleString( void) +{ + ArrangeBattleC *aB=NULL; + ArrangeBattleC *aB1=NULL; + ArrangeBattleC *aB2=NULL; + char buf1[256], buf[256]; + int i, fir=1; + + memset( ABattlelist, 0, sizeof(ABattlelist)); + + for( i=0; inext[0]) == NULL || aB1->use == 0 )continue; + if( (aB2=aB->next[1]) == NULL || aB2->use == 0 )continue; + + switch( aB->type){ + case 0: continue; + break; + case 1://预定 + strcpy( buf, "预定"); + break; + case 2://准备 + strcpy( buf, "准备"); + break; + case 3://开始 + case 4: + strcpy( buf, "开始"); + break; + } + + sprintf( buf1, "%d|%s|%s|%d|%s", + i, aB1->teamname, aB2->teamname, aB->time, buf); + if( fir != 1 ) strcat( ABattlelist, " "); + fir=0; + strcat( ABattlelist, buf1); + } +} + +BOOL PKLIST_GetABattlelistDataString( int ti, int *tindex, int *stimes, + char *buf1, char *buf2, char *buf3, int flg) +{ + char data[1024], buf[256], buff[256]; + switch( flg){ + case 3: + { + memset( data, 0, sizeof(data)); + if( getStringFromIndexWithDelim( ABattlelist, " ", ti, data, sizeof(data)) == FALSE ) + return FALSE; + if( getStringFromIndexWithDelim( data, "|", 1, buf, sizeof( buf)) == FALSE ) return FALSE; + *tindex=atoi( buf); + if( getStringFromIndexWithDelim( data, "|", 2, buf, sizeof( buf))== FALSE) return FALSE; + strcpy( buf1, buf); + if( getStringFromIndexWithDelim( data, "|", 3, buf, sizeof( buf))== FALSE) return FALSE; + strcpy( buf2, buf); + if( getStringFromIndexWithDelim( data, "|", 4, buf, sizeof( buf))== FALSE) return FALSE; + *stimes = atoi( buf); + if( getStringFromIndexWithDelim( data, "|", 5, buf, sizeof( buf))== FALSE ) return FALSE; + strcpy( buf3, buf); + } + break; + case 5: + { + if( getStringFromIndexWithDelim( ABLevelup, " ", ti, data, sizeof(data)) == FALSE ) + return FALSE; + if( getStringFromIndexWithDelim( data, "|", 1, buf, sizeof( buf)) == FALSE ) return FALSE; + *tindex=atoi( buf); + if( getStringFromIndexWithDelim( data, "|", 2, buff, sizeof( buff)) == FALSE ) return FALSE; + if( getStringFromIndexWithDelim( data, "|", 3, buf, sizeof( buf)) == FALSE ) return FALSE; + sprintf( buf1, "[%s]%s ", buff, buf); + if( getStringFromIndexWithDelim( data, "|", 4, buff, sizeof( buff)) == FALSE ) return FALSE; + if( getStringFromIndexWithDelim( data, "|", 5, buf, sizeof( buf)) == FALSE ) return FALSE; + sprintf( buf2, "[%s]%s ", buff, buf); + } + break; + } + return TRUE; +} + +ArrangeBattleC *ABATTLE_getInBattle( int teamnum) +{ + ArrangeBattleC *aB=NULL; + ArrangeBattleC *aBx=NULL; + int i; + + for( i=0; inext[0]) != NULL && aBx->use == 1 && aBx->teamnum != -1 ){ + if( aBx->teamnum == teamnum ) + return aBx; + } + if( (aBx=aB->next[1]) != NULL && aBx->use == 1 && aBx->teamnum != -1 ){ + if( aBx->teamnum == teamnum ) + return aBx; + } + } + return NULL; +} + +ArrangeBattleC *ArrangeBattleC_getNew( void) +{ + ArrangeBattleC *MBUF=NULL; + MBUF = (ArrangeBattleC *) calloc( 1, sizeof( struct _tagArrangeBattle) ); + if( MBUF == NULL ) return NULL; + + MBUF->use = 0; + MBUF->fl = -1; + MBUF->code = -1; + MBUF->teamnum = -1; + MBUF->toindex = -1; + MBUF->type=0; + MBUF->teamname[0]=0; + MBUF->next[0] = NULL; + MBUF->next[1] = NULL; + MBUF->top = NULL; + + return MBUF; +} + +ArrangeBattleC *ArrangeBattleC_getInBattleArray( int ti) +{ + if( ti<0 || ti>MAXBATTLEPAGE ) return NULL; + return InBattle[ti]; +} + +void ABATTLE_RecordBattle( int ti, char *buf1, char *tstr1,char *buf2, char *tstr2) +{//ABLevelup + char strlog[512]; + FILE *fp=NULL; + + if( (fp=fopen( "battle.rec", "a+") )==NULL )return; + sprintf( strlog, "%d|%s|%s|%s|%s", ti, tstr1, buf1, tstr2, buf2); + fprintf( fp, "%s\n", strlog); + fclose( fp); + + ABATTLE_GetRecordBattle(); +} + +void remove_r( char *s ) +{ + int i; + for(i=0;;i++){ + if( s[i]=='\r' || s[i]=='\n' )s[i] =0; + if( s[i]==0)break; + } +} + +void ABATTLE_GetRecordBattle( void) +{//ABLevelup + char data[512]; + FILE *fp=NULL; + memset( ABLevelup, 0, sizeof(ABLevelup)); + + if( (fp=fopen( "battle.rec", "r") )==NULL )return; + while( fgets( data, sizeof(data)-1, fp) ){ + if( strlen( data) <= 0 ) continue; + remove_r( data); + if( strlen( ABLevelup) > 0 ) strcat( ABLevelup, " "); + strcat( ABLevelup, data); + } + fclose( fp); +} + +void PKLIST_UpData(char *mycdkey,char *tocdkey,int menum,int tonum,int winer,int flg) +{ + int k,meti,toti; + + if((meti = PKLIST_GetPkTeamListArray(menum,mycdkey)) == -1){ + printf("can't find meteam.teamnum(%d),cdkey(%s)\n",menum,mycdkey); + return; + } + if((toti = PKLIST_GetPkTeamListArray(tonum,tocdkey)) == -1){ + printf("can't find toteam.teamnum(%d),cdkey(%s)\n",tonum,tocdkey); + return; + } + + if(PkTeamList[meti].use != 1){ + printf("meteam not in use.teamnum(%d),cdkey(%s)\n",menum,mycdkey); + return; + } + /*for(k=0;k= 90 ){ + PkTeamList[ti].inside = 2; //录取 + }else if( PkTeamList[ti].lost > 50*0.4){// 0.7 = (1-胜率3成)*最高场次 + PkTeamList[ti].inside = 0; + }else { + PkTeamList[ti].inside = 1; + } + + if( PkTeamList[ti].score < 0 ) PkTeamList[ti].score = 0; + + ret = PKLIST_SetOneBHistory( ti, battleTi, 1, forti, winerflg); + //PKLIST_SortTheCharts( ti); + return ret; +} + +int PKLIST_GetOneBHistory( int ti ) +{ + int i; + if( ti < 0 || ti >= maxteam ){ + printf( "GetOneBHistory(ti:%d) err return -1 !!\n", ti); + return -1; + } + for( i=0; i=DEFMAXBATTLENUM ) break; + if( PkTeamList[ti].BHistory[i].use == 0 ){ + printf("return BHistory[%d] \n", i) ; + return i; + } + } + + printf("BATTLEFULL err !! \n") ; + return -1; +} + +int PKLIST_SetOneBHistory( int ti, int hi, int use, int teamnum, int flg ) +{ + if( ti < 0 || ti >= maxteam ) return -1; + if( hi < 0 || hi >= MAXBATTLENUM ) return -1; + if( PkTeamList[ti].BHistory[hi].use == use ) return -1; + + PkTeamList[ti].BHistory[hi].teamnum = teamnum; + PkTeamList[ti].BHistory[hi].flg = flg; + PkTeamList[ti].BHistory[hi].use = use; + return 1; +} + +#endif diff --git a/gmsv/char/defaultGroundEnemy.h b/gmsv/char/defaultGroundEnemy.h new file mode 100644 index 0000000..757b28d --- /dev/null +++ b/gmsv/char/defaultGroundEnemy.h @@ -0,0 +1,158 @@ +#if 0 +static Char slime= +{ + FALSE, /* use どうでもいい*/ + + /* data */ + { + 0, /* CHAR_DATAPLACENUMBER */ + 0, /* CHAR_BASEIMAGENUMBER */ + 0, /* CHAR_BASEBASEIMAGENUMBER */ + 0, /* CHAR_FACEIMAGENUMBER */ + 0, /* CHAR_FLOOR */ + 0, /* CHAR_X */ + 0, /* CHAR_Y */ + 0, /* CHAR_DIR 12箕を0に箕纷件りに */ + 0, /* CHAR_LV */ + 0, /* CHAR_GOLD */ + 1, /* CHAR_HP */ + 0, /* CHAR_MP */ + 0, /* CHAR_MAXMP */ + + 0, /* CHAR_VITAL */ + 0, /* CHAR_STR */ + 0, /* CHAR_TOUGH */ + 0, /* CHAR_DEX */ + + 0, /* CHAR_CHARM */ + 0, /* CHAR_LUCK */ + + 0, /* 孟掳拉 */ + 0, /* 垮掳拉 */ + 0, /* 残掳拉 */ + 0, /* 慎掳拉 */ + + 0, /* CHAR_SLOT */ + 0, /* CHAR_CRITIAL */ + 0, /* CHAR_COUNTER */ + 0, /* CHAR_RARE */ + 0, /* CHAR_RADARSTRLENGTH */ + 0, /* CHAR_CHATVOLUME */ + MAKE2VALUE(100,20), /* CHAR_MERCHANTLEVEL */ + 0, /* CHAR_HEALERLEVEL */ + 0, /* CHAR_DETERMINEITEM */ + + -1, /* CHAR_INDEXOFEQTITLE */ + + 0, /* CHAR_POISON */ + 0, /* CHAR_PARALYSIS */ + 0, /* CHAR_SILENCE */ + 0, /* CHAR_STONE */ + 0, /* CHAR_DARKNESS */ + 0, /* CHAR_CONFUSION */ + + 0, /* CHAR_LOGINCOUNT */ + 0, /* CHAR_DEADCOUNT */ + 0, /* CHAR_WALKCOUNT */ + 0, /* CHAR_TALKCOUNT */ + 0, /* CHAR_DAMAGECOUNT */ + 0, /* CHAR_GETPETCOUNT */ + 0, /* CHAR_KILLPETCOUNT */ + 0, /* CHAR_DEADPETCOUNT */ + 0, /* CHAR_SENDMAILCOUNT */ + 0, /* CHAR_MERGEITEMCOUNT */ + 0, /* CHAR_DUELBATTLECOUNT */ + 0, /* CHAR_DUELWINCOUNT */ + 0, /* CHAR_DUELLOSECOUNT */ + 0, /* CHAR_DUELSTWINCOUNT */ + 0, /* CHAR_DUELMAXSTWINCOUNT */ + + CHAR_TYPEENEMY, /* CHAR_WHICHPLAYER */ + 1000, /* CHAR_WALKINTERVAL */ + 1000, /* CHAR_LOOPINTERVAL */ + + 0, /* CHAR_LEVELEXP */ + + -1, /*CHAR_LASTTALKELDER*/ + 0, /*CHAR_SKILLUPPOINT */ + 0, /* CHAR_LEVELUPPOINT */ + + 0, /*CHAR_IMAGETYPE */ + CHAR_COLORYELLOW, /* CHAR_NAMECOLOR */ + CHAR_COLORYELLOW, /* CHAR_POPUPNAMECOLOR */ + 0, /* CHAR_LASTTIMESETLUCK */ + 0, /* CHAR_DUELPOINT */ + 0, /* CHAR_EVENT */ + 0, /* CHAR_EVENT2 */ + 0, /* CHAR_EVENT3 */ +#ifdef _NEWEVENT + 0, /* CHAR_EVENT4 */ + 0, /* CHAR_EVENT5 */ + 0, /* CHAR_EVENT6 */ +#endif + 0, /* CHAR_NOWEVENT */ + 0, /* CHAR_NOWEVENT2 */ + 0, /* CHAR_NOWEVENT3 */ +#ifdef _NEWEVENT + 0, /* CHAR_NOWEVENT4 */ + 0, /* CHAR_NOWEVENT5 */ + 0, /* CHAR_NOWEVENT6 */ +#endif + 0, /* CHAR_TRANSMIGRATION */ + 0, /* CHAR_TRANSEQUATION */ + + 0, /*CHAR_INITDATA */ + }, + { + {""}, /* CHAR_NAME */ + {""}, /* CHAR_OWNTITLE */ + {""}, /* CHAR_ARGUMENT */ + {""}, /* CHAR_OWNERCDKEY */ + {""}, /* CHAR_OWNERCHARANAME */ +#if 0 + {""}, /* CHAR_INITFUNC */ + {""}, /* CHAR_WALKPREFUNC */ + {""}, /* CHAR_WALKPOSTFUNC */ + {""}, /* CHAR_PREOVERFUNC */ + {""}, /* CHAR_PREOVERFUNC */ + {""}, /* CHAR_WATCHFUNC */ + {""}, /* CHAR_LOOPFUNC */ + {""}, /* CHAR_DYINGFUNC */ + {""}, /* CHAR_TALKEDFUNC */ + {""}, /* CHAR_PREATTACKEDFUNC */ + {""}, /* CHAR_POSTATTACKEDFUNC */ + {""}, /* CHAR_OFFFUNC */ + {""}, /* CHAR_LOOKEDFUNC */ + {""}, /* CHAR_ITEMPUTFUNC */ + {""}, /* CHAR_SPECIALTALKEDFUNC */ + {""}, /* CHAR_WINDOWTALKEDFUNC */ +#endif + }, + { + /* CHAR_ISATTACK */ + /* CHAR_ISATTACKED */ + /* CHAR_ISOVER */ + /* CHAR_ISOVERED */ + /* CHAR_HAVEHEIGHT */ + /* CHAR_ISVISIBLE */ + /* CHAR_ISTRANSPARENT */ + /* CHAR_ISFLYING */ + + SETFLG(1,1,1,1,1,1,0,0 ), + + /* CHAR_ISDIE */ + /* CHAR_ISBIG */ + /* CHAR_ISSHOWDAMAGE */ + /* CHAR_ISPARTY */ + /* CHAR_ISWARP */ + /* CHAR_ISDUEL */ + /* CHAR_ISPARTYCHAT */ + /* CHAR_ISTRADECARD */ + + SETFLG(0,0,1,0,0,0,0,0 ), + } +}; +#endif + + + diff --git a/gmsv/char/defaultPlayer.h b/gmsv/char/defaultPlayer.h new file mode 100644 index 0000000..a1730a3 --- /dev/null +++ b/gmsv/char/defaultPlayer.h @@ -0,0 +1,372 @@ +#include "version.h" + +static Char player= +{ + FALSE, /* use どうでもいい*/ + { + 0, /* CHAR_DATAPLACENUMBER */ + 0, /* CHAR_BASEIMAGENUMBER */ + 0, /* CHAR_BASEBASEIMAGENUMBER */ + 0, /* CHAR_FACEIMAGENUMBER */ + 0, /* CHAR_FLOOR */ + 0, /* CHAR_X */ + 0, /* CHAR_Y */ + 5, /* CHAR_DIR 12箕を0に箕纷件りに */ + 1, /* CHAR_LV */ + 0, /* CHAR_GOLD */ + 1, /* CHAR_HP */ + 0, /* CHAR_MP */ + + 0, /* CHAR_MAXMP */ + + 0, /* CHAR_VITAL */ + 0, /* CHAR_STR */ + 0, /* CHAR_TOUGH */ + 0, /* CHAR_DEX */ + + 0, /* CHAR_CHARM */ + 0, /* CHAR_LUCK */ + + 0, /* 孟掳拉 */ + 0, /* 垮掳拉 */ + 0, /* 残掳拉 */ + 0, /* 慎掳拉 */ + + 0, /* CHAR_SLOT*/ + 0, /* CHAR_CRITIAL */ + 0, /* CHAR_COUNTER */ + 0, /* CHAR_RARE */ + 0, /* CHAR_RADARSTRLENGTH */ + 0, /* CHAR_CHATVOLUME */ + MAKE2VALUE(100,20), /* CHAR_MERCHANTLEVEL */ + 0, /* CHAR_HEALERLEVEL */ + 0, /* CHAR_DETERMINEITEM */ + + -1, /* CHAR_INDEXOFEQTITLE */ + + + 0, /* CHAR_POISON */ + 0, /* CHAR_PARALYSIS */ + 0, /* CHAR_SILENCE */ + 0, /* CHAR_STONE */ + 0, /* CHAR_DARKNESS */ + 0, /* CHAR_CONFUSION */ + + 0, /* CHAR_LOGINCOUNT */ + 0, /* CHAR_DEADCOUNT */ + 0, /* CHAR_WALKCOUNT */ + 0, /* CHAR_TALKCOUNT */ + + 0, /* CHAR_DAMAGECOUNT */ + 0, /* CHAR_GETPETCOUNT */ + 0, /* CHAR_KILLPETCOUNT */ + 0, /* CHAR_DEADPETCOUNT */ + 0, /* CHAR_SENDMAILCOUNT */ + 0, /* CHAR_MERGEITEMCOUNT */ + + 0, /* CHAR_DUELBATTLECOUNT */ + 0, /* CHAR_DUELWINCOUNT */ + 0, /* CHAR_DUELLOSECOUNT */ + 0, /* CHAR_DUELSTWINCOUNT */ + 0, /* CHAR_DUELMAXSTWINCOUNT */ + + CHAR_TYPEPLAYER, /* CHAR_WHICHTYPE */ + 1000, /* CHAR_WALKINTERVAL */ + 1000, /* CHAR_LOOPINTERVAL */ +#ifdef _NEWOPEN_MAXEXP + 0, // CHAR_OLDEXP, +#endif + 0, // CHAR_EXP, + -1, /* CHAR_LASTTALKELDER*/ + 0, /* CHAR_SKILLUPPOINT */ + 0, /* CHAR_LEVELUPPOINT */ + + 0, /* CHAR_IMAGETYPE */ + CHAR_COLORWHITE, /* CHAR_NAMECOLOR */ + CHAR_COLORWHITE, /* CHAR_POPUPNAMECOLOR */ + 0, /* CHAR_LASTTIMESETLUCK */ + 100, /* CHAR_DUELPOINT */ + 0, /* CHAR_EVENT */ + 0, /* CHAR_EVENT2 */ + 0, /* CHAR_EVENT3 */ +#ifdef _NEWEVENT + 0, /* CHAR_EVENT4 */ + 0, /* CHAR_EVENT5 */ + 0, /* CHAR_EVENT6 */ +#endif +#ifdef _ADD_NEWEVENT + 0, /* CHAR_EVENT7 */ + 0, /* CHAR_EVENT8 */ +#endif + + 0, /* CHAR_NOWEVENT */ + 0, /* CHAR_NOWEVENT2 */ + 0, /* CHAR_NOWEVENT3 */ +#ifdef _NEWEVENT + 0, /* CHAR_NOWEVENT4 */ + 0, /* CHAR_NOWEVENT5 */ + 0, /* CHAR_NOWEVENT6 */ +#endif +#ifdef _ADD_NEWEVENT + 0, /* CHAR_NOWEVENT7 */ + 0, /* CHAR_NOWEVENT8 */ +#endif + + 0, /* CHAR_TRANSMIGRATION */ + 0, /* CHAR_TRANSEQUATION */ + + 0, /* CHAR_INITDATA */ + +//#ifdef _PETSKILL_BECOMEPIG +// -1, +//#endif + + 0, //CHAR_SILENT, /* char shutup time */ + 0, // CHAR_FMINDEX, // 產壁 index + 0, // CHAR_FMLEADERFLAG, + /* 產壁Θ贺摸 + * FMMEMBER_NONE :⊿Τヴ產壁 + * FMMEMBER_APPLY :ビ叫產壁い + * FMMEMBER_LEADER :壁 + * FMMEMBER_MEMBER :Θ + * FMMEMBER_ELDER :ρ + * FMMEMBER_INVITE :步 // 既ぃノ + * FMMEMBER_BAILEE :癩叭 // 既ぃノ + * FMMEMBER_VICELEADER :捌壁 // 既ぃノ + */ + 0, // CHAR_FMSPRITE, // 產壁臔弘艶 + + 0, // CHAR_BANKGOLD, + 0, // CHAR_RIDEPET, + 0, // CHAR_LEARNRIDE, +#ifdef _NEW_RIDEPETS + 0, // CHAR_LOWRIDEPETS, +#endif + 0, // CHAR_LIMITLEVEL, +#ifdef _PET_FUSION + 0, // CHAR_FUSIONCODE, //贺絪絏 + 0, // CHAR_FUSIONINDEX, //瑰て胐絪腹 + 0, // CHAR_FUSIONRAISE, //笼緄Ω计 + 0, // CHAR_FUSIONBEIT, //胐矹篨夹 + 0, // CHAR_FUSIONTIMELIMIT, //笼緄丁 +#endif + +#ifdef _DEATH_CONTEND + 0, // CHAR_PKLISTTEAMNUM, + 0, // CHAR_PKLISTLEADER, +#endif + +#ifdef _PERSONAL_FAME // Arminius 8.30: 產壁羘辨 + 0, // CHAR_FAME, +#endif + +#ifdef _NEWSAVE + 0, // CHAR_SAVEINDEXNUMBER, /* SaveFile .0.char or .1.char */ +#endif + +#ifdef __ATTACK_MAGIC + 0, // CHAR_EARTH_EXP, // 產臸猭剪絤 + 0, // CHAR_WATER_EXP, // 產臸猭剪絤 + 0, // CHAR_FIRE_EXP, // 產臸猭剪絤 + 0, // CHAR_WIND_EXP, // 產臸猭剪絤 + 0, // CHAR_EARTH_RESIST, // 產臸猭к┦ + 0, // CHAR_WATER_RESIST, // 產臸猭к┦ + 0, // CHAR_FIRE_RESIST, // 產臸猭к┦ + 0, // CHAR_WIND_RESIST, // 產臸猭к┦ + 0, // CHAR_EARTH_ATTMAGIC_EXP, // 產臸猭剪絤竒喷 + 0, // CHAR_WATER_ATTMAGIC_EXP, // 產臸猭剪絤竒喷 + 0, // CHAR_FIRE_ATTMAGIC_EXP, // 產臸猭剪絤竒喷 + 0, // CHAR_WIND_ATTMAGIC_EXP, // 產臸猭剪絤竒喷 + 0, // CHAR_EARTH_DEFMAGIC_EXP, // 產臸猭к┦竒喷 + 0, // CHAR_WATER_DEFMAGIC_EXP, // 產臸猭к┦竒喷 + 0, // CHAR_FIRE_DEFMAGIC_EXP, // 產臸猭к┦竒喷 + 0, // CHAR_WIND_DEFMAGIC_EXP, // 產臸猭к┦竒喷 +#endif + + +#ifdef _GAMBLE_BANK + 0, // CHAR_PERSONAGOLD, //戒初蝗︽ +#endif +#ifdef _DROPSTAKENEW + 0, // CHAR_GAMBLENUM, //戒初縩だ +#endif +#ifdef _ADD_ACTION //npc笆 + 0, // CHAR_ACTIONSTYLE, +#endif +#ifdef _AUCTIONEER + 0, // CHAR_AUCGOLD, // ╃芥┮眔 +#endif +#ifdef _PET_EVOLUTION + 0, // CHAR_EVOLUTIONBASEVTL, + 0, // CHAR_EVOLUTIONBASESTR, + 0, // CHAR_EVOLUTIONBASETGH, + 0, // CHAR_EVOLUTIONBASEDEX, +#endif +#ifdef _ACTION_BULLSCR + 0, // CHAR_ABULLSTART, + 0, // CHAR_ABULLSCORE, + 0, // CHAR_ABULLTIME, + 0, // CHAR_ABULLSTARTTIME, +#endif + +#ifdef _ACTION_GMQUE + 0, // CHAR_GMQUEFLG, + 0, // CHAR_GMQUENUMS, +#endif + +#ifdef _FAMILYBANKSTONELOG + 0, // CHAR_FMBANKGOLD, //產壁蝗︽蹿 +#endif + +#ifdef _FM_JOINLIMIT + 0, // CHAR_FMTIMELIMIT, +#endif + +#ifdef _CHAR_PROFESSION // WON ADD 戮穨 + 0, // PROFESSION_CLASS, // 戮穨 + 0, // PROFESSION_LEVEL, // 戮穨单 +// 0, // PROFESSION_EXP, // 戮穨竒喷 + 0, // PROFESSION_SKILL_POINT, // м翴计 + 0, // ATTACHPILE, // 糤帮舼 + 0, // PROFESSION_FIRE_P, // 剪絤 + 0, // PROFESSION_ICE_P, // 剪絤 + 0, // PROFESSION_THUNDER_P, // 筽剪絤 + 0, // PROFESSION_FIRE_R, // к┦ + 0, // PROFESSION_ICE_R, // к┦ + 0, // PROFESSION_THUNDER_R, // 筽к┦ +#endif +#ifdef _ALLDOMAN // (ぃ秨) Syu ADD 逼︽篯NPC + 0, // CHAR_HEROFLOOR, +#endif +#ifdef _PETSKILL_BECOMEPIG + -1, // CHAR_BECOMEPIG, + 100250, //CHAR_BECOMEPIG_BBI +#endif + 0, // CHAR_LASTLEAVETIME, // Robin add 程瞒絬丁 + +#ifdef _NEW_MANOR_LAW + 0, // CHAR_MOMENTUM, +#endif + +#ifdef _ITEM_ADDEXP2 + 0, // CHAR_ADDEXPPOWER, + 0, // CHAR_ADDEXPTIME, +#endif + +#ifdef _ANGEL_SUMMON + 0, // CHAR_HEROCNT, // ЧΘ玦ヴ叭Ω计 +#endif + +#ifdef _RACEMAN + 0, // CHAR_CHECKIN, //胐琌祅癘 + 0, // CHAR_CATCHCNT, //聐胐Ω计 + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, +#endif + + }, + + { + {""}, /* CHAR_NAME */ + {""}, /* CHAR_OWNTITLE */ + {""}, /* CHAR_ARGUMENT */ + {""}, /* CHAR_OWNERCDKEY */ + {""}, /* CHAR_OWNERCHARANAME */ +#if 0 + {""}, /* CHAR_INITFUNC */ + {"core_PreWalk"}, /* CHAR_WALKPREFUNC */ + {"core_PostWalk"}, /* CHAR_WALKPOSTFUNC */ + {""}, /* CHAR_PREOVERFUNC */ + {""}, /* CHAR_PREOVERFUNC */ + {"core_PlayerWatch"}, /* CHAR_WATCHFUNC */ + {"core_Loop"}, /* CHAR_LOOPFUNC */ + {"core_Dying"}, /* CHAR_DYINGFUNC */ + {"core_PlayerTalked"}, /* CHAR_TALKEDFUNC */ + {""}, /* CHAR_PREATTACKEDFUNC */ + {""}, /* CHAR_POSTATTACKEDFUNC */ + {""}, /* CHAR_OFFFUNC */ + {""}, /* CHAR_LOOKEDFUNC */ + {""}, /* CHAR_ITEMPUTFUNC */ + {""}, /* CHAR_SPECIALTALKEDFUNC */ + {""}, /* CHAR_WINDOWTALKEDFUNC */ +#endif + }, + { + SETFLG(1,1,1,1,1,1,0,0 ), + SETFLG(0,0,0,0,0,0,0,1 ), + } +}; + +LevelUpPattern lvplayer00={ {{100,10},{200,10},{50,8}},9,11,10}; +LevelUpPattern lvplayer10={ {{100,10},{200,10},{50,8}},9,11,10}; +LevelUpPattern lvplayer20={ {{100,10},{200,10},{50,8}},9,11,10}; +LevelUpPattern lvplayer30={ {{100,10},{200,10},{50,8}},9,11,10}; + +LevelUpPattern lvplayer01={ {{100,10},{200,10},{50,8}},9,11,10}; +LevelUpPattern lvplayer11={ {{100,10},{200,10},{50,8}},9,11,10}; +LevelUpPattern lvplayer21={ {{100,10},{200,10},{50,8}},9,11,10}; +LevelUpPattern lvplayer31={ {{100,10},{200,10},{50,8}},9,11,10}; + +LevelUpPattern lvplayer02={ {{100,10},{200,10},{50,8}},9,11,10}; +LevelUpPattern lvplayer12={ {{100,10},{200,10},{50,8}},9,11,10}; +LevelUpPattern lvplayer22={ {{100,10},{200,10},{50,8}},9,11,10}; +LevelUpPattern lvplayer32={ {{100,10},{200,10},{50,8}},9,11,10}; + +LevelUpPattern lvplayer03={ {{100,10},{200,10},{50,8}},9,11,10}; +LevelUpPattern lvplayer13={ {{100,10},{200,10},{50,8}},9,11,10}; +LevelUpPattern lvplayer23={ {{100,10},{200,10},{50,8}},9,11,10}; +LevelUpPattern lvplayer33={ {{100,10},{200,10},{50,8}},9,11,10}; + +LevelUpPattern lvplayer04={ {{100,10},{200,10},{50,8}},9,11,10}; +LevelUpPattern lvplayer14={ {{100,10},{200,10},{50,8}},9,11,10}; +LevelUpPattern lvplayer24={ {{100,10},{200,10},{50,8}},9,11,10}; +LevelUpPattern lvplayer34={ {{100,10},{200,10},{50,8}},9,11,10}; + +LevelUpPattern lvplayer05={ {{100,10},{200,10},{50,8}},9,11,10}; +LevelUpPattern lvplayer15={ {{100,10},{200,10},{50,8}},9,11,10}; +LevelUpPattern lvplayer25={ {{100,10},{200,10},{50,8}},9,11,10}; +LevelUpPattern lvplayer35={ {{100,10},{200,10},{50,8}},9,11,10}; + +LevelUpPattern lvplayer06={ {{100,10},{200,10},{50,8}},9,11,10}; +LevelUpPattern lvplayer16={ {{100,10},{200,10},{50,8}},9,11,10}; +LevelUpPattern lvplayer26={ {{100,10},{200,10},{50,8}},9,11,10}; +LevelUpPattern lvplayer36={ {{100,10},{200,10},{50,8}},9,11,10}; + +LevelUpPattern lvplayer07={ {{100,10},{200,10},{50,8}},9,11,10}; +LevelUpPattern lvplayer17={ {{100,10},{200,10},{50,8}},9,11,10}; +LevelUpPattern lvplayer27={ {{100,10},{200,10},{50,8}},9,11,10}; +LevelUpPattern lvplayer37={ {{100,10},{200,10},{50,8}},9,11,10}; + +LevelUpPattern lvplayer08={ {{100,10},{200,10},{50,8}},9,11,10}; +LevelUpPattern lvplayer18={ {{100,10},{200,10},{50,8}},9,11,10}; +LevelUpPattern lvplayer28={ {{100,10},{200,10},{50,8}},9,11,10}; +LevelUpPattern lvplayer38={ {{100,10},{200,10},{50,8}},9,11,10}; + +LevelUpPattern lvplayer09={ {{100,10},{200,10},{50,8}},9,11,10}; +LevelUpPattern lvplayer19={ {{100,10},{200,10},{50,8}},9,11,10}; +LevelUpPattern lvplayer29={ {{100,10},{200,10},{50,8}},9,11,10}; +LevelUpPattern lvplayer39={ {{100,10},{200,10},{50,8}},9,11,10}; + + diff --git a/gmsv/char/defend.c b/gmsv/char/defend.c new file mode 100644 index 0000000..98aa369 --- /dev/null +++ b/gmsv/char/defend.c @@ -0,0 +1,29 @@ +#include "version.h" +#include +#include +#include +#include + +#include "readmap.h" +#include "object.h" +#include "char.h" +#include "char_base.h" +#include "lssproto_serv.h" +#include "saacproto_cli.h" +#include "npcutil.h" +#include "family.h" +#include "log.h" +#include "handletime.h" +#include "buf.h" +#include "net.h" +#include "char_base.h" +#include "battle.h" +#include "npc_bus.h" +#include "char_talk.h" +#include "npc_scheduleman.h" +#include "defend.h" + + + + + diff --git a/gmsv/char/encount.c b/gmsv/char/encount.c new file mode 100644 index 0000000..000213c --- /dev/null +++ b/gmsv/char/encount.c @@ -0,0 +1,597 @@ +#include "version.h" +#include +#include +#include +#ifdef _REDHAT_V9 +#include +#endif + +#include "common.h" +#include "util.h" +#include "buf.h" +#include "char_base.h" +#include "char.h" +#include "configfile.h" +#include "encount.h" +#include "enemy.h" + +#ifdef _ADD_ENCOUNT // WON ADD 增加敌遭遇触发修件 +#include "encount.h" +#endif + +/* 巨件市它件玄楮 及末□旦 */ + +#ifndef _ADD_ENCOUNT // WON ADD 增加敌遭遇触发修件 +typedef struct tagENCOUNT_Table +{ + int index; + int floor; + int encountprob_min; /* 巨件市它件玄割 */ + int encountprob_max; /* 巨件市它件玄割 */ + int enemymaxnum; /* 升木分仃衬毛综月井 */ + int zorder; + int groupid[ENCOUNT_GROUPMAXNUM]; /* 弘伙□皿No */ + int createprob[ENCOUNT_GROUPMAXNUM]; /* 公及弘伙□皿及请蜇 */ + RECT rect; +}ENCOUNT_Table; +ENCOUNT_Table *ENCOUNT_table; +#endif + +int ENCOUNT_encountnum; +#define ENCOUNT_ENEMYMAXCREATENUM 10 + +static INLINE BOOL ENCOUNT_CHECKENCOUNTTABLEARRAY( int array) +{ + if( array < 0 || array > ENCOUNT_encountnum-1) return FALSE; + return TRUE; +} + +/*------------------------------------------------------------ + * 巨件市它件玄涩烂及赓渝祭毛允月[ + * 娄醒 + * filename char* 涩烂白央奶伙 + * 忒曰袄 + * 岳 TRUE(1) + * 撩 FALSE(0) + *------------------------------------------------------------*/ +BOOL ENCOUNT_initEncount( char* filename ) +{ + FILE* f; + char line[256]; + int linenum=0; + int encount_readlen=0; + + f = fopen(filename,"r"); + if( f == NULL ){ + errorprint; + return FALSE; + } + + ENCOUNT_encountnum=0; + + /* 引内 躲卅垫互窒垫丐月井升丹井譬屯月 */ + while( fgets( line, sizeof( line ), f ) ){ + linenum ++; + if( line[0] == '#' )continue; /* comment */ + if( line[0] == '\n' )continue; /* none */ + chomp( line ); + + ENCOUNT_encountnum++; + } + + if( fseek( f, 0, SEEK_SET ) == -1 ){ + fprint( "寻找错误\n" ); + fclose(f); + return FALSE; + } + + ENCOUNT_table = allocateMemory( sizeof(struct tagENCOUNT_Table) + * ENCOUNT_encountnum ); + if( ENCOUNT_table == NULL ){ + fprint( "无法分配内存 %d\n" , + sizeof(ENCOUNT_table)*ENCOUNT_encountnum); + fclose( f ); + return FALSE; + } + + /* 赓渝祭 */ +{ + int i,j; + for( i = 0; i < ENCOUNT_encountnum; i ++ ) { + ENCOUNT_table[i].index = -1; + ENCOUNT_table[i].floor = 0; + ENCOUNT_table[i].encountprob_min = 1; + ENCOUNT_table[i].encountprob_min = 50; + ENCOUNT_table[i].enemymaxnum = 4; + ENCOUNT_table[i].rect.x = 0; + ENCOUNT_table[i].rect.y = 0; + ENCOUNT_table[i].rect.height = 0; + ENCOUNT_table[i].rect.width = 0; + ENCOUNT_table[i].zorder = 0; + for( j = 0; j < ENCOUNT_GROUPMAXNUM; j ++ ) { + ENCOUNT_table[i].groupid[j] = -1; + ENCOUNT_table[i].createprob[j] = -1; + } +#ifdef _ADD_ENCOUNT // WON ADD 增加敌遭遇触发修件 + ENCOUNT_table[i].event_now = -1; + ENCOUNT_table[i].event_end = -1; + ENCOUNT_table[i].enemy_group = -1; +#endif + } +} + + /* 引凶 心 允 */ + linenum = 0; + while( fgets( line, sizeof( line ), f ) ){ + linenum ++; + if( line[0] == '#' )continue; /* comment */ + if( line[0] == '\n' )continue; /* none */ + chomp( line ); + + /* 垫毛帮溥允月 */ + /* 引内 tab 毛 " " 卞 五晶尹月 */ + replaceString( line, '\t' , ' ' ); + /* 燮 及旦矢□旦毛潸月[*/ +{ + int i; + char buf[256]; + for( i = 0; i < strlen( line); i ++) { + if( line[i] != ' ' ) { + break; + } + strcpy( buf, &line[i]); + } + if( i != 0 ) { + strcpy( line, buf); + } +} +{ + char token[256]; + int ret; + int x1,x2,y1,y2; + int j; + + /* 蘸户及伙□皿卞 匀凶凛及啃及赓渝祭 */ + ENCOUNT_table[encount_readlen].index = -1; + ENCOUNT_table[encount_readlen].floor = 0; + ENCOUNT_table[encount_readlen].encountprob_min = 1; + ENCOUNT_table[encount_readlen].encountprob_min = 50; + ENCOUNT_table[encount_readlen].enemymaxnum = 4; + ENCOUNT_table[encount_readlen].rect.x = 0; + ENCOUNT_table[encount_readlen].rect.y = 0; + ENCOUNT_table[encount_readlen].rect.height = 0; + ENCOUNT_table[encount_readlen].rect.width = 0; + ENCOUNT_table[encount_readlen].zorder = 0; + for( j = 0; j < ENCOUNT_GROUPMAXNUM; j ++ ) { + ENCOUNT_table[encount_readlen].groupid[j] = -1; + ENCOUNT_table[encount_readlen].createprob[j] = -1; + } +#ifdef _ADD_ENCOUNT // WON ADD 增加敌遭遇触发修件 + ENCOUNT_table[encount_readlen].event_now = -1; + ENCOUNT_table[encount_readlen].event_end = -1; + ENCOUNT_table[encount_readlen].enemy_group = -1; +#endif + + + /* 夫午勾户及玄□弁件毛苇月 */ + ret = getStringFromIndexWithDelim( line,",",1,token, + sizeof(token)); + if( ret==FALSE ){ + fprint("文件语法错误:%s 第%d行\n",filename,linenum); + continue; + } + ENCOUNT_table[encount_readlen].index = atoi(token); + + /* 2勾户及玄□弁件毛苇月 */ + ret = getStringFromIndexWithDelim( line,",",2,token, + sizeof(token)); + if( ret==FALSE ){ + fprint("文件语法错误:%s 第%d行\n",filename,linenum); + continue; + } + ENCOUNT_table[encount_readlen].floor = atoi(token); + + /* 3勾户及玄□弁件毛苇月 */ + ret = getStringFromIndexWithDelim( line,",",3,token, + sizeof(token)); + if( ret==FALSE ){ + fprint("文件语法错误:%s 第%d行\n",filename,linenum); + continue; + } + x1 = atoi(token); + + /* 4勾户及玄□弁件毛苇月 */ + ret = getStringFromIndexWithDelim( line,",",4,token, + sizeof(token)); + if( ret==FALSE ){ + fprint("文件语法错误:%s 第%d行\n",filename,linenum); + continue; + } + y1= atoi(token); + + /* 5勾户及玄□弁件毛苇月 */ + ret = getStringFromIndexWithDelim( line,",",5,token, + sizeof(token)); + if( ret==FALSE ){ + fprint("文件语法错误:%s 第%d行\n",filename,linenum); + continue; + } + + x2 = atoi(token); + + /* 6勾户及玄□弁件毛苇月 */ + ret = getStringFromIndexWithDelim( line,",",6,token, + sizeof(token)); + if( ret==FALSE ){ + fprint("文件语法错误:%s 第%d行\n",filename,linenum); + continue; + } + y2= atoi(token); + + ENCOUNT_table[encount_readlen].rect.x = min(x1,x2); + ENCOUNT_table[encount_readlen].rect.width = max(x1,x2) - min(x1,x2); + ENCOUNT_table[encount_readlen].rect.y = min(y1,y2); + ENCOUNT_table[encount_readlen].rect.height = max(y1,y2) - min(y1,y2); + + /* 7户及玄□弁件毛苇月 */ + ret = getStringFromIndexWithDelim( line,",",7,token, + sizeof(token)); + if( ret==FALSE ){ + fprint("文件语法错误:%s 第%d行\n",filename,linenum); + continue; + } + ENCOUNT_table[encount_readlen].encountprob_min = atoi(token); + + /* 8户及玄□弁件毛苇月 */ + ret = getStringFromIndexWithDelim( line,",",8,token, + sizeof(token)); + if( ret==FALSE ){ + fprint("文件语法错误:%s 第%d行\n",filename,linenum); + continue; + } + ENCOUNT_table[encount_readlen].encountprob_max = atoi(token); + +{ + int a,b; + a = ENCOUNT_table[encount_readlen].encountprob_min; + b = ENCOUNT_table[encount_readlen].encountprob_max; + /* 凝及譬帮 */ + ENCOUNT_table[encount_readlen].encountprob_min + = min( a,b); + ENCOUNT_table[encount_readlen].encountprob_max + = max( a,b); +} + /* 9勾户及玄□弁件毛苇月 */ + ret = getStringFromIndexWithDelim( line,",",9,token, + sizeof(token)); + if( ret==FALSE ){ + fprint("文件语法错误:%s 第%d行\n",filename,linenum); + continue; + } + { + int maxnum = atoi( token); + /* 醒及恳癫岭及民尼永弁 */ + if( maxnum < 1 || maxnum > ENCOUNT_ENEMYMAXCREATENUM ) { + fprint("文件语法错误:%s 第%d行\n",filename,linenum); + continue; + } + ENCOUNT_table[encount_readlen].enemymaxnum = maxnum; + } + /* 10户及玄□弁件毛苇月 */ + ret = getStringFromIndexWithDelim( line,",",10,token, + sizeof(token)); + if( ret==FALSE ){ + fprint("文件语法错误:%s 第%d行\n",filename,linenum); + continue; + } + ENCOUNT_table[encount_readlen].zorder = atoi(token); + #define CREATEPROB_TOKEN 11 + + /* 11 31户及玄□弁件毛苇月 */ + { + int i; + + for( i = CREATEPROB_TOKEN; i < CREATEPROB_TOKEN +ENCOUNT_GROUPMAXNUM*2; i ++) { + ret = getStringFromIndexWithDelim( line,",",i,token, + sizeof(token)); + if( ret==FALSE ){ + fprint("文件语法错误:%s 第%d行\n",filename,linenum); + continue; + } + if( strlen( token) != 0 ) { + if( i < CREATEPROB_TOKEN + ENCOUNT_GROUPMAXNUM ) { + ENCOUNT_table[encount_readlen].groupid[i-CREATEPROB_TOKEN] + = atoi(token); + } + else { + ENCOUNT_table[encount_readlen].createprob[i-(CREATEPROB_TOKEN + ENCOUNT_GROUPMAXNUM)] + = atoi(token); + } + } + } + + /* 褐 民尼永弁 */ + if( checkRedundancy( ENCOUNT_table[encount_readlen].groupid, + arraysizeof( ENCOUNT_table[encount_readlen].groupid))) + { + fprint( "文件语法错误:%s 第%d行\n", + filename,linenum); + continue; + } + } + + +#ifdef _ADD_ENCOUNT // WON ADD 增加敌遭遇触发修件 + ret = getStringFromIndexWithDelim( line,",",31,token, + sizeof(token)); + if( ret==FALSE ){ + fprint("文件语法错误:%s 第%d行\n",filename,linenum); + continue; + } + ENCOUNT_table[encount_readlen].event_now = atoi(token); + + ret = getStringFromIndexWithDelim( line,",",32,token, + sizeof(token)); + if( ret==FALSE ){ + fprint("文件语法错误:%s 第%d行\n",filename,linenum); + continue; + } + ENCOUNT_table[encount_readlen].event_end = atoi(token); + + ret = getStringFromIndexWithDelim( line,",",33,token, + sizeof(token)); + if( ret==FALSE ){ + fprint("文件语法错误:%s 第%d行\n",filename,linenum); + continue; + } + ENCOUNT_table[encount_readlen].enemy_group = atoi(token); +#endif + + encount_readlen ++; +} + } + fclose(f); + + ENCOUNT_encountnum = encount_readlen; + + print( "有效的遇敌坐标数是 %d..", ENCOUNT_encountnum ); + +#if 0 + + { + int i; + for( i=0; i 0) { + if( index != -1 ) { + /* 穸燮赐匏毛譬屯月 */ + /* 五中 穸燮 */ + if( curZorder > ENCOUNT_getZorderFromArray(index)) { + index = i; + } + } + else { + index = i; + } + } + } + } + } + return index; +} + +/*------------------------------------------------------------ + * 隙烂今木凶甄 及巨件市它件玄割 毛譬屯月[ + * 娄醒 + * floor int 白夫失ID + * x int x甄 + * y int y甄 + * 忒曰袄 + * 恳橘 ㄟ动晓及割 + * 潸 撩 -1 + ------------------------------------------------------------*/ +int ENCOUNT_getEncountPercentMin( int charaindex, int floor , int x, int y ) +{ + int ret; + + ret = ENCOUNT_getEncountAreaArray( floor, x, y); + if( ret != -1 ) { + ret = ENCOUNT_table[ret].encountprob_min; + /* 玄目夫旦躲绊毛勾仃月 */ + if( CHAR_getWorkInt( charaindex, CHAR_WORK_TOHELOS_COUNT) > 0 ) { + ret = ceil( ret * + ((100 + CHAR_getWorkInt( charaindex, CHAR_WORK_TOHELOS_CUTRATE)) + / 100.0)); + } + if( ret < 0 ) ret = 0; + if( ret > 100 ) ret = 100; + } + return ret; +} +/*------------------------------------------------------------ + * 隙烂今木凶甄 及巨件市它件玄割 毛譬屯月[ + * 娄醒 + * floor int 白夫失ID + * x int x甄 + * y int y甄 + * 忒曰袄 + * 恳橘 ㄟ动晓及割 + * 潸 撩 -1 + ------------------------------------------------------------*/ +int ENCOUNT_getEncountPercentMax( int charaindex, int floor , int x, int y ) +{ + int ret; + + ret = ENCOUNT_getEncountAreaArray( floor, x, y); + if( ret != -1 ) { + ret = ENCOUNT_table[ret].encountprob_max; + /* 玄目夫旦躲绊毛勾仃月 */ + if( CHAR_getWorkInt( charaindex, CHAR_WORK_TOHELOS_COUNT) > 0 ) { + ret = ceil( ret * + ((100 + CHAR_getWorkInt( charaindex, CHAR_WORK_TOHELOS_CUTRATE)) + / 100.0)); + } + if( ret < 0 ) ret = 0; + if( ret > 100 ) ret = 100; + } + return ret; +} +/*------------------------------------------------------------ + * 隙烂今木凶甄 及衬戏岳MAX醒毛譬屯月[ + * 娄醒 + * floor int 白夫失ID + * x int x甄 + * y int y甄 + * 忒曰袄 + * 恳橘 ㄟ动晓及割 + * 潸 撩 -1 + ------------------------------------------------------------*/ +int ENCOUNT_getCreateEnemyMaxNum( int floor , int x, int y ) +{ + int ret; + + ret = ENCOUNT_getEncountAreaArray( floor, x, y); + if( ret != -1 ) { + ret = ENCOUNT_table[ret].enemymaxnum; + } + return ret; +} +/*------------------------------------------------------------ + * 隙烂今木凶甄 及巨件市它件玄白奴□伙玉及index毛譬屯月[ + * 娄醒 + * floor int 白夫失ID + * x int x甄 + * y int y甄 + * 忒曰袄 + * 恳橘 ㄟ动晓 + * 潸 撩 -1 + ------------------------------------------------------------*/ +int ENCOUNT_getEncountIndex( int floor , int x, int y ) +{ + int ret; + + ret = ENCOUNT_getEncountAreaArray( floor, x, y); + if( ret != -1 ) { + ret = ENCOUNT_table[ret].index; + } + return ret; +} +/*------------------------------------------------------------ + * 隙烂今木凶甄 及巨件市它件玄白奴□伙玉及index毛譬屯月[ + * 娄醒 + * array int ENCOUNTTABLE及骄侬 + * 忒曰袄 + * 恳橘 ㄟ动晓 + * 潸 撩 -1 + ------------------------------------------------------------*/ +int ENCOUNT_getEncountIndexFromArray( int array ) +{ + if( !ENCOUNT_CHECKENCOUNTTABLEARRAY( array)) return -1; + return ENCOUNT_table[array].index; +} +/*------------------------------------------------------------ + * 隙烂今木凶甄 及巨件市它件玄割 毛譬屯月[ + * 娄醒 + * array int ENCOUNTTABLE及骄侬 + * 忒曰袄 + * 恳橘 ㄟ动晓 + * 潸 撩 -1 + ------------------------------------------------------------*/ +int ENCOUNT_getEncountPercentFromArray( int array ) +{ + if( !ENCOUNT_CHECKENCOUNTTABLEARRAY( array)) return -1; + return ENCOUNT_table[array].encountprob_min; +} +/*------------------------------------------------------------ + * 隙烂今木凶甄 及衬戏岳MAX醒毛譬屯月[ + * 娄醒 + * array int ENCOUNTTABLE及骄侬 + * 忒曰袄 + * 恳橘 ㄟ动晓 + * 潸 撩 -1 + ------------------------------------------------------------*/ +int ENCOUNT_getCreateEnemyMaxNumFromArray( int array ) +{ + if( !ENCOUNT_CHECKENCOUNTTABLEARRAY( array)) return -1; + return ENCOUNT_table[array].enemymaxnum; +} +/*------------------------------------------------------------ + * 隙烂今木凶骄侬及弘伙□皿 寞毛譬屯月[ + * 娄醒 + * array int ENCOUNTTABLE及骄侬 + * 忒曰袄 + * 恳橘 ㄟ动晓 + * 潸 撩 -1 + ------------------------------------------------------------*/ +int ENCOUNT_getGroupIdFromArray( int array, int grouparray ) +{ + if( !ENCOUNT_CHECKENCOUNTTABLEARRAY( array)) return -1; + return ENCOUNT_table[array].groupid[grouparray]; +} +/*------------------------------------------------------------ + * 隙烂今木凶骄侬及弘伙□皿及请蜇 毛譬屯月[ + * 娄醒 + * array int ENCOUNTTABLE及骄侬 + * 忒曰袄 + * 恳橘 ㄟ动晓 + * 潸 撩 -1 + ------------------------------------------------------------*/ +int ENCOUNT_getGroupProbFromArray( int array, int grouparray ) +{ + if( !ENCOUNT_CHECKENCOUNTTABLEARRAY( array)) return -1; + return ENCOUNT_table[array].createprob[grouparray]; +} +/*------------------------------------------------------------ + * 隙烂今木凶骄侬及穸燮赐匏毛譬屯月[ + * 娄醒 + * array int ENCOUNTTABLE及骄侬 + * 忒曰袄 + * 恳橘 ㄟ动晓 + * 潸 撩 -1 + ------------------------------------------------------------*/ +int ENCOUNT_getZorderFromArray( int array ) +{ + if( !ENCOUNT_CHECKENCOUNTTABLEARRAY( array)) return -1; + return ENCOUNT_table[array].zorder; +} diff --git a/gmsv/char/enemy.c b/gmsv/char/enemy.c new file mode 100644 index 0000000..d61e3da --- /dev/null +++ b/gmsv/char/enemy.c @@ -0,0 +1,2567 @@ +/* 衬涩烂楮 */ +#include "version.h" +#include +#include +#include "common.h" +#include "util.h" +#include "buf.h" +#include "char_base.h" +#include "char.h" +#include "configfile.h" +#include "encount.h" +#include "enemy.h" +#include "pet.h" +#include "enemyexptbl.h" +#include "petmail.h" +#include "battle.h" +#include "pet_skillinfo.h" +#include "anim_tbl.h" +#include "log.h" + +#ifdef _ADD_ENCOUNT // WON ADD 增加敌遭遇触发修件 +#include "encount.h" +#include "npcutil.h" +#endif + +#define ENEMY_INDEXTABLEMAXSIZE 16 +static ENEMY_EnemyTable *ENEMY_enemy; +static int ENEMY_enemynum; + +static ENEMYTEMP_Table *ENEMYTEMP_enemy; +static int ENEMYTEMP_enemynum; + +static GROUP_Table *GROUP_group; +static int GROUP_groupnum; + +int ENEMY_indextable[ENEMY_INDEXTABLEMAXSIZE]; + +#ifdef _ENEMY_FALLGROUND +extern tagRidePetTable ridePetTable[296]; +#endif + +INLINE BOOL ENEMY_CHECKINDEX( int index) +{ + if( index < 0 || index >= ENEMY_enemynum) return FALSE; + return TRUE; +} + +static INLINE BOOL ENEMY_CHECKINTDATAINDEX( int index) +{ + if( index< 0 || index >= ENEMY_DATAINTNUM) return FALSE; + return TRUE; +} + +static INLINE BOOL ENEMY_CHECKCHARDATAINDEX( int index) +{ + if( index< 0 || index >= ENEMY_DATACHARNUM) return FALSE; + return TRUE; +} + +INLINE int ENEMY_getInt( int index, ENEMY_DATAINT element) +{ + return ENEMY_enemy[index].intdata[element]; +} + +INLINE int *ENEMY_getIntdata( int index) +{ + return ENEMY_enemy[index].intdata; +} + +INLINE int ENEMY_setInt( int index, ENEMY_DATAINT element, int data) +{ + int buf; + buf = ENEMY_enemy[index].intdata[element]; + ENEMY_enemy[index].intdata[element] = data; + return buf; +} + +INLINE char *ENEMY_getChar( int index, ENEMY_DATACHAR element) +{ + if(!ENEMY_CHECKINDEX(index))return NULL; + if(!ENEMY_CHECKCHARDATAINDEX(element))return NULL; + + return ENEMY_enemy[index].chardata[element].string; +} + +INLINE BOOL ENEMY_setChar( int index ,ENEMY_DATACHAR element, char* new ) +{ + if(!ENEMY_CHECKINDEX(index))return FALSE; + if(!ENEMY_CHECKCHARDATAINDEX(element))return FALSE; + strcpysafe( ENEMY_enemy[index].chardata[element].string, + sizeof(ENEMY_enemy[index].chardata[element].string), + new ); + return TRUE; +} + +int ENEMY_getEnemyNum( void) +{ + return ENEMY_enemynum; +} + +INLINE BOOL ENEMYTEMP_CHECKINDEX( int index) +{ + if( index < 0 || index >= ENEMYTEMP_enemynum) return FALSE; + return TRUE; +} + +static INLINE BOOL ENEMYTEMP_CHECKINTDATAINDEX( int index) +{ + if( index< 0 || index >= E_T_DATAINTNUM) return FALSE; + return TRUE; +} + +static INLINE BOOL ENEMYTEMP_CHECKCHARDATAINDEX( int index) +{ + if( index< 0 || index >= E_T_DATACHARNUM) return FALSE; + return TRUE; +} + +INLINE int ENEMYTEMP_getInt( int index, ENEMYTEMP_DATAINT element) +{ + return ENEMYTEMP_enemy[index].intdata[element]; +} + +INLINE int ENEMYTEMP_setInt( int index, ENEMYTEMP_DATAINT element, int data) +{ + int buf; + buf = ENEMYTEMP_enemy[index].intdata[element]; + ENEMYTEMP_enemy[index].intdata[element] = data; + return buf; +} + +INLINE char *ENEMYTEMP_getChar( int index, ENEMYTEMP_DATACHAR element) +{ + if(!ENEMYTEMP_CHECKINDEX(index))return NULL; + if(!ENEMYTEMP_CHECKCHARDATAINDEX(element))return NULL; + + return ENEMYTEMP_enemy[index].chardata[element].string; +} + +INLINE BOOL ENEMYTEMP_setChar( int index ,ENEMYTEMP_DATACHAR element, char* new ) +{ + if(!ENEMYTEMP_CHECKINDEX(index))return FALSE; + if(!ENEMYTEMP_CHECKCHARDATAINDEX(element))return FALSE; + strcpysafe( ENEMYTEMP_enemy[index].chardata[element].string, + sizeof(ENEMYTEMP_enemy[index].chardata[element].string), + new ); + return TRUE; +} + +int ENEMYTEMP_getEnemyNum( void) +{ + return ENEMYTEMP_enemynum; +} + +INLINE BOOL GROUP_CHECKINDEX( int index) +{ + if( index < 0 || index >= GROUP_groupnum) return FALSE; + return TRUE; +} + +static INLINE BOOL GROUP_CHECKINTDATAINDEX( int index) +{ + if( index< 0 || index >= GROUP_DATAINTNUM) return FALSE; + return TRUE; +} + +static INLINE BOOL GROUP_CHECKCHARDATAINDEX( int index) +{ + if( index< 0 || index >= GROUP_DATACHARNUM) return FALSE; + return TRUE; +} + +INLINE int GROUP_getInt( int index, GROUP_DATAINT element) +{ + return GROUP_group[index].intdata[element]; +} + +INLINE int GROUP_setInt( int index, GROUP_DATAINT element, int data) +{ + int buf; + buf = GROUP_group[index].intdata[element]; + GROUP_group[index].intdata[element] = data; + return buf; +} + +INLINE char *GROUP_getChar( int index, GROUP_DATACHAR element) +{ + if(!GROUP_CHECKINDEX(index))return NULL; + if(!GROUP_CHECKCHARDATAINDEX(element))return NULL; + + return GROUP_group[index].chardata[element].string; +} + +INLINE BOOL GROUP_setChar( int index ,GROUP_DATACHAR element, char* new ) +{ + if(!GROUP_CHECKINDEX(index))return FALSE; + if(!GROUP_CHECKCHARDATAINDEX(element))return FALSE; + strcpysafe( GROUP_group[index].chardata[element].string, + sizeof(GROUP_group[index].chardata[element].string), + new ); + return TRUE; +} + +int GROUP_getEnemyNum( void) +{ + return GROUP_groupnum; +} + +BOOL ENEMYTEMP_initEnemy( char* filename ) +{ + FILE* f; + char line[256]; + int linenum=0; + int enemytemp_readlen=0; + int i,j; + +#ifdef _ENEMYTEMP_OPTIMUM + int max_enemytempid =0; + char token[256]; +#endif + f = fopen(filename,"r"); + if( f == NULL ){ + print( "文件打开失败\n"); + return FALSE; + } + + ENEMYTEMP_enemynum=0; + + /* 引内 躲卅垫互窒垫丐月井升丹井譬屯月 */ + while( fgets( line, sizeof( line ), f ) ){ + linenum ++; + if( line[0] == '#' )continue; /* comment */ + if( line[0] == '\n' )continue; /* none */ + chomp( line ); + +#ifdef _ENEMYTEMP_OPTIMUM // Robin 取出最大ENEMYTEMP ID + if( getStringFromIndexWithDelim( line, ",", E_T_DATACHARNUM+E_T_TEMPNO+1, + token, sizeof(token)) == FALSE ) + continue; + max_enemytempid = max( atoi( token), max_enemytempid); +#endif + + ENEMYTEMP_enemynum++; + } + + if( fseek( f, 0, SEEK_SET ) == -1 ){ + fprint( "Seek Error\n" ); + fclose(f); + return FALSE; + } + +#ifdef _ENEMYTEMP_OPTIMUM + print("\n 有效EBT:%d 最大EBT:%d \n", ENEMYTEMP_enemynum, max_enemytempid); + ENEMYTEMP_enemynum = max_enemytempid +1; +#endif + + ENEMYTEMP_enemy = allocateMemory( sizeof(struct tagENEMYTEMP_Table) + * ENEMYTEMP_enemynum ); + if( ENEMYTEMP_enemy == NULL ){ + fprint( "无法分配内存 %d\n" , + sizeof(struct tagENEMYTEMP_Table)*ENEMYTEMP_enemynum); + fclose( f ); + return FALSE; + } + + /* 赓渝祭 */ + for( i = 0; i < ENEMYTEMP_enemynum; i ++ ) { + for( j = 0; j < E_T_DATAINTNUM; j ++ ) { + ENEMYTEMP_setInt( i,j,-1); + } + } + linenum = 0; + while( fgets( line, sizeof( line ), f ) ){ + linenum ++; + if( line[0] == '#' )continue; /* comment */ + if( line[0] == '\n' )continue; /* none */ + chomp( line ); + replaceString( line, '\t' , ' ' ); +{ + char buf[256]; + for( i = 0; i < strlen( line); i ++) { + if( line[i] != ' ' ) { + break; + } + strcpy( buf, &line[i]); + } + if( i != 0 ) { + strcpy( line, buf); + } +} +{ + char token[256]; + int ret; + +#ifdef _ENEMYTEMP_OPTIMUM + if( getStringFromIndexWithDelim( line, ",", E_T_DATACHARNUM+E_T_TEMPNO+1, + token, sizeof(token)) == FALSE ) + continue; + enemytemp_readlen = atoi(token); +#endif + +#if 0 + ret = getStringFromIndexWithDelim( line,",",1,token, + sizeof(token)); + if( ret==FALSE ){ + fprint("文件语法错误:%s 第%行\n",filename,linenum); + continue; + } + ENEMYTEMP_setChar( enemytemp_readlen, E_T_NAME, token); +#endif + for( i = 0; i < E_T_DATACHARNUM; i ++ ) { + ret = getStringFromIndexWithDelim( line,",",i+1,token, + sizeof(token)); + if( ret==FALSE ){ + fprint("文件语法错误:%s 第%d行\n",filename,linenum); + continue; + } + ENEMYTEMP_setChar( enemytemp_readlen, E_T_NAME + i, token); + + } +#define ENEMYTEMP_STARTINTNUM (E_T_DATACHARNUM+1) + for( i = ENEMYTEMP_STARTINTNUM; i < E_T_DATAINTNUM+ENEMYTEMP_STARTINTNUM; i ++ ) { + ret = getStringFromIndexWithDelim( line,",",i,token, + sizeof(token)); + if( ret==FALSE ){ + fprint("文件语法错误:%s 第%d行\n",filename,linenum); + break; + } + if( strlen( token) != 0 ) { + ENEMYTEMP_setInt( enemytemp_readlen, i - ENEMYTEMP_STARTINTNUM, atoi( token)); + } + } + if( i < E_T_DATAINTNUM+ENEMYTEMP_STARTINTNUM ) continue; + + + enemytemp_readlen ++; +} + } + fclose(f); + + ENEMYTEMP_enemynum = enemytemp_readlen; + + print( "有效宠物基本状态数是 %d...", ENEMYTEMP_enemynum ); + +#if 0 + + for( i=0; i = 0 && EnemyTempNo < ENEMYTEMP_enemynum ) + return EnemyTempNo; +#else + int i; + for( i = 0; i < ENEMYTEMP_enemynum; i ++ ) { + if( ENEMYTEMP_getInt( i, E_T_TEMPNO) == EnemyTempNo) { + return i; + } + } +#endif + return -1; +} + +int ENEMYTEMP_getEnemyTempArrayFromInitnum( int EnemyTempNo) +{ + int i; + for( i = 0; i < ENEMYTEMP_enemynum; i ++ ) { + if( ENEMYTEMP_getInt( i, E_T_INITNUM) == EnemyTempNo) { + return i; + } + } + return -1; +} + +BOOL ENEMY_initEnemy( char* filename ) +{ + FILE* f; + char line[256]; + int linenum=0; + int enemy_readlen=0; + int i,j; +#ifdef _ENEMY_OPTIMUM + int max_enemyid =0; + char token[256]; +#endif + + f = fopen(filename,"r"); + if( f == NULL ){ + print( "文件打开失败\n"); + return FALSE; + } + + ENEMY_enemynum=0; + while( fgets( line, sizeof( line ), f ) ){ + linenum ++; + if( line[0] == '#' )continue; /* comment */ + if( line[0] == '\n' )continue; /* none */ + chomp( line ); + +#ifdef _ENEMY_OPTIMUM // Robin 取出最大ENEMY ID + if( getStringFromIndexWithDelim( line, ",", ENEMY_DATACHARNUM+ENEMY_ID+1, + token, sizeof(token)) == FALSE ) + continue; + max_enemyid = max( atoi( token), max_enemyid); +#endif + + ENEMY_enemynum++; + } + + if( fseek( f, 0, SEEK_SET ) == -1 ){ + fprint( "寻找失败\n" ); + fclose(f); + return FALSE; + } + +#ifdef _ENEMY_OPTIMUM + print("\n 有效ET:%d 最大ET:%d \n", ENEMY_enemynum, max_enemyid); + ENEMY_enemynum = max_enemyid +1; +#endif + + ENEMY_enemy = allocateMemory( sizeof(struct tagENEMY_EnemyTable) + * ENEMY_enemynum ); + if( ENEMY_enemy == NULL ){ + fprint( "无法分配内存 %d\n" , + sizeof(struct tagENEMY_EnemyTable)*ENEMY_enemynum); + fclose( f ); + return FALSE; + } + for( i = 0; i < ENEMY_enemynum; i ++ ) { + for( j = 0; j < ENEMY_DATAINTNUM; j ++ ) { + ENEMY_setInt( i,j,-1); + } + } + linenum = 0; + while( fgets( line, sizeof( line ), f ) ){ + linenum ++; + if( line[0] == '#' )continue; /* comment */ + if( line[0] == '\n' )continue; /* none */ + chomp( line ); + replaceString( line, '\t' , ' ' ); +{ + char buf[256]; + for( i = 0; i < strlen( line); i ++) { + if( line[i] != ' ' ) { + break; + } + strcpy( buf, &line[i]); + } + if( i != 0 ) { + strcpy( line, buf); + } +} +{ + char token[256]; + int ret; + +#ifdef _ENEMY_OPTIMUM + if( getStringFromIndexWithDelim( line, ",", ENEMY_DATACHARNUM+ENEMY_ID+1, + token, sizeof(token)) == FALSE ) + continue; + enemy_readlen = atoi(token); +#endif + + ret = getStringFromIndexWithDelim( line,",",1,token,sizeof(token)); + if( ret==FALSE ){ + fprint("文件语法错误:%s 第%d行\n",filename,linenum); + continue; + } + ENEMY_setChar( enemy_readlen, ENEMY_NAME, token); + ret = getStringFromIndexWithDelim( line,",",2,token,sizeof(token)); + if( ret==FALSE ){ + fprint("文件语法错误:%s 第%d行\n",filename,linenum); + continue; + } + ENEMY_setChar( enemy_readlen, ENEMY_TACTICSOPTION, token); +#ifdef _BATTLENPC_WARP_PLAYER + ret = getStringFromIndexWithDelim( line, ",", 3, token, sizeof(token)); + if(ret==FALSE){ + fprint("文件语法错误:%s 第%d行\n",filename,linenum); + continue; + } + ENEMY_setChar( enemy_readlen, ENEMY_ACT_CONDITION, token); +#endif + +#ifdef _BATTLENPC_WARP_PLAYER +#define ENEMY_STARTINTNUM 4 +#else +#define ENEMY_STARTINTNUM 3 +#endif + + for( i = ENEMY_STARTINTNUM; i < ENEMY_DATAINTNUM+ENEMY_STARTINTNUM; i ++ ) { + ret = getStringFromIndexWithDelim( line,",",i,token,sizeof(token)); + if( ret==FALSE ){ + fprint("文件语法错误:%s 第%d行\n",filename,linenum); + break; + } + ENEMY_setInt( enemy_readlen, i - ENEMY_STARTINTNUM, atoi( token)); + } + if( i < ENEMY_DATAINTNUM+ENEMY_STARTINTNUM ) continue; + for( i = 0; i < ENEMYTEMP_enemynum; i ++ ) { + if( ENEMYTEMP_getInt( i, E_T_TEMPNO)== ENEMY_getInt( enemy_readlen, ENEMY_TEMPNO)){ + break; + } + } + if( i == ENEMYTEMP_enemynum) { + fprint("文件语法错误:%s 第%d行\n",filename,linenum); + continue; + } + ENEMY_enemy[enemy_readlen].enemytemparray = i; +{ + int lv_min, lv_max; + lv_min = ENEMY_getInt( enemy_readlen, ENEMY_LV_MIN); + lv_max = ENEMY_getInt( enemy_readlen, ENEMY_LV_MAX); + if( lv_min == 0 ) lv_min = lv_max; + ENEMY_setInt( enemy_readlen, ENEMY_LV_MIN, min( lv_min, lv_max)); + ENEMY_setInt( enemy_readlen, ENEMY_LV_MAX, max( lv_min, lv_max)); + +} + + enemy_readlen ++; +} + } + fclose(f); + ENEMY_enemynum = enemy_readlen; + print( "有效宠物数是 %d..", ENEMY_enemynum ); + +#if 0 + { + for( i=0; i = CREATEPROB1 - ENEMY_ID1) return -1; + return GROUP_group[groupindex].enemyarray[index]; +} +/*------------------------------------------------------------------------ + * ENEMY_ID 井日ENEMY_Enemy及骄侬毛襞月 + *-----------------------------------------------------------------------*/ +int ENEMY_getEnemyArrayFromId( int EnemyId) +{ +#ifdef _ENEMY_OPTIMUM + if( EnemyId >= 0 && EnemyId < ENEMY_enemynum ) + return EnemyId; +#else + int i; + for( i = 0; i < ENEMY_enemynum; i ++ ) { + if( ENEMY_getInt( i, ENEMY_ID) == EnemyId) { + return i; + } + } +#endif + return -1; +} + +int ENEMY_getEnemyArrayFromTempNo( int EnemyTempNo) +{ + int i; + for( i = 0; i < ENEMY_enemynum; i ++ ) { + if( ENEMY_getInt( i, ENEMY_TEMPNO) == EnemyTempNo) { + return i; + } + } + return -1; +} + +int ENEMY_getEnemyIdFromTempNo( int EnemyTempNo) +{ + int i; + for( i = 0; i < ENEMY_enemynum; i ++ ) { + if( ENEMY_getInt( i, ENEMY_TEMPNO) == EnemyTempNo) { + return ENEMY_getInt( i, ENEMY_ID); + } + } + return -1; +} + +int ENEMY_getEnemyTempNoFromId( int EnemyId) +{ +#ifdef _ENEMY_OPTIMUM + if( EnemyId >= 0 && EnemyId < ENEMY_enemynum) + return ENEMY_getInt( EnemyId, ENEMY_TEMPNO); +#else + int i; + for( i = 0; i < ENEMY_enemynum; i ++ ) { + if( ENEMY_getInt( i, ENEMY_ID) == EnemyId) { + return ENEMY_getInt( i, ENEMY_TEMPNO); + } + } +#endif + return -1; +} + +/*------------------------------------------------------------------------ + * 弘伙□皿涩烂白央奶伙毛 戈 + *-----------------------------------------------------------------------*/ +BOOL GROUP_initGroup( char* filename ) +{ + FILE* f; + char line[256]; + int linenum=0; + int group_readlen=0; + int i,j; + + f = fopen(filename,"r"); + if( f == NULL ){ + print( "文件打开失败\n"); + return FALSE; + } + + GROUP_groupnum=0; + + /* 引内 躲卅垫互窒垫丐月井升丹井譬屯月 */ + while( fgets( line, sizeof( line ), f ) ){ + linenum ++; + if( line[0] == '#' )continue; /* comment */ + if( line[0] == '\n' )continue; /* none */ + chomp( line ); + + GROUP_groupnum++; + } + + if( fseek( f, 0, SEEK_SET ) == -1 ){ + fprint( "寻找失败\n" ); + fclose(f); + return FALSE; + } + + GROUP_group = allocateMemory( sizeof(struct tagGROUP_Table) + * GROUP_groupnum ); + if( GROUP_group == NULL ){ + fprint( "无法分配内存 %d\n" , + sizeof(struct tagGROUP_Table)*GROUP_groupnum); + fclose( f ); + return FALSE; + } + /* 赓渝祭 */ + for( i = 0; i < GROUP_groupnum; i ++ ) { + for( j = 0; j < GROUP_DATAINTNUM; j ++ ) { + GROUP_setInt( i,j,-1); + } + for( j = 0; j < CREATEPROB1 - ENEMY_ID1; j ++ ) { + GROUP_group[i].enemyarray[j] = -1; + } + } + + /* 引凶 心 允 */ + linenum = 0; + while( fgets( line, sizeof( line ), f ) ){ + linenum ++; + if( line[0] == '#' )continue; /* comment */ + if( line[0] == '\n' )continue; /* none */ + chomp( line ); + + /* 垫毛帮溥允月 */ + /* 引内 tab 毛 " " 卞 五晶尹月 */ + replaceString( line, '\t' , ' ' ); + /* 燮 及旦矢□旦毛潸月[*/ +{ + char buf[256]; + for( i = 0; i < strlen( line); i ++) { + if( line[i] != ' ' ) { + break; + } + strcpy( buf, &line[i]); + } + if( i != 0 ) { + strcpy( line, buf); + } +} +{ + char token[256]; + int ret; + int loop; + + /* 手仄手ㄡ蘸户及伙□皿卞 匀凶凛及凶户卞赓渝祭仄化云仁 */ + for( j = 0; j < GROUP_DATAINTNUM; j ++ ) { + GROUP_setInt( group_readlen,j,-1); + } + for( j = 0; j < CREATEPROB1 - ENEMY_ID1; j ++ ) { + GROUP_group[group_readlen].enemyarray[j] = -1; + } + + /* 夫午勾户及玄□弁件毛苇月 */ + ret = getStringFromIndexWithDelim( line,",",1,token, + sizeof(token)); + if( ret==FALSE ){ + fprint("文件语法错误:%s 第%d行\n",filename,linenum); + continue; + } + GROUP_setChar( group_readlen, GROUP_NAME, token); + + /* 2勾 动嫦反醒袄犯□正 */ +#define GROUP_STARTINTNUM 2 + for( i = GROUP_STARTINTNUM; i < GROUP_DATAINTNUM+GROUP_STARTINTNUM; i ++ ) { + ret = getStringFromIndexWithDelim( line,",",i,token, + sizeof(token)); + if( ret==FALSE ){ + fprint("文件语法错误:%s 第%d行\n",filename,linenum); + break; + } + if( strlen( token) != 0 ) { + GROUP_setInt( group_readlen, i - GROUP_STARTINTNUM, atoi( token)); + } + } + if( i < GROUP_DATAINTNUM+GROUP_STARTINTNUM ) continue; + + { + int enemycnt = 0; + for( loop = ENEMY_ID1; loop < CREATEPROB1; loop ++ ) { + if( GROUP_getInt( group_readlen, loop) != -1 ) { + for( i = 0; i < ENEMY_enemynum; i ++ ) { + if( ENEMY_getInt( i, ENEMY_ID) + == GROUP_getInt( group_readlen, loop)) + { + break; + } + } + if( i == ENEMY_enemynum) { + i = -1; + GROUP_setInt( group_readlen, loop, -1); + } + else { + enemycnt ++; + } + GROUP_group[group_readlen].enemyarray[loop - ENEMY_ID1] = i; + } + } + if( enemycnt == 0 ) { + fprint("团队设定中敌人尚未设定 文件:%s 第%d行\n",filename,linenum); + continue;; + } + if( checkRedundancy( &GROUP_group[group_readlen].intdata[ENEMY_ID1], + CREATEPROB1 - ENEMY_ID1)) + { + fprint("团队设定中敌人重复设定 文件:%s 第%d行\n",filename,linenum); + continue;; + } + + } + + + group_readlen ++; +} + } + fclose(f); + + GROUP_groupnum = group_readlen; + + print( "有效遇敌组群数是 %d...", GROUP_groupnum ); + +#if 0 + + for( i=0; i = arraysizeof( enemybaseexptbl)) return 0; + + p = ENEMY_enemy[array].intdata; + tp = ENEMYTEMP_enemy[tarray].intdata; + + // 仿件弁井日 毛潸 + if( rank < 0 || rank > 5 ) rank = 0; + ranknum = ranktbl[rank].rank; + + alpha = ( *( tp + E_T_CRITICAL) + *( tp + E_T_COUNTER) + *(tp + E_T_GET) + + *( tp + E_T_POISON) + *( tp + E_T_PARALYSIS) + *(tp + E_T_SLEEP) + + *( tp + E_T_STONE) + *( tp + E_T_DRUNK) + *(tp + E_T_CONFUSION) + ) / 100.0 + + *( tp + E_T_RARE); + /* EXP>湘 EXP≈- 仿件弁≈汐 ←伊矛伙×*/ + //return enemybaseexptbl[*(p+ENEMY_LV)] + (ranknum + alpha)*(*(tp+ENEMY_LV)); + ret = enemybaseexptbl[level] + (ranknum + alpha)*(level+1); + return ( ret < 1 ) ? 1 : ret; + +} + + +int ENEMY_getRank( int array, int tarray ){ + int *p; + int *tp; + int paramsum; + int i; + int ranknum; + + struct { + int num; + float rank; + }ranktbl[] = { + { 100, 2.5}, //总成长率 >= 100 petrank=0 + { 95, 2.0}, + { 90, 1.5}, + { 85, 1.0}, + { 80, 0.5}, + { 0, 0.0}, + }; + + p = ENEMY_enemy[array].intdata; + tp = ENEMYTEMP_enemy[tarray].intdata; + /* 仿件弁毛煌遥允月 */ + /* 仇及 及酷 反酷 踏毛辅哔及仪[ */ + paramsum = *( tp + E_T_BASEVITAL) + + *( tp + E_T_BASESTR) + + *( tp + E_T_BASETGH) + + *( tp + E_T_BASEDEX); + + ranknum = 0; // 犯白巧伙玄反ㄟ + for( i = 0; i < arraysizeof( ranktbl); i ++ ) { + if( paramsum >= ranktbl[i].num ) { + ranknum = i; + break; + } + } + + return ranknum; + +} + + +//********************************************************* +// 仿件母丞卅 +//********************************************************* +static int EnemyGymSkill[] = { + PETSKILL_GUARDBREAK, // ㄢ“布□玉旰仄(3) + PETSKILL_CONTINUATIONATTACK1, // ㄠㄟ“ 粮 猾(10) + PETSKILL_CONTINUATIONATTACK2, // ㄠㄠ“ 粮 猾(11) + PETSKILL_CONTINUATIONATTACK3, // ㄠㄡ“ 粮 猾(12) + PETSKILL_CHARGE1, // ㄢㄟ“民乓□斥ㄠ(30) + PETSKILL_CHARGE2, // ㄢㄠ“民乓□斥ㄡ(31) + PETSKILL_MIGHTY1, // ㄣㄟ“域猾 诮(40) + PETSKILL_MIGHTY2, // ㄣㄠ“域猾 诮(41) + PETSKILL_POWERBALANCE1, // ㄤㄟ“ 及讽ㄠ(50) + PETSKILL_POWERBALANCE2, // ㄤㄠ“ 及讽ㄡ(51) + PETSKILL_POWERBALANCE3, // ㄤㄡ“ 及讽ㄢ(52) + PETSKILL_POISON_ATTACK1, // ㄥㄟ“ 猾(60) + PETSKILL_POISON_ATTACK2, // ㄥㄠ“ 猾(61) + PETSKILL_STONE, // ㄧㄟ“檗祭 猾(80) + PETSKILL_CONFUSION_ATTACK, // ㄨㄟ“渔刭 猾(90) + PETSKILL_DRUNK_ATTACK, // ㄠㄟㄟ“听办 猾(100) + PETSKILL_SLEEP_ATTACK, // ㄠㄠㄟ“戽曰 猾(110) + PETSKILL_NOGUARD1, // ㄠㄤㄟ“用□布□玉ㄠ(150) + PETSKILL_NOGUARD2, // ㄠㄤㄠ“用□布□玉ㄡ(151) + PETSKILL_NOGUARD3, // ㄠㄤㄡ“用□布□玉ㄢ(152) +#ifdef _PSKILL_FALLGROUND + PETSKILL_FALLGROUND, //落马术 +#endif +#ifdef _SKILL_DAMAGETOHP + PETSKILL_DAMAGETOHP, //嗜血技 +#endif +#ifdef _Skill_MPDAMAGE + PETSKILL_MPDAMAGE, //MP伤害 +#endif + +#ifdef _SKILL_WILDVIOLENT_ATT + PETSKILL_WILDVIOLENTATTACK, //(540)狂暴攻击 vincent add 2002/05/16 +#endif +#ifdef _SKILL_SPEEDY_ATT + PETSKILL_SPEEDYATTACK, //(541)疾速攻击 vincent add 2002/05/16 +#endif +#ifdef _SKILL_GUARDBREAK2 + PETSKILL_GUARDBREAK2, //(542)破除防御2 vincent add 2002/05/20 +#endif +#ifdef _SKILL_SACRIFICE + PETSKILL_SACRIFICE, //(543)救援 vincent add 2002/05/30 +#endif +#ifdef _SKILL_WEAKEN + PETSKILL_WEAKEN, //(544)救援 vincent add 2002/07/11 +#endif +#ifdef _SKILL_DEEPPOISON + PETSKILL_DEEPPOISON, //(545)救援 vincent add 2002/07/16 +#endif +#ifdef _SKILL_BARRIER + PETSKILL_BARRIER, //(546)魔障 vincent add 2002/07/16 +#endif +#ifdef _SKILL_NOCAST + PETSKILL_NOCAST, //(547)沉默 vincent add 2002/07/16 +#endif +#ifdef _SKILL_ROAR + PETSKILL_ROAR, //(548)大吼 vincent add 2002/07/11 +#endif + +#ifdef _SKILL_REFRESH + PETSKILL_REFRESH, //(550)救援 vincent add 2002/08/08 +#endif +#ifdef _VARY_WOLF + PETSKILL_VARY, +#endif +#ifdef _PETSKILL_SETDUCK + PETSKILL_SETDUCK, +#endif + +#ifdef _MAGICPET_SKILL + PETSKILL_SETMAGICPET, +#endif +#ifdef _PETSKILL_BECOMEPIG + PETSKILL_BECOMEPIG, +#endif +#ifdef _PETSKILL_LER + PETSKILL_BATFLY, + PETSKILL_DIVIDEATTACK, +#endif +#ifdef _PETSKILL_BATTLE_MODEL + PETSKILL_BATTLE_MODEL, +#endif +}; + +static int gymbody[] = { + SPR_001em,SPR_011em,SPR_021em,SPR_031em,SPR_041em,SPR_051em, + SPR_061em,SPR_071em,SPR_081em,SPR_091em,SPR_101em,SPR_111em, + + SPR_002em,SPR_012em,SPR_022em,SPR_032em,SPR_042em,SPR_052em, + SPR_062em,SPR_072em,SPR_082em,SPR_092em,SPR_102em,SPR_112em, + + SPR_003em,SPR_013em,SPR_023em,SPR_033em,SPR_043em,SPR_053em, + SPR_063em,SPR_073em,SPR_083em,SPR_093em,SPR_103em,SPR_113em, + + SPR_004em,SPR_014em,SPR_024em,SPR_034em,SPR_044em,SPR_054em, + SPR_064em,SPR_074em,SPR_084em,SPR_094em,SPR_104em,SPR_114em, +}; + + +/*------------------------------------------------------------------------ + * ENEMY{卞仿件母丞卅 毛芨尹月 + *-----------------------------------------------------------------------*/ +int ENEMY_RandomChange( int enemyindex, int tempno ) +{ + int work, work2, iRet = 0; + + // 仿件母丞平乓仿井升丹井民尼永弁 + if( ( 564 <= tempno && tempno <= 580 ) + || ( 739 <= tempno && tempno <= 750 ) + || ( 895 <= tempno && tempno <= 906 ) + ){ + //******************************************** + // 皿伊奶乩□及涌 + //******************************************** + iRet = 1; + }else + // 仿件母丞平乓仿井升丹井民尼永弁 + if( ( 655 <= tempno && tempno <= 720 ) + || ( 859 <= tempno && tempno <= 894 ) + || ( 907 <= tempno && tempno <= 940 ) + ){ + //******************************************** + // 矢永玄及涌 + //******************************************** + iRet = 2; + }else{ + return 0; + } + + + if( iRet == 1 ){ + //******************************************** + // + // 皿伊奶乩□及涌仄凶衬卅及匹}箪岭手仿件母丞 + // + //******************************************** + // 铣手仿件母丞 + CHAR_setInt( enemyindex, CHAR_BASEBASEIMAGENUMBER, + gymbody[RAND( 0, arraysizeof( gymbody ) - 1)] ); + CHAR_setInt( enemyindex, CHAR_BASEIMAGENUMBER, + CHAR_getInt( enemyindex, CHAR_BASEBASEIMAGENUMBER ) ); + // 箪岭反赝癫 + work = ( RAND( 0, 20 ) - 10 ) * 10; + work2 = 100 - ABS( work ); + CHAR_setInt( enemyindex, CHAR_EARTHAT, work ); + CHAR_setInt( enemyindex, CHAR_FIREAT, -work ); + if( RAND( 0, 1 ) ){ + work2 *= -1; + } + CHAR_setInt( enemyindex, CHAR_WATERAT, work2 ); + CHAR_setInt( enemyindex, CHAR_WINDAT, -work2 ); + + // 仿件母丞卅 湛毛 凶六月 + if( DoujyouRandomWeponSet( enemyindex ) ){ + // 溃 湛及桦宁反骚橘 猾毛勾仃月 + CHAR_setPetSkill( enemyindex, 0, PETSKILL_NORMALATTACK ); + CHAR_setPetSkill( enemyindex, 1, PETSKILL_NORMALATTACK ); + }else{ + // 溃 湛元扎卅中及匹 勾仃月 + // 毛尥仃月 + CHAR_setPetSkill( enemyindex, 0, + EnemyGymSkill[RAND( 0, arraysizeof( EnemyGymSkill ) - 1 )] ); + // 毛尥仃月 + CHAR_setPetSkill( enemyindex, 1, + EnemyGymSkill[RAND( 0, arraysizeof( EnemyGymSkill ) - 1 )] ); + } + + }else + if( iRet == 2 ){ + // 溃 湛元扎卅中及匹 勾仃月 + // 毛尥仃月 + CHAR_setPetSkill( enemyindex, 0, + EnemyGymSkill[RAND( 0, arraysizeof( EnemyGymSkill ) - 1 )] ); + // 毛尥仃月 + CHAR_setPetSkill( enemyindex, 1, + EnemyGymSkill[RAND( 0, arraysizeof( EnemyGymSkill ) - 1 )] ); + } + + return 1; + +} + + +/*------------------------------------------------------------------------ + * ENEMY_enemy井日平乓仿弁正□毛综岳允月[ + *-----------------------------------------------------------------------*/ +int ENEMY_createEnemy( int array, int baselevel ) +{ + Char CharNew; + int newindex; + int *p; + int tp[E_T_DATAINTNUM]; + int tarray, i; + int itemindex,iloop; + int level; + int enemyrank; + + if( !ENEMY_CHECKINDEX( array)) return -1; + + p = ENEMY_enemy[array].intdata; + tarray = ENEMYTEMP_getEnemyTempArray( array); + if( !ENEMYTEMP_CHECKINDEX( tarray)) return -1; +// tp = ENEMYTEMP_enemy[tarray].intdata; + // 犯□正戊疋□ + for( i = 0; i < E_T_DATAINTNUM; i ++ ){ + tp[i] = ENEMYTEMP_enemy[tarray].intdata[i]; + } + + // 赓渝祭 + memset( &CharNew, 0, sizeof( Char ) ); + + if( !CHAR_getDefaultChar( &CharNew,31010 ) )return -1; + + /* 飓 寞 */ + CharNew.data[CHAR_BASEBASEIMAGENUMBER] + = CharNew.data[CHAR_BASEIMAGENUMBER] = *(tp+E_T_IMGNUMBER); + /* 衬匹丐月午涩烂允月 */ + CharNew.data[CHAR_WHICHTYPE] = CHAR_TYPEENEMY; + /* 毛壅允 */ + CharNew.data[CHAR_DUELPOINT] = 0; + + /* 伊矛伙毛瑁烂允月[ */ + if( baselevel > 0 ){ + level = baselevel; // 伊矛伙裔烂 + }else{ + level = RAND( (*(p + ENEMY_LV_MIN)), (*(p+ ENEMY_LV_MAX))); + } +#define E_PAR( a) (*(p + (a))) +#define ET_PAR( a) (*(tp + (a))) +/* 由仿丢□正隙醒井日 端及湘 由仿丢□正尺及煌遥挚 */ +#if 1 +#define PARAM_CAL( l) ( ( level -1)*ET_PAR( E_T_LVUPPOINT)+ ET_PAR(E_T_INITNUM)) * ET_PAR( (l)) +#else +#define PARAM_CAL( l) ( (E_PAR(ENEMY_LV) -1)*ET_PAR( E_T_LVUPPOINT)+ ET_PAR(E_T_INITNUM)) * ET_PAR( (l)) +#endif + /* 燮内湘 喃曰蕊曰禾奶件玄卞+ㄡ毛仿件母丞匹垫丹 */ + tp[E_T_BASEVITAL] += RAND( 0, 4 ) - 2; + tp[E_T_BASESTR] += RAND( 0, 4 ) - 2; + tp[E_T_BASETGH] += RAND( 0, 4 ) - 2; + tp[E_T_BASEDEX] += RAND( 0, 4 ) - 2; + /* 仇及凛鳔匹喃曰蕊曰禾奶件玄毛忡绣仄化云仁 */ + CharNew.data[CHAR_ALLOCPOINT] + = ( tp[E_T_BASEVITAL] << 24 ) + + ( tp[E_T_BASESTR] << 16 ) + + ( tp[E_T_BASETGH] << 8 ) + + ( tp[E_T_BASEDEX] << 0 ); + /* 公及 }仿件母丞匹禾奶件玄毛ㄠ勿勾笛遥[仇木毛ㄠㄟ荚楞曰忒允[*/ + for( i = 0; i < 10; i ++ ){ + int work = RAND( 0, 3 ); + if( work == 0 )tp[E_T_BASEVITAL]++; + if( work == 1 )tp[E_T_BASESTR]++; + if( work == 2 )tp[E_T_BASETGH]++; + if( work == 3 )tp[E_T_BASEDEX]++; + } + + /* 由仿丢□正本永玄 */ + CharNew.data[CHAR_VITAL] = PARAM_CAL(E_T_BASEVITAL); + CharNew.data[CHAR_STR] = PARAM_CAL(E_T_BASESTR); + CharNew.data[CHAR_TOUGH] = PARAM_CAL(E_T_BASETGH); + CharNew.data[CHAR_DEX] = PARAM_CAL(E_T_BASEDEX); + CharNew.data[CHAR_FIREAT] = *(tp+ E_T_FIREAT); + CharNew.data[CHAR_WATERAT] = *(tp+ E_T_WATERAT); + CharNew.data[CHAR_EARTHAT] = *(tp+ E_T_EARTHAT); + CharNew.data[CHAR_WINDAT] = *(tp+ E_T_WINDAT); + CharNew.data[CHAR_MODAI] = *(tp+ E_T_MODAI); + CharNew.data[CHAR_VARIABLEAI] = 0; + CharNew.data[CHAR_LV] = level; + //CharNew.data[CHAR_LV] = *(p+ ENEMY_LV); + CharNew.data[CHAR_SLOT] = *(tp+ E_T_SLOT); + CharNew.data[CHAR_POISON] = *(tp+ E_T_POISON); + CharNew.data[CHAR_PARALYSIS]= *(tp+ E_T_PARALYSIS); + CharNew.data[CHAR_SLEEP] = *(tp+ E_T_SLEEP); + CharNew.data[CHAR_STONE] = *(tp+ E_T_STONE); + CharNew.data[CHAR_DRUNK] = *(tp+ E_T_DRUNK); + CharNew.data[CHAR_CONFUSION]= *(tp+ E_T_CONFUSION); + CharNew.data[CHAR_RARE] = *(tp+ E_T_RARE); + CharNew.data[CHAR_PETID] = *(tp + E_T_TEMPNO); + CharNew.data[CHAR_CRITIAL] = *(tp + E_T_CRITICAL); + CharNew.data[CHAR_COUNTER] = *(tp + E_T_COUNTER); + + for( i = 0; i < CHAR_MAXPETSKILLHAVE; i ++ ) { + CharNew.unionTable.indexOfPetskill[i] = *(tp + E_T_PETSKILL1 + i); + } + enemyrank = ENEMY_getRank( array, tarray ); + CharNew.data[CHAR_PETRANK] = enemyrank; +#undef E_PAR +#undef ET_PAR +#undef PARAM_CAL + CharNew.data[CHAR_DUELPOINT] = *( p + ENEMY_DUELPOINT); + if( *( p + ENEMY_DUELPOINT) <= 0 ) { + if( *(p + ENEMY_EXP) != -1 ) { + CharNew.data[CHAR_EXP] = *( p+ENEMY_EXP); + }else { + CharNew.data[CHAR_EXP] = ENEMY_getExp( array,tarray,level, enemyrank); + } + } + strcpysafe( CharNew.string[CHAR_NAME].string, + sizeof(CharNew.string[CHAR_NAME].string), + (char *)ENEMYTEMP_enemy[tarray].chardata[E_T_NAME].string ); + + newindex = CHAR_initCharOneArray( &CharNew ); + if( newindex < 0 ){ + return -1; + } + for( iloop=0; iloop< (ENEMY_ITEMPROB10 - ENEMY_ITEM1+1)/2; iloop++){ + if( *(p+ENEMY_ITEMPROB1+iloop) != 0) { +#ifdef _FIX_ITEMPROB + if( RAND( 0,999) < *(p+ENEMY_ITEMPROB1+iloop)){ +#else + if( RAND( 0,99) < *(p+ENEMY_ITEMPROB1+iloop)){ +#endif + itemindex = ITEM_makeItemAndRegist( *(p+ENEMY_ITEM1+iloop) ); + CHAR_setItemIndex( newindex, CHAR_STARTITEMARRAY +iloop, itemindex); + ITEM_setWorkInt( itemindex, ITEM_WORKCHARAINDEX, newindex ); + ITEM_setWorkInt( itemindex, ITEM_WORKOBJINDEX,-1); + + } + } + } + + { int style, wepon = -1; + style = (*(p + ENEMY_STYLE)); + switch( style ){ + case 1: wepon = 0;break; // + case 2: wepon = 100;break; // 轺徇 + case 3: wepon = 200;break; // 键 + case 4: wepon = 400;break; // 菰 + case 5: wepon = 500;break; // 皮□丢仿件 + case 6: wepon = 700;break; // 髑仆檗 + case 7: wepon = 600;break; // 髑仆 + default:break; + } + if( wepon >= 0 ){ + itemindex = ITEM_makeItemAndRegist( wepon ) ; + CHAR_setItemIndex( newindex, CHAR_ARM, itemindex ); + ITEM_setWorkInt( itemindex, ITEM_WORKCHARAINDEX, newindex ); + ITEM_setWorkInt( itemindex, ITEM_WORKOBJINDEX,-1); + } + } + + ENEMY_RandomChange( newindex, *( p+ENEMY_ID) ); + CHAR_complianceParameter( newindex ); + + CHAR_setInt( newindex, CHAR_HP, CHAR_getWorkInt( newindex, CHAR_WORKMAXHP)); + CHAR_setWorkInt( newindex, CHAR_WORKTACTICS, *(p+ENEMY_TACTICS)); + CHAR_setWorkChar( newindex, CHAR_WORKBATTLE_TACTICSOPTION, + ENEMY_enemy[array].chardata[ENEMY_TACTICSOPTION].string ); +#ifdef _BATTLENPC_WARP_PLAYER + CHAR_setWorkChar( newindex, CHAR_WORKBATTLE_ACT_CONDITION, + ENEMY_enemy[array].chardata[ENEMY_ACT_CONDITION].string ); +#endif + CHAR_setWorkInt( newindex, CHAR_WORK_PETFLG, *(p+ENEMY_PETFLG)); + CHAR_setWorkInt( newindex, CHAR_WORKMODCAPTUREDEFAULT, *(tp + E_T_GET)); +#ifdef _ENEMY_FALLGROUND + { + int i=0; + for( i=0;i= arraysizeof( RandomEnemyTbl ) ) return 0; + + // 仿件母丞涩烂 + randwork = RAND( 0, RandomEnemyTbl[i].arraysize - 1 ); + // 井日蕙仄中 寞毛潸 + work = RandomEnemyTbl[i].pTbl[randwork]; + *pNew = ENEMY_getEnemyArrayFromId( work ); + return 1; + }else{ + // 窒仪手卅中 + return 0; + } +} + +int *ENEMY_getEnemy( int charaindex, int x, int y) +{ + int i; + int array; + int g_array; + int e_array; + int found = 0; + int work[ENEMY_INDEXTABLEMAXSIZE]; + int wr[ENEMY_INDEXTABLEMAXSIZE]; + int createenemynum; + int enemyentrymax; + int entrymax; + int r_max; + int groupid; + int bigcnt; + int loopcounter; + array = ENCOUNT_getEncountAreaArray( CHAR_getInt( charaindex, CHAR_FLOOR),x,y); + if( array == -1 ) return NULL; + enemyentrymax = ENCOUNT_getCreateEnemyMaxNumFromArray( array); + if( enemyentrymax == -1 ) { + return NULL; + } + for( i = 0 ; i < ENEMY_INDEXTABLEMAXSIZE; i ++ ) { + work[i] = -1; + wr[i] = -1; + ENEMY_indextable[i] = -1; + } + + r_max= 0; + for( i = 0; i < ENCOUNT_GROUPMAXNUM; i ++ ){ + if( ENCOUNT_getGroupIdFromArray( array, i ) != - 1 ) { + int itemid; + groupid = ENCOUNT_getGroupIdFromArray( array, i); + g_array = GROUP_getGroupArray( groupid); + itemid = GROUP_getInt( g_array, GROUP_APPEARBYITEMID); + if( itemid != -1 ) { + int j; + for( j = 0; j < CHAR_MAXITEMHAVE; j ++ ) { + int itemindex = CHAR_getItemIndex( charaindex, j); + if( ITEM_CHECKINDEX( itemindex)) { + if( ITEM_getInt( itemindex, ITEM_ID) == itemid){ + break; + } + } + } + if( j == CHAR_MAXITEMHAVE ) continue; + } + itemid = GROUP_getInt( g_array, GROUP_NOTAPPEARBYITEMID); + if( itemid != -1 ) { + int j; + for( j = 0; j < CHAR_MAXITEMHAVE; j ++ ) { + int itemindex = CHAR_getItemIndex( charaindex, j); + if( ITEM_CHECKINDEX( itemindex)) { + if( ITEM_getInt( itemindex, ITEM_ID) == itemid){ + break; + } + } + } + if( j != CHAR_MAXITEMHAVE ) continue; + } + + work[found] = i; + wr[found] = ENCOUNT_getGroupProbFromArray( array, i); + r_max += wr[found]; + found ++; + } + } + r_max --; + + if( found <= 0 ) return NULL; + { + int aaa = 0; + int r; + r = RAND( 0, r_max); + for( i = 0; i < found-1; i ++ ) { + aaa += wr[i]; + if( wr[i] != 0 && r < aaa ) break; + } + r = i; + + groupid = ENCOUNT_getGroupIdFromArray( array, work[r]); + g_array = GROUP_getGroupArray( groupid); + } + for( i = 0 ; i < ENEMY_INDEXTABLEMAXSIZE; i ++ ) { + work[i] = -1; + wr[i] = -1; + } + createenemynum = 0; + found = 0; + r_max = 0; + for( i = ENEMY_ID1; i < CREATEPROB1; i ++ ) { + int newarray, enemywork; + e_array = ENEMY_getEnemyArrayFromIndex( g_array, i - ENEMY_ID1 ); + +#ifdef _ADD_ENCOUNT // WON ADD 增加敌遭遇触发修件 + { + int char_event_now = -1, char_event_end = -1; + if(ENCOUNT_table[array].event_now != -1){ + char_event_now = ENCOUNT_table[array].event_now; + } + else if(ENCOUNT_table[array].event_end != -1){ + char_event_end = ENCOUNT_table[array].event_end; + } + if( (char_event_now > 0) || ( char_event_end > 0 ) ) { + if( (NPC_NowEventCheckFlg( charaindex, char_event_now) == TRUE ) || + (NPC_EventCheckFlg( charaindex, char_event_end) == TRUE ) ){ + + e_array = ENEMY_getEnemyArrayFromIndex( + GROUP_getGroupArray( ENCOUNT_table[array].enemy_group ),i - ENEMY_ID1 ); + } + } + } +#endif + enemywork = ENEMY_getInt( e_array, ENEMY_ID ); + if( ENEMY_RandomEnemyArray( enemywork, &newarray ) ){ + e_array = newarray; + } + + if( e_array != -1 ) { + work[found] = e_array; + wr[found] = GROUP_getInt( g_array, i + (CREATEPROB1 - ENEMY_ID1)); + r_max += wr[found]; + found ++; + createenemynum += ENEMY_getInt( e_array, ENEMY_CREATEMAXNUM); + } + } + r_max --; + + if( found <= 0 ) return NULL; + enemyentrymax= min( enemyentrymax, createenemynum ); + entrymax = RAND( 1, enemyentrymax); + bigcnt = 0; + for( i = 0,loopcounter = 0; i < entrymax && loopcounter < 100; loopcounter ++) { + int cnt; + int j,r; + int aaa = 0; + int et_array; + int k,samecount; + r = RAND( 0, r_max); + for( j = 0; j < found-1; j ++ ) { + aaa += wr[j]; + if( wr[j] != 0 && r < aaa ) break; + } + r = j; + cnt = 0; + for( j = 0; j < ENEMY_INDEXTABLEMAXSIZE && ENEMY_indextable[j] != -1; j ++ ) { + if( ENEMY_indextable[j] == work[r] ) cnt ++; + } + samecount = 0; + for( k = 0; k < found; k ++ ) { + if( work[r] == work[k] ) samecount ++; + } + if( cnt >= ENEMY_getInt( work[r], ENEMY_CREATEMAXNUM) * samecount ) { + continue; + } + + et_array = ENEMYTEMP_getEnemyTempArray( work[r]); + if( ENEMYTEMP_CHECKINDEX( et_array)) { + if( ENEMYTEMP_getInt( et_array, E_T_SIZE) == E_T_SIZE_BIG ) { + if( bigcnt >= 5 ) { + entrymax --; + continue; + } + if( i > 4 ) { + int target_et_array; + int flg = FALSE; + for( j = 0; j < 5; j ++ ) { + if( !ENEMY_CHECKINDEX( ENEMY_indextable[j])) break; + + target_et_array = ENEMYTEMP_getEnemyTempArray( + ENEMY_indextable[j]); + if( !ENEMYTEMP_CHECKINDEX( target_et_array)) break; + if( ENEMYTEMP_getInt( target_et_array, E_T_SIZE) == E_T_SIZE_NORMAL ){ + flg = TRUE; + break; + } + } + if( !flg) continue; + ENEMY_indextable[i] = ENEMY_indextable[j]; + ENEMY_indextable[j] = work[r]; + } + else { + ENEMY_indextable[i] = work[r]; + } + bigcnt ++; + }else { + ENEMY_indextable[i] = work[r]; + } + + i++; + } + } + return found > 0 ? ENEMY_indextable : NULL; +} +int ENEMY_createPetFromEnemyIndex( int charaindex, int array) +{ + Char CharNew; + int newindex; + int *p; + int tp[E_T_DATAINTNUM]; + int tarray, i; + int havepetelement; + int level; + int enemyrank; + if( !ENEMY_CHECKINDEX( array)) return -1; + havepetelement = CHAR_getCharPetElement( charaindex); + if( havepetelement < 0 ) return -1; + + p = ENEMY_enemy[array].intdata; + tarray = ENEMYTEMP_getEnemyTempArray( array); + if( !ENEMYTEMP_CHECKINDEX( tarray)) return -1; +// tp = ENEMYTEMP_enemy[tarray].intdata; + for( i = 0; i < E_T_DATAINTNUM; i ++ ){ + tp[i] = ENEMYTEMP_enemy[tarray].intdata[i]; + } + memset( &CharNew, 0, sizeof( Char ) ); + if( !CHAR_getDefaultChar( &CharNew,31010 ) )return -1; + CharNew.data[CHAR_BASEBASEIMAGENUMBER] + = CharNew.data[CHAR_BASEIMAGENUMBER] = *(tp+E_T_IMGNUMBER); + CharNew.data[CHAR_WHICHTYPE] = CHAR_TYPEPET; + level = RAND( (*(p + ENEMY_LV_MIN)), ( *(p+ ENEMY_LV_MAX))); + +#define E_PAR( a) (*(p + (a))) +#define ET_PAR( a) (*(tp + (a))) +#if 1 +#define PARAM_CAL( l) (( level -1)*ET_PAR( E_T_LVUPPOINT)+ ET_PAR(E_T_INITNUM)) * ET_PAR( (l)) +#else +#define PARAM_CAL( l) ( (E_PAR(ENEMY_LV) -1)*ET_PAR( E_T_LVUPPOINT)+ ET_PAR(E_T_INITNUM)) * ET_PAR( (l)) +#endif + tp[E_T_BASEVITAL] += RAND( 0, 4 ) - 2; + tp[E_T_BASESTR] += RAND( 0, 4 ) - 2; + tp[E_T_BASETGH] += RAND( 0, 4 ) - 2; + tp[E_T_BASEDEX] += RAND( 0, 4 ) - 2; + CharNew.data[CHAR_ALLOCPOINT] + = ( tp[E_T_BASEVITAL] << 24 ) + + ( tp[E_T_BASESTR] << 16 ) + + ( tp[E_T_BASETGH] << 8 ) + + ( tp[E_T_BASEDEX] << 0 ); + + for( i = 0; i < 10; i ++ ){ + int work = RAND( 0, 3 ); + if( work == 0 )tp[E_T_BASEVITAL]++; + if( work == 1 )tp[E_T_BASESTR]++; + if( work == 2 )tp[E_T_BASETGH]++; + if( work == 3 )tp[E_T_BASEDEX]++; + } + /* 由仿丢□正本永玄 */ + CharNew.data[CHAR_VITAL] = PARAM_CAL(E_T_BASEVITAL); + CharNew.data[CHAR_STR] = PARAM_CAL(E_T_BASESTR); + CharNew.data[CHAR_TOUGH] = PARAM_CAL(E_T_BASETGH); + CharNew.data[CHAR_DEX] = PARAM_CAL(E_T_BASEDEX); + + CharNew.data[CHAR_FIREAT] = *(tp+ E_T_FIREAT); + CharNew.data[CHAR_WATERAT] = *(tp+ E_T_WATERAT); + CharNew.data[CHAR_EARTHAT] = *(tp+ E_T_EARTHAT); + CharNew.data[CHAR_WINDAT] = *(tp+ E_T_WINDAT); + + CharNew.data[CHAR_SLOT] = *(tp+ E_T_SLOT); + CharNew.data[CHAR_MODAI] = *(tp+ E_T_MODAI); + CharNew.data[CHAR_VARIABLEAI] = 0; + CharNew.data[CHAR_LV] = level; + //CharNew.data[CHAR_LV] = *(p+ ENEMY_LV); + CharNew.data[CHAR_POISON] = *(tp+ E_T_POISON); + CharNew.data[CHAR_PARALYSIS]= *(tp+ E_T_PARALYSIS); + CharNew.data[CHAR_SLEEP] = *(tp+ E_T_SLEEP); + CharNew.data[CHAR_STONE] = *(tp+ E_T_STONE); + CharNew.data[CHAR_DRUNK] = *(tp+ E_T_DRUNK); + CharNew.data[CHAR_CONFUSION]= *(tp+ E_T_CONFUSION); + CharNew.data[CHAR_RARE] = *(tp+ E_T_RARE); + CharNew.data[CHAR_PETID] = *(tp + E_T_TEMPNO); + CharNew.data[CHAR_CRITIAL] = *(tp + E_T_CRITICAL); + CharNew.data[CHAR_COUNTER] = *(tp + E_T_COUNTER); + // Arminius 8.6 limit lv + CharNew.data[CHAR_LIMITLEVEL] = *(tp + E_T_LIMITLEVEL); +#ifdef _PET_FUSION + CharNew.data[CHAR_FUSIONCODE] = *(tp + E_T_FUSIONCODE); +#endif + CharNew.data[CHAR_PETMAILEFFECT] = RAND(0, PETMAIL_EFFECTMAX); + for( i = 0; i < CHAR_MAXPETSKILLHAVE; i ++ ) { + CharNew.unionTable.indexOfPetskill[i] = *(tp + E_T_PETSKILL1 + i); + } + enemyrank = ENEMY_getRank( array, tarray ); + CharNew.data[CHAR_PETRANK] = enemyrank; +#undef E_PAR +#undef ET_PAR +#undef PARAM_CAL + strcpysafe( CharNew.string[CHAR_NAME].string, + sizeof(CharNew.string[CHAR_NAME].string), + (char *)ENEMYTEMP_enemy[tarray].chardata[E_T_NAME].string ); + newindex = PET_initCharOneArray( &CharNew ); + if( newindex < 0 ){ + return -1; + } + CHAR_complianceParameter( newindex ); + CHAR_setInt( newindex, CHAR_HP, CHAR_getWorkInt( newindex, CHAR_WORKMAXHP)); + CHAR_setWorkInt( newindex, CHAR_WORKPLAYERINDEX, charaindex); + CHAR_setCharPet( charaindex, havepetelement, newindex); + CHAR_setChar( newindex, CHAR_OWNERCDKEY, + CHAR_getChar( charaindex, CHAR_CDKEY)); + CHAR_setChar( newindex, CHAR_OWNERCHARANAME, + CHAR_getChar( charaindex, CHAR_NAME)); + return newindex; +} + +#ifdef _TEST_PETCREATE +int ENEMY_TEST_createPetIndex( int array) +{ + Char CharNew; + int newindex; + int *p; + int tp[E_T_DATAINTNUM]; + int tarray, i; + //int havepetelement; + int level; + int enemyrank; + if( !ENEMY_CHECKINDEX( array)) return -1; + + //havepetelement = CHAR_getCharPetElement( charaindex); + //if( havepetelement < 0 ) return -1; + p = ENEMY_enemy[array].intdata; + tarray = ENEMYTEMP_getEnemyTempArray( array); + if( !ENEMYTEMP_CHECKINDEX( tarray)) return -1; + for( i = 0; i < E_T_DATAINTNUM; i ++ ){ + tp[i] = ENEMYTEMP_enemy[tarray].intdata[i]; + } + memset( &CharNew, 0, sizeof( Char ) ); + if( !CHAR_getDefaultChar( &CharNew,31010 ) )return -1; + CharNew.data[CHAR_BASEBASEIMAGENUMBER] + = CharNew.data[CHAR_BASEIMAGENUMBER] = *(tp+E_T_IMGNUMBER); + CharNew.data[CHAR_WHICHTYPE] = CHAR_TYPEPET; + level = RAND( (*(p + ENEMY_LV_MIN)), ( *(p+ ENEMY_LV_MAX))); + +#define E_PAR( a) (*(p + (a))) +#define ET_PAR( a) (*(tp + (a))) + +#if 1 +#define PARAM_CAL( l) (( level -1)*ET_PAR( E_T_LVUPPOINT)+ ET_PAR(E_T_INITNUM)) * ET_PAR( (l)) +#else +#define PARAM_CAL( l) ( (E_PAR(ENEMY_LV) -1)*ET_PAR( E_T_LVUPPOINT)+ ET_PAR(E_T_INITNUM)) * ET_PAR( (l)) +#endif + tp[E_T_BASEVITAL] += RAND( 0, 4 ) - 2; + tp[E_T_BASESTR] += RAND( 0, 4 ) - 2; + tp[E_T_BASETGH] += RAND( 0, 4 ) - 2; + tp[E_T_BASEDEX] += RAND( 0, 4 ) - 2; + CharNew.data[CHAR_ALLOCPOINT] + = ( tp[E_T_BASEVITAL] << 24 ) + + ( tp[E_T_BASESTR] << 16 ) + + ( tp[E_T_BASETGH] << 8 ) + + ( tp[E_T_BASEDEX] << 0 ); + for( i = 0; i < 10; i ++ ){ + int work = RAND( 0, 3 ); + if( work == 0 )tp[E_T_BASEVITAL]++; + if( work == 1 )tp[E_T_BASESTR]++; + if( work == 2 )tp[E_T_BASETGH]++; + if( work == 3 )tp[E_T_BASEDEX]++; + } + CharNew.data[CHAR_VITAL] = PARAM_CAL(E_T_BASEVITAL); + CharNew.data[CHAR_STR] = PARAM_CAL(E_T_BASESTR); + CharNew.data[CHAR_TOUGH] = PARAM_CAL(E_T_BASETGH); + CharNew.data[CHAR_DEX] = PARAM_CAL(E_T_BASEDEX); + CharNew.data[CHAR_FIREAT] = *(tp+ E_T_FIREAT); + CharNew.data[CHAR_WATERAT] = *(tp+ E_T_WATERAT); + CharNew.data[CHAR_EARTHAT] = *(tp+ E_T_EARTHAT); + CharNew.data[CHAR_WINDAT] = *(tp+ E_T_WINDAT); + + CharNew.data[CHAR_SLOT] = *(tp+ E_T_SLOT); + CharNew.data[CHAR_MODAI] = *(tp+ E_T_MODAI); + CharNew.data[CHAR_VARIABLEAI] = 0; + CharNew.data[CHAR_LV] = level; + CharNew.data[CHAR_POISON] = *(tp+ E_T_POISON); + CharNew.data[CHAR_PARALYSIS]= *(tp+ E_T_PARALYSIS); + CharNew.data[CHAR_SLEEP] = *(tp+ E_T_SLEEP); + CharNew.data[CHAR_STONE] = *(tp+ E_T_STONE); + CharNew.data[CHAR_DRUNK] = *(tp+ E_T_DRUNK); + CharNew.data[CHAR_CONFUSION]= *(tp+ E_T_CONFUSION); + CharNew.data[CHAR_RARE] = *(tp+ E_T_RARE); + CharNew.data[CHAR_PETID] = *(tp + E_T_TEMPNO); + CharNew.data[CHAR_CRITIAL] = *(tp + E_T_CRITICAL); + CharNew.data[CHAR_COUNTER] = *(tp + E_T_COUNTER); + // Arminius 8.6 limit lv + CharNew.data[CHAR_LIMITLEVEL] = *(tp + E_T_LIMITLEVEL); +#ifdef _PET_FUSION + CharNew.data[CHAR_FUSIONCODE] = *(tp + E_T_FUSIONCODE); +#endif + CharNew.data[CHAR_PETMAILEFFECT] = RAND(0, PETMAIL_EFFECTMAX); + for( i = 0; i < CHAR_MAXPETSKILLHAVE; i ++ ) { + CharNew.unionTable.indexOfPetskill[i] = *(tp + E_T_PETSKILL1 + i); + } + enemyrank = ENEMY_getRank( array, tarray ); + CharNew.data[CHAR_PETRANK] = enemyrank; +#undef E_PAR +#undef ET_PAR +#undef PARAM_CAL + strcpysafe( CharNew.string[CHAR_NAME].string, + sizeof(CharNew.string[CHAR_NAME].string), + (char *)ENEMYTEMP_enemy[tarray].chardata[E_T_NAME].string ); + newindex = PET_initCharOneArray( &CharNew ); + if( newindex < 0 ){ + return -1; + } + CHAR_complianceParameter( newindex ); + CHAR_setInt( newindex, CHAR_HP, CHAR_getWorkInt( newindex, CHAR_WORKMAXHP)); +// CHAR_setWorkInt( newindex, CHAR_WORKPLAYERINDEX, charaindex); +// CHAR_setCharPet( charaindex, havepetelement, newindex); +// CHAR_setChar( newindex, CHAR_OWNERCDKEY, +// CHAR_getChar( charaindex, CHAR_CDKEY)); +// CHAR_setChar( newindex, CHAR_OWNERCHARANAME, +// CHAR_getChar( charaindex, CHAR_NAME)); + return newindex; +} +#endif + +#ifdef _PET_EVOLUTION + +BOOL PETFUSION_getIndexForChar( int toindex, int *MainIndex, int *Subindex1, int *Subindex2, char *data) +{ + char buf1[256]; + int pindex[3]={-1,-1,-1}; + int i; + if( getStringFromIndexWithDelim( data, "|", 1, buf1, sizeof(buf1)) == FALSE ) + return FALSE; + pindex[0] = atoi( buf1)-1; + if( getStringFromIndexWithDelim( data, "|", 2, buf1, sizeof(buf1)) == FALSE ) + return FALSE; + pindex[1] = atoi( buf1)-1; + if( getStringFromIndexWithDelim( data, "|", 3, buf1, sizeof(buf1)) == FALSE ) + return FALSE; + pindex[2] = atoi( buf1)-1; + for( i=0; i<3; i++) { + int petindex; + if( pindex[i] < 0 ) continue; + petindex = CHAR_getCharPet( toindex, pindex[i]); + if( !CHAR_CHECKINDEX( petindex) ) continue; +#ifdef _PET_2TRANS + if( CHAR_getInt( petindex, CHAR_TRANSMIGRATION ) > 1 ) { + CHAR_talkToCli( toindex, -1, "二转宠物不能融合。", CHAR_COLORYELLOW); + return FALSE; + } +#endif + if( i == 0 ) { + *MainIndex = petindex; + }else if( i == 1) { + *Subindex1 = petindex; + }else if( i == 2) { + *Subindex2 = petindex; + } + } + return TRUE; +} +int NPC_getPetArrayForNo( int PetCode) +{ + int i; + int enemynum = ENEMY_getEnemyNum(); + for( i = 0; i < enemynum; i ++ ) {//PetCode + if( ENEMY_getInt( i, ENEMY_TEMPNO ) == PetCode ) + break; + } + + if( i == enemynum ){ + print("ANDY 2.err i == enemynum \n"); + return -1; + } + return i; +} +int NPC_getFusionTableForBase( int charaindex, int petindex1, int petindex2 ) +{ + int base1, base2;// 属性,PETCODE + if( !CHAR_CHECKINDEX( petindex1) ) return -1; + if( !CHAR_CHECKINDEX( petindex2) ) return -1; +#ifdef _PET_EVOLUTION + if( (base2 = EVOLUTION_getPetTable( charaindex, petindex1, petindex2)) < 0 ){ + print("ANDY err base2=%d\n", base2); + return -1; + } + if( (base1 = EVOLUTION_getPropertyTable( charaindex, petindex1, petindex2)) < 0 ){ + print("ANDY err base1=%d\n", base1); + return -1; + } + return EVOLUTION_getFusionTable( charaindex, base2, base1); // get new pet IDNO +#else + return -1; +#endif +} + +BOOL PET_getEvolutionAns( int petindex, int *base) +{ + int i, total1, total2, total; + int defwork = 50, defbase = 150; + int work[4]={0,0,0,0}; + + work[0] = CHAR_getInt( petindex, CHAR_EVOLUTIONBASEVTL); + work[1] = CHAR_getInt( petindex, CHAR_EVOLUTIONBASESTR); + work[2] = CHAR_getInt( petindex, CHAR_EVOLUTIONBASETGH); + work[3] = CHAR_getInt( petindex, CHAR_EVOLUTIONBASEDEX); + for( i=0; i<4; i++) { + work[i] = (work[i]*0.7)/100; + if( work[i]<0 ) work[i] = 0; + if( work[i]>60 ) work[i] = 60; + } + total1 = work[0] + work[1] + work[2] + work[3]; + for( i=0; i<4; i++) { + if( base[i] < 0 ) base[i] = 5; + if( base[i] > 60 ) base[i] = 60; + } + total2 = base[0] + base[1] + base[2] + base[3]; + if( total1 > defwork ) { + for( i=0; i<4; i++) { + work[i] = ((work[i]*defwork)/total1); + if( work[i]<0 ) work[i] = 0; + if( work[i]>60 ) work[i] = 60; + } + } + + total1 = work[0] + work[1] + work[2] + work[3]; + total = (total1/2) + total2; + + if( total > 0 ){ + for( i=0; i<4; i++) { + float fixwork=0.0; + fixwork = (base[i])+(float)(work[i]/2); + base[i] += (int)((fixwork/total) * total1); + if( base[i] < 1 ) base[i] = 1; + if( base[i] > 60 ) base[i] = 60; + } + } + total2 = base[0] + base[1] + base[2] + base[3]; + if( total2 > defbase ){ + for( i=0; i<4; i++) { + base[i] = (base[i]*defbase)/total2; + if( base[i] < 1 ) base[i] = 1; + if( base[i] > 60 ) base[i] = 60; + } + } + total2 = base[0] + base[1] + base[2] + base[3]; + if( base[0]<0 || base[1]<0 || base[2]<0 || base[3]<0 ){ + print("ANDY err EVOLUTION base someone < 0 !!\n"); + } + return TRUE; +} + +int EVOLUTION_createPetFromEnemyIndex( int charaindex, int baseindex, int flg) +{ + Char CharNew; + int newindex; + int *p; + int tp[E_T_DATAINTNUM]; + int tarray, i, havepetelement, enemynum, petID; + int level, enemyrank, array; + int petskill[7]={-1,-1,-1,-1,-1,-1,-1}; + int base[4]={0,0,0,0}; + int illegalpetskill[15] = {41,52,600,601,602,603,604,614,617,628,630,631,635,638,641};//不可遗传的宠技 +#define E_PAR( a) (*(p + (a))) +#define ET_PAR( a) (*(tp + (a))) +#define PARAM_CAL( l) (( level -1)*ET_PAR( E_T_LVUPPOINT)+ ET_PAR(E_T_INITNUM)) * ET_PAR( (l)) + havepetelement=-1; + petID = CHAR_getInt( baseindex, CHAR_FUSIONINDEX); + enemynum = ENEMY_getEnemyNum(); + for( i = 0; i < enemynum; i ++ ) { + if( ENEMY_getInt( i, ENEMY_TEMPNO ) == petID ){ + break; + } + } + if( i >= enemynum ) return -1; + array = i; + if( !ENEMY_CHECKINDEX( array)) return -1; +//-------------------------------------------------------------------------- + p = ENEMY_enemy[array].intdata; + tarray = ENEMYTEMP_getEnemyTempArray( array); + if( !ENEMYTEMP_CHECKINDEX( tarray)){ + print( "ANDY !tarray\n"); + return -1; + } + for( i = 0; i < E_T_DATAINTNUM; i ++ ){ + tp[i] = ENEMYTEMP_enemy[tarray].intdata[i]; + } + memset( &CharNew, 0, sizeof( Char ) ); + if( !CHAR_getDefaultChar( &CharNew,31010 ) ){ + print( "ANDY !CHAR_getDefaultChar( &CharNew,31010 )\n"); + return -1; + } + CharNew.data[CHAR_BASEBASEIMAGENUMBER] + = CharNew.data[CHAR_BASEIMAGENUMBER] = *(tp+E_T_IMGNUMBER); + CharNew.data[CHAR_WHICHTYPE] = CHAR_TYPEPET; + level = RAND( (*(p + ENEMY_LV_MIN)), ( *(p+ ENEMY_LV_MAX))); +//------------------------------------------------------ + { + if( PET_getBaseAndSkill( charaindex, baseindex, base, petskill, 1) == FALSE ){ + print( "ANDY err PET_getBaseAndSkill(%d) == FALSE \n", baseindex); + return -1; + } + if( PET_getEvolutionAns( baseindex, base) == FALSE ) return -1; + for( i=0; i < CHAR_MAXPETSKILLHAVE; i ++ ) {//宠技 + int j; + for( j=0; j<15; j++) { //检查非法技能 + if( illegalpetskill[j] == petskill[i] ){ + petskill[i] = -1; + break; + } + } + CharNew.unionTable.indexOfPetskill[i] = petskill[i]; + } + if( flg == 1 ){ + if( CHAR_DelPetForIndex( charaindex, baseindex) == FALSE ) return FALSE; + } + } + if( flg == 1 ){ + havepetelement = CHAR_getCharPetElement( charaindex);//找出宠物空位 + if( havepetelement < 0 ) return -1; + } +//------------------------------------------------------ + tp[E_T_BASEVITAL] = base[0]; + tp[E_T_BASESTR] = base[1]; + tp[E_T_BASETGH] = base[2]; + tp[E_T_BASEDEX] = base[3]; + CharNew.data[CHAR_ALLOCPOINT] = (base[0]<<24)+(base[1]<<16)+(base[2]<<8)+(base[3]<<0); + + for( i = 0; i < 10; i ++ ){ + int work = RAND( 0, 3 ); + if( work == 0 )tp[E_T_BASEVITAL]++; + if( work == 1 )tp[E_T_BASESTR]++; + if( work == 2 )tp[E_T_BASETGH]++; + if( work == 3 )tp[E_T_BASEDEX]++; + } +//------------------------------------------------------ + CharNew.data[CHAR_VITAL] = PARAM_CAL(E_T_BASEVITAL); + CharNew.data[CHAR_STR] = PARAM_CAL(E_T_BASESTR); + CharNew.data[CHAR_TOUGH] = PARAM_CAL(E_T_BASETGH); + CharNew.data[CHAR_DEX] = PARAM_CAL(E_T_BASEDEX); + CharNew.data[CHAR_FIREAT] = *(tp+ E_T_FIREAT); + CharNew.data[CHAR_WATERAT] = *(tp+ E_T_WATERAT); + CharNew.data[CHAR_EARTHAT] = *(tp+ E_T_EARTHAT); + CharNew.data[CHAR_WINDAT] = *(tp+ E_T_WINDAT); + CharNew.data[CHAR_SLOT] = *(tp+ E_T_SLOT); + CharNew.data[CHAR_MODAI] = *(tp+ E_T_MODAI); + CharNew.data[CHAR_VARIABLEAI] = 0; + CharNew.data[CHAR_LV] = level; + CharNew.data[CHAR_POISON] = *(tp+ E_T_POISON); + CharNew.data[CHAR_PARALYSIS]= *(tp+ E_T_PARALYSIS); + CharNew.data[CHAR_SLEEP] = *(tp+ E_T_SLEEP); + CharNew.data[CHAR_STONE] = *(tp+ E_T_STONE); + CharNew.data[CHAR_DRUNK] = *(tp+ E_T_DRUNK); + CharNew.data[CHAR_CONFUSION]= *(tp+ E_T_CONFUSION); + CharNew.data[CHAR_RARE] = *(tp+ E_T_RARE); + CharNew.data[CHAR_PETID] = *(tp + E_T_TEMPNO); + CharNew.data[CHAR_CRITIAL] = *(tp + E_T_CRITICAL); + CharNew.data[CHAR_COUNTER] = *(tp + E_T_COUNTER); + CharNew.data[CHAR_LIMITLEVEL] = *(tp + E_T_LIMITLEVEL); + CharNew.data[CHAR_FUSIONCODE] = *(tp + E_T_FUSIONCODE); + CharNew.data[CHAR_PETMAILEFFECT] = RAND(0, PETMAIL_EFFECTMAX); +//------------------------------------------------------ + + enemyrank = ENEMY_getRank( array, tarray ); + CharNew.data[CHAR_PETRANK] = enemyrank; +#undef E_PAR +#undef ET_PAR +#undef PARAM_CAL + strcpysafe( CharNew.string[CHAR_NAME].string, + sizeof(CharNew.string[CHAR_NAME].string), + (char *)ENEMYTEMP_enemy[tarray].chardata[E_T_NAME].string ); + newindex = PET_initCharOneArray( &CharNew ); + if( newindex < 0 ){ + print( "ANDY err newindex=%d\n", newindex); + return -1; + } +//------------------------------------------------------ + CHAR_complianceParameter( newindex ); + CHAR_setInt( newindex, CHAR_HP, CHAR_getWorkInt( newindex, CHAR_WORKMAXHP)); + CHAR_setInt ( newindex, CHAR_WHICHTYPE , CHAR_TYPEPET); +#ifdef _PET_2TRANS + CHAR_setInt ( newindex, CHAR_TRANSMIGRATION, 2); +#else + CHAR_setInt ( newindex, CHAR_TRANSMIGRATION, 1); +#endif + CHAR_setInt ( newindex, CHAR_FUSIONBEIT, 1); + CHAR_setInt ( newindex, CHAR_FUSIONRAISE, 0); + if( flg == 1 ){ + CHAR_setWorkInt( newindex, CHAR_WORKPLAYERINDEX, charaindex); + CHAR_setCharPet( charaindex, havepetelement, newindex); + CHAR_setChar( newindex, CHAR_OWNERCDKEY, CHAR_getChar( charaindex, CHAR_CDKEY)); + CHAR_setChar( newindex, CHAR_OWNERCHARANAME, CHAR_getChar( charaindex, CHAR_NAME)); + { + char msgbuf[256]; + snprintf( msgbuf, sizeof( msgbuf ), "K%d", havepetelement ); + CHAR_sendStatusString( charaindex, msgbuf ); + snprintf( msgbuf, sizeof( msgbuf ), "W%d", havepetelement ); + CHAR_sendStatusString( charaindex, msgbuf ); + } + } + return newindex; +} + +int PET_CheckIncubate( int charaindex) +{ +#ifndef _USER_CHARLOOPS + int i; + static time_t checkeage; + int anhour = PETFEEDTIME; + checkeage = (int)time( NULL); + if( !CHAR_CHECKINDEX( charaindex) )return 0; + + for(i=0 ; i < CHAR_MAXPETHAVE ; i++) { + int time_l=0; + int petindex = CHAR_getCharPet( charaindex, i); + if( !CHAR_CHECKINDEX( petindex) ) continue; + if( CHAR_getInt( petindex, CHAR_FUSIONBEIT) != 1 || + CHAR_getInt( petindex, CHAR_FUSIONRAISE) <= 0 )return;//检查是否为融合宠 + + time_l = CHAR_getInt( petindex, CHAR_FUSIONTIMELIMIT); + if( time_l < 0 || time_l > checkeage ){ + CHAR_setInt( petindex, CHAR_FUSIONTIMELIMIT, checkeage); + continue; + } + + if( (int)checkeage > (time_l+(anhour*2)) ){ + char buf[256]; + int levelup, vital, str, tgh, dex; + int raise = CHAR_getInt( petindex, CHAR_FUSIONRAISE); + // 养次数 + raise++; + CHAR_setInt( petindex, CHAR_FUSIONTIMELIMIT, (int)time(NULL)+anhour-1); + if( raise < 0 ) raise = 0; + if( raise >= 40 ) raise = 30; + CHAR_setInt( petindex, CHAR_FUSIONRAISE, raise); + levelup = CHAR_getInt( petindex, CHAR_ALLOCPOINT); + vital = ((levelup>>24) & 0xFF) - 5; + str = ((levelup>>16) & 0xFF) - 5; + tgh = ((levelup>> 8) & 0xFF) - 5; + dex = ((levelup>> 0) & 0xFF) - 5; + if( vital < 0 ) vital = 0; + if( str < 0 ) str = 0; + if( tgh < 0 ) tgh = 0; + if( dex < 0 ) dex = 0; + //扣属性 + levelup = (vital<<24) + (str<<16) + (tgh<<8) + (dex<<0); + CHAR_setInt( petindex, CHAR_ALLOCPOINT, levelup); + sprintf( buf, "蛋〈%s〉的品质变差了。", CHAR_getUseName( petindex )); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + + LogPetFeed( + CHAR_getChar( charaindex, CHAR_NAME), + CHAR_getChar( charaindex, CHAR_CDKEY), + CHAR_getChar( petindex, CHAR_NAME), + petindex, + CHAR_getInt( petindex, CHAR_LV), + "品质变差", // Key + CHAR_getInt( charaindex, CHAR_FLOOR), + CHAR_getInt( charaindex, CHAR_X), + CHAR_getInt( charaindex, CHAR_Y), + CHAR_getChar( petindex, CHAR_UNIQUECODE) ); + + }else if( (int)checkeage > (time_l+anhour) ){ + + char buf[256]; + sprintf( buf, "蛋〈%s〉呈现可 食状态。", CHAR_getUseName( petindex )); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + } + } + return 1; +#else + int masterindex, time_l=0; + static time_t checkeage; + int anhour = PETFEEDTIME, i; + + if( !CHAR_CHECKINDEX( charaindex) )return 0; + masterindex = CHAR_getWorkInt( charaindex, CHAR_WORKPLAYERINDEX); + if( !CHAR_CHECKINDEX( masterindex) )return 0; + + if( CHAR_getInt( charaindex, CHAR_FUSIONBEIT) != 1 || + CHAR_getInt( charaindex, CHAR_FUSIONRAISE) <= 0 ) return 0;//检查是否为融合宠 + + for(i=0 ; i < CHAR_MAXPETHAVE ; i++) { + if( charaindex != CHAR_getCharPet( masterindex, i) ) continue; + break; + } + if( i >= CHAR_MAXPETHAVE ) return 0; + +#ifdef _PET_FUSIONSHOWTIME + { + + char caname[256], msgbuf[64]; + int deftime; + int oldtime = CHAR_getInt( charaindex, CHAR_FUSIONTIMELIMIT); + + for(i=0 ; i < CHAR_MAXPETHAVE ; i++) { + if( charaindex != CHAR_getCharPet( masterindex, i) ) continue; + deftime = anhour - ( checkeage - oldtime); + if( deftime >= 0 ){ + sprintf( caname, "宠物蛋(%d)", (int)(deftime/60)); + }else{ + deftime = ( checkeage - oldtime) - anhour; + sprintf( caname, "宠物蛋(饿%d)", (int)(deftime/60)); + } + CHAR_setChar( charaindex, CHAR_USERPETNAME, caname); + snprintf( msgbuf, sizeof( msgbuf ), "K%d", i ); + CHAR_sendStatusString( masterindex, msgbuf ); + snprintf( msgbuf, sizeof( msgbuf ), "W%d", i ); + CHAR_sendStatusString( masterindex, msgbuf ); + break; + } + } +#endif + checkeage = (int)time( NULL); + + time_l = CHAR_getInt( charaindex, CHAR_FUSIONTIMELIMIT); + if( time_l < 0 || time_l > checkeage ){ + CHAR_setInt( charaindex, CHAR_FUSIONTIMELIMIT, checkeage); + return 0; + } + if( (int)checkeage > (time_l+(anhour*2.5)) ){ + char buf[256]; + int levelup, vital, str, tgh, dex; + int raise = CHAR_getInt( charaindex, CHAR_FUSIONRAISE); + raise++; + CHAR_setInt( charaindex, CHAR_FUSIONTIMELIMIT, (int)time(NULL)+anhour-1); + if( raise < 0 ) raise = 0; + if( raise >= 40 ) raise = 30; + CHAR_setInt( charaindex, CHAR_FUSIONRAISE, raise); + levelup = CHAR_getInt( charaindex, CHAR_ALLOCPOINT); + vital = ((levelup>>24) & 0xFF) - 6; + str = ((levelup>>16) & 0xFF) - 6; + tgh = ((levelup>> 8) & 0xFF) - 6; + dex = ((levelup>> 0) & 0xFF) - 6; + if( vital < 0 ) vital = 0; + if( str < 0 ) str = 0; + if( tgh < 0 ) tgh = 0; + if( dex < 0 ) dex = 0; + //扣属性 + levelup = (vital<<24) + (str<<16) + (tgh<<8) + (dex<<0); + CHAR_setInt( charaindex, CHAR_ALLOCPOINT, levelup); + sprintf( buf, "蛋〈%s〉的品质变差了。", CHAR_getUseName( charaindex )); + CHAR_talkToCli( masterindex, -1, buf, CHAR_COLORYELLOW); + + LogPetFeed( + CHAR_getChar( masterindex, CHAR_NAME), + CHAR_getChar( masterindex, CHAR_CDKEY), + CHAR_getChar( charaindex, CHAR_NAME), + charaindex, + CHAR_getInt( charaindex, CHAR_LV), + "品质变差", // Key + CHAR_getInt( masterindex, CHAR_FLOOR), + CHAR_getInt( masterindex, CHAR_X), + CHAR_getInt( masterindex, CHAR_Y), + CHAR_getChar( charaindex, CHAR_UNIQUECODE) ); + + }else if( (int)checkeage > (time_l+anhour) ){ + char buf[256]; + sprintf( buf, "蛋〈%s〉呈现可 食状态。", CHAR_getUseName( charaindex )); + CHAR_talkToCli( masterindex, -1, buf, CHAR_COLORYELLOW); + } + return 1; +#endif +} +#endif + +#ifdef _NPC_FUSION +int PETFUSION_SetNewEgg( int toindex , int petindex, int array, int *work, int *skill1, int *skill2) +{ + int *p; + int tp[E_T_DATAINTNUM]; + int tarray, i; + int level, workrank, petrank=0; + int LevelUpPoint; + struct { + int num; + float rank; + }ranktbl[] = { + { 130, 2.5}, + { 100, 2.0}, + { 95, 1.5}, + { 85, 1.0}, + { 80, 0.5}, + { 0, 0.0}, + }; + if( !ENEMY_CHECKINDEX( array)) + return -1; + p = ENEMY_getIntdata( array); + if( p == NULL ) { + print("\n p = NULL" ); + return -1; + } + tarray = ENEMYTEMP_getEnemyTempArray( array); + if( !ENEMYTEMP_CHECKINDEX( tarray)) + return -1; + //print( "ANDY tarray/array=%d/%d-->%s \n", tarray, array, + // ENEMYTEMP_getChar( tarray, E_T_NAME)); + for( i = 0; i < E_T_DATAINTNUM; i ++ ){ + tp[i] = ENEMYTEMP_getInt( tarray, i); + } + level = 1; +#define RAND(x,y) ((x-1)+1+ (int)( (double)(y-(x-1))*rand()/(RAND_MAX+1.0)) ) +#define E_PAR( a) (*(p + (a))) +#define ET_PAR( a) (*(tp + (a))) +#define PARAM_CAL( l) ( ( level -1) * ET_PAR( E_T_LVUPPOINT) + ET_PAR( E_T_INITNUM) ) + work[0] += ( RAND(0,4) - 2 ); + work[1] += ( RAND(0,4) - 2 ); + work[2] += ( RAND(0,4) - 2 ); + work[3] += ( RAND(0,4) - 2 ); + LevelUpPoint = ( work[0] << 24 ) + + (work[1] << 16) + + (work[2] << 8 ) + + (work[3] << 0 ); + + CHAR_setInt( petindex, CHAR_ALLOCPOINT, LevelUpPoint); + workrank = work[0]+work[1]+work[2]+work[3]; + for( i = 0; i < arraysizeof( ranktbl); i ++ ) { + if( workrank >= ranktbl[i].num ) { + petrank = i; + break; + } + } + if( i>= arraysizeof( ranktbl)) i = arraysizeof( ranktbl); + CHAR_setInt( petindex, CHAR_PETRANK, petrank); + for( i = 0; i < 10; i ++ ){ + int rnt = RAND( 0, 3 ); + if( rnt == 0 ) work[0]++; + if( rnt == 1 ) work[1]++; + if( rnt == 2 ) work[2]++; + if( rnt == 3 ) work[3]++; + } + + CHAR_setInt( petindex, CHAR_VITAL, ( PARAM_CAL(E_T_BASEVITAL) * work[0] )); + CHAR_setInt( petindex, CHAR_STR , ( PARAM_CAL(E_T_BASESTR) * work[1] )); + CHAR_setInt( petindex, CHAR_TOUGH , ( PARAM_CAL(E_T_BASETGH) * work[2] )); + CHAR_setInt( petindex, CHAR_DEX , ( PARAM_CAL(E_T_BASEDEX) * work[3] )); + CHAR_setMaxExp( petindex, 0); + CHAR_setInt( petindex, CHAR_LV, level); + + //宠物技能设为七技 + CHAR_setInt( petindex, CHAR_SLOT, 7); + { + int j; + int illegalpetskill[15] = {41,52,600,601,602,603,604,614,617,628,630,631,635,638,641}; + for( i=0; icharfunctable[CHAR_LOOPFUNCTEMP1].string, + sizeof( ch->charfunctable[CHAR_LOOPFUNCTEMP1]), "PET_CheckIncubateLoop"); + ch->data[CHAR_LOOPINTERVAL] = 60000; + CHAR_constructFunctable( petindex); + } +#endif + if( CHAR_CHECKINDEX( toindex) ){ + for(i = 0; i < CHAR_MAXPETHAVE; i++){ + char msgbuf[256]; + int pindex = CHAR_getCharPet(toindex, i); + if( !CHAR_CHECKINDEX( pindex) ) + continue; + memset( msgbuf, 0, sizeof( msgbuf)); + snprintf( msgbuf, sizeof( msgbuf ), "K%d", i ); + CHAR_sendStatusString( toindex, msgbuf ); + + CHAR_send_K_StatusString(toindex, i,CHAR_K_STRING_HP|CHAR_K_STRING_AI); + } + } + return petindex; +} + +BOOL PETFUSION_AddEgg( int toindex, int petID, int PetCode) +{ + int ret; + char msgbuf[64]; + int enemynum; + int i,j; + int petindex, petindex2; + + //检查宠物栏是否有空位 + for( i = 0 ;i < CHAR_MAXPETHAVE ; i++) { + petindex = CHAR_getCharPet( toindex, i); + if( petindex == -1 ) + break; + } + if( i == CHAR_MAXPETHAVE ) { + snprintf( msgbuf,sizeof( msgbuf), "宠物已满!!"); + CHAR_talkToCli( toindex, -1, msgbuf, CHAR_COLORYELLOW); + return -1; + } + enemynum = ENEMY_getEnemyNum(); + for( i = 0; i < enemynum; i ++ ) {//PetCode + if( ENEMY_getInt( i, ENEMY_ID ) == petID ) + //if( ENEMY_getInt( i, ENEMY_TEMPNO ) == PetCode ) + break; + } + if( i == enemynum ){ + print("ANDY err i == enemynum \n"); + return -1; + } + ret = ENEMY_createPetFromEnemyIndex( toindex, i); + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ) { + if( CHAR_getCharPet( toindex, i ) == ret ) + break; + } + if( i == CHAR_MAXPETHAVE ) + i = 0; + if( CHAR_CHECKINDEX( ret ) == TRUE ){ + CHAR_setMaxExpFromLevel( ret, CHAR_getInt( ret, CHAR_LV )); + } + petindex2 = CHAR_getCharPet( toindex, i); + if( !CHAR_CHECKINDEX( petindex2) ){ + print("ANDY petindex2=%d\n", petindex2); + return -1; + } + CHAR_setInt( petindex2, CHAR_FUSIONINDEX, PetCode); + snprintf( msgbuf,sizeof( msgbuf), "拿到%s。", CHAR_getChar(petindex2,CHAR_NAME)); + CHAR_talkToCli( toindex, -1, msgbuf, CHAR_COLORYELLOW); + for(j = 0; j < CHAR_MAXPETHAVE; j++){ + petindex = CHAR_getCharPet(toindex, j); + if( !CHAR_CHECKINDEX( petindex) ) + continue; + CHAR_complianceParameter( petindex ); + snprintf( msgbuf, sizeof( msgbuf ), "K%d", j ); + CHAR_sendStatusString( toindex, msgbuf ); + snprintf( msgbuf, sizeof( msgbuf ), "W%d", j ); + CHAR_sendStatusString( toindex, msgbuf ); + } + LogPet( + CHAR_getChar( toindex, CHAR_NAME ), + CHAR_getChar( toindex, CHAR_CDKEY ), + CHAR_getChar( petindex2, CHAR_NAME), + CHAR_getInt( petindex2, CHAR_LV), + "TenseiGet", + CHAR_getInt( toindex,CHAR_FLOOR), + CHAR_getInt( toindex,CHAR_X ), + CHAR_getInt( toindex,CHAR_Y ), + CHAR_getChar( petindex2, CHAR_UNIQUECODE) // shan 2001/12/14 + ); + + return petindex2; +} +#endif + +#ifdef _PET_TRANS +int GetNewPet( int toindex , int petindex, int array, int *work) +{ + int *p; + int tp[E_T_DATAINTNUM]; + int tarray, i; + int level, workrank, petrank=0; + int LevelUpPoint; + + struct { + int num; + float rank; + }ranktbl[] = { + { 130, 2.5}, + { 100, 2.0}, + { 95, 1.5}, + { 85, 1.0}, + { 80, 0.5}, + { 0, 0.0}, + }; + + if( !ENEMY_CHECKINDEX( array)) + return -1; + p = ENEMY_getIntdata( array); + if( p == NULL ) { + print("\n p = NULL" ); + return -1; + } + tarray = ENEMYTEMP_getEnemyTempArray( array); + if( !ENEMYTEMP_CHECKINDEX( tarray)) + return -1; + for( i = 0; i < E_T_DATAINTNUM; i ++ ){ + tp[i] = ENEMYTEMP_getInt( tarray, i); + } + level = 1; +#define RAND(x,y) ((x-1)+1+ (int)( (double)(y-(x-1))*rand()/(RAND_MAX+1.0)) ) +#define E_PAR( a) (*(p + (a))) +#define ET_PAR( a) (*(tp + (a))) +#define PARAM_CAL( l) ( ( level -1) * ET_PAR( E_T_LVUPPOINT) + ET_PAR( E_T_INITNUM) ) + work[0] += ( RAND(0,4) - 2 ); + work[1] += ( RAND(0,4) - 2 ); + work[2] += ( RAND(0,4) - 2 ); + work[3] += ( RAND(0,4) - 2 ); + + LevelUpPoint = ( work[0] << 24 ) + + (work[1] << 16) + + (work[2] << 8 ) + + (work[3] << 0 ); + CHAR_setInt( petindex, CHAR_ALLOCPOINT, LevelUpPoint); + workrank = work[0]+work[1]+work[2]+work[3]; + for( i = 0; i < arraysizeof( ranktbl); i ++ ) { + if( workrank >= ranktbl[i].num ) { + petrank = i; + break; + } + } + + if( i>= arraysizeof( ranktbl)) i = arraysizeof( ranktbl); + CHAR_setInt( petindex, CHAR_PETRANK, petrank); + + for( i = 0; i < 10; i ++ ){ + int rnt = RAND( 0, 3 ); + if( rnt == 0 ) work[0]++; + if( rnt == 1 ) work[1]++; + if( rnt == 2 ) work[2]++; + if( rnt == 3 ) work[3]++; + } + + CHAR_setInt( petindex, CHAR_VITAL, ( PARAM_CAL(E_T_BASEVITAL) * work[0] )); + CHAR_setInt( petindex, CHAR_STR , ( PARAM_CAL(E_T_BASESTR) * work[1] )); + CHAR_setInt( petindex, CHAR_TOUGH , ( PARAM_CAL(E_T_BASETGH) * work[2] )); + CHAR_setInt( petindex, CHAR_DEX , ( PARAM_CAL(E_T_BASEDEX) * work[3] )); + CHAR_setMaxExp( petindex, 0); + CHAR_setInt( petindex, CHAR_LV, level); + //宠物技能设为七技 + CHAR_setInt( petindex, CHAR_SLOT, 7); +/* for( i=0; i + +#include "object.h" +#include "char_base.h" +#include "char.h" +#include "readmap.h" +#include "map_warppoint.h" +#include "event.h" +#include "npc_warp.h" +#include "npc_npcenemy.h" + + +static int EVENT_onWarpNPC( int charaindex,int echaraindex,int fl,int x, int y ); +static int EVENY_npcEncount( int charaindex,int echaraindex,int fl,int x, int y ); + + +typedef int (*FUNC)( int charaindex,int echaraindex,int fl,int x, int y ); +static FUNC functbl[] = { + NULL, + NULL, /* 裔烂NPC */ + EVENY_npcEncount, /* 裔烂衬巨件市它件玄 */ + EVENT_onWarpNPC, /* warp*/ + NULL, /* 裔烂NPC */ + NULL, /* 裔烂NPC */ + EVENT_onWarpNPC, /* warp*/ + EVENT_onWarpNPC, /* warp*/ + EVENT_onWarpNPC, /* warp*/ +}; + +INLINE BOOL EVENT_CHECKEVENTINDEX( int event) +{ + if( event < 0 || event >= CHAR_EVENTNUM) return FALSE; + return TRUE; +} + +int EVENT_main( int charaindex,int event, int x, int y) +{ + OBJECT object; + BOOL found = FALSE; + int rc = FALSE; + int fl = CHAR_getInt( charaindex, CHAR_FLOOR); + if( !EVENT_CHECKEVENTINDEX( event)) return FALSE; + + for( object = MAP_getTopObj(fl,x,y) ; object ; + object = NEXT_OBJECT(object) ){ + int o = GET_OBJINDEX(object); + if( OBJECT_getType(o) == OBJTYPE_CHARA ){ + int etype; + int echaraindex=OBJECT_getIndex(o); + if( !CHAR_CHECKINDEX(echaraindex) )continue; + if( CHAR_getInt( echaraindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER) continue; + etype = CHAR_getWorkInt( echaraindex, CHAR_WORKEVENTTYPE); + if( etype != CHAR_EVENT_NONE ) { + if( etype == event) { + if( functbl[event] != NULL ) { + rc = functbl[event]( charaindex, echaraindex, fl,x,y); + } + found = TRUE; + break; + } + } + } +#ifdef _MAP_WARPPOINT + else if( OBJECT_getType(o) == OBJTYPE_WARPPOINT){ + if( !MAPPOINT_CHECKINDEX( OBJECT_getIndex( o)) ) continue; + if( OBJECT_getchartype( o) != event ) continue; + MAPPOINT_MapWarpHandle( charaindex, OBJECT_getIndex( o), fl, x, y ); + found = TRUE; + break; + } +#endif + } + if( !found ) { + print( "not found eventobject : cind [%d] event [%d] fl[%d] x[%d] y[%d]\n", + charaindex, event, fl,x,y); + } + return rc; +} + +static int EVENT_onWarpNPC( int charaindex,int echaraindex,int fl,int x, int y ) +{ + NPC_WarpWarpCharacter( echaraindex, charaindex); + if( CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE ) == CHAR_PARTY_LEADER ) { + int i; + for( i = 1; i < CHAR_PARTYMAX; i ++ ) { + int index = CHAR_getWorkInt( charaindex, i + CHAR_WORKPARTYINDEX1); + if( CHAR_CHECKINDEX(index) ) { + NPC_WarpWarpCharacter( echaraindex, index); + } + } + } + + return TRUE; +} +static int EVENY_npcEncount( int charaindex,int echaraindex,int fl,int x, int y ) +{ + return NPC_NPCEnemy_Encount( echaraindex, charaindex, 0); +} + diff --git a/gmsv/char/family.c b/gmsv/char/family.c new file mode 100644 index 0000000..27143b0 --- /dev/null +++ b/gmsv/char/family.c @@ -0,0 +1,3012 @@ +#include "version.h" +#include +#include +#include +#include + +#include "readmap.h" +#include "object.h" +#include "char.h" +#include "char_base.h" +#include "lssproto_serv.h" +#include "saacproto_cli.h" +#include "npcutil.h" +#include "family.h" +#include "log.h" +#include "handletime.h" +#include "buf.h" +#include "net.h" +#include "char_base.h" +#include "battle.h" +#include "npc_bus.h" +#include "char_talk.h" +#include "npc_scheduleman.h" +#ifdef _FM_MODIFY +#include "npc_fmdengon.h" +#endif + +#define CHAR_MAXNAME 20 +#define CHAR_MAXID 20 +#define MINFMLEVLEFORPOINT 3 // 3 申请庄园最低等级 +#ifdef _FAMILY_MANORNUM_CHANGE +#else +#define MANORNUM 4 +#endif + +struct FAMILY +{ + int fmindex; + char name[CHAR_MAXNAME]; + char leadername[CHAR_MAXNAME]; + char leaderid[CHAR_MAXID]; + int leadergraph; + char petname[CHAR_MAXNAME]; + char petattr[256]; + int fmnum; + int acceptflag; + char rule[256]; + int village; + int pointindex; + int dp; + char memolist[35][100]; +}; + +int familyNumTotal = 0; +char familyListBuf[MAXFAMILYLIST]; + +int channelMember[FAMILY_MAXNUM][FAMILY_MAXCHANNEL][FAMILY_MAXMEMBER]; +int familyMemberIndex[FAMILY_MAXNUM][FAMILY_MAXMEMBER]; + +int familyTax[FAMILY_MAXNUM]; + +extern tagRidePetTable ridePetTable[296]; + +void LeaveMemberIndex( int charaindex, int fmindexi); + + +// Arminius: 取得家族 pk dp 增加/损失值 +// getFMdpAward +// arg: windp=winner's fmdp losedp=loser's fmdp +// ret: dp award +// +#ifdef _MERGE_NEW_8 +int fmdplevelexp[]={0, // 0 + 150000, // 1 + 500000, // 2 + 1000000, // 3 + 1500000, // 4 + 2000000, // 5 + 2500000, // 6 + 3500000, // 7 + 4500000, // 8 + 5000000, // 9 + 7000000 //10 + }; +#else +int fmdplevelexp[]={0, // 0 + 10000, // 1 + 30000, // 2 + 100000, // 3 + 500000, // 4 + 1500000, // 5 + 5000000, // 6 + 15000000, // 7 + 50000000, // 8 + 200000000, // 9 + 500000000 //10 + }; +#endif +// Arminius end + +// shan begin +int getFmLv(int playerindex) // 合成时专用 +{ + int i, dp; + dp = CHAR_getWorkInt(playerindex, CHAR_WORKFMDP); + if( dp > fmdplevelexp[10] ){ +// print("\n player DP->%d",dp); + return 10; + } + for(i=0; i<=10; i++) + if( dp <= fmdplevelexp[i+1] ) break; + // Nuke 20040217: Open the merge limit + //if(i>=9) i = 8; + if (i>=10) i=10; + + return i; +} + +#ifdef _MERGE_NEW_8 // 查询个人声望等级 +int famelevelexp[]={0, // 0 + 1500, // 1 + 3000, // 2 + 4500, // 3 + 7500, // 4 + 11000, // 5 + 14500, // 6 + 18000, // 7 + 25000, // 8 + 32000, // 9 + 39000 //10 + }; + +int getFameLv(int playerindex) // 合成时专用 +{ + int i, dp; + dp = CHAR_getWorkInt(playerindex, CHAR_FAME); + if( dp > famelevelexp[10] ){ + return 10; + } + for(i=0; i<=10; i++) + if( dp <= famelevelexp[i+1] ) break; + if (i>=10) i=10; + + return i; +} +#endif + +struct FMMEMBER_LIST memberlist[FAMILY_MAXNUM]; +struct FMS_MEMO fmsmemo; +struct FM_POINTLIST fmpointlist; +#ifdef _NEW_MANOR_LAW +ManorSchedule_t ManorSchedule[MANORNUM]; +#endif +struct FMS_DPTOP fmdptop; +struct FM_PKFLOOR fmpkflnum[FAMILY_FMPKFLOOR]= +{ + {142}, + {143}, + {144}, + {145}, + {146}, + {1042}, + {2032}, + {3032}, + {4032}, +#ifdef _FAMILY_MANORNUM_CHANGE // CoolFish 用来修改装园数量 + {5032}, + {6032}, + {7032}, + {8032}, + {9032}, + {10032}, +#endif +}; +int leaderdengonindex = 0; +// shan end 新增图层需到 family.h 增加 FAMILY_FMPKFLOOR 数量 + +void SetFMPetVarInit(int meindex) +{ + int i = 0, petindex = 0; +#ifdef _FMVER21 + if (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != FMMEMBER_LEADER) +#else + if (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != 1) +#endif + { + for (i = 0; i < CHAR_MAXPETHAVE; i++) + { + petindex = CHAR_getCharPet(meindex, i); + if (!CHAR_CHECKINDEX(petindex)) continue; + CHAR_setInt(petindex, CHAR_PETFAMILY, -1); + } + } +} + +void SetFMVarInit(int meindex) +{ + SetFMPetVarInit(meindex); // 清除守护兽 Flag + CHAR_setInt(meindex, CHAR_FMINDEX, -1); + CHAR_setChar(meindex, CHAR_FMNAME, ""); + CHAR_setInt(meindex, CHAR_FMSPRITE, -1); +#ifdef _FMVER21 + CHAR_setInt(meindex, CHAR_FMLEADERFLAG, FMMEMBER_NONE); +#else + CHAR_setInt(meindex, CHAR_FMLEADERFLAG, -1); +#endif + CHAR_setWorkInt(meindex, CHAR_WORKFMSETUPFLAG, -1); + CHAR_setWorkInt(meindex, CHAR_WORKFMINDEXI, -1); + CHAR_setWorkInt(meindex, CHAR_WORKFMCHARINDEX, -1); +} + +void FAMILY_Init( void ) +{ + int i, j ,k; + + for( i=0; i 0) return -1; + if (strcmp(CHAR_getChar(meindex, CHAR_FMNAME), "") != 0) return -1; +#ifdef _FMVER21 + if (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) == FMMEMBER_LEADER) return -1; +#else + if (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) == 1) return -1; +#endif + return 1; +} + +int CheckFMMember(int meindex) +{ + if (CHAR_getInt(meindex, CHAR_FMINDEX) > 0) return -1; + if (strcmp(CHAR_getChar(meindex, CHAR_FMNAME), "") != 0) return -1; +#ifdef _FMVER21 + if (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) > 0 && + CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != FMMEMBER_APPLY ) return -1; +#else + if (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) > 0 ) return -1; +#endif + return 1; +} + +int CheckLeaderQ(int meindex) +{ + if (CHAR_getInt(meindex, CHAR_LV) < FMLEADERLV + && CHAR_getInt(meindex, CHAR_TRANSMIGRATION) <= 0) + return -1; + if (!NPC_EventCheckFlg(meindex, 4)) + return -2; + return 0; +} + +void FAMILY_Add(int fd, int meindex, char* message) +{ + char token[128], fmname[128], charname[128], charid[128]; + char petname[128], fmrule[256], petattr[256], buf[1024]; + int charlv, havepetindex, petindex, fmsprite = 0, chargrano; + int gold, tmpflag; + + if (!CHAR_CHECKINDEX(meindex)) return; + + if (CHAR_getWorkInt(meindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE) + return; + if (CHAR_getInt(meindex, CHAR_FMINDEX) >= 0 + && strcmp(CHAR_getChar(meindex, CHAR_FMNAME), "") != 0) + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n你已经加入家族罗~无法再成立家族!", buf, sizeof(buf))); + return; + } + tmpflag = CheckLeaderQ(meindex); + if(tmpflag == -1) + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n很抱歉喔!你的等级不足!", buf, sizeof(buf))); + return; + } + + if(tmpflag == -2) + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n很抱歉喔!你必须先完成成人礼才行!", buf, sizeof(buf))); + return; + } + + gold = CHAR_getInt(meindex, CHAR_GOLD); + if( gold < 10000 ) + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n很抱歉喔!成立家族需要一万元石币的手续费!", buf, sizeof(buf))); + return; + } + else { + CHAR_setInt( meindex, CHAR_GOLD, gold-10000 ); + CHAR_send_P_StatusString( meindex , CHAR_P_STRING_GOLD); + } + + if (getStringFromIndexWithDelim(message, "|", 2, token, + sizeof(token)) == FALSE) return; + sprintf(fmname, "%s", token); + if ((strstr(fmname, " ")) || (strcmp(fmname, "") == 0) || (strstr(fmname, " "))) + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n家族的名称请勿输入空格!", buf, sizeof(buf))); + return; + } + if (getStringFromIndexWithDelim(message, "|", 3, token, + sizeof(token)) == FALSE) return; + havepetindex = atoi(token); + petindex = CHAR_getCharPet(meindex, havepetindex); + if (!CHAR_CHECKINDEX(petindex)) + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n请选择一只宠物作为家族守护兽!", buf, sizeof(buf))); + return; + } + if (getStringFromIndexWithDelim(message, "|", 4, token, + sizeof(token)) == FALSE) return; + fmsprite = atoi(token); + if (getStringFromIndexWithDelim(message, "|", 5, token, + sizeof(token)) == FALSE) return; + if (strcmp(token, "") == 0) + sprintf(fmrule, "无"); + else + sprintf(fmrule, "%s", token); + sprintf(charname, "%s", CHAR_getChar(meindex, CHAR_NAME)); + sprintf(charid, "%s", CHAR_getChar(meindex, CHAR_CDKEY)); + charlv = CHAR_getInt(meindex, CHAR_LV); + chargrano = CHAR_getInt(meindex, CHAR_FACEIMAGENUMBER); + if (strlen(CHAR_getChar(petindex, CHAR_USERPETNAME)) == 0) + sprintf(petname, "%s", CHAR_getChar(petindex, CHAR_NAME)); + else + sprintf(petname, "%s", CHAR_getChar(petindex, CHAR_USERPETNAME)); + sprintf(petattr, "%d %d %d %d", + CHAR_getInt(petindex, CHAR_BASEIMAGENUMBER), + CHAR_getWorkInt(petindex, CHAR_WORKATTACKPOWER), + CHAR_getWorkInt(petindex, CHAR_WORKDEFENCEPOWER), + CHAR_getWorkInt(petindex, CHAR_WORKQUICK)); + CHAR_setInt(petindex, CHAR_PETFAMILY, 1); + CHAR_setChar(meindex, CHAR_FMNAME, fmname); +#ifdef _FMVER21 + CHAR_setInt(meindex, CHAR_FMLEADERFLAG, FMMEMBER_LEADER); +#else + CHAR_setInt(meindex, CHAR_FMLEADERFLAG, 1); +#endif + CHAR_setInt(meindex, CHAR_FMSPRITE, fmsprite); + + // print("%s %s %s %d %s %s %s %d %d\n", fmname, charname, charid, charlv, petname, + // petattr, fmrule, fmsprite, chargrano); +#ifdef _PERSONAL_FAME + saacproto_ACAddFM_send(acfd, fmname, charname, charid, charlv, + petname, petattr, fmrule, fmsprite, chargrano, + CHAR_getInt(meindex, CHAR_FAME), CONNECT_getFdid(fd)); + // print("ACAddFM acfd:%d meindex:%d fmname:%s charname:%s fame:%d Connectfd:%d fd:%d\n", + // acfd, meindex, fmname, charname, CHAR_getInt(meindex, CHAR_FAME), CONNECT_getFdid(fd), fd); +#else + saacproto_ACAddFM_send(acfd, fmname, charname, charid, charlv, + petname, petattr, fmrule, fmsprite, chargrano, CONNECT_getFdid(fd)); +#endif + + // 要求最新家族列表 + //saacproto_ACShowFMList_send( acfd ); + +} + +/* + ┐┌ + ┘└┘└ +└┐..┌┘─ + ┴──┤★~~├ +│o o│  │●   + ┬──   │ ~~~~~~~~~哞 +▲△▲△▲△▲△▲△▲△▲△▲△ + +*/ + +void ACAddFM(int fd, int result, int fmindex, int index) +{ + int meindex = CONNECT_getCharaindex(fd); + char buf[1024]; + +// print("ACAddFM result:%d fmindex:%d meindex:%d\n", result, fmindex, meindex); // test + + if (!CHAR_CHECKINDEX(meindex)) return; + +// print("ACAddFM_2!\n"); + + if (CHAR_getWorkInt(meindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE) + return; + +// print("ACAddFM_3!\n"); + + if(result == 1) + { + CHAR_setInt(meindex, CHAR_FMINDEX, fmindex); + CHAR_setWorkInt(meindex, CHAR_WORKFMINDEXI, index); + CHAR_setWorkInt(meindex, CHAR_WORKFMSETUPFLAG, 0); +#ifdef _NEW_MANOR_LAW + CHAR_setInt(meindex,CHAR_MOMENTUM,0); + CHAR_talkToCli(meindex,-1,"成立家族个人气势归零",CHAR_COLORYELLOW); +#endif + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n恭喜你成立了新的家族!但请在7天之内召集到10名族人加入,不然会取消家族资格喔。", buf, sizeof(buf))); + JoinMemberIndex( meindex, index); + CHAR_charSaveFromConnect(fd, FALSE); + + // 要求最新家族资料 + saacproto_ACShowFMList_send( acfd ); + saacproto_ACShowMemberList_send( acfd, index ); + saacproto_ACShowTopFMList_send(acfd, FM_TOP_INTEGRATE); + + LogFamily( + CHAR_getChar( meindex, CHAR_FMNAME), + CHAR_getInt( meindex, CHAR_FMINDEX), + CHAR_getChar( meindex, CHAR_NAME), + CHAR_getChar( meindex, CHAR_CDKEY), + "ADDFAMILY(成立家族)", + "" + ); + } + else + { + int i = 0, petindex = 0; + char tmpbuf[256]; + int gold = CHAR_getInt(meindex, CHAR_GOLD); + CHAR_setInt(meindex, CHAR_GOLD, gold + 10000); + CHAR_send_P_StatusString( meindex , CHAR_P_STRING_GOLD); + SetFMVarInit(meindex); + + for (i = 0; i < CHAR_MAXPETHAVE; i++) + { + petindex = CHAR_getCharPet(meindex, i); + if (!CHAR_CHECKINDEX(petindex)) continue; + CHAR_setInt(petindex, CHAR_PETFAMILY, -1); + } + if (fmindex == -2) + sprintf(tmpbuf, "\n已经有相同名字的家族成立了!"); + else + sprintf(tmpbuf, "\n申请成立家族失败!"); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString(tmpbuf, buf, sizeof(buf))); + } + CHAR_sendStatusString( meindex, "F"); +} + +void FAMILY_Join(int fd, int meindex, char *message) +{ + int fmindex, charlv, index, fmsprite; + char token[128], fmname[128], charname[128], charid[128], buf[1024]; + + if (!CHAR_CHECKINDEX(meindex)) return; + + if ((CHAR_getWorkInt(meindex, CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE) + || (CHAR_getWorkInt(meindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE)) + return; + + if (CheckFMMember(meindex) < 0){ + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n你已经加入其他家族了喔!", buf, sizeof(buf))); + return; + } + + + if (getStringFromIndexWithDelim(message, "|", 2, token, + sizeof(token)) == FALSE) return; + index = atoi(token); + if (getStringFromIndexWithDelim(message, "|", 3, token, + sizeof(token)) == FALSE) return; + fmindex = atoi(token); + if (getStringFromIndexWithDelim(message, "|", 4, token, + sizeof(token)) == FALSE) return; + sprintf(fmname, "%s", token); + if (getStringFromIndexWithDelim(message, "|", 5, token, + sizeof(token)) == FALSE) return; + fmsprite = atoi(token); + sprintf(charname, "%s", CHAR_getChar(meindex, CHAR_NAME)); + sprintf(charid, "%s", CHAR_getChar(meindex, CHAR_CDKEY)); + charlv = CHAR_getInt(meindex, CHAR_LV); + CHAR_setInt(meindex, CHAR_FMINDEX, fmindex); + CHAR_setChar(meindex, CHAR_FMNAME, fmname); +#ifdef _FMVER21 + CHAR_setInt(meindex, CHAR_FMLEADERFLAG, FMMEMBER_APPLY); +#else + CHAR_setInt(meindex, CHAR_FMLEADERFLAG, 0); +#endif + CHAR_setInt(meindex, CHAR_FMSPRITE, fmsprite); + CHAR_setWorkInt(meindex, CHAR_WORKFMINDEXI, index); + +// print("JoinFM index:%d fmindex:%d fmname:%s charname:%s charid:%s charlv:%d sprite:%d\n", +// index, fmindex, fmname, charname, charid, charlv, fmsprite); +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 +// print("fame:%d charfdid:%d\n", CHAR_getInt(meindex, CHAR_FAME), +// CONNECT_getFdid(fd)); + saacproto_ACJoinFM_send(acfd, fmname, fmindex, charname, charid, charlv, + index, CHAR_getInt(meindex, CHAR_FAME), CONNECT_getFdid(fd)); +#else +// print("charfdid:%d\n", CONNECT_getFdid(fd)); + saacproto_ACJoinFM_send(acfd, fmname, fmindex, charname, charid, charlv, + index, CONNECT_getFdid(fd)); +#endif +} + +void ACJoinFM(int fd, int result, int recv) +{ + int meindex = CONNECT_getCharaindex(fd); + char buf[1024]; + + if(!CHAR_CHECKINDEX(meindex)) return; + + if ((CHAR_getWorkInt(meindex, CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE) + || (CHAR_getWorkInt(meindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE)) + return; + + if (result == 1) { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n谢谢你的加入申请!请先等族长对你的审核通过之後,才算正式加入。", buf, sizeof(buf))); + + JoinMemberIndex( meindex, CHAR_getWorkInt(meindex, CHAR_WORKFMINDEXI) ); +#ifdef _NEW_MANOR_LAW + CHAR_setInt(meindex,CHAR_MOMENTUM,0); + CHAR_talkToCli(meindex,-1,"加入家族个人气势归零",CHAR_COLORYELLOW); +#endif + + sprintf(buf,"fame:%d",CHAR_getInt(meindex,CHAR_FAME)); + + LogFamily( + CHAR_getChar( meindex, CHAR_FMNAME), + CHAR_getInt( meindex, CHAR_FMINDEX), + CHAR_getChar( meindex, CHAR_NAME), + CHAR_getChar( meindex, CHAR_CDKEY), + "JOINFAMILY(申请加入家族)", + buf + ); + + } + else + { + SetFMVarInit(meindex); + if (recv == -2) + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n此家族目前不愿意招收成员!", buf, sizeof(buf))); + } + else if (recv == -3) + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n此家族目前无法招收成员,家族成员人数已到达上限!", buf, sizeof(buf))); + } + else + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n申请加入家族失败!", buf, sizeof(buf))); + } + + CHAR_sendStatusString( meindex, "F"); +} + +void FAMILY_Leave(int fd, int meindex, char *message) +{ + int result, fmindex, index; + char token[128], fmname[128], charname[128], charid[128], buf[1024]; + + if (!CHAR_CHECKINDEX(meindex)) return; + + if (CHAR_getWorkInt(meindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE) + return; + + if ((CHAR_getInt(meindex, CHAR_FMINDEX) == -1) + || (strcmp(CHAR_getChar(meindex, CHAR_FMNAME), "") == 0) +#ifdef _FMVER21 + || (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) == FMMEMBER_NONE)) +#else + || (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) == -1)) +#endif + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n你并没有加入家族喔!", buf, sizeof(buf))); + return; + } + + { + int i, fmpks_pos; + for( i=1; i<=MANORNUM; i++){ // CoolFish 4->MANORNUM 2002/2/25 + fmpks_pos = i * MAX_SCHEDULE; +#ifdef _FMVER21 + if (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) == FMMEMBER_LEADER){ +#else + if (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) == 1){ +#endif + if( (fmpks[fmpks_pos+1].host_index+1) == CHAR_getInt(meindex, CHAR_FMINDEX) || + (fmpks[fmpks_pos+1].guest_index+1) == CHAR_getInt(meindex, CHAR_FMINDEX) ){ + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n你目前的家族正约战中,因此无法解散家族!", buf, sizeof(buf))); + return; + } + } + } + } + + if (getStringFromIndexWithDelim(message, "|", 2, token, + sizeof(token)) == FALSE) return; + result = atoi(token); + if (result == 1) + { + fmindex = CHAR_getInt(meindex, CHAR_FMINDEX); + index = CHAR_getWorkInt(meindex, CHAR_WORKFMINDEXI); + sprintf(fmname, "%s", CHAR_getChar(meindex, CHAR_FMNAME)); + sprintf(charname, "%s", CHAR_getChar(meindex, CHAR_NAME)); + sprintf(charid, "%s", CHAR_getChar(meindex, CHAR_CDKEY)); +#ifdef _FMVER21 + if (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) == FMMEMBER_LEADER) { +#else + if (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) == 1) { +#endif +// print("DelFM index:%d fmindex:%d fmname:%s\n", index, fmindex, fmname); + saacproto_ACDelFM_send(acfd, fmname, fmindex, index, charname, charid, + CONNECT_getFdid(fd)); + + // 要求最新家族列表 + //saacproto_ACShowFMList_send( acfd ); + } + else { +// print("LeaveFM index:%d fmindex:%d fmname:%s charname:%s charid:%s\n", +// index, fmindex, fmname, charname, charid); + saacproto_ACLeaveFM_send(acfd, fmname, fmindex, charname, charid, index, + CONNECT_getFdid(fd)); + } + + + } +} + +void ACLeaveFM( int fd, int result, int resultflag) +{ + int meindex = CONNECT_getCharaindex(fd); + char buf[1024]; + + if (!CHAR_CHECKINDEX(meindex)) return; + if (result == 1){ + // won 2002/01/05 + LogFamily( + CHAR_getChar( meindex, CHAR_FMNAME), + CHAR_getInt( meindex, CHAR_FMINDEX), + CHAR_getChar( meindex, CHAR_NAME), + CHAR_getChar( meindex, CHAR_CDKEY), + "LEAVEFAMILY(离开家族)", + "" + ); + if( CHAR_getWorkInt( meindex, CHAR_WORKFMCHANNEL) != -1 ) + CHAR_setWorkInt( meindex, CHAR_WORKFMCHANNEL, -1 ); + LeaveMemberIndex( meindex, CHAR_getWorkInt(meindex, CHAR_WORKFMINDEXI) ); + SetFMVarInit(meindex); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, + makeEscapeString( "\n申请退出家族OK!", buf, sizeof(buf))); + CHAR_setWorkInt( meindex, CHAR_WORKFMFLOOR, -1); +#ifdef _FM_JOINLIMIT + CHAR_setInt( meindex, CHAR_FMTIMELIMIT, (int)time(NULL)+(7*24)*(60*60) ); +#endif +#ifdef _NEW_MANOR_LAW + CHAR_setInt(meindex,CHAR_MOMENTUM,0); + CHAR_talkToCli(meindex,-1,"退出家族个人气势归零",CHAR_COLORYELLOW); +#endif + + }else + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, + makeEscapeString( "\n申请退出家族失败!", buf, sizeof(buf))); + + CHAR_sendStatusString( meindex, "F" ); +} + +void ACDelFM(int fd, int result) +{ + char buf[1024]; + int meindex = CONNECT_getCharaindex(fd); + if (!CHAR_CHECKINDEX(meindex)) return; + + //if ((CHAR_getWorkInt(meindex, CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE) + // || (CHAR_getWorkInt(meindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE)) + // return; + + if (result == 1) + { +// WON ADD + LogFamily( + CHAR_getChar( meindex, CHAR_FMNAME), + CHAR_getInt( meindex, CHAR_FMINDEX), + CHAR_getChar( meindex, CHAR_NAME), + CHAR_getChar( meindex, CHAR_CDKEY), + "DELFAMILY(家族解散)", + "" + ); + + LeaveMemberIndex( meindex, CHAR_getWorkInt(meindex, CHAR_WORKFMINDEXI) ); + /* + for( i=0; i familyNumTotal ) break; + if( getStringFromIndexWithDelim( familyListBuf, "|", i, subbuf, + sizeof(subbuf) ) == FALSE) break; + strcat( buf, "|" ); + strcat( buf, subbuf ); + j++; + + // print(" |%s| ", subbuf); + } + + sprintf( sendbuf, "S|F|%d|%d|%d%s", familyNumTotal, atoi(token2), j, buf ); + lssproto_FM_send( fd, sendbuf ); + + return; + + } + + // shan add + if (strcmp(token, "P") == 0 ){ + int personfame; + char sendbuf[512]; +#ifdef _PERSONAL_FAME + personfame = (CHAR_getInt( meindex, CHAR_FAME)/100); +#else + personfame = CHAR_getWorkInt( meindex, CHAR_WORKFMDP); +#endif + sprintf( sendbuf, "你目前的个人声望点数为:%d", personfame); + CHAR_talkToCli(meindex, -1, sendbuf, CHAR_COLORYELLOW); +#ifdef _NEW_MANOR_LAW + sprintf(sendbuf,"你目前的个人气势点数为:%d",CHAR_getInt(meindex,CHAR_MOMENTUM)/100); + CHAR_talkToCli(meindex, -1, sendbuf, CHAR_COLORYELLOW); +#endif + } + + if(strcmp(token,"D") == 0){ + if(getStringFromIndexWithDelim(message, "|", 3, fmname, sizeof(fmname)) == FALSE) return; + if(getStringFromIndexWithDelim(message, "|", 4, token2, sizeof(token2)) == FALSE) return; + fmindex = atoi( token2 ); + if(getStringFromIndexWithDelim(message, "|", 5, token2, sizeof(token2)) == FALSE) return; + tempindex = atoi( token2 ); + + //print(" send_fmname_ac:%s ", fmname); + saacproto_ACFMDetail_send( acfd, fmname, fmindex, tempindex, CONNECT_getFdid(fd) ); + } + + // shan begin + else if (strcmp(token, "D2") ==0 ) { + char sendbuf[2048], tmpbuf[1024], leadernamebuf[64]; + int h, i = 0; + int meindex = CONNECT_getCharaindex(fd); + int fmindex_wk = CHAR_getWorkInt( meindex, CHAR_WORKFMINDEXI); + if( fmindex_wk < 0 || fmindex_wk >= FAMILY_MAXNUM) return; + + for( h=0; h 家族名称|人数|族长名称|家族排行|家族声望|个人声望|个人职位|家族精灵|PK +#ifdef _NEW_MANOR_LAW + sprintf( sendbuf, "%s|%d|%s|%d|%d|%d|%d|%d|%s|%d|%d", +#else + sprintf( sendbuf, "%s|%d|%s|%d|%d|%d|%d|%d|%s", +#endif + CHAR_getChar(meindex, CHAR_FMNAME), + memberlist[fmindex_wk].fmjoinnum, + leadernamebuf, + h+1, +#ifdef _FMVER21 + fmdptop.fmtopdp[h], +#else + (CHAR_getWorkInt( meindex, CHAR_WORKFMDP)/100), +#endif +#ifdef _PERSONAL_FAME + (CHAR_getInt( meindex, CHAR_FAME)/100), +#else + (CHAR_getWorkInt( meindex, CHAR_WORKFMDP)/100), +#endif + CHAR_getInt( meindex, CHAR_FMLEADERFLAG), + CHAR_getInt( meindex, CHAR_FMSPRITE ), + tmpbuf +#ifdef _NEW_MANOR_LAW + ,fmdptop.fmMomentum[h]/100 // 家族气势 + ,CHAR_getInt(meindex,CHAR_MOMENTUM)/100 // 个人气势 +#endif + ); + + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_FAMILYDETAIL, + WINDOW_BUTTONTYPE_OK, + -1, + -1, + makeEscapeString( sendbuf, buf, sizeof(buf))); + } + // shan end +} + +void ACFMDetail(int ret, char *data, int clifd) +{ + char sendbuf[1024]; + + //print(" Detail:%s ", data); + + if( ret != 1 ) + { + print(" ACFMDetailError!:%d ", clifd ); + return; + } + //print(" ACFMDetail:%d:%s ", clifd, data ); + + /* + len = strlen(data); + strcpy( buf, data ); + + for( i=0 ; i 人物名称:%s 人物索引 (设该人物为族员):%d\n", CHAR_getInt(meindex, CHAR_FMLEADERFLAG), charname, charindex); + LogFamily( + CHAR_getChar(meindex, CHAR_FMNAME), + CHAR_getInt(meindex, CHAR_FMINDEX), + CHAR_getChar(meindex, CHAR_NAME), + CHAR_getChar(meindex, CHAR_CDKEY), + "CheckMember", + sbuf + ); + // shan end + + saacproto_ACMemberJoinFM_send(acfd, + CHAR_getChar(meindex, CHAR_FMNAME), + CHAR_getInt(meindex, CHAR_FMINDEX), charname, charindex, + CHAR_getWorkInt(meindex, CHAR_WORKFMINDEXI), result, + CHAR_getWorkInt(meindex, CHAR_WORKFMCHARINDEX), + CONNECT_getFdid(fd)); + } +#else + { + saacproto_ACMemberJoinFM_send(acfd, + CHAR_getChar(meindex, CHAR_FMNAME), + CHAR_getInt(meindex, CHAR_FMINDEX), charname, charindex, + CHAR_getWorkInt(meindex, CHAR_WORKFMINDEXI), result, + CONNECT_getFdid(fd)); + } +#endif +#ifdef _FMVER21 + else if (result == FMMEMBER_NONE) +#else + else if (result == 4) +#endif + { + for (i = 0 + 1; i < FAMILY_MAXHOME + 1; i++) + { + int fmpks_pos = i * MAX_SCHEDULE; + if ((fmpks[fmpks_pos].host_index == index + && strcmp(fmname, fmpks[fmpks_pos].host_name) == 0) + || (fmpks[fmpks_pos].guest_index == index + && strcmp(fmname, fmpks[fmpks_pos].guest_name) == 0)) + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n家族目前正在战斗中,所以无法审核成员。", buf, sizeof(buf))); +// print("fmpks_pos:%d index:%d host:%d guest:%d\n", fmpks_pos, +// index, fmpks[fmpks_pos].host_index, fmpks[fmpks_pos].guest_index); + return; + } + } +#ifdef _FMVER21 + { + // shan begin + char sbuf[1024]; + sprintf( sbuf, "族长代号:%d -> 人物名称:%s 人物索引:%d (将该人物退出家族)\n", CHAR_getInt(meindex, CHAR_FMLEADERFLAG), charname, charindex); + + LogFamily( + CHAR_getChar(meindex, CHAR_FMNAME), + CHAR_getInt(meindex, CHAR_FMINDEX), + CHAR_getChar(meindex, CHAR_NAME), + CHAR_getChar(meindex, CHAR_CDKEY), + "CheckMember", + sbuf + ); + // shan end + saacproto_ACMemberLeaveFM_send(acfd, + CHAR_getChar(meindex, CHAR_FMNAME), + CHAR_getInt(meindex, CHAR_FMINDEX), charname, charindex, + CHAR_getWorkInt(meindex, CHAR_WORKFMINDEXI), + CHAR_getWorkInt(meindex, CHAR_WORKFMCHARINDEX), + CONNECT_getFdid(fd)); + } +#else + { + saacproto_ACMemberLeaveFM_send(acfd, + CHAR_getChar(meindex, CHAR_FMNAME), + CHAR_getInt(meindex, CHAR_FMINDEX), charname, charindex, + CHAR_getWorkInt(meindex, CHAR_WORKFMINDEXI), + CONNECT_getFdid(fd)); + } +#endif + } +#ifdef _FMVER21 +// else if (result == FMMEMBER_ELDER || result == FMMEMBER_INVITE +// || result == FMMEMBER_BAILEE || result == FMMEMBER_VICELEADER ) + else if (result == FMMEMBER_ELDER ) + { + if (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != FMMEMBER_LEADER) + return; +#ifdef _FMVER21 + { + // shan begin + char sbuf[1024]; + sprintf( sbuf, "族长代号:%d -> 人物名称:%s 人物索引:%d (设该人物为长老)\n", CHAR_getInt(meindex, CHAR_FMLEADERFLAG), charname, charindex); + LogFamily( + CHAR_getChar(meindex, CHAR_FMNAME), + CHAR_getInt(meindex, CHAR_FMINDEX), + CHAR_getChar(meindex, CHAR_NAME), + CHAR_getChar(meindex, CHAR_CDKEY), + "CheckMember", + sbuf + ); + // shan end + saacproto_ACMemberJoinFM_send(acfd, + CHAR_getChar(meindex, CHAR_FMNAME), + CHAR_getInt(meindex, CHAR_FMINDEX), charname, charindex, + CHAR_getWorkInt(meindex, CHAR_WORKFMINDEXI), result, + CHAR_getWorkInt(meindex, CHAR_WORKFMCHARINDEX), + CONNECT_getFdid(fd)); + } +#else + { + saacproto_ACMemberJoinFM_send(acfd, + CHAR_getChar(meindex, CHAR_FMNAME), + CHAR_getInt(meindex, CHAR_FMINDEX), charname, charindex, + CHAR_getWorkInt(meindex, CHAR_WORKFMINDEXI), result, + CONNECT_getFdid(fd)); + } +#endif + } +#endif + // 要求最新家族列表 + saacproto_ACShowFMList_send( acfd ); +} + +void FAMILY_Channel(int fd, int meindex, char *message) +{ + char token[128], token2[128]; + char buf[4096], subbuf[4096], sendbuf[4096]; + int i, tempindex, fmindexi, channel, nowchannel, num; + + fmindexi = CHAR_getWorkInt( meindex, CHAR_WORKFMINDEXI); + nowchannel = CHAR_getWorkInt( meindex, CHAR_WORKFMCHANNEL ); + + // print(" channelFM:%d ", fmindexi); + if( fmindexi < 0 ) { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n你还没有加入任何家族!", buf, sizeof(buf))); + return; + } + + if (getStringFromIndexWithDelim(message, "|", 2, token, + sizeof(token)) == FALSE) return; + + if (getStringFromIndexWithDelim(message, "|", 3, token2, + sizeof(token2)) == FALSE) return; + + channel = atoi( token2 ); + + if( strcmp( token, "J") == 0) { + if( channel < -1 || channel > FAMILY_MAXCHANNEL )return; + if( nowchannel >= 0 && nowchannel < FAMILY_MAXCHANNEL ) { + i = 0; + while( i < FAMILY_MAXMEMBER ) { + if( channelMember[fmindexi][nowchannel][i] == meindex ) { + channelMember[fmindexi][nowchannel][i] = -1; + break; + } + i++; + } + } + + if( channel > 0 && channel < FAMILY_MAXCHANNEL ) { + i = 0; + while( i < FAMILY_MAXCHANNELMEMBER ) { + if( channelMember[fmindexi][channel][i] < 0 ) { + channelMember[fmindexi][channel][i] = meindex; + break; + } + i++; + } + if( i >= FAMILY_MAXCHANNELMEMBER ) { + CHAR_talkToCli( meindex, -1, "此频道人数已满。", CHAR_COLORWHITE); + return; + } + sprintf( buf, "加入家族频道 [%d]。", channel ); + CHAR_talkToCli( meindex, -1, buf, CHAR_COLORWHITE); + + if( nowchannel >=0 && nowchannel < FAMILY_MAXCHANNEL ) { + sprintf( buf, "%s 退出频道。", CHAR_getChar( meindex, CHAR_NAME) ); + for( i=0; i < FAMILY_MAXCHANNELMEMBER; i++ ) { + if( CHAR_CHECKINDEX(channelMember[fmindexi][nowchannel][i]) + && channelMember[fmindexi][nowchannel][i] != meindex ) { + CHAR_talkToCli( channelMember[fmindexi][nowchannel][i], -1, buf, CHAR_COLORWHITE); + } + } + } + sprintf( buf, "%s 加入频道。", CHAR_getChar( meindex, CHAR_NAME) ); + for( i=0; i < FAMILY_MAXCHANNELMEMBER; i++ ) { + if( CHAR_CHECKINDEX(channelMember[fmindexi][channel][i]) + && channelMember[fmindexi][channel][i] != meindex ) { + CHAR_talkToCli( channelMember[fmindexi][channel][i], -1, buf, CHAR_COLORWHITE); + } + } + + } + else if( channel == 0 ) { + i = 0; + while( i < FAMILY_MAXMEMBER ) { + if( channelMember[fmindexi][0][i] < 0 ) { + channelMember[fmindexi][0][i] = meindex; + break; + } + i++; + } + if( i >= FAMILY_MAXMEMBER ) { +#ifndef _CHANNEL_MODIFY + CHAR_talkToCli( meindex, -1, "此频道人数已满。", CHAR_COLORWHITE); +#endif + return; + } +#ifndef _CHANNEL_MODIFY + sprintf( buf, "加入家族频道 [全]。"); + CHAR_talkToCli( meindex, -1, buf, CHAR_COLORWHITE); + if( nowchannel >=0 && nowchannel < FAMILY_MAXCHANNEL ) { + sprintf( buf, "%s 退出频道。", CHAR_getChar( meindex, CHAR_NAME) ); + for( i=0; i < FAMILY_MAXCHANNELMEMBER; i++ ) { + if( CHAR_CHECKINDEX(channelMember[fmindexi][nowchannel][i]) + && channelMember[fmindexi][nowchannel][i] != meindex ) { + CHAR_talkToCli( channelMember[fmindexi][nowchannel][i], -1, buf, CHAR_COLORWHITE); + } + } + } + sprintf( buf, "%s 加入频道。", CHAR_getChar( meindex, CHAR_NAME) ); + for( i=0; i < FAMILY_MAXCHANNELMEMBER; i++ ) { + if( CHAR_CHECKINDEX(channelMember[fmindexi][channel][i]) + && channelMember[fmindexi][channel][i] != meindex ) { + CHAR_talkToCli( channelMember[fmindexi][channel][i], -1, buf, CHAR_COLORWHITE); + } + } +#endif + } +#ifdef _FMVER21 + else if( channel == FAMILY_MAXCHANNEL && CHAR_getInt( meindex, CHAR_FMLEADERFLAG ) == FMMEMBER_LEADER ) +#else + else if( channel == FAMILY_MAXCHANNEL && CHAR_getInt( meindex, CHAR_FMLEADERFLAG ) == 1 ) +#endif + { + CHAR_talkToCli( meindex, -1, "启动族长广播。", CHAR_COLORWHITE); + } + else { + channel = -1; +#ifndef _CHANNEL_MODIFY + CHAR_talkToCli( meindex, -1, "退出家族频道。", CHAR_COLORWHITE); +#else + CHAR_talkToCli( meindex, -1, "关闭族长广播。", CHAR_COLORWHITE); + channel = 0; + i = 0; + while(i < FAMILY_MAXMEMBER){ + if( channelMember[fmindexi][0][i] < 0 ) { + channelMember[fmindexi][0][i] = meindex; + break; + } + i++; + } +#endif + + sprintf( buf, "%s 退出频道。", CHAR_getChar( meindex, CHAR_NAME) ); + for( i=0; i < FAMILY_MAXCHANNELMEMBER; i++ ) { + if( CHAR_CHECKINDEX(channelMember[fmindexi][nowchannel][i]) + && channelMember[fmindexi][nowchannel][i] != meindex ) { + CHAR_talkToCli( channelMember[fmindexi][nowchannel][i], -1, buf, CHAR_COLORWHITE); + } + } + } + + CHAR_setWorkInt( meindex, CHAR_WORKFMCHANNEL, channel); + if( channel != -1 ) CHAR_setWorkInt( meindex, CHAR_WORKFMCHANNELQUICK, channel); + + sprintf( sendbuf, "C|J|%d", channel); + lssproto_FM_send( fd, sendbuf); + + } + else if( strcmp( token, "L") == 0) { + + int j, membernum, bFind = 0; + if( channel < 0 || channel >= FAMILY_MAXCHANNEL ) return; + + subbuf[0] = '\0'; + num = 0; + if( channel != 0 ) + membernum = FAMILY_MAXCHANNELMEMBER; + else + membernum = FAMILY_MAXMEMBER; + + for( j = 0 ; j < FAMILY_MAXMEMBER ; j++ ) { + bFind = 0; + tempindex = familyMemberIndex[fmindexi][j]; + //if( tempindex >= 0 ) { + if( CHAR_CHECKINDEX(tempindex) ) { + for( i=0; i< membernum ; i++) { + if( tempindex == channelMember[fmindexi][channel][i] ) { + //if( CHAR_getChar( tempindex, CHAR_NAME ) == NULL ) { + // familyMemberIndex[fmindexi][j] = -1; + // channelMember[fmindexi][channel][i] = -1; + // continue; + //} + bFind = 1; + break; + } + } + if( bFind ) + strcat( subbuf, "|1|" ); + else + strcat( subbuf, "|0|" ); + makeEscapeString( CHAR_getChar( tempindex, CHAR_NAME ), buf, sizeof(buf)); + strcat( subbuf, buf ); + num++; + } + } + sprintf( sendbuf, "C|L|%d|%d%s", channel, num, subbuf); + lssproto_FM_send( fd, sendbuf); + //print(" CList:%s ", sendbuf); + } +} + +void FAMILY_Bank(int fd, int meindex, char *message) +{ + char token[128], token2[128], buf[1024]; + int fmindex, cash, bank, toBank; + int MaxGold; + MaxGold = CHAR_getMaxHaveGold( meindex); + fmindex = CHAR_getInt( meindex, CHAR_FMINDEX); + // add shan + if( fmindex <= 0 && CHAR_getInt( meindex, CHAR_BANKGOLD) < 1) { + CHAR_talkToCli( meindex, -1, "你必须先加入家族。", CHAR_COLORWHITE); + return; + } + + if (getStringFromIndexWithDelim(message, "|", 2, token, sizeof(token)) == FALSE) + return; + + if( strcmp(token, "G" )==0 ) { + if (getStringFromIndexWithDelim(message, "|", 3, token2, sizeof(token)) == FALSE) + return; + + toBank = atoi( token2 ); + cash = CHAR_getInt( meindex, CHAR_GOLD); + bank = CHAR_getInt( meindex, CHAR_BANKGOLD); + if( ((cash - toBank) >= 0) && ((cash - toBank) <= MaxGold ) + &&((bank + toBank) >= 0)&&((bank + toBank) <= CHAR_MAXBANKGOLDHAVE) ) { + // shan add + if( toBank > 0 && CHAR_getInt( meindex, CHAR_FMINDEX ) < 1 ) { + sprintf(buf, "抱歉!你没有加入任何家族,所以仅能领取存款"); + CHAR_talkToCli( meindex, -1, buf, CHAR_COLORWHITE); + return; + } + + CHAR_setInt( meindex, CHAR_GOLD, cash - toBank); + CHAR_setInt( meindex, CHAR_BANKGOLD, bank + toBank); + CHAR_send_P_StatusString( meindex , CHAR_P_STRING_GOLD); + + if( toBank >= 0 ) { + sprintf(buf, "存入%d到家族银行个人帐户。", toBank); + CHAR_talkToCli( meindex, -1, buf, CHAR_COLORWHITE); + // Syu ADD 新增家族个人银行存取Log (不含家族银行) + LogFamilyBankStone( + CHAR_getChar( meindex, CHAR_NAME ), + CHAR_getChar( meindex, CHAR_CDKEY ), + toBank, + CHAR_getInt( meindex, CHAR_GOLD ), + "myBank(存款)(家族个人银行)", + CHAR_getInt( meindex,CHAR_FLOOR), + CHAR_getInt( meindex,CHAR_X ), + CHAR_getInt( meindex,CHAR_Y ), + CHAR_getInt( meindex,CHAR_BANKGOLD) + ); + + } + else { + sprintf(buf, "从家族银行个人帐户取出%d。", -toBank); + CHAR_talkToCli( meindex, -1, buf, CHAR_COLORWHITE); + // Syu ADD 新增家族个人银行存取Log (不含家族银行) + LogFamilyBankStone( + CHAR_getChar( meindex, CHAR_NAME ), + CHAR_getChar( meindex, CHAR_CDKEY ), + toBank, + CHAR_getInt( meindex, CHAR_GOLD ), + "myBank(提款)(家族个人银行)", + CHAR_getInt( meindex,CHAR_FLOOR), + CHAR_getInt( meindex,CHAR_X ), + CHAR_getInt( meindex,CHAR_Y ), + CHAR_getInt( meindex,CHAR_BANKGOLD) + ); + + } + // Syu ADD 新增家族个人银行存取Log (不含家族银行) + LogStone( + -1, + CHAR_getChar( meindex, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( meindex, CHAR_CDKEY ), /* 交□扒□ID */ + -toBank, /* 嗯喊 */ + CHAR_getInt( meindex, CHAR_GOLD ), + "myBank(家族个人银行)", + CHAR_getInt( meindex,CHAR_FLOOR), + CHAR_getInt( meindex,CHAR_X ), + CHAR_getInt( meindex,CHAR_Y ) + ); + + } + else + print(" bank_error "); + + } + if( strcmp(token, "I" )==0 ) { + + } + if( strcmp(token, "T" )==0 ) { + int toTax; + int mygold; + int FMindex; + + if (getStringFromIndexWithDelim(message, "|", 3, token2, sizeof(token)) == FALSE) + return; + toTax = atoi( token2 ); + +#ifdef _FMVER21 + if( CHAR_getInt( meindex, CHAR_FMLEADERFLAG ) != FMMEMBER_LEADER && + CHAR_getInt( meindex, CHAR_FMLEADERFLAG ) != FMMEMBER_ELDER && toTax < 0 ) + return; +#endif + + + FMindex = CHAR_getWorkInt( meindex, CHAR_WORKFMINDEXI ); + mygold = CHAR_getInt( meindex, CHAR_GOLD); + if( mygold < 0 || mygold > MaxGold || toTax == 0 ) return; + if( toTax > 0 ) {//+存款 + if( ((mygold-toTax) < 0) || (familyTax[ FMindex] + toTax) > CHAR_MAXFMBANKGOLDHAVE ) { + return; + } + }else if( toTax < 0 ){ //-取款 + if( ((mygold-toTax)>MaxGold) || (familyTax[ FMindex] + toTax) < 0 ) { + return; + } + } + + + if( toTax>0 ) { //存款预先扣款 + CHAR_setInt( meindex, CHAR_GOLD, CHAR_getInt( meindex, CHAR_GOLD)-toTax ); + } + sprintf( buf, "家族银行%s处理中....", (toTax>0)?"存款":"取款"); + CHAR_talkToCli( meindex , -1, buf, CHAR_COLORYELLOW); + + CHAR_send_P_StatusString( meindex , CHAR_P_STRING_GOLD); + sprintf( buf, "%d", toTax ); + + saacproto_ACFixFMData_send(acfd, + CHAR_getChar(meindex, CHAR_FMNAME), + CHAR_getInt(meindex, CHAR_FMINDEX), + CHAR_getWorkInt(meindex, CHAR_WORKFMINDEXI), FM_FIX_FMGOLD, buf, + "", CHAR_getWorkInt(meindex, CHAR_WORKFMCHARINDEX), CONNECT_getFdid(fd)); +#ifdef _FAMILYBANKSTONELOG + saacproto_ACgetFMBankgold_send(acfd, + CHAR_getChar(meindex, CHAR_FMNAME), + CHAR_getInt(meindex, CHAR_FMINDEX), + CHAR_getWorkInt(meindex, CHAR_WORKFMINDEXI), + CHAR_getWorkInt(meindex, CHAR_WORKFMCHARINDEX), CONNECT_getFdid(fd)); +#endif + //print(" getTax:%s=%d ", CHAR_getChar(meindex, CHAR_FMNAME), toTax ); + } +} + +void ACFMPointList(int ret, char *data) +{ +} + + +#ifdef _CK_ONLINE_PLAYER_COUNT // WON ADD 计算线上人数 +void GS_SEND_PLAYER_COUNT(void) +{ + int i, count = 0; + int playernum = CHAR_getPlayerMaxNum(); + + for( i = 0 ; i < playernum ; i++) { + if( CHAR_getCharUse(i) != FALSE ) count++; + } + + saacproto_GS_PLAYER_COUNT_SEND(acfd, count); +} +#endif + + + + + +void FAMILY_SetPoint(int fd, int meindex, char *message) +{ + int i, fmpointindex, fl, x, y, fmdp, fmlevel = 0; + char token[128], buf[1024]; + + if (!CHAR_CHECKINDEX(meindex)) return; + + if (CHAR_getWorkInt(meindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE) + return; + + if ((CHAR_getInt(meindex, CHAR_FMINDEX) == -1) + || (strcmp(CHAR_getChar(meindex, CHAR_FMNAME), "") == 0) +#ifdef _FMVER21 + || (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != FMMEMBER_LEADER)) +#else + || (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != 1)) +#endif + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n你不是族长,所以没有修改的权力唷!", buf, sizeof(buf))); + return; + } + fmdp = CHAR_getWorkInt(meindex, CHAR_WORKFMDP); + for (i = 0; i < arraysizeof(fmdplevelexp); i++){ + if (fmdp < fmdplevelexp[i + 1] && fmdp >= fmdplevelexp[i]){ + fmlevel = i; + } + } +#ifndef _ACFMPK_NOFREE + if (fmlevel < MINFMLEVLEFORPOINT){// or 人数小於30人 + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n家族等级尚未到达申请家族据点的条件!", buf, sizeof(buf))); + return; + } +#endif + for (i = 1; i <= MANORNUM; i++) { + if (((strcmp(fmpks[i * MAX_SCHEDULE + 1].guest_name, + CHAR_getChar(meindex, CHAR_FMNAME)) == 0)) + && ((fmpks[i * MAX_SCHEDULE + 1].flag = FMPKS_FLAG_MANOR_BATTLEBEGIN) + || (fmpks[i * MAX_SCHEDULE + 1].flag == FMPKS_FLAG_MANOR_PREPARE))){ + char tmpbuf[256]; + sprintf(tmpbuf, "\n你跟%s已经有预约庄园争夺赛了~\n无法再申请庄园了喔!", + fmpks[i * MAX_SCHEDULE + 1].host_name); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString(tmpbuf, buf, sizeof(buf))); + return; + } + } + if (getStringFromIndexWithDelim(message, "|", 2, token, + sizeof(token)) == FALSE) return; + fmpointindex = atoi(token); + if (getStringFromIndexWithDelim(message, "|", 3, token, + sizeof(token)) == FALSE) return; + fl = atoi(token); + if (getStringFromIndexWithDelim(message, "|", 4, token, + sizeof(token)) == FALSE) return; + x = atoi(token); + if (getStringFromIndexWithDelim(message, "|", 5, token, + sizeof(token)) == FALSE) return; + y = atoi(token); +/* + print("SetFMPoint charname:%s fmindex:%d index:%d pointindex:%d fl:%d x:%d y:%d\n", + CHAR_getChar(meindex, CHAR_FMNAME), + CHAR_getInt(meindex, CHAR_FMINDEX), + CHAR_getWorkInt(meindex, CHAR_WORKFMINDEXI), + fmpointindex, fl, x, y); +*/ + saacproto_ACSetFMPoint_send(acfd, + CHAR_getChar(meindex, CHAR_FMNAME), + CHAR_getInt(meindex, CHAR_FMINDEX), + CHAR_getWorkInt(meindex, CHAR_WORKFMINDEXI), + fmpointindex, fl, x, y, CONNECT_getFdid(fd)); +} + +void ACSetFMPoint(int ret, int r, int clifd) +{ + int meindex = CONNECT_getCharaindex(clifd); + char message[256], buf[512]; + + if (!CHAR_CHECKINDEX(meindex)) return; + + if ((CHAR_getWorkInt(meindex, CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE) + || (CHAR_getWorkInt(meindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE)) + return; + if (ret == 0){ + if (r == -1) + sprintf(message, "申请家族失败!"); + else if (r == -2) + sprintf(message, "你已经有家族据点了~不得重复申请!"); + else if (r == -3) + sprintf(message, "尚未到达申请家族据点的资格!"); + else if (r == -4) + sprintf(message, "家族据点已经有家族在使用中罗!"); + else if (r == -5) + sprintf(message, "您的家族人数未达申请标准唷!"); + } + else if (ret == 1) + sprintf(message, "申请家族据点OK!"); + + lssproto_WN_send( clifd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString(message, buf, sizeof(buf))); +} + +void ACFMAnnounce(int ret, char *fmname, int fmindex, int index, + int kindflag, char *data, int color) +{ + // kindflag 1:族长广播 2:系统公告家族被删除 3:系统通知讯息 + int i, chindex; + if( ret != 1 ) return; +// print("fmname:%s fmindex:%d index:%d kindflag:%d data:%s color:%d\n", +// fmname, fmindex, index, kindflag, data, color); + for( i=0; i < FAMILY_MAXMEMBER; i++) + { + chindex = familyMemberIndex[index][i]; + if( chindex >= 0 ) { + if( CHAR_getCharUse(chindex) ) + { + if (kindflag == 1) + { +#ifdef _FMVER21 + // shan 2001/12/13 + //if( CHAR_getInt( chindex, CHAR_FMLEADERFLAG ) == FMMEMBER_MEMBER ) + if( CHAR_getInt( chindex, CHAR_FMLEADERFLAG ) == FMMEMBER_MEMBER || + CHAR_getInt( chindex, CHAR_FMLEADERFLAG ) == FMMEMBER_ELDER ) +#else + if( CHAR_getInt( chindex, CHAR_FMLEADERFLAG ) == 2 ) +#endif + CHAR_talkToCli( chindex, -1, data, color ); + } + else if (kindflag == 2) + { + int fd = getfdFromCharaIndex( chindex ); + if (fd == -1) return; + SetFMVarInit( chindex ); + CHAR_talkToCli( chindex , -1, "由於您的家族在七天之内没有召收到10名家族成员,所以被迫解散了!", + CHAR_COLORRED); + } + } + else + familyMemberIndex[index][i] = -1; + } + } + if (kindflag == 3) + { + int meindex = 0; + int clifd = getfdFromFdid(color); + if (CONNECT_checkfd(clifd) == FALSE) return; + meindex = CONNECT_getCharaindex(clifd); + if (!CHAR_CHECKINDEX(meindex)) return; + CHAR_talkToCli(meindex, -1, data, CHAR_COLORRED); + } + if (kindflag == 4) + { + int meindex = 0; + char buf[1024]; + int clifd = getfdFromFdid(color); +// print("Here1\n"); + if (CONNECT_checkfd(clifd) == FALSE) return; + meindex = CONNECT_getCharaindex(clifd); + if (!CHAR_CHECKINDEX(meindex)) return; +// print("Here2\n"); + lssproto_WN_send(clifd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString(data, buf, sizeof(buf))); + } +} + +void FAMILY_SetAcceptFlag(int fd, int meindex, char *message) +{ + int result; + char token[128], buf[1024]; + + if (!CHAR_CHECKINDEX(meindex)) return; + + if ((CHAR_getWorkInt(meindex, CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE) + || (CHAR_getWorkInt(meindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE)) + return; + + if ((CHAR_getInt(meindex, CHAR_FMINDEX) == -1) + || (strcmp(CHAR_getChar(meindex, CHAR_FMNAME), "") == 0) +#ifdef _FMVER21 +// || ((CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != FMMEMBER_LEADER) +// && (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != FMMEMBER_ELDER) +// && (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != FMMEMBER_VICELEADER))) + || ((CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != FMMEMBER_LEADER) + && (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != FMMEMBER_ELDER))) +#else + || (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != 1)) +#endif + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n你不是族长,所以没有修改的权力唷!", buf, sizeof(buf))); + return; + } + + if (getStringFromIndexWithDelim(message, "|", 2, token, + sizeof(token)) == FALSE) return; + result = atoi(token); + if ((result == 0) || (result == 1)) + { + saacproto_ACFixFMData_send(acfd, + CHAR_getChar(meindex, CHAR_FMNAME), + CHAR_getInt(meindex, CHAR_FMINDEX), + CHAR_getWorkInt(meindex, CHAR_WORKFMINDEXI), FM_FIX_ACCEPTFLAG, + token, "", CHAR_getWorkInt(meindex, CHAR_WORKFMCHARINDEX), + CONNECT_getFdid(fd)); + } +} + +void FAMILY_FixRule( int fd, int meindex, char* message ) +{ + + char token[1024], buf[1024]; + + if (!CHAR_CHECKINDEX(meindex))return; + + if ((CHAR_getInt(meindex, CHAR_FMINDEX) == -1) + || (strcmp(CHAR_getChar(meindex, CHAR_FMNAME), "") == 0) +#ifdef _FMVER21 + || (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != FMMEMBER_LEADER)) +#else + || (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != 1)) +#endif + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n你不是族长,所以没有修改的权力唷!", buf, sizeof(buf))); + return; + } + + if (getStringFromIndexWithDelim(message, "|", 2, token, + sizeof(token)) == FALSE) return; + + if( strcmp( token, "R") == 0 ) + { + if (getStringFromIndexWithDelim(message, "|", 3, buf, + sizeof( buf ) ) == FALSE)return; + + if (strcmp( buf, "") == 0) + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n家族主旨不可为空白唷!", buf, sizeof(buf))); + return; + } + +// print(" new_rule:%s ", buf); + saacproto_ACFixFMData_send(acfd, + CHAR_getChar(meindex, CHAR_FMNAME), + CHAR_getInt(meindex, CHAR_FMINDEX), + CHAR_getWorkInt(meindex, CHAR_WORKFMINDEXI), FM_FIX_FMRULE, + buf, "", CHAR_getWorkInt(meindex, CHAR_WORKFMCHARINDEX), + CONNECT_getFdid(fd)); + return; + } + if( strcmp( token, "P") == 0 ) + { + int havepetindex, petindex, i; + char petname[20], petattr[512]; + + // 检查是否已有守护兽 + for( i =0; i< CHAR_MAXPETHAVE; i++ ) + { + int petindex = CHAR_getCharPet(meindex, i); + if (!CHAR_CHECKINDEX(petindex)) continue; + if( CHAR_getInt( petindex , CHAR_PETFAMILY ) ==1 ) + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n原本的守护兽还在唷。", buf, sizeof(buf))); + return; + } + } + // 检查是否已有守护兽(寄宠) + for( i =0; i< CHAR_MAXPOOLPETHAVE; i++ ) + { + int petindex = CHAR_getCharPoolPet(meindex, i); + if (!CHAR_CHECKINDEX(petindex)) continue; + if( CHAR_getInt( petindex , CHAR_PETFAMILY ) ==1 ) + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n原本的守护兽还在唷。", buf, sizeof(buf))); + return; + } + } + + if (getStringFromIndexWithDelim(message, "|", 3, buf, + sizeof( buf ) ) == FALSE) return; + havepetindex = atoi( buf ); + + petindex = CHAR_getCharPet(meindex, havepetindex); + + if (!CHAR_CHECKINDEX(petindex)) return; + + if (strlen(CHAR_getChar(petindex, CHAR_USERPETNAME)) == 0) + sprintf(petname, "%s", CHAR_getChar(petindex, CHAR_NAME)); + else + sprintf(petname, "%s", CHAR_getChar(petindex, CHAR_USERPETNAME)); + sprintf(petattr, "%d %d %d %d", + CHAR_getInt(petindex, CHAR_BASEIMAGENUMBER), + CHAR_getWorkInt(petindex, CHAR_WORKATTACKPOWER), + CHAR_getWorkInt(petindex, CHAR_WORKDEFENCEPOWER), + CHAR_getWorkInt(petindex, CHAR_WORKQUICK)); + + CHAR_setInt(petindex, CHAR_PETFAMILY, 1); + saacproto_ACFixFMData_send(acfd, + CHAR_getChar(meindex, CHAR_FMNAME), + CHAR_getInt(meindex, CHAR_FMINDEX), + CHAR_getWorkInt(meindex, CHAR_WORKFMINDEXI), FM_FIX_FMPET, + petname, petattr, CHAR_getWorkInt(meindex, CHAR_WORKFMCHARINDEX), + CONNECT_getFdid(fd)); + return; + + } + +} + +void JoinMemberIndex( int meindex, int fmindexi ) +{ + int i; + + for( i = 0 ; i < FAMILY_MAXMEMBER; i++){ + if( familyMemberIndex[fmindexi][i] == meindex ) familyMemberIndex[fmindexi][i] = -1; + } + + for( i = 0 ; i < FAMILY_MAXMEMBER; i++){ + if( familyMemberIndex[fmindexi][i] < 0 ){ + familyMemberIndex[fmindexi][i] = meindex; + break; + } + } +#ifdef _CHANNEL_MODIFY + i = 0; + // 先清掉旧的频道记录 + while(i < FAMILY_MAXMEMBER){ + if(channelMember[fmindexi][0][i] == meindex){ + channelMember[fmindexi][0][i] = -1; + } + i++; + } + i = 0; + // 加入频道 + while(i < FAMILY_MAXMEMBER){ + if(channelMember[fmindexi][0][i] == -1){ + channelMember[fmindexi][0][i] = meindex; + CHAR_setWorkInt(meindex,CHAR_WORKFMCHANNEL,0); + break; + } + i++; + } +#endif +} + +void LeaveMemberIndex( int meindex, int fmindexi ) +{ + int i; + + for( i = 0 ; i < FAMILY_MAXMEMBER; i++){ + if( familyMemberIndex[fmindexi][i] == meindex ) familyMemberIndex[fmindexi][i] = -1; + } +#ifdef _CHANNEL_MODIFY + i = 0; + // 清掉旧的频道记录 + while(i < FAMILY_MAXMEMBER){ + if(channelMember[fmindexi][0][i] == meindex){ + channelMember[fmindexi][0][i] = -1; + } + i++; + } +#endif +} + +void FAMILY_RidePet( int fd, int meindex, char* message ) +{ + char token[64], token2[64]; + int petindex, rideGraNo = 0, leaderimageNo; + // Arminius 8.25 recover + int i; +#ifndef _NEW_RIDEPETS + int big4fm = 0; +#endif + if (!CHAR_CHECKINDEX(meindex))return; + + // Robin fix 战斗中不可骑 + if( CHAR_getWorkInt( meindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE ) return; + +#ifdef _PETSKILL_BECOMEPIG + if( CHAR_getInt( meindex, CHAR_BECOMEPIG) > -1 ){ //处於乌力化状态 + CHAR_setInt( meindex, CHAR_RIDEPET, -1 ); + //宠物选项的状态依然为"骑乘",这里修正过来 + CHAR_complianceParameter( meindex ); + CHAR_send_P_StatusString( meindex, CHAR_P_STRING_RIDEPET); + return; + } +#endif + + if( CHAR_getWorkInt( meindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE) return; + + if (getStringFromIndexWithDelim(message, "|", 2, token, sizeof(token)) == FALSE) return; + + if( strcmp( token, "P") == 0) { + if (getStringFromIndexWithDelim(message, "|", 3, token2, sizeof(token2)) == FALSE) + return; + + if( atoi(token2) != -1 ) { + petindex = CHAR_getCharPet( meindex, atoi( token2 ) ); + if(!CHAR_CHECKINDEX(petindex))return; + + if( CHAR_getInt( meindex, CHAR_DEFAULTPET ) == atoi( token2 ) ) return; + if( CHAR_getInt( meindex, CHAR_RIDEPET) != -1 ) return; + if( CHAR_getInt( meindex, CHAR_LEARNRIDE) < CHAR_getInt( petindex, CHAR_LV ) ) return; + if( CHAR_getWorkInt( petindex, CHAR_WORKFIXAI ) < 100 )return; + if( CHAR_getInt( meindex, CHAR_LV)+5 < CHAR_getInt( petindex, CHAR_LV ) ) return; +#ifdef _PET_2TRANS + if( CHAR_getInt( petindex, CHAR_TRANSMIGRATION) > 2 ) return; +#endif + leaderimageNo = 100700 + + ((CHAR_getInt( meindex, CHAR_BASEBASEIMAGENUMBER)-100000)/20)*10 + + CHAR_getInt( meindex, CHAR_FMSPRITE)*5; +#ifndef _NEW_RIDEPETS + switch( CHAR_getWorkInt( meindex, CHAR_WORKFMFLOOR) ){ + case 1041: + big4fm = 1; + break; + case 2031: + big4fm = 2; + break; + case 3031: + big4fm = 3; + break; + case 4031: + big4fm = 4; + break; + default: + big4fm = 0; + } +#endif + // Arminius 8.25 recover + for( i=0; i< arraysizeof(ridePetTable) ; i++ ){ +#ifdef _NEW_RIDEPETS + if( (( CHAR_getInt( meindex, CHAR_BASEIMAGENUMBER) == ridePetTable[i].charNo ) || + ( CHAR_getInt( meindex, CHAR_BASEBASEIMAGENUMBER) == ridePetTable[i].charNo )) +#else + if( ( CHAR_getInt( meindex, CHAR_BASEBASEIMAGENUMBER) == ridePetTable[i].charNo ) +#endif + && ( CHAR_getInt( petindex, CHAR_BASEBASEIMAGENUMBER) == ridePetTable[i].petNo ) ){ + rideGraNo = ridePetTable[i].rideNo; + break; + } +#ifndef _NEW_RIDEPETS + if( ( leaderimageNo == ridePetTable[i].charNo ) + && ( CHAR_getInt( petindex, CHAR_BASEBASEIMAGENUMBER) == ridePetTable[i].petNo ) +#ifdef _EVERYONE_RIDE + && big4fm != 0 + && CHAR_getInt( meindex, CHAR_FMLEADERFLAG ) != FMMEMBER_NONE + && CHAR_getInt( meindex, CHAR_FMLEADERFLAG ) != FMMEMBER_APPLY ){ +#else + && CHAR_getInt( meindex, CHAR_FMLEADERFLAG ) == FMMEMBER_LEADER ){ +#endif + rideGraNo = ridePetTable[i].rideNo; + break; + } +#endif + } + +#ifdef _NEW_RIDEPETS + if( rideGraNo == 0 ) { + int ti=-1, index, image=-1; + int petNo = CHAR_getInt( petindex, CHAR_BASEBASEIMAGENUMBER); + int playerNo = CHAR_getInt( meindex, CHAR_BASEBASEIMAGENUMBER); + + int playerlowsride = CHAR_getInt( meindex, CHAR_LOWRIDEPETS); + if( (ti = RIDEPET_getPETindex( petNo, playerlowsride )) >= 0 ) { + if( (index = RIDEPET_getNOindex( playerNo)) >= 0 ){ + if( (image = RIDEPET_getRIDEno( index,ti)) >= 0 ) { + rideGraNo = image; + } + } + } + } +#endif + + if( rideGraNo != 0 ){ +#ifdef _ITEM_METAMO + // CHAR_setWorkInt( meindex, CHAR_WORKITEMMETAMO, 0); +#endif + CHAR_setInt( meindex , CHAR_RIDEPET, atoi( token2 ) ); + CHAR_setInt( meindex , CHAR_BASEIMAGENUMBER , rideGraNo ); + CHAR_complianceParameter( meindex ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX )); + CHAR_send_P_StatusString( meindex, CHAR_P_STRING_RIDEPET ); + }else + return; + }else { //还原人物 basebaseimage + CHAR_setInt( meindex , CHAR_RIDEPET, -1 ); + CHAR_setInt( meindex , CHAR_BASEIMAGENUMBER , CHAR_getInt( meindex , CHAR_BASEBASEIMAGENUMBER) ); + CHAR_complianceParameter( meindex ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX )); + CHAR_send_P_StatusString( meindex , CHAR_P_STRING_RIDEPET); + } + } + +} + +void ACFixFMPK(int winindex, int loseindex, int data) +{ + int i = 0, charindex = 0; + char msg1[256], msg2[256]; + + sprintf(msg1, "恭喜您!家族声望提高了%8d点!", (data / 100)); + sprintf(msg2, "家族声望减少了%8d点!", (data / 100)); + for (i = 0; i < FAMILY_MAXMEMBER; i++) + { + charindex = familyMemberIndex[winindex][i]; + if( charindex >= 0 ) { + if( CHAR_getCharUse(charindex) ) + CHAR_talkToCli( charindex , -1, msg1, CHAR_COLORYELLOW); + else + familyMemberIndex[winindex][i] = -1; + } + charindex = familyMemberIndex[loseindex][i]; + if( charindex >= 0 ) { + if( CHAR_getCharUse(charindex) ) + CHAR_talkToCli( charindex , -1, msg2, CHAR_COLORRED); + else + familyMemberIndex[loseindex][i] = -1; + } + } +} + +void getNewFMList() +{ + saacproto_ACShowFMList_send( acfd ); +} + +//int channelMember[FAMILY_MAXNUM][FAMILY_MAXCHANNEL][FAMILY_MAXMEMBER]; +//int familyMemberIndex[FAMILY_MAXNUM][FAMILY_MAXMEMBER]; + + +#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令 +int get_fm_leader_index( int fm1 ) +{ + int charindex = -1; + + charindex = familyMemberIndex[fm1][0]; + + return charindex; + +} +#endif + + +void checkFamilyIndex( void ) +{ + int i, j, k, charaindex, err1=0, err2=0; +// print(" checkFamilyIndex! "); + + for( i=0; i 0 ){ + if( fmindex_wk < 0 || fmindex_wk >= FAMILY_MAXNUM){ + print("FamilyNumber Data Error!!"); + return; + } + } + saacproto_ACShowMemberList_send( acfd, fmindex_wk); + + sprintf( sendbuf, " 『族 长 需 知』\n请小心处理族员的资料,一经修改後就无法回复原态,敬请小心。"); + + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + CHAR_WINDOWTYPE_FM_MESSAGE2, + CHAR_getWorkInt( leaderdengonindex, CHAR_WORKOBJINDEX), + makeEscapeString( sendbuf, buf, sizeof(buf))); + } + if( strcmp( token, "L") == 0 ){ + int i, kind, letterNo = 0; + char subtoken[256]; + +#ifdef _FMVER21 +// if( CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != FMMEMBER_LEADER && +// CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != FMMEMBER_INVITE && +// CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != FMMEMBER_VICELEADER) return; + if( CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != FMMEMBER_LEADER && + CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != FMMEMBER_ELDER ) return; +#else + if( CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != 1) return; +#endif + + if (getStringFromIndexWithDelim(message, "|", 3, token2, + sizeof(token2)) == FALSE) return; + kind = atoi( token2 ); + + for( i=0 ; i= 0 && tempindex != meindex ) + { + char tmpbuf[1024]; + sprintf(tmpbuf, "%s", CHAR_getChar(tempindex, CHAR_NAME)); + makeEscapeString( tmpbuf, buf, sizeof(buf)); + sprintf( subsub, "|%d|%s", j, buf ); + strcat( subbuf, subsub ); + num++; + } + } + sprintf( sendbuf, "L|CHANGE|L|%d%s", num, subbuf ); + //lssproto_FM_send( fd, sendbuf); + + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_LEADERSELECT, + WINDOW_BUTTONTYPE_OK, + -1, -1, + sendbuf ); + + } + // 询问族长候选人是否愿意接受 + if( strcmp( token2, "Q") == 0 ) + { + char token3[64], token4[64]; + int toindex; + +#ifdef _FMVER21 + if( CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != FMMEMBER_LEADER) return; +#else + if( CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != 1) return; +#endif + if (getStringFromIndexWithDelim(message, "|", 4, token3, + sizeof(token3)) == FALSE)return; + if (getStringFromIndexWithDelim(message, "|", 5, token4, + sizeof(token4)) == FALSE)return; + makeStringFromEscaped( token4 ); + + if( atoi(token3) < 0 || atoi(token3) > FAMILY_MAXMEMBER ) return; + + toindex = familyMemberIndex[fmindexi][atoi(token3)]; + if( !CHAR_CHECKINDEX( toindex ) ) return; + if( strcmp( token4, CHAR_getChar( toindex, CHAR_NAME)) != 0 ) return; + if( CheckLeaderQ(toindex) < 0 ) return; + + // 双方都决定让位时,CHAR_WORKLEADERCHANGE存放对方的charaindex + CHAR_setWorkInt( toindex, CHAR_WORKLEADERCHANGE, meindex); + CHAR_setWorkInt( meindex, CHAR_WORKLEADERCHANGE, toindex); + + sprintf( sendbuf, "%s|%d", makeEscapeString( CHAR_getChar( meindex, CHAR_NAME ), buf, sizeof(buf)), meindex ); + + lssproto_WN_send( CHAR_getWorkInt( toindex, CHAR_WORKFD ), WINDOW_MESSAGETYPE_LEADERSELECTA, + WINDOW_BUTTONTYPE_OK, + -1, -1, + sendbuf ); + + } + // 候选人的答覆 + if( strcmp( token2, "A") == 0 ) + { + int leaderindex, answerflag; + char leadername[64], token3[64], token4[64]; + +// print( "%s", message ); + + if (getStringFromIndexWithDelim(message, "|", 4, token3, + sizeof(token3)) == FALSE) return; + answerflag = atoi( token3 ); + + if (getStringFromIndexWithDelim(message, "|", 5, leadername, + sizeof( leadername )) == FALSE)return; + makeStringFromEscaped( leadername ); + + if (getStringFromIndexWithDelim(message, "|", 6, token4, + sizeof(token4)) == FALSE)return; + + //if( atoi(token4) < 0 || atoi(token4) > FAMILY_MAXMEMBER ) return; + + leaderindex = atoi( token4 ); + + // 检查双方的CHAR_WORKLEADERCHANGE是否相符 + if( CHAR_getWorkInt( meindex, CHAR_WORKLEADERCHANGE ) != leaderindex ) return; + if( !CHAR_CHECKINDEX(leaderindex) ) return; + if( strcmp( leadername, CHAR_getChar( leaderindex, CHAR_NAME) ) != 0 ) return; + if( CHAR_getWorkInt( leaderindex, CHAR_WORKLEADERCHANGE ) != meindex ) return; + CHAR_setWorkInt( leaderindex, CHAR_WORKLEADERCHANGE, -1 ); +#ifdef _FMVER21 + if( CHAR_getInt(leaderindex, CHAR_FMLEADERFLAG ) != FMMEMBER_LEADER ) return; +#else + if( CHAR_getInt(leaderindex, CHAR_FMLEADERFLAG ) != 1 ) return; +#endif + if( CHAR_getInt(meindex, CHAR_FMINDEX) != CHAR_getInt(leaderindex, CHAR_FMINDEX) ) return; + + if( answerflag == 0 ) + { + CHAR_setWorkInt( meindex, CHAR_WORKLEADERCHANGE, 0); + CHAR_setWorkInt( leaderindex, CHAR_WORKLEADERCHANGE, 0); + lssproto_WN_send( CHAR_getWorkInt( leaderindex, CHAR_WORKFD) , WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n对不起!对方不愿意接受!", buf, sizeof(buf)) ); + return; + } + + if( answerflag == 1 ) + { + char tmpbuf[1024]; + sprintf( buf, "%d", CHAR_getInt( meindex, CHAR_FACEIMAGENUMBER ) ); + // CoolFish: add charname 2001/9/27 + sprintf( tmpbuf, "%s", CHAR_getChar( meindex, CHAR_NAME ) ); + saacproto_ACFixFMData_send(acfd, + CHAR_getChar(meindex, CHAR_FMNAME), + CHAR_getInt(meindex, CHAR_FMINDEX), + CHAR_getWorkInt(meindex, CHAR_WORKFMINDEXI), FM_FIX_FMLEADERCHANGE , buf, + tmpbuf, CHAR_getWorkInt(meindex, CHAR_WORKFMCHARINDEX), CONNECT_getFdid(fd)); + // "", CHAR_getWorkInt(meindex, CHAR_WORKFMCHARINDEX), CONNECT_getFdid(fd)); + return; + } + } + } +} + +void ACFMJob( int fd, int ret, char* data1, char* data2 ) +{ + + int charaindex = CONNECT_getCharaindex( fd ); + if( !CHAR_CHECKINDEX(charaindex) ) return; + + + if( 1 ){ + + int leaderindex = CHAR_getWorkInt( charaindex, CHAR_WORKLEADERCHANGE ); + char buf[256], buf2[256]; + + CHAR_setWorkInt( charaindex, CHAR_WORKLEADERCHANGE, 0 ); + print("leaderindex:%d:%s\n", leaderindex,CHAR_getChar(leaderindex,CHAR_NAME) ); + + if( !CHAR_CHECKINDEX(leaderindex) ) return; + //if( CHAR_getWorkInt( leaderindex, CHAR_WORKLEADERCHANGE ) != charaindex ) return; + CHAR_setWorkInt( leaderindex, CHAR_WORKLEADERCHANGE, 0 ); + + if( ret == 0 ){ + CHAR_talkToCli( charaindex, -1, "族长让位失败!", CHAR_COLORYELLOW ); + CHAR_talkToCli( leaderindex, -1, "族长让位失败!", CHAR_COLORYELLOW ); + return; + } + + // Robin 10/02 debug + if( CHAR_getInt( leaderindex, CHAR_FMINDEX) != CHAR_getInt( charaindex, CHAR_FMINDEX) +#ifdef _FMVER21 + // || CHAR_getInt( leaderindex, CHAR_FMLEADERFLAG) != FMMEMBER_LEADER ) +#else + // || CHAR_getInt( leaderindex, CHAR_FMLEADERFLAG) != 1 +#endif + ) + { + sprintf( buf, "leaderindex:%d:%s\n", leaderindex, CHAR_getChar( leaderindex, CHAR_NAME) ); + LogFamily( + CHAR_getChar(charaindex, CHAR_FMNAME), + CHAR_getInt(charaindex, CHAR_FMINDEX), + CHAR_getChar(charaindex, CHAR_NAME), + CHAR_getChar(charaindex, CHAR_CDKEY), + "LEADERCHANGE_ERROR(族长让位失败)", + buf + ); + return; + } + + //CHAR_setInt( leaderindex, CHAR_FMLEADERFLAG, FMMEMBER_MEMBER); + //CHAR_setInt( charaindex, CHAR_FMLEADERFLAG, FMMEMBER_LEADER); + SetFMPetVarInit( leaderindex ); + SetFMPetVarInit( charaindex ); + CHAR_sendStatusString( leaderindex, "F"); + CHAR_sendStatusString( charaindex, "F"); + + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n恭喜你!你已经是新任的族长了。\n请好好的努力吧!\n对了~记得请先到村长家的家族管理员选择\n新的家族守护兽,否则家族将会被解散唷!", buf, sizeof(buf))); + + sprintf( buf2, "\n辛苦你了!你已经将族长的位子交给%s了。", CHAR_getChar( charaindex, CHAR_NAME) ); + lssproto_WN_send( CHAR_getWorkInt( leaderindex, CHAR_WORKFD) , WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( buf2, buf, sizeof(buf))); + +// print(" LeaderChange!! [%s]->[%s] ", CHAR_getChar(leaderindex, CHAR_CDKEY), CHAR_getChar(charaindex, CHAR_CDKEY) ); + + sprintf( buf, "%s\t%s\t%s", + CHAR_getChar(leaderindex, CHAR_FMNAME), + CHAR_getChar(leaderindex, CHAR_NAME), + CHAR_getChar(leaderindex, CHAR_CDKEY) + ); + + LogFamily( + CHAR_getChar(charaindex, CHAR_FMNAME), + CHAR_getInt(charaindex, CHAR_FMINDEX), + CHAR_getChar(charaindex, CHAR_NAME), + CHAR_getChar(charaindex, CHAR_CDKEY), + "LEADERCHANGE(族长让位)", + buf + ); + + } + +} + + +#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令 + +FM_PK_STRUCT fm_pk_struct; + +void setInt_fm_pk_struct( int index, int type, int num ) +{ + switch( type ){ + case FM_INDEX: + fm_pk_struct.fm_index[index] = num; + break; + case FM_WIN: + fm_pk_struct.fm_win[index] = num; + break; + case FM_LOSE: + fm_pk_struct.fm_lose[index] = num; + break; + case FM_SCORE: + fm_pk_struct.fm_score[index] = num; + break; + } +} + +void setChar_fm_pk_struct( int index, int type, char *msg ) +{ + switch( type ){ + case FM_NAME: + strcpy( fm_pk_struct.fm_name[index], msg ); + break; + } +} + +int getInt_fm_pk_struct( int index, int type ) +{ + switch( type ){ + case FM_INDEX: + return fm_pk_struct.fm_index[index]; + case FM_WIN: + return fm_pk_struct.fm_win[index]; + case FM_LOSE: + return fm_pk_struct.fm_lose[index]; + case FM_SCORE: + return fm_pk_struct.fm_score[index]; + } + + return -1; +} + +char *getChar_fm_pk_struct( int index, int type ) +{ + switch( type ){ + case FM_NAME: + return fm_pk_struct.fm_name[index]; + } + + return NULL; +} + +#endif diff --git a/gmsv/char/family.c.bak b/gmsv/char/family.c.bak new file mode 100644 index 0000000..c3b3f4e --- /dev/null +++ b/gmsv/char/family.c.bak @@ -0,0 +1,3048 @@ +#include "version.h" +#include +#include +#include +#include + +#include "readmap.h" +#include "object.h" +#include "char.h" +#include "char_base.h" +#include "lssproto_serv.h" +#include "saacproto_cli.h" +#include "npcutil.h" +#include "family.h" +#include "log.h" +#include "handletime.h" +#include "buf.h" +#include "net.h" +#include "char_base.h" +#include "battle.h" +#include "npc_bus.h" +#include "char_talk.h" +#include "npc_scheduleman.h" +#ifdef _FM_MODIFY +#include "npc_fmdengon.h" +#endif + +#define CHAR_MAXNAME 20 +#define CHAR_MAXID 20 +#define MINFMLEVLEFORPOINT 3 // 3 申请庄园最低等级 +#ifdef _FAMILY_MANORNUM_CHANGE +#else +#define MANORNUM 4 +#endif + +struct FAMILY +{ + int fmindex; + char name[CHAR_MAXNAME]; + char leadername[CHAR_MAXNAME]; + char leaderid[CHAR_MAXID]; + int leadergraph; + char petname[CHAR_MAXNAME]; + char petattr[256]; + int fmnum; + int acceptflag; + char rule[256]; + int village; + int pointindex; + int dp; + char memolist[35][100]; +}; + +int familyNumTotal = 0; +char familyListBuf[MAXFAMILYLIST]; + +int channelMember[FAMILY_MAXNUM][FAMILY_MAXCHANNEL][FAMILY_MAXMEMBER]; +int familyMemberIndex[FAMILY_MAXNUM][FAMILY_MAXMEMBER]; + +int familyTax[FAMILY_MAXNUM]; + +extern tagRidePetTable ridePetTable[146]; + +void LeaveMemberIndex( int charaindex, int fmindexi); + + +// Arminius: 取得家族 pk dp 增加/损失值 +// getFMdpAward +// arg: windp=winner's fmdp losedp=loser's fmdp +// ret: dp award +// +#ifdef _MERGE_NEW_8 +int fmdplevelexp[]={0, // 0 + 150000, // 1 + 500000, // 2 + 1000000, // 3 + 1500000, // 4 + 2000000, // 5 + 2500000, // 6 + 3500000, // 7 + 4500000, // 8 + 5000000, // 9 + 7000000 //10 + }; +#else +int fmdplevelexp[]={0, // 0 + 10000, // 1 + 30000, // 2 + 100000, // 3 + 500000, // 4 + 1500000, // 5 + 5000000, // 6 + 15000000, // 7 + 50000000, // 8 + 200000000, // 9 + 500000000 //10 + }; +#endif +// Arminius end + +// shan begin +int getFmLv(int playerindex) // 合成时专用 +{ + int i, dp; + dp = CHAR_getWorkInt(playerindex, CHAR_WORKFMDP); + if( dp > fmdplevelexp[10] ){ +// print("\n player DP->%d",dp); + return 10; + } + for(i=0; i<=10; i++) + if( dp <= fmdplevelexp[i+1] ) break; + // Nuke 20040217: Open the merge limit + //if(i>=9) i = 8; + if (i>=10) i=10; + + return i; +} + +#ifdef _MERGE_NEW_8 // 查询个人声望等级 +int famelevelexp[]={0, // 0 + 1500, // 1 + 3000, // 2 + 4500, // 3 + 7500, // 4 + 11000, // 5 + 14500, // 6 + 18000, // 7 + 25000, // 8 + 32000, // 9 + 39000 //10 + }; + +int getFameLv(int playerindex) // 合成时专用 +{ + int i, dp; + dp = CHAR_getWorkInt(playerindex, CHAR_FAME); + if( dp > famelevelexp[10] ){ + return 10; + } + for(i=0; i<=10; i++) + if( dp <= famelevelexp[i+1] ) break; + if (i>=10) i=10; + + return i; +} +#endif + +struct FMMEMBER_LIST memberlist[FAMILY_MAXNUM]; +struct FMS_MEMO fmsmemo; +struct FM_POINTLIST fmpointlist; +#ifdef _NEW_MANOR_LAW +ManorSchedule_t ManorSchedule[MANORNUM]; +#endif +struct FMS_DPTOP fmdptop; +struct FM_PKFLOOR fmpkflnum[FAMILY_FMPKFLOOR]= +{ + {142}, + {143}, + {144}, + {145}, + {146}, + {1042}, + {2032}, + {3032}, + {4032}, +#ifdef _FAMILY_MANORNUM_CHANGE // CoolFish 用来修改装园数量 + {5032}, + {6032}, + {7032}, + {8032}, + {9032}, +#endif +}; +int leaderdengonindex = 0; +// shan end 新增图层需到 family.h 增加 FAMILY_FMPKFLOOR 数量 + +void SetFMPetVarInit(int meindex) +{ + int i = 0, petindex = 0; +#ifdef _FMVER21 + if (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != FMMEMBER_LEADER) +#else + if (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != 1) +#endif + { + for (i = 0; i < CHAR_MAXPETHAVE; i++) + { + petindex = CHAR_getCharPet(meindex, i); + if (!CHAR_CHECKINDEX(petindex)) continue; + CHAR_setInt(petindex, CHAR_PETFAMILY, -1); + } + } +} + +void SetFMVarInit(int meindex) +{ + SetFMPetVarInit(meindex); // 清除守护兽 Flag + CHAR_setInt(meindex, CHAR_FMINDEX, -1); + CHAR_setChar(meindex, CHAR_FMNAME, ""); + CHAR_setInt(meindex, CHAR_FMSPRITE, -1); +#ifdef _FMVER21 + CHAR_setInt(meindex, CHAR_FMLEADERFLAG, FMMEMBER_NONE); +#else + CHAR_setInt(meindex, CHAR_FMLEADERFLAG, -1); +#endif + CHAR_setWorkInt(meindex, CHAR_WORKFMSETUPFLAG, -1); + CHAR_setWorkInt(meindex, CHAR_WORKFMINDEXI, -1); + CHAR_setWorkInt(meindex, CHAR_WORKFMCHARINDEX, -1); +} + +void FAMILY_Init( void ) +{ + int i, j ,k; + + for( i=0; i 0) return -1; + if (strcmp(CHAR_getChar(meindex, CHAR_FMNAME), "") != 0) return -1; +#ifdef _FMVER21 + if (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) == FMMEMBER_LEADER) return -1; +#else + if (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) == 1) return -1; +#endif + return 1; +} + +int CheckFMMember(int meindex) +{ + if (CHAR_getInt(meindex, CHAR_FMINDEX) > 0) return -1; + if (strcmp(CHAR_getChar(meindex, CHAR_FMNAME), "") != 0) return -1; +#ifdef _FMVER21 + if (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) > 0 && + CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != FMMEMBER_APPLY ) return -1; +#else + if (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) > 0 ) return -1; +#endif + return 1; +} + +int CheckLeaderQ(int meindex) +{ + if (CHAR_getInt(meindex, CHAR_LV) < FMLEADERLV + && CHAR_getInt(meindex, CHAR_TRANSMIGRATION) <= 0) + return -1; + if (!NPC_EventCheckFlg(meindex, 4)) + return -2; + return 0; +} + +void FAMILY_Add(int fd, int meindex, char* message) +{ + char token[128], fmname[128], charname[128], charid[128]; + char petname[128], fmrule[256], petattr[256], buf[1024]; + int charlv, havepetindex, petindex, fmsprite = 0, chargrano; + int gold, tmpflag; + + if (!CHAR_CHECKINDEX(meindex)) return; + + if (CHAR_getWorkInt(meindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE) + return; + if (CHAR_getInt(meindex, CHAR_FMINDEX) >= 0 + && strcmp(CHAR_getChar(meindex, CHAR_FMNAME), "") != 0) + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n你已经加入家族罗~无法再成立家族!", buf, sizeof(buf))); + return; + } + tmpflag = CheckLeaderQ(meindex); + if(tmpflag == -1) + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n很抱歉喔!你的等级不足!", buf, sizeof(buf))); + return; + } + + if(tmpflag == -2) + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n很抱歉喔!你必须先完成成人礼才行!", buf, sizeof(buf))); + return; + } + + gold = CHAR_getInt(meindex, CHAR_GOLD); + if( gold < 10000 ) + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n很抱歉喔!成立家族需要一万元石币的手续费!", buf, sizeof(buf))); + return; + } + else { + CHAR_setInt( meindex, CHAR_GOLD, gold-10000 ); + CHAR_send_P_StatusString( meindex , CHAR_P_STRING_GOLD); + } + + if (getStringFromIndexWithDelim(message, "|", 2, token, + sizeof(token)) == FALSE) return; + sprintf(fmname, "%s", token); + if ((strstr(fmname, " ")) || (strcmp(fmname, "") == 0) || (strstr(fmname, " "))) + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n家族的名称请勿输入空格!", buf, sizeof(buf))); + return; + } + if (getStringFromIndexWithDelim(message, "|", 3, token, + sizeof(token)) == FALSE) return; + havepetindex = atoi(token); + petindex = CHAR_getCharPet(meindex, havepetindex); + if (!CHAR_CHECKINDEX(petindex)) + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n请选择一只宠物作为家族守护兽!", buf, sizeof(buf))); + return; + } + if (getStringFromIndexWithDelim(message, "|", 4, token, + sizeof(token)) == FALSE) return; + fmsprite = atoi(token); + if (getStringFromIndexWithDelim(message, "|", 5, token, + sizeof(token)) == FALSE) return; + if (strcmp(token, "") == 0) + sprintf(fmrule, "无"); + else + sprintf(fmrule, "%s", token); + sprintf(charname, "%s", CHAR_getChar(meindex, CHAR_NAME)); + sprintf(charid, "%s", CHAR_getChar(meindex, CHAR_CDKEY)); + charlv = CHAR_getInt(meindex, CHAR_LV); + chargrano = CHAR_getInt(meindex, CHAR_FACEIMAGENUMBER); + if (strlen(CHAR_getChar(petindex, CHAR_USERPETNAME)) == 0) + sprintf(petname, "%s", CHAR_getChar(petindex, CHAR_NAME)); + else + sprintf(petname, "%s", CHAR_getChar(petindex, CHAR_USERPETNAME)); + sprintf(petattr, "%d %d %d %d", + CHAR_getInt(petindex, CHAR_BASEIMAGENUMBER), + CHAR_getWorkInt(petindex, CHAR_WORKATTACKPOWER), + CHAR_getWorkInt(petindex, CHAR_WORKDEFENCEPOWER), + CHAR_getWorkInt(petindex, CHAR_WORKQUICK)); + CHAR_setInt(petindex, CHAR_PETFAMILY, 1); + CHAR_setChar(meindex, CHAR_FMNAME, fmname); +#ifdef _FMVER21 + CHAR_setInt(meindex, CHAR_FMLEADERFLAG, FMMEMBER_LEADER); +#else + CHAR_setInt(meindex, CHAR_FMLEADERFLAG, 1); +#endif + CHAR_setInt(meindex, CHAR_FMSPRITE, fmsprite); + + // print("%s %s %s %d %s %s %s %d %d\n", fmname, charname, charid, charlv, petname, + // petattr, fmrule, fmsprite, chargrano); +#ifdef _PERSONAL_FAME + saacproto_ACAddFM_send(acfd, fmname, charname, charid, charlv, + petname, petattr, fmrule, fmsprite, chargrano, + CHAR_getInt(meindex, CHAR_FAME), CONNECT_getFdid(fd)); + // print("ACAddFM acfd:%d meindex:%d fmname:%s charname:%s fame:%d Connectfd:%d fd:%d\n", + // acfd, meindex, fmname, charname, CHAR_getInt(meindex, CHAR_FAME), CONNECT_getFdid(fd), fd); +#else + saacproto_ACAddFM_send(acfd, fmname, charname, charid, charlv, + petname, petattr, fmrule, fmsprite, chargrano, CONNECT_getFdid(fd)); +#endif + + // 要求最新家族列表 + //saacproto_ACShowFMList_send( acfd ); + +} + +/* + ┐┌ + ┘└┘└ +└┐..┌┘─ + ┴──┤★~~├ +│o o│  │●   + ┬──   │ ~~~~~~~~~哞 +▲△▲△▲△▲△▲△▲△▲△▲△ + +*/ + +void ACAddFM(int fd, int result, int fmindex, int index) +{ + int meindex = CONNECT_getCharaindex(fd); + char buf[1024]; + +// print("ACAddFM result:%d fmindex:%d meindex:%d\n", result, fmindex, meindex); // test + + if (!CHAR_CHECKINDEX(meindex)) return; + +// print("ACAddFM_2!\n"); + + if (CHAR_getWorkInt(meindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE) + return; + +// print("ACAddFM_3!\n"); + + if(result == 1) + { + CHAR_setInt(meindex, CHAR_FMINDEX, fmindex); + CHAR_setWorkInt(meindex, CHAR_WORKFMINDEXI, index); + CHAR_setWorkInt(meindex, CHAR_WORKFMSETUPFLAG, 0); +#ifdef _NEW_MANOR_LAW + CHAR_setInt(meindex,CHAR_MOMENTUM,0); + CHAR_talkToCli(meindex,-1,"成立家族个人气势归零",CHAR_COLORYELLOW); +#endif + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n恭喜你成立了新的家族!但请在7天之内召集到10名族人加入,不然会取消家族资格喔。", buf, sizeof(buf))); + JoinMemberIndex( meindex, index); + CHAR_charSaveFromConnect(fd, FALSE); + + // 要求最新家族资料 + saacproto_ACShowFMList_send( acfd ); + saacproto_ACShowMemberList_send( acfd, index ); + saacproto_ACShowTopFMList_send(acfd, FM_TOP_INTEGRATE); + + LogFamily( + CHAR_getChar( meindex, CHAR_FMNAME), + CHAR_getInt( meindex, CHAR_FMINDEX), + CHAR_getChar( meindex, CHAR_NAME), + CHAR_getChar( meindex, CHAR_CDKEY), + "ADDFAMILY(成立家族)", + "" + ); + } + else + { + int i = 0, petindex = 0; + char tmpbuf[256]; + int gold = CHAR_getInt(meindex, CHAR_GOLD); + CHAR_setInt(meindex, CHAR_GOLD, gold + 10000); + CHAR_send_P_StatusString( meindex , CHAR_P_STRING_GOLD); + SetFMVarInit(meindex); + + for (i = 0; i < CHAR_MAXPETHAVE; i++) + { + petindex = CHAR_getCharPet(meindex, i); + if (!CHAR_CHECKINDEX(petindex)) continue; + CHAR_setInt(petindex, CHAR_PETFAMILY, -1); + } + if (fmindex == -2) + sprintf(tmpbuf, "\n已经有相同名字的家族成立了!"); + else + sprintf(tmpbuf, "\n申请成立家族失败!"); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString(tmpbuf, buf, sizeof(buf))); + } + CHAR_sendStatusString( meindex, "F"); +} + +void FAMILY_Join(int fd, int meindex, char *message) +{ + int fmindex, charlv, index, fmsprite; + char token[128], fmname[128], charname[128], charid[128], buf[1024]; + + if (!CHAR_CHECKINDEX(meindex)) return; + + if ((CHAR_getWorkInt(meindex, CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE) + || (CHAR_getWorkInt(meindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE)) + return; + + if (CheckFMMember(meindex) < 0){ + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n你已经加入其他家族了喔!", buf, sizeof(buf))); + return; + } + + + if (getStringFromIndexWithDelim(message, "|", 2, token, + sizeof(token)) == FALSE) return; + index = atoi(token); + if (getStringFromIndexWithDelim(message, "|", 3, token, + sizeof(token)) == FALSE) return; + fmindex = atoi(token); + if (getStringFromIndexWithDelim(message, "|", 4, token, + sizeof(token)) == FALSE) return; + sprintf(fmname, "%s", token); + if (getStringFromIndexWithDelim(message, "|", 5, token, + sizeof(token)) == FALSE) return; + fmsprite = atoi(token); + sprintf(charname, "%s", CHAR_getChar(meindex, CHAR_NAME)); + sprintf(charid, "%s", CHAR_getChar(meindex, CHAR_CDKEY)); + charlv = CHAR_getInt(meindex, CHAR_LV); + CHAR_setInt(meindex, CHAR_FMINDEX, fmindex); + CHAR_setChar(meindex, CHAR_FMNAME, fmname); +#ifdef _FMVER21 + CHAR_setInt(meindex, CHAR_FMLEADERFLAG, FMMEMBER_APPLY); +#else + CHAR_setInt(meindex, CHAR_FMLEADERFLAG, 0); +#endif + CHAR_setInt(meindex, CHAR_FMSPRITE, fmsprite); + CHAR_setWorkInt(meindex, CHAR_WORKFMINDEXI, index); + +// print("JoinFM index:%d fmindex:%d fmname:%s charname:%s charid:%s charlv:%d sprite:%d\n", +// index, fmindex, fmname, charname, charid, charlv, fmsprite); +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 +// print("fame:%d charfdid:%d\n", CHAR_getInt(meindex, CHAR_FAME), +// CONNECT_getFdid(fd)); + saacproto_ACJoinFM_send(acfd, fmname, fmindex, charname, charid, charlv, + index, CHAR_getInt(meindex, CHAR_FAME), CONNECT_getFdid(fd)); +#else +// print("charfdid:%d\n", CONNECT_getFdid(fd)); + saacproto_ACJoinFM_send(acfd, fmname, fmindex, charname, charid, charlv, + index, CONNECT_getFdid(fd)); +#endif +} + +void ACJoinFM(int fd, int result, int recv) +{ + int meindex = CONNECT_getCharaindex(fd); + char buf[1024]; + + if(!CHAR_CHECKINDEX(meindex)) return; + + if ((CHAR_getWorkInt(meindex, CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE) + || (CHAR_getWorkInt(meindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE)) + return; + + if (result == 1) { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n谢谢你的加入申请!请先等族长对你的审核通过之後,才算正式加入。", buf, sizeof(buf))); + + JoinMemberIndex( meindex, CHAR_getWorkInt(meindex, CHAR_WORKFMINDEXI) ); +#ifdef _NEW_MANOR_LAW + CHAR_setInt(meindex,CHAR_MOMENTUM,0); + CHAR_talkToCli(meindex,-1,"加入家族个人气势归零",CHAR_COLORYELLOW); +#endif + + sprintf(buf,"fame:%d",CHAR_getInt(meindex,CHAR_FAME)); + + LogFamily( + CHAR_getChar( meindex, CHAR_FMNAME), + CHAR_getInt( meindex, CHAR_FMINDEX), + CHAR_getChar( meindex, CHAR_NAME), + CHAR_getChar( meindex, CHAR_CDKEY), + "JOINFAMILY(申请加入家族)", + buf + ); + + } + else + { + SetFMVarInit(meindex); + if (recv == -2) + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n此家族目前不愿意招收成员!", buf, sizeof(buf))); + } + else if (recv == -3) + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n此家族目前无法招收成员,家族成员人数已到达上限!", buf, sizeof(buf))); + } + else + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n申请加入家族失败!", buf, sizeof(buf))); + } + + CHAR_sendStatusString( meindex, "F"); +} + +void FAMILY_Leave(int fd, int meindex, char *message) +{ + int result, fmindex, index; + char token[128], fmname[128], charname[128], charid[128], buf[1024]; + + if (!CHAR_CHECKINDEX(meindex)) return; + + if (CHAR_getWorkInt(meindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE) + return; + + if ((CHAR_getInt(meindex, CHAR_FMINDEX) == -1) + || (strcmp(CHAR_getChar(meindex, CHAR_FMNAME), "") == 0) +#ifdef _FMVER21 + || (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) == FMMEMBER_NONE)) +#else + || (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) == -1)) +#endif + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n你并没有加入家族喔!", buf, sizeof(buf))); + return; + } + + { + int i, fmpks_pos; + for( i=1; i<=MANORNUM; i++){ // CoolFish 4->MANORNUM 2002/2/25 + fmpks_pos = i * MAX_SCHEDULE; +#ifdef _FMVER21 + if (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) == FMMEMBER_LEADER){ +#else + if (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) == 1){ +#endif + if( (fmpks[fmpks_pos+1].host_index+1) == CHAR_getInt(meindex, CHAR_FMINDEX) || + (fmpks[fmpks_pos+1].guest_index+1) == CHAR_getInt(meindex, CHAR_FMINDEX) ){ + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n你目前的家族正约战中,因此无法解散家族!", buf, sizeof(buf))); + return; + } + } + } + } + + if (getStringFromIndexWithDelim(message, "|", 2, token, + sizeof(token)) == FALSE) return; + result = atoi(token); + if (result == 1) + { + fmindex = CHAR_getInt(meindex, CHAR_FMINDEX); + index = CHAR_getWorkInt(meindex, CHAR_WORKFMINDEXI); + sprintf(fmname, "%s", CHAR_getChar(meindex, CHAR_FMNAME)); + sprintf(charname, "%s", CHAR_getChar(meindex, CHAR_NAME)); + sprintf(charid, "%s", CHAR_getChar(meindex, CHAR_CDKEY)); +#ifdef _FMVER21 + if (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) == FMMEMBER_LEADER) { +#else + if (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) == 1) { +#endif +// print("DelFM index:%d fmindex:%d fmname:%s\n", index, fmindex, fmname); + saacproto_ACDelFM_send(acfd, fmname, fmindex, index, charname, charid, + CONNECT_getFdid(fd)); + + // 要求最新家族列表 + //saacproto_ACShowFMList_send( acfd ); + } + else { +// print("LeaveFM index:%d fmindex:%d fmname:%s charname:%s charid:%s\n", +// index, fmindex, fmname, charname, charid); + saacproto_ACLeaveFM_send(acfd, fmname, fmindex, charname, charid, index, + CONNECT_getFdid(fd)); + } + + + } +} + +void ACLeaveFM( int fd, int result, int resultflag) +{ + int meindex = CONNECT_getCharaindex(fd); + char buf[1024]; + + if (!CHAR_CHECKINDEX(meindex)) return; + if (result == 1){ + // won 2002/01/05 + LogFamily( + CHAR_getChar( meindex, CHAR_FMNAME), + CHAR_getInt( meindex, CHAR_FMINDEX), + CHAR_getChar( meindex, CHAR_NAME), + CHAR_getChar( meindex, CHAR_CDKEY), + "LEAVEFAMILY(离开家族)", + "" + ); + if( CHAR_getWorkInt( meindex, CHAR_WORKFMCHANNEL) != -1 ) + CHAR_setWorkInt( meindex, CHAR_WORKFMCHANNEL, -1 ); + LeaveMemberIndex( meindex, CHAR_getWorkInt(meindex, CHAR_WORKFMINDEXI) ); + SetFMVarInit(meindex); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, + makeEscapeString( "\n申请退出家族OK!", buf, sizeof(buf))); +#ifdef _FM_RIDE_PET + if(getFmridepet()==1) + { + int fmRides = CHAR_getInt( index, CHAR_LOWRIDEPETS); + switch( CHAR_getWorkInt( index, CHAR_WORKFMFLOOR) ) + { + case 1041: + fmRides=fmRides^RIDE_PET9; + break; + case 2031: + fmRides=fmRides^RIDE_PET8|RIDE_PET0|RIDE_PET10|RIDE_PET11); + break; + case 3031: + fmRides=fmRides^RIDE_PET7|RIDE_PET0|RIDE_PET10|RIDE_PET11); + break; + case 4031: + fmRides=fmRides^RIDE_PET1|RIDE_PET0|RIDE_PET10|RIDE_PET11); + break; + case 5031: + fmRides=fmRides^RIDE_PET3|RIDE_PET0|RIDE_PET10|RIDE_PET11); + break; + case 6031: + fmRides=fmRides^RIDE_PET5|RIDE_PET0|RIDE_PET10|RIDE_PET11); + break; + case 7031: + fmRides=fmRides^RIDE_PET4|RIDE_PET0|RIDE_PET10|RIDE_PET11); + break; + case 8031: + fmRides=fmRides^RIDE_PET6|RIDE_PET0|RIDE_PET10|RIDE_PET11); + break; + case 9031: + fmRides=fmRides^RIDE_PET2|RIDE_PET0|RIDE_PET10|RIDE_PET11); + break; + default: + fmRides=fmRides^RIDE_PET0|RIDE_PET10|RIDE_PET11); + } + CHAR_setInt( index, CHAR_LOWRIDEPETS, fmRides ); + CHAR_sendStatusString( index, "x"); + } +#endif + + CHAR_setWorkInt( meindex, CHAR_WORKFMFLOOR, -1); +#ifdef _FM_JOINLIMIT + CHAR_setInt( meindex, CHAR_FMTIMELIMIT, (int)time(NULL)+(7*24)*(60*60) ); +#endif +#ifdef _NEW_MANOR_LAW + CHAR_setInt(meindex,CHAR_MOMENTUM,0); + CHAR_talkToCli(meindex,-1,"退出家族个人气势归零",CHAR_COLORYELLOW); +#endif + + }else + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, + makeEscapeString( "\n申请退出家族失败!", buf, sizeof(buf))); + + CHAR_sendStatusString( meindex, "F" ); +} + +void ACDelFM(int fd, int result) +{ + char buf[1024]; + int meindex = CONNECT_getCharaindex(fd); + if (!CHAR_CHECKINDEX(meindex)) return; + + //if ((CHAR_getWorkInt(meindex, CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE) + // || (CHAR_getWorkInt(meindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE)) + // return; + + if (result == 1) + { +// WON ADD + LogFamily( + CHAR_getChar( meindex, CHAR_FMNAME), + CHAR_getInt( meindex, CHAR_FMINDEX), + CHAR_getChar( meindex, CHAR_NAME), + CHAR_getChar( meindex, CHAR_CDKEY), + "DELFAMILY(家族解散)", + "" + ); + + LeaveMemberIndex( meindex, CHAR_getWorkInt(meindex, CHAR_WORKFMINDEXI) ); + /* + for( i=0; i familyNumTotal ) break; + if( getStringFromIndexWithDelim( familyListBuf, "|", i, subbuf, + sizeof(subbuf) ) == FALSE) break; + strcat( buf, "|" ); + strcat( buf, subbuf ); + j++; + + // print(" |%s| ", subbuf); + } + + sprintf( sendbuf, "S|F|%d|%d|%d%s", familyNumTotal, atoi(token2), j, buf ); + lssproto_FM_send( fd, sendbuf ); + + return; + + } + + // shan add + if (strcmp(token, "P") == 0 ){ + int personfame; + char sendbuf[512]; +#ifdef _PERSONAL_FAME + personfame = (CHAR_getInt( meindex, CHAR_FAME)/100); +#else + personfame = CHAR_getWorkInt( meindex, CHAR_WORKFMDP); +#endif + sprintf( sendbuf, "你目前的个人声望点数为:%d", personfame); + CHAR_talkToCli(meindex, -1, sendbuf, CHAR_COLORYELLOW); +#ifdef _NEW_MANOR_LAW + sprintf(sendbuf,"你目前的个人气势点数为:%d",CHAR_getInt(meindex,CHAR_MOMENTUM)/100); + CHAR_talkToCli(meindex, -1, sendbuf, CHAR_COLORYELLOW); +#endif + } + + if(strcmp(token,"D") == 0){ + if(getStringFromIndexWithDelim(message, "|", 3, fmname, sizeof(fmname)) == FALSE) return; + if(getStringFromIndexWithDelim(message, "|", 4, token2, sizeof(token2)) == FALSE) return; + fmindex = atoi( token2 ); + if(getStringFromIndexWithDelim(message, "|", 5, token2, sizeof(token2)) == FALSE) return; + tempindex = atoi( token2 ); + + //print(" send_fmname_ac:%s ", fmname); + saacproto_ACFMDetail_send( acfd, fmname, fmindex, tempindex, CONNECT_getFdid(fd) ); + } + + // shan begin + else if (strcmp(token, "D2") ==0 ) { + char sendbuf[2048], tmpbuf[1024], leadernamebuf[64]; + int h, i = 0; + int meindex = CONNECT_getCharaindex(fd); + int fmindex_wk = CHAR_getWorkInt( meindex, CHAR_WORKFMINDEXI); + if( fmindex_wk < 0 || fmindex_wk >= FAMILY_MAXNUM) return; + + for( h=0; h 家族名称|人数|族长名称|家族排行|家族声望|个人声望|个人职位|家族精灵|PK +#ifdef _NEW_MANOR_LAW + sprintf( sendbuf, "%s|%d|%s|%d|%d|%d|%d|%d|%s|%d|%d", +#else + sprintf( sendbuf, "%s|%d|%s|%d|%d|%d|%d|%d|%s", +#endif + CHAR_getChar(meindex, CHAR_FMNAME), + memberlist[fmindex_wk].fmjoinnum, + leadernamebuf, + h+1, +#ifdef _FMVER21 + fmdptop.fmtopdp[h], +#else + (CHAR_getWorkInt( meindex, CHAR_WORKFMDP)/100), +#endif +#ifdef _PERSONAL_FAME + (CHAR_getInt( meindex, CHAR_FAME)/100), +#else + (CHAR_getWorkInt( meindex, CHAR_WORKFMDP)/100), +#endif + CHAR_getInt( meindex, CHAR_FMLEADERFLAG), + CHAR_getInt( meindex, CHAR_FMSPRITE ), + tmpbuf +#ifdef _NEW_MANOR_LAW + ,fmdptop.fmMomentum[h]/100 // 家族气势 + ,CHAR_getInt(meindex,CHAR_MOMENTUM)/100 // 个人气势 +#endif + ); + + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_FAMILYDETAIL, + WINDOW_BUTTONTYPE_OK, + -1, + -1, + makeEscapeString( sendbuf, buf, sizeof(buf))); + } + // shan end +} + +void ACFMDetail(int ret, char *data, int clifd) +{ + char sendbuf[1024]; + + //print(" Detail:%s ", data); + + if( ret != 1 ) + { + print(" ACFMDetailError!:%d ", clifd ); + return; + } + //print(" ACFMDetail:%d:%s ", clifd, data ); + + /* + len = strlen(data); + strcpy( buf, data ); + + for( i=0 ; i 人物名称:%s 人物索引 (设该人物为族员):%d\n", CHAR_getInt(meindex, CHAR_FMLEADERFLAG), charname, charindex); + LogFamily( + CHAR_getChar(meindex, CHAR_FMNAME), + CHAR_getInt(meindex, CHAR_FMINDEX), + CHAR_getChar(meindex, CHAR_NAME), + CHAR_getChar(meindex, CHAR_CDKEY), + "CheckMember", + sbuf + ); + // shan end + + saacproto_ACMemberJoinFM_send(acfd, + CHAR_getChar(meindex, CHAR_FMNAME), + CHAR_getInt(meindex, CHAR_FMINDEX), charname, charindex, + CHAR_getWorkInt(meindex, CHAR_WORKFMINDEXI), result, + CHAR_getWorkInt(meindex, CHAR_WORKFMCHARINDEX), + CONNECT_getFdid(fd)); + } +#else + { + saacproto_ACMemberJoinFM_send(acfd, + CHAR_getChar(meindex, CHAR_FMNAME), + CHAR_getInt(meindex, CHAR_FMINDEX), charname, charindex, + CHAR_getWorkInt(meindex, CHAR_WORKFMINDEXI), result, + CONNECT_getFdid(fd)); + } +#endif +#ifdef _FMVER21 + else if (result == FMMEMBER_NONE) +#else + else if (result == 4) +#endif + { + for (i = 0 + 1; i < FAMILY_MAXHOME + 1; i++) + { + int fmpks_pos = i * MAX_SCHEDULE; + if ((fmpks[fmpks_pos].host_index == index + && strcmp(fmname, fmpks[fmpks_pos].host_name) == 0) + || (fmpks[fmpks_pos].guest_index == index + && strcmp(fmname, fmpks[fmpks_pos].guest_name) == 0)) + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n家族目前正在战斗中,所以无法审核成员。", buf, sizeof(buf))); +// print("fmpks_pos:%d index:%d host:%d guest:%d\n", fmpks_pos, +// index, fmpks[fmpks_pos].host_index, fmpks[fmpks_pos].guest_index); + return; + } + } +#ifdef _FMVER21 + { + // shan begin + char sbuf[1024]; + sprintf( sbuf, "族长代号:%d -> 人物名称:%s 人物索引:%d (将该人物退出家族)\n", CHAR_getInt(meindex, CHAR_FMLEADERFLAG), charname, charindex); + + LogFamily( + CHAR_getChar(meindex, CHAR_FMNAME), + CHAR_getInt(meindex, CHAR_FMINDEX), + CHAR_getChar(meindex, CHAR_NAME), + CHAR_getChar(meindex, CHAR_CDKEY), + "CheckMember", + sbuf + ); + // shan end + saacproto_ACMemberLeaveFM_send(acfd, + CHAR_getChar(meindex, CHAR_FMNAME), + CHAR_getInt(meindex, CHAR_FMINDEX), charname, charindex, + CHAR_getWorkInt(meindex, CHAR_WORKFMINDEXI), + CHAR_getWorkInt(meindex, CHAR_WORKFMCHARINDEX), + CONNECT_getFdid(fd)); + } +#else + { + saacproto_ACMemberLeaveFM_send(acfd, + CHAR_getChar(meindex, CHAR_FMNAME), + CHAR_getInt(meindex, CHAR_FMINDEX), charname, charindex, + CHAR_getWorkInt(meindex, CHAR_WORKFMINDEXI), + CONNECT_getFdid(fd)); + } +#endif + } +#ifdef _FMVER21 +// else if (result == FMMEMBER_ELDER || result == FMMEMBER_INVITE +// || result == FMMEMBER_BAILEE || result == FMMEMBER_VICELEADER ) + else if (result == FMMEMBER_ELDER ) + { + if (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != FMMEMBER_LEADER) + return; +#ifdef _FMVER21 + { + // shan begin + char sbuf[1024]; + sprintf( sbuf, "族长代号:%d -> 人物名称:%s 人物索引:%d (设该人物为长老)\n", CHAR_getInt(meindex, CHAR_FMLEADERFLAG), charname, charindex); + LogFamily( + CHAR_getChar(meindex, CHAR_FMNAME), + CHAR_getInt(meindex, CHAR_FMINDEX), + CHAR_getChar(meindex, CHAR_NAME), + CHAR_getChar(meindex, CHAR_CDKEY), + "CheckMember", + sbuf + ); + // shan end + saacproto_ACMemberJoinFM_send(acfd, + CHAR_getChar(meindex, CHAR_FMNAME), + CHAR_getInt(meindex, CHAR_FMINDEX), charname, charindex, + CHAR_getWorkInt(meindex, CHAR_WORKFMINDEXI), result, + CHAR_getWorkInt(meindex, CHAR_WORKFMCHARINDEX), + CONNECT_getFdid(fd)); + } +#else + { + saacproto_ACMemberJoinFM_send(acfd, + CHAR_getChar(meindex, CHAR_FMNAME), + CHAR_getInt(meindex, CHAR_FMINDEX), charname, charindex, + CHAR_getWorkInt(meindex, CHAR_WORKFMINDEXI), result, + CONNECT_getFdid(fd)); + } +#endif + } +#endif + // 要求最新家族列表 + saacproto_ACShowFMList_send( acfd ); +} + +void FAMILY_Channel(int fd, int meindex, char *message) +{ + char token[128], token2[128]; + char buf[4096], subbuf[4096], sendbuf[4096]; + int i, tempindex, fmindexi, channel, nowchannel, num; + + fmindexi = CHAR_getWorkInt( meindex, CHAR_WORKFMINDEXI); + nowchannel = CHAR_getWorkInt( meindex, CHAR_WORKFMCHANNEL ); + + // print(" channelFM:%d ", fmindexi); + if( fmindexi < 0 ) { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n你还没有加入任何家族!", buf, sizeof(buf))); + return; + } + + if (getStringFromIndexWithDelim(message, "|", 2, token, + sizeof(token)) == FALSE) return; + + if (getStringFromIndexWithDelim(message, "|", 3, token2, + sizeof(token2)) == FALSE) return; + + channel = atoi( token2 ); + + if( strcmp( token, "J") == 0) { + if( channel < -1 || channel > FAMILY_MAXCHANNEL )return; + if( nowchannel >= 0 && nowchannel < FAMILY_MAXCHANNEL ) { + i = 0; + while( i < FAMILY_MAXMEMBER ) { + if( channelMember[fmindexi][nowchannel][i] == meindex ) { + channelMember[fmindexi][nowchannel][i] = -1; + break; + } + i++; + } + } + + if( channel > 0 && channel < FAMILY_MAXCHANNEL ) { + i = 0; + while( i < FAMILY_MAXCHANNELMEMBER ) { + if( channelMember[fmindexi][channel][i] < 0 ) { + channelMember[fmindexi][channel][i] = meindex; + break; + } + i++; + } + if( i >= FAMILY_MAXCHANNELMEMBER ) { + CHAR_talkToCli( meindex, -1, "此频道人数已满。", CHAR_COLORWHITE); + return; + } + sprintf( buf, "加入家族频道 [%d]。", channel ); + CHAR_talkToCli( meindex, -1, buf, CHAR_COLORWHITE); + + if( nowchannel >=0 && nowchannel < FAMILY_MAXCHANNEL ) { + sprintf( buf, "%s 退出频道。", CHAR_getChar( meindex, CHAR_NAME) ); + for( i=0; i < FAMILY_MAXCHANNELMEMBER; i++ ) { + if( CHAR_CHECKINDEX(channelMember[fmindexi][nowchannel][i]) + && channelMember[fmindexi][nowchannel][i] != meindex ) { + CHAR_talkToCli( channelMember[fmindexi][nowchannel][i], -1, buf, CHAR_COLORWHITE); + } + } + } + sprintf( buf, "%s 加入频道。", CHAR_getChar( meindex, CHAR_NAME) ); + for( i=0; i < FAMILY_MAXCHANNELMEMBER; i++ ) { + if( CHAR_CHECKINDEX(channelMember[fmindexi][channel][i]) + && channelMember[fmindexi][channel][i] != meindex ) { + CHAR_talkToCli( channelMember[fmindexi][channel][i], -1, buf, CHAR_COLORWHITE); + } + } + + } + else if( channel == 0 ) { + i = 0; + while( i < FAMILY_MAXMEMBER ) { + if( channelMember[fmindexi][0][i] < 0 ) { + channelMember[fmindexi][0][i] = meindex; + break; + } + i++; + } + if( i >= FAMILY_MAXMEMBER ) { +#ifndef _CHANNEL_MODIFY + CHAR_talkToCli( meindex, -1, "此频道人数已满。", CHAR_COLORWHITE); +#endif + return; + } +#ifndef _CHANNEL_MODIFY + sprintf( buf, "加入家族频道 [全]。"); + CHAR_talkToCli( meindex, -1, buf, CHAR_COLORWHITE); + if( nowchannel >=0 && nowchannel < FAMILY_MAXCHANNEL ) { + sprintf( buf, "%s 退出频道。", CHAR_getChar( meindex, CHAR_NAME) ); + for( i=0; i < FAMILY_MAXCHANNELMEMBER; i++ ) { + if( CHAR_CHECKINDEX(channelMember[fmindexi][nowchannel][i]) + && channelMember[fmindexi][nowchannel][i] != meindex ) { + CHAR_talkToCli( channelMember[fmindexi][nowchannel][i], -1, buf, CHAR_COLORWHITE); + } + } + } + sprintf( buf, "%s 加入频道。", CHAR_getChar( meindex, CHAR_NAME) ); + for( i=0; i < FAMILY_MAXCHANNELMEMBER; i++ ) { + if( CHAR_CHECKINDEX(channelMember[fmindexi][channel][i]) + && channelMember[fmindexi][channel][i] != meindex ) { + CHAR_talkToCli( channelMember[fmindexi][channel][i], -1, buf, CHAR_COLORWHITE); + } + } +#endif + } +#ifdef _FMVER21 + else if( channel == FAMILY_MAXCHANNEL && CHAR_getInt( meindex, CHAR_FMLEADERFLAG ) == FMMEMBER_LEADER ) +#else + else if( channel == FAMILY_MAXCHANNEL && CHAR_getInt( meindex, CHAR_FMLEADERFLAG ) == 1 ) +#endif + { + CHAR_talkToCli( meindex, -1, "启动族长广播。", CHAR_COLORWHITE); + } + else { + channel = -1; +#ifndef _CHANNEL_MODIFY + CHAR_talkToCli( meindex, -1, "退出家族频道。", CHAR_COLORWHITE); +#else + CHAR_talkToCli( meindex, -1, "关闭族长广播。", CHAR_COLORWHITE); + channel = 0; + i = 0; + while(i < FAMILY_MAXMEMBER){ + if( channelMember[fmindexi][0][i] < 0 ) { + channelMember[fmindexi][0][i] = meindex; + break; + } + i++; + } +#endif + + sprintf( buf, "%s 退出频道。", CHAR_getChar( meindex, CHAR_NAME) ); + for( i=0; i < FAMILY_MAXCHANNELMEMBER; i++ ) { + if( CHAR_CHECKINDEX(channelMember[fmindexi][nowchannel][i]) + && channelMember[fmindexi][nowchannel][i] != meindex ) { + CHAR_talkToCli( channelMember[fmindexi][nowchannel][i], -1, buf, CHAR_COLORWHITE); + } + } + } + + CHAR_setWorkInt( meindex, CHAR_WORKFMCHANNEL, channel); + if( channel != -1 ) CHAR_setWorkInt( meindex, CHAR_WORKFMCHANNELQUICK, channel); + + sprintf( sendbuf, "C|J|%d", channel); + lssproto_FM_send( fd, sendbuf); + + } + else if( strcmp( token, "L") == 0) { + + int j, membernum, bFind = 0; + if( channel < 0 || channel >= FAMILY_MAXCHANNEL ) return; + + subbuf[0] = '\0'; + num = 0; + if( channel != 0 ) + membernum = FAMILY_MAXCHANNELMEMBER; + else + membernum = FAMILY_MAXMEMBER; + + for( j = 0 ; j < FAMILY_MAXMEMBER ; j++ ) { + bFind = 0; + tempindex = familyMemberIndex[fmindexi][j]; + //if( tempindex >= 0 ) { + if( CHAR_CHECKINDEX(tempindex) ) { + for( i=0; i< membernum ; i++) { + if( tempindex == channelMember[fmindexi][channel][i] ) { + //if( CHAR_getChar( tempindex, CHAR_NAME ) == NULL ) { + // familyMemberIndex[fmindexi][j] = -1; + // channelMember[fmindexi][channel][i] = -1; + // continue; + //} + bFind = 1; + break; + } + } + if( bFind ) + strcat( subbuf, "|1|" ); + else + strcat( subbuf, "|0|" ); + makeEscapeString( CHAR_getChar( tempindex, CHAR_NAME ), buf, sizeof(buf)); + strcat( subbuf, buf ); + num++; + } + } + sprintf( sendbuf, "C|L|%d|%d%s", channel, num, subbuf); + lssproto_FM_send( fd, sendbuf); + //print(" CList:%s ", sendbuf); + } +} + +void FAMILY_Bank(int fd, int meindex, char *message) +{ + char token[128], token2[128], buf[1024]; + int fmindex, cash, bank, toBank; + int MaxGold; + MaxGold = CHAR_getMaxHaveGold( meindex); + fmindex = CHAR_getInt( meindex, CHAR_FMINDEX); + // add shan + if( fmindex <= 0 && CHAR_getInt( meindex, CHAR_BANKGOLD) < 1) { + CHAR_talkToCli( meindex, -1, "你必须先加入家族。", CHAR_COLORWHITE); + return; + } + + if (getStringFromIndexWithDelim(message, "|", 2, token, sizeof(token)) == FALSE) + return; + + if( strcmp(token, "G" )==0 ) { + if (getStringFromIndexWithDelim(message, "|", 3, token2, sizeof(token)) == FALSE) + return; + + toBank = atoi( token2 ); + cash = CHAR_getInt( meindex, CHAR_GOLD); + bank = CHAR_getInt( meindex, CHAR_BANKGOLD); + if( ((cash - toBank) >= 0) && ((cash - toBank) <= MaxGold ) + &&((bank + toBank) >= 0)&&((bank + toBank) <= CHAR_MAXBANKGOLDHAVE) ) { + // shan add + if( toBank > 0 && CHAR_getInt( meindex, CHAR_FMINDEX ) < 1 ) { + sprintf(buf, "抱歉!你没有加入任何家族,所以仅能领取存款"); + CHAR_talkToCli( meindex, -1, buf, CHAR_COLORWHITE); + return; + } + + CHAR_setInt( meindex, CHAR_GOLD, cash - toBank); + CHAR_setInt( meindex, CHAR_BANKGOLD, bank + toBank); + CHAR_send_P_StatusString( meindex , CHAR_P_STRING_GOLD); + + if( toBank >= 0 ) { + sprintf(buf, "存入%d到家族银行个人帐户。", toBank); + CHAR_talkToCli( meindex, -1, buf, CHAR_COLORWHITE); + // Syu ADD 新增家族个人银行存取Log (不含家族银行) + LogFamilyBankStone( + CHAR_getChar( meindex, CHAR_NAME ), + CHAR_getChar( meindex, CHAR_CDKEY ), + toBank, + CHAR_getInt( meindex, CHAR_GOLD ), + "myBank(存款)(家族个人银行)", + CHAR_getInt( meindex,CHAR_FLOOR), + CHAR_getInt( meindex,CHAR_X ), + CHAR_getInt( meindex,CHAR_Y ), + CHAR_getInt( meindex,CHAR_BANKGOLD) + ); + + } + else { + sprintf(buf, "从家族银行个人帐户取出%d。", -toBank); + CHAR_talkToCli( meindex, -1, buf, CHAR_COLORWHITE); + // Syu ADD 新增家族个人银行存取Log (不含家族银行) + LogFamilyBankStone( + CHAR_getChar( meindex, CHAR_NAME ), + CHAR_getChar( meindex, CHAR_CDKEY ), + toBank, + CHAR_getInt( meindex, CHAR_GOLD ), + "myBank(提款)(家族个人银行)", + CHAR_getInt( meindex,CHAR_FLOOR), + CHAR_getInt( meindex,CHAR_X ), + CHAR_getInt( meindex,CHAR_Y ), + CHAR_getInt( meindex,CHAR_BANKGOLD) + ); + + } + // Syu ADD 新增家族个人银行存取Log (不含家族银行) + LogStone( + -1, + CHAR_getChar( meindex, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( meindex, CHAR_CDKEY ), /* 交□扒□ID */ + -toBank, /* 嗯喊 */ + CHAR_getInt( meindex, CHAR_GOLD ), + "myBank(家族个人银行)", + CHAR_getInt( meindex,CHAR_FLOOR), + CHAR_getInt( meindex,CHAR_X ), + CHAR_getInt( meindex,CHAR_Y ) + ); + + } + else + print(" bank_error "); + + } + if( strcmp(token, "I" )==0 ) { + + } + if( strcmp(token, "T" )==0 ) { + int toTax; + int mygold; + int FMindex; + + if (getStringFromIndexWithDelim(message, "|", 3, token2, sizeof(token)) == FALSE) + return; + toTax = atoi( token2 ); + +#ifdef _FMVER21 + if( CHAR_getInt( meindex, CHAR_FMLEADERFLAG ) != FMMEMBER_LEADER && + CHAR_getInt( meindex, CHAR_FMLEADERFLAG ) != FMMEMBER_ELDER && toTax < 0 ) + return; +#endif + + + FMindex = CHAR_getWorkInt( meindex, CHAR_WORKFMINDEXI ); + mygold = CHAR_getInt( meindex, CHAR_GOLD); + if( mygold < 0 || mygold > MaxGold || toTax == 0 ) return; + if( toTax > 0 ) {//+存款 + if( ((mygold-toTax) < 0) || (familyTax[ FMindex] + toTax) > CHAR_MAXFMBANKGOLDHAVE ) { + return; + } + }else if( toTax < 0 ){ //-取款 + if( ((mygold-toTax)>MaxGold) || (familyTax[ FMindex] + toTax) < 0 ) { + return; + } + } + + + if( toTax>0 ) { //存款预先扣款 + CHAR_setInt( meindex, CHAR_GOLD, CHAR_getInt( meindex, CHAR_GOLD)-toTax ); + } + sprintf( buf, "家族银行%s处理中....", (toTax>0)?"存款":"取款"); + CHAR_talkToCli( meindex , -1, buf, CHAR_COLORYELLOW); + + CHAR_send_P_StatusString( meindex , CHAR_P_STRING_GOLD); + sprintf( buf, "%d", toTax ); + + saacproto_ACFixFMData_send(acfd, + CHAR_getChar(meindex, CHAR_FMNAME), + CHAR_getInt(meindex, CHAR_FMINDEX), + CHAR_getWorkInt(meindex, CHAR_WORKFMINDEXI), FM_FIX_FMGOLD, buf, + "", CHAR_getWorkInt(meindex, CHAR_WORKFMCHARINDEX), CONNECT_getFdid(fd)); +#ifdef _FAMILYBANKSTONELOG + saacproto_ACgetFMBankgold_send(acfd, + CHAR_getChar(meindex, CHAR_FMNAME), + CHAR_getInt(meindex, CHAR_FMINDEX), + CHAR_getWorkInt(meindex, CHAR_WORKFMINDEXI), + CHAR_getWorkInt(meindex, CHAR_WORKFMCHARINDEX), CONNECT_getFdid(fd)); +#endif + //print(" getTax:%s=%d ", CHAR_getChar(meindex, CHAR_FMNAME), toTax ); + } +} + +void ACFMPointList(int ret, char *data) +{ +} + + +#ifdef _CK_ONLINE_PLAYER_COUNT // WON ADD 计算线上人数 +void GS_SEND_PLAYER_COUNT(void) +{ + int i, count = 0; + int playernum = CHAR_getPlayerMaxNum(); + + for( i = 0 ; i < playernum ; i++) { + if( CHAR_getCharUse(i) != FALSE ) count++; + } + + saacproto_GS_PLAYER_COUNT_SEND(acfd, count); +} +#endif + + + + + +void FAMILY_SetPoint(int fd, int meindex, char *message) +{ + int i, fmpointindex, fl, x, y, fmdp, fmlevel = 0; + char token[128], buf[1024]; + + if (!CHAR_CHECKINDEX(meindex)) return; + + if (CHAR_getWorkInt(meindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE) + return; + + if ((CHAR_getInt(meindex, CHAR_FMINDEX) == -1) + || (strcmp(CHAR_getChar(meindex, CHAR_FMNAME), "") == 0) +#ifdef _FMVER21 + || (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != FMMEMBER_LEADER)) +#else + || (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != 1)) +#endif + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n你不是族长,所以没有修改的权力唷!", buf, sizeof(buf))); + return; + } + fmdp = CHAR_getWorkInt(meindex, CHAR_WORKFMDP); + for (i = 0; i < arraysizeof(fmdplevelexp); i++){ + if (fmdp < fmdplevelexp[i + 1] && fmdp >= fmdplevelexp[i]){ + fmlevel = i; + } + } +#ifndef _ACFMPK_NOFREE + if (fmlevel < MINFMLEVLEFORPOINT){// or 人数小於30人 + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n家族等级尚未到达申请家族据点的条件!", buf, sizeof(buf))); + return; + } +#endif + for (i = 1; i <= MANORNUM; i++) { + if (((strcmp(fmpks[i * MAX_SCHEDULE + 1].guest_name, + CHAR_getChar(meindex, CHAR_FMNAME)) == 0)) + && ((fmpks[i * MAX_SCHEDULE + 1].flag = FMPKS_FLAG_MANOR_BATTLEBEGIN) + || (fmpks[i * MAX_SCHEDULE + 1].flag == FMPKS_FLAG_MANOR_PREPARE))){ + char tmpbuf[256]; + sprintf(tmpbuf, "\n你跟%s已经有预约庄园争夺赛了~\n无法再申请庄园了喔!", + fmpks[i * MAX_SCHEDULE + 1].host_name); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString(tmpbuf, buf, sizeof(buf))); + return; + } + } + if (getStringFromIndexWithDelim(message, "|", 2, token, + sizeof(token)) == FALSE) return; + fmpointindex = atoi(token); + if (getStringFromIndexWithDelim(message, "|", 3, token, + sizeof(token)) == FALSE) return; + fl = atoi(token); + if (getStringFromIndexWithDelim(message, "|", 4, token, + sizeof(token)) == FALSE) return; + x = atoi(token); + if (getStringFromIndexWithDelim(message, "|", 5, token, + sizeof(token)) == FALSE) return; + y = atoi(token); +/* + print("SetFMPoint charname:%s fmindex:%d index:%d pointindex:%d fl:%d x:%d y:%d\n", + CHAR_getChar(meindex, CHAR_FMNAME), + CHAR_getInt(meindex, CHAR_FMINDEX), + CHAR_getWorkInt(meindex, CHAR_WORKFMINDEXI), + fmpointindex, fl, x, y); +*/ + saacproto_ACSetFMPoint_send(acfd, + CHAR_getChar(meindex, CHAR_FMNAME), + CHAR_getInt(meindex, CHAR_FMINDEX), + CHAR_getWorkInt(meindex, CHAR_WORKFMINDEXI), + fmpointindex, fl, x, y, CONNECT_getFdid(fd)); +} + +void ACSetFMPoint(int ret, int r, int clifd) +{ + int meindex = CONNECT_getCharaindex(clifd); + char message[256], buf[512]; + + if (!CHAR_CHECKINDEX(meindex)) return; + + if ((CHAR_getWorkInt(meindex, CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE) + || (CHAR_getWorkInt(meindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE)) + return; + if (ret == 0){ + if (r == -1) + sprintf(message, "申请家族失败!"); + else if (r == -2) + sprintf(message, "你已经有家族据点了~不得重复申请!"); + else if (r == -3) + sprintf(message, "尚未到达申请家族据点的资格!"); + else if (r == -4) + sprintf(message, "家族据点已经有家族在使用中罗!"); + else if (r == -5) + sprintf(message, "您的家族人数未达申请标准唷!"); + } + else if (ret == 1) + sprintf(message, "申请家族据点OK!"); + + lssproto_WN_send( clifd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString(message, buf, sizeof(buf))); +} + +void ACFMAnnounce(int ret, char *fmname, int fmindex, int index, + int kindflag, char *data, int color) +{ + // kindflag 1:族长广播 2:系统公告家族被删除 3:系统通知讯息 + int i, chindex; + if( ret != 1 ) return; +// print("fmname:%s fmindex:%d index:%d kindflag:%d data:%s color:%d\n", +// fmname, fmindex, index, kindflag, data, color); + for( i=0; i < FAMILY_MAXMEMBER; i++) + { + chindex = familyMemberIndex[index][i]; + if( chindex >= 0 ) { + if( CHAR_getCharUse(chindex) ) + { + if (kindflag == 1) + { +#ifdef _FMVER21 + // shan 2001/12/13 + //if( CHAR_getInt( chindex, CHAR_FMLEADERFLAG ) == FMMEMBER_MEMBER ) + if( CHAR_getInt( chindex, CHAR_FMLEADERFLAG ) == FMMEMBER_MEMBER || + CHAR_getInt( chindex, CHAR_FMLEADERFLAG ) == FMMEMBER_ELDER ) +#else + if( CHAR_getInt( chindex, CHAR_FMLEADERFLAG ) == 2 ) +#endif + CHAR_talkToCli( chindex, -1, data, color ); + } + else if (kindflag == 2) + { + int fd = getfdFromCharaIndex( chindex ); + if (fd == -1) return; + SetFMVarInit( chindex ); + CHAR_talkToCli( chindex , -1, "由於您的家族在七天之内没有召收到10名家族成员,所以被迫解散了!", + CHAR_COLORRED); + } + } + else + familyMemberIndex[index][i] = -1; + } + } + if (kindflag == 3) + { + int meindex = 0; + int clifd = getfdFromFdid(color); + if (CONNECT_checkfd(clifd) == FALSE) return; + meindex = CONNECT_getCharaindex(clifd); + if (!CHAR_CHECKINDEX(meindex)) return; + CHAR_talkToCli(meindex, -1, data, CHAR_COLORRED); + } + if (kindflag == 4) + { + int meindex = 0; + char buf[1024]; + int clifd = getfdFromFdid(color); +// print("Here1\n"); + if (CONNECT_checkfd(clifd) == FALSE) return; + meindex = CONNECT_getCharaindex(clifd); + if (!CHAR_CHECKINDEX(meindex)) return; +// print("Here2\n"); + lssproto_WN_send(clifd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString(data, buf, sizeof(buf))); + } +} + +void FAMILY_SetAcceptFlag(int fd, int meindex, char *message) +{ + int result; + char token[128], buf[1024]; + + if (!CHAR_CHECKINDEX(meindex)) return; + + if ((CHAR_getWorkInt(meindex, CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE) + || (CHAR_getWorkInt(meindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE)) + return; + + if ((CHAR_getInt(meindex, CHAR_FMINDEX) == -1) + || (strcmp(CHAR_getChar(meindex, CHAR_FMNAME), "") == 0) +#ifdef _FMVER21 +// || ((CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != FMMEMBER_LEADER) +// && (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != FMMEMBER_ELDER) +// && (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != FMMEMBER_VICELEADER))) + || ((CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != FMMEMBER_LEADER) + && (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != FMMEMBER_ELDER))) +#else + || (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != 1)) +#endif + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n你不是族长,所以没有修改的权力唷!", buf, sizeof(buf))); + return; + } + + if (getStringFromIndexWithDelim(message, "|", 2, token, + sizeof(token)) == FALSE) return; + result = atoi(token); + if ((result == 0) || (result == 1)) + { + saacproto_ACFixFMData_send(acfd, + CHAR_getChar(meindex, CHAR_FMNAME), + CHAR_getInt(meindex, CHAR_FMINDEX), + CHAR_getWorkInt(meindex, CHAR_WORKFMINDEXI), FM_FIX_ACCEPTFLAG, + token, "", CHAR_getWorkInt(meindex, CHAR_WORKFMCHARINDEX), + CONNECT_getFdid(fd)); + } +} + +void FAMILY_FixRule( int fd, int meindex, char* message ) +{ + + char token[1024], buf[1024]; + + if (!CHAR_CHECKINDEX(meindex))return; + + if ((CHAR_getInt(meindex, CHAR_FMINDEX) == -1) + || (strcmp(CHAR_getChar(meindex, CHAR_FMNAME), "") == 0) +#ifdef _FMVER21 + || (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != FMMEMBER_LEADER)) +#else + || (CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != 1)) +#endif + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n你不是族长,所以没有修改的权力唷!", buf, sizeof(buf))); + return; + } + + if (getStringFromIndexWithDelim(message, "|", 2, token, + sizeof(token)) == FALSE) return; + + if( strcmp( token, "R") == 0 ) + { + if (getStringFromIndexWithDelim(message, "|", 3, buf, + sizeof( buf ) ) == FALSE)return; + + if (strcmp( buf, "") == 0) + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n家族主旨不可为空白唷!", buf, sizeof(buf))); + return; + } + +// print(" new_rule:%s ", buf); + saacproto_ACFixFMData_send(acfd, + CHAR_getChar(meindex, CHAR_FMNAME), + CHAR_getInt(meindex, CHAR_FMINDEX), + CHAR_getWorkInt(meindex, CHAR_WORKFMINDEXI), FM_FIX_FMRULE, + buf, "", CHAR_getWorkInt(meindex, CHAR_WORKFMCHARINDEX), + CONNECT_getFdid(fd)); + return; + } + if( strcmp( token, "P") == 0 ) + { + int havepetindex, petindex, i; + char petname[20], petattr[512]; + + // 检查是否已有守护兽 + for( i =0; i< CHAR_MAXPETHAVE; i++ ) + { + int petindex = CHAR_getCharPet(meindex, i); + if (!CHAR_CHECKINDEX(petindex)) continue; + if( CHAR_getInt( petindex , CHAR_PETFAMILY ) ==1 ) + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n原本的守护兽还在唷。", buf, sizeof(buf))); + return; + } + } + // 检查是否已有守护兽(寄宠) + for( i =0; i< CHAR_MAXPOOLPETHAVE; i++ ) + { + int petindex = CHAR_getCharPoolPet(meindex, i); + if (!CHAR_CHECKINDEX(petindex)) continue; + if( CHAR_getInt( petindex , CHAR_PETFAMILY ) ==1 ) + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n原本的守护兽还在唷。", buf, sizeof(buf))); + return; + } + } + + if (getStringFromIndexWithDelim(message, "|", 3, buf, + sizeof( buf ) ) == FALSE) return; + havepetindex = atoi( buf ); + + petindex = CHAR_getCharPet(meindex, havepetindex); + + if (!CHAR_CHECKINDEX(petindex)) return; + + if (strlen(CHAR_getChar(petindex, CHAR_USERPETNAME)) == 0) + sprintf(petname, "%s", CHAR_getChar(petindex, CHAR_NAME)); + else + sprintf(petname, "%s", CHAR_getChar(petindex, CHAR_USERPETNAME)); + sprintf(petattr, "%d %d %d %d", + CHAR_getInt(petindex, CHAR_BASEIMAGENUMBER), + CHAR_getWorkInt(petindex, CHAR_WORKATTACKPOWER), + CHAR_getWorkInt(petindex, CHAR_WORKDEFENCEPOWER), + CHAR_getWorkInt(petindex, CHAR_WORKQUICK)); + + CHAR_setInt(petindex, CHAR_PETFAMILY, 1); + saacproto_ACFixFMData_send(acfd, + CHAR_getChar(meindex, CHAR_FMNAME), + CHAR_getInt(meindex, CHAR_FMINDEX), + CHAR_getWorkInt(meindex, CHAR_WORKFMINDEXI), FM_FIX_FMPET, + petname, petattr, CHAR_getWorkInt(meindex, CHAR_WORKFMCHARINDEX), + CONNECT_getFdid(fd)); + return; + + } + +} + +void JoinMemberIndex( int meindex, int fmindexi ) +{ + int i; + + for( i = 0 ; i < FAMILY_MAXMEMBER; i++){ + if( familyMemberIndex[fmindexi][i] == meindex ) familyMemberIndex[fmindexi][i] = -1; + } + + for( i = 0 ; i < FAMILY_MAXMEMBER; i++){ + if( familyMemberIndex[fmindexi][i] < 0 ){ + familyMemberIndex[fmindexi][i] = meindex; + break; + } + } +#ifdef _CHANNEL_MODIFY + i = 0; + // 先清掉旧的频道记录 + while(i < FAMILY_MAXMEMBER){ + if(channelMember[fmindexi][0][i] == meindex){ + channelMember[fmindexi][0][i] = -1; + } + i++; + } + i = 0; + // 加入频道 + while(i < FAMILY_MAXMEMBER){ + if(channelMember[fmindexi][0][i] == -1){ + channelMember[fmindexi][0][i] = meindex; + CHAR_setWorkInt(meindex,CHAR_WORKFMCHANNEL,0); + break; + } + i++; + } +#endif +} + +void LeaveMemberIndex( int meindex, int fmindexi ) +{ + int i; + + for( i = 0 ; i < FAMILY_MAXMEMBER; i++){ + if( familyMemberIndex[fmindexi][i] == meindex ) familyMemberIndex[fmindexi][i] = -1; + } +#ifdef _CHANNEL_MODIFY + i = 0; + // 清掉旧的频道记录 + while(i < FAMILY_MAXMEMBER){ + if(channelMember[fmindexi][0][i] == meindex){ + channelMember[fmindexi][0][i] = -1; + } + i++; + } +#endif +} + +void FAMILY_RidePet( int fd, int meindex, char* message ) +{ + char token[64], token2[64]; + int petindex, rideGraNo = 0, leaderimageNo; + // Arminius 8.25 recover + int i; +#ifndef _NEW_RIDEPETS + int big4fm = 0; +#endif + if (!CHAR_CHECKINDEX(meindex))return; + + // Robin fix 战斗中不可骑 + if( CHAR_getWorkInt( meindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE ) return; + +#ifdef _PETSKILL_BECOMEPIG + if( CHAR_getInt( meindex, CHAR_BECOMEPIG) > -1 ){ //处於乌力化状态 + CHAR_setInt( meindex, CHAR_RIDEPET, -1 ); + //宠物选项的状态依然为"骑乘",这里修正过来 + CHAR_complianceParameter( meindex ); + CHAR_send_P_StatusString( meindex, CHAR_P_STRING_RIDEPET); + return; + } +#endif + + if( CHAR_getWorkInt( meindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE) return; + + if (getStringFromIndexWithDelim(message, "|", 2, token, sizeof(token)) == FALSE) return; + + if( strcmp( token, "P") == 0) { + if (getStringFromIndexWithDelim(message, "|", 3, token2, sizeof(token2)) == FALSE) + return; + + if( atoi(token2) != -1 ) { + petindex = CHAR_getCharPet( meindex, atoi( token2 ) ); + if(!CHAR_CHECKINDEX(petindex))return; + + if( CHAR_getInt( meindex, CHAR_DEFAULTPET ) == atoi( token2 ) ) return; + if( CHAR_getInt( meindex, CHAR_RIDEPET) != -1 ) return; + if( CHAR_getInt( meindex, CHAR_LEARNRIDE) < CHAR_getInt( petindex, CHAR_LV ) ) return; + if( CHAR_getWorkInt( petindex, CHAR_WORKFIXAI ) < 100 )return; + if( CHAR_getInt( meindex, CHAR_LV)+5 < CHAR_getInt( petindex, CHAR_LV ) ) return; +#ifdef _PET_2TRANS + if( CHAR_getInt( petindex, CHAR_TRANSMIGRATION) > 2 ) return; +#endif + leaderimageNo = 100700 + + ((CHAR_getInt( meindex, CHAR_BASEBASEIMAGENUMBER)-100000)/20)*10 + + CHAR_getInt( meindex, CHAR_FMSPRITE)*5; +#ifndef _NEW_RIDEPETS + switch( CHAR_getWorkInt( meindex, CHAR_WORKFMFLOOR) ){ + case 1041: + big4fm = 1; + break; + case 2031: + big4fm = 2; + break; + case 3031: + big4fm = 3; + break; + case 4031: + big4fm = 4; + break; + default: + big4fm = 0; + } +#endif + // Arminius 8.25 recover + for( i=0; i< arraysizeof(ridePetTable) ; i++ ){ +#ifdef _NEW_RIDEPETS + if( (( CHAR_getInt( meindex, CHAR_BASEIMAGENUMBER) == ridePetTable[i].charNo ) || + ( CHAR_getInt( meindex, CHAR_BASEBASEIMAGENUMBER) == ridePetTable[i].charNo )) +#else + if( ( CHAR_getInt( meindex, CHAR_BASEBASEIMAGENUMBER) == ridePetTable[i].charNo ) +#endif + && ( CHAR_getInt( petindex, CHAR_BASEBASEIMAGENUMBER) == ridePetTable[i].petNo ) ){ + rideGraNo = ridePetTable[i].rideNo; + break; + } +#ifndef _NEW_RIDEPETS + if( ( leaderimageNo == ridePetTable[i].charNo ) + && ( CHAR_getInt( petindex, CHAR_BASEBASEIMAGENUMBER) == ridePetTable[i].petNo ) +#ifdef _EVERYONE_RIDE + && big4fm != 0 + && CHAR_getInt( meindex, CHAR_FMLEADERFLAG ) != FMMEMBER_NONE + && CHAR_getInt( meindex, CHAR_FMLEADERFLAG ) != FMMEMBER_APPLY ){ +#else + && CHAR_getInt( meindex, CHAR_FMLEADERFLAG ) == FMMEMBER_LEADER ){ +#endif + rideGraNo = ridePetTable[i].rideNo; + break; + } +#endif + } + +#ifdef _NEW_RIDEPETS + if( rideGraNo == 0 ) { + int ti=-1, index, image=-1; + int petNo = CHAR_getInt( petindex, CHAR_BASEBASEIMAGENUMBER); + int playerNo = CHAR_getInt( meindex, CHAR_BASEBASEIMAGENUMBER); + + int playerlowsride = CHAR_getInt( meindex, CHAR_LOWRIDEPETS); + if( (ti = RIDEPET_getPETindex( petNo, playerlowsride )) >= 0 ) { + if( (index = RIDEPET_getNOindex( playerNo)) >= 0 ){ + if( (image = RIDEPET_getRIDEno( index,ti)) >= 0 ) { + rideGraNo = image; + } + } + } + } +#endif + + if( rideGraNo != 0 ){ +#ifdef _ITEM_METAMO + // CHAR_setWorkInt( meindex, CHAR_WORKITEMMETAMO, 0); +#endif + CHAR_setInt( meindex , CHAR_RIDEPET, atoi( token2 ) ); + CHAR_setInt( meindex , CHAR_BASEIMAGENUMBER , rideGraNo ); + CHAR_complianceParameter( meindex ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX )); + CHAR_send_P_StatusString( meindex, CHAR_P_STRING_RIDEPET ); + }else + return; + }else { //还原人物 basebaseimage + CHAR_setInt( meindex , CHAR_RIDEPET, -1 ); + CHAR_setInt( meindex , CHAR_BASEIMAGENUMBER , CHAR_getInt( meindex , CHAR_BASEBASEIMAGENUMBER) ); + CHAR_complianceParameter( meindex ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX )); + CHAR_send_P_StatusString( meindex , CHAR_P_STRING_RIDEPET); + } + } + +} + +void ACFixFMPK(int winindex, int loseindex, int data) +{ + int i = 0, charindex = 0; + char msg1[256], msg2[256]; + + sprintf(msg1, "恭喜您!家族声望提高了%8d点!", (data / 100)); + sprintf(msg2, "家族声望减少了%8d点!", (data / 100)); + for (i = 0; i < FAMILY_MAXMEMBER; i++) + { + charindex = familyMemberIndex[winindex][i]; + if( charindex >= 0 ) { + if( CHAR_getCharUse(charindex) ) + CHAR_talkToCli( charindex , -1, msg1, CHAR_COLORYELLOW); + else + familyMemberIndex[winindex][i] = -1; + } + charindex = familyMemberIndex[loseindex][i]; + if( charindex >= 0 ) { + if( CHAR_getCharUse(charindex) ) + CHAR_talkToCli( charindex , -1, msg2, CHAR_COLORRED); + else + familyMemberIndex[loseindex][i] = -1; + } + } +} + +void getNewFMList() +{ + saacproto_ACShowFMList_send( acfd ); +} + +//int channelMember[FAMILY_MAXNUM][FAMILY_MAXCHANNEL][FAMILY_MAXMEMBER]; +//int familyMemberIndex[FAMILY_MAXNUM][FAMILY_MAXMEMBER]; + + +#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令 +int get_fm_leader_index( int fm1 ) +{ + int charindex = -1; + + charindex = familyMemberIndex[fm1][0]; + + return charindex; + +} +#endif + + +void checkFamilyIndex( void ) +{ + int i, j, k, charaindex, err1=0, err2=0; +// print(" checkFamilyIndex! "); + + for( i=0; i 0 ){ + if( fmindex_wk < 0 || fmindex_wk >= FAMILY_MAXNUM){ + print("FamilyNumber Data Error!!"); + return; + } + } + saacproto_ACShowMemberList_send( acfd, fmindex_wk); + + sprintf( sendbuf, " 『族 长 需 知』\n请小心处理族员的资料,一经修改後就无法回复原态,敬请小心。"); + + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + CHAR_WINDOWTYPE_FM_MESSAGE2, + CHAR_getWorkInt( leaderdengonindex, CHAR_WORKOBJINDEX), + makeEscapeString( sendbuf, buf, sizeof(buf))); + } + if( strcmp( token, "L") == 0 ){ + int i, kind, letterNo = 0; + char subtoken[256]; + +#ifdef _FMVER21 +// if( CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != FMMEMBER_LEADER && +// CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != FMMEMBER_INVITE && +// CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != FMMEMBER_VICELEADER) return; + if( CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != FMMEMBER_LEADER && + CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != FMMEMBER_ELDER ) return; +#else + if( CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != 1) return; +#endif + + if (getStringFromIndexWithDelim(message, "|", 3, token2, + sizeof(token2)) == FALSE) return; + kind = atoi( token2 ); + + for( i=0 ; i= 0 && tempindex != meindex ) + { + char tmpbuf[1024]; + sprintf(tmpbuf, "%s", CHAR_getChar(tempindex, CHAR_NAME)); + makeEscapeString( tmpbuf, buf, sizeof(buf)); + sprintf( subsub, "|%d|%s", j, buf ); + strcat( subbuf, subsub ); + num++; + } + } + sprintf( sendbuf, "L|CHANGE|L|%d%s", num, subbuf ); + //lssproto_FM_send( fd, sendbuf); + + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_LEADERSELECT, + WINDOW_BUTTONTYPE_OK, + -1, -1, + sendbuf ); + + } + // 询问族长候选人是否愿意接受 + if( strcmp( token2, "Q") == 0 ) + { + char token3[64], token4[64]; + int toindex; + +#ifdef _FMVER21 + if( CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != FMMEMBER_LEADER) return; +#else + if( CHAR_getInt(meindex, CHAR_FMLEADERFLAG) != 1) return; +#endif + if (getStringFromIndexWithDelim(message, "|", 4, token3, + sizeof(token3)) == FALSE)return; + if (getStringFromIndexWithDelim(message, "|", 5, token4, + sizeof(token4)) == FALSE)return; + makeStringFromEscaped( token4 ); + + if( atoi(token3) < 0 || atoi(token3) > FAMILY_MAXMEMBER ) return; + + toindex = familyMemberIndex[fmindexi][atoi(token3)]; + if( !CHAR_CHECKINDEX( toindex ) ) return; + if( strcmp( token4, CHAR_getChar( toindex, CHAR_NAME)) != 0 ) return; + if( CheckLeaderQ(toindex) < 0 ) return; + + // 双方都决定让位时,CHAR_WORKLEADERCHANGE存放对方的charaindex + CHAR_setWorkInt( toindex, CHAR_WORKLEADERCHANGE, meindex); + CHAR_setWorkInt( meindex, CHAR_WORKLEADERCHANGE, toindex); + + sprintf( sendbuf, "%s|%d", makeEscapeString( CHAR_getChar( meindex, CHAR_NAME ), buf, sizeof(buf)), meindex ); + + lssproto_WN_send( CHAR_getWorkInt( toindex, CHAR_WORKFD ), WINDOW_MESSAGETYPE_LEADERSELECTA, + WINDOW_BUTTONTYPE_OK, + -1, -1, + sendbuf ); + + } + // 候选人的答覆 + if( strcmp( token2, "A") == 0 ) + { + int leaderindex, answerflag; + char leadername[64], token3[64], token4[64]; + +// print( "%s", message ); + + if (getStringFromIndexWithDelim(message, "|", 4, token3, + sizeof(token3)) == FALSE) return; + answerflag = atoi( token3 ); + + if (getStringFromIndexWithDelim(message, "|", 5, leadername, + sizeof( leadername )) == FALSE)return; + makeStringFromEscaped( leadername ); + + if (getStringFromIndexWithDelim(message, "|", 6, token4, + sizeof(token4)) == FALSE)return; + + //if( atoi(token4) < 0 || atoi(token4) > FAMILY_MAXMEMBER ) return; + + leaderindex = atoi( token4 ); + + // 检查双方的CHAR_WORKLEADERCHANGE是否相符 + if( CHAR_getWorkInt( meindex, CHAR_WORKLEADERCHANGE ) != leaderindex ) return; + if( !CHAR_CHECKINDEX(leaderindex) ) return; + if( strcmp( leadername, CHAR_getChar( leaderindex, CHAR_NAME) ) != 0 ) return; + if( CHAR_getWorkInt( leaderindex, CHAR_WORKLEADERCHANGE ) != meindex ) return; + CHAR_setWorkInt( leaderindex, CHAR_WORKLEADERCHANGE, -1 ); +#ifdef _FMVER21 + if( CHAR_getInt(leaderindex, CHAR_FMLEADERFLAG ) != FMMEMBER_LEADER ) return; +#else + if( CHAR_getInt(leaderindex, CHAR_FMLEADERFLAG ) != 1 ) return; +#endif + if( CHAR_getInt(meindex, CHAR_FMINDEX) != CHAR_getInt(leaderindex, CHAR_FMINDEX) ) return; + + if( answerflag == 0 ) + { + CHAR_setWorkInt( meindex, CHAR_WORKLEADERCHANGE, 0); + CHAR_setWorkInt( leaderindex, CHAR_WORKLEADERCHANGE, 0); + lssproto_WN_send( CHAR_getWorkInt( leaderindex, CHAR_WORKFD) , WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n对不起!对方不愿意接受!", buf, sizeof(buf)) ); + return; + } + + if( answerflag == 1 ) + { + char tmpbuf[1024]; + sprintf( buf, "%d", CHAR_getInt( meindex, CHAR_FACEIMAGENUMBER ) ); + // CoolFish: add charname 2001/9/27 + sprintf( tmpbuf, "%s", CHAR_getChar( meindex, CHAR_NAME ) ); + saacproto_ACFixFMData_send(acfd, + CHAR_getChar(meindex, CHAR_FMNAME), + CHAR_getInt(meindex, CHAR_FMINDEX), + CHAR_getWorkInt(meindex, CHAR_WORKFMINDEXI), FM_FIX_FMLEADERCHANGE , buf, + tmpbuf, CHAR_getWorkInt(meindex, CHAR_WORKFMCHARINDEX), CONNECT_getFdid(fd)); + // "", CHAR_getWorkInt(meindex, CHAR_WORKFMCHARINDEX), CONNECT_getFdid(fd)); + return; + } + } + } +} + +void ACFMJob( int fd, int ret, char* data1, char* data2 ) +{ + + int charaindex = CONNECT_getCharaindex( fd ); + if( !CHAR_CHECKINDEX(charaindex) ) return; + + + if( 1 ){ + + int leaderindex = CHAR_getWorkInt( charaindex, CHAR_WORKLEADERCHANGE ); + char buf[256], buf2[256]; + + CHAR_setWorkInt( charaindex, CHAR_WORKLEADERCHANGE, 0 ); + print("leaderindex:%d:%s\n", leaderindex,CHAR_getChar(leaderindex,CHAR_NAME) ); + + if( !CHAR_CHECKINDEX(leaderindex) ) return; + //if( CHAR_getWorkInt( leaderindex, CHAR_WORKLEADERCHANGE ) != charaindex ) return; + CHAR_setWorkInt( leaderindex, CHAR_WORKLEADERCHANGE, 0 ); + + if( ret == 0 ){ + CHAR_talkToCli( charaindex, -1, "族长让位失败!", CHAR_COLORYELLOW ); + CHAR_talkToCli( leaderindex, -1, "族长让位失败!", CHAR_COLORYELLOW ); + return; + } + + // Robin 10/02 debug + if( CHAR_getInt( leaderindex, CHAR_FMINDEX) != CHAR_getInt( charaindex, CHAR_FMINDEX) +#ifdef _FMVER21 + // || CHAR_getInt( leaderindex, CHAR_FMLEADERFLAG) != FMMEMBER_LEADER ) +#else + // || CHAR_getInt( leaderindex, CHAR_FMLEADERFLAG) != 1 +#endif + ) + { + sprintf( buf, "leaderindex:%d:%s\n", leaderindex, CHAR_getChar( leaderindex, CHAR_NAME) ); + LogFamily( + CHAR_getChar(charaindex, CHAR_FMNAME), + CHAR_getInt(charaindex, CHAR_FMINDEX), + CHAR_getChar(charaindex, CHAR_NAME), + CHAR_getChar(charaindex, CHAR_CDKEY), + "LEADERCHANGE_ERROR(族长让位失败)", + buf + ); + return; + } + + //CHAR_setInt( leaderindex, CHAR_FMLEADERFLAG, FMMEMBER_MEMBER); + //CHAR_setInt( charaindex, CHAR_FMLEADERFLAG, FMMEMBER_LEADER); + SetFMPetVarInit( leaderindex ); + SetFMPetVarInit( charaindex ); + CHAR_sendStatusString( leaderindex, "F"); + CHAR_sendStatusString( charaindex, "F"); + + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( "\n恭喜你!你已经是新任的族长了。\n请好好的努力吧!\n对了~记得请先到村长家的家族管理员选择\n新的家族守护兽,否则家族将会被解散唷!", buf, sizeof(buf))); + + sprintf( buf2, "\n辛苦你了!你已经将族长的位子交给%s了。", CHAR_getChar( charaindex, CHAR_NAME) ); + lssproto_WN_send( CHAR_getWorkInt( leaderindex, CHAR_WORKFD) , WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( buf2, buf, sizeof(buf))); + +// print(" LeaderChange!! [%s]->[%s] ", CHAR_getChar(leaderindex, CHAR_CDKEY), CHAR_getChar(charaindex, CHAR_CDKEY) ); + + sprintf( buf, "%s\t%s\t%s", + CHAR_getChar(leaderindex, CHAR_FMNAME), + CHAR_getChar(leaderindex, CHAR_NAME), + CHAR_getChar(leaderindex, CHAR_CDKEY) + ); + + LogFamily( + CHAR_getChar(charaindex, CHAR_FMNAME), + CHAR_getInt(charaindex, CHAR_FMINDEX), + CHAR_getChar(charaindex, CHAR_NAME), + CHAR_getChar(charaindex, CHAR_CDKEY), + "LEADERCHANGE(族长让位)", + buf + ); + + } + +} + + +#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令 + +FM_PK_STRUCT fm_pk_struct; + +void setInt_fm_pk_struct( int index, int type, int num ) +{ + switch( type ){ + case FM_INDEX: + fm_pk_struct.fm_index[index] = num; + break; + case FM_WIN: + fm_pk_struct.fm_win[index] = num; + break; + case FM_LOSE: + fm_pk_struct.fm_lose[index] = num; + break; + case FM_SCORE: + fm_pk_struct.fm_score[index] = num; + break; + } +} + +void setChar_fm_pk_struct( int index, int type, char *msg ) +{ + switch( type ){ + case FM_NAME: + strcpy( fm_pk_struct.fm_name[index], msg ); + break; + } +} + +int getInt_fm_pk_struct( int index, int type ) +{ + switch( type ){ + case FM_INDEX: + return fm_pk_struct.fm_index[index]; + case FM_WIN: + return fm_pk_struct.fm_win[index]; + case FM_LOSE: + return fm_pk_struct.fm_lose[index]; + case FM_SCORE: + return fm_pk_struct.fm_score[index]; + } + + return -1; +} + +char *getChar_fm_pk_struct( int index, int type ) +{ + switch( type ){ + case FM_NAME: + return fm_pk_struct.fm_name[index]; + } + + return NULL; +} + +#endif diff --git a/gmsv/char/ls2data.h b/gmsv/char/ls2data.h new file mode 100644 index 0000000..b2a4104 --- /dev/null +++ b/gmsv/char/ls2data.h @@ -0,0 +1,13 @@ +#ifndef LS2DATA_DAT +#define LS2DATA_DAT + +typedef struct { + int hash; + char *name; + int graphicnumber; +} CconvertStringNumber; + +CconvertStringNumber *convertStringNumber; +int cconvertStringNumber; + +#endif // LS2DATA_DAT ///:~ \ No newline at end of file diff --git a/gmsv/char/makefile b/gmsv/char/makefile new file mode 100644 index 0000000..4001a19 --- /dev/null +++ b/gmsv/char/makefile @@ -0,0 +1,1043 @@ +INCFLAGS=-I.. -I../include + + +CFLAGS=-w -O3 $(INCFLAGS) + +PROG=libchar.a + +SRC=char_base.c char.c char_event.c char_data.c skill.c title.c\ +addressbook.c chatmagic.c event.c char_walk.c encount.c pet.c \ +enemy.c pet_event.c char_talk.c char_party.c char_item.c deathcontend.c \ +chatroom.c petmail.c trade.c family.c defend.c char_angel.c + +OBJ=$(SRC:.c=.o) + +ifeq (0,$(MAKELEVEL)) +CC=gcc +RM=rm -f +AR=ar cr +MV=mv +RANLIB=ranlib +SED=sed +SHELL=/bin/sh +endif + +all: $(PROG) + +$(PROG): $(OBJ) + $(RM) $(PROG) + $(AR) $(PROG) $(OBJ) + $(RANLIB) $(PROG) + +depend: + $(MV) makefile makefile.bak + $(SED) -ne '1,/^# DO NOT DELETE THIS LINE/p' makefile.bak>makefile + $(CC) $(INCFLAGS) -M $(SRC) >> makefile + +clean: + $(RM) $(PROG) + $(RM) $(OBJ) + $(RM) *~ + +distclean: + $(RM) $(PROG) + $(RM) $(OBJ) + $(RM) *~ + $(MV) makefile makefile.bak + $(SED) -ne '1,/^# DO NOT DELETE THIS LINE/p' makefile.bak>makefile + $(RM) makefile.bak + +# DO NOT DELETE THIS LINE +char_base.o: char_base.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/time.h /usr/include/bits/time.h /usr/include/bits/types.h \ + /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \ + ../include/char_base.h ../include/skill.h ../include/common.h \ + /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \ + /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/char.h ../include/buf.h ../include/magic.h \ + ../include/function.h ../include/npccreate.h ../include/configfile.h \ + ../include/pet.h ../include/pet_skill.h ../include/anim_tbl.h \ + ../include/enemy.h ../include/saacproto_cli.h \ + ../include/saacproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h ../include/log.h +char.o: char.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \ + /usr/include/sys/stat.h /usr/include/bits/stat.h /usr/include/ctype.h \ + /usr/include/sys/time.h /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h ../include/common.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + ../include/title.h ../include/addressbook.h ../include/net.h \ + /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/char.h ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/item_event.h ../include/buf.h \ + ../include/object.h ../include/map_deal.h ../include/saacproto_cli.h \ + ../include/saacproto_util.h ../include/readmap.h \ + ../include/handletime.h ../include/char_event.h ../include/npccreate.h \ + ../include/magic_base.h ../include/magic.h ../include/chatmagic.h \ + ../include/configfile.h ../include/log.h ../include/anim_tbl.h \ + ../include/encount.h ../include/battle.h ../include/pet_skill.h \ + ../include/enemy.h ../include/npcutil.h ../include/pet.h \ + ../include/family.h ../include/defend.h ../include/profession_skill.h \ + ../include/chatroom.h +char_event.o: char_event.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/ctype.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/typesizes.h /usr/include/endian.h \ + /usr/include/bits/endian.h ../include/common.h /usr/include/stdio.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/include/bits/wchar.h /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h ../include/char.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/item_event.h ../include/object.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/string.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h ../include/readmap.h \ + ../include/map_deal.h ../include/saacproto_cli.h \ + ../include/saacproto_util.h ../include/npccreate.h \ + ../include/handletime.h ../include/anim_tbl.h ../include/family.h +char_data.o: char_data.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/math.h /usr/include/bits/huge_val.h \ + /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/readmap.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + ../include/util.h /usr/include/sys/time.h /usr/include/time.h \ + /usr/include/bits/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/anim_tbl.h ../include/battle.h \ + ../include/char.h ../include/char_base.h ../include/skill.h \ + ../include/title.h ../include/addressbook.h ../include/net.h \ + /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/buf.h ../include/log.h ../include/pet.h ../include/enemy.h \ + ../include/configfile.h defaultPlayer.h defaultGroundEnemy.h \ + ../ls2data.dat ../include/family.h ../include/saacproto_cli.h \ + ../include/saacproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h +skill.o: skill.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \ + ../include/skill.h ../include/common.h /usr/include/errno.h \ + /usr/include/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/asm/errno.h ../include/util.h /usr/include/sys/time.h \ + ../include/char.h ../include/char_base.h ../include/title.h \ + ../include/addressbook.h ../include/net.h /usr/include/netinet/in.h \ + /usr/include/stdint.h /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/battle.h ../include/profession_skill.h +title.o: title.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \ + /usr/include/ctype.h /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h ../include/title.h \ + ../include/common.h ../include/util.h /usr/include/sys/time.h \ + ../include/char.h ../include/char_base.h ../include/skill.h \ + ../include/addressbook.h ../include/net.h /usr/include/netinet/in.h \ + /usr/include/stdint.h /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/buf.h ../include/configfile.h +addressbook.o: addressbook.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/stdio.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \ + /usr/include/strings.h ../include/addressbook.h ../include/common.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h ../include/util.h \ + /usr/include/sys/time.h ../include/net.h /usr/include/netinet/in.h \ + /usr/include/stdint.h /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char.h ../include/char_base.h \ + ../include/skill.h ../include/title.h ../include/char_data.h \ + ../include/item.h ../include/handletime.h ../include/buf.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/saacproto_cli.h ../include/saacproto_util.h \ + ../include/object.h ../include/battle.h ../include/configfile.h \ + ../include/npcutil.h ../include/pet.h ../include/petmail.h \ + ../include/log.h +chatmagic.o: chatmagic.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/string.h /usr/include/ctype.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/math.h \ + /usr/include/bits/huge_val.h /usr/include/bits/mathdef.h \ + /usr/include/bits/mathcalls.h /usr/include/malloc.h /usr/include/time.h \ + /usr/include/bits/time.h /usr/include/stdlib.h /usr/include/sys/types.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/common.h /usr/include/errno.h \ + /usr/include/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/asm/errno.h ../include/char.h ../include/char_base.h \ + ../include/skill.h ../include/util.h /usr/include/sys/time.h \ + ../include/title.h ../include/addressbook.h ../include/net.h \ + /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/buf.h ../include/npcutil.h ../include/object.h \ + ../include/handletime.h ../include/chatmagic.h ../include/configfile.h \ + ../include/readmap.h ../include/map_deal.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/log.h ../include/battle.h \ + ../include/pet.h ../include/enemy.h ../include/encount.h \ + ../include/magic_base.h ../include/magic.h ../include/pet_skill.h \ + ../include/pet_event.h ../include/item_gen.h ../include/mclient.h \ + ../include/npc_eventaction.h ../include/map_warppoint.h \ + ../include/npc_manorsman.h ../include/saacproto_cli.h \ + ../include/saacproto_util.h ../include/npc_scheduleman.h \ + ../include/trade.h ../include/npccreate.h ../include/profession_skill.h \ + ../include/char_talk.h ../include/family.h ../include/petmail.h \ + ../include/npc_raceman.h +event.o: event.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + ../include/object.h ../include/common.h /usr/include/errno.h \ + /usr/include/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/asm/errno.h ../include/char_base.h ../include/skill.h \ + ../include/util.h /usr/include/sys/time.h /usr/include/time.h \ + /usr/include/bits/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/readmap.h ../include/map_warppoint.h \ + ../include/event.h ../include/npc_warp.h ../include/npc_npcenemy.h +char_walk.o: char_walk.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/ctype.h /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/time.h /usr/include/bits/time.h ../include/common.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/handletime.h /usr/include/sys/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h ../include/object.h ../include/char_base.h \ + ../include/skill.h ../include/util.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/char_event.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/string.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h ../include/readmap.h \ + ../include/map_deal.h ../include/npccreate.h ../include/encount.h \ + ../include/npcutil.h ../include/battle.h ../include/configfile.h \ + ../include/npc_npcenemy.h +encount.o: encount.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/string.h /usr/include/math.h /usr/include/bits/huge_val.h \ + /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h ../include/common.h \ + ../include/util.h /usr/include/sys/time.h /usr/include/time.h \ + /usr/include/bits/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/buf.h ../include/char_base.h \ + ../include/skill.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/configfile.h ../include/encount.h \ + ../include/enemy.h +pet.o: pet.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + ../include/char_base.h ../include/skill.h ../include/common.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/object.h ../include/readmap.h \ + ../include/map_deal.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/string.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/handletime.h ../include/pet.h ../include/battle.h \ + ../include/petmail.h ../include/log.h ../include/function.h +enemy.o: enemy.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/string.h ../include/common.h /usr/include/errno.h \ + /usr/include/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/asm/errno.h ../include/util.h /usr/include/sys/time.h \ + /usr/include/time.h /usr/include/bits/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/buf.h ../include/char_base.h \ + ../include/skill.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/configfile.h ../include/encount.h \ + ../include/enemy.h ../include/pet.h ../include/enemyexptbl.h \ + ../include/petmail.h ../include/battle.h ../include/pet_skillinfo.h \ + ../include/anim_tbl.h ../include/log.h ../include/npcutil.h +pet_event.o: pet_event.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/alloca.h ../include/common.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h ../include/object.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/configfile.h ../include/handletime.h \ + ../include/pet_event.h ../include/npcutil.h ../include/log.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/string.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/npc_exchangeman.h \ + ../include/npc_eventaction.h +char_talk.o: char_talk.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/ctype.h /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/string.h ../include/readmap.h ../include/common.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/object.h ../include/char.h \ + ../include/char_base.h ../include/skill.h ../include/title.h \ + ../include/addressbook.h ../include/net.h /usr/include/netinet/in.h \ + /usr/include/stdint.h /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/chatmagic.h ../include/battle.h ../include/log.h \ + ../include/configfile.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/saacproto_cli.h \ + ../include/saacproto_util.h ../include/family.h \ + ../include/profession_skill.h +char_party.o: char_party.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + ../include/readmap.h ../include/common.h /usr/include/errno.h \ + /usr/include/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/asm/errno.h ../include/util.h /usr/include/sys/time.h \ + /usr/include/time.h /usr/include/bits/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/object.h ../include/char.h \ + ../include/char_base.h ../include/skill.h ../include/title.h \ + ../include/addressbook.h ../include/net.h /usr/include/netinet/in.h \ + /usr/include/stdint.h /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/battle.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/string.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h ../include/npcutil.h \ + ../include/npc_bus.h ../include/npc_airplane.h ../include/family.h \ + ../include/init.h +char_item.o: char_item.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + ../include/readmap.h ../include/common.h /usr/include/errno.h \ + /usr/include/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/asm/errno.h ../include/util.h /usr/include/sys/time.h \ + /usr/include/time.h /usr/include/bits/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/map_deal.h ../include/object.h \ + ../include/char.h ../include/char_base.h ../include/skill.h \ + ../include/title.h ../include/addressbook.h ../include/net.h \ + /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/string.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/handletime.h ../include/log.h \ + ../include/item_event.h ../include/battle.h ../include/petmail.h +deathcontend.o: deathcontend.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/math.h /usr/include/bits/huge_val.h \ + /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \ + ../include/util.h /usr/include/sys/time.h /usr/include/bits/types.h \ + /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \ + /usr/include/time.h /usr/include/bits/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \ + /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/common.h /usr/include/errno.h \ + /usr/include/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/asm/errno.h ../include/char.h ../include/char_base.h \ + ../include/skill.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/battle.h ../include/configfile.h ../include/saacproto_cli.h \ + ../include/saacproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h ../include/buf.h \ + ../include/log.h +chatroom.o: chatroom.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/ctype.h /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/string.h ../include/readmap.h ../include/common.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/object.h ../include/char.h \ + ../include/char_base.h ../include/skill.h ../include/title.h \ + ../include/addressbook.h ../include/net.h /usr/include/netinet/in.h \ + /usr/include/stdint.h /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/chatmagic.h ../include/battle.h ../include/log.h \ + ../include/configfile.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/saacproto_cli.h \ + ../include/saacproto_util.h ../include/family.h ../include/chatroom.h +petmail.o: petmail.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + ../include/configfile.h ../include/common.h /usr/include/errno.h \ + /usr/include/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/asm/errno.h ../include/buf.h ../include/char_base.h \ + ../include/skill.h ../include/util.h /usr/include/sys/time.h \ + /usr/include/time.h /usr/include/bits/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/battle.h ../include/handletime.h \ + ../include/map_deal.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/string.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h ../include/pet.h \ + ../include/petmail.h ../include/npcutil.h ../include/log.h +trade.o: trade.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/string.h /usr/include/ctype.h /usr/include/endian.h \ + /usr/include/bits/endian.h ../include/readmap.h ../include/common.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/object.h ../include/char.h \ + ../include/char_base.h ../include/skill.h ../include/title.h \ + ../include/addressbook.h ../include/net.h /usr/include/netinet/in.h \ + /usr/include/stdint.h /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/npcutil.h ../include/trade.h \ + ../include/log.h ../include/handletime.h ../include/buf.h \ + ../include/battle.h ../include/npc_bus.h ../include/char_talk.h \ + ../include/pet_skill.h +family.o: family.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/string.h /usr/include/ctype.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/time.h /usr/include/bits/time.h \ + ../include/readmap.h ../include/common.h /usr/include/errno.h \ + /usr/include/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/asm/errno.h ../include/util.h /usr/include/sys/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/object.h ../include/char.h \ + ../include/char_base.h ../include/skill.h ../include/title.h \ + ../include/addressbook.h ../include/net.h /usr/include/netinet/in.h \ + /usr/include/stdint.h /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/saacproto_cli.h \ + ../include/saacproto_util.h ../include/npcutil.h ../include/family.h \ + ../include/log.h ../include/handletime.h ../include/buf.h \ + ../include/battle.h ../include/npc_bus.h ../include/char_talk.h \ + ../include/npc_scheduleman.h ../include/npc_fmdengon.h +defend.o: defend.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/string.h /usr/include/ctype.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/time.h /usr/include/bits/time.h \ + ../include/readmap.h ../include/common.h /usr/include/errno.h \ + /usr/include/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/asm/errno.h ../include/util.h /usr/include/sys/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/object.h ../include/char.h \ + ../include/char_base.h ../include/skill.h ../include/title.h \ + ../include/addressbook.h ../include/net.h /usr/include/netinet/in.h \ + /usr/include/stdint.h /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/saacproto_cli.h \ + ../include/saacproto_util.h ../include/npcutil.h ../include/family.h \ + ../include/log.h ../include/handletime.h ../include/buf.h \ + ../include/battle.h ../include/npc_bus.h ../include/char_talk.h \ + ../include/npc_scheduleman.h ../include/defend.h +char_angel.o: char_angel.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \ + /usr/include/sys/stat.h /usr/include/bits/stat.h /usr/include/ctype.h \ + /usr/include/sys/time.h /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h ../include/common.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + ../include/title.h ../include/addressbook.h ../include/net.h \ + /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/char.h ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/item_event.h ../include/buf.h \ + ../include/object.h ../include/map_deal.h ../include/saacproto_cli.h \ + ../include/saacproto_util.h ../include/readmap.h \ + ../include/handletime.h ../include/char_event.h ../include/npccreate.h \ + ../include/magic_base.h ../include/magic.h ../include/chatmagic.h \ + ../include/configfile.h ../include/log.h ../include/anim_tbl.h \ + ../include/encount.h ../include/battle.h ../include/pet_skill.h \ + ../include/enemy.h ../include/npcutil.h ../include/pet.h \ + ../include/family.h ../include/defend.h ../include/npcserver.h diff --git a/gmsv/char/makefile.bak b/gmsv/char/makefile.bak new file mode 100644 index 0000000..32d36d4 --- /dev/null +++ b/gmsv/char/makefile.bak @@ -0,0 +1,727 @@ +INCFLAGS=-I.. -I../include + + +CFLAGS=-w -O3 $(INCFLAGS) + +PROG=libchar.a + +SRC=char_base.c char.c char_event.c char_data.c skill.c title.c\ +addressbook.c chatmagic.c event.c char_walk.c encount.c pet.c \ +enemy.c pet_event.c char_talk.c char_party.c char_item.c deathcontend.c \ +chatroom.c petmail.c trade.c family.c defend.c char_angel.c + +OBJ=$(SRC:.c=.o) + +ifeq (0,$(MAKELEVEL)) +CC=gcc +RM=rm -f +AR=ar cr +MV=mv +RANLIB=ranlib +SED=sed +SHELL=/bin/sh +endif + +all: $(PROG) + +$(PROG): $(OBJ) + $(RM) $(PROG) + $(AR) $(PROG) $(OBJ) + $(RANLIB) $(PROG) + +depend: + $(MV) makefile makefile.bak + $(SED) -ne '1,/^# DO NOT DELETE THIS LINE/p' makefile.bak>makefile + $(CC) $(INCFLAGS) -M $(SRC) >> makefile + +clean: + $(RM) $(PROG) + $(RM) $(OBJ) + $(RM) *~ + +distclean: + $(RM) $(PROG) + $(RM) $(OBJ) + $(RM) *~ + $(MV) makefile makefile.bak + $(SED) -ne '1,/^# DO NOT DELETE THIS LINE/p' makefile.bak>makefile + $(RM) makefile.bak + +# DO NOT DELETE THIS LINE +char_base.o: char_base.c /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char_base.h ../include/skill.h ../include/common.h \ + /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/util.h /usr/include/sys/time.h /usr/include/time.h \ + /usr/include/bits/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/char.h ../include/buf.h ../include/magic.h \ + ../include/function.h ../include/npccreate.h ../include/configfile.h \ + ../include/pet.h ../include/pet_skill.h +char.o: char.c /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h /usr/include/string.h /usr/include/ctype.h \ + /usr/include/sys/time.h /usr/include/bits/time.h ../include/common.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + ../include/title.h ../include/addressbook.h ../include/net.h \ + /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/char.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/item_event.h ../include/buf.h ../include/object.h \ + ../include/map_deal.h ../include/saacproto_cli.h ../include/map_warppoint.h \ + ../include/saacproto_util.h ../include/readmap.h \ + ../include/handletime.h ../include/char_event.h \ + ../include/npccreate.h ../include/magic_base.h ../include/magic.h \ + ../include/chatmagic.h ../include/configfile.h ../include/log.h \ + ../include/anim_tbl.h ../include/encount.h ../include/battle.h \ + ../include/pet_skill.h ../include/enemy.h ../include/npcutil.h \ + ../include/pet.h ../include/family.h +char_event.o: char_event.c /usr/include/ctype.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h /usr/include/bits/types.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/endian.h /usr/include/bits/endian.h ../include/common.h \ + /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/libio.h /usr/include/_G_config.h \ + /usr/include/bits/stdio_lim.h ../include/char.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/item_event.h ../include/object.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/string.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/readmap.h ../include/map_deal.h \ + ../include/saacproto_cli.h ../include/saacproto_util.h \ + ../include/npccreate.h ../include/handletime.h ../include/anim_tbl.h +char_data.o: char_data.c /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/math.h /usr/include/bits/huge_val.h \ + /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/float.h \ + ../include/readmap.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/util.h /usr/include/sys/time.h /usr/include/time.h \ + /usr/include/bits/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/anim_tbl.h ../include/char.h \ + ../include/char_base.h ../include/skill.h ../include/title.h \ + ../include/addressbook.h ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/buf.h defaultPlayer.h defaultGroundEnemy.h ls2data.h +skill.o: skill.c /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h /usr/include/string.h ../include/skill.h \ + ../include/common.h ../include/util.h /usr/include/sys/time.h \ + /usr/include/bits/time.h ../include/char.h ../include/char_base.h \ + ../include/title.h ../include/addressbook.h ../include/net.h \ + /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h +title.o: title.c /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h /usr/include/string.h /usr/include/ctype.h \ + ../include/title.h ../include/common.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/bits/time.h ../include/char.h \ + ../include/char_base.h ../include/skill.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/buf.h ../include/configfile.h +addressbook.o: addressbook.c /usr/include/stdio.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h /usr/include/string.h /usr/include/strings.h \ + ../include/addressbook.h ../include/common.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/bits/time.h ../include/net.h \ + /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char.h ../include/char_base.h \ + ../include/skill.h ../include/title.h ../include/char_data.h \ + ../include/item.h ../include/handletime.h ../include/buf.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/saacproto_cli.h ../include/saacproto_util.h \ + ../include/object.h ../include/battle.h ../include/configfile.h \ + ../include/npcutil.h ../include/pet.h ../include/petmail.h \ + ../include/log.h +chatmagic.o: chatmagic.c /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + /usr/include/time.h /usr/include/bits/time.h /usr/include/string.h \ + /usr/include/ctype.h /usr/include/endian.h /usr/include/bits/endian.h \ + ../include/common.h ../include/char.h ../include/char_base.h \ + ../include/skill.h ../include/util.h /usr/include/sys/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/buf.h ../include/npcutil.h ../include/object.h \ + ../include/handletime.h ../include/chatmagic.h \ + ../include/configfile.h ../include/readmap.h ../include/map_deal.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/log.h ../include/battle.h \ + ../include/pet.h ../include/enemy.h ../include/encount.h \ + ../include/magic_base.h ../include/magic.h ../include/pet_skill.h \ + ../include/item_gen.h +event.o: event.c /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/object.h ../include/common.h ../include/char_base.h \ + ../include/skill.h ../include/util.h /usr/include/sys/time.h \ + /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/map_warppoint.h \ + ../include/item.h ../include/readmap.h ../include/event.h \ + ../include/npc_warp.h ../include/npc_npcenemy.h +char_walk.o: char_walk.c /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + /usr/include/ctype.h /usr/include/endian.h /usr/include/bits/endian.h \ + ../include/common.h ../include/handletime.h /usr/include/sys/time.h \ + /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h ../include/object.h ../include/char_base.h \ + ../include/skill.h ../include/util.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/char_event.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/string.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/readmap.h ../include/map_deal.h \ + ../include/npccreate.h ../include/encount.h ../include/npcutil.h \ + ../include/battle.h +encount.o: encount.c /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + /usr/include/string.h /usr/include/math.h \ + /usr/include/bits/huge_val.h /usr/include/bits/mathdef.h \ + /usr/include/bits/mathcalls.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/float.h \ + ../include/common.h ../include/util.h /usr/include/sys/time.h \ + /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/buf.h ../include/char_base.h \ + ../include/skill.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/configfile.h ../include/encount.h \ + ../include/enemy.h +pet.o: pet.c /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/common.h \ + ../include/util.h /usr/include/sys/time.h /usr/include/time.h \ + /usr/include/bits/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/object.h ../include/readmap.h \ + ../include/map_deal.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/string.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/handletime.h ../include/pet.h \ + ../include/battle.h ../include/petmail.h ../include/log.h +enemy.o: enemy.c /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + /usr/include/string.h ../include/common.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/buf.h ../include/char_base.h \ + ../include/skill.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/configfile.h ../include/encount.h \ + ../include/enemy.h ../include/pet.h ../include/enemyexptbl.h \ + ../include/petmail.h ../include/battle.h ../include/pet_skillinfo.h \ + ../include/anim_tbl.h +pet_event.o: pet_event.c /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/common.h ../include/object.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/bits/time.h ../include/title.h \ + ../include/addressbook.h ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/configfile.h ../include/handletime.h \ + ../include/pet_event.h ../include/npcutil.h ../include/log.h +char_talk.o: char_talk.c /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + /usr/include/ctype.h /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/string.h ../include/readmap.h ../include/common.h \ + ../include/util.h /usr/include/sys/time.h /usr/include/time.h \ + /usr/include/bits/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h \ + /usr/include/sys/sysmacros.h /usr/include/alloca.h \ + ../include/object.h ../include/char.h ../include/char_base.h \ + ../include/skill.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/chatmagic.h ../include/battle.h ../include/log.h \ + ../include/configfile.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/family.h +char_party.o: char_party.c /usr/include/stdio.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/readmap.h ../include/common.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/object.h ../include/char.h \ + ../include/char_base.h ../include/skill.h ../include/title.h \ + ../include/addressbook.h ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/battle.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/string.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/npcutil.h ../include/npc_bus.h \ + ../include/init.h +char_item.o: char_item.c /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/readmap.h ../include/common.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/map_deal.h ../include/object.h \ + ../include/char.h ../include/char_base.h ../include/skill.h \ + ../include/title.h ../include/addressbook.h ../include/net.h \ + /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/string.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/handletime.h ../include/log.h \ + ../include/item_event.h ../include/battle.h +petmail.o: petmail.c /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/configfile.h ../include/common.h ../include/buf.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/battle.h ../include/handletime.h \ + ../include/map_deal.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/string.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/pet.h ../include/petmail.h \ + ../include/npcutil.h ../include/log.h +trade.o: trade.c /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + /usr/include/string.h /usr/include/ctype.h /usr/include/endian.h \ + /usr/include/bits/endian.h ../include/readmap.h ../include/common.h \ + ../include/util.h /usr/include/sys/time.h /usr/include/time.h \ + /usr/include/bits/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h \ + /usr/include/sys/sysmacros.h /usr/include/alloca.h \ + ../include/object.h ../include/char.h ../include/char_base.h \ + ../include/skill.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/npcutil.h ../include/trade.h \ + ../include/log.h ../include/handletime.h ../include/buf.h \ + ../include/battle.h ../include/npc_bus.h ../include/char_talk.h +family.o: family.c /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + /usr/include/string.h /usr/include/ctype.h /usr/include/endian.h \ + /usr/include/bits/endian.h ../include/readmap.h ../include/common.h \ + ../include/util.h /usr/include/sys/time.h /usr/include/time.h \ + /usr/include/bits/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h \ + /usr/include/sys/sysmacros.h /usr/include/alloca.h \ + ../include/object.h ../include/char.h ../include/char_base.h \ + ../include/skill.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/saacproto_cli.h \ + ../include/saacproto_util.h ../include/npcutil.h ../include/family.h \ + ../include/log.h ../include/handletime.h ../include/buf.h \ + ../include/battle.h ../include/npc_bus.h ../include/char_talk.h diff --git a/gmsv/char/pet.c b/gmsv/char/pet.c new file mode 100644 index 0000000..8d884ca --- /dev/null +++ b/gmsv/char/pet.c @@ -0,0 +1,627 @@ +#include "version.h" +#include + +#include "char_base.h" +#include "char.h" +#include "object.h" +#include "readmap.h" +#include "map_deal.h" +#include "lssproto_serv.h" +#include "handletime.h" +#include "pet.h" +#include "battle.h" +#include "petmail.h" +#include "log.h" +#ifdef _MARKET_TRADE +#include "item_trade.h" +#endif +#include "function.h" +/* + * 矢永玄质 卞楮允月末□旦 + */ +/*------------------------------------------------------------------------ + * 矢永玄毛ㄠ勾喃曰癫化月[犯田永弘迕[ + * CHAR厌瞻 卞及心综岳今木月[ + * 曰袄“综岳今木凶平乓仿index 撩 “-1 + *-----------------------------------------------------------------------*/ +int PET_DEBUG_initPetOne( int charaindex) +{ + Char ch; + int havepetindex; + int index; + /* 矢永玄毛 化月井譬屯月 */ + havepetindex = CHAR_getCharPetElement( charaindex) ; + + memset( &ch, 0, sizeof( ch)); + if( !CHAR_getDefaultChar( &ch,31010 ) )return -1; + + /* 飓 寞 */ + ch.data[CHAR_BASEBASEIMAGENUMBER] + = ch.data[CHAR_BASEIMAGENUMBER] = 30008; + ch.data[CHAR_WHICHTYPE] = CHAR_TYPEPET; + /* 猾 */ + ch.workint[CHAR_WORKATTACKPOWER] = 100; + /* 潮 */ + ch.workint[CHAR_WORKDEFENCEPOWER] = 50; + /* HP */ + ch.data[CHAR_HP] = 100; + /* 蟆 */ + strcpysafe( ch.string[CHAR_NAME].string, 32, "宠物1" ); + + /* CHAR卞喃曰癫化月 */ + index = PET_initCharOneArray( &ch); + + if( index < 0 ) return -1; + + /* 仍潜谛本永玄 */ + CHAR_setWorkInt( index, CHAR_WORKPLAYERINDEX, charaindex); + CHAR_setWorkInt( index,CHAR_WORKOBJINDEX,-1); + CHAR_setCharPet( charaindex, havepetindex, index); + CHAR_setInt( index, CHAR_SLOT, 2); + return havepetindex; +} + +static int _PET_dropPet( int charaindex, int havepetindex, int tofl, int tox, int toy) +{ + char szPet[128]; + int dirx[9],diry[9]; + int i, j; + int objindex=-1; + int floor,x,y; + int petindex; + int count_chara =0, count_item =0; + + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE) + != BATTLE_CHARMODE_NONE) return FALSE; + petindex = CHAR_getCharPet(charaindex,havepetindex); + if( !CHAR_CHECKINDEX( petindex )) return FALSE; + if( !CHAR_CHECKINDEX( charaindex ) )return FALSE; + if( CHAR_CHECKINDEX( petindex) == FALSE ) return FALSE; + +#ifdef _AVID_TRADETRYBUG //丢出宠物 + if( CHAR_getWorkInt( charaindex, CHAR_WORKTRADEMODE) == CHAR_TRADE_TRADING ){ + CHAR_talkToCli( charaindex, -1, "交易状态中无法丢出宠物。", CHAR_COLORYELLOW ); + return FALSE; + } +#endif + // CoolFish: Family 2001/6/13 + if (CHAR_getInt(petindex, CHAR_PETFAMILY) == 1){ + CHAR_talkToCli(charaindex, -1, "家族守护兽无法丢出!", CHAR_COLORYELLOW); + return FALSE; + } + if (CHAR_getInt(charaindex, CHAR_RIDEPET) == havepetindex ){ + CHAR_talkToCli(charaindex, -1, "骑乘中的宠物无法丢出!", CHAR_COLORYELLOW); + return FALSE; + } + +#ifdef _DROPCHECK2 + + floor = CHAR_getInt( charaindex, CHAR_FLOOR); + x = CHAR_getInt( charaindex, CHAR_X); + y = CHAR_getInt( charaindex, CHAR_Y); + + for( i = x-CHAR_DEFAULTSEESIZ/2 ; i <= x+CHAR_DEFAULTSEESIZ/2 ; i++ ){ + for( j = y-CHAR_DEFAULTSEESIZ/2 ; j <= y+CHAR_DEFAULTSEESIZ/2 ; j ++ ){ + OBJECT object; + for( object = MAP_getTopObj(floor,i,j); object ; object = NEXT_OBJECT(object ) ) { + int objindex = GET_OBJINDEX(object); + if( OBJECT_getType(objindex) == OBJTYPE_NOUSE ) continue; + + if( OBJECT_getType(objindex) == OBJTYPE_CHARA ) { + count_chara++; + } + if( OBJECT_getType(objindex) == OBJTYPE_ITEM || OBJECT_getType(objindex) == OBJTYPE_GOLD ) { + count_item++; + } + } + } + if( count_item > 80 || count_chara > 80 ) { + CHAR_talkToCli( charaindex, -1, "这里已经太拥挤了,不能再丢了。", CHAR_COLORYELLOW ); + return FALSE; + } + } + +#endif + if( tofl == -1 ) { + for( i = 0 ; i < 7 ; i ++ ){ + dirx[i+2] = CHAR_getDX(CHAR_getInt(charaindex,CHAR_DIR) + i+1); + diry[i+2] = CHAR_getDY(CHAR_getInt(charaindex,CHAR_DIR) + i+1); + } + dirx[0] = CHAR_getDX(CHAR_getInt(charaindex,CHAR_DIR)); + diry[0] = CHAR_getDY(CHAR_getInt(charaindex,CHAR_DIR)); + dirx[1] = 0; + diry[1] = 0; + floor = CHAR_getInt( charaindex,CHAR_FLOOR ); + for( i = 0 ; i < 9 ; i ++ ){ + int x=CHAR_getInt(charaindex,CHAR_X)+dirx[i]; + int y=CHAR_getInt(charaindex,CHAR_Y)+diry[i]; + if( PET_isPutPoint( floor, x, y ) == TRUE ) { + break; + } + } + if( i == 9 ) i = 1; + x=CHAR_getInt(charaindex,CHAR_X)+dirx[i]; + y=CHAR_getInt(charaindex,CHAR_Y)+diry[i]; + }else { + if( MAP_walkAbleFromPoint( tofl,tox,toy, FALSE ) == FALSE ) { + print( "map walkable err %s:%d\n", __FILE__,__LINE__); + return FALSE; + } + floor = tofl; + x = tox; + y = toy; + } +#ifdef _MARKET_TRADE + if( MAP_TRADEPETDROP( charaindex, petindex, floor, x, y) == TRUE ) + return TRUE; +#endif + objindex = PET_dropPetAbsolute( petindex,floor,x,y, FALSE ); + if( objindex == -1 ) return FALSE; + + CHAR_setWorkInt( petindex,CHAR_WORKOBJINDEX,objindex ); + CHAR_setCharPet( charaindex, havepetindex, -1); + CHAR_setInt( petindex, CHAR_FLOOR, floor); + CHAR_setInt( petindex, CHAR_X, x); + CHAR_setInt( petindex, CHAR_Y, y); + CHAR_setInt( petindex, CHAR_PUTPETTIME, NowTime.tv_sec); + if( havepetindex == CHAR_getInt( charaindex, CHAR_DEFAULTPET)) { + int fd; + CHAR_setInt( charaindex, CHAR_DEFAULTPET, -1); + fd = getfdFromCharaIndex( charaindex); + lssproto_KS_send( fd, havepetindex, 0); + + } + CHAR_sendCToArroundCharacter( objindex); + + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER) { + snprintf( szPet, sizeof( szPet ), "K%d", havepetindex ); + CHAR_sendStatusString( charaindex, szPet ); + } + return TRUE; +} + + +/*------------------------------------------------------------ + * 泫 矢永玄毛 仁 + * 娄醒 + * itemindex int 失奶 丞奶件犯永弁旦 + * floor int 白夫失ID + * x int x甄 + * y int y甄 + * net BOOL 生永玄伐□弁及仇午毛允月井升丹井 + * 忒曰袄 + * 岳 objindex + * 撩 -1 + ------------------------------------------------------------*/ +int PET_dropPetAbsolute( int petindex, int floor, int x, int y,BOOL net) +{ + Object object; + int objindex; + + if( !CHAR_CHECKINDEX(petindex) )return FALSE; + + object.type = OBJTYPE_CHARA; + object.index = petindex; + object.x = x; + object.y = y; + object.floor = floor; + + /* 左皮斥尼弁玄瓒 允月 */ + objindex = initObjectOne( &object ); + + /* 生永玄伐□弁白仿弘互凶匀化中月午五反允月 by ringo*/ + if( net ) + CHAR_sendWatchEvent( objindex,CHAR_ACTSTAND,NULL,0,TRUE); + + return objindex; +} + +BOOL PET_isPutPoint( int fl,int x, int y) +{ + OBJECT object; + if( MAP_walkAbleFromPoint( fl,x,y, FALSE ) == FALSE ) + return FALSE; + for( object=MAP_getTopObj(fl,x,y) ; + object ; + object = NEXT_OBJECT(object ) ) + { + int objindex = GET_OBJINDEX(object); + switch( OBJECT_getType(objindex) ){ + case OBJTYPE_NOUSE: + break; + case OBJTYPE_ITEM: + case OBJTYPE_GOLD: + case OBJTYPE_CHARA: + return FALSE; + break; + default: + break; + } + } + return TRUE; +} + +int PET_dropPet( int charaindex, int havepetindex) +{ + int petindex; + petindex = CHAR_getCharPet(charaindex,havepetindex); + if( !CHAR_CHECKINDEX( petindex )) return FALSE; + + if( _PET_dropPet( charaindex, havepetindex, -1,-1,-1) == TRUE ){ + LogPet( + CHAR_getChar( charaindex, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( charaindex, CHAR_CDKEY ), + CHAR_getChar( petindex, CHAR_NAME), + CHAR_getInt( petindex, CHAR_LV), + "Drop(丢宠)", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + CHAR_getChar( petindex, CHAR_UNIQUECODE) // shan 2001/12/14 + ); + return 1; + } + return 0; +} + +int PET_dropPetFLXY( int charaindex, int havepetindex, int fl, int x, int y) +{ + return _PET_dropPet( charaindex, havepetindex, fl,x,y); +} + +/*------------------------------------------------------------ + * 矢永玄迕及奶矛件玄楮醒毛本永玄仄化支月 + ------------------------------------------------------------*/ +int PET_initCharOneArray( Char *ch) +{ + int i; + char *tmp[CHAR_FUNCTABLENUM] = { + "", /* CHAR_INITFUNC */ + "", /* CHAR_WALKPREFUNC */ + "", /* CHAR_WALKPOSTFUNC */ + "", /* CHAR_PREOVERFUNC */ + "", /* CHAR_PREOVERFUNC */ + "core_PetWatch", /* CHAR_WATCHFUNC */ + "", /* CHAR_LOOPFUNC */ + "", /* CHAR_DYINGFUNC */ + "core_PetTalk", /* CHAR_TALKEDFUNC */ + "", /* CHAR_PREATTACKEDFUNC */ + "", /* CHAR_POSTATTACKEDFUNC */ + "", /* CHAR_OFFFUNC */ + "", /* CHAR_LOOKEDFUNC */ + "", /* CHAR_ITEMPUTFUNC */ + "", /* CHAR_SPECIALTALKEDFUNC */ + "", /* CHAR_WINDOWTALKEDFUNC */ +#ifdef _USER_CHARLOOPS + "", // CHAR_LOOPFUNCTEMP1, + "", // CHAR_LOOPFUNCTEMP2, + "", //CHAR_BATTLEPROPERTY, +#endif + }; + for( i = 0; i < CHAR_FUNCTABLENUM; i ++ ) { + strcpysafe( ch->charfunctable[i].string, + sizeof( ch->charfunctable[i]), + tmp[i]); + } + if( ch->data[CHAR_MAILMODE] != CHAR_PETMAIL_NONE ) { + strcpysafe( ch->charfunctable[CHAR_LOOPFUNC].string, + sizeof( ch->charfunctable[CHAR_LOOPFUNC]), "PETMAIL_Loop"); + + } +#ifdef _USER_CHARLOOPS + if( ch->data[CHAR_FUSIONBEIT] == 1 && + ch->data[CHAR_FUSIONRAISE] > 0 ) { + //andy_log +// print("init CHAR_LOOPFUNCTEMP1:%s \n", "PET_CheckIncubateLoop"); + + strcpysafe( ch->charfunctable[CHAR_LOOPFUNCTEMP1].string, + sizeof( ch->charfunctable[CHAR_LOOPFUNCTEMP1]), "PET_CheckIncubateLoop"); + ch->data[CHAR_LOOPINTERVAL] = 60000; + + ch->functable[CHAR_LOOPFUNCTEMP1] + = getFunctionPointerFromName( "PET_CheckIncubateLoop"); + +// CHAR_constructFunctable( petindex); + } +#endif + return( CHAR_initCharOneArray( ch)); +} + +int PET_createPetFromCharaIndex( int charaindex, int enemyindex) +{ + Char CharNew; + int newindex; + int havepetelement; + char szPet[128]; + int i; + + havepetelement = CHAR_getCharPetElement( charaindex); + if( havepetelement < 0 ) return -1; + memset( &CharNew, 0, sizeof( Char ) ); + if( !CHAR_getDefaultChar( &CharNew,31010 ) )return -1; + CharNew.data[CHAR_BASEBASEIMAGENUMBER] + = CharNew.data[CHAR_BASEIMAGENUMBER] = CHAR_getInt(enemyindex,CHAR_BASEIMAGENUMBER); + CharNew.data[CHAR_WHICHTYPE] = CHAR_TYPEPET; + CharNew.data[CHAR_HP] = CHAR_getInt(enemyindex, CHAR_HP); + CharNew.data[CHAR_MP] = CHAR_getInt(enemyindex, CHAR_MP); + CharNew.data[CHAR_MAXMP] = CHAR_getInt(enemyindex, CHAR_MAXMP); + CharNew.data[CHAR_VITAL] = CHAR_getInt(enemyindex, CHAR_VITAL); + CharNew.data[CHAR_STR] = CHAR_getInt(enemyindex, CHAR_STR); + CharNew.data[CHAR_TOUGH] = CHAR_getInt(enemyindex, CHAR_TOUGH); + CharNew.data[CHAR_DEX] = CHAR_getInt(enemyindex, CHAR_DEX); + CharNew.data[CHAR_LUCK] = CHAR_getInt(enemyindex, CHAR_LUCK); + CharNew.data[CHAR_FIREAT] = CHAR_getInt(enemyindex, CHAR_FIREAT); + CharNew.data[CHAR_WATERAT] = CHAR_getInt(enemyindex, CHAR_WATERAT); + CharNew.data[CHAR_EARTHAT] = CHAR_getInt(enemyindex, CHAR_EARTHAT); + CharNew.data[CHAR_WINDAT] = CHAR_getInt(enemyindex, CHAR_WINDAT); + //CharNew.data[CHAR_EXP] = CHAR_getInt(enemyindex, CHAR_EXP); + + CharNew.data[CHAR_SLOT] = CHAR_getInt(enemyindex, CHAR_SLOT); + CharNew.data[CHAR_MODAI] = CHAR_getInt(enemyindex, CHAR_MODAI); + CharNew.data[CHAR_LV] = CHAR_getInt(enemyindex, CHAR_LV); + CharNew.data[CHAR_POISON] = CHAR_getInt(enemyindex, CHAR_POISON); + CharNew.data[CHAR_PARALYSIS]= CHAR_getInt(enemyindex, CHAR_PARALYSIS); + CharNew.data[CHAR_SLEEP] = CHAR_getInt(enemyindex, CHAR_SLEEP); + CharNew.data[CHAR_STONE] = CHAR_getInt(enemyindex, CHAR_STONE); + CharNew.data[CHAR_DRUNK] = CHAR_getInt(enemyindex, CHAR_DRUNK); + CharNew.data[CHAR_CONFUSION]= CHAR_getInt(enemyindex, CHAR_CONFUSION); + CharNew.data[CHAR_RARE] = CHAR_getInt(enemyindex, CHAR_RARE); + CharNew.data[CHAR_PETRANK] = CHAR_getInt(enemyindex, CHAR_PETRANK); + CharNew.data[CHAR_PETID] = CHAR_getInt(enemyindex, CHAR_PETID); + CharNew.data[CHAR_CRITIAL] = CHAR_getInt(enemyindex, CHAR_CRITIAL); + CharNew.data[CHAR_COUNTER] = CHAR_getInt(enemyindex, CHAR_COUNTER); + CharNew.data[CHAR_PETMAILEFFECT] = RAND(0, PETMAIL_EFFECTMAX); + + for( i = 0; i < CHAR_MAXPETSKILLHAVE; i ++ ) { + CharNew.unionTable.indexOfPetskill[i] = CHAR_getPetSkill( enemyindex, i); + } + CharNew.data[CHAR_ALLOCPOINT] = CHAR_getInt(enemyindex, CHAR_ALLOCPOINT); + strcpysafe( CharNew.string[CHAR_NAME].string, + sizeof(CharNew.string[CHAR_NAME].string), + CHAR_getChar( enemyindex, CHAR_NAME) ); + newindex = PET_initCharOneArray( &CharNew ); + if( newindex < 0 ){ + return -1; + } + + CHAR_setMaxExpFromLevel( newindex, CHAR_getInt( enemyindex, CHAR_LV )); + CHAR_complianceParameter( newindex ); + CHAR_setWorkInt( newindex, CHAR_WORKPLAYERINDEX, charaindex); + CHAR_setCharPet( charaindex, havepetelement, newindex); + CHAR_setChar( newindex, CHAR_OWNERCDKEY, + CHAR_getChar( charaindex, CHAR_CDKEY)); + CHAR_setChar( newindex, CHAR_OWNERCHARANAME, + CHAR_getChar( charaindex, CHAR_NAME)); + snprintf( szPet, sizeof( szPet ), "K%d", havepetelement ); + CHAR_sendStatusString( charaindex, szPet ); + snprintf( szPet, sizeof( szPet ), "W%d", havepetelement ); + CHAR_sendStatusString( charaindex, szPet ); + + return newindex; + +} +BOOL PET_SelectBattleEntryPet( int charaindex, int petarray) +{ + int pindex; + /* 爵 反轮仁 仿弘匹仇木卞娄匀井井月第 岭丐曰 */ + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE) + != BATTLE_CHARMODE_NONE) return FALSE; + /* -1及桦宁反]-1卞仄化本永玄仄化蔽歹曰[*/ + if( petarray == -1 ) { + CHAR_setInt( charaindex, CHAR_DEFAULTPET, -1 ); + return TRUE; + } + if( !CHAR_CHECKPETINDEX( petarray)) return FALSE; + pindex = CHAR_getCharPet( charaindex, petarray ); + if( !CHAR_CHECKINDEX( pindex)) return FALSE; + + if( CHAR_getFlg( pindex, CHAR_ISDIE )) return FALSE; + + CHAR_setInt( charaindex, CHAR_DEFAULTPET, petarray ); + + return TRUE; +} + +// Robin 0707 petFollow +#if 1 +int PET_dropPetFollow( int charaindex, int havepetindex, int tofl, int tox, int toy) +{ + char szPet[128]; + int dirx[9],diry[9]; + int i; + int objindex=-1; + int floor,x,y; + int petindex; + + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE) + != BATTLE_CHARMODE_NONE) return FALSE; + petindex = CHAR_getCharPet(charaindex,havepetindex); + if( petindex == -1 ) return FALSE; + if( !CHAR_CHECKINDEX( charaindex ) )return FALSE; + if( CHAR_CHECKINDEX( petindex) == FALSE ) return FALSE; + + if (CHAR_getInt(petindex, CHAR_PETFAMILY) == 1){ + CHAR_talkToCli(charaindex, -1, "家族守护兽无法丢出!", CHAR_COLORYELLOW); + return FALSE; + } + if (CHAR_getInt(charaindex, CHAR_RIDEPET) == havepetindex){ + CHAR_talkToCli(charaindex, -1, "骑乘中的宠物无法跟随!", CHAR_COLORYELLOW); + return FALSE; + } + if( tofl == -1 ) { + for( i = 0 ; i < 7 ; i ++ ){ + dirx[i+2] = CHAR_getDX(CHAR_getInt(charaindex,CHAR_DIR) + i+1); + diry[i+2] = CHAR_getDY(CHAR_getInt(charaindex,CHAR_DIR) + i+1); + } + dirx[0] = CHAR_getDX(CHAR_getInt(charaindex,CHAR_DIR)); + diry[0] = CHAR_getDY(CHAR_getInt(charaindex,CHAR_DIR)); + dirx[1] = 0; + diry[1] = 0; + + floor = CHAR_getInt( charaindex,CHAR_FLOOR ); + for( i = 0 ; i < 9 ; i ++ ){ + int x=CHAR_getInt(charaindex,CHAR_X)+dirx[i]; + int y=CHAR_getInt(charaindex,CHAR_Y)+diry[i]; + if( PET_isPutPoint( floor, x, y ) == TRUE ) { + break; + } + } + if( i == 9 ) i = 1; + + x=CHAR_getInt(charaindex,CHAR_X)+dirx[i]; + y=CHAR_getInt(charaindex,CHAR_Y)+diry[i]; + } + else { + if( MAP_walkAbleFromPoint( tofl,tox,toy, FALSE ) == FALSE ) { + print( "map walkable err %s:%d\n", __FILE__,__LINE__); + return FALSE; + } + floor = tofl; + x = tox; + y = toy; + } + + objindex = PET_dropPetAbsolute( petindex,floor,x,y, FALSE ); + if( objindex == -1 ) return FALSE; + + CHAR_setWorkInt( petindex,CHAR_WORKOBJINDEX,objindex ); + CHAR_setCharPet( charaindex, havepetindex, -1); + CHAR_setInt( petindex, CHAR_FLOOR, floor); + CHAR_setInt( petindex, CHAR_X, x); + CHAR_setInt( petindex, CHAR_Y, y); + CHAR_setInt( petindex, CHAR_PUTPETTIME, NowTime.tv_sec); + if( havepetindex == CHAR_getInt( charaindex, CHAR_DEFAULTPET)) { + int fd; + CHAR_setInt( charaindex, CHAR_DEFAULTPET, -1); + fd = getfdFromCharaIndex( charaindex); + lssproto_KS_send( fd, havepetindex, 0); + + } + CHAR_sendCToArroundCharacter( objindex); + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER) { + snprintf( szPet, sizeof( szPet ), "K%d", havepetindex ); + CHAR_sendStatusString( charaindex, szPet ); + } + + CHAR_setWorkInt( charaindex, CHAR_WORKPETFOLLOW, petindex); + CHAR_setWorkInt( petindex, CHAR_WORKPETFOLLOWMODE, CHAR_PETFOLLOW_NOW); + CHAR_setWorkInt( petindex, CHAR_WORKPETFOLLOWCOUNT, 0); + CHAR_setInt( petindex, CHAR_PUTPETTIME, (int)(NowTime.tv_sec)); + CHAR_setInt( petindex, CHAR_WORKPLAYERINDEX, charaindex); + LogPet( + CHAR_getChar( charaindex, CHAR_NAME ), + CHAR_getChar( charaindex, CHAR_CDKEY ), + CHAR_getChar( petindex, CHAR_NAME), + CHAR_getInt( petindex, CHAR_LV), + "Follow(溜宠)", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + CHAR_getChar( petindex, CHAR_UNIQUECODE) + ); + return 1; +} +#endif + +BOOL PET_getBaseForAllocpoint( int toindex, int *work) +{ + int LevelUpPoint=0; + if( CHAR_getInt( toindex, CHAR_WHICHTYPE) != CHAR_TYPEPET) + return FALSE; + LevelUpPoint = CHAR_getInt( toindex, CHAR_ALLOCPOINT ); + work[3] =(( LevelUpPoint >> 24 ) & 0xFF); + work[0] = (( LevelUpPoint >> 16 ) & 0xFF); + work[1] = (( LevelUpPoint >> 8 ) & 0xFF); + work[2] = (( LevelUpPoint >> 0 ) & 0xFF); + return TRUE; +} + +void PET_showEditBaseMsg( int charaindex, int toindex, int itemindex, int *work) +{ + int i, maxnums = 6000; + char buf1[256]; + char buf2[][32]={"腕力成长率","耐久力成长率","速度成长率","体力成长率","能力"}; + char buf3[][32]={"大幅提高","略为提高","略为减少"}; + + if( CHAR_getInt( toindex, CHAR_WHICHTYPE) != CHAR_TYPEPET) + return; + memset( buf1, 0, sizeof( buf1)); + + for( i=0; i<4; i++) { + int type = ITEM_getInt( itemindex, (ITEM_MODIFYATTACK + i)); + print(" [%d]%d+%d ", i, work[i], type); + work[i] += type; + strcpy( buf1,"\0"); + if( work[i] > maxnums ) { + sprintf(buf1,"%s 已经达到最高了。", buf2[i]); + work[i] = maxnums; + }else if( work[i] < 0 ) { + sprintf(buf1,"%s 已经为零了。", buf2[i]); + work[i] = 0; + }else { + if( type > 0 ) { + if( type > 2 ) { + sprintf(buf1,"%s %s %s", buf2[i], buf3[0], "。"); + }else { + sprintf(buf1,"%s %s %s", buf2[i], buf3[1], "。"); + } + }else if( type < 0 ){ + sprintf(buf1,"%s %s %s", buf2[i], buf3[2], "。"); + } + } + if( strcmp( buf1, "\0")) { + CHAR_talkToCli( charaindex, toindex, buf1, CHAR_COLORYELLOW); + } + } +} + +#ifdef _PET_EVOLUTION +BOOL PET_getBaseAndSkill( int charaindex, int baseindex, int *base, int *skill, int flg) +{ + int i; + if( !CHAR_CHECKINDEX( baseindex)) return FALSE; + if( base != NULL ) { + int levelup = CHAR_getInt( baseindex, CHAR_ALLOCPOINT); + base[0] = ((levelup>>24) & 0xFF); + base[1] = ((levelup>>16) & 0xFF); + base[2] = ((levelup>> 8) & 0xFF); + base[3] = ((levelup>> 0) & 0xFF); + } + + if( skill != NULL ) { + for( i=0; i= CHAR_MAXPETHAVE){ + return FALSE; + }else { + char szPet[256]; + char msgbuf[256]; + CHAR_setCharPet( charaindex, i, -1); + snprintf( szPet, sizeof( szPet ), "K%d", i); + CHAR_sendStatusString( charaindex, szPet ); + + snprintf( msgbuf,sizeof( msgbuf), "交出%s。", CHAR_getChar( petindex, CHAR_NAME)); + CHAR_talkToCli( charaindex, -1, msgbuf, CHAR_COLORYELLOW); + CHAR_endCharOneArray( petindex ); + } + return TRUE; +} + + diff --git a/gmsv/char/pet_event.c b/gmsv/char/pet_event.c new file mode 100644 index 0000000..6bc80c1 --- /dev/null +++ b/gmsv/char/pet_event.c @@ -0,0 +1,938 @@ +#include "version.h" +#include +#include + +#include "common.h" +#include "object.h" +#include "char_base.h" +#include "char.h" +#include "configfile.h" +#include "handletime.h" +#include "pet_event.h" +#include "npcutil.h" +#include "log.h" +#include "lssproto_serv.h" +// Arminius 8.14 pet talk +#include +#include "npc_exchangeman.h" +#include "npc_eventaction.h" + +#ifdef _MARKET_TRADE +#include "item_trade.h" +#endif + + + + + +#ifdef _PET_TALK +//BOOL PetTalk_CheckFree( int meindex, int toindex, char *buf); +BOOL PetTalk_CheckFree( int meindex, int talker, char *buf); + +BOOL PetTalk_BSCheck(int meindex,int talker,char* buf); +BOOL PetTalk_FreeIfCheck(int meindex,int talker,char* buf,int kosuu,int flg, int temp); +BOOL PetTalk_WarpManReduce(int meindex,int talker,char *buf); +BOOL PetTalk_BigSmallLastCheck(int point1,int mypoint,int flg); +BOOL PetTalk_CheckTrans(int meindex,int talker,int trans,int flg); +BOOL PetTalk_LevelCheck(int meindex,int talker,int level,int flg); +BOOL PetTalk_CheckMyPet( int meindex, int talker, int petLv, int flg, int petid); +BOOL PetTalk_ItemCheck(int meindex,int talker,int itemNo,int flg); +BOOL PetTalk_CheckMyType( int meindex, int toindex, int kosuu, int flg, int Type ); +BOOL PetTalk_CheckPetEvent( int meindex, int toindex, char *buf); +void PetTalk_RequestMain(int meindex,int talker,char *buf); +BOOL PetTalk_AddItem(int meindex, int talker, char *buf); +BOOL PetTalk_DelItem(int meindex,int talker,char *buf); +BOOL PetTalk_RunEvent( int meindex, int talker, char *buf); +BOOL PetTalk_CheckMyFloor( int meindex, int talker, char *buf, int flg); +#ifdef _PET_TALKBBI +BOOL PET_CheckPlayerBBI( int meindex, int charindex, int BBI, int flg); +#endif +#ifdef _PET_TALKPRO +#else +char *Pet_TalkGetFunStr( char *temp , char *buf, int len) +{ + char filename[56]; + char pathfile[128]; + char talkfun[ 10240]; + char buf1[256],buf2[256],buf3[256]; + FILE *petarg; + char *cStr=NULL; + int talkNo=1,mark=1; + char line[4096]; + BOOL find=FALSE; + talkfun[0] ='\0'; + + while( getStringFromIndexWithDelim( pettalktext,"&",talkNo, buf1, sizeof( buf1) ) != FALSE){ + talkNo++; + if( NPC_Util_GetStrFromStrWithDelim( buf1, "PETTEMPNO", buf2, sizeof( buf2)) == NULL ) + continue; + mark=2; + strcpy( filename,"\0"); + while( getStringFromIndexWithDelim( buf2,",", mark,buf3,sizeof( buf3)) != FALSE ) { + mark ++; + if( !strcmp( buf3, temp)) { + print("\n buf2=%s",buf2); + if( getStringFromIndexWithDelim( buf2,",", 1,filename,sizeof( filename)) == FALSE ) + return NULL; + find = TRUE; + break; + } + } + if( find == TRUE ) + break; + } + if( !strcmp( filename, "\0") ) + return NULL; + + sprintf( pathfile, "%s/pettalk/%s", getNpcdir(), filename); + petarg = fopen( pathfile , "r" ); + if( petarg != NULL ) { + while( fgets( line, sizeof( line), petarg ) ) { + if( strlen( talkfun) != 0 ) { + if( talkfun[strlen( talkfun) -1] != '|' ) { + strcatsafe( talkfun, sizeof( talkfun), "|"); + } + } + chompex( line); + strcatsafe( talkfun, sizeof( talkfun ), line); + } + fclose( petarg); + }else { + return NULL; + } + talkNo = 1; + while( getStringFromIndexWithDelim( talkfun,"}",talkNo, buf, len) != FALSE) { + talkNo++; + if( NPC_Util_GetStrFromStrWithDelim( buf, "PETTEMPNO", buf2, sizeof( buf2)) == NULL ) + continue; + if( !strcmp( temp, buf2) ) { + cStr = buf; + break; + } + } + return( cStr); +} +#endif +void PET_Talkfunc( int meindex, int talkerindex, char *msg, int color) +{ + char buf2[1024], buf3[256]; + + char TalkType[][16]={"TALKRUN","EVENTRUN","BOTH"}; + char AllTalk[PETTALK_MAXID][1024]; + int Type=0,j,i; + int talkNo=0; + BOOL FREEs=FALSE; + int buttontype = 0; + int windowtype = 0; +#ifdef _PET_TALKPRO + int tPage=-1; +#else + int petid=-1; + char tempNo[32], buf1[10240]; +#endif + + int fd = getfdFromCharaIndex( talkerindex); +#define RAND(x,y) ((x-1)+1+ (int)( (double)(y-(x-1))*rand()/(RAND_MAX+1.0)) ) + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + buttontype = WINDOW_BUTTONTYPE_OK; + + if( NPC_Util_isFaceToFace( meindex ,talkerindex , 2) == FALSE) { + if( NPC_Util_isFaceToChara( talkerindex, meindex, 1) == FALSE) + return; + } + for( i = 0 ; i < 5 ; i++ ) { + strcpy( AllTalk[i], "\0" ); + } + +#ifdef _PET_TALKPRO + for( i=0;i=0 && pettalktext[i].ID == CHAR_getInt(meindex, CHAR_PETID) ) { + if( strcmp( pettalktext[i].DATA, "\0") && strlen( pettalktext[i].DATA) > 0 ) { + //snprintf( buf1, sizeof(buf1), pettalktext[i].DATA); + tPage=i; + break; + } + } + } + if( i == PETTALK_MAXID ) + return; +#else + sprintf(tempNo,"%d", CHAR_getInt(meindex, CHAR_PETID)); + petid = CHAR_getInt(meindex, CHAR_PETID); + if( Pet_TalkGetFunStr( tempNo , buf1 , sizeof( buf1) ) == NULL ) { + return; + } +#endif + if( CHAR_getInt( meindex, CHAR_LV ) >= CHAR_getInt( meindex, CHAR_LIMITLEVEL) ) { + Type = 1; + } + //设定为非主人不得与PET互动 + if( strcmp( CHAR_getChar( meindex, CHAR_OWNERCDKEY), CHAR_getChar( talkerindex, CHAR_CDKEY) ) || + strcmp( CHAR_getChar( meindex, CHAR_OWNERCHARANAME), CHAR_getChar( talkerindex, CHAR_NAME) )){ +#ifdef _PET_TALKPRO + if( NPC_Util_GetStrFromStrWithDelim( pettalktext[tPage].DATA, "NoPlayerMsg", buf3, sizeof( buf3)) != NULL ) { +#else + if( NPC_Util_GetStrFromStrWithDelim( buf1, "NoPlayerMsg", buf3, sizeof( buf3)) != NULL ) { +#endif + }else { + sprintf(buf3,"陌生人?我不认识你呀!你是坏人!"); + } + CHAR_talkToCli( talkerindex, meindex, buf3, color); + return; + } + j=0; + +#ifdef _PET_TALKPRO + while( getStringFromIndexWithDelim( pettalktext[tPage].DATA,"OVER",talkNo, buf2, sizeof( buf2) ) != FALSE){ +#else + while( getStringFromIndexWithDelim( buf1,"OVER",talkNo, buf2, sizeof( buf2) ) != FALSE){ +#endif + talkNo++; + if( ( strstr( buf2, TalkType[Type]) == NULL ) && ( strstr( buf2, TalkType[2]) == NULL ) )continue; + if( NPC_Util_GetStrFromStrWithDelim( buf2, "FLOOR", buf3, sizeof( buf3)) != NULL ) {//判断房间号 + if( PetTalk_CheckMyFloor( meindex, talkerindex, buf3, 0) == FALSE )continue; + } + if( NPC_Util_GetStrFromStrWithDelim( buf2, "PET", buf3, sizeof( buf3)) != NULL ) {//判断宠物FREE条件 + if( PetTalk_CheckFree( meindex, meindex, buf3) != TRUE ) continue; + } + if( NPC_Util_GetStrFromStrWithDelim( buf2, "FREE", buf3, sizeof( buf3) ) == NULL)continue; + if( NPC_ActionPassCheck( meindex, talkerindex, buf3) == FALSE ) continue;//判断玩家FREE条件 + +// if( ActionNpc_CheckFree( meindex, talkerindex, buf2, 0) == FALSE ) continue; + + if( PetTalk_CheckPetEvent( meindex, talkerindex, buf2) == FALSE )continue; + FREEs = TRUE; //条件成立 + strcpy( AllTalk[j++], buf2 ); + if( j > PETTALK_MAXID-1 ) break; + } + talkNo = 0; + + if( FREEs == FALSE) { //如果全部条件都不成立 + j=0; +#ifdef _PET_TALKPRO + while( getStringFromIndexWithDelim( pettalktext[tPage].DATA,"OVER",talkNo, buf2, sizeof( buf2) ) != FALSE ){ +#else + while( getStringFromIndexWithDelim( buf1,"OVER",talkNo, buf2, sizeof( buf2) ) != FALSE ){ +#endif + talkNo ++; + if( strstr( buf2, "OTHER") == NULL ) continue; + if( NPC_Util_GetStrFromStrWithDelim( buf2, "TalkMsg", buf3, sizeof( buf3)) == NULL) continue; + while( getStringFromIndexWithDelim( buf3,",",j+1, AllTalk[j], sizeof( AllTalk[j]) ) != FALSE ){ + j++; + } + break; + } + } + + if( j > 0 ) { + strcpy( buf2, AllTalk[ RAND( 0, (j-1) ) ] ); + if( PetTalk_RunEvent( meindex, talkerindex, buf2) == FALSE ) { + sprintf( buf3,"....!"); + CHAR_talkToCli( talkerindex, meindex, buf3, color); + return; + } + if( NPC_Util_GetStrFromStrWithDelim( buf2, "TalkMsg", buf3, sizeof( buf3)) == NULL) { + //sprintf( buf3,"主人,我们去逛逛吧!"); + strcpy( buf3, buf2); + } + + lssproto_WN_send( fd, windowtype, buttontype, 0, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), buf3 ); + } + +} + +BOOL PetTalk_CheckMyFloor( int meindex, int talker, char *buf, int flg) { + char buf1[16]; + int Myfloor=-1; + Myfloor = CHAR_getInt( talker, CHAR_FLOOR); + if( strstr( buf, "!") != NULL ) { + getStringFromIndexWithDelim( buf,"!", 2, buf1, sizeof( buf1) ); + if( Myfloor == atoi( buf1) ) { + return FALSE; + } + }else { + if( Myfloor != atoi( buf) ) { + return FALSE; + } + } + return TRUE; +} + +BOOL PetTalk_RunEvent( int meindex, int talker, char *buf) +{ + char buf1[256]; + int LimitLevel = -1; + + if( Action_RunDoEventAction( meindex, talker, buf) == FALSE ) + return FALSE; + + if( NPC_Util_GetStrFromStrWithDelim( buf, "RandItem", buf1, sizeof( buf1)) != NULL ){ + if( RAND( 0, 10) > 9 ) { + PetTalk_AddItem( meindex, talker, buf1); + }else { + return FALSE; + } + } + if( NPC_Util_GetStrFromStrWithDelim( buf, "LimitLevel", buf1, sizeof( buf1)) != NULL ){ + LimitLevel = atoi( buf1); + CHAR_setInt( meindex, CHAR_LIMITLEVEL, LimitLevel); + } + return TRUE; + +} + +BOOL PetTalk_DelItem(int meindex,int talker,char *buf) +{ + + int i = 1, j = 1,k = 1; + char buff3[128]; + char buf2[32]; + int itemindex; + + while( getStringFromIndexWithDelim(buf , "," , k, buff3, sizeof(buff3)) !=FALSE ) { + k++; + if(strstr(buff3,"*")!=NULL){ + int itemno; + int kosuu; + int id; + int cnt=0; + + getStringFromIndexWithDelim(buff3,"*",1,buf2,sizeof(buf2)); + itemno = atoi(buf2); + getStringFromIndexWithDelim(buff3,"*",2,buf2,sizeof(buf2)); + kosuu = atoi(buf2); + + for( i =0 ; i < CHAR_MAXITEMHAVE ; i++ ){ + itemindex=CHAR_getItemIndex( talker , i ); + if( ITEM_CHECKINDEX(itemindex) ){ + id=ITEM_getInt(itemindex ,ITEM_ID ); + if(itemno==id){ + cnt++; + + LogItem( + CHAR_getChar( talker, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( talker, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID), /* 失奶 丞 寞 */ +#endif + "WarpManDelItem(NPC收道具後传至某点)", + CHAR_getInt( talker, CHAR_FLOOR), + CHAR_getInt( talker, CHAR_X ), + CHAR_getInt( talker, CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + + ); + + CHAR_DelItem( talker, i); + if(cnt == kosuu){ + break; + } + } + } + } + }else{ + /*--蓟氏分 寞及失奶 丞毛蓟请---*/ + for( j = 0 ; j < CHAR_MAXITEMHAVE ; j++){ + itemindex = CHAR_getItemIndex( talker ,j); + + if( ITEM_CHECKINDEX(itemindex) ){ + if( atoi( buff3) == ITEM_getInt(itemindex,ITEM_ID)){ + LogItem( + CHAR_getChar( talker, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( talker, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID), /* 失奶 丞 寞 */ +#endif + "WarpManDelItem(NPC收道具後传至某点)", + CHAR_getInt( talker,CHAR_FLOOR), + CHAR_getInt( talker,CHAR_X ), + CHAR_getInt( talker,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + CHAR_DelItem( talker, j); + } + } + } + } + } + + return TRUE; +} + +BOOL PetTalk_AddItem(int meindex, int talker, char *buf) +{ + int itemID,k=1,itemindex=-1; + int spaceNum=5,i; + char buff3[256], msgbuf[64], token[256]; + int ret; + + while( getStringFromIndexWithDelim(buf , "," , k, buff3, sizeof(buff3)) !=FALSE ){ + k++; + for( i = spaceNum ; i < CHAR_MAXITEMHAVE ; i++ ){ + itemindex=CHAR_getItemIndex( talker , i ); + if( itemindex == -1 ) { + spaceNum = i+1; + break; + } + } + if( i == CHAR_MAXITEMHAVE ) { + snprintf( msgbuf,sizeof( msgbuf), "主人,你的物品栏已经满了!!"); + CHAR_talkToCli( talker, meindex, msgbuf, CHAR_COLORWHITE); + return FALSE; + } + } + k=1; + while( getStringFromIndexWithDelim(buf , "," , k, buff3, sizeof(buff3)) !=FALSE ){ + k++; + itemID = atoi( buff3); + if( itemID ) + itemindex = ITEM_makeItemAndRegist( itemID); + if(itemindex == -1) + continue; + ret = CHAR_addItemSpecificItemIndex( talker, itemindex); + if( ret < 0 || ret >= CHAR_MAXITEMHAVE ) { + ITEM_endExistItemsOne( itemindex); + print ("\n ret error!!"); + return FALSE; + } + sprintf( token,"拿到%s",ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( talker, -1,token,CHAR_COLORWHITE); + + CHAR_sendItemDataOne( talker, ret); + + } + return TRUE; +} + +BOOL PetTalk_CheckPetEvent( int meindex, int toindex, char *buf) +{ + char buf1[256],buf2[256]; + int k = 0; + + if( NPC_Util_GetStrFromStrWithDelim( buf, "EndSetFlg", buf1,sizeof( buf1) ) != NULL ) { + k=1; + while( getStringFromIndexWithDelim(buf1 , "," ,k, buf2, sizeof(buf2) ) != FALSE ){ + k++; + NPC_EventSetFlg( toindex, atoi( buf2)); + } + } + if( NPC_Util_GetStrFromStrWithDelim( buf, "NowSetFlg", buf1, sizeof( buf1)) != NULL) { + k=1 ; + while(getStringFromIndexWithDelim(buf1 , "," , k, buf2, sizeof(buf2))!= FALSE ){ + k++; + NPC_NowEventSetFlg( toindex, atoi( buf2)); + } + } + return TRUE; +} + +void PetTalk_RequestMain(int meindex,int talker,char *buf) +{ + int shiftbit; + char buf2[128]; + if( NPC_Util_GetStrFromStrWithDelim( buf,"EventNo", buf2,sizeof( buf2) ) == NULL ) { + print("\n pet_event.c err:NOT FIND [EventNo] !!"); + return; + } + shiftbit = atoi( buf2); + if( NPC_NowEventCheckFlg( talker, shiftbit) != TRUE ) { + NPC_NowEventSetFlg( talker, shiftbit); + } +} + +BOOL PetTalk_CheckFree( int meindex, int talker, char *buf) +{ + char buff2[256]; + char buff3[128]; + int i=1,j=1; + int loop=0; + while( getStringFromIndexWithDelim(buf,",",i,buff2,sizeof(buff2)) !=FALSE ) { + i++; + if(strstr(buff2,"&")!=NULL){ + j=1; + loop=0; + while( getStringFromIndexWithDelim(buff2,"&",j,buff3,sizeof(buff3)) !=FALSE ) { + j++; + if(PetTalk_BSCheck(meindex,talker,buff3)==FALSE) { + loop=1; + break; + } + } + if(loop==0) { + CHAR_setWorkInt( talker, CHAR_WORKWARPCHECK, TRUE ); + return TRUE; + } + }else{ + if( PetTalk_BSCheck( meindex, talker, buff2) == TRUE ){ + CHAR_setWorkInt( talker, CHAR_WORKWARPCHECK, TRUE ); + return TRUE; + } + } + } + CHAR_setWorkInt( talker, CHAR_WORKWARPCHECK, FALSE ); + return FALSE; +} + +BOOL PetTalk_BSCheck(int meindex,int talker,char* buf) +{ + char buff2[128]; + int kosuu,temp=-1,flg=0; + char buff1[128],buff3[128]; + if(strstr( buf, "-") != NULL) { + //buff3为抓宠物ID + getStringFromIndexWithDelim( buf, "-", 2, buff3, sizeof(buff3)); + temp = atoi( buff3); + getStringFromIndexWithDelim( buf, "-", 1, buff1, sizeof(buff1)); + strcpy( buf, buff1); + } + if(strstr( buf, "<") != NULL){ + getStringFromIndexWithDelim( buf, "<", 2, buff2, sizeof(buff2)); + kosuu = atoi( buff2); + getStringFromIndexWithDelim( buf, "<", 1, buff2, sizeof(buff2)); + + if(PetTalk_FreeIfCheck( meindex, talker, buff2, kosuu, 1, temp)==TRUE){ + return TRUE; + } + }else if(strstr( buf, ">") != NULL){ + getStringFromIndexWithDelim( buf, ">", 2, buff2, sizeof(buff2)); + kosuu = atoi(buff2); + getStringFromIndexWithDelim( buf, ">" ,1, buff2, sizeof(buff2)); + + if(PetTalk_FreeIfCheck( meindex, talker, buff2, kosuu, 2, temp)==TRUE){ + return TRUE; + } + }else if(strstr( buf, "!" ) != NULL){ + getStringFromIndexWithDelim( buf, "!=", 2, buff2, sizeof(buff2)); + kosuu = atoi( buff2); + getStringFromIndexWithDelim( buf, "!=", 1, buff2, sizeof(buff2)); + if(PetTalk_FreeIfCheck( meindex, talker, buff2, kosuu, 0, temp) == TRUE){ + return FALSE; + }else{ + return TRUE; + } + + }else if(strstr( buf, "=") != NULL){ + getStringFromIndexWithDelim( buf, "=", 2, buff2, sizeof(buff2)); + kosuu = atoi( buff2); + getStringFromIndexWithDelim( buf, "=", 1, buff2, sizeof(buff2)); + + if( strstr( buf, "PET")) { + flg = 3; + } + if(strstr( buf, "*") != NULL){ + if( PetTalk_WarpManReduce( meindex, talker, buf)==TRUE){ + return TRUE; + } + }else if(PetTalk_FreeIfCheck( meindex, talker, buff2, kosuu, flg, temp)==TRUE){ + return TRUE; + } + } + return FALSE; +} + +BOOL PetTalk_FreeIfCheck(int meindex,int talker,char* buf,int kosuu,int flg, int temp) +{ + int Type = -1; + if(strcmp(buf,"LV")==0){ + if(PetTalk_LevelCheck(meindex,talker,kosuu,flg)==TRUE){ + return TRUE; + } + } + + if( strcmp( buf, "TRANS") == 0 ) { + if( PetTalk_CheckTrans( meindex, talker, kosuu, flg) == TRUE ) + return TRUE; + } + if( strcmp( buf, "PET") == 0 ) { + if( temp > 0 ) { + if( PetTalk_CheckMyPet( meindex, talker, kosuu, flg, temp) == TRUE ) + return TRUE; + }else + return FALSE; + } + if(strcmp( buf, "ITEM")==0){ + if(PetTalk_ItemCheck(meindex,talker,kosuu,flg)==TRUE){ + return TRUE; + } + } + if(strcmp( buf, "ENDEV")==0){ + if(NPC_EventCheckFlg( talker, kosuu)==TRUE){ + return TRUE; + } + } + if(strcmp( buf, "NOWEV")==0){ + if(NPC_NowEventCheckFlg( talker, kosuu)==TRUE){ + return TRUE; + } + } + if(strcmp( buf, "HP" ) == 0 ) { + Type = 0; + if( PetTalk_CheckMyType( meindex, talker, kosuu, flg, Type ) == TRUE ) { + return TRUE; + } + } +#ifdef _PET_TALKBBI + if(strcmp( buf, "BBI" ) == 0 ) { + if( PET_CheckPlayerBBI( meindex, talker, kosuu, flg)== TRUE) { + return TRUE; + } + } +#endif + return FALSE; +} +BOOL PetTalk_CheckMyType( int meindex, int toindex, int kosuu, int flg, int Type ) { + int MyType=0,MyMaxType=0; + switch( Type ) { + case 0: //HP + MyType = CHAR_getInt( toindex, CHAR_HP); + MyMaxType = CHAR_getWorkInt( toindex, CHAR_WORKMAXHP); + MyMaxType = (MyMaxType * kosuu )/ 100; + if( PetTalk_BigSmallLastCheck( MyMaxType, MyType , flg ) == TRUE ) { + return TRUE; + } + break; + } + return FALSE; +} + +BOOL PetTalk_WarpManReduce(int meindex,int talker,char *buf) +{ + char buf2[512]; + char buf3[256]; + int id=0; + int i; + int itemindex; + int itemno; + int kosuu; + int cnt=0; + + getStringFromIndexWithDelim(buf,"=",2,buf2,sizeof(buf2)); + getStringFromIndexWithDelim(buf2,"*",1,buf3,sizeof(buf3)); + itemno = atoi(buf3); + getStringFromIndexWithDelim(buf2,"*",2,buf3,sizeof(buf3)); + kosuu = atoi(buf3); + for( i=0 ; i < CHAR_MAXITEMHAVE;i++ ){ + itemindex=CHAR_getItemIndex( talker , i ); + if( ITEM_CHECKINDEX(itemindex) ){ + id=ITEM_getInt(itemindex ,ITEM_ID ); + if(itemno==id){ + cnt++; + if(cnt==kosuu){ + return TRUE; + } + } + } + } + return FALSE; +} + +BOOL PetTalk_LevelCheck(int meindex,int talker,int level,int flg) +{ + int mylevel; + mylevel=CHAR_getInt(talker,CHAR_LV); + if(PetTalk_BigSmallLastCheck(level,mylevel,flg)==TRUE) { + return TRUE; + } + return FALSE; +} + +BOOL PetTalk_CheckTrans(int meindex,int talker,int trans,int flg) +{ + int myTrans; + myTrans=CHAR_getInt(talker, CHAR_TRANSMIGRATION); + if( PetTalk_BigSmallLastCheck( trans, myTrans, flg ) == TRUE ) { + return TRUE; + } + return FALSE; +} + +BOOL PetTalk_CheckMyPet( int meindex, int talker, int petLv, int flg, int petid) +{ + int petsel,petindex=-1; + + for(petsel=0 ; petsel < CHAR_MAXPETHAVE ; petsel++) { + petindex = CHAR_getCharPet( talker, petsel); + if( petindex == -1 ) + continue; + if(CHAR_getInt( petindex, CHAR_PETID) != petid ) + continue; + break; + } + if( petsel == CHAR_MAXPETHAVE ) { + return FALSE; + }else { //找到条件宠 + if( PetTalk_BigSmallLastCheck( petLv, CHAR_getInt( petindex, CHAR_LV), flg ) == TRUE ) + return TRUE; + } + return FALSE; +} + +BOOL PetTalk_ItemCheck(int meindex,int talker,int itemNo,int flg) +{ + int i; + int itemindex=-1; + int id; + for( i=0;i point1) { + return TRUE; + } + } + return FALSE; +} +#else +void PET_Talkfunc( int meindex, int talkerindex, char *msg, int color) +{ + print("\n PET_Talkfunc(...) return; "); + return; +} +#endif + +void PET_CleanFreePetAll() +{ + int objindex; + int objmaxnum = OBJECT_getNum(); + + for( objindex=0; objindex= (petputtime + 60*60) ) { + int ownerindex = CHAR_getWorkInt( petindex, CHAR_WORKPLAYERINDEX); + if( CHAR_CHECKINDEX( ownerindex) ){ + if( CHAR_pickupFollowPet( ownerindex, petindex ) ) { + return; + } + CHAR_talkToCli( ownerindex, -1, "溜宠太久,宠物走失了!!", CHAR_COLORYELLOW ); + } +#ifdef _PET_LOSTPET + CHAR_CharSaveLostPet( petindex, 1); + LogPet( + "系统", + "Watchfunc", + CHAR_getChar( petindex, CHAR_NAME), + CHAR_getInt( petindex, CHAR_LV), + "timeout_lost(系统扣留-溜宠自由宠)", + CHAR_getInt( petindex, CHAR_FLOOR), + CHAR_getInt( petindex,CHAR_X ), + CHAR_getInt( petindex,CHAR_Y ), + CHAR_getChar( petindex, CHAR_UNIQUECODE) // shan 2001/12/14 + ); + print("系统扣留-溜宠自由宠:%s\n", CHAR_getUseName( petindex)); + CHAR_CharaDelete( petindex); +#else + CHAR_setInt( petindex, CHAR_PUTPETTIME, NowTime.tv_sec); + CHAR_setWorkInt( petindex, CHAR_WORKPETFOLLOWMODE, CHAR_PETFOLLOW_NONE); + LogPet( + CHAR_getChar( pindex, CHAR_NAME ), + CHAR_getChar( pindex, CHAR_CDKEY ), + CHAR_getChar( petindex, CHAR_NAME), + CHAR_getInt( petindex, CHAR_LV), + "timeout_lost(溜宠太久,宠物走失))", + CHAR_getInt( pindex,CHAR_FLOOR), + CHAR_getInt( pindex,CHAR_X ), + CHAR_getInt( pindex,CHAR_Y ), + CHAR_getChar( petindex, CHAR_UNIQUECODE) // shan 2001/12/14 + + ); +#endif + return; + } + + }else{ + PET_CHECKFreePetIsIt( petindex); + } +#ifdef _MARKET_TRADE + } +#endif + if( CHAR_getInt( petindex, CHAR_MAILMODE) == CHAR_PETMAIL_IDLE3 || + CHAR_getInt( petindex, CHAR_MAILMODE) == CHAR_PETMAIL_IDLE2){ + if( act == CHAR_ACTATTACK) { + if( NPC_Util_isFaceToChara( pindex,petindex,1 ) == TRUE ) { + int action[2] = { CHAR_ACTDAMAGE, CHAR_ACTGUARD}; + CHAR_sendWatchEvent( objmeindex, action[RAND(0,1)], NULL,0,FALSE); + CHAR_setWorkInt( petindex, CHAR_WORKACTION, act); + } + } + }else if( CHAR_getInt( petindex, CHAR_MAILMODE) != CHAR_PETMAIL_NONE) { + ; + }else if( CHAR_getWorkInt( petindex, CHAR_WORKFIXAI) >= 100 ) { + int workpindex = CHAR_getWorkInt( petindex, CHAR_WORKPLAYERINDEX); + if( act == CHAR_ACTWALK && CHAR_CHECKINDEX( workpindex) && workpindex == pindex ){ + dir = NPC_Util_GetDirCharToChar( petindex, pindex, 0); + if( dir != -1 ) { + if( CHAR_getInt( petindex, CHAR_DIR) != dir ) { + CHAR_setInt( petindex, CHAR_DIR, dir); + CHAR_sendWatchEvent( CHAR_getWorkInt( petindex, CHAR_WORKOBJINDEX), + CHAR_ACTTURN,NULL,0,TRUE); + } + } + }else if( NPC_Util_isFaceToFace( petindex, pindex, 2 ) == TRUE ) { + switch( act) { + case CHAR_ACTATTACK: + case CHAR_ACTDAMAGE: + case CHAR_ACTDOWN: + case CHAR_ACTSTAND: + case CHAR_ACTACTIONWALK: + case CHAR_ACTGUARD: + case CHAR_ACTACTIONSTAND: + CHAR_sendWatchEvent( objmeindex, act, NULL,0,FALSE); + CHAR_setWorkInt( petindex, CHAR_WORKACTION, act); + break; + default: + break; + } + } + }else { +/* +#ifdef _MARKET_TRADE + if( CHAR_getWorkInt( petindex, CHAR_WORKTRADETYP) != TRADETYPE_SELL) { +#endif + if( CHAR_getWorkInt( petindex, CHAR_WORKPETFOLLOWMODE) != CHAR_PETFOLLOW_NOW ){ + if( RAND(0,30) == 1 ) { + CHAR_walk( petindex,RAND( 0,7),0); + } + } +#ifdef _MARKET_TRADE + } +#endif +*/ + } + return; +} + +#ifdef _PET_TALKBBI +BOOL PET_CheckPlayerBBI( int meindex, int charindex, int BBI, int flg) +{ + int MyBBI; + if( !CHAR_CHECKINDEX( charindex)) + return FALSE; + if( BBI < 0 ) + return FALSE; + MyBBI = CHAR_getInt( charindex, CHAR_BASEIMAGENUMBER); + + if(flg==0){ + if(BBI==MyBBI) + return TRUE; + }else if(flg==1){ + if(BBI < MyBBI) + return TRUE; + }else if(flg==2){ + if(BBI > MyBBI) + return TRUE; + } + + return FALSE; +} +#endif diff --git a/gmsv/char/petmail.c b/gmsv/char/petmail.c new file mode 100644 index 0000000..92b2b79 --- /dev/null +++ b/gmsv/char/petmail.c @@ -0,0 +1,1125 @@ +#include "version.h" +#include + +#include "configfile.h" +#include "buf.h" +#include "char_base.h" +#include "char.h" +#include "battle.h" +#include "handletime.h" +#include "map_deal.h" +#include "addressbook.h" +#include "lssproto_serv.h" +#include "pet.h" +#include "petmail.h" +#include "npcutil.h" +#include "log.h" + +#define PETMAIL_BATTLETIMEOUT 660 +#define PETMAIL_IDLETIMEOUT 30 +#define PETMAIL_IDLETIME 10 + +#define PETMAIL_IDLE_RETURNOWNER (60*30) +//andy_edit +//#define PETMAIL_IDLEDISCARD (60*60) //Syu 修正宠邮等待时间为一小时 +#define PETMAIL_IDLEDISCARD (60*3) + +/* petmail 跨星系的等待时间 shan add */ +#define PETMAIL_JS_TIMEOUT (2*60) + +static int PETMAIL_getIdleTime( int index); +static void PETMAIL_sendPetmail( int index, int tocharaindex); +static void PETMAIL_IdleProc1( int index); +static void PETMAIL_IdleProc2( int index); +static void PETMAIL_IdleProc3( int index); +static void PETMAIL_IdleProc4( int index); +static void PETMAIL_IdleProc5( int index); + +static void PETMAIL_ReturnWait( int index); +static void PETMAIL_returnMail( int index, int tocharaindex); +static int PETMAIL_offmsg_max; +#define PETMAILOFFMSGFILE "petmail.txt" + +#define PETMAIL_DEFTOTALNUM 1000 +static int PetMailTotalnums = 0; + +BOOL PETMAIL_sendPetMail( int cindex, int aindex, + int havepetindex, int haveitemindex, char* text , int color ) +{ + char textbuffer[2048]; + struct tm tm1; + Char *ch; + ADDRESSBOOK_entry *ae; + int petindex; + int itemindex =-1; + int tocharaindex,playernum,i; + + //判断 人物 宠物 道具 对象名片 + if( !CHAR_CHECKINDEX( cindex) )return FALSE; + if( haveitemindex != -1 ) { + itemindex = CHAR_getItemIndex( cindex, haveitemindex); + if( ITEM_CHECKINDEX( itemindex)) { + if( ITEM_getInt( itemindex, ITEM_CANPETMAIL) == 0 ) { + print( "err? crack?\n"); + return FALSE; + } + } + } + petindex = CHAR_getCharPet( cindex, havepetindex); + if( petindex == -1 ) return FALSE; + ch = CHAR_getCharPointer( petindex); + if( ch == NULL ) return FALSE; + ae = CHAR_getAddressbookEntry( cindex , aindex ); + if( ae == NULL )return FALSE; + +#ifdef _AVID_TRADETRYBUG //宠物邮件 + if( CHAR_getWorkInt( cindex, CHAR_WORKTRADEMODE) != CHAR_TRADE_FREE ){ + CHAR_talkToCli( cindex, -1, "交易状态中无法传递宠物邮件。", CHAR_COLORYELLOW ); + return FALSE; + } +#endif + //骑乘 + if (CHAR_getInt( cindex, CHAR_RIDEPET) == havepetindex ){ + CHAR_talkToCli(cindex, -1, "骑乘中的宠物无法传递宠物邮件!", CHAR_COLORYELLOW); + return FALSE; + } + if( CHAR_getWorkInt( cindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE){ + CHAR_talkToCli( cindex, -1, "战斗状态中无法传递宠物邮件。", CHAR_COLORYELLOW ); + return FALSE; + } + if (CHAR_getInt(petindex, CHAR_PETFAMILY) == 1){ + CHAR_talkToCli(cindex, -1, "家族守护兽无法传递邮件喔!", CHAR_COLORYELLOW); + return FALSE; + } +// Terry add fix can send mail to offline character 2004/2/5 + if(ae->online == 0){ + CHAR_talkToCli(cindex, -1, "该玩家不在线上!", CHAR_COLORYELLOW); + return FALSE; + } + playernum = CHAR_getPlayerMaxNum(); + for(i = 0;icdkey) == 0 && + strcmp(CHAR_getChar(i,CHAR_NAME),ae->charname) == 0 ) break; + } + if(i == playernum){ + CHAR_talkToCli(cindex, -1, "该玩家不在此星球上!", CHAR_COLORYELLOW); + return FALSE; + } +// end +#ifdef _MAP_TIME + if((CHAR_getInt(cindex,CHAR_FLOOR) >= 30017 && CHAR_getInt(cindex,CHAR_FLOOR) <= 30021)){ + char msgbuf[512]; + snprintf(msgbuf,sizeof(msgbuf),"此地区不得寄送道具!"); + CHAR_talkToCli(cindex,-1,msgbuf,CHAR_COLORWHITE); + return FALSE; + } + if((CHAR_getInt(i,CHAR_FLOOR) >= 30017 && CHAR_getInt(i,CHAR_FLOOR) <= 30021)){ + char msgbuf[512]; + snprintf(msgbuf,sizeof(msgbuf),"对方所在地区不得收寄送道具!"); + CHAR_talkToCli(cindex,-1,msgbuf,CHAR_COLORWHITE); + return FALSE; + } +#endif + +#ifdef _BAD_PLAYER // WON ADD 送坏玩家去关 + if( CHAR_getInt(cindex,CHAR_FLOOR)==887 ){ + char msgbuf[512]; + snprintf( msgbuf, sizeof( msgbuf), "对不起,您在招待室中,无法寄送信件。"); + CHAR_talkToCli( cindex, -1, msgbuf, CHAR_COLORWHITE); + return FALSE; + } +#endif + +#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令 + { + char msgbuf[512]; + snprintf( msgbuf, sizeof( msgbuf), "跨星系家族PK,无法寄送信件。"); + CHAR_talkToCli( cindex, -1, msgbuf, CHAR_COLORWHITE); + return FALSE; + } +#endif + + // Syu Add 2003/05/30 + if( ( CHAR_getInt(cindex,CHAR_FLOOR) >= 8200 && CHAR_getInt(cindex,CHAR_FLOOR) <= 8213 ) ) + { + char msgbuf[512]; + snprintf( msgbuf, sizeof( msgbuf), "英雄战场不得寄送道具!"); + CHAR_talkToCli( cindex, -1, msgbuf, CHAR_COLORWHITE); + return FALSE; + } + +#ifdef _PET_LIMITLEVEL + if( CHAR_getInt( petindex, CHAR_LIMITLEVEL) > 0 ) { + CHAR_talkToCli(cindex, -1, "特殊宠物不能传递邮件喔!", CHAR_COLORYELLOW); + return FALSE; + } +#endif + +#ifdef _PETMAIL_DEFNUMS + if( CHAR_getWorkInt( cindex, CHAR_PETMAILNUMS) > 6 ){ + CHAR_talkToCli(cindex, -1, "邮件中宠物过多,暂时无法传递宠物邮件!", CHAR_COLORYELLOW); + return FALSE; + }else if( PETMAIL_CheckIsMyOffmsg( cindex, ae->cdkey, ae->charname) > 5 ){ + CHAR_talkToCli(cindex, -1, "收件者目前邮件宠物超过5封,暂时无法传递宠物邮件!", CHAR_COLORYELLOW); + return FALSE; + }else if( CHAR_getWorkInt( cindex, CHAR_PETMAILSENDTIME) > (int)time( NULL)){ + char Mess1[256]; + sprintf( Mess1,"需等待%d秒才能再次寄送宠物邮件!", + (int)time( NULL) - CHAR_getWorkInt( cindex, CHAR_PETMAILSENDTIME)); + CHAR_talkToCli( cindex, -1, Mess1, CHAR_COLORYELLOW); + return FALSE; + }else if( PetMailTotalnums >= PETMAIL_DEFTOTALNUM ){ + CHAR_talkToCli(cindex, -1, "目前系统邮件过多,请稍後再寄。", CHAR_COLORYELLOW); + return FALSE; + }else{ + int nums = CHAR_getWorkInt( cindex, CHAR_PETMAILNUMS); + nums ++; + CHAR_setWorkInt( cindex, CHAR_PETMAILNUMS, nums); + CHAR_setWorkInt( cindex, CHAR_PETMAILSENDTIME, (int)time( NULL)+6); + PetMailTotalnums ++; + } +#endif + memcpy( &tm1, localtime( (time_t *)&NowTime.tv_sec), sizeof( tm1)); + snprintf( textbuffer, sizeof( textbuffer), + "%2d/%02d %2d:%02d|%s", tm1.tm_mon +1, tm1.tm_mday, tm1.tm_hour, tm1.tm_min, text); + { + int offmsgindex; + offmsgindex = PETMAIL_addOffmsg( cindex, ae->cdkey, ae->charname, text, color); + if( offmsgindex == -1 ) { + print( "offmsg buffer over\n"); + return FALSE; + } + +#ifdef _FIX_PETMAIL2 // WON ADD 修正宠邮2 + if( !PET_dropPetFLXY( cindex, havepetindex, PETMAIL_SPOOLFLOOR, PETMAIL_SPOOLX,PETMAIL_SPOOLY) ){ + CHAR_talkToCli( cindex, -1, "宠物邮件失败", CHAR_COLORYELLOW); + return FALSE; + } +#endif + CHAR_setInt( petindex, CHAR_FLOOR, CHAR_getInt( cindex, CHAR_FLOOR)); + CHAR_setInt( petindex, CHAR_X, CHAR_getInt( cindex, CHAR_X)); + CHAR_setInt( petindex, CHAR_Y, CHAR_getInt( cindex, CHAR_Y)); + CHAR_sendPMEToArroundCharacter( cindex, petindex, 0, CHAR_getInt( petindex, CHAR_PETMAILEFFECT)); + CHAR_setInt( petindex, CHAR_MAILMODE,CHAR_PETMAIL_IDLE2); + CHAR_setInt( petindex, CHAR_LOOPINTERVAL, PETMAIL_LOOPINTERVAL2); + strcpysafe( ch->charfunctable[CHAR_LOOPFUNC].string, + sizeof( ch->charfunctable[CHAR_LOOPFUNC]), "PETMAIL_Loop"); + CHAR_constructFunctable( petindex); + CHAR_setInt( petindex, CHAR_PETMAILBUFINDEX, offmsgindex); + CHAR_setInt( petindex, CHAR_PETMAILIDLETIME, NowTime.tv_sec); + CHAR_setInt( petindex, CHAR_PETMAILFROMFLOOR, CHAR_getInt( cindex, CHAR_FLOOR)); + CHAR_setInt( petindex, CHAR_PETMAILFROMX, CHAR_getInt( cindex, CHAR_X)); + CHAR_setInt( petindex, CHAR_PETMAILFROMY,CHAR_getInt( cindex, CHAR_Y)); + +#ifdef _WON_PET_MAIL_LOG // WON ADD 增加寄宠邮的 LOG + LogPet( + CHAR_getChar( cindex, CHAR_NAME ), + CHAR_getChar( cindex, CHAR_CDKEY ), + CHAR_getChar( petindex, CHAR_NAME), + CHAR_getInt( petindex, CHAR_LV), + "Pet_Send_Mail(寄宠邮)", + CHAR_getInt( cindex,CHAR_FLOOR), + CHAR_getInt( cindex,CHAR_X ), + CHAR_getInt( cindex,CHAR_Y ), + CHAR_getChar( petindex, CHAR_UNIQUECODE) + ); +#endif + if( haveitemindex != -1 ) { + CHAR_setItemIndex( cindex, haveitemindex, -1); + CHAR_setItemIndex( petindex, CHAR_STARTITEMARRAY, itemindex); + CHAR_sendItemDataOne( cindex, haveitemindex); + LogItem( + CHAR_getChar( cindex, CHAR_NAME ), + CHAR_getChar( cindex, CHAR_CDKEY ), + itemindex, + "pm_have(宠邮->寄送的道具)", + CHAR_getInt( cindex,CHAR_FLOOR), + CHAR_getInt( cindex,CHAR_X ), + CHAR_getInt( cindex,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + + ); + } + { + char token[256]; + tocharaindex = PETMAIL_CheckPlayerExist( petindex, 0); + sprintf( token, "寄送宠物邮件(%s)给%s。", + CHAR_getUseName( petindex), CHAR_getUseName( tocharaindex) ); + CHAR_talkToCli( cindex, -1, token, CHAR_COLORYELLOW); + } + return TRUE; + } + return FALSE; +} + +static PETMAIL_offmsg * PETMAIL_offmsgbuf; +BOOL PETMAIL_initOffmsgBuffer( int count ) +{ + int size = sizeof( PETMAIL_offmsg )*count ; + FILE *fp; + char filename[256]; + char line[2048]; + int linenum = 0; + + PETMAIL_offmsgbuf = (PETMAIL_offmsg*)allocateMemory( size ); + + if( PETMAIL_offmsgbuf == NULL ) return FALSE; + + PetMailTotalnums = 0; + + memset( PETMAIL_offmsgbuf, 0,size ); + + PETMAIL_offmsg_max = count; + snprintf( filename ,sizeof( filename ) ,"%s/%s", getStoredir(), PETMAILOFFMSGFILE); + fp = fopen( filename , "rt" ); + if( fp == NULL ) return TRUE; + + while( fgets( line, sizeof( line ), fp ) != NULL ){ + char buf[1024]; + int index; + if( !getStringFromIndexWithDelim( line, "|", 1, buf, sizeof( buf))) { + print( "read error line[%d]\n", linenum); + continue; + } + index = atoi( buf); + if( index >= PETMAIL_offmsg_max ) { + print( "index over offmsg_max [%d]\n", index); + continue; + } + if( PETMAIL_offmsgbuf[index].use == TRUE) { + print( "offmsg already use index[%d]\n", index); + continue; + } + + if( !getStringFromIndexWithDelim( line, "|", 2, buf, sizeof( buf))) { + print( "read error line[%d]\n", linenum); + continue; + } + PETMAIL_offmsgbuf[index].send_tm = atoi( buf); + + if( !getStringFromIndexWithDelim( line, "|", 3, buf, sizeof( buf))) { + print( "read error line[%d]\n", linenum); + continue; + } + PETMAIL_offmsgbuf[index].color = atoi( buf); + + if( !getStringFromIndexWithDelim( line, "|", 4, buf, sizeof( buf))) { + print( "read error line[%d]\n", linenum); + continue; + } + strcpysafe( PETMAIL_offmsgbuf[index].text, + sizeof( PETMAIL_offmsgbuf[index].text), + buf); + + if( !getStringFromIndexWithDelim( line, "|", 5, buf, sizeof( buf))) { + print( "read error line[%d]\n", linenum); + continue; + } + strcpysafe( PETMAIL_offmsgbuf[index].destcd, + sizeof( PETMAIL_offmsgbuf[index].destcd), + buf); + + if( !getStringFromIndexWithDelim( line, "|", 6, buf, sizeof( buf))) { + print( "read error line[%d]\n", linenum); + continue; + } + makeStringFromEscaped(buf); + strcpysafe( PETMAIL_offmsgbuf[index].destcharname, + sizeof( PETMAIL_offmsgbuf[index].destcharname), + buf); + if( !getStringFromIndexWithDelim( line, "|", 7, buf, sizeof( buf))) { + print( "read error line[%d]\n", linenum); + continue; + } + strcpysafe( PETMAIL_offmsgbuf[index].srccd, + sizeof( PETMAIL_offmsgbuf[index].srccd), + buf); + if( !getStringFromIndexWithDelim( line, "|", 8, buf, sizeof( buf))) { + print( "read error line[%d]\n", linenum); + continue; + } + makeStringFromEscaped(buf); + strcpysafe( PETMAIL_offmsgbuf[index].srccharname, + sizeof( PETMAIL_offmsgbuf[index].srccharname), + buf); + linenum ++; + } + fclose( fp); + return TRUE; + +} + +BOOL PETMAIL_addOffmsg( int fromindex, char *tocdkey, char *tocharaname, + char *text , int color ) +{ + + int i; + + for( i = 0 ; i < PETMAIL_offmsg_max; i++ ) { + if( PETMAIL_offmsgbuf[i].use == 0 ) { + PETMAIL_offmsg *om = & PETMAIL_offmsgbuf[i]; + om->use = 1; + time( & om->send_tm ); + + strcpysafe( om->srccd , sizeof( om->srccd ), + CHAR_getChar( fromindex, CHAR_CDKEY)); + strcpysafe( om->srccharname , sizeof( om->srccharname ), + CHAR_getChar( fromindex, CHAR_NAME)); + strcpysafe( om->destcd , sizeof( om->destcd ), tocdkey ); + strcpysafe( om->destcharname , sizeof(om->destcharname), tocharaname); + strcpysafe( om->text , sizeof(om->text), text ); + om->color = color; + return i; + } + } + return -1; +} + +PETMAIL_offmsg *PETMAIL_getOffmsg( int offmsgindex) +{ + if( offmsgindex < 0 || offmsgindex >= PETMAIL_offmsg_max ) return NULL; + return &PETMAIL_offmsgbuf[offmsgindex]; +} + +BOOL PETMAIL_deleteOffmsg( int offmsgindex) +{ + if( offmsgindex < 0 || offmsgindex >= PETMAIL_offmsg_max ) return FALSE; + PETMAIL_offmsgbuf[offmsgindex].use = FALSE; + return TRUE; +} + +void PETMAIL_proc( void ) +{ + int i; + static time_t PETMAIL_check_time_store = 0; + time_t t; + time( &t ); + if( t < PETMAIL_check_time_store) return; + PETMAIL_check_time_store = t + PETMAIL_CHECK_OFFMSG_EXPIRE_INTERVAL; + for(i = 0; i < PETMAIL_offmsg_max ; i++){ + if( PETMAIL_offmsgbuf[i].use && PETMAIL_offmsgbuf[i].send_tm < ( t - PETMAIL_OFFMSG_TIMEOUT )){ + PETMAIL_offmsgbuf[i].use = FALSE; + } + } +} + +BOOL storePetmail( void) +{ + FILE *fp; + char filename[256]; + char escapebuf1[ 64],escapebuf2[ 64]; + int i; + + /* 白央奶伙 毛菲户月 */ + snprintf( filename ,sizeof( filename ) ,"%s/%s" , + getStoredir(), PETMAILOFFMSGFILE); + fp = fopen( filename , "wt" ); + if( fp == NULL ) return FALSE; + for(i = 0; i < PETMAIL_offmsg_max ; i++){ + if( PETMAIL_offmsgbuf[i].use ){ + fprintf( fp, "%d|%ud|%d|%s|%s|%s|%s|%s|", + i, (unsigned int)PETMAIL_offmsgbuf[i].send_tm, + PETMAIL_offmsgbuf[i].color, + PETMAIL_offmsgbuf[i].text, + PETMAIL_offmsgbuf[i].destcd, + makeEscapeString( PETMAIL_offmsgbuf[i].destcharname, + escapebuf1, sizeof( escapebuf1)), + PETMAIL_offmsgbuf[i].srccd, + makeEscapeString( PETMAIL_offmsgbuf[i].srccharname, + escapebuf2, sizeof( escapebuf2))); + } + } + fclose( fp); + return TRUE; +} + +BOOL PETMAIL_CheckPlayerExist( int index, int mode) +{ + int i; + char *searchcd = NULL; + char *searchname = NULL; + PETMAIL_offmsg *adof; + int playernum = CHAR_getPlayerMaxNum(); + + if( mode == 0 ) { + adof = PETMAIL_getOffmsg( CHAR_getInt( index, CHAR_PETMAILBUFINDEX)); + if( adof == NULL ) return FALSE; + searchcd = adof->destcd; + searchname = adof->destcharname; + } + else if( mode == 1 ) { + searchcd = CHAR_getChar( index, CHAR_OWNERCDKEY); + searchname = CHAR_getChar( index, CHAR_OWNERCHARANAME); + if( searchcd == NULL || searchname == NULL ) return FALSE; + } + for( i = 0 ; i < playernum ; i ++) { + if( CHAR_CHECKINDEX( i) && + strcmp( CHAR_getChar( i, CHAR_CDKEY), searchcd ) == 0 && + strcmp( CHAR_getChar( i, CHAR_NAME), searchname) == 0 ) { + return i; + } + } + return -1; +} + +void PETMAIL_Loopfunc( int index) +{ + int mode = CHAR_getInt( index, CHAR_MAILMODE); + switch( mode ){ + case CHAR_PETMAIL_IDLE1: + PETMAIL_IdleProc1( index); + break; + case CHAR_PETMAIL_IDLE2: + PETMAIL_IdleProc2( index); + break; + case CHAR_PETMAIL_RETURNWAIT://回来等待 + PETMAIL_ReturnWait( index); + break; + case CHAR_PETMAIL_IDLE3: + PETMAIL_IdleProc3( index); + break; + case CHAR_PETMAIL_IDLE4://寻找主人 + PETMAIL_IdleProc4( index); + break; + case CHAR_PETMAIL_IDLE5: //超过时间无法找到主人 + PETMAIL_IdleProc5( index); + break; + default: + break; + } +} + +static int PETMAIL_getIdleTime( int index) +{ +#define PETMAIL_DIVRANGE 25 // 坌喃允月汹 +#define PETMAIL_IDLELEVELRANGE 10 // 坌喃允月 区 +#define PETMAIL_IDLEUNITTIME 3 // 棉厥 + int d; + int dex = CHAR_getWorkInt( index, CHAR_WORKQUICK) ; + + d = dex / PETMAIL_DIVRANGE; + if( d < 0 ) d = 0; + if( d > PETMAIL_IDLELEVELRANGE ) d = PETMAIL_IDLELEVELRANGE; + d = PETMAIL_IDLELEVELRANGE - d ; + + return d * PETMAIL_IDLEUNITTIME; + +#undef PETMAIL_DIVRANGE +#undef PETMAIL_IDLELEVELRANGE +#undef PETMAIL_IDLEUNITTIME +} + +static void PETMAIL_sendPetmail( int index, int tocharaindex) +{ + int index_to_my_info; + int itemindex,ret; + index_to_my_info = ADDRESSBOOK_getIndexInAddressbook( tocharaindex, + CHAR_getChar( index, CHAR_OWNERCDKEY), + CHAR_getChar( index, CHAR_OWNERCHARANAME)); +#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令 + { + char msgbuf[512]; + snprintf( msgbuf, sizeof( msgbuf), "跨星系家族PK,无法寄送信件。"); + CHAR_talkToCli( index, -1, msgbuf, CHAR_COLORWHITE); + return ; + } +#endif + + + if( index_to_my_info < 0 ) { + char msgbuf[512]; + + snprintf( msgbuf, sizeof( msgbuf), + "%s的%s 终於来了!" + "由於对方没有您的名片,所以信件被退回了。", + CHAR_getChar( index, CHAR_OWNERCHARANAME), + CHAR_getUseName( index)); + CHAR_talkToCli( tocharaindex, -1, msgbuf, CHAR_COLORWHITE); + } + +#ifdef _BAD_PLAYER // WON ADD 送坏玩家去关 + else if( CHAR_getInt(tocharaindex,CHAR_FLOOR)==887 ){ + char msgbuf[512]; + snprintf( msgbuf, sizeof( msgbuf), + "由於您在招待室中,无法接收信件,所以信件被退回了。" ); + CHAR_talkToCli( tocharaindex, -1, msgbuf, CHAR_COLORWHITE); + } +#endif + + //Syu Add 06/16 + else if( CHAR_getInt(tocharaindex,CHAR_FLOOR) >=8200 && + CHAR_getInt(tocharaindex,CHAR_FLOOR) <= 8213 ){ + char msgbuf[512]; + snprintf( msgbuf, sizeof( msgbuf), + "英雄战场不得寄送道具!" ); + CHAR_talkToCli( tocharaindex, -1, msgbuf, CHAR_COLORWHITE); + } + else { + struct tm tm1; + char textbuffer[2048]; + char escapebuf[128]; + int fd; + PETMAIL_offmsg *offmsg; + itemindex = CHAR_getItemIndex( index, CHAR_STARTITEMARRAY); + ret = CHAR_addItemSpecificItemIndex( tocharaindex, itemindex); + if( ret < 0 || ret >= CHAR_MAXITEMHAVE){ + CHAR_DropItem( index, CHAR_STARTITEMARRAY); + LogItem( + CHAR_getChar( tocharaindex, CHAR_NAME ), + CHAR_getChar( tocharaindex, CHAR_CDKEY ), + itemindex, + "pm_putground(宠邮->道具栏已满,放置地上)", + CHAR_getInt( index,CHAR_FLOOR), + CHAR_getInt( index,CHAR_X ), + CHAR_getInt( index,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + + ); + } + else { + CHAR_setItemIndex( index, CHAR_STARTITEMARRAY, -1); + CHAR_sendItemDataOne( tocharaindex, ret); + LogItem( + CHAR_getChar( tocharaindex, CHAR_NAME ), + CHAR_getChar( tocharaindex, CHAR_CDKEY ), + itemindex, + "pm_getitem(宠邮->收到的道具)", + CHAR_getInt( index,CHAR_FLOOR), + CHAR_getInt( index,CHAR_X ), + CHAR_getInt( index,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + } + offmsg = PETMAIL_getOffmsg( + CHAR_getInt( index, CHAR_PETMAILBUFINDEX)); + memcpy( &tm1, localtime( (time_t *)&NowTime.tv_sec), + sizeof( tm1)); + snprintf( textbuffer, sizeof( textbuffer), + "%2d/%02d %2d:%02d|%s|%d|%d|%s|%d", + tm1.tm_mon +1, tm1.tm_mday, tm1.tm_hour, tm1.tm_min, + offmsg->text, + CHAR_getInt( index, CHAR_BASEIMAGENUMBER), + CHAR_getInt( index, CHAR_LV), + makeEscapeString( CHAR_getUseName( index), escapebuf, + sizeof( escapebuf)), + ITEM_getInt( itemindex, ITEM_BASEIMAGENUMBER) + ); + fd = getfdFromCharaIndex( tocharaindex); + if( fd != -1 ) lssproto_MSG_send( fd , index_to_my_info , + textbuffer , offmsg->color ); + PETMAIL_deleteOffmsg( CHAR_getInt( index, CHAR_PETMAILBUFINDEX)); + CHAR_setInt( index, CHAR_PETMAILBUFINDEX, -1); + CHAR_setInt( index, CHAR_PETSENDMAILCOUNT, + CHAR_getInt( index, CHAR_PETSENDMAILCOUNT) +1); + { + char *cdkey = CHAR_getChar( index, CHAR_CDKEY); + if( cdkey) printl( LOG_TALK, "CDKEY=%s\tTEXT=%s" , cdkey, offmsg->text ); + else printl( LOG_TALK, "CDKEY=(null)\tTEXT=%s" , offmsg->text ); + } + } +} + +static void PETMAIL_IdleProc1( int index) +{ + + int tocharaindex; + int warp = FALSE; + + tocharaindex = PETMAIL_CheckPlayerExist( index, 0); + if( !CHAR_CHECKINDEX( tocharaindex) ) { + warp = TRUE; + }else { + if( CHAR_getInt( tocharaindex, CHAR_FLOOR) == 8215 ){//客服活动 andy + warp = TRUE; + }else if( CHAR_getWorkInt( tocharaindex, CHAR_WORKTRADEMODE) != CHAR_TRADE_FREE ){//交易中不收邮件 + warp = TRUE; + }else if( CHAR_getWorkInt( tocharaindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE ){ + int battleindex = CHAR_getWorkInt( tocharaindex, CHAR_WORKBATTLEINDEX ); + if( !BATTLE_CHECKINDEX( battleindex ) || BattleArray[battleindex].flgTime > 60 ){ + warp = TRUE; + } + }else { + int ret; + int distance; + distance = NPC_Util_CharDistance( tocharaindex, index); + if( distance > CHAR_DEFAULTSEESIZ /2 ) { + warp = TRUE; + }else if( distance > 1 ){ + int dir = NPC_Util_GetDirCharToChar( index, tocharaindex, 0); + if( dir != -1 ) { + dir = NPC_Util_SuberiWalk( index, dir); + } + if( dir != -1 ) { + ret = CHAR_walk( index, dir, 0); + if( ret != CHAR_WALKSUCCESSED) { + dir = -1; + } + } + if( dir == -1 ) { + warp = TRUE; + } + }else { + PETMAIL_sendPetmail( index, tocharaindex); + CHAR_setInt( index, CHAR_MAILMODE,CHAR_PETMAIL_RETURNWAIT); + CHAR_setInt( index, CHAR_PETMAILIDLETIME, NowTime.tv_sec); + CHAR_setInt( index, CHAR_LOOPINTERVAL, PETMAIL_LOOPINTERVAL2); + } + } + } + if( warp) { + if( CHAR_getInt( index, CHAR_FLOOR) != PETMAIL_SPOOLFLOOR) { + CHAR_warpToSpecificPoint( index, + PETMAIL_SPOOLFLOOR, + PETMAIL_SPOOLX,PETMAIL_SPOOLX); + CHAR_setInt( index, CHAR_MAILMODE,CHAR_PETMAIL_IDLE2); + CHAR_setInt( index, CHAR_PETMAILIDLETIME, NowTime.tv_sec); + CHAR_setInt( index, CHAR_LOOPINTERVAL, PETMAIL_LOOPINTERVAL2); + } + } +} + +static void PETMAIL_IdleProc2( int index) +{ + unsigned int t = CHAR_getInt( index, CHAR_PETMAILIDLETIME); + if( NowTime.tv_sec > t + PETMAIL_getIdleTime( index)) { + int tocharaindex; + int cnt; + tocharaindex = PETMAIL_CheckPlayerExist( index, 0); + if( tocharaindex != -1 ) { + if( CHAR_getInt( tocharaindex, CHAR_FLOOR) == 8215 ){//客服活动 andy + }else if( CHAR_getWorkInt( tocharaindex, CHAR_WORKTRADEMODE) != CHAR_TRADE_FREE ){//交易中不收邮件 + }else if( CHAR_getWorkInt( tocharaindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE){ + }else { + int fl, x, y, ch_x, ch_y; + fl = CHAR_getInt( tocharaindex, CHAR_FLOOR); + ch_x = CHAR_getInt( tocharaindex, CHAR_X); + ch_y = CHAR_getInt( tocharaindex, CHAR_Y); + for( cnt = 0; cnt < 10; cnt ++ ) { + x = RAND( ch_x -1, ch_x + 1); + y = RAND( ch_y -1, ch_y + 1); + if( MAP_walkAble( tocharaindex, fl,x,y)) { + break; + } + } + if( cnt == 10 ) { + x = ch_x; y = ch_y; + } + CHAR_setInt( index, CHAR_MAILMODE,CHAR_PETMAIL_RETURNWAIT); + CHAR_setInt( index, CHAR_PETMAILIDLETIME, NowTime.tv_sec); + CHAR_warpToSpecificPoint( index,fl, x,y); + PETMAIL_sendPetmail( index, tocharaindex); + return; + } + }else{ + if( NowTime.tv_sec > t + PETMAIL_IDLETIMEOUT ) { + PETMAIL_deleteOffmsg( CHAR_getInt( index, CHAR_PETMAILBUFINDEX)); + CHAR_setInt( index, CHAR_MAILMODE, CHAR_PETMAIL_IDLE3); + CHAR_setInt( index, CHAR_PETMAILIDLETIME, NowTime.tv_sec); + CHAR_setInt( index, CHAR_LOOPINTERVAL, PETMAIL_LOOPINTERVAL1); + } + return; + } + if( NowTime.tv_sec > t + PETMAIL_BATTLETIMEOUT ) { + PETMAIL_deleteOffmsg( CHAR_getInt( index, CHAR_PETMAILBUFINDEX)); + CHAR_setInt( index, CHAR_MAILMODE, CHAR_PETMAIL_IDLE3); + CHAR_setInt( index, CHAR_PETMAILIDLETIME, NowTime.tv_sec); + CHAR_setInt( index, CHAR_LOOPINTERVAL, PETMAIL_LOOPINTERVAL1); + } + } +} + +static void PETMAIL_ReturnWait( int index) +{ + unsigned int t = CHAR_getInt( index, CHAR_PETMAILIDLETIME); + if( NowTime.tv_sec > t + PETMAIL_IDLETIME) { + CHAR_setInt( index, CHAR_MAILMODE, CHAR_PETMAIL_IDLE3); + CHAR_setInt( index, CHAR_PETMAILIDLETIME, NowTime.tv_sec); + CHAR_setInt( index, CHAR_LOOPINTERVAL, PETMAIL_LOOPINTERVAL1); + } +} + +static void PETMAIL_IdleProc3( int index) +{ + + int tocharaindex; + int warp = FALSE; + + tocharaindex = PETMAIL_CheckPlayerExist( index, 1); + if( tocharaindex == -1 ) { + warp = TRUE; + }else { + if( CHAR_getWorkInt( tocharaindex, CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE) { + int ret ; + int distance; + distance = NPC_Util_CharDistance( tocharaindex, index); + if( distance > CHAR_DEFAULTSEESIZ /2 ) { + warp = TRUE; + + }else if( distance > 1 ){ + int dir = NPC_Util_GetDirCharToChar( index, tocharaindex, 0); + if( dir != -1 ) { + dir = NPC_Util_SuberiWalk( index, dir); + } + if( dir != -1 ) { + ret = CHAR_walk( index, dir, 0); + if( ret != CHAR_WALKSUCCESSED) { + dir = -1; + } + } + if( dir == -1 ) { + warp = TRUE; + } + }else { + //andy_reEdit 2003/05/30 + warp = TRUE; +/* CHAR_setInt( index, CHAR_MAILMODE,CHAR_PETMAIL_IDLE5); + CHAR_setInt( index, CHAR_PETMAILIDLETIME, NowTime.tv_sec); + CHAR_setInt( index, CHAR_LOOPINTERVAL, PETMAIL_LOOPINTERVAL2); + PETMAIL_returnMail( index, tocharaindex); +*/ + } + } + } + if( warp) { + CHAR_warpToSpecificPoint( index, + PETMAIL_SPOOLFLOOR, + PETMAIL_SPOOLX,PETMAIL_SPOOLX); + CHAR_setInt( index, CHAR_MAILMODE,CHAR_PETMAIL_IDLE4); + CHAR_setInt( index, CHAR_PETMAILIDLETIME, NowTime.tv_sec); + CHAR_setInt( index, CHAR_LOOPINTERVAL, PETMAIL_LOOPINTERVAL2); + } +} +static void PETMAIL_IdleProc4( int index) +{ + unsigned int t = CHAR_getInt( index, CHAR_PETMAILIDLETIME); + { + int tocharaindex; + int cnt; + tocharaindex = PETMAIL_CheckPlayerExist( index, 1);//寻找主人 + if( tocharaindex != -1 ) { + if( CHAR_getWorkInt( tocharaindex, CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE && + CHAR_getWorkInt( tocharaindex, CHAR_WORKTRADEMODE) == CHAR_TRADE_FREE ){ + + int fl, x, y, ch_x, ch_y;//回到主人身边 + + fl = CHAR_getInt( tocharaindex, CHAR_FLOOR); + ch_x = CHAR_getInt( tocharaindex, CHAR_X); + ch_y = CHAR_getInt( tocharaindex, CHAR_Y); + for( cnt = 0; cnt < 10; cnt ++ ) { + x = RAND( ch_x -1, ch_x + 1); + y = RAND( ch_y -1, ch_y + 1); + if( MAP_walkAble( index, fl,x,y)) { + break; + } + } + if( cnt == 10 ) { + x = ch_x; y = ch_y; + } + CHAR_setInt( index, CHAR_MAILMODE,CHAR_PETMAIL_IDLE5); + CHAR_setInt( index, CHAR_PETMAILIDLETIME, NowTime.tv_sec); + CHAR_warpToSpecificPoint( index,fl, x,y); + PETMAIL_returnMail( index, tocharaindex); + } + }else { + if( NowTime.tv_sec > t + PETMAIL_IDLE_RETURNOWNER ) {//检查等待主人时间 + int itemindex; + CHAR_warpToSpecificPoint( index, //回到原先主人所在座标 + CHAR_getInt( index, CHAR_PETMAILFROMFLOOR), + CHAR_getInt( index, CHAR_PETMAILFROMX), + CHAR_getInt( index, CHAR_PETMAILFROMY)); + + CHAR_setInt( index, CHAR_MAILMODE, CHAR_PETMAIL_IDLE5);//改变宠邮状态 + CHAR_setInt( index, CHAR_LOOPINTERVAL, PETMAIL_LOOPINTERVAL2); + CHAR_setInt( index, CHAR_PETMAILIDLETIME, NowTime.tv_sec); + if( CHAR_getInt( index, CHAR_PETMAILIDLETIME) != -1 ) { + PETMAIL_deleteOffmsg( CHAR_getInt( index, CHAR_PETMAILBUFINDEX)); + } + itemindex = CHAR_getItemIndex( index, CHAR_STARTITEMARRAY);//删除附带道具 + if( ITEM_CHECKINDEX( itemindex ) ) { + CHAR_DropItem( index, CHAR_STARTITEMARRAY); + + LogItem( + CHAR_getChar( index, CHAR_OWNERCHARANAME ), + CHAR_getChar( index, CHAR_OWNERCDKEY ), + itemindex, + "pm_returntimeout(宠邮->逾时删除道具)", + CHAR_getInt( index,CHAR_FLOOR), + CHAR_getInt( index,CHAR_X ), + CHAR_getInt( index,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + } + } + } + } + +} + +static void PETMAIL_IdleProc5( int index) +{ + unsigned int t = CHAR_getInt( index, CHAR_PETMAILIDLETIME); + if( NowTime.tv_sec > t + PETMAIL_IDLEDISCARD) { + Char *ch; + CHAR_setInt( index, CHAR_MAILMODE, CHAR_PETMAIL_NONE); + CHAR_setInt( index, CHAR_PETMAILIDLETIME, 0); + +#ifdef _FIX_PETMAIL // WON ADD 修正宠邮 + CHAR_setInt( index, CHAR_PUTPETTIME, NowTime.tv_sec ); +#endif +#ifdef _PETMAIL_DEFNUMS + PETMAIL_delPetMailTotalnums( 1); //M PET 变自由宠 + if( PetMailTotalnums < 0 ) PetMailTotalnums = 0; +#endif + ch = CHAR_getCharPointer( index); + if( ch != NULL ) { + strcpysafe( ch->charfunctable[CHAR_LOOPFUNC].string, + sizeof( ch->charfunctable[CHAR_LOOPFUNC]), "" ); + CHAR_constructFunctable( index); + } +#ifdef _PET_LOSTPET + CHAR_CharSaveLostPet( index, 2); + LogPet( + "系统", + "Watchfunc", + CHAR_getChar( index, CHAR_NAME), + CHAR_getInt( index, CHAR_LV), + "timeout_lost(系统扣留-宠邮自由宠)", + CHAR_getInt( index, CHAR_FLOOR), + CHAR_getInt( index,CHAR_X ), + CHAR_getInt( index,CHAR_Y ), + CHAR_getChar( index, CHAR_UNIQUECODE) // shan 2001/12/14 + ); + print("系统扣留-宠邮自由宠:%s\n", CHAR_getUseName( index)); + CHAR_CharaDelete( index); +#else + LogPet( + CHAR_getChar( index, CHAR_OWNERCHARANAME ), + CHAR_getChar( index, CHAR_OWNERCDKEY ), + CHAR_getChar( index, CHAR_NAME), + CHAR_getInt( index, CHAR_LV), + "FreePet(宠邮变回自由宠)", + CHAR_getInt( index,CHAR_FLOOR), + CHAR_getInt( index,CHAR_X ), + CHAR_getInt( index,CHAR_Y ), + CHAR_getChar( index, CHAR_UNIQUECODE) + ); +#endif + + }else { + int tocharaindex = PETMAIL_CheckPlayerExist( index, 1); + if( tocharaindex != -1 ) { + if( NPC_Util_CharDistance( tocharaindex, index ) > CHAR_DEFAULTSEESIZ/2) { + int fl, x, y, ch_x, ch_y; + int cnt; + fl = CHAR_getInt( tocharaindex, CHAR_FLOOR); + ch_x = CHAR_getInt( tocharaindex, CHAR_X); + ch_y = CHAR_getInt( tocharaindex, CHAR_Y); + for( cnt = 0; cnt < 10; cnt ++ ) { + x = RAND( ch_x -1, ch_x + 1); + y = RAND( ch_y -1, ch_y + 1); + if( MAP_walkAble( index, fl,x,y)) { + break; + } + } + if( cnt == 10 ) { + x = ch_x; y = ch_y; + } + CHAR_warpToSpecificPoint( index,fl, x,y); + } + } + } +} + +static void PETMAIL_returnMail( int index, int tocharaindex) +{ + char msgbuf[512]; + int itemindex = CHAR_getItemIndex( index, CHAR_STARTITEMARRAY); + if( ITEM_CHECKINDEX( itemindex ) ) { + int ret = CHAR_addItemSpecificItemIndex( tocharaindex, itemindex); + + if( ret < 0 || ret >= CHAR_MAXITEMHAVE){ + CHAR_DropItem( index, CHAR_STARTITEMARRAY); + + LogItem( + CHAR_getChar( tocharaindex, CHAR_NAME ), + CHAR_getChar( tocharaindex, CHAR_CDKEY ), + itemindex, + "pm_returnputground(宠邮->道具已满将道具放置地上)", + CHAR_getInt( index,CHAR_FLOOR), + CHAR_getInt( index,CHAR_X ), + CHAR_getInt( index,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + }else { + CHAR_setItemIndex( index, CHAR_STARTITEMARRAY, -1); + CHAR_sendItemDataOne( tocharaindex, ret); + } + } + +#ifdef _PETMAIL_DEFNUMS + { + int petmailnums = CHAR_getWorkInt( tocharaindex, CHAR_PETMAILNUMS); + petmailnums--; + if( petmailnums < 0 ) petmailnums = 0; + CHAR_setWorkInt( tocharaindex, CHAR_PETMAILNUMS, petmailnums); + } +#endif + if( CHAR_getInt( index, CHAR_PETMAILBUFINDEX) != -1 ) { + snprintf( msgbuf, sizeof( msgbuf), + "%s 回来了!" + "似乎无法寄送信件。", + CHAR_getUseName( index)); + CHAR_talkToCli( tocharaindex, -1, msgbuf, CHAR_COLORWHITE); + PETMAIL_deleteOffmsg( CHAR_getInt( index, CHAR_PETMAILBUFINDEX)); + }else { + snprintf( msgbuf, sizeof( msgbuf), + "%s 回来了!", CHAR_getUseName( index)); + CHAR_talkToCli( tocharaindex, -1, msgbuf, CHAR_COLORWHITE); + } + +#ifdef _PETMAIL_DEFNUMS + CHAR_AutoPickupMailPet( tocharaindex, index); +#endif + +} + + +#ifdef _PETMAIL_DEFNUMS +void CHAR_AutoPickupMailPet( int charaindex, int petindex ) +{ + int objindex; + int havepetindex; + char category[3]; + Char *ch; + if( !CHAR_CHECKINDEX( charaindex ) ) return; +#ifdef _AVID_TRADETRYBUG //丢出宠物 + if( CHAR_getWorkInt( charaindex, CHAR_WORKTRADEMODE) != CHAR_TRADE_FREE ){ + CHAR_talkToCli( charaindex, -1, "交易状态中无法自动拾回邮件宠物!", CHAR_COLORYELLOW ); + return; + } +#endif + if( !CHAR_CHECKINDEX( petindex ) ) return; + havepetindex = CHAR_getCharPetElement( charaindex); + if( havepetindex == -1 ) { + + CHAR_talkToCli(charaindex,-1,"宠物栏已满!无法自动拾回邮件宠物!",CHAR_COLORYELLOW); + // WON ADD + LogPet( + CHAR_getChar( charaindex, CHAR_NAME ), + CHAR_getChar( charaindex, CHAR_CDKEY ), + CHAR_getChar( petindex, CHAR_NAME), + CHAR_getInt( petindex, CHAR_LV), + "Pet_Full(宠物栏已满,无法拾起宠物)", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + CHAR_getChar( petindex, CHAR_UNIQUECODE) + ); + return; + } + ch = CHAR_getCharPointer( petindex); + if( ch == NULL ) return; + + objindex = CHAR_getWorkInt( petindex, CHAR_WORKOBJINDEX ); + CHAR_ObjectDelete(objindex); + CHAR_setWorkInt( petindex, CHAR_WORKPLAYERINDEX, charaindex); + CHAR_setCharPet( charaindex, havepetindex, petindex); + + CHAR_setChar( petindex, CHAR_OWNERCDKEY, CHAR_getChar( charaindex, CHAR_CDKEY)); + CHAR_setChar( petindex, CHAR_OWNERCHARANAME, CHAR_getChar( charaindex, CHAR_NAME)); + + snprintf( category,sizeof( category),"K%d",havepetindex); + CHAR_sendStatusString( charaindex, category); + snprintf( category,sizeof( category),"W%d",havepetindex); + CHAR_sendStatusString( charaindex, category); + + CHAR_setInt( petindex, CHAR_PUTPETTIME, 0); + CHAR_setWorkInt( petindex, CHAR_WORKOBJINDEX, -1); + CHAR_setInt( petindex, CHAR_MAILMODE, CHAR_PETMAIL_NONE); + PETMAIL_delPetMailTotalnums( 1); // M PET 自动捡起 + + strcpysafe( ch->charfunctable[CHAR_LOOPFUNC].string, + sizeof( ch->charfunctable[CHAR_LOOPFUNC]),""); + CHAR_setInt( petindex, CHAR_LOOPINTERVAL, 0); + CHAR_constructFunctable( petindex); + CHAR_complianceParameter( petindex ); + + if( PetMailTotalnums < 0 ) PetMailTotalnums = 0; + { + char mesg[256]; + char *p = NULL; + p = CHAR_getChar( petindex, CHAR_USERPETNAME); + if( strlen( p) == 0 ) { + p = CHAR_getChar( petindex, CHAR_NAME); + } + snprintf( mesg,sizeof(mesg), "拾回邮件宠物 %s", p); + CHAR_talkToCli(charaindex,-1,mesg,CHAR_COLORYELLOW); + } + LogPet( + CHAR_getChar( charaindex, CHAR_NAME ), + CHAR_getChar( charaindex, CHAR_CDKEY ), + CHAR_getChar( petindex, CHAR_NAME), + CHAR_getInt( petindex, CHAR_LV), + "PickupMailPet(自动收回邮宠)", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + CHAR_getChar( petindex, CHAR_UNIQUECODE) + ); + return; +} +#endif + +int PETMAIL_getPetMailTotalnums() +{ +#ifdef _PETMAIL_DEFNUMS + if( PetMailTotalnums < 0 ) PetMailTotalnums = 0; + if( PetMailTotalnums >= PETMAIL_DEFTOTALNUM ) PetMailTotalnums = PETMAIL_DEFTOTALNUM; + return PetMailTotalnums; +#else + return 0; +#endif +} + +void PETMAIL_delPetMailTotalnums( int numflg) +{ +#ifdef _PETMAIL_DEFNUMS + PetMailTotalnums = PetMailTotalnums - numflg; + if( PetMailTotalnums < 0 ) PetMailTotalnums = 0; +#endif +} + +void PETMAIL_setPetMailTotalnums( int numflg) +{ + PetMailTotalnums = numflg; + if( PetMailTotalnums < 0 ) PetMailTotalnums = 0; + if( PetMailTotalnums > PETMAIL_DEFTOTALNUM+10 ) PetMailTotalnums = PETMAIL_DEFTOTALNUM + 5; +} + + +int PETMAIL_CheckIsMyOffmsg( int fromindex, char *tocdkey, char *tocharaname) +{ + int i, nums=0; + for( i = 0 ; i < PETMAIL_offmsg_max; i++ ) { + if( PETMAIL_offmsgbuf[i].use == 0 ) continue; + if( !strcmp( tocdkey, PETMAIL_offmsgbuf[i].destcd) && + !strcmp( tocharaname, PETMAIL_offmsgbuf[i].destcharname) ){ + nums++; + } + } + return nums; +} + + + diff --git a/gmsv/char/skill.c b/gmsv/char/skill.c new file mode 100644 index 0000000..61eee63 --- /dev/null +++ b/gmsv/char/skill.c @@ -0,0 +1,645 @@ +#include "version.h" +#include +#include +#include + +#include "skill.h" +#include "util.h" +#include "char.h" + +#ifdef _CHAR_PROFESSION // WON ADD 人物职业 +#include "battle.h" +#include "profession_skill.h" +#endif + + +static SKILL_intDataSetting SKILL_setint[SKILL_DATAINTNUM]={ + {"lv"}, /* SKILL_LEVEL */ + {"id"}, /* SKILL_ID */ +}; + +static SKILL_charDataSetting SKILL_setchar[SKILL_DATACHARNUM]={ +}; + + + + +static char SKILL_dataString[STRINGBUFSIZ]; + +char* SKILL_makeStringFromSkillData( Skill* sk ) +{ + int i; + int strlength=0; + + for( i = 0 ; i < SKILL_DATAINTNUM ; i ++ ){ + char linedata[128]; + snprintf( linedata , sizeof(linedata), + "%s=%d" NONCHAR_DELIMITER, + SKILL_setint[i].dumpskill, sk->data[i] ); + + strcpysafe( &SKILL_dataString[strlength], + sizeof( SKILL_dataString ) - strlength, + linedata ); + strlength += strlen( linedata ); + if( strlength > sizeof( SKILL_dataString ) )goto RETURN; + } + + for( i = 0 ; i < SKILL_DATACHARNUM ; i ++ ){ + char linedata[128]; + char escapebuffer[128]; + snprintf( linedata, sizeof(linedata), + "%s=%s" NONCHAR_DELIMITER, + SKILL_setchar[i].dumpskill, + makeEscapeString(sk->string[i].string,escapebuffer, + sizeof(escapebuffer))); + + strcpysafe( &SKILL_dataString[strlength], + sizeof( SKILL_dataString ) - strlength, + linedata ); + strlength += strlen( linedata ); + if( strlength > sizeof( SKILL_dataString ) )goto RETURN; + } + +RETURN: + dchop( SKILL_dataString , NONCHAR_DELIMITER ); + + return SKILL_dataString; +} + + +BOOL SKILL_makeSkillFromStringToArg( char* src, Skill* sk ) +{ + int readindex=1; + while( 1 ){ + BOOL ret; + char linebuf[512]; + char first[256]; + char second[256]; + int i; + + + ret = getStringFromIndexWithDelim( src ,NONCHAR_DELIMITER , + readindex, + linebuf, sizeof( linebuf ) ); + if( ret == FALSE ) + break; + + ret = getStringFromIndexWithDelim( linebuf ,"=", 1, + first, sizeof( first ) ); + if( ret == FALSE ) return FALSE; + strcpysafe( second , sizeof( second ), + linebuf + strlen(first) + strlen("=") ); + + for( i = 0 ; i < SKILL_DATAINTNUM ; i ++ ){ + if( strcmp(first ,SKILL_setint[i].dumpskill) == 0 ){ + sk->data[i] = atoi( second ); + goto NEXT; + } + } + + for( i = 0 ; i < SKILL_DATACHARNUM ; i ++ ){ + if( strcmp(first ,SKILL_setchar[i].dumpskill) == 0 ){ + strcpysafe( sk->string[i].string, + sizeof(sk->string[i].string), + makeStringFromEscaped(second) ); + goto NEXT; + } + } + + fprint( "??? : %s[%s]\n" , linebuf, first ); + + NEXT: + readindex++; + } + + return TRUE; +} + +#ifdef _CHAR_PROFESSION // WON ADD 人物职业 +INLINE int SKILL_getRealInt( Skill* skill, int element) +{ + return skill->data[element]; +} +#endif + +INLINE int SKILL_getInt( Skill* skill, int element) +{ + int value = skill->data[element]; + + if( element == SKILL_LEVEL ) value /= 100; + + return value; +} + + +INLINE int SKILL_setInt( Skill* skill, int element, int new) +{ + int buf = SKILL_getInt( skill, element ); + skill->data[element] = new; + return buf; +} + +#ifndef _PROFESSION_SKILL // WON ADD 人物职业技能 +static void SKILL_setitemlimit( int charaindex, Skill* sk ); +static void SKILL_setmerchant( int charaindex, Skill* sk ); +static void SKILL_setlevel( int charaindex, Skill* sk ); +#endif + +static SKILL_table SKILL_tbl[]={ + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + { 100, NULL}, // 1 + { 100, NULL}, + { 100, NULL}, + { 100, NULL}, + { 100, NULL}, + { 100, NULL}, + { 100, NULL}, + { 100, NULL}, + { 100, NULL}, + { 100, NULL}, + { 100, NULL}, + { 100, NULL}, + { 100, NULL}, + { 100, NULL}, + { 100, NULL}, + { 100, NULL}, // 16 +#else + {8,SKILL_setlevel}, /* SKILL_FIRE */ + {4,NULL}, /* SKILL_MAGICIAN */ + {4,NULL}, /* SKILL_PREIST */ + {8,SKILL_setitemlimit}, /* SKILL_ALOTOFTHINGS */ + {8,NULL}, /* SKILL_AVOIDRATEUP */ + {4,SKILL_setlevel}, /* SKILL_DETERMINEITEM */ + {5,SKILL_setlevel}, /* SKILL_DETERMINEOTHERS */ + {8,SKILL_setmerchant}, /* SKILL_MERCHANT */ + {8,SKILL_setlevel}, /* SKILL_HEALER */ + {8,SKILL_setlevel}, /* SKILL_LARGEVOICE */ +#endif +}; + + +#ifndef _PROFESSION_SKILL // WON ADD 人物职业技能 +static void SKILL_setitemlimit( int charaindex, Skill* sk ) +{ + static int itemlimit[9]={ + 7 + 8 + 4*0, + 7 + 8 + 4*1, + 7 + 8 + 4*2, + 7 + 8 + 4*3, + 7 + 8 + 4*4, + 7 + 8 + 4*5, + 7 + 8 + 4*6, + 7 + 8 + 4*7, + 7 + 8 + 4*8, + }; + int level; + if( !CHAR_CHECKINDEX(charaindex) )return; + if( sk->data[SKILL_IDENTITY] != SKILL_ALOTOFTHINGS )return; + level = sk->data[SKILL_LEVEL]; + if( level < 0 )level = 0; + if( level>=arraysizeof(itemlimit) ) level=arraysizeof(itemlimit) - 1; +} + + +static void SKILL_setmerchant( int charaindex, Skill* sk ) +{ + int level; + int merchantlevel=0; + + if( !CHAR_CHECKINDEX(charaindex) )return; + if( sk->data[SKILL_IDENTITY] != SKILL_MERCHANT )return; + + level = sk->data[SKILL_LEVEL]; + if( level < 0 )level = 0; + if( level >= SKILL_tbl[sk->data[SKILL_IDENTITY]].maxlevel ) + level = SKILL_tbl[sk->data[SKILL_IDENTITY]].maxlevel; + + SETHIGHVALUE(merchantlevel,(100 - level*5)); + SETLOWVALUE(merchantlevel,(20 + level*5)); + + CHAR_setInt( charaindex,CHAR_MERCHANTLEVEL,merchantlevel ); +} + + +static void SKILL_setlevel( int charaindex, Skill* sk ) +{ + static struct skillvalset + { + SKILL_ID id; + CHAR_DATAINT charadataindex; + } skvalset[] = { + { SKILL_DETERMINEITEM, CHAR_DETERMINEITEM }, + { SKILL_DETERMINEOTHERS, CHAR_RADARSTRENGTH }, + { SKILL_HEALER, CHAR_HEALERLEVEL }, + { SKILL_LARGEVOICE, CHAR_CHATVOLUME }, + }; + int id; + int i; + int index=-1; + int level; + + if( !CHAR_CHECKINDEX(charaindex) )return; + id = sk->data[SKILL_IDENTITY]; + for( i=0 ; idata[SKILL_LEVEL]; + if( level < 0 )level = 0; + if( level >= SKILL_tbl[id].maxlevel ) + level = SKILL_tbl[id].maxlevel; + + CHAR_setInt(charaindex,skvalset[index].charadataindex,level ); +} +#endif + + + + + +#define SKILLSTRINGBUFSIZ 256 + +static char ITEM_statusStringBuffer[SKILLSTRINGBUFSIZ]; + + +#ifdef _CHAR_PROFESSION // WON ADD 人物职业 +char* SKILL_makeSkillStatusString( Skill* skill, int charaindex, int skill_num ) +{ + int skillindex=SKILL_getInt( skill,SKILL_IDENTITY); + int Pskill=PROFESSION_SKILL_getskillArray( skillindex); + int skill_level=0, cost_mp=0; + + // 人物技能等级 + skill_level = SKILL_getInt( skill, SKILL_LEVEL); + + // 耗费MP + if( (cost_mp = PROFESSION_MAGIC_COST_MP( charaindex, skill_num )) == -1 ) + cost_mp = PROFESSION_SKILL_getInt( Pskill, PROFESSION_SKILL_COST_MP); + + snprintf( ITEM_statusStringBuffer, sizeof( ITEM_statusStringBuffer ), + "%d|%d|%d|%d|%d|%d|%d|%s|%s", + PROFESSION_SKILL_getInt( Pskill, PROFESSION_SKILL_USE_FLAG), + SKILL_getInt(skill,SKILL_IDENTITY), + PROFESSION_SKILL_getInt( Pskill, PROFESSION_SKILL_TARGET), + PROFESSION_SKILL_getInt( Pskill, PROFESSION_SKILL_KIND), + PROFESSION_SKILL_getInt( Pskill, PROFESSION_SKILL_ICON), + cost_mp, + skill_level, + PROFESSION_SKILL_getChar( Pskill, PROFESSION_SKILL_NAME), + PROFESSION_SKILL_getChar( Pskill, PROFESSION_SKILL_TXT) ); + + + return ITEM_statusStringBuffer; +} +#else +char* SKILL_makeSkillStatusString( Skill* skill ) +{ + snprintf( ITEM_statusStringBuffer, + sizeof( ITEM_statusStringBuffer ), + "%d|%d", + SKILL_getInt(skill,SKILL_IDENTITY), + SKILL_getInt(skill,SKILL_LEVEL) ); + + + return ITEM_statusStringBuffer; +} +#endif + + + +char* SKILL_makeSkillFalseString( void ) +{ + snprintf( ITEM_statusStringBuffer, + sizeof( ITEM_statusStringBuffer ), + "|" ); + return ITEM_statusStringBuffer; +} + + +BOOL SKILL_CHECKID( int skillid ) +{ + if( SKILL_NUM <= skillid && skillid > 0 )return FALSE; + return TRUE; +} + +BOOL SKILL_makeSkillData( Skill* sk ,int skid, int lev ) +{ + sk->data[SKILL_LEVEL] = lev; + sk->data[SKILL_IDENTITY] = skid; + + return TRUE; +} + +int SKILL_levelup( Skill* sk ) +{ + int id = sk->data[SKILL_IDENTITY]; + if( !SKILL_CHECKID(id) )return -1; + sk->data[SKILL_LEVEL] ++; + sk->data[SKILL_LEVEL] = min( sk->data[SKILL_LEVEL], + SKILL_tbl[id].maxlevel ); + return TRUE; +} + +int SKILL_getLevelFromSkillID( int charaindex, SKILL_ID id ) +{ + int i; + if( !CHAR_CHECKINDEX(charaindex) )return -1; + for( i=0 ; iuse && sk->skill.data[SKILL_IDENTITY] == id ) + return sk->skill.data[SKILL_LEVEL]; + + } + return -1; +} + +BOOL SKILL_getUpableSkillID( int charaindex,char* buf, int buflen ) +{ + int i; + if( !CHAR_CHECKINDEX(charaindex)) return FALSE; + if( buflen <= 0 )return FALSE; + buf[0] = '\0'; + for( i=0 ; iuse + && SKILL_CHECKID(chsk->skill.data[SKILL_IDENTITY]) + && chsk->skill.data[SKILL_LEVEL] + < SKILL_tbl[chsk->skill.data[SKILL_IDENTITY]].maxlevel ){ + char tmpbuf[512]; + snprintf( tmpbuf,sizeof(tmpbuf),"%d|", + chsk->skill.data[SKILL_IDENTITY] ); + strcatsafe( buf, buflen,tmpbuf ); + } + } + dchop(buf,"|"); + return TRUE; +} + +void SKILL_skillEffect( int charaindex ) +{ + int i; + if( !CHAR_CHECKINDEX(charaindex) )return; + + if( CHAR_getInt(charaindex,CHAR_WHICHTYPE) != CHAR_TYPEPLAYER) + return; + + for( i=0 ; iuse == FALSE )continue; + + skill = &cskill->skill; + id = skill->data[SKILL_IDENTITY]; + if( !SKILL_CHECKID(id) )continue; + + skfunc = (SKILLEFFECTFUNC)SKILL_tbl[id].effectfunc; + if( skfunc )skfunc(charaindex,skill); + } +} + + + +#ifdef _CHAR_PROFESSION // WON ADD 人物职业 +// 取使用魔法耗费MP +int PROFESSION_MAGIC_COST_MP( int charaindex, int skill_num ) +{ + int skill_level=0, dec_mp=0; + int Pskillid, skillid; + char *skill_name; + CHAR_HaveSkill* hskill; + + // 人物技能 + skillid = CHAR_getCharSkill( charaindex, skill_num); + Pskillid = PROFESSION_SKILL_getskillArray( skillid); + if( Pskillid == -1 ) return FALSE; + + // 技能名称 + skill_name = PROFESSION_SKILL_getChar( Pskillid, PROFESSION_SKILL_FUNCNAME); + + // 技能等级 + hskill = CHAR_getCharHaveSkill( charaindex, skill_num ); + skill_level = SKILL_getInt( &hskill->skill, SKILL_LEVEL); + skill_level = PROFESSION_CHANGE_SKILL_LEVEL_M( skill_level ); + + if( (strcmp( skill_name, "PROFESSION_VOLCANO_SPRINGS" )) == 0 ){ // 火山泉 + if( skill_level >= 10 ) dec_mp = 35; + else if( skill_level >= 7 ) dec_mp = 30; + else if( skill_level >= 5 ) dec_mp = 20; + else if( skill_level >= 3 ) dec_mp = 15; + else dec_mp = 10; + }else + if( (strcmp( skill_name, "PROFESSION_FIRE_BALL" )) == 0 ){ // 火星球 + if( skill_level >= 9 ) dec_mp = 50; + else if( skill_level >= 7 ) dec_mp = 45; + else if( skill_level >= 5 ) dec_mp = 40; + else if( skill_level >= 3 ) dec_mp = 35; + else dec_mp = 30; + }else + if( (strcmp( skill_name, "PROFESSION_SUMMON_THUNDER" )) == 0 ){ // 召雷术 + if( skill_level >= 8 ) dec_mp = 30; + else if( skill_level >= 5 ) dec_mp = 25; + else if( skill_level >= 3) dec_mp = 20; + else dec_mp = 10; + }else + if( (strcmp( skill_name, "PROFESSION_CURRENT" )) == 0 ){ // 电流术 +#ifdef _PROFESSION_ADDSKILL + if( skill_level >= 10 ) dec_mp = 100; + else if( skill_level > 9 ) dec_mp = 90; + else if( skill_level > 8 ) dec_mp = 80; + else if( skill_level > 7 ) dec_mp = 70; + else if( skill_level > 6 ) dec_mp = 60; + else if( skill_level > 4 ) dec_mp = 50; + else if( skill_level > 2 ) dec_mp = 40; + else dec_mp = 30; +#else + if( skill_level >= 9 ) dec_mp = 80; + else if( skill_level >= 7 ) dec_mp = 60; + else if( skill_level >= 5 ) dec_mp = 50; + else if( skill_level >= 3 ) dec_mp = 40; + else dec_mp = 30; +#endif + }else + if( (strcmp( skill_name, "PROFESSION_STORM" )) == 0 ){ // 暴风雨 +#ifdef _PROFESSION_ADDSKILL + if( skill_level > 8 ) dec_mp = 50; + else if( skill_level > 6 ) dec_mp = 45; + else if( skill_level > 4 ) dec_mp = 40; + else if( skill_level > 2 ) dec_mp = 35; + else dec_mp = 30; +#else + if( skill_level >= 10 ) dec_mp = 80; + else if( skill_level >= 6 ) dec_mp = 70; + else if( skill_level >= 5 ) dec_mp = 60; + else dec_mp = 50; +#endif + }else + if( (strcmp( skill_name, "PROFESSION_ICE_ARROW" )) == 0 ){ // 冰箭术 + if( skill_level >= 8) dec_mp = 20; + else if( skill_level >= 4 ) dec_mp = 15; + else dec_mp = 10; + }else + if( (strcmp( skill_name, "PROFESSION_ICE_CRACK" )) == 0 ){ // 冰爆术 +#ifdef _PROFESSION_ADDSKILL + if( skill_level >= 10 ) dec_mp = 80; + else if( skill_level > 8 ) dec_mp = 70; + else if( skill_level > 6 ) dec_mp = 60; + else if( skill_level > 4 ) dec_mp = 50; + else if( skill_level > 2 ) dec_mp = 40; + else dec_mp = 30; +#else + if( skill_level >= 9 ) dec_mp = 70; + else if( skill_level >= 7 ) dec_mp = 60; + else if( skill_level >= 5 ) dec_mp = 50; + else if( skill_level >= 3 ) dec_mp = 40; + else dec_mp = 30; +#endif + }else + if( (strcmp( skill_name, "PROFESSION_DOOM" )) == 0 ){ // 世界末日 + if( skill_level > 8 ) dec_mp = 150; + else if( skill_level > 4 ) dec_mp = 100; + else dec_mp = 50; + }else + if( (strcmp( skill_name, "PROFESSION_FIRE_SPEAR" )) == 0 ){ // 火龙枪 + if( skill_level > 8 ) dec_mp = 80; + else if( skill_level > 6 ) dec_mp = 70; + else if( skill_level > 4 ) dec_mp = 60; + else if( skill_level > 2 ) dec_mp = 40; + else dec_mp = 30; + }else + if( (strcmp( skill_name, "PROFESSION_BLOOD_WORMS" )) == 0 ){ // 嗜血蛊 + if( skill_level >= 10 ) dec_mp = 15; + else if( skill_level >= 5 ) dec_mp = 10; + else dec_mp = 5; + }else + if( (strcmp( skill_name, "PROFESSION_SIGN" )) == 0 ){ // 一针见血 + + if( skill_level >= 8 ) dec_mp = 10; + else dec_mp = 5; + + }else + if( (strcmp( skill_name, "PROFESSION_ENCLOSE" )) == 0 ){ // 附身术 + if( skill_level >= 10 ) dec_mp = 80; + else if( skill_level >= 8 ) dec_mp = 70; + else if( skill_level >= 5) dec_mp = 60; + else dec_mp = 50; + }else + if( (strcmp( skill_name, "PROFESSION_ICE_MIRROR" )) == 0 ){ // 冰镜术 + if( skill_level >= 9 ) dec_mp = 40; + else if( skill_level >= 7 ) dec_mp = 35; + else if( skill_level >= 5 ) dec_mp = 30; + else if( skill_level >= 3 ) dec_mp = 25; + else dec_mp = 20; + }else + if( (strcmp( skill_name, "PROFESSION_FIRE_ENCLOSE" )) == 0 ){ // 火附体 + if( skill_level >= 10 ) dec_mp = 50; + else if( skill_level >= 7 ) dec_mp = 40; + else if( skill_level >= 4 ) dec_mp = 30; + else dec_mp = 20; + }else + if( (strcmp( skill_name, "PROFESSION_ICE_ENCLOSE" )) == 0 ){ // 冰附体 + if( skill_level >= 10 ) dec_mp = 50; + else if( skill_level >= 7 ) dec_mp = 40; + else if( skill_level >= 4 ) dec_mp = 30; + else dec_mp = 20; + }else + if( (strcmp( skill_name, "PROFESSION_THUNDER_ENCLOSE" )) == 0 ){ // 雷附体 + if( skill_level >= 10 ) dec_mp = 50; + else if( skill_level >= 7 ) dec_mp = 40; + else if( skill_level >= 4 ) dec_mp = 30; + else dec_mp = 20; + }else + if( (strcmp( skill_name, "PROFESSION_TRANSPOSE" )) == 0 ){ // 移形换位 + if( skill_level >= 10 ) dec_mp = 50; + else if( skill_level >= 9 ) dec_mp = 40; + else if( skill_level >= 7 ) dec_mp = 30; + else if( skill_level >= 4 ) dec_mp = 20; + else dec_mp = 10; + }else +#ifdef _PROFESSION_ADDSKILL + if( (strcmp( skill_name, "PROFESSION_RESIST_F_I_T" )) == 0 ){ // 自然威能 + if( skill_level >= 10 ) dec_mp = 20; + else if( skill_level >= 9 ) dec_mp = 15; + else if( skill_level >= 6 ) dec_mp = 10; + else dec_mp = 5; + }else + if( (strcmp( skill_name, "PROFESSION_CALL_NATURE" )) == 0 ){ // 号召自然 + + /*skill_level = SKILL_getInt( &hskill->skill, SKILL_LEVEL); + if( skill_level >= 100 ) dec_mp = 50; + else if( skill_level > 95 ) dec_mp = 50; + else if( skill_level > 90 ) dec_mp = 50; + else if( skill_level > 85 ) dec_mp = 50; + else if( skill_level > 80 ) dec_mp = 50; + else if( skill_level > 60 ) dec_mp = 50; + else if( skill_level > 40 ) dec_mp = 50; + else if( skill_level > 20 ) dec_mp = 50; + else dec_mp = 50;*/ + dec_mp = 50; + }else + if( (strcmp( skill_name, "PROFESSION_BOUNDARY" )) == 0 ){ // 四属性结界 + char *pszP=NULL; + if( skill_level > 9 ) dec_mp = 20; + else if( skill_level > 6 ) dec_mp = 15; + else dec_mp = 10; + //破除结界耗损mp与其他结界不同 + if( (pszP = strstr( PROFESSION_SKILL_getChar( Pskillid, PROFESSION_SKILL_OPTION), "破结界" ) ) != NULL ){// 技能的参数 + if( skill_level >= 9 ) dec_mp = 20; + else if( skill_level > 4 ) dec_mp = 15; + else if( skill_level > 2 ) dec_mp = 10; + else dec_mp = 5; + } + }else +#endif + { + return -1; + } + + return dec_mp; +} + + +INLINE int PROFESSION_CHANGE_SKILL_LEVEL_M( int skill_level ) +{ + if( skill_level > 90 )skill_level = 10; + else if( skill_level > 80 ) skill_level = 9; + else if( skill_level > 70 ) skill_level = 8; + else if( skill_level > 60 ) skill_level = 7; + else if( skill_level > 50 ) skill_level = 6; + else if( skill_level > 40 ) skill_level = 5; + else if( skill_level > 30 ) skill_level = 4; + else if( skill_level > 20 ) skill_level = 3; + else if( skill_level > 10 ) skill_level = 2; + else skill_level = 1; + + return skill_level; +} + + +INLINE int PROFESSION_CHANGE_SKILL_LEVEL_A( int skill_level ) +{ + if( skill_level >= 100 ) skill_level = 10; + else if( skill_level > 90 ) skill_level = 9; + else if( skill_level > 80 ) skill_level = 8; + else if( skill_level > 70 ) skill_level = 7; + else if( skill_level > 60 ) skill_level = 6; + else if( skill_level > 50 ) skill_level = 5; + else if( skill_level > 40 ) skill_level = 4; + else if( skill_level > 30 ) skill_level = 3; + else if( skill_level > 20 ) skill_level = 2; + else if( skill_level > 10 ) skill_level = 1; + else skill_level = 0; + + return skill_level; +} +#endif + diff --git a/gmsv/char/title.c b/gmsv/char/title.c new file mode 100644 index 0000000..ce08969 --- /dev/null +++ b/gmsv/char/title.c @@ -0,0 +1,1083 @@ +#include "version.h" +#include +#include +#include +#include +#ifdef _REDHAT_V9 +#include +#endif + +#include "title.h" +#include "char.h" +#include "char_base.h" +#include "item.h" +#include "skill.h" +#include "buf.h" +#include "util.h" +#include "configfile.h" + + +/*====================惫寞 ====================*/ +static int TITLE_IntCheck( int charaindex,int elem, int *data, int flg); +static int TITLE_WorkIntCheck( int charaindex,int elem, int *data, int flg); +static int TITLE_ItemCheck( int charaindex,int elem, int *data, int flg); +static int TITLE_ItemEquipCheck( int charaindex,int elem, int *data, int flg); +static int TITLE_SkillCheck( int charaindex,int elem, int *data, int flg); +static int TITLE_SexCheck( int charaindex,int elem, int *data, int flg); + +typedef enum +{ + TITLE_FUNCTYPENONE, /* 楮醒戏岳仄卅中 */ + TITLE_FUNCTYPEUSERFUNC, /* definefunction 毛银匀化 蟆毛综月 + * 楮醒及娄醒反 + * int 平乓仿奶件犯永弁旦 + * buf 蟆尺及田永白央 + * buflen 公及田永白央及赢今 + */ + TITLE_USEFUNCTYPENUM +}TITLE_USEFUNCTYPE; + +typedef struct tagTITLE_Table +{ + int index; /* 蛙犯□正午询晶毛潸月凶户[ + * 仇及 寞匹手匀化addtitle午井支月 + */ + char name[32]; + TITLE_USEFUNCTYPE functype; + void (*definefunction)(int,char* buf,int buflen); +}TITLE_Table; + +/* 银尹月由仿丢□正 + * STR,TGH,MAXMP]ATK,DEF + * LEVEL,CLASS,SKILL,ITEM,FIREREG,ICEREG,THUNDERREG + * KANJILV,TALKCNT,WALKCNT,DEADCNT,LOGINCNT,BASEIMAGENUMBER + * GOLD +*/ +typedef struct tagTITLE_Compare { + char compare[8];; +} TITLE_COMPARE; + +TITLE_COMPARE TITLE_compare[] = { {"<="}, {">="},{"<>"}, {">"},{"<"},{"="}}; + +typedef struct tagTITLE_PARAM +{ + int element; + int (*checkfunc)( int charaindex,int elem, int *data, int flg ); + char *paramname; +}TITLE_PARAM; + +TITLE_PARAM TITLE_param[] = +{ + /**** 仇仇井日 ****/ + { -1, TITLE_ItemCheck, "ITEM" }, + { -1, TITLE_ItemEquipCheck,"EQUIPITEM" }, + { -1, NULL, "EQUIPEVENT" }, + /**** 仇仇引匹反 凳仄卅中匹仁分今中[ ****/ + { -1, TITLE_SkillCheck, "SKILL" }, + { CHAR_STR, TITLE_IntCheck, "STR" }, + { CHAR_TOUGH, TITLE_IntCheck, "TGH" }, + { CHAR_MAXMP, TITLE_IntCheck, "MAXMP" }, + { CHAR_WORKFIXSTR, TITLE_WorkIntCheck, "ATK" }, + { CHAR_WORKFIXTOUGH, TITLE_WorkIntCheck, "DEF" }, + { CHAR_LV, TITLE_IntCheck, "LEVEL" }, + { CHAR_TALKCOUNT, TITLE_IntCheck, "TALKCNT" }, + { CHAR_WALKCOUNT, TITLE_IntCheck, "WALKCNT" }, + { CHAR_DEADCOUNT, TITLE_IntCheck, "DEADCNT" }, + { CHAR_LOGINCOUNT, TITLE_IntCheck, "LOGINCNT" }, + { CHAR_BASEBASEIMAGENUMBER,TITLE_IntCheck, "BASEIMAGENUMBER" }, + { CHAR_GOLD, TITLE_IntCheck, "GOLD" }, + { -1, TITLE_SexCheck, "SEX" }, +}; + +#define TITLE_PARAMSIZE 20 +typedef struct tagTITLE_configTable +{ + int paramindex[20]; /* TITLE_param尺及骄侬 */ + int param[20][TITLE_PARAMSIZE]; /* 笠袄 */ + int compareflg[20]; /* ><=羁升丹允月井 */ + int title; + BOOL equipcheckflg; /* + * 失奶 丞啖 奶矛件玄匹反仇及白仿弘及 匀化中月 + * 手及仄井腹绸仄卅中[ + */ +}TITLE_CONFIGTABLE; + +typedef struct tagTITLE_configbuf +{ + int title; + int flg; +}TITLE_CONFIGBUF; + +static TITLE_CONFIGTABLE *TITLE_ConfigTable; +static TITLE_Table *TITLE_table; +static TITLE_CONFIGBUF *TITLE_configbuf; +static int TITLE_titlenum; +static int TITLE_titlecfgnum; + +/*------------------------------------------------------------ + * index 寞井日TITLE_table及骄侬毛 月 + ------------------------------------------------------------*/ +int TITLE_getTitleIndex( int index) +{ + int i; + if( index < 0 ) return -1; + for( i = 0; i < TITLE_titlenum; i ++ ) { + if( TITLE_table[i].index == index ) { + return( i); + } + } + return -1; +} + +/* 田永白央及扔奶术 */ +#define TITLESTRINGBUFSIZ 256 +/* 弁仿奶失件玄卞苇六月旦平伙犯□正及 侬 及田永白央 */ +static char TITLE_statusStringBuffer[TITLESTRINGBUFSIZ]; +/*------------------------------------------------------------ + * 弁仿奶失件玄卞苇六月惫寞及 侬 毛综月 + * 娄醒 + * title Title* 旦平伙 + * charaindex int 仇及惫寞毛 匀化中月平乓仿及奶件犯永弁旦 + * 忒曰袄 + * char* + ------------------------------------------------------------*/ +char* TITLE_makeTitleStatusString( int charaindex,int havetitleindex ) +{ + int attach; + int index; + /* 楮醒 尺及奶件犯永弁旦井日犯□正毛综岳允月 */ + index = CHAR_getCharHaveTitle( charaindex,havetitleindex ); +#if 0 + if( TITLE_CHECKTABLEINDEX( index ) == FALSE ){ + TITLE_statusStringBuffer[0] = '\0'; + return TITLE_statusStringBuffer; + } +#endif + attach = TITLE_getTitleIndex( index); + if( attach == -1 ) { + TITLE_statusStringBuffer[0] = '\0'; + return TITLE_statusStringBuffer; + } + switch( TITLE_table[attach].functype ){ + case TITLE_FUNCTYPENONE: + snprintf( TITLE_statusStringBuffer, + sizeof(TITLE_statusStringBuffer ),"%s" , + TITLE_table[attach].name ); + break; + + case TITLE_FUNCTYPEUSERFUNC: + { + char string[256]={""}; + void (*function)(int,char* buf,int buflen); + function = TITLE_table[attach].definefunction; + if( function ) + function( charaindex,string,sizeof(string) ); + + strcpysafe( TITLE_statusStringBuffer, + sizeof(TITLE_statusStringBuffer ),string ); + } + break; + default: + TITLE_statusStringBuffer[0] = '\0'; + return TITLE_statusStringBuffer; + break; + } + return TITLE_statusStringBuffer; +} + +/*------------------------------------------------------------ + * 卅中惫寞及 侬 犯□正毛忒允 + * 娄醒 + * 卅仄 + * 忒曰袄 + * char* + ------------------------------------------------------------*/ +char* TITLE_makeSkillFalseString( void ) +{ + TITLE_statusStringBuffer[0]= '\0'; + return TITLE_statusStringBuffer; +} + + +/*------------------------------------------------------------ + * 隙烂今木凶 寞及惫寞毛馨笛允月[褐今卅匀化中凶日}馨笛仄卅中 + * 娄醒 + * charaindex int 平乓仿奶件犯永弁旦 + * titleindex int 惫寞奶件犯永弁旦 + * 忒曰袄 + * 馨笛仄凶index + * 馨笛仄卅井匀凶 FALSE(0) + ------------------------------------------------------------*/ +BOOL TITLE_addtitle( int charaindex, int titleindex ) +{ + int i; + int firstfindempty=-1; + + if( CHAR_CHECKINDEX(charaindex) == FALSE )return FALSE; + /*if( TITLE_CHECKTABLEINDEX(titleindex) == FALSE )return FALSE;*/ + if( TITLE_getTitleIndex( titleindex) == -1 ) return FALSE; + + for( i=0 ; i < CHAR_TITLEMAXHAVE ; i++ ){ + if( CHAR_getCharHaveTitle( charaindex,i ) == titleindex ) + /* 允匹卞 匀化中月井日窒手仄卅中 */ + return FALSE; + if( firstfindempty == -1 + && CHAR_getCharHaveTitle(charaindex,i) == -1 ){ + firstfindempty = i; + } + } + return CHAR_setCharHaveTitle( charaindex,firstfindempty,titleindex ); +} + + +/*------------------------------------------------------------ + * 隙烂今木凶 寞及惫寞互丐匀凶日绰轮允月[卅井匀凶日窒手仄卅中[ + * 醒蜊丐匀凶日蝈 壅允[ + * 娄醒 + * charaindex int 平乓仿奶件犯永弁旦 + * titleindex int 惫寞奶件犯永弁旦 + * 忒曰袄 + * 绰轮仄凶 TRUE(1) + * 绰轮仄卅井匀凶 FALSE(0) + ------------------------------------------------------------*/ +BOOL TITLE_deltitle( int charaindex, int titleindex ) +{ + int i; + BOOL del=FALSE; + int index; + if( CHAR_CHECKINDEX(charaindex) == FALSE )return FALSE; + /*if( TITLE_CHECKTABLEINDEX(titleindex) == FALSE )return FALSE;*/ + index = TITLE_getTitleIndex( titleindex); + if( index == -1 ) return FALSE; + + for( i=0 ; i < CHAR_TITLEMAXHAVE ; i++ ) + if( CHAR_getCharHaveTitle( charaindex,i ) == titleindex ){ + /* 愤坌互银匀化中凶支勾卅日壬}公木手卅仄卞允月 */ + if( CHAR_getInt(charaindex, CHAR_INDEXOFEQTITLE) == i ){ + CHAR_setInt(charaindex, CHAR_INDEXOFEQTITLE, -1 ); + } + /* 匀化中月井日壅允 */ + CHAR_setCharHaveTitle( charaindex,i,-1); + + del = TRUE; + } + + return del; +} +/*------------------------------------------------------------ + * 惫寞及赓渝祭毛允月[ + * 娄醒 + * filename char* 涩烂白央奶伙 + * 忒曰袄 + * 岳 TRUE(1) + * 撩 FALSE(0) + *------------------------------------------------------------*/ +BOOL TITLE_initTitleName( char* filename ) +{ + FILE* f; + char line[256]; + int linenum=0; + int title_readlen=0; + + f = fopen(filename,"r"); + if( f == NULL ){ + errorprint; + return FALSE; + } + + TITLE_titlenum=0; + + /* 引内 躲卅垫互窒垫丐月井升丹井譬屯月 */ + while( fgets( line, sizeof( line ), f ) ){ + linenum ++; + if( line[0] == '#' )continue; /* comment */ + if( line[0] == '\n' )continue; /* none */ + chomp( line ); + + TITLE_titlenum++; + } + + if( fseek( f, 0, SEEK_SET ) == -1 ){ + fprint( "寻找错误\n" ); + fclose(f); + return FALSE; + } + + TITLE_table = allocateMemory( sizeof(struct tagTITLE_Table) + * TITLE_titlenum ); + if( TITLE_table == NULL ){ + fprint( "无法分配内存 %d\n" , + sizeof(TITLE_table)*TITLE_titlenum); + fclose( f ); + return FALSE; + } + /* 赓渝祭 */ +{ + int i; + for( i = 0; i < TITLE_titlenum; i ++ ) { + TITLE_table[i].index = -1; + TITLE_table[i].name[0] = '\0'; + TITLE_table[i].functype = TITLE_FUNCTYPENONE; + TITLE_table[i].definefunction = NULL; + } + +} + + /* 引凶 心 允 */ + linenum = 0; + while( fgets( line, sizeof( line ), f ) ){ + linenum ++; + if( line[0] == '#' )continue; /* comment */ + if( line[0] == '\n' )continue; /* none */ + chomp( line ); + + /* 垫毛帮溥允月 */ + /* 引内 tab 毛 " " 卞 五晶尹月 */ + replaceString( line, '\t' , ' ' ); + /* 燮 及旦矢□旦毛潸月[*/ +{ + int i; + char buf[256]; + for( i = 0; i < strlen( line); i ++) { + if( line[i] != ' ' ) { + break; + } + strcpy( buf, &line[i]); + } + if( i != 0 ) { + strcpy( line, buf); + } +} +{ + char token[256]; + int ret; + + /* 夫午勾户及玄□弁件毛苇月 */ + ret = getStringFromIndexWithDelim( line,",",1,token, + sizeof(token)); + if( ret==FALSE ){ + fprint("文件语法错误:%s 第%d行\n",filename,linenum); + continue; + } + TITLE_table[title_readlen].index = atoi(token); + + /* 2勾户及玄□弁件毛苇月 */ + ret = getStringFromIndexWithDelim( line,",",2,token, + sizeof(token)); + if( ret==FALSE ){ + fprint("文件语法错误:%s 第%d行\n",filename,linenum); + continue; + } + if( strlen( token) > sizeof( TITLE_table[title_readlen].name)-1) { + fprint("警告! 头衔名称结束文件:%s 第%d行\n", + filename, linenum); + } + strcpysafe( TITLE_table[title_readlen].name, + sizeof( TITLE_table[title_readlen].name), + token); + + title_readlen ++; +} + } + fclose(f); + + TITLE_titlenum = title_readlen; + + print( "有效头衔名称数是 %d...", TITLE_titlenum ); + +#ifdef DEBUG + + { + int i; + for( i=0; i ="); + if( comppos == -1 ) { + fprint("文件语法错误:%s 第%d行\n",filename,linenum); + TITLE_initTitleData( titlecfg_readlen); + errflg = TRUE; + break;; + } + /* 羁寞]尕羁寞互ㄡ勾动晓 月午五 */ + if( charInclude( &token[comppos+1], "<>=") != -1 ) { + /* 升氏卅 胜井毛 戈 */ + for( j = 0; j < 3; j ++ ) { + if( memcmp( TITLE_compare[j].compare, &token[comppos], 2 ) == 0 ) { + break; + } + } + if( j == 3 ) { + fprint("文件语法错误:%s 第%d行\n",filename,linenum); + TITLE_initTitleData( titlecfg_readlen); + errflg = TRUE; + break; + } + else { + ret = TITLE_getParamData( titlecfg_readlen,i-1,&token[comppos+2]); + if( !ret ) { + fprint("文件语法错误:%s 第%d行\n",filename,linenum); + TITLE_initTitleData( titlecfg_readlen); + errflg = TRUE; + break; + } + + /*TITLE_ConfigTable[titlecfg_readlen].param[i-1] + = atoi( &token[comppos+2]);*/ + TITLE_ConfigTable[titlecfg_readlen].compareflg[i-1] = j; + } + } + else { + ret = TITLE_getParamData( titlecfg_readlen,i-1,&token[comppos+1]); + if( !ret ) { + fprint("文件语法错误:%s 第%d行\n",filename,linenum); + TITLE_initTitleData( titlecfg_readlen); + errflg = TRUE; + break; + } + /*TITLE_ConfigTable[titlecfg_readlen].param[i-1] + = atoi( &token[comppos+1]);*/ + /* 升氏卅 胜井毛 戈 */ + for( j = 3; j < 6; j ++ ) { + if( memcmp( TITLE_compare[j].compare, &token[comppos], 1 ) == 0 ) { + TITLE_ConfigTable[titlecfg_readlen].compareflg[i-1] = j; + break; + } + } + } + } + } + /* 惫寞 隙烂互 井匀凶 or 卅氏井仄日及巨仿□*/ + if( errflg || TITLE_ConfigTable[titlecfg_readlen].title == -1 ) { + fprint("文件语法错误:%s 第%d行\n",filename,linenum); + TITLE_initTitleData( titlecfg_readlen); + } + else { + titlecfg_readlen ++; + } +} + } + fclose(f); + + TITLE_titlecfgnum = titlecfg_readlen; + + print( "有效头衔配置数是 %d...", TITLE_titlecfgnum ); + +#if 0 + + { + int i, j; + for( i=0; i < TITLE_titlecfgnum ; i++ ) { + print( "头衔队列[%d]\n", i); + for( j = 0; + j < arraysizeof( TITLE_ConfigTable[i].param) && + TITLE_ConfigTable[i].param[j] != -1 ; + j ++ ) + { + print( "name[%s] data[%d] flg[%s] ", + TITLE_param[TITLE_ConfigTable[i].paramindex[j]].paramname, + TITLE_ConfigTable[i].param[j], + TITLE_compare[TITLE_ConfigTable[i].compareflg[j]].compare + ); + if( j %2 ==0 ) print( "\n"); + } + print( "\nTitleindex [%d] ",TITLE_ConfigTable[i].title); + print( "equipcheckflg [%d]\n",TITLE_ConfigTable[i].equipcheckflg); + } + } +#endif + return TRUE; +} +/*------------------------------------------------------------ + * 惫寞涩烂卞宁丹井譬屯化惫寞毛芨尹月[ + * 娄醒 + * charaindex int 平乓仿奶件犯永弁旦 + * mode BOOL TRUE:item=及手及及心譬屯月 FALSE:蝈 + * 忒曰袄 + * TRUE: 惫寞卞 祭 曰[ + * FALSE:窒手 井匀凶[ + *------------------------------------------------------------*/ +static BOOL TITLE_TitleCheck_Main( int charaindex, BOOL mode, int *addcnt, int *delcnt) +{ + int i, j,k, ret; + + /* 赓渝祭 */ +{ + int i; + for( i = 0; i < TITLE_titlecfgnum && TITLE_configbuf[i].title != -1; i ++ ) { + TITLE_configbuf[i].title = -1; + TITLE_configbuf[i].flg = 0; + } +} + *addcnt = 0; + *delcnt = 0; + + for( i = 0; i < TITLE_titlecfgnum; i ++ ) { + int rc = TRUE; + int title = TITLE_ConfigTable[i].title; + if( mode == TRUE ) { + if( TITLE_ConfigTable[i].equipcheckflg != TRUE ) { + continue; + } + } + for( j = 0; + j < arraysizeof( TITLE_ConfigTable[i].param) && + TITLE_ConfigTable[i].param[j][0] != -1 ; + j ++ ) + { + int index = TITLE_ConfigTable[i].paramindex[j]; + if( TITLE_param[index].checkfunc != NULL ) { + rc = TITLE_param[index].checkfunc( + charaindex, + TITLE_param[index].element, + TITLE_ConfigTable[i].param[j], + TITLE_ConfigTable[i].compareflg[j] + ); + if( rc != TRUE ) break; + } + } + /* 醒椭瘀卞 元惫寞互喃曰癫化日木化中月凛及啃卞] + * 域绎田永白央卞霪户化公及瑛绊井日add,deltile允月 + */ + for( k = 0; k < TITLE_titlecfgnum; k ++ ) { + if( TITLE_configbuf[k].title == title ) { + if( rc ) { + TITLE_configbuf[k].flg = 1; + } + break; + } + else if( TITLE_configbuf[k].title == -1 ) { + TITLE_configbuf[k].title = title; + TITLE_configbuf[k].flg = rc ? 1: -1; + break; + } + } + } + ret = FALSE; + for( i = 0; i < TITLE_titlecfgnum && TITLE_configbuf[i].title != -1; i ++ ) { + if( TITLE_configbuf[i].flg == -1 ) { + *delcnt += TITLE_deltitle( charaindex, TITLE_configbuf[i].title); + } + else { + *addcnt += TITLE_addtitle( charaindex, TITLE_configbuf[i].title) ? 1:0; + } + } + if( *delcnt > 0 || *addcnt > 0) { + ret = TRUE; + } + return ret; + +} +/*------------------------------------------------------------ + * 惫寞涩烂卞宁丹井譬屯化惫寞毛芨尹月[ + * 娄醒 + * charaindex int 平乓仿奶件犯永弁旦 + * mode BOOL TRUE:item=及手及及心譬屯月 FALSE:蝈 + * 忒曰袄 + * TRUE: 惫寞卞 祭 曰[ + * FALSE:窒手 井匀凶[ + *------------------------------------------------------------*/ +BOOL TITLE_TitleCheck( int charaindex, BOOL mode) +{ +#define TITLE_MSGUNIT1 "TSU" +#define TITLE_MSGUNIT2 "KO" + int addcnt,delcnt; + BOOL rc; + char msgbuf[64]; + rc = TITLE_TitleCheck_Main( charaindex, mode, &addcnt,&delcnt); + if( rc ) { + if( delcnt > 0 ) { + snprintf( msgbuf, sizeof( msgbuf), + "失去%d%s 称号!", delcnt, + delcnt < 10 ? TITLE_MSGUNIT1:TITLE_MSGUNIT2); + CHAR_talkToCli( charaindex, -1, msgbuf, CHAR_COLORYELLOW); + } + if( addcnt > 0 ) { + snprintf( msgbuf, sizeof( msgbuf), + "获得%d%s 称号!", addcnt, + addcnt < 10 ? TITLE_MSGUNIT1:TITLE_MSGUNIT2); + CHAR_talkToCli( charaindex, -1, msgbuf, CHAR_COLORYELLOW); + } + } + return rc; +} +/*------------------------------------------------------------ + * 惫寞涩烂卞宁丹井譬屯化惫寞毛芨尹月[ + * 娄醒 + * charaindex int 平乓仿奶件犯永弁旦 + * mode BOOL TRUE:item=及手及及心譬屯月 FALSE:蝈 + * 忒曰袄 + * TRUE: 惫寞卞 祭 曰[ + * FALSE:窒手 井匀凶[ + *------------------------------------------------------------*/ +BOOL TITLE_TitleCheck_Nomsg( int charaindex, BOOL mode, int *addcnt, int *delcnt) +{ + return( TITLE_TitleCheck_Main( charaindex, mode, addcnt,delcnt)); +} + + +static int TITLE_IntCheck( int charaindex, int elem, int *data, int flg) +{ + int rc = FALSE; + int i; + for( i = 0; i < TITLE_PARAMSIZE && *(data+i) != -1; i ++ ) { + switch( flg) { + case 0: /* "<=" */ + if( CHAR_getInt( charaindex, elem) <= *(data+i) ) rc = TRUE; + break; + case 1: /* ">=" */ + if( CHAR_getInt( charaindex, elem) >= *(data+i) ) rc = TRUE; + break; + case 2: /* "<>" */ + if( CHAR_getInt( charaindex, elem) != *(data+i) ) rc = TRUE; + break; + case 3: /* ">" */ + if( CHAR_getInt( charaindex, elem) > *(data+i) ) rc = TRUE; + break; + case 4: /* "<" */ + if( CHAR_getInt( charaindex, elem) < *(data+i) ) rc = TRUE; + break; + case 5: /* "=" */ + if( CHAR_getInt( charaindex, elem) == *(data+i) ) rc = TRUE; + break; + default: + rc= FALSE; + break; + } + if( rc) break; + } + return rc; +} +static int TITLE_WorkIntCheck( int charaindex,int elem, int *data, int flg) +{ + int rc = FALSE; + int i; + for( i = 0; i < TITLE_PARAMSIZE && *(data+i) != -1; i ++ ) { + switch( flg) { + case 0: /* "<=" */ + if( CHAR_getWorkInt( charaindex, elem) <= *(data+i) ) rc = TRUE; + break; + case 1: /* ">=" */ + if( CHAR_getWorkInt( charaindex, elem) >= *(data+i) ) rc = TRUE; + break; + case 2: /* "<>" */ + if( CHAR_getWorkInt( charaindex, elem) != *(data+i) ) rc = TRUE; + break; + case 3: /* ">" */ + if( CHAR_getWorkInt( charaindex, elem) > *(data +i)) rc = TRUE; + break; + case 4: /* "<" */ + if( CHAR_getWorkInt( charaindex, elem) < *(data+i) ) rc = TRUE; + break; + case 5: /* "=" */ + if( CHAR_getWorkInt( charaindex, elem) == *(data+i) ) rc = TRUE; + break; + default: + rc= FALSE; + break; + } + if( rc ) break; + } + return rc; +} +/* -------------------------------------- + * 隙烂今木凶data午 匀化中月失奶 丞毛 胜允月[ + * -------------------------------------*/ +static int TITLE_ItemCheckMain( int charaindex, int itemhaveindex, int *data, int flg) +{ + int i,j; + int rc = FALSE; + + if( flg == 2 ) rc = TRUE; + + for( j = 0; j < TITLE_PARAMSIZE && *(data+j) != -1; j ++ ) { + for( i =0; i < itemhaveindex; i ++ ) { + int itemindex = CHAR_getItemIndex(charaindex,i); + if( ITEM_CHECKINDEX(itemindex) ) { + switch( flg) { + case 0: /* "<=" */ + if( ITEM_getInt( itemindex, ITEM_ID) <= *(data+j) ) rc = TRUE; + break; + case 1: /* ">=" */ + if( ITEM_getInt( itemindex, ITEM_ID) >= *(data+j) ) rc = TRUE; + break; + case 3: /* ">" */ + if( ITEM_getInt( itemindex, ITEM_ID) > *(data +j)) rc = TRUE; + break; + case 4: /* "<" */ + if( ITEM_getInt( itemindex, ITEM_ID) < *(data +j)) rc = TRUE; + break; + case 5: /* "=" */ + if( ITEM_getInt( itemindex, ITEM_ID) == *(data +j)) rc = TRUE; + break; + /* 仇木分仃 健中[ + * 失奶 丞蝈 毛苇化公木毛 匀化中卅井匀凶日蕞午允月[ + * 仇仇匹反 匀化中月仪毛絮午仄化民尼永弁 + */ + case 2: /* "<>" */ + if( ITEM_getInt( itemindex, ITEM_ID) == *(data +j)) rc = FALSE; + break; + default: + rc= FALSE; + break; + } + if( rc && flg != 2) break; + } + } + if( rc) break; + } + return rc; +} + + +static int TITLE_ItemCheck( int charaindex,int elem, int *data, int flg) +{ + return( TITLE_ItemCheckMain( charaindex, CHAR_MAXITEMHAVE,data,flg)); +} + +static int TITLE_ItemEquipCheck( int charaindex,int elem, int *data, int flg) +{ + return( TITLE_ItemCheckMain( charaindex, CHAR_EQUIPPLACENUM,data,flg)); +} + +static int TITLE_SkillCheck( int charaindex,int elem, int *data, int flg) +{ + int i; + int rc = FALSE; + CHAR_HaveSkill* hskill; + + for( i = 0 ; i < CHAR_SKILLMAXHAVE ; i ++ ){ + hskill = CHAR_getCharHaveSkill( charaindex, i ); + if( hskill != NULL && hskill->use == TRUE ) { + + if( *(data + 1) != -2 ) { + if( SKILL_getInt( &hskill->skill, SKILL_IDENTITY) == *data) { + rc = TRUE; + break; + } + } + + else { + if( SKILL_getInt( &hskill->skill, SKILL_IDENTITY) == *data) { + rc = FALSE; + break; + } + else { + rc = TRUE; + } + } + } + } + if( rc ) { + + if( *(data+1) != -1 && *(data+1) != -2) { + rc = FALSE; + switch( flg) { + case 0: /* "<=" */ + if( SKILL_getInt( &hskill->skill, SKILL_LEVEL) <= *(data+1) ) rc = TRUE; + break; + case 1: /* ">=" */ + if( SKILL_getInt( &hskill->skill, SKILL_LEVEL) >= *(data+1) ) rc = TRUE; + break; + case 2: /* "<>" */ + if( SKILL_getInt( &hskill->skill, SKILL_LEVEL) != *(data+1) ) rc = TRUE; + break; + case 3: /* ">" */ + if( SKILL_getInt( &hskill->skill, SKILL_LEVEL) > *(data +1)) rc = TRUE; + break; + case 4: /* "<" */ + if( SKILL_getInt( &hskill->skill, SKILL_LEVEL) < *(data+1) ) rc = TRUE; + break; + case 5: /* "=" */ + if( SKILL_getInt( &hskill->skill, SKILL_LEVEL) == *(data+1) ) rc = TRUE; + break; + default: + rc= FALSE; + break; + } + } + } + return rc; +} +/* -------------------------------------- + * 裆平乓仿井辉平乓仿井民尼永弁允月[ + * -------------------------------------*/ +static int TITLE_SexCheck( int charaindex,int elem, int *data, int flg) +{ + int i,j; + struct { + int sex[25]; + }s_sex[] = + { { { 30008,30009,30010,30011,30012,30013,30014,30015, + 30020,30021,30022,30023,30024,30025,30026,30027, + 30028,30029,30030,30031,30032,30033,30034,30035,-1} + }, + { {30000,30001,30002,30003,30004,30005,30006,30007, + 30016,30017,30018,30019,30036,30037,30038,30039, + -1, -1, -1, -1, -1, -1, -1, -1, -1} + } + }; + for( i = 0; i < 2; i ++ ) { + for( j = 0; s_sex[i].sex[j] != -1 ; j ++ ) { + if( CHAR_getInt( charaindex, CHAR_BASEBASEIMAGENUMBER ) + == s_sex[i].sex[j] ) + { + if( i == *data ) return TRUE; + else return FALSE; + } + } + } + return FALSE; +} + + diff --git a/gmsv/char/trade.c b/gmsv/char/trade.c new file mode 100644 index 0000000..de5a584 --- /dev/null +++ b/gmsv/char/trade.c @@ -0,0 +1,1942 @@ +#include "version.h" +#include "correct_bug.h" +#include +#include +#include + +#include "readmap.h" +#include "object.h" +#include "char.h" +#include "char_base.h" +#include "lssproto_serv.h" +#include "npcutil.h" +#include "trade.h" +#include "log.h" +#include "handletime.h" +#include "buf.h" +#include "net.h" +#include "char_base.h" +#include "battle.h" +#include "npc_bus.h" +#include "char_talk.h" +#ifdef _TRADESYSTEM2 // (不可开) Syu ADD 新交易系统 +#include "pet_skill.h" +#endif + +#define TRADE_WAIT "请稍候,连络%s中···" +#define TRADE_NONE "前方什麽人也没有!" +#define TRADE_OVERPLAYER "前方不只一位玩家喔!" +#define TRADE_NOWILL "真是抱歉,对方不愿意跟你交易!" +#define TRADE_TRADING "%s正在与其他人交易···" +#define TRADE_VANISHITEM "丢在地上会消失的物品无法交易!" +#define TRADE_PETFULL "%s宠物栏已满,交易取消!" +#define TRADE_ITEMFULL "%s物品栏已满,请整理後再交易~" +#define TRADE_CANCEL "%s将交易取消了!" +#define TRADE_POOR "%s钱不够,无法交易!" +#define TRADE_RICH "%s金钱交易请勿超过一百万!" +#define TRADE_TOORICH "%s金钱将会超过一百万!" +#define TRADE_POORLV "%s等级不够,无法照顾交易後的宠物!" +#define TRADE_LOCK "交易锁定···" +#define TRADE_SUCCESS "交易OK!" +#define TRADE_FAILED "交易失败!" +#define TRADE_FMPET "家族守护兽无法交易!" + +#define TRADE_RDCANCEL "交易取消!" + + + +#ifdef _ITEM_PILEFORTRADE +enum{ + TRADE_ITEM=0, + TRADE_PET, + TRADE_GOLD, +}; + +#define MAX_TRADELISTNUM 100 +typedef struct _tagTradeList{ + int charaindex; + int fd; + int PetTi[5]; + int ItemTi[15]; + int ItemNum[15]; + int Golds; + int use; +}STradeList; + +STradeList TradeList[MAX_TRADELISTNUM][2]; + +void TRADE_ResetTradeList( int ti); +int TRADE_getTradeListIndex( void); +int TRADE_getMyTarget( int meindex ); +BOOL TRADE_setTradeListIndex( int ti, int meindex, int toindex); +BOOL TRADE_addSomeTradeList( int meindex, int usTi, int *num, int type); +BOOL TRADE_getSomeTradeList( int meindex, STradeList *temp); + +void TRADE_InitTradeList( void) +{ + int i; + print("初始化交易系统..."); + for( i=0; i= MAX_TRADELISTNUM )return; + for( i=0; i<5; i++){ + TradeList[ti][0].PetTi[i] = -1; + TradeList[ti][1].PetTi[i] = -1; + } + for( i=0; i<15; i++){ + TradeList[ti][0].ItemTi[i] = -1; + TradeList[ti][0].ItemNum[i] = -1; + TradeList[ti][1].ItemTi[i] = -1; + TradeList[ti][1].ItemNum[i] = -1; + } + + TradeList[ti][0].Golds = 0; + TradeList[ti][1].Golds = 0; + + + if( CHAR_CHECKINDEX(TradeList[ti][0].charaindex)){ + fd = getfdFromCharaIndex( TradeList[ti][0].charaindex); + CONNECT_setTradeList( fd, -1); + } + if( CHAR_CHECKINDEX(TradeList[ti][1].charaindex)){ + fd = getfdFromCharaIndex( TradeList[ti][1].charaindex); + CONNECT_setTradeList( fd, -1); + } + + TradeList[ti][0].charaindex = -1; + TradeList[ti][1].charaindex = -1; + TradeList[ti][0].fd = -1; + TradeList[ti][1].fd = -1; + + TradeList[ti][0].use = 0; + TradeList[ti][1].use = 0; + +} + +int TRADE_getTradeListIndex( void) +{ + int i; + static int tradeTi=0; + if( tradeTi < 0 ) tradeTi = 0; + for( i=0; i= MAX_TRADELISTNUM ) tradeTi = 0; + + } + return -1; +} + +BOOL TRADE_setTradeListIndex( int ti, int meindex, int toindex) +{ + int fd; + if( ti<0 || ti >= MAX_TRADELISTNUM ) return FALSE; + if( TradeList[ti][0].use == 1 || TradeList[ti][1].use == 1 ) return FALSE; + TRADE_ResetTradeList( ti); + TradeList[ti][0].charaindex = meindex; + TradeList[ti][1].charaindex = toindex; + TradeList[ti][0].use = 1; + TradeList[ti][1].use = 1; + + fd = getfdFromCharaIndex( meindex); + TradeList[ti][0].fd = fd; + CONNECT_setTradeList( fd, ti); + + fd = getfdFromCharaIndex( toindex); + TradeList[ti][1].fd = fd; + CONNECT_setTradeList( fd, ti); + return TRUE; +} + +void TRADE_CheckTradeListUser( void) +{ + int i, usenum=0, replace=0, freenum=0; + for( i=0; i= MAX_TRADELISTNUM ) return -1; + if( TradeList[ti][0].use == 0 || TradeList[ti][1].use == 0 ) return -1; + + for( i=0; i<2; i++){ + if( TradeList[ti][i].charaindex == meindex && + TradeList[ti][i].fd == fd ){ + side = (i+1)%2; + if( !CHAR_CHECKINDEX( TradeList[ti][side].charaindex) ) return -1; + if( TradeList[ti][side].charaindex == meindex ) return -1; + if( TradeList[ti][side].fd != getfdFromCharaIndex( TradeList[ti][side].charaindex) ) return -1; + + return TradeList[ti][side].charaindex; + } + } + return -1; +} + +BOOL TRADE_addSomeTradeList( int meindex, int usTi, int *num, int type) +{ + int i, fd, ti, side=-1, toindex=-1; + fd = getfdFromCharaIndex( meindex); + ti = CONNECT_getTradeList( fd); + if( ti <0 || ti >= MAX_TRADELISTNUM ) return FALSE; + toindex =-1; + if( TradeList[ti][0].use != 1 || TradeList[ti][1].use != 1 ) return FALSE; + for( i=0; i<2; i++){ + if( TradeList[ti][i].charaindex != meindex ){ + continue; + } + side = i; + toindex = TradeList[ti][((side+1)%2)].charaindex; + if( !CHAR_CHECKINDEX( toindex) ) return FALSE; + break; + } + if( side == -1 ) return FALSE; + switch( type){ + case TRADE_ITEM: + { + int itemindex, MeMaxPile; + MeMaxPile = CHAR_getMyMaxPilenum( meindex);//最大堆叠数 + if( usTi < CHAR_STARTITEMARRAY || usTi >= CHAR_MAXITEMHAVE ) return FALSE; + itemindex = CHAR_getItemIndex( meindex, usTi ); + if( !ITEM_CHECKINDEX( itemindex)) return FALSE; + + if( ITEM_getInt( itemindex, ITEM_VANISHATDROP) == 1 ){ + char buf[256]; + sprintf( buf, "%s无法交易。", ITEM_getChar( itemindex, ITEM_NAME) ); + CHAR_talkToCli( meindex, -1, buf, CHAR_COLORYELLOW); + return FALSE; + } + + if( ITEM_getInt( itemindex, ITEM_CANBEPILE) == 1 ){//可堆叠 + int itemMaxPile = ITEM_getInt( itemindex, ITEM_USEPILENUMS); + if( itemMaxPile < 0 ) return FALSE; + //ITEM_USEPILENUMS + for( i=0; i<15; i++){ + if( TradeList[ti][side].ItemTi[i] != usTi ) continue; + if( TradeList[ti][side].ItemNum[i] >= MeMaxPile || + TradeList[ti][side].ItemNum[i] >= itemMaxPile ) return FALSE; + + TradeList[ti][side].ItemNum[i] += 1; + if( num != NULL ) *num = TradeList[ti][side].ItemNum[i]; + return TRUE; + } + } + for( i=0; i<15; i++){ + if( TradeList[ti][side].ItemTi[i] != -1 ) continue; + TradeList[ti][side].ItemTi[i] = usTi; + TradeList[ti][side].ItemNum[i] = 1; + if( num != NULL ) *num = TradeList[ti][side].ItemNum[i]; + return TRUE; + } + } + break; + case TRADE_PET: + { + int petindex; + if( usTi < 0 || usTi >= CHAR_MAXPETHAVE ) return FALSE; + petindex = CHAR_getCharPet( meindex, usTi ); + if( !CHAR_CHECKINDEX(petindex)) return FALSE; + if( CHAR_getInt( petindex, CHAR_PETFAMILY) == 1 ){ + CHAR_talkToCli( meindex, -1, "家族守护兽无法交易。", CHAR_COLORYELLOW); + return FALSE;//家族守护兽 + } + if( CHAR_getWorkInt( toindex, CHAR_PickAllPet) != TRUE ){ + if( CHAR_getInt( petindex, CHAR_LV) > (CHAR_getInt( toindex, CHAR_LV)+5) && + (CHAR_getInt( toindex, CHAR_TRANSMIGRATION ) <= 0 ) ){ + CHAR_talkToCli( meindex, -1, "对方无法照顾该宠物。", CHAR_COLORYELLOW); + return FALSE; + } + } + for( i=0; i<5; i++){ + if( TradeList[ti][side].PetTi[i] == usTi ) return FALSE; + } + for( i=0; i<5; i++){ + if( TradeList[ti][side].PetTi[i] != -1 ) continue; + TradeList[ti][side].PetTi[i] = usTi; + return TRUE; + } + } + break; + case TRADE_GOLD: + TradeList[ti][side].Golds = usTi; + return TRUE; + break; + } + + return FALSE; +} + +BOOL TRADE_getSomeTradeList( int meindex, STradeList *temp) +{ + int i, fd, ti, side=-1; + fd = getfdFromCharaIndex( meindex); + ti = CONNECT_getTradeList( fd); + if( ti <0 || ti >= MAX_TRADELISTNUM ) return FALSE; + if( TradeList[ti][0].use != 1 || TradeList[ti][1].use != 1 ) return FALSE; + for( i=0; i<2; i++){ + if( TradeList[ti][i].charaindex != meindex ) continue; + side = i; + break; + } + if( side == -1 ) return FALSE; + + memcpy( temp, &TradeList[ti][side], sizeof( STradeList) ); + return TRUE; +} +BOOL TRADE_CheckTradeList( int meindex, STradeList *temp1, int toindex, STradeList *temp2); +#endif + +void TRADE_Will(int fd, int meindex, char* message); +void TRADE_ShowItem(int fd, int meindex, char* message); +void TRADE_Close(int fd, int meindex, char* message); + +void TRADE_SwapItem(int meindex, int toindex, char* message, int fd, char* mycharaname, int tofd, char* tocharaname); + +int TRADE_CheckItembuf(int fd, int meindex, int toindex, int tofd, char* mycharaname, char* tocharaname); +//BOOL TRADE_ChangeItem(int meindex, int toindex, char *a, char *b, int item1, int item2, int itemindex1, int itemindex2); +BOOL TRADE_HandleItem( int meindex, int showindex, char *message, char *outmess); +BOOL TRADE_HandleGold( int meindex, int showindex, char *message, char *outmess); +BOOL TRADE_HandlePet( int meindex, int showindex, char *message, char *outmess); + + + +void CHAR_Trade(int fd, int index, char* message) +{ + char firstToken[64]; + // shan 以下注掉是不必要的动作 2002/03/05 + //char messageeraseescape[512]; + char* messagebody; + + { + if (*message == 0) return; + if (!CHAR_CHECKINDEX(index)) return; + + CHAR_getMessageBody( message, firstToken, sizeof(firstToken), &messagebody); + + switch( tolower( firstToken[0]) ){ + case 'd': // 寻找前方玩家 + + TRADE_Search(fd, index, message); + break; +/* case 'c': + TRADE_Will(fd, index, message); + break; +*/ case 't': // 显示交易的物品、金钱、宠物 + TRADE_ShowItem(fd, index, message); + break; + case 'w': // 关闭交易 + print(" TRADE_Close:%d ", index); + TRADE_Close(fd, index, message); + break; + default: + break; + } + } +} + +BOOL TRADE_Search(int fd, int meindex, char* message) +{ + int objbuf[16]; + int front_x, front_y, i, found_count; + BOOL found = FALSE, searchflg = FALSE; + int cnt = 0, tofd = -1, checkfd = -1; + char msgbuf[1024], mycharaname[256], tocharaname[256]; + char token[256]; + + if (!CHAR_CHECKINDEX(meindex)) return FALSE; + +#if 0 // Robin fix +//#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令 + { + char msgbuf[512]; + snprintf( msgbuf, sizeof( msgbuf), "跨星系家族PK,无法交易"); + CHAR_talkToCli( meindex, -1, msgbuf, CHAR_COLORWHITE); + return FALSE; + } +#endif + + // 若玩家状态为交易中或交易锁定中则不予处理 + if (CHAR_getWorkInt(meindex, CHAR_WORKTRADEMODE) == CHAR_TRADE_TRADING + || CHAR_getWorkInt(meindex, CHAR_WORKTRADEMODE) == CHAR_TRADE_LOCK) + return FALSE; + + // 若玩家状态为组队或战斗中则不予处理 + if ((CHAR_getWorkInt(meindex, CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE) + || (CHAR_getWorkInt(meindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE)) + return FALSE; + +#ifdef _STREET_VENDOR + // 若玩家在摆摊中不处理交易 + if(CHAR_getWorkInt(meindex,CHAR_WORKSTREETVENDOR) > -1) return FALSE; +#endif + + strcpy(mycharaname, CHAR_getChar(meindex, CHAR_NAME)); + + if (getStringFromIndexWithDelim(message, "|", 2, token, + sizeof(token)) == FALSE) return FALSE; + // 设定状态交易请求中 +// CHAR_setWorkInt(meindex, CHAR_WORKTRADEMODE, CHAR_TRADE_SENDING); + +#ifndef _ITEM_PILEFORTRADE + for (i = 0; i < CONNECT_WINDOWBUFSIZE; i++) + CONNECT_setTradecharaindex(fd, i, -1); +#endif + CHAR_getCoordinationDir(CHAR_getInt(meindex, CHAR_DIR), + CHAR_getInt(meindex, CHAR_X), + CHAR_getInt(meindex, CHAR_Y), + 1, &front_x, &front_y); + + found_count = CHAR_getSameCoordinateObjects( objbuf, arraysizeof(objbuf), + CHAR_getInt(meindex, CHAR_FLOOR),front_x, front_y); + // 前方没有玩家或对方关闭交易选项 + if (found_count == 0){ + CHAR_talkToCli(meindex, -1, TRADE_NONE, CHAR_COLORYELLOW); + CHAR_setWorkInt(meindex, CHAR_WORKTRADEMODE, CHAR_TRADE_FREE); + return FALSE; + } + + for (i = 0; i < found_count; i++){ + int objindex = objbuf[i]; + int index = OBJECT_getIndex(objindex); + + if (OBJECT_getType(objindex) != OBJTYPE_CHARA) continue; + if (CHAR_getInt(index, CHAR_WHICHTYPE) != CHAR_TYPEPLAYER) continue; + if (index == meindex) continue; + found = TRUE; + if (CHAR_getWorkInt(index, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE) continue; + if (CHAR_getWorkInt(index, CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE) continue; + if (CHAR_getFlg(index, CHAR_ISTRADE) == FALSE) continue; + if (CHAR_getWorkInt(index, CHAR_WORKTRADEMODE) != CHAR_TRADE_FREE) continue; + strcpy(tocharaname, CHAR_getChar(index, CHAR_NAME)); + tofd = getfdFromCharaIndex(index); + if (tofd == -1){ + CHAR_setWorkInt(meindex, CHAR_WORKTRADEMODE, CHAR_TRADE_FREE); + return FALSE; + } + if (searchflg){ + if (tofd != checkfd) continue; + if (strcmp(token, tocharaname) != 0) continue; + } +#ifndef _ITEM_PILEFORTRADE + CONNECT_setTradecharaindex(fd, cnt, index); +#endif + cnt ++; + if (cnt == CONNECT_WINDOWBUFSIZE) break; + } + + if (cnt == 0){ + // 前方没有玩家或对方关闭交易选项 + if (found){ + CHAR_talkToCli(meindex, -1, TRADE_NOWILL, CHAR_COLORYELLOW); + }else + CHAR_talkToCli(meindex, -1, TRADE_NONE, CHAR_COLORYELLOW); + + sprintf(msgbuf, "C|%d|%s|0", tofd, tocharaname); + CHAR_setWorkInt(meindex, CHAR_WORKTRADEMODE, CHAR_TRADE_FREE); + return FALSE; + } + // 前方有一位玩家 + if (cnt == 1){ +#ifdef _ITEM_PILEFORTRADE + int ti; +#endif + int toindex; + toindex = CONNECT_getCharaindex(tofd); + if( !CHAR_CHECKINDEX(toindex)) return FALSE; +#ifdef _ITEM_PILEFORTRADE + + if( (ti = TRADE_getTradeListIndex()) < 0 || + TRADE_setTradeListIndex( ti, meindex, toindex) == FALSE ){ + + CHAR_talkToCli( meindex, -1, "系统忙碌中。", CHAR_COLORYELLOW); + CHAR_setWorkInt( meindex, CHAR_WORKTRADEMODE, CHAR_TRADE_FREE); + TRADE_CheckTradeListUser(); + + return FALSE; + } + TRADE_setTradeListIndex( ti, meindex, toindex); +#endif + snprintf(msgbuf, sizeof(msgbuf), TRADE_WAIT, tocharaname); + CHAR_talkToCli(meindex, -1, msgbuf, CHAR_COLORYELLOW); + + sprintf(msgbuf, "C|%d|%s|1", fd, mycharaname); + lssproto_TD_send( tofd, -1, msgbuf); + sprintf(msgbuf, "C|%d|%s|1", tofd, tocharaname); + lssproto_TD_send(fd, -1, msgbuf); + + CHAR_setWorkInt(meindex, CHAR_WORKTRADEMODE, CHAR_TRADE_TRADING); + CHAR_setWorkInt(toindex, CHAR_WORKTRADEMODE, CHAR_TRADE_TRADING); + + CONNECT_set_confirm(fd, FALSE); + CONNECT_set_confirm(tofd, FALSE); + + CHAR_sendTradeEffect(meindex, 1); + CHAR_sendTradeEffect(toindex, 1); + return TRUE; + }else if (cnt > 1){ // 前方不只一位玩家 + CHAR_talkToCli(meindex, -1, TRADE_OVERPLAYER, CHAR_COLORYELLOW); +// sprintf(msgbuf, "C|%d|%s|0", tofd, tocharaname); + CHAR_setWorkInt(meindex, CHAR_WORKTRADEMODE, CHAR_TRADE_FREE); + return FALSE; + } + + CHAR_setWorkInt(meindex, CHAR_WORKTRADEMODE, CHAR_TRADE_FREE); + return FALSE; +} + +void TRADE_Close(int fd, int meindex, char* message) +{ + char msg[128], mycharaname[256]; + int tofd=-1, toindex=-1; + int j; +#ifndef _ITEM_PILEFORTRADE + char token[256]; +#endif + if (!CHAR_CHECKINDEX(meindex)) return; + if (*message == 0) return; + strcpy(mycharaname, CHAR_getChar(meindex, CHAR_NAME)); +#ifdef _ITEM_PILEFORTRADE + toindex = TRADE_getMyTarget( meindex); + + if( CHAR_CHECKINDEX( toindex) ){ + tofd = getfdFromCharaIndex( toindex); + snprintf( msg, sizeof(msg), TRADE_CANCEL, mycharaname); + CHAR_talkToCli(toindex, -1, msg, CHAR_COLORYELLOW); + snprintf( msg, sizeof(msg), "W|%d|%s", fd, mycharaname); + lssproto_TD_send( tofd, -1, msg); + + CHAR_setWorkInt( toindex, CHAR_WORKTRADEMODE, CHAR_TRADE_FREE); + CONNECT_setTradeTmp( tofd, ""); + CHAR_sendStatusString( toindex, "i"); + CHAR_sendStatusString( toindex, "P"); + CHAR_sendTradeEffect( toindex, 0); + CONNECT_set_confirm( tofd, FALSE); + + for(j = 0; j < CHAR_MAXPETHAVE; j++){ + char msgbuf[256]; + int petindex = CHAR_getCharPet( toindex, j); + if( !CHAR_CHECKINDEX( petindex) ) continue; + CHAR_complianceParameter( petindex ); + snprintf( msgbuf, sizeof( msgbuf ), "K%d", j ); + CHAR_sendStatusString( toindex, msgbuf ); + snprintf( msgbuf, sizeof( msgbuf ), "W%d", j ); + CHAR_sendStatusString( toindex, msgbuf ); + } + } + +#else + if (getStringFromIndexWithDelim(message, "|", 2, token, sizeof(token)) == FALSE) return; + tofd = atoi(token); + toindex = CONNECT_getCharaindex(tofd); + if (!CHAR_CHECKINDEX(toindex)) return; + if (getStringFromIndexWithDelim(message, "|", 3, token, sizeof(token)) == FALSE) return; + + + snprintf(msg, sizeof(msg), TRADE_CANCEL, mycharaname); + CHAR_talkToCli(toindex, -1, msg, CHAR_COLORYELLOW); + snprintf( msg, sizeof(msg), "W|%d|%s", fd, mycharaname); + lssproto_TD_send( tofd, -1, msg); + + CHAR_setWorkInt(toindex, CHAR_WORKTRADEMODE, CHAR_TRADE_FREE); + CONNECT_setTradeTmp(tofd, ""); + CHAR_sendStatusString( CONNECT_getCharaindex(tofd), "i"); + CHAR_sendStatusString( CONNECT_getCharaindex(tofd), "P"); + CHAR_sendTradeEffect( toindex, 0); + CONNECT_set_confirm(tofd, FALSE); +#endif + + if( !CHAR_CHECKINDEX( toindex) ){ + char buf[256]; + if( getStringFromIndexWithDelim( message, "|", 2, buf, sizeof(buf)) == FALSE) return; + tofd = atoi( buf); + toindex = CONNECT_getCharaindex( tofd); + if (!CHAR_CHECKINDEX(toindex) )return; + } + + + snprintf( msg, sizeof(msg), TRADE_RDCANCEL); + CHAR_talkToCli(meindex, -1, msg, CHAR_COLORYELLOW); + snprintf( msg, sizeof(msg), "W|%d|%s", tofd, CHAR_getChar( toindex, CHAR_NAME) ); + lssproto_TD_send( fd, -1, msg); + + CHAR_setWorkInt( meindex, CHAR_WORKTRADEMODE, CHAR_TRADE_FREE); + CONNECT_setTradeTmp(fd, ""); + CHAR_sendStatusString(meindex, "i"); + CHAR_sendStatusString(meindex, "P"); + CHAR_sendTradeEffect( meindex, 0); + CONNECT_set_confirm(fd, FALSE); +// end + for(j = 0; j < CHAR_MAXPETHAVE; j++){ + char msgbuf[256]; + int petindex = CHAR_getCharPet( meindex, j); + if( !CHAR_CHECKINDEX( petindex) ) continue; + CHAR_complianceParameter( petindex ); + snprintf( msgbuf, sizeof( msgbuf ), "K%d", j ); + CHAR_sendStatusString( meindex, msgbuf ); + snprintf( msgbuf, sizeof( msgbuf ), "W%d", j ); + CHAR_sendStatusString( meindex, msgbuf ); + } + +#ifdef _ITEM_PILEFORTRADE + { + int ti=0; + ti = CONNECT_getTradeList( fd); + if( ti <0 || ti >= MAX_TRADELISTNUM ) return; + TRADE_ResetTradeList( ti); + } +#endif + +} + +void TRADE_ShowItem(int fd, int meindex, char* message) +{ + char token[128], mycharaname[256], tocharaname[256], msg[2048]; + int tofd, showindex, toindex;// itemindex, gold, tmpgold, item; + + int MaxGold; + + MaxGold = CHAR_getMaxHaveGold( meindex); + strcpy( mycharaname, CHAR_getChar(meindex, CHAR_NAME)); +#ifdef _ITEM_PILEFORTRADE + toindex = TRADE_getMyTarget( meindex); + if( !CHAR_CHECKINDEX( toindex) ){ + print(" TRADE_Close_Err1:%d ", toindex); + TRADE_Close(fd, meindex, message); + return; + } + if( meindex != TRADE_getMyTarget( toindex) ){ + print(" TRADE_Close_Err2:%d->%d ", meindex, toindex); + TRADE_Close(fd, meindex, message); + return; + } + tofd = getfdFromCharaIndex(toindex); +#else + if (getStringFromIndexWithDelim(message, "|", 2, token, sizeof(token)) == FALSE) return; + tofd = atoi(token); + toindex = CONNECT_getCharaindex(tofd); +#endif + + if (!CHAR_CHECKINDEX(toindex)) return; + // 若玩家状态为组队或战斗中则不予处理 + if ((CHAR_getWorkInt(meindex, CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE) + || (CHAR_getWorkInt(meindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE)) + return; + + if ((CHAR_getWorkInt(toindex, CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE) + || (CHAR_getWorkInt(toindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE)) + return; + + if (getStringFromIndexWithDelim(message, "|", 3, tocharaname, sizeof(tocharaname)) == FALSE) return; + if (getStringFromIndexWithDelim(message, "|", 5, token, sizeof(token)) == FALSE) return; + showindex = atoi(token); + if (getStringFromIndexWithDelim(message, "|", 4, token, sizeof(token)) == FALSE) return; + + showindex = toindex; + strcpy( tocharaname, CHAR_getChar(toindex, CHAR_NAME)); + + switch(tolower(token[0])){ + case 'i': + { + char buf1[2048]; + if( TRADE_HandleItem( meindex, showindex, message, buf1) == FALSE ){ + print(" TRADE_Close_Err3:%d,%d,%s,%s ", meindex, showindex, message, buf1); + TRADE_Close(fd, meindex, message); + return; + }else{ + snprintf(msg, sizeof(msg), "T|%d|%s|I|%d|%s", fd, mycharaname, showindex, buf1 ); + lssproto_TD_send(tofd, -1, msg); + } + } + break; + case 'g': + { + char buf1[2048]; + if( TRADE_HandleGold( meindex, showindex, message, buf1) == FALSE ){ + print(" TRADE_Close_Err4:%d,%d,%s,%s ", meindex, showindex, message, buf1); + TRADE_Close(fd, meindex, message); + return; + }else{// 将欲交易之金钱传给对方 + snprintf(msg, sizeof(msg), "T|%d|%s|G|%d|%s", fd, mycharaname, showindex, buf1); + lssproto_TD_send( tofd, -1, msg); + } + } + break; + case 'p': + { + char buf1[2048]; + if( TRADE_HandlePet( meindex, showindex, message, buf1) == FALSE ){ + print(" TRADE_Close_Err5:%d,%d,%s,%s ", meindex, showindex, message, buf1); + TRADE_Close(fd, meindex, message); + return; + }else{ + snprintf(msg, sizeof(msg), "T|%d|%s|P|%d|%s", + fd, mycharaname, showindex, buf1); + lssproto_TD_send(tofd, -1, msg); + } + } + break; + case 'k': + if((CONNECT_get_confirm(fd)==TRUE) && + (CONNECT_get_confirm(tofd)==TRUE) ){//当双方都按下 lock + if( CHAR_getWorkInt(meindex, CHAR_WORKTRADEMODE) == CHAR_TRADE_LOCK ){ + //andy_log + print("ANDY err 防止第二次进入!!\n"); + return;//防止第二次进入 + } + CHAR_setWorkInt(meindex, CHAR_WORKTRADEMODE, CHAR_TRADE_LOCK); + //检查对方是否按下 ok + if( CHAR_getWorkInt( toindex, CHAR_WORKTRADEMODE) != CHAR_TRADE_LOCK )return; + + snprintf(msg, sizeof(msg), "T|%d|%s|A", fd, mycharaname); + lssproto_TD_send( tofd, -1, msg); + TRADE_SwapItem(meindex, toindex, message, fd, mycharaname, tofd, tocharaname); + } + break; + case 'c': + if( CONNECT_get_confirm( fd) == TRUE ) return; + CONNECT_set_confirm(fd, TRUE); + snprintf( msg, sizeof(msg), "T|%d|%s|C", fd, mycharaname); + lssproto_TD_send( tofd, -1, msg); + break; + } + return; +} + +void TRADE_SwapItem( int meindex, int toindex, char* message, int fd, char* mycharaname, int tofd, char* tocharaname) +{ + int result; + char msg[128], tmpmsg[128]; + +#ifndef _ITEM_PILEFORTRADE + CONNECT_setTradeTmp(fd, message); +#endif + + result = TRADE_CheckItembuf(fd, meindex, toindex, tofd, mycharaname, tocharaname); +#ifndef _ITEM_PILEFORTRADE + toindex = CONNECT_getCharaindex(tofd); +#endif + + if (!CHAR_CHECKINDEX(toindex)) return; + if (result == -1) + strcpy(msg, TRADE_FAILED); + else if (result == -2) + sprintf(msg, TRADE_ITEMFULL, mycharaname); + else if (result == -3) + sprintf(msg, TRADE_ITEMFULL, tocharaname); + else if (result == -4) + sprintf(msg, TRADE_RICH, mycharaname); + else if (result == -5) + sprintf(msg, TRADE_POOR, mycharaname); + else if (result == -6) + sprintf(msg, TRADE_RICH, tocharaname); + else if (result == -7) + sprintf(msg, TRADE_POOR, tocharaname); + else if (result == -8) + sprintf(msg, TRADE_TOORICH, mycharaname); + else if (result == -9) + sprintf(msg, TRADE_TOORICH, tocharaname); + else if (result == -10) + sprintf(msg, TRADE_PETFULL, mycharaname); + else if (result == -11) + sprintf(msg, TRADE_PETFULL, tocharaname); + else if (result == -12) + strcpy(msg, TRADE_VANISHITEM); + else if (result == -13) + sprintf(msg, TRADE_POORLV, mycharaname); + else if (result == -14) + sprintf(msg, TRADE_POORLV, tocharaname); + else if (result == -15) + strcpy(msg, TRADE_FMPET); + else if (result == 1) + strcpy(msg, TRADE_SUCCESS); + else if (result == 2) + strcpy(msg, TRADE_LOCK); + + if (result != 2){ + snprintf(tmpmsg, sizeof(tmpmsg), "W|%d|%s", fd, mycharaname); + lssproto_TD_send(tofd, -1, tmpmsg); + snprintf(tmpmsg, sizeof(tmpmsg), "W|%d|%s", tofd, tocharaname); + lssproto_TD_send(fd, -1, tmpmsg); + + CHAR_setWorkInt(meindex, CHAR_WORKTRADEMODE, CHAR_TRADE_FREE); + CHAR_setWorkInt(toindex, CHAR_WORKTRADEMODE, CHAR_TRADE_FREE); + CONNECT_setTradeTmp(fd, ""); + CONNECT_setTradeTmp(tofd, ""); + CHAR_sendTradeEffect( meindex, 0); + CHAR_sendTradeEffect( toindex, 0); + } + CHAR_sendStatusString(meindex, "i"); + CHAR_sendStatusString(toindex, "i"); + CHAR_sendStatusString(meindex, "P"); + CHAR_sendStatusString(toindex, "P"); + { + int j, petindex; + char msgbuf[256]; + for(j = 0; j < CHAR_MAXPETHAVE; j++){ + petindex = CHAR_getCharPet( meindex, j); + if( !CHAR_CHECKINDEX( petindex) ) continue; + CHAR_complianceParameter( petindex ); + snprintf( msgbuf, sizeof( msgbuf ), "K%d", j ); + CHAR_sendStatusString( meindex, msgbuf ); + snprintf( msgbuf, sizeof( msgbuf ), "W%d", j ); + CHAR_sendStatusString( meindex, msgbuf ); + } + for(j = 0; j < CHAR_MAXPETHAVE; j++){ + petindex = CHAR_getCharPet( toindex, j); + if( !CHAR_CHECKINDEX( petindex) ) continue; + CHAR_complianceParameter( petindex ); + snprintf( msgbuf, sizeof( msgbuf ), "K%d", j ); + CHAR_sendStatusString( toindex, msgbuf ); + snprintf( msgbuf, sizeof( msgbuf ), "W%d", j ); + CHAR_sendStatusString( toindex, msgbuf ); + } + } + + CHAR_talkToCli(meindex, -1, msg, CHAR_COLORYELLOW); + CHAR_talkToCli(toindex, -1, msg, CHAR_COLORYELLOW); +} + +#ifdef _ITEM_PILEFORTRADE + +int TRADE_HandleTrade_DelItem( int charaindex, int MyMaxPile, int MaxPile, int *Item, int *nums, int *indexlist) +{ + int i, k; + + for( i=0; i<50; i++){ + indexlist[i] = -1; + } + k=0; + for( i=0; i<15; i++ ){ + int pilenum, itemindex, totalnums, newindex; + if( Item[i] == -1 ) continue; + itemindex = CHAR_getItemIndex( charaindex, Item[i] ); + if( !ITEM_CHECKINDEX( itemindex)) return -1; + pilenum = ITEM_getInt( itemindex, ITEM_USEPILENUMS); + pilenum -= nums[i]; + if( pilenum < 0 ) return -1; + if( pilenum == 0 ){ + CHAR_setItemIndex( charaindex, Item[i], -1); + indexlist[k] = itemindex; + k++; + totalnums = ITEM_getInt( itemindex, ITEM_USEPILENUMS); + newindex = itemindex; + }else{ + ITEM_setInt( itemindex, ITEM_USEPILENUMS, pilenum); + newindex = ITEM_makeItemAndRegist( ITEM_getInt( itemindex, ITEM_ID)); + if( !ITEM_CHECKINDEX( newindex) ) return -1; + indexlist[k] = newindex; + k++; + totalnums = nums[i]; + } + if( totalnums > MaxPile ){ + totalnums -= MaxPile; + ITEM_setInt( newindex, ITEM_USEPILENUMS, MaxPile); + }else{ + ITEM_setInt( newindex, ITEM_USEPILENUMS, totalnums); + totalnums = 0; + } + + while( totalnums > 0 ){ + newindex = ITEM_makeItemAndRegist( ITEM_getInt( itemindex, ITEM_ID)); + if( !ITEM_CHECKINDEX( newindex) ) return -1; + indexlist[k] = newindex; + k++; + if( totalnums > MaxPile ){ + totalnums -= MaxPile; + ITEM_setInt( newindex, ITEM_USEPILENUMS, MaxPile); + }else{ + ITEM_setInt( newindex, ITEM_USEPILENUMS, totalnums); + totalnums = 0; + } + } + } + return k; +} + +int TRADE_HandleTrade_DelPet( int charaindex, int *Pet, int *indexlist) +{ + int i, k, petindex; + k=0; + for( i=0; i<5; i++){ + indexlist[i] = -1; + } + for( i=0; i<5; i++ ){ + if( Pet[i] == -1 ) continue; + petindex = CHAR_getCharPet( charaindex, Pet[i] ); + if( !CHAR_CHECKINDEX( petindex)) return -1; + CHAR_setCharPet( charaindex, Pet[i], -1); + indexlist[k] = petindex; + k++; + } + return k; +} + +BOOL TRADE_HandleTrade_DelGold( int charaindex, int sGold, int *Gold) +{ + int MyGold, MyMaxGold; + + MyGold = CHAR_getInt( charaindex, CHAR_GOLD); + MyMaxGold = CHAR_getMaxHaveGold( charaindex); + + MyGold -= sGold; + if( MyGold < 0 || MyGold > MyMaxGold ){ + MyGold = (MyGold<0)?0:MyGold; + MyGold = (MyGold>MyMaxGold)?MyMaxGold:MyGold; + CHAR_setInt( charaindex, CHAR_GOLD, MyGold); + return FALSE; + } + CHAR_setInt( charaindex, CHAR_GOLD, MyGold); + *Gold = sGold; + return TRUE; +} + +BOOL TRADE_HandleTrade_AddItem( int charaindex, int *Item) +{ + int ret, i; + for( i=0; i<50; i++){ + if( Item[i] == -1 )break; + ret = CHAR_addItemSpecificItemIndex( charaindex, Item[i]); + if( ret < 0 || ret >= CHAR_MAXITEMHAVE ) { + int j; + for( j=i; j< 50; j++) + ITEM_endExistItemsOne( Item[j]); + return FALSE; + } + } + return TRUE; +} + +BOOL TRADE_HandleTrade_AddPet( int charaindex, int *Pet) +{ + int havepetelement, i; + for( i=0; i<5; i++){ + havepetelement = CHAR_getCharPetElement( charaindex); + if( Pet[i] == -1 ) break; + if( havepetelement < 0 ){ + int j; + for( j=i; j<5; j++){ + CHAR_endCharOneArray( Pet[j] ); + } + return FALSE; + + } + CHAR_setCharPet( charaindex, havepetelement, Pet[i]); + CHAR_setWorkInt( Pet[i], CHAR_WORKPLAYERINDEX, charaindex); + CHAR_setChar( Pet[i], CHAR_OWNERCDKEY, CHAR_getChar( charaindex, CHAR_CDKEY)); + CHAR_setChar( Pet[i], CHAR_OWNERCHARANAME, CHAR_getChar( charaindex, CHAR_NAME)); + CHAR_complianceParameter( Pet[i]); + } + return TRUE; +} + +BOOL TRADE_HandleTrade_AddGold( int charaindex, int sGold) +{ + int MyGold, MyMaxGold; + MyGold = CHAR_getInt( charaindex, CHAR_GOLD); + MyMaxGold = CHAR_getMaxHaveGold( charaindex); + + MyGold += sGold; + + MyGold = (MyGold<0)?0:MyGold; + MyGold = (MyGold>MyMaxGold)?MyMaxGold:MyGold; + + CHAR_setInt( charaindex, CHAR_GOLD, MyGold); + return TRUE; +} + +BOOL TRADE_HandleTrade( int meindex, STradeList *temp1, int toindex, STradeList *temp2 ) +{ + int MeMaxPile, ToMaxPile, ret; + int MeItem[50], ToItem[50]; + int MePet[5], ToPet[5]; + int MeGold=0, ToGold=0; + + MeMaxPile = CHAR_getMyMaxPilenum( meindex);//最大堆叠数 + ToMaxPile = CHAR_getMyMaxPilenum( toindex); + //移除meindex + //移除toindex + { + char buf[256]; + + memset( buf, 0, sizeof( buf)); + sprintf( buf, "A.%s[%s] trade B.%s[%s] FXY[%d,%d,%d]", + CHAR_getChar( meindex, CHAR_NAME), CHAR_getChar(meindex, CHAR_CDKEY), + CHAR_getChar( toindex, CHAR_NAME), CHAR_getChar(toindex, CHAR_CDKEY), + CHAR_getInt( meindex, CHAR_FLOOR), CHAR_getInt( meindex, CHAR_X), CHAR_getInt( meindex, CHAR_Y) ); + LogTrade(buf); + } + + //移除 + if( (ret=TRADE_HandleTrade_DelItem( meindex, MeMaxPile, ToMaxPile, temp1->ItemTi, temp1->ItemNum, ToItem ))== -1 ) return FALSE; + if( (ret=TRADE_HandleTrade_DelItem( toindex, ToMaxPile, MeMaxPile, temp2->ItemTi, temp2->ItemNum, MeItem ))== -1 ) return FALSE; + + if( (ret=TRADE_HandleTrade_DelPet( meindex, temp1->PetTi, ToPet)) == -1 ) return FALSE; + if( (ret=TRADE_HandleTrade_DelPet( toindex, temp2->PetTi, MePet)) == -1 ) return FALSE; + if( TRADE_HandleTrade_DelGold( meindex, temp1->Golds, &ToGold) == FALSE ) return FALSE; + if( TRADE_HandleTrade_DelGold( toindex, temp2->Golds, &MeGold) == FALSE ) return FALSE; + //加入 + if( TRADE_HandleTrade_AddItem( meindex, MeItem) == FALSE ) return FALSE; + if( TRADE_HandleTrade_AddItem( toindex, ToItem) == FALSE ) return FALSE; + if( TRADE_HandleTrade_AddPet( meindex, MePet) == FALSE) return FALSE; + if( TRADE_HandleTrade_AddPet( toindex, ToPet) == FALSE) return FALSE; + + TRADE_HandleTrade_AddGold( meindex, MeGold); + TRADE_HandleTrade_AddGold( toindex, ToGold); + + { + char buf1[4096], buf2[4096], buf[256]; + int i; + sprintf( buf1, "A.ITEM."); + sprintf( buf2, "B.ITEM."); + for( i=0; i<50; i++){ + if( ITEM_CHECKINDEX( ToItem[i]) ){ + sprintf( buf, "%s[%s]*%d,", + ITEM_getChar( ToItem[i], ITEM_NAME), ITEM_getChar( ToItem[i], ITEM_UNIQUECODE), + ITEM_getInt( ToItem[i], ITEM_USEPILENUMS) ); + strcat( buf1, buf); + } + if( ITEM_CHECKINDEX( MeItem[i]) ){ + sprintf( buf, "%s[%s]*%d,", + ITEM_getChar( MeItem[i], ITEM_NAME), ITEM_getChar( MeItem[i], ITEM_UNIQUECODE), + ITEM_getInt( MeItem[i], ITEM_USEPILENUMS) ); + strcat( buf2, buf); + } + } + strcat( buf1, "PET."); + strcat( buf2, "PET."); + for( i=0; i<5; i++){ + if( CHAR_CHECKINDEX( ToPet[i]) ){ + sprintf( buf, "%s[%s]%s-%d", + CHAR_getUseName( ToPet[i]), CHAR_getChar( ToPet[i], CHAR_UNIQUECODE), + CHAR_getChar( ToPet[i], CHAR_NAME), CHAR_getInt( ToPet[i], CHAR_LV) ); + strcat( buf1, buf); + } + if( CHAR_CHECKINDEX( MePet[i]) ){ + sprintf( buf, "%s[%s]%s-%d", + CHAR_getUseName( MePet[i]), CHAR_getChar( MePet[i], CHAR_UNIQUECODE), + CHAR_getChar( MePet[i], CHAR_NAME), CHAR_getInt( MePet[i], CHAR_LV) ); + strcat( buf2, buf); + } + } + sprintf( buf, "GOLD:%d", ToGold); + strcat( buf1, buf); + sprintf( buf, "GOLD:%d", MeGold); + strcat( buf2, buf); + LogTrade( buf1); + LogTrade( buf2); + } + + return TRUE; +} + +int TRADE_CheckItembuf(int fd, int meindex, int toindex, int tofd, char* mycharaname, char* tocharaname) +{ + int Tradeti; + STradeList TradeListTemp[2]; + if( TRADE_getMyTarget( meindex) != toindex ) return -1; + Tradeti = CONNECT_getTradeList( fd); + if( Tradeti <0 || Tradeti >= MAX_TRADELISTNUM ) return -1; + if( TradeList[Tradeti][0].use != 1 || TradeList[Tradeti][1].use != 1 ) return -1; + if( TRADE_getSomeTradeList( meindex, &TradeListTemp[0]) == FALSE ) return -1; + if( TRADE_getSomeTradeList( toindex, &TradeListTemp[1]) == FALSE ) return -1; + //确定空位 + if( TRADE_CheckTradeList( meindex, &TradeListTemp[0], toindex, &TradeListTemp[1]) == FALSE ) return -1; + //移除人物身上 + //加入人物身上 + if( TRADE_HandleTrade( meindex, &TradeListTemp[0], toindex, &TradeListTemp[1] ) == FALSE ) return -1; + //交易结束动作 + return 1; +} + +#else +/* +int TRADE_CheckItembuf(int fd, int meindex, int toindex, int tofd, char* mycharaname, char* tocharaname) +{ +#ifdef _TRADESYSTEM2 // (不可开) Syu ADD 新交易系统 + int myItem[42] = { -1 } ; //我方所有的交易内容编号 + int oppItem[42] = { -1 }; //对方所有的交易内容编号 + int ii , jj; + int Iitem1[15] = { 0 } ; //我方道具的index + int Iitem2[15] = { 0 } ; //对方道具的index + int ppet1[5] = { 0 } ; //我方宠物的index + int ppet2[5] = { 0 } ; //对方宠物的index + BOOL tradeflag = TRUE ; + int count = 0 ; +#endif + + char a[16], b[16], c[16], d[16], e[16], f[16]; + char g[16], h[16], i[16], j[16], k[16], l[16], token[16]; + int itemindex1 = 0, itemindex2 = 0, itemindex3 = 0; + int itemindex4 = 0, itemindex5 = 0, itemindex6 = 0; + int toitemindex1 = 0, toitemindex2 = 0, toitemindex3 = 0; + int toitemindex4 = 0, toitemindex5 = 0, toitemindex6 = 0; + int item1 = 0, item2 = 0, item4 = 0, item5 = 0, pet3 = 0, pet6 = 0; + int pet1 = 0, pet2 = 0; + int swapitem1 = 0, swapitem2 = 0, gold1 = 0, gold2 = 0; + char itembuf[256], toitembuf[256], buf[4048]; + + CONNECT_getTradeTmp(fd, itembuf, sizeof(itembuf)); + CONNECT_getTradeTmp(tofd, toitembuf, sizeof(toitembuf)); + + +#ifdef _TRADESYSTEM2 // (不可开) Syu ADD 新交易系统 + //取得我方所有交易内容编号 + for ( ii = 0 ; ii < 42 ; ii ++ ) { + if (getStringFromIndexWithDelim(itembuf, "|", 6 + ii * 2 , token, sizeof(token)) == TRUE) + myItem[ii] = atoi(token); + } + //取得对方所有交易内容编号 + for ( ii = 0 ; ii < 42 ; ii ++ ) { + if (getStringFromIndexWithDelim(toitembuf, "|", 6 + ii * 2 , token, sizeof(token)) == TRUE) + oppItem[ii] = atoi(token); + } +#else + // 比对双方之最後交易协定 + if (getStringFromIndexWithDelim(itembuf, "|", 5, token, sizeof(token)) == TRUE) + strcpy(a, token); + if (getStringFromIndexWithDelim(itembuf, "|", 6, token, sizeof(token)) == TRUE) + itemindex1 = atoi(token); + if (getStringFromIndexWithDelim(itembuf, "|", 7, token, sizeof(token)) == TRUE) + strcpy(b, token); + if (getStringFromIndexWithDelim(itembuf, "|", 8, token, sizeof(token)) == TRUE) + itemindex2 = atoi(token); + if (getStringFromIndexWithDelim(itembuf, "|", 9, token, sizeof(token)) == TRUE) + strcpy(c, token); + if (getStringFromIndexWithDelim(itembuf, "|", 10, token, sizeof(token)) == TRUE) + itemindex3 = atoi(token); + if (getStringFromIndexWithDelim(itembuf, "|", 11, token, sizeof(token)) == TRUE) + strcpy(d, token); + if (getStringFromIndexWithDelim(itembuf, "|", 12, token, sizeof(token)) == TRUE) + itemindex4 = atoi(token); + if (getStringFromIndexWithDelim(itembuf, "|", 13, token, sizeof(token)) == TRUE) + strcpy(e, token); + if (getStringFromIndexWithDelim(itembuf, "|", 14, token, sizeof(token)) == TRUE) + itemindex5 = atoi(token); + if (getStringFromIndexWithDelim(itembuf, "|", 15, token, sizeof(token)) == TRUE) + strcpy(f, token); + if (getStringFromIndexWithDelim(itembuf, "|", 16, token, sizeof(token)) == TRUE) + itemindex6 = atoi(token); + + if (getStringFromIndexWithDelim(toitembuf, "|", 5, token, sizeof(token)) == TRUE) + strcpy(g, token); + if (getStringFromIndexWithDelim(toitembuf, "|", 6, token, sizeof(token)) == TRUE) + toitemindex1 = atoi(token); + if (getStringFromIndexWithDelim(toitembuf, "|", 7, token, sizeof(token)) == TRUE) + strcpy(h, token); + if (getStringFromIndexWithDelim(toitembuf, "|", 8, token, sizeof(token)) == TRUE) + toitemindex2 = atoi(token); + if (getStringFromIndexWithDelim(toitembuf, "|", 9, token, sizeof(token)) == TRUE) + strcpy(i, token); + if (getStringFromIndexWithDelim(toitembuf, "|", 10, token, sizeof(token)) == TRUE) + toitemindex3 = atoi(token); + if (getStringFromIndexWithDelim(toitembuf, "|", 11, token, sizeof(token)) == TRUE) + strcpy(j, token); + if (getStringFromIndexWithDelim(toitembuf, "|", 12, token, sizeof(token)) == TRUE) + toitemindex4 = atoi(token); + if (getStringFromIndexWithDelim(toitembuf, "|", 13, token, sizeof(token)) == TRUE) + strcpy(k, token); + if (getStringFromIndexWithDelim(toitembuf, "|", 14, token, sizeof(token)) == TRUE) + toitemindex5 = atoi(token); + if (getStringFromIndexWithDelim(toitembuf, "|", 15, token, sizeof(token)) == TRUE) + strcpy(l, token); + if (getStringFromIndexWithDelim(toitembuf, "|", 16, token, sizeof(token)) == TRUE) + toitemindex6 = atoi(token); +#endif + +#ifdef _TRADESYSTEM2 // (不可开) Syu ADD 新交易系统 + //检查有无重复交易的道具 + for ( ii = 0 ; ii < 15 ; ii ++ ) { + for ( jj = ii + 1 ; jj < 15 ; jj ++ ) { + if ( myItem[ii] == myItem[jj] ) + if ( myItem[ii] != -1 ) + return -1 ; + } + } + for ( ii = 21 ; ii < 36 ; ii ++ ) { + for ( jj = ii + 1 ; jj < 36 ; jj++ ) { + if ( myItem[ii] == myItem[jj] ) + if ( myItem[ii] != -1 ) + return -1 ; + } + } +#else + // shan hjj add 洗道具 + if (itemindex1==itemindex2){ + if (itemindex1!=-1){ + return -1; + } + } + if (itemindex4==itemindex5){ + if (itemindex4!=-1){ + return -1; + } + } + // End +#endif + +#ifdef _TRADESYSTEM2 // (不可开) Syu ADD 新交易系统 + //比对双方交易的物品是否都正确 + for ( ii = 0 ; ii < 21 ; ii ++ ) { + if ( myItem[ii] != oppItem[ii+21] ) { + tradeflag = FALSE ; + break; + } + } + for ( ii = 21 ; ii < 42 ; ii ++ ){ + if ( myItem[ii] != oppItem[ii-21]) { + tradeflag = FALSE; + break; + } + } + //双方内容正确开始进行处理 + if ( tradeflag == TRUE ) { + //计算双方道具的加减 + for ( ii = 0 ; ii < 15 ; ii ++ ) { + if ( myItem[ii] != -1 ) { + swapitem1--; + swapitem2++; + } + } + for ( ii = 21 ; ii < 36 ; ii ++ ) { + if ( myItem[ii] != -1 ) { + swapitem1++; + swapitem2--; + } + } +#else + if ((strcmp(a, j) == 0) && (strcmp(b, k) == 0) && (strcmp(c,l) == 0) + && (strcmp(d, g) == 0) && (strcmp(e, h) == 0) && (strcmp(f, i) == 0) + && (itemindex1 == toitemindex4) && (itemindex2 == toitemindex5) + && (itemindex3 == toitemindex6) && (itemindex4 == toitemindex1) + && (itemindex5 == toitemindex2) && (itemindex6 == toitemindex3)) + { + // 检验双方物品栏是否有空位 + if ((strcmp(a, "I") == 0) && (itemindex1 != -1)){ + swapitem1--; + swapitem2++; + } + if ((strcmp(b, "I") == 0) && (itemindex2 != -1)){ + swapitem1--; + swapitem2++; + } + if ((strcmp(d, "I") == 0) && (itemindex4 != -1)){ + swapitem1++; + swapitem2--; + } + if ((strcmp(e, "I") == 0) && (itemindex5 != -1)){ + swapitem1++; + swapitem2--; + } +#endif + if (swapitem1 > CHAR_findTotalEmptyItem(meindex)) + return -2; + toindex = CONNECT_getCharaindex(tofd); + if (!CHAR_CHECKINDEX(toindex)) return -1; + if (swapitem2 > CHAR_findTotalEmptyItem(toindex)) + return -3; +#ifdef _TRADESYSTEM2 // (不可开) Syu ADD 新交易系统 + //取得交换的金钱 + if ( myItem[20] != -1 ) gold1 += myItem[20] ; + if ( myItem[41] != -1 ) gold2 += myItem[41] ; +#else + // 检查双方金钱 + if ((strcmp(a, "G") == 0) && (itemindex1 != -1)) gold1 += itemindex1; + if ((strcmp(b, "G") == 0) && (itemindex2 != -1)) gold1 += itemindex2; + if ((strcmp(d, "G") == 0) && (itemindex4 != -1)) gold2 += itemindex4; + if ((strcmp(e, "G") == 0) && (itemindex5 != -1)) gold2 += itemindex5; +#endif + if (gold1 > CHAR_getMaxHaveGold( meindex) ) return -4; + if (gold1 > CHAR_getInt(meindex, CHAR_GOLD)) return -5; + if (gold2 > CHAR_getMaxHaveGold( toindex)) return -6; + if (gold2 > CHAR_getInt(toindex, CHAR_GOLD)) return -7; + if ((gold2 + CHAR_getInt(meindex, CHAR_GOLD) - gold1) > CHAR_getMaxHaveGold( meindex) ) return -8; + if ((gold1 + CHAR_getInt(toindex, CHAR_GOLD) - gold2) > CHAR_getMaxHaveGold( toindex)) return -9; + +#ifdef _TRADESYSTEM2 // (不可开) Syu ADD 新交易系统 + //计算双方宠物的加减 + for ( ii = 15 ; ii < 20 ; ii ++ ) { + if ( myItem[ii] != -1 ) { + pet1--; + pet2++; + } + } + for ( ii = 36 ; ii < 41 ; ii ++ ) { + if ( myItem[ii] != -1 ) { + pet1++; + pet2--; + } + } +#else + // 检查双方宠物 + if ((strcmp(c, "P") == 0) && (itemindex3 != -1)) + { + pet1--; pet2++; + } + if ((strcmp(f, "P") == 0) && (itemindex6 != -1)) + { + pet1++; pet2--; + } +#endif + +#ifdef _TRADESYSTEM2 // (不可开) Syu ADD 新交易系统 + if ((pet1 > 5) || (pet2 > 5)) return -10; + //取得双方身上能放的宠物数量 + for( ii = 0; ii < CHAR_MAXPETHAVE; ii ++ ) { + if( CHAR_getCharPet( meindex , ii ) == -1 ) count ++ ; + } + if ( pet1 > count ) return -10; + count = 0 ; + for( ii = 0; ii < CHAR_MAXPETHAVE; ii ++ ) { + if( CHAR_getCharPet( toindex , ii ) == -1 ) count ++ ; + } + if ( pet2 > count ) return -11; +#else + if ((pet1 > 1) || (pet2 > 1)) return -10; + if ((pet1 == 1) && (CHAR_getCharPetElement( meindex) == -1)) return -10; + if ((pet2 == 1) && (CHAR_getCharPetElement( toindex) == -1)) return -11; +#endif +#ifdef _TRADESYSTEM2 // (不可开) Syu ADD 新交易系统 + //取得所有欲交易的道具index + for ( ii = 0 ; ii < 15 ; ii ++ ) { + if ( myItem[ii] != -1 ) + Iitem1[ii] = CHAR_getItemIndex(meindex, myItem[ii]); + else + Iitem1[ii] = -1 ; + if ( myItem[ii + 21 ] != -1 ) + Iitem2[ii] = CHAR_getItemIndex(toindex, myItem[ii + 21]); + else + Iitem2[ii] = -1 ; + } +#else + if ((strcmp(a, "I") == 0) && (itemindex1 != -1)) + item1 = CHAR_getItemIndex(meindex, itemindex1); + else item1 = -1; + if ((strcmp(b, "I") == 0) && (itemindex2 != -1)) + item2 = CHAR_getItemIndex(meindex, itemindex2); + else item2 = -1; + if ((strcmp(d, "I") == 0) && (itemindex4 != -1)) + item4 = CHAR_getItemIndex(toindex, itemindex4); + else item4 = -1; + if ((strcmp(e, "I") == 0) && (itemindex5 != -1)) + item5 = CHAR_getItemIndex(toindex, itemindex5); + else item5 = -1; +#endif +#ifdef _TRADESYSTEM2 // (不可开) Syu ADD 新交易系统 + //取得欲交易宠物的index + for ( ii = 15 ; ii < 20 ; ii ++ ) { + if ( myItem[ii] != -1 ) { + if ( CHAR_getInt( meindex , CHAR_RIDEPET) == myItem[ii] ) + return -1 ; + ppet1[ii - 15 ] = CHAR_getCharPet( meindex , myItem[ii] ) ; + } + else + ppet1[ii - 15 ] = -1 ; + } + for ( ii = 36 ; ii < 41 ; ii ++ ) { + if ( myItem[ii] != -1 ) { + if ( CHAR_getInt( toindex , CHAR_RIDEPET) == myItem[ii] ) + return -1 ; + ppet2[ ii - 36 ] = CHAR_getCharPet( toindex , myItem[ii] ) ; + } + else + ppet2[ ii - 36 ] = -1 ; + } +#else + if (itemindex3 != -1) + { + if( CHAR_getInt( meindex, CHAR_RIDEPET) == itemindex3 ) + return -1; + pet3 = CHAR_getCharPet(meindex, itemindex3); + } + else pet3 = -1; + if (itemindex6 != -1) + { + if( CHAR_getInt( toindex, CHAR_RIDEPET) == itemindex6 ) + return -1; + pet6 = CHAR_getCharPet(toindex, itemindex6); + } + else pet6 = -1; +#endif + + + +#ifdef _TRADESYSTEM2 // (不可开) Syu ADD 新交易系统 + for ( ii = 0 ; ii < 15 ; ii ++ ) { + if ( ITEM_getInt( Iitem1[ii] , ITEM_VANISHATDROP ) == 1 ) + return -12 ; + if ( ITEM_getInt( Iitem2[ii] , ITEM_VANISHATDROP ) == 1 ) + return -12 ; + } +#else + if ((ITEM_getInt(item1, ITEM_VANISHATDROP) == 1)|| + (ITEM_getInt(item2, ITEM_VANISHATDROP) == 1)|| + (ITEM_getInt(item4, ITEM_VANISHATDROP) == 1)|| + (ITEM_getInt(item5, ITEM_VANISHATDROP) ==1)) + return -12; +#endif + + +#ifdef _TRADESYSTEM2 // (不可开) Syu ADD 新交易系统 + //宠物等级能否交易判断 + if( CHAR_getWorkInt( meindex, CHAR_PickAllPet) != TRUE ) { + for ( ii = 0 ; ii < 5 ; ii ++ ) { + if ( (ppet2[ii] != -1 ) && ( CHAR_getInt( ppet2[ii] , CHAR_LV ) + - CHAR_getInt(meindex, CHAR_LV) > 5) + && (CHAR_getInt(meindex,CHAR_TRANSMIGRATION) <= 0)) + return -13 ; + } + } + if( CHAR_getWorkInt( toindex, CHAR_PickAllPet) != TRUE ) { + for ( ii = 0 ; ii < 5 ; ii ++ ) { + if ( (ppet1[ii] != -1 ) && ( CHAR_getInt( ppet1[ii] , CHAR_LV ) + - CHAR_getInt(toindex, CHAR_LV) > 5) + && (CHAR_getInt(toindex,CHAR_TRANSMIGRATION) <= 0)) + return -13 ; + } + } +#else + if( CHAR_getWorkInt( meindex, CHAR_PickAllPet) != TRUE ) { + if ((pet6 != -1) && (CHAR_getInt(pet6, CHAR_LV) + - CHAR_getInt(meindex, CHAR_LV) > 5) + && (CHAR_getInt(meindex,CHAR_TRANSMIGRATION) <= 0)) + return -13; + + } + if( CHAR_getWorkInt( toindex, CHAR_PickAllPet) != TRUE ) { + + if ((pet3 != -1) && (CHAR_getInt(pet3, CHAR_LV) + - CHAR_getInt(toindex, CHAR_LV) > 5) + && (CHAR_getInt(toindex,CHAR_TRANSMIGRATION) <= 0)) + return -14; + } +#endif +#ifdef _TRADESYSTEM2 // (不可开) Syu ADD 新交易系统 + //是否为家族守护兽 + for ( ii = 0 ; ii < 5 ; ii ++ ) { + if ( ( ppet1[ii] != -1 ) && (CHAR_getInt(ppet1[ii], CHAR_PETFAMILY) == 1)) + return -15; + if ( ( ppet2[ii] != -1 ) && (CHAR_getInt(ppet2[ii], CHAR_PETFAMILY) == 1)) + return -15; + } +#else + if ((pet6 != -1) && (CHAR_getInt(pet6, CHAR_PETFAMILY) == 1)) + return -15; + if ((pet3 != -1) && (CHAR_getInt(pet3, CHAR_PETFAMILY) == 1)) + return -15; +#endif + +#ifdef _TRADESYSTEM2 // (不可开) Syu ADD 新交易系统 + // 交换玩家道具、金钱、宠物 + for ( ii = 0 ; ii < 15 ; ii ++ ) { + TRADE_ChangeItem(meindex, toindex, "I", "I", Iitem1[ii], Iitem2[ii], + myItem[ii], oppItem[ii]); + } + for ( ii = 15 ; ii < 20 ; ii ++ ) { + TRADE_ChangeItem(meindex, toindex, "P", "P", ppet1[ii - 15 ], ppet2[ii-15], + myItem[ii], oppItem[ii]); + } + TRADE_ChangeItem(meindex, toindex, "G", "G", Iitem1[20], Iitem2[41], + myItem[20], oppItem[20]); +#else + TRADE_ChangeItem(meindex, toindex, a, d, item1, item4, + itemindex1, itemindex4); + TRADE_ChangeItem(meindex, toindex, b, e, item2, item5, + itemindex2, itemindex5); + TRADE_ChangeItem(meindex, toindex, c, f, pet3, pet6, + itemindex3, itemindex6); +#endif + + // 写入 trade.log + { + char petname1[256], petname2[256]; + int pet1lv, pet2lv; + int logitem1 = 0, logitem2 = 0, logitem4 = 0, logitem5 = 0; + + if ((strcmp(a, "I") == 0) && (item1 != -1)) logitem1 = ITEM_getInt(item1, ITEM_ID); + if ((strcmp(b, "I") == 0) && (item2 != -1)) logitem2 = ITEM_getInt(item2, ITEM_ID); + if ((strcmp(a, "G") == 0) && (item1 == -1)) logitem1 = itemindex1; + if ((strcmp(b, "G") == 0) && (item2 == -1)) logitem2 = itemindex2; + if ((strcmp(c, "P") == 0) && (pet3 == -1)) + { + sprintf(petname1, "NONE"); + pet1lv = 0; + } + else + { + sprintf(petname1, "%s", CHAR_getChar(pet3, CHAR_NAME)); + pet1lv = CHAR_getInt(pet3, CHAR_LV); + } + if ((strcmp(f, "P") == 0) && (pet6 == -1)) + { + sprintf(petname2, "NONE"); + pet2lv = 0; + } + else + { + sprintf(petname2, "%s", CHAR_getChar(pet6, CHAR_NAME)); + pet2lv = CHAR_getInt(pet6, CHAR_LV); + } + if ((strcmp(d, "I") == 0) && (item4 != -1)) logitem4 = ITEM_getInt(item4, ITEM_ID); + if ((strcmp(e, "I") == 0) && (item5 != -1)) logitem5 = ITEM_getInt(item5, ITEM_ID); + if ((strcmp(d, "G") == 0) && (item4 == -1)) logitem4 = itemindex4; + if ((strcmp(e, "G") == 0) && (item5 == -1)) logitem5 = itemindex5; + sprintf(buf, "%s\t%s\t(%s[%d,%s],%s[%d,%s],%s[%s,%d,%s]) <-> %s\t%s\t(%s[%d,%s],%s[%d,%s],%s[%s,%d,%s])", + CHAR_getChar(meindex, CHAR_CDKEY), mycharaname, + a, logitem1, ITEM_getChar( item1, ITEM_UNIQUECODE), b, logitem2, ITEM_getChar( item2, ITEM_UNIQUECODE), + c, petname1, pet1lv, CHAR_getChar( pet3, CHAR_UNIQUECODE), + CHAR_getChar(toindex, CHAR_CDKEY), tocharaname, + d, logitem4, ITEM_getChar( item4, ITEM_UNIQUECODE), e, logitem5, ITEM_getChar( item5, ITEM_UNIQUECODE), + f, petname2, pet2lv, CHAR_getChar( pet6, CHAR_UNIQUECODE)); + LogTrade(buf); + } + + return 1; + }// if + else + return 2; +} +*/ +#endif +/* +BOOL TRADE_ChangeItem(int meindex, int toindex, char *a, char *b, + int item1, int item2, int itemindex1, int itemindex2) +{ + int gold1 = 0, gold2 = 0, eptitem = -1; + if (CHAR_CHECKINDEX(meindex) == FALSE) return FALSE; + if (CHAR_CHECKINDEX(toindex) == FALSE) return FALSE; + // 道具 <-> 道具 + if ((strcmp(a, "I") == 0) && (strcmp(b, "I") == 0)) + { + // 无 <-> 道具 + if ((itemindex1 == -1) && (itemindex2 > 0)) + { + if (ITEM_CHECKINDEX(item2) == FALSE) return FALSE; + eptitem = CHAR_findEmptyItemBox(meindex); + if (eptitem < 0) return FALSE; + CHAR_setItemIndex(meindex, eptitem, item2); + ITEM_setWorkInt(item2, ITEM_WORKCHARAINDEX, meindex); + ITEM_setWorkInt(item2, ITEM_WORKOBJINDEX, -1); + CHAR_setItemIndex(toindex, itemindex2, -1); + } + // 道具 <-> 无 + else if ((itemindex1 > 0) && (itemindex2 == -1)) + { + if (ITEM_CHECKINDEX(item1) == FALSE) return FALSE; + eptitem = CHAR_findEmptyItemBox(toindex); + if (eptitem < 0) return FALSE; + CHAR_setItemIndex(toindex, eptitem, item1); + ITEM_setWorkInt(item1, ITEM_WORKCHARAINDEX, toindex); + ITEM_setWorkInt(item1, ITEM_WORKOBJINDEX, -1); + CHAR_setItemIndex(meindex, itemindex1, -1); + } + // 道具 <-> 道具 + else if (itemindex1 > 0 && itemindex2 > 0) + { + if (ITEM_CHECKINDEX(item1) == FALSE) return FALSE; + if (ITEM_CHECKINDEX(item2) == FALSE) return FALSE; + ITEM_setWorkInt(item1, ITEM_WORKCHARAINDEX, toindex); + ITEM_setWorkInt(item1, ITEM_WORKOBJINDEX, -1); + ITEM_setWorkInt(item2, ITEM_WORKCHARAINDEX, meindex); + ITEM_setWorkInt(item2, ITEM_WORKOBJINDEX, -1); + CHAR_setItemIndex(toindex, itemindex2, item1); + CHAR_setItemIndex(meindex, itemindex1, item2); + } + } + // 道具 <-> 金钱 + else if ((strcmp(a, "I") == 0) && (strcmp(b, "G") == 0)) + { + if (itemindex1 > 0) + { + if (ITEM_CHECKINDEX(item1) == FALSE) return FALSE; + eptitem = CHAR_findEmptyItemBox(toindex); + if (eptitem < 0) return FALSE; + ITEM_setWorkInt(item1, ITEM_WORKCHARAINDEX, toindex); + ITEM_setWorkInt(item1, ITEM_WORKOBJINDEX, -1); + CHAR_setItemIndex(toindex, eptitem, item1); + CHAR_setItemIndex(meindex, itemindex1, -1); + } + if (itemindex2 < 0) itemindex2 = 0; + gold1 = CHAR_getInt(meindex, CHAR_GOLD); + gold1 += itemindex2; + CHAR_setInt(meindex, CHAR_GOLD, gold1); + gold2 = CHAR_getInt(toindex, CHAR_GOLD); + gold2 -= itemindex2; + CHAR_setInt(toindex, CHAR_GOLD, gold2); + } + // 金钱 <-> 道具 + else if ((strcmp(a, "G") == 0) && (strcmp(b, "I") == 0)) + { + if (itemindex2 > 0) + { + if (ITEM_CHECKINDEX(item2) == FALSE) return FALSE; + eptitem = CHAR_findEmptyItemBox(meindex); + if (eptitem < 0) return FALSE; + ITEM_setWorkInt(item2, ITEM_WORKCHARAINDEX, meindex); + ITEM_setWorkInt(item2, ITEM_WORKOBJINDEX, -1); + CHAR_setItemIndex(meindex, eptitem, item2); + CHAR_setItemIndex(toindex, itemindex2, -1); + } + if (itemindex1 < 0) itemindex1 = 0; + gold1 = CHAR_getInt(meindex, CHAR_GOLD); + gold1 -= itemindex1; + CHAR_setInt(meindex, CHAR_GOLD, gold1); + gold2 = CHAR_getInt(toindex, CHAR_GOLD); + gold2 += itemindex1; + CHAR_setInt(toindex, CHAR_GOLD, gold2); + } + // 金钱 <-> 金钱 + else if ((strcmp(a, "G") == 0) && (strcmp(b, "G") == 0)) + { + if (itemindex1 < 0) itemindex1 = 0; + if (itemindex2 < 0) itemindex2 = 0; + gold1 = CHAR_getInt(toindex, CHAR_GOLD); + gold1 = gold1 + itemindex1 - itemindex2; + CHAR_setInt(toindex, CHAR_GOLD, gold1); + gold2 = CHAR_getInt(meindex, CHAR_GOLD); + gold2 = gold2 + itemindex2 - itemindex1; + CHAR_setInt(meindex, CHAR_GOLD, gold2); + } + // 宠物 <-> 宠物 + else if ((strcmp(a, "P") == 0) && (strcmp(b, "P") == 0)) + { + char category[8]; + if ((item1 != -1) && (CHAR_CHECKINDEX(item1) == FALSE)) return FALSE; + if ((item2 != -1) && (CHAR_CHECKINDEX(item2) == FALSE)) return FALSE; + + if ((itemindex1 != -1) && (itemindex1 == CHAR_getInt(meindex, CHAR_DEFAULTPET))) + { + int fd; + CHAR_setInt(meindex, CHAR_DEFAULTPET, -1); + fd = getfdFromCharaIndex(meindex); + if (fd != -1){ + CHAR_setWorkInt( meindex, CHAR_WORK_PET0_STAT+itemindex1-1, 0); + lssproto_KS_send(fd, itemindex1, 0); + } + } + if ((itemindex2 != -1)&& (itemindex2 == CHAR_getInt(toindex, CHAR_DEFAULTPET))) + { + int tofd; + CHAR_setInt(toindex, CHAR_DEFAULTPET, -1); + tofd = getfdFromCharaIndex(toindex); + if (tofd != -1){ + CHAR_setWorkInt( toindex, CHAR_WORK_PET0_STAT+itemindex1-1, 0); + lssproto_KS_send(tofd, itemindex2, 0); + } + } + + if (item1 != -1) + CHAR_setWorkInt(item1, CHAR_WORKPLAYERINDEX, toindex); + if (item2 != -1) + CHAR_setWorkInt(item2, CHAR_WORKPLAYERINDEX, meindex); + if (itemindex1 == -1) + itemindex1 = CHAR_getCharPetElement( meindex); + if (itemindex2 == -1) + itemindex2 = CHAR_getCharPetElement( toindex); + CHAR_setCharPet(meindex, itemindex1, item2); + CHAR_setCharPet(toindex, itemindex2, item1); + if ((itemindex1 != -1) && (item1 != -1)) { + + CHAR_setChar(item1, CHAR_OWNERCDKEY, + CHAR_getChar(toindex, CHAR_CDKEY)); + CHAR_setChar(item1, CHAR_OWNERCHARANAME, + CHAR_getChar(toindex, CHAR_NAME)); + + CHAR_complianceParameter(item1); + CHAR_setInt(item1, CHAR_PUTPETTIME, 0); + } + if ((itemindex2 != -1) && (item2 != -1)) { + + CHAR_setChar(item2, CHAR_OWNERCDKEY, + CHAR_getChar(meindex, CHAR_CDKEY)); + CHAR_setChar(item2, CHAR_OWNERCHARANAME, + CHAR_getChar(meindex, CHAR_NAME)); + + CHAR_complianceParameter(item2); + CHAR_setInt(item2, CHAR_PUTPETTIME, 0); + } + snprintf(category, sizeof(category), "K%d", itemindex1); + CHAR_sendStatusString(meindex, category); + snprintf(category, sizeof(category), "W%d", itemindex1); + CHAR_sendStatusString(meindex, category); + snprintf(category, sizeof(category), "K%d", itemindex2); + CHAR_sendStatusString(toindex, category); + snprintf(category, sizeof(category), "W%d", itemindex2); + CHAR_sendStatusString(toindex, category); + } + return TRUE; +} +*/ +BOOL TRADE_HandleItem( int meindex, int showindex, char *message, char *outmess) +{ + char token[256]; + int item, itemindex; + int fd = getfdFromCharaIndex( meindex ); + + if( CONNECT_get_confirm( fd) == TRUE ) return FALSE; + + if( CHAR_getWorkInt( meindex, CHAR_WORKTRADEMODE) != CHAR_TRADE_TRADING + || CHAR_getWorkInt( meindex, CHAR_WORKTRADEMODE) == CHAR_TRADE_LOCK ) + return FALSE; + + if( getStringFromIndexWithDelim( message, "|", 6, token, sizeof( token)) == FALSE) return FALSE; + item = atoi( token); + if( item < CHAR_STARTITEMARRAY || item > CHAR_MAXITEMHAVE ){ + return FALSE; + } + itemindex = CHAR_getItemIndex(meindex, item); + if( !ITEM_CHECKINDEX( itemindex)) return FALSE; + + { + char itemname[256], tmpbuf[256], tmpbuf1[256]; + int crushe; + +#ifdef _ITEM_PILEFORTRADE + int nums = 0; + if( TRADE_addSomeTradeList( meindex, item, &nums, TRADE_ITEM) == FALSE ){ + return FALSE; + } +#endif + strcpy( itemname, ITEM_getChar(itemindex, ITEM_SECRETNAME));//ITEM_NAME + crushe = ITEM_getItemDamageCrusheED( itemindex); + sprintf( token, "不会损坏"); + + if( crushe >= 0 ) snprintf( token, sizeof(token), "%d%%", crushe ); +#ifdef _ITEM_PILENUMS + sprintf( outmess, "%d|%s|%s|%s|%d|%s|%d", +#else + sprintf( outmess, "%d|%s|%s|%d|%s", +#endif + ITEM_getInt( itemindex, ITEM_BASEIMAGENUMBER), + makeEscapeString( ITEM_getChar( itemindex, ITEM_NAME), tmpbuf1, sizeof(tmpbuf1)), + makeEscapeString( itemname, tmpbuf, sizeof(tmpbuf)), + ITEM_getChar(itemindex,ITEM_EFFECTSTRING), item, token +#ifdef _ITEM_PILEFORTRADE + ,nums +#endif + ); + } + return TRUE; +} + +BOOL TRADE_HandleGold( int meindex, int showindex, char *message, char *outmess) +{ + int gold, tmpgold; + char token[256]; + int fd = getfdFromCharaIndex( meindex ); + if(CONNECT_get_confirm( fd)==TRUE)return FALSE; + if (CHAR_getWorkInt(meindex, CHAR_WORKTRADEMODE) != CHAR_TRADE_TRADING + || CHAR_getWorkInt(meindex, CHAR_WORKTRADEMODE) == CHAR_TRADE_LOCK) + return FALSE; + tmpgold = CHAR_getInt(meindex, CHAR_GOLD); + if (getStringFromIndexWithDelim(message, "|", 6, token, sizeof(token)) == FALSE) return FALSE; + if( (gold = atoi(token)) < 0 ) return FALSE; + if( gold > tmpgold )return FALSE; +#ifdef _ITEM_PILEFORTRADE + if( TRADE_addSomeTradeList( meindex, gold, NULL, TRADE_GOLD) == FALSE ) return FALSE; +#endif + sprintf( outmess, "%d", gold); + return TRUE; +} + +BOOL TRADE_HandlePet( int meindex, int showindex, char *message, char *outmess) +{ + int havepetindex, petindex; + char token[256], buf[256]; + int fd = getfdFromCharaIndex( meindex ); + if(CONNECT_get_confirm( fd)==TRUE)return FALSE; + if (CHAR_getWorkInt(meindex, CHAR_WORKTRADEMODE) != CHAR_TRADE_TRADING + || CHAR_getWorkInt(meindex, CHAR_WORKTRADEMODE) == CHAR_TRADE_LOCK) + return FALSE; + if (getStringFromIndexWithDelim(message, "|", 6, token, sizeof(token)) == FALSE) return FALSE; + if( (havepetindex = atoi(token)) < 0 ) return FALSE; + petindex = CHAR_getCharPet(meindex, havepetindex); + if( !CHAR_CHECKINDEX(petindex)) return FALSE; + +#ifdef _ITEM_PILEFORTRADE + if( TRADE_addSomeTradeList( meindex, havepetindex, NULL, TRADE_PET) == FALSE ) return FALSE; +#endif + sprintf( token, "%d|%s|%d|%d|%d|%d|%d|%d", + CHAR_getInt( petindex, CHAR_BASEIMAGENUMBER), + makeEscapeString( CHAR_getUseName(petindex), buf, sizeof(buf)), + CHAR_getInt( petindex, CHAR_LV), + CHAR_getWorkInt( petindex, CHAR_WORKATTACKPOWER), + CHAR_getWorkInt( petindex, CHAR_WORKDEFENCEPOWER), + CHAR_getWorkInt( petindex, CHAR_WORKQUICK), + havepetindex, + CHAR_getInt( petindex , CHAR_TRANSMIGRATION)); + +#ifdef _TRADESYSTEM2 + { + int i; + char skillname[7][256]; + char buf1[256],buf2[256]; + for( i=0; i<7; i++){ + int skillarray, skillID; + memset( skillname[i], 0, sizeof(skillname[i])); + skillID = CHAR_getPetSkill( petindex, i); + skillarray = PETSKILL_getPetskillArray( skillID); + if( !PETSKILL_CHECKINDEX( skillarray)) continue; + sprintf( skillname[i], "%s", PETSKILL_getChar( skillarray, PETSKILL_NAME) ); + } +#ifdef _SHOW_FUSION + sprintf( outmess , "%s|%d|%d|%s|%s|%s|%s|%s|%s|%s|%s|%s|%d", +#else + sprintf( outmess , "%s|%d|%d|%s|%s|%s|%s|%s|%s|%s|%s|%s", +#endif + token , CHAR_getWorkInt(petindex , CHAR_WORKMAXHP) , CHAR_getInt(petindex , CHAR_SLOT), + skillname[0] , skillname[1] , skillname[2] , skillname[3] , + skillname[4] , skillname[5] , skillname[6] , + makeEscapeString( CHAR_getChar( petindex, CHAR_NAME ), buf1, sizeof(buf1)), + makeEscapeString( CHAR_getUseName( petindex), buf2, sizeof(buf2)) +#ifdef _SHOW_FUSION + ,CHAR_getInt ( petindex, CHAR_FUSIONBEIT) ) ; +#else + ); +#endif + } +#else + sprintf( outmess , "%s|%d", token , CHAR_getWorkInt(petindex , CHAR_WORKMAXHP) ); +#endif //_TRADESYSTEM2 + return TRUE; +} + +#ifdef _ITEM_PILEFORTRADE +BOOL TRADE_CheckTradeList( int meindex, STradeList *temp1, int toindex, STradeList *temp2) +{ + int i; + int MeSurplus=0, MeNeeds=0, MeMaxPile; + int ToSurplus=0, ToNeeds=0, ToMaxPile; + + + MeMaxPile = CHAR_getMyMaxPilenum( meindex);//最大堆叠数 + ToMaxPile = CHAR_getMyMaxPilenum( toindex); + + MeSurplus = CHAR_findSurplusItemBox( meindex); + ToSurplus = CHAR_findSurplusItemBox( toindex); + //道具 + ToNeeds=0; MeNeeds=0; + for( i=0; i<15; i++ ){ + int pilenum, itemindex; + if( temp1->ItemTi[i] == -1 ) continue; + itemindex = CHAR_getItemIndex( meindex, temp1->ItemTi[i] ); + if( !ITEM_CHECKINDEX( itemindex)) return FALSE; + pilenum = ITEM_getInt( itemindex, ITEM_USEPILENUMS); + if( temp1->ItemNum[i] == pilenum ){ + MeSurplus++; + } + if( temp1->ItemNum[i] > ToMaxPile ){ + ToNeeds += (temp1->ItemNum[i]/ToMaxPile) + 1; + }else{ + ToNeeds++; + } + } + for( i=0; i<15; i++ ){ + int pilenum, itemindex; + if( temp2->ItemTi[i] == -1 ) continue; + itemindex = CHAR_getItemIndex( toindex, temp2->ItemTi[i] ); + if( !ITEM_CHECKINDEX( itemindex)) return FALSE; + pilenum = ITEM_getInt( itemindex, ITEM_USEPILENUMS); + if( temp2->ItemNum[i] == pilenum){ + ToSurplus++; + } + if( temp2->ItemNum[i] > MeMaxPile ){ + MeNeeds += (temp2->ItemNum[i]/MeMaxPile) + 1; + }else { + MeNeeds++; + } + } + + if( MeSurplus < MeNeeds ){ + CHAR_talkToCli( meindex, -1, "交易後物品栏位不足。", CHAR_COLORYELLOW); + CHAR_talkToCli( toindex, -1, "对方交易後物品栏位不足。", CHAR_COLORYELLOW); + return FALSE; + } + if( ToSurplus < ToNeeds ){ + CHAR_talkToCli( toindex, -1, "交易後物品栏位不足。", CHAR_COLORYELLOW); + CHAR_talkToCli( meindex, -1, "对方交易後物品栏位不足。", CHAR_COLORYELLOW); + return FALSE; + } + + //宠物 + MeSurplus = CHAR_findSurplusPetBox( meindex); + ToSurplus = CHAR_findSurplusPetBox( toindex); + ToNeeds=0; MeNeeds=0; + for( i=0; i<5; i++ ){ + int petindex; + if( temp1->PetTi[i] == -1 ) continue; + petindex = CHAR_getCharPet( meindex, temp1->PetTi[i] ); + if( !CHAR_CHECKINDEX( petindex)) return FALSE; + MeSurplus++; + ToNeeds++; + } + for( i=0; i<5; i++ ){ + int petindex; + if( temp2->PetTi[i] == -1 ) continue; + petindex = CHAR_getCharPet( toindex, temp2->PetTi[i] ); + if( !CHAR_CHECKINDEX( petindex)) return FALSE; + ToSurplus++; + MeNeeds++; + } + + if( MeSurplus < MeNeeds ){ + CHAR_talkToCli( meindex, -1, "交易後宠物栏位不足。", CHAR_COLORYELLOW); + CHAR_talkToCli( toindex, -1, "对方交易後宠物栏位不足。", CHAR_COLORYELLOW); + return FALSE; + } + if( ToSurplus < ToNeeds ){ + CHAR_talkToCli( meindex, -1, "对方交易後宠物栏位不足。", CHAR_COLORYELLOW); + CHAR_talkToCli( toindex, -1, "交易後宠物栏位不足。", CHAR_COLORYELLOW); + return FALSE; + } + + //金钱 + MeMaxPile = CHAR_getMaxHaveGold( meindex); + ToMaxPile = CHAR_getMaxHaveGold( toindex); + MeSurplus = MeMaxPile - CHAR_getInt( meindex, CHAR_GOLD); + ToSurplus = ToMaxPile - CHAR_getInt( toindex, CHAR_GOLD); + ToNeeds=0; MeNeeds=0; + MeSurplus += temp1->Golds; + ToSurplus += temp2->Golds; + ToNeeds = temp1->Golds; + MeNeeds = temp2->Golds; + if( MeSurplus < MeNeeds ){ + CHAR_talkToCli( meindex, -1, "交易後石币超过上限。", CHAR_COLORYELLOW); + CHAR_talkToCli( toindex, -1, "对方交易後石币超过上限。", CHAR_COLORYELLOW); + return FALSE; + } + if( ToSurplus < ToNeeds ){ + CHAR_talkToCli( meindex, -1, "对方交易後石币超过上限。", CHAR_COLORYELLOW); + CHAR_talkToCli( toindex, -1, "交易後石币超过上限。", CHAR_COLORYELLOW); + return FALSE; + } + return TRUE; +} +#endif diff --git a/gmsv/configfile.c b/gmsv/configfile.c new file mode 100644 index 0000000..8f4c1f2 --- /dev/null +++ b/gmsv/configfile.c @@ -0,0 +1,2676 @@ +#define __CONFIGFILE_C__ +#include "version.h" +#include +#include +#include +#include + +#include "util.h" +//#include "configfile.h" +//ttom +#include "lssproto_util.h" +#include "configfile.h" +#include "net.h" +//ttom end +#include "npcutil.h" +// Arminius 7.12 login announce +#include "char.h" +#include "char_data.h" +// CoolFish: add +#include "lssproto_serv.h" + +#include "npc_raceman.h" + +/* 涩烂毛忡 允月厌瞻 */ +typedef struct tagConfig +{ + /*皿夫弘仿丞 (愤 读卞菲户凶中仃升引分蛲 */ + char progname[8]; + + char configfilename[32]; /* config白央奶伙 */ + unsigned char debuglevel; /* 犯田永弘伊矛伙 */ + + unsigned int usememoryunit; /*丢乒伉及交瓦永玄扔奶术 */ + unsigned int usememoryunitnum; /*丢乒伉及交瓦永玄醒 */ + + char asname[32]; /*失市它件玄扔□田及 蟆*/ + unsigned short acservport; /*失市它件玄扔□田及禾□玄 */ + char acpasswd[32]; /*失市它件玄扔□田尺及由旦伐□玉*/ + char gsnamefromas[32]; /* + * 失市它件玄扔□田井日苇尹月 + * 必□丞扔□田午仄化及 蟆 + */ + + // Arminius 7.24 manor pk + char gsid[32]; // game server chinese id +#ifdef _SERVICE + // Terry 2001/10/03 + char apid[32]; // service ap id + unsigned short apport; //service ap port + int looptime; // 几秒後设定离开 + int enableservice; // 是否使用石器服务员功能 +#endif + unsigned short allowmanorpk; // is this server allow manor pk + + unsigned short port; /* 扔□田及谨切熬仃禾□玄 */ + + int servernumber; /* 必□丞扔□田及 寞 */ + int reuseaddr; /* Address already used... 互鞅引日卅中凛及凶户卞 */ + int do_nodelay; /* TCP_NODELAY 卞允月井升丹井 */ + int log_write_time; /* 踏五仇心夫弘毛允月井升丹井[ */ + int log_io_time; /* I/O蝈 及凛棉反井月井升丹井[ */ + int log_game_time; /* 必□丞及质 蝈 及凛棉毛反井月 */ + int log_netloop_faster; /* netloop_faster 及夫弘 */ + int saacwritenum; /* 失市它件玄扔□田尺及窒谛 卞write允月井 */ + int saacreadnum; /* 失市它件玄扔□田井日及dispatch 毛窒荚允月井 */ + + unsigned short fdnum; /*升木分仃戊生弁扑亦件毛忡 允月井 */ + unsigned int othercharnum; /* 公及职及平乓仿及醒 */ + + unsigned int objnum; /* 左皮斥尼弁玄及 醒*/ + unsigned int petcharnum; /* 矢永玄及醒 */ + unsigned int itemnum; /* 失奶 丞及 醒*/ + unsigned int battlenum; /* 田玄伙及 */ + unsigned int battleexp; /* 田玄伙及 */ + + char topdir[64]; /* 玄永皿犯奴伊弁玄伉 */ + + char mapdir[64]; /* 穴永皿犯奴伊弁玄伉 */ + char maptilefile[64]; /* 穴永皿涩烂白央奶伙 */ + char battlemapfile[64]; /* 田玄伙穴永皿涩烂白央奶伙 */ + char itemfile[64]; /* 失奶 丞涩烂白央奶伙 */ + char invfile[64]; /* 衬涩烂白央奶伙 */ + char appearfile[64]; /* 请蜇匏 涩烂白央奶伙 */ + char titlenamefile[64]; /* 惫寞白央奶伙 */ + char titleconfigfile[64]; /* 惫寞涩烂白央奶伙 */ + char encountfile[64]; /* 巨件市它件玄涩烂白央奶伙 */ + char enemybasefile[64]; /* 衬湘 涩烂白央奶伙 */ + char enemyfile[64]; /* 衬涩烂白央奶伙 */ + char groupfile[64]; /* 弘伙□皿涩烂白央奶伙 */ + char magicfile[64]; /* 热诸涩烂白央奶伙 */ + #ifdef __ATTACK_MAGIC + + + char attmagicfile[64]; // 攻击性咒术 + + #endif + + char petskillfile[64]; /* 矢永玄 热诸涩烂白央奶伙 */ + char itematomfile[64]; /* 失奶 丞及笺 白央奶伙 */ + char effectfile[64]; /* 梢请涩烂白央奶伙 */ + char quizfile[64]; /* 弁奶术涩烂白央奶伙 */ + + + char lsgenlog[64]; /*扔□田及lsgen 失它玄皿永玄白央奶伙 */ + + char storedir[64]; /*旦玄失犯奴伊弁玄伉 */ + char npcdir[64]; /*NPC及涩烂白央奶伙毛 仁犯奴伊弁玄伉 */ + + char logdir[64]; /* + * 夫弘犯奴伊弁玄伉 + */ + char logconfname[64]; /* + * 夫弘涩烂白央奶伙 + */ + char chatmagicpasswd[64]; /* 民乓永玄 芊由旦伐□玉 */ + +#ifdef _STORECHAR + char storechar[64]; +#endif + + unsigned int chatmagiccdkeycheck; /* 民乓永玄 芊匹CDKEY毛民尼永弁允月井 */ + + unsigned int filesearchnum; /*白央奶伙毛腹绸匹五月白央奶伙及醒*/ + unsigned int npctemplatenum; /*NPC及 件皿伊□玄白央奶伙及醒*/ + unsigned int npccreatenum; /*NPC及戏遣白央奶伙及醒*/ + unsigned int walksendinterval; /* 汹仁及毛霜月棉厥 */ + unsigned int CAsendinterval_ms; /* CA毛霜月棉厥 (ms)*/ + unsigned int CDsendinterval_ms; /* CD毛霜月棉厥 (ms)*/ + unsigned int Onelooptime_ms; /* 1伙□皿卞井仃月凛棉 */ + unsigned int Petdeletetime; /* 矢永玄互壅 允月凛棉 */ + unsigned int Itemdeletetime; /* 失奶 丞互壅 允月凛棉 */ + /* 夫弘奶件 及平乓仿及本□皮毛允月棉厥 */ + unsigned int CharSavesendinterval; + unsigned int addressbookoffmsgnum; /* + * 失玉伊旦皮永弁卞左白仿奶件 + * 丢永本□斥毛 + * 窒丢永本□斥酸六月井 + */ + + unsigned int protocolreadfrequency; /* + * 皿夫玄戊伙毛窒立伉 + * 卞 戈井 + */ + unsigned int allowerrornum; /* + * 巨仿□毛窒蜊引匹袱允井 + */ + unsigned int loghour; /* + * 夫弘毛忡绣允月凛对 "凛 + */ + unsigned int battledebugmsg; /* + * 田玄伙 及犯田永弘丢永本□斥毛请允井[ㄟ卅日请今卅中 + */ + //ttom add this because the second had this + unsigned int encodekey; + unsigned int acwbsize; + unsigned int acwritesize; + unsigned int ErrUserDownFlg; + //ttom end +#ifdef _GMRELOAD + char gmsetfile[64]; /* GM帐号、权限设定档 */ +#endif + +#ifdef _AUCTIONEER + char auctiondir[256]; // 拍卖资料目录 +#endif +#ifdef _BLACK_MARKET + char blackmarketfile[256]; +#endif +#ifdef _M_SERVER + char msname[32]; + unsigned short msport; +#endif +#ifdef _NPCSERVER_NEW + char nsaddress[64]; + unsigned short nsport; +#endif + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + char profession[64]; +#endif + +#ifdef _ITEM_QUITPARTY + char itemquitparty[64]; +#endif + +#ifdef _MUSEUM + int museum; +#endif + +#ifdef _DEL_DROP_GOLD + unsigned int Golddeletetime; +#endif + +#ifdef _NEW_PLAYER_CF +int newplayertrans; +int newplayerlv; +int newplayergivepet[5]; +int newplayergiveitem[15]; +int newplayerpetlv; +unsigned int newplayergivegold; +#endif + +#ifdef _USER_EXP_CF +char expfile[64]; +#endif + +#ifdef _UNLAW_WARP_FLOOR +int unlawwarpfloor[5]; +#endif + +#ifdef _UNREG_NEMA +char unregname[5][16]; +#endif + +#ifdef _TRANS_LEVEL_CF +int chartrans; +int pettrans; +int yblevel; +#endif + +#ifdef _LOCK_IP +char lockip[64]; +#endif +}Config; +Config config; + +#ifdef _USER_EXP_CF +int NeedLevelUpTbls[160]; +int MaxLevel=0; +#endif + +#ifdef _LOCK_IP +typedef struct slockip +{ + int a,b,c,d; + int locktime; + int logintime; +}sLockip; +sLockip lockip[100]; + +int maxlockip=0; +#endif +/* + * 戊件白奴弘白央奶伙毛 戈凛卞银丹厌瞻 + * xxxx=yyyy 心凶中卅及毛 戈 + */ + +typedef struct tagReadConf +{ + char name[32]; /*xxxx卞丐凶月袄*/ + + /*戚及2勾反NULL毛 木月午窒手质 仄卅中*/ + char *charvalue; /*yyyy毛公及引引医 允月凛及医 燮*/ + size_t charsize; /*charvalue及扔奶术*/ + + /* + * 酷 午仄化=及 互 "ON"分匀凶日 intvalue 卞反1毛医 允月 + * 公木动陆反 atoi 及瑛绊 + */ + void* value; /*yyyy毛 晶允月医 允月凛及医 燮*/ + CTYPE valuetype; +}ReadConf; + +ReadConf readconf[]= +{ + { "debuglevel" , NULL ,0 , (void*)&config.debuglevel ,CHAR}, + + { "usememoryunit" , NULL ,0 , (void*)&config.usememoryunit ,INT}, + { "usememoryunitnum", NULL ,0 , (void*)&config.usememoryunitnum,INT}, + + { "acserv", config.asname,sizeof(config.asname) ,NULL , 0}, + { "acservport", NULL ,0 , (void*)&config.acservport ,SHORT}, + { "acpasswd", config.acpasswd,sizeof( config.acpasswd),NULL,0}, + { "gameservname", config.gsnamefromas,sizeof(config.gsnamefromas), + NULL,0}, + + // Arminius 7.24 manor pk + { "gameservid", config.gsid, sizeof(config.gsid), NULL, 0}, +#ifdef _SERVICE + // Terry 2001/10/03 service ap + { "apid", config.apid, sizeof(config.apid), NULL, 0}, + { "apport", NULL ,0 ,(void*)&config.apport ,SHORT}, + { "looptime",NULL,0,(void*)&config.looptime,INT}, + { "enableservice",NULL,0,(void*)&config.enableservice,INT}, +#endif + { "allowmanorpk", NULL, 0, (void*)&config.allowmanorpk, SHORT}, + + { "port", NULL ,0 , (void*)&config.port ,SHORT}, + { "servernumber", NULL ,0 , (void*)&config.servernumber ,INT}, + + { "reuseaddr", NULL ,0 , (void*)&config.reuseaddr , INT}, + { "nodelay", NULL , 0 , (void*)&config.do_nodelay , INT}, + { "log_write_time", NULL, 0 , (void*)&config.log_write_time, INT}, + { "log_io_time", NULL, 0 , (void*)&config.log_io_time, INT}, + { "log_game_time", NULL, 0 , (void*)&config.log_game_time, INT}, + { "log_netloop_faster", NULL,0,(void*)&config.log_netloop_faster, INT}, + { "saacwritenum", NULL,0,(void*)&config.saacwritenum, INT}, + { "saacreadnum", NULL,0,(void*)&config.saacreadnum, INT}, + { "fdnum", NULL ,0 , (void*)&config.fdnum, SHORT}, + { "petnum", NULL ,0 , (void*)&config.petcharnum, INT}, + { "othercharnum", NULL ,0 , (void*)&config.othercharnum, INT}, + + { "objnum", NULL ,0 , (void*)&config.objnum, INT}, + { "itemnum", NULL ,0 , (void*)&config.itemnum, INT}, + { "battlenum", NULL ,0 , (void*)&config.battlenum, INT}, + { "battleexp", NULL ,0 , (void*)&config.battleexp, INT}, + { "topdir" , config.topdir,sizeof(config.topdir),NULL,0}, + { "mapdir" , config.mapdir,sizeof(config.mapdir),NULL,0}, + { "maptilefile" , config.maptilefile,sizeof(config.maptilefile),NULL,0}, + { "battlemapfile" , config.battlemapfile,sizeof(config.battlemapfile),NULL,0}, + +#ifdef _ITEMSET6_TXT + { "itemset6file", config.itemfile, sizeof(config.invfile), NULL, 0}, +#else +#ifdef _ITEMSET5_TXT + { "itemset5file", config.itemfile, sizeof(config.invfile), NULL, 0}, +#else +#ifdef _ITEMSET4_TXT + { "itemset4file" , config.itemfile,sizeof(config.invfile),NULL,0}, +#else +#ifdef _ITEMSET3_ITEM + { "itemset3file" , config.itemfile,sizeof(config.invfile),NULL,0}, +#endif +#endif +#endif +#endif + { "invinciblefile" , config.invfile,sizeof(config.invfile),NULL,0}, + { "appearpositionfile" , config.appearfile,sizeof(config.appearfile),NULL,0}, + { "titlenamefile", config.titlenamefile, sizeof( config.titlenamefile),NULL,0}, + { "titleconfigfile", config.titleconfigfile, sizeof( config.titleconfigfile),NULL,0}, + { "encountfile", config.encountfile, sizeof( config.encountfile),NULL,0}, + { "enemyfile", config.enemyfile, sizeof( config.enemyfile),NULL,0}, + { "enemybasefile", config.enemybasefile, sizeof( config.enemybasefile),NULL,0}, + { "groupfile", config.groupfile, sizeof( config.groupfile),NULL,0}, + { "magicfile", config.magicfile, sizeof( config.magicfile),NULL,0}, +#ifdef __ATTACK_MAGIC + { "attmagicfile" , config.attmagicfile , sizeof( config.attmagicfile ) , NULL , 0 }, +#endif + +#ifdef _PETSKILL2_TXT + { "petskillfile2", config.petskillfile, sizeof( config.petskillfile),NULL,0}, +#else + { "petskillfile1", config.petskillfile, sizeof( config.petskillfile),NULL,0}, +#endif + + { "itematomfile" , config.itematomfile, sizeof( config.itematomfile),NULL,0}, + { "effectfile" , config.effectfile,sizeof(config.effectfile),NULL,0}, + { "quizfile" , config.quizfile,sizeof(config.quizfile),NULL,0}, + + { "lsgenlogfilename", config.lsgenlog,sizeof(config.lsgenlog),NULL,0}, +#ifdef _GMRELOAD + { "gmsetfile", config.gmsetfile, sizeof( config.gmsetfile),NULL,0}, +#endif + + { "storedir" ,config.storedir,sizeof(config.storedir),NULL,0}, + { "npcdir" ,config.npcdir,sizeof(config.npcdir),NULL,0}, + { "logdir" ,config.logdir,sizeof(config.logdir),NULL,0}, + { "logconfname" ,config.logconfname,sizeof(config.logconfname),NULL,0}, + { "chatmagicpasswd", config.chatmagicpasswd, sizeof( config.chatmagicpasswd),NULL,0}, +#ifdef _STORECHAR + { "storechar", config.storechar, sizeof( config.storechar),NULL,0}, +#endif + { "chatmagiccdkeycheck", NULL,0, &config.chatmagiccdkeycheck,INT}, + { "filesearchnum", NULL,0, &config.filesearchnum,INT}, + { "npctemplatenum", NULL,0, &config.npctemplatenum,INT}, + { "npccreatenum", NULL,0, &config.npccreatenum,INT}, + { "walkinterval" ,NULL,0,(void*)&config.walksendinterval,INT}, + { "CAinterval" ,NULL,0,(void*)&config.CAsendinterval_ms,INT}, + { "CDinterval" ,NULL,0,(void*)&config.CDsendinterval_ms,INT}, + { "CharSaveinterval" ,NULL,0,(void*)&config.CharSavesendinterval,INT}, + { "Onelooptime" ,NULL,0,(void*)&config.Onelooptime_ms,INT}, + { "Petdeletetime" ,NULL,0,(void*)&config.Petdeletetime,INT}, + { "Itemdeletetime" ,NULL,0,(void*)&config.Itemdeletetime,INT}, + { "addressbookoffmesgnum" ,NULL,0, + (void*)&config.addressbookoffmsgnum,INT}, + + { "protocolreadfrequency" ,NULL,0, + (void*)&config.protocolreadfrequency,INT}, + + { "allowerrornum" ,NULL,0,(void*)&config.allowerrornum,INT}, + { "loghour" ,NULL,0,(void*)&config.loghour,INT}, + { "battledebugmsg" ,NULL,0,(void*)&config.battledebugmsg,INT}, + //ttom add because the second had + { "encodekey" ,NULL,0,(void*)&config.encodekey,INT}, + { "acwritesize" ,NULL,0,(void*)&config.acwritesize,INT}, + { "acwbsize" ,NULL,0,(void*)&config.acwbsize,INT}, + { "erruser_down" ,NULL,0,(void*)&config.ErrUserDownFlg,INT}, + //ttom end +#ifdef _AUCTIONEER + { "auctiondir" , config.auctiondir, sizeof(config.auctiondir),NULL,0}, +#endif +#ifdef _BLACK_MARKET + { "blackmarketfile", config.blackmarketfile, sizeof(config.blackmarketfile), NULL, 0}, +#endif +#ifdef _M_SERVER + { "msname", config.msname,sizeof(config.msname) ,NULL , 0}, + { "msport", NULL ,0 , (void*)&config.msport ,SHORT}, +#endif +#ifdef _NPCSERVER_NEW + { "npcaddress", config.nsaddress, sizeof(config.nsaddress) ,NULL , 0}, + { "nsport", NULL, 0 , (void*)&config.nsport ,SHORT}, +#endif + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + { "profession", config.profession, sizeof(config.profession) ,NULL , 0}, +#endif + +#ifdef _ITEM_QUITPARTY + { "itemquitparty", config.itemquitparty, sizeof(config.itemquitparty) ,NULL , 0}, +#endif + +#ifdef _MUSEUM + { "museum", NULL , 0 , (void*)&config.museum , INT}, +#endif + +#ifdef _DEL_DROP_GOLD + { "Golddeletetime" ,NULL,0,(void*)&config.Golddeletetime, INT}, +#endif + +#ifdef _NEW_PLAYER_CF + { "TRANS" ,NULL,0,(void*)&config.newplayertrans, INT}, + { "LV" ,NULL,0,(void*)&config.newplayerlv, INT}, + { "PET1" ,NULL,0,(void*)&config.newplayergivepet[1], INT}, + { "PET2" ,NULL,0,(void*)&config.newplayergivepet[2], INT}, + { "PET3" ,NULL,0,(void*)&config.newplayergivepet[3], INT}, + { "PET4" ,NULL,0,(void*)&config.newplayergivepet[4], INT}, + { "ITEM1" ,NULL,0,(void*)&config.newplayergiveitem[0], INT}, + { "ITEM2" ,NULL,0,(void*)&config.newplayergiveitem[1], INT}, + { "ITEM3" ,NULL,0,(void*)&config.newplayergiveitem[2], INT}, + { "ITEM4" ,NULL,0,(void*)&config.newplayergiveitem[3], INT}, + { "ITEM5" ,NULL,0,(void*)&config.newplayergiveitem[4], INT}, + { "ITEM6" ,NULL,0,(void*)&config.newplayergiveitem[5], INT}, + { "ITEM7" ,NULL,0,(void*)&config.newplayergiveitem[6], INT}, + { "ITEM8" ,NULL,0,(void*)&config.newplayergiveitem[7], INT}, + { "ITEM9" ,NULL,0,(void*)&config.newplayergiveitem[8], INT}, + { "ITEM10" ,NULL,0,(void*)&config.newplayergiveitem[9], INT}, + { "ITEM11" ,NULL,0,(void*)&config.newplayergiveitem[10], INT}, + { "ITEM12" ,NULL,0,(void*)&config.newplayergiveitem[11], INT}, + { "ITEM13" ,NULL,0,(void*)&config.newplayergiveitem[12], INT}, + { "ITEM14" ,NULL,0,(void*)&config.newplayergiveitem[13], INT}, + { "ITEM15" ,NULL,0,(void*)&config.newplayergiveitem[14], INT}, + { "PETLV" ,NULL,0,(void*)&config.newplayerpetlv, INT}, + { "GOLD" ,NULL,0,(void*)&config.newplayergivegold, INT}, +#endif + +#ifdef _USER_EXP_CF + { "USEREXP", config.expfile, sizeof( config.expfile),NULL,0}, +#endif + +#ifdef _UNLAW_WARP_FLOOR + { "FLOOR1" ,NULL,0,(void*)&config.unlawwarpfloor[0], INT}, + { "FLOOR2" ,NULL,0,(void*)&config.unlawwarpfloor[1], INT}, + { "FLOOR3" ,NULL,0,(void*)&config.unlawwarpfloor[2], INT}, + { "FLOOR4" ,NULL,0,(void*)&config.unlawwarpfloor[3], INT}, + { "FLOOR5" ,NULL,0,(void*)&config.unlawwarpfloor[4], INT}, +#endif +#ifdef _UNREG_NEMA + { "NAME1" ,config.unregname[0], sizeof( config.unregname[0]),NULL,0}, + { "NAME2" ,config.unregname[1], sizeof( config.unregname[1]),NULL,0}, + { "NAME3" ,config.unregname[2], sizeof( config.unregname[2]),NULL,0}, + { "NAME4" ,config.unregname[3], sizeof( config.unregname[3]),NULL,0}, + { "NAME5" ,config.unregname[4], sizeof( config.unregname[4]),NULL,0}, +#endif +#ifdef _TRANS_LEVEL_CF + { "CHARTRANS" ,NULL,0,(void*)&config.chartrans, INT}, + { "PETTRANS" ,NULL,0,(void*)&config.pettrans, INT}, + { "LEVEL" ,NULL,0,(void*)&config.yblevel, INT}, +#endif +#ifdef _LOCK_IP + { "LOCKIP" ,config.lockip, sizeof( config.lockip),NULL,0}, +#endif + +}; + +// Arminius 7.12 login announce +char announcetext[8192]; +void AnnounceToPlayer(int charaindex) +{ + char *ptr,*qtr; + + ptr=announcetext; + while ((qtr=strstr(ptr,"\n"))!=NULL) { + qtr[0]='\0'; +// printf("ptr=%s\n",ptr); + CHAR_talkToCli(charaindex, -1, ptr, CHAR_COLORYELLOW); + qtr[0]='\n'; + ptr=qtr+1; + } + CHAR_talkToCli(charaindex, -1, ptr, CHAR_COLORYELLOW); + +} + +// Robin 0720 +void AnnounceToPlayerWN(int fd) +{ + char buf[8192]; + lssproto_WN_send( fd , WINDOW_MESSAGETYPE_LOGINMESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString( announcetext, buf, sizeof(buf)) + ); +} + + +void LoadAnnounce(void) +{ + FILE *f; + + memset(announcetext, 0, sizeof(announcetext)); + if ((f=fopen("./announce.txt","r"))!=NULL) { + fread(announcetext, sizeof(announcetext), 1, f); + announcetext[sizeof(announcetext)-1]='\0'; + fclose(f); + } +} +#ifdef _PET_TALKPRO +PTALK pettalktext[PETTALK_MAXID]; + +void LoadPetTalk(void) +{ + FILE *fp; + char fn[256]; + char line[ 4096]; + char talkmem[4096]; + int maxid=0; + char buf1[256], buf2[256], buf3[256]; + int talkNO=-1, mark=-1, i; + int len = sizeof( talkmem); + + memset(talkmem, 0, sizeof(talkmem)); + sprintf(fn, "%s/pettalk/pettalk.menu", getNpcdir()); + + for( i=0;i= PETTALK_MAXID ) + break; + } + print("最大ID=%d...", maxid); + { + int haveid=0; + for( i=0;i= 0 ) { + haveid++; + } + } + print("载入总数=%d", haveid); + } + +} + +#else +char pettalktext[4096]; +void LoadPetTalk(void) +{ + FILE *fp; + char fn[256]; + char line[ 4096]; + int len = sizeof( pettalktext); + + memset(pettalktext, 0, sizeof(pettalktext)); + sprintf(fn, "%s/pettalk/pettalk.mem", getNpcdir()); + + fp = fopen( fn, "r"); + if( fp != NULL ) { + print("\n\n 读取 pettalk.mem"); + while( fgets( line, sizeof( line), fp)) { + if( strlen( pettalktext) != 0 ) { + if( pettalktext[strlen( pettalktext) -1] != '|' ) { + strcatsafe( pettalktext, len, "|"); + } + } + chompex( line); + strcatsafe( pettalktext,len, line); + } + fclose( fp); + print("\n %s", pettalktext); + }else { + print("\n 不能找到 pettalk.mem"); + } +} +#endif + +#ifdef _GAMBLE_BANK +GAMBLEBANK_ITEMS GB_ITEMS[GAMBLEBANK_ITEMSMAX]; + +void Load_GambleBankItems( void) +{ + + FILE *fp; + char filename[256]; + char buf1[256]; + char name[128]; + int num,ID,type; + int i=0; + sprintf(filename, "./data/gambleitems.txt" ); + print("\n加载赌博物品文件 %s ...", filename); + fp = fopen( filename, "r"); + if( fp != NULL ) { + while( fgets( buf1, sizeof( buf1), fp) != NULL ) { + if( strstr( buf1, "#") != 0 ) continue; + sscanf( buf1,"%s %d %d %d", name, &ID, &num , &type); + strcpy( GB_ITEMS[i].name, name); + GB_ITEMS[i].Gnum = num; + GB_ITEMS[i].ItemId = ID; + GB_ITEMS[i].type = type; + i++; + } + print("最大ID: %d ", i); + fclose( fp); + }else { + print("错误 找不到文件 %s", filename); + } + +} +#endif + + +#ifdef _CFREE_petskill +PETSKILL_CODES Code_skill[PETSKILL_CODE]; +void Load_PetSkillCodes( void) +{ + FILE *fp; + char filename[256]; + char buf1[256]; + char name[128]; + char type[256]; + int num,ID; + int i=0; + sprintf(filename, "./data/skillcode.txt" ); + print("\n加载宠物技能编码文件:%s...", filename); + fp = fopen( filename, "r"); + if( fp != NULL ) { + while( fgets( buf1, sizeof( buf1), fp) != NULL ) { + sscanf( buf1,"%s %d %d %s", name, &num, &ID, type); + strcpy( Code_skill[i].name, name); + Code_skill[i].TempNo = num; + Code_skill[i].PetId = ID; + strcpy( Code_skill[i].Code, type); + //print("\n %s|%d|%d|%s|", Code_skill[i].name, Code_skill[i].TempNo, + // Code_skill[i].PetId, Code_skill[i].Code); + i++; + if( i >= PETSKILL_CODE ) break; + } + fclose( fp); + }else { + print("打不到文件 %s", filename); + } + print("完成\n"); +} +#endif + +#ifdef _BLACK_MARKET +BOOL LoadBMItem( char* filename) +{ + FILE *fp; + int i, j, k; + char line[512]="", cTmp[256]=""; + char *ip=NULL, *gp=NULL; + + for(i=0; i=BMIMAX){ + print("\n警告!! 物口数目超越范围(%d).", BMIMAX); + break; + } + sscanf( line, "%s %d %s %s %s %s %s", + BMItem[BMINum].iName, + &BMItem[BMINum].iGraphicsNum, + iTmp1, iTmp2, iTmp3, iTmp4, cTmp); + + for(i=0; i<3; i++){ + if(getStringFromIndexWithDelim( iTmp1, ",", i+1, iTmp5, sizeof( iTmp5))!=FALSE) + BMItem[BMINum].iId[0][i] = atoi(iTmp5); + if(getStringFromIndexWithDelim( iTmp2, ",", i+1, iTmp5, sizeof( iTmp5))!=FALSE) + BMItem[BMINum].iId[1][i] = atoi(iTmp5); + if(getStringFromIndexWithDelim( iTmp3, ",", i+1, iTmp5, sizeof( iTmp5))!=FALSE) + BMItem[BMINum].iId[2][i] = atoi(iTmp5); + if(getStringFromIndexWithDelim( iTmp4, ",", i+1, iTmp5, sizeof( iTmp5))!=FALSE) + BMItem[BMINum].iId[3][i] = atoi(iTmp5); + } + + ip = strstr( cTmp, "I"); + gp = strstr( cTmp, "G"); + + if( ip && gp && gp>ip){ + strncpy( cTmp1, ip+1, gp-ip-1); + for(i=0; i<4; i++) + if(getStringFromIndexWithDelim( cTmp1, ",", i+1, cTmp3, sizeof( cTmp3))!=FALSE) + BMItem[BMINum].iCondition[i] = atoi(cTmp3); + strcpy( cTmp2, gp+1); + BMItem[BMINum].GCondition = atoi(cTmp2); + }else if( ip && gp && gp GMMAXNUM) break; + easyGetTokenFromString(line, 1, cdkey, sizeof(cdkey)); + if (strcmp(cdkey, "") == 0) break; + strncpy(gminfo[gm_num].cdkey, cdkey, sizeof(gminfo[gm_num].cdkey)); + easyGetTokenFromString(line, 2, level, sizeof(level)); + if (strcmp(level, "") == 0) break; + gminfo[gm_num].level = atoi(level); +// print("\ncdkey:%s, level:%d", gminfo[gm_num].cdkey, gminfo[gm_num].level); + } + fclose(fp); + return TRUE; +} +#endif + +/*------------------------------------------------------------ + * 皿夫弘仿丞 毛 月 + * 娄醒 + * 卅仄 + * 忒曰袄 + * cahr* + ------------------------------------------------------------*/ +char* getProgname( void ) +{ + return config.progname; +} +/*------------------------------------------------------------ + * configfilename 毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * char* + ------------------------------------------------------------*/ +char* getConfigfilename( void ) +{ + return config.configfilename; +} +/*------------------------------------------------------------ + * configfilename 毛涩烂允月[ + * 娄醒 + * newv char* 蕙仄中袄 + * 忒曰袄 + * 卅仄 + ------------------------------------------------------------*/ +void setConfigfilename( char* newv ) +{ + strcpysafe( config.configfilename, sizeof( config.configfilename ), + newv ); +} + +/*------------------------------------------------------------ + * 犯田永弘伊矛伙毛 月 + * 娄醒 + * 卅仄 + * 忒曰袄 + * unsigned int + ------------------------------------------------------------*/ +unsigned int getDebuglevel( void ) +{ + return config.debuglevel; +} +/*------------------------------------------------------------ + * 犯田永弘伊矛伙毛涩烂允月 + * 娄醒 + * newv int 蕙仄中袄 + * 忒曰袄 + * unsigned int 樯及袄 + ------------------------------------------------------------*/ +unsigned int setDebuglevel( unsigned int newv ) +{ + int old; + old = config.debuglevel; + config.debuglevel = newv; + return old; +} +/*------------------------------------------------------------ + * memoryunit 毛 月 + * 娄醒 + * 卅仄 + * 忒曰袄 + * unsigned int + ------------------------------------------------------------*/ +unsigned int getMemoryunit( void ) +{ + return config.usememoryunit; +} +/*------------------------------------------------------------ + * memoryunitnum 毛 月 + * 娄醒 + * 卅仄 + * 忒曰袄 + * unsigned int + ------------------------------------------------------------*/ +unsigned int getMemoryunitnum( void ) +{ + return config.usememoryunitnum; +} + +/*------------------------------------------------------------ + * 失市它件玄扔□田及失玉伊旦毛 月 + * 娄醒 + * 卅仄 + * 忒曰袄 + * char* + ------------------------------------------------------------*/ +char* getAccountservername( void ) +{ + return config.asname; +} +/*------------------------------------------------------------ + * 失市它件玄扔□田及禾□玄毛 月 + * 娄醒 + * 卅仄 + * 忒曰袄 + * unsigned short + ------------------------------------------------------------*/ +unsigned short getAccountserverport( void ) +{ + return config.acservport; +} +/*------------------------------------------------------------ + * 失市它件玄扔□田尺及由旦伐□玉毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * unsigned short + ------------------------------------------------------------*/ +char* getAccountserverpasswd( void ) +{ + return config.acpasswd; +} +/*------------------------------------------------------------ + * 失市它件玄扔□田井日苇尹月必□丞扔□田午仄化及 蟆毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * unsigned short + ------------------------------------------------------------*/ +char* getGameservername( void ) +{ + return config.gsnamefromas; +} + +// Arminius 7.24 manor pk +char* getGameserverID( void ) +{ + if (config.gsid[strlen(config.gsid)-1]=='\n') + config.gsid[strlen(config.gsid)-1]='\0'; + + return config.gsid; +} + +#ifdef _SERVICE +// Terry 2001/10/03 +char* getApID(void) +{ + return config.apid; +} + +unsigned short getApPort(void) +{ + return config.apport; +} + +int getLoopTime(void) +{ + return config.looptime; +} + +int getEnableService(void) +{ + return config.enableservice; +} +#endif + +unsigned short getAllowManorPK( void ) +{ + return config.allowmanorpk; +} + +unsigned short getPortnumber( void ) +{ + return config.port; +} +/*------------------------------------------------------------ + * 必□丞扔□田及 寞 寞毛 月 + * 娄醒 + * 卅仄 + * 忒曰袄 + * unsigned short + ------------------------------------------------------------*/ +int getServernumber( void ) +{ + return config.servernumber; +} +/*------------------------------------------------------------ + * reuseaddr 及袄毛 月 + * 娄醒 + * 卅仄 + * 忒曰袄 + * unsigned short + ------------------------------------------------------------*/ +int getReuseaddr( void ) +{ + return config.reuseaddr; +} + +int getNodelay( void ) +{ + return config.do_nodelay; +} +int getLogWriteTime(void) +{ + return config.log_write_time; +} +int getLogIOTime( void) +{ + return config.log_io_time; +} +int getLogGameTime(void) +{ + return config.log_game_time; +} +int getLogNetloopFaster(void) +{ + return config.log_netloop_faster; +} + +/*------------------------------------------------------------ + * saacwritenum 毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * int + ------------------------------------------------------------*/ +int getSaacwritenum( void ) +{ + return config.saacwritenum; +} +/*------------------------------------------------------------ + * saacwritenum 毛涩烂允月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * int + ------------------------------------------------------------*/ +void setSaacwritenum( int num ) +{ + config.saacwritenum = num; +} +/*------------------------------------------------------------ + * saacreadnum 毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * int + ------------------------------------------------------------*/ +int getSaacreadnum( void ) +{ + return config.saacreadnum; +} +/*------------------------------------------------------------ + * saacreadnum 毛涩烂允月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * int + ------------------------------------------------------------*/ +void setSaacreadnum( int num ) +{ + config.saacreadnum = num; +} +/*------------------------------------------------------------ + * fdnum 毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * unsigned int + ------------------------------------------------------------*/ +unsigned int getFdnum( void ) +{ + return config.fdnum; +} +/*------------------------------------------------------------ + * petcharanum 毛 月 + * 娄醒 + * 卅仄 + * 忒曰袄 + * unsigned int + ------------------------------------------------------------*/ +unsigned int getPetcharnum( void ) +{ + return config.petcharnum; +} + + +/*------------------------------------------------------------ + * othercharnum 毛 月 + * 娄醒 + * 卅仄 + * 忒曰袄 + * unsigned int + ------------------------------------------------------------*/ +unsigned int getOtherscharnum( void ) +{ + return config.othercharnum; +} + +/*------------------------------------------------------------ + * objnum 毛 月 + * 娄醒 + * 卅仄 + * 忒曰袄 + * unsigned int + ------------------------------------------------------------*/ +unsigned int getObjnum( void ) +{ + return config.objnum; +} + +/*------------------------------------------------------------ + * itemnum 毛 月 + * 娄醒 + * 卅仄 + * 忒曰袄 + * unsigned int + ------------------------------------------------------------*/ +unsigned int getItemnum( void ) +{ + return config.itemnum; +} + + +/*------------------------------------------------------------ + * battlenum 毛 月 + * 娄醒 + * 卅仄 + * 忒曰袄 + * unsigned int + ------------------------------------------------------------*/ +unsigned int getBattlenum( void ) +{ + return config.battlenum; +} + +#ifdef _GET_BATTLE_EXP +unsigned int getBattleexp( void ) +{ + return config.battleexp; +} +#endif +/*------------------------------------------------------------ + * topdir 毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * char* + ------------------------------------------------------------*/ +char* getTopdir( void ) +{ + return config.topdir; +} +/*------------------------------------------------------------ + * mapdir 毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * char* + ------------------------------------------------------------*/ +char* getMapdir( void ) +{ + return config.mapdir; +} +/*------------------------------------------------------------ + * maptilefile 毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * char* + ------------------------------------------------------------*/ +char* getMaptilefile( void ) +{ + return config.maptilefile; +} +/*------------------------------------------------------------ + * battlemapfile 毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * char* + ------------------------------------------------------------*/ +char* getBattleMapfile( void ) +{ + return config.battlemapfile; +} +/*------------------------------------------------------------ + * itemfile 毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * char* + ------------------------------------------------------------*/ +char* getItemfile( void ) +{ + return config.itemfile; +} +/*------------------------------------------------------------ + * invfile 毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * char* + ------------------------------------------------------------*/ +char* getInvfile( void ) +{ + return config.invfile; +} +/*------------------------------------------------------------ + * appearfile 毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * char* + ------------------------------------------------------------*/ +char* getAppearfile( void ) +{ + return config.appearfile; +} +/*------------------------------------------------------------ + * effectfile 毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * char* + ------------------------------------------------------------*/ +char* getEffectfile( void ) +{ + return config.effectfile; +} +/*------------------------------------------------------------ + * titlenamefile 毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * char* + ------------------------------------------------------------*/ +char* getTitleNamefile( void ) +{ + return config.titlenamefile; +} +/*------------------------------------------------------------ + * titleconfigfile 毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * char* + ------------------------------------------------------------*/ +char* getTitleConfigfile( void ) +{ + return config.titleconfigfile; +} +/*------------------------------------------------------------ + * encountfile 毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * char* + ------------------------------------------------------------*/ +char* getEncountfile( void ) +{ + return config.encountfile; +} +/*------------------------------------------------------------ + * enemyfile 毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * char* + ------------------------------------------------------------*/ +char* getEnemyfile( void ) +{ + return config.enemyfile; +} +/*------------------------------------------------------------ + * enemybasefile 毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * char* + ------------------------------------------------------------*/ +char* getEnemyBasefile( void ) +{ + return config.enemybasefile; +} +/*------------------------------------------------------------ + * groupfile 毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * char* + ------------------------------------------------------------*/ +char* getGroupfile( void ) +{ + return config.groupfile; +} +/*------------------------------------------------------------ + * magicfile 毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * char* + ------------------------------------------------------------*/ +char* getMagicfile( void ) +{ + return config.magicfile; +} + +#ifdef __ATTACK_MAGIC + +/*------------------------------------------------------------ + * 取得攻击性的咒术 + * 参数 + * None + * 返回值 + * char* + ------------------------------------------------------------*/ +char* getAttMagicfileName( void ) +{ + return config.attmagicfile; +} + +#endif + + +char* getPetskillfile( void ) +{ + return config.petskillfile; +} + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 +char* getProfession( void ) +{ + return config.profession; +} +#endif + +#ifdef _ITEM_QUITPARTY +char* getitemquitparty( void ) +{ + return config.itemquitparty; +} +#endif + +char *getItematomfile( void ) +{ + return config.itematomfile; +} + + +char* getQuizfile( void ) +{ + return config.quizfile; +} + +/*------------------------------------------------------------ + * lsgenlogfile 毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * char* + ------------------------------------------------------------*/ +char* getLsgenlogfilename( void ) +{ + return config.lsgenlog; +} + +#ifdef _BLACK_MARKET +char* getBMItemFile(void){ + return config.blackmarketfile; +} +#endif + +#ifdef _GMRELOAD +char* getGMSetfile( void ) +{ + return config.gmsetfile; +} +#endif + +/*------------------------------------------------------------ + * storedir 毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * char* + ------------------------------------------------------------*/ +char* getStoredir( void ) +{ + return config.storedir; +} +#ifdef _STORECHAR +/*------------------------------------------------------------ + ------------------------------------------------------------*/ +char* getStorechar( void ) +{ + return config.storechar; +} +#endif + +#ifdef _AUCTIONEER +char* getAuctiondir(void) +{ + return config.auctiondir; +} +#endif + +/*------------------------------------------------------------ + * NPC 迕及犯奴伊弁玄伉毛 化仁月楮醒 + * 娄醒 + * 卅仄 + * 忒曰袄 + * char* + ------------------------------------------------------------*/ +char* getNpcdir( void ) +{ + return config.npcdir; +} +/*------------------------------------------------------------ + * 夫弘犯奴伊弁玄伉毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * char* + ------------------------------------------------------------*/ +char* getLogdir( void ) +{ + return config.logdir; +} + +/*------------------------------------------------------------ + * 夫弘涩烂白央奶伙 毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * char* + ------------------------------------------------------------*/ +char* getLogconffile( void ) +{ + return config.logconfname; +} +/*------------------------------------------------------------ + * 民乓永玄 芊由旦伐□玉 毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * char* + ------------------------------------------------------------*/ +char* getChatMagicPasswd( void ) +{ + return config.chatmagicpasswd; +} +/*------------------------------------------------------------ + * 犯田永弘民乓永玄 芊匹及CDKEY民尼永弁毛允月井升丹井毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * char* + ------------------------------------------------------------*/ +unsigned getChatMagicCDKeyCheck( void ) +{ + return config.chatmagiccdkeycheck; +} + +/*------------------------------------------------------------ + * filesearchnum毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * unsigned int + ------------------------------------------------------------*/ +unsigned int getFilesearchnum( void ) +{ + return config.filesearchnum; +} +/*------------------------------------------------------------ + * npctemplatenum毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * unsigned int + ------------------------------------------------------------*/ +unsigned int getNpctemplatenum( void ) +{ + return config.npctemplatenum; +} +/*------------------------------------------------------------ + * npccreatenum毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * unsigned int + ------------------------------------------------------------*/ +unsigned int getNpccreatenum( void ) +{ + return config.npccreatenum; +} + +/*------------------------------------------------------------ + * walksendinterval毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * unsigned int + ------------------------------------------------------------*/ +unsigned int getWalksendinterval( void ) +{ + return config.walksendinterval; +} +/*------------------------------------------------------------ + * walksendinterval毛本永玄允月[ + * 娄醒 + * unsigned int interval 凛棉 立伉 + * 忒曰袄 + * void + ------------------------------------------------------------*/ +void setWalksendinterval( unsigned int interval ) +{ + config.walksendinterval = interval; +} +/*------------------------------------------------------------ + * CAsendinterval毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * unsigned int + ------------------------------------------------------------*/ +unsigned int getCAsendinterval_ms( void ) +{ + return config.CAsendinterval_ms; +} +/*------------------------------------------------------------ + * CAsendinterval毛本永玄允月[ + * 娄醒 + * unsigned int interval + * 忒曰袄 + * unsigned int + ------------------------------------------------------------*/ +void setCAsendinterval_ms( unsigned int interval_ms ) +{ + config.CAsendinterval_ms = interval_ms; +} +/*------------------------------------------------------------ + * CDsendinterval毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * unsigned int + ------------------------------------------------------------*/ +unsigned int getCDsendinterval_ms( void ) +{ + return config.CDsendinterval_ms; +} +/*------------------------------------------------------------ + * CDsendinterval毛本永玄允月[ + * 娄醒 + * interval unsigned int + * 忒曰袄 + * void + ------------------------------------------------------------*/ +void setCDsendinterval_ms( unsigned int interval_ms ) +{ + config.CDsendinterval_ms = interval_ms; +} +/*------------------------------------------------------------ + * Onelooptime毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * unsigned int + ------------------------------------------------------------*/ +unsigned int getOnelooptime_ms( void ) +{ + return config.Onelooptime_ms; +} +/*------------------------------------------------------------ + * Onelooptime毛本永玄允月[ + * 娄醒 + * interval unsigned int + * 忒曰袄 + * void + ------------------------------------------------------------*/ +void setOnelooptime_ms( unsigned int interval_ms ) +{ + config.Onelooptime_ms = interval_ms; +} +/*------------------------------------------------------------ + * Petdeletetime毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * unsigned int + ------------------------------------------------------------*/ +unsigned int getPetdeletetime( void ) +{ + return config.Petdeletetime; +} +/*------------------------------------------------------------ + * Petdeletetime毛本永玄允月[ + * 娄醒 + * interval unsigned int + * 忒曰袄 + * void + ------------------------------------------------------------*/ +void setPetdeletetime( unsigned int interval ) +{ + config.Petdeletetime = interval; +} +/*------------------------------------------------------------ + * Itemdeletetime毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * unsigned int + ------------------------------------------------------------*/ +unsigned int getItemdeletetime( void ) +{ + return config.Itemdeletetime; +} +/*------------------------------------------------------------ + * Itemdeletetime毛本永玄允月[ + * 娄醒 + * interval unsigned int + * 忒曰袄 + * void + ------------------------------------------------------------*/ +void setItemdeletetime( unsigned int interval ) +{ + config.Itemdeletetime = interval; +} + +/*------------------------------------------------------------ + * CharSavesendinterval毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * unsigned int + ------------------------------------------------------------*/ +unsigned int getCharSavesendinterval( void ) +{ + return config.CharSavesendinterval; +} +/*------------------------------------------------------------ + * CharSavesendinterval毛本永玄允月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * unsigned int + ------------------------------------------------------------*/ +void setCharSavesendinterval( unsigned int interval) +{ + config.CharSavesendinterval = interval; +} + +/*------------------------------------------------------------ + * Addressbookoffmsgnum 毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * unsigned int + ------------------------------------------------------------*/ +unsigned int getAddressbookoffmsgnum( void ) +{ + return config.addressbookoffmsgnum; +} +/*------------------------------------------------------------ + * Protocolreadfrequency 毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * unsigned int + ------------------------------------------------------------*/ +unsigned int getProtocolreadfrequency( void ) +{ + return config.protocolreadfrequency; +} + +/*------------------------------------------------------------ + * Allowerrornum 毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * unsigned int + ------------------------------------------------------------*/ +unsigned int getAllowerrornum( void ) +{ + return config.allowerrornum; +} + +/*------------------------------------------------------------ + * 夫弘毛潸 允月凛对毛 月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * unsigned int + ------------------------------------------------------------*/ +unsigned int getLogHour( void ) +{ + return config.loghour; +} + +/*------------------------------------------------------------ + * 田玄伙 及犯田永弘丢永本□斥毛请允井[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * unsigned int 1卅日请允 + ------------------------------------------------------------*/ +unsigned int getBattleDebugMsg( void ) +{ + return config.battledebugmsg; +} +/*------------------------------------------------------------ + * 田玄伙 及犯田永弘丢永本□斥毛请允井[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * unsigned int 1卅日请允 + ------------------------------------------------------------*/ +void setBattleDebugMsg( unsigned int num ) +{ + config.battledebugmsg = num; +} + + + +/* + * Config及犯白巧伙玄袄毛瑁户月楮醒 + * 娄醒 + * argv0 char* 戊穴件玉仿奶件娄醒及 赓 + */ +void defaultConfig( char* argv0 ) +{ + char* program; /* program 毛菲户月及卞银丹 */ + + /* 犯白巧伙玄袄毛 木月 */ + + /*皿夫弘仿丞 */ + program = rindex(argv0, '/'); + if (program == NULL) + program = argv0; + else + program++; /* "/"及戚井日卞仄凶中及匹++允月*/ + strcpysafe( config.progname , sizeof( config.progname ) ,program ); + + /*涩烂白央奶伙 */ + strcpysafe( config.configfilename, + sizeof( config.configfilename ),"setup.cf" ); + +} + +/* + * 涩烂白央奶伙 毛 氏分 匹及质 毛垫丹[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * 卅仄 + */ +void lastConfig( void ) +{ + char entry[256]; + /* 穴永皿犯奴伊弁玄伉及涩烂 */ + snprintf(entry, sizeof(entry), "%s/%s", config.topdir, config.mapdir); + strcpysafe(config.mapdir, sizeof(config.mapdir), entry); + + /* 穴永皿涩烂白央奶伙 及涩烂 */ + snprintf(entry,sizeof(entry),"%s/%s", + config.topdir,config.maptilefile); + strcpysafe(config.maptilefile, sizeof(config.maptilefile), entry); + + /* 田玄伙穴永皿涩烂白央奶伙 及涩烂 */ + snprintf(entry,sizeof(entry),"%s/%s", + config.topdir,config.battlemapfile); + strcpysafe(config.battlemapfile, sizeof(config.battlemapfile), entry); + + /* 失奶 丞涩烂白央奶伙 及涩烂 */ + snprintf(entry,sizeof(entry), "%s/%s", config.topdir,config.itemfile); + strcpysafe(config.itemfile, sizeof(config.itemfile), entry); + + /* 衬涩烂白央奶伙 及涩烂 */ + snprintf(entry,sizeof(entry), "%s/%s", config.topdir,config.invfile); + strcpysafe(config.invfile, sizeof(config.invfile), entry); + + /* 请蜇匏 涩烂白央奶伙 及涩烂 */ + snprintf(entry,sizeof(entry), "%s/%s", config.topdir,config.appearfile); + strcpysafe(config.appearfile, sizeof(config.appearfile), entry); + + /* 梢请涩烂白央奶伙 及涩烂 */ + snprintf(entry,sizeof(entry), "%s/%s", config.topdir,config.effectfile); + strcpysafe(config.effectfile, sizeof(config.effectfile), entry); + + /* 弁奶术涩烂白央奶伙 及涩烂 */ + snprintf(entry,sizeof(entry), "%s/%s", config.topdir,config.quizfile); + strcpysafe(config.quizfile, sizeof(config.quizfile), entry); + + /* 惫寞 白央奶伙 及涩烂 */ + snprintf(entry,sizeof(entry), "%s/%s", config.topdir,config.titlenamefile); + strcpysafe(config.titlenamefile, sizeof(config.titlenamefile), entry); + + /* lsgen 失它玄皿永玄白央奶伙 */ + snprintf(entry,sizeof(entry),"%s/%s", config.topdir,config.lsgenlog); + strcpysafe(config.lsgenlog, sizeof(config.lsgenlog), entry); + + /* 旦玄失犯奴伊弁玄伉及涩烂 */ +/* + snprintf(entry,sizeof(entry), "%s/%s",config.topdir,config.storedir); + strcpysafe(config.storedir, sizeof(config.storedir), entry); +*/ + /* NPC涩烂玄永皿犯奴伊弁玄伉及涩烂 */ + snprintf(entry,sizeof(entry), "%s/%s",config.topdir,config.npcdir); + strcpysafe(config.npcdir, sizeof(config.npcdir), entry); + +#ifdef _STORECHAR + /* */ + snprintf(entry,sizeof(entry), "%s/%s",config.topdir,config.storechar); + strcpysafe(config.storechar, sizeof(config.storechar), entry); +#endif + +} + + +/* + * 禾奶件正□午赝濠卅滇树 毛 匀化医 毛允月楮醒 + * 娄醒 + * to void* 袄毛医 允月禾奶件正 + * type CTYPE to及滇毛瑁户月 + * value double to卞医 允月袄 + * 忒曰袄 + * 卅仄 + */ +void substitutePointerFromType( void* to , CTYPE type ,double value) +{ + switch( type ){ + case CHAR: + *(char*)to = (char)value; + break; + case SHORT: + *(short*)to = (short)value; + break; + case INT: + *(int*)to = (int)value; + break; + case DOUBLE: + *(double*)to = (double)value; + break; + } +} + + +/*------------------------------------------------------------ + * 涩烂白央奶伙毛 戈 + * 娄醒 + * filename 白央奶伙 + * 忒曰袄 + * TRUE(1) 岳 + * FALSE(0) 撩 -> 白央奶伙及左□皿件卞撩 仄凶 + ------------------------------------------------------------*/ +BOOL readconfigfile( char* filename ) +{ + FILE* f=NULL; + char linebuf[256]; /* 域垫 心 戈田永白央 */ + int linenum=0; /* 垫醒毛醒尹月 */ + char realopenfilename[256]; /* 端卞open 允月白央奶伙 */ + + char hostname[128]; + + /* 石旦玄 毛菲户月 */ + if( gethostname( hostname, sizeof(hostname) ) != -1 ){ + char* initdot; + initdot = index( hostname, '.' ); + if( initdot != NULL ) + *initdot = '\0'; + snprintf( realopenfilename, sizeof(realopenfilename), + "%s.%s" , filename, hostname); + + /* 白央奶伙及左□皿件 */ + f=fopen( realopenfilename, "r" ); + if( f == NULL ) + print( "Can't open %s. use %s instead\n", realopenfilename, + filename ); + } + if( f == NULL ){ + f=fopen( filename , "r" ); /* 白央奶伙及左□皿件 */ + if( f == NULL ){ + print( "Can't open %s\n", filename ); + return FALSE; + } + } + + /* 域垫勿勾 心 戈 */ + while( fgets( linebuf , sizeof( linebuf ), f ) ){ + char firstToken[256]; /*1 及 侬 */ + int i; /*伙□皿 醒*/ + int ret; /*伉正□件戊□玉*/ + + linenum ++; + + deleteWhiteSpace(linebuf); /* remove whitespace */ + + if( linebuf[0] == '#' )continue; /* comment */ + if( linebuf[0] == '\n' )continue; /* none */ + + chomp( linebuf ); /* remove tail newline */ + + /* delim "=" 匹 赓(1)及玄□弁件毛 月*/ + ret = getStringFromIndexWithDelim( linebuf , "=", 1, firstToken, + sizeof(firstToken) ); + if( ret == FALSE ){ + print( "Find error at %s in line %d. Ignore\n", + filename , linenum); + continue; + } + + /* readconf 及扔奶术匹伙□皿 */ + for( i = 0 ; i < arraysizeof( readconf ) ; i ++ ){ + if( strcmp( readconf[i].name ,firstToken ) == 0 ){ + /* match */ + char secondToken[256]; /*2 及 侬 */ + /* delim "=" 匹2 及玄□弁件毛 月*/ + ret = getStringFromIndexWithDelim( linebuf , "=" , 2 + , secondToken , + sizeof(secondToken) ); + + /* NULL 侬井升丹井毛譬屯月 */ + if( ret == FALSE ){ + print( "Find error at %s in line %d. Ignore", + filename , linenum); + break; + } + + + /*NULL分匀凶日医 仄卅中*/ + if( readconf[i].charvalue != NULL ) + strcpysafe( readconf[i].charvalue + ,readconf[i].charsize, secondToken); + + /*NULL分匀凶日医 仄卅中*/ + if( readconf[i].value != NULL ) { + if( strcmp( "ON" ,secondToken ) == 0 ) { + /*ON分匀凶日1毛 木月*/ + substitutePointerFromType( readconf[i].value, + readconf[i].valuetype, + 1.0); + + }else if( strcmp( "OFF" ,secondToken ) == 0 ) { + /*OFF分匀凶日1毛 木月*/ + substitutePointerFromType( readconf[i].value, + readconf[i].valuetype, + 1.0); + }else { + strtolchecknum(secondToken, + (int*)readconf[i].value, + 10, readconf[i].valuetype); + } + } + break; + } + } + } + fclose( f ); + lastConfig(); + return TRUE; +} +//ttom add this becaus the second had this function +/*------------------------------------------------------------ + * 巨件戊□玉平□毛涩烂允月 + * 娄醒 + * 卅仄 + * 忒曰袄 + * unsigned int 平□毛忒允 +------------------------------------------------------------*/ +unsigned int setEncodeKey( void ) +{ + JENCODE_KEY = config.encodekey; + return JENCODE_KEY; +} +/*------------------------------------------------------------ +* 失市它件玄扔□田□卞踏五 戈田永白央及扔奶术毛涩烂允月 +* 娄醒 +* 卅仄 +* 忒曰袄 +* unsigned int 平□毛忒允 +------------------------------------------------------------*/ +unsigned int setAcWBSize( void ) +{ + AC_WBSIZE = config.acwbsize; + return AC_WBSIZE; +} +unsigned int getAcwriteSize( void ) +{ + return config.acwritesize; +} +unsigned int getErrUserDownFlg( void ) +{ + return config.ErrUserDownFlg; +} + + +//tom end + + +#ifdef _M_SERVER +char* getmservername(void) +{ + return config.msname; +} +void setmservername( char *msname) +{ + sprintf( config.msname, "%s", msname); +} +unsigned int getmserverport(void) +{ + return config.msport; +} +void setmserverport( int port) +{ + config.msport = port; +} +#endif + +#ifdef _NPCSERVER_NEW +char *getnpcserveraddr(void) +{ + return config.nsaddress; +} + +unsigned int getnpcserverport(void) +{ + return config.nsport; +} +void NS_setAddressAndPort( char *address, int nport) +{ + sprintf( config.nsaddress, "%s", address); + config.nsport = nport; +} +#endif + +#ifdef _MUSEUM +int getMuseum( void ) +{ + return config.museum; +} +#endif + +#ifdef _DEL_DROP_GOLD +unsigned int getGolddeletetime( void ) +{ + if( config.Golddeletetime > 0 ) + return config.Golddeletetime; + else + return config.Itemdeletetime; +} +void setIGolddeletetime( unsigned int interval ) +{ + config.Golddeletetime = interval; +} +#endif + +#ifdef _NEW_PLAYER_CF +int getNewplayertrans( void ) +{ + if(config.newplayertrans > 7) + return 7; + else if(config.newplayertrans >= 0) + return config.newplayertrans; + else + return 0; +} +int getNewplayerlv( void ) +{ + if(config.newplayerlv > 160) + return 160; + else if(config.newplayerlv >0) + return config.newplayerlv; + else + return 0; +} +int getNewplayerpetlv( void ) +{ + if(config.newplayerpetlv > 160) + return 160; + else if(config.newplayerpetlv > 0) + return config.newplayerpetlv; + else + return 0; +} + +int getNewplayergivepet( unsigned int index ) +{ + if(config.newplayergivepet[index] > 0 ) + return config.newplayergivepet[index]; + else + return -1; +} + +int getNewplayergiveitem( unsigned int index ) +{ + if(config.newplayergiveitem[index] > 0 ) + return config.newplayergiveitem[index]; + else + return -1; +} + +void setNewplayergivepet( unsigned int index ,unsigned int interval) +{ + config.newplayergivepet[index] = interval; +} + +unsigned int getNewplayergivegold( void ) +{ + if(config.newplayergivegold > 1000000) + return 1000000; + else if(config.newplayergivegold >= 0) + return config.newplayergivegold; + else + return 0; +} + +#endif + +#ifdef _UNLAW_WARP_FLOOR +int getUnlawwarpfloor( unsigned int index ) +{ + if(config.unlawwarpfloor[index] > 0 ) + return config.unlawwarpfloor[index]; + else + return -1; +} +#endif + + +#ifdef _ANGEL_SUMMON + +extern int mission_num; + +BOOL LoadMissionList( ) +{ + FILE* fp; + int i = 0; + + mission_num = 0; + + fp = fopen("./data/mission.txt", "r"); + if (fp == NULL) + { + print("任务文件打开错误\n"); + return FALSE; + } + + memset( missionlist, 0, sizeof(missionlist)); + + while(1){ + char line[1024], level[64]; + char token[1024]; + int mindex; + if (fgets(line, sizeof(line), fp) == NULL) break; + print("\n %s ", line); + chop(line); + // 以#为注解******* + if( line[0] == '#' ) + continue; + for( i=0; i= MAXMISSION) + break; + + missionlist[mindex].id = mindex; + + getStringFromIndexWithDelim(line, ",", 2, token, sizeof(token)); + if (strcmp(token, "") == 0) break; + missionlist[mindex].level = atoi( token); + + getStringFromIndexWithDelim(line, ",", 3, token, sizeof(token)); + if (strcmp(token, "") == 0) break; + strcpy( missionlist[mindex].eventflag, token); + + getStringFromIndexWithDelim(line, ",", 4, token, sizeof(token)); + if (strcmp(token, "") == 0) break; + strcpy( missionlist[mindex].detail, token); + + //getStringFromIndexWithDelim(line, ",", 4, token, sizeof(token)); + //if (strcmp(token, "") == 0) break; + //strcpy( missionlist[mindex].bonus, token); + + getStringFromIndexWithDelim(line, ",", 5, token, sizeof(token)); + if (strcmp(token, "") == 0) break; + missionlist[mindex].limittime = atoi( token); + + /*print("\nMISSION[%d] lv:%d ef:%s detail:%s limit:%d ", mindex, + missionlist[mindex].level, missionlist[mindex].eventflag, + missionlist[mindex].detail, missionlist[mindex].limittime ); + */ + mission_num++; + //if (mission_num > MAXMISSION) break; + } + fclose(fp); + return TRUE; +} + + + +BOOL LoadMissionCleanList( ) +{ + // 格式... 使者,勇者,任务,奖赏 + FILE* fp; + int listindex =0; + int i = 0; + + memset( missiontable, 0, sizeof(missiontable)); + fp = fopen("./data/missionclean.txt", "r"); + if (fp == NULL) + { + print("清除任务文件打开错误\n"); + return FALSE; + } + + while(1){ + char line[1024], angelinfo[128], heroinfo[128]; + char token[1024]; + + if (fgets(line, sizeof(line), fp) == NULL) break; + print("\n %s ", line); + chop(line); + // 以#为注解******* + if( line[0] == '#' ) + continue; + for( i=0; i= MAXMISSIONTABLE) break; + } + fclose(fp); + return TRUE; +} + + +#endif + +#ifdef _JOBDAILY +extern DailyFileType dailyfile[MAXDAILYLIST]; +BOOL LoadJobdailyfile(void) +{ + char line[20000]; + char token[16384]; + int listindex =0; + int i; + FILE* fp; + + fp = fopen("./data/jobdaily.txt", "r"); + if (fp == NULL) + { + print("日常工作文件打开错误\n"); + return FALSE; + } + + memset( dailyfile, 0, sizeof(dailyfile)); + + while(1){ + line[0]='\0'; + if (fgets(line, sizeof(line), fp) == NULL) break; + //print("\n %s ", line); + chop(line); + + // #为注解 + if( line[0] == '#' ) + continue; + for( i=0; i96){ + print("任务说明过长:%d",strlen(token)); + return FALSE; + } + strcpy( dailyfile[listindex].explain, token); + + getStringFromIndexWithDelim(line, "|", 4, token, sizeof(token)); + if (strcmp(token, "") == 0) break; + strcpy( dailyfile[listindex].state, token); + + /*print("\ndailyfile[%d] %s %s %s %s", listindex, + dailyfile[listindex].jobid, + dailyfile[listindex].rule, + dailyfile[listindex].explain, + dailyfile[listindex].state); + */ + listindex++; + if ( listindex >= MAXDAILYLIST) break; + } + fclose(fp); + return TRUE; +} +#endif + +#ifdef _RACEMAN +//extern int petflgtable[640]; +//extern struct ASKTABLE asktable[400]; +extern int asktotal; +BOOL LoadRacepetfile(void) +{ + char line[1000]; + char token[64]; + int i; + FILE* fp; + + asktotal = 0; + memset(asktable,0,sizeof(asktable)); + + fp = fopen("./data/raceman.txt", "r"); + if (fp == NULL) + { + print("宠物赛跑文件打开错误\n"); + return FALSE; + } + + while(1){ + line[0]='\0'; + if (fgets(line, sizeof(line), fp) == NULL) break; + chop(line); + + // #为注解 + if( line[0] == '#' ) + continue; + for( i=0; i 140 ) return FALSE; + asktable[asktotal].highlv = atoi(token); + asktotal++; + } + fclose(fp); + return TRUE; + + /* + for( k=0,j=0;j=640) { + print( "Valid petflag Num is %d...", k ); + break; + } + } + //if( CHAR_getInt( petindex, CHAR_PETID) == ENEMYTEMP_getInt( j, E_T_TEMPNO ) ) {//ENEMY_getInt( j, ENEMY_TEMPNO) + } + */ +} + +#endif + + +#ifdef _USER_EXP_CF +BOOL LoadEXP( char* filename ) +{ + FILE* fp; + int i = 0; + + fp = fopen(filename, "r"); + if (fp == NULL) + { + print("无法打开文件\n"); + return FALSE; + } + + while(1){ + char line[64], exp[64]; + if (fgets(line, sizeof(line), fp) == NULL) break; + chop(line); + + if( line[0] == '#' ) + continue; + for( i=0; i 160) break; + easyGetTokenFromString(line, 2, exp, sizeof(exp)); + NeedLevelUpTbls[MaxLevel]=atoi(exp); + } + fclose(fp); + return TRUE; +} + +char* getEXPfile( void ) +{ + return config.expfile; +} + +int getNeedLevelUpTbls( int level ) +{ + return NeedLevelUpTbls[level]; +} + +int getMaxLevel( void ) +{ + if(MaxLevel>160) + MaxLevel=160; + return MaxLevel; +} +#endif + +#ifdef _UNREG_NEMA +char* getUnregname( int index ) +{ + return config.unregname[index]; +} +#endif + +#ifdef _TRANS_LEVEL_CF +int getChartrans( void ) +{ + if(config.chartrans>6) + config.chartrans=6; + return config.chartrans; +} +int getPettrans( void ) +{ + if(config.pettrans>2) + config.pettrans=2; + return config.pettrans; +} +int getYBLevel( void ) +{ + if(config.yblevel>MaxLevel) + config.yblevel=MaxLevel; + return config.yblevel; +} +#endif + +#ifdef _LOCK_IP +char* getLockipPath( void ) +{ + return config.lockip; +} +int loadLockip( char* filename ) +{ + FILE* fp; + int i = 0; + fp = fopen(filename, "r"); + if (fp == NULL) + { + print("无法打开文件\n"); + return FALSE; + } + while(1){ + char line[64], buf[16]; + if (fgets(line, sizeof(line), fp) == NULL) break; + chop(line); + + if( line[0] == '#' ) + continue; + for( i=0; i99)return FALSE; + int i; + for(i=0;ilockip[index].locktime) + return TRUE; + else + return FALSE; + }else + return FALSE; + else + return FALSE; + else + return FALSE; + else + return FALSE; +} + +#endif \ No newline at end of file diff --git a/gmsv/function.c b/gmsv/function.c new file mode 100644 index 0000000..9754921 --- /dev/null +++ b/gmsv/function.c @@ -0,0 +1,793 @@ +#include "version.h" +#include +#include "common.h" +#include "util.h" +#include "char_event.h" +#include "char.h" +#include "item_event.h" +#include "magic.h" +#include "pet_event.h" +#include "npc_townpeople.h" +#include "npc_Dengon.h" +#include "npc_door.h" +#include "npc_healer.h" +#include "npc_oldman.h" +#include "npc_warp.h" +#include "npc_storyteller.h" +#include "npc_msg.h" +#include "npc_npcenemy.h" +#include "npc_action.h" +#include "npc_windowman.h" +#include "npc_savepoint.h" +#include "npc_windowhealer.h" +#include "npc_itemshop.h" +#include "npc_sysinfo.h" +#include "npc_duelranking.h" +#include "npc_petskillshop.h" +#include "npc_petshop.h" +#include "npc_signboard.h" +#include "npc_warpman.h" +#include "npc_exchangeman.h" +#include "petmail.h" +#include "npc_timeman.h" +#include "npc_bodylan.h" +#include "npc_mic.h" +#include "npc_luckyman.h" +#include "npc_bus.h" +#include "npc_charm.h" +#include "npc_poolitemshop.h" +#include "npc_quiz.h" +#include "npc_checkman.h" +#include "npc_janken.h" +#include "npc_transmigration.h" +#include "battle_event.h" +#include "enemy.h" +// Robin 0517 +#include "npc_familyman.h" +#include "npc_bankman.h" +// add code by shan +#include "npc_fmdengon.h" +#include "npc_fmhealer.h" +#include "npc_petmaker.h" + +// CoolFish: Family 2001/6/4 +#include "npc_fmwarpman.h" +#include "npc_fmpkman.h" +#include "npc_fmpkcallman.h" + +// Arminius 7.7 Airplane +#include "npc_airplane.h" + +// Arminius 7.13 Scheduleman +#include "npc_scheduleman.h" + +// Arminius 7.24 manor scheduleman +#include "npc_manorsman.h" + +// Robin 0725 +#include "npc_riderman.h" +#include "npc_fmletter.h" + +#ifdef _SERVICE +// Terry 2001/09/01 +#include "npc_stoneserviceman.h" +#endif + +#ifdef _NPC_SELLSTH +#include "npc_sellsthman.h" +#endif + +//andy +#ifdef _GAMBLE_BANK +#include "npc_gamblebank.h" +#endif + +#ifdef _NEW_WARPMAN +#include "npc_newnpcman.h" +#endif + +#ifdef _MARKET_TRADE +#include "npc_mtradenpcman.h" +#endif + +#ifdef _GAMBLE_ROULETTE +#include "npc_gambleroulette.h" +#include "npc_gamblemaster.h" +#endif + +#ifdef _TRANSER_MAN +#include "npc_transerman.h" +#endif + +#ifdef _PAUCTION_MAN +#include "npc_pauctionman.h" +#endif + +#ifdef _CFREE_petskill +#include "npc_freepetskillshop.h" +#endif + +#ifdef _PETRACE +#include "npc_petracemaster.h" +#include "npc_petracepet.h" +#endif + +#ifdef _AUCTIONEER +#include "npc_auctioneer.h" +#endif + +#ifdef _BLACK_MARKET +#include "npc_blackmarket.h" +#endif + +#ifdef _ITEM_NPCCHANGE +#include "npc_itemchange.h" +#endif + +#ifdef _NPC_MAKEPAIR +#include "npc_makepair.h" +#endif + +#ifdef _NPC_FUSION +#include "npc_petfusion.h" +#endif + +#ifdef _ALLDOMAN // (不可开) Syu ADD 排行榜NPC +#include "npc_alldoman.h" +#endif + +#ifdef _NPC_WELFARE +#include "npc_welfare.h" +#endif + +#ifdef _NPC_WELFARE_2 // WON ADD 职业NPC-2 +#include "npc_welfare2.h" +#endif + +#ifdef _NPC_VERYWELFARE +#include "npc_verywelfare.h" +#endif + +#ifdef _RACEMAN +#include "npc_raceman.h" +#endif + +#define DEBUG + +typedef struct tagCorrespondStringAndFunctionTable +{ + STRING32 functionName; + void* functionPointer; + int hashcode; +}CorrespondStringAndFunctionTable; + +static CorrespondStringAndFunctionTable +correspondStringAndFunctionTable[]= +{ + /* 动票反扔□田□ 戊□玉匹烂聒今木化中月楮醒分[NPC手仇木 + 毛勾井丹午五互丐月*/ + { {"core_PreWalk"}, CHAR_allprewalk, 0 }, + { {"core_PostWalk"}, CHAR_allpostwalk, 0 }, + { {"core_Loop"}, CHAR_loopFunc, 0 }, + { {"core_Dying"}, CHAR_die, 0 }, + { {"core_PlayerWatch"}, CHAR_playerWatchfunc, 0 }, + { {"core_PlayerTalked"}, CHAR_playerTalkedfunc, 0 }, + + + /* 动票反失奶 丞毛银丹午五迕及楮醒分[ */ + { {"MedicineInit"}, ITEM_MedicineInit, 0 }, + { {"MedicineUsed"}, ITEM_MedicineUsed, 0 }, + { {"SandClockDetach"}, ITEM_SandClockDetach, 0 }, + { {"addTitleAttach"}, ITEM_addTitleAttach, 0 }, + { {"delTitleDetach"}, ITEM_delTitleDetach, 0 }, + { {"ITEM_DeleteByWatched"}, ITEM_DeleteByWatched, 0 }, + { {"ITEM_DeleteTimeWatched"}, ITEM_DeleteTimeWatched, 0 }, + { {"ITEM_useEffectTohelos"}, ITEM_useEffectTohelos, 0 }, + +// { {"ITEM_useHpRecovery"}, ITEM_useHpRecovery, 0 }, + { {"ITEM_useRecovery"}, ITEM_useRecovery, 0 }, +#ifdef _ITEM_MAGICRECOVERY + { {"ITEM_useMRecovery"}, ITEM_useMRecovery, 0 }, +#endif +#ifdef _ITEM_USEMAGIC + { {"ITEM_useMagic"}, ITEM_useMagic, 0 }, +#endif + { {"ITEM_useStatusChange"}, ITEM_useStatusChange, 0 }, + { {"ITEM_useStatusRecovery"}, ITEM_useStatusRecovery, 0 }, + { {"ITEM_useMagicDef"}, ITEM_useMagicDef, 0 }, + { {"ITEM_useParamChange"}, ITEM_useParamChange, 0 }, + { {"ITEM_useFieldChange"}, ITEM_useFieldChange, 0 }, + { {"ITEM_useAttReverse"}, ITEM_useAttReverse, 0 }, + { {"ITEM_useRessurect"}, ITEM_useRessurect, 0 }, + { {"ITEM_useMic"}, ITEM_useMic, 0 }, + { {"ITEM_dropMic"}, ITEM_dropMic, 0 }, + { {"ITEM_useCaptureUp"}, ITEM_useCaptureUp, 0 }, + { {"ITEM_useRenameItem"}, ITEM_useRenameItem, 0 }, + { {"ITEM_pickupDice"}, ITEM_pickupDice, 0 }, + { {"ITEM_dropDice"}, ITEM_dropDice, 0 }, + { {"ITEM_initLottery"}, ITEM_initLottery, 0 }, + { {"ITEM_useLottery"}, ITEM_useLottery, 0 }, + { {"ITEM_useWarp"}, ITEM_useWarp, 0 }, + { {"ITEM_petFollow"}, ITEM_petFollow, 0 }, + { {"ITEM_useSkup"}, ITEM_useSkup, 0 }, // Nuke 0624: Hero's bless + { {"ITEM_useNoenemy"}, ITEM_useNoenemy, 0 }, // Nuke 0626: Dragon's help + { {"ITEM_equipNoenemy"},ITEM_equipNoenemy, 0 }, // Arminius 7.2 Ra's amulet + { {"ITEM_remNoenemy"}, ITEM_remNoenemy, 0 }, // Arminius 7.2 Ra's amulet + { {"ITEM_useEncounter"}, ITEM_useEncounter, 0}, // Arminius 7.31 cursed stone + + { {"ITEM_AddPRSkillPoint"}, ITEM_AddPRSkillPoint, 0}, + { {"ITEM_AddPRSkillPercent"}, ITEM_AddPRSkillPercent, 0}, + +#ifdef _ITEM_METAMO + { {"ITEM_metamo"}, ITEM_metamo, 0 }, + { {"ITEM_ColorMetamo"}, ITEM_ColorMetamo, 0 }, + { {"ITEM_CharaMetamo"}, ITEM_CharaMetamo, 0 }, + { {"ITEM_SexMetamo"}, ITEM_SexMetamo, 0 }, +#endif + +#ifdef _USEWARP_FORNUM + { {"ITEM_useWarpForNum"}, ITEM_useWarpForNum, 0 }, +#endif + +#ifdef _IMPRECATE_ITEM + { {"ITEM_useImprecate"}, ITEM_useImprecate, 0 }, +#endif +#ifdef _ITEM_FIRECRACKER //Terry add 2001/12/21 + { {"ITEM_firecracker"}, ITEM_firecracker, 0 }, +#endif +#ifdef _ITEM_CRACKER //vincent 拉炮 + { {"ITEM_Cracker"}, ITEM_Cracker, 0 }, +#endif +#ifdef _ITEM_ADDEXP //vincent 经验提升 + { {"ITEM_Addexp"}, ITEM_Addexp, 0 }, +#endif +#ifdef _ITEM_REFRESH //vincent 解除异常状态道具 + { {"ITEM_Refresh"}, ITEM_Refresh, 0 }, +#endif + + { {"ITEM_WearEquip"}, ITEM_WearEquip, 0 }, + { {"ITEM_ReWearEquip"}, ITEM_ReWearEquip, 0 }, + +#ifdef _ITEM_CONSTITUTION + { {"ITEM_Constitution"}, ITEM_Constitution, 0 }, +#endif + +#ifdef _Item_ReLifeAct + { {"ITEM_DIErelife"}, ITEM_DIErelife, 0 }, +#endif + +#ifdef _ITEM_ORNAMENTS + { {"ITEM_PutOrnaments"}, ITEM_PutOrnaments, 0}, +#endif +#ifdef _CHIKULA_STONE + { {"ITEM_ChikulaStone"}, ITEM_ChikulaStone, 0}, +#endif + +#ifdef _THROWITEM_ITEMS + { {"ITEM_ThrowItemBox"}, ITEM_ThrowItemBox, 0}, +#endif + +#ifdef _ITEM_WATERWORDSTATUS + { {"ITEM_WaterWordStatus"}, ITEM_WaterWordStatus, 0}, +#endif + +#ifdef _ITEM_LOVERPARTY + { {"ITEM_LoverSelectUser"}, ITEM_LoverSelectUser, 0}, +#endif + +#ifdef _Item_MoonAct + { {"ITEM_randEnemyEquipOne"}, ITEM_randEnemyEquipOne, 0 }, + + { {"ITEM_randEnemyEquip"}, ITEM_randEnemyEquip, 0 }, + { {"ITEM_RerandEnemyEquip"}, ITEM_RerandEnemyEquip, 0}, +#endif + +#ifdef _SUIT_ITEM + { {"ITEM_suitEquip"}, ITEM_suitEquip, 0 }, + { {"ITEM_ResuitEquip"}, ITEM_ResuitEquip, 0 }, +#endif + +#ifdef _Item_DeathAct + { {"ITEM_useDeathcounter"}, ITEM_UseDeathCounter, 0 }, +#endif +#ifdef _DEATH_CONTENDWATCH + { {"ITEM_useWatchBattle"}, ITEM_useWatchBattle, 0 }, +#endif +#ifdef _FEV_ADD_NEW_ITEM // FEV ADD 增加复活守精 + { {"ITEM_ResAndDef"} , ITEM_ResAndDef, 0 }, +#endif + +#ifdef _CHRISTMAS_REDSOCKS + { {"ITEM_useMaxRedSocks"}, ITEM_useMaxRedSocks, 0 }, +#endif + +#ifdef _CHRISTMAS_REDSOCKS_NEW + { {"ITEM_useMaxRedSocksNew"}, ITEM_useMaxRedSocksNew, 0 }, +#endif + +#ifdef _PETSKILL_CANNEDFOOD + { {"ITEM_useSkillCanned"}, ITEM_useSkillCanned, 0}, +#endif + +#ifdef _NEW_RIDEPETS + { {"ITEM_useLearnRideCode"}, ITEM_useLearnRideCode, 0 }, +#endif + +#ifdef _EQUIT_DEFMAGIC + { {"ITEM_MagicEquitWear"}, ITEM_MagicEquitWear, 0 }, + { {"ITEM_MagicEquitReWear"}, ITEM_MagicEquitReWear, 0 }, +#endif +#ifdef _EQUIT_RESIST + { {"ITEM_MagicResist"}, ITEM_MagicResist, 0 }, + { {"ITEM_MagicReResist"}, ITEM_MagicReResist, 0 }, +#endif + +#ifdef _MAGIC_RESIST_EQUIT // WON ADD 职业抗性装备 + { {"ITEM_P_MagicEquitWear"}, ITEM_P_MagicEquitWear, 0 }, + { {"ITEM_P_MagicEquitReWear"}, ITEM_P_MagicEquitReWear, 0 }, +#endif + +#ifdef _ANGEL_SUMMON + { {"ITEM_AngelToken"}, ITEM_AngelToken, 0 }, + { {"ITEM_HeroToken"}, ITEM_HeroToken, 0 }, +#endif +#ifdef _HALLOWEEN_EFFECT + { {"ITEM_MapEffect"}, ITEM_MapEffect, 0 }, +#endif + + { {"ITEM_changePetOwner"}, ITEM_changePetOwner, 0 }, + + { {"core_PetWatch"}, PET_Watchfunc, 0 }, + { {"PETMAIL_Loop"}, PETMAIL_Loopfunc, 0 }, +#ifdef _USER_CHARLOOPS + { {"CHAR_BattleStayLoop"}, CHAR_BattleStayLoop, 0 }, + { {"PET_CheckIncubateLoop"}, PET_CheckIncubate, 0 }, +#endif + +#ifdef _PETSKILL_PROPERTY + { {"PET_PetskillPropertyEvent"}, PET_PetskillPropertyEvent, 0 }, +#endif + { {"core_PetTalk"}, PET_Talkfunc, 0}, // Arminius 8.14 pet talk + + + /* warp */ + { {"WarpInit"}, NPC_WarpInit, 0 }, + { {"WarpPostOver"}, NPC_WarpPostOver, 0 }, + { {"WarpWatch"}, NPC_WarpWatch, 0 }, + + /* Dengon */ + { {"DengonInit"}, NPC_DengonInit, 0 }, + { {"DengonWindowTalked"}, NPC_DengonWindowTalked, 0 }, + { {"DengonLooked"}, NPC_DengonLooked, 0 }, + + /* FmDengon add code by shan */ + { {"FmDengonInit"}, NPC_FmDengonInit, 0 }, + { {"FmDengonWindowTalked"}, NPC_FmDengonWindowTalked, 0 }, + { {"FmDengonLooked"}, NPC_FmDengonLooked, 0 }, + + /* Healer */ + { {"HealerInit"} , NPC_HealerInit, 0 }, + { {"HealerTalked"} , NPC_HealerTalked , 0 }, + + /* FMHealer add code by shan */ + { {"FmHealerInit"} , NPC_FmHealerInit, 0 }, + { {"FmHealerTalked"} , NPC_FmHealerTalked , 0 }, + + /* petmaker add code by shan */ + { {"PetMakerInit"} , NPC_PetMakerInit, 0 }, + { {"PetMakerTalked"} , NPC_PetMakerTalked , 0 }, + + /* TownPeople */ + { {"TownPeopleTalked"}, NPC_TownPeopleTalked, 0 }, + { {"TownPeopleInit"}, NPC_TownPeopleInit, 0 }, + + /* TownPeople */ + { {"MsgLooked"}, NPC_MsgLooked , 0 }, + { {"MsgInit"}, NPC_MsgInit, 0 }, + + /* Oldman */ + { {"OldmanInit"} , NPC_OldmanInit , 0 }, + { {"OldmanTalked"} , NPC_OldmanTalked , 0 }, + + /* SavePOint */ + { {"SavePointInit"} , NPC_SavePointInit , 0 }, + { {"SavePointTalked"} , NPC_SavePointTalked , 0 }, + { {"SavePointWindowTalked"}, NPC_SavePointWindowTalked, 0 }, + + /* StoryTeller */ + { {"StoryTellerInit"} , NPC_StoryTellerInit , 0 }, + { {"StoryTellerTalked"} , NPC_StoryTellerTalked , 0 }, + + /* NPCEnemy */ + { {"NPCEnemyInit"} , NPC_NPCEnemyInit , 0 }, + { {"NPCEnemyTalked"} , NPC_NPCEnemyTalked , 0 }, + { {"NPCEnemyWatch"} , NPC_NPCEnemyWatch , 0 }, + { {"NPCEnemyLoop"}, NPC_NPCEnemyLoop, 0 }, + { {"NPCEnemyWindowTalked"}, NPC_NPCEnemyWindowTalked, 0 }, + + /* 失弁扑亦件楝 */ + { {"ActionInit"} , NPC_ActionInit , 0 }, + { {"ActionTalked"} , NPC_ActionTalked , 0 }, + { {"ActionWatch"} , NPC_ActionWatch , 0 }, + + /* 它奴件玉它楝 */ + { {"WindowmanInit"} , NPC_WindowmanInit , 0 }, + { {"WindowmanTalked"} , NPC_WindowmanTalked , 0 }, + { {"WindowmanLooked"}, NPC_WindowmanLooked, 0 }, + { {"WindowmanWindowTalked"}, NPC_WindowmanWindowTalked, 0 }, + + /* 它奴件玉它甲□仿□ */ + { {"WindowHealerInit"} , NPC_WindowHealerInit , 0 }, + { {"WindowHealerTalked"} , NPC_WindowHealerTalked, 0 }, + { {"WindowHealerLooked"} , NPC_WindowHealerLooked, 0 }, + { {"WindowHealerWindowTalked"}, NPC_WindowHealerWindowTalked, 0 }, + + /* 失奶 丞盒 */ + { {"ItemShopInit"} , NPC_ItemShopInit , 0 }, + { {"ItemShopTalked"} , NPC_ItemShopTalked , 0 }, + { {"ItemShopWindowTalked"}, NPC_ItemShopWindowTalked, 0 }, + + /* Sysinfo */ + { {"SysinfoInit"}, NPC_SysinfoInit, 0 }, + { {"SysinfoLoop"}, NPC_SysinfoLoop, 0 }, + { {"SysinfoTalked"} , NPC_SysinfoTalked , 0 }, + + /* Duel仿件平件弘 憎NPC */ + { {"DuelrankingInit"} , NPC_DuelrankingInit , 0 }, + { {"DuelrankingLooked"}, NPC_DuelrankingLooked, 0 }, + { {"DuelrankingWindowTalked"}, NPC_DuelrankingWindowTalked, 0 }, +#ifdef _DEATH_CONTEND + { {"Duelrankingloop"}, NPC_Duelrankingloop, 0 }, +#endif + /* 它奴件玉它矢永玄及 盒 */ + { {"PetSkillShopInit"} , NPC_PetSkillShopInit , 0 }, + { {"PetSkillShopTalked"} , NPC_PetSkillShopTalked, 0 }, + { {"PetSkillShopLooked"} , NPC_PetSkillShopLooked, 0 }, + { {"PetSkillShopWindowTalked"}, NPC_PetSkillShopWindowTalked, 0 }, + + /* 它奴件玉它矢永玄 中潸曰盒 */ + { {"PetShopInit"} , NPC_PetShopInit, 0 }, + { {"PetShopTalked"} , NPC_PetShopTalked, 0 }, + { {"PetShopLooked"} , NPC_PetShopLooked, 0 }, + { {"PetShopWindowTalked"}, NPC_PetShopWindowTalked,0 }, + + /* 枣 */ + { {"SignBoardInit"} , NPC_SignBoardInit, 0 }, + { {"SignBoardLooked"} , NPC_SignBoardLooked, 0 }, + { {"SignBoardWindowTalked"}, NPC_SignBoardWindowTalked, 0 }, + + /*伐□皿穴件 */ + { {"WarpManInit"}, NPC_WarpManInit, 0 }, + { {"WarpManTalked"}, NPC_WarpManTalked, 0 }, + { {"WarpManWatch"}, NPC_WarpManWatch, 0 }, + { {"WarpManLoop"} , NPC_WarpManLoop, 0 }, + { {"WarpManWindowTalked"}, NPC_WarpManWindowTalked,0 }, + + + /*奶矛件玄楝 exchangeman) */ + { {"ExChangeManInit"}, NPC_ExChangeManInit, 0 }, + { {"ExChangeManTalked"}, NPC_ExChangeManTalked, 0 }, + { {"ExChangeManWindowTalked"}, NPC_ExChangeManWindowTalked,0 }, + + /*正奶丞穴件 */ + { {"TimeManInit"}, NPC_TimeManInit, 0 }, + { {"TimeManTalked"}, NPC_TimeManTalked, 0 }, + { {"TimeManWatch"} , NPC_TimeManWatch , 0 }, + + /* 示犯奴仿件必□斥 */ + { {"BodyLanInit"}, NPC_BodyLanInit, 0 }, + { {"BodyLanTalked"}, NPC_BodyLanTalked, 0 }, + { {"BodyLanWatch"} , NPC_BodyLanWatch , 0 }, + { {"BodyLanWindowTalked"} , NPC_BodyLanWindowTalked,0 }, + + /* 穴奶弁 */ + { {"MicInit"}, NPC_MicInit, 0 }, + { {"MicTalked"}, NPC_MicTalked, 0 }, + + /* 仿永平□穴件 */ + { {"LuckyManInit"} , NPC_LuckyManInit , 0 }, + { {"LuckyManTalked"} , NPC_LuckyManTalked, 0 }, + { {"LuckyManWindowTalked"}, NPC_LuckyManWindowTalked, 0 }, + + /* 楝 */ + { {"BusInit"} , NPC_BusInit , 0 }, + { {"BusTalked"} , NPC_BusTalked , 0 }, + { {"BusLoop"} , NPC_BusLoop , 0 }, + + /* 加美航空 */ // Arminius 7.7 Airplane + { {"AirInit"} , NPC_AirInit , 0 }, + { {"AirTalked"} , NPC_AirTalked , 0 }, + { {"AirLoop"} , NPC_AirLoop , 0 }, + + /* 楝 */ + { {"CharmInit"} , NPC_CharmInit , 0 }, + { {"CharmTalked"} , NPC_CharmTalked, 0 }, + { {"CharmWindowTalked"}, NPC_CharmWindowTalked, 0 }, + + { {"PoolItemShopInit"} , NPC_PoolItemShopInit , 0 }, + { {"PoolItemShopLoop"} , NPC_PoolItemShopLoop , 0 }, + { {"PoolItemShopTalked"} , NPC_PoolItemShopTalked , 0 }, + { {"PoolItemShopWindowTalked"}, NPC_PoolItemShopWindowTalked, 0 }, + + { {"QuizInit"} , NPC_QuizInit , 0 }, + { {"QuizTalked"} , NPC_QuizTalked, 0 }, + { {"QuizWindowTalked"}, NPC_QuizWindowTalked, 0 }, + + + /* 切之匀仁引氏 */ + { {"CheckManInit"} , NPC_CheckManInit , 0 }, + { {"CheckManTalked"} , NPC_CheckManTalked, 0 }, + { {"CheckManWindowTalked"}, NPC_CheckManWindowTalked, 0 }, + + /* 元扎氏仃氏楝 */ + { {"JankenInit"} , NPC_JankenInit , 0 }, + { {"JankenTalked"} , NPC_JankenTalked, 0 }, + { {"JankenWindowTalked"}, NPC_JankenWindowTalked, 0 }, + + /* 鳖戏谛 */ + { {"TransmigrationInit"} , NPC_TransmigrationInit , 0 }, + { {"TransmigrationTalked"} , NPC_TransmigrationTalked, 0 }, + { {"TransmigrationWindowTalked"}, NPC_TransmigrationWindowTalked, 0 }, + + /* Family man */ + { {"FamilymanInit"} , NPC_FamilymanInit , 0 }, + { {"FamilymanTalked"} , NPC_FamilymanTalked, 0 }, + { {"FamilymanLooked"}, NPC_FamilymanLooked,0 }, + { {"FamilymanWindowTalked"}, NPC_FamilymanWindowTalked, 0 }, + + /* CoolFish: Family WarpMan 2001/6/6 */ + { {"FMWarpManInit"}, NPC_FMWarpManInit, 0 }, + { {"FMWarpManTalked"}, NPC_FMWarpManTalked, 0 }, + { {"FMWarpManLoop"} , NPC_FMWarpManLoop, 0 }, + { {"FMWarpManWindowTalked"}, NPC_FMWarpManWindowTalked, 0 }, + + /* CoolFish: Family PKMan 2001/7/4 */ + { {"FMPKManInit"}, NPC_FMPKManInit, 0 }, + { {"FMPKManTalked"}, NPC_FMPKManTalked, 0 }, + { {"FMPKManWindowTalked"}, NPC_FMPKManWindowTalked, 0 }, + + /* CoolFish: Family PKCallMan 2001/7/13 */ + { {"FMPKCallManInit"}, NPC_FMPKCallManInit, 0 }, + { {"FMPKCallManTalked"}, NPC_FMPKCallManTalked, 0 }, + { {"FMPKCallManWindowTalked"}, NPC_FMPKCallManWindowTalked, 0 }, + + /* Bank man */ + { {"BankmanInit"} , NPC_BankmanInit , 0 }, + { {"BankmanTalked"} , NPC_BankmanTalked, 0 }, + { {"BankmanLooked"}, NPC_BankmanLooked,0 }, + { {"BankmanWindowTalked"}, NPC_BankmanWindowTalked, 0 }, + + /* Arminius 7.13 scheduleman */ + { {"SchedulemanInit"}, NPC_SchedulemanInit, 0}, + { {"SchedulemanTalked"}, NPC_SchedulemanTalked, 0}, + { {"SchedulemanWindowTalked"}, NPC_SchedulemanWindowTalked, 0}, + { {"SchedulemanLoop"}, NPC_SchedulemanLoop, 0}, + + /* Arminius 7.24 manor scheduleman */ + { {"ManorSmanInit"}, NPC_ManorSmanInit, 0}, + { {"ManorSmanTalked"}, NPC_ManorSmanTalked, 0}, + { {"ManorSmanWindowTalked"}, NPC_ManorSmanWindowTalked, 0}, + { {"ManorSmanLoop"}, NPC_ManorSmanLoop, 0}, + + /* Rider man */ + { {"RidermanInit"} , NPC_RidermanInit , 0 }, + { {"RidermanTalked"} , NPC_RidermanTalked, 0 }, + { {"RidermanLooked"}, NPC_RidermanLooked,0 }, + { {"RidermanWindowTalked"}, NPC_RidermanWindowTalked, 0 }, + + /* FmLetter man */ + { {"FmLetterInit"} , NPC_FmLetterInit , 0 }, + { {"FmLetterTalked"} , NPC_FmLetterTalked, 0 }, + { {"FmLetterLooked"}, NPC_FmLetterLooked,0 }, + { {"FmLetterWindowTalked"}, NPC_FmLetterWindowTalked, 0 }, +#ifdef _SERVICE + // Terry 2001/08/31 + // 石器服务员 StoneServiceMan + { {"StoneServiceManInit"}, NPC_StoneServiceManInit,0}, + { {"StoneServiceManLoop"}, NPC_StoneServiceManLoop,0}, + { {"StoneServiceManTalked"}, NPC_StoneServiceManTalked,0}, + { {"StoneServiceManWindowTalked"}, NPC_StoneServiceManWindowTalked,0}, +#endif + +#ifdef _GAMBLE_BANK //银行 + { {"GambleBankInit"}, NPC_GambleBankInit, 0}, + { {"GambleBankLoop"}, NPC_GambleBankLoop,0}, + { {"GambleBankTalked"}, NPC_GambleBankTalked,0}, + { {"GambleBankWindowTalked"}, NPC_GambleBankWindowTalked,0}, +#endif + +#ifdef _PET_LIMITLEVEL + { {"ITEM_useOtherEditBase"}, ITEM_useOtherEditBase, 0}, +#endif +#ifdef _ITEM_EDITBASES + { {"ITEM_useFusionEditBase"}, ITEM_useFusionEditBase, 0}, +#endif +#ifdef _GAMBLE_ROULETTE //赌场轮盘 + { {"GambleRouletteInit"}, NPC_Gamble_RouletteInit, 0}, + { {"GambleRouletteLoop"}, NPC_Gamble_RouletteLoop, 0}, + { {"GambleRouletteTalked"}, NPC_Gamble_RouletteTalked, 0}, + { {"GambleRouletteWindowTalked"}, NPC_Gamble_RouletteWindowTalked, 0}, + + { {"GambleMasterInit"}, NPC_Gamble_MasterInit, 0}, + { {"GambleMasterLoop"}, NPC_Gamble_MasterLoop, 0}, + { {"GambleMasterTalked"}, NPC_Gamble_MasterTalked, 0}, + { {"GambleMasterWindowTalked"}, NPC_Gamble_MasterWindowTalked, 0}, +#endif + +#ifdef _TRANSER_MAN + { {"TranserManInit"}, NPC_TranserManInit, 0 }, + { {"TranserManTalked"}, NPC_TranserManTalked, 0 }, + { {"TranserManLoop"} , NPC_TranserManLoop, 0 }, + { {"TranserManWindowTalked"}, NPC_TranserManWindowTalked, 0 }, +#endif + +#ifdef _NPC_SELLSTH + { {"SellsthManInit"}, NPC_SellsthManInit, 0 }, + { {"SellsthManTalked"}, NPC_SellsthManTalked, 0 }, + { {"SellsthManLoop"} , NPC_SellsthManLoop, 0 }, + { {"SellsthManWindowTalked"}, NPC_SellsthManWindowTalked, 0 }, +#endif + +#ifdef _NPC_MAKEPAIR + { {"MakePairManInit"}, NPC_MakePairManInit, 0 }, + { {"MakePairManTalked"}, NPC_MakePairManTalked, 0 }, + { {"MakePairManLoop"} , NPC_MakePairManLoop, 0 }, + { {"MakePairManWindowTalked"}, NPC_MakePairManWindowTalked,0 }, +#endif +#ifdef _NPC_FUSION + { {"PetFusionManInit"}, NPC_PetFusionManInit, 0 }, + { {"PetFusionManTalked"}, NPC_PetFusionManTalked, 0 }, + { {"PetFusionManLoop"} , NPC_PetFusionManLoop, 0 }, + { {"PetFusionManWindowTalked"}, NPC_PetFusionManWindowTalked,0 }, +#endif +#ifdef _PAUCTION_MAN + { {"PauctionManInit"}, NPC_PauctionManInit, 0 }, + { {"PauctionManTalked"}, NPC_PauctionManTalked, 0 }, + { {"PauctionManLoop"} , NPC_PauctionManLoop, 0 }, + { {"PauctionManWindowTalked"}, NPC_PauctionManWindowTalked, 0 }, +#endif +#ifdef _ITEM_NPCCHANGE + { {"ItemchangeManInit"}, NPC_ItemchangeManInit, 0 }, + { {"ItemchangeManTalked"}, NPC_ItemchangeManTalked, 0 }, + { {"ItemchangeManLoop"} , NPC_ItemchangeManLoop, 0 }, + { {"ItemchangeManWindowTalked"}, NPC_ItemchangeManWindowTalked, 0 }, +#endif + +#ifdef _CFREE_petskill + { {"FreePetSkillInit"} , NPC_FreePetSkillShopInit, 0 }, + { {"FreePetSkillTalked"} , NPC_FreePetSkillShopTalked, 0 }, + { {"FreePetSkillWindowTalked"}, NPC_FreePetSkillShopWindowTalked, 0 }, +#endif + +#ifdef _PETRACE // 宠物竞速 + { {"PetRaceMasterInit"}, NPC_PetRaceMasterInit, 0}, + { {"PetRaceMasterLoop"}, NPC_PetRaceMasterLoop, 0}, + { {"PetRaceMasterTalked"}, NPC_PetRaceMasterTalked, 0}, + { {"PetRaceMasterWindowTalked"}, NPC_PetRaceMasterWindowTalked, 0}, + + { {"PetRacePetInit"}, NPC_PetRacePetInit, 0}, + { {"PetRacePetLoop"}, NPC_PetRacePetLoop, 0}, + { {"PetRacePetTalked"}, NPC_PetRacePetTalked, 0}, +#endif + +#ifdef _NEW_WARPMAN + { {"NewNpcManInit"}, NPC_NewNpcManInit, 0}, + { {"NewNpcManLoop"}, NPC_NewNpcManLoop, 0}, + { {"NewNpcManTalked"}, NPC_NewNpcManTalked, 0}, + { {"NewNpcManWindowTalked"}, NPC_NewNpcManWindowTalked, 0}, +#endif + +#ifdef _MARKET_TRADE + { {"MapTradeManInit"}, MapTradeManInit, 0}, + { {"MapTradeManLoop"}, MapTradeManLoop, 0}, + { {"MapTradeManTalked"}, MapTradeManTalked, 0}, + { {"MapTradeManWindowTalked"}, MapTradeManWindowTalked, 0}, +#endif + +#ifdef _AUCTIONEER + { {"AuctioneerInit"}, NPC_AuctioneerInit, 0}, + { {"AuctioneerTalked"}, NPC_AuctioneerTalked, 0}, + { {"AuctioneerWindowTalked"}, NPC_AuctioneerWindowTalked, 0}, + { {"AuctioneerLoop"}, NPC_AuctioneerLoop, 0}, +#endif + +#ifdef _BLACK_MARKET + { {"BlackMarketInit"}, NPC_BlackMarketInit, 0}, + { {"BlackMarketTalked"}, NPC_BlackMarketTalked, 0}, + { {"BlackMarketWindowTalked"}, NPC_BlackMarketWindowTalked, 0}, +#endif + +#ifdef _ALLDOMAN // (不可开) Syu ADD 排行榜NPC + { {"AlldomanInit"} , NPC_AlldomanInit, 0 }, + { {"AlldomanTalked"} , NPC_AlldomanTalked , 0 }, + { {"AlldomanWindowTalked"}, NPC_AlldomanWindowTalked , 0}, +#endif + +#ifdef _NPC_WELFARE + { {"WelfareInit"} , NPC_WelfareInit, 0 }, + { {"WelfareTalked"} , NPC_WelfareTalked , 0 }, + { {"WelfareWindowTalked"}, NPC_WelfareWindowTalked , 0}, +#endif + +#ifdef _NPC_WELFARE_2 // WON ADD 职业NPC-2 + { {"WelfareInit2"} , NPC_WelfareInit2, 0 }, + { {"WelfareTalked2"} , NPC_WelfareTalked2, 0 }, + { {"WelfareWindowTalked2"}, NPC_WelfareWindowTalked2, 0}, +#endif + +#ifdef _NPC_VERYWELFARE + { {"VeryWelfareInit"} , NPC_VeryWelfareInit, 0 }, + { {"VeryWelfareTalked"} , NPC_VeryWelfareTalked , 0 }, + { {"VeryWelfareWindowTalked"}, NPC_VeryWelfareWindowTalked , 0}, +#endif + +#ifdef _CONTRACT + { {"ITEM_contract"}, ITEM_contract, 0}, +#endif + +#ifdef _TIME_TICKET + { {"ITEM_timeticket"}, ITEM_timeticket, 0}, +#endif + +#ifdef _RACEMAN + { {"RacemanInit"} ,NPC_RacemanInit, 0 }, + { {"RacemanTalked"} ,NPC_RacemanTalked, 0 }, + { {"RacemanWindowTalked"},NPC_RacemanWindowTalked ,0 }, +#endif + +#ifdef _ITEM_SETLOVER // 结婚物品 + { {"ITEM_SetLoverUser"}, ITEM_SetLoverUser, 0 }, + { {"ITEM_LoverWarp"}, ITEM_LoverWarp, 0 }, + { {"ITEM_LoverUnmarry"}, ITEM_LoverUnmarry, 0 }, +#endif + +#ifdef _GM_ITEM // GM命令物品 + { {"ITEM_GMFUNCTION"}, ITEM_GMFUNCTION, 0 }, +#endif +}; + +BOOL initFunctionTable( void ) +{ + + int i; + { + char* strings[arraysizeof(correspondStringAndFunctionTable)]; + int stringnum=0; + for( i=0 ; i $OUT +cat $IN | grep -e "^#define" | cut -b 9- | sed "s/\"/\'/g" | \ + sed 's/\\/\\\\/g' >> $OUT +echo "<>" >> $OUT +echo "by : 龙zoro工作室\n\";" >> $OUT \ No newline at end of file diff --git a/gmsv/handletime.c b/gmsv/handletime.c new file mode 100644 index 0000000..2af72cd --- /dev/null +++ b/gmsv/handletime.c @@ -0,0 +1,381 @@ +#define __HANDLETIME_C__ +#include "version.h" +#include +#include + +#include "common.h" +#include "handletime.h" + +#define LSTIME_SECONDS_PER_DAY 5400 /* LSTIME域 少氏及蜇 及 醒 */ + +/* + LSTIME_SECONDS_PER_DAY 毛 尹月午}凛棉及褡心填宁毛 尹月仇午互匹五月[ + + 袄 LS凛棉匹域 丐凶曰及蜇 及凛棉醒 + 9000 ( 赏) 2.5 [hour] + 900 0.25[hour] = 15[min] + 90 0.025[hour] = 1.5[min] = 90[sec] + 9 9[sec] + +*/ + +#define LSTIME_HOURS_PER_DAY 1024 /* LSTIME域 少氏及LSTIME及凛棉醒 */ +#define LSTIME_DAYS_PER_YEAR 100 /* LSTIME域 少氏及LSTIME及 醒 */ + + +// WON REM +/* +// Nuke 0701: localtime + + struct timeval NowTime; +#ifdef localtime +#undef localtime +#endif + +struct tm *localtime(const time_t *timep) +{ + static struct tm lt; + memset(<,0,sizeof(lt)); + lt.tm_sec=*timep %60; + lt.tm_min=(*timep %3600) / 60; + lt.tm_hour=(*timep % 86400) / 3600; + return < +} +*/ + +/*------------------------------------------------------------ + * 域伙□皿卞域荚裟壬木化}凛棉毛褡户月[ + * 娄醒 + * 卅仄 + * 忒曰袄 + * 岳 TRUE(1) + * 撩 FALSE(0) + ------------------------------------------------------------*/ +BOOL setNewTime( void ) +{ + if( gettimeofday( &NowTime, (struct timezone*)NULL) != 0 ) { + NowTime.tv_sec = time(0); + // Nuke 0701: Localtime down + print("\n time err !! \n"); + return FALSE; + } + NowTime.tv_sec += DEBUG_ADJUSTTIME; + return TRUE; +} + + +/******************************************************************* +漆葭绎卞仄凶[byHiO 1998/12/4 18:37 +*******************************************************************/ +static long era = (long)912766409 + 5400; + /* SA及啃卞内日仄凶 */ + /* LS葭 毛烂聒允月化五午□卅醒袄[ + 弁仿奶失件玄午 元元扎卅中午分户[*/ + +/******************************************************************* + 穴扑件凛棉井日LS凛棉卞允月 + long t : time匹请月 + LSTIME *lstime : LSTIME厌瞻 尺及禾奶件正 +*******************************************************************/ +void RealTimeToLSTime(long t , LSTIME *lstime) +{ + long lsseconds = t - era; /* LS葭 井日及 醒 */ + long lsdays; /* LS葭 井日及 醒 */ + + /* 葭 井日及 醒毛1 癫曰及 醒匹喃月午} 卞卅月 */ + lstime->year = (int)( lsseconds/(LSTIME_SECONDS_PER_DAY*LSTIME_DAYS_PER_YEAR) ); + + lsdays = lsseconds/LSTIME_SECONDS_PER_DAY;/* 引内葭 井日及 醒毛煌遥仄化 */ + lstime->day = lsdays % LSTIME_DAYS_PER_YEAR;/* 癫凶曰及 醒匹喃匀凶丐引曰互 */ + + + /*(450*12) 匹1 */ + lstime->hour = (int)(lsseconds % LSTIME_SECONDS_PER_DAY ) +/* 仇仇引匹匹}域 互铵引匀化井日窒 凶匀凶井[ */ + * LSTIME_HOURS_PER_DAY / LSTIME_SECONDS_PER_DAY; + /* 域 丐凶曰及 醒匹喃匀化井日域 丐凶曰及凛棉醒毛井仃月午蜇箕窒凛 + 卅及井互歹井月[*/ + + return; +} + +/******************************************************************* + LS凛棉井日穴扑件凛棉卞允月 + LSTIME *lstime : LSTIME厌瞻 尺及禾奶件正 + long *t : 凛棉尺及禾奶件正 +*******************************************************************/ +void LSTimeToRealTime( LSTIME *lstime, long *t) +{ + *t=(long)( + ( lstime->hour*LSTIME_DAYS_PER_YEAR+lstime->day) /* 凛棉 */ + *LSTIME_HOURS_PER_DAY + + + lstime->year) + /*仇及楮醒反壬什匀化中月方丹卞苇尹月[nakamura */ + + + *450; + return; +} + +/******************************************************************* + LS凛棉匹漆及凛棉嗉坌毛 月 + 曰袄 int : 0}苹1}镞2} 3 + LSTIME *lstime : LSTIME厌瞻 尺及禾奶件正 +*******************************************************************/ +LSTIME_SECTION getLSTime (LSTIME *lstime) +{ + if (NIGHT_TO_MORNING < lstime->hour + && lstime->hour <= MORNING_TO_NOON) + return LS_MORNING; + else if(NOON_TO_EVENING < lstime->hour + && lstime->hour <= EVENING_TO_NIGHT) + return LS_EVENING; + else if(EVENING_TO_NIGHT < lstime->hour + && lstime->hour <= NIGHT_TO_MORNING) + return LS_NIGHT; + else + return LS_NOON; +} + + +#ifdef _ASSESS_SYSEFFICACY +static clock_t TotalClock = 0; +static clock_t StartClock = 0; +//static int EndClock = 0; +//static float SysTime=0.0; +static clock_t EndClock = 0; +static double SysTime=0.0; +static int Cnum = 0; + +#ifdef _ASSESS_SYSEFFICACY_SUB +static clock_t Net_TotalClock = 0; +static clock_t NPCGEN_TotalClock = 0; +static clock_t Battle_TotalClock = 0; +static clock_t Char_TotalClock = 0; +static clock_t Petmail_TotalClock = 0; +static clock_t Family_TotalClock = 0; +static clock_t SaveCheck_TotalClock = 0; +static clock_t GMBroadCast_TotalClock = 0; +static double Net_SysTime=0.0; +static double NPCGEN_SysTime=0.0; +static double Battle_SysTime=0.0; +static double Char_SysTime=0.0; +static double Petmail_SysTime=0.0; +static double Family_SysTime=0.0; +static double SaveCheck_SysTime=0.0; +static double GMBroadCast_SysTime=0.0; +static clock_t SubStartClock = 0; +#endif + +void Assess_InitSysEfficacy() +{ + TotalClock = 0; + StartClock = 0; + EndClock = 0; +#ifdef _ASSESS_SYSEFFICACY_SUB + Net_TotalClock = 0; + NPCGEN_TotalClock = 0; + Battle_TotalClock = 0; + Char_TotalClock = 0; + Petmail_TotalClock = 0; + Family_TotalClock = 0; + SaveCheck_TotalClock = 0; + GMBroadCast_TotalClock = 0; + + SubStartClock = 0; +#endif +} + +void Assess_SysEfficacy( int flg) +{ + if( flg == 0 ){ + StartClock=clock(); + }else if( flg == 1 ){ + EndClock = clock(); + if( EndClock < StartClock ) return; + TotalClock += (int)(EndClock-StartClock); + Cnum++; + if( Cnum%500 == 0 ){ + SysTime = (float)(TotalClock/Cnum)/CLOCKS_PER_SEC; + TotalClock = 0; +#ifdef _ASSESS_SYSEFFICACY_SUB + Net_SysTime = (float)(Net_TotalClock/Cnum)/CLOCKS_PER_SEC; + Net_TotalClock = 0; + NPCGEN_SysTime = (float)(NPCGEN_TotalClock/Cnum)/CLOCKS_PER_SEC; + NPCGEN_TotalClock = 0; + Battle_SysTime = (float)(Battle_TotalClock/Cnum)/CLOCKS_PER_SEC; + Battle_TotalClock = 0; + Char_SysTime = (float)(Char_TotalClock/Cnum)/CLOCKS_PER_SEC; + Char_TotalClock = 0; + Petmail_SysTime = (float)(Petmail_TotalClock/Cnum)/CLOCKS_PER_SEC; + Petmail_TotalClock = 0; + Family_SysTime = (float)(Family_TotalClock/Cnum)/CLOCKS_PER_SEC; + Family_TotalClock = 0; + SaveCheck_SysTime = (float)(SaveCheck_TotalClock/Cnum)/CLOCKS_PER_SEC; + SaveCheck_TotalClock = 0; + GMBroadCast_SysTime = (float)(GMBroadCast_TotalClock/Cnum)/CLOCKS_PER_SEC; + GMBroadCast_TotalClock = 0; +#endif + Cnum = 0; + } + } + /* + EndClock = clock(); + if( StartClock != 0 ){ + if( EndClock < StartClock ) return; + TotalClock += (int)(EndClock-StartClock); + Cnum++; + if( Cnum%500 == 0 ){ + SysTime = (float)TotalClock/Cnum; + TotalClock = 0; + } + } + StartClock = EndClock; + */ +} + +void ASSESS_getSysEfficacy( float *TVsec) +{ + *TVsec = SysTime; +} + +#ifdef _ASSESS_SYSEFFICACY_SUB +void Assess_SysEfficacy_sub( int flg, int loop) +{ + + if( flg == 0 ){ + SubStartClock = clock(); + }else if( flg == 1 ){ + EndClock = clock(); + if( EndClock < SubStartClock ) return; + + switch( loop) { + case 1: // Net_TotalClock + Net_TotalClock += (int)(EndClock-SubStartClock); + break; + case 2: // NPCGEN_TotalClock + NPCGEN_TotalClock += (int)(EndClock-SubStartClock); + break; + case 3: // Battle_TotalClock + Battle_TotalClock += (int)(EndClock-SubStartClock); + break; + case 4: // Char_TotalClock + Char_TotalClock += (int)(EndClock-SubStartClock); + break; + case 5: // Petmail_TotalClock + Petmail_TotalClock += (int)(EndClock-SubStartClock); + break; + case 6: // Family_TotalClock + Family_TotalClock += (int)(EndClock-SubStartClock); + break; + case 7: // SaveCheck_TotalClock + SaveCheck_TotalClock += (int)(EndClock-SubStartClock); + break; + case 8: // GMBroadCast_TotalClock + GMBroadCast_TotalClock += (int)(EndClock-SubStartClock); + break; + } + } +} + +void ASSESS_getSysEfficacy_sub( float *TVsec, int loop_index) +{ + switch( loop_index) { + case 1: + *TVsec = Net_SysTime; + break; + case 2: + *TVsec = NPCGEN_SysTime; + break; + case 3: + *TVsec = Battle_SysTime; + break; + case 4: + *TVsec = Char_SysTime; + break; + case 5: + *TVsec = Petmail_SysTime; + break; + case 6: + *TVsec = Family_SysTime; + break; + case 7: + *TVsec = SaveCheck_SysTime; + break; + case 8: + *TVsec = GMBroadCast_SysTime; + break; + } +} + +#endif + +#endif + +#ifdef _CHECK_BATTLETIME + +#include "battle.h" +static clock_t battleComClock = 0; +double battleComTotalTime[BATTLE_COM_END]; +long battleComTotalUse[BATTLE_COM_END]; + +void check_battle_com_init( void) +{ + print("\n check_battle_com_init... "); + print("\n BATTLE_COM_END = %d ", BATTLE_COM_END); + memset( battleComTotalTime, 0, sizeof(double)*BATTLE_COM_END); + memset( battleComTotalUse, 0, sizeof(long)*BATTLE_COM_END); +} + +void check_battle_com_begin( void) +{ + print(" bi "); + battleComClock = clock(); +} + +void check_battle_com_end( int b_com) +{ + clock_t endClock; + double usedClock; + + endClock = clock(); + usedClock = (double)(endClock - battleComClock)/CLOCKS_PER_SEC; + + print(" BC[%d,%0.10f] ", b_com, usedClock); + battleComTotalTime[b_com] += usedClock; + battleComTotalUse[b_com] ++; + + print(" bo "); + +} + +void check_battle_com_show( void) +{ + FILE *outfile; + int i; + char outstr[1024]; + + outfile = fopen( "battle_com_time.txt", "w"); + if( !outfile) + { + print("\n OPEN battle_com_time.txt ERROR!!! \n"); + return; + } + + for( i =0; i =BATTLE_battlenum || (a)<0 )?(FALSE):(TRUE) ) +#define BATTLE_CHECKSIDE( a ) ( ((a)>=2 || (a)<0)?(FALSE):( TRUE) ) +#define BATTLE_CHECKNO( a ) ( ((a)>=20 || (a)<0 )?(FALSE):(TRUE) ) +#define BATTLE_CHECKADDRESS( a ) ((&BattleArray[0])<=(a) && (a)<=(&BattleArray[BATTLE_battlenum-1] )?(TRUE):(FALSE) ) + +#define IsBATTLING( a ) (CHAR_getWorkInt((a),CHAR_WORKBATTLEMODE)?(TRUE):(FALSE)) + +#define STRCPY_TAIL( _pszTop, _pszLast, _szBuffer) { int _len = strlen( _szBuffer ); ( _pszTop + _len < (_pszLast)-1 )?( memcpy( _pszTop, _szBuffer, _len ), _pszTop += _len, _pszTop[0] = 0):(0); } + +#define BATTLESTR_ADD( _szBuffer ){ int _len = strlen( _szBuffer ); ( pszBattleTop + _len < ( pszBattleLast)-1 )?( memcpy( pszBattleTop, _szBuffer, _len ), pszBattleTop += _len, pszBattleTop[0] = 0):(0); } + +#define BATTLE_MAP_MAX 219 + +#define CH_FIX_PLAYERLEVELUP (+2) // 皿伊奶乩□及伊矛伙互失永皿 +#define CH_FIX_PLAYERDEAD (-2) // 皿伊奶乩□互骚橘韶 +#define CH_FIX_PLAYEULTIMATE (-4) // 皿伊奶乩□互失伙 奴丢永玄韶 +#define CH_FIX_PETESCAPE (-1) // 矢永玄互 仆凶 + +#define AI_FIX_PETLEVELUP (+5*100) // 矢永玄互伊矛伙失永皿 +#define AI_FIX_PETWIN (+1) // 矢永玄互衬毛逦仄凶 +#define AI_FIX_PETGOLDWIN (+2*10) // 矢永玄互伊矛伙及嫖中衬毛逦仄凶 +#define AI_FIX_PETRECOVERY (+10) // 爵 卞荚汊仄化手日匀凶 +#define AI_FIX_PETRESSURECT (+3*100) // 爵 卞汊唾仄化手日匀凶 +//#define AI_FIX_PETRECOVERY (+50) // 爵 卞荚汊仄化手日匀凶 + +#define AI_FIX_SEKKAN (-2*100) // 愤坌及矢永玄毛 猾 +#define AI_FIX_PLAYERULTIMATE (-10*100) // 愤坌及潜谛互失伙 奴丢永玄韶 +#define AI_FIX_PETULTIMATE (-10*100) // 矢永玄互失伙 奴丢永玄韶 +#define AI_FIX_PLAYERDEAD (-1*100) // 愤坌及潜谛互竣濮 +#define AI_FIX_PETDEAD (-5*100) // 矢永玄互竣濮 + + +#ifdef _Item_ReLifeAct +int BATTLE_getBattleDieIndex( int battleindex, int bid ); +#endif + +int BATTLE_No2Index( int battleindex, int No); + +int BATTLE_Index2No( int battleindex, int charaindex); + +BOOL BATTLE_initBattleArray( int battlenum); + +int BATTLE_CreateBattle( void ); +int BATTLE_DeleteBattle( int battleindex); + +int BATTLE_NewEntry( int charaindex, int battleindex, int side); + +#define BATTLE_Exit( charaindex, battleindex) _BATTLE_Exit( __FILE__, __LINE__, charaindex, battleindex) +INLINE int _BATTLE_Exit( char *file, int line, int charaindex ,int battleindex); + +#define BATTLE_ExitAll( battleindex) _BATTLE_ExitAll( __FILE__, __LINE__, battleindex) +INLINE void _BATTLE_ExitAll( char *file, int line, int battleindex); + +int BATTLE_CreateVsPlayer( int charaindex0, int charaindex1); + +int BATTLE_CreateVsEnemy( int charaindex, int mode, int npcindex); + +int BATTLE_CountEntry( int battleindex, int side); + +int BATTLE_Loop( void ); + +int BATTLE_FinishSet( int battleindex ); +int BATTLE_StopSet( int battleindex ); +int BATTLE_RescueEntry( int charaindex, int toindex); + +int BATTLE_PetDefaultExit( int charaindex, int battleindex); + +int BATTLE_PetDefaultEntry( + int charaindex, // 矢永玄毛 匀化中月皿伊奶乩□及 + int battleindex,// 田玄伙奶件犯永弁旦 + int side +); + +BOOL BATTLE_RescueTry( int charaindex); + +BOOL BATTLE_RescueParentTry( + int charaindex, + int pindex + ); + +int BATTLE_DefaultAttacker( int battleindex, int side); + +BOOL BATTLE_IsThrowWepon( int itemindex); + +void BATTLE_BadStatusString( int defNo, int status ); +int BATTLE_MultiList( int battleindex, int toNo, int ToList[] ); +BOOL BATTLE_IsCharge( int com ); +BOOL BATTLE_CanMoveCheck( int charaindex ); +int BATTLE_TargetCheck( int battleindex, int defNo); +char *BATTLE_CharTitle( int charaindex ); +void BATTLE_EscapeDpSend( int battleindex, int charaindex ); +int BATTLE_GetDuelPoint( int battleindex, int side, int num); +int BATTLE_TargetCheckDead( int battleindex, int defNo); + +void BATTLE_MultiListDead( int battleindex, int toNo, int ToList[] ); +BOOL BATTLE_WatchTry( int charaindex); +int BATTLE_WatchEntry( int charaindex, int toindex); +void BATTLE_WatchStop( int charaindex ); +int BATTLE_WatchUnLink( int battleindex ); +void BATTLE_BpSendToWatch( BATTLE *pBattle, char *pszBcString); + +int BATTLE_GetWepon( int charaindex ); + +#ifdef _ITEM_EQUITSPACE +int BATTLE_GetEqShield( int charaindex ); +#endif + +int BATTLE_GetAttackCount( int charaindex ); +int DoujyouRandomWeponSet( int charaindex ); +void BATTLE_AttReverse( int charaindex ); +void BATTLE_BadStatusAllClr( int charaindex ); +#define CHAR_GETWORKINT_HIGH( index, pos ) ( CHAR_getWorkInt( (index), (pos) ) >> 16 ) +#define CHAR_SETWORKINT_HIGH( index, pos, set ) { int iTmp = CHAR_getWorkInt( (index), (pos) ) & 0xFFFF, work = (set); CHAR_setWorkInt( (index), (pos), (work << 16)|iTmp ); } +#define CHAR_GETWORKINT_LOW( index, pos ) ( CHAR_getWorkInt( (index), (pos) ) & 0xFFFF ) +#define CHAR_SETWORKINT_LOW( index, pos, set ) { int iTmp = CHAR_getWorkInt( index, pos ) & 0xFFFF0000, work = (set); CHAR_setWorkInt( (index), (pos), (work & 0x0000FFFF) | iTmp ); } + +int Battle_getTotalBattleNum(); + +#ifdef _TYPE_TOXICATION +void CHAR_ComToxicationHp( int charaindex); +#endif + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 +void BATTLE_ProfessionStatus_init( int battleindex, int charaindex ); +void BATTLE_ProfessionStatusSeq( int battleindex, int charaindex); +#endif + + +#endif diff --git a/gmsv/include/battle_ai.h b/gmsv/include/battle_ai.h new file mode 100644 index 0000000..a7fc394 --- /dev/null +++ b/gmsv/include/battle_ai.h @@ -0,0 +1,10 @@ +#ifndef __BATTLE_AI_H__ +#define __BATTLE_AI_H__ + +/* 曰轼 */ +int BATTLE_ai_all( int battleindex, int side, int turn); +int BATTLE_ai_one( int charaindex, int battleindex, int side, int turn); +#ifdef _ENEMY_ATTACK_AI +int GetSubdueAtt(int index); +#endif +#endif diff --git a/gmsv/include/battle_command.h b/gmsv/include/battle_command.h new file mode 100644 index 0000000..c98b697 --- /dev/null +++ b/gmsv/include/battle_command.h @@ -0,0 +1,27 @@ +#ifndef __BATTLE_COMMAND_H__ +#define __BATTLE_COMMAND_H__ + +void BattleCommandDispach( + int fd, + char *command +); + +void BattleEncountOut( + int charaindex +); + +BOOL BATTLE_CommandSend( int charaindex, char *pszCommand ); + +BOOL BATTLE_MakeCharaString( + int battleindex, + char *pszCommand, // 平乓仿弁正□树 请 燮 + int size // 扔奶术 +); + +void BATTLE_CharSendAll( int battleindex ); + +BOOL BATTLE_PetDefaultCommand( int petindex ); + +void BATTLE_ActSettingSend( int battleindex ); + +#endif diff --git a/gmsv/include/battle_event.h b/gmsv/include/battle_event.h new file mode 100644 index 0000000..3571cf9 --- /dev/null +++ b/gmsv/include/battle_event.h @@ -0,0 +1,383 @@ +#ifndef __BATTLE_EVENT_H__ +#define __BATTLE_EVENT_H__ + +#define BCC_HIT 'H' +#define BCC_FIRE 'F' + +#define BCF_DEATH (1 << 0) +#define BCF_NORMAL (1 << 1) +#define BCF_KAISHIN (1 << 2) +#define BCF_GUARD (1 << 3) +#define BCF_COUNTER (1 << 4) +#define BCF_DODGE (1 << 5) +#define BCF_ULTIMATE_1 (1 << 6) +#define BCF_ULTIMATE_2 (1 << 7) +#define BCF_GBREAK (1 << 8) +#define BCF_GUARDIAN (1 << 9) +#define BCF_REFRECT (1 << 10) +#define BCF_ABSORB (1 << 11) +#define BCF_VANISH (1 << 12) +#define BCF_CRUSH (1 << 13) +#define BCF_FALL (1 << 14) //落马术 +#ifdef _SKILL_TOOTH +#define BCF_TOOTH (1 << 15) // 齿 +#endif +#ifdef _PSKILL_MODIFY +#define BCF_ATTDOUBLE (1 << 16) //属性强化 +#endif +#ifdef _SKILL_ROAR +#define BCF_ROAR (1 << 17) //宠技:大吼(克年兽) +#endif + +#ifdef _MAGIC_DEFMAGICATT +#define BCF_DEFMAGICATT (1 << 19) +#endif +#ifdef _MAGIC_SUPERWALL +#define BCF_SUPERWALL (1 << 20) +#endif +#ifdef _PSKILL_MDFYATTACK +#define BCF_MODIFY (1 << 21) +#endif + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 +#define BCF_F_SKILLACT (1 << 22) //击中前秀图 +#define BCF_TRAP (1 << 25) //陷阱 +#define BCF_NO_DAMAGE (1 << 26) //双重攻击 +#endif +#define BCF_B_SKILLACT (1 << 23) //击中後秀图 + + + +#ifdef _EQUIT_ARRANGE +#define BCF_B_ARRANGE (1 << 24) //格挡秀图 +#endif + +#ifdef _PETSKILL_ACUPUNCTURE +#define BCF_ACUPUNCTURE (1 << 27) +#endif + +#ifdef _PETSKILL_ANTINTER +#define BCF_ANTINTER (1 << 28) +#endif +#ifdef _PETSKILL_EXPLODE +#define BCF_EXPLODE (1 << 29) +#endif + +#ifdef _OTHER_MAGICSTAUTS +#ifdef _MAGICSTAUTS_RESIST +#define MAXSTATUSTYPE 6 +#else +#define MAXSTATUSTYPE 3 +#endif //_MAGICSTAUTS_RESIST +extern char MagicStatus[MAXSTATUSTYPE][36]; +extern int MagicTbl[]; +extern int MagicTypeTbl[]; +#endif + +extern char *aszStatus[]; +extern char *aszStatusFull[]; +extern int StatusTbl[]; +extern int RegTbl[]; +extern int MagicDefTbl[]; +extern char *aszMagicDefFull[]; +extern char *aszMagicDef[]; + +extern char *aszParamChange[]; +extern char *aszParamChangeFull[]; +extern int aParamChangeTbl[]; + +extern float gBattleDamageModyfy; +extern int gBattleDuckModyfy; +extern int gBattleStausChange; +extern int gBattleStausTurn; + +enum{ + BATTLE_ST_NONE, // 0 "正常", + BATTLE_ST_POISON, // 1 "毒", + BATTLE_ST_PARALYSIS, // 2 "麻", + BATTLE_ST_SLEEP, // 3 "眠", + BATTLE_ST_STONE, // 4 "石", + BATTLE_ST_DRUNK, // 5 "醉", + BATTLE_ST_CONFUSION, // 6 "乱", + BATTLE_ST_WEAKEN, // 7 "虚" + BATTLE_ST_DEEPPOISON,// 8 "剧毒" + BATTLE_ST_BARRIER, // 9 "魔障" + BATTLE_ST_NOCAST, // 10 "沉默" +#ifdef _PET_SKILL_SARS // WON ADD 毒煞蔓延 + BATTLE_ST_SARS, // 11 "煞" +#endif +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + BATTLE_ST_DIZZY, // 12 "晕" + BATTLE_ST_ENTWINE, // 13 "缠" + BATTLE_ST_DRAGNET, // 14 "天罗地网" + BATTLE_ST_ICECRACK, // 15 "冰爆术" + BATTLE_ST_OBLIVION, // 16 "遗忘" + BATTLE_ST_ICEARROW, // 17 "冰箭" + BATTLE_ST_BLOODWORMS,// 18 "嗜血蛊" + BATTLE_ST_SIGN, // 19 "一针见血" + BATTLE_ST_INSTIGATE, // 20 "挑拨" + BATTLE_ST_F_ENCLOSE, // 21 "火附体" + BATTLE_ST_I_ENCLOSE, // 22 "冰附体" + BATTLE_ST_T_ENCLOSE, // 23 "雷附体" + BATTLE_ST_FOCUS, // 24 "专注战斗" + BATTLE_ST_RESIST_F, // 25 "火抗" + BATTLE_ST_RESIST_I, // 26 "冰抗" + BATTLE_ST_RESIST_T, // 27 "雷抗" + BATTLE_ST_F_ENCLOSE2, // 28 "火附" + BATTLE_ST_I_ENCLOSE2, // 29 "冰附" + BATTLE_ST_T_ENCLOSE2, // 30 "雷附" +#ifdef _PROFESSION_ADDSKILL + BATTLE_ST_RESIST_F_I_T, //31 "火冰雷抗" + //BATTLE_ST_BOUNDARY_F, //32 "火结界 + BATTLE_ST_WATER, //32 "水附体" + BATTLE_ST_WORKANNEX, //33 "附身" + BATTLE_ST_FEAR, //34 "恐惧" + BATTLE_ST_ICECRACK2, // 35 "冰爆术" + BATTLE_ST_ICECRACK3, // 36 + BATTLE_ST_ICECRACK4, // 37 + BATTLE_ST_ICECRACK5, // 38 + BATTLE_ST_ICECRACK6, // 39 + BATTLE_ST_ICECRACK7, // 40 + BATTLE_ST_ICECRACK8, // 41 + BATTLE_ST_ICECRACK9, // 42 + BATTLE_ST_ICECRACK10, // 43 +#endif + +#endif + + BATTLE_ST_END +}; + +#ifdef _OTHER_MAGICSTAUTS +enum{ + BATTLE_MST_NONE, + BATTLE_MST_DEFMAGIC, + BATTLE_MST_SUPERWALL, +#ifdef _MAGICSTAUTS_RESIST + BATTLE_MST_MAGICFIRE, + BATTLE_MST_MAGICTHUNDER, + BATTLE_MST_MAGICICE, +#endif + BATTLE_MST_END +}; +#endif + +enum{ + BATTLE_MD_NONE, + BATTLE_MD_ABSROB, + BATTLE_MD_REFLEC, + BATTLE_MD_VANISH, + BATTLE_MD_TRAP, +#ifdef _PETSKILL_ACUPUNCTURE + BATTLE_MD_ACUPUNCTURE, //针刺外皮 +#endif + BATTLE_MD_END +}; + +#ifdef _PETSKILL_RETRACE + //存放BATTLE_Attack函式执行後的攻击模式 +typedef struct tagBattle_Attack_ReturnData_x1 +{ + int Battle_Attack_ReturnData; +}Battle_Attack_ReturnData_x1; +Battle_Attack_ReturnData_x1 Battle_Attack_ReturnData_x; + +#endif + +int BATTLE_DamageCalc( int attackindex, int defindex ); + +BOOL BATTLE_Attack( int battleindex, int attackNo, int defNo ); + +BOOL BATTLE_Counter( int battleindex, int attackNo, int defNo ); + +BOOL BATTLE_Capture( int battleindex, int attackNo, int defNo ); + +void BATTLE_Guard( int battleindex, int attackNo ); + +// Nuke 20040112 fix for performance +#define BATTLE_BroadCast(A,B,C) 0 +#define BATTLE_BroadCastOn(A,B,C) 0 +//int BATTLE_BroadCast( int battleindex, char *pszBuffer, int color ); +//int BATTLE_BroadCastOn( int battleindex, char *pszBuffer, int color ); + +BOOL BATTLE_Escape( int battleindex, int attackNo, int flag); + +int BATTLE_NoAction( int battleindex, int attackNo ); + +int BATTLE_PetIn( int battleindex, int attackNo ); + +int BATTLE_PetOut( int battleindex, int attackNo ); + +int BATTLE_SurpriseCheck( int battleindex ); + +int BATTLE_Magic( int battleindex, int attackNo ); + +int BATTLE_S_GBreak( int battleindex, int attackNo, int defNo ); + +#ifdef _SKILL_GUARDBREAK2//破除防御2 vincent add 2002/05/20 +int BATTLE_S_GBreak2( int battleindex, int attackNo, int defNo ); +#endif + +#ifdef _SKILL_SACRIFICE +int BATTLE_S_Sacrifice( int battleindex, int attackNo, int defNo ); +#endif + +#ifdef _SKILL_REFRESH +int BATTLE_S_Refresh( int battleindex, int attackNo, int defNo, int marray ); +#endif + +#ifdef _SKILL_WEAKEN //vincent宠技:虚弱 +int BATTLE_S_Weaken( int battleindex, int attackNo, int defNo, int marray ); +#endif + +#ifdef _SKILL_DEEPPOISON //vincent宠技:剧毒 +int BATTLE_S_Deeppoison( int battleindex, int attackNo, int defNo, int marray ); +#endif + +#ifdef _SKILL_BARRIER //vincent宠技:魔障 +int BATTLE_S_Barrier( int battleindex, int attackNo, int defNo, int marray ); +#endif + +#ifdef _SKILL_NOCAST //vincent宠技:沉默 +int BATTLE_S_Nocast( int battleindex, int attackNo, int defNo, int marray ); +#endif + +#ifdef _SKILL_ROAR //vincent宠技:大吼 +int BATTLE_S_Roar( int battleindex, int attackNo, int defNo, int marray ); +#endif + +int BATTLE_Charge( int battleindex, int attackNo ); + + +int BATTLE_StatusAttackCheck( + + int attackindex, + int defindex, + int status, + //BATTLE_ST_POISON, 1 "毒", + //BATTLE_ST_PARALYSIS, 2 "麻", + //BATTLE_ST_SLEEP, 3 "眠", + //BATTLE_ST_STONE, 4 "石", + //BATTLE_ST_DRUNK, 5 "醉", + //BATTLE_ST_CONFUSION, 6 "乱" + int PerOffset, + int Range, + float Bai, + int *pPer +); + +int BATTLE_Combo( int battleindex, int *pAttackList, int defNo ); + +int BATTLE_EarthRoundHide( int battleindex, int attackNo ); + +int BATTLE_GetDamageReact( int charaindex ); + +void BATTLE_talkToCli( int charaindex, char *pszBuffer, int color ); + +#ifdef _PETSKILL_SETDUCK +BOOL BATTLE_CheckMySkillDuck( int charaindex ); +#endif + +BOOL BATTLE_LostEscape( int battleindex, int attackNo ); + +BOOL BATTLE_Abduct( int battleindex, int attackNo, int defNo, int array ); + +void BATTLE_Steal( int battleindex, int attackNo, int defNo ); + +int BATTLE_getReactFlg( int index, int react); + +#ifdef _BATTLESTEAL_FIX +void BATTLE_StealMoney( int battleindex, int attackNo, int defNo) ; +#endif + +#ifdef _PETSKILL_LER +void BATTLE_BatFly(int battleindex,int attackNo,int myside); +void BATTLE_DivideAttack(int battleindex,int attackNo,int myside); +void BATTLE_LerChange(int battleindex,int charaindex,int no); +#endif + +#ifdef _PETSKILL_BATTLE_MODEL +void BATTLE_BattleModel(int battleindex,int attackNo,int myside); +#endif + +// Robin 0727 Ride Pet +#define ATTACKSIDE 1 +#define DEFFENCESIDE 2 + +float BATTLE_adjustRidePet3A( int charaindex, int petindex, int workindex, int action ); + +int BATTLE_getRidePet( int charaindex ); + +#ifdef _PSKILL_FALLGROUND //落马术 +int BATTLE_S_FallGround( int battleindex, int attackNo, int defNo, int skill_type ); +#endif +#ifdef _PETSKILL_EXPLODE +int BATTLE_S_Explode( int battleindex, int attackNo, int defNo, int skill_type ); +#endif + +#ifdef _PETSKILL_PROPERTY +int BATTLE_S_PetSkillProperty( int battleindex, int attackNo, int skill_type, int skill); +#endif + +int BATTLE_S_AttackDamage( int battleindex, int attackNo, int defNo, int skill_type, int skill); + +#ifdef _MAGIC_SUPERWALL +int PETSKILL_MagicStatusChange_Battle( int battleindex, int attackNo, int toNo, int marray); +#endif + +#ifdef _PETSKILL_SETDUCK +int PETSKILL_SetDuckChange_Battle( int battleindex, int attackNo, int toNo, int marray); +#endif + +#ifdef _MAGICPET_SKILL +int PETSKILL_SetMagicPet_Battle( int battleindex, int attackNo, int toNo, int marray); +#endif + +#ifdef _TAKE_ITEMDAMAGE +int BATTLE_ItemCrushCheck( int charaindex , int flg); +int BATTLE_ItemCrush( int charaindex, int ItemEquip, int Damages, int flg); +#endif + +#ifdef _PRO_BATTLEENEMYSKILL +int BATTLE_E_ENEMYREFILE( int battleindex, int attackNo, int defNo, int skill_type ); + +int BATTLE_E_ENEMYREHP( int battleindex, int attackNo, int defNo, int skill_type ); + +int BATTLE_E_ENEMYHELP( int battleindex, int attackNo, int defNo, int skill_type ); +#endif + + +#ifdef _PREVENT_TEAMATTACK +int BATTLE_CheckSameSide( int charaindex, int toNo); +#endif + +#ifdef _USER_CHARLOOPS +int CHAR_BattleStayLoop( int charaindex);//原地遇敌 +#endif + +#ifdef _PETSKILL_PROPERTY +int PET_PetskillPropertyEvent( int Myindex, int defindex, int *damage, int *T_Pow, int size); +#endif + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 +int battle_profession_attack_fun(int battleindex, int attackNo, int defNo, int charaindex); +int battle_profession_attack_magic_fun(int battleindex, int attackNo, int defNo, int charaindex); +int battle_profession_assist_fun(int battleindex, int attackNo, int defNo, int charaindex); +int battle_profession_status_chang_fun(int battleindex, int attackNo, int defNo, int charaindex); +int BATTLE_check_profession_duck( int charaindex, int per ); +int BATTLE_PROFESSION_ATK_PET_DamageSub( int attackindex, int defindex, int *pDamage, int *pPetDamage, int *pRefrect, int skill_level ); +int PROFESSION_BATTLE_StatusAttackCheck( int charaindex, int toindex, int status, int Success ); +int BATTLE_PROFESSION_CONVOLUTE_GET_DAMAGE( int attackindex, int defindex, int skill_level ); +int BATTLE_PROFESSION_THROUGH_ATTACK_GET_DAMAGE( int attackindex, int defindex ); +int BATTLE_PROFESSION_RANG_ATTACK_DAMAGE( int charaindex, int attackNo, int defNo, int skill_type, int status, int turn, int perStatus, int effect, int img1, int img2 ); + +#endif + +#ifdef _PETSKILL_FIREKILL //火线猎杀专用 +int BATTLE_Attack_FIREKILL( int battleindex, int attackNo, int defNo ); +#endif +#ifdef _PROFESSION_ADDSKILL +BOOL BATTLE_BattleUltimate( int battleindex, int bid ); //检查此位 上是否被打飞 +#endif + +#endif diff --git a/gmsv/include/battle_item.h b/gmsv/include/battle_item.h new file mode 100644 index 0000000..483fa73 --- /dev/null +++ b/gmsv/include/battle_item.h @@ -0,0 +1,36 @@ +#ifndef _BATTLE_ITEM_H_ +#define _BATTLE_ITEM_H_ +//-------------------------------------------------------------- +// 荚汊失奶 丞毛银匀凶桦宁及质 +//-------------------------------------------------------------- +// 爵 及桦宁 +void ITEM_useRecovery_Battle( int charaindex, int toindex, int itemindex ); +void ITEM_useStatusChange_Battle( int charaindex, int toindex, int itemindex ); +void ITEM_useMagicDef_Battle( int charaindex, int toindex, int itemindex ); +void ITEM_useParamChange_Battle( int charaindex, int toindex, int itemindex ); +void ITEM_useFieldChange_Battle( int charaindex, int toindex, int itemindex ); +void ITEM_useAttReverse_Battle( int charaindex, int toindex, int itemindex ); +void ITEM_useStatusRecovery_Battle( int charaindex, int toindex, int itemindex ); +void ITEM_useCaptureUp_Battle( int charaindex, int toindex, int itemindex ); +#ifdef _ITEM_CRACKER +void ITEM_useCracker_Effect( int charaindex, int toindex, int haveitemindex); +#endif +#ifdef _ITEM_ADDEXP //vincent 经验提升 +void ITEM_useAddexp_Effect( int charaindex, int toindex, int haveitemindex); +#endif +#ifdef _ITEM_REFRESH //vincent 解除异常状态道具 +void ITEM_useRefresh_Effect( int charaindex, int toindex, int haveitemindex); +#endif +//Terry add 2001/12/24 +#ifdef _ITEM_FIRECRACKER +void ITEM_useFirecracker_Battle(int charaindex,int toindex,int itemindex); +#endif +//Terry end + +#ifdef _ITEM_MAGICRECOVERY +void ITEM_useMRecovery_Battle( int charaindex, int toNo, int haveitemindex ); +#endif +#ifdef _ITEM_USEMAGIC +void ITEM_useMagic_Battle( int charaindex, int toNo, int haveitemindex ); +#endif +#endif diff --git a/gmsv/include/battle_magic.h b/gmsv/include/battle_magic.h new file mode 100644 index 0000000..eb6938f --- /dev/null +++ b/gmsv/include/battle_magic.h @@ -0,0 +1,341 @@ +#ifndef _BATTLE_MAGIC_H_ +#define _BATTLE_MAGIC_H_ + +#define MAGIC_EFFECT_USER 100600 +#define SPR_heal 100601 +#define SPR_heal2 100602 +#define SPR_heal3 100603 +#define SPR_tyusya 100604 +#define SPR_hoshi 100605 + + +#define MAGIC_ID_RECOVERY 1 +#define MAGIC_ID_STATUS_RECOVERY 3 +#define MAGIC_ID_FIELD_CHANGE 4 +#define MAGIC_ID_BADSTATUS 5 + +enum{ + BFUKI_CAPTUREUP, + BFUKI_END +}; + + +enum{ + PC_KIND_NONE, + PC_KIND_ATTACK, + PC_KIND_DEFENSE, + PC_KIND_QUICK, + PC_KIND_CHARM, + PC_KIND_CAPTURE, + PC_KIND_END +}; + +int MAGIC_Recovery_Battle( + int charaindex, + int toindex, + int magicindex, + int mp +); + +int MAGIC_FieldAttChange_Battle( + int charaindex, + int toindex, + int marray, + int mp +); + +int MAGIC_StatusChange_Battle( + int charaindex, + int toindex, + int marray, + int mp +); + +#ifdef _MAGIC_DEEPPOISON +int MAGIC_StatusChange_Battle2( + int charaindex, + int toindex, + int marray, + int mp +); +#endif + +#ifdef _OTHER_MAGICSTAUTS +int MAGIC_MagicStatusChange_Battle( int charaindex, int toNo, int marray, int mp ); + +#endif + +int MAGIC_MagicDef_Battle( + int charaindex, + int toNo, + int marray, + int mp +); + +void BATTLE_MultiRecovery( + int battleindex, + int attackNo, + int toNo, + int kind, + int power, + int per, + int UseEffect, +#ifdef _CHANGEITEMUSE // Syu ADD 调整战斗中使用料理设定 + int RecevEffect, + int power1 +#else + int RecevEffect +#endif + +); + +#ifdef _IMPRECATE_ITEM +void BATTLE_ImprecateRecovery( + int battleindex, + int attackNo, + int toNo, + int kind, + int powers, + int rounds, + int UseEffect, + int RecevEffect +); +#endif +void BATTLE_MultiStatusChange( + int battleindex, + int attackNo, + int toNo, + int status, + int turn, + int UseEffect, + int RecevEffect, + int Success +); + +#ifdef _OTHER_MAGICSTAUTS +void BATTLE_MultiMagicStatusChange( + int battleindex, + int attackNo, + int toNo, + int status, + int turn, + int UseEffect, + int RecevEffect, + int nums +); +#endif + +void BATTLE_MultiMagicDef( + int battleindex, + int attackNo, + int toNo, + int kind, + int count, + int UseEffect, + int RecevEffect +); + +void BATTLE_MultiParamChange( + int battleindex, + int attackNo, + int toNo, + int kind, + int power, + int par, + int UseEffect, + int RecevEffect +); + +int MAGIC_FieldAttChange_Battle( + int charaindex, + int toNo, + int marray, + int mp +); + +int BATTLE_FieldAttChange( + int charaindex, + char *pArg +); + +void BATTLE_MultiAttReverse( + int battleindex, + int attackNo, + int toNo, + int UseEffect, + int RecevEffect +); + + +void BATTLE_MultiStatusRecovery( + int battleindex, + int attackNo, + int toNo, + int status, + int UseEffect, + int RecevEffect +); + +int MAGIC_StatusRecovery_Battle( + int charaindex, + int toNo, + int marray, + int mp +); + +void BATTLE_MultiRessurect( + int battleindex, + int attackNo, + int toNo, + int power, + int per, + int UseEffect, + int RecevEffect +); + +void BATTLE_MultiCaptureUp( + int battleindex, + int attackNo, + int toNo, + int power, + int UseEffect, + int RecevEffect +); +// +//*********************************************************** + +//**************************************************************** +// +// 竣濮井日汊唾允月热诸 +// +int MAGIC_Ressurect_Battle( + int charaindex, // 井仃月谛及奶件犯永弁旦 + int toNo, // 井仃日木月谛及奶件犯永弁旦 + int marray, // magicindex + int mp // MP +); +// 岳 仄凶日 TRUE +// 撩 仄凶日 FALSE +//**************************************************************** + +//**************************************************************** +// +// 箪岭及 鳖毛允月热诸 +// +int MAGIC_AttReverse_Battle( + int charaindex, // 井仃月谛及奶件犯永弁旦 + int toNo, // 井仃日木月谛及奶件犯永弁旦 + int marray, // magicindex + int mp // MP +); +// 岳 仄凶日 TRUE +// 撩 仄凶日 FALSE +//**************************************************************** +//**************************************************************** +// +// 凯 祭允月热诸 +// +int MAGIC_CaptureUp_Battle( + int charaindex, // 井仃月谛及奶件犯永弁旦 + int toNo, // 井仃日木月谛及奶件犯永弁旦 + int marray, // magicindex + int mp // MP +); +// 岳 仄凶日 TRUE +// 撩 仄凶日 FALSE +//**************************************************************** + +//*********************************************************** +// +// 芊羁匹 醒及平乓仿弁正□毛汊唾今六月今日卞 芊 豢毛馨笛 +// +void BATTLE_MultiResAndDef( + int battleindex, // 田玄伙奶件犯永弁旦 + int attackNo, // 井仃月谛 寞 + int toNo, // 井仃日木月谛 寞 + int power, // 湘 荚汊袄 + int per, // ⊙井" + int kind, // 芊 豢及潘 + int count, // 窒荚 什井 + int UseEffect, // 银丹谛及巨白尼弁玄 + int RecevEffect // 井仃日木月谛及巨白尼弁玄 +); +// +//*********************************************************** +//**************************************************************** +// +// 汊唾≈ 芊 豢毛芨尹月热诸 +// +int MAGIC_ResAndDef_Battle( + int charaindex, // 井仃月谛及奶件犯永弁旦 + int toNo, // 井仃日木月谛及奶件犯永弁旦 + int marray, // magicindex + int mp // MP +); +// 岳 仄凶日 TRUE +// 撩 仄凶日 FALSE +//**************************************************************** + +#ifdef __ATTACK_MAGIC +int MAGIC_AttMagic_Battle( int charaindex , int toNo , int marray , int mp ); +#ifdef _FIX_MAGICDAMAGE +void BATTLE_MultiAttMagic( int battleindex, int attackNo, int toNo, + int attIdx ,int FieldAttr ,int Power, int MagicLv); + +#else +void BATTLE_MultiAttMagic( int battleindex , int attackNo , int toNo , int attIdx , int FieldAttr , int Power ); +#endif +int MAGIC_AttMagic_Battle( int charaindex , int toNo , int marray , int mp ); + +#endif + + + +#ifdef _MAGIC_TOCALL +int MAGIC_ToCallDragon_Battle( int charaindex , int toNo , int marray , int mp ); + +void BATTLE_MultiToCallDragonMagic( int battleindex, int attackNo, int toNo, + int attIdx ,int FieldAttr ,int Power, int ImageNo); + +#endif + +#ifdef _Item_ReLifeAct +void BATTLE_MultiReLife( int battleindex, int attackNo, int toNo, int power, int RecevEffect ); +#endif +#ifdef _MAGIC_WEAKEN +int MAGIC_ParamChange_Turn_Battle(int charaindex,int toNo,int marray,int mp); +void BATTLE_MultiParamChangeTurn( int battleindex,int attackNo,int toNo,int status,int UseEffect,int RecevEffect,int turn, int Success); +#endif +int BATTLE_MagicEffect( int battleindex,int attackNo,int ToList[],int MyEffect,int ToEffect ); + + + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 +void PROFESSION_MAGIC_ATTAIC( int battleindex, int attackNo, int toNo, int attIdx, int FieldAttr, int skill); +int PROFESSION_MAGIC_ATTAIC_Effect( int battleindex, int attackNo, int ToList[], int AttackMgcNo ); +int analysis_profession_parameter( int attIdx, int skill, int toNo, int charaindex ); +void PROFESSION_MAGIC_GET_PRACTICE( float *hp_power, float *mp_power, float *dec_hp, float *dec_mp, int charaindex ); +void PROFESSION_MAGIC_TOLIST_SORT( int *list, int *listidx, int charaindex ); +void PROFESSION_MAGIC_CHANGE_STATUS( int charaindex, int hp_power, float mp_power, float *add_hp, float *add_mp ); +void PROFESSION_MAGIC_GET_IMG2( int toNo, int charaindex, int attIdx, char *pszOption ); +#ifdef _PROFESSION_ADDSKILL +int PROFESSION_MAGIC_GET_DAMAGE( int attackindex, int defindex, int magic_type, int power, int command ); +#else +int PROFESSION_MAGIC_GET_DAMAGE( int attackindex, int defindex, int magic_type, int power ); +#endif +int PROFESSION_MAGIC_DODGE( int atk_index, int def_index, int magic_type ); +void PROFESSION_MAGIC_CHANG_IMG2( int img2, char *pszOption, int attIdx ); +int PROFESSION_MAGIC_CHANG_STATUS(int command,int battleindex, int charaindex, int charaidx, int power, int no); +int PROFESSION_MAGIC_GET_ICE_MIRROR_DAMAGE( int attackindex, int defindex, int command, int power ); +#endif + +#ifdef _PETSKILL_FIREKILL +void BATTLE_MultiAttMagic_Fire( int battleindex, int attackNo, int defNo, + int FieldAttr , int Power); +#endif + +#ifdef _PROFESSION_ADDSKILL +unsigned int GET_PROFESSION_magic_uiSpriteNum(int idx); +#endif + +#endif diff --git a/gmsv/include/buf.h b/gmsv/include/buf.h new file mode 100644 index 0000000..78665f0 --- /dev/null +++ b/gmsv/include/buf.h @@ -0,0 +1,11 @@ +#ifndef __BUF_H__ +#define __BUF_H__ + +#include "common.h" +void memEnd( void ); +BOOL configmem( int unit , int unitnumber ); +BOOL memInit( void ); +void* allocateMemory( const unsigned int nbyte ); +void freeMemory( void* freepointer ); +void showMem( char *buf); +#endif diff --git a/gmsv/include/char.h b/gmsv/include/char.h new file mode 100644 index 0000000..9ab6ce8 --- /dev/null +++ b/gmsv/include/char.h @@ -0,0 +1,771 @@ +#ifndef __CHAR_H__ +#define __CHAR_H__ + +#include "common.h" +#include "char_base.h" +#include "net.h" +#include "char_data.h" + + +/*------------------------------------------------------------ + *白巧件玄及缙及烂聒 + *------------------------------------------------------------*/ +typedef enum +{ + CHAR_COLORWHITE, + CHAR_COLORCYAN, + CHAR_COLORPURPLE, + CHAR_COLORBLUE, + CHAR_COLORYELLOW, + CHAR_COLORGREEN, + CHAR_COLORRED, + CHAR_COLORGRAY, + CHAR_COLORBLUE2, + CHAR_COLORGREEN2, + +}CHAR_COLOR; +/*====================平乓仿及综岳卞楮允月楮醒====================*/ +void CHAR_createNewChar( int clifd, int dataplacenum,char* charname , + int imgno,int faceimgno, + int vital,int str,int tgh,int dex, + int earth,int water,int fire,int wind, + int hometown , char *cdkey ); + +/*====================平乓仿及夫弘奶件====================*/ + +#ifdef _BAD_PLAYER // WON ADD 送坏玩家去关 +void CHAR_login( int clifd, char* data, int saveindex, int badplayer ); +#else +void CHAR_login( int clifd, char* data, int saveindex ); +#endif + +#define CHAR_warpToSpecificPoint( cindex, fl, x, y) _CHAR_warpToSpecificPoint( __FILE__, __LINE__, cindex, fl, x, y) +BOOL _CHAR_warpToSpecificPoint( char *file, int line, + int charaindex, int fl, int x, int y); + + +/*====================平乓仿及本□皮====================*/ +/*====================平乓仿及夫弘失它玄====================*/ +BOOL CHAR_charSaveFromConnectAndChar( int fd,Char* ch, int unlock ); +BOOL CHAR_charSaveFromConnect( int fd,int unlock ); +#define CHAR_logout( clifd, save) _CHAR_logout( __FILE__, __LINE__, clifd, save) +BOOL _CHAR_logout( char *file, int line, int clifd, BOOL save); + +/*====================watch event ====================*/ +void CHAR_sendWatchEvent( int objindex, int chac, int* opt,int optlen,BOOL myflg ); + +/*====================旦平伙====================*/ +BOOL CHAR_Skillupsend(int charaindex ); +void CHAR_SkillUp( int charaindex, int skillid ); +void CHAR_useSkill( int charaindex, int dir ,int skindex ); + +typedef enum +{ + CHAR_WALKSUCCESSED, /* 岳 */ + CHAR_WALKSYSTEMERROR, /* 扑旦 丞巨仿□ 及index民尼永弁卞 + * 夫匀井井匀凶午井 */ + CHAR_WALKEXTEND, /* 区左□田□仄化汹仇丹午仄凶[NPC卞及心*/ + CHAR_WALKHITOBJECT, /* 窒井 卞癫匀化}汹仃卅井匀凶 */ + CHAR_WALKPREWALK, /* prewalk奶矛件玄匹汹仃卅井匀凶( 檗祭 ) */ + CHAR_WALKDIE, /* 韶氏匹中化汹仃卅中 */ + CHAR_WALK1357, /* 标户 轾卞汹仇丹午仄化汹仃卅井匀凶 */ +}CHAR_WALKRET; + +/*====================平乓仿及啖 卞楮允月楮醒====================*/ +void CHAR_ctodirmode(char moji , int* dir , int* mode); +INLINE void CHAR_getDXDY( int dir , int* dx, int* dy ); +INLINE int CHAR_getDX( int dir ); +INLINE int CHAR_getDY( int dir ); +int CHAR_getSameCoordinateObjects(int* objbuf, int siz,int ff, int fx, int fy); +void CHAR_walkcall( int index ); +void CHAR_walk_start(int index, int x, int y, char* dir, BOOL mapsendmode); +void CHAR_walk_init( int fd, int x, int y, char *direction, BOOL mapsendmode); + +CHAR_WALKRET CHAR_walk(int index, int dir, int mode); + +char* CHAR_makeOptionString( Char* ch ); +char* CHAR_makeStatusString( int index, char* category ); + +#define CHAR_makeObjectCString( objindex, buf, buflen) _CHAR_makeObjectCString( __FILE__, __LINE__, objindex, buf, buflen) +BOOL _CHAR_makeObjectCString( char *file, int line, int objindex, char* buf, int buflen ); + +//BOOL CHAR_sendStatusString( int charaindex, char* category ); +#define CHAR_sendStatusString( A, B) _CHAR_sendStatusString( A, B, __FILE__, __LINE__ ) +BOOL _CHAR_sendStatusString( int charaindex, char* category, char* file, int line ); +BOOL CHAR_sendItemData( int charaindex, int *itemgroup, int num); +BOOL CHAR_sendItemDataOne( int charaindex, int haveitemindex); +BOOL CHAR_send_P_StatusString( int charaindex, unsigned int indextable ); +BOOL CHAR_send_N_StatusString( int charaindex, int num, unsigned int indextable ); +BOOL CHAR_send_K_StatusString( int charaindex, int num, unsigned int indextable ); + +void CHAR_inputOwnTitle( int index ,char* name ); + +void CHAR_selectTitle( int index, int titleindex ); +void CHAR_deleteTitle( int index, int titleindex ); + +#define CHAR_complianceParameter( index) _CHAR_complianceParameter( index, __FILE__, __LINE__) +int _CHAR_complianceParameter( int index, char *FILE, int LINE); + +int CHAR_findSurplusItemBox( int index ); +int CHAR_findEmptyItemBox( int index ); +int CHAR_findEmptyPoolItemBox( int index ); +int CHAR_findEmptyItemBoxNo( int index ); + +void CHAR_moveEquipItem( int index, int fromindex, int toindex ); +void CHAR_ItemUse( int charaindex, int to_charaindex, int haveitemindex ); +void CHAR_DropItem( int charaindex, int itemindex ); +int CHAR_DropItemAbsolute( int itemindex, int floor, int x, int y,BOOL net); +BOOL CHAR_DropItemFXY( int charaindex, int itemcharaindex, int fl, + int x, int y, int* objindex ); +int CHAR_addItemSpecificItemIndex( int charaindex, int itemindex ); + +void CHAR_PickUpItem( int charaindex, int dir ); +void CHAR_DropMoney( int charaindex, int amount ); +int CHAR_addItem( int charaindex, int itemid ); +int CHAR_addItemToChar( Char* ch, int itemid ); + +int CHAR_pickupFollowPet( int charaindex, int petindex ); + +#ifdef _GAMBLE_ROULETTE +int NPC_MAPCLEANGOLD( int meindex , int floor); +#endif + +#ifdef _DROPSTAKENEW +#define MAXSTAKENUM 5 +int CasinoAccumulation(int charindex, int npcindex, int floor, int wincasinotype); +void CHAR_talkToFloor(int floor, int talkindex, char* message, CHAR_COLOR color); +int SetCasinoMap(int npcindex, int casinotype, int mapdropflag); +int CasinoPay(int npcindex, int wincasinotype); +#endif + +void CHAR_sendCSpecifiedObjindex( int fd, int index); +void CHAR_sendSpecifiedobjindexCToCharaindex(int charaindex,int objindex); + +void CHAR_sendCToArroundCharacter( int charaindex ); + +void CHAR_sendArroundCharaData( int charaindex ); + +void CHAR_sendCDArroundChar( int fl, int x, int y, int objindex ); +void CHAR_sendCDArroundChar_Main( int fl, int x, int y, int objindex, BOOL mode ); + + +void CHAR_Look( int charaindex, int dir ); + +void CHAR_initChatMagic(void); + +char* CHAR_appendNameAndTitle( int charaindex, char* src, char* buf, + int buflen ); +void CHAR_Talk( int fd, int index,char* message,int color, int area ); + +void CHAR_Loop( void ); + +#define WINDOW_BUTTONTYPE_NONE (0) +#define WINDOW_BUTTONTYPE_OK (1 << 0) +#define WINDOW_BUTTONTYPE_CANCEL (1 << 1) +#define WINDOW_BUTTONTYPE_YES (1 << 2) +#define WINDOW_BUTTONTYPE_NO (1 << 3) +#define WINDOW_BUTTONTYPE_PREV (1 << 4) +#define WINDOW_BUTTONTYPE_NEXT (1 << 5) + +#define WINDOW_BUTTONTYPE_OKCANCEL (WINDOW_BUTTONTYPE_OK | WINDOW_BUTTONTYPE_CANCEL) +#define WINDOW_BUTTONTYPE_YESNO (WINDOW_BUTTONTYPE_YES | WINDOW_BUTTONTYPE_NO) + + +typedef enum +{ + WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_MESSAGETYPE_MESSAGEANDLINEINPUT, + WINDOW_MESSAGETYPE_SELECT, + WINDOW_MESSAGETYPE_PETSELECT, + WINDOW_MESSAGETYPE_PARTYSELECT, + WINDOW_MESSAGETYPE_PETANDPARTYSELECT, + WINDOW_MESSAGETYPE_ITEMSHOPMENU, + WINDOW_MESSAGETYPE_ITEMSHOPMAIN, + WINDOW_MESSAGETYPE_LIMITITEMSHOPMAIN, + WINDOW_MESSAGETYPE_PETSKILLSHOP, + WINDOW_MESSAGETYPE_WIDEMESSAGE, + WINDOW_MESSAGETYPE_WIDEMESSAGEANDLINEINPUT, + WINDOW_MESSAGETYPE_POOLITEMSHOPMENU, + WINDOW_MESSAGETYPE_POOLITEMSHOPMAIN, + + WINDOW_MESSAGETYPE_FAMILYADD, + WINDOW_MESSAGETYPE_FAMILYJOIN, + WINDOW_MESSAGETYPE_FAMILYOUT, + WINDOW_MESSAGETYPE_FAMILYEND, +//======================================= + // shan add + WINDOW_FMMESSAGETYPE_SELECT, + WINDOW_FMMESSAGETYPE_DENGON, + WINDOW_FMMESSAGETYPE_FMSDENGON, + WINDOW_FMMESSAGETYPE_POINTLIST, +#ifdef _FMVER21 + WINDOW_FMMESSAGETYPE_TOP30DP, +#endif + WINDOW_FMMESSAGETYPE_DP, + WINDOW_MESSAGETYPE_BANK, + + // Arminius 7.12 scheduleman + WINDOW_MESSAGETYPE_PKSCHEDULELIST, + WINDOW_MESSAGETYPE_PKSCHEDULESELECTFAMILY, + WINDOW_MESSAGETYPE_PKSCHEDULEDETAIL, + + // Robin + WINDOW_MESSAGETYPE_LOGINMESSAGE, + WINDOW_MESSAGETYPE_FAMILYTAX, + WINDOW_MESSAGETYPE_SHOWRIDEPET, + WINDOW_MESSAGETYPE_FAMILYDETAIL, + + WINDOW_MESSAGETYPE_LEADERSELECT, + WINDOW_MESSAGETYPE_LEADERSELECTQ, + WINDOW_MESSAGETYPE_LEADERSELECTA, + + // Arminius 1.3 Auctioneer + WINDOW_MESSAGETYPE_AUCTIONNEW, + WINDOW_MESSAGETYPE_AUCTIONLIST_BUY, + WINDOW_MESSAGETYPE_AUCTIONSURVEY, + WINDOW_MESSAGETYPE_AUCTIONMODIFY, + WINDOW_MESSAGETYPE_AUCTIONLIST_MODIFY, +#ifdef _BLACK_MARKET + WINDOW_MESSAGETYPE_BLACKMARKET, +#endif + +#ifdef _NPC_FUSION + WINDOWS_MESSAGETYPE_PETFUSION, +#endif + +#ifdef _PETSKILL_CANNEDFOOD + WINDOWS_MESSAGETYPE_PETSKILLSHOW, +#endif + +#ifdef _NPC_SELLSTH + WINDOWS_MESSAGETYPE_SELLSTHMENU, + WINDOWS_MESSAGETYPE_SELLSTHVIEW, + WINDOWS_MESSAGETYPE_SELLSTHSELL, +#endif + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + WINDOW_MESSAGETYPE_PROFESSIONSHOP, +#endif +#ifdef _NPC_WELFARE_2 // WON ADD 职业NPC-2 + WINDOW_MESSAGETYPE_PROFESSIONSHOP2, +#endif +#ifdef _NEW_MANOR_LAW + WINDOW_FMMESSAGETYPE_10_MEMONTUM, // 十大气势家族 + WINDOW_FMMESSAGETYPE_FM_MEMONTUM, // 自己家族气势排名 + WINDOW_FMMESSAGETYPE_MANOR_SCHEDULE, // 挑战庄园排行 +#endif + +#ifdef _ANGEL_SUMMON + WINDOW_MESSAGETYPE_ANGELMESSAGE = 101, + WINDOW_MESSAGETYPE_ANGELASK, +#endif + +#ifdef _MOUSE_DBL_CLICK + WINDOW_MESSAGETYPE_MOUSEGETNAME, +#endif + +#ifdef _CONTRACT + WINDOW_MESSAGETYPE_CONTRACT, +#endif + +#ifdef _RACEMAN + WINDOW_MESSAGETYPE_RACEMAN_RANK, +#endif + +}WINDOW_MESSAGETYPE; + +typedef enum +{ + CHAR_WINDOWTYPE_RETURNTOELDER=-1, /* 赢 尺 月它奴件玉它 */ + CHAR_WINDOWTYPE_RESURRECTION=-2, /* 汊唾允月它奴件玉它 */ + + CHAR_WINDOWTYPE_SELECTBATTLE = 1, /* 月爵 毛蓟 允月它奴件玉它 */ + CHAR_WINDOWTYPE_SELECTDUEL = 2, /* 月DUEL毛蓟 允月它奴件玉它 */ + CHAR_WINDOWTYPE_SELECTTRADECARD = 3, /* 铜跟晶毛蓟 允月它奴件玉它 */ + CHAR_WINDOWTYPE_SELECTPARTY = 4, /* 由□ 奴毛蓟 允月它奴件玉它 */ + CHAR_WINDOWTYPE_SELECTBATTLEWATCH = 5, /* 棋爵毛蓟 允月它奴件玉它 */ + CHAR_WINDOWTYPE_MICMESSAGE = 6, /* MICNPC毛银匀化请月它奴件玉它 */ + + // CoolFish: Trade 2001/4/18 + CHAR_WINDOWTYPE_SELECTTRADE = 7, /* 交易 Window */ + + CHAR_WINDOWTYPE_SELECTRENAMEITEM_PAGE1 = 10, /* 蟆毛 凳允月失奶 丞毛蓟 允月它奴件玉它 */ + CHAR_WINDOWTYPE_SELECTRENAMEITEM_PAGE2 = 11, /* 蟆毛 凳允月失奶 丞毛蓟 允月它奴件玉它 */ + CHAR_WINDOWTYPE_SELECTRENAMEITEM_PAGE3 = 12, /* 蟆毛 凳允月失奶 丞毛蓟 允月它奴件玉它 */ + CHAR_WINDOWTYPE_SELECTRENAMEITEM_PAGE4 = 13, /* 蟆毛 凳允月失奶 丞毛蓟 允月它奴件玉它 */ + CHAR_WINDOWTYPE_SELECTRENAMEITEM_RENAME = 14, /* 蟆毛 允月它奴件玉它 */ + CHAR_WINDOWTYPE_SELECTRENAMEITEM_RENAME_ATTENTION = 15, /* 蟆毛 允月它奴件玉它 */ + + CHAR_WINDOWTYPE_DENGON = 50, /* 鳗蜕 */ + + CHAR_WINDOWTYPE_WINDOWMAN_START = 100, + CHAR_WINDOWTYPE_WINDOWMAN_STARTMSG = CHAR_WINDOWTYPE_WINDOWMAN_START, + CHAR_WINDOWTYPE_WINDOWMAN_END = 200, + + CHAR_WINDOWTYPE_JANKEN_START = 210, + CHAR_WINDOWTYPE_JANKEN_MAIN = 211, + CHAR_WINDOWTYPE_JANKEN_END = 212, + + CHAR_WINDOWTYPE_TRANSMIGRATION_START = 213, + CHAR_WINDOWTYPE_TRANSMIGRATION_MAIN = 214, + CHAR_WINDOWTYPE_TRANSMIGRATION_END = 215, + CHAR_WINDOWTYPE_TRANSMIGRATION_NONE = 216, + + + CHAR_WINDOWTYPE_WINDOWHEALER_START = 220, + CHAR_WINDOWTYPE_WINDOWHEALER_STARTMSG = CHAR_WINDOWTYPE_WINDOWHEALER_START, + CHAR_WINDOWTYPE_WINDOWHEALER_HPMSG = 221, + CHAR_WINDOWTYPE_WINDOWHEALER_OKHPMSG = 222, + CHAR_WINDOWTYPE_WINDOWHEALER_SPIRITMSG = 223, + CHAR_WINDOWTYPE_WINDOWHEALER_OKSPIRITMSG = 224, + CHAR_WINDOWTYPE_WINDOWHEALER_ALLMSG = 225, + CHAR_WINDOWTYPE_WINDOWHEALER_OKALLMSG = 226, + CHAR_WINDOWTYPE_WINDOWHEALER_END = 227, + + CHAR_WINDOWTYPE_WINDOWSAVEPOINT_START = 230, + + CHAR_WINDOWTYPE_WINDOWEVENT_STARTMSG = 231, + CHAR_WINDOWTYPE_WINDOWEVENT_NOWEVENT = 232, + CHAR_WINDOWTYPE_WINDOWEVENT_ENDEVENT = 233, + CHAR_WINDOWTYPE_WINDOWEVENT_REQMAINMSG = 234, + CHAR_WINDOWTYPE_WINDOWEVENT_ACCMAINMSG = 235, + CHAR_WINDOWTYPE_WINDOWEVENT_NOMALMSG = 236, + CHAR_WINDOWTYPE_WINDOWEVENT_CLEANMSG = 237, + CHAR_WINDOWTYPE_WINDOWEVENT_REQTHANK = 238, + CHAR_WINDOWTYPE_WINDOWEVENT_ACCTHANK = 239, + + + CHAR_WINDOWTYPE_WINDOWITEMSHOP_START = 240, + CHAR_WINDOWTYPE_WINDOWITEMSHOP_STARTMSG = CHAR_WINDOWTYPE_WINDOWITEMSHOP_START, + CHAR_WINDOWTYPE_WINDOWITEMSHOP_MENU = 241, + CHAR_WINDOWTYPE_WINDOWITEMSHOP_BUY_MSG = 242, + CHAR_WINDOWTYPE_WINDOWITEMSHOP_SELL_MSG = 243, + CHAR_WINDOWTYPE_WINDOWITEMSHOP_END = 244, + CHAR_WINDOWTYPE_WINDOWITEMSHOP_LIMIT = 245, + CHAR_WINDOWTYPE_WINDOWITEMSHOP_EXPRESS = 246, + + CHAR_WINDOWTYPE_DUELRANKING_START = 250, + CHAR_WINDOWTYPE_DUELRANKING_TOPRANKING = 251, + CHAR_WINDOWTYPE_DUELRANKING_MYRANKING = 252, + CHAR_WINDOWTYPE_DUELRANKING_WAIT = 253, + CHAR_WINDOWTYPE_DEFEND_BILLDBOARD = 254, + + CHAR_WINDOWTYPE_WINDOWPETSKILLSHOP = 260, + + CHAR_WINDOWTYPE_WINDOWPETSHOP_START = 261, + CHAR_WINDOWTYPE_WINDOWPETSHOP_PETSELECT = 262, + CHAR_WINDOWTYPE_WINDOWPETSHOP_MAIN = 263, + CHAR_WINDOWTYPE_WINDOWPETSHOP_GOLDOVER = 264, + CHAR_WINDOWTYPE_WINDOWPETSHOP_PETSELECT2 = 265, + CHAR_WINDOWTYPE_WINDOWPETSHOP_MAIN2 = 266, + CHAR_WINDOWTYPE_WINDOWPETSHOP_DRAWSELECT = 267, + CHAR_WINDOWTYPE_WINDOWPETSHOP_ASKDRAW = 268, + CHAR_WINDOWTYPE_WINDOWPETSHOP_END = 269, + + CHAR_WINDOWTYPE_WINDOWWARPMAN_MAIN = 271, + CHAR_WINDOWTYPE_WINDOWWARPMAN_ERR = 272, + CHAR_WINDOWTYPE_WINDOWWARPMAN_END = 273, + + CHAR_WINDOWTYPE_NPCENEMY_START = 281, + + CHAR_WINDOWTYPE_CHARM_START = 282, + CHAR_WINDOWTYPE_CHARM_END = 283, + + CHAR_WINDOWTYPE_QUIZ_START = 284, + CHAR_WINDOWTYPE_QUIZ_MAIN = 285, + CHAR_WINDOWTYPE_QUIZ_END = 286, + + CHAR_WINDOWTYPE_CHECKMAN_START = 287, + CHAR_WINDOWTYPE_CHECKMAN_MAIN = 288, + CHAR_WINDOWTYPE_CHECKMAN_END = 289, + + CHAR_WINDOWTYPE_FAMILYMAN_START = 320, + CHAR_WINDOWTYPE_FAMILYMAN_ADD = 321, + CHAR_WINDOWTYPE_FAMILYMAN_JOIN = 322, + CHAR_WINDOWTYPE_FAMILYMAN_OUT = 323, + CHAR_WINDOWTYPE_FAMILYMAN_BROKEN = 324, + + CHAR_WINDOWTYPE_BANKMAN = 330, + + // CoolFish: FMPKMan 2001/7/4 + CHAR_WINDOWTYPE_FMPKMAN_START = 340, + CHAR_WINDOWTYPE_FMPKMAN_VIEW = 341, + CHAR_WINDOWTYPE_FMPKMAN_LEAVEPK = 342, + CHAR_WINDOWTYPE_FMPKCALLMAN_START = 345, + CHAR_WINDOWTYPE_FMPKCALLMAN_CALL = 346, + CHAR_WINDOWTYPE_FMPKCALLMAN_COME = 347, + CHAR_WINDOWTYPE_FMPKCALLMAN_LEAVE = 348, + + // Arminius 7.13 scheduleman + CHAR_WINDOWTYPE_SCHEDULEMAN_START = 350, + CHAR_WINDOWTYPE_SCHEDULEMAN_SELECT = 351, + CHAR_WINDOWTYPE_SCHEDULEMAN_DETAIL = 352, + + // Arminius 7.27 + CHAR_WINDOWTYPE_MANORPK_START = 360, + CHAR_WINDOWTYPE_MANORPK_ASK = 361, + CHAR_WINDOWTYPE_MANORPK_END = 362, + + // shan + CHAR_WINDOWTYPE_FM_DENGON = 370, // 家族留言板 + CHAR_WINDOWTYPE_FM_FMSDENGON = 371, // 家族之间留言板 + CHAR_WINDOWTYPE_FM_MESSAGE1 = 372, // 说明视窗(据点) + CHAR_WINDOWTYPE_FM_MESSAGE2 = 373, // 说明视窗(成员) + CHAR_WINDOWTYPE_FM_SELECT = 374, // 选项视窗 + CHAR_WINDOWTYPE_FM_MEMBERLIST = 375, // 成员列表 + CHAR_WINDOWTYPE_FM_POINTLIST = 376, // 据点列表 + CHAR_WINDOWTYPE_FM_DPTOP = 377, // 强者表(前叁十大列榜) + CHAR_WINDOWTYPE_FM_DPME = 378, // 强者表(自己的列榜) + CHAR_WINDOWTYPE_FM_DPSELECT = 379, // 强者表的选项视窗 + +// Terry 2001/08/31 +#ifdef _SERVICE + CHAR_WINDOWTYPE_SERVICE_START = 380, // 石器服务员确定视窗 + CHAR_WINDOWTYPE_SERVICE_EXIT = 381, // 石器服务员取消视窗 + CHAR_WINDOWTYPE_SERVICE_CONTINUE = 382, // 石器服务员继续视窗 + CHAR_WINDOWTYPE_SERVICE_WAIT = 383, // 石器服务员等待视窗 +#endif + +#ifdef _PET_TRANS + CHAR_WINDOWTYPE_PETTRANS_START = 384, + CHAR_WINDOWTYPE_PETTRANS_SELECT = 385, + CHAR_WINDOWTYPE_PETTRANS_SELPET = 386, + CHAR_WINDOWTYPE_PETTRANS_MAIN1 = 387, + CHAR_WINDOWTYPE_PETTRANS_END = 389, +#endif + +#ifdef _GAMBLE_BANK + NPC_GambleBank_START = 390, + NPC_GambleBank_SELECT, + NPC_GambleBank_BANK, + NPC_GambleBank_CHANG1, + NPC_GambleBank_CHANG2, + NPC_GambleBank_END, +#endif + +#ifdef _PETRACE + CHAR_WINDOWTYPE_PETRACEMASTER_START = 410, + CHAR_WINDOWTYPE_PETRACEMASTER_RULE, + CHAR_WINDOWTYPE_PETRACEMASTER_PET, + CHAR_WINDOWTYPE_PETRACEMASTER_LEAVE, +#endif + +#ifdef _GAMBLE_ROULETTE + WINDOWTYPE_GAMBLEROULETTE_START = 415, + WINDOWTYPE_GAMBLEROULETTE_SELECT, + WINDOWTYPE_GAMBLEROULETTE_END, +#endif + +#ifdef _AUCTIONEER + CHAR_WINDOWTYPE_AUCTIONEER_START = 420, + CHAR_WINDOWTYPE_AUCTIONEER_NEW, + CHAR_WINDOWTYPE_AUCTIONEER_LIST_BUY, + CHAR_WINDOWTYPE_AUCTIONEER_SURVEY, + CHAR_WINDOWTYPE_AUCTIONEER_MODIFY, + CHAR_WINDOWTYPE_AUCTIONEER_LIST_MODIFY, + CHAR_WINDOWTYPE_AUCTIONEER_END, +#endif + +#ifdef _NEWEVENT + CHAR_WINDOWTYPE_WINDOWEVENT_ACCTHANKNEW = 430, +#endif + +#ifdef _BLACK_MARKET + CHAR_WINDOWTYPE_BLACKMARKET = 435, +#endif + +#ifdef _TRANSER_MAN + NPC_TRANSERMAN_START = 440, + NPC_TRANSERMAN_SELECT, + NPC_TRANSERMAN_WARP, + NPC_TRANSERMAN_END, +#endif +#ifdef _ITEM_NPCCHANGE + NPC_ITEMCHANGE_START = 445, + NPC_ITEMCHANGE_SELECT, + NPC_ITEMCHANGE_MESSAGE, + NPC_ITEMCHANGE_END, +#endif + +#ifdef _PAUCTION_MAN + NPC_PAUCTION_START, + NPC_PAUCTION_SELECT, + NPC_PAUCTION_BUY, + NPC_PAUCTION_SELL, + NPC_PAUCTION_WARP, + NPC_PAUCTION_END, +#endif +#ifdef _ALLDOMAN // (不可开) Syu ADD 排行榜NPC + NPC_ALLDOMAN_START = 460, + NPC_ALLDOMAN_START2, + NPC_ALLDOMAN_START3, + NPC_ALLDOMAN_HEAL, + NPC_ALLDOMAN_GIVEMONEY, + NPC_ALLDOMAN_MAIN_WND , + NPC_ALLDOMAN_SELECT_WND , + NPC_ALLDOMAN_LIST_WND , +#endif + +#ifdef _PETSKILL_CANNEDFOOD + ITEM_WINDOWTYPE_SELECTPETSKILL_SELECT = 470, + ITEM_WINDOWTYPE_SELECTPETSKILL_END, +#endif + +#ifdef _NPC_WELFARE + NPC_WELFARE_START = 480, + NPC_WELFARE_END, +#endif + +#ifdef _NPC_VERYWELFARE + NPC_VERYWELFARE_START = 490, + NPC_VERYWELFARE_NO1, + NPC_VERYWELFARE_NO2, + NPC_VERYWELFARE_NO3, + NPC_VERYWELFARE_END, +#endif + +#ifdef _NPC_WELFARE_2 // WON ADD 职业NPC-2 + NPC_WELFARE_START2 = 495, + NPC_WELFARE_END2, +#endif + +#ifdef _NPC_DEPOTPET + CHAR_WINDOWTYPE_DEPOTPETSHOP_MENU = 510, + CHAR_WINDOWTYPE_DEPOTPETSHOP_HANDLE, + CHAR_WINDOWTYPE_DEPOTPETSHOP_ADD, + CHAR_WINDOWTYPE_DEPOTPETSHOP_GET, + CHAR_WINDOWTYPE_DEPOTPETSHOP_ASKADD, + CHAR_WINDOWTYPE_DEPOTPETSHOP_ASKGET, +#endif + +#ifdef _ANGEL_SUMMON + CHAR_WINDOWTYPE_ANGEL_ASK = 520, + CHAR_WINDOWTYPE_ANGEL_CLEAN, +#endif + +#ifdef _CONTRACT + CHAR_WINDOWTYPE_CONTRACT_ANSWER = 530, +#endif + +#ifdef _RACEMAN //猎宠大会 + CHAR_WINDOWTYPE_RACE_START = 540, // 开始 + CHAR_WINDOWTYPE_RACE_SUBJECT, // 猎宠比赛题目 + CHAR_WINDOWTYPE_RACE_TICKET, // 领取猎宠证 + CHAR_WINDOWTYPE_RACE_PETSELECT, // 宠物选择 + CHAR_WINDOWTYPE_RACE_CHECKIN, // 猎宠登记 + CHAR_WINDOWTYPE_RACE_RANK, // 猎宠排行榜 + CHAR_WINDOWTYPE_RACE_PRIZE, // 兑奖 + CHAR_WINDOWTYPE_RACE_NORMAL, // 无标题视窗 + CHAR_WINDOWTYPE_RACE_SHOWRANK1, // 新手排行榜 + CHAR_WINDOWTYPE_RACE_SHOWRANK2, // 排行榜 + CHAR_WINDOWTYPE_RACE_SHOWRANK3, // 排行榜 + CHAR_WINDOWTYPE_RACE_SHOWRANK4, // 排行榜 + CHAR_WINDOWTYPE_RACE_SHOWRANK5, // 排行榜 + CHAR_WINDOWTYPE_RACE_SHOWRANK11, // 显示历史记录 + CHAR_WINDOWTYPE_RACE_SHOWRANK12, // 显示历史记录 + CHAR_WINDOWTYPE_RACE_SHOWRANK13, // 显示历史记录 + CHAR_WINDOWTYPE_RACE_SHOWRANK14, // 显示历史记录 + CHAR_WINDOWTYPE_RACE_SHOWRANK15, // 显示历史记录 + CHAR_WINDOWTYPE_RACE_QUIZ, // 通关密语 +#endif + +}CHAR_WINDOWTYPE; + +#ifdef _GMRELOAD +typedef struct tagGMInfo +{ + char cdkey[24]; + int level; +}GMInfo; +#endif + + +#ifdef _ANGEL_SUMMON + +#define MAXMISSION 100 +#define MAXMISSIONTABLE 1000 + +struct MissionInfo +{ + int id; + char detail[1024]; + int level; + char eventflag[1024]; + //char bonus[1024]; + int limittime; +}; + +struct MissionTable +{ + char angelinfo[128]; + char heroinfo[128]; + int mission; + int flag; + int time; + int limittime; +}; + +extern struct MissionInfo missionlist[MAXMISSION]; +extern struct MissionTable missiontable[MAXMISSIONTABLE]; + +#endif + +#ifdef _JOBDAILY + +#define MAXDAILYLIST 1000 +#define MAXMISSIONFLAG 1000 +typedef struct _DailyFileType +{ + char jobid[10]; //任务编号 + char rule[16384]; //条件判断 + char explain[200]; //任务说明 + char state[20]; //状态说明 +}DailyFileType; +//extern struct DailyFileType dailyfile[MAXDAILYLIST]; + +#endif + +BOOL CHAR_talkToCli( int talkedcharaindex,int talkcharaindex, char* message, CHAR_COLOR color ); +void CHAR_talkToCliAndParty( int talkedcharaindex,int talkcharaindex,char* message, CHAR_COLOR color ); + +BOOL CHAR_talkToCharacter( int talkedcharaindex,int talkcharaindex, char* message ); +void CHAR_getCoordinationDir( int dir , int x, int y ,int c, + int *xout , int *yout ); +BOOL CHAR_createCharacter( int type, int floor, int x, int y, int dir, + int* charaindex, int* objindex, BOOL seemap ); +void CHAR_CharaDelete( int charaindex ); +void CHAR_ObjectDelete( int objindex ); +int CHAR_makeDBKey( int charaindex, char *pszBuffer, int size ); +int CHAR_getEmptyPartyArray( int charaindex); +BOOL CHAR_JoinParty( int charaindex ); +void CHAR_JoinParty_Main( int charaindex, int targetindex); +BOOL CHAR_DischargeParty( int charaindex, int flg); +BOOL CHAR_DischargePartyNoMsg( int charaindex); +BOOL CHAR_setMyPosition_main( int index, int x, int y, int setdir, BOOL CAFlg); +BOOL CHAR_setMyPosition( int index, int x, int y, BOOL CAFlg); + +void CHAR_CharaDeleteHavePet( int charaindex); +int CHAR_sendAction( int charaindex, int action, int mode); +void CHAR_sendLeader( int objindex, int leader); +void CHAR_sendBattleWatch( int objindex, int onoff); +void CHAR_sendBattleEffect( int charaindex, int onoff); + +// shan +void CHAR_sendTradeEffect( int charaindex, int onoff); +#ifdef _MIND_ICON +void CHAR_sendMindEffect( int charaindex, int onoff); +#endif +#ifdef _ITEM_CRACKER +void CHAR_sendCrackerEffect( int charaindex, int onoff); +#endif + +void CHAR_inputUserPetName( int index , int havepetindex, char* name ); +int CHAR_getPartyIndex( int index, int num); +void CHAR_processWindow(int charaindex, int seqno, int select, + int objindex, char* data ); +void CHAR_AddCharm( int charaindex, int iValue ); +void CHAR_PetAddVariableAi( int petindex, int iValue ); +void CHAR_PartyUpdate( int charaindex, int senddata ); +char *CHAR_getUseName( int charaindex ); +char *CHAR_getUseID( int charaindex ); +EXTERN int EnemyMoveNum; /* 凛卞 嫖 仃月衬及醒 */ +extern char *DebugFunctionName; +extern int DebugPoint; + +#define DB_DUELPOINT "db_duel" // 犯亘巨伙禾奶件玄犯□正矛□旦 +#define DB_ADDRESSBOOK "db_addressbook" // 失玉伊旦皮永弁犯□正矛□旦 + +BOOL CHAR_send_DpDBUpdate( int charaindex ); +BOOL CHAR_send_DpDBUpdate_AddressBook( int charaindex, int mode ); + + +void CHAR_sendPMEToArroundCharacter( int charaindex, int petindex, int flg, int no ); +void CHAR_sendPMEToArroundCharacterFLXY( int petindex, + int fl, int x, int y, int dir, int flg, int no ); + +void CHAR_sendSEoArroundCharacter( int fl, int x, int y, int senumber, int sw ); + +BOOL CHAR_initEffectSetting( char* filename ); +void CHAR_checkEffect( int charaindex); +void CHAR_checkEffectLoop( void); +void CHAR_initDebugChatCdkey( void); +int CHAR_setChatMagicCDKey( int mode, char *cdkey); + + +float GetRecoveryRate( int charaindex ); +int storeCharaData( void ); +#ifdef _MAGIC_REHPAI //补血AI +int Magic_RideGetHP( int toindex, int petindex, int flg); +#endif +// CoolFish: Trade 2001/4/18 +int CHAR_findTotalEmptyItem(int index); + + +#ifdef _FIX_METAMORIDE +int CHAR_CHECKJOINENEMY( int index); +#endif + +#ifdef _NPCSERVER_NEW +BOOL NPCSERVER_CreateObjindexFromServer( int fd, int npcindex, char *Name, int image, + int dir, int floor, int x, int y); +#endif + + +#ifdef _SEND_EFFECT // WON ADD AC送下雪、下雨等特效 +#define CHAR_EFFECT_SETTINGBUFFER 256 +typedef struct tagCHAR_effectsetting +{ + int floor; // 白夫失 + int effect; // 梢请 寞 + int level; // 梢请及伊矛伙[ 蜇及雄今[ + int sendflg; // 憎巨白尼弁玄毛霜匀凶井升丹井[ + char month[CHAR_EFFECT_SETTINGBUFFER]; // 垫允月畸 + char day[CHAR_EFFECT_SETTINGBUFFER]; // 垫允月 + char hour[CHAR_EFFECT_SETTINGBUFFER]; // 垫允月凛棉 + char min[CHAR_EFFECT_SETTINGBUFFER]; // 垫允月坌 + char expire[CHAR_EFFECT_SETTINGBUFFER]; // 垫仄化中月赢今[( + +}CHAR_effectsetting; + +CHAR_effectsetting* CHAR_effect; +int CHAR_effectnum; +#endif + +#ifdef _ITEM_PILENUMS +int CHAR_getMyMaxPilenum( int charaindex); +#endif + +#ifdef _PET_LOSTPET +BOOL CHAR_CharSaveLostPet( int petindex, int type); +#endif +#ifdef _ALLDOMAN +void InitHeroList( void); +#endif +#endif + +#ifdef _STREET_VENDOR +void CHAR_sendStreetVendor(int charaindex,char *message); +void CHAR_sendStreetVendorDataToCli(int charaindex,int toindex); +void CHAR_sendStreetVendorOneDataToCli(int charaindex,int toindex,int sendindex); +#endif + +BOOL checkUnlawWarpFloor( int floor); + +#ifdef _HELP_NEWHAND +void CHAR_loginAddItemForNew( int charaindex ); +#endif + +#ifdef _JOBDAILY +void CHAR_JobDaily(int charaindex,char *data); +#endif + +#ifdef _TEACHER_SYSTEM +void CHAR_Teacher_system(int charaindex,char *data); +void CHAR_Teacher_system_View(int charaindex,int iOnLine,char *data); +#endif + +#ifdef _TIME_TICKET +void check_TimeTicket(); +int check_TimeTicketMap(int floor); +#endif + diff --git a/gmsv/include/char_base.h b/gmsv/include/char_base.h new file mode 100644 index 0000000..38a8a4d --- /dev/null +++ b/gmsv/include/char_base.h @@ -0,0 +1,1783 @@ +#ifndef __CHAR_BASE_H__ +#define __CHAR_BASE_H__ + +#include "version.h" +#include "skill.h" +#include "title.h" +/*#include "magicinfo.h"*/ +#include "addressbook.h" + +#define CHAR_DELIMITER "\n" + +#define NONCHAR_DELIMITER "|" + +#define STATUSSENDDELIMITER "|" + +#define CHAR_MAXGOLDHAVE (100*10000) +#define CHAR_MAXBANKGOLDHAVE (1000*10000) +#define CHAR_MAXFMBANKGOLDHAVE (10000*10000) + +#ifdef _NEW_MANOR_LAW +#define MAX_PERSONAL_MOMENTUM 10000000 +#endif +#ifdef _PERSONAL_FAME // Arminius 8.30: 家族个人声望 +#define MAX_PERSONALFAME 100000000 +#endif +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 +#define CHAR_SKILLMAXHAVE 26 // 职业技能上限 +#else +#define CHAR_SKILLMAXHAVE 5 +#endif + +#ifdef _STREET_VENDOR +#define MAX_SELL_ITEM 20 // 道具加宠物共可卖二十个 +#endif +#define CHAR_TITLEMAXHAVE 30 + +#define NULLSKILL "0" + +#define CHAR_MAXPETHAVE 5 +#define CHAR_MAXPERSONAGOLD 50000000 + +#ifdef _ADD_POOL_ITEM // WON ADD 增加可寄放的道具 +#define CHAR_MAXPOOLPETHAVE 15 +#else +#define CHAR_MAXPOOLPETHAVE 10 +#endif + +#define CHAR_MAXPETSKILLHAVE 7 +#define CHAR_PARTYMAX 5 +#define CHAR_MAXATTRIB 100 +#define CHAR_MAXUPLEVEL 200 +#define CHAR_MAXDUELPOINT 100000000 +#define CHAR_DEFAULTMAXAI (60) +#define CHAR_MAXVARIABLEAI (100*100) +#define CHAR_MINVARIABLEAI (-100*100) +#define CHAR_POISONSTRING "中毒" +#define CHAR_RECOVERPOISONSTRING "解毒了" +#define CHAR_PARALYSISSTRING "麻痹了" +#define CHAR_RECOVERPARALYSISSTRING "麻醉退了" +#define CHAR_SILENCESTRING "无法念魔法了" +#define CHAR_RECOVERSILENCESTRING "可以念魔法了" +#define CHAR_STONESTRING "石化了" +#define CHAR_RECOVERSTONESTRING "变灵活了" +#define CHAR_DARKNESSSTRING "四周不见了" +#define CHAR_RECOVERDARKNESSSTRING "四周出现了" +#define CHAR_CONFUSIONSTRING "陷入恐慌" +#define CHAR_RECOVERCONFUSIONSTRING "恢复正常" + +#define CHAR_DEFAULTSEESIZ 23 +#define MAP_CHAR_DEFAULTSEESIZ (CHAR_DEFAULTSEESIZ+4) + +typedef enum +{ + CHAR_HEAD, + CHAR_BODY, + CHAR_ARM, + CHAR_DECORATION1, + CHAR_DECORATION2, +#ifdef _ITEM_EQUITSPACE + CHAR_EQBELT, //腰带 + CHAR_EQSHIELD, //盾 + CHAR_EQSHOES, //鞋子 +#endif +#ifdef _EQUIT_NEWGLOVE + CHAR_EQGLOVE, +#endif + CHAR_EQUIPPLACENUM, +}CHAR_EquipPlace; + +typedef struct tagCharHaveSkill +{ + int use; + Skill skill; +}CHAR_HaveSkill; + +#ifdef _STREET_VENDOR +typedef struct STREET_VENDDOR_t{ + int pile; // 数量 + int price; // 价格 + int index; // 索引 + int kind; // 道具或是宠物 0:道具 1:宠物 + BOOL usage; // 是否使用中 +}StreetVendor_t; + +enum{ + SV_PILE, + SV_PRICE, + SV_INDEX, + SV_KIND, + SV_USAGE, + MAX_SV +}; +#endif + +typedef enum +{ + CHAR_ACTSTAND, + CHAR_ACTWALK, + CHAR_ACTATTACK, + CHAR_ACTTHROW, + CHAR_ACTDAMAGE, + CHAR_ACTDEAD, + CHAR_ACTMAGIC, + CHAR_ACTITEM, + CHAR_ACTEFFECT, + CHAR_ACTDOWN = 10, + CHAR_ACTSIT, + CHAR_ACTHAND, + CHAR_ACTPLEASURE, + CHAR_ACTANGRY, + CHAR_ACTSAD, + CHAR_ACTGUARD, + CHAR_ACTACTIONWALK, + CHAR_ACTNOD, + CHAR_ACTACTIONSTAND, + CHAR_ACTBATTLE = 20, + CHAR_ACTLEADER, + CHAR_ACTBATTLEWATCH, + CHAR_ACTPOPUPNAME, + CHAR_ACTTURN = 30, + CHAR_ACTWARP, + CHAR_ACTTRADE, +#ifdef _ANGEL_SUMMON + CHAR_ACTANGEL = 34, +#endif + +#ifdef _MIND_ICON + CHAR_MIND = 40, +#endif +#ifdef _STREET_VENDOR + CHAR_STREETVENDOR_OPEN, + CHAR_STREETVENDOR_CLOSE, +#endif +#ifdef _ITEM_CRACKER + CHAR_ITEM_CRACKER = 50, +#endif +}CHAR_ACTION; + +typedef enum +{ + CHAR_CLIACTATTACK, + CHAR_CLIACTDAMAGE, + CHAR_CLIACTDOWN, + CHAR_CLIACTSTAND, + CHAR_CLIACTWALK, + CHAR_CLIACTSIT, + CHAR_CLIACTHAND, + CHAR_CLIACTPLEASURE, + CHAR_CLIACTANGRY, + CHAR_CLIACTSAD, + CHAR_CLIACTGUARD, + CHAR_CLIACTNOD, + CHAR_CLIACTTHROW, + +}CHAR_CLIENTACTION; + +typedef enum +{ + CHAR_TYPENONE, + CHAR_TYPEPLAYER, + CHAR_TYPEENEMY, + CHAR_TYPEPET, + CHAR_TYPEDOOR, + CHAR_TYPEBOX, + CHAR_TYPEMSG, + CHAR_TYPEWARP, + CHAR_TYPESHOP, + CHAR_TYPEHEALER, + CHAR_TYPEOLDMAN, + CHAR_TYPEROOMADMIN, + CHAR_TYPETOWNPEOPLE, + CHAR_TYPEDENGON, + CHAR_TYPEADM, + CHAR_TYPETEMPLE, + CHAR_TYPESTORYTELLER, + CHAR_TYPERANKING, + CHAR_TYPEOTHERNPC, + CHAR_TYPEPRINTPASSMAN, + CHAR_TYPENPCENEMY, + CHAR_TYPEACTION, + CHAR_TYPEWINDOWMAN, + CHAR_TYPESAVEPOINT, + CHAR_TYPEWINDOWHEALER, + CHAR_TYPEITEMSHOP, + CHAR_TYPESTONESHOP, + CHAR_TYPEDUELRANKING, + CHAR_TYPEWARPMAN, + CHAR_TYPEEVENT, + CHAR_TYPEMIC, + CHAR_TYPELUCKYMAN, + CHAR_TYPEBUS, + CHAR_TYPECHARM, + CHAR_TYPECHECKMAN, + CHAR_TYPEJANKEN, + CHAR_TYPETRANSMIGRATION, + CHAR_TYPEFMWARPMAN, // 家族PK场管理员 + CHAR_TYPEFMSCHEDULEMAN, // 家族PK场登记员 + CHAR_TYPEMANORSCHEDULEMAN, // 庄园PK场预约人 +#ifdef _SERVICE + CHAR_TYPESTONESERVICEMAN, // 石器服务员 +#endif +#ifdef _GAMBLE_BANK + CHAR_GAMBLEBANK, +#endif +#ifdef _NEW_WARPMAN + CHAR_NEWNPCMAN, +#endif +#ifdef _MARKET_TRADE + CHAR_MAPTRADEMAN, +#endif +#ifdef _GAMBLE_ROULETTE + CHAR_GAMBLEROULETTE, + CHAR_GAMBLEMASTER, +#endif +#ifdef _TRANSER_MAN + CHAR_TRANSERMANS, +#endif + +#ifdef _NPC_SELLSTH + CHAR_SELLSTHMAN, +#endif + +#ifdef _NPC_MAKEPAIR + CHAR_MAKEPAIR, +#endif +#ifdef _NPC_FUSION + CHAR_PETFUSIONMAN, +#endif +#ifdef _PAUCTION_MAN + CHAR_PAUCTIONMAN, +#endif +#ifdef _ITEM_NPCCHANGE + CHAR_ITEMCHANGENPC, +#endif +#ifdef _CFREE_petskill + CHAR_FREESKILLSHOP, +#endif +#ifdef _PETRACE + CHAR_PETRACEMASTER, // 宠物竞速 + CHAR_PETRACEPET, +#endif + +#ifdef _AUCTIONEER + CHAR_TYPEAUCTIONEER, +#endif + +#ifdef _ALLDOMAN // (不可开) Syu ADD 排行榜NPC + CHAR_TYPEALLDOMAN, +#endif + + CHAR_TYPEPETMAKER, // petmaker + +#ifdef _NPC_WELFARE + CHAR_TYPEWELFARE, +#endif + +#ifdef _NPC_VERYWELFARE + CHAR_TYPEVERYWELFARE, +#endif + +#ifdef _NPC_WELFARE_2 // WON ADD 职业NPC-2 + CHAR_TYPEWELFARE2, +#endif + +#ifdef _RACEMAN + CHAR_RACEMAN, // CYG 猎宠大会 +#endif + + CHAR_TYPENUM, +}CHAR_TYPE; + +typedef enum +{ + CHAR_EVENT_NONE, + CHAR_EVENT_NPC, + CHAR_EVENT_ENEMY, + CHAR_EVENT_WARP, + CHAR_EVENT_DOOR, + CHAR_EVENT_ALTERRATIVE, + CHAR_EVENT_WARP_MORNING, + CHAR_EVENT_WARP_NOON, + CHAR_EVENT_WARP_NIGHT, + CHAR_EVENTNUM, +}CHAR_EVENT; + +typedef enum +{ + CHAR_PARTY_NONE, + CHAR_PARTY_LEADER, + CHAR_PARTY_CLIENT, +}CHAR_PARTY_MODE; + +typedef enum +{ + CHAR_TRADE_FREE, /* 可交易 */ + CHAR_TRADE_SENDING, /* 交易请求中 */ + CHAR_TRADE_TRADING, /* 交易中 */ + CHAR_TRADE_LOCK, /* 交易锁定中 */ +}CHAR_TRADE_MODE; + +typedef enum +{ + CHAR_PETMAIL_NONE, + CHAR_PETMAIL_IDLE1, + CHAR_PETMAIL_IDLE2, + CHAR_PETMAIL_RETURNWAIT, + CHAR_PETMAIL_IDLE3, + CHAR_PETMAIL_IDLE4, + CHAR_PETMAIL_IDLE5, +}CHAR_PETMAIL_MODE; + +typedef enum +{ + CHAR_PETFOLLOW_NONE, + CHAR_PETFOLLOW_NOW, +}CHAR_PETFOLLOW_MODE; + +#ifdef _DROPSTAKENEW +typedef enum +{ + DICE_BIG = 1, // 骰子_大 + DICE_SMALL, // 骰子_小 + DICE_ALLEAT, // 骰子_通吃 + PET_RACE1 = 5, // 竞速场_宠物1 + PET_RACE2, // 竞速场_宠物2 + PET_RACE3, // 竞速场_宠物3 + ROULETTE1 = 11, ROULETTE2, ROULETTE3, ROULETTE4, ROULETTE5, ROULETTE6, ROULETTE7, + ROULETTE8, ROULETTE9, ROULETTE10, ROULETTE11, ROULETTE12, ROULETTE13, ROULETTE14, + ROULETTE15, ROULETTE16, ROULETTE17, ROULETTE18, ROULETTE19, ROULETTE20, + ROULETTE21 = 41, ROULETTE22, ROULETTE23, ROULETTE24, ROULETTE25, ROULETTE26, + ROULETTE27, ROULETTE28, ROULETTE29, ROULETTE30, ROULETTE31, ROULETTE32, + ROULETTE33, ROULETTE34, ROULETTE35, ROULETTE36, ROULETTE37, ROULETTE38, + ROULETTE39, ROULETTE40, + ROULETTE41 = 71, ROULETTE42, ROULETTE43, ROULETTE44, ROULETTE45, + ROULETTE51 = 101, ROULETTE52, ROULETTE53, //横列 + ROULETTE61 = 111, ROULETTE62, //1到10 10到11 + PETFIGHT_WIN1 = 120, + PETFIGHT_WIN2, + PETFIGHT_DUEL, +}GAMBLE_TYPE; +#endif + +#ifdef _CHAR_POOLITEM +#ifdef _NPC_DEPOTPET // 开放宠物仓库同时增加道具仓库容量 +#define CHAR_MAXDEPOTITEMHAVE 100 +#else +#define CHAR_MAXDEPOTITEMHAVE 60 +#endif +#endif + +#ifdef _CHAR_POOLPET +#define CHAR_MAXDEPOTPETHAVE 30 +#endif + + +#ifdef _ADD_POOL_ITEM // (不可开) WON ADD 增加可寄放的道具 +#define CHAR_MAXPOOLITEMHAVE 30 +#else +#define CHAR_MAXPOOLITEMHAVE 20 +#endif + +#define CHAR_MAXITEMNUM 15 +#define CHAR_STARTITEMARRAY CHAR_EQUIPPLACENUM +#define CHAR_MAXITEMHAVE (CHAR_STARTITEMARRAY+CHAR_MAXITEMNUM) + +typedef enum +{ + CHAR_DATAPLACENUMBER, + CHAR_BASEIMAGENUMBER, + CHAR_BASEBASEIMAGENUMBER, + CHAR_FACEIMAGENUMBER, + CHAR_FLOOR, + CHAR_X, + CHAR_Y, + CHAR_DIR, + CHAR_LV, + CHAR_GOLD, + CHAR_HP, + CHAR_MP, + CHAR_MAXMP, + CHAR_VITAL, + CHAR_STR, + CHAR_TOUGH, + CHAR_DEX, + CHAR_CHARM, + CHAR_LUCK, + CHAR_EARTHAT, + CHAR_WATERAT, + CHAR_FIREAT, + CHAR_WINDAT, + CHAR_DEFAULTPET, + CHAR_CRITIAL, + CHAR_COUNTER, + CHAR_RARE, + CHAR_RADARSTRENGTH, + CHAR_CHATVOLUME, + CHAR_MERCHANTLEVEL, + CHAR_HEALERLEVEL, + CHAR_SAVEPOINT = CHAR_HEALERLEVEL, + CHAR_DETERMINEITEM, + CHAR_INDEXOFEQTITLE, + CHAR_POISON, + CHAR_PARALYSIS, + CHAR_SLEEP, + CHAR_STONE, + CHAR_DRUNK, + CHAR_CONFUSION, + CHAR_LOGINCOUNT, + CHAR_NPCCREATEINDEX=CHAR_LOGINCOUNT, + CHAR_DEADCOUNT, + CHAR_WALKCOUNT, + CHAR_TALKCOUNT, + CHAR_DAMAGECOUNT, + CHAR_GETPETCOUNT, + CHAR_KILLPETCOUNT, + CHAR_DEADPETCOUNT, + CHAR_SENDMAILCOUNT, + CHAR_MERGEITEMCOUNT, + CHAR_DUELBATTLECOUNT, + CHAR_DUELWINCOUNT, + CHAR_DUELLOSECOUNT, + CHAR_DUELSTWINCOUNT, + CHAR_DUELMAXSTWINCOUNT, + CHAR_WHICHTYPE, + CHAR_WALKINTERVAL, + CHAR_LOOPINTERVAL, +#ifdef _NEWOPEN_MAXEXP + CHAR_OLDEXP, + CHAR_EXP, +#else + CHAR_EXP, +#endif + CHAR_LASTTALKELDER, + CHAR_SKILLUPPOINT, + CHAR_LEVELUPPOINT, + CHAR_IMAGETYPE, + CHAR_NAMECOLOR, + CHAR_POPUPNAMECOLOR, + CHAR_LASTTIMESETLUCK, + CHAR_DUELPOINT, + CHAR_ENDEVENT, /* (0~31) */ + CHAR_ENDEVENT2, /* (32~63) */ + CHAR_ENDEVENT3, /* (64~96) */ +#ifdef _NEWEVENT + CHAR_ENDEVENT4, /* (96~127) */ + CHAR_ENDEVENT5, /* (128~159) */ + CHAR_ENDEVENT6, /* (160~191) */ +#endif +#ifdef _ADD_NEWEVENT // WON 多增任务旗标 + CHAR_ENDEVENT7, + CHAR_ENDEVENT8, +#endif + + CHAR_NOWEVENT, /* (0~31) */ + CHAR_NOWEVENT2, /* (32~63) */ + CHAR_NOWEVENT3, /* (64~96) */ +#ifdef _NEWEVENT + CHAR_NOWEVENT4, /* (96~127) */ + CHAR_NOWEVENT5, /* (128~159) */ + CHAR_NOWEVENT6, /* (160~191) */ +#endif +#ifdef _ADD_NEWEVENT // WON 多增任务旗标 + CHAR_NOWEVENT7, + CHAR_NOWEVENT8, // 224~255 精灵召唤专用 +#endif + + CHAR_TRANSMIGRATION, + CHAR_TRANSEQUATION, + CHAR_INITDATA, + CHAR_SILENT, /* char shutup time */ + CHAR_FMINDEX, // 家族 index + CHAR_FMLEADERFLAG, /* 家族成员种类 + * FMMEMBER_NONE :没有加入任何家族 + * FMMEMBER_APPLY :申请加入家族中 + * FMMEMBER_LEADER :族长 + * FMMEMBER_MEMBER :一般成员 + * FMMEMBER_ELDER :长老 + * FMMEMBER_INVITE :祭司 // 暂时不用 + * FMMEMBER_BAILEE :财务长 // 暂时不用 + * FMMEMBER_VICELEADER :副族长 // 暂时不用 + */ + CHAR_FMSPRITE, // 家族守护精灵 + + CHAR_BANKGOLD, + CHAR_RIDEPET, + CHAR_LEARNRIDE, +#ifdef _NEW_RIDEPETS + CHAR_LOWRIDEPETS, +#endif + CHAR_LIMITLEVEL, +#ifdef _PET_FUSION + CHAR_FUSIONCODE, //物种编码 + CHAR_FUSIONINDEX, //孵化宠物编号 + CHAR_FUSIONRAISE, // 养次数 + CHAR_FUSIONBEIT, //宠蛋旗标 + CHAR_FUSIONTIMELIMIT, // 养时间 +#endif + +#ifdef _DEATH_CONTEND + CHAR_PKLISTTEAMNUM, + CHAR_PKLISTLEADER, +#endif + +#ifdef _PERSONAL_FAME // Arminius 8.30: 家族个人声望 + CHAR_FAME, +#endif + +#ifdef _NEWSAVE + CHAR_SAVEINDEXNUMBER, /* SaveFile .0.char or .1.char */ +#endif + +#ifdef __ATTACK_MAGIC + CHAR_EARTH_EXP, // 玩家的地魔法熟练度 + CHAR_WATER_EXP, // 玩家的水魔法熟练度 + CHAR_FIRE_EXP, // 玩家的火魔法熟练度 + CHAR_WIND_EXP, // 玩家的风魔法熟练度 + CHAR_EARTH_RESIST, // 玩家的地魔法抗性 + CHAR_WATER_RESIST, // 玩家的水魔法抗性 + CHAR_FIRE_RESIST, // 玩家的火魔法抗性 + CHAR_WIND_RESIST, // 玩家的风魔法抗性 + CHAR_EARTH_ATTMAGIC_EXP, // 玩家的地魔法熟练度经验值 + CHAR_WATER_ATTMAGIC_EXP, // 玩家的水魔法熟练度经验值 + CHAR_FIRE_ATTMAGIC_EXP, // 玩家的火魔法熟练度经验值 + CHAR_WIND_ATTMAGIC_EXP, // 玩家的风魔法熟练度经验值 + CHAR_EARTH_DEFMAGIC_EXP, // 玩家的地魔法抗性经验值 + CHAR_WATER_DEFMAGIC_EXP, // 玩家的水魔法抗性经验值 + CHAR_FIRE_DEFMAGIC_EXP, // 玩家的火魔法抗性经验值 + CHAR_WIND_DEFMAGIC_EXP, // 玩家的风魔法抗性经验值 +#endif + + +#ifdef _GAMBLE_BANK + CHAR_PERSONAGOLD, //赌场个人银行 +#endif +#ifdef _DROPSTAKENEW + CHAR_GAMBLENUM, //赌场积分 +#endif +#ifdef _ADD_ACTION //npc动作 + CHAR_ACTIONSTYLE, +#endif +#ifdef _AUCTIONEER + CHAR_AUCGOLD, // 拍卖所得 +#endif +#ifdef _PET_EVOLUTION + CHAR_EVOLUTIONBASEVTL, + CHAR_EVOLUTIONBASESTR, + CHAR_EVOLUTIONBASETGH, + CHAR_EVOLUTIONBASEDEX, +#endif +#ifdef _ACTION_BULLSCR + CHAR_ABULLSTART, + CHAR_ABULLSCORE, + CHAR_ABULLTIME, + CHAR_ABULLSTARTTIME, +#endif + +#ifdef _ACTION_GMQUE + CHAR_GMQUEFLG, + CHAR_GMQUENUMS, +#endif + +#ifdef _FAMILYBANKSTONELOG + CHAR_FMBANKGOLD, //家族银行存款 +#endif + +#ifdef _FM_JOINLIMIT + CHAR_FMTIMELIMIT, +#endif + +#ifdef _CHAR_PROFESSION // WON ADD 人物职业 + PROFESSION_CLASS, // 职业别 + PROFESSION_LEVEL, // 职业等级 +// PROFESSION_EXP, // 职业经验值 + PROFESSION_SKILL_POINT, // 技能点数 + ATTACHPILE, // 增加堆叠 + PROFESSION_FIRE_P, // 火熟练度 + PROFESSION_ICE_P, // 冰熟练度 + PROFESSION_THUNDER_P, // 雷熟练度 + PROFESSION_FIRE_R, // 火抗性 + PROFESSION_ICE_R, // 冰抗性 + PROFESSION_THUNDER_R, // 雷抗性 +#endif +#ifdef _ALLDOMAN // (不可开) Syu ADD 排行榜NPC + CHAR_HEROFLOOR, +#endif +#ifdef _PETSKILL_BECOMEPIG + CHAR_BECOMEPIG, + CHAR_BECOMEPIG_BBI,//要变成的图号 +#endif + CHAR_LASTLEAVETIME, // Robin add 最後离线时间 + +#ifdef _NEW_MANOR_LAW + CHAR_MOMENTUM, +#endif + +#ifdef _ITEM_ADDEXP2 + CHAR_ADDEXPPOWER, + CHAR_ADDEXPTIME, +#endif + +#ifdef _ANGEL_SUMMON + CHAR_HEROCNT, // 完成勇者任务的次数 +#endif + +#ifdef _TEACHER_SYSTEM + CHAR_TEACHER_FAME, // 导师领导声望 +#endif + +#ifdef _RACEMAN + CHAR_CHECKIN, //宠物是否登记 + CHAR_CATCHCNT1, //新手限 猎宠次数 + CHAR_CATCHCNT2, //老手限 猎宠次数 + CHAR_CATCHCNT3, //家族限 猎宠次数 + CHAR_CATCHCNT4, //老手不限 猎宠次数 + CHAR_CATCHCNT5, //老手不限 猎宠次数 + CHAR_KINDCNT1, /* (0~31) */ + CHAR_KINDCNT2, /* (32~63) */ + CHAR_KINDCNT3, /* (64~95) */ + CHAR_KINDCNT4, /* (96~127) */ + CHAR_KINDCNT5, /* (128~159) */ + CHAR_KINDCNT6, /* (160~191) */ + CHAR_KINDCNT7, /* (192~223) */ + CHAR_KINDCNT8, /* (224~255) */ + CHAR_KINDCNT9, /* (256~287) */ + CHAR_KINDCNT10, /* (288~319) */ +#endif + +#ifdef _GM_ITEM + CHAR_GMTIME, // 玩家GM命令次数 +#endif + + CHAR_DATAINTNUM, + +}CHAR_DATAINT; + +typedef enum { + CHAR_MODAI = CHAR_CHARM, /* 矢永玄 及及镝擦艘膜恳袄 */ + CHAR_VARIABLEAI = CHAR_LUCK, /* 矢永玄及镝擦艘 祭袄 ㄠㄟㄟ 仄凶袄匹 匀化云仁 */ + CHAR_SLOT = CHAR_DEFAULTPET, /* 檗 毛本永玄请 月旦夫永玄醒 矢永玄互银迕 */ + CHAR_PETGETLV = CHAR_CHATVOLUME, /* 必永玄今木凶伊矛伙 矢永玄及心银迕 */ + CHAR_PUTPETTIME = CHAR_LOGINCOUNT, /* 矢永玄互哗 卞 井木凶凛棉 */ + CHAR_MAILMODE = CHAR_RADARSTRENGTH, /* 矢永玄及心银迕 丢□伙霜耨橇谪 */ + CHAR_ALLOCPOINT = CHAR_LEVELUPPOINT, /* 伊矛伙失永皿凛及喃曰蕊曰禾奶件玄(矢永玄迕) */ + CHAR_PETMAILBUFINDEX = CHAR_GETPETCOUNT, /* 矢永玄丢□伙(offmsg)尺及index */ + CHAR_PETMAILIDLETIME = CHAR_SENDMAILCOUNT, /* 矢永玄丢□伙及啃及凛棉卅升 */ + CHAR_PETMAILFROMFLOOR = CHAR_DUELBATTLECOUNT, /* 丢□伙毛霜匀凶凛及白夫失 */ + CHAR_PETMAILFROMX = CHAR_DUELWINCOUNT, /* 丢□伙毛霜匀凶凛及 甄 */ + CHAR_PETMAILFROMY = CHAR_DUELLOSECOUNT, /* 丢□伙毛霜匀凶凛及 甄 */ + CHAR_PETMAILEFFECT = CHAR_DUELSTWINCOUNT, /* 矢永玄丢□伙及请蜇及巨白尼弁玄 寞 */ + CHAR_PETSENDMAILCOUNT = CHAR_TALKCOUNT, /* 矢永玄互丢□伙毛扪氏分荚醒 */ + CHAR_PETRANK = CHAR_LASTTIMESETLUCK, /* 矢永玄及仿件弁(矢永玄迕 ㄠ ㄥ[ㄟ反巨仿□迕 */ + CHAR_PETID = CHAR_DUELMAXSTWINCOUNT,/* 矢永玄及 件皿伊□玄及 */ + CHAR_PETFAMILY = CHAR_FMLEADERFLAG, // CoolFish: Family 判断是否为家族守护兽 +}CHAR_PET; + + +typedef enum +{ + CHAR_NAME, + CHAR_OWNTITLE, + CHAR_USERPETNAME = CHAR_OWNTITLE, + CHAR_NPCARGUMENT, + CHAR_CDKEY = CHAR_NPCARGUMENT, + CHAR_OWNERCDKEY, + CHAR_OWNERCHARANAME, + CHAR_FMNAME, +#ifdef _UNIQUE_P_I + CHAR_UNIQUECODE, +#endif +#ifdef _ACTION_GMQUE + CHAR_GMQUESTR1, +#endif +#ifdef _GM_IDENTIFY + CHAR_GMIDENTIFY, +#endif +#ifdef _TEACHER_SYSTEM + CHAR_TEACHER_ID, // 导师帐号 + CHAR_TEACHER_NAME, // 导师名字 +#endif +#ifdef _ITEM_SETLOVER + CHAR_LOVE, // 结婚判断 + CHAR_LOVERID, // 爱人帐号 + CHAR_LOVERNAME, // 爱人名字 +#endif + +#ifdef _GM_ITEM + CHAR_GMFUNCTION, // 玩家GM命令 +#endif + + CHAR_DATACHARNUM, +}CHAR_DATACHAR; + +typedef enum +{ + CHAR_ISATTACK, + CHAR_ISATTACKED, + CHAR_ISOVER, + CHAR_ISOVERED, + CHAR_HAVEHEIGHT, + CHAR_ISVISIBLE, + CHAR_ISTRANSPARENT, + CHAR_ISFLYING, + CHAR_ISDIE, + CHAR_ISBIG, + CHAR_ISSHOWBATTLEMSG, + CHAR_ISPARTY, + CHAR_ISWARP, + CHAR_ISDUEL, + CHAR_ISPARTYCHAT, + CHAR_ISTRADECARD, + CHAR_ISTRADE, +#ifdef _CHANNEL_MODIFY + CHAR_ISTELL, //密语频道开关 + CHAR_ISFM, //家族频道开关 + CHAR_ISOCC, //职业频道开关 + CHAR_ISSAVE, //对话储存开关 + CHAR_ISCHAT, //聊天室 +#endif +#ifdef _AUCPROTOCOL // (不可开) Syu ADD 拍卖频道开关Protocol + CHAR_ISAUC, +#endif + CHAR_FLGNUM, +}CHAR_DATAFLG; + +#define CHAR_FS_PARTY (1 << 0) +#define CHAR_FS_BATTLE (1 << 1) +#define CHAR_FS_DUEL (1 << 2) +#define CHAR_FS_PARTYCHAT (1 << 3) //队伍频道开关 +#define CHAR_FS_TRADECARD (1 << 4) +#define CHAR_FS_TRADE (1 << 5) +#ifdef _CHANNEL_MODIFY +#define CHAR_FS_TELL (1 << 6) //密语频道开关 +#define CHAR_FS_FM (1 << 7) //家族频道开关 +#define CHAR_FS_OCC (1 << 8) //职业频道开关 +#define CHAR_FS_SAVE (1 << 9) //对话储存开关 +#define CHAR_FS_CHAT (1 << 10) //聊天室开关 +#endif +#ifdef _AUCPROTOCOL // (不可开) Syu ADD 拍卖频道开关Protocol +#define CHAR_FS_AUC (1 << 6) +#endif + +typedef enum +{ + CHAR_WORKBATTLEMODE, + CHAR_WORKBATTLEINDEX, + CHAR_WORKBATTLESIDE, + CHAR_WORKBATTLECOM1, + CHAR_WORKBATTLECOM2, + CHAR_WORKBATTLECOM3, +#ifdef _PSKILL_MDFYATTACK + CHAR_WORKBATTLECOM4, +#endif + CHAR_WORKBATTLEFLG, + CHAR_WORKBATTLEWATCH, + + CHAR_WORKFIXEARTHAT, + CHAR_WORKFIXWATERAT, + CHAR_WORKFIXFIREAT, + CHAR_WORKFIXWINDAT, +#ifdef _PROFESSION_ADDSKILL + CHAR_WORKFIXEARTHAT_BOUNDARY, //地结界 左16位元存放加强百分比 右16位元存放回合数 + CHAR_WORKFIXWATERAT_BOUNDARY, //水结界 + CHAR_WORKFIXFIREAT_BOUNDARY, //火结界 + CHAR_WORKFIXWINDAT_BOUNDARY, //风结界 +#endif + CHAR_WORKMAXHP, + CHAR_WORKMAXMP, + + CHAR_WORKATTACKPOWER, + CHAR_WORKDEFENCEPOWER, + CHAR_WORKQUICK, + + CHAR_WORKFIXVITAL, + CHAR_WORKFIXSTR, + CHAR_WORKFIXTOUGH, + CHAR_WORKFIXDEX, + +#ifdef _ITEMSET5_TXT + CHAR_WORKFIXARRANGE, + CHAR_WORKARRANGEPOWER, + CHAR_WORKFIXSEQUENCE, + CHAR_WORKSEQUENCEPOWER, + CHAR_WORKATTACHPILE, + CHAR_WORKHITRIGHT, //额外命中 +#endif +#ifdef _ITEMSET6_TXT + CHAR_WORKNEGLECTGUARD, +#endif + CHAR_WORKMODATTACK, + CHAR_WORKMODDEFENCE, + CHAR_WORKMODQUICK, + + CHAR_WORKMODCAPTURE, + CHAR_WORKMODCHARM, + + CHAR_WORKFIXCHARM, + CHAR_WORKFIXLUCK, + CHAR_WORKFIXAI, + CHAR_WORKFIXAVOID, + + CHAR_WORKDAMAGEABSROB, + CHAR_WORKDAMAGEREFLEC, + CHAR_WORKDAMAGEVANISH, + CHAR_WORKPOISON, + CHAR_WORKPARALYSIS, + CHAR_WORKSLEEP, + CHAR_WORKSTONE, + CHAR_WORKDRUNK, + CHAR_WORKCONFUSION, + CHAR_WORKWEAKEN, //虚弱 vincent add _MAGIC_WEAKEN + CHAR_WORKDEEPPOISON, //剧毒 vincent add _MAGIC_DEEPPOISON + CHAR_WORKBARRIER, //魔障 vincent add _MAGIC_BARRIER + CHAR_WORKNOCAST, //沉默 vincent add _MAGIC_NOCAST + CHAR_WORKMODPOISON, + CHAR_WORKMODPARALYSIS, + CHAR_WORKMODSLEEP, + CHAR_WORKMODSTONE, + CHAR_WORKMODDRUNK, + CHAR_WORKMODCONFUSION, + CHAR_WORKMODWEAKEN, + CHAR_WORKMODDEEPPOISON, + CHAR_WORKMODBARRIER, //魔障 + CHAR_WORKMODNOCAST, //沉默 + CHAR_WORKMODCRITICAL, //一击必杀 + CHAR_WORKULTIMATE, + CHAR_WORKPARTYMODE, + CHAR_WORKTRADEMODE, /* 交易模式 + * 0: CHAR_TRADE_FREE :可交易 + * 1: CHAR_TRADE_SENDING:交易请求中 + * 2: CHAR_TRADE_TRADING:交易中 + * 3: CHAR_TRADE_LOCK :交易锁定中 + */ + CHAR_WORKPARTYINDEX1, + CHAR_WORKPARTYINDEX2, + CHAR_WORKPARTYINDEX3, + CHAR_WORKPARTYINDEX4, + CHAR_WORKPARTYINDEX5, + CHAR_WORKOBJINDEX, + CHAR_WORKWALKSTARTSEC, + CHAR_WORKWALKSTARTMSEC, + CHAR_WORKLOOPSTARTSEC, + CHAR_WORKLOOPSTARTMSEC, + CHAR_WORKLASTATTACKCHARAINDEX, + CHAR_WORKEVENTTYPE, + CHAR_WORKGETEXP, + CHAR_WORKMODCAPTUREDEFAULT, + CHAR_WORKACTION, + CHAR_WORKFD, + CHAR_WORKFLG, + CHAR_WORKGMLEVEL, + CHAR_NPCWORKINT1, + CHAR_NPCWORKINT2, + CHAR_NPCWORKINT3, + CHAR_NPCWORKINT4, + CHAR_NPCWORKINT5, + CHAR_NPCWORKINT6, + CHAR_NPCWORKINT7, + CHAR_NPCWORKINT8, + CHAR_NPCWORKINT9, + CHAR_NPCWORKINT10, + CHAR_NPCWORKINT11, +#ifdef _PETRACE + CHAR_NPCWORKINT12, +#endif + CHAR_NPCWORKINT13, + CHAR_WORKWARPCHECK, + CHAR_TENSEICHECKED, + CHAR_WORKFMINDEXI, // 家族索引 index + CHAR_WORKFMCHANNEL, // 家族频道 + CHAR_WORKFMCHANNELQUICK, + CHAR_WORKFMFLOOR, // 家族据点图层 + CHAR_WORKFMDP, // 家族DP值 + CHAR_WORKFMPKFLAG, // 是否正参与家族PK 1:Yes + CHAR_WORKFMSETUPFLAG, // 家族是否已正式成立 + CHAR_WORKFMMANINDEX, // FMWARPMAN Index + CHAR_WORKFMCHARINDEX, // 家族成员索引 index + CHAR_WORKBATTLEFLAG, // -1(战斗不能),1(可战斗) + + CHAR_WORK_PET0_STAT, + CHAR_WORK_PET1_STAT, + CHAR_WORK_PET2_STAT, + CHAR_WORK_PET3_STAT, + CHAR_WORK_PET4_STAT, + + CHAR_WORKLOGINTIME, // 玩家登入时间 + CHAR_WORKTALKCOUNT, + CHAR_WORKTALKTIME, + CHAR_WORKPETFOLLOW, // 宠物跟随 + CHAR_WORKPETFALL, // 战斗落马 + CHAR_WORKLEADERCHANGE, // 族长换位index +#ifdef _EQUIT_DEFMAGIC + CHAR_EQUITDEFMAGIC_E, + CHAR_EQUITDEFMAGIC_WA, + CHAR_EQUITDEFMAGIC_F, + CHAR_EQUITDEFMAGIC_WI, + CHAR_EQUITQUIMAGIC, +#endif +#ifdef _EQUIT_RESIST + CHAR_WORKEQUITFIRE, //装备抗火 + CHAR_WORKEQUITTHUNDER,//装备抗雷 + CHAR_WORKEQUITICE,//装备抗冰 + CHAR_WORKEQUITWEAKEN,//装备抗虚弱 + CHAR_WORKEQUITBARRIER,//装备抗魔障 + CHAR_WORKEQUITNOCAST,//装备抗沉默 + CHAR_WORKEQUITFALLRIDE,//装备抗落马 +#endif +#ifdef _PETMAIL_DEFNUMS + CHAR_PETMAILNUMS, + CHAR_PETMAILSENDTIME, +#endif +#ifdef _ACTION_BULLSCR + CHAR_BULLSHOWCOUNT, +#endif +#ifdef _ITEM_METAMO + CHAR_WORKITEMMETAMO, +#endif +#ifdef _ADD_DEAMGEDEFC + CHAR_WORKOTHERDMAGE, + CHAR_WORKOTHERDEFC, +#endif + +#ifdef _NPC_SELLSTH + CHAR_WORKSELLSTHNUM, +#endif + +#ifdef _LOSE_FINCH_ + CHAR_WORKSPETRELIFE, //宠物复活特性 +#endif + +#ifdef _CHIKULA_STONE + CHAR_WORKCHIKULAHP, + CHAR_WORKCHIKULAMP, +#endif +#ifdef _PETSKILL_SETDUCK + CHAR_MYSKILLDUCKPOWER, + CHAR_MYSKILLDUCK, + CHAR_MYSKILLSTRPOWER, + CHAR_MYSKILLSTR, + CHAR_MYSKILLTGHPOWER, + CHAR_MYSKILLTGH, + CHAR_MYSKILLDEXPOWER, + CHAR_MYSKILLDEX, + CHAR_MAGICPETMP, +#endif + CHAR_SKILLSTRPOWER, + CHAR_SKILLDEXPOWER, +#ifdef _NPC_MAKEPAIR + CHAR_MYPAIRINDEX, + CHAR_MYPAIRFLG, + CHAR_MYPAIRCODE, +#endif +#ifdef _OTHER_MAGICSTAUTS + CHAR_DEFMAGICSTATUS, +#ifdef _MAGIC_SUPERWALL + CHAR_MAGICSUPERWALL, +#endif + CHAR_OTHERSTATUSNUMS, +#endif +#ifdef _NPCCHANGE_PLAYERIMG + CHAR_WORKNPCMETAMO, +#endif + CHAR_PickAllPet, +#ifdef _DROPSTAKENEW + CHAR_WORKSTAKEFLAG, + CHAR_WORKSTAKETYPE1, + CHAR_WORKSTAKETYPE2, + CHAR_WORKSTAKETYPE3, + CHAR_WORKSTAKETYPE4, + CHAR_WORKSTAKETYPE5, +#endif + +#ifdef _MARKET_TRADE + CHAR_MAPTRADETYPE, //市集摊位 + CHAR_WORKTRADETYP, + CHAR_WORKTRADESELLINDEX, +#endif + CHAR_WORKTOXICATION, + +#ifdef _SUIT_ITEM + CHAR_WORKSUITITEM, + CHAR_WORKROUNDHP, + CHAR_WORKROUNDMP, + CHAR_WORKSUITVIT, + CHAR_WORKSUITSTR, + CHAR_WORKSUITTGH, + CHAR_WORKSUITDEX, + CHAR_WORKSUITMODSTR, +#ifdef _SUIT_ADDENDUM + CHAR_WORKRESIST, //异常抗性率 + CHAR_WORKCOUNTER,//反击率 + CHAR_WORKMPOWER, //加强法师的魔法( 受影响的法术:火山泉 火星球 召雷术 电流术 暴风雨 冰箭术 冰爆术 世界末日 火龙枪 嗜血成性 嗜血蛊 一针见血 附身术 ) +#endif +#ifdef _SUIT_TWFWENDUM + CHAR_WORK_EA,//地 + CHAR_WORK_WR,//水 + CHAR_WORK_FI,//火 + CHAR_WORK_WI,//风 +#endif +#ifdef _SUIT_ADDPART3 + CHAR_WORKDUCKPOWER,//套装回避 + CHAR_WORKRENOCAST, //沉默抗性率 + CHAR_WORKSUITSTR_P,//攻提升 单位为% + CHAR_WORKSUITTGH_P,//防提升 单位为% + CHAR_WORKSUITDEX_P,//敏提升 单位为% +#endif +#ifdef _SUIT_ADDPART4 + CHAR_SUITPOISON, //装备带毒 + CHAR_WORKMPOWER2, //与CHAR_WORKMPOWER相同 + CHAR_WORKUNMPOWER, //抵抗法师的魔法( 受影响的法术:火山泉 火星球 召雷术 电流术 暴风雨 冰箭术 冰爆术 世界末日 火龙枪 嗜血成性 嗜血蛊 一针见血 附身术 ) +#endif +#endif//_SUIT_ITEM + +#ifdef _IMPRECATE_ITEM + CHAR_WORKHURTMP, //伤害 MP + CHAR_WORKWISHESHP, //祝福 hp + CHAR_WORKWISHESMP, //祝福 MP + CHAR_WORKIMPRECATENUM1, + CHAR_WORKIMPRECATENUM2, + CHAR_WORKIMPRECATENUM3, +#endif +#ifdef _DEATH_CONTEND + CHAR_WORKLASTBATTLE, +#endif +#ifdef _STATUS_WATERWORD + CHAR_WORKMAPFLOORTYPE, + CHAR_WORKSTATUSWATER, +#endif +#ifdef _BATTLENPC_WARP_PLAYER + CHAR_WORKTURN, +#endif +#ifdef _MIND_ICON + CHAR_MIND_NUM, +#endif +#ifdef _ITEM_CRACKER + CHAR_WORKITEM_CRACKER, +#endif +#ifdef _ITEM_ADDEXP //vincent 经验提升 + CHAR_WORKITEM_ADDEXP, + CHAR_WORKITEM_ADDEXPTIME, +#endif +#ifdef _ALLDOMAN // (不可开) Syu ADD 排行榜NPC + CHAR_WORKHEROFLOOR, +#endif + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + CHAR_ENCOUNT_FIX, // 遇敌率 + CHAR_ENCOUNT_NUM, + CHAR_WORK_F_PROFICIENCY,// 火熟练度 + CHAR_WORK_I_PROFICIENCY,// 冰熟练度 + CHAR_WORK_T_PROFICIENCY,// 电熟练度 + CHAR_WORK_F_RESIST, // 火抗 + CHAR_WORK_I_RESIST, // 冰抗 + CHAR_WORK_T_RESIST, // 电抗 + CHAR_MYSKILLHIT, // 命中率 + CHAR_MYSKILLHIT_NUM, + CHAR_WORKDIZZY, // 晕眩 + CHAR_WORKMODDIZZY, + CHAR_WORKENTWINE, // 树根缠绕 + CHAR_WORKMODENTWINE, + CHAR_WORKTRAP, // 陷阱 + CHAR_WORKMODTRAP, + CHAR_WORKDRAGNET, // 天罗地网 + CHAR_WORKMODDRAGNET, +#ifdef _PROFESSION_ADDSKILL + //***********注意:这里的位置不可更动************* + CHAR_WORKICECRACK, // 冰爆术 + CHAR_WORKICECRACK2, // 冰爆术存放处2 + CHAR_WORKICECRACK3, // 冰爆术存放处3 + CHAR_WORKICECRACK4, // 冰爆术存放处4 + CHAR_WORKICECRACK5, // 冰爆术存放处5 + CHAR_WORKICECRACK6, // 冰爆术存放处6 + CHAR_WORKICECRACK7, // 冰爆术存放处7 + CHAR_WORKICECRACK8, // 冰爆术存放处8 + CHAR_WORKICECRACK9, // 冰爆术存放处9 + CHAR_WORKICECRACK10, // 冰爆术存放处10 + CHAR_WORKMODICECRACK, + CHAR_WORKMODICECRACK2, + CHAR_WORKMODICECRACK3, + CHAR_WORKMODICECRACK4, + CHAR_WORKMODICECRACK5, + CHAR_WORKMODICECRACK6, + CHAR_WORKMODICECRACK7, + CHAR_WORKMODICECRACK8, + CHAR_WORKMODICECRACK9, + CHAR_WORKMODICECRACK10, + //***************************************** +#else + CHAR_WORKICECRACK, // 冰爆术 + CHAR_WORKMODICECRACK, +#endif //_PROFESSION_ADDSKILL + + CHAR_WORKOBLIVION, // 遗忘 + CHAR_WORKMODOBLIVION, + CHAR_WORKICEARROW, // 冰箭 + CHAR_WORKMODICEARROW, + CHAR_WORKBLOODWORMS, // 嗜血蛊 + CHAR_WORKMODBLOODWORMS, + CHAR_WORKBLOODWORMSID, + CHAR_WORKSIGN, // 一针见血 + CHAR_WORKMODSIGN, + CHAR_WORKSIGNID, + CHAR_WORK_P_DUCK, // 回避 + CHAR_WORKMOD_P_DUCK, + CHAR_WORK_WEAPON, // 武器专精 + CHAR_WORKMOD_WEAPON, + CHAR_WORK_FOCUS, // 专注战斗 + CHAR_WORKMOD_FOCUS, + CHAR_WORKINSTIGATE, // 挑拨 + CHAR_WORKMODINSTIGATE, + CHAR_WORK_F_ENCLOSE, // 火附体 + CHAR_WORK_I_ENCLOSE, // 冰附体 + CHAR_WORK_T_ENCLOSE, // 雷附体 + CHAR_WORKMOD_F_ENCLOSE, + CHAR_WORKMOD_I_ENCLOSE, + CHAR_WORKMOD_T_ENCLOSE, + CHAR_WORK_F_ENCLOSE_2, // 火附 + CHAR_WORK_I_ENCLOSE_2, // 冰附 + CHAR_WORK_T_ENCLOSE_2, // 雷附 + CHAR_WORKMOD_F_ENCLOSE_2, + CHAR_WORKMOD_I_ENCLOSE_2, + CHAR_WORKMOD_T_ENCLOSE_2, + CHAR_WORKRESIST_F, // 提升火抗性 + CHAR_WORKRESIST_I, // 提升冰抗性 + CHAR_WORKRESIST_T, // 提升雷抗性 +#ifdef _PROFESSION_ADDSKILL + CHAR_WORKERSIST_F_I_T, // 提升火冰雷抗性 + CHAR_WORKANNEX, //附身 + CHAR_WORKWATER, //水附体 + CHAR_WORKFEAR, //恐惧 + CHAR_DOOMTIME, //世界末日集气(与火龙枪共用) + CHAR_WORK_com1, + CHAR_WORK_toNo, + CHAR_WORK_mode, + CHAR_WORK_skill_level, + CHAR_WORK_array, +#endif + CHAR_WORKMODRESIST_F, // 提升火抗性百分比数值 + CHAR_WORKMODRESIST_I, // 提升冰抗性百分比数值 + CHAR_WORKMODRESIST_T, // 提升雷抗性百分比数值 +#endif + +#ifdef _MAGICSTAUTS_RESIST + CHAR_MAGICFIRE, //火抗精灵 + CHAR_MAGICTHUNDER,//电抗精灵 + CHAR_MAGICICE,//冰抗精灵 +#endif + +#ifdef _PET_SKILL_SARS // WON ADD 毒煞蔓延 + CHAR_WORKSARS, + CHAR_WORKMODSARS, +#endif + +#ifdef _PETSKILL_ACUPUNCTURE + CHAR_WORKACUPUNCTURE, +#endif +#ifdef _PETSKILL_RETRACE + CHAR_WORKRETRACE, +#endif + +#ifdef _CHATROOMPROTOCOL // (不可开) Syu ADD 聊天室频道 + CHAR_WORKCHATROOMTYPE , + CHAR_WORKCHATROOMNUM , +#endif + +#ifdef _MAGIC_RESIST_EQUIT // WON ADD 职业抗性装备 + CHAR_WORK_F_SUIT, + CHAR_WORK_I_SUIT, + CHAR_WORK_T_SUIT, +#endif + +#ifdef _PETSKILL_BECOMEFOX + CHAR_WORKFOXROUND, //计算狐狸变身回合数 +#endif + + CHAR_WORKSTANDBYPET, // Robin add 待机宠 +#ifdef _STREET_VENDOR + CHAR_WORKSTREETVENDOR, // 摆摊状态 -1:没在摆摊,也没在摆摊交易;1:摆摊中;2:卖方在交易中;3:摆摊的买方 + CHAR_WORKSTREETVENDOR_WHO, // 谁和我交易 +#endif + +#ifdef _ANGEL_SUMMON + CHAR_WORKMISSION, + CHAR_WORKANGELMODE, +#endif +#ifdef _MAP_TIME + CHAR_WORK_MAP_TIME, // 特殊地图倒数 +#endif +#ifdef _PETSKILL_LER + CHAR_WORK_RELIFE, // 雷尔复活 +#endif +#ifdef _TEACHER_SYSTEM + CHAR_WORK_GET_TEACHER_FAME, // 导师领导声望 +#endif + + CHAR_WORKSKYWALKER, // GM天行者?? + + CHAR_WORKLASTMERGETIME, // 最後合成时间 + +#ifdef _ESCAPE_RESET // 恶宝逃跑後暂时不可组队 + CHAR_WORKLASTESCAPE, +#endif + +#ifdef _FONT_SIZE + CHAR_WORKFONTSIZE, // +#endif + +#ifdef _TIME_TICKET + CHAR_WORKTICKETTIME, + CHAR_WORKTICKETTIMESTART, +#endif + + CHAR_WORKDEBUGMODE, // 除错模式中 + + CHAR_WORKDATAINTNUM, + + + CHAR_WORKENCOUNTPROBABILITY_MIN = CHAR_NPCWORKINT1, + CHAR_WORKENCOUNTPROBABILITY_MAX = CHAR_NPCWORKINT2, + CHAR_WORK_TOHELOS_CUTRATE = CHAR_NPCWORKINT3, + CHAR_WORK_TOHELOS_COUNT = CHAR_NPCWORKINT4, + CHAR_WORKSHOPRELEVANT = CHAR_NPCWORKINT5, + CHAR_WORKSHOPRELEVANTSEC = CHAR_NPCWORKINT6, + CHAR_WORKSHOPRELEVANTTRD = CHAR_NPCWORKINT7, + CHAR_WORKTRADER = CHAR_NPCWORKINT8, + CHAR_WORKEFFECT = CHAR_NPCWORKINT9, + CHAR_WORKRENAMEITEMNUM = CHAR_NPCWORKINT10, + CHAR_WORKRENAMEITEMINDEX = CHAR_NPCWORKINT5, + CHAR_WORKPLAYERINDEX = CHAR_NPCWORKINT1, + CHAR_WORKTACTICS = CHAR_NPCWORKINT2, + CHAR_WORKPETFOLLOWMODE = CHAR_NPCWORKINT3, + CHAR_WORKPETFOLLOWCOUNT = CHAR_NPCWORKINT4, + CHAR_WORK_PETFLG = CHAR_NPCWORKINT1, + CHAR_WORKGENERATEINDEX = CHAR_NPCWORKINT1, + CHAR_WORKDOORCLOSETIME = CHAR_NPCWORKINT1, + CHAR_WORKDOORSWITCHCOUNT = CHAR_NPCWORKINT2, + CHAR_WORKDOOROPENG = CHAR_NPCWORKINT3, + CHAR_WORKDOORCLOSEG = CHAR_NPCWORKINT4, + CHAR_WORKDOORSOONFLG = CHAR_NPCWORKINT5, + CHAR_WORKDOORPASSFLG = CHAR_NPCWORKINT6, + CHAR_WORKDOORKEYITEMID = CHAR_NPCWORKINT7, + CHAR_WORKDOORSWITCHCURRENT = CHAR_NPCWORKINT8, + CHAR_WORKDOORORIGINALGRAPHIC = CHAR_NPCWORKINT9, + CHAR_WORKDOOREXPIRETIME = CHAR_NPCWORKINT10, + CHAR_WORKOLDMANID = CHAR_NPCWORKINT1, + CHAR_WORKSHOPCLIENTINDEX = CHAR_NPCWORKINT1, + CHAR_WORKDENGONMAXID = CHAR_NPCWORKINT1, +}CHAR_WORKDATAINT; + + +enum{ + WORKFLG_DEBUGMODE = ( 1 << 0 ), + WORKFLG_MICMODE = ( 2 << 0 ), +}; + +typedef enum +{ + CHAR_INITFUNC, + CHAR_FIRSTFUNCTION = CHAR_INITFUNC, + CHAR_WALKPREFUNC, + CHAR_WALKPOSTFUNC, + CHAR_PREOVERFUNC, + CHAR_POSTOVERFUNC, + CHAR_WATCHFUNC, + CHAR_LOOPFUNC, + CHAR_DYINGFUNC, + CHAR_TALKEDFUNC, + CHAR_PREATTACKEDFUNC, + CHAR_POSTATTACKEDFUNC, + CHAR_OFFFUNC, + CHAR_LOOKEDFUNC, + CHAR_ITEMPUTFUNC, + CHAR_SPECIALTALKEDFUNC, + CHAR_WINDOWTALKEDFUNC, +#ifdef _USER_CHARLOOPS + CHAR_LOOPFUNCTEMP1, + CHAR_LOOPFUNCTEMP2, + CHAR_BATTLEPROPERTY, +#endif + CHAR_LASTFUNCTION, + CHAR_FUNCTABLENUM = CHAR_LASTFUNCTION, +}CHAR_FUNCTABLE; + +typedef enum +{ + CHAR_WORKWALKARRAY, + CHAR_NPCWORKCHAR1, + CHAR_NPCWORKCHAR2, + CHAR_NPCWORKCHAR3, + CHAR_NPCWORKCHAR4, + CHAR_NPCWORKCHAR5, + CHAR_NPCWORKCHAR6, +#ifdef _ANGEL_SUMMON + CHAR_WORKHEROINFO, +#endif +#ifdef _STREET_VENDOR + CHAR_STREETVENDOR_NAME, +#endif + CHAR_WORKDATACHARNUM, + CHAR_WORKBATTLE_TACTICSOPTION = CHAR_NPCWORKCHAR1, +#ifdef _BATTLENPC_WARP_PLAYER + CHAR_WORKBATTLE_ACT_CONDITION = CHAR_NPCWORKCHAR2, +#endif + CHAR_WORKDOORPASSWD = CHAR_NPCWORKCHAR1, + CHAR_WORKDOORNAME = CHAR_NPCWORKCHAR2, + CHAR_WORKDOORGOLDLIMIT = CHAR_NPCWORKCHAR3, + CHAR_WORKDOORWEEK = CHAR_NPCWORKCHAR4, + CHAR_WORKDOORHOUR = CHAR_NPCWORKCHAR5, + CHAR_WORKDOORMINUTE = CHAR_NPCWORKCHAR6, + CHAR_WORKDOORTITLE = CHAR_NPCWORKCHAR6, + CHAR_WORKDOORMANDOORNAME = CHAR_NPCWORKCHAR1, + CHAR_TIME1, + CHAR_TIME2 = CHAR_NPCWORKCHAR6, + +}CHAR_WORKDATACHAR; + + +typedef enum +{ + CHAR_IMAGETYPE_GIRL, + CHAR_IMAGETYPE_BOY, + CHAR_IMAGETYPE_CHILDBOY, + CHAR_IMAGETYPE_CHILDGIRL, + CHAR_IMAGETYPE_MAN, + CHAR_IMAGETYPE_WOMAN, + CHAR_IMAGETYPE_OLDMAN, + CHAR_IMAGETYPE_DOG, + CHAR_IMAGETYPENUM +}CHAR_ImageType; + + +#define CHAR_P_STRING_HP ( 1 << 1 ) // 0x00000002 +#define CHAR_P_STRING_MAXHP ( 1 << 2 ) // 0x00000004 +#define CHAR_P_STRING_MP ( 1 << 3 ) // 0x00000008 +#define CHAR_P_STRING_MAXMP ( 1 << 4 ) // 0x00000010 +#define CHAR_P_STRING_VITAL ( 1 << 5 ) +#define CHAR_P_STRING_STR ( 1 << 6 ) +#define CHAR_P_STRING_TOUGH ( 1 << 7 ) +#define CHAR_P_STRING_DEX ( 1 << 8 ) +#define CHAR_P_STRING_EXP ( 1 << 9 ) +#define CHAR_P_STRING_NEXTEXP ( 1 << 10 ) +#define CHAR_P_STRING_LV ( 1 << 11 ) +#define CHAR_P_STRING_ATK ( 1 << 12 ) +#define CHAR_P_STRING_DEF ( 1 << 13 ) +#define CHAR_P_STRING_QUICK ( 1 << 14 ) +#define CHAR_P_STRING_CHARM ( 1 << 15 ) +#define CHAR_P_STRING_LUCK ( 1 << 16 ) +#define CHAR_P_STRING_EARTH ( 1 << 17 ) +#define CHAR_P_STRING_WATER ( 1 << 18 ) +#define CHAR_P_STRING_FIRE ( 1 << 19 ) +#define CHAR_P_STRING_WIND ( 1 << 20 ) +#define CHAR_P_STRING_GOLD ( 1 << 21 ) +#define CHAR_P_STRING_TITLE ( 1 << 22 ) +#define CHAR_P_STRING_DUELPOINT ( 1 << 23 ) +#define CHAR_P_STRING_TRANSMIGRATION ( 1 << 24 ) +#define CHAR_P_STRING_NAME ( 1 << 25 ) +#define CHAR_P_STRING_OWNTITLE ( 1 << 26 ) +#define CHAR_P_STRING_RIDEPET ( 1 << 27 ) // 0x08000000 +#define CHAR_P_STRING_LEARNRIDE ( 1 << 28 ) // 0x10000000 +#define CHAR_P_STRING_BASEBASEIMAGENUMBER ( 1 << 29 ) // 0x20000000 +//#define CHAR_P_STRING_PKDP ( 1 << 30 ) +//#ifdef _CHAR_PROFESSION +//#define CHAR_P_STRING_PROFESSION ( 1 << 30 ) +//#endif +#define CHAR_P_STRING_SKYWALKER ( 1 << 30 ) // 0x40000000 +#define CHAR_P_STRING_DEBUGMODE ( 1 << 31 ) // 0x80000000 + + + +#define CHAR_N_STRING_OBJINDEX ( 1 << 1 ) +#define CHAR_N_STRING_LV ( 1 << 2 ) +#define CHAR_N_STRING_MAXHP ( 1 << 3 ) +#define CHAR_N_STRING_HP ( 1 << 4 ) +#define CHAR_N_STRING_MP ( 1 << 5 ) +#define CHAR_N_STRING_NAME ( 1 << 6 ) + +#define CHAR_K_STRING_BASEIMAGENUMBER ( 1 << 1 ) +#define CHAR_K_STRING_HP ( 1 << 2 ) +#define CHAR_K_STRING_MAXHP ( 1 << 3 ) +#define CHAR_K_STRING_MP ( 1 << 4 ) +#define CHAR_K_STRING_MAXMP ( 1 << 5 ) +#define CHAR_K_STRING_EXP ( 1 << 6 ) +#define CHAR_K_STRING_NEXTEXP ( 1 << 7 ) +#define CHAR_K_STRING_LV ( 1 << 8 ) +#define CHAR_K_STRING_ATK ( 1 << 9 ) +#define CHAR_K_STRING_DEF ( 1 << 10 ) +#define CHAR_K_STRING_QUICK ( 1 << 11 ) +#define CHAR_K_STRING_AI ( 1 << 12 ) +#define CHAR_K_STRING_EARTH ( 1 << 13 ) +#define CHAR_K_STRING_WATER ( 1 << 14 ) +#define CHAR_K_STRING_FIRE ( 1 << 15 ) +#define CHAR_K_STRING_WIND ( 1 << 16 ) +#define CHAR_K_STRING_SLOT ( 1 << 17 ) +#define CHAR_K_STRING_CHANGENAMEFLG ( 1 << 18 ) +#define CHAR_K_STRING_NAME ( 1 << 19 ) +#define CHAR_K_STRING_USERPETNAME ( 1 << 20 ) + +typedef union { + int indexOfPet[CHAR_MAXPETHAVE]; + int indexOfPetskill[CHAR_MAXPETSKILLHAVE]; +}CHAR_UNIONTABLE; + +typedef struct tagChar +{ + BOOL use; + + int data[CHAR_DATAINTNUM]; + STRING128 string[CHAR_DATACHARNUM]; + char flg[(CHAR_FLGNUM%(sizeof(char)*8)) + ? (CHAR_FLGNUM/(sizeof(char)*8))+1 + : (CHAR_FLGNUM/(sizeof(char)*8))]; + int indexOfExistItems[CHAR_MAXITEMHAVE]; + int indexOfExistPoolItems[CHAR_MAXPOOLITEMHAVE]; + +#ifdef _CHAR_POOLITEM + int *indexOfExistDepotItems; +#endif +#ifdef _CHAR_POOLPET + int *indexOfExistDepotPets; +#endif + + CHAR_HaveSkill haveSkill[CHAR_SKILLMAXHAVE]; + int indexOfHaveTitle[CHAR_TITLEMAXHAVE]; + ADDRESSBOOK_entry addressBook[ADDRESSBOOK_MAX]; + CHAR_UNIONTABLE unionTable; + int indexOfPoolPet[CHAR_MAXPOOLPETHAVE]; + STRING32 charfunctable[CHAR_FUNCTABLENUM]; + int workint[CHAR_WORKDATAINTNUM]; + STRING64 workchar[CHAR_WORKDATACHARNUM]; +#ifdef _NPC_SEPARATEDATA + int *tempint; +#endif + int CharMakeSequenceNumber; + void* functable[CHAR_FUNCTABLENUM]; +#ifdef _STREET_VENDOR + StreetVendor_t StreetVendor[MAX_SELL_ITEM]; +#endif +}Char; + + +#define CHAR_CHECKINDEX( index) _CHAR_CHECKINDEX( __FILE__, __LINE__, index) +INLINE BOOL _CHAR_CHECKINDEX( char *file, int line, int index); +#define CHAR_CHECKITEMINDEX( charaindex, iindex) _CHAR_CHECKITEMINDEX( __FILE__, __LINE__, charaindex, iindex) +INLINE BOOL _CHAR_CHECKITEMINDEX( char *file, int line, int charaindex, int iindex ); +#define CHAR_CHECKPETINDEX( petindex) _CHAR_CHECKPETINDEX( __FILE__, __LINE__, petindex ) +INLINE BOOL _CHAR_CHECKPETINDEX( char *file, int line, int petindex ); +#define CHAR_CHECKPOOLPETINDEX( petindex) _CHAR_CHECKPOOLPETINDEX( __FILE__, __LINE__, petindex ) +INLINE BOOL _CHAR_CHECKPOOLPETINDEX( char *file, int line, int petindex ); +#define CHAR_CHECKPETSKILLINDEX( havepetskillindex) _CHAR_CHECKPETSKILLINDEX( __FILE__, __LINE__, havepetskillindex) +INLINE BOOL _CHAR_CHECKPETSKILLINDEX( char *file, int line, int havepetskillindex ); + +INLINE int CHAR_getInt( int index , CHAR_DATAINT element); +#define CHAR_setInt( index , element, data) _CHAR_setInt( __FILE__, __LINE__, index , element, data) +INLINE int _CHAR_setInt( char *file, int line, int index ,CHAR_DATAINT element, int data); +#ifdef _FIX_SETWORKINT +#define CHAR_getWorkInt( index , element) _CHAR_getWorkInt( __FILE__, __LINE__, index , element) +INLINE int _CHAR_getWorkInt( char *file, int line, int index ,CHAR_WORKDATAINT element); +#define CHAR_setWorkInt( index, element, data) _CHAR_setWorkInt( __FILE__, __LINE__, index , element, data) +INLINE int _CHAR_setWorkInt( char *file, int line, int index ,CHAR_WORKDATAINT element, int data); +#else +INLINE int CHAR_setWorkInt( int index ,CHAR_WORKDATAINT element, int data); +#endif +#define CHAR_getChar( index, elem) _CHAR_getChar( __FILE__, __LINE__, index, elem) +INLINE char* _CHAR_getChar( char *file, int line, int index ,CHAR_DATACHAR element ); +#define CHAR_setChar( index, elem, n) _CHAR_setChar( __FILE__, __LINE__, index, elem, n) +INLINE BOOL _CHAR_setChar( char *file, int line, int index ,CHAR_DATACHAR element, char* new ); +#define CHAR_getFlg( index, elem) _CHAR_getFlg( __FILE__, __LINE__, index, elem) +INLINE BOOL _CHAR_getFlg( char *file, int line, int index ,CHAR_DATAFLG element ); +#define CHAR_setFlg( index, elem, n) _CHAR_setFlg( __FILE__, __LINE__, index, elem, n) +INLINE char _CHAR_setFlg( char *file, int line, int index , CHAR_DATACHAR element, int newdata ); +#define CHAR_getWorkChar( index, elem) _CHAR_getWorkChar( __FILE__, __LINE__, index, elem) +INLINE char * _CHAR_getWorkChar( char *file, int line, int index, CHAR_WORKDATACHAR element ); +#define CHAR_setWorkChar( index, elem, n) _CHAR_setWorkChar( __FILE__, __LINE__, index, elem, n) +INLINE BOOL _CHAR_setWorkChar( char *file, int line, int index, CHAR_WORKDATACHAR element, char * new); + +#define CHAR_getItemIndex( index, iindex) _CHAR_getItemIndex( __FILE__, __LINE__, index, iindex) +INLINE int _CHAR_getItemIndex( char *file, int line, int charaindex, int ti); +#define CHAR_setItemIndex( index, iindex,id) _CHAR_setItemIndex( __FILE__, __LINE__, index, iindex, id) +INLINE int _CHAR_setItemIndex( char *file, int line, int index ,int iindex,int id ); +#define CHAR_getPoolItemIndex( index, iindex) _CHAR_getPoolItemIndex( __FILE__, __LINE__, index, iindex) +INLINE int _CHAR_getPoolItemIndex( char *file, int line, int index, int iindex); +#define CHAR_setPoolItemIndex( index, iindex,id) _CHAR_setPoolItemIndex( __FILE__, __LINE__, index, iindex, id) +INLINE int _CHAR_setPoolItemIndex( char *file, int line, int index ,int iindex,int id ); +INLINE BOOL CHAR_setAddressbookEntry( int index , int aindex , ADDRESSBOOK_entry *a ); +INLINE ADDRESSBOOK_entry* CHAR_getAddressbookEntry( int index , int aindex); +INLINE Char* CHAR_getCharPointer( int index ); +INLINE int CHAR_getCharNum( void ); +INLINE int CHAR_getPlayerMaxNum( void ); +INLINE int CHAR_getPetMaxNum( void ); +INLINE int CHAR_getOthersMaxNum( void ); +INLINE BOOL CHAR_getCharUse( int index ); +INLINE CHAR_HaveSkill* CHAR_getCharHaveSkill( int index,int sindex ); +INLINE int CHAR_getCharHaveTitle( int index,int tindex ); +INLINE int CHAR_setCharHaveTitle( int charaindex,int tindex, int new ); +INLINE int CHAR_getCharPet( int charaindex,int petindex ); +INLINE int CHAR_setCharPet( int charaindex,int petindex, int new ); +INLINE int CHAR_getCharPoolPet( int charaindex,int petindex ); +INLINE int CHAR_setCharPoolPet( int charaindex,int petindex, int new ); +int CHAR_getCharPetElement( int charaindex ); +int CHAR_getCharPoolPetElement( int charaindex ); +int CHAR_getCharPoolItemIndexElement( int charaindex ); +int CHAR_getEmptyCharPoolItemIndexNum( int charaindex); +#ifdef _CHAR_POOLPET +int CHAR_getCharDepotPetElement( int charaindex ); +#endif +#define CHAR_getIntPSkill( index, skillti, ti) _CHAR_getIntPSkill( __FILE__, __LINE__, index, skillti, ti) +INLINE int _CHAR_getIntPSkill( char *file, int line, int index, int skillti, SKILL_DATAINT ti); + +#define CHAR_setIntPSkill( index, skillti, ti, data) _CHAR_setIntPSkill( __FILE__, __LINE__, index, skillti, ti, data) +INLINE void _CHAR_setIntPSkill( char *file, int line, int index, int skillti, SKILL_DATAINT ti, int data); + + +extern Char *CHAR_chara; + + +INLINE int CHAR_getCharMakeSequenceNumber( int charaindex ); +void CHAR_constructFunctable( int charaindex ); +void* CHAR_getFunctionPointer( int charaindex, int functype ); +BOOL CHAR_initCharArray( int pnum, int petnum,int onum ); +BOOL CHAR_endCharArray( void ); +int CHAR_initCharOneArray( Char* ch ); +void CHAR_endCharOneArray( int index ); +void CHAR_removeHaveItem( Char* ch ); +void CHAR_endCharData( Char* ch ); +char* CHAR_makeStringFromCharData( Char* one ); +char* CHAR_makeStringFromCharIndex( int index ); +BOOL CHAR_makeCharFromStringToArg( char* data, Char* one); +int CHAR_makePetFromStringToArg( char *src, Char *ch, int ti); +char *CHAR_makePetStringFromPetIndex( int petindex); +#define CHAR_getPetSkillElement( petindex) _CHAR_getPetSkillElement( __FILE__, __LINE__, petindex) +int _CHAR_getPetSkillElement( char *file, int line, int petindex ); +#define CHAR_setPetSkill( petindex, havepetskillindex, n) _CHAR_setPetSkill( __FILE__, __LINE__, petindex, havepetskillindex, n) +INLINE int _CHAR_setPetSkill( char *file, int line, int petindex,int havepetskillindex, int new ); +#define CHAR_getPetSkill( petindex, havepetskillindex) _CHAR_getPetSkill( __FILE__, __LINE__, petindex, havepetskillindex) +INLINE int _CHAR_getPetSkill( char *file, int line, int petindex,int havepetskillindex ); +#define SETFLG(a,b,c,d,e,f,g,h) (((a)<<0)+((b)<<1)+((c)<<2)+((d)<<3)+((e)<<4)+((f)<<5)+((g)<<6)+((h)<<7)) + +INLINE int CHAR_AddMaxExp( int charaindex, int addexp); +INLINE int CHAR_setMaxExpFromLevel( int charaindex, int level); +INLINE int CHAR_setMaxExp( int charaindex, unsigned long int Setexp); +#ifdef _NEWOPEN_MAXEXP +INLINE int CHAR_ChangeExp( int charaindex ); +INLINE int CHAR_HandleExp( int charaindex ); + +#endif + +// ride Pet table +typedef struct tagtagRidePetTable +{ + int rideNo; + int charNo; + int petNo; + int petId; + +} tagRidePetTable; + + +// CoolFish: Family Member Kind 2001/8/28 +typedef enum +{ + FMMEMBER_NONE = -1, + FMMEMBER_MEMBER = 1, + FMMEMBER_APPLY, + FMMEMBER_LEADER, + FMMEMBER_ELDER, +} CHAR_FM_MEMBERKIND; + +// shan 2002/01/10 +typedef enum +{ + PET_STAT_NONE = 0, + PET_STAT_SELECT, + PET_STAT_MAIL = 4, +} CHAR_PET_STAT; + + +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 +void CHAR_earnFame(int index, int fame); +#endif + +// CoolFish: 2001/10/11 +#ifdef _UNIQUE_P_I +void CHAR_setPetUniCode(int petindex); +void ITEM_setItemUniCode(int itemindex); +void Check_P_I_UniCode(int charindex); +#endif + +// Arminius 12.15 判断是否是男士 +int IsMale(int charindex); + +// Arminius 12.15 判断是否是女士 +int IsFemale(int charindex); + + +#ifdef _NEW_RIDEPETS +#define RIDE_PET0 1 +#define RIDE_PET1 ( 1 << 1 ) +#define RIDE_PET2 ( 1 << 2 ) +#define RIDE_PET3 ( 1 << 3 ) +#define RIDE_PET4 ( 1 << 4 ) +#define RIDE_PET5 ( 1 << 5 ) +#define RIDE_PET6 ( 1 << 6 ) +#define RIDE_PET7 ( 1 << 7 ) +#define RIDE_PET8 ( 1 << 8 ) +#define RIDE_PET9 ( 1 << 9 ) +#define RIDE_PET10 ( 1 << 10 ) +#define RIDE_PET11 ( 1 << 11 ) +#define MAXNOINDEX 12 +typedef struct { + int petNo; + int learnCode; +}tagRideCodeMode; + +typedef struct { + int RideNo[MAXNOINDEX]; + int flg; +}tagRideNoList; + +typedef struct { + int charNo; + int Noindex; + int sex; +}tagRidePetList; + +int RIDEPET_getNOindex( int baseNo); +int RIDEPET_getPETindex( int PetNo, int learnCode); +int RIDEPET_getRIDEno( int index, int ti); +#endif + +#ifdef _PET_EVOLUTION +int EVOLUTION_getPetTable( int charaindex, int petindex1, int petindex2); +int EVOLUTION_getPropertyTable( int charaindex, int petindex1, int petindex2); +int EVOLUTION_getFusionTable( int charaindex, int px, int py); +int EVOLUTION_getPetFusionCode( int petid); +#endif + +#ifdef _EMENY_CHANCEMAN +int CHAR_getSexInt( int baseNo ); +#endif +#ifdef _TYPE_TOXICATION +BOOL CHAR_CanCureFlg( int charaindex, char *arg); +#endif + +#ifdef _FIX_TSKILLCAN +BOOL CHAR_PETSKILLCAN( int toindex); +#endif + +BOOL CHAR_getCharOnArrayPercentage( int mode, int *max, int *min, int *cnt); + + +#define CHAR_DelItemMess( index, ti, flg) _CHAR_DelItem( __FILE__, __LINE__, index, ti, 1, flg) +#define CHAR_DelItem( index, ti) _CHAR_DelItem( __FILE__, __LINE__, index, ti, 1, 1) +#define CHAR_DelPileItemMess( index, ti, num, flg) _CHAR_DelItem( __FILE__, __LINE__, index, ti, num, flg) + +#define CHAR_AddPileItem( index, itemindex) _CHAR_AddPileItem( __FILE__, __LINE__, index, itemindex) +INLINE int _CHAR_AddPileItem( char *file, int line, int charaindex, int itemindex); + +INLINE int _CHAR_DelItem( char *file, int line, int charaindex, int ti, int num, int flg); + +#define CHAR_AddGold( index, ti) _CHAR_AddGold( __FILE__, __LINE__, index, ti) +INLINE int _CHAR_AddGold( char *file, int line, int charaindex, int gold); +#define CHAR_DelGold( index, ti) _CHAR_DelGold( __FILE__, __LINE__, index, ti) +INLINE int _CHAR_DelGold( char *file, int line, int charaindex, int gold); +int CHAR_getMaxHaveGold( int charaindex); + + +#ifdef _CHAR_PROFESSION // WON ADD 人物职业 + +int CHAR_getCharSkill( int index,int sindex ); +int CHAR_setCharSkill( int index,int sindex,int new ); +#define CHAR_CHECK_PROFESSION_SKILLINDEX( skillindex) _CHAR_CHECK_PROFESSION_SKILLINDEX( __FILE__, __LINE__, skillindex) +INLINE BOOL _CHAR_CHECK_PROFESSION_SKILLINDEX( char *file, int line, int skillindex ); +#define PROFESSION_SKILL_getSkill( charaindex, skillindex) _PROFESSION_SKILL_getSkill( __FILE__, __LINE__, charaindex, skillindex) +INLINE int _PROFESSION_SKILL_getSkill( char *file, int line, int charaindex, int skillindex ); +#define PROFESSION_SKILL_setSkill( charaindex, skillindex, n) _PROFESSION_SKILL_setSkill( __FILE__, __LINE__, charaindex, skillindex, n) +INLINE int _PROFESSION_SKILL_setSkill( char *file, int line, int charaindex,int skillindex, int new ); +#define PROFESSION_SKILL_getSkillElement(charaindex) _PROFESSION_SKILL_getSkillElement( __FILE__, __LINE__, charaindex) +int _PROFESSION_SKILL_getSkillElement( char *file, int line, int charaindex ); + +#endif + +#ifdef _NPC_SEPARATEDATA +void CHAR_showTempInt( int index); +BOOL CHAR_InitCharTempNum( Char* ch ); +void CHAR_EndCharTempNum( void); +void CHAR_getDefaultCharTempNum( Char* ch ); +#endif + +#ifdef _CHAR_POOLITEM + +#define CHAR_getDepotItemIndex( index, iindex) _CHAR_getDepotItemIndex( __FILE__, __LINE__, index, iindex) +INLINE int _CHAR_getDepotItemIndex( char *file, int line, int index ,int iindex); +#define CHAR_setDepotItemIndex( index, iindex,id) _CHAR_setDepotItemIndex( __FILE__, __LINE__, index, iindex, id) +INLINE int _CHAR_setDepotItemIndex( char *file, int line, int index ,int iindex,int id ); + +void CHAR_removeHaveDepotItem( Char* ch); +void CHAR_removeDepotItem( int charaindex); + +char *CHAR_makeDepotItemFromCharIndex( int charaindex); +BOOL CHAR_makeDepotItemStringToChar( int charaindex, char* data); + +BOOL CHAR_SaveDepotItem( int charaindex); +BOOL CHAR_GetDepotItem( int meindex, int charaindex); +void CHAR_ShowMyDepotItems( int charaindex); + +int CHAR_findEmptyDepotItem( int charaindex); +int CHAR_getfindEmptyDepotItem( int charaindex); +BOOL CHAR_CheckDepotItem( int charaindex); +#endif + +#ifdef _CHAR_POOLPET + +#define CHAR_getDepotPetIndex( index, iindex) _CHAR_getDepotPetIndex( __FILE__, __LINE__, index, iindex) +INLINE int _CHAR_getDepotPetIndex( char *file, int line, int index ,int iindex); +#define CHAR_setDepotPetIndex( index, iindex,id) _CHAR_setDepotPetIndex( __FILE__, __LINE__, index, iindex, id) +INLINE int _CHAR_setDepotPetIndex( char *file, int line, int index ,int iindex,int id ); + +void CHAR_removeHaveDepotPet( Char* ch); +void CHAR_removeDepotPet( int charaindex); + +char *CHAR_makeDepotPetFromCharIndex( int charaindex); +BOOL CHAR_makeDepotPetStringToChar( int charaindex, char* data); + +BOOL CHAR_SaveDepotPet( int charaindex); +BOOL CHAR_GetDepotPet( int meindex, int charaindex); +void CHAR_ShowMyDepotPets( int charaindex); + +int CHAR_findEmptyDepotPet( int charaindex); +int CHAR_getfindEmptyDepotPet( int charaindex); +BOOL CHAR_CheckDepotPet( int charaindex); +#endif + + +void LodBadPetString( char *data, char *err, int ti); + +#ifdef _STREET_VENDOR +BOOL CHAR_setStreetVendor(int charindex,int index,int set,int num); +INLINE void CHAR_clearStreetVendor(int charindex,int index); +int CHAR_getStreetVendor(int charindex,int index,int set); +#endif + +#ifdef _ANGEL_SUMMON + +#define ANGELITEM 2884 //20701 //使者的信物 道具编号 +#define HEROITEM 2885 //20702 //勇者的信物 道具编号 + +typedef enum +{ + ANGEL_NONE =0, + ANGEL_ANGEL, + ANGEL_HERO, +}ANGEL_TYPE; + +typedef enum +{ + MISSION_NONE =0, + MISSION_WAIT_ANSWER, + MISSION_DOING, + MISSION_HERO_COMPLETE, + MISSION_TIMEOVER, +}ANGEL_MISSIONFLAG; +#endif + +#endif diff --git a/gmsv/include/char_data.h b/gmsv/include/char_data.h new file mode 100644 index 0000000..1085a8c --- /dev/null +++ b/gmsv/include/char_data.h @@ -0,0 +1,120 @@ +#ifndef __CHAR_DATA_H__ +#define __CHAR_DATA_H__ + +#include "item.h" +#include "char.h" + + +#define CHAR_CLASS01_PASSLV 20 + +#define BATEBAN 2 +#define FIRSTPOSITIONMAXINDEX 1 +#define ELDERINDEXSTART FIRSTPOSITIONMAXINDEX+BATEBAN+1 + +typedef struct tagLevelUpPattern +{ +#if 1 + struct Exptbl{ + int origin; + int multi; + }exptbl[3]; + int hpupminpoint; /* hp 及丐互月 斓袄*/ + int hpupmaxpoint; /* hp 及丐互月 斓袄*/ + + int needexp; /* 邰卅烦董袄 */ +#else + int uppoint[5]; +#endif +}LevelUpPattern; + +/*====================赓渝袄}伊皮伙失永皿楮溢====================*/ +BOOL CHAR_getDefaultChar( Char* nc, int imagenumber ); + +/*====================隶 } 飓 寞赘尹楮溢====================*/ +int CHAR_getNewImagenumberFromEquip( int basebaseimagenumber, + ITEM_CATEGORY category ); +/*==================== 飓 寞 侬 -> 寞楮溢====================*/ +void CHAR_initSeekGraphicNumberFromString(); +int CHAR_seekGraphicNumberFromString( char* string ); + + + +/*====================平乓仿及赓渝袄楮溢====================*/ +BOOL CHAR_getInitElderPosition( Char* ch,int hometown); +BOOL CHAR_getElderPosition( int elderindex, int* fl, int* x, int* y ); + +void CHAR_setInitValues( Char* ch ); + + +/*==================== 衬匏 楮溢====================*/ +typedef enum +{ + CHAR_INVAREA, + CHAR_CANNOTDROPAREA, + CHAR_CANNOTMAGICAREA, + CHAR_AREAKIND_NONE, +}CHAR_AREAKIND; + +BOOL CHAR_initInvinciblePlace( char* filename ); +BOOL CHAR_isCannotMagicArea( int floor , int x, int y, int magicnum ); +BOOL CHAR_initAppearPosition( char* filename ); +BOOL CHAR_isInvincibleArea( int floor , int x, int y ); +BOOL CHAR_isAppearPosition( int floor, int *x, int *y); +BOOL CHAR_isCannotDropArea( int floor , int x, int y ); + + +/* 赢 楮溢 */ +BOOL CHAR_ElderSetPosition( int elderindex ,int fl,int x ,int y); + + + +/************************************************* +酵烂伊矛伙失永皿质 +*************************************************/ + + +int GetEnemyExp( int level ); + +int CHAR_GetLevel(); +int CHAR_GetLevelExp( int charaindex, int level ); +int CHAR_GetOldLevelExp( int level); + +int CHAR_LevelUpCheck( int charaindex , int toindex); + +int CHAR_PetLevelUp( int petindex ); + +BOOL CHAR_checkFaceImageNumber( int imagenumber, int faceimagenumber); +BOOL CHAR_checkPlayerImageNumber( int imagenumber); + +int CHAR_PetTakeLevelUp( int petindex, int lv); //强制宠物升级 +int CHAR_PetTakeDrop( int petindex, int floor, int ox, int oy); //强制丢弃宠物升级 + +#ifdef _NPC_FUSION +int PETFUSION_FusionPetSub( int charaindex, int Subindex1, int Subindex2, int *work, int *skill); +BOOL PETFUSION_FusionPetMain( int charaindex, int Mainindex, int *work, int *skill); +BOOL PETFUSION_DelPet( int toindex, int Mainindex, int Subindex1, int Subindex2, int flg); +int PETFUSION_Evolution( int charaindex, int petindex); +#endif +int PETTRANS_PetTransManStatus( int toindex, int petindex1, int petindex2); +#ifdef _PET_2TRANS +int NPC_PetTransManGetAns( int total1, int total2, int LV, int rank, int tran); +#else +int NPC_PetTransManGetAns( int total1, int total2, int LV, int rank); +#endif //_PET_2TRANS + +#ifdef _CHIKULA_STONE +void CHAR_AutoChikulaStone( int charaindex, int Dflg); +#endif + +#ifdef _STATUS_WATERWORD //水世界状态 +void CHAR_CheckWaterStatus( int charaindex); +#endif + +int CHAR_findSurplusPetBox( int charaindex ); + +#ifdef _USER_EXP_CF +void setNeedLevelUpTbls(int level,int exp); +void setMaxLevel(int level); +#endif + +#endif \ No newline at end of file diff --git a/gmsv/include/char_event.h b/gmsv/include/char_event.h new file mode 100644 index 0000000..e48e1d3 --- /dev/null +++ b/gmsv/include/char_event.h @@ -0,0 +1,31 @@ +#ifndef __CHAR_EVENT_H__ +#define __CHAR_EVENT_H__ + +#include "char_base.h" + +void CHAR_allpostwalk( int index ); +BOOL CHAR_allprewalk( int index,int* dir,int* mode); + +void CHAR_recoveryStatus( int charaindex ); +void CHAR_loopFunc( int index ); +void CHAR_playerWatchfunc( int meindex, int moveindex, CHAR_ACTION act, + int x, int y, int dir, int* opt, int optlen ); + +void CHAR_sendWallDamage( int charaindex,int x, int y, int damage ); +void CHAR_playerresurrect( int charaindex, int hp ); + +int CHAR_die( int charaindex ); +void CHAR_playerTalkedfunc( int charaindex, int talkindex,char* message, + int color, int channel ); + +void CHAR_recoveryStatus( int charaindex ); +BOOL CHAR_makeCADefaultString( int objindex,char* buf,int buflen, int act ); +BOOL CHAR_makeCAOPT1String( int objindex,char* buf, + int buflen, int act,int opt1 ); +BOOL CHAR_makeCAOPT3String( int objindex,char* buf, + int buflen, int act,int opt1,int opt2,int opt3 ); +#ifdef _STREET_VENDOR +BOOL CHAR_makeCAOPTString(int objindex,char* buf,int buflen,int act,char *string); +#endif + +#endif diff --git a/gmsv/include/char_talk.h b/gmsv/include/char_talk.h new file mode 100644 index 0000000..bd51d58 --- /dev/null +++ b/gmsv/include/char_talk.h @@ -0,0 +1,24 @@ +#ifndef __CHAR_TALK_H__ +#define __CHAR_TALK_H__ + +#include "common.h" +#include "util.h" +#include "net.h" + + +void CHAR_getMessageBody(char* message, char* kind, int kindlen, + char** body); + +#ifdef _GM_SIGUSR2 + typedef void (*CHATMAGICFUNC2)(int,char*);//功能相同typedef void (*CHATMAGICFUNC)(int,char*); + CHATMAGICFUNC2 gm_CHAR_getChatMagicFuncPointer(char* name,BOOL isDebug); +#endif + +int CHAR_getChatMagicFuncLevel(char* name,BOOL isDebug); +int CHAR_getChatMagicFuncNameAndString( int ti, char* name, char *usestring, int level, BOOL isDebug); +int CHAR_getChatMagicFuncMaxNum( void); + +void OneByOneTkChannel ( int fd , char *tmp1 , char *tmp2 , int color) ; + + +#endif diff --git a/gmsv/include/chatmagic.h b/gmsv/include/chatmagic.h new file mode 100644 index 0000000..36a384c --- /dev/null +++ b/gmsv/include/chatmagic.h @@ -0,0 +1,256 @@ +#ifndef __CHATMAGIC_H__ +#define __CHATMAGIC_H__ +#include "version.h" + +void CHAR_CHAT_DEBUG_hp( int charindex , char *message ); +void CHAR_CHAT_DEBUG_mp( int charindex , char *message ); +void CHAR_CHAT_DEBUG_setmp( int charindex , char *message ); +void CHAR_CHAT_DEBUG_str( int charindex , char *message ); +void CHAR_CHAT_DEBUG_dex( int charindex , char *message ); +void CHAR_CHAT_DEBUG_tgh( int charindex , char *message ); +void CHAR_CHAT_DEBUG_vital( int charindex , char *message ); +void CHAR_CHAT_DEBUG_luck( int charindex , char *message ); +void CHAR_CHAT_DEBUG_gold( int charindex , char *message ); +void CHAR_CHAT_DEBUG_additem( int charindex , char *message ); +void CHAR_CHAT_DEBUG_metamo( int charindex , char *message ); +void CHAR_CHAT_DEBUG_warp( int charindex , char *message ); +void CHAR_CHAT_DEBUG_info( int charindex , char *message ); +void CHAR_CHAT_DEBUG_sysinfo( int charindex , char *message ); +void CHAR_CHAT_DEBUG_announce(int charindex , char *message ); +void CHAR_CHAT_DEBUG_level( int charaindex, char* message ); +void CHAR_CHAT_DEBUG_delitem( int charindex , char *message ); +void CHAR_CHAT_DEBUG_superman( int charaindex, char* message ); +void CHAR_CHAT_DEBUG_battlein( int charaindex, char* message ); +void CHAR_CHAT_DEBUG_battleout( int charaindex, char* message ); +void CHAR_CHAT_DEBUG_petmake( int charaindex, char* message ); +void CHAR_CHAT_DEBUG_enemyrestart( int charaindex, char* message ); +void CHAR_CHAT_DEBUG_s_gb( int charaindex, char* message ); +void CHAR_CHAT_DEBUG_s_gu( int charaindex, char* message ); +void CHAR_CHAT_DEBUG_s_tame( int charaindex, char* message ); +void CHAR_CHAT_DEBUG_fieldatt( int charaindex, char* message ); +void CHAR_CHAT_DEBUG_s_ren( int charaindex, char* message ); +void CHAR_CHAT_DEBUG_s_geki( int charaindex, char* message ); +void CHAR_CHAT_DEBUG_s_hai( int charaindex, char* message ); +void CHAR_CHAT_DEBUG_j_state( int charaindex, char* message ); +void CHAR_CHAT_DEBUG_battlewatch( int charaindex, char* message ); +void CHAR_CHAT_DEBUG_eventclean( int charaindex, char* message ); +void CHAR_CHAT_DEBUG_eventsetend( int charaindex, char* message ); +void CHAR_CHAT_DEBUG_eventsetnow( int charaindex, char* message ); +void CHAR_CHAT_DEBUG_debug( int charaindex, char* message ); +void CHAR_CHAT_DEBUG_exp( int charindex , char *message ); +void CHAR_CHAT_DEBUG_dp( int charindex , char *message ); +void CHAR_CHAT_DEBUG_setTrans( int charaindex, char *message); +void CHAR_CHAT_DEBUG_getuser(int charindex ,char *message);//ttom +1 14/11/2000 +void CHAR_CHAT_DEBUG_shutup(int charindex ,char *message);//ttom 22/11/2000 +void CHAR_CHAT_DEBUG_waeikick( int charindex, char* message );//ttom 12/02/2000 +void CHAR_CHAT_DEBUG_effect( int charaindex, char* message ); +void CHAR_CHAT_DEBUG_jail( int charindex, char* message );//ttom 01/11/2001 +void CHAR_CHAT_DEBUG_shutupall(int charindex ,char *message);//ttom 02/01/2001 +void CHAR_CHAT_DEBUG_send(int charindex ,char *message);//ttom 02/01/2001 +void CHAR_CHAT_DEBUG_noenemy(int charaindex, char *message); +void CHAR_CHAT_DEBUG_loginannounce(int charaindex, char* message); // Arminius 7.12 login announce +void CHAR_CHAT_DEBUG_deletepet(int charaindex, char* message); // Robin 0720 +void CHAR_CHAT_DEBUG_deleteitem(int charaindex, char* message); // Robin 0720 +void CHAR_CHAT_DEBUG_checklock(int charaindex, char* message); // Arminius 7.25 +void CHAR_CHAT_DEBUG_unlock(int charaindex, char* message); +void CHAR_CHAT_DEBUG_unlockserver(int charaindex, char* message); +void CHAR_CHAT_DEBUG_fixfmdata(int charaindex, char* message); // CoolFish: GM Family 2001/7/31 +void CHAR_CHAT_DEBUG_shutdown(int charaindex, char* message); // Robin 1008 +void CHAR_CHAT_DEBUG_manorpk(int charaindex, char *message); + +void CHAR_CHAT_DEBUG_watchevent( int charaindex, char* message ); +void CHAR_CHAT_DEBUG_fixfmpk(int charaindex, char *message); +void CHAR_CHAT_DEBUG_reloadmsip( int charaindex, char *message); +void CHAR_CHAT_DEBUG_cleanfreepet(int charaindex, char *message); +void CHAR_CHAT_DEBUG_engineer( int charindex, char *message); +void CHAR_CHAT_DEBUG_waeikickall( int charindex, char* message ); +void CHAR_CHAT_DEBUG_remserver( int charaindex, char *message ); +void CHAR_CHAT_DEBUG_showMem(int charaindex, char *message); +void CHAR_CHAT_DEBUG_playerspread( int charaindex, char *message); +void CHAR_CHAT_DEBUG_reset( int charaindex, char* message ); + +#ifdef _GMRELOAD +void CHAR_CHAT_DEBUG_gmreload(int charaindex, char *message); +#endif +#ifdef _CHAR_PROFESSION // WON ADD 人物职业 +void CHAR_CHAT_DEBUG_addsk( int charaindex, char *message ); +void CHAR_CHAT_DEBUG_delsk( int charaindex, char *message ); +#endif +#ifdef _TEST_PETCREATE +void CHAR_CHAT_DEBUG_createpet( int charaindex, char *message ); +void TEST_CreatPet( ); +#endif +void CHAR_CHAT_DEBUG_cleanfloor( int charaindex, char *message); + +#ifdef _GAMBLE_BANK +void CHAR_CHAT_DEBUG_setgamblenum( int charaindex, char *message ); +#endif +#ifdef _WAEI_KICK +void CHAR_CHAT_DEBUG_gmkick( int charindex, char* message); +#endif +// WON ADD 修正族长问题 +void CHAR_CHAT_DEBUG_fixfmleader(int charaindex, char *message); + +// WON ADD 当机指令 +void CHAR_CHAT_DEBUG_crash(int charaindex, char *message); + +#ifdef _PETSKILL_SETDUCK +void CHAR_CHAT_DEBUG_SetDuck( int charaindex, char *message); +#endif +#ifdef _TYPE_TOXICATION +void CHAR_CHAT_DEBUG_Toxication( int charaindex, char *message); +#endif +#ifdef _ACTION_BULLSCR +void CHAR_CHAT_DEBUG_setascore(int charindex, char *message); +void CHAR_CHAT_DEBUG_getascore(int charindex, char *message); +#endif +#ifdef _NEW_PLAYERGOLD +void CHAR_CHAT_DEBUG_acnewplayer(int charaindex, char *message); +void CHAR_CHAT_DEBUG_loadnewplayer( int charaindex, char*message ); +#endif +#ifdef _SEND_EFFECT // WON ADD AC送下雪、下雨等特效 +void CHAR_CHAT_DEBUG_sendeffect(int charaindex, char *message); +#endif +#ifdef _TEST_DROPITEMS +void CHAR_CHAT_DEBUG_dropmypet( int charindex, char *message ); +void CHAR_CHAT_DEBUG_dropmyitem( int charindex , char *message ); +#endif + +#ifdef _ACTION_GMQUE +void CHAR_CHAT_DEBUG_cleanqute( int charaindex, char *message); +#endif + +#ifdef _CHAR_PROFESSION // WON ADD 人物职业 +void CHAR_CHAT_DEBUG_show_profession( int charaindex, char*message ); +void CHAR_CHAT_DEBUG_set_regist( int charaindex, char*message ); +#endif + +void CHAR_CHAT_DEBUG_checktrade( int charaindex, char*message); + +void CHAR_CHAT_DEBUG_checktime( int charaindex, char *message); +void CHAR_CHAT_DEBUG_samecode( int charaindex, char *message); +void CHAR_CHAT_DEBUG_silent(int charindex ,char *message); +void CHAR_CHAT_DEBUG_help( int charindex, char *message); +#ifdef _EQUIT_ARRANGE +void CHAR_CHAT_DEBUG_arrange( int charindex , char *message ); +#endif + +#ifdef _EQUIT_SEQUENCE +void CHAR_CHAT_DEBUG_sequence( int charindex , char *message ); +#endif + +#ifdef _GM_IDENTIFY +void CHAR_CHAR_DEBUG_gmidentify( int charindex , char *message ); +#endif + +void CHAR_CHAT_DEBUG_showtemp( int charaindex, char*message ); + +#ifdef _EQUIT_NEGLECTGUARD +void CHAR_CHAT_DEBUG_setneguard( int charaindex, char* message ); +#endif + +#ifdef _DEATH_CONTEND +void CHAR_CHAT_DEBUG_updatepklist( int charaindex, char* message ); +#endif + +void CHAR_CHAT_DEBUG_petlevelup( int charaindex, char* message ); +void CHAR_CHAT_DEBUG_petexpup( int charaindex, char* message ); + +void CHAR_CHAT_DEBUG_reloadpkteamlist( int charaindex, char *message); +void CHAR_CHAT_DEBUG_setBattle( int charaindex, char *message ); + + +#ifdef _CHAR_POOLITEM +void CHAR_CHAT_DEBUG_saveditem(int charaindex, char *message); +void CHAR_CHAT_DEBUG_insertditem(int charaindex, char *message); +void CHAR_CHAT_DEBUG_ShowMyDepotItems( int charaindex, char *message ); +void CHAR_CHAT_DEBUG_InSideMyDepotItems( int charaindex, char *message ); +#endif + +#ifdef _CHAR_POOLPET +void CHAR_CHAT_DEBUG_savedpet(int charaindex, char *message); +void CHAR_CHAT_DEBUG_insertdpet(int charaindex, char *message); +void CHAR_CHAT_DEBUG_ShowMyDepotPets( int charaindex, char *message ); +void CHAR_CHAT_DEBUG_InSideMyDepotPets( int charaindex, char *message ); +#endif + +#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令 +void CHAR_CHAR_DEBUG_reloadfm( int charaindex, char* message ); +void CHAR_CHAR_DEBUG_fmpk( int charaindex, char* message ); +void CHAR_CHAR_DEBUG_fmpk_clean( int charaindex, char* message ); +#endif + +#ifdef _NEW_MANOR_LAW +void CHAR_CHAT_DEBUG_set_momentum( int charaindex, char* message ); +void CHAR_CHAT_DEBUG_set_manor_owner( int charindex, char* message ); +void CHAR_CHAT_DEBUG_set_schedule_time( int charindex, char* message ); +#endif + +#ifdef _ANGEL_SUMMON +void CHAR_CHAT_DEBUG_angelinfo(int charindex ,char *message); +void CHAR_CHAT_DEBUG_angelclean(int charindex ,char *message); +void CHAR_CHAT_DEBUG_angelcreate(int charindex ,char *message); +void CHAR_CHAT_DEBUG_missionreload(int charindex ,char *message); +#endif + +void CHAR_CHAT_DEBUG_itemreload(int charindex ,char *message); + +void CHAR_CHAT_DEBUG_skywalker(int charaindex ,char *message); + +#ifdef _ITEM_ADDEXP +void CHAR_CHAT_DEBUG_itemaddexp(int charaindex ,char *message); +#endif + +#ifdef _DEF_FMFREETIME +void CHAR_CHAT_DEBUG_fmfreetime(int charaindex,char *message); +#endif + +#ifdef _DEF_GETYOU +void CHAR_CHAT_DEBUG_getyou(int charaindex,char *message); +#endif + +#ifdef _DEF_NEWSEND +void CHAR_CHAT_DEBUG_newsend(int charindex ,char *message); +#endif + +#ifdef _DEF_SUPERSEND +void CHAR_CHAT_DEBUG_supersend(int charindex ,char *message); +#endif + +#ifdef _FONT_SIZE +void CHAR_CHAT_DEBUG_fsize(int charindex ,char *message); +#endif + +#ifdef _JOBDAILY +void CHAR_CHAT_DEBUG_rejobdaily(int charindex ,char *message); +#endif + +#ifdef _RACEMAN +void CHAR_CHAT_DEBUG_changeask(int charindex ,char *message); +#endif + +#ifdef _CREATE_MM_1_2 +void CHAR_CHAT_DEBUG_MM(int charaindex , char *message ); +#endif + +#ifdef _SendTo +void CHAR_CHAT_DEBUG_Sendto( int charaindex , char *message ); +#endif + +void CHAR_CHAT_printcount( int charaindex, char* message ); + +#ifdef _GM_ITEM +void CHAR_CHAT_DEBUG_GMFUNCTION( int charindex , char *message ); +#endif + +#ifdef _GM_RIDE +void CHAR_CHAT_DEBUG_SETRIDE( int charindex , char *message ); +void CHAR_CHAT_DEBUG_MVRIDE( int charindex , char *message ); +#endif + +#ifdef _LOCK_IP +void CHAR_CHAT_DEBUG_LOCK_IP( int charindex , char *message ); +void CHAR_CHAT_DEBUG_DISPLAY_LOCK_IP( int charindex , char *message ); +#endif + +#endif \ No newline at end of file diff --git a/gmsv/include/chatroom.h b/gmsv/include/chatroom.h new file mode 100644 index 0000000..b2ecc65 --- /dev/null +++ b/gmsv/include/chatroom.h @@ -0,0 +1,57 @@ +#ifndef __CHATROOM_H__ +#define __CHATROOM_H__ +#include "version.h" + +#define MAX_CHATROOM 10 +#define MAX_PPLINROOM 100 + +#ifdef _UNIVERSE_CHATROOM + +typedef struct _tagChatRoomCharaList{ + char cdkey[256]; + char name[256]; + char own[256]; + int fd; + int use; +}CRCharaList; + +typedef struct _tagUniChatRoom +{ + int use; + int charanum; + int masindex; + int masfd; + CRCharaList charalist[MAX_PPLINROOM]; + char chatname[32]; +}UniChatRoomlist; + +void resetChat_users( int chat, int ti); +void InitChatRoom( void ); +void ChatRoom_List ( int fd ); +int ChatRoom_getfree( void); +void saac_ChatRoom_recvall ( int fd , char *result, char *data, int charaindex, int clifdid); +void ChatRoom_Leave( int charaindex); +void ChatRoom_Destroy ( char *data); +void ChatRoom_recvall( int fd, char *data); +void CHATROOM_getChatRoomList( void); + +#else + +void InitChatRoom ( void ) ; +void ChatRoom_List ( int fd ); +BOOL ChatCheck_BeMaster( int myindex, int chatnum); +BOOL ChatCheck_Free( int myindex); +BOOL ChatRoom_Create ( int myindex , char *message); +BOOL ChatRoom_Destroy ( int myindex ) ; +void ChatRoom_Kick ( int myindex , int toindex ) ; +void ChatRoom_Make ( int myindex , int toindex ) ; +void ChatRoom_Leave ( int myindex ) ; +void ChatRoom_Join ( int myindex , int num ) ; +void ChatRoom_Agree ( int myindex , int toindex , int YesNo ) ; +void ChatRoom_Message ( int myindex , char *message ) ; +void ChatRoom_Refresh ( int Num ) ; +void ChatRoom_recvall ( int fd , char *data ) ; + +#endif + +#endif diff --git a/gmsv/include/common.h b/gmsv/include/common.h new file mode 100644 index 0000000..7a9725d --- /dev/null +++ b/gmsv/include/common.h @@ -0,0 +1,65 @@ +#ifndef __COMMON_H__ +#define __COMMON_H__ + +#include +#include + +/* MACROS */ +#define RETURNFALSEIFFALSE(x) if(!x)return FALSE; +#define EXITWITHEXITCODEIFFALSE(x,code) if(!x)exit(code); +#ifdef __GNUC__ +#define print(format,arg...) fprintf( stderr, format ,##arg) +#define fprint(format,arg...) fprintf( stderr, "%s:%d " format , __FILE__ , __LINE__ , ##arg) +#endif +#define debug(x,y) fprintf( stderr, #x " = %" #y "\n" , x) +#define arraysizeof( x ) (sizeof(x)/sizeof(x[0])) + +#define errorprint {extern int errno;fprint( "%s\n" ,strerror(errno));} + +#define BACKSLASH '\\' +#define NEWLINE '\n' +#define TAB '\t' +#define SPACE ' ' + +/*绁ㄥ強 define 鏂规洶鍏滆潏鍗炲厑鏈 */ +/*#define min( x,y ) ((x)>(y)?(y):(x)) + #define max( x,y ) ((x)>(y)?(x):(y))*/ +#define min( x,y ) ({typeof(x) __x=(x),__y=(y);(__x < __y) ? __x : __y; }) +#define max( x,y ) ({typeof(x) __x=(x),__y=(y);(__x < __y) ? __y : __x; }) +#define swap( x,y )({typeof(x) __x=(y);(y)=(x);(x)=__x;}) +#define SUCCESSFUL "successful" +#define FAILED "failed" + +#ifdef _BAD_PLAYER // WON ADD 閫佸潖鐜╁鍘诲叧 +#define BADPLAYER "badplayer" +#endif + +#define LOCK 1 +#define UNLOCK 0 + +#define STRINGBUFSIZ 4096 + +#define OPEN {FILE* f;f=fopen("a.txt","a"); +#define CLOSE fclose(f);} + +#define time_diff_us(new,old) ((unsigned)( (new.tv_sec - old.tv_sec)*1000000 + ( new.tv_usec - old.tv_usec ) )) + + + + +extern int snprintf (char* , size_t, const char* , ...) +#ifdef __GNUC__ + __attribute__ ((format (printf,3,4))); +#else + ; +#endif + +#define ON 1 +#define OFF 0 +#define BOOL int +#define FALSE 0 +#define TRUE 1 +#define INLINE inline +#define USE_MTIO 0 + +#endif diff --git a/gmsv/include/configfile.h b/gmsv/include/configfile.h new file mode 100644 index 0000000..a5e9ea4 --- /dev/null +++ b/gmsv/include/configfile.h @@ -0,0 +1,276 @@ +#ifndef __CONFIGFILE_H__ +#define __CONFIGFILE_H__ + +#include "common.h" + +#undef EXTERN +#ifdef __CONFIGFILE_C__ +#define EXTERN +#else /* __CONFIGFILE_C__ */ +#define EXTERN extern +#endif /* __CONFIGFILE_C__ */ + +// Arminius 7.12 login announce +extern char announcetext[8192]; +void AnnounceToPlayer(int charaindex); +// Robin 0720 +void AnnounceToPlayerWN(int fd); +void LoadAnnounce(void); + +#ifdef _PET_TALKPRO + #define PETTALK_MAXID 8 + typedef struct { + int ID; + char DATA[10240*10]; //1M + }PTALK; + extern PTALK pettalktext[PETTALK_MAXID]; + void LoadPetTalk(void); +#else + +extern char pettalktext[4096]; +void LoadPetTalk(void); +#endif + +#ifdef _GAMBLE_BANK +#define GAMBLEBANK_ITEMSMAX 100 +#define DEFEND_ITEMSMAX 40 +typedef struct REGAMBLEBANKITEMS { + char name[128]; + int Gnum; + int ItemId; + int type; +}GAMBLEBANK_ITEMS; + +extern GAMBLEBANK_ITEMS GB_ITEMS[GAMBLEBANK_ITEMSMAX]; + +void Load_GambleBankItems( void); +#endif + +#ifdef _CFREE_petskill +#define PETSKILL_CODE 300 +typedef struct REPETSKILL_CODES { + char name[128]; + int TempNo; + int PetId; + char Code[256]; +}PETSKILL_CODES; + +extern PETSKILL_CODES Code_skill[PETSKILL_CODE]; +void Load_PetSkillCodes( void); +#endif + +#ifdef _BLACK_MARKET +struct BlackMarketItem { + char iName[128]; + int iGraphicsNum; + int iId[4][3]; + int iCondition[4]; + int GCondition; +}; +#define BMIMAX 1000 +struct BlackMarketItem BMItem[BMIMAX]; +int BMINum; +int BMSellList[12]; +#endif + +#ifdef _GMRELOAD +#define GMMAXNUM 100 +struct GMINFO +{ + char cdkey[24]; + int level; +}; +extern struct GMINFO gminfo[GMMAXNUM]; +#endif + +BOOL readconfigfile( char* filename ); + +void defaultConfig( char* argv0 ); +char* getProgname( void ); +char* getConfigfilename( void ); +void setConfigfilename( char* newv ); + +unsigned int getDebuglevel( void ); +unsigned int setDebuglevel( unsigned int newv ); +unsigned int getMemoryunit( void ); +unsigned int getMemoryunitnum( void ); +char* getAccountservername( void ); +unsigned short getAccountserverport( void ); +char* getAccountserverpasswd( void ); +char* getGameservername( void ); + +#ifdef _M_SERVER +char* getmservername(void); +void setmservername( char *msname); +unsigned int getmserverport(void); +void setmserverport( int port); +#endif + +#ifdef _NPCSERVER_NEW +char *getnpcserveraddr(void); +unsigned int getnpcserverport(void); +void NS_setAddressAndPort( char *address, int nport); +#endif + +unsigned short getPortnumber( void ); + +int getServernumber( void ); +int getReuseaddr( void ); +int getNodelay( void ); +int getLogWriteTime(void); +int getLogIOTime( void); +int getLogGameTime(void); +int getLogNetloopFaster(void); +int getSaacwritenum( void ); +void setSaacwritenum( int num ); +int getSaacreadnum( void ); +void setSaacreadnum( int num ); + +unsigned int getFdnum( void ); +unsigned int getPetcharnum( void ); +unsigned int getOtherscharnum( void ); +unsigned int getObjnum( void ); +unsigned int getItemnum( void ); +unsigned int getBattlenum( void ); + +char* getTopdir( void ); +char* getMapdir( void ); +char* getMaptilefile( void ); +char* getBattleMapfile( void ); +char* getItemfile( void ); +char* getInvfile( void ); +char* getAppearfile( void ); +char* getEffectfile( void ); +char* getTitleNamefile( void ); +char* getTitleConfigfile( void ); +char* getLsgenlogfilename( void ); +char* getStoredir( void ); +#ifdef _STORECHAR +char* getStorechar( void ); +#endif +char* getNpcdir( void ); +char* getLogdir( void ); +char* getLogconffile( void ); +char* getChatMagicPasswd( void ); +unsigned int getChatMagicCDKeyCheck( void ); + + +unsigned int getFilesearchnum( void ); +unsigned int getNpctemplatenum( void ); +unsigned int getNpccreatenum( void ); +unsigned int getWalksendinterval( void ); +void setWalksendinterval( unsigned int ); +unsigned int getCAsendinterval_ms( void ); +void setCAsendinterval_ms( unsigned int ); +unsigned int getCDsendinterval_ms( void ); +void setCDsendinterval_ms( unsigned int ); +unsigned int getOnelooptime_ms( void ); +void setOnelooptime_ms( unsigned int ); +unsigned int getCharSavesendinterval( void ); +void setCharSavesendinterval( unsigned int interval); +unsigned int getAddressbookoffmsgnum( void ); +unsigned int getProtocolreadfrequency( void ); +unsigned int getAllowerrornum( void ); +unsigned int getLogHour( void ); +unsigned int getBattleDebugMsg( void ); +void setBattleDebugMsg( unsigned int ); + +char* getEncountfile( void ); +char* getEnemyfile( void ); +char* getGroupfile( void ); +char* getEnemyBasefile( void ); +char* getMagicfile( void ); +#ifdef __ATTACK_MAGIC + +char* getAttMagicfileName( void ); + +#endif + +char* getPetskillfile( void ); +char *getItematomfile( void ); +char *getQuizfile( void ); + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 +char* getProfession( void ); +#endif + +unsigned int getPetdeletetime( void ); +void setPetdeletetime( unsigned int interval ); + +unsigned int getItemdeletetime( void ); +void setItemdeletetime( unsigned int interval ); +//ttom add this because the second have this function +//unsigned int getAcwriteSize( void ); + +#ifdef _DEL_DROP_GOLD +unsigned int getGolddeletetime( void ); +void setGolddeletetime( unsigned int interval ); +#endif + +unsigned int setEncodeKey( void ); +unsigned int setAcWBSize( void ); +//ttom end + +// CoolFish: +2 2001/4/18 +unsigned int getAcwriteSize( void ); +unsigned int getErrUserDownFlg( void ); + +// Arminius 7.24 manor pk +char* getGameserverID( void ); +unsigned short getAllowManorPK( void ); + +// Terry 2001/10/03 service ap +char* getApID(void); +unsigned short getApPort(void); +int getLoopTime(void); +int getEnableService(void); + +#ifdef _GMRELOAD +char* getGMSetfile(void); +BOOL LoadGMSet(char *filename); +#endif + +#ifdef _ITEM_QUITPARTY +char* getitemquitparty( void ); +#endif +#ifdef _BLACK_MARKET +char* getBMItemFile(void); +BOOL LoadBMItem( char* filename ); +#endif + +#ifdef _AUCTIONEER +char* getAuctiondir(void); +#endif + +#ifdef _MUSEUM +int getMuseum(void); +#endif + +#endif + +#ifdef _NEW_PLAYER_CF +int getNewplayertrans( void ); +int getNewplayerlv( void ); +int getNewplayergivepet( unsigned int index ); +void setNewplayergivepet( unsigned int index ,unsigned int interval); +int getNewplayerpetlv( void ); +unsigned int getNewplayergivegold( void ); +#endif + +#ifdef _USER_EXP_CF +BOOL LoadEXP( char* filename ); +char* getEXPfile( void ); +int getNeedLevelUpTbls( int level ); +int getMaxLevel( void ); +int getYBLevel( void ); +#endif + +#ifdef _LOCK_IP +char* getLockipPath( void ); +int loadLockip( char* filename ); +int saveLockip( void ); +int getMaxLockip( void ); +int cmpLockip( int index, int a, int b, int c, int d, int login ); +int addLockip( int a, int b ,int c ,int d, int locktime ); +char *dispalyLockip( int index ); +#endif diff --git a/gmsv/include/correct_bug.h b/gmsv/include/correct_bug.h new file mode 100644 index 0000000..8c50976 --- /dev/null +++ b/gmsv/include/correct_bug.h @@ -0,0 +1,31 @@ +#ifndef __CORRECT_BUG_H__ +#define __CORRECT_BUG_H__ + +/* ---------------------- (未开放区) ---------------------------*/ +//#define _NO_WARP // 阻档进入英雄岛不限等及随意进出入四大村庄 code:建军 (不可开放) +//#define _FAMILYBANKSTONELOG // Syu ADD 新增家族银行存取Log (SAAC的要一起开) +#define _kr_ip // WON ADD 不锁gm指令ip +//#define _WON_TEST // WON TEST +//#define _CHANGEITEMUSE // Syu ADD 调整战斗中使用料理设定 +/* ----------------------- (待测区) ---------------------------*/ +//#define _CRASHSTOREPETMAIL // Syu ADD 修正宠物邮件 +//#define _SYUTESTBATTLE // Syu ADD + +/* ----------------------- (开放区) ---------------------------*/ +#define _add_item_log_name // WON ADD 在item的log中增加item名称 +#define _PETSKILLBUG // Syu ADD 修正宠物问题 +#define _FIXWOLF // Syu ADD 修正狼人变身Bug +#define _FIXMAGICBUG // Syu ADD 修正魔法熟练、抗性暴掉问题 +#define _FIXPETFALL // Syu ADD 修正落马术 +#define _FIX_ITEMRELIFE // WON ADD 修正替身娃娃问题 +#define _FIX_SPEED_UPLEVEL // WON ADD 修正加速 +#define _FIX_PETMAIL // WON ADD 修正宠邮 +#define _FIX_EQUIP_ITEM // WON ADD 修正道具需重新装备 +#define _ADD_PETMAIL_NUM // WON ADD 宠邮数量GM指令 +#define _FIX_equipNoenemy // WON ADD 修正太阳神首饰 +#define _FIX_PETMAIL2 // WON ADD 修正宠邮2 +#define _FIXITEMANISHOW // Syu ADD 修正回合性补血装备道具骑宠时宠物不显示动画问题 +#define _FIX_GP_PET_SKILL // WON ADD 修正gp宠会落马术 + + +#endif diff --git a/gmsv/include/deathcontend.h b/gmsv/include/deathcontend.h new file mode 100644 index 0000000..672b024 --- /dev/null +++ b/gmsv/include/deathcontend.h @@ -0,0 +1,192 @@ +#include "version.h" + +#ifdef _DEATH_CONTEND + +//团队人物名单 +typedef struct +{ + int use; + char cdkey[64]; + char name[64]; +}PkTeamMans; +//战斗纪录 +typedef struct +{ + int use; + int teamnum; + int flg; //0 1 +}BattleHistorys; + +#define MAXTEAMMANNUM 5 //队伍最高人数 +#define MAXBATTLENUM 100 //队伍最高战斗纪录 +#define MAXTEAMNUM 1000 + +#define DEFMAXBATTLENUM 50 //最高决斗场次 +#define DEFWINSCORE 90 +#define DEFLOSERATE 0.4 +//决斗参赛队伍info +typedef struct _tagPkTeamLists +{ + int use; //flg + int teamnum; //队伍序号 + char teamname[64]; //队伍名称 + char pathdir[64]; //队伍资料目录 + char leadercdkey[64]; //队长CDKEY + int win; //胜 + int lost; //负 + int battleplay; //总场次 + int score; + int inside; //录取旗标 + int read; + PkTeamMans MyTeamMans[MAXTEAMMANNUM]; + BattleHistorys BHistory[MAXBATTLENUM]; +}PkTeamLists; + +#define MAXJOINTEAM 40 +#define MAXWATCHMAP 16 +typedef struct +{ + int use; + int teamnum; + char cdkey[256]; + char name[256]; + int toindex; + int fd; +}JoinTeamList; + +typedef struct _tagPKProcedureRow +{ + int use; + int time; + int type; + JoinTeamList Team[2]; +}PKProcedures; + +enum{ + PKTYPE_NONE=0, //无 + PKTYPE_WAIT, //等待其他队伍加入 + PKTYPE_STANDBY, //准备对战等待时间 + PKTYPE_PK, //对战中 +}; + +void del_rn( char *s ); +void PKLIST_ResetOneTeamMan( int ti ); //重置队员名单 +void PKLIST_ResetOneBHistory( int ti ); //重置对战名单 +void PKLIST_ResetOnePkTeamList( int ti ); //重置参赛队伍资料 +int PKLIST_InitPkTeamList( int teamnum ); //重置 + +int PKLIST_GetPkTeamListArray( int teamnum, char *cdkey); +int PKLIST_GetPkTeamListArrayFromNum( int teamnum); +//确认重复约战 +BOOL PKLIST_CHECKPkTeamSame( int teamnum, int charaindex, char *cdkey, int toteamnum ); +//确认对战场数 +int PKLIST_CHECKPkTeamNew( int teamnum, int charaindex, char *cdkey ); + +//LOAD DATA +BOOL PKLIST_LoadPkTeamListDataSub( int ti, char *data); +BOOL PKLIST_LoadPkTeamListDataMyTeamMans( int ti, char *data); +BOOL PKLIST_LoadPkTeamListDataBHistory( int ti, char *data); +//BOOL PKLIST_LoadPkTeamListData( char *data); //处理ac送来的 pklist +BOOL PKLIST_LoadPkTeamListData(void); // 改成读档 +void PKLIST_SavePkTeamListData(void); +void PKLIST_LoadInitPkTeamListData(void); // 读取最原始的参赛名单 +void PKLIST_UpData(char *mycdkey,char *tocdkey,int menum,int tonum,int winer,int flg); +int PKLIST_GetOneBHistory( int ti ); +int PKLIST_SetOneBHistory( int ti, int hi, int use, int teamnum, int flg ); +int PKLIST_UpdateOnePkTeamData( int ti, int forti, int winerflg); + +void PKLIST_InsertTeamNum( int charaindex ); +BOOL PKLIST_GetTeamLeaderCdkey( int teamnum, char *buf); +void PKLIST_ShowPkListTeamData( void); + +int NPC_PKLIST_Finish_Exit( int menum, int tonum, int winside, int battlemap); + + +BOOL PKLIST_HandleChartsMess( int fd, char *data, int type, int flg); +BOOL PKLIST_GetChartsListData( int ti, char *data, int sizes ); +BOOL PKLIST_GetMyPKListTeamData( int teamnum, char *data, int sizes ); + + +/* +BOOL PKLIST_CheckPKSameTeam( int charaindex ); +BOOL PKLIST_JoinPKProcedures( int charaindex ); +void PKLIST_DelPKProcedures( int ti, int side ); +void PKLIST_CheckPKProcedures( void ); + +void PKLIST_CheckPKProcedures_PKTYPEWAIT( int ti); +void PKLIST_CheckPKProcedures_PKTYPESTANDBY( int ti); +*/ + +//赛程 +void PKLIST_DelPKProcedures( int ti, int side, int type); +BOOL PKLIST_CheckPklistInServerMap( int ti, int side); +BOOL PKLIST_CheckPKSameTeam( int charaindex ); +BOOL PKLIST_CheckPKReapetTeam( int menum, int tonum); +BOOL PKLIST_JoinPKProcedures( int charaindex ); +void PKLIST_CheckTeamBeEnable( void); +void PKLIST_warp( int ti, int side, int fl, int x, int y ); +void NPC_PKLIST_PlayerLogout_Exit( int charaindex ); +int PKLIST_GetPKProcedureArray( int menum ); + +BOOL PKLIST_CheckLOCKTeam( int menum); +void PKLIST_LOCKTeam( int menum); +void PKLIST_UNLOCKTeam( int menum); +void PKLIST_Sort_PKListSort( void); + +//正式赛 +typedef struct _tagArrangeBattle +{ + int use; + int fl; + int code; + int teamnum; + int type; //0 NULL // 1 in battle + int time; + char teamname[256]; + int toindex; + + struct _tagArrangeBattle *next[2]; + struct _tagArrangeBattle *top; +}ArrangeBattleC; + +#define MAXBAFLOOR 20 +#define MAXNOWBATTLE 128 + +#define MAXBAHEAD 16 +#define MAXBATTLEPAGE MAXJOINTEAM + +void ABATTLE_InitABattle( int maxnums ); +int ABATTLE_CreateNet( ArrangeBattleC *now, int ti, int fl, int maxfl); +void ABATTLE_ShowNet( ArrangeBattleC *now, int fl); +void ABATTLE_ShowBattlefromFl( int ti, int fl); +ArrangeBattleC *ArrangeBattleC_getNew( void); + + +BOOL ABATTLE_InsertBattle( ArrangeBattleC *aB); //排入赛程 +void ABATTLE_EnterBattle( ArrangeBattleC *aB); //入围 +void ABATTLE_EliminateBattlefromFl( ArrangeBattleC *aB);//剔除 + +BOOL ABATTLE_CheckInABattle( int ti);//确认赛程战斗状态 包含时间 +int ABATTLE_FindBattlefromFl( int ti, int fl); //找寻可加入赛程队伍组合 + +void ABATTLE_CheckBattlefromFl(int charindex, int ti,int battleindex); //确认层次是否完成 且 排置赛程 +int ABATTLE_CheckBattlefromFl_sub(int charindex, int ti, int fl,int battleindex); //确认层次是否完成 + + +ArrangeBattleC *ABATTLE_getInBattle( int teamnum); //取得赛程head form teamnum + +void ABATTLE_MakeInABattleString( void); //制作赛程字串 + +BOOL PKLIST_GetABattlelistDataString( int ti, int *tindex, int *stime, + char *buf1, char *buf2, char *buf3, int flg);//取得赛程字串 + +ArrangeBattleC *ArrangeBattleC_getInBattleArray( int ti); + + + + +void ABATTLE_RecordBattle( int ti, char *buf1, char *tstr1,char *buf2, char *tstr2); +void remove_r( char *s ); +void ABATTLE_GetRecordBattle( void); + +#endif diff --git a/gmsv/include/defend.h b/gmsv/include/defend.h new file mode 100644 index 0000000..7c701c0 --- /dev/null +++ b/gmsv/include/defend.h @@ -0,0 +1,4 @@ +#ifndef __DEFEND_H__ +#define __DEFEND_H__ + +#endif diff --git a/gmsv/include/encount.h b/gmsv/include/encount.h new file mode 100644 index 0000000..e3762f8 --- /dev/null +++ b/gmsv/include/encount.h @@ -0,0 +1,40 @@ +#ifndef __ENCOUNT_H__ +#define __ENCOUNT_H__ + +#define ENCOUNT_GROUPMAXNUM 10 + +BOOL ENCOUNT_initEncount( char* filename ); +BOOL ENCOUNT_reinitEncount( void ); +int ENCOUNT_getEncountAreaArray( int floor, int x, int y); +int ENCOUNT_getEncountPercentMin( int charaindex, int floor , int x, int y ); +int ENCOUNT_getEncountPercentMax( int charaindex, int floor , int x, int y ); +int ENCOUNT_getCreateEnemyMaxNum( int floor , int x, int y ); +int ENCOUNT_getEncountIndex( int floor , int x, int y ); +int ENCOUNT_getEncountIndexFromArray( int array ); +int ENCOUNT_getEncountPercentFromArray( int array ); +int ENCOUNT_getCreateEnemyMaxNumFromArray( int array ); +int ENCOUNT_getGroupIdFromArray( int array, int grouparray ); +int ENCOUNT_getGroupProbFromArray( int array, int grouparray ); +int ENCOUNT_getZorderFromArray( int array ); + +#ifdef _ADD_ENCOUNT // WON ADD 增加敌遭遇触发修件 +typedef struct tagENCOUNT_Table +{ + int index; + int floor; + int encountprob_min; /* 巨件市它件玄割 */ + int encountprob_max; /* 巨件市它件玄割 */ + int enemymaxnum; /* 升木分仃衬毛综月井 */ + int zorder; + int groupid[ENCOUNT_GROUPMAXNUM]; /* 弘伙□皿No */ + int createprob[ENCOUNT_GROUPMAXNUM]; /* 公及弘伙□皿及请蜇 */ + int event_now; + int event_end; + int enemy_group; // 怪物的group 编号 + RECT rect; +}ENCOUNT_Table; + +ENCOUNT_Table *ENCOUNT_table; +#endif + +#endif diff --git a/gmsv/include/enemy.h b/gmsv/include/enemy.h new file mode 100644 index 0000000..a0253f6 --- /dev/null +++ b/gmsv/include/enemy.h @@ -0,0 +1,253 @@ +#ifndef __ENEMY_H__ +#define __ENEMY_H__ + +enum +{ + E_T_SIZE_NORMAL, + E_T_SIZE_BIG, +}; + +typedef enum +{ + E_T_TEMPNO, + E_T_INITNUM, + E_T_LVUPPOINT, + E_T_BASEVITAL, + E_T_BASESTR, + E_T_BASETGH, + E_T_BASEDEX, + E_T_MODAI, + E_T_GET, + E_T_EARTHAT, + E_T_WATERAT, + E_T_FIREAT, + E_T_WINDAT, + E_T_POISON, /* 汹仁凶太卞母丢□斥 */ + E_T_PARALYSIS, /* 仄太木}1 及垫 互匹五卅中[ */ + E_T_SLEEP, /* 戽曰[垫 匹五卅中 */ + E_T_STONE, /* 檗[垫 匹五卅中 */ + E_T_DRUNK, /* 办丹[ 互票互月 */ + E_T_CONFUSION, /* 渔刭[ 猾 毛赀月 */ + E_T_PETSKILL1, + E_T_PETSKILL2, + E_T_PETSKILL3, + E_T_PETSKILL4, + E_T_PETSKILL5, + E_T_PETSKILL6, + E_T_PETSKILL7, + E_T_RARE, + E_T_CRITICAL, + E_T_COUNTER, + E_T_SLOT, + E_T_IMGNUMBER, + E_T_PETFLG, + E_T_SIZE, + E_T_ATOMBASEADD1, + E_T_ATOMFIXMIN1, + E_T_ATOMFIXMAX1, + E_T_ATOMBASEADD2, + E_T_ATOMFIXMIN2, + E_T_ATOMFIXMAX2, + E_T_ATOMBASEADD3, + E_T_ATOMFIXMIN3, + E_T_ATOMFIXMAX3, + E_T_ATOMBASEADD4, + E_T_ATOMFIXMIN4, + E_T_ATOMFIXMAX4, + E_T_ATOMBASEADD5, + E_T_ATOMFIXMIN5, + E_T_ATOMFIXMAX5, + E_T_LIMITLEVEL, // Arminius 7.30 limit level +#ifdef _PET_FUSION + E_T_FUSIONCODE, +#endif + E_T_DATAINTNUM, +}ENEMYTEMP_DATAINT; + +typedef enum +{ + E_T_NAME, + E_T_ATOMFIXNAME1, + E_T_ATOMFIXNAME2, + E_T_ATOMFIXNAME3, + E_T_ATOMFIXNAME4, + E_T_ATOMFIXNAME5, + E_T_DATACHARNUM, + +}ENEMYTEMP_DATACHAR; + +typedef enum +{ + ENEMY_ID, + ENEMY_TEMPNO, + ENEMY_LV_MIN, + ENEMY_LV_MAX, + ENEMY_CREATEMAXNUM, + ENEMY_CREATEMINNUM, + ENEMY_TACTICS, + ENEMY_EXP, + ENEMY_DUELPOINT, + ENEMY_STYLE, + ENEMY_PETFLG, /* 矢永玄卞卅月井升丹井 */ + + ENEMY_ITEM1, + ENEMY_ITEM2, + ENEMY_ITEM3, + ENEMY_ITEM4, + ENEMY_ITEM5, + ENEMY_ITEM6, + ENEMY_ITEM7, + ENEMY_ITEM8, + ENEMY_ITEM9, + ENEMY_ITEM10, + ENEMY_ITEMPROB1, + ENEMY_ITEMPROB2, + ENEMY_ITEMPROB3, + ENEMY_ITEMPROB4, + ENEMY_ITEMPROB5, + ENEMY_ITEMPROB6, + ENEMY_ITEMPROB7, + ENEMY_ITEMPROB8, + ENEMY_ITEMPROB9, + ENEMY_ITEMPROB10, + + ENEMY_DATAINTNUM, + +}ENEMY_DATAINT; + +typedef enum +{ + ENEMY_NAME, + ENEMY_TACTICSOPTION, +#ifdef _BATTLENPC_WARP_PLAYER + ENEMY_ACT_CONDITION, +#endif + ENEMY_DATACHARNUM, +}ENEMY_DATACHAR; + +typedef enum +{ + GROUP_ID, + GROUP_APPEARBYITEMID, /* 仇及失奶 丞毛 匀化中凶日请蜇允月 -1 反 骰*/ + GROUP_NOTAPPEARBYITEMID, /* 仇及失奶 丞毛 匀化中凶日请蜇仄卅中 -1 反 骰*/ + ENEMY_ID1, + ENEMY_ID2, + ENEMY_ID3, + ENEMY_ID4, + ENEMY_ID5, + ENEMY_ID6, + ENEMY_ID7, + ENEMY_ID8, + ENEMY_ID9, + ENEMY_ID10, + CREATEPROB1, + CREATEPROB2, + CREATEPROB3, + CREATEPROB4, + CREATEPROB5, + CREATEPROB6, + CREATEPROB7, + CREATEPROB8, + CREATEPROB9, + CREATEPROB10, + GROUP_DATAINTNUM, +}GROUP_DATAINT; + +typedef enum +{ + GROUP_NAME, + GROUP_DATACHARNUM, + +}GROUP_DATACHAR; + + +typedef struct tagENEMY_EnemyTable +{ + int intdata[ENEMY_DATAINTNUM]; + STRING64 chardata[ENEMY_DATACHARNUM]; + int enemytemparray; +}ENEMY_EnemyTable; + +typedef struct tagENEMYTEMP_Table +{ + int intdata[E_T_DATAINTNUM]; + //ANDY_EDIT + STRING64 chardata[E_T_DATACHARNUM]; + +}ENEMYTEMP_Table; + +typedef struct tagGROUP_Table +{ + int intdata[GROUP_DATAINTNUM]; + STRING32 chardata[GROUP_DATACHARNUM]; + int enemyarray[CREATEPROB1 - ENEMY_ID1]; +}GROUP_Table; + + + +INLINE BOOL ENEMY_CHECKINDEX( int index); +INLINE int ENEMY_setInt( int index, ENEMY_DATAINT element, int data); +INLINE int ENEMY_getInt( int index, ENEMY_DATAINT element); + +INLINE int *ENEMY_getIntdata( int index); + +INLINE BOOL ENEMY_setChar( int index ,ENEMY_DATACHAR element, char* new ); +INLINE char *ENEMY_getChar( int index, ENEMY_DATACHAR element); +int ENEMY_getEnemyNum( void); +BOOL ENEMY_initEnemy( char* filename ); +BOOL ENEMY_reinitEnemy( void ); +int ENEMY_createEnemy( int array, int baselevel ); +int *ENEMY_getEnemy( int charaindex, int x, int y); +int ENEMY_createPetFromEnemyIndex( int charaindex, int array); + +int ENEMY_getEnemyArrayFromId( int EnemyId); +int ENEMY_getEnemyArrayFromTempNo( int EnemyTempNo); +int ENEMY_getEnemyIdFromTempNo( int EnemyTempNo); +int ENEMY_getEnemyTempNoFromId( int EnemyId); + +#ifdef _TEST_PETCREATE +int ENEMY_TEST_createPetIndex( int array); +#endif + +int ENEMYTEMP_getEnemyNum( void);//krynn 2001/12/13 +INLINE BOOL ENEMYTEMP_CHECKINDEX( int index); +INLINE int ENEMYTEMP_setInt( int index, ENEMYTEMP_DATAINT element, int data); +INLINE int ENEMYTEMP_getInt( int index, ENEMYTEMP_DATAINT element); +INLINE char *ENEMYTEMP_getChar( int index, ENEMYTEMP_DATACHAR element); +INLINE BOOL ENEMYTEMP_getInt_setChar( int index ,ENEMYTEMP_DATACHAR element, char* new ); +INLINE char *ENEMYTEMP_getInt_getChar( int index, ENEMYTEMP_DATACHAR element); +int ENEMYTEMP_getInt_getEnemyNum( void); +BOOL ENEMYTEMP_getInt_initEnemy( char* filename ); +BOOL ENEMYTEMP_getInt_reinitEnemy( void ); +int ENEMYTEMP_getEnemyTempArray( int enemyindex); +int ENEMYTEMP_getEnemyTempArrayFromTempNo( int EnemyTempNo); +int ENEMYTEMP_getEnemyTempArrayFromInitnum( int EnemyTempNo); + +INLINE int GROUP_setInt( int index, GROUP_DATAINT element, int data); +INLINE int GROUP_getInt( int index, GROUP_DATAINT element); +INLINE BOOL GROUP_setChar( int index ,GROUP_DATACHAR element, char* new ); +INLINE char *GROUP_getChar( int index, GROUP_DATACHAR element); +int GROUP_getEnemyNum( void); + +BOOL ENEMYTEMP_initEnemy( char* filename ); +BOOL ENEMYTEMP_reinitEnemy( void ); +BOOL GROUP_initGroup( char* filename ); +BOOL GROUP_reinitGroup( void ); + +#ifdef _PET_EVOLUTION +int EVOLUTION_createPetFromEnemyIndex( int charaindex, int baseindex, int flg); +int PET_CheckIncubate( int charaindex); +BOOL PETFUSION_getIndexForChar( int toindex, int *MainIndex, int *Subindex1,int *Subindex2, char *data); +int NPC_getFusionTableForBase( int charaindex, int petindex1, int petindex2 ); +int NPC_getPetArrayForNo( int PetCode); +BOOL PET_getEvolutionAns( int petindex, int *base); +#endif + +int PETFUSION_SetNewEgg( int toindex , int petindex, int array, int *work, int *skill1, int *skill2); +BOOL PETFUSION_AddEgg(int toindex, int petID, int PetCode); + +#ifdef _PET_TRANS +int GetNewPet( int toindex , int petindex, int array, int *work); +#endif + +#endif diff --git a/gmsv/include/enemyexptbl.h b/gmsv/include/enemyexptbl.h new file mode 100644 index 0000000..5113dd4 --- /dev/null +++ b/gmsv/include/enemyexptbl.h @@ -0,0 +1,207 @@ +#ifndef __ENEMY_EXPTBL_H__ +#define __ENEMY_EXPTBL_H__ + + +static int enemybaseexptbl[] = { +1, +2, +3, +4, +5, +6, +9, +12, +15, +18, +22, +26, +30, +35, +40, +46, +52, +58, +65, +72, +79, +87, +95, +104, +113, +122, +131, +141, +151, +162, +173, +184, +196, +208, +220, +233, +246, +260, +274, +288, +303, +318, +333, +348, +365, +381, +398, +415, +432, +450, +468, +486, +506, +525, +545, +564, +585, +606, +627, +648, +670, +692, +714, +737, +760, +784, +808, +832, +857, +882, +907, +933, +959, +956, +1012, +1040, +1067, +1095, +1123, +1152, +1181, +1210, +1240, +1270, +1300, +1331, +1362, +1394, +1426, +1458, +1490, +1524, +1557, +1590, +1625, +1659, +1694, +1729, +1764, +1800, // level 100 +1836, +1872, +1909, +1946, +1983, +2021, +2059, +2097, +2136, +2175, // level 110 +2214, +2254, +2294, +2334, +2374, +2414, +2455, +2496, +2537, +2578, // level 120 +2619, +2661, +2703, +2745, +2787, +2829, +2872, +2915, +2958, +3000, // level 130 +3043, +3088, +3132, +3176, +3220, +3264, +3309, +3354, +3399, +3444, // level 140 +3489, +3535, +3581, +3627, +3673, +3719, +3765, +3812, +3859, +3906, // level 150 +3953, +4000, +4047, +4095, +4143, +4191, +4239, +4287, +4335, +4384, // level 160 +4433, +4482, +4531, +4580, +4629, +4679, +4729, +4779, +4829, +4879, // level 170 +4929, +4980, +5031, +5082, +5133, +5184, +5235, +5287, +5339, +5391, // level 180 +5443, +5495, +5547, +5599, +5652, +5705, +5758, +5811, +5864, +5917, // level 190 +5970, +6024, +6078, +6132, +6186, +6240, +6295, +6350, +6405, +6460, // level 200 +}; +#endif diff --git a/gmsv/include/event.h b/gmsv/include/event.h new file mode 100644 index 0000000..17dec66 --- /dev/null +++ b/gmsv/include/event.h @@ -0,0 +1,9 @@ +#ifndef __EVENT_H__ +#define __EVENT_H__ + +INLINE BOOL EVENT_CHECKEVENTINDEX( int event); +int EVENT_main( int charaindex,int event, int x, int y); + + +#endif + diff --git a/gmsv/include/family.h b/gmsv/include/family.h new file mode 100644 index 0000000..dfe6456 --- /dev/null +++ b/gmsv/include/family.h @@ -0,0 +1,255 @@ +#ifndef __FAMILY_H__ +#define __FAMILY_H__ + +#include "version.h" +#include "common.h" +#include "util.h" +#include "net.h" +#include "time.h" + +#define FAMILY_MAXNUM 1000 // 家族数量 +#ifdef _FMVER21 +#define FAMILY_MAXMEMBER 100 // 家族人数 +#define FAMILY_MAXCHANNELMEMBER 50 // 频道人数 +#else +#define FAMILY_MAXMEMBER 50 // 家族人数 +#define FAMILY_MAXCHANNELMEMBER 10 // 频道人数 +#endif +#define FAMILY_MAXCHANNEL 5 // 家族频道 + +#define CHAR_MAXNAME 20 +#define CHAR_MAXID 20 +#define MINFMLEVLEFORPOINT 3 // 3 申请庄园最低等级 +#define FMLEADERLV 30 // 族长等级 + +#ifdef _FAMILY_MANORNUM_CHANGE +#define FAMILY_FMPKFLOOR 15 // 家族PK图层 +#else +#define FAMILY_FMPKFLOOR 9 // 家族PK图层 +#define FMPOINTNUM 4 // 有据点家族的最大数量 +#define MANORNUM 4 +#define FAMILY_MAXHOME 4 // 家族据点 +#endif + +enum +{ + FM_TOP_INTEGRATE = 1, // DPTOP 综合 + FM_TOP_ADV, // DPTOP 冒险 + FM_TOP_FEED, // DPTOP 饲育 + FM_TOP_SYNTHESIZE, // DPTOP 合成 + FM_TOP_DEALFOOD, // DPTOP 料理 + FM_TOP_PK, // DPTOP PK +#ifdef _NEW_MANOR_LAW + FM_TOP_MOMENTUM = 8, // DPTOP 气势 +#endif + FM_TOP_NUM, // DPTOP 数量 +}; + +enum +{ + FM_FIX_ACCEPTFLAG = 1, + FM_FIX_FMPK, + FM_FIX_FMPET, + FM_FIX_FMRULE, + FM_FIX_DELFMTIME, + FM_FIX_FMGOLD, + FM_FIX_FMADV, + FM_FIX_FMFEED, + FM_FIX_FMSYNTHESIZE, + FM_FIX_FMDEALFOOD, + FM_FIX_FMLEADERCHANGE, +#ifdef _NEW_MANOR_LAW + FM_FIX_FMMOMENTUM, + FM_FIX_FAME, +#endif +}; + +/* + * 扔□田 及职及桦赭午及 cdkey charname 及赢今毛宁六月凶户卞 + * CHEKEYLEN, CHARNAMELEN + * 毛银丹方丹卞 凳[ + */ + +void CHAR_Family(int fd, int index, char* message); +void ACAddFM(int fd, int result, int fmindex, int index); +void ACJoinFM(int fd, int result, int recv); +void ACLeaveFM(int fd, int result, int resultflag); +void ACDelFM(int fd, int result); +void ACShowFMList(int ret, int fmnum, char *data); +void ACFMDetail(int ret, char *data, int charfdid); +void ACShowMemberList(int result, int index, int fmnumm, +int fmacceptflag, int fmjoinnum, char *data); +void ACShowDpTop(int result,int num, char *data, int kindflag); +void ACShowPointList(int result, char *data); +void ACShowFMMemo(int result, int index, int num, int dataindex, char *data); + +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 +void ACFMCharLogin(int fd, int ret, int index, int floor, int fmdp, + int joinflag, int fmsetupflag, int flag, int charindex, int charfame + #ifdef _NEW_MANOR_LAW + ,int momentum + #endif + ); +#else +void ACFMCharLogin(int fd, int ret, int index, int floor, int fmdp, + int joinflag, int fmsetupflag, int flag, int charindex); +#endif + +void ACFMPointList(int ret, char *data); +void ACSetFMPoint(int ret, int r, int clifd); +void ACFMAnnounce(int ret, char *fmname, int fmindex, int index, int kindflag, + char *data, int color); +void ACFixFMPK(int winindex, int loseindex, int data); +void ACFMJob( int fd, int ret, char* data1, char* data2 ); + +void FAMILY_Add(int fd, int meindex, char *message); +void FAMILY_Join(int fd, int meindex, char *message); +void FAMILY_Leave(int fd, int meindex, char *message); +void FAMILY_Detail(int fd, int meindex, char *message); +void FAMILY_CheckMember(int fd, int meindex, char *message); +void FAMILY_Channel(int fd, int meindex, char *message); +void FAMILY_Bank(int fd, int meindex, char *message); +void FAMILY_SetPoint(int fd, int meindex, char *message); +void FAMILY_Init(void); +void FAMILY_SetAcceptFlag(int fd, int meindex, char *message); +void FAMILY_FixRule( int fd, int meindex, char* message ); +void FAMILY_RidePet( int fd, int meindex, char* message ); +void FAMILY_LeaderFunc( int fd, int meindex, char* message ); + + + +#ifdef _CK_ONLINE_PLAYER_COUNT // WON ADD 计算线上人数 +void GS_SEND_PLAYER_COUNT(void); +#endif + +void SetFMPetVarInit(int meindex); +void SetFMVarInit(int meindex); + + +int CheckFMLeader(int meindex); +int getFmLv(int playerindex); + +void getNewFMList( void ); +void checkFamilyIndex( void ); + +int CheckLeaderQ(int meindex); + + +// shan add Begin +struct FMMEMBER_LIST +{ +// int fmindex; + int fmnum; + int fmjoinnum; +// BOOL use; // 0->没使用 1->使用 + int memberindex[FAMILY_MAXMEMBER]; + char numberlistarray[FAMILY_MAXMEMBER][64]; + char memo[35][220]; // family dengon + int accept; // 召募成员与否 + int memonum; + int memoindex; +}; +// 家族之间的留言板 +struct FMS_MEMO +{ + char memo[140][220]; + int memonum; + int memoindex; +}; +// 家族强者表 +struct FMS_DPTOP +{ + int num; // 记录有多少个家族(综合) + char topmemo[FAMILY_MAXNUM][128]; + int fmtopid[FAMILY_MAXNUM]; // 家族索引 +#ifdef _FMVER21 + int fmtopdp[FAMILY_MAXNUM]; // 家族综合声望 +#endif +#ifdef _NEW_MANOR_LAW + int fmMomentum[FAMILY_MAXNUM]; // 家族气势 + char momentum_topmemo[30][96]; // 家族气势 top + int momentum_topid[FAMILY_MAXNUM]; // 家族气势 top id 索引 +#endif + int adv_num; // 冒险 + char adv_topmemo[30][96]; + int feed_num; // 伺育 + char feed_topmemo[30][96]; + int syn_num; // 合成 + char syn_topmemo[30][96]; + int food_num; // 料理 + char food_topmemo[30][96]; + int pk_num; // PK + char pk_topmemo[30][96]; +}; +// 家族据点 +struct FM_POINTLIST +{ + char pointlistarray[FAMILY_MAXHOME][1024]; // Arminius: 32->1024 + +#ifdef _NEW_MANOR_LAW + int fm_momentum[FAMILY_MAXHOME]; // 记录挑战时期开始时的守庄家族气势值 + BOOL fm_inwar[FAMILY_MAXHOME]; // 此庄园是否进行庄园排程中 +#endif +}; +// 家族PK图层 +struct FM_PKFLOOR +{ + int fl; +}; +// End + +#ifdef _NEW_MANOR_LAW +typedef struct _ManorSchedule_t{ + int iFmIndex[10]; // 排入挑战排程的家族索引 + int iFmMomentum[10]; // 家族气势 + int iSort[10]; // 排名用 + char szMemo[10][256]; // 记录: 家族名称|约战时间|家族气势 + char szFmName[10][32]; // 家族名称 + struct tm tm1[10]; // 记录挑战时间 +}ManorSchedule_t; + +extern ManorSchedule_t ManorSchedule[MANORNUM]; +#endif + +#define MAXFAMILYLIST 120000 +extern char familyListBuf[MAXFAMILYLIST]; + +void JoinMemberIndex( int charaindex, int fmindexi); + + +#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令 + + +#define fm_pk_max 200 + +typedef struct _fm_pk_struct +{ + int fm_index[fm_pk_max]; + int fm_win[fm_pk_max]; + int fm_lose[fm_pk_max]; + int fm_score[fm_pk_max]; + char fm_name[fm_pk_max][30]; +}FM_PK_STRUCT; + + +enum{ + FM_INDEX =0, + FM_WIN, + FM_LOSE, + FM_SCORE, + FM_NAME, +}; + + +void setInt_fm_pk_struct( int index, int type, int num ); +void setChar_fm_pk_struct( int index, int type, char *msg ); +int getInt_fm_pk_struct( int index, int type ); +char *getChar_fm_pk_struct( int index, int type ); +int get_fm_leader_index( int fm1 ); + + +#endif + + + +#endif diff --git a/gmsv/include/function.h b/gmsv/include/function.h new file mode 100644 index 0000000..cd8d34d --- /dev/null +++ b/gmsv/include/function.h @@ -0,0 +1,5 @@ +#ifndef __FUNCTION_H__ +#define __FUNCTION_H__ +BOOL initFunctionTable( void ); +void* getFunctionPointerFromName( char* funcname ); +#endif diff --git a/gmsv/include/handletime.h b/gmsv/include/handletime.h new file mode 100644 index 0000000..80e9e73 --- /dev/null +++ b/gmsv/include/handletime.h @@ -0,0 +1,57 @@ +#ifndef __HANDLETIME_H__ +#define __HANDLETIME_H__ + +#include + +#undef EXTERN +#ifdef __HANDLETIME_C__ +#define EXTERN +#else /*__HANDLETIME_C__*/ +#define EXTERN extern +#endif + +EXTERN struct timeval NowTime; +EXTERN int DEBUG_ADJUSTTIME; + +BOOL setNewTime( void ); +#ifdef _ASSESS_SYSEFFICACY +void Assess_InitSysEfficacy( void); +void Assess_SysEfficacy( int flg); +void ASSESS_getSysEfficacy( float *TVsec); +#ifdef _ASSESS_SYSEFFICACY_SUB +void Assess_SysEfficacy_sub( int flg, int loop); +void ASSESS_getSysEfficacy_sub( float *TVsec, int loop); +#endif +#endif +// WON REM +//struct tm *localtime(const time_t *timep); + +/*仇仇井日票}HiO[LS凛棉楮溢[*/ +/* 凛棉150(坌)*60=9000 =750*12 匹 LS1 */ +/* LS1200凛棉 LS1 */ +/* LS100 匹 LS1 */ +typedef struct tagLSTIME +{ + int year; + int day; + int hour; +}LSTIME; + +#define NIGHT_TO_MORNING 700 +#define MORNING_TO_NOON 930 +#define NOON_TO_EVENING 200 +#define EVENING_TO_NIGHT 300 + +typedef enum +{ + LS_NIGHT = 0, + LS_MORNING , + LS_NOON , + LS_EVENING , +}LSTIME_SECTION; + +void RealTimeToLSTime(long t , LSTIME *lstime); +/*void LSTimeToRealTime( LSTIME *lstime, long *t);*/ +LSTIME_SECTION getLSTime (LSTIME *lstime); + +#endif diff --git a/gmsv/include/init.h b/gmsv/include/init.h new file mode 100644 index 0000000..bb786b5 --- /dev/null +++ b/gmsv/include/init.h @@ -0,0 +1,17 @@ +#ifndef __INIT_H__ +#define __INIT_H__ +#include "common.h" +BOOL init( int argc , char** argv, char** env ); + +#ifdef _ITEM_QUITPARTY + +typedef struct tagDisappearItem +{ + char string[64]; +}DisappearItem; +DisappearItem *Disappear_Item; +int itemquitparty_num; + +#endif + +#endif diff --git a/gmsv/include/item.h b/gmsv/include/item.h new file mode 100644 index 0000000..a6b517c --- /dev/null +++ b/gmsv/include/item.h @@ -0,0 +1,443 @@ + +#ifndef __ITEM_H__ +#define __ITEM_H__ + +#include "char.h" + +#define NULLITEM "0" + +typedef enum +{ + ITEM_FIST =0, + ITEM_AXE, + ITEM_CLUB, + ITEM_SPEAR, + ITEM_BOW, + ITEM_SHIELD, + ITEM_HELM, + ITEM_ARMOUR, + + ITEM_BRACELET =8, + ITEM_MUSIC, + ITEM_NECKLACE, + ITEM_RING, + ITEM_BELT, + ITEM_EARRING, + ITEM_NOSERING, + ITEM_AMULET, + /* ****** */ + ITEM_OTHER =16, + ITEM_BOOMERANG, // 回旋标 + ITEM_BOUNDTHROW, // 投掷斧头 + ITEM_BREAKTHROW, // 投掷石 + ITEM_DISH =20, +#ifdef _ITEM_INSLAY + ITEM_METAL, + ITEM_JEWEL, +#endif +#ifdef _ITEM_CHECKWARES + ITEM_WARES, //货物 +#endif + +#ifdef _ITEM_EQUITSPACE + ITEM_WBELT, //腰带 + ITEM_WSHIELD, //盾 + ITEM_WSHOES, //鞋子 +#endif +#ifdef _EQUIT_NEWGLOVE + ITEM_WGLOVE, //手套 +#endif + +#ifdef _ALCHEMIST + ITEM_ALCHEMIST =30, +#endif + +#ifdef _ANGEL_SUMMON + //ITEM_ANGELTOKEN, + //ITEM_HEROTOKEN, +#endif + + ITEM_CATEGORYNUM, + +}ITEM_CATEGORY; + +typedef enum +{ + ITEM_FIELD_ALL, + ITEM_FIELD_BATTLE, + ITEM_FIELD_MAP, +}ITEM_FIELDTYPE; + +typedef enum +{ + ITEM_TARGET_MYSELF, + ITEM_TARGET_OTHER, + ITEM_TARGET_ALLMYSIDE, + ITEM_TARGET_ALLOTHERSIDE, + ITEM_TARGET_ALL, +}ITEM_TARGETTYPE; + +typedef enum +{ + ITEM_ID, + ITEM_BASEIMAGENUMBER, + ITEM_COST, + ITEM_TYPE, + ITEM_ABLEUSEFIELD, + ITEM_TARGET, + ITEM_LEVEL, /* LEVEL */ +#ifdef _ITEM_MAXUSERNUM + ITEM_DAMAGEBREAK, //物品使用次数 +#endif + +#ifdef _ITEMSET4_TXT + ITEM_USEPILENUMS, //物品堆叠次数 + ITEM_CANBEPILE, //是否可堆叠 + + ITEM_NEEDSTR, + ITEM_NEEDDEX, + ITEM_NEEDTRANS, + ITEM_NEEDPROFESSION, +#endif + +#ifdef _TAKE_ITEMDAMAGE + ITEM_DAMAGECRUSHE, + ITEM_MAXDAMAGECRUSHE, +#endif + +#ifdef _ADD_DEAMGEDEFC + ITEM_OTHERDAMAGE, + ITEM_OTHERDEFC, +#endif + +#ifdef _SUIT_ITEM + ITEM_SUITCODE, +#endif + + ITEM_ATTACKNUM_MIN, /* 斓 猾荚醒 */ + ITEM_ATTACKNUM_MAX, /* 嫖 猾荚醒 */ + ITEM_MODIFYATTACK, /* 猾 祭汹 */ + ITEM_MODIFYDEFENCE, /* 豢 祭汹 */ + ITEM_MODIFYQUICK, /* QUICK 祭汹 */ + + ITEM_MODIFYHP, /* HP 祭汹 */ + ITEM_MODIFYMP, /* MP 祭汹 */ + ITEM_MODIFYLUCK, /* LUCK 祭汹 */ + ITEM_MODIFYCHARM, /* CHARM 祭汹 */ + ITEM_MODIFYAVOID, /* 荚 膜恳 */ + ITEM_MODIFYATTRIB, /* 箪岭膜恳 */ + ITEM_MODIFYATTRIBVALUE, /* 箪岭膜恳袄 */ + ITEM_MAGICID, /* 热诸 寞 */ + ITEM_MAGICPROB, /* 热诸 */ + ITEM_MAGICUSEMP, /* 壅 MP */ + +#ifdef _ITEMSET5_TXT + ITEM_MODIFYARRANGE, + ITEM_MODIFYSEQUENCE, + + ITEM_ATTACHPILE, + ITEM_HITRIGHT, //额外命中 +#endif +#ifdef _ITEMSET6_TXT + ITEM_NEGLECTGUARD, +// ITEM_BEMERGE, +#endif + /* 旦 □正旦膜恳袄[*/ + ITEM_POISON, /* 汹仁凶太卞母丢□斥 */ + ITEM_PARALYSIS, /* 仄太木}1 及垫 互匹五卅中[ */ + ITEM_SLEEP, /* 戽曰[垫 匹五卅中 */ + ITEM_STONE, /* 檗[垫 匹五卅中 */ + ITEM_DRUNK, /* 办丹[ 互票互月 */ + ITEM_CONFUSION, /* 渔刭[ 猾 毛赀月 */ + + ITEM_CRITICAL, /* 弁伉 奴市伙 膜恳 */ + + ITEM_USEACTION, /* 银匀凶凛及失弁扑亦件 */ + ITEM_DROPATLOGOUT, /* 夫弘失它玄允月凛卞 允井升丹井 */ + ITEM_VANISHATDROP, /* 仄凶凛卞壅尹月井升丹井 */ + ITEM_ISOVERED, /* 晓卞昙匀井日日木月井升丹井[*/ + ITEM_CANPETMAIL, /* 矢永玄丢□伙匹霜木月井 */ + ITEM_CANMERGEFROM, /* 宁岳葭卞卅木月井 */ + ITEM_CANMERGETO, /* 宁岳燮卞卅木月井 */ + + ITEM_INGVALUE0, /* 岳坌(5蜊坌) */ + ITEM_INGVALUE1, + ITEM_INGVALUE2, + ITEM_INGVALUE3, + ITEM_INGVALUE4, + + ITEM_PUTTIME, /* 失奶 丞互 井木凶凛棉 */ + ITEM_LEAKLEVEL, /* 怍互升木分仃壬木凶井 */ + ITEM_MERGEFLG, /* 宁岳今木凶失奶 丞井升丹井 */ + ITEM_CRUSHLEVEL, /* 莽木蘸宁中 0 2 ㄟ反莽木化卅中 2反蝈莽 */ + + ITEM_VAR1, /* 迕综仅 */ + ITEM_VAR2, /* 迕综仅 */ + ITEM_VAR3, /* 迕综仅 */ + ITEM_VAR4, /* 迕综仅 */ + + ITEM_DATAINTNUM, + +}ITEM_DATAINT; + +typedef enum +{ + ITEM_NAME, /* 蟆 癫及 蟆 */ + ITEM_SECRETNAME, /* 蟆 凳今木月第 岭 曰 */ + ITEM_EFFECTSTRING, /* 躲绊 侬 */ + ITEM_ARGUMENT, /* 失奶 丞及娄醒 */ +#ifdef _ITEM_INSLAY + ITEM_TYPECODE, + ITEM_INLAYCODE, +#endif + ITEM_CDKEY, /* 失奶 丞及 蟆毛 赓卞 凳仄凶谛及 */ +#ifdef _ITEM_FORUSERNAMES + ITEM_FORUSERNAME, + ITEM_FORUSERCDKEY, +#endif +// CoolFish: 2001/10/11 +#ifdef _UNIQUE_P_I + ITEM_UNIQUECODE, /* 物品编码 */ +#endif + + ITEM_INGNAME0, /* 岳坌及 蟆(5蜊坌) */ + ITEM_INGNAME1, + ITEM_INGNAME2, + ITEM_INGNAME3, + ITEM_INGNAME4, + + + ITEM_INITFUNC, /* 娄醒 + * ITEM_Item* + * 忒曰袄 BOOL + * 忒曰袄及啦 反 CHAR_INITFUNC + * 午 元 */ + ITEM_FIRSTFUNCTION = ITEM_INITFUNC, + ITEM_PREOVERFUNC, /* CHAR_PREOVERFUNC 毛辅寰 */ + ITEM_POSTOVERFUNC, /* CHAR_POSTOVERFUNC 毛辅寰*/ + ITEM_WATCHFUNC, /* CHAR_WATCHFUNC 毛辅寰 */ + ITEM_USEFUNC, /* 娄醒反} + * int charaindex 平乓仿奶件犯永弁旦 + * int charitemindex 愤坌及 + * 失奶 丞 及窒 + * 毛银匀凶井 + */ + ITEM_ATTACHFUNC, /* 娄醒反} + * int charaindex 平乓仿奶件犯永弁旦 + * int itemindex 失奶 丞奶件犯永弁旦 + * 平乓仿弁正及 匀化中月失奶 丞 + * 及失奶 丞 匹及奶件犯永弁旦 + * 匹反卅中仪卞镗啦[ + */ + ITEM_DETACHFUNC, /* 娄醒反} + * int charaindex 平乓仿奶件犯永弁旦 + * int itemindex 失奶 丞奶件犯永弁旦 + * 平乓仿弁正及 匀化中月失奶 丞 + * 及失奶 丞 匹及奶件犯永弁旦 + * 匹反卅中仪卞镗啦[ + */ + ITEM_DROPFUNC, /* 午仄凶午五 + * 娄醒反 + * int charaindex 午仄凶平乓仿 + * int itemindex 失奶 丞奶件犯永弁旦 + */ + ITEM_PICKUPFUNC, /* 失奶 丞毛胶匀凶凛 + * 娄醒反 + * int charaindex 胶匀凶平乓仿index + * int itemindex 失奶 丞奶件犯永弁旦 + */ +#ifdef _Item_ReLifeAct + ITEM_DIERELIFEFUNC, /*ANDY_ADD + 复活道具 + */ +#endif + +#ifdef _CONTRACT + ITEM_CONTRACTTIME, + ITEM_CONTRACTARG, +#endif + + ITEM_LASTFUNCTION, + + ITEM_DATACHARNUM = ITEM_LASTFUNCTION, + +#ifdef _ANGEL_SUMMON + ITEM_ANGELMISSION = ITEM_INGNAME0, + ITEM_ANGELINFO = ITEM_INGNAME1, + ITEM_HEROINFO = ITEM_INGNAME2, +#endif + +}ITEM_DATACHAR; + +typedef enum +{ + ITEM_WORKOBJINDEX, + ITEM_WORKCHARAINDEX, +#ifdef _MARKET_TRADE + ITEM_WORKTRADEINDEX, + ITEM_WORKTRADETYPE, + ITEM_WORKTRADESELLINDEX, +#endif +#ifdef _ITEM_ORNAMENTS + ITEM_CANPICKUP, +#endif +#ifdef _ITEM_TIME_LIMIT + ITEM_WORKTIMELIMIT, +#endif + ITEM_WORKDATAINTNUM, +}ITEM_WORKDATAINT; + + + +typedef struct tagItem +{ + int data[ITEM_DATAINTNUM]; + STRING64 string[ITEM_DATACHARNUM]; + int workint[ITEM_WORKDATAINTNUM]; + + void* functable[ITEM_LASTFUNCTION-ITEM_FIRSTFUNCTION]; +}ITEM_Item; + +typedef struct tagITEM_table +{ + int use; + ITEM_Item itm; + int randomdata[ITEM_DATAINTNUM]; +}ITEM_table; + + +typedef struct tagITEM_exists +{ + BOOL use; + ITEM_Item itm; +}ITEM_exists; + +#ifdef _CONTRACT +#define MAX_CONTRACTTABLE 10 +typedef struct tagITEM_contract +{ + int used; + char detail[2048]; + int argnum; +}ITEM_contractTable; +#endif + + +#define ITEM_CHECKINDEX(index) \ + _ITEM_CHECKINDEX( __FILE__, __LINE__, index) +INLINE BOOL _ITEM_CHECKINDEX( char *file, int line, int index); + + +BOOL ITEM_initExistItemsArray( int num ); +BOOL ITEM_endExistItemsArray( void ); +#define ITEM_initExistItemsOne( itm) \ + _ITEM_initExistItemsOne( __FILE__, __LINE__, itm) +int _ITEM_initExistItemsOne( char *file, int line, ITEM_Item* itm ); + +#define ITEM_endExistItemsOne( index ) \ + _ITEM_endExistItemsOne( index, __FILE__, __LINE__) + +void _ITEM_endExistItemsOne( int index , char *file, int line); + +#define ITEM_getInt( Index, element) _ITEM_getInt( __FILE__, __LINE__, Index, element ) +INLINE int _ITEM_getInt( char *file, int line, int index ,ITEM_DATAINT element); + + +#define ITEM_setInt( Index, element, data) _ITEM_setInt( __FILE__, __LINE__, Index, element, data) +INLINE int _ITEM_setInt( char *file, int line, int index ,ITEM_DATAINT element, int data); + + +INLINE char* ITEM_getChar( int index ,ITEM_DATACHAR element ); +INLINE BOOL ITEM_setChar( int index ,ITEM_DATACHAR element , char* new); + +INLINE int ITEM_getWorkInt( int index ,ITEM_WORKDATAINT element); +INLINE int ITEM_setWorkInt( int index ,ITEM_WORKDATAINT element, int data); +INLINE int ITEM_getITEM_itemnum( void ); +INLINE int ITEM_getITEM_UseItemnum( void ); +INLINE BOOL ITEM_getITEM_use( int index ); +void ITEM_constructFunctable( int itemindex ); +void* ITEM_getFunctionPointer( int itemindex, int functype ); +INLINE ITEM_Item *ITEM_getItemPointer( int index ); +int ITEM_getItemMaxIdNum( void); + + +char* ITEM_makeStringFromItemData( ITEM_Item* one, int mode ); +char* ITEM_makeStringFromItemIndex( int index, int mode ); + +BOOL ITEM_makeExistItemsFromStringToArg( char* src , ITEM_Item* item, int mode ); +void ITEM_getDefaultItemSetting( ITEM_Item* itm); + + +INLINE BOOL ITEM_CHECKITEMTABLE( int number ); +BOOL ITEM_readItemConfFile( char* filename ); + + +CHAR_EquipPlace ITEM_getEquipPlace( int charaindex, int itmid ); + + +char* ITEM_makeItemStatusString( int haveitemindex, int itemindex ); +char* ITEM_makeItemFalseString( void ); +char* ITEM_makeItemFalseStringWithNum( int haveitemindex ); + + +BOOL ITEM_makeItem( ITEM_Item* itm, int number ); +int ITEM_makeItemAndRegist( int number ); + + +void ITEM_equipEffect( int index ); + +void Other_DefcharWorkInt( int index); + +char* ITEM_getAppropriateName(int itemindex); +char* ITEM_getEffectString( int itemindex ); + + +int ITEM_getcostFromITEMtabl( int itemid ); + +#define ITEM_getNameFromNumber( id) _ITEM_getNameFromNumber( __FILE__, __LINE__, id) +INLINE char* _ITEM_getNameFromNumber( char *file, int line, int itemid ); + + +int ITEM_getlevelFromITEMtabl( int itemid ); +int ITEM_getgraNoFromITEMtabl( int itemid ); +char *ITEM_getItemInfoFromNumber( int itemid ); + +int ITEM_getdropatlogoutFromITEMtabl( int itemid ); +int ITEM_getvanishatdropFromITEMtabl( int itemid ); +int ITEM_getcanpetmailFromITEMtabl( int itemid ); +int ITEM_getmergeItemFromFromITEMtabl( int itemid ); + +#ifdef _ITEM_CHECKWARES +BOOL CHAR_CheckInItemForWares( int charaindex, int flg); +#endif + +BOOL ITEM_canuseMagic( int itemindex); +// Nuke +1 08/23 : For checking the validity of item target +int ITEM_isTargetValid( int charaindex, int itemindex, int toindex); + + +#ifdef _IMPOROVE_ITEMTABLE +BOOL ITEMTBL_CHECKINDEX( int ItemID); +int ITEM_getSIndexFromTransList( int ItemID); +int ITEM_getMaxitemtblsFromTransList( void); +int ITEM_getTotalitemtblsFromTransList( void); +#endif + +int ITEMTBL_getInt( int ItemID, ITEM_DATAINT datatype); +char *ITEMTBL_getChar( int ItemID, ITEM_DATACHAR datatype); + +int ITEM_getItemDamageCrusheED( int itemindex); +void ITEM_RsetEquit( int charaindex);//自动卸除装备位置错误之物品 +void ITEM_reChangeItemToPile( int itemindex); +void ITEM_reChangeItemName( int itemindex); + + +#ifdef _SIMPLIFY_ITEMSTRING +void ITEM_getDefaultItemData( int itemID, ITEM_Item* itm); +#endif + +#ifdef _CONTRACT +BOOL ITEM_initContractTable( ); +#endif + +#endif diff --git a/gmsv/include/item_event.h b/gmsv/include/item_event.h new file mode 100644 index 0000000..16a2f54 --- /dev/null +++ b/gmsv/include/item_event.h @@ -0,0 +1,241 @@ +#ifndef __ITEM_EVENT_H__ +#define __ITEM_EVENT_H__ +#include "item.h" +int ITEM_eventDrop( int itemindex, int charaindex, int itemcharaindex ); +BOOL ITEM_MedicineInit( ITEM_Item* itm ); +void ITEM_MedicineUsed( int charaindex, int to_charaindex, int itemindex ); +void ITEM_SandClockDetach( int charindex , int itemindex ); +void ITEM_SandClockLogin( int charaindex ); +void ITEM_SandClockLogout( int charaindex ); +void ITEM_chantMagicAttack( int charaindex, int itemindex, int toindex, float* damage ); +void ITEM_addTitleAttach( int charaindex, int itemindex ); +void ITEM_delTitleDetach( int charaindex, int itemindex ); +void ITEM_DeleteByWatched( int myobjindex, int moveobjindex, CHAR_ACTION act, + int x, int y, int dir, int* opt, int optlen ); +void ITEM_DeleteTimeWatched( int myobjindex, int moveobjindex, CHAR_ACTION act, + int x, int y, int dir, int* opt, int optlen ); +void ITEM_useEffectTohelos( int charaindex, int to_charaindex, int haveitemindex); +void ITEM_useRecovery( int charaindex, int toindex, int haveitemindex); + +void ITEM_useStatusChange( int charaindex, int toindex, int haveitemindex); +void ITEM_useMagicDef( int charaindex, int toindex, int haveitemindex); +void ITEM_useParamChange( int charaindex, int toindex, int haveitemindex); +void ITEM_useFieldChange( int charaindex, int toindex, int haveitemindex); +void ITEM_useAttReverse( int charaindex, int toindex, int haveitemindex); +void ITEM_useStatusRecovery( int charaindex, int toindex, int haveitemindex); +void ITEM_useRessurect( int charaindex, int toindex, int haveitemindex); +void ITEM_useMic( int charaindex, int to_charaindex, int haveitemindex ); +void ITEM_dropMic( int charaindex, int itemindex ); +void ITEM_useCaptureUp( int charaindex, int toindex, int haveitemindex); +void ITEM_useRenameItem( int charaindex, int toindex, int haveitemindex); +void ITEM_useRenameItem_WindowResult( int charaindex, int seqno, int select, char *data); +void ITEM_dropDice( int charaindex, int itemindex); +void ITEM_pickupDice( int charaindex, int itemindex); +void ITEM_useLottery( int charaindex, int toindex, int haveitemindex); +void ITEM_useWarp( int charaindex, int toindex, int haveitemindex ); +void ITEM_petFollow( int charaindex, int toindex, int haveitemindex ); +BOOL ITEM_initLottery(ITEM_Item* itm); +void ITEM_useSkup( int charaindex, int toindex, int haveitemindex ); // Nuke 0624 +void ITEM_useNoenemy( int charaindex, int toindex, int haveitemindex ); // Nuke 0626 +void ITEM_equipNoenemy( int charaindex, int itemindex ); // Arminius 7.2: Ra's amulet +void ITEM_remNoenemy( int charaindex, int itemindex ); // Arminius 7.2: Ra's amulet +BOOL ITEM_getArgument( char* argument , char* entryname , char* buf , int buflen ); // Arminius 7.2: Ra's amulet +void ITEM_useEncounter( int charaindex, int toindex, int haveitemindex); // Arminius 7.31 cursed stone +#ifdef _ITEM_METAMO +void ITEM_metamo( int charaindex, int toindex, int haveitemindex ); +void ITEM_ColorMetamo( int charaindex, int toindex, int haveitemindex); +void ITEM_CharaMetamo( int charaindex, int toindex, int haveitemindex); +void ITEM_SexMetamo( int charaindex, int toindex, int haveitemindex); +#endif +#ifdef _ITEM_CRACKER +void ITEM_Cracker(int charaindex,int toindex,int haveitemindex); +#endif +#ifdef _ITEM_ADDEXP //vincent 经验提升 +void ITEM_Addexp(int charaindex,int toindex,int haveitemindex); +#endif +#ifdef _ITEM_REFRESH //vincent 解除异常状态道具 +void ITEM_Refresh(int charaindex,int toindex,int haveitemindex); +#endif +//Terry 2001/12/21 +#ifdef _ITEM_FIRECRACKER +void ITEM_firecracker(int charaindex,int toindex,int haveitemindex); +#endif +//Terry end + +#ifdef _PET_LIMITLEVEL +void ITEM_useOtherEditBase( int charaindex, int toindex, int haveitemindex); +#endif + +#ifdef _ITEM_EDITBASES +void ITEM_useFusionEditBase( int charaindex, int toindex, int haveitemindex); +#endif + +void ITEM_WearEquip( int charaindex, int itemindex); +void ITEM_ReWearEquip( int charaindex, int itemindex); + + +#ifdef _ITEM_CONSTITUTION +void ITEM_Constitution( int charaindex, int toindex, int haveitemindex); +#endif + +#ifdef _Item_ReLifeAct +void ITEM_DIErelife( int charaindex, int itemindex, int eqw ); +#endif + +#ifdef _Item_MoonAct +void ITEM_randEnemyEquipOne( int charaindex, int toindex, int haveitemindex); +void ITEM_randEnemyEquip( int charaindex, int itemindex); +void ITEM_RerandEnemyEquip( int charaindex, int itemindex); +#endif + +#ifdef _ITEM_ORNAMENTS +void ITEM_PutOrnaments( int charaindex, int itemindex); +#endif + +#ifdef _CHIKULA_STONE +void ITEM_ChikulaStone( int charaindex, int toindex, int haveitemindex); +#endif + +#ifdef _SUIT_ITEM +void ITEM_suitEquip( int charaindex, int itemindex); +void ITEM_ResuitEquip( int charaindex, int itemindex); +#endif + +#ifdef _EQUIT_DEFMAGIC +void ITEM_MagicEquitWear( int charaindex, int itemindex); +void ITEM_MagicEquitReWear( int charaindex, int itemindex); +#endif + +#ifdef _EQUIT_RESIST +void ITEM_MagicResist( int charaindex, int itemindex); +void ITEM_MagicReResist( int charaindex, int itemindex); +#endif + +#ifdef _MAGIC_RESIST_EQUIT // WON ADD 职业抗性装备 +void ITEM_P_MagicEquitWear( int charaindex, int itemindex ); +void ITEM_P_MagicEquitReWear( int charaindex, int itemindex ); +#endif + + +#ifdef _Item_DeathAct +void ITEM_UseDeathCounter( int charaindex, int toindex, int haveitemindex); +#endif + +#ifdef _DEATH_CONTENDWATCH +void ITEM_useWatchBattle( int charaindex, int toindex, int haveitemindex); +#endif + +#ifdef _FEV_ADD_NEW_ITEM // FEV ADD 增加复活守精 +void ITEM_ResAndDef( int charaindex, int toindex, int haveitemindex ); +#endif + +#ifdef _CHRISTMAS_REDSOCKS +void ITEM_useMaxRedSocks( int charaindex, int toindex, int haveitemindex); +#endif + +#ifdef _CHRISTMAS_REDSOCKS_NEW +void ITEM_useMaxRedSocksNew( int charaindex, int toindex, int haveitemindex); +#endif + +#ifdef _PETSKILL_CANNEDFOOD +void ITEM_useSkillCanned( int charaindex, int toindex, int itemNo); +#endif + +#ifdef _NEW_RIDEPETS +void ITEM_useLearnRideCode( int charaindex, int toindex, int haveitemindex); +#endif + +#ifdef _ITEM_WARP_FIX_BI +void recoverbi(int index); +#endif + +#ifdef _ITEM_TIME_LIMIT +void ITEM_TimeLimit( int charaindex); +#endif + +#ifdef _USEWARP_FORNUM +void ITEM_useWarpForNum( int charaindex, int toindex, int haveitemindex ); +#endif + +#ifdef _IMPRECATE_ITEM +void ITEM_useImprecate( int charaindex, int toNo, int haveitemindex ); +#endif +#ifdef _BLACK_MARKET +void ITEM_BM_Exchange( int charaindex, int iindex); +#endif + +#ifdef _THROWITEM_ITEMS +void ITEM_ThrowItemBox( int charaindex, int toindex, int haveitemindex); +#endif + +#ifdef _ITEM_WATERWORDSTATUS +void ITEM_WaterWordStatus( int charaindex, int toindex, int haveitemindex); +#endif + +#ifdef _ITEM_LOVERPARTY +void ITEM_LoverSelectUser( int charaindex, int toindex, int haveitemindex); +#endif + +#ifdef _ITEM_MAGICRECOVERY +void ITEM_useMRecovery( int charaindex, int toindex, int haveitemindex); +#endif + +#ifdef _ITEM_USEMAGIC +void ITEM_useMagic( int charaindex, int toindex, int haveitemindex); +#endif + +#ifdef _PETSKILL_CANNEDFOOD +void ITEM_usePetSkillCanned_WindowResult( int charaindex, int seqno, int select, char *data); +#endif + +void ITEM_AddPRSkillPoint(int charaindex,int toindex,int haveitemindex); +void ITEM_AddPRSkillPercent( int charaindex,int toindex,int haveitemindex); + +#ifdef _ANGEL_SUMMON +void ITEM_AngelToken( int charaindex, int toindex, int haveitemindex ); +void ITEM_HeroToken( int charaindex, int toindex, int haveitemindex ); +#endif +#ifdef _HALLOWEEN_EFFECT +void ITEM_MapEffect(int charaindex,int toindex,int haveitemindex); +#endif +void ITEM_changePetOwner( int charaindex, int toindex, int haveitemindex); + +#ifdef _CONTRACT +void ITEM_contract( int charaindex, int toindex, int haveitemindex); +#endif + +#ifdef _TIME_TICKET +void ITEM_timeticket( int charaindex, int toindex, int haveitemindex); +#endif + +#ifdef _ITEM_SETLOVER +void ITEM_SetLoverUser( int charaindex, int toindex, int haveitemindex); +void ITEM_LoverWarp( int charaindex, int toindex, int haveitemindex); +void ITEM_LoverUnmarry( int charaindex, int toindex, int haveitemindex); +#endif + +#ifdef _GM_ITEM +void ITEM_GMFUNCTION( int charaindex, int toindex, int haveitemindex); +#endif + +enum{ + BD_KIND_HP, + BD_KIND_MP, + BD_KIND_CHARM, + BD_KIND_AI, + BD_KIND_CURSE, + BD_KIND_BESTOW, + BD_KIND_WISHES, +#ifdef _CHANGEITEMUSE // Syu ADD 调整战斗中使用料理设定 + BD_KIND_HP_MP, +#endif +#ifdef _ITEM_UNBECOMEPIG + BD_KIND_UNBECOMEPIG, +#endif +#ifdef _ITEM_PROPERTY + BD_KIND_PROPERTY, +#endif + BD_KIND_END +}; + +#endif diff --git a/gmsv/include/item_gen.h b/gmsv/include/item_gen.h new file mode 100644 index 0000000..7174c87 --- /dev/null +++ b/gmsv/include/item_gen.h @@ -0,0 +1,22 @@ +#ifndef __ITEM_GEN_H__ +#define __ITEM_GEN_H__ + + +int ITEM_initItemIngCache( void ); +int ITEM_initItemAtom( char *fn ); +int ITEM_initRandTable( void); +int ITEM_mergeItem( int charaindex, ITEM_Item *items, int num , int money, int petid, int searchtable, int petindex, int alchemist); +int ITEM_canDigest( ITEM_Item *t ); +int ITEM_mergeItem_merge( int charaindex,int petid, char *data, int petindex, int alchemist); + +#ifdef _ITEM_INSLAY +int PETSKILL_ITEM_inslay( int charindex, int inslayindex, int itemindex); +#endif + +#ifdef _PETSKILL_FIXITEM +int PETSKILL_ITEM_FixItem( int charindex, int fixindex, int *itemindex); +#endif + +#endif + + diff --git a/gmsv/include/item_trade.h b/gmsv/include/item_trade.h new file mode 100644 index 0000000..b389cdb --- /dev/null +++ b/gmsv/include/item_trade.h @@ -0,0 +1,52 @@ +#ifndef __MAPTRADE_H__ +#define __MAPTRADE_H__ +#include "char.h" + +typedef struct tagMapTrade { + int masterindex; + int x; + int y; + int Ttime; + int Goodindex; + char Goodname[256]; +}MapTrade; + +#define TRADEMAP 1090 +#define TRADEXSIZE 4 +#define TRADEYSIZE 4 + +BOOL CHECKMAP_TRADE( int charindex, int floor, int x, int y); +int CHECKMAP_TRADEXY( int charindex, int floor, int x, int y); +BOOL MAP_TRADEDROP( int charindex, int itemindex,int floor, int x, int y); +BOOL MAP_TRADEPICKUP( int charindex, int itemindex, int floor, int x, int y, int flg); + +void InitMapTradeData( int index, int Stime); + +int TRADE_getMasterInt( int index); +int TRADE_getTimeInt( int index); +BOOL TRADE_setMasterInt( int index, int Num); +BOOL TRADE_setTimeInt( int index, int Num); +int TRADE_AddMasrerTrade( int toindex); //设定摊位主人 +int TRADE_getMaxNumInt(); +void MAPTRADE_CLEANGOLD( int floor, int num); +BOOL MAPTRADE_CHECKMASTERIN( int masterindex , int toindex, int num); +BOOL MAPTRADE_CHECKMAPFULL(int fl, int x, int y); +BOOL MAP_TRADEPETDROP( int charindex, int petindex,int floor, int x, int y); +int MAPTRADE_getItemSpace( int meindex, int itemindex); +int MAPTRADE_getPetSpace( int masterindex, int petindex); + +int MAPTRADE_getSellIndex( int index); +BOOL MAPTRADE_setSellIndex( int index, int num); +void MAPTRADE_setCharSellName( int index, char *buf); +char* MAPTRADE_getCharSellName( int index ); + +#define TRADESTARTNUM 1 +#define TRADETYPE_SELL (1<<3) +#define TRADEITEMID 0 +#define TRADEPETID 0 +#define TRADEPETUPLV ((1<<24)+(1<<16)+(1<<8)+1) +#define TRADEPETTYPE (1<<4) +#define TRADEITEMTYPE (1<<8) +#endif + + diff --git a/gmsv/include/levelup.h b/gmsv/include/levelup.h new file mode 100644 index 0000000..eb4b161 --- /dev/null +++ b/gmsv/include/levelup.h @@ -0,0 +1,17 @@ +#ifndef _LEVELUP_H +#define _LEVELUP_H + +int GetEnemyExp( int level ); + +int BATTLE_GetLevelExp( + int charaindex, + int level +); + +int BATTLE_LevelUpCheck( + int charaindex +); + + +#endif + diff --git a/gmsv/include/link.h b/gmsv/include/link.h new file mode 100644 index 0000000..f9f6ba2 --- /dev/null +++ b/gmsv/include/link.h @@ -0,0 +1,22 @@ +#ifndef __LINK_H__ +#define __LINK_H__ + +#include "common.h" + +/* + * 伉旦玄厌瞻毛烂聒允月 [ + * 仇及伉旦玄反val反 读卞反窒手仄卅中[勾引曰禾奶件正□及戊疋□及心 + * 垫丹[ + */ +typedef struct tagNode +{ + struct tagNode* next; /*戚及用□玉尺及禾奶件正□*/ + char* val; /*忡 允月 侬 */ + int size; /*val及扔奶术*/ +}Node; + +BOOL Nodeappendhead( Node** top , Node* add ); +BOOL Nodeappendtail( Node** top , Node* add ); +BOOL Noderemovehead( Node** top , Node* ret); +BOOL Noderemovetail( Node** top , Node* ret); +#endif diff --git a/gmsv/include/log.h b/gmsv/include/log.h new file mode 100644 index 0000000..b8dee6d --- /dev/null +++ b/gmsv/include/log.h @@ -0,0 +1,353 @@ +#ifndef __LOG_H__ +#define __LOG_H__ +#include +typedef enum +{ + LOG_TALK, + LOG_PROC, + LOG_ITEM, + LOG_STONE, + LOG_PET, + LOG_TENSEI, + LOG_KILL, //ttom 12/26/2000 kill the pet & items + LOG_TRADE, // CoolFish: 2001/4/19 + LOG_HACK, // Arminius 2001/6/14 + LOG_SPEED, // Nuke 0626 + LOG_FMPOP, // CoolFish: 2001/9/12 + LOG_FAMILY, // Robin 10/02 + LOG_GM, // Shan +#ifdef _SERVICE + LOG_SERVICE, // Terry 2001/09/28 +#endif +#ifdef _GAMBLE_ROULETTE + LOG_GAMBLE, +#endif +#ifdef _TEST_PETCREATE + LOG_CREATPET, + LOG_AVGCREATPET, +#endif + + LOG_LOGIN, + PETTRANS, +//Syu 增加庄园战胜负Log + LOG_FMPKRESULT, + +// Syu ADD 新增家族个人银行存取Log (不含家族银行) + LOG_BANKSTONELOG, + + LOG_ACMESS, + LOG_PKCONTEND, +#ifdef _STREET_VENDOR + LOG_STREET_VENDOR, +#endif + +#ifdef _ANGEL_SUMMON + LOG_ANGEL, +#endif + +#ifdef _LOG_OTHER + LOG_OTHER, +#endif +#ifdef _NEW_MANOR_LAW + LOG_FMPK_GETMONEY, + LOG_FM_FAME_SHOP, +#endif + + LOG_TYPE_NUM, +}LOG_TYPE; + +void closeAllLogFile( void ); +BOOL initLog( char* filename ); +void printl( LOG_TYPE logtype, char* format , ... ); + + +void LogAcMess( int fd, char *type, char *mess ); + +void LogItem( + char *CharName, /* 平乓仿弁正 */ + char *CharID, + int ItemNo, /* 失奶 丞 寞 */ + char *Key, /* 平□伐□玉 */ + int floor, /* 甄 */ + int x, + int y, + char *uniquecode, // shan 2001/12/14 + char *itemname, int itemID +); +void LogPkContend( char *teamname1, char *teamname2, + int floor, int x, int y, int flg ); + +void LogPetTrans( + char *cdkey, char *uniwuecde, char *uniwuecde2, char *CharName, int floor, int x, int y, + int petID1, char *PetName1, int petLV, int petrank, int vital1, int str1, int tgh1, int dex1, int total1, + int petID2, char *PetName2, int vital2, int str2, int tgh2, int dex2, int total2, + int work0, int work1, int work2, int work3, int ans, int trans +); + +void LogPet( + char *CharName, /* 平乓仿弁正 */ + char *CharID, + char *PetName, + int PetLv, + char *Key, /* 平□伐□玉 */ + int floor, /* 甄 */ + int x, + int y, + char *uniquecode // shan 2001/12/14 +); + +#ifdef _STREET_VENDOR +void LogStreetVendor( + char *SellName, + char *SellID, + char *BuyName, + char *BuyID, + char *ItemPetName, + int PetLv, //若是道具此值为 -1 + int iPrice, + char *Key, + int Sfloor, + int Sx, + int Sy, + int Bfloor, + int Bx, + int By, + char *uniquecode +); +#endif + +void LogTensei( + char *CharName, /* 平乓仿弁正 */ + char *CharID, + char *Key, /* 平□伐□玉 */ + int level, //伊矛伙 + int transNum, //鳖戏荚醒 + int quest, //弁巨旦玄醒 + int home, //请褥哗 + int item, // 笛失奶 丞 井曰醒 + int pet, // 笛矢永玄 井曰醒 + int vital, // 祭蟆Vital + int b_vital, // 祭 vital + int str, // 祭蟆str + int b_str, // 祭 str + int tgh, // 祭蟆 + int b_tgh, // 祭 + int dex, // 祭蟆 + int b_dex // 祭 +); +// Syu ADD 新增家族个人银行存取Log (不含家族银行) +void LogFamilyBankStone( + char *CharName, + char *CharId, + int Gold, + int MyGold, + char *Key, + int floor, + int x, + int y, + int banksum +); + +void LogStone( + int TotalGold, + char *CharName, /* 平乓仿弁正 */ + char *CharId, /* 交□扒□ID */ + int Gold, /* 嗯喊 */ + int MyGold, + char *Key, /* 平□伐□玉 */ + int floor, /* 甄 */ + int x, + int y +); + +void LogTalk( + char *CharName, /* 平乓仿弁正 */ + char *CharID, + int floor, /* 甄 */ + int x, + int y, + char *message +); + +// Terry 2001/09/28 +#ifdef _SERVICE +void LogService( + char *CharName, //角色名称 + char *CharID, //玩家ID + int itemid, //物品ID + char *Key, //说明 + int floor, + int x, + int y +); +#endif +//ttom 12/26/2000 kill pet & items +void LogKill( + char *CharName, + char *CharId, + char *CharPet_Item +); +//ttom + +// CoolFish: 2001/4/19 +void LogTrade(char *message); +// CoolFish: 2001/9/12 +void LogFMPOP(char *message); + +// Arminius 2001/6/14 +enum +{ + HACK_NOTHING, + HACK_GETFUNCFAIL, + HACK_NOTDISPATCHED, + HACK_CHECKSUMERROR, + HACK_HP, + HACK_TYPE_NUM, +}HACK_TYPE; +void logHack(int fd, int errcode); +// Nuke 0626 +void logSpeed(int fd); + +void closeAllLogFile( void ); +int openAllLogFile( void ); + +// Robin 10/02 +void LogFamily( + char *FMName, + int fmindex, + char *charName, + char *charId, + char *keyWord, + char *data +); + +// Shan 11/02 +void LogGM( + char *CharName, //角色名称 + char *CharID, //玩家ID + char *Message, //指令内容 + int floor, + int x, + int y +); + +void LogLogin( + char *CharID, //玩家ID + char *CharName, //角色名称 + int saveIndex, + char *ipadress +); + +#ifdef _TEST_PETCREATE +void LogCreatPet( + char *PetName, int petid, int lv,int hp, int char_vital, int char_str, int char_tgh, int char_dex, + int vital, int str, int tgh, int dex, int fixstr, int fixtgh, int fixdex, + int lvup, int petrank, int flg + ); +#endif + +void LogCreatFUPet( + char *PetName, int petid, int lv, int hp, + int vital, int str, int tgh, int dex, + int fixstr, int fixtgh, int fixdex, int trans, int flg); + +#ifdef _GAMBLE_ROULETTE + +void LogGamble( + char *CharName, //角色名称 + char *CharID, //玩家ID + char *Key, //说明 + int floor, + int x, + int y, + int player_stone, //所拥有金钱 + int Gamble_stone, //下注本金 + int get_stone, //获得 + int Gamble_num, + int flg //flg = 1 玩家 2 庄家 +); +#endif + +void LogBankStone( + char *CharName, /* 平乓仿弁正 */ + char *CharId, /* 交□扒□ID */ + int meindex, + int Gold, /* 嗯喊 */ + char *Key, /* 平□伐□玉 */ + int floor, /* 甄 */ + int x, + int y, + int my_gold, + int my_personagold +); + +//Syu 增加庄园战胜负Log +void Logfmpk( + char *winner, int winnerindex, int num1, + char *loser, int loserindex, int num2, char *date, char *buf1, char *buf2, int flg); + +#ifdef _NEW_MANOR_LAW +void LogFMPKGetMomey( + char *szFMName, + char *szID, + char *szCharName, + int iMomentum, + int iGetMoney, + int iDest +); +void LogFMFameShop( + char *szFMName, + char *szID, + char *szCharName, + int iFame, + int iCostFame +); +#endif + +void backupAllLogFile( struct tm *ptm ); + + +#ifdef _TEST_PETCREATE +void backupTempLogFile( char *buf, char *entryname, int Num); +#endif + +void LogPetPointChange( + char * CharName, char *CharID, char *PetName, int petindex, int errtype, + int PetLv, char *Key,int floor, int x, int y); + +void LogPetFeed( + char * CharName, char *CharID, char *PetName, int petindex, + int PetLv, char *Key,int floor, int x, int y, char *ucode); + +#ifdef _ANGEL_SUMMON +void LogAngel( char *msg); +#endif + +void warplog_to_file( void ); +void warplog_from_file( void ); + +typedef struct { + int floor; + int incount; + int outcount; +}tagWarplog; +#define MAXMAPNUM 700 +extern tagWarplog warplog[MAXMAPNUM]; + +typedef struct { + int floor1; + int floor2; + int count; +}tagWarpCount; +#define MAXMAPLINK 1000 +extern tagWarpCount warpCount[MAXMAPLINK]; + +#ifdef _LOG_OTHER +void LogOther( + char *CharName, + char *CharID, + char *message +); +#endif + +#endif diff --git a/gmsv/include/lssproto_serv.h b/gmsv/include/lssproto_serv.h new file mode 100644 index 0000000..7901117 --- /dev/null +++ b/gmsv/include/lssproto_serv.h @@ -0,0 +1,375 @@ +#ifndef _PROTOCOL_H_ +#define _PROTOCOL_H_ + +#include "lssproto_util.h" // for StoneAge + +#ifdef MAXLSRPCARGS +#if ( MAXLSRPCARGS <= ( 13 + 1 ) ) +#undef MAXLSRPCARGS +#define MAXLSRPCARGS ( 13 + 1 ) +#endif +#else +#define MAXLSRPCARGS ( 13 + 1 ) +#endif + +int lssproto_InitServer(int (*writefunc)(int,char*,int) , int worksiz ); +void lssproto_SetServerLogFiles( char *read , char *write ); +void lssproto_CleanupServer( void ); +int lssproto_ServerDispatchMessage(int fd, char *encoded); + +#define SEPARATOR ";" + +#define LSSPROTO_W_RECV 0 +#define LSSPROTO_W2_RECV 1 +#define LSSPROTO_XYD_SEND 2 +#define LSSPROTO_EV_RECV 3 +#define LSSPROTO_EV_SEND 4 +#define LSSPROTO_EN_RECV 5 +#define LSSPROTO_DU_RECV 6 +#define LSSPROTO_EN_SEND 7 +#define LSSPROTO_EO_RECV 8 +#define LSSPROTO_BU_RECV 9 +#define LSSPROTO_JB_RECV 10 +#define LSSPROTO_LB_RECV 11 +#define LSSPROTO_RS_SEND 12 +#define LSSPROTO_RD_SEND 13 +#define LSSPROTO_B_RECV 14 +#define LSSPROTO_B_SEND 15 +#define LSSPROTO_SKD_RECV 16 +#define LSSPROTO_ID_RECV 17 +#define LSSPROTO_PI_RECV 18 +#define LSSPROTO_DI_RECV 19 +#define LSSPROTO_DG_RECV 20 +#define LSSPROTO_DP_RECV 21 +#define LSSPROTO_I_SEND 22 +#define LSSPROTO_MI_RECV 23 +#define LSSPROTO_SI_SEND 24 +#define LSSPROTO_MSG_RECV 25 +#define LSSPROTO_MSG_SEND 26 +#define LSSPROTO_PMSG_RECV 27 +#define LSSPROTO_PME_SEND 28 +#define LSSPROTO_AB_RECV 29 +#define LSSPROTO_AB_SEND 30 +#define LSSPROTO_ABI_SEND 31 +#define LSSPROTO_DAB_RECV 32 +#define LSSPROTO_AAB_RECV 33 +#define LSSPROTO_L_RECV 34 +#define LSSPROTO_TK_RECV 35 +#define LSSPROTO_TK_SEND 36 +#define LSSPROTO_MC_SEND 37 +#define LSSPROTO_M_RECV 38 +#define LSSPROTO_M_SEND 39 +#define LSSPROTO_C_RECV 40 +#define LSSPROTO_C_SEND 41 +#define LSSPROTO_CA_SEND 42 +#define LSSPROTO_CD_SEND 43 +#define LSSPROTO_R_SEND 44 +#define LSSPROTO_S_RECV 45 +#define LSSPROTO_S_SEND 46 +#define LSSPROTO_D_SEND 47 +#define LSSPROTO_FS_RECV 48 +#define LSSPROTO_FS_SEND 49 +#define LSSPROTO_HL_RECV 50 +#define LSSPROTO_HL_SEND 51 +#define LSSPROTO_PR_RECV 52 +#define LSSPROTO_PR_SEND 53 +#define LSSPROTO_KS_RECV 54 +#define LSSPROTO_KS_SEND 55 +#define LSSPROTO_AC_RECV 56 +#define LSSPROTO_MU_RECV 57 +#define LSSPROTO_PS_RECV 58 +#define LSSPROTO_PS_SEND 59 +#define LSSPROTO_ST_RECV 60 +#define LSSPROTO_DT_RECV 61 +#define LSSPROTO_FT_RECV 62 +#define LSSPROTO_SKUP_SEND 63 +#define LSSPROTO_SKUP_RECV 64 +#define LSSPROTO_KN_RECV 65 +#define LSSPROTO_WN_SEND 66 +#define LSSPROTO_WN_RECV 67 +#define LSSPROTO_EF_SEND 68 +#define LSSPROTO_SE_SEND 69 +#define LSSPROTO_SP_RECV 70 +#define LSSPROTO_CLIENTLOGIN_RECV 71 +#define LSSPROTO_CLIENTLOGIN_SEND 72 +#define LSSPROTO_CREATENEWCHAR_RECV 73 +#define LSSPROTO_CREATENEWCHAR_SEND 74 +#define LSSPROTO_CHARDELETE_RECV 75 +#define LSSPROTO_CHARDELETE_SEND 76 +#define LSSPROTO_CHARLOGIN_RECV 77 +#define LSSPROTO_CHARLOGIN_SEND 78 +#define LSSPROTO_CHARLIST_RECV 79 +#define LSSPROTO_CHARLIST_SEND 80 +#define LSSPROTO_CHARLOGOUT_RECV 81 +#define LSSPROTO_CHARLOGOUT_SEND 82 +#define LSSPROTO_PROCGET_RECV 83 +#define LSSPROTO_PROCGET_SEND 84 +#define LSSPROTO_PLAYERNUMGET_RECV 85 +#define LSSPROTO_PLAYERNUMGET_SEND 86 +#define LSSPROTO_ECHO_RECV 87 +#define LSSPROTO_ECHO_SEND 88 +#define LSSPROTO_SHUTDOWN_RECV 89 +#define LSSPROTO_NU_SEND 90 +#define LSSPROTO_TD_RECV 91 +#define LSSPROTO_TD_SEND 92 +#define LSSPROTO_FM_SEND 93 +#define LSSPROTO_FM_RECV 94 +#define LSSPROTO_WO_SEND 95 +#define LSSPROTO_PETST_RECV 96 +#define LSSPROTO_BM_RECV 97 // _BLACK_MARKET + +#ifdef _MIND_ICON +#define LSSPROTO_MA_RECV 98 +#endif + +#ifdef _FIX_DEL_MAP // WON ADD 玩家抽地图送监狱 +#define LSSPROTO_DM_RECV 99 +#endif + +#ifdef _ITEM_CRACKER +#define LSSPROTO_IC_SEND 100 +#endif + +#ifdef _MAGIC_NOCAST // 精灵:沉默 +#define LSSPROTO_NC_SEND 101 +#endif +#ifdef _CHECK_GAMESPEED +#define LSSPROTO_CS_RECV 103 //加速探针 +#define LSSPROTO_CS_SEND 104 //加速探针 +#endif + +#ifdef _TEAM_KICKPARTY +#define LSSPROTO_KTEAM_RECV 106 +#endif +#ifdef _PETS_SELECTCON +#define LSSPROTO_PETST_SEND 107 +#endif +#ifdef _NEWREQUESTPROTOCOL // (不可开) Syu ADD 新增Protocol要求细项 +#define LSSPROTO_RESIST_RECV 108 +#define LSSPROTO_RESIST_SEND 109 +#endif +#ifdef _OUTOFBATTLESKILL // (不可开) Syu ADD 非战斗时技能Protocol +#define LSSPROTO_BATTLESKILL_RECV 110 +#define LSSPROTO_BATTLESKILL_SEND 111 +#endif +#ifdef _CHATROOMPROTOCOL // (不可开) Syu ADD 聊天室频道 +#define LSSPROTO_CHATROOM_RECV 112 +#define LSSPROTO_CHATROOM_SEND 113 +#endif + +#define LSSPROTO_SPET_RECV 114 // Robin 待机宠 +#define LSSPROTO_SPET_SEND 115 + +#ifdef _STREET_VENDOR +#define LSSPROTO_STREET_VENDOR_RECV 116 // 摆摊功能 +#define LSSPROTO_STREET_VENDOR_SEND 117 +#endif + +#ifdef _RIGHTCLICK +#define LSSPROTO_RCLICK_RECV 118 +#define LSSPROTO_RCLICK_SEND 119 +#endif + +#ifdef _JOBDAILY +#define LSSPROTO_JOBDAILY_SEND 120 // CYG 任务日志功能 +#define LSSPROTO_JOBDAILY_RECV 121 +#endif + +#ifdef _TEACHER_SYSTEM +#define LSSPROTO_TEACHER_SYSTEM_RECV 122 // 导师功能 +#define LSSPROTO_TEACHER_SYSTEM_SEND 123 +#endif + +#ifdef _ADD_STATUS_2 +#define LSSPROTO_S2_RECV 124 +#define LSSPROTO_S2_SEND 125 +#endif + +void lssproto_W_recv(int fd,int x,int y,char* direction); +void lssproto_W2_recv(int fd,int x,int y,char* direction); +void lssproto_XYD_send(int fd,int x,int y,int dir); +void lssproto_EV_recv(int fd,int event,int seqno,int x,int y,int dir); +void lssproto_EV_send(int fd,int seqno,int result); +void lssproto_EN_recv(int fd,int x,int y); +void lssproto_DU_recv(int fd,int x,int y); +void lssproto_EN_send(int fd,int result,int field); +void lssproto_EO_recv(int fd,int dummy); +void lssproto_BU_recv(int fd,int dummy); +void lssproto_JB_recv(int fd,int x,int y); +void lssproto_LB_recv(int fd,int x,int y); +void lssproto_RS_send(int fd,char* data); +void lssproto_RD_send(int fd,char* data); +void lssproto_B_recv(int fd,char* command); +void lssproto_B_send(int fd,char* command); +void lssproto_SKD_recv(int fd,int dir,int index); +void lssproto_ID_recv(int fd,int x,int y,int haveitemindex,int toindex); +void lssproto_PI_recv(int fd,int x,int y,int dir); +void lssproto_DI_recv(int fd,int x,int y,int itemindex); +void lssproto_DG_recv(int fd,int x,int y,int amount); +void lssproto_DP_recv(int fd,int x,int y,int petindex); +void lssproto_I_send(int fd,char* data); +void lssproto_MI_recv(int fd,int fromindex,int toindex); +void lssproto_SI_send(int fd,int fromindex,int toindex); +void lssproto_MSG_recv(int fd,int index,char* message,int color); +void lssproto_MSG_send(int fd,int aindex,char* text,int color); +void lssproto_PMSG_recv(int fd,int index,int petindex,int itemindex,char* message,int color); +void lssproto_PME_send(int fd,int objindex,int graphicsno,int x,int y,int dir,int flg,int no,char* cdata); +void lssproto_AB_recv(int fd); +void lssproto_AB_send(int fd,char* data); +void lssproto_ABI_send(int fd,int num,char* data); +void lssproto_DAB_recv(int fd,int index); +void lssproto_AAB_recv(int fd,int x,int y); +void lssproto_L_recv(int fd,int dir); +void lssproto_TK_recv(int fd,int x,int y,char* message,int color,int area); +void lssproto_TK_send(int fd,int index,char* message,int color); +void lssproto_MC_send(int fd,int fl,int x1,int y1,int x2,int y2,int tilesum,int objsum,int eventsum,char* data); +void lssproto_M_recv(int fd,int fl,int x1,int y1,int x2,int y2); +void lssproto_M_send(int fd,int fl,int x1,int y1,int x2,int y2,char* data); +void lssproto_C_recv(int fd,int index); +void lssproto_C_send(int fd,char* data); +void lssproto_CA_send(int fd,char* data); +void lssproto_CD_send(int fd,char* data); +void lssproto_R_send(int fd,char* data); +void lssproto_S_recv(int fd,char* category); +void lssproto_S_send(int fd,char* data); +void lssproto_D_send(int fd,int category,int dx,int dy,char* data); +void lssproto_FS_recv(int fd,int flg); +void lssproto_FS_send(int fd,int flg); +void lssproto_HL_recv(int fd,int flg); +void lssproto_HL_send(int fd,int flg); +void lssproto_PR_recv(int fd,int x,int y,int request); +void lssproto_PR_send(int fd,int request,int result); +void lssproto_KS_recv(int fd,int petarray); +void lssproto_KS_send(int fd,int petarray,int result); + +#ifdef _STANDBYPET +void lssproto_SPET_recv(int fd,int standbypet); +void lssproto_SPET_send(int fd,int standbypet,int result); +#endif + +void lssproto_AC_recv(int fd,int x,int y,int actionno); +void lssproto_MU_recv(int fd,int x,int y,int array,int toindex); +void lssproto_PS_recv(int fd,int havepetindex,int havepetskill,int toindex,char* data); +void lssproto_PS_send(int fd,int result,int havepetindex,int havepetskill,int toindex); +void lssproto_ST_recv(int fd,int titleindex); +void lssproto_DT_recv(int fd,int titleindex); +void lssproto_FT_recv(int fd,char* data); +void lssproto_SKUP_send(int fd,int point); +void lssproto_SKUP_recv(int fd,int skillid); +void lssproto_KN_recv(int fd,int havepetindex,char* data); +void lssproto_WN_send(int fd,int windowtype,int buttontype,int seqno,int objindex,char* data); +void lssproto_WN_recv(int fd,int x,int y,int seqno,int objindex,int select,char* data); +void lssproto_EF_send(int fd,int effect,int level,char* option); +void lssproto_SE_send(int fd,int x,int y,int senumber,int sw); +void lssproto_SP_recv(int fd,int x,int y,int dir); +void lssproto_ClientLogin_recv(int fd,char* cdkey,char* passwd); +void lssproto_ClientLogin_send(int fd,char* result); +void lssproto_CreateNewChar_recv(int fd,int dataplacenum,char* charname,int imgno,int faceimgno,int vital,int str,int tgh,int dex,int earth,int water,int fire,int wind,int hometown); +void lssproto_CreateNewChar_send(int fd,char* result,char* data); +void lssproto_CharDelete_recv(int fd,char* charname); +void lssproto_CharDelete_send(int fd,char* result,char* data); +void lssproto_CharLogin_recv(int fd,char* charname); +void lssproto_CharLogin_send(int fd,char* result,char* data); + +#ifdef _PKSEVER_VER +void lssproto_CharList_recv( int fd, int star); +#else +void lssproto_CharList_recv(int fd); +#endif + +void lssproto_CharList_send(int fd,char* result,char* data); +void lssproto_CharLogout_recv(int fd, int flg); +void lssproto_CharLogout_send(int fd,char* result,char* data); +void lssproto_ProcGet_recv(int fd); +void lssproto_ProcGet_send(int fd,char* data); +void lssproto_PlayerNumGet_recv(int fd); +void lssproto_PlayerNumGet_send(int fd,int logincount,int player); +void lssproto_Echo_recv(int fd,char* test); +void lssproto_Echo_send(int fd,char* test); +void lssproto_Shutdown_recv(int fd,char* passwd,int min); + +void lssproto_TD_send(int fd, int index, char* message); +void lssproto_TD_recv(int fd, char* message); + +#ifdef _CHATROOMPROTOCOL // (不可开) Syu ADD 聊天室频道 +void lssproto_CHATROOM_recv(int fd , char *data) ; +void lssproto_CHATROOM_send(int fd , char* message ) ; +#endif + +#ifdef _NEWREQUESTPROTOCOL // (不可开) Syu ADD 新增Protocol要求细项 +void lssproto_RESIST_recv(int fd ) ; +void lssproto_RESIST_send(int fd , char* message ) ; +#endif +#ifdef _OUTOFBATTLESKILL // (不可开) Syu ADD 非战斗时技能Protocol +void lssproto_BATTLESKILL_recv(int fd, int iNum) ; +void lssproto_BATTLESKILL_send(int fd , char* message ) ; +#endif + +void lssproto_NU_send(int fd, int nu); + +void lssproto_FM_send(int fd, char* message); +void lssproto_FM_recv(int fd, char* message); + +void lssproto_WO_send(int fd,int effect); +void lssproto_PETST_recv( int fd, int nPet, int sPet); +void lssproto_BM_recv(int fd, int iindex); + +#ifdef _FIX_DEL_MAP // WON ADD 玩家抽地图送监狱 +void lssproto_DM_recv( int fd ); +#endif + +#ifdef _MIND_ICON +void lssproto_MA_recv(int fd, int x, int y, int nMind); +#endif + +#ifdef _ITEM_CRACKER +void lssproto_IC_send(int fd, int x, int y); +#endif + +#ifdef _ITEM_CRACKER +void lssproto_NC_send(int fd,int flg); +#endif + +#ifdef _CHECK_GAMESPEED +void lssproto_CS_recv( int fd ); +void lssproto_CS_send( int fd, int deltimes); +#endif + +#ifdef _TEAM_KICKPARTY +void lssproto_KTEAM_recv( int fd, int si); +#endif + +#ifdef _PETS_SELECTCON +void lssproto_PETS_send(int fd,int petarray,int result); +//#define LSSPROTO_PETST_SEND 107 +#endif + +#ifdef _STREET_VENDOR +void lssproto_STREET_VENDOR_recv(int fd,char *message); +void lssproto_STREET_VENDOR_send(int fd,char *message); +#endif + +#ifdef _RCLICK +void lssproto_RCLICK_recv(int fd, int type, char* data); +void lssproto_RCLICK_send(int fd, int type, char* data); +#endif + +#ifdef _JOBDAILY +void lssproto_JOBDAILY_recv(int fd,char *data); +void lssproto_JOBDAILY_send(int fd,char *data); +#endif + +#ifdef _TEACHER_SYSTEM +void lssproto_TEACHER_SYSTEM_recv(int fd,char *data); +void lssproto_TEACHER_SYSTEM_send(int fd,char *data); +#endif + +#ifdef _ADD_STATUS_2 +void lssproto_S2_recv(int fd,char *data); +void lssproto_S2_send(int fd,char *data); +#endif + +#endif + + + diff --git a/gmsv/include/lssproto_util.h b/gmsv/include/lssproto_util.h new file mode 100644 index 0000000..c06730c --- /dev/null +++ b/gmsv/include/lssproto_util.h @@ -0,0 +1,110 @@ +#ifndef _LSSPROTOUTIL_H_ +#define _LSSPROTOUTIL_H_ +#include +#include +#ifndef WIN32 +#include +#include +#endif +//#define lssproto__ENCRYPT +#define lssproto__NODEBUG +struct lssproto_ { + int (*write_func)(int,char*,int) ; /* write function */ + size_t workbufsize; /* size of work area */ + char *work,*arraywork,*escapework,*val_str,*ret_work; /* work areas which have same size */ + char *cryptwork,*jencodecopy,*jencodeout,*compresswork; /* these work has bigger size (3times)*/ + char** token_list; /* token list */ + unsigned long message_id; /*= 1, */ /* for generating message IDs */ +}; +#ifdef _LSSPROTOUTIL_C_ +struct lssproto_ lssproto = { + NULL, + 0, + NULL,NULL,NULL,NULL,NULL, + NULL,NULL,NULL,NULL, + NULL, + 1, +}; +char **lssproto_stringwrapper; +char lssproto_readlogfilename[1024]; +char lssproto_writelogfilename[1024]; +#else +extern char **lssproto_stringwrapper; +extern struct lssproto_ lssproto; +extern char lssproto_readlogfilename[1024]; +extern char lssproto_writelogfilename[1024]; +#endif + +char* lssproto_escapeString( char*a ); +char* lssproto_descapeString( char*a ); +void lssproto_splitString( char *src ); +void lssproto_strcpysafe( char *dest, char *src, int len ); +void lssproto_strcatsafe( char *dest , char *src , int maxlen ); +char*lssproto_mkstr_int( int i ); +char*lssproto_mkstr_u_int( unsigned int i ); +char*lssproto_mkstr_long( long l ); +char*lssproto_mkstr_u_long( unsigned long l ); +char*lssproto_mkstr_short( short s ); +char*lssproto_mkstr_u_short( short s ); +char*lssproto_mkstr_char( char c ); +char*lssproto_mkstr_u_char( char c); +char*lssproto_mkstr_string( char*a ); +char*lssproto_mkstr_float( float f ); +char*lssproto_mkstr_double( double d ); +char*lssproto_mkstr_int_array( int size , int *array ); +char*lssproto_mkstr_u_int_array( int size , int *array ); +char*lssproto_mkstr_short_array( int size , short *array ); +char*lssproto_mkstr_u_short_array(int size , short *array ); +char *lssproto_mkstr_char_array( int size , char *array ); +char *lssproto_mkstr_u_char_array( int size , unsigned char *array ); +char *lssproto_mkstr_float_array( int size , float *array ); +char *lssproto_mkstr_double_array( int size , double *array ); +int lssproto_demkstr_int( char*a ); +unsigned int lssproto_demkstr_u_int( char*a ); +long lssproto_demkstr_long( char*a ); +unsigned long lssproto_demkstr_u_long(char*a ); +short lssproto_demkstr_short( char*a ); +unsigned short lssproto_demkstr_u_short( char*a ); +char lssproto_demkstr_char( char*a ); +unsigned char lssproto_demkstr_u_char( char*a ); +float lssproto_demkstr_float( char*a ); +double lssproto_demkstr_double(char*a ); +char* lssproto_demkstr_string( char*a); +int *lssproto_demkstr_int_array( char**tk ,int *buf ,int start , int size ); +int *lssproto_demkstr_u_int_array( char **tk , int *buf , int start , int size ); +unsigned int *lssproto_demkstr_long_array( + char **tk , unsigned int *buf , int start , int size ); +unsigned long *lssproto_demkstr_u_long_array( + char **tk , unsigned long *buf , int start , int size ); +short *lssproto_demkstr_short_array( char **tk , short *buf , int start , int size ); +unsigned short*lssproto_demkstr_u_short_array( + char **tk , unsigned short *buf , int start , int size ); +char *lssproto_demkstr_char_array( char **tk , char *buf , int start , int size ); +unsigned char *lssproto_demkstr_u_char_array( + char **tk , unsigned char*buf , int start , int size ); +float *lssproto_demkstr_float_array( char **tk , float *buf , int start , int size ); +double *lssproto_demkstr_u_double_array( char **tk , double *buf , int start , int size ); +char *lssproto_wrapStringAddr( char *copy , int maxcopylen , char*src ); + +void lssproto_GetMessageInfo( int *id , char *funcname , int len,char **tk ); +int lssproto_ClientRead(void); +void lssproto_consumeLine(char *buf , int ofs ); +void lssproto_copyLine( char*src , char *out , int maxoutlen ); +void lssproto_Send( int fd , char *msg ); +int lssproto_AllocateCommonWork(int bufsiz); +unsigned int lssproto_GetNewMessageID(void); +void lssproto_CreateHeader(char*out, char *fname ); +void lssproto_CreateHeaderID( char *out,unsigned long msgid , char *fname ); +int lssproto_default_write_wrap( int fd , char *buf , int size ); +void lssproto_bzero( char *b , int siz ); +void lssproto_bcopy(char*s , char *d , int siz ); +char *lssproto_Ltoa( long v ); +char *lssproto_Ultoa( unsigned long v ); +void lssproto_DebugSend( int fd , char *msg ); +/* Modified by ringo to fasten int type transfer */ +char *lssproto_cnv10to62( int a, char *out, int outlen ); +int lssproto_a62toi( char *a ); +extern int JENCODE_KEY; +#endif + + diff --git a/gmsv/include/magic.h b/gmsv/include/magic.h new file mode 100644 index 0000000..07d957b --- /dev/null +++ b/gmsv/include/magic.h @@ -0,0 +1,67 @@ +#ifndef __MAGIC_H__ +#define __MAGIC_H__ + +/* 热诸 */ +int MAGIC_Use( int charaindex, int haveitemindex, int toindex); +int MAGIC_Recovery( int charaindex, int toindex,int marray, int mp ); +int MAGIC_OtherRecovery( int charaindex, int toindex, int marray, int mp ); +int MAGIC_FieldAttChange( int charaindex, int toindex, int marray, int mp ); +int MAGIC_StatusChange( int charaindex, int toindex, int marray, int mp ); +#ifdef _MAGIC_DEEPPOISON +int MAGIC_StatusChange2( int charaindex, int toindex, int marray, int mp ); +#endif +int MAGIC_StatusRecovery( int charaindex, int toindex, int marray, int mp ); +int MAGIC_MagicDef( int charaindex, int toindex, int marray, int mp ); +int MAGIC_Ressurect( int charaindex, int toindex, int marray, int mp ); +int MAGIC_AttReverse( int charaindex, int toindex, int marray, int mp ); +int MAGIC_ResAndDef( int charaindex, int toindex, int marray, int mp ); +#ifdef _OTHER_MAGICSTAUTS +int MAGIC_MagicStatusChange( int charaindex, int toindex, int marray, int mp ); +#endif +#ifdef __ATTACK_MAGIC +int MAGIC_AttMagic( int charaindex , int toindex , int marray , int mp ); +#endif +#ifdef _ITEM_METAMO +int MAGIC_Metamo( int charaindex, int toindex,int marray, int mp ); +#endif + +#ifdef _ITEM_ATTSKILLMAGIC +int MAGIC_AttSkill( int charaindex, int toindex,int marray, int mp ); +#endif +#ifdef _MAGIC_WEAKEN// vincent 精灵:虚弱 +int MAGIC_Weaken( int charaindex, int toindex, int marray, int mp ); +#endif +#ifdef _MAGIC_BARRIER// vincent 精灵:魔障 +int MAGIC_Barrier( int charaindex, int toindex, int marray, int mp ); +#endif +#ifdef _MAGIC_NOCAST// vincent 精灵:沉默 +int MAGIC_Nocast( int charaindex, int toindex, int marray, int mp ); +#endif +#ifdef _MAGIC_TOCALL +int MAGIC_ToCallDragon( int charaindex, int toindex,int marray, int mp ); +#endif + +//---------------------------------------------------------------------- +// 失奶 丞及匏 井日热诸 寞毛忒允 +// +int MAGIC_GetArrayNo( + int charaindex, // 平乓仿弁正奶件犯永弁旦 + int haveitemindex // 匀化月失奶 丞及匏 +); +// +//---------------------------------------------------------------------- +//------------------------------------------------------------------- +// +// 热诸毛 涛银丹 +// +int MAGIC_DirectUse( + int charaindex, // 银丹平乓仿及奶件犯永弁旦 + int marray, // 银丹热诸及奶件犯永弁旦 + int toindex, // 簿卞银丹" + int itemnum +); +// +//------------------------------------------------------------------- + +#endif + diff --git a/gmsv/include/magic_base.h b/gmsv/include/magic_base.h new file mode 100644 index 0000000..69d3f06 --- /dev/null +++ b/gmsv/include/magic_base.h @@ -0,0 +1,142 @@ +#ifndef __MAGIC_BASE_H__ +#define __MAGIC_BASE_H__ + +#include "util.h" + +typedef enum +{ + MAGIC_FIELD_ALL, /* 允屯化及桦赭匹银尹月 */ + MAGIC_FIELD_BATTLE, /* 爵 及心 */ + MAGIC_FIELD_MAP, /* 骚橘穴永皿晓及心 */ + +}MAGIC_FIELDTYPE; + +typedef enum +{ + MAGIC_TARGET_MYSELF, /* 愤坌及心 */ + MAGIC_TARGET_OTHER, /* 职及谛 愤坌殖戈) */ + MAGIC_TARGET_ALLMYSIDE, /* 蝈 */ + MAGIC_TARGET_ALLOTHERSIDE, /* 锹澎础蝈 */ + MAGIC_TARGET_ALL, /* 蝈化 */ + MAGIC_TARGET_NONE, /* 簿手蓟 请 卅中[ 豢支凶户及凛 */ + MAGIC_TARGET_OTHERWITHOUTMYSELF,/* 职及谛 愤坌殖引卅中) */ + MAGIC_TARGET_WITHOUTMYSELFANDPET, /* 愤坌午矢永玄动陆 */ + MAGIC_TARGET_WHOLEOTHERSIDE,/* 及扔奶玉蝈 */ + +#ifdef __ATTACK_MAGIC + + MAGIC_TARGET_SINGLE, // 针对敌方的某一人 + MAGIC_TARGET_ONE_ROW, // 针对敌方的某一列 + MAGIC_TARGET_ALL_ROWS, // 针对敌方的所有人 + +#endif +}MAGIC_TARGETTYPE; + +typedef enum +{ + MAGIC_ID, /* 栋 寞 */ + MAGIC_FIELD, /* 银尹月桦赭 */ + MAGIC_TARGET, /* 覆擂 */ + MAGIC_TARGET_DEADFLG, /* 韶氏分樊手覆擂卞殖户月井 */ +#ifdef __ATTACK_MAGIC + MAGIC_IDX , +#endif + MAGIC_DATAINTNUM, +}MAGIC_DATAINT; + +typedef enum +{ + MAGIC_NAME, /* 热诸 */ + MAGIC_COMMENT, /* 戊丢件玄*/ + MAGIC_FUNCNAME, /* 楮醒 */ + MAGIC_OPTION, /* 左皿扑亦件 */ + MAGIC_DATACHARNUM, +}MAGIC_DATACHAR; + +typedef struct tagMagic +{ + int data[MAGIC_DATAINTNUM]; + STRING64 string[MAGIC_DATACHARNUM]; + +}Magic; + +#ifdef __ATTACK_MAGIC + +typedef struct tagAttMagic +{ + unsigned int uiSpriteNum;// 此咒术在Spr_x.bin的编号 + unsigned int uiAttackType;// 攻击的方式:单人,整排( 轮流 ) , 整排( 轮流 ) , 整排( 同时 ) , 全体( 轮流 ) , 全体( 同时 ) + unsigned int uiSliceTime;// 轮流攻击时的时间差 + unsigned int uiShowType; // 显示的位置方式:中央、指定 + int siSx; // 显示的位置 - X轴 + int siSy; // 显示的位置 - Y轴 + unsigned int uiShowBehindChar; // 显示在人物的前方或下方 + unsigned int uiShakeScreen; // 是否震动画面 + unsigned int uiShakeFrom; // 震动画面的起始时间( 毫秒 ) + unsigned int uiShakeTo; // 震动画面的结束时间( 毫秒 _ + unsigned int uiPrevMagicNum; // 前置咒术的索引号( 0XFFFFFFFFFF 表示无前置咒术 ) + int siPrevMagicSx; // 前置咒术的显示位置 - X轴 + int siPrevMagicSy; // 前置咒术的显示位置 - Y轴 + int siPrevMagicOnChar; // 前置咒术显示在人物的前方或下方 + unsigned int uiPostMagicNum; // 後置咒术的索引号( 0XFFFFFFFF 表示无後置咒术 ) + int siPostMagicSx; // 後置咒术的显示位置 - X轴 + int siPostMagicSy; // 後置咒术的显示位置 - Y轴 + int siPostMagicOnChar; // 後置咒术显示在人物的前方或下方 + int siField[3][5]; // 攻击索引 +}AttMagic; + +#endif + +#ifdef _MAGIC_TOCALL + +typedef struct tagToCallMagic +{ + unsigned int uiSpriteNum;// 此咒术在Spr_x.bin的编号 + unsigned int uiAttackType;// 攻击的方式:单人,整排( 轮流 ) , 整排( 轮流 ) , 整排( 同时 ) , 全体( 轮流 ) , 全体( 同时 ) + unsigned int uiSliceTime;// 轮流攻击时的时间差 + unsigned int uiShowType; // 显示的位置方式:中央、指定 + int siSx; // 显示的位置 - X轴 + int siSy; // 显示的位置 - Y轴 + unsigned int uiShowBehindChar; // 显示在人物的前方或下方 + unsigned int uiShakeScreen; // 是否震动画面 + unsigned int uiShakeFrom; // 震动画面的起始时间( 毫秒 ) + unsigned int uiShakeTo; // 震动画面的结束时间( 毫秒 _ + unsigned int uiPrevMagicNum; // 前置咒术的索引号( 0XFFFFFFFFFF 表示无前置咒术 ) + int siPrevMagicSx; // 前置咒术的显示位置 - X轴 + int siPrevMagicSy; // 前置咒术的显示位置 - Y轴 + int siPrevMagicOnChar; // 前置咒术显示在人物的前方或下方 + unsigned int uiPostMagicNum; // 後置咒术的索引号( 0XFFFFFFFF 表示无後置咒术 ) + int siPostMagicSx; // 後置咒术的显示位置 - X轴 + int siPostMagicSy; // 後置咒术的显示位置 - Y轴 + int siPostMagicOnChar; // 後置咒术显示在人物的前方或下方 + int isPostDisappear; // 咒术一般攻击完时是否马上消失 + int ToCallMagicNo; // 召唤术的编号 +}ToCallMagic; + +#endif + +typedef int (*MAGIC_CALLFUNC)( int, int, int, int ); + +INLINE BOOL MAGIC_CHECKINDEX( int index ); +INLINE int MAGIC_getInt( int index, MAGIC_DATAINT element); +INLINE int MAGIC_setInt( int index, MAGIC_DATAINT element, int data); +INLINE char* MAGIC_getChar( int index, MAGIC_DATACHAR element); +INLINE BOOL MAGIC_setChar( int index ,MAGIC_DATACHAR element, char* new ); +int MAGIC_getMagicNum( void); +BOOL MAGIC_initMagic( char *filename); +BOOL MAGIC_reinitMagic( void ); + +#ifdef __ATTACK_MAGIC + +BOOL ATTMAGIC_initMagic( char *filename ); +BOOL ATTMAGIC_reinitMagic( void ); + +#endif + +int MAGIC_getMagicArray( int magicid); +MAGIC_CALLFUNC MAGIC_getMagicFuncPointer(char* name); +// Nuke +1 08/23 : For checking the validity of magic target +int MAGIC_isTargetValid( int magicid, int toindex); + +#endif + diff --git a/gmsv/include/magic_field.h b/gmsv/include/magic_field.h new file mode 100644 index 0000000..414195f --- /dev/null +++ b/gmsv/include/magic_field.h @@ -0,0 +1,10 @@ +#ifndef __MAGIC_FIELD_H__ +#define __MAGIC_FIELD_H__ + +/* 白奴□伙玉匹银迕允月热诸 */ + +int MAGIC_Recovery_Field( int charaindex, int magicindex); +int MAGIC_OtherRecovery_Field( int charaindex, int toindex, int magicindex); + +#endif + diff --git a/gmsv/include/map_deal.h b/gmsv/include/map_deal.h new file mode 100644 index 0000000..33281ce --- /dev/null +++ b/gmsv/include/map_deal.h @@ -0,0 +1,11 @@ +#ifndef __MAP_DEAL_H__ +#define __MAP_DEAL_H__ +BOOL MAP_walkAbleFromPoint( int ff, int fx, int fy, BOOL isfly ); +BOOL MAP_walkAble( int index,int ff, int fx, int fy); +void MAP_preovered( int index ); +void MAP_postovered( int index ); +BOOL MAP_sendArroundCharNeedFD( int fd,int charaindex ); +BOOL MAP_sendArroundChar(int charaindex); + +#endif + diff --git a/gmsv/include/map_util.h b/gmsv/include/map_util.h new file mode 100644 index 0000000..77e4b7a --- /dev/null +++ b/gmsv/include/map_util.h @@ -0,0 +1,7 @@ +#ifndef __MAP_UTIL_H__ +#define __MAP_UTIL_H__ + +BOOL MAP_getMapDataFromCharIndex( int index , int* map ); +BOOL MAP_getMapDataFromFXY( int f , int x , int y, int* map ); + +#endif diff --git a/gmsv/include/map_warppoint.h b/gmsv/include/map_warppoint.h new file mode 100644 index 0000000..ecbd39a --- /dev/null +++ b/gmsv/include/map_warppoint.h @@ -0,0 +1,21 @@ +#ifndef __MAPWARPPOINT_H__ +#define __MAPWARPPOINT_H__ + +#include "common.h" +#include "util.h" + +int MAPPOINT_InitMapWarpPoint( void); +void MAPPOINT_resetMapWarpPoint( int flg); +int MAPPOINT_loadMapWarpPoint( void); + +BOOL MAPPOINT_CHECKINDEX( int ps); +int MAPPOINT_getMPointEVType( int ps); + +int MAPPOINT_creatMapWarpObj( int pointindex, char *buf, int objtype); +int MAPPOINT_setMapWarpGoal( int ps, char *buf); +int MAPPOINT_setMapWarpFrom( int ps, char *buf); +int MAPPOINT_getMapWarpGoal( int ps, int ofl, int ox, int oy, int *fl, int *x, int *y); + +void MAPPOINT_MapWarpHandle( int charaindex, int ps, int ofl, int ox, int oy ); + +#endif diff --git a/gmsv/include/mclient.h b/gmsv/include/mclient.h new file mode 100644 index 0000000..f19c131 --- /dev/null +++ b/gmsv/include/mclient.h @@ -0,0 +1,82 @@ +#ifndef __MCLIENT_H__ +#define __MCLIENT_H__ + +#define MSPERSIONALKEY "20020729" + + +#define MPROTO_QUE_SEND 1001 +#define MPROTO_QUE_RECV 1002 + +#define MPROTO_NOTALK_RECV 1004 +#define MPROTO_GMTALK_SEND 1005 +#define MPROTO_GMTALK_RECV 1006 +#define MPROTO_HELLO_SEND 1007 +#define MPROTO_HELLO_RECV 1008 +#define MPROTO_WAEIKICK_SEND 1009 +#define MPROTO_WAEIKICK_RECV 1010 + +#define MPROTO_JAIL_RECV 1012 +#define MPROTO_MESSAGE_RECV 1014 + +#define MPROTO_TYPE_SEND 1016 + +#ifdef _GM_WARP_PLAYER // WON 传送玩家 +#define MPROTO_WARP_RECV 1017 +#endif + +#ifdef _RECAL_ASK_PLAYER // WON 要求人物资料 +#define MPROTO_RECALL_PLAYER_RECV 1018 +#define MPROTO_RECALL_PLAYER_SEND 1019 +#define MPROTO_RECALL_BACKUP_RECV 1020 +#define MPROTO_RECALL_BACKUP_SEND 1021 +#define MPROTO_RECALL_BACKUP_DATE_SEND 1022 +#define MPROTO_RECALL_BACKUP_OK_SEND 1023 +#endif + +#ifdef _RECAL_SEND_COUNT // WON 传送GS资讯 +#define MPROTO_RECALL_COUNT_SEND 1024 +#endif + +#ifdef _RECAL_SERVER_OFF // WON MSERVER 关闭 GS +#define MPROTO_RECALL_SERVER_OFF_RECV 1025 +#endif + +#ifdef _GSERVER_RUNTIME //传送GSERVER执行多少时间给MSERVER +#define MPROTO_RECALL_GSERVER_RUNTIME 1026 +#endif + +int mproto_ClientDispatchMessage(int fd,char* data); + +void mproto_Que_Recv(int fd,char* uid,int userfdid,char* ans); +void mproto_Que_Send( int fd, int uid, int index, char* question); + +void mproto_NoTalk_Recv(int fd,char* uid,int userfdid,int nTime); +void mproto_GMTalk_Recv(int fd,char* uid,int ntime,char* data); +void mproto_WaeiKick_Recv(int fd,char* uid,int userfdid); +void mproto_Jail_Recv(int fd,char* uid,int userfdid); + +void mproto_Message_Recv(int fd,char* uid,int userfdid,char* ans); + +int connectmServer(char* hostname,unsigned short port); +void mproto_Type_Send( int fd, int playernum, int itemuse); + + +#ifdef _GM_WARP_PLAYER // WON 传送玩家 +void mproto_WARP_Recv(int fd,char* uid,int userfdid,int floor, int x, int y); +#endif + +#ifdef _RECAL_ASK_PLAYER // WON 要求人物资料 +void mproto_RECALL_ASK_PLAYER_Recv(int fd, char *uid, int userfdid, int GmCliId, char *id, int char_num, int date, int backup_flag); +void mproto_RECALL_BACKUP_PLAYER_Recv(int fd, char *uid, int userfdid, int GmCliId, char *id, int char_num, int date, char *char_data, int backup_flag); +#endif + + +#ifdef _RECAL_SEND_COUNT // WON 传送GS资讯 +void recal_get_count(); +#endif + +#ifdef _GSERVER_RUNTIME +void gserver_runtime(); +#endif + +#endif diff --git a/gmsv/include/msignal.h b/gmsv/include/msignal.h new file mode 100644 index 0000000..452994b --- /dev/null +++ b/gmsv/include/msignal.h @@ -0,0 +1,8 @@ +#ifndef __SIGNAL_H__ +#define __SIGNAL_H__ + +void signalset( void ); +void shutdownProgram( void ); +void sigshutdown( int number ); + +#endif diff --git a/gmsv/include/net.h b/gmsv/include/net.h new file mode 100644 index 0000000..8be58d1 --- /dev/null +++ b/gmsv/include/net.h @@ -0,0 +1,346 @@ +#ifndef __NET_H__ +#define __NET_H__ + +#include "common.h" + +#include +#include +// Nuke +1 0902: For queuing control +#include + +#if USE_MTIO +#include +#endif + +#include "link.h" + + +#undef EXTERN +#ifdef __NET_C__ +#define EXTERN +#else +#define EXTERN extern +#endif + + + +/* + * 夫弘奶件仄化中卅中} 夫弘奶件仄化中月} 夫弘奶件 平乓仿综曰 + * 夫弘失它玄 ( 本□皮 ) , 夫弘失它玄 ( 失件夫永弁 ) + * N 反 NOT } W 反 WHILE , UL 反 UNLOCK 及仪 + */ +typedef enum +{ + NOTLOGIN, /* 夫弘奶件仄化中卅中 */ + LOGIN, /* 夫弘奶件 */ + WHILELOGIN, /* 夫弘奶件仄化中月 */ + WHILECREATE, /* 综匀化中月 */ + WHILELOGOUTSAVE, /* 夫弘失它玄及本□皮 */ + WHILECANNOTLOGIN, /* 夫弘奶件匹五卅井匀凶凛及失件夫永弁质 */ + WHILECHARDELETE, /* 平乓仿绰轮 */ + WHILEDOWNLOADCHARLIST, /* 平乓仿伉旦玄母它件夫□玉 */ + WHILECHANGEPASSWD, /* 由旦伐□玉 凳 */ + + WHILELOSTCHARSAVE, /* 夫旦玄匹平乓仿本□皮仄 */ + WHILELOSTCHARDELETE,/* 夫旦玄匹平乓仿壅仄 */ + + WHILECLOSEALLSOCKETSSAVE, /* closeallsockets 匹平乓仿本□皮仄 */ + WHILESAVEWAIT, /* 夫弘失它玄及本□皮卞垫仁蟆及赐 谨切 */ +}LoginType; + +/* 仄化中卅中}失市它件玄扔□田}弁仿奶失件玄}失玉丞 */ +typedef enum +{ + NOTDETECTED,AC,CLI,ADM +}ConnectType; + + +/* 扔□田互忡绣仄化云仁赢今 */ +#define CDKEYLEN 16 +#define PASSWDLEN 16 +/* 仇木及 凳反尕第(允月卅日 Char 及STRING64 手赝濠卅袄卞濠曰晶月仇午*/ +#define CHARNAMELEN 32 + +#define CLITIMEOUT_SEC 120 /* 弁仿奶失件玄井日read仄卅井匀凶日} + 仇及凛棉匹正奶丞失它玄}夫弘失它玄[ */ + +#define NET_STRING_SUCCESSFULL "successful" +#define NET_STRING_FAILED "failed" + +// 孔勾丹及 及伉□玉]仿奶玄田永白央扔奶术 +#define RBSIZE 65536 +#define WBSIZE (65536*6) +// 失市它件玄扔□田□迕 + +#define AC_RBSIZE (65536*48) +//#define AC_RBSIZE (65536*32) +//ttom modify because the second version had this +//#define AC_WBSIZE (65536*16) +extern int AC_WBSIZE; + +EXTERN int bindedfd; /*夫□市伙失玉伊旦卞田奶件玉仄凶末弗永玄*/ +EXTERN int acfd; /*失市它件玄扔□田卞戊生弁玄扑正末弗永玄*/ +EXTERN int ConnectLen; /*票及袄及赢今*/ +#define CONNECT_WINDOWBUFSIZE 7 + +//#ifdef _M_SERVER +EXTERN int mfd; +//#endif + +#ifdef _NPCSERVER_NEW +EXTERN int npcfd; +#endif + +/* 湘 凶切 */ +BOOL initConnect( int size ); +void endConnect( void ); +#define CONNECT_endOne( sockfd, lin) \ + _CONNECT_endOne( __FILE__, __LINE__, sockfd, lin) +BOOL _CONNECT_endOne( char *file, int fromline, int sockfd , int lin); +BOOL netloop( void ); +BOOL netloop_faster( void ); +int lsrpcClientWriteFunc( int fd , char* buf , int size ); +char* GetOneLine( int fd ); +BOOL initConnectOne( int sockfd, struct sockaddr_in* sin ,int len ); + + + +/* CA , CD */ +void CAcheck( void ); +void CAflush( int charaindex ); +void CAsend( int fd ); +void CDcheck( void ); +void CDflush( int charaindex ); +void CDsend( int fd ); +BOOL CONNECT_appendCAbuf( int fd , char* data, int size ); +BOOL CONNECT_appendCDbuf( int fd , char* data, int size ); + +/* Serverstate */ +void SERVSTATE_decrementCloseallsocketnum(void); +int SERVSTATE_getCloseallsocketnum( void ); +int SERVSTATE_SetAcceptMore( int nvalue ); +int SERVSTATE_getShutdown(void); +void SERVSTATE_setShutdown(int a); +int SERVSTATE_getLimittime(void); +int SERVSTATE_getDsptime(void); +void SERVSTATE_setDsptime(int a); +void SERVSTATE_setLimittime(int a); + + +/* 公及幻井 */ +void outputNetProcLog( int fd, int mode); +void chardatasavecheck( void ); +void closeAllConnectionandSaveData( void ); +BOOL SetShutdown( BOOL nvalue ); +int GetShutdown( void ); + +/* 伙□皿仄化腹绸楮醒 */ +int getfdFromCdkey( char* cd ); +int getfdFromCharaIndex( int charaindex ); +int getcdkeyFromCharaIndex( int charaindex , char *out, int outlen ); +int getCharindexFromFdid( int fdid ); +int getFdidFromCharaIndex( int charind ); +int getfdFromFdid( int fdid ); +int getfdFromCdkeyWithLogin( char* cd ); + + +/* 仄日屯 */ +INLINE int CONNECT_checkfd( int fd ); +BOOL CONNECT_isCLI( int fd ); +BOOL CONNECT_isAC( int fd ); +BOOL CONNECT_isUnderLogin( int fd ); +BOOL CONNECT_isWhileLogout( int fd ); +BOOL CONNECT_isWhileLogin( int fd ); +BOOL CONNECT_isNOTLOGIN( int fd ); +BOOL CONNECT_isLOGIN( int fd ); + +int CONNECT_getUse( int fd ); +int CONNECT_getUse_debug( int fd, int i ); + +void CONNECT_setCharaindex( int fd, int a ); +int CONNECT_getCharaindex( int fd ); +void CONNECT_getCdkey( int fd , char *out, int outlen ); +void CONNECT_setCdkey( int fd , char *in); +void CONNECT_getPasswd( int fd , char *out, int outlen ); +void CONNECT_setPasswd( int fd, char *in ); +void CONNECT_getCharname( int fd , char *out, int outlen ); +void CONNECT_setCharname( int fd, char *in ); +int CONNECT_getFdid( int fd ); +int CONNECT_getCtype( int fd ); +void CONNECT_setCtype( int fd , int a ); +void CONNECT_setDuelcharaindex( int fd, int i , int a ); +int CONNECT_getDuelcharaindex( int fd, int i ); +void CONNECT_setBattlecharaindex( int fd, int i , int a ); +int CONNECT_getBattlecharaindex( int fd, int i ); +void CONNECT_setJoinpartycharaindex( int fd, int i , int a); +int CONNECT_getJoinpartycharaindex( int fd, int i ); +void CONNECT_setTradecardcharaindex( int fd, int i , int a ); +int CONNECT_getTradecardcharaindex( int fd, int i ); +int CONNECT_getClosed( int fd ); +void CONNECT_setClosed( int fd, int a ); + +/* MT犯田永弘迕穴弁夫 */ +#define CONNECT_endOne_debug(a) CONNECT_endOne( (a) , __LINE__ ) + +/* 犯□正丑综楮醒(引月切允木匀升覆杀迕) */ +void CONNECT_setCDKEY( int sockfd, char *cd ); +void CONNECT_getCDKEY( int sockfd , char *out, int outlen ); +void CONNECT_setState( int fd, int s ); +int CONNECT_getState( int fd ); +void CONNECT_checkStatecount( int a ); +int CONNECT_checkStateSomeOne( int a, int maxcount); + +#if USE_MTIO +int MTIO_setup( void ); +void MTIO_join( void ); +#endif /* USE_MTIO */ + +BOOL CONNECT_acfdInitRB( int fd ); +BOOL CONNECT_acfdInitWB( int fd ); + +// Nuke +3 +int checkWalkTime(int fd); +int setBtime(int fd); + +#ifdef _BATTLE_TIMESPEED +//void setDefBTime( int fd, unsigned int times); +//unsigned int getDefBTime( int fd); +BOOL CheckDefBTime( int charaindex, int fd, unsigned int lowTime, unsigned int battletime, unsigned int addTime); +#endif + +#ifdef _CHECK_GAMESPEED +int getGameSpeedTime( int fd); +void setGameSpeedTime( int fd, int times); +#endif + +#ifdef _TYPE_TOXICATION +void setToxication( int fd, int flg); +int getToxication( int fd); +#endif +int checkBEOTime(int fd); +void sigusr1(int i); +void sigusr2(int i); // Arminius 6.26 signal +//ttom start +void CONNECT_set_watchmode(int fd, BOOL B_Watch); +BOOL CONNECT_get_watchmode(int fd); +void CONNECT_set_shutup(int fd,BOOL b_shut);//the avoid the user wash the screen +BOOL CONNECT_get_shutup(int fd); +unsigned long CONNECT_get_userip(int fd); +void CONNECT_set_pass(int fd,BOOL b_ps); +BOOL CONNECT_get_pass(int fd); +void CONNECT_set_state_trans(int fd,int a); +int CONNECT_get_state_trans(int fd); +//ttom end + +// CoolFish: +9 2001/4/18 +void CONNECT_setCloseRequest(int fd, int count); +void CONNECT_set_first_warp(int fd, BOOL b_ps); +BOOL CONNECT_get_first_warp(int fd); +int isDie(int fd); +void setDie(int fd); + +// Arminius 6/22 encounter +int CONNECT_get_CEP(int fd); +void CONNECT_set_CEP(int fd, int cep); + +// Arminius 7.12 login announce +int CONNECT_get_announced(int fd); +void CONNECT_set_announced(int fd, int a); + +// shan trade(DoubleCheck) begin +int CONNECT_get_confirm(int fd); +void CONNECT_set_confirm(int fd, BOOL b); +// end + +#ifdef _BLACK_MARKET +int CONNECT_get_BMList(int fd, int i); +void CONNECT_set_BMList(int fd,int i, int b); +#endif + +#ifdef _NO_WARP +// shan hjj add Begin +int CONNECT_get_seqno(int fd); +void CONNECT_set_seqno(int fd,int a); +int CONNECT_get_selectbutton(int fd); +void CONNECT_set_selectbutton(int fd, int a); +// shan End +#endif + +void CONNECT_setTradecharaindex( int fd, int i , int a); + +void CONNECT_setLastrecvtime( int fd, struct timeval *a ); +void CONNECT_getLastrecvtime( int fd, struct timeval *a ); +void CONNECT_setLastrecvtime_D( int fd, struct timeval *a ); +void CONNECT_getLastrecvtime_D( int fd, struct timeval *a ); +void CONNECT_SetBattleRecvTime( int fd, struct timeval *a ); +void CONNECT_GetBattleRecvTime( int fd, struct timeval *a ); +void CONNECT_setTradeTmp(int fd, char* a); +void CONNECT_getTradeTmp(int fd, char *trademsg, int trademsglen); +int checkNu(int fd); + +// Arminius 7.2 Ra's amulet +void setNoenemy(int fd); +void clearNoenemy(int fd); +int getNoenemy(int fd); +void setEqNoenemy(int fd, int level); +void clearEqNoenemy(int fd); +int getEqNoenemy(int fd); + +#ifdef _Item_MoonAct +void setEqRandenemy(int fd, int level); +void clearEqRandenemy(int fd); +int getEqRandenemy(int fd); +#endif + +#ifdef _CHIKULA_STONE +void setChiStone(int fd, int nums); +int getChiStone(int fd); +#endif + +// Arminius 7.31 cursed stone +void setStayEncount(int fd); +void clearStayEncount(int fd); +int getStayEncount(int fd); +void CONNECT_setBDTime( int fd, int nums); +int CONNECT_getBDTime( int fd); + +// Arminius debug +void CONNECT_setUse( int fd , int a); + +#ifdef _ITEM_PILEFORTRADE +void CONNECT_setTradeList( int fd, int num); +int CONNECT_getTradeList(int fd); +#endif + +#define QUEUE_LENGTH1 6 +#define QUEUE_LENGTH2 7 + +BOOL MSBUF_CHECKbuflen( int size, float defp); + + +#ifdef _GM_BROADCAST // WON ADD 客服公告系统 + + +typedef struct tag_broadcast_struct +{ + int time; // 讯息间隔时间 + int loop; // 执行次数 + int wait; // 公告完休息时间 + int next_msg; + int max_msg_line; // 讯息数 + char msg[10][128]; // 公告讯息 +}broadcast_struct; + +broadcast_struct BS; + +void Init_GM_BROADCAST( int loop, int time, int wait, char *msg ); +void GM_BROADCAST(); +#endif + + +#ifdef _DEATH_FAMILY_STRUCT // WON ADD 家族战存放胜负资料 +void Init_FM_PK_STRUCT(); +#endif + + +#endif diff --git a/gmsv/include/npc_Dengon.h b/gmsv/include/npc_Dengon.h new file mode 100644 index 0000000..b8835a1 --- /dev/null +++ b/gmsv/include/npc_Dengon.h @@ -0,0 +1,10 @@ +#ifndef __NPC_DENGON_H__ +#define __NPC_DENGON_H__ +BOOL NPC_DengonInit( int meindex ); +//void NPC_DengonSpecialTalked( int index, int talker, char *msg, int color ); +void NPC_DengonLooked( int meindex, int lookedindex ); +void NPC_DengonWindowTalked( int index, int talker, + int seqno, int select, char *data); + +#endif + diff --git a/gmsv/include/npc_action.h b/gmsv/include/npc_action.h new file mode 100644 index 0000000..f19d6df --- /dev/null +++ b/gmsv/include/npc_action.h @@ -0,0 +1,12 @@ +#ifndef __NPC_ACTION_H__ +#define __NPC_ACTION_H__ + +void NPC_ActionTalked( int meindex , int talkerindex , char *msg , + int color ); + +BOOL NPC_ActionInit( int meindex ); +void NPC_ActionWatch( int meobjindex, int objindex, CHAR_ACTION act, + int x,int y,int dir, int* opt,int optlen ); + +#endif + diff --git a/gmsv/include/npc_airplane.h b/gmsv/include/npc_airplane.h new file mode 100644 index 0000000..6e02872 --- /dev/null +++ b/gmsv/include/npc_airplane.h @@ -0,0 +1,12 @@ +#ifndef __NPC_AIRPLANE_H__ +#define __NPC_AIRPLANE_H__ + +BOOL NPC_AirInit( int meindex ); +void NPC_AirLoop( int meindex ); +void NPC_AirTalked( int meindex , int talkerindex , char *szMes , + int color ); +BOOL NPC_AirCheckAllowItem( int meindex, int charaindex, BOOL pickupmode); +BOOL NPC_AirCheckJoinParty( int meindex, int charaindex, BOOL msgflg); + +#endif +/*__NPC_AIRPLANE_H__*/ diff --git a/gmsv/include/npc_alldoman.h b/gmsv/include/npc_alldoman.h new file mode 100644 index 0000000..bc879a1 --- /dev/null +++ b/gmsv/include/npc_alldoman.h @@ -0,0 +1,10 @@ +#ifndef __NPC_ALLDOMAN_H__ +#define __NPC_ALLDOMAN_H__ + +BOOL NPC_AlldomanInit( int meindex ); +void NPC_AlldomanTalked( int meindex , int talker , char *msg ,int color ); +void NPC_AlldomanWindowTalked(int meindex, int talkerindex, int seqno, int select,char *data); +void NPC_AlldomanWriteStele( char *token ) ; +void NPC_Alldoman_S_WriteStele( char *ocdkey , char *oname , char *ncdkey , + char *nname , char *title , int level , int trns , int floor ) ; +#endif diff --git a/gmsv/include/npc_auctioneer.h b/gmsv/include/npc_auctioneer.h new file mode 100644 index 0000000..9499728 --- /dev/null +++ b/gmsv/include/npc_auctioneer.h @@ -0,0 +1,35 @@ +#ifndef __NPC_AUCTIONEER_H__ +#define __NPC_AUCTIONEER_H__ + +#ifdef _AUCTIONEER + +// 以下这两个常数要跟 saac/auction.h 里面的定义一致 +#define MAX_AUCTION 100 // 最大的委托数 +#define MAX_OVERDUE 500 // 过期的委托单保留数 (最小设定=过期保留天数*最大委托数) +#define AUC_PET 1 +#define AUC_ITEM 2 + +typedef struct tagAuctionTable { + int flag; // 0=(null) 1=使用中 2=过期 + char cdkey[32]; // 委托人 cdkey + char customer[32]; // 委托人人物名称 + int itemtype; // 1=宠物 2=道具 otherwise=error + char goods[4096]; // 物品 (宠物 or 道具) + char description[256]; // 叙述 + char listdata[512]; // 显示在表单的资料 + int price; // 标价 + int onsaletime; + int overduetime; +} AuctionTable; + +extern AuctionTable onsale[MAX_AUCTION]; // 拍卖中的道具、宠物 +//extern AuctionTable overdue[MAX_OVERDUE]; // 过期的道具、宠物 + +BOOL NPC_AuctioneerInit(int meindex); +void NPC_AuctioneerTalked(int meindex, int talkerindex, char *msg, int color); +void NPC_AuctioneerWindowTalked(int meindex, int talkerindex, int seqno, int select, char *data); +void NPC_AuctioneerLoop(int meindex); + +#endif /* _AUCTIONEER */ + +#endif diff --git a/gmsv/include/npc_bankman.h b/gmsv/include/npc_bankman.h new file mode 100644 index 0000000..8cd40c7 --- /dev/null +++ b/gmsv/include/npc_bankman.h @@ -0,0 +1,12 @@ +#ifndef __NPC_BANKMAN_H__ +#define __NPC_BANKMAN_H__ + +void NPC_BankmanTalked( int meindex , int talkerindex , char *msg , + int color ); + +BOOL NPC_BankmanInit( int meindex ); +void NPC_BankmanLooked( int meindex, int lookedindex ); +void NPC_BankmanWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data); + +#endif + diff --git a/gmsv/include/npc_bigsmallmaster.h b/gmsv/include/npc_bigsmallmaster.h new file mode 100644 index 0000000..bd2a3b2 --- /dev/null +++ b/gmsv/include/npc_bigsmallmaster.h @@ -0,0 +1,4 @@ +#ifndef __NPC_BIGSMALLMASTER_H__ +#define __NPC_BIGSMALLMASTER_H__ + +#endif diff --git a/gmsv/include/npc_bigsmallpet.h b/gmsv/include/npc_bigsmallpet.h new file mode 100644 index 0000000..5fff2cf --- /dev/null +++ b/gmsv/include/npc_bigsmallpet.h @@ -0,0 +1,4 @@ +#ifndef __NPC_BIGSMALLPET_H__ +#define __NPC_BIGSMALLPET_H__ + +#endif diff --git a/gmsv/include/npc_blackmarket.h b/gmsv/include/npc_blackmarket.h new file mode 100644 index 0000000..3f44a03 --- /dev/null +++ b/gmsv/include/npc_blackmarket.h @@ -0,0 +1,11 @@ +#ifndef __NPC_BLACKMARKET_H__ +#define __NPC_BLACKMARKET_H__ + +#ifdef _BLACK_MARKET +void NPC_BlackMarketTalked( int meindex, int talker, char *msg, int color); +BOOL NPC_BlackMarketInit( int meindex); +void NPC_BlackMarketWindowTalked( int index, int talker, int seqno, int select, char *data); + +#endif + +#endif diff --git a/gmsv/include/npc_bodylan.h b/gmsv/include/npc_bodylan.h new file mode 100644 index 0000000..57f2e30 --- /dev/null +++ b/gmsv/include/npc_bodylan.h @@ -0,0 +1,16 @@ +#ifndef __NPC_BODYLAN_H__ +#define __NPC_BODYLAN_H__ + +void NPC_BodyLanTalked( int meindex , int talkerindex , char *msg , + int color ); +BOOL NPC_BodyLanInit( int meindex ); +void NPC_BodyLanWatch( int meindex , int lookedindex); +void NPC_BodyLanWindowTalked( + int meindex, + int talkerindex, + int seqno, + int select, + char *data +); + +#endif diff --git a/gmsv/include/npc_bus.h b/gmsv/include/npc_bus.h new file mode 100644 index 0000000..98d5d6a --- /dev/null +++ b/gmsv/include/npc_bus.h @@ -0,0 +1,12 @@ +#ifndef __NPC_BUS_H__ +#define __NPC_BUS_H__ + +BOOL NPC_BusInit( int meindex ); +void NPC_BusLoop( int meindex ); +void NPC_BusTalked( int meindex , int talkerindex , char *szMes , + int color ); +BOOL NPC_BusCheckAllowItem( int meindex, int charaindex, BOOL pickupmode); +BOOL NPC_BusCheckJoinParty( int meindex, int charaindex, BOOL msgflg); + +#endif + diff --git a/gmsv/include/npc_charm.h b/gmsv/include/npc_charm.h new file mode 100644 index 0000000..73785a7 --- /dev/null +++ b/gmsv/include/npc_charm.h @@ -0,0 +1,11 @@ +#ifndef __NPC_CHARM_H__ +#define __NPC_CHARM_H__ + +void NPC_CharmTalked( int meindex , int talkerindex , char *msg , + int color ); +BOOL NPC_CharmInit( int meindex ); +void NPC_CharmWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data); +void NPC_CharmLooked( int meindex , int lookedindex); + +#endif + diff --git a/gmsv/include/npc_checkman.h b/gmsv/include/npc_checkman.h new file mode 100644 index 0000000..77fbf31 --- /dev/null +++ b/gmsv/include/npc_checkman.h @@ -0,0 +1,11 @@ +#ifndef __NPC_CHECKMAN_H__ +#define __NPC_CHECKMAN_H__ + +void NPC_CheckManTalked( int meindex , int talkerindex , char *msg , + int color ); +BOOL NPC_CheckManInit( int meindex ); +void NPC_CheckManWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data); +void NPC_CheckManLooked( int meindex , int lookedindex); + +#endif + diff --git a/gmsv/include/npc_door.h b/gmsv/include/npc_door.h new file mode 100644 index 0000000..003c71a --- /dev/null +++ b/gmsv/include/npc_door.h @@ -0,0 +1,31 @@ +#ifndef __NPC_DOOR_H__ +#define __NPC_DOOR_H__ + +BOOL NPC_DoorInit(int meindex ); +void NPC_DoorTalked( int meindex , int talkerindex , char *msg , int color ); +void NPC_DoorPreAttacked(int meindex , int attacker , float *dm); +void NPC_DoorPostOver( int meindex , int movedindex ); +void NPC_DoorOff( int meindex , int movedindex ); +void NPC_DoorWatch( int meindex, int moveindex, CHAR_ACTION act, + int x, int y, int dir, int* opt, int optlen ); +int NPC_DoorSearchByName( char *name ); +int NPC_DoorSearchByPosition( int fl , int x, int y ); +void NPC_DoorLooked( int meindex , int lookedindex ); +BOOL NPC_DoorRefreshOverFlg( int meind ); + + +/* 职及NPC井日丑综今木月迕[NPC棉皿夫玄戊伙卞勾中化反 npc_stepswitch.c毛心欠 */ +int NPC_DoorSetPasswd( int meindex, char *pas ); +int NPC_DoorGetPasswd( int meindex, char *out , int len ); +void NPC_DoorFlip(int meindex , int doindex); +void NPC_DoorClose(int meindex , int doindex); +void NPC_DoorOpen(int meindex , int doindex ); +void NPC_DoorAddSwitchCounter( int meindex , int i , int talker ); +void NPC_DoorSetSwitchCounter( int meindex, int i , int doindex ); + +#endif + + + + + diff --git a/gmsv/include/npc_doorman.h b/gmsv/include/npc_doorman.h new file mode 100644 index 0000000..52e32de --- /dev/null +++ b/gmsv/include/npc_doorman.h @@ -0,0 +1,9 @@ +#ifndef __NPC_DOORMAN_H__ +#define __NPC_DOORMAN_H__ + +BOOL NPC_DoormanInit( int meindex ); +void NPC_DoormanTalked( int meindex , int talkerindex , char *msg , + int color ); + +#endif + diff --git a/gmsv/include/npc_duelranking.h b/gmsv/include/npc_duelranking.h new file mode 100644 index 0000000..3c7f5d2 --- /dev/null +++ b/gmsv/include/npc_duelranking.h @@ -0,0 +1,15 @@ +#ifndef __NPC_DUELRANKING_H__ +#define __NPC_DUELRANKING_H__ + +BOOL NPC_DuelrankingInit( int meindex ); +void NPC_DuelrankingLooked( int meindex, int lookedindex ); +void NPC_DuelrankingWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data); +void NPC_Duelranking_PrintRanking( char *data, int count_start, int fdid, int msgid2); +void NPC_Duelranking_CallMyRanking( int count, int msgid, int msgid2); + +#ifdef _DEATH_CONTEND +void NPC_Duelrankingloop( int meindex); +#endif + +#endif + diff --git a/gmsv/include/npc_eventaction.h b/gmsv/include/npc_eventaction.h new file mode 100644 index 0000000..5853fff --- /dev/null +++ b/gmsv/include/npc_eventaction.h @@ -0,0 +1,123 @@ +#ifndef _PRO_NPCFIX_H +#define _PRO_NPCFIX_H +//ANDY_Edit +BOOL ActionNpc_CheckMenuFree( int meindex, int toindex, char *npcarg, int nums); +BOOL ActionNpc_CheckFree( int meindex, int toindex, char *npcarg); +BOOL Action_RunDoEventAction( int meindex, int toindex, char *buf1); +BOOL ActionNpc_WarpPoint(int meindex,int talker,char *npcarg); +BOOL Action_PartyCheck( int meindex, int talker); +BOOL NPC_ActionAddGold( int talker, int Golds); +BOOL NPC_ActionDelGold( int talker,char *buf); +// WON ADD +BOOL NPC_ActionAddGold2( int talker,char *buf); +BOOL NPC_ActionDelPet( int toindex,char *buf); +#ifdef _NPC_NewDelPet +BOOL NPC_ActionNewDelPet( int talker,char *msg); +#endif +BOOL NPC_ActionAddPet( int talker, char *buf); +BOOL NPC_ActionDelItem( int talker,char *buf); +BOOL NPC_ActionAddItem( int talker, char *buf); +BOOL NPC_ActionSetEend( int talkerindex, char * buf); +BOOL NPC_ActionSetNow( int toindex, char * buf); +BOOL NPC_ActionClearEvent( int toindex, char * buf); + +BOOL NPC_ActionCheckTrans(int meindex,int talker,int trans,int flg); +BOOL NPC_ActionLevelCheck(int meindex,int talker,int level,int flg); + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 +BOOL NPC_ActionClassCheck( int meindex,int talker,int p_class,int flg); + +BOOL NPC_ActionSkillCheck( int meindex,int talker,int skillId,int flg); +BOOL NPC_ActionSkillNumCheck( int meindex,int talker,int sknum,int flg); + +BOOL NPC_ActionSkillPointAndSkillCheck( int meindex,int talker,int sknum,int flg); + + +BOOL NPC_ActionCleanProfession( int toindex, char *buf); +BOOL NPC_ActionAddProfessionSkillPoint( int toindex, char *buf ); +#endif + +BOOL NPC_ActionGoldCheck(int meindex,int talker,int Golds,int flg); +BOOL NPC_ActionPartyCheck( int toindex, int nums, int flg); +BOOL NPC_ActionReItemCheck( int toindex, int nums, int flg); +BOOL NPC_ActionRePetCheck( int toindex, int nums, int flg); +BOOL ActionCheckMyPet( int meindex, int talker, int petLv, int flg, int petid); +BOOL NPC_ActionBigSmallLastCheck(int point1,int mypoint,int flg); + +BOOL NPC_ActionItemCheck(int meindex,int talker,int itemNo, int flg); +BOOL NPC_ActioneEquitCheck(int meindex,int talker,int itemNo, int flg); + +BOOL NPC_ActionFreeIfCheck(int meindex,int talker, char* buf, char *opt, int kosuu,int flg, int temp); + +BOOL NPC_ActionBigSmallCheck(int meindex,int talker,char* buf); +BOOL NPC_ActionPassCheck( int meindex, int talker, char *buf); +BOOL NPC_ActionWarpManReduce(int meindex,int talker,char *buf); +#ifdef _NPC_ActionFreeCmp +BOOL NPC_ActionWarpManReduce2(int meindex,int talker,char *buf); +#endif +#ifdef _NPCCHANGE_PLAYERIMG //andy +BOOL NPC_ActionChangePlayerBBI( int meindex, int charindex, char *Img); +BOOL NPC_CheckPlayerBBI( int meindex, int charindex, int BBI, int flg); +#endif + +BOOL showString( int meindex, char *showstr,int flg); +BOOL NPC_getTimeXYPoint( int meindex, int Mode); +BOOL NPC_getTimeData( int meindex, char *npcarg, int *born, int *dead, int loopspeed); +void NPC_TimeDefineDo( int meindex, int born, int dead, int typeMode); +BOOL NPC_CheckTimeDefine( char *timetype); + +void GetRand_WarpPoint( char *buf, int *fl, int *x, int *y ); +#ifdef _EMENY_CHANCEMAN +int NPC_EmenyChanceCheck( int meindex, int charaindex, char *arg); +int NPC_DischargePartyForSex( int meindex, int charaindex, int fl, int x, int y, int fsex); +#endif + + +#ifdef _ACTION_GMQUE +BOOL CheckGmQueflg( int talker,int nCount,int flg); +BOOL GMQUE_InSertQue( int meindex, int charaindex); +BOOL GMQUE_getQueStr( int meindex, int charaindex); +void GMQUE_cleanQueStr( int nindex); +void GMQUE_showQueStr( int meindex, int charaindex); +BOOL GMQUE_CheckQueStr( int meindex, int charaindex, int count); +BOOL GMQUE_DelQueStrPet( int meindex, int charaindex, int count); +BOOL GMQUE_AddQueStrTrophy( int meindex, int charaindex); +#endif + +BOOL NPC_ActionDuelRankCheck(int meindex,int talker,int rank,int flg); +BOOL NPC_ActionDuelPointCheck(int meindex,int talker,int rank,int flg); + + +#ifdef _ACTION_BULLSCR +BOOL NPC_ActionCheckABulltime( int meindex,int talker,int nCount,int flg); +BOOL NPC_ActionCheckABullstart( int meindex,int talker,int start,int flg); +BOOL NPC_ActionCheckABullscore( int meindex,int talker,int score,int flg); +BOOL NPC_ActionCheckABullEvent( int meindex,int talker); + +#endif + +#ifdef _TREASURE_BOX +BOOL NPC_ActionTreasureTypeCheck( int meindex, int level, int type, int flg); +#endif +BOOL NPC_ActionTreasureRandItemGet(int meidex,int talker,int rand_j,char *buf); +void NPC_ActionLevelAndTransUp( int meindex, int charindex, int level, + int skillpoint, int exp, int ridepet); +#ifdef _ITEM_PILENUMS +BOOL NPC_ActionDoPileDelItem( int toindex, int itemID, int num); +BOOL NPC_DelItem( int toindex, int ti, int num); +#endif +void NPC_ActionDoPileClearItem( int toindex, int itemID); + + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 +int PROFESSION_RESTORE_POINT( int charaindex ); +#endif + + +#ifdef _NPC_ADDWARPMAN1 +BOOL NPC_ActionPartyCountCheck( int toindex, int nums, int flg); +BOOL NPC_ActionManCountCheck( int toindex, int nums, int flg);//检查男生人数 +BOOL NPC_ActionWomanCountCheck( int toindex, int nums, int flg);//检查女生人数 +#endif + +#endif diff --git a/gmsv/include/npc_exchangeman.h b/gmsv/include/npc_exchangeman.h new file mode 100644 index 0000000..aa78b7f --- /dev/null +++ b/gmsv/include/npc_exchangeman.h @@ -0,0 +1,22 @@ +#ifndef __NPC_EXCHANGEMAN_H__ +#define __NPC_EXCHANGEMAN_H__ + +void NPC_ExChangeManTalked( int meindex , int talkerindex , char *msg , + int color ); +BOOL NPC_ExChangeManInit( int meindex ); +void NPC_ExChangeManWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data); + + + +BOOL NPC_EventCheckFlg( int talker, int shiftbit); +BOOL NPC_NowEventCheckFlg( int talker, int shiftbit); + +// Arminius 8.14 move from .c (for pet talk) +BOOL NPC_EventBigSmallCheck(int meindex,int talker,char* buf); + +#endif + + + /*__NPC_EXCHANGEMAN_H__*/ + + diff --git a/gmsv/include/npc_familyman.h b/gmsv/include/npc_familyman.h new file mode 100644 index 0000000..57e08d4 --- /dev/null +++ b/gmsv/include/npc_familyman.h @@ -0,0 +1,13 @@ +#ifndef __NPC_FAMILYMAN_H__ +#define __NPC_FAMILYMAN_H__ + +void NPC_FamilymanTalked( int meindex , int talkerindex , char *msg , + int color ); + +BOOL NPC_FamilymanInit( int meindex ); +void NPC_FamilymanLooked( int meindex, int lookedindex ); +void NPC_FamilymanWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data); + +#endif + +/*__NPC_FAMILYMAN_H__*/ diff --git a/gmsv/include/npc_fmdengon.h b/gmsv/include/npc_fmdengon.h new file mode 100644 index 0000000..858f170 --- /dev/null +++ b/gmsv/include/npc_fmdengon.h @@ -0,0 +1,10 @@ +#ifndef __NPC_FMDENGON_H__ +#define __NPC_FMDENGON_H__ + +BOOL NPC_FmDengonInit( int meindex ); +void NPC_FmDengonLooked( int meindex, int lookedindex ); +void NPC_FmDengonWindowTalked( int index, int talker, int seqno, int select, char *data); + +#endif + +/*__NPC_FMDENGON_H__*/ diff --git a/gmsv/include/npc_fmhealer.h b/gmsv/include/npc_fmhealer.h new file mode 100644 index 0000000..2c62fce --- /dev/null +++ b/gmsv/include/npc_fmhealer.h @@ -0,0 +1,9 @@ +#ifndef __NPC_FMHEALER_H__ +#define __NPC_FMHEALER_H__ + +void NPC_FmHealerTalked( int meindex , int talkerindex , char *msg , + int color ); +BOOL NPC_FmHealerInit( int meindex ); + +#endif +/*__NPC_FMHEALER_H__*/ diff --git a/gmsv/include/npc_fmletter.h b/gmsv/include/npc_fmletter.h new file mode 100644 index 0000000..f60aef5 --- /dev/null +++ b/gmsv/include/npc_fmletter.h @@ -0,0 +1,13 @@ +#ifndef __NPC_FMLETTER_H__ +#define __NPC_FMLETTER_H__ + +void NPC_FmLetterTalked( int meindex , int talkerindex , char *msg , + int color ); + +BOOL NPC_FmLetterInit( int meindex ); +void NPC_FmLetterLooked( int meindex, int lookedindex ); +void NPC_FmLetterWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data); + +#endif + +/*__NPC_FMLETTER_H__*/ diff --git a/gmsv/include/npc_fmpkcallman.h b/gmsv/include/npc_fmpkcallman.h new file mode 100644 index 0000000..8702b1c --- /dev/null +++ b/gmsv/include/npc_fmpkcallman.h @@ -0,0 +1,10 @@ +#ifndef __NPC_FMPKCALLMAN_H__ +#define __NPC_FMPKCALLMAN_H__ + +void NPC_FMPKCallManTalked(int meindex, int talkerindex, char *msg, int color); +BOOL NPC_FMPKCallManInit(int meindex); +void NPC_FMPKCallManWindowTalked(int meindex, int talkerindex, int seqno, + int select, char *data); + +#endif +/*__NPC_FMPKCALLMAN_H__*/ diff --git a/gmsv/include/npc_fmpkman.h b/gmsv/include/npc_fmpkman.h new file mode 100644 index 0000000..2053f02 --- /dev/null +++ b/gmsv/include/npc_fmpkman.h @@ -0,0 +1,10 @@ +#ifndef __NPC_FMPKMAN_H__ +#define __NPC_FMPKMAN_H__ + +void NPC_FMPKManTalked(int meindex, int talkerindex, char *msg, int color); +BOOL NPC_FMPKManInit(int meindex); +void NPC_FMPKManWindowTalked(int meindex, int talkerindex, int seqno, + int select, char *data); + +#endif +/*__NPC_FMPKMAN_H__*/ diff --git a/gmsv/include/npc_fmwarpman.h b/gmsv/include/npc_fmwarpman.h new file mode 100644 index 0000000..4bb0b60 --- /dev/null +++ b/gmsv/include/npc_fmwarpman.h @@ -0,0 +1,30 @@ +#ifndef __NPC_FMWARPMAN_H__ +#define __NPC_FMWARPMAN_H__ + +void NPC_FMWarpManTalked(int meindex, int talkerindex, char *msg, int color); +BOOL NPC_FMWarpManInit(int meindex); +void NPC_FMWarpManWindowTalked(int meindex, int talkerindex, int seqno, + int select, char *data); +void NPC_FMWarpManLoop(int meindex); +void NPC_GetPKFMNum(int floor, int fmindex1, int fmindex2, int *num1, int *num2); + + + +#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令 +void set_fm_pk_score( int win_index, int loser_index, char *win_name, char *loser_name ); +void swap_fm_pk_struct( int no1, int no2 ); +int get_fm_pk_index( int win_index ); +void read_fm_pk_score(); +void save_fm_pk_score(); + +#endif + + + + + + + + +#endif +/*__NPC_FMWARPMAN_H__*/ diff --git a/gmsv/include/npc_freepetskillshop.h b/gmsv/include/npc_freepetskillshop.h new file mode 100644 index 0000000..73bc822 --- /dev/null +++ b/gmsv/include/npc_freepetskillshop.h @@ -0,0 +1,10 @@ +#ifndef __NPC_FREEPETSKILLSHOP_H__ +#define __NPC_FREEPETSKILLSHOP_H__ + +BOOL NPC_FreePetSkillShopInit( int meindex ); +void NPC_FreePetSkillShopTalked( int meindex , int talkerindex , char *msg , int color ); +void NPC_FreePetSkillShopWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data); +//void NPC_PetSkillShopLooked( int meindex , int lookedindex); +BOOL NPC_CHECKFREEPETSKILL( int toindex, int petindex, int skillID); +#endif + diff --git a/gmsv/include/npc_gamblebank.h b/gmsv/include/npc_gamblebank.h new file mode 100644 index 0000000..017f2c1 --- /dev/null +++ b/gmsv/include/npc_gamblebank.h @@ -0,0 +1,9 @@ +#ifndef __NPC_GAMBLEBANK_H__ +#define __NPC_GAMBLEBANK_H__ +BOOL NPC_GambleBankInit( int meindex ); +void NPC_GambleBankLoop( int meindex); +void NPC_GambleBankTalked( int meindex , int talkerindex , char *msg , int color ); +void NPC_GambleBankWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data); +#endif + + diff --git a/gmsv/include/npc_gamblemaster.h b/gmsv/include/npc_gamblemaster.h new file mode 100644 index 0000000..9c28474 --- /dev/null +++ b/gmsv/include/npc_gamblemaster.h @@ -0,0 +1,9 @@ +#ifndef NPC_Gamble_Master_ +#define NPC_Gamble_Master_ + +BOOL NPC_Gamble_MasterInit( int meindex ); +void NPC_Gamble_MasterLoop( int meindex ); +void NPC_Gamble_MasterWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data); +void NPC_Gamble_MasterTalked( int meindex , int talkerindex , char *szMes , int color ); +#endif + diff --git a/gmsv/include/npc_gambleroulette.h b/gmsv/include/npc_gambleroulette.h new file mode 100644 index 0000000..0dacc59 --- /dev/null +++ b/gmsv/include/npc_gambleroulette.h @@ -0,0 +1,9 @@ +#ifndef NPC_Gamble_Roulette_ +#define NPC_Gamble_Roulette_ + +BOOL NPC_Gamble_RouletteInit( int meindex ); +void NPC_Gamble_RouletteLoop( int meindex ); +void NPC_Gamble_RouletteWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data); +void NPC_Gamble_RouletteTalked( int meindex , int talkerindex , char *szMes , int color ); +#endif + diff --git a/gmsv/include/npc_healer.h b/gmsv/include/npc_healer.h new file mode 100644 index 0000000..70ff815 --- /dev/null +++ b/gmsv/include/npc_healer.h @@ -0,0 +1,10 @@ +#ifndef __NPC_HEALER_H__ +#define __NPC_HEALER_H__ + +void NPC_HealerTalked( int meindex , int talkerindex , char *msg , + int color ); + +BOOL NPC_HealerInit( int meindex ); + +#endif + /*__NPC_HEALER_H__*/ diff --git a/gmsv/include/npc_itemchange.h b/gmsv/include/npc_itemchange.h new file mode 100644 index 0000000..63ac849 --- /dev/null +++ b/gmsv/include/npc_itemchange.h @@ -0,0 +1,12 @@ +#ifndef _ITEM_CHANGE_ +#define _ITEM_CHANGE_ + +//#ifdef _CFREE_petskill +BOOL NPC_ItemchangeManInit( int meindex ); +void NPC_ItemchangeManTalked( int meindex, int talkerindex, char *msg, int color ); +void NPC_ItemchangeManWindowTalked( int meindex, int talkerindex, int seqno, + int select, char *data); +void NPC_ItemchangeManLoop( int meindex); + +#endif + diff --git a/gmsv/include/npc_itemshop.h b/gmsv/include/npc_itemshop.h new file mode 100644 index 0000000..f6d757b --- /dev/null +++ b/gmsv/include/npc_itemshop.h @@ -0,0 +1,12 @@ +#ifndef __NPC_ITEMSHOP_H__ +#define __NPC_ITEMSHOP_H__ + +void NPC_ItemShopTalked( int meindex , int talkerindex , char *msg , + int color ); +BOOL NPC_ItemShopInit( int meindex ); +void NPC_ItemShopWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data); +void NPC_ItemShopLooked( int meindex , int lookedindex); + + +#endif + /*__NPC_ITEMSHOP_H__*/ diff --git a/gmsv/include/npc_janken.h b/gmsv/include/npc_janken.h new file mode 100644 index 0000000..411abb8 --- /dev/null +++ b/gmsv/include/npc_janken.h @@ -0,0 +1,10 @@ +#ifndef __NPC_JANKEN_H__ +#define __NPC_JANKEN_H__ + +void NPC_JankenTalked( int meindex , int talkerindex , char *msg , + int color ); +BOOL NPC_JankenInit( int meindex ); +void NPC_JankenWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data); + +#endif + /*__NPC_JANKEN_H__*/ diff --git a/gmsv/include/npc_luckyman.h b/gmsv/include/npc_luckyman.h new file mode 100644 index 0000000..36c4db4 --- /dev/null +++ b/gmsv/include/npc_luckyman.h @@ -0,0 +1,10 @@ +#ifndef __NPC_LUCKYMAN_H__ +#define __NPC_LUCKYMAN_H__ + +void NPC_LuckyManTalked( int meindex , int talkerindex , char *msg , + int color ); +BOOL NPC_LuckyManInit( int meindex ); +void NPC_LuckyManWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data); + +#endif +/*__NPC_LUCKYMAN_H__*/ diff --git a/gmsv/include/npc_makepair.h b/gmsv/include/npc_makepair.h new file mode 100644 index 0000000..f0d775d --- /dev/null +++ b/gmsv/include/npc_makepair.h @@ -0,0 +1,22 @@ +#ifndef _MAKEPAIR_MAN_H +#define _MAKEPAIR_MAN_H + +void NPC_MakePairManTalked( int meindex, int talkerindex, char *msg, int color ); +BOOL NPC_MakePairManInit( int meindex ); +void NPC_MakePairManWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data); +void NPC_MakePairManLoop( int meindex); + +typedef struct _tagPairMenu{ + char cdKey[256]; + char name[256]; + int pindex; + int forindex; + int code; + int use; +}PairMenu; + + + +#endif + + diff --git a/gmsv/include/npc_manorsman.h b/gmsv/include/npc_manorsman.h new file mode 100644 index 0000000..284d937 --- /dev/null +++ b/gmsv/include/npc_manorsman.h @@ -0,0 +1,19 @@ +#ifndef __NPC_MANORSMAN_H__ +#define __NPC_MANORSMAN_H__ + +BOOL NPC_ManorSmanInit(int meindex); +void NPC_ManorSmanTalked(int meindex, int talkerindex, char *msg, int color); +void NPC_ManorSmanWindowTalked(int meindex, int talkerindex, + int seqno, int select, char *data); +void NPC_ManorSmanLoop(int meindex); +//andy_123 +int NPC_getManorsmanListIndex( int ID); +#ifndef _NEW_MANOR_LAW +void NPC_ManorSavePKSchedule(int meindex, int toindex, int flg); +#else +void NPC_ManorSavePKSchedule(int meindex, int toindex, int flg,int setTime,struct tm tm1); +void NPC_ManorAddToSchedule(int meindex,int charaindex); +#endif + +#endif +/*__NPC_MANORSMAN_H__*/ diff --git a/gmsv/include/npc_mic.h b/gmsv/include/npc_mic.h new file mode 100644 index 0000000..501e0d4 --- /dev/null +++ b/gmsv/include/npc_mic.h @@ -0,0 +1,9 @@ +#ifndef __NPC_MIC_H__ +#define __NPC_MIC_H__ + +BOOL NPC_MicInit(int meindex ); +void NPC_MicTalked( int meindex , int talkerindex , char *msg , int color ); + +#endif + /*__NPC_MIC_H__*/ + diff --git a/gmsv/include/npc_msg.h b/gmsv/include/npc_msg.h new file mode 100644 index 0000000..f0f875b --- /dev/null +++ b/gmsv/include/npc_msg.h @@ -0,0 +1,9 @@ +#ifndef _NPC_MSG_H_ +#define _NPC_MSG_H_ + +BOOL NPC_MsgInit( int meindex ); +void NPC_MsgLooked( int meindex , int lookedindex ); + + +#endif + diff --git a/gmsv/include/npc_mtradenpcman.h b/gmsv/include/npc_mtradenpcman.h new file mode 100644 index 0000000..93135bf --- /dev/null +++ b/gmsv/include/npc_mtradenpcman.h @@ -0,0 +1,10 @@ +#ifndef __NPC_MAPTRADEMAN_H__ +#define __NPC_MAPTRADEMAN_H__ + +BOOL MapTradeManInit( int meindex ); +void MapTradeManLoop( int meindex); +void MapTradeManTalked( int meindex , int talkerindex , char *msg , int color ); +void MapTradeManWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data); + +#endif + diff --git a/gmsv/include/npc_newnpcman.h b/gmsv/include/npc_newnpcman.h new file mode 100644 index 0000000..9ad31b7 --- /dev/null +++ b/gmsv/include/npc_newnpcman.h @@ -0,0 +1,8 @@ +#ifndef __NPC_NEWNPCMAN_H__ +#define __NPC_NEWNPCMAN_H__ +BOOL NPC_NewNpcManInit( int meindex ); +void NPC_NewNpcManLoop( int meindex); +void NPC_NewNpcManTalked( int meindex , int talkerindex , char *msg , int color ); +void NPC_NewNpcManWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data); +#endif + diff --git a/gmsv/include/npc_npcenemy.h b/gmsv/include/npc_npcenemy.h new file mode 100644 index 0000000..62134e4 --- /dev/null +++ b/gmsv/include/npc_npcenemy.h @@ -0,0 +1,17 @@ +#ifndef __NPC_NPCENEMY_H__ +#define __NPC_NPCENEMY_H__ + +void NPC_NPCEnemyTalked( int meindex , int talkerindex , char *msg , + int color ); + +BOOL NPC_NPCEnemyInit( int meindex ); +int NPC_NPCEnemy_Dying( int battleindex, int meindex ); +int NPC_NPCEnemy_Encount( int meindex, int charaindex, int mode); +void NPC_NPCEnemyWatch( int meobjindex, int objindex, CHAR_ACTION act, + int x,int y,int dir, int* opt,int optlen ); +void NPC_NPCEnemyLoop( int meindex ); +BOOL NPC_NPCEnemy_BattleIn( int meindex, int charaindex); +void NPC_NPCEnemyWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data); + +#endif + /*__NPC_NPCENEMY_H__*/ diff --git a/gmsv/include/npc_oldman.h b/gmsv/include/npc_oldman.h new file mode 100644 index 0000000..2b457b9 --- /dev/null +++ b/gmsv/include/npc_oldman.h @@ -0,0 +1,12 @@ +#ifndef __NPC_OLDMAN_H__ +#define __NPC_OLDMAN_H__ + + +void NPC_OldmanTalked( int meindex , int talkerindex , char *msg , + int color ); + +BOOL NPC_OldmanInit( int meindex ); + + +#endif +/*__NPC_OLDMAN_H__*/ diff --git a/gmsv/include/npc_pauctionman.h b/gmsv/include/npc_pauctionman.h new file mode 100644 index 0000000..f48b0fe --- /dev/null +++ b/gmsv/include/npc_pauctionman.h @@ -0,0 +1,17 @@ +#ifndef _PAUCTION_MAN_H +#define _PAUCTION_MAN_H + + +BOOL NPC_PauctionManInit( int meindex ); +void NPC_PauctionManTalked( int meindex, int talkerindex, char *msg, int color ); +void NPC_PauctionManWindowTalked( int meindex, int talkerindex, int seqno, + int select, char *data); +void NPC_PauctionManLoop( int meindex); + +int NPC_PAItemShop_AddItem( int itemID, int ret); +BOOL NPC_PAItemShop_DelItem( int ti, int index); +BOOL NPC_PAItemShop_reItem( int itemindex, char *Data); + +#endif + + diff --git a/gmsv/include/npc_petfusion.h b/gmsv/include/npc_petfusion.h new file mode 100644 index 0000000..3fbe665 --- /dev/null +++ b/gmsv/include/npc_petfusion.h @@ -0,0 +1,11 @@ +#ifndef __NPC_PETFUSION_H__ +#define __NPC_PETFUSION_H__ + + +void NPC_PetFusionManTalked( int meindex, int talkerindex, char *msg, int color ); +BOOL NPC_PetFusionManInit( int meindex ); +void NPC_PetFusionManWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data); +void NPC_PetFusionManLoop( int meindex); + +#endif + diff --git a/gmsv/include/npc_petmaker.h b/gmsv/include/npc_petmaker.h new file mode 100644 index 0000000..2754e9b --- /dev/null +++ b/gmsv/include/npc_petmaker.h @@ -0,0 +1,9 @@ +#ifndef __NPC_PETMAKER_H__ +#define __NPC_PETMAKER_H__ + +void NPC_PetMakerTalked( int meindex , int talkerindex , char *msg , + int color ); +BOOL NPC_PetMakerInit( int meindex ); + +#endif + /*__NPC_PETMAKER_H__*/ diff --git a/gmsv/include/npc_petracemaster.h b/gmsv/include/npc_petracemaster.h new file mode 100644 index 0000000..c8caa27 --- /dev/null +++ b/gmsv/include/npc_petracemaster.h @@ -0,0 +1,10 @@ +#ifndef NPC_PetRace_Master_ +#define NPC_PetRace_Master_ + +BOOL NPC_PetRaceMasterInit( int meindex ); +void NPC_PetRaceMasterLoop( int meindex ); +void NPC_PetRaceMasterTalked( int meindex , int talkerindex , char *szMes , int color ); +void NPC_PetRaceMasterWindowTalked(int meindex, int talkerindex, int seqno, int select, char *data); + +#endif + diff --git a/gmsv/include/npc_petracepet.h b/gmsv/include/npc_petracepet.h new file mode 100644 index 0000000..f421126 --- /dev/null +++ b/gmsv/include/npc_petracepet.h @@ -0,0 +1,9 @@ +#ifndef NPC_PetRace_Pet_ +#define NPC_PetRace_Pet_ + +BOOL NPC_PetRacePetInit( int meindex ); +void NPC_PetRacePetLoop( int meindex ); +void NPC_PetRacePetTalked( int meindex , int talkerindex , char *szMes , int color ); + +#endif + diff --git a/gmsv/include/npc_petshop.h b/gmsv/include/npc_petshop.h new file mode 100644 index 0000000..7b985ca --- /dev/null +++ b/gmsv/include/npc_petshop.h @@ -0,0 +1,12 @@ +#ifndef __NPC_PETSHOP_H__ +#define __NPC_PETSHOP_H__ + +void NPC_PetShopTalked( int meindex , int talkerindex , char *msg , + int color ); +BOOL NPC_PetShopInit( int meindex ); +void NPC_PetShopWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data); +void NPC_PetShopLooked( int meindex , int lookedindex); + + +#endif +/*__NPC_PETSHOP_H__*/ diff --git a/gmsv/include/npc_petskillshop.h b/gmsv/include/npc_petskillshop.h new file mode 100644 index 0000000..ca603bb --- /dev/null +++ b/gmsv/include/npc_petskillshop.h @@ -0,0 +1,13 @@ +#ifndef __NPC_PETSKILLSHOP_H__ +#define __NPC_PETSKILLSHOP_H__ + +void NPC_PetSkillShopTalked( int meindex , int talkerindex , char *msg , + int color ); +BOOL NPC_PetSkillShopInit( int meindex ); +void NPC_PetSkillShopWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data); +void NPC_PetSkillShopLooked( int meindex , int lookedindex); + +void NPC_PetSkillMakeStr(int meindex,int toindex,int select); + +#endif + /*__NPC_WINDOWPETSKILLSHOP_H__*/ diff --git a/gmsv/include/npc_pettransman.h b/gmsv/include/npc_pettransman.h new file mode 100644 index 0000000..c840706 --- /dev/null +++ b/gmsv/include/npc_pettransman.h @@ -0,0 +1,11 @@ +#ifndef __NPC_PETTRANSMAN_H__ +#define __NPC_PETTRANSMAN_H__ + +BOOL NPC_PetTransManInit(int meindex); +void NPC_PetTransMan_selectWindow(int meindex,int toindex,int num,int select); +void NPC_PetTransManWindowTalked(int meindex,int talkerindex,int seqno,int select,char *data); +void NPC_PetTransManTalked(int meindex,int talkerindex,char *szMes,int color); +int NPC_PetTransManCheck( int meindex, int toindex, int select); +BOOL NPC_PetTransManStatus( int meindex, int toindex, int petNo); +#endif + /*__NPC_PETTRANSMAN_H__*/ diff --git a/gmsv/include/npc_pkpetshop.h b/gmsv/include/npc_pkpetshop.h new file mode 100644 index 0000000..f4d785c --- /dev/null +++ b/gmsv/include/npc_pkpetshop.h @@ -0,0 +1,16 @@ +//krynn 2001/12/6 +//PKPetShop + +#ifndef __NPC_PKPetShop_H__ +#define __NPC_PKPetShop_H__ + +void NPC_PKPetShopTalked( int meindex , int talkerindex , char *msg , int color ); +BOOL NPC_PKPetShopInit( int meindex ); +void NPC_PKPetShopWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data); +void NPC_PKPetShopLooked( int meindex , int lookedindex); + +#endif + + +//krynn end + diff --git a/gmsv/include/npc_poolitemshop.h b/gmsv/include/npc_poolitemshop.h new file mode 100644 index 0000000..11d7e43 --- /dev/null +++ b/gmsv/include/npc_poolitemshop.h @@ -0,0 +1,14 @@ +#ifndef __NPC_POOLITEMSHOP_H__ +#define __NPC_POOLITEMSHOP_H__ + + +void NPC_PoolItemShopLoop( int meindex); +BOOL NPC_PoolItemShopInit( int meindex); +void NPC_PoolItemShopTalked( int meindex , int talkerindex , + char *szMes ,int color ); +void NPC_PoolItemShopWindowTalked( int meindex, int talkerindex, + int seqno, int select, char *data); + + +#endif + /*__NPC_POOLITEMSHOP_H__*/ diff --git a/gmsv/include/npc_quiz.h b/gmsv/include/npc_quiz.h new file mode 100644 index 0000000..31290c1 --- /dev/null +++ b/gmsv/include/npc_quiz.h @@ -0,0 +1,29 @@ +#ifndef __NPC_QUIZ_H__ +#define __NPC_QUIZ_H__ + +typedef struct NPC_Quiz{ + + int no; // 锁及 寞 + int type; // 锁及正奶皿 必□丞 }旦禾□汁) + int level; // 锁及伊矛伙 + int answertype; //蚕尹及蓟太井凶(ㄡ }ㄢ }签贿穴永民 + int answerNo; // 锁及蚕尹 + char question[512]; // 锁 + char select1[128]; //蓟 靼1 + char select2[128]; //蓟 靼2 + char select3[128]; //蓟 靼3 + +}NPC_QUIZ; + + +void NPC_QuizTalked( int meindex , int talkerindex , char *msg , + int color ); +BOOL NPC_QuizInit( int meindex ); +void NPC_QuizWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data); + +BOOL QUIZ_initQuiz( char *filename); + + +#endif + +/*__NPC_QUIZ_H__*/ diff --git a/gmsv/include/npc_raceman.h b/gmsv/include/npc_raceman.h new file mode 100644 index 0000000..4ae29e8 --- /dev/null +++ b/gmsv/include/npc_raceman.h @@ -0,0 +1,45 @@ +#ifndef __NPC_RACEMAN_H__ +#define __NPC_RACEMAN_H__ + +#define DEFMAXRANK 100 + +struct RANKTABLE +{ + char id[20]; + char name[256]; + int catchcnt; + char kindcnt[10000]; + int rank; +}*LPRANKTABLE; + +struct ASKTABLE +{ + int no; + char petname[32]; + int bbi; + int lowlv; + int highlv; +}; + +extern struct RANKTABLE ranktable1[DEFMAXRANK]; +extern struct RANKTABLE ranktable2[DEFMAXRANK]; +extern struct RANKTABLE ranktable3[DEFMAXRANK]; +extern struct RANKTABLE ranktable4[DEFMAXRANK]; +extern struct RANKTABLE ranktable5[DEFMAXRANK]; + +extern struct RANKTABLE history1[DEFMAXRANK]; +extern struct RANKTABLE history2[DEFMAXRANK]; +extern struct RANKTABLE history3[DEFMAXRANK]; +extern struct RANKTABLE history4[DEFMAXRANK]; +extern struct RANKTABLE history5[DEFMAXRANK]; + +extern struct ASKTABLE asktable[400]; + +BOOL NPC_RacemanInit( int meindex); +void NPC_RacemanTalked( int meindex , int talkerindex , char *szMes ,int color ); +void NPC_RacemanWindowTalked( int meindex , int talkerindex , int seqno, int select, char *data); +int Raceman_getokask( int talker , int random ); +//void Raceman_awardprize( int meindex , int talker ); + + +#endif diff --git a/gmsv/include/npc_riderman.h b/gmsv/include/npc_riderman.h new file mode 100644 index 0000000..bfaa48f --- /dev/null +++ b/gmsv/include/npc_riderman.h @@ -0,0 +1,12 @@ +#ifndef __NPC_RIDERMAN_H__ +#define __NPC_RIDERMAN_H__ + +void NPC_RidermanTalked( int meindex , int talkerindex , char *msg , + int color ); + +BOOL NPC_RidermanInit( int meindex ); +void NPC_RidermanLooked( int meindex, int lookedindex ); +void NPC_RidermanWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data); + +#endif + /*__NPC_RIDERMAN_H__*/ diff --git a/gmsv/include/npc_roomadminnew.h b/gmsv/include/npc_roomadminnew.h new file mode 100644 index 0000000..2cee346 --- /dev/null +++ b/gmsv/include/npc_roomadminnew.h @@ -0,0 +1,48 @@ +#ifndef __NPC_ROOMADMINNEW_H__ +#define __NPC_ROOMADMINNEW_H__ + + +void NPC_RoomAdminNewTalked( int meindex , int talkerindex , char *msg , int color ); +void NPC_RoomAdminNewLoop( int meindex ); +BOOL NPC_RoomAdminNewInit( int meindex ); + +BOOL NPC_RankingInit( int meindex ); +void NPC_RankingTalked( int meindex , int talkerindex , char *msg ,int color ); + +BOOL NPC_PrintpassmanInit( int meindex ); +void NPC_PrintpassmanTalked( int meindex , int talkerindex , char *msg ,int color ); + +#if 0 +typedef struct roomadmin_tag +{ + int index; /* 盒及index */ + + char doorname[256]; /* 公及 盒及玉失及 蟆 */ + char explanation[256]; /* */ + char passwd[256]; /* 由旦伐□玉 */ + int expire_time_mod; /* 匏锹 */ + time_t expire_time; /* 渝蜃濠木及凛棉 */ + int least_cost; /* 斓嗯喊 */ + +}NPC_ROOMINFO; +#endif + +typedef struct npc_roomadminnew_tag { + int expire; + char cdkey[CDKEYLEN]; + char charaname[32]; + char passwd[9]; +}NPC_ROOMINFO; + +typedef struct npc_roomadminnew_ranking_tag { + int gold; /* 诳嗯喊 */ + int biddate; /* 诳凛棉 */ + char cdkey[CDKEYLEN]; /* 午仄凶谛及 平□ */ + char charaname[32]; /* 午仄凶谛及 蟆 */ + char owntitle[32]; /* 惫寞*/ + +}NPC_RANKING_INFO; + +#endif /*__NPC_ROOMADMINNEW_H__*/ + +BOOL NPC_RoomAdminNew_ReadFile( char *roomname, NPC_ROOMINFO *data); diff --git a/gmsv/include/npc_sample.h b/gmsv/include/npc_sample.h new file mode 100644 index 0000000..b648598 --- /dev/null +++ b/gmsv/include/npc_sample.h @@ -0,0 +1,8 @@ +#ifndef __NPC_SAMPLE_H__ +#define __NPC_SAMPLE_H__ + +void NPC_SampleLoop( int index ); + +#endif + + /*__NPC_SAMPLE_H__*/ diff --git a/gmsv/include/npc_savepoint.h b/gmsv/include/npc_savepoint.h new file mode 100644 index 0000000..80edab6 --- /dev/null +++ b/gmsv/include/npc_savepoint.h @@ -0,0 +1,14 @@ +#ifndef __NPC_SAVEPOINT_H__ +#define __NPC_SAVEPOINT_H__ + + +void NPC_SavePointTalked( int meindex , int talkerindex , char *msg , + int color ); + +BOOL NPC_SavePointInit( int meindex ); +void NPC_SavePointWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data); + + +#endif + +/*__NPC_SAVEPOINT_H__*/ diff --git a/gmsv/include/npc_scheduleman.h b/gmsv/include/npc_scheduleman.h new file mode 100644 index 0000000..fd23c3a --- /dev/null +++ b/gmsv/include/npc_scheduleman.h @@ -0,0 +1,82 @@ +#ifndef __NPC_SCHEDULEMAN_H__ +#define __NPC_SCHEDULEMAN_H__ + +#define CHARNAME_MAX 32 + +// 最大 scheduleman 数量 +#ifdef _FAMILY_MANORNUM_CHANGE +#define MAX_SCHEDULEMAN 20 +#else +#define MAX_SCHEDULEMAN 12 +#endif + +// 每一个 scheduleman 控管的 schedule 数量 +#define MAX_SCHEDULE 24 + +// schedule 列表的一页所能列出的最大数量 +#define MAXSCHEDULEINONEWINDOW 10 + +// family 列表的一页所能列出的最大数量 +#define MAXFAMILYINONEWINDOW 10 + +// 每一个 scheduleman 所使用的 schedule 储存位置 +// 对应在 fmpks 的 ID*MAX_SCHEDULE 上 (ID=0~MAX_SCHEDULEMAN-1) +// ID 是写在 data/npc 中指定给 "id:" 的值 + +// dueltime = (隔天?10000:0) + (小时*100) + +typedef struct tagFamilyPKSchedule { + int dueltime; // 比赛时刻 + int host_index; // 主队家族 + char host_name[CHARNAME_MAX]; // 主队家族名称 + int guest_index; // 客队家族 + char guest_name[CHARNAME_MAX]; // 客队家族名称 + int prepare_time; // 准备时间 (1~40 分钟) + int max_player; // 最大出场人数 (1~家族人数上限) + int flag; // 状态 + int win; // 胜利条件设定 + int challenge_timeout; // 挑战时限 + int setting_timeout; // 设定状态的 timeout + char gmsv_name[256]; +} FamilyPKSchedule; + +// 纪录在 FamilyPKSchedule (fmpks) 的 flag 值 +#define FMPKS_FLAG_NONE -1 // 没有任何排程 +#define FMPKS_FLAG_CHALLENGE 0 // 等待客队同意中 +#define FMPKS_FLAG_SETTING 1 // 主队正在设定排程 (取消时变成 NONE) +#define FMPKS_FLAG_CONFIRMING 2 // 客队正在同意中 +#define FMPKS_FLAG_SCHEDULED 3 // 已经排好排程,尚未开打 +#define FMPKS_FLAG_DUEL 4 // 开打中 +#define FMPKS_FLAG_HOSTWIN 5 // 主队胜 +#define FMPKS_FLAG_GUESTWIN 6 // 客队胜 +#define FMPKS_FLAG_MANOR_BATTLEBEGIN 7 // 庄园挑战 战斗中 +#define FMPKS_FLAG_MANOR_PREPARE 8 // 庄园挑战 准备中 +#define FMPKS_FLAG_MANOR_PEACE 9 // 庄园挑战 休战中 +#define FMPKS_FLAG_MANOR_OTHERPLANET 10 // 庄园挑战 在别的星球决战 +#define FMPKS_FLAG_MANOR_BATTLEEND 11 // 庄园挑战 战斗结束 +#define FMPKS_FLAG_MANOR_PEACE_SAVE 12 // 将庄园挑战存档 +#define FMPKS_FLAG_MANOR_READYTOFIGHT 13 // (GM: manorpk) 全星系变成可约战状态 +#define FMPKS_FLAG_MANOR_CLEANFLAG 14 // (GM: manorpk) 本星球清除状态 +#ifdef _NEW_MANOR_LAW +#define FMPKS_FLAG_WAIT 15 // 进入挑战期,已记录家族气势,等待挑战排程 +#endif + +// 传给 client 的 flag +#define FLAG_NONE -1 +#define FLAG_MODIFY 0 +#define FLAG_ACCEPT 1 +#define FLAG_SETTING 2 +#define FLAG_CONFIRM 3 +#define FLAG_SCHEDULED 4 + +extern FamilyPKSchedule fmpks[MAX_SCHEDULE*MAX_SCHEDULEMAN]; + +BOOL NPC_SchedulemanInit(int meindex); +void NPC_SchedulemanTalked(int meindex, int talkerindex, char *msg, int color); +void NPC_SchedulemanWindowTalked(int meindex, int talkerindex, + int seqno, int select, char *data); +void NPC_SchedulemanLoop(int meindex); + +#endif + +/*__NPC_SCHEDULEMAN_H__*/ diff --git a/gmsv/include/npc_scheduleman.h.bak b/gmsv/include/npc_scheduleman.h.bak new file mode 100644 index 0000000..da9637b --- /dev/null +++ b/gmsv/include/npc_scheduleman.h.bak @@ -0,0 +1,82 @@ +#ifndef __NPC_SCHEDULEMAN_H__ +#define __NPC_SCHEDULEMAN_H__ + +#define CHARNAME_MAX 32 + +// 最大 scheduleman 数量 +#ifdef _FAMILY_MANORNUM_CHANGE +#define MAX_SCHEDULEMAN 20 +#else +#define MAX_SCHEDULEMAN 12 +#endif + +// 每一个 scheduleman 控管的 schedule 数量 +#define MAX_SCHEDULE 24 + +// schedule 列表的一页所能列出的最大数量 +#define MAXSCHEDULEINONEWINDOW 4 + +// family 列表的一页所能列出的最大数量 +#define MAXFAMILYINONEWINDOW 8 + +// 每一个 scheduleman 所使用的 schedule 储存位置 +// 对应在 fmpks 的 ID*MAX_SCHEDULE 上 (ID=0~MAX_SCHEDULEMAN-1) +// ID 是写在 data/npc 中指定给 "id:" 的值 + +// dueltime = (隔天?10000:0) + (小时*100) + +typedef struct tagFamilyPKSchedule { + int dueltime; // 比赛时刻 + int host_index; // 主队家族 + char host_name[CHARNAME_MAX]; // 主队家族名称 + int guest_index; // 客队家族 + char guest_name[CHARNAME_MAX]; // 客队家族名称 + int prepare_time; // 准备时间 (1~40 分钟) + int max_player; // 最大出场人数 (1~家族人数上限) + int flag; // 状态 + int win; // 胜利条件设定 + int challenge_timeout; // 挑战时限 + int setting_timeout; // 设定状态的 timeout + char gmsv_name[256]; +} FamilyPKSchedule; + +// 纪录在 FamilyPKSchedule (fmpks) 的 flag 值 +#define FMPKS_FLAG_NONE -1 // 没有任何排程 +#define FMPKS_FLAG_CHALLENGE 0 // 等待客队同意中 +#define FMPKS_FLAG_SETTING 1 // 主队正在设定排程 (取消时变成 NONE) +#define FMPKS_FLAG_CONFIRMING 2 // 客队正在同意中 +#define FMPKS_FLAG_SCHEDULED 3 // 已经排好排程,尚未开打 +#define FMPKS_FLAG_DUEL 4 // 开打中 +#define FMPKS_FLAG_HOSTWIN 5 // 主队胜 +#define FMPKS_FLAG_GUESTWIN 6 // 客队胜 +#define FMPKS_FLAG_MANOR_BATTLEBEGIN 7 // 庄园挑战 战斗中 +#define FMPKS_FLAG_MANOR_PREPARE 8 // 庄园挑战 准备中 +#define FMPKS_FLAG_MANOR_PEACE 9 // 庄园挑战 休战中 +#define FMPKS_FLAG_MANOR_OTHERPLANET 10 // 庄园挑战 在别的星球决战 +#define FMPKS_FLAG_MANOR_BATTLEEND 11 // 庄园挑战 战斗结束 +#define FMPKS_FLAG_MANOR_PEACE_SAVE 12 // 将庄园挑战存档 +#define FMPKS_FLAG_MANOR_READYTOFIGHT 13 // (GM: manorpk) 全星系变成可约战状态 +#define FMPKS_FLAG_MANOR_CLEANFLAG 14 // (GM: manorpk) 本星球清除状态 +#ifdef _NEW_MANOR_LAW +#define FMPKS_FLAG_WAIT 15 // 进入挑战期,已记录家族气势,等待挑战排程 +#endif + +// 传给 client 的 flag +#define FLAG_NONE -1 +#define FLAG_MODIFY 0 +#define FLAG_ACCEPT 1 +#define FLAG_SETTING 2 +#define FLAG_CONFIRM 3 +#define FLAG_SCHEDULED 4 + +extern FamilyPKSchedule fmpks[MAX_SCHEDULE*MAX_SCHEDULEMAN]; + +BOOL NPC_SchedulemanInit(int meindex); +void NPC_SchedulemanTalked(int meindex, int talkerindex, char *msg, int color); +void NPC_SchedulemanWindowTalked(int meindex, int talkerindex, + int seqno, int select, char *data); +void NPC_SchedulemanLoop(int meindex); + +#endif + +/*__NPC_SCHEDULEMAN_H__*/ diff --git a/gmsv/include/npc_sellsthman.h b/gmsv/include/npc_sellsthman.h new file mode 100644 index 0000000..6ce6165 --- /dev/null +++ b/gmsv/include/npc_sellsthman.h @@ -0,0 +1,9 @@ +#ifndef _SELLSTH_MAN_H +#define _SELLSTH_MAN_H + +void NPC_SellsthManTalked( int meindex, int talkerindex, char *msg, int color ); +BOOL NPC_SellsthManInit( int meindex ); +void NPC_SellsthManWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data); +void NPC_SellsthManLoop( int meindex); + +#endif diff --git a/gmsv/include/npc_signboard.h b/gmsv/include/npc_signboard.h new file mode 100644 index 0000000..ed96680 --- /dev/null +++ b/gmsv/include/npc_signboard.h @@ -0,0 +1,11 @@ +#ifndef __NPC_SIGNBOARD_H__ +#define __NPC_SIGNBOARD_H__ + + +BOOL NPC_SignBoardInit( int meindex ); +void NPC_SignBoardWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data); +void NPC_SignBoardLooked( int meindex , int lookedindex); + + +#endif + /*__NPC_WINDOWSIGNBOAD_H__*/ diff --git a/gmsv/include/npc_simpleshop.h b/gmsv/include/npc_simpleshop.h new file mode 100644 index 0000000..3b0da80 --- /dev/null +++ b/gmsv/include/npc_simpleshop.h @@ -0,0 +1,10 @@ +#ifndef __NPC_SIMPLESHOP_H__ +#define __NPC_SIMPLESHOP_H__ + +void NPC_SimpleShopTalked( int index, int talker, char *msg, int color ); +void NPC_SimpleShopSpecialTalked( int index, int talker, char *msg, int color ); +void NPC_LimitBuyInShopSpecialTalked( int index, int talker, char *msg, int color ); +void NPC_SimpleShopInit( int meindex ); + +#endif + /*__NPC_SIMPLESHOP_H__*/ diff --git a/gmsv/include/npc_stoneserviceman.h b/gmsv/include/npc_stoneserviceman.h new file mode 100644 index 0000000..9d9feb1 --- /dev/null +++ b/gmsv/include/npc_stoneserviceman.h @@ -0,0 +1,20 @@ +#ifndef __NPC_STONESERVICEMAN_H__ +#define __NPC_STONESERVICEMAN_H__ + +// 资料串列 +typedef struct _List +{ + char Data[32]; // 资料 + struct _List *Next; // 指向下一个List +}List,*LPList; + +BOOL NPC_StoneServiceManInit(int meindex); +void NPC_StoneServiceManLoop(int meindex); +void NPC_StoneServiceManTalked(int meindex,int talkerindex,char *msg,int color); +void NPC_StoneServiceManWindowTalked(int meindex,int talkerindex,int seqno, + int select,char *data); +int SendToAP(int nAid,int nIndex,int nLen,void *Data1,void *Data2); +int RecvFromAP(int *nAid,int nIndex,int *nLen,LPList *Data); +int GetMsg(int meindex); +int ConnectToAP(void); +#endif diff --git a/gmsv/include/npc_storyteller.h b/gmsv/include/npc_storyteller.h new file mode 100644 index 0000000..a8a17cf --- /dev/null +++ b/gmsv/include/npc_storyteller.h @@ -0,0 +1,8 @@ +#ifndef _NPC_STORYTELLER_H_ +#define _NPC_STORYTELLER_H_ + +BOOL NPC_StoryTellerInit( int meindex ); +void NPC_StoryTellerTalked( int meindex , int talker , char *msg , int col ); + +#endif + diff --git a/gmsv/include/npc_sysinfo.h b/gmsv/include/npc_sysinfo.h new file mode 100644 index 0000000..37b6b4b --- /dev/null +++ b/gmsv/include/npc_sysinfo.h @@ -0,0 +1,7 @@ +#ifndef __NPC_SYSINFO_H__ +#define __NPC_SYSINFO_H__ + +BOOL NPC_SysinfoInit( int meindex ); +void NPC_SysinfoLoop( int meindex ); +void NPC_SysinfoTalked( int meindex, int tindex, char *msg, int color); +#endif /*__NPC_SYSINFO_H__*/ diff --git a/gmsv/include/npc_timeman.h b/gmsv/include/npc_timeman.h new file mode 100644 index 0000000..0611141 --- /dev/null +++ b/gmsv/include/npc_timeman.h @@ -0,0 +1,13 @@ +#ifndef __NPC_TIMEMAN_H__ +#define __NPC_TIMEMAN_H__ + + +void NPC_TimeManTalked( int meindex , int talkerindex , char *msg , + int color ); + +BOOL NPC_TimeManInit( int meindex ); + +void NPC_TimeManWatch( int meobjindex, int objindex, CHAR_ACTION act, + int x,int y,int dir, int* opt,int optlen ); + +#endif /*__NPC_TIMEMAN_H__*/ diff --git a/gmsv/include/npc_townpeople.h b/gmsv/include/npc_townpeople.h new file mode 100644 index 0000000..745317b --- /dev/null +++ b/gmsv/include/npc_townpeople.h @@ -0,0 +1,7 @@ +#ifndef __NPC_TOWNPEOPLE_H__ +#define __NPC_TOWNPEOPLE_H__ + +void NPC_TownPeopleTalked( int index, int talker, char *msg, int color ); +void NPC_TownPeopleInit( int meindex ); + +#endif /* __NPC_TOWNPEOPLE_H__ */ diff --git a/gmsv/include/npc_transerman.h b/gmsv/include/npc_transerman.h new file mode 100644 index 0000000..2acca4e --- /dev/null +++ b/gmsv/include/npc_transerman.h @@ -0,0 +1,9 @@ +#ifndef _TRANSER_MAN_H +#define _TRANSER_MAN_H + +void NPC_TranserManTalked( int meindex, int talkerindex, char *msg, int color ); +BOOL NPC_TranserManInit( int meindex ); +void NPC_TranserManWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data); +void NPC_TranserManLoop( int meindex); + +#endif diff --git a/gmsv/include/npc_transmigration.h b/gmsv/include/npc_transmigration.h new file mode 100644 index 0000000..b5040fe --- /dev/null +++ b/gmsv/include/npc_transmigration.h @@ -0,0 +1,11 @@ +#ifndef __NPC_TRANSMIGRATION_H__ +#define __NPC_TRANSMIGRATION_H__ + +void NPC_TransmigrationTalked( int meindex , int talkerindex , char *msg , + int color ); +BOOL NPC_TransmigrationInit( int meindex ); +void NPC_TransmigrationWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data); + +#endif + +/*__NPC_TRANSMIGRATION_H__*/ diff --git a/gmsv/include/npc_verywelfare.h b/gmsv/include/npc_verywelfare.h new file mode 100644 index 0000000..7b98446 --- /dev/null +++ b/gmsv/include/npc_verywelfare.h @@ -0,0 +1,8 @@ +#ifndef __NPC_VERYWELFARE_H__ +#define __NPC_VERYWELFARE_H__ + +BOOL NPC_VeryWelfareInit( int meindex ); +void NPC_VeryWelfareTalked( int meindex , int talker , char *msg ,int color ); +void NPC_VeryWelfareWindowTalked(int meindex, int talkerindex, int seqno, int select,char *data); + +#endif diff --git a/gmsv/include/npc_warp.h b/gmsv/include/npc_warp.h new file mode 100644 index 0000000..4caafbc --- /dev/null +++ b/gmsv/include/npc_warp.h @@ -0,0 +1,10 @@ +#ifndef __NPC_WARP_H__ +#define __NPC_WARP_H__ +BOOL NPC_WarpInit( int charaindex ); +void NPC_WarpPostOver( int meindex,int charaindex ); +void NPC_WarpWatch( int meobjindex, int objindex, CHAR_ACTION act, + int x,int y,int dir, int* opt,int optlen ); +int NPC_WarpSearchByPosition( int fl , int x, int y); +void NPC_WarpWarpCharacter( int warpnpcindex, int charaindex ); +#endif + /*__NPC_WARP_H__*/ diff --git a/gmsv/include/npc_warpman.h b/gmsv/include/npc_warpman.h new file mode 100644 index 0000000..ee48e0a --- /dev/null +++ b/gmsv/include/npc_warpman.h @@ -0,0 +1,13 @@ +#ifndef __NPC_WARPMAN_H__ +#define __NPC_WARPMAN_H__ + +void NPC_WarpManTalked( int meindex , int talkerindex , char *msg , + int color ); +BOOL NPC_WarpManInit( int meindex ); +void NPC_WarpManWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data); +void NPC_GetDuelRank(int rank,int msgid,int msgid2); +void NPC_WarpManLoop( int meindex); +void NPC_WarpManWatch( int meobjindex, int objindex, CHAR_ACTION act, + int x,int y,int dir, int* opt,int optlen ); +#endif +/*__NPC_WARPMAN_H__*/ diff --git a/gmsv/include/npc_welfare.h b/gmsv/include/npc_welfare.h new file mode 100644 index 0000000..4aa9037 --- /dev/null +++ b/gmsv/include/npc_welfare.h @@ -0,0 +1,10 @@ +#ifndef __NPC_WELFARE_H__ +#define __NPC_WELFARE_H__ + +BOOL NPC_WelfareInit( int meindex ); +void NPC_WelfareTalked( int meindex , int talker , char *msg ,int color ); +void NPC_WelfareWindowTalked(int meindex, int talkerindex, int seqno, int select,char *data); +void NPC_WelfareMakeStr(int meindex,int toindex,int select); + + +#endif diff --git a/gmsv/include/npc_welfare2.h b/gmsv/include/npc_welfare2.h new file mode 100644 index 0000000..0bbb309 --- /dev/null +++ b/gmsv/include/npc_welfare2.h @@ -0,0 +1,9 @@ +#ifndef __NPC_WELFARE2_H__ +#define __NPC_WELFARE2_H__ + +BOOL NPC_WelfareInit2( int meindex ); +void NPC_WelfareTalked2( int meindex , int talker , char *msg ,int color ); +void NPC_WelfareWindowTalked2(int meindex, int talkerindex, int seqno, int select,char *data); +void NPC_WelfareMakeStr2(int meindex,int toindex,int select); + +#endif diff --git a/gmsv/include/npc_windowhealer.h b/gmsv/include/npc_windowhealer.h new file mode 100644 index 0000000..2c8f62a --- /dev/null +++ b/gmsv/include/npc_windowhealer.h @@ -0,0 +1,11 @@ +#ifndef __NPC_WINDOWHEALER_H__ +#define __NPC_WINDOWHEALER_H__ + +void NPC_WindowHealerTalked( int meindex , int talkerindex , char *msg , + int color ); +BOOL NPC_WindowHealerInit( int meindex ); +void NPC_WindowHealerWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data); +void NPC_WindowHealerLooked( int meindex , int lookedindex); + +#endif + /*__NPC_WINDOWHEALER_H__*/ diff --git a/gmsv/include/npc_windowman.h b/gmsv/include/npc_windowman.h new file mode 100644 index 0000000..3cf1dde --- /dev/null +++ b/gmsv/include/npc_windowman.h @@ -0,0 +1,16 @@ +#ifndef __NPC_WINDOWMAN_H__ +#define __NPC_WINDOWMAN_H__ + +void NPC_WindowmanTalked( int meindex , int talkerindex , char *msg , + int color ); + +BOOL NPC_WindowmanInit( int meindex ); +void NPC_WindowmanLooked( int meindex, int lookedindex ); +void NPC_WindowmanWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data); + +void NPC_Windowman_selectWindow( int meindex, int toindex, int num); +BOOL NPC_Windowman_readData( int meindex, int windowno, BOOL chkflg); +int NPC_Windowman_restoreButtontype( char *data ); + +#endif +/*__NPC_WINDOWMAN_H__*/ diff --git a/gmsv/include/npccreate.h b/gmsv/include/npccreate.h new file mode 100644 index 0000000..7109410 --- /dev/null +++ b/gmsv/include/npccreate.h @@ -0,0 +1,93 @@ +#ifndef __READNPCCREATE_H__ +#define __READNPCCREATE_H__ + +#include "util.h" + +#define NPC_CREATEFILEMAGIC "NPCCREATE\n" + + +#undef EXTERN +#ifdef __NPCCREATE__ +#define EXTERN +#else +#define EXTERN extern +#endif /*__NPCCREATE__*/ + + +typedef enum +{ + NPC_CREATEFLOORID, /* 白夫失ID */ + NPC_CREATEBORNLEFTUPX, /* 尔晓及X甄 */ + NPC_CREATEBORNLEFTUPY, /* 尔晓及Y甄 */ + NPC_CREATEBORNRIGHTDOWNX, /* 惘票及X甄 */ + NPC_CREATEBORNRIGHTDOWNY, /* 惘票及Y甄 */ + + NPC_CREATEMOVELEFTUPX, /* 尔晓及X甄 */ + NPC_CREATEMOVELEFTUPY, /* 尔晓及Y甄 */ + NPC_CREATEMOVERIGHTDOWNX, /* 惘票及X甄 */ + NPC_CREATEMOVERIGHTDOWNY, /* 惘票及Y甄 */ + + NPC_CREATEDIR, /* 综月凛及 轾 */ + NPC_CREATEBASEIMAGENUMBER, /* template 及涩烂毛晓踏五允月 + 飓 寞 */ + NPC_CREATETIME, /* 凛棉 */ + NPC_CREATEBORNNUM, /* 公及哗 卞请蜇今六月醒 */ + + NPC_CREATEENEMYNUM, /* 衬及潘 醒 */ + NPC_CREATEBOUNDARY, + NPC_CREATEDATE, + NPC_CREATEIGNOREINVINCIBLE, + NPC_CREATEFAMILY, // Robin 0731 Family +#ifdef _ADD_ACTION //jeffrey 1231 npcaction + NPC_CREATEACTION, +#endif + NPC_CREATEINTNUM, + +}NPC_CREATEINT; + +typedef enum +{ + NPC_CREATENAME, /* template毛晓踏五允月井手仄木卅中 蟆*/ + NPC_CREATECHARNUM, +}NPC_CREATECHAR; + + +typedef enum +{ + NPC_CREATEWORKENEMYNUM, + NPC_CREATEWORKMAKESTARTSEC, + NPC_CREATEWORKMAKESTARTUSEC, + NPC_CREATEWORKNEVERMAKE, + NPC_CREATEWORKNUM, + +}NPC_CREATEWORK; + +typedef struct tagNPC_Create +{ + int intdata[NPC_CREATEINTNUM]; + STRING64 chardata[NPC_CREATECHARNUM]; + int workdata[NPC_CREATEWORKNUM]; + int templateindex[8]; + STRING64 arg[8]; +}NPC_Create; + + +EXTERN NPC_Create* NPC_create; +EXTERN int NPC_createnum; +EXTERN int NPC_create_readindex; + +INLINE int NPC_CHECKCREATEINDEX(int index); + +BOOL NPC_isBoundarySet( int createindex ); +BOOL NPC_createGetRECT( int createindex,RECT* r ); +BOOL NPC_readNPCCreateFiles( char* topdirectory ,int createsize); +int NPC_getCreateInt( int index , NPC_CREATEINT element ); + +BOOL NPC_createCheckGenerateFromTime( int tindex ); +void NPC_createInitTime( int index ); +void NPC_createIncreaseEnemynum( int index ); +void NPC_createDecreaseEnemynum( int index ); +BOOL NPC_createCheckMaxEnemynum( int index ); + +#endif +/*__READNPCCREATE_H__*/ diff --git a/gmsv/include/npcgen.h b/gmsv/include/npcgen.h new file mode 100644 index 0000000..f7ab71a --- /dev/null +++ b/gmsv/include/npcgen.h @@ -0,0 +1,13 @@ +#ifndef __NPCGEN_H__ +#define __NPCGEN_H__ + + +void NPC_generateLoop( BOOL FlgInit ); + +EXTERN int all_nosee; /* ㄠ及凛{蝈化及衬毛 no_see 卞 */ +EXTERN int all_nobody; /* ㄠ及凛{蝈化及衬毛 no_body 卞 */ +EXTERN int one_loop_born; /* ㄠ伙□皿匹 嫖戏心请允醒 oneloop_born */ + + +#endif +/*__NPCGEN_H__*/ diff --git a/gmsv/include/npcserver.h b/gmsv/include/npcserver.h new file mode 100644 index 0000000..2798a55 --- /dev/null +++ b/gmsv/include/npcserver.h @@ -0,0 +1,38 @@ +#ifndef _NPCSERVER_H +#define _NPCSERVER_H + + +int NSproto_DispatchMessage(int fd,char* encoded); +int connectNpcServer(char* hostname,unsigned short port); +void NPCS_SendProbe( int fd); + +typedef struct _NPCMessCommand +{ + char buf[4096]; + int len; + struct _NPCMessCommand *next; +}NPCMessC; + +BOOL NPCMESS_setChar( char *buf); +BOOL NPCMESS_getChar( char *buf, int len); +NPCMessC *MESS_getNew(); + + +void NPCS_AskNpcList_recv( int fd, char *Nlist); +void NPCS_AskNpcList_send( int fd); + +void NPCS_NpcSLogin_recv( int fd, char *Mess); +void NPCS_NpcSLogin_send( int fd); + +void NPCS_AskNpcTalk_send( int objindex, int npcsindex, int charaindex, char *Nlist); + +void NPCS_NpcTalkMess_recv( int npcobjindex, int charaindex, int charobjindex, char *TalkMess, int Color); +void NPCS_NpcWinMess_recv( int npcobjindex, int charaindex, int charobjindex, char *WinMess, + int seqno, int windowtype, int buttontype, int page); +void NPCS_NpcWinMess_send( int npcobjindex, int npcindex, int charaindex, char *WinMess, + int seqno, int select); +void NPCS_NpcCheckFreeMess_recv( int npcobjindex, int charaindex, int charobjindex, + char *CheckfreeMess); + +#endif + diff --git a/gmsv/include/npcshandle.h b/gmsv/include/npcshandle.h new file mode 100644 index 0000000..87918c7 --- /dev/null +++ b/gmsv/include/npcshandle.h @@ -0,0 +1,29 @@ +#ifndef _NPCS_HANDLE_H +#define _NPCS_HANDLE_H +#include "version.h" +#include "util.h" + +#ifdef _NPCSERVER_NEW +//条件判断 +BOOL NPCS_HandleCheckFreeMess( int npcobjindex, int charaindex, int charobjindex, + char *CheckfreeMess); + +BOOL NPCS_FreePassCheck( int charaindex, char *buf); + +//比较判断 +BOOL NPCS_FreeBigSmallCheck( int charaindex,char* buf); +//参数判断 +BOOL NPCS_ArgumentFreeCheck( int charaindex, char* Argument, int amount, int temp, int probjID); +//参数大小判断 +BOOL NPCS_ArgumentBigSmallCheck( int point, int mypoint, int flg); +//取得指定ID宠物数 *reAmount 剩馀栏位 +int NPCS_getUserPetAmount( int charaindex, int objID, int flg); +//取得指定ID道具数 *reAmount 剩馀栏位 +int NPCS_getUserItemAmount( int charaindex, int objID, int flg); +//取得团队人数 +int NPCS_getUserPartyAmount( int charaindex ); +BOOL NPCS_NpcstalkToCli( int charaindex,int npcobjindex, char* message, CHAR_COLOR color ); +//事件处理 +BOOL NPCS_RunDoEventAction( int charaindex, char *buf1); +#endif +#endif diff --git a/gmsv/include/npctemplate.h b/gmsv/include/npctemplate.h new file mode 100644 index 0000000..48aa0f8 --- /dev/null +++ b/gmsv/include/npctemplate.h @@ -0,0 +1,111 @@ +#ifndef __READNPCTEMPLATE_H__ +#define __READNPCTEMPLATE_H__ + +#include "util.h" +#include "char_base.h" + +#define NPC_TEMPLATEFILEMAGIC "NPCTEMPLATE\n" + +#undef EXTERN +#ifdef __NPCTEMPLATE__ +#define EXTERN +#else +#define EXTERN extern +#endif /*__NPCTEMPLATE__*/ + + + +typedef struct tagNPC_haveItem +{ + int itemnumber; + int haverate; + int havenum; +}NPC_haveItem; + +typedef enum +{ + NPC_TEMPLATENAME, /* 件皿伊□玄及 蟆 */ + NPC_TEMPLATECHARNAME, /* 蟆 */ + + NPC_TEMPLATEINITFUNC, /* CHAR_INITFUNC卞垫仁 */ + NPC_TEMPLATEWALKPREFUNC, /* CHAR_WALKPREFUNC */ + NPC_TEMPLATEWALKPOSTFUNC, /* CHAR_WALKPOSTFUNC */ + NPC_TEMPLATEPREOVERFUNC, /* CHAR_PREOVERFUNC */ + NPC_TEMPLATEPOSTOVERFUNC, /* CHAR_POSTOVERFUNC */ + NPC_TEMPLATEWATCHFUNC, /* CHAR_WATCHFUNC */ + NPC_TEMPLATELOOPFUNC, /* CHAR_LOOPFUNC */ + NPC_TEMPLATEDYINGFUNC, /* CHAR_DYINGFUNC */ + NPC_TEMPLATETALKEDFUNC, /* CHAR_TALKEDFUNC */ + + NPC_TEMPLATEPREATTACKEDFUNC, /* CHAR_PREATTACKEDFUNC */ + NPC_TEMPLATEPOSTATTACKEDFUNC, /* CHAR_POSTATTACKEDFUNC */ + + NPC_TEMPLATEOFFFUNC, /* CHAR_OFFFUNC */ + NPC_TEMPLATELOOKEDFUNC, /* CHAR_LOOKEDFUNC */ + NPC_TEMPLATEITEMPUTFUNC, /* CHAR_ITEMPUTFUNC */ + + NPC_TEMPLATESPECIALTALKEDFUNC, /* CHAR_SPECIALTALKEDFUNC */ + NPC_TEMPLATEWINDOWTALKEDFUNC, /* CHAR_WINDOWTALKEDFUNC */ +#ifdef _USER_CHARLOOPS + NPC_TEMPLATELOOPFUNCTEMP1, //CHAR_LOOPFUNCTEMP1, + NPC_TEMPLATELOOPFUNCTEMP2, //CHAR_LOOPFUNCTEMP2, + NPC_TEMPLATEBATTLEPROPERTY, //CHAR_BATTLEPROPERTY, +#endif + NPC_TEMPLATECHARNUM, +}NPC_TEMPLATECHAR; + +typedef enum +{ + NPC_TEMPLATEMAKEATNOBODY, /* 簿手中卅中凛卞手综月井升丹井 */ + NPC_TEMPLATEMAKEATNOSEE, /* 苇尹卅中赭匹综月井升丹井 */ + NPC_TEMPLATEIMAGENUMBER, /* 飓 寞 */ + NPC_TEMPLATETYPE, /* 瑁户月凛卞瑁户月 */ + + NPC_TEMPLATEMINHP, /* HP */ + + NPC_TEMPLATEMINMP, /* MP */ + + NPC_TEMPLATEMINSTR, /* STR */ + + NPC_TEMPLATEMINTOUGH, /* TOUGH */ + + NPC_TEMPLATEISFLYING, /* 氏匹月井升丹井 */ + + NPC_TEMPLATEITEMNUM, /* 切丹月失奶 丞及 醒 */ + + NPC_TEMPLATELOOPFUNCTIME, /* + * 窒立伉 仍午卞伙□皿楮醒 + * 毛裟少井 + */ + NPC_TEMPLATEFUNCTIONINDEX, /* + * fucntionSet 及窒 及 + * 奶件犯永弁旦井 + */ + + NPC_TEMPLATEINTNUM, +}NPC_TEMPLATEINT; + +typedef struct tagNPC_Template +{ + STRING64 chardata[NPC_TEMPLATECHARNUM]; + int intdata[NPC_TEMPLATEINTNUM]; + int randomdata[NPC_TEMPLATEINTNUM]; /* 仿件母丞及 五今 + 互 匀化中月 */ + int hash; + NPC_haveItem* haveitem; +}NPC_Template; + + +EXTERN NPC_Template* NPC_template; +EXTERN int NPC_templatenum; +EXTERN int NPC_template_readindex; + +INLINE int NPC_CHECKTEMPLATEINDEX(int index); + +BOOL NPC_copyFunctionSetToChar( int id, Char* ch ); + +BOOL NPC_readNPCTemplateFiles( char* topdirectory ,int templatesize); +int NPC_templateGetTemplateIndex( char* templatename ); + +#endif + /*__READNPCTEMPLATE_H__*/ diff --git a/gmsv/include/npcutil.h b/gmsv/include/npcutil.h new file mode 100644 index 0000000..191f68d --- /dev/null +++ b/gmsv/include/npcutil.h @@ -0,0 +1,89 @@ +#ifndef _NPCUTIL_H_ +#define _NPCUTIL_H_ + +BOOL NPC_Util_AddOneTitle( int charindex, int titleindex ); +BOOL NPC_Util_HaveTitle( int charindex , int titleindex ); +BOOL NPC_Util_Nearby( int x1 , int y1, int x2 , int y2 ); +BOOL NPC_Util_CharNearby(int ind1,int ind2); +int NPC_Util_YN(char *input ); +int NPC_Util_getDirFromTwoPoint( POINT* pstart, POINT* pend ); +int NPC_Util_countHaveItem( int meindex , int itemid ); +BOOL NPC_Util_isBackContact( int frontindex , int backindex ); + +void NPC_Util_AnnounceFloor( int floorid , char *msg ); + + +BOOL NPC_Util_moveItemToChar( int charindex, int itemindex,BOOL net ); +BOOL NPC_Util_createItemToChar( int charindex, int itemid , BOOL net); +int NPC_Util_CharDistance( int index1, int index2 ); +int NPC_Util_SearchNear( int meindex, int maxlen, int type ); +int NPC_Util_SearchNearPlayer( int meindex, int maxlen ); +int NPC_Util_SearchNearEnemy( int meindex, int maxlen ); +int NPC_Util_SuberiWalk( int index, int dir ); +int NPC_Util_GetNumFromArg( int meindex, char* in); + +int NPC_Util_GetDirCharToChar( int fromindex, int toindex, int mode); +int NPC_Util_WalkCharToChar( int fromindex, int toindex, int mode, int suberi); +BOOL NPC_Util_isFaceToFace( int index1, int index2, int distance ); +BOOL NPC_Util_isFaceToChara( int index1, int index2, int distance ); +BOOL NPC_Util_charIsInFrontOfChar( int index1, int index2, int distance ); + +int NPC_Util_SearchItemInChar( int charindex , int itemindex); +int NPC_Util_GiveAllItemToChar( int give , int take ); + +#ifdef _NPCSERVER_NEW +BOOL NPC_UtilObj_isFaceToFace( int npcobjindex, int charaindex, int distance ); +#endif + +/* +int NPC_Util_ControlOtherNPC( CHAR_TYPE chartype , + char *npcname, + char *command ); +*/ +void NPC_Util_NPCDelete( int srcindex ); +BOOL NPC_Util_moveItemToMap( int itemindex , int fl , int x , int y, + BOOL net ); +char *NPC_Util_GetArgStr( int index, char *argstr, int len); +int NPC_Util_GetNumFromStrWithDelim( char *srcstr, char* in); +char *NPC_Util_GetStrFromStrWithDelim( char *srcstr, char *srhstr, + char *buf, int len); +inline double NPC_Util_sellRate( int seller ); +inline double NPC_Util_buyRate( int buyer ); +BOOL NPC_Util_IsVisiblePlayer( int meindex); +BOOL NPC_Util_WordInclude( char *text , char *word ); +void NPC_Util_RandomToken(char *in, char *out, int outbufsize ); + +void cutDotsTail( char *s ); +int NPC_Util_FrontItem( int meindex ); +void NPC_Util_Boss2KingStart( int bossindex ); +int NPC_Util_FrontChar( int meindex ); +int *NPC_Util_getEnemy( int meindex, int charaindex); + +void NPC_NowEndEventSetFlgCls(int talker,int shiftbit); +void NPC_EventSetFlg(int talker,int shiftbit); +BOOL NPC_EventCheckFlg(int point,int shiftbit); +void NPC_NowEventSetFlg(int talker,int shiftbit); +void NPC_NowEventSetFlgCls(int talker,int shiftbit); +BOOL NPC_NowEventCheckFlg(int point,int shiftbit); +char *NPC_Util_CheckAssignArgFile( int index, char *filename); + +// CoolFish: Family Adv 2001/8/4 +void AddFMAdv(int talker, int shiftbit); + +// Robin 0817 family income +int addNpcFamilyTax( int meindex, int talkerindex, int income ); + +#define NPC_ENEMY_ENEMYNUMBER 10 /* 请蜇衬 醒 */ + +/* 娄醒白央奶伙 心 心及ㄠ垫及 侬醒晓蜃 */ +#define NPC_UTIL_GETARGSTR_LINEMAX 4096 +/* 娄醒白央奶伙及 心 心田永白央扔奶术*/ +#ifdef _NEWEVENT +#define NPC_UTIL_GETARGSTR_BUFSIZE 1024*1200 +#else +#define NPC_UTIL_GETARGSTR_BUFSIZE 1024*12 +#endif +#endif + + + diff --git a/gmsv/include/object.h b/gmsv/include/object.h new file mode 100644 index 0000000..fed25a5 --- /dev/null +++ b/gmsv/include/object.h @@ -0,0 +1,80 @@ +#ifndef __OBJECT_h__ +#define __OBJECT_h__ + +#include "common.h" + +typedef enum +{ + OBJTYPE_NOUSE, /* 仇及奶件犯永弁旦反银匀化中卅中午中丹仪毛憎允*/ + OBJTYPE_CHARA, /* 平乓仿弁正 CHAR_chara尺及奶件犯永弁旦 */ + OBJTYPE_ITEM, /* 失奶 丞 ITEM_item 尺及奶件犯永弁旦 */ + OBJTYPE_GOLD, /* 打□伙玉 云嗯及汹互index卞 匀化中月 */ +#ifdef _NPCSERVER_NEW + OBJTYPE_NPCSCHARA, +#endif +#ifdef _MAP_WARPPOINT + OBJTYPE_WARPPOINT, +#endif + OBJTYPE_NUM +}OBJTYPE; + +typedef struct tagObject +{ + OBJTYPE type; + + char objname[256]; + int npcsindex; + int dir; + int imagenum; + + int chartype; + int index; + int x; + int y; + int floor; +#ifdef _DEL_DROP_GOLD + int time; +#endif +}Object; + +BOOL CHECKOBJECT( int index ); +BOOL CHECKOBJECTUSE( int index ); +BOOL initObjectArray( int num ); +BOOL endObjectArray( void ); + +INLINE int _initObjectOne( char *file, int line, Object* ob ); +#define initObjectOne( ob ) _initObjectOne( __FILE__, __LINE__, ob) + +void endObjectOne( int index ); +int initObjectFromObjectMember(OBJTYPE type, int index, int x, int y , int floor ); + +INLINE int OBJECT_getType( int index ); +INLINE int OBJECT_setType( int index, int newvalue ); +INLINE int OBJECT_getFloor( int index ); +INLINE int OBJECT_setFloor( int index, int newvalue ); +INLINE int OBJECT_getX( int index ); +INLINE int OBJECT_setX( int index, int newvalue ); +INLINE int OBJECT_getY( int index ); +INLINE int OBJECT_setY( int index, int newvalue ); +INLINE int OBJECT_getIndex( int index ); +INLINE int OBJECT_setIndex( int index, int newvalue ); +INLINE int OBJECT_getNum( void ); + +#ifdef _NPCSERVER_NEW +INLINE int OBJECT_getNpcIndex( int index ); +INLINE char* OBJECT_getName( int index ); +INLINE int OBJECT_getNpcImage( int index ); +INLINE int OBJECT_getNpcdir( int index ); +#endif +INLINE int OBJECT_getchartype( int index ); +INLINE void OBJECT_setchartype( int index, int flg); + +#ifndef _SIMPLIFY_ITEMSTRING +BOOL storeObjects( char* dirname ); +BOOL restoreObjects( char* dirname ); +#endif + +int searchObjectFromCharaIndex( int index ); + +#endif +/*__OBJECT_h__*/ diff --git a/gmsv/include/pet.h b/gmsv/include/pet.h new file mode 100644 index 0000000..e250e51 --- /dev/null +++ b/gmsv/include/pet.h @@ -0,0 +1,32 @@ +#ifndef __PET_H__ +#define __PET_H__ + +/* + * 矢永玄楮 及涩烂匹允[ + */ +#include "version.h" +#include "common.h" + +#define PETFEEDTIME 60*60 // 宠物蛋 养时间(秒) +//#define PETFEEDTIME 5 // 宠物蛋 养时间(秒) + +int PET_DEBUG_initPetOne( int charaindex); +int PET_dropPet( int charaindex, int havepetindex); +int PET_dropPetFollow( int charaindex, int havepetindex, int fl, int x, int y); +int PET_dropPetFLXY( int charaindex, int havepetindex, int fl, int x, int y); +int PET_dropPetAbsolute( int petindex, int floor, int x, int y,BOOL net); +int PET_createPetFromCharaIndex( int charaindex, int enemyindex); +BOOL PET_SelectBattleEntryPet( int charaindex, int petarray); +int PET_initCharOneArray( Char *ch); +BOOL PET_isPutPoint( int fl,int x, int y); + + +BOOL PET_getBaseForAllocpoint( int toindex, int *work); +void PET_showEditBaseMsg( int charaindex, int toindex, int itemindex, int *work); + +#ifdef _PET_EVOLUTION +BOOL PET_getBaseAndSkill( int charaindex, int baseindex, int *base, int *skill, int flg); +#endif +BOOL CHAR_DelPetForIndex( int charaindex, int petindex); + +#endif diff --git a/gmsv/include/pet_event.h b/gmsv/include/pet_event.h new file mode 100644 index 0000000..bce25ff --- /dev/null +++ b/gmsv/include/pet_event.h @@ -0,0 +1,18 @@ +#ifndef __PET_EVENT_H__ +#define __PET_EVENT_H__ + +/* + * 矢永玄楮 及涩烂匹允[ + * 矢永玄奶矛件玄楮 + */ + +void PET_Talkfunc( int meindex, int talkerindex, char *msg, int color); + +void PET_Watchfunc( int objmeindex, int objmoveindex, + CHAR_ACTION act, int x, int y, int dir, + int* opt, int optlen ); +int PET_CleanPetdeletetime( int objmeindex); +void PET_CleanFreePetAll(); + + +#endif diff --git a/gmsv/include/pet_skill.h b/gmsv/include/pet_skill.h new file mode 100644 index 0000000..e59187f --- /dev/null +++ b/gmsv/include/pet_skill.h @@ -0,0 +1,546 @@ +#ifndef __PET_SKILL_H__ +#define __PET_SKILL_H__ + +#include "util.h" + +typedef enum +{ + PETSKILL_FIELD_ALL, /* 允屯化及桦赭匹银尹月 */ + PETSKILL_FIELD_BATTLE, /* 爵 及心 */ + PETSKILL_FIELD_MAP, /* 骚橘穴永皿晓及心 */ + +}PETSKILL_FIELDTYPE; + +typedef enum +{ + PETSKILL_TARGET_MYSELF, /* 愤坌及心 */ + PETSKILL_TARGET_OTHER, /* 职及谛 愤坌殖戈) */ + PETSKILL_TARGET_ALLMYSIDE, /* 蝈 */ + PETSKILL_TARGET_ALLOTHERSIDE, /* 锹澎础蝈 */ + PETSKILL_TARGET_ALL, /* 蝈化 */ + PETSKILL_TARGET_NONE, /* 簿手蓟 请 卅中[ 豢支凶户及凛 */ + PETSKILL_TARGET_OTHERWITHOUTMYSELF,/* 职及谛 愤坌殖引卅中) */ + PETSKILL_TARGET_WITHOUTMYSELFANDPET, /* 愤坌午矢永玄动陆 */ +}PETSKILL_TARGETTYPE; + +typedef enum +{ + PETSKILL_ID, + PETSKILL_FIELD, + PETSKILL_TARGET, +#ifdef _PETSKILL2_TXT + PETSKILL_USETYPE, +#endif + PETSKILL_COST, + PETSKILL_ILLEGAL, + PETSKILL_DATAINTNUM, +}PETSKILL_DATAINT; + +typedef enum +{ + PETSKILL_NAME, /* */ + PETSKILL_COMMENT, /* 戊丢件玄*/ + PETSKILL_FUNCNAME, /* 楮醒 */ + PETSKILL_OPTION, /* 左皿扑亦件 */ +#ifdef _CFREE_petskill + PETSKILL_FREE, /*条件*/ + PETSKILL_KINDCODE, /*种类码*/ +#endif + + PETSKILL_DATACHARNUM, +}PETSKILL_DATACHAR; + +typedef struct tagPetskill +{ + int data[PETSKILL_DATAINTNUM]; + STRING64 string[PETSKILL_DATACHARNUM]; + +}Petskill; + +typedef int (*PETSKILL_CALLFUNC)( int, int, int, char * ); + +INLINE BOOL PETSKILL_CHECKINDEX( int index ); +INLINE int PETSKILL_getInt( int index, PETSKILL_DATAINT element); +INLINE int PETSKILL_setInt( int index, PETSKILL_DATAINT element, int data); +INLINE char* PETSKILL_getChar( int index, PETSKILL_DATACHAR element); +INLINE BOOL PETSKILL_setChar( int index ,PETSKILL_DATACHAR element, char* new ); +int PETSKILL_getPetskillNum( void); + +#define PETSKILL_GetArray( charaindex, havepetskill) _PETSKILL_GetArray( __FILE__, __LINE__, charaindex, havepetskill) +int _PETSKILL_GetArray( char *file, int line, int charaindex, int havepetskill ); + +BOOL PETSKILL_initPetskill( char *filename); +BOOL PETSKILL_reinitPetskill( void ); +int PETSKILL_getPetskillArray( int petskillid); +PETSKILL_CALLFUNC PETSKILL_getPetskillFuncPointer(char* name); + +int PETSKILL_Use( + int charaindex, + int toindex, + int array, + char *data + //BOOL isCLI // Robin 2001/02/26 if owner is player +); + +int PETSKILL_ContinuationAttack( + int charaindex, + int toindex, + int array, + char *data +); +int PETSKILL_ChargeAttack( + int charaindex, + int toindex, + int array, + char *data +); + + +#define PETSKILL_ID_GBREAK 0 // 布□玉皮伊奶弁 +#define PETSKILL_ID_RENZOKU 1 // 粮 猾 +#define PETSKILL_ID_GUARDIAN 2 // 镝舅甩民跤 +#define PETSKILL_ID_CHARGE 3 // 民乓□斥 猾 +#define PETSKILL_ID_ICHIGEKI 100 // 域猾 诮 +#define PETSKILL_ID_POWERBALANCE 110 // 及讽 + +//********************************************************************** +// +// 檗 -- 职谛毛潮曰卅互日 猾 +// +int PETSKILL_Guardian( + int charaindex, + int toindex, + int array, + char *data +); +// +//********************************************************************** + +int PETSKILL_PowerBalance( + int charaindex, + int toindex, + int array, + char *data +); + +//********************************************************************** +// +// 檗 -- 雄 分互荚 今木月割 互嫖中 +// +int PETSKILL_Mighty( + int charaindex, + int toindex, + int array, + char *data +); +// +//********************************************************************** + + +//********************************************************************** +// +// 檗 -- 旦 □正旦唱橘 猾 +// +int PETSKILL_StatusChange( + int charaindex, + int toindex, + int array, + char *data + +); +// +//********************************************************************** + + +//******************************************************* +// +// 檗 -- 骚橘 猾 +// +int PETSKILL_NormalAttack( + int charaindex, + int toindex, + int array, + char *data + +); +// +//******************************************************* + +//******************************************************* +// +// 檗 -- 骚橘 豢 +// +int PETSKILL_NormalGuard( + int charaindex, + int toindex, + int array, + char *data + +); +// +//******************************************************* + +//******************************************************* +// 檗 -- 谨窗(窒手仄卅中) +// +int PETSKILL_None( + int charaindex, + int toindex, + int array, + char *data + +); +// +//******************************************************* + +//******************************************************* +// 檗 -- 哗萄域葱(怅木化ㄠ正□件 卞锹澎及 井日 猾) +// +int PETSKILL_EarthRound( + int charaindex, + int toNo, + int array, + char *data + +); +// +//******************************************************* + +//******************************************************* +// 檗 -- 布□玉皮伊奶弁 +// +int PETSKILL_GuardBreak( + int charaindex, + int toNo, + int array, + char *data + +); +/////////////////////////////////////////// +#ifdef _SKILL_GUARDBREAK2//破除防御2 vincent add 2002/05/20 +int PETSKILL_GuardBreak2( + int charaindex, + int toNo, + int array, + char *data + +); +#endif +// +//******************************************************* +//******************************************************* +// 檗 -- 木 +// +int PETSKILL_Abduct( + int charaindex, + int toNo, + int array, + char *data + +); +// +//******************************************************* +//******************************************************* +// 檗 -- 戈 +int PETSKILL_Steal( + int charaindex, + int toNo, + int array, + char *data + +); +//******************************************************* +#ifdef _BATTLESTEAL_FIX +int PETSKILL_StealMoney( + int charaindex, + int toNo, + int array, + char *data + +); +#endif + +#ifdef _ITEM_INSLAY +int PETSKILL_Inslay( + int index, + int toNo, + int array, + char *data + +); +#endif + +#ifdef _PETSKILL_FIXITEM +int PETSKILL_Fixitem( + int index, + int toNo, + int array, + char *data + +); +#endif + +// 檗 -- 失奶 丞宁岳 +// +int PETSKILL_Merge( + int charaindex, + int toNo, + int array, + char *data + +); +// +//******************************************************* + +//******************************************************* +// 檗 -- 用□布□玉 +// +int PETSKILL_NoGuard( + int charaindex, + int toNo, + int array, + char *data + +); +// +//******************************************************* + + + +// Terry add 2001/11/05 +#ifdef __ATTACK_MAGIC +int PETSKILL_AttackMagic( + int charaindex, + int toindex, + int array, + char *data +); +#endif + +#ifdef _VARY_WOLF +int PETSKILL_Vary( int cindex, int tindex, int id, char* data); +#endif + +#ifdef _SKILL_WILDVIOLENT_ATT +//vincent add 2002/05/16 +int PETSKILL_WildViolentAttack( + int charaindex, + int toindex, + int array, + char *data +); +#endif + +#ifdef _SKILL_SPEEDY_ATT +//vincent add 2002/05/16 +int PETSKILL_SpeedyAttack( + int charaindex, + int toindex, + int array, + char *data +); +#endif + +#ifdef _SKILL_SACRIFICE +//vincent add 2002/05/30 +int PETSKILL_Sacrifice( + int charaindex, + int toindex, + int array, + char *data +); +#endif + +#ifdef _SKILL_REFRESH +//vincent add 2002/08/08 +int PETSKILL_Refresh( + int charaindex, + int toindex, + int array, + char *data +); +#endif + +#ifdef _SKILL_WEAKEN //vincent宠技:虚弱 +int PETSKILL_Weaken( + int charaindex, + int toindex, + int array, + char *data +); +#endif + +#ifdef _SKILL_DEEPPOISON //vincent宠技:剧毒 +int PETSKILL_Deeppoison( + int charaindex, + int toindex, + int array, + char *data +); +#endif + +#ifdef _SKILL_BARRIER //vincent宠技:魔障 +int PETSKILL_Barrier( + int charaindex, + int toindex, + int array, + char *data +); +#endif + +#ifdef _SKILL_NOCAST //vincent宠技:沉默 +int PETSKILL_Nocast( + int charaindex, + int toindex, + int array, + char *data +); +#endif + +#ifdef _SKILL_ROAR //vincent宠技:大吼 +int PETSKILL_Roar( + int charaindex, + int toindex, + int array, + char *data +); +#endif + +#ifdef _PSKILL_FALLGROUND +int PETSKILL_FallGround( int charaindex, int toNo, int array, char *data ); +#endif +#ifdef _PETSKILL_EXPLODE +int PETSKILL_Explode( int charaindex, int toNo, int array, char *data ); +#endif + +#ifdef _PRO_BATTLEENEMYSKILL +int ENEMYSKILL_ReLife( int enemyindex, int toNo, int array, char *data ); +int ENEMYSKILL_ReHP( int enemyindex, int toNo, int array, char *data ); + +int ENEMYSKILL_EnemyHelp( int enemyindex, int toNo, int array, char *data ); +#endif + +#ifdef _SKILL_DAMAGETOHP +int PETSKILL_DamageToHp( int charaindex, int toNo, int array, char *data ); +#endif + +#ifdef _PETSKILL_TIMID +int PETSKILL_BattleTimid( int charaindex, int toNo, int array, char *data ); +#endif +#ifdef _PETSKILL_2TIMID +int PETSKILL_2BattleTimid( int charaindex, int toNo, int array, char *data ); +#endif +#ifdef _PETSKILL_ANTINTER +int PETSKILL_AntInter(int charaindex, int toindex, int array, char* data); // 宠物技能战斗模组 +#endif + +#ifdef _PETSKILL_PROPERTY +int PETSKILL_BattleProperty( int charaindex, int toNo, int array, char *data ); +#endif + +#ifdef _PETSKILL_TEAR +int PETSKILL_BattleTearDamage( int charaindex, int toNo, int array, char *data ); +#endif + +#ifdef _BATTLE_LIGHTTAKE +int PETSKILL_Lighttakeed( int charaindex, int toNo, int array, char *data ); +#endif + +#ifdef _BATTLE_ATTCRAZED +int PETSKILL_AttackCrazed( int charaindex, int toNo, int array, char *data ); +#endif + +#ifdef _SHOOTCHESTNUT // Syu ADD 宠技:丢栗子 +int PETSKILL_AttackShoot( int charaindex, int toNo, int array, char *data ); +#endif + +#ifdef _Skill_MPDAMAGE +int PETSKILL_MpDamage( int charaindex, int toNo, int array, char *data ); +#endif + +#ifdef _PETSKILL_SETDUCK +int PETSKILL_SetDuck( int charaindex, int toNo, int array, char *data ); +#endif + +#ifdef _MAGICPET_SKILL +int PETSKILL_SetMagicPet( int charaindex, int toNo, int array, char *data ); +#endif + +#ifdef _SKILL_TOOTH +int PETSKILL_ToothCrushe( int charaindex, int toNo, int array, char *data ); +#endif + +#ifdef _PSKILL_MODIFY +int PETSKILL_Modifyattack( int charaindex, int toNo, int array, char *data ); +#endif + +#ifdef _PSKILL_MDFYATTACK +int PETSKILL_Mdfyattack( int charaindex, int toNo, int array, char *data ); +#endif + + +#ifdef _MAGIC_SUPERWALL +int PETSKILL_MagicStatusChange( int charaindex, int toindex, int array, char *data ); +#endif + +#ifdef _PET_SKILL_SARS // WON ADD 毒煞蔓延 +int PETSKILL_Sars( int charaindex, int toNo, int array, char *data ); +#endif + +#ifdef _SONIC_ATTACK // WON ADD 音波攻击 +int PETSKILL_Sonic( int charaindex, int toNo, int array, char *data ); +#endif +#ifdef _PETSKILL_REGRET +int PETSKILL_Regret( int charaindex, int toNo, int array, char *data ); +#endif + +#ifdef _PETSKILL_GYRATE +int PETSKILL_Gyrate( int charaindex, int toNo, int array, char *data ); +#endif + +#ifdef _PETSKILL_ACUPUNCTURE //针刺外皮 +int PETSKILL_Acupuncture( int charaindex, int toNo, int array, char *data ); +#endif + +#ifdef _PETSKILL_RETRACE +int PETSKILL_Retrace( int charaindex, int toNo, int array, char *data ); +#endif + +#ifdef _PETSKILL_HECTOR +int PETSKILL_Hector( int charaindex, int toNo, int array, char *data ); +#endif + +#ifdef _PETSKILL_FIREKILL +int PETSKILL_Firekill( int charaindex, int toNo, int array, char *data ); +#endif + +#ifdef _PETSKILL_DAMAGETOHP //暗月狂狼(嗜血技的变体) +int PETSKILL_DamageToHp2( int charaindex, int toNo, int array, char *data ); +#endif + +#ifdef _PETSKILL_BECOMEFOX +int PETSKILL_BecomeFox( int charaindex, int toNo, int array, char* data); +#endif + +#ifdef _PETSKILL_BECOMEPIG +int PETSKILL_BecomePig( int charaindex, int toNo, int array, char* data); +#endif + +#ifdef _PETSKILL_SHOWMERCY +int PETSKILL_ShowMercy(int charaindex, int toNo, int array, char* data); +#endif + +#ifdef _PETSKILL_COMBINED +int PETSKILL_Combined(int charaindex, int toNo, int array, char* data); +#endif + +#ifdef _PETSKILL_LER +int PETSKILL_BatFly(int charaindex, int toNo, int array, char* data); // 雷尔技 - 群蝠四窜 +int PETSKILL_DivideAttack(int charaindex, int toNo, int array, char* data); // 雷尔技 - 分身地裂 +#endif + +#ifdef _PETSKILL_BATTLE_MODEL +int PETSKILL_BattleModel(int charaindex, int toindex, int array, char* data); // 宠物技能战斗模组 +#endif + +#endif diff --git a/gmsv/include/pet_skillinfo.h b/gmsv/include/pet_skillinfo.h new file mode 100644 index 0000000..db735e1 --- /dev/null +++ b/gmsv/include/pet_skillinfo.h @@ -0,0 +1,139 @@ +/* generated by makedefs.perl */ +#include "version.h" + +#define PETSKILL_NONE ( 0 ) +#define PETSKILL_NORMALATTACK ( 1 ) +#define PETSKILL_NORMALGUARD ( 2 ) +#define PETSKILL_GUARDBREAK ( 3 ) +#define PETSKILL_CONTINUATIONATTACK1 ( 10 ) +#define PETSKILL_CONTINUATIONATTACK2 ( 11 ) +#define PETSKILL_CONTINUATIONATTACK3 ( 12 ) +#define PETSKILL_CONTINUATIONATTACK4 ( 13 ) +#define PETSKILL_GUARDIAN ( 25 ) +#define PETSKILL_CHARGE1 ( 30 ) +#define PETSKILL_CHARGE2 ( 31 ) +#define PETSKILL_MIGHTY1 ( 40 ) +#define PETSKILL_MIGHTY2 ( 41 ) +#define PETSKILL_POWERBALANCE1 ( 50 ) +#define PETSKILL_POWERBALANCE2 ( 51 ) +#define PETSKILL_POWERBALANCE3 ( 52 ) +#define PETSKILL_POISON_ATTACK1 ( 60 ) +#define PETSKILL_POISON_ATTACK2 ( 61 ) +#define PETSKILL_STONE ( 80 ) +#define PETSKILL_CONFUSION_ATTACK ( 90 ) +#define PETSKILL_DRUNK_ATTACK ( 100 ) +#define PETSKILL_SLEEP_ATTACK ( 110 ) +#define PETSKILL_EARTHROUND1 ( 120 ) +#define PETSKILL_Abduct ( 130 ) +#define PETSKILL_STEAL ( 140 ) +#define PETSKILL_NOGUARD1 ( 150 ) +#define PETSKILL_NOGUARD2 ( 151 ) +#define PETSKILL_NOGUARD3 ( 152 ) +#define PETSKILL_MERGE ( 200 ) +#define PETSKILL_MERGE2 ( 201 ) +#ifdef _ALCHEMIST +#define PETSKILL_ALCHEMIST ( 202 ) +#endif +#ifdef _PSKILL_FALLGROUND +#define PETSKILL_FALLGROUND ( 210 ) +#endif +#ifdef _BATTLESTEAL_FIX +#define PETSKILL_STEALMONEY ( 211 ) +#endif +#ifdef _PRO_BATTLEENEMYSKILL +#define ENEMYSKILL_RELIFES ( 500 ) +#define ENEMYSKILL_RELIFHP ( 501 ) +#define ENEMYSKILL_HELP ( 502 ) +#endif +#ifdef _SKILL_DAMAGETOHP +#define PETSKILL_DAMAGETOHP ( 503) +#endif +#ifdef _Skill_MPDAMAGE +#define PETSKILL_MPDAMAGE ( 504) +#endif +#ifdef _SKILL_WILDVIOLENT_ATT +#define PETSKILL_WILDVIOLENTATTACK ( 540)//狂暴 vincent add 2002/05/16 +#endif +#ifdef _SKILL_SPEEDY_ATT +#define PETSKILL_SPEEDYATTACK ( 541) //疾速 vincent add 2002/05/16 +#endif +#ifdef _SKILL_GUARDBREAK2 +#define PETSKILL_GUARDBREAK2 ( 542) //破除防御2 vincent add 2002/05/20 +#endif +#ifdef _SKILL_SACRIFICE +#define PETSKILL_SACRIFICE ( 543) //救援 vincent add 2002/05/30 +#endif + +#ifdef _SKILL_WEAKEN +#define PETSKILL_WEAKEN ( 544) //虚弱 vincent add 2002/07/11 +#endif + +#ifdef _SKILL_DEEPPOISON +#define PETSKILL_DEEPPOISON ( 545) //剧毒 vincent add 2002/07/16 +#endif + +#ifdef _SKILL_BARRIER +#define PETSKILL_BARRIER ( 546) //魔障 vincent add 2002/07/16 +#endif + +#ifdef _SKILL_NOCAST +#define PETSKILL_NOCAST ( 547) //沉默 vincent add 2002/07/16 +#endif + + +#ifdef _SKILL_ROAR +#define PETSKILL_ROAR ( 548) //大吼 vincent add 2002/07/11 +#endif + +#ifdef _ITEM_INSLAY +#define PETSKILL_INSLAY (572) +#endif + +#ifdef _PETSKILL_FIXITEM +#define PETSKILL_FIXITEM (573) +#endif + +#ifdef _SKILL_TOOTH +#define PETSKILL_TOOTHCRUSHE (574) +#endif + +#ifdef _SKILL_REFRESH +#define PETSKILL_REFRESH ( 575) //vincent add 2002/08/08 +#endif + +#ifdef _VARY_WOLF +#define PETSKILL_VARY ( 600 ) +#endif + +#ifdef _PETSKILL_SETDUCK +#define PETSKILL_SETDUCK ( 600 ) +#endif + +#ifdef _MAGICPET_SKILL +#define PETSKILL_SETMAGICPET ( 601 ) +#endif + +#ifdef _BATTLE_LIGHTTAKE +#define PETSKILL_Light ( 608) +#endif + +#ifdef _BATTLE_ATTCRAZED +#define PETSKILL_AttCrazed ( 608) +#endif + +#ifdef _SHOOTCHESTNUT // Syu ADD 宠技:丢栗子 +#define PETSKILL_AttShoot ( 609 ) +#endif + +#ifdef _PETSKILL_BECOMEPIG +#define PETSKILL_BECOMEPIG ( 628 ) +#endif + +#ifdef _PETSKILL_LER +#define PETSKILL_BATFLY ( 633 ) +#define PETSKILL_DIVIDEATTACK ( 634 ) +#endif + +#ifdef _PETSKILL_BATTLE_MODEL +#define PETSKILL_BATTLE_MODEL ( 635 ) +#endif diff --git a/gmsv/include/petmail.h b/gmsv/include/petmail.h new file mode 100644 index 0000000..8a18fab --- /dev/null +++ b/gmsv/include/petmail.h @@ -0,0 +1,57 @@ +#ifndef __PETMAIL_H__ +#define __PETMAIL_H__ +#include "version.h" +/* + * 矢永玄楮 及涩烂匹允[ + */ +#define PETMAIL_OFFMSG_MAX 10000 +#define PETMAIL_OFFMSG_TIMEOUT ( 3 * 24 * 3600 ) +#define PETMAIL_CHECK_OFFMSG_EXPIRE_INTERVAL 3600 +#define PETMAIL_OFFMSG_TEXTLEN 512 + +/* 矢永玄丢□伙及请蜇躲绊及醒[ 端及醒方曰ㄠ剂卅仁允月仇午 */ +#define PETMAIL_EFFECTMAX 1 + +#define PETMAIL_SPOOLFLOOR 777 +#define PETMAIL_SPOOLX 30 +#define PETMAIL_SPOOLY 30 + +#define PETMAIL_LOOPINTERVAL1 500 +#define PETMAIL_LOOPINTERVAL2 5000 + +/* 左白仿奶件及平乓仿尺及丢永本□斥毛创尹月 */ +typedef struct +{ + int use; + time_t send_tm; /* 交□扒互丢永本□斥毛霜耨仄凶凛棉+TIMEOUT[ */ + int color; /* 平旦玄及缙 */ + char text[PETMAIL_OFFMSG_TEXTLEN]; /* 平旦玄及 */ + char destcd[CDKEYLEN]; /* 霜耨燮CDKEY */ + char destcharname[CHARNAMELEN]; /* 霜耨燮及平乓仿 */ + char srccd[CDKEYLEN]; /* 霜耨葭及cdkey */ + char srccharname[CHARNAMELEN]; /* 霜耨葭及平乓仿 */ + +} PETMAIL_offmsg; + +void PETMAIL_Loopfunc( int index); +BOOL PETMAIL_CheckPlayerExist( int index, int mode); + +BOOL PETMAIL_initOffmsgBuffer( int count ); +BOOL PETMAIL_addOffmsg( int fromindex, char *tocdkey, char *tocharaname, + char *text, int color ); +PETMAIL_offmsg *PETMAIL_getOffmsg( int offmsgindex); +BOOL PETMAIL_deleteOffmsg( int offmsgindex); +void PETMAIL_proc( void ); +BOOL storePetmail( void); +BOOL PETMAIL_sendPetMail( int cindex, int aindex, + int havepetindex, int haveitemindex, char* text , int color ); + +#ifdef _PETMAIL_DEFNUMS +void CHAR_AutoPickupMailPet( int charaindex, int petindex ); +#endif +int PETMAIL_getPetMailTotalnums( void); +void PETMAIL_delPetMailTotalnums( int numflg); +void PETMAIL_setPetMailTotalnums( int numflg); +int PETMAIL_CheckIsMyOffmsg( int fromindex, char *tocdkey, char *tocharaname); + +#endif diff --git a/gmsv/include/profession_skill.h b/gmsv/include/profession_skill.h new file mode 100644 index 0000000..cc534fd --- /dev/null +++ b/gmsv/include/profession_skill.h @@ -0,0 +1,169 @@ +#include "version.h" + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 +#include "common.h" +#include "util.h" +#include "skill.h" + +#define PROFESSION_MAX_LEVEL 26 // 职业等级上限 26级 +#define PROFESSION_SKILL_MAX_LEVEL 100 // 技能等级上限 100级 +#ifdef _75_TEST +#define PROFESSION_SKILL_ADD_POINT 100 // 升级检定通过,增加经验值 +#else +#define PROFESSION_SKILL_ADD_POINT 1 // 升级检定通过,增加经验值 +#endif +// 职业别 +typedef enum +{ + PROFESSION_CLASS_NONE=0, // 无职业 + PROFESSION_CLASS_FIGHTER, // 勇士 + PROFESSION_CLASS_WIZARD, // 巫师 + PROFESSION_CLASS_HUNTER, // 猎人 + PROFESSION_CLASS_NUM, +}PROFESSION_CLASS_TYPE; + +typedef enum +{ + PROFESSION_SKILL_NAME, // 技能名称 + PROFESSION_SKILL_TXT, // 说明 + PROFESSION_SKILL_FUNCNAME, // 使用函数 + PROFESSION_SKILL_OPTION, // 函数参数 + PROFESSION_SKILL_DATACHARNUM, +}PROFESSION_SKILL_DATACHAR; + + +typedef enum +{ + PROFESSION_SKILL_ID, // 技能编号 + PROFESSION_SKILL_PROFESSION_CLASS, // 职业 + PROFESSION_SKILL_TARGET, // 目标种类 + PROFESSION_SKILL_COST_MP, // 耗费MP + PROFESSION_SKILL_USE_FLAG, // 使用旗标 + PROFESSION_SKILL_KIND, // 技能种类 + PROFESSION_SKILL_ICON, // ICON图号 + PROFESSION_SKILL_IMG_1, // 攻击前图号(集气状态) + PROFESSION_SKILL_IMG_2, // 攻击图号(攻击中) + PROFESSION_SKILL_COST, // 购买金额 + PROFESSION_SKILL_FIX_VALUE, // 升级修正数值 + + //角色先学习以下所设定技能与熟练度均达到时才可以学习本技能 + PROFESSION_SKILL_LIMIT1, // 必修技能 1 编号 + PROFESSION_SKILL_PERCENT1, // 必修技能应有熟练度% 1 + PROFESSION_SKILL_LIMIT2, // 必修技能 2 编号 + PROFESSION_SKILL_PERCENT2, // 必修技能应有熟练度% 2 + PROFESSION_SKILL_LIMIT3, // 必修技能 3 编号 + PROFESSION_SKILL_PERCENT3, // 必修技能应有熟练度% 3 + PROFESSION_SKILL_LIMIT4, // 必修技能 4 编号 + PROFESSION_SKILL_PERCENT4, // 必修技能应有熟练度% 4 + PROFESSION_SKILL_DATAINTNUM, +}PROFESSION_SKILL_DATAINT; + + +typedef struct tagProfessionkill +{ + STRING64 string[PROFESSION_SKILL_DATACHARNUM]; + int data[PROFESSION_SKILL_DATAINTNUM]; +}Professionskill; + + +//---------------------------------------------------------------------------- +typedef int (*PROFESSION_SKILL_CALLFUNC)( int, int, int, char *, int ); +BOOL PROFESSION_initSkill( char *filename); +void rePROFESSION_initSkill(); + +//---------------------------------------------------------------------------- +INLINE BOOL PROFESSION_SKILL_CHECKINDEX( int index ); +INLINE int PROFESSION_SKILL_getInt( int index, PROFESSION_SKILL_DATAINT element); +INLINE int PROFESSION_SKILL_setInt( int index, PROFESSION_SKILL_DATAINT element, int data); +INLINE char* PROFESSION_SKILL_getChar( int index, PROFESSION_SKILL_DATACHAR element); +INLINE BOOL PROFESSION_SKILL_setChar( int index ,PROFESSION_SKILL_DATACHAR element, char* new ); +int PROFESSION_SKILL_getskillNum( void ); + +//---------------------------------------------------------------------------- +int PROFESSION_SKILL_getskillArray( int skillid); +PROFESSION_SKILL_CALLFUNC PROFESSION_SKILL_getskillFuncPointer(char* name ); +#define PROFESSION_SKILL_GetArray( charaindex, skill) _PROFESSION_SKILL_GetArray( __FILE__, __LINE__, charaindex, skill) +int _PROFESSION_SKILL_GetArray( char *file, int line, int charaindex, int skill ); +int PROFESSION_SKILL_Use( int charaindex, int skill, int toNo, char *data ); +void PROFESSION_SKILL_LVEVEL_UP( int charaindex, char *name ); +void PROFESSION_LEVEL_CHECK_UP( int charaindex ); +void PROFESSION_NORMAL_SKILL_LEVLE_UP(Skill* skill, int Pskillid, int charaindex ); +void PROFESSION_SKILL_WEAPON_FOCUS_LVEVEL_UP( int charaindex, char *name ); +void PROFESSION_SKILL_DUAL_WEAPON_LVEVEL_UP( int charaindex, char *name ); +int PROFESSION_SKILL_DEC_COST_MP( int charaindex, int skill, int Pskillid, int skill_level ); +int PROFESSION_SKILL_ADDSK( int charaindex, int skill, int level ); + +//---------------------------------------------------------------------------- +// 职业技能 +void profession_common_fun( int charaindex, int toNo, int skill_level, int array, int com1 ); +int PROFESSION_brust( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_chain_atk( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_avoid( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_recovery( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_weapon_focus( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_volcano_springs( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_fire_ball( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_fire_spear( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_summon_thunder( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_current( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_storm( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_ice_arrow( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_ice_crack( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_ice_mirror( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_doom( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_blood( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_blood_worms( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_sign( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_fire_enclose( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_ice_eclose( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_thunder_enclose( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_fire_practice( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_ice_practice( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_thunder_practice( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_enclose( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_transpose( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_reback( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_chain_atk_2( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_scapegoat( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_enrage( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_energy_collect( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_focus( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_shield_attack( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_dual_weapon( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_deflect( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_through_attack( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_cavalry( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_dead_attack( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_convolute( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_chaos( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_docile( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_trap( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_enrage_pet( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_dragnet( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_entwine( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_autarky( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_plunder( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_toxin_weapon( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_resist_fire( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_resist_ice( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_resist_thunder( int charaindex, int toindex, int array, char *data, int skill_level ); +#ifdef _PROFESSION_ADDSKILL +int PROFESSION_resist_f_i_t( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_call_nature( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_boundary( int charaindex, int toindex, int array, char *data, int skill_level ); +#endif +int PROFESSION_attack_weak( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_instigate( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_track( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_oblivion( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_full_mp( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_strong_back( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_strengthen( int charaindex, int toindex, int array, char *data, int skill_level ); +int PROFESSION_escape( int charaindex, int toNo, int array, char *data, int skill_level ); +int PROFESSION_g_resist_fire( int charaindex, int toNo, int array, char *data, int skill_level ); +int PROFESSION_g_resist_ice( int charaindex, int toNo, int array, char *data, int skill_level ); +int PROFESSION_g_resist_thunder( int charaindex, int toNo, int array, char *data, int skill_level ); + +//---------------------------------------------------------------------------- + +#endif diff --git a/gmsv/include/readmap.h b/gmsv/include/readmap.h new file mode 100644 index 0000000..7dfbf26 --- /dev/null +++ b/gmsv/include/readmap.h @@ -0,0 +1,130 @@ +#ifndef __MAP_H__ +#define __MAP_H__ +#include "common.h" +#include "util.h" + +typedef struct tagMAP_Objlink +{ + int objindex; + struct tagMAP_Objlink* next; +}MAP_Objlink, *OBJECT; + +#define GET_OBJINDEX(x) ((x)->objindex) +#define NEXT_OBJECT(x) ((x)->next) + +typedef struct tagMAP_Map +{ + int id; /* ID */ + int xsiz,ysiz; /* */ + char string[64]; /* 表示 */ + unsigned short* tile; /* */ + unsigned short* obj; /* */ + MAP_Objlink** olink; +#ifdef _MAP_NOEXIT + unsigned int startpoint; + int MapType; +#endif +}MAP_Map; + + +typedef enum +{ + MAP_WALKABLE, /* + * 场合 + * 擌 Q 见 0 + * 擌 M 见 1 + * 擌 M 见 2 + */ + MAP_HAVEHEIGHT, /* 高 非0 0 */ + MAP_DEFENCE, /* 抃 、守备力、0 以下 抃 */ + + MAP_INTODAMAGE, /* 入 时 HP 足 */ + MAP_OUTOFDAMAGE, /* 出 时 HP 足 */ + + MAP_SETED_BATTLEMAP, /* 设定 */ + MAP_BATTLEMAP, /* 番咥 1*/ + MAP_BATTLEMAP2, /* 番咥 2*/ + MAP_BATTLEMAP3, /* 番咥 3*/ + +/* 以下 LS2 使 SA 使 ( X @) */ + + MAP_INTODARKNESS, /* 入 时 暗 */ + MAP_INTOCONFUSION, /* 入 时 混 */ + + MAP_OUTOFPOISON, /* 入 时 毒 */ + MAP_OUTOFPARALYSIS, /* 入 时 */ + MAP_OUTOFSILENCE, /* 入 时 沈 */ + MAP_OUTOFSTONE, /* 入 时 石 */ + MAP_OUTOFDARKNESS, /* 入 时 暗 */ + MAP_OUTOFCONFUSION, /* 入 时 混 */ + + MAP_DATAINT_NUM, +}MAP_DATAINT; +typedef enum +{ + MAP_DATACHAR_NUM, +}MAP_DATACHAR; +typedef struct tagMAP_ImageData +{ + int data[MAP_DATAINT_NUM]; + STRING32 string[MAP_DATACHAR_NUM]; +}MAP_ImageData; + +typedef enum +{ + MAP_KINDWALKABLE, /* 擌 F 1 入 */ + + MAP_KINDNUM, +}MAP_kind; + + +INLINE int MAP_getfloorIndex( int floorid ); +int MAP_getfloorX( int floorid ); +int MAP_getfloorY( int floorid ); + +BOOL MAP_initReadMap( char* maptilefile , char* mapdir ); +BOOL MAP_initMapArray( int num ); +void MAP_endMapArray( void ); + +char* MAP_getdataFromRECT( int floor, RECT* seekr, RECT* realr ); +char *MAP_getChecksumFromRECT( int floor, RECT* seekr, RECT* realr, + int *tilesum, int *objsum, int *eventsum ); + +BOOL MAP_checkCoordinates( int mapid, int x, int y ); + +BOOL MAP_setTileAndObjData( int ff ,int fx, int fy, int tile, int obj); +BOOL MAP_getTileAndObjData( int ff ,int fx, int fy, int* tile, int* obj); +void MAP_sendAroundMapdata( int fl, int x, int y); +int MAP_getImageInt( int imagenumber, int element ); +BOOL MAP_setImageInt( int imagenumber, int element, int value ); +BOOL IsValidImagenumber( int imagenumber ); + +char* MAP_getfloorShowstring( int floorid ); +BOOL MAP_makeVariousMap(char* atile, char* aobj, int floor, int startx, int starty, int xsiz, int ysiz, MAP_kind kind ); +BOOL MAP_makeWalkableMap( char* data, int floor, int startx, int starty,int xsiz, int ysiz ); +BOOL MAP_IsThereSpecificFloorid( int floorid ); +BOOL MAP_IsValidCoordinate( int floorid, int x, int y ); +int MAP_attackSpecificPoint( int floor, int x, int y, int damage , + int charaindex ); + +BOOL MAP_addNewObj( int floor, int x, int y, int objindex ); +BOOL MAP_removeObj( int floor, int x, int y, int objindex ); +#define MAP_getTopObj( fl, x, y) _MAP_getTopObj( __FILE__, __LINE__, fl, x, y) +MAP_Objlink* _MAP_getTopObj( char *file, int line, int floor, int x, int y ); +#define MAP_objmove( objindex, of, ox, oy, nfl, nx, ny) _MAP_objmove( __FILE__, __LINE__, objindex, of, ox, oy, nfl, nx, ny) +BOOL _MAP_objmove( char *file, int line, int objindex, int ofloor, int ox, int oy, int nfloor, + int nx, int ny ); +char *MAP_getFloorName( int floor); +BOOL MAP_setObjData( int ff ,int fx, int fy, int obj, int objhp ); + +#ifdef _STATUS_WATERWORD //水世界状态 +int MAP_getMapFloorType( int floor); +#endif + +#ifdef _MAP_NOEXIT +unsigned int MAP_getExFloor_XY( int floor , int *map_type); +BOOL CHECKFLOORID( int id); +#endif + +#endif +/*__MAP_H__*/ diff --git a/gmsv/include/readnpc.h b/gmsv/include/readnpc.h new file mode 100644 index 0000000..b3e26d9 --- /dev/null +++ b/gmsv/include/readnpc.h @@ -0,0 +1,6 @@ +#ifndef __READNPC_H__ +#define __READNPC_H__ +BOOL NPC_readNPCSettingFiles( char* topdirectory ,int templatesize,int createsize); + +#endif + /*__READNPC_H__*/ diff --git a/gmsv/include/saacproto_cli.h b/gmsv/include/saacproto_cli.h new file mode 100644 index 0000000..33777b0 --- /dev/null +++ b/gmsv/include/saacproto_cli.h @@ -0,0 +1,383 @@ +/* output by ../../bin/lsgen.perl 0.41 ( 1998 May) + * made Mon Oct 9 10:21:40 2000 + * user ttom + * host proxy1 + * file /home/ttom/gmsv2/src/gmsv/include/saacproto_cli.h + * util ./saacproto_util.c , include/saacproto_util.h + * src /home/ttom/gmsv2/src/gmsv/../../doc/saacproto.html + */ +#ifndef _SAACPROTOCLI_H_ +#define _SAACPROTOCLI_H_ +#include "version.h" +#include "saacproto_util.h" + +#ifdef MAXLSRPCARGS +#if ( MAXLSRPCARGS <= ( 7 + 1 ) ) +#undef MAXLSRPCARGS +#define MAXLSRPCARGS ( 7 + 1 ) +#endif +#else +#define MAXLSRPCARGS ( 7 + 1 ) +#endif + +#ifdef _ALLDOMAN // (不可开) Syu ADD 排行榜NPC +void saacproto_UpdataStele_send( int fd , char *cdkey , char *name , char *title , int level , int trns , int time , int floor) ; +void saacproto_UpdataStele_recv( int fd , char *token) ; +void saacproto_S_UpdataStele_recv( int i , char *ocdkey , char *oname , char *ncdkey , + char *nname , char *title , int level , int trns , int floor ); +#endif + +void saacproto_ACGmsvDownRequest_recv( int fd,int min ) ; /* ../../doc/saacproto.html line 80 */ +void saacproto_ACServerLogin_send( int fd,char* servername,char* serverpas ) ; /* ../../doc/saacproto.html line 90 */ +void saacproto_ACServerLogin_recv( int fd,char* result,char* data ) ; /* ../../doc/saacproto.html line 101 */ +void saacproto_ACServerLogout_send( int fd ) ; /* ../../doc/saacproto.html line 114 */ + +#ifdef _PKSEVER_VER +void saacproto_ACCharList_send( int fd,char* id,char* pas,int mesgid, int star); +#else +void saacproto_ACCharList_send( int fd,char* id,char* pas,int mesgid ) ; /* ../../doc/saacproto.html line 123 */ +#endif + +void saacproto_ACCharList_recv( int fd,char* result,char* output,int id ) ; /* ../../doc/saacproto.html line 135 */ +void saacproto_ACCharLoad_send( int fd,char* id,char* pas,char* charname,int lock,char* opt,int mesgid ) ; /* ../../doc/saacproto.html line 158 */ +void saacproto_ACCharLoad_recv( int fd,char* result,char* data,int id,int saveindex ) ; /* ../../doc/saacproto.html line 185 */ +#ifdef _NEWSAVE +void saacproto_ACCharSave_send( int fd,char* id,char* charname,char* opt,char* charinfo,int unlock,int mesgid,int saveindex ) ; /* ../../doc/saacproto.html line 201 */ +#else +void saacproto_ACCharSave_send( int fd,char* id,char* charname,char* opt,char* charinfo,int unlock,int mesgid ) ; /* ../../doc/saacproto.html line 201 */ +#endif +void saacproto_ACCharSave_recv( int fd,char* result,char* data,int id ) ; /* ../../doc/saacproto.html line 224 */ +void saacproto_ACCharDelete_send( int fd,char* id,char* passwd,char* charname,char* option,int mesgid ) ; /* ../../doc/saacproto.html line 241 */ +void saacproto_ACCharDelete_recv( int fd,char* result,char* data,int id ) ; /* ../../doc/saacproto.html line 266 */ +void saacproto_ACLock_send( int fd,char* id,int lock,int mesgid ) ; /* ../../doc/saacproto.html line 281 */ +void saacproto_ACLock_recv( int fd,char* result,char* data,int id ) ; /* ../../doc/saacproto.html line 300 */ +void saacproto_ACUCheck_send( int fd,char* mem_id,int status ) ; /* ../../doc/saacproto.html line 314 */ +void saacproto_ACUCheck_recv( int fd,char* mem_id ) ; /* ../../doc/saacproto.html line 328 */ +void saacproto_DBUpdateEntryString_send( int fd,char* table,char* key,char* value,int msgid,int msgid2 ) ; /* ../../doc/saacproto.html line 339 */ +void saacproto_DBUpdateEntryString_recv( int fd,char* result,char* table,char* key,int msgid,int msgid2 ) ; /* ../../doc/saacproto.html line 354 */ +void saacproto_DBDeleteEntryString_send( int fd,char* table,char* key,int msgid,int msgid2 ) ; /* ../../doc/saacproto.html line 367 */ +void saacproto_DBDeleteEntryString_recv( int fd,char* result,char* table,char* key,int msgid,int msgid2 ) ; /* ../../doc/saacproto.html line 379 */ +void saacproto_DBGetEntryString_send( int fd,char* table,char* key,int msgid,int msgid2 ) ; /* ../../doc/saacproto.html line 394 */ +void saacproto_DBGetEntryString_recv( int fd,char* result,char* value,char* table,char* key,int msgid,int msgid2 ) ; /* ../../doc/saacproto.html line 406 */ +void saacproto_DBUpdateEntryInt_send( int fd,char* table,char* key,int value,char* info,int msgid,int msgid2 ) ; /* ../../doc/saacproto.html line 423 */ +void saacproto_DBUpdateEntryInt_recv( int fd,char* result,char* table,char* key,int msgid,int msgid2 ) ; /* ../../doc/saacproto.html line 445 */ +void saacproto_DBGetEntryRank_send( int fd,char* table,char* key,int msgid,int msgid2 ) ; /* ../../doc/saacproto.html line 459 */ +void saacproto_DBGetEntryRank_recv( int fd,char* result,int rank,int count,char* table,char* key,int msgid,int msgid2 ) ; /* ../../doc/saacproto.html line 473 */ +void saacproto_DBDeleteEntryInt_send( int fd,char* table,char* key,int msgid,int msgid2 ) ; /* ../../doc/saacproto.html line 492 */ +void saacproto_DBDeleteEntryInt_recv( int fd,char* result,char* table,char* key,int msgid,int msgid2 ) ; /* ../../doc/saacproto.html line 504 */ +void saacproto_DBGetEntryInt_send( int fd,char* table,char* key,int msgid,int msgid2 ) ; /* ../../doc/saacproto.html line 518 */ +void saacproto_DBGetEntryInt_recv( int fd,char* result,int value,char* table,char* key,int msgid,int msgid2 ) ; /* ../../doc/saacproto.html line 530 */ +void saacproto_DBGetEntryByRank_send( int fd,char* table,int rank_start,int rank_end,int msgid,int msgid2 ) ; /* ../../doc/saacproto.html line 547 */ +void saacproto_DBGetEntryByRank_recv( int fd,char* result,char* list,char* table,int msgid,int msgid2 ) ; /* ../../doc/saacproto.html line 562 */ +void saacproto_DBGetEntryByCount_send( int fd,char* table,int count_start,int num,int msgid,int msgid2 ) ; /* ../../doc/saacproto.html line 581 */ +void saacproto_DBGetEntryByCount_recv( int fd,char* result,char* list,char* table,int count_start,int msgid,int msgid2 ) ; /* ../../doc/saacproto.html line 593 */ +void saacproto_Broadcast_send( int fd,char* id,char* charname,char* message,int flag ) ; /* ../../doc/saacproto.html line 608 */ +void saacproto_Broadcast_recv( int fd,char* id,char* charname,char* message ) ; /* ../../doc/saacproto.html line 621 */ +void saacproto_Message_send( int fd,char* id_from,char* charname_from,char* id_to,char* charname_to,char* message,int option ) ; /* ../../doc/saacproto.html line 634 */ +void saacproto_Message_recv( int fd,char* id_from,char* charname_from,char* id_to,char* charname_to,char* message,int option,int mesgid ) ; /* ../../doc/saacproto.html line 652 */ +void saacproto_MessageAck_send( int fd,char* id,char* charname,char* result,int mesgid ) ; /* ../../doc/saacproto.html line 671 */ +void saacproto_MessageFlush_send( int fd,char* id,char* charname ) ; /* ../../doc/saacproto.html line 690 */ +int saacproto_InitClient( int(*)(int,char*,int) , int bufsiz , int fd); +void saacproto_SetClientLogFiles( char *read , char *write); +void saacproto_CleanupClient(void); +int saacproto_ClientDispatchMessage(int fd ,char*line); + +// 成立家族 +#ifdef _PERSONAL_FAME +void saacproto_ACAddFM_send(int fd, char *fmname, char *fmleadername, + char *fmleaderid, int fmleaderlv, char *petname, char *petarrt, + char *fmrule, int fmsprite, int fmleadergrano, int fame, int charfdid); +#else +void saacproto_ACAddFM_send(int fd, char *fmname, char *fmleadername, + char *fmleaderid, int fmleaderlv, char *petname, char *petarrt, + char *fmrule, int fmsprite, int fmleadergrano, int charfdid); +#endif +void saacproto_ACAddFM_recv(int fd, char *result, int fmindex, int index, + int charfdid); +// 加入家族 +// #ifdef _PERSONAL_FAME // Arminius: 家族个人声望 +void saacproto_ACJoinFM_send(int fd, char *fmname, int fmindex, char *charname, + char *charid, int charlv, int index, int fame, int charfdid); +// #else +// void saacproto_ACJoinFM_send(int fd, char *fmname, int fmindex, char *charname, +// char *charid, int charlv, int index, int charfdid); +// #endif +void saacproto_ACJoinFM_recv(int fd, char *result, int recv, int charfdid); +// 退出家族 +void saacproto_ACLeaveFM_send(int fd, char *fmname, int fmindex, char *charname, + char *charid, int index, int charfdid); +void saacproto_ACLeaveFM_recv(int fd, char *result, int resultflag, int charfdid); +// 解散家族 +void saacproto_ACDelFM_send(int fd, char *fmname, int fmindex, int index, + char *charname, char *charid, int charfdid); + +void saacproto_ACDelFM_recv(int fd, char *result, int charfdid); +// 列出家族列表 +void saacproto_ACShowFMList_send(int fd); +void saacproto_ACShowFMList_recv(int fd, char *result, int num, char *data); +// 列出成员列表 +void saacproto_ACShowMemberList_send(int fd, int index); +void saacproto_ACShowMemberList_recv(int fd, char *result, int index, int num, + int fmacceptflag, int fmjoinnum, char *data); +// 列出家族详细资料 +void saacproto_ACFMDetail_send(int fd, char *fmname, int fmindex, + int index, int charfdid); +void saacproto_ACFMDetail_recv(int fd, char *result, char *data, int charfdid); +//族长审核成员加入家族、修改家族成员职位 +#ifdef _FMVER21 +void saacproto_ACMemberJoinFM_send(int fd, char *fmname, int fmindex, char *charname, + int charindex, int index, int result, int meindex, int charfdid); +#else +void saacproto_ACMemberJoinFM_send(int fd, char *fmname, int fmindex, char *charname, + int charindex, int index, int result, int charfdid); +#endif +void saacproto_ACMemberJoinFM_recv(int fd, char *result, char *data, int charfdid); +//族长审核成员离开家族 +#ifdef _FMVER21 +void saacproto_ACMemberLeaveFM_send(int fd, char *fmname, int fmindex, char *charname, + int charindex, int index, int meindex, int charfdid); +#else +void saacproto_ACMemberLeaveFM_send(int fd, char *fmname, int fmindex, char *charname, + int charindex, int index, int charfdid); +#endif +void saacproto_ACMemberLeaveFM_recv(int fd, char *result, char *data, int charfdid); +//玩家 Login +#ifdef _FM_MODIFY +void saacproto_ACFMCharLogin_send(int fd, char *fmname, int fmindex, char *charname, + char *charid, int charlv, int eventflag, int charfdid,int gsnum); +#else + #ifdef _FMVER21 + void saacproto_ACFMCharLogin_send(int fd, char *fmname, int fmindex, char *charname, + char *charid, int result, int eventflag, int charfdid); + #else + void saacproto_ACFMCharLogin_send(int fd, char *fmname, int fmindex, char *charname, + char *charid, int result, int charfdid); + #endif +#endif +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 +void saacproto_ACFMCharLogin_recv(int fd, char *result, int index, int floor, + int fmdp, int joinflag, int fmsetupflag, int flag, int charindex, + int charfame, int charfdid +#ifdef _NEW_MANOR_LAW + ,int momentum +#endif + ); +#else +void saacproto_ACFMCharLogin_recv(int fd, char *result, int index, int floor, + int fmdp, int joinflag, int fmsetupflag, int flag, int charindex, + int charfdid); +#endif +// 玩家 Logout +void saacproto_ACFMCharLogout_send(int fd, char *fmname, int fmindex, char *charname, + char *charid, int result, int index, int charfdid); +void saacproto_ACFMCharLogout_recv(int fd, char *result, int charfdid); +// 列出家族留言板 +void saacproto_ACFMReadMemo_send(int fd, int index); +void saacproto_ACFMReadMemo_recv(int fd, char *result, int index, int num, + int dataindex, char *data); +// 写入家族留言板 +void saacproto_ACFMWriteMemo_send(int fd, char *fmname, int fmindex, + char *data, int index); +void saacproto_ACFMWriteMemo_recv(int fd, char *result, int index); +// 列出家族据点 +void saacproto_ACFMPointList_send(int fd); +void saacproto_ACFMPointList_recv(int fd, char *result, char *data); + + + +#ifdef _CK_ONLINE_PLAYER_COUNT // WON ADD 计算线上人数 +void saacproto_GS_PLAYER_COUNT_SEND( int acfd, int num ); +#endif + +// 申请家族据点 +void saacproto_ACSetFMPoint_send(int fd, char* fmname, int fmindex, int index, + int fmpointindex, int fl, int x, int y, int charfdid); +void saacproto_ACSetFMPoint_recv(int fd, char *result, int r, int charfdid); +// 设定家族据点 +void saacproto_ACFixFMPoint_send(int fd, char *winfmname, int winfmindex, + int winindex, char *losefmname, int losefmindex, int loseindex, + int village); +void saacproto_ACFixFMPoint_recv(int fd, char *result, int r); +// 族长对星系家族成员广播 +// kindflag 1:族长广播 2:家族被系统删除 3:系统通知讯息 +void saacproto_ACFMAnnounce_send(int fd, char *fmname, int fmindex, int index, + char *data, int color); +void saacproto_ACFMAnnounce_recv(int fd, char *result, char *fmname, + int fmindex, int index, int kindflag, char *data, int color); +// 列出 TOP 50 家族列表 +void saacproto_ACShowTopFMList_send(int fd, int kindflag); +void saacproto_ACShowTopFMList_recv(int fd, char *result, int kindflag, + int num, char *data); +// 修正家族资料(是否招收成员) +// flag 1:acceptjoinflag 2:dpchanged 3:change fmpet 4:change fminfo 5:predel FM Time +void saacproto_ACFixFMData_send(int fd, char *fmname, int fmindex, int index, + int kindflag,char *data1,char *data2,int charindex, int charfdid); + +#ifdef _FAMILYBANKSTONELOG +void saacproto_ACgetFMBankgold_send(int fd, char *fmname, int fmindex, int index, + int charindex, int charfdid); +void saacproto_ACgetFMBankgold_recv(int fd,int charfdid,int r); +#endif + +void saacproto_ACFixFMData_recv(int fd, char *result, int kindflag, char *data1, + char *data2, int charfdid); + +// PK後更新家族声望 +void saacproto_ACFixFMPK_send(int fd, char *winfmname, int winfmindex, + int winindex, char *losefmname, int losefmindex, int loseindex); +void saacproto_ACFixFMPK_recv(int fd, char *result, int data, int winindex, + int loseindex); +// 取得家族资料 +// kindflag 1:家族银行 +void saacproto_ACGetFMData_send(int fd, char *fmname, int fmindex, int index, + int kindflag, int charfdid); +void saacproto_ACGetFMData_recv(int fd, char *result, int kindflag, int data, + int charfdid); +// GM修正家族资料 +void saacproto_ACGMFixFMData_send(int fd, int index, char *charid, char *cmd, + char *data, int charfdid); +void saacproto_ACGMFixFMData_recv(int fd, char *result, char *fmindex, int charfdid); +// 删除家族後清除对战排程 +void saacproto_ACFMClearPK_recv(int fd, char *result, char *fmname, int fmindex, + int index); + +// Arminius 7.26 manor pk acknowledge +void saacproto_ACManorPKAck_send(int fd, char *data); +void saacproto_ACManorPKAck_recv(int fd, char *data); + +void saacproto_ACreLoadFmData_send( int fd, int type, int data); + +#ifdef _ACFMPK_LIST +void saacproto_ACLoadFmPk_recv(int fd, char *data); +void saacproto_ACLoadFmPk_send(int fd, int fmpks_pos); +void saacproto_ACSendFmPk_recv( int fd, int toindex, int flg); +void saacproto_ACSendFmPk_send(int fd, int toindex, int PkFlg, int fmpks_pos, char *msg); +#endif + +#ifdef _RECAL_ASK_PLAYER // WON 要求人物资料 +void saacproto_Recal_Player_send(int acfd, char *uid, int userfdid, int GmCliId, char *id, int char_num, int date, int backup_flag); +void saacproto_ACRecalPlayer_recv(char *uid, int userfdid, int GmCliId, char *id, int char_num, int date, char *char_data); +void saacproto_ACRecalBackupPlayer_recv(char *uid, int userfdid, int GmCliId, char *id, int char_num, int date, char *char_data); +void saacproto_ACRecalAllBackupOK_recv(char *uid, int userfdid, int GmCliId, char *id, int char_num, int date, char *char_data); +void saacproto_ACRecalBackupDate_recv(char *uid, int userfdid, int GmCliId, char *id, int char_num, int date, char *char_data); +void saacproto_Recal_Backup_send(int acfd, char *uid, int userfdid, int GmCliId, char *id, int char_num, int date, char *char_data, int backup_flag); +#endif // end RECAL_ASK_PLAYER + + +void saacproto_ACAuctionSold_send(int fd, char *data); +void saacproto_ACAuctionSold_recv(int fd, char *data); + +#ifdef _WAEI_KICK //跨星球踢人 +void saacproto_ACKick_send( int fd, char* kickid,int kickfd, int flg); +void saacproto_ACKick_recv(int fd , int act, char* data ,int retfd); +#endif + +#ifdef _NEW_PLAYERGOLD +void saacproto_LoadNEWPlayer_recv(int fd , int charaindex, char *data); +void saacproto_LoadNEWPlayer_send( int fd, int charaindex, char *filename); +#endif + +#ifdef _PAUCTION_MAN +void saacproto_ACItemAuction_recv( int fd, char *ITEMNAME, char *data, int itemID, int ret, int flg); +void saacproto_ACItemAuction_send( int fd, char *ITEMNAME, char *data, int itemID, int ret, int flg); +//ACAddItemAuction_send( int fd, int itemID, char *ITEMNAME, char* SECRETNAME, char *EFFECTSTRING); +#endif + +#ifdef _NEW_PLAYERGOLD +enum{ + NEW_ERR=0, + NEW_DELOK, + NEW_DELERR, + NEW_ADDOK=11, + NEW_ADDERR, + NEW_LISTFULL, +}; +void saacproto_ACNEWPlayerList_recv( int fd, char *CdKey, char *UserName, int charaindex, int RunType); +void saacproto_ACNEWPlayerList_send( int fd, char *CdKey, char *UserName, int charaindex, int RunType); +#endif + +#ifdef _DEATH_CONTEND +void saacproto_LoadPkTeamListData_recv(int fd , char* result, char* data, int ti ); +void saacproto_LoadPkTeamListData_send(int fd , int start, int count ); + +void saacproto_PkListUpDate_send( int fd , char *mycdkey, char *tocdkey, + int mynum, int tonum, int winer, int flg ); + +void saacproto_PKLISTCHARTS_recv( int fd, char *data, int type, int flg); +void saacproto_PKLISTCHARTS_send( int fd, int type, int flg ); +#endif + + + +#ifdef _CHAR_POOLITEM +void saacproto_ACCharInsertPoolItem_send( int acfd, int charaindex, int clifdid, char *CdKey, char *Pooldataarg, int TYPE); + +void saacproto_ACCharSavePoolItem_recv(int fd ,char* result, char* data,int retfd); +void saacproto_ACCharSavePoolItem_send( int acfd, int charaindex, int clifdid, char *CdKey, char *Pooldataarg); + +void saacproto_ACCharGetPoolItem_recv(int fd ,char* result, char* data,int retfd, int meindex); +void saacproto_ACCharGetPoolItem_send( int acfd, int meindex, int charaindex, int clifdid, char * CdKey); +#endif + +#ifdef _CHAR_POOLPET +void saacproto_ACCharInsertPoolPet_send( int acfd, int charaindex, int clifdid, char *CdKey, char *Pooldataarg, int TYPE); + +void saacproto_ACCharSavePoolPet_recv(int fd ,char* result, char* data,int retfd); +void saacproto_ACCharSavePoolPet_send( int acfd, int charaindex, int clifdid, char *CdKey, char *Pooldataarg); + +void saacproto_ACCharGetPoolPet_recv(int fd ,char* result, char* data,int retfd, int meindex); +void saacproto_ACCharGetPoolPet_send( int acfd, int meindex, int charaindex, int clifdid, char * CdKey); +#endif + + + +#ifdef _DEATH_FAMILY_LOGIN_CHECK // WON ADD 家族战登入检查 +void saacproto_new_ACFM_Login_send( int acfd, int charaindex, char *char_id, char *char_name ); +void saacproto_ACSendMember_recv(int fd, char *result, char *data, int charindex ); +#endif + +#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令 +void saacproto_ReloadFamily_send( int acfd, int charaindex ); +void saacproto_ACRELOADFMOK_recv( int fd, int charindex ); +void saacproto_ACShowMemberList_2_send( int fd, int charaindex, int fm1, int fm2, int time, int id ); +void saacproto_ACSHOWMEMBERLIST2_recv( int fd, int charaindex, int fm1, char *fm1_id, int fm2, char *fm2_id, int time, int id ); +#endif + +#ifdef _DEATH_FAMILY_STRUCT // WON ADD 家族战存放胜负资料 +void saacproto_Init_FM_PK_STRUC_send( int fd ); +void saacproto_FM_PK_STRUCT_send( int fd, char *msg ); +void saacproto_ACSendFmPkStruct_recv( int fd, char *data ); +#endif + +#ifdef _UNIVERSE_CHATROOM +void saacproto_ACUniChatroom_recv( int acfd, int charaindex, int clifdid, char *result, + char *CdKey, char *data); +void saacproto_ACUniChatroom_send( int acfd, int charaindex, int clifdid, char *CdKey, char *data); +#endif + + +#ifdef _ANGEL_SUMMON +void saacproto_ACMissionTable_recv( int fd, int num, int type, char *data, char* angelinfo); +void saacproto_ACMissionTable_send( int fd, int num, int type, char *data, char* angelinfo); +#endif + +#ifdef _TEACHER_SYSTEM +// RETURN_FUNCTION -> R_F_XXXXXXX +enum{ + R_F_TEACHER_SYSTEM, + R_F_END +}; +void saacproto_ACCheckCharacterOnLine_recv( int acfd, int charaindex, int iOnline,char *data,int flag); +void saacproto_ACCheckCharacterOnLine_send( int acfd, int charaindex, char *id, char *name, int flag); +#endif + +#ifdef _RACEMAN +void saacproto_ACRaceRecordandSort_recv(int fd,int charaindex,int racetype,char *data); +void saacproto_ACRaceRecordandSort_send(int fd,int charaindex,char *code ,char *id,char *name,int racetype,int catchcnt,int ranknum ); +void saacproto_ACRaceRecordfmdo_send(int fd,int charaindex, int fmid , int bbi , char *unicode, char *petname ); +#endif + +#endif +/* end of the generated client header code */ + + diff --git a/gmsv/include/saacproto_util.h b/gmsv/include/saacproto_util.h new file mode 100644 index 0000000..e65a2e2 --- /dev/null +++ b/gmsv/include/saacproto_util.h @@ -0,0 +1,114 @@ +#ifndef _SAACPROTOUTIL_H_ +#define _SAACPROTOUTIL_H_ +#include +#include +#ifndef WIN32 +#include +#include +#endif +#define saacproto__NOENCRYPT +#define saacproto__NODEBUG +struct saacproto_ { + int (*write_func)(int,char*,int) ; /* write function */ + size_t workbufsize; /* size of work area */ + char *work,*arraywork,*escapework,*val_str,*ret_work; /* work areas which have same size */ + char *cryptwork,*jencodecopy,*jencodeout,*compresswork; /* these work has bigger size (3times)*/ + char** token_list; /* token list */ + unsigned long message_id; /*= 1, */ /* for generating message IDs */ + +}; +#ifdef _SAACPROTOUTIL_C_ +struct saacproto_ saacproto = { + NULL, + 0, + NULL,NULL,NULL,NULL,NULL, + NULL,NULL,NULL,NULL, + NULL, + 1, +}; +char **saacproto_stringwrapper; +char saacproto_readlogfilename[1024]; +char saacproto_writelogfilename[1024]; +#else +extern char **saacproto_stringwrapper; +extern struct saacproto_ saacproto; +extern char saacproto_readlogfilename[1024]; +extern char saacproto_writelogfilename[1024]; +#endif +char* saacproto_escapeString( char*a ); +char* saacproto_descapeString( char*a ); +void saacproto_splitString( char *src ); +void saacproto_strcpysafe( char *dest, char *src, int len ); +void saacproto_strcatsafe( char *dest , char *src , int maxlen ); +char*saacproto_mkstr_int( int i ); +char*saacproto_mkstr_u_int( unsigned int i ); +char*saacproto_mkstr_long( long l ); +char*saacproto_mkstr_u_long( unsigned long l ); +char*saacproto_mkstr_short( short s ); +char*saacproto_mkstr_u_short( short s ); +char*saacproto_mkstr_char( char c ); +char*saacproto_mkstr_u_char( char c); +char*saacproto_mkstr_string( char*a ); +char*saacproto_mkstr_float( float f ); +char*saacproto_mkstr_double( double d ); +char*saacproto_mkstr_int_array( int size , int *array ); +char*saacproto_mkstr_u_int_array( int size , int *array ); +char*saacproto_mkstr_short_array( int size , short *array ); +char*saacproto_mkstr_u_short_array(int size , short *array ); +char *saacproto_mkstr_char_array( int size , char *array ); +char *saacproto_mkstr_u_char_array( int size , unsigned char *array ); +char *saacproto_mkstr_float_array( int size , float *array ); +char *saacproto_mkstr_double_array( int size , double *array ); +int saacproto_demkstr_int( char*a ); +unsigned int saacproto_demkstr_u_int( char*a ); +long saacproto_demkstr_long( char*a ); +unsigned long saacproto_demkstr_u_long(char*a ); +short saacproto_demkstr_short( char*a ); +unsigned short saacproto_demkstr_u_short( char*a ); +char saacproto_demkstr_char( char*a ); +unsigned char saacproto_demkstr_u_char( char*a ); +float saacproto_demkstr_float( char*a ); +double saacproto_demkstr_double(char*a ); +char* saacproto_demkstr_string( char*a); +int *saacproto_demkstr_int_array( char**tk ,int *buf ,int start , int size ); +int *saacproto_demkstr_u_int_array( char **tk , int *buf , int start , int size ); +unsigned int *saacproto_demkstr_long_array( + char **tk , unsigned int *buf , int start , int size ); +unsigned long *saacproto_demkstr_u_long_array( + char **tk , unsigned long *buf , int start , int size ); +short *saacproto_demkstr_short_array( char **tk , short *buf , int start , int size ); +unsigned short*saacproto_demkstr_u_short_array( + char **tk , unsigned short *buf , int start , int size ); +char *saacproto_demkstr_char_array( char **tk , char *buf , int start , int size ); +unsigned char *saacproto_demkstr_u_char_array( + char **tk , unsigned char*buf , int start , int size ); +float *saacproto_demkstr_float_array( char **tk , float *buf , int start , int size ); +double *saacproto_demkstr_u_double_array( char **tk , double *buf , int start , int size ); +char *saacproto_wrapStringAddr( char *copy , int maxcopylen , char*src ); + +void saacproto_GetMessageInfo( int *id , char *funcname , int len,char **tk ); +int saacproto_ClientRead(void); +void saacproto_consumeLine(char *buf , int ofs ); +void saacproto_copyLine( char*src , char *out , int maxoutlen ); +void saacproto_Send( int fd , char *msg ); +int saacproto_AllocateCommonWork(int bufsiz); +int saacproto_StringRest(); + +// WON ADD +unsigned long saacproto_GetNewMessageID(void); + + +void saacproto_CreateHeader(char*out, char *fname ); +void saacproto_CreateHeaderID( char *out,unsigned long msgid , char *fname ); +int saacproto_default_write_wrap( int fd , char *buf , int size ); +void saacproto_bzero( char *b , int siz ); +void saacproto_bcopy(char*s , char *d , int siz ); +char *saacproto_Ltoa( long v ); +char *saacproto_Ultoa( unsigned long v ); +void saacproto_DebugSend( int fd , char *msg ); +/* Modified by ringo to fasten int type transfer */ +char *saacproto_cnv10to62( int a, char *out, int outlen ); +int saacproto_a62toi( char *a ); +extern int JENCODE_KEY; +#endif + diff --git a/gmsv/include/skill.h b/gmsv/include/skill.h new file mode 100644 index 0000000..9d41159 --- /dev/null +++ b/gmsv/include/skill.h @@ -0,0 +1,121 @@ +#ifndef __SKILL_H__ +#define __SKILL_H__ + +#include "common.h" +#include "util.h" + +typedef struct tagSKILL_intDataSetting +{ + char *dumpskill; +}SKILL_intDataSetting; + +typedef struct tagSKILL_charDataSetting +{ + char *dumpskill; +}SKILL_charDataSetting; + + +typedef enum +{ +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + SKILL_1, + SKILL_2, + SKILL_3, + SKILL_4, + SKILL_5, + SKILL_6, + SKILL_7, + SKILL_8, + SKILL_9, + SKILL_10, + SKILL_11, + SKILL_12, + SKILL_13, + SKILL_14, + SKILL_15, + SKILL_16, + SKILL_NUM +#else + SKILL_FIRE, + SKILL_MAGICIAN, + SKILL_PRIEST, + SKILL_ALOTOFTHINGS, + SKILL_AVOIDRATEUP, + SKILL_DETERMINEITEM, + SKILL_DETERMINEOTHERS, + SKILL_FIRECUT, + SKILL_THUNDERCUT, + SKILL_ICECUT, + SKILL_MERCHANT, + SKILL_HEALER, + SKILL_FIST, + SKILL_SWORD, + SKILL_AXE, + SKILL_SPEAR, + SKILL_BOW, + SKILL_CANE, + SKILL_LARGEVOICE, + SKILL_NUM +#endif +}SKILL_ID; + + +typedef struct tagSkillTable +{ + const int maxlevel; + void* effectfunc; +}SKILL_table; + + +typedef enum +{ + SKILL_LEVEL, // 技能等级 + SKILL_IDENTITY, // 技能编号 + SKILL_DATAINTNUM, +}SKILL_DATAINT; + +typedef enum +{ + SKILL_DATACHARNUM, +}SKILL_DATACHAR; + + +typedef struct tagSkill +{ + int data[SKILL_DATAINTNUM]; + STRING32 string[SKILL_DATACHARNUM]; +}Skill; + +char* SKILL_makeStringFromSkillData( Skill* sk ); +BOOL SKILL_makeSkillFromStringToArg( char* src, Skill* sk ); + +int SKILL_getInt( Skill* skill, int element); +int SKILL_setInt( Skill* skill, int element, int new); + +#ifdef _CHAR_PROFESSION // WON ADD 人物职业 +char* SKILL_makeSkillStatusString( Skill* skill, int charaindex, int skill_num ); +#else +char* SKILL_makeSkillStatusString( Skill* skill ); +#endif + +char* SKILL_makeSkillFalseString( void ); + +BOOL SKILL_makeSkillData( Skill* sk ,int skid, int lev ); + +int SKILL_levelup( Skill* sk ); +int SKILL_getLevelFromSkillID( int charaindex, SKILL_ID id ); +BOOL SKILL_getUpableSkillID( int charaindex,char* buf, int buflen ); +void SKILL_skillEffect( int charaindex ); + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 +int PROFESSION_MAGIC_COST_MP( int charaindex, int skill_num ); +INLINE int PROFESSION_CHANGE_SKILL_LEVEL_M( int skill_level ); +INLINE int PROFESSION_CHANGE_SKILL_LEVEL_A( int skill_level ); +INLINE int SKILL_getRealInt( Skill* skill, int element); +#endif + + +#endif +/*__SKILL_H__*/ + + diff --git a/gmsv/include/sndcnf.h b/gmsv/include/sndcnf.h new file mode 100644 index 0000000..c9d462d --- /dev/null +++ b/gmsv/include/sndcnf.h @@ -0,0 +1,147 @@ +// 寞}白央奶伙 }示伉亘□丞}疋永民 祥签匏 }伙□皿白仿弘 棕雁祥 }穴永皿巨犯奴正羁匹苇月戊丢件玄 +// SA Server匹反银迕仄化中引六氏[ +// SE 寞及辅寰迕卞升丹冗[ + +SNDCONFIG sndconfig[] = +{ + // 皿伊奶乩□ + { 1, "data\\se\\sap_01.wav", 85, 0, 0 /*, "a攻击音(赤手空拳)"*/ }, + { 2, "data\\se\\sap_02.wav", 85, 0, 0 /*, "a攻击音(棍棒)"*/ }, + { 3, "data\\se\\sap_03.wav", 85, 0, 0 /*, "a攻击音(斧)"*/ }, + { 4, "data\\se\\sap_04.wav", 100, 0, 0 /*, "a丢东西"*/ }, + { 5, "data\\se\\sap_05.wav", 85, 0, 0 /*, "a防御声"*/ }, + { 6, "data\\se\\sap_06.wav", 60, 0, 0 /*, "a死亡"*/ }, + { 7, "data\\se\\sap_07.wav", 123, 0, 0 /*, "a传送空间"*/ }, + { 8, "data\\se\\sap_08.wav", 80, 0, 0 /*, "回旋标"*/ }, + { 9, "data\\se\\sap_09.wav", 80, 0, 0 /*, "a攻击声(枪)"*/ }, + { 10, "data\\se\\sap_10.wav", 80, 0, 0 /*, "a攻击声(弓矢)"*/ }, +//x { 11, "data\\se\\sap_11.wav", 105, 7, 0 /*, "飞行声"*/ }, + { 11, "data\\se\\sap_11.wav", 105, 0, 0 /*, "飞行声"*/ }, + { 12, "data\\se\\sap_14.wav", 100, 0, 0 /*, "刺音"*/ }, + { 13, "data\\se\\sap_12.wav", 90, 0, 0 /*, "捕获的声音"*/ }, + { 14, "data\\se\\sap_13.wav", 105, 0, 0 /*, "捕获的声音2"*/ }, + + // 乒件旦正□ + { 51, "data\\se\\sae_01.wav", 123, 0, 0 /*, ""*/ }, + { 52, "data\\se\\sae_02.wav", 123, 0, 0 /*, ""*/ }, + { 53, "data\\se\\sae_03.wav", 123, 0, 0 /*, ""*/ }, + { 54, "data\\se\\sae_04.wav", 123, 0, 0 /*, ""*/ }, + { 55, "data\\se\\sae_05.wav", 123, 0, 0 /*, ""*/ }, + { 56, "data\\se\\sae_06.wav", 105, 0, 0 /*, "邦洛洛克斯"*/ }, + { 57, "data\\se\\sae_07.wav", 80, 0, 0 /*, "邦洛洛克斯(红色)"*/ }, + { 58, "data\\se\\sae_08.wav", 123, 0, 0 /*, ""*/ }, + { 59, "data\\se\\sae_09.wav", 123, 0, 0 /*, ""*/ }, + { 60, "data\\se\\sae_10.wav", 80, 0, 0 /*, "玛摩那斯"*/ }, + { 61, "data\\se\\sae_11.wav", 123, 0, 0 /*, ""*/ }, + { 62, "data\\se\\sae_12.wav", 95, 0, 0 /*, "奇卡洛斯"*/ }, + { 63, "data\\se\\sae_13.wav", 80, 0, 0 /*, "斯坦多斯"*/ }, + { 64, "data\\se\\sae_14.wav", 90, 0, 0 /*, "西朵拉"*/ }, + { 65, "data\\se\\sae_15.wav", 95, 0, 0 /*, "乌力美达鲁"*/ }, + { 66, "data\\se\\sae_16.wav", 95, 0, 0 /*, "弹回的声音"*/ }, + { 67, "data\\se\\sae_17.wav", 123, 0, 0 /*, ""*/ }, + { 68, "data\\se\\sae_18.wav", 123, 0, 0 /*, ""*/ }, + { 69, "data\\se\\sae_19.wav", 123, 0, 0 /*, ""*/ }, + { 70, "data\\se\\sae_20.wav", 123, 0, 0 /*, ""*/ }, + { 71, "data\\se\\sae_21.wav", 123, 0, 0 /*, ""*/ }, + { 72, "data\\se\\sae_22.wav", 123, 0, 0 /*, ""*/ }, + { 73, "data\\se\\sae_23.wav", 90, 0, 0 /*, "卖东西者"*/ }, + { 74, "data\\se\\sae_24.wav", 90, 0, 0 /*, "野猪"*/ }, + { 75, "data\\se\\sae_25.wav", 100, 0, 0 /*, "愿藏"*/ }, + { 76, "data\\se\\sae_26.wav", 123, 0, 0 /*, ""*/ }, + { 77, "data\\se\\sae_27.wav", 123, 0, 0 /*, ""*/ }, + { 78, "data\\se\\sae_28.wav", 90, 0, 0 /*, "卡比特"*/ }, + { 79, "data\\se\\sae_29.wav", 123, 0, 0 /*, ""*/ }, + { 80, "data\\se\\sae_30.wav", 100, 0, 0 /*, "龟之盾"*/ }, + { 81, "data\\se\\sae_31.wav", 123, 0, 0 /*, ""*/ }, + { 82, "data\\se\\sae_32.wav", 123, 0, 0 /*, ""*/ }, + + // 芊 + { 100, "data\\se\\sam_01.wav", 75, 0, 0 /*, "领域上使用咒术"*/ }, + { 101, "data\\se\\sam_02.wav", 75, 0, 0 /*, "传送信件"*/ }, + { 102, "data\\se\\sam_03.wav", 75, 0, 0 /*, "恢复"*/ }, + { 103, "data\\se\\sam_04.wav", 123, 0, 0 /*, "火 (小)"*/ }, + { 104, "data\\se\\sam_05.wav", 123, 0, 0 /*, "火 (中)"*/ }, + { 105, "data\\se\\sam_06.wav", 123, 0, 0 /*, "火 (大)"*/ }, + { 106, "data\\se\\sam_07.wav", 123, 0, 0 /*, "火柱(小)"*/ }, + { 107, "data\\se\\sam_08.wav", 123, 0, 0 /*, "火柱(中)"*/ }, + { 108, "data\\se\\sam_09.wav", 123, 0, 0 /*, "火柱(大)"*/ }, + { 109, "data\\se\\sam_10.wav", 123, 0, 0 /*, "冻气(小)"*/ }, + { 110, "data\\se\\sam_11.wav", 123, 0, 0 /*, "冻气(中)"*/ }, + { 111, "data\\se\\sam_12.wav", 123, 0, 0 /*, "冻气(大)"*/ }, + { 112, "data\\se\\sam_13.wav", 123, 0, 0 /*, "雷击(小)"*/ }, + { 113, "data\\se\\sam_14.wav", 123, 0, 0 /*, "雷击(中)"*/ }, + { 114, "data\\se\\sam_15.wav", 85, 0, 0 /*, "雷击(必杀绝技)"*/ }, + { 115, "data\\se\\sam_16.wav", 123, 0, 0 /*, "光柱"*/ }, + { 116, "data\\se\\sam_17.wav", 123, 0, 0 /*, "光线"*/ }, + { 117, "data\\se\\sam_18.wav", 123, 0, 0 /*, "镭射"*/ }, + { 118, "data\\se\\sam_19.wav", 123, 0, 0 /*, "吸血"*/ }, + { 119, "data\\se\\sam_20.wav", 123, 0, 0 /*, "诅咒"*/ }, + { 120, "data\\se\\sam_21.wav", 123, 0, 0 /*, "石化"*/ }, + { 121, "data\\se\\sam_22.wav", 123, 0, 0 /*, "苏醒"*/ }, + { 122, "data\\se\\sam_23.wav", 123, 0, 0 /*, "魔法弹"*/ }, + { 123, "data\\se\\sam_24.wav", 123, 0, 0 /*, "净化"*/ }, + + // 棕雁 +// { 151, "data\\se\\sak_01.wav", 121, 0, 1 /*, "鸡"*/ }, +// { 152, "data\\se\\sak_02.wav", 121, 0, 1 /*, "狼号声"*/ }, + { 151, "data\\se\\sak_01.wav", 127, 0, 1 /*, "丛林"*/ }, +//x { 152, "data\\se\\sak_02.wav", 127, 4, 1 /*, "人声吵杂"*/ }, + { 152, "data\\se\\sak_02.wav", 127, 0, 1 /*, "人声吵杂"*/ }, + { 153, "data\\se\\sak_03.wav", 121, 0, 1 /*, "雨"*/ }, + { 154, "data\\se\\sak_04.wav", 90, 0, 1 /*, "风"*/ }, + { 155, "data\\se\\sak_05.wav", 95, 0, 1 /*, "飘雪"*/ }, + { 156, "data\\se\\sak_06.wav", 127, 0, 1 /*, "雷鸣"*/ }, + { 157, "data\\se\\sak_07.wav", 125, 0, 1 /*, "潺潺水声"*/ }, + { 158, "data\\se\\sak_08.wav", 125, 0, 1 /*, "海浪声"*/ }, + { 159, "data\\se\\sak_09a.wav", 120, 0, 1 /*, "鸟鸣声"*/ }, + { 160, "data\\se\\sak_10.wav", 115, 0, 1 /*, " 鸣,振翅声"*/ }, + { 161, "data\\se\\sak_11.wav", 85, 0, 1 /*, "喷水场"*/ }, + { 162, "data\\se\\sak_12.wav", 120, 0, 1 /*, "风车"*/ }, + { 163, "data\\se\\sak_13.wav", 100, 0, 1 /*, "水滴"*/ }, + { 164, "data\\se\\sak_14.wav", 127, 0, 1 /*, "草原"*/ }, + { 165, "data\\se\\sak_15.wav", 120, 0, 1 /*, "地面震动"*/ }, + { 166, "data\\se\\sak_16.wav", 120, 0, 1 /*, "丢石子到水中"*/ }, + { 167, "data\\se\\sak_17.wav", 110, 0, 1 /*, "烧落叶取暖"*/ }, + { 168, "data\\se\\sak_09b.wav", 120, 0, 1 /*, "鸟鸣(森林)"*/ }, + + // 扑旦 丞 + { 201, "data\\se\\sas_01.wav", 90, 0, 0 /*, "照像的声音"*/ }, + { 202, "data\\se\\sas_02.wav", 80, 0, 0 /*, "打开视窗"*/ }, + { 203, "data\\se\\sas_03.wav", 75, 0, 0 /*, "关闭视窗"*/ }, + { 204, "data\\se\\sas_04.wav", 80, 0, 0 /*, "打开视窗2"*/ }, + { 205, "data\\se\\sas_05.wav", 80, 0, 0 /*, "关闭视窗2"*/ }, + { 206, "data\\se\\sas_06.wav", 80, 0, 0 /*, "结束的音乐"*/ }, + { 207, "data\\se\\sas_07.wav", 123, 0, 0 /*, ""*/ }, + { 208, "data\\se\\sas_08.wav", 123, 0, 0 /*, ""*/ }, + { 209, "data\\se\\sas_09.wav", 123, 0, 0 /*, ""*/ }, + { 210, "data\\se\\sas_10.wav", 123, 0, 0 /*, ""*/ }, + { 211, "data\\se\\sas_11.wav", 65, 0, 0 /*, 伊矛伙失永皿""*/ }, + { 212, "data\\se\\sas_12.wav", 80, 0, 0 /*, "使用项目"*/ }, + { 213, "data\\se\\sas_13.wav", 123, 0, 0 /*, "NG长音"*/ }, +// { 214, "data\\se\\sas_14.wav", 127, 0, 0 /*, "胜利"*/ }, + { 215, "data\\se\\sas_15.wav", 82, 0, 0 /*, "相遇"*/ }, + { 216, "data\\se\\sas_16.wav", 110, 0, 0 /*, "交换宠物"*/ }, + { 217, "data\\se\\sas_17.wav", 85, 0, 0 /*, "点滑鼠2"*/ }, + { 218, "data\\se\\sas_18.wav", 123, 0, 0 /*, ""*/ }, + { 219, "data\\se\\sas_19.wav", 82, 0, 0 /*, "照像"*/ }, + { 220, "data\\se\\sas_20.wav", 60, 0, 0 /*, "NG短音"*/ }, + { 221, "data\\se\\sas_21.wav", 123, 0, 0 /*, ""*/ }, + + // 母丢□斥 + { 250, "data\\se\\sad_01.wav", 85, 0, 0 /*, "损害1(赤手空拳)"*/ }, + { 251, "data\\se\\sad_02.wav", 80, 0, 0 /*, "损害2(斧,棍棒)"*/ }, +//x { 252, "data\\se\\sad_03.wav", 95, -3, 0 /*, "损害3(枪)"*/ }, + { 252, "data\\se\\sad_03.wav", 95, 0, 0 /*, "损害3(枪)"*/ }, + { 253, "data\\se\\sad_04.wav", 85, 0, 0 /*, "损害4(弓)"*/ }, + { 254, "data\\se\\sad_05.wav", 90, 0, 0 /*, "损害5(爪)"*/ }, + + // BGM +// { 401, "data\\bgm\\ls2b_01.wav", 5 /*, "自由模式之曲"*/ }, +// { 402, "data\\bgm\\ls2b_02.wav", 5 /*, "游戏中的曲"*/ }, +// { 403, "data\\bgm\\ls2b_03.wav", 5 /*, "地下之曲"*/ }, +// { 404, "data\\bgm\\ls2b_04.wav", 5 /*, "头目之曲"*/ }, + + { -1 } // 蔽羹筏寞 壅今卅中方丹卞 +}; + + diff --git a/gmsv/include/title.h b/gmsv/include/title.h new file mode 100644 index 0000000..2f2248f --- /dev/null +++ b/gmsv/include/title.h @@ -0,0 +1,21 @@ +#ifndef __TITLE_H__ +#define __TITLE_H__ + +#include "common.h" +#include "util.h" + +INLINE BOOL TITLE_CHECKTABLEINDEX( int index ); +int TITLE_getTitleIndex( int index); + +char* TITLE_makeTitleStatusString( int charaindex, int havetitleindex ); +char* TITLE_makeSkillFalseString( void ); + +BOOL TITLE_addtitle( int charaindex, int titleindex ); +BOOL TITLE_deltitle( int charaindex, int titleindex ); +BOOL TITLE_initTitleName( char* filename ); +BOOL TITLE_reinitTitleName( void); +BOOL TITLE_initTitleConfig( char* filename ); +BOOL TITLE_TitleCheck( int charaindex, BOOL mode); +BOOL TITLE_TitleCheck_Nomsg( int charaindex, BOOL mode, int *addcnt, int *delcnt); +#endif + /*__TITLE_H__*/ diff --git a/gmsv/include/trade.h b/gmsv/include/trade.h new file mode 100644 index 0000000..3a0cc4c --- /dev/null +++ b/gmsv/include/trade.h @@ -0,0 +1,18 @@ +#ifndef __TRADE_H__ +#define __TRADE_H__ +#include "version.h" +#include "common.h" +#include "util.h" +#include "net.h" + +BOOL TRADE_Search(int fd, int meindex, char* message); + +void CHAR_Trade(int fd, int index, char* message); + +#ifdef _ITEM_PILEFORTRADE +void TRADE_InitTradeList( void); +#endif + +void TRADE_CheckTradeListUser( void); + +#endif diff --git a/gmsv/include/util.h b/gmsv/include/util.h new file mode 100644 index 0000000..0d06f6d --- /dev/null +++ b/gmsv/include/util.h @@ -0,0 +1,136 @@ +#ifndef __UTIL_H__ +#define __UTIL_H__ + +#include +#include +#include + +#include "common.h" + +typedef struct tagSTRING32 +{ + char string[32]; +}STRING32; +typedef struct tagSTRING64 +{ + char string[64]; +}STRING64; +typedef struct tagSTRING128 +{ + char string[128]; +}STRING128; + +typedef struct tagRECT +{ + int x; + int y; + int width; + int height; +}RECT; +typedef struct tagPOINT +{ + int x; + int y; +}POINT; +/* strtol 及仿永由□迕卞银丹 */ +typedef enum +{ + CHAR,SHORT,INT,DOUBLE +}CTYPE; + +void chop( char* src ); +void dchop( char* src , char* del); +#define chomp(src) dchop(src,"\n"); +void chompex( char *buf ); +void pohcd( char* src , char* del); +void strcpysafe( char* dest ,size_t n,const char* src ); +void strncpysafe( char* dest ,const size_t n , + const char* src ,const int length ); +char* strcatsafe( char* src, int size, char* ap ); +BOOL strtolchecknum( char* arg , void* number,int base ,CTYPE type); +int strcmptail( char *s1 , char *s2 ); +int texttoiTail( char *hoge); +int textToInt( char *str ); +void deleteCharFromString( char* src , char* dels ); +void deleteCharFromStringNoEscape( char* src , char* dels ); +#define deleteWhiteSpace( src ) deleteCharFromStringNoEscape( src," \t" ) +char* replaceString( char* src, char oldc ,char newc ); + +char* escapeStrStr( char* src, char* needle ); +BOOL getStringFromIndexWithDelim_body( char* src ,char* delim ,int index, char* buf , int buflen, char *file, int line ); +#define getStringFromIndexWithDelim( src, delim, index, buf, buflen ) getStringFromIndexWithDelim_body( src, delim, index, buf, buflen, __FILE__, __LINE__ ) + +void getFourIntsFromString(char* src,int* int1,int* int2,int* int3, + int* int4); +void deleteSequentChar( char* src , char* dels ); +int hashpjw ( char* s ); +double gettimemillis( void ); +double gettimemicros( void ); + +int bindlocalhost( int port ); +int connectHost( char* hostname , unsigned short port ); +int existsNewLineCharacter( char* line ); +int hashpjw ( char* s ); +int charInclude( char* src, char* include ); +char* nindex( char* string, int c , int number ); +int rgetFileName( char* dirname , STRING64* string, int size); +#define RAND(x,y) ((x-1)+1+ \ + (int)( (double)(y-(x-1))*rand()/(RAND_MAX+1.0)) ) +/*#define RAND(x,y) (x+(int)( (double)(y)*rand() / (RAND_MAX+1.0)) )*/ +void makeRandomString( char *cand , char *out , int len ); +BOOL checkStringsUnique( char** strings, int num ,int verbose); + +char* makeEscapeString( char* src , char* dest, int sizeofdest); +char* makeStringFromEscaped( char* src ); +INLINE double time_diff(struct timeval subtrahend,struct timeval subtractor); +BOOL PointInRect( RECT* rect, POINT* p ); +BOOL CoordinateInRect( RECT* rect, int x, int y); +int clipRect( RECT *rect1, RECT *rect2, RECT *ret ); +BOOL isstring1or0( char* string ); +void easyGetTokenFromString( char *src , int count , char*output , int len ); + +float linearDiv( float val1 , float val2 , float d ); +BOOL isExistFile( char* filename ); +char *cnv10to62( int a, char *out, int outlen ); +BOOL checkRedundancy( int *src, int srclen); +void shuffle_ints( int num, int *a, int t ); +unsigned short CheckCRC( unsigned char *p , int size ); +// Shan Add +INLINE double time_diff(struct timeval subtrahend,struct timeval subtractor); + + +/* 穴弁夫卅曰 */ +#define ABS(x) ((x)>=0 ? (x) : -(x)) + +/* 轾毛 0 - 7 卞濮覆卞允月 */ +#define VALIDATEDIR(x) ({(x)%=8;(x)=((x)+8)%8;}) + +/* 4田奶玄犯□正毛2田奶玄犯□正午仄化银丹 */ +#define GETLOWVALUE(x) ( (x)&0x0000ffff) +#define GETHIGHVALUE(x) ((((x)&0xffff0000)>>16)&0x0000ffff) +#define SETLOWVALUE(x,y) ((x)=((x)&0xffff0000)|( (y) &0x0000ffff)) +#define SETHIGHVALUE(x,y) ((x)=((x)&0x0000ffff)|(((y)<<16)&0xffff0000)) +#define MAKE2VALUE(x,y) ((((x)<<16)&0xffff0000)|((y)&0x0000ffff)) + +/* 4田奶玄犯□正毛1田奶玄*4午仄化丐勾井丹穴弁夫 */ +#define GETFIRSTVALUE(x) ( (x)&0x000000ff ) +#define GETSECONDVALUE(x) ((((x)&0x0000ff00)>>8 )&0x000000ff) +#define GETTHIRDVALUE(x) ((((x)&0x00ff0000)>>16)&0x000000ff) +#define GETFOURTHVALUE(x) ((((x)&0xff000000)>>24)&0x000000ff) + +#define SETFIRSTVALUE(x,y) ((x)=(((x)&0xffffff00)\ + |( y &0x000000ff))) +#define SETSECONDVALUE(x,y) ((x)=(((x)&0xffff00ff)\ + |(((y)<<8 )&0x0000ff00))) +#define SETTHIRDVALUE(x,y) ((x)=(((x)&0xff00ffff)\ + |(((y)<<16)&0x00ff0000))) +#define SETFOURTHVALUE(x,y) ((x)=(((x)&0x00ffffff)\ + |(((y)<<24)&0xff000000))) + +#define MAKE4VALUE(a,b,c,d) ( (((a)<<24)&0xff000000)\ + |(((b)<<16)&0x00ff0000)\ + |(((c)<< 8)&0x0000ff00)\ + |( (d) &0x000000ff)) + +#endif + /* __UTIL_H__ */ diff --git a/gmsv/include/version.h b/gmsv/include/version.h new file mode 100644 index 0000000..354e943 --- /dev/null +++ b/gmsv/include/version.h @@ -0,0 +1,574 @@ +#ifndef __VERSION_H__ +#define __VERSION_H__ +#include "correct_bug.h" //BUG FIX +#include "version_pk.h" //PK SERVER + +/*Server 版本控制*/ +#define _NEW_SERVER_ +#define _SERVER_NUMS +#define SERVER_VERSION "龙zoro版GMSV服务端v2.2.2.28" + +#define UNIQUE_KEYCODEITEM 100 +#define UNIQUE_KEYCODEPET "i" + +#define _SA_VERSION_70 // (可开放) WON ADD 石器时代7.0 的版本控制 +//#define _DEFAULT_PKEY "Wonwonwon" // (可开放)( 石器 6.0 ) +//#define _RUNNING_KEY "11111111" // (可开放)( 石器 6.0 ) +#define _DEFAULT_PKEY "ttttttttt" // (可开放)( 石器 6.0 ) +#define _RUNNING_KEY "20041215" // (可开放)( 石器 6.0 ) + +#define _VERSION_20010911 // (可开放) 9.11 编码修改 + +// ------------------------------------------------------------------- +//新功能:测试伺服器专用 人员:彦豪 +#define _TEST_PETCREATE // (不可开) ANDY 测宠的GM指令 +//#define _LOGIN_ADDITEM // (不可开) ANDY 登入加满物品 +//#define _NEW_TESTSERVER // (不可开) ANDY 玩家创新人物时,给予五转125等级及叁只宠物 +//#define _TEST_PETFUSIONTIME // (不可开) ANDY 测试宠物融合 食时间加快 +/* ------------------------------------------------------------------- + * 专案:家族庄园数量修改 人员:小瑜、彦勋、志伟、小民 + */ + +/* +修改装园数量方式: +Account Server 程式: + acfamily.h MAX_FMPOINT要修改 +Account Server 游戏环境: + saac/family/fmpoint/db_fmpoint档案中须新增庄园入口坐标等设定 + 庄园进入图层|庄园进入X座标|庄园进入Y座标|庄园族长图层|庄园邻近之村庄|占领庄园之家族 index|占领庄园之家族 name|占领庄园之家族综合声望值 + 例如: + 100|607|563|1041|1|3|shan|3132238 + 200|73|588|2031|2||| +Game Server 程式: + version.h FAMILY_MAXHOME、MANORNUM要修正 + family.c FM_PKFLOOR 须增设战斗图层 + FAMILY_RidePet() 中须加入族长家图层 + FAMILY_LeaderFunc() 中须加入邀请函id + npcutil.c addNpcFamilyTax function中须加入(庄园图层%100)此为庄园税收部份 +Game Server 游戏环境: + gmsv_v2/data/npc/family/manorsman.arg* id须修正 + gmsv_v2/data/npc/family/scheduleman.arg* id须修正 +*/ + +#define _FAMILY_MANORNUM_CHANGE // CoolFish 用来修改装园数量(4.0) +#ifdef _FAMILY_MANORNUM_CHANGE +#define FAMILY_MAXHOME 10 // (4.0) 家族据点 +#define MANORNUM 10 // (4.0) 庄园数量 +#define FMPOINTNUM 10 // (4.0) 有据点家族的最大数量 +#endif +#define _FMVER21 // (可开放) 家族职掌功能 +#define _PERSONAL_FAME // (可开放) Arminius 8.30 家族个人声望 +// ------------------------------------------------------------------- +//专案:石器活动自动化 人员:晓威、家麟 +#define _SERVICE // (可开放) Terry 2001/10/03 活动功能自动化 + +#define _EVERYONE_RIDE // (可开放) Robin 0924 骑宠平民化 +// ------------------------------------------------------------------- +//专案:攻击性咒术的制作 人员:笃志 +// #define __ATTACK_MAGIC_MSG // (不开放) +#define __ATTACK_MAGIC // (可开放) 提供战场中的攻击性咒术 +#define _ADD_ACTION // (可开放) 一般NPC动作状况的设定 + +// ------------------------------------------------------------------- +//专案:宠物、道具编码 人员:小瑜 +#define _UNIQUE_P_I // (可开放) CoolFish 2001/10/11 + +// ------------------------------------------------------------------- +//专案:新版人物储存pn 及 当机不回朔 1018 人员:彦勋 +#define _NEWSAVE // (可开放) Robin +#define _STORECHAR // (可开放) Robin +#define _DROPCHECK // (可开放) Robin 防止重复丢道具 +#define _DROPCHECK2 // (可开放) Robin 防止重复丢道具 +// ------------------------------------------------------------------- +//专案 : 精灵王 人员 : 彦豪 +#define _PET_TRANS // (可开放) 宠物转生功能 +#define _NEW_WARPMAN // (可开放) NPC多重WARP功能 +#define _PET_TALK // (可开放) 宠物对话 +#define _PET_LIMITLEVEL // (可开放) 特殊宠设计(玛蕾) +#define _MAP_NOEXIT // (可开放) 特殊地图不得原登&原登回指定点 +// ------------------------------------------------------------------- +// 专案:GM指令、层级Reload 人员:小瑜 +#define _GMRELOAD // (可开放) CoolFish: 2001/11/12 +// ------------------------------------------------------------------- +// 专案:伊甸大陆 人员:彦豪、阿民、小瑜 +#define _GAMBLE_ROULETTE // (可开放) 彦豪 赌场轮盘 宝宝小猪 +#define _FIX_GAMBLENUM // (可开放) 轮盘修正 : 下线扣积分 +#define _GAMBLE_BANK // (可开放) 彦豪 赌场银行 +#define _DROPSTAKENEW // (可开放) CoolFish: 赌场下注 +#define _PETRACE // (可开放) CoolFish: 2001/12/3 宠物竞速场 +#define _NEWEVENT // (可开放) CoolFish: 2001/12/5 新的任务旗标 +//#define _BIGSMALL // (不可开) Arminius 12.15 骰子比大小 +//#define _AUCTIONEER // (不可开) Arminius 12.20 拍卖店 +// ------------------------------------------------------------------- +//专案:鞭炮制作 人员:晓威 +#define _ITEM_FIRECRACKER // (可开放) 战斗中使用鞭炮可以把年兽吓走 +// ------------------------------------------------------------------- +//新功能:庄园PK规则(酷哥定的) 人员:志伟、志旺 +#define _MANOR_PKRULE // (可开放) +#define _MANOR_FIXFMPK // (可开放) WON ADD 家族约战的 GM 指令,测试用的 +// ------------------------------------------------------------------- +// 新功能:新功能&宠物技能 人员:彦豪 +#define _PSKILL_FALLGROUND // (可开放) 宠物技能 (落马术) +#define _ENEMY_FALLGROUND // (可开放) NPC 落马 +#define _BATTLE_NEWPOWER // (可开放) +#define _Item_MoonAct // (可开放) 月神的守护 +#define _Item_DeathAct // (可开放) 恶魔的首饰 +#define _Item_PetAct // (可开放) 驯兽戒指 +#define _Item_ReLifeAct // (可开放) 需要itemset1.txt 才能开) 替身娃娃 +#define _BATTLESTEAL_FIX // (可开放) 修正偷窃 +#define _CFREE_petskill // (可开放) 需要petskill1.txt 才能开) 新学习宠物技能技能 +#define _data_newreadfile // (可开放) 新的server setup.cf 档案 包含 itemset1.txt petskill1.txt 两个新档 +#define _ITEM_MAXUSERNUM // (可开放) 新 itemset1.txt ITEM 使用次数 +// ------------------------------------------------------------------- +//新功能:伊甸二期 人员:彦豪 +#define _PET_TALKPRO // (可开放) 宠物对话加强 & 改 END +#define _PRO_NPCFIX // (可开放) NPC功能加强 +#define _PRO_BATTLEENEMYSKILL // (可开放) 战斗加强 提升NPC的AI技能 +#define _NEW_WARPPOINT // (可开放) 传送点多重条件判断WARP +#define _FIX_CHECKITEM // (可开放) 道具不做非法检查 +// ------------------------------------------------------------------- +//新功能:伊甸二 人员:小民,WON +#define _ADD_ENCOUNT // (可开放) WON 增加敌遭遇触发修件 +#define _WON_PET_MAIL_LOG // (可开放) WON 玩家寄宠邮 LOG +// ------------------------------------------------------------------- +// 新功能:伊甸叁期 4.0 人员:彦豪, 志伟 , 又荣 , 志旺 +//#define _LOSE_FINCH_ // (不可开) ANDY 朱雀技能 +#define _FIX_FAMILY_PK_LIMIT // (可开放) WON 将可挑战庄园的由前十大改为前二十大 +#define _ADD_POOL_ITEM // (可开放) WON 增加可寄放的道具 +#define _ITEM_METAMO // (可开放) shan metamo sprite. code:robin->shan +#define _ENEMY_ATTACK_AI // (可开放) shan enemy attack mode. code:shan +#define _ITEM_TIME_LIMIT // (可开放) shan time limit of item. code:shan +#define _MIND_ICON // (可开放) shan show icon from char mind. code:shan +#define _BATTLENPC_WARP_PLAYER // (可开放) shan npc warp player when n round. code:shan +#define _ITEM_WARP_FIX_BI // (可开放) shan fix bbi to bi. code:shan +#define _SKILL_DAMAGETOHP // (可开放) ANDY 嗜血技 +#define _Skill_MPDAMAGE // (可开放) ANDY MP伤害 +#define _WAEI_KICK // (可开放) ANDY 跨星球踢人 +#define _BATTLE_TIMESPEED // (可开放) ANDY 战斗时间 测试(北京不必开,挡加速功能) +#define _NEW_RIDEPETS // (可开放) ANDY 新骑宠 +#define _FIXBUG_ATTACKBOW // (可开放) ANDY 修正骑宠使用投掷武器bug +#define _NPCCHANGE_PLAYERIMG // (可开放) ANDY NPC改变玩家图号, 强制落马,认玩家图号 (测完) +#define _ITEM_ATTSKILLMAGIC // (可开放) ANDY 道具技能 +#define _EQUIT_DEFMAGIC // (可开放) ANDY 抗魔装备 +#define _FIX_MAGICDAMAGE // (可开放) ANDY 修正魔法公式 叁期开放 +#define _ITEM_CONSTITUTION // (可开放) ANDY 修正个人体质 +#define _MAGIC_REHPAI // (可开放) ANDY 补血AI +#define _TRANSER_MAN // (可开放) ANDY 传送师 +#define _TAKE_ITEMDAMAGE // (可开放) ANDY 道具损坏 ITEMSET2 +#define _FIX_FIRECRACKER // (可开放) ANDY 修正 鞭炮 +#define _FIX_ITEMPROB // (可开放) ANDY 修正 掉宝率 +#define _ADD_DEAMGEDEFC // (可开放) ANDY 额外伤害 & 附加攻击 ITEMSET2 +#define _FIX_MAXCHARMP // (可开放) ANDY MP上限 +#define _ITEM_INSLAY // (可开放) ANDY 镶宝石 动作 +#define _ITEMSET2_ITEM // (可开放) ANDY ITEMSET2 +#define _ITEM_NPCCHANGE // (可开放) ANDY 工匠 (提炼, 精工) +#define _PETSKILL_FIXITEM // (可开放) ANDY 修复 && 同道具损坏 +#define _FIX_SETWORKINT // (可开放) ANDY (FIXWORKINT) +#define _ITEM_ADDEXP // (可开放) vincent 道具:指定时间内增加经验值上升幅度 +#define _ITEM_ADDEXP2 // 智果时间可以累加 Robin +#define _FIX_METAMORIDE // (可开放) ANDY +//#define _M_SERVER // (可开放) GM SERVER (北京&韩国不必开) +//#define _FIX_MSERVER // (可开放) GM SERVER PROC (北京&韩国不必开) +#define _CHECK_ITEMDAMAGE // (可开放) 道具损坏修正 7/26 +#define _SKILL_WILDVIOLENT_ATT // (可开放) vincent 宠技:狂暴攻击 +#define _MAGIC_WEAKEN // (可开放) vincent 精灵:虚弱 +#define _SKILL_WEAKEN // (可开放) vincent 宠技:虚弱//需要开#define _MAGIC_WEAKEN +#define _SKILL_SPEEDY_ATT // (可开放) vincent 宠技:疾速攻击 +#define _SKILL_GUARDBREAK2 // (可开放) vincent 宠技:破除防御2 +#define _SKILL_SACRIFICE // (可开放) vincent 宠技:救援 +#define _PSKILL_MODIFY // (可开放) ANDY 属性强化攻击 +#define _PSKILL_MDFYATTACK // (可开放) ANDY 攻击转化属性 +#define _MAGIC_DEFMAGICATT // (可开放) ANDY 魔法防御 +#define _MAGIC_SUPERWALL // (可开放) ANDY 铁壁防御 +#define _OTHER_MAGICSTAUTS // (可开放) ANDY +#define _SKILL_TOOTH // (可开放) ANDY 齿术 +#define _MAGIC_DEEPPOISON // (可开放) vincent 精灵:剧毒 +#define _MAGIC_BARRIER // (可开放) vincent 精灵:魔障 +#define _MAGIC_NOCAST // (可开放) vincent 精灵:沉默 +#define _ITEM_CRACKER // (可开放) vincent 道具:拉炮 //需要开#define _MIND_ICON +#define _SKILL_DEEPPOISON // (可开放) vincent 宠技:剧毒 //需要开#define _MAGIC_DEEPPOISON +#define _SKILL_BARRIER // (可开放) vincent 宠技:魔障 //需要开#define _MAGIC_BARRIER +#define _SKILL_NOCAST // (可开放) vincent 宠技:沉默 //需要开#define _MAGIC_NOCAST +#define _SKILL_ROAR // (可开放) vincent 宠技:大吼(克年兽) +#define _SKILL_REFRESH // (可开放) vincent 宠技:解除异常状态 +#define _ITEM_REFRESH // (可开放) vincent 解除异常状态道具 +#define _MAGIC_TOCALL // (可开放) kjl 召唤 02/06/20 kjl + +// ------------------------------------------------------------------- +// 新功能:来吉卡功能 人员:彦豪 +#define _ITEMSET3_ITEM // (可开放) ANDY itemset3.txt +#define _SUIT_ITEM // (可开放) ANDY (套装) 来吉卡 需用itemset3.txt +#define _PETSKILL_SETDUCK // (可开放) ANDY 蒙奇技能 +#define _VARY_WOLF // (可开放) pet skill : vary wolf. code:shan +// ------------------------------------------------------------------- +// 新功能:专案5.0 人员: +//#define _ITEMTBL_STAIC // (不可开) ANDY (静态ITEMTBL) +#define _USEWARP_FORNUM // (可开放) ANDY 记忆羽毛 来吉卡 +#define _IMPRECATE_ITEM // (可开放) ANDY 特殊道具 来吉卡 +#define _MAGICPET_SKILL // (可开放) ANDY 魔法宠技能 +#define _ITEM_CHECKWARES // (可开放) ANDY 锁定传送不能 +#define _NPC_REPLACEMENT // (可开放) ANDY 置换战斗npc +#define _EMENY_CHANCEMAN // (可开放) ANDY EMENY 选择 +#define _TYPE_TOXICATION // (可开放) ANDY 中毒无法回血 +#define _PET_FUSION // (可开放) ANDY 宠物融合 enemybase1.txt +#define _NPC_FUSION // (可开放) ANDY NPC宠物融合 +#define _ITEM_EDITBASES // (可开放) ANDY 营养剂 +#define _PET_EVOLUTION // (可开放) ANDY 进化表 + +// ------------------------------------------------------------------- +// 新功能:5.0追加部分 人员: +#define _AVID_TRADETRYBUG // (可开放) ANDY 防止交易中丢宠/道具 寄(宠物)邮件 石币 +#define _ASSESS_SYSEFFICACY // (可开放) ANDY 评估系统效能 12/04 更新 +#define _ASSESS_SYSEFFICACY_SUB // (可开放) Robin 评估系统效能 增加检查内回圈 +#define _PREVENT_TEAMATTACK // (可开放) ANDY 防止同队互打 12/04 更新 +#define _ITEM_ORNAMENTS // (可开放) ANDY 装饰道具 12/04 更新 //出版部 +#define _CHIKULA_STONE // (可开放) ANDY 奇克拉之石 12/04 更新 //来吉卡 宠包 +#define _SEND_EFFECT // (可开放) WON AC送下雪、下雨等特效 12/04 更新 +#define _PETMAIL_DEFNUMS // (可开放) ANDY 宠物邮件限制 +#define _TEAM_KICKPARTY // (可开放) ANDY 队长踢人(非战斗状态) +#define _PETSKILL_TIMID // (可开放) ANDY 宠技-怯战 +#define _PETS_SELECTCON // (可开放) ANDY 宠物不可点选出战 +#define _CHRISTMAS_REDSOCKS // (可开放) ANDY 圣诞红袜 +#define _FIX_ARRAYBUG // (可开放) ANDY 修正array 溢位 +#define _USER_CHARLOOPS // (可开放) ANDY 新用物件LOOP +#define _BATTLE_PROPERTY // (可开放) ANDY 战斗属性特性 +#define _PETSKILL_PROPERTY // (可开放) ANDY 无属魔兽宠技 +#define _ITEM_FIXALLBASE // (可开放) ANDY 修复之石 +#define _ITEM_LOVERPARTY // (可开放) ANDY 情人节道具 +#define _ITEM_FORUSERNAMES // (可开放) ANDY 道具所有人 +#define _BATTLECOMMAND_TIME // (可开放) ANDY 防止玩家开缓速(回合战斗时间) +#define _NPCENEMY_ADDPOWER // (可开放) ANDY 修改怪物的能力值 +//#define _BAD_PLAYER // (不可开) WON 送坏玩家去关 + + +// ------------------------------------------------------------------- +// 新功能:专案6.0 人员: +// +#define _PETSKILL_CANNEDFOOD // (可开放) ANDY 宠物技能罐头 for 6.0 +#define _TEST_DROPITEMS // (可开放) ANDY 测试丢宠 +#define _MAP_WARPPOINT // (可开放) ANDY Map WarpPoint +//#define _AUTO_ADDADDRESS // (可开放) ANDY 自动新增名片 +#define _DEFEND_TIMECHECK // (可开放) ANDY 内部测试时间 +#define _TREASURE_BOX // (可开放) ANDY 宝箱 +#define _BENEMY_EVENTRUN // (可开放) ANDY 战斗npc给道具 +#define _BATTLE_ABDUCTII // (可开放) ANDY 旅途夥伴2 +#define _BATTLE_LIGHTTAKE // (可开放) ANDY 采光术 +#define _BATTLE_ATTCRAZED // (可开放) ANDY 疯狂暴走 +#define _STATUS_WATERWORD // (可开放) ANDY 水世界状态 +#define _ITEM_WATERWORDSTATUS // (可开放) ANDY 水世界状态道具 +//#define _KILL_12_STOP_GMSV // (可开放) WON 下sigusr2後关闭GMSV +//#define _DELBORNPLACE // (可开放) Syu 6.0 统一出生於新手村 +#define _REEDIT_PETBBIS // (可开放) ANDY 修正宠物波比图形 +#define _CAPTURE_FREES // (可开放) ANDY 补抓条件 +#define _THROWITEM_ITEMS // (可开放) 丢掷後有奖品 +#define _OBJSEND_C // (可开放) ANDY _OBJSEND_C +#define _ADD_SHOW_ITEMDAMAGE // (可开放) WON 显示物品耐久度 + +//-------------------------------------------------------------------------- +//专案 7.0 职业系统 人员:彦豪 志旺 旭诚 奇铨 + +#define _CHANGETRADERULE // (可开放) Syu ADD 交易规则修订 +#define _TRADE_SHOWHP // (可开放) Syu ADD 交易显示血量 +#define _SHOOTCHESTNUT // (可开放) Syu ADD 宠技:丢栗子 +#define _SKILLLIMIT // (可开放) Syu ADD 不得攻击我方限制 +#define _TRADESYSTEM2 // (可开放) Syu ADD 新交易系统 +#define _NPC_NOSAVEPOINT // (可开放) ANDY 纪录点不存人物资料 +#define _ACFMPK_LIST // (可开放) ANDY 家族对战列表修正 +#define _PETSKILL2_TXT // (可开放) ANDY petskill2.txt +#define _PETSKILL_CHECKTYPE // (可开放) ANDY 宠物技能使用时机 +#define _PETSKILL_TEAR // (可开放) ANDY 宠技 撕裂伤口 +#define _NPC_MAKEPAIR // (可开放) ANDY NPC 配对 +#define _ITEMSET4_TXT // (可开放) ANDY itemset4.txt +#define _ITEM_PILENUMS // (可开放) ANDY 道具素材堆叠 需 itemset4 +#define _ITEM_PILEFORTRADE // (可开放) ANDY 交易堆叠 +#define _ITEM_EQUITSPACE // (可开放) ANDY 新装备栏位 +#define _PET_LOSTPET // (可开放) ANDY 遗失宠物搜寻计划宠物 +#define _ITEMSET5_TXT // (可开放) ANDY itemset5.txt +#define _ITEMSET6_TXT // (可开放) ANDY itemset6.txt +#define _EQUIT_ARRANGE // (可开放) ANDY 挡格 需要 itemset5.txt +#define _EQUIT_SEQUENCE // (可开放) ANDY 攻击顺序 需要 itemset5.txt +#define _EQUIT_ADDPILE // (可开放) ANDY 增加可堆叠数 需要 itemset5.txt +#define _EQUIT_HITRIGHT // (可开放) ANDY 命中 需要 itemset5.txt +#define _EQUIT_NEGLECTGUARD // (可开放) ANDY 忽视目标防御力% 需要 itemset6.txt +#define _EQUIT_NEWGLOVE // (可开放) ANDY 手套栏位 +#define _FM_JOINLIMIT // (可开放) ANDY 加入家族条件限制 +#define _FIX_MAX_GOLD // (可开放) WON ADD 增加人物金钱上限 +#define _CK_ONLINE_PLAYER_COUNT // (可开放) WON 计算线上人数 (要配合ac,否则会重开) +#define _PET_SKILL_SARS // (可开放) WON ADD 毒煞蔓延 +#define _SONIC_ATTACK // (可开放) WON ADD 音波攻击 +#define _NET_REDUCESEND // (可开放) ANDY 减少DB资料传送 +#define _FEV_ADD_NEW_ITEM // (可开放) Change 增加复活守精 +#define _ALLDOMAN // (可开放) Syu ADD 排行榜NPC +#define _LOCKHELP_OK // (可开放) Syu ADD 锁定不可加入战斗 +#define _TELLCHANNEL // (可开放) Syu ADD 密语频道 +// 新功能:职业 +#define _NEWREQUESTPROTOCOL // (可开放) Syu ADD 新增Protocol要求细项 +#define _OUTOFBATTLESKILL // (可开放) Syu ADD 非战斗时技能Protocol +#define _CHAR_PROFESSION // (可开放) WON ADD 人物职业栏位 +#define _PROFESSION_SKILL // (可开放) WON ADD 人物职业技能 +#define _NPC_WELFARE // (可开放) WON ADD 职业NPC +#define _PROFESSION_FIX_LEVEL // (可开放) WON ADD 修正职业经验值(北京&韩国不必开) +#define _GM_SIGUSR2 // (可开放) Change 下达sigusr2後执行 gm_sigusr_command档案内的GM指令,若没有指令就关闭GMSV +#define _GM_BROADCAST // (可开放) WON ADD 客服公告系统 +#define _NPC_ADDLEVELUP // (可开放) ANDY NPC增加玩家等级 +#define _CHAR_FIXDATADEF // (可开放) ANDY 修正人物资料初始 +//系统改良 +#define _SIMPLIFY_ITEMSTRING // (可开放) ANDY 简化道具字串 +#define _CHAR_NEWLOGOUT // (可开放) ANDY 登出新机制 +#define _CHATROOMPROTOCOL // (可开放) Syu ADD 聊天室频道 8/27 + +#define _CHAR_POOLITEM // (可开放) ANDY 人物道具仓库共用 +#define _NPC_DEPOTITEM // (可开放) ANDY 人物道具仓库共用 + +#define _SIMPLIFY_PETSTRING // (可开放) ANDY 简化宠物存档字串 +#define _SIMPLIFY_ITEMSTRING2 // (可开放) ANDY 简化道具字串2 +#define _WOLF_TAKE_AXE // (可开放) WON ADD 抓双头狼的限制 +#define _FIX_UNNECESSARY // (可开放) ANDY 修正不必要的判断 +#define _ITEM_MAGICRECOVERY // (可开放) ANDY 新光镜守 +//9/17更新 +#define _PETSKILL_GYRATE // (可开放) Change 宠技:回旋攻击 +#define _PETSKILL_ACUPUNCTURE // (可开放) Change 宠技:针刺外皮 (client端的_PETSKILL_ACUPUNCTURE也要开) +#define _PETSKILL_RETRACE // (可开放) Change 宠技:追迹攻击 +#define _PETSKILL_HECTOR // (可开放) Change 宠技:威吓 +//10/13更新 +#define _PETSKILL_FIREKILL // (可开放) Change 宠技:火线猎杀 +#define _PETSKILL_DAMAGETOHP // (可开放) Change 宠技:暗月狂狼(嗜血技的变体) +#define _PETSKILL_BECOMEFOX // (可开放) Change 宠技:媚惑术 +//10/22更新 +// 新功能:修改WORKER(新付费机制) +#define _FIX_MESSAGE // (可开放) WON ADD 修改WORKER封包内容 (北京&韩国不必开) + +//11/12更新 +#define _PETSKILL_SHOWMERCY // (可开) Change 宠技:手下留情 +#define _NPC_ActionFreeCmp // (可开) Change 替NPC参数加入新的比较方式 +//-------------------------------------------------------------------------- + + +//11/26 +#define _NPC_ProfessionTrans // (可开) Change 替职业NPC加入判断转生 +#define _NPC_NewDelPet // (可开) Change 替NPC加入删除宠物(原本就有了,只是用warpman使用时不成功,所以先做一个顶一下) +//#define _MUSEUM // 石器博物馆 Robin 2003/11 + #ifdef _MUSEUM + #define _DELBORNPLACE + #endif +#define _CHANGEGALAXY // (可开) 星系移民 Robin 2003/10 +#define _ALLDOMAN_DEBUG // (可开) Change 修正重启server後排行榜消失bug +//20031217 +#define _CHRISTMAS_REDSOCKS_NEW // (可开) Change 新圣诞红袜 +#define _PETSKILL_COMBINED // (可开) Change 宠技:难得糊涂 [综合魔法(依参数乱数取出魔法)] +//情人节活动 +#define _NPC_ADDWARPMAN1 // (可开放) Change npcgen_warpman增加功能(设定组队人数、设定组队男女人数) +#define _ITEM_QUITPARTY // (可开放) Change 队伍解散时特定道具即会消失 +#define _ITEM_ADDEQUIPEXP // (可开) Change 装备後经验值增加 +//2004/2/18 +#define _ITEM_LVUPUP // (可开) Change 突破宠物等级限制的药(玄武专用) +//2004/02/25 +#define _PETSKILL_BECOMEPIG // (可开) Change 宠技:乌力化 +#define _ITEM_UNBECOMEPIG // (可开) Change 乌力化的解药 +#define _PET_TALKBBI // (可开) Change 增加判断bbi +#define _ITEM_USEMAGIC // (可开) Change 由道具使用魔法 +//2004/04/07 +#define _ITEM_PROPERTY // (可开) Change 改变四属性道具 +#define _SUIT_ADDENDUM // (可开) Change 替套装增加功能 (_SUIT_ITEM要开) +//2004/05/05 +#define _ITEM_CHECKDROPATLOGOUT // (可开) Change 检查回纪录点时身上有无登出後消失道具,若有,不可回纪录点 +#define _FM_MODIFY // 家族功能修改(开放) +#define _CHANNEL_MODIFY // 频道功能整合(开放) +#define _STANDBYPET // Robin 待机宠封包 +#define _PROSKILL_OPTIMUM // Robin 职业技能处理最佳化 +#define _PETSKILL_OPTIMUM // Robin 宠物技能处理最佳化 +#define _MAGIC_OPTIMUM // Robin Magic table 最佳化 +#define _AC_PIORITY // Nuke 提高AC的优先权(可开) +//2004/05/12 +#define _CHAR_POOLPET // (可开放) Robin 人物宠物仓库共用 +#define _NPC_DEPOTPET // (可开放) Robin 人物宠物仓库共用 +#define _TIMEOUTKICK // (可开) 时段制踢人 Robin 2003/10 +#define _MAGIC_RESIST_EQUIT // (可开) WON ADD 职业抗性装备 +#define _LOG_OTHER // 杂项讯息专用LOG + +//-------------------------------------------------------------------------- +//机动营测试中 + + +// ------------------------------------------------------------------- +//#define _NPC_QUIZSCOPE // (不可开) Change 替NPC增加题号 围参数 +//#define _ITEM_ADDCOMBO // (不可开) Change 装备後合击率增加(战场上要有2个人以上带才有用)未完成... +//#define _NPC_AIRDELITEM // (不可开) Change 搭加美航空时所扣除的道具(就是飞机票啦) +//#define _NPC_AIRLEVEL // (不可开) Change 搭加美航空的最大最等级限制(等级过高不给搭) + +//#define _ANDYLOG_TEST +//#define _NPC_WELFARE_2 // (不可开) WON ADD 职业NPC-2 +//#define _UNIVERSE_CHATROOM // (不可开) ANDY 全星系聊天 +//#define _FIX_ALLDOMAN // (不可开) ANDY 修正英雄战场 +//制作中 +//#define _SEND_PROF_DATA // (不可开) ANDY ADD 传送职业更新给cli +//#define _AUCPROTOCOL // (不可开) Syu ADD 拍卖频道开关Protocol +//#define _NPC_SELLSTH // (不可开) ANDY 拍卖系统 +//#define _NPC_SEPARATEDATA // (不可开) ANDY NPC 资料分离 + +//------------------------------------------------------------------------ +// 以下为冻结功能 +//------------------------------------------------------------------------ +//#define fix_login_event // (不可开) WON 补回伊甸一期的声望 (北京不必开) +//#define _FIX_DEL_MAP // (不可开) WON 玩家抽地图送监狱 +//#define _PETFIGHT // (不可开) 宠物竞技场 +//#define _EXM_RANDITEM // (不可开) NPC (Exchangeman) 乱数要求物品 (已取消) +//#define add_amulet_map // (不可开) WON 增加太阳神首饰的 围 +//#define _ACFMPK_NOFREE // (不可开) ANDY 家族无条件 +//-------------------------------------------------------------------------- +// 6.0追加功能 pile + +//#define _IMPOROVE_ITEMTABLE // (不可开) ANDY 改善ITEM TABLE +//#define _NPC_SHOPALTER01 // (不可开) Change 买卖系统修改(配合Client改为图形介面所做的修改) +//#define _GM_IDENTIFY // (不可开) Change 是否秀出GM头顶上识别字串的GM指令 +//#define _GSERVER_RUNTIME // (不可开) Change 传送GSERVER执行多少时间给Mserver (Mserver要配合) +//#define _NPC_VERYWELFARE // (不可开) Change 非常好康A的NPC +//-------------------------------------------------------------------------- +//#define _ADD_NEWEVENT // (不可开) WON 多增任务旗标 +//#define _BLACK_MARKET // (不可开) shan a black market. code:shan +//#define _DYNAMIC_BUILDER_MAP // (不可开) shan (test)dynamic builder on the upper map. code:shan +//#define _TEST_ITEMMEMORY // (不可开) ANDY (测试ITEMTABL) +//#define _LASTERR_FUNCTION // (不可开) ANDY (lastFunction) +//#define _MARKET_TRADE // (不可开) ANDY 交易市集 +//#define _PAUCTION_MAN // (不可开) ANDY +//#define _SKILL_SELFEXPLODE // (不可开) vincent 宠技:自爆(缺图) +//#define _ADD_FAMILY_TAX // (不可开) WON 增加庄园税收 (要配合ac,否则会重开) +//#define _SYUTRY +/* ------------------------------------------------------------------- + * 新功能:PK星系 1121 人员:彦勋,小金 + */ +//#define _PKPETSHOP // (不可开) + +// ------------------------------------------------------------------- +//特殊活动功能 +//#define _CHECK_GAMESPEED // (不可开) ANDY 加速检测 +//#define _NPCSERVER_NEW // (不可开) ANDY NPC 伺服器 +//#define _OBJS_TALKFUN // (不可开) ANDY TALK 搜寻法 +#define _NEWOPEN_MAXEXP // (可开) ANDY MAX经验值 +//#define _MERGE_LOG // (不可开) ANDY 合成 LOG +//#define _CHECK_UCODE // (不可开) ANDY 检查 + +//#define _DEATH_FAMILYCONTEND // (不可开) ANDY 家族战报名 +//#define _NEW_INSERVERPOINT // (不可开) ANDY 登入座标 +//#define _DEATH_CONTENDWATCH // (不可开) ANDY 决斗观看 +//#define _DEATH_CONTENDTEST // (不可开) ANDY 死斗赛程加快 + +//#define _DEATH_FAMILY_GM_COMMAND // (可开) WON ADD 家族战GM指令 +//#define _DEATH_FAMILY_LOGIN_CHECK // (可开) WON ADD 家族战登入检查 +//#define _DEATH_FAMILY_STRUCT // (可开) WON ADD 家族战存放胜负资料 +//#define _DEATH_FAMILY_CANT_SCHEDULE // (可开) WON ADD 家族战玩家不能自行约战 + +//#define _ACTION_BULLSCR // (不可开) ANDY 蛮牛&朱雀 活动功能 (7/30以後才能关闭) +//#define _BULL_FIXPLAYER // (不可开) ANDY 修正人物蛮牛活动功能 +//#define _BULL_CUTBULLSCR // (不可开) ANDY 终止蛮牛活动积分 +//#define _ACTION_GMQUE // (不可开) ANDY GM活动功能 永保留 +//#define _PET_FUSIONSHOWTIME // (不可开) ANDY 宠物蛋秀时间 +//#define _NEW_PLAYERGOLD // (可开放) ANDY 新帐号给钱 +// ------------------------------------------------------------------- +//登入检查动作 + +//#define _FIX_TSKILLCAN // (可开放) ANDY 修正宠物T技罐头 以及 清除T字技(非机暴) +//#define _CHANGEGOATMETAMO // (可开放) Syu 羊年兽更换新图 + +// ------------------------------------------------------------------- +// 新功能:GM密频功能扩充 +//#define _GM_WARP_PLAYER // (不可开) WON 传送玩家 (北京&韩国不必开) +//#define _RECAL_ASK_PLAYER // (不可开) WON 要求人物资料 (北京&韩国不必开) +//#define _RECAL_SEND_COUNT // (不可开) WON 传送GS资讯 (北京&韩国不必开) +//#define _RECAL_SERVER_OFF // (不可开) WON MSERVER 关闭 GS (北京&韩国不必开) + +//#define _ENEMYTEMP_OPTIMUM // Robin EnemyBase table 最佳化 +//#define _ENEMY_OPTIMUM // Robin Enemy table 最佳化 +//#define _CHECK_BATTLETIME // Robin 纪录每一战斗指令时间(测试用) +//#define _CHECK_BATTLE_IO // Robin 纪录战斗封包传送(测试用) + +//复刻版 +//#define _BACK_VERSION //复刻版 +#define _REDHAT_V9 //(可开) Change 在REDHAT9.0的版本下编译时打开 +//#define _UN_FMPOINT // (可开) Change 关掉申请家族据点 +//#define _UN_FMMEMO //(可开)Change 关掉家族之间留言板 +//-------------------------------------------------------------------------- +//专案 7.5 精灵的招唤 人员:彦勋 奇铨 小威 +#define _NPC_EXCHANGEMANTRANS // (可开) Change 替exchangeman加入判断转生 +#define _ANGEL_SUMMON // Robin 天使召唤 + #ifdef _ANGEL_SUMMON + #define _ADD_NEWEVENT + #endif +// Terry define start ------------------------------------------------------------------- +#define _STREET_VENDOR // 摆摊功能(开放) +#define _WATCH_EVENT // 查询任务功能(开放) +#define _NEW_MANOR_LAW // 新庄园规则(开放) +#define _MAP_TIME // 特殊地图,会倒数(开放) +#define _PETSKILL_LER // 雷尔技能(开放) +#define _TEACHER_SYSTEM // 导师系统(开放) +// Terry define end ------------------------------------------------------------------- +#define _FIX_MAGIC_RESIST // (可开) Change 职业魔法抗性 +#define _ADD_DUNGEON // (可开) Change 追加地牢 +#define _PROFESSION_ADDSKILL // (可开) Change 追加职业技能 +#define _ITEM_ADDPETEXP // (可开) Change 增加宠物经验值道具(可吃此道具宠物,平常不可获得经验值) +#define _TRANS_6 // (可开) Change 人物6转 +#define _TRANS_7 // (可开) Change 人物7转 +#define _PET_2TRANS // (可开) Change 宠物2转 +#define _PET_2LIMITLEVEL // (可开) Change 帮助宠物2转的玛蕾 +#define _MAGICSTAUTS_RESIST // (可开) Change (火电冰)抗性精灵 +#define _EQUIT_RESIST // (可开) Change 单一装备抗性(可抗单一功能异常状态)有抗火 雷 冰 虚弱 魔障 沉默 落马 +#define _SUIT_TWFWENDUM // (可开) Change 四属性套装功能 (_SUIT_ITEM要开) +#define _EXCHANGEMAN_REQUEST_DELPET // (可开) Change 替exchangeman的TYPE:REQUEST增加删除宠物 +//#define _75_TEST // (不可开) 7.5测试server +//#define _PK_SERVER //百万pk活动 +//#define _DEATH_CONTEND // (可开) 百万pk活动 ANDY 死斗 +//#define _DEATH_CONTENDAB // (可开) 百万pk活动 ANDY 正式死斗 +//-------------------------------------------------------------------------- + +#define _ESCAPE_RESET // 恶宝逃跑後暂时不可组队 Robin 2004/07/22 +#define _DEL_DROP_GOLD // 删除地上过时的石币 Robin +#define _ITEM_STONE // cyg 奇怪的石头 +#define _HELP_NEWHAND // cyg 新创角色给予新手道具) +#define _DEF_FMFREETIME // cyg GM指令 退出家族时间限制设为0 +#define _DEF_GETYOU // cyg GM指令 查询自己两格 围内的玩家帐号 +#define _DEF_NEWSEND // cyg GM指令 传送玩家时可加句子也可不加 +#define _DEF_SUPERSEND // cyg GM指令 可传送已某帐号为中心附近3格内所有玩家 +#define _SUIT_ADDPART3 // (可开) Change 套装功能第叁弹 回避提高% 沉默抗性提高% 敏提高% 防提高% 攻提高% +#define _PETSKILL_2TIMID // (可开) Change 怯战第二版(狂狮怒吼) +#define CAVALRY_DEBUG // (暂时开) Change 座骑攻击除错中 +#define _SHOW_FUSION // (可开) Change 融合宠物在CLIENT端只显示转生数,修改为融合宠显示为融合(client端也要开) +#define _CONTRACT // (可开) Robin 契约功能 +#define _FONT_SIZE // (可开) Robin 字型大小功能 +#define _PROSK99 // (可开) Change 检查职技等级送白狼 +#define _TIME_TICKET // Robin 限时入场 森林捉宠用 +#define _HALLOWEEN_EFFECT // 万圣节特效 +#define _ADD_STATUS_2 // 新增传送人物状态第二类 +#define _ADD_reITEM // (可开) Change 检查道具栏位空格 +#define _ADD_NOITEM_BATTLE // 新增NPC检查人物身上没道具会进入战斗 +#define _PETSKILL_BATTLE_MODEL // 宠物技能战斗模组 +#define _RACEMAN // cyg 猎宠大会新npc +#define _PETSKILL_ANTINTER // (可开) Change 宠技:蚁之葬 参考_PETSKILL_2TIMID +#define _PETSKILL_REGRET // (可开) Change 宠技:憾甲一击 参考_SONIC_ATTACK +#define _SUIT_ADDPART4 // (可开) Change 套装功能第四弹 中毒攻击% 加强法师魔法(机率30%) 抵抗法师的魔法 + +//#define _CHECK_ENEMY_PET // (不可开) Change 检查玩家是否持有不可当宠物的角色(enemy.txt的petflg栏位为0代表不可拿来当宠物) +//#define _ITEM_TYPETABLE // (不可开) Change 追加typetable +//#define _MERGE_NEW_8 // Robin 8.0版 新合成规则 +//#define _RIGHTCLICK // Robin 滑鼠右键功能 +//#define _JOBDAILY // cyg 任务日志功能 +//#define _ALCHEMIST // Robin 精 功能 +//#define _CHECK_ITEM_MODIFY // 检查异常加强的道具 +//#define _PETSKILL_EXPLODE // (不可开) Change 宠技:爆裂攻击 + +//------------------------------------------------------------------------------------ +#define _ITEM_SETLOVER // 结婚功能 +#define _CREATE_MM_1_2 // 制作极品玛蕾菲雅 +#define _SendTo // 传送到玩家身边 +#define _GET_BATTLE_EXP // 经验设置 +#ifndef _NEW_TESTSERVER + #define _NEW_PLAYER_CF // 新手状态设置 +#endif +#define _USER_EXP_CF // 用户自定义经验 +#define _TRANS_LEVEL_CF // 转生超越160级设置 +#define _UNLAW_WARP_FLOOR // 禁止传送地区 +#define _UNREG_NEMA // 禁止人物名称 +#define _GM_ITEM // 玩家GM命令物品 +#define _GM_METAMO_RIDE // GM人物骑所有宠 +#define _GM_RIDE // GM命令设置骑宠权限 +#define _LOCK_IP // 锁定IP +#endif diff --git a/gmsv/include/version.h.bak b/gmsv/include/version.h.bak new file mode 100644 index 0000000..24ce181 --- /dev/null +++ b/gmsv/include/version.h.bak @@ -0,0 +1,570 @@ +#ifndef __VERSION_H__ +#define __VERSION_H__ +#include "correct_bug.h" //BUG FIX +#include "version_pk.h" //PK SERVER + +/*Server 版本控制*/ +#define _NEW_SERVER_ +#define _SERVER_NUMS +#define SERVER_VERSION "龙zoro版GMSV服务端v1.5" + +#define UNIQUE_KEYCODEITEM 100 +#define UNIQUE_KEYCODEPET "i" + +#define _SA_VERSION_70 // (可开放) WON ADD 石器时代7.0 的版本控制 +//#define _DEFAULT_PKEY "Wonwonwon" // (可开放)( 石器 6.0 ) +//#define _RUNNING_KEY "11111111" // (可开放)( 石器 6.0 ) +#define _DEFAULT_PKEY "ttttttttt" // (可开放)( 石器 6.0 ) +#define _RUNNING_KEY "20041215" // (可开放)( 石器 6.0 ) + +#define _VERSION_20010911 // (可开放) 9.11 编码修改 + +// ------------------------------------------------------------------- +//新功能:测试伺服器专用 人员:彦豪 +#define _TEST_PETCREATE // (不可开) ANDY 测宠的GM指令 +//#define _LOGIN_ADDITEM // (不可开) ANDY 登入加满物品 +//#define _NEW_TESTSERVER // (不可开) ANDY 玩家创新人物时,给予五转125等级及叁只宠物 +//#define _TEST_PETFUSIONTIME // (不可开) ANDY 测试宠物融合 食时间加快 +/* ------------------------------------------------------------------- + * 专案:家族庄园数量修改 人员:小瑜、彦勋、志伟、小民 + */ + +/* +修改装园数量方式: +Account Server 程式: + acfamily.h MAX_FMPOINT要修改 +Account Server 游戏环境: + saac/family/fmpoint/db_fmpoint档案中须新增庄园入口坐标等设定 + 庄园进入图层|庄园进入X座标|庄园进入Y座标|庄园族长图层|庄园邻近之村庄|占领庄园之家族 index|占领庄园之家族 name|占领庄园之家族综合声望值 + 例如: + 100|607|563|1041|1|3|shan|3132238 + 200|73|588|2031|2||| +Game Server 程式: + version.h FAMILY_MAXHOME、MANORNUM要修正 + family.c FM_PKFLOOR 须增设战斗图层 + FAMILY_RidePet() 中须加入族长家图层 + FAMILY_LeaderFunc() 中须加入邀请函id + npcutil.c addNpcFamilyTax function中须加入(庄园图层%100)此为庄园税收部份 +Game Server 游戏环境: + gmsv_v2/data/npc/family/manorsman.arg* id须修正 + gmsv_v2/data/npc/family/scheduleman.arg* id须修正 +*/ + +#define _FAMILY_MANORNUM_CHANGE // CoolFish 用来修改装园数量(4.0) +#ifdef _FAMILY_MANORNUM_CHANGE +#define FAMILY_MAXHOME 9 // (4.0) 家族据点 +#define MANORNUM 9 // (4.0) 庄园数量 +#define FMPOINTNUM 9 // (4.0) 有据点家族的最大数量 +#endif +#define _FMVER21 // (可开放) 家族职掌功能 +#define _PERSONAL_FAME // (可开放) Arminius 8.30 家族个人声望 +// ------------------------------------------------------------------- +//专案:石器活动自动化 人员:晓威、家麟 +#define _SERVICE // (可开放) Terry 2001/10/03 活动功能自动化 + +#define _EVERYONE_RIDE // (可开放) Robin 0924 骑宠平民化 +// ------------------------------------------------------------------- +//专案:攻击性咒术的制作 人员:笃志 +// #define __ATTACK_MAGIC_MSG // (不开放) +#define __ATTACK_MAGIC // (可开放) 提供战场中的攻击性咒术 +#define _ADD_ACTION // (可开放) 一般NPC动作状况的设定 + +// ------------------------------------------------------------------- +//专案:宠物、道具编码 人员:小瑜 +#define _UNIQUE_P_I // (可开放) CoolFish 2001/10/11 + +// ------------------------------------------------------------------- +//专案:新版人物储存pn 及 当机不回朔 1018 人员:彦勋 +#define _NEWSAVE // (可开放) Robin +#define _STORECHAR // (可开放) Robin +#define _DROPCHECK // (可开放) Robin 防止重复丢道具 +#define _DROPCHECK2 // (可开放) Robin 防止重复丢道具 +// ------------------------------------------------------------------- +//专案 : 精灵王 人员 : 彦豪 +#define _PET_TRANS // (可开放) 宠物转生功能 +#define _NEW_WARPMAN // (可开放) NPC多重WARP功能 +#define _PET_TALK // (可开放) 宠物对话 +#define _PET_LIMITLEVEL // (可开放) 特殊宠设计(玛蕾) +#define _MAP_NOEXIT // (可开放) 特殊地图不得原登&原登回指定点 +// ------------------------------------------------------------------- +// 专案:GM指令、层级Reload 人员:小瑜 +#define _GMRELOAD // (可开放) CoolFish: 2001/11/12 +// ------------------------------------------------------------------- +// 专案:伊甸大陆 人员:彦豪、阿民、小瑜 +#define _GAMBLE_ROULETTE // (可开放) 彦豪 赌场轮盘 宝宝小猪 +#define _FIX_GAMBLENUM // (可开放) 轮盘修正 : 下线扣积分 +#define _GAMBLE_BANK // (可开放) 彦豪 赌场银行 +#define _DROPSTAKENEW // (可开放) CoolFish: 赌场下注 +#define _PETRACE // (可开放) CoolFish: 2001/12/3 宠物竞速场 +#define _NEWEVENT // (可开放) CoolFish: 2001/12/5 新的任务旗标 +//#define _BIGSMALL // (不可开) Arminius 12.15 骰子比大小 +//#define _AUCTIONEER // (不可开) Arminius 12.20 拍卖店 +// ------------------------------------------------------------------- +//专案:鞭炮制作 人员:晓威 +#define _ITEM_FIRECRACKER // (可开放) 战斗中使用鞭炮可以把年兽吓走 +// ------------------------------------------------------------------- +//新功能:庄园PK规则(酷哥定的) 人员:志伟、志旺 +#define _MANOR_PKRULE // (可开放) +#define _MANOR_FIXFMPK // (可开放) WON ADD 家族约战的 GM 指令,测试用的 +// ------------------------------------------------------------------- +// 新功能:新功能&宠物技能 人员:彦豪 +#define _PSKILL_FALLGROUND // (可开放) 宠物技能 (落马术) +#define _ENEMY_FALLGROUND // (可开放) NPC 落马 +#define _BATTLE_NEWPOWER // (可开放) +#define _Item_MoonAct // (可开放) 月神的守护 +#define _Item_DeathAct // (可开放) 恶魔的首饰 +#define _Item_PetAct // (可开放) 驯兽戒指 +#define _Item_ReLifeAct // (可开放) 需要itemset1.txt 才能开) 替身娃娃 +#define _BATTLESTEAL_FIX // (可开放) 修正偷窃 +#define _CFREE_petskill // (可开放) 需要petskill1.txt 才能开) 新学习宠物技能技能 +#define _data_newreadfile // (可开放) 新的server setup.cf 档案 包含 itemset1.txt petskill1.txt 两个新档 +#define _ITEM_MAXUSERNUM // (可开放) 新 itemset1.txt ITEM 使用次数 +// ------------------------------------------------------------------- +//新功能:伊甸二期 人员:彦豪 +#define _PET_TALKPRO // (可开放) 宠物对话加强 & 改 END +#define _PRO_NPCFIX // (可开放) NPC功能加强 +#define _PRO_BATTLEENEMYSKILL // (可开放) 战斗加强 提升NPC的AI技能 +#define _NEW_WARPPOINT // (可开放) 传送点多重条件判断WARP +#define _FIX_CHECKITEM // (可开放) 道具不做非法检查 +// ------------------------------------------------------------------- +//新功能:伊甸二 人员:小民,WON +#define _ADD_ENCOUNT // (可开放) WON 增加敌遭遇触发修件 +#define _WON_PET_MAIL_LOG // (可开放) WON 玩家寄宠邮 LOG +// ------------------------------------------------------------------- +// 新功能:伊甸叁期 4.0 人员:彦豪, 志伟 , 又荣 , 志旺 +//#define _LOSE_FINCH_ // (不可开) ANDY 朱雀技能 +#define _FIX_FAMILY_PK_LIMIT // (可开放) WON 将可挑战庄园的由前十大改为前二十大 +#define _ADD_POOL_ITEM // (可开放) WON 增加可寄放的道具 +#define _ITEM_METAMO // (可开放) shan metamo sprite. code:robin->shan +#define _ENEMY_ATTACK_AI // (可开放) shan enemy attack mode. code:shan +#define _ITEM_TIME_LIMIT // (可开放) shan time limit of item. code:shan +#define _MIND_ICON // (可开放) shan show icon from char mind. code:shan +#define _BATTLENPC_WARP_PLAYER // (可开放) shan npc warp player when n round. code:shan +#define _ITEM_WARP_FIX_BI // (可开放) shan fix bbi to bi. code:shan +#define _SKILL_DAMAGETOHP // (可开放) ANDY 嗜血技 +#define _Skill_MPDAMAGE // (可开放) ANDY MP伤害 +#define _WAEI_KICK // (可开放) ANDY 跨星球踢人 +#define _BATTLE_TIMESPEED // (可开放) ANDY 战斗时间 测试(北京不必开,挡加速功能) +#define _NEW_RIDEPETS // (可开放) ANDY 新骑宠 +#define _FIXBUG_ATTACKBOW // (可开放) ANDY 修正骑宠使用投掷武器bug +#define _NPCCHANGE_PLAYERIMG // (可开放) ANDY NPC改变玩家图号, 强制落马,认玩家图号 (测完) +#define _ITEM_ATTSKILLMAGIC // (可开放) ANDY 道具技能 +#define _EQUIT_DEFMAGIC // (可开放) ANDY 抗魔装备 +#define _FIX_MAGICDAMAGE // (可开放) ANDY 修正魔法公式 叁期开放 +#define _ITEM_CONSTITUTION // (可开放) ANDY 修正个人体质 +#define _MAGIC_REHPAI // (可开放) ANDY 补血AI +#define _TRANSER_MAN // (可开放) ANDY 传送师 +#define _TAKE_ITEMDAMAGE // (可开放) ANDY 道具损坏 ITEMSET2 +#define _FIX_FIRECRACKER // (可开放) ANDY 修正 鞭炮 +#define _FIX_ITEMPROB // (可开放) ANDY 修正 掉宝率 +#define _ADD_DEAMGEDEFC // (可开放) ANDY 额外伤害 & 附加攻击 ITEMSET2 +#define _FIX_MAXCHARMP // (可开放) ANDY MP上限 +#define _ITEM_INSLAY // (可开放) ANDY 镶宝石 动作 +#define _ITEMSET2_ITEM // (可开放) ANDY ITEMSET2 +#define _ITEM_NPCCHANGE // (可开放) ANDY 工匠 (提炼, 精工) +#define _PETSKILL_FIXITEM // (可开放) ANDY 修复 && 同道具损坏 +#define _FIX_SETWORKINT // (可开放) ANDY (FIXWORKINT) +#define _ITEM_ADDEXP // (可开放) vincent 道具:指定时间内增加经验值上升幅度 +#define _ITEM_ADDEXP2 // 智果时间可以累加 Robin +#define _FIX_METAMORIDE // (可开放) ANDY +//#define _M_SERVER // (可开放) GM SERVER (北京&韩国不必开) +//#define _FIX_MSERVER // (可开放) GM SERVER PROC (北京&韩国不必开) +#define _CHECK_ITEMDAMAGE // (可开放) 道具损坏修正 7/26 +#define _SKILL_WILDVIOLENT_ATT // (可开放) vincent 宠技:狂暴攻击 +#define _MAGIC_WEAKEN // (可开放) vincent 精灵:虚弱 +#define _SKILL_WEAKEN // (可开放) vincent 宠技:虚弱//需要开#define _MAGIC_WEAKEN +#define _SKILL_SPEEDY_ATT // (可开放) vincent 宠技:疾速攻击 +#define _SKILL_GUARDBREAK2 // (可开放) vincent 宠技:破除防御2 +#define _SKILL_SACRIFICE // (可开放) vincent 宠技:救援 +#define _PSKILL_MODIFY // (可开放) ANDY 属性强化攻击 +#define _PSKILL_MDFYATTACK // (可开放) ANDY 攻击转化属性 +#define _MAGIC_DEFMAGICATT // (可开放) ANDY 魔法防御 +#define _MAGIC_SUPERWALL // (可开放) ANDY 铁壁防御 +#define _OTHER_MAGICSTAUTS // (可开放) ANDY +#define _SKILL_TOOTH // (可开放) ANDY 齿术 +#define _MAGIC_DEEPPOISON // (可开放) vincent 精灵:剧毒 +#define _MAGIC_BARRIER // (可开放) vincent 精灵:魔障 +#define _MAGIC_NOCAST // (可开放) vincent 精灵:沉默 +#define _ITEM_CRACKER // (可开放) vincent 道具:拉炮 //需要开#define _MIND_ICON +#define _SKILL_DEEPPOISON // (可开放) vincent 宠技:剧毒 //需要开#define _MAGIC_DEEPPOISON +#define _SKILL_BARRIER // (可开放) vincent 宠技:魔障 //需要开#define _MAGIC_BARRIER +#define _SKILL_NOCAST // (可开放) vincent 宠技:沉默 //需要开#define _MAGIC_NOCAST +#define _SKILL_ROAR // (可开放) vincent 宠技:大吼(克年兽) +#define _SKILL_REFRESH // (可开放) vincent 宠技:解除异常状态 +#define _ITEM_REFRESH // (可开放) vincent 解除异常状态道具 +#define _MAGIC_TOCALL // (可开放) kjl 召唤 02/06/20 kjl + +// ------------------------------------------------------------------- +// 新功能:来吉卡功能 人员:彦豪 +#define _ITEMSET3_ITEM // (可开放) ANDY itemset3.txt +#define _SUIT_ITEM // (可开放) ANDY (套装) 来吉卡 需用itemset3.txt +#define _PETSKILL_SETDUCK // (可开放) ANDY 蒙奇技能 +#define _VARY_WOLF // (可开放) pet skill : vary wolf. code:shan +// ------------------------------------------------------------------- +// 新功能:专案5.0 人员: +//#define _ITEMTBL_STAIC // (不可开) ANDY (静态ITEMTBL) +#define _USEWARP_FORNUM // (可开放) ANDY 记忆羽毛 来吉卡 +#define _IMPRECATE_ITEM // (可开放) ANDY 特殊道具 来吉卡 +#define _MAGICPET_SKILL // (可开放) ANDY 魔法宠技能 +#define _ITEM_CHECKWARES // (可开放) ANDY 锁定传送不能 +#define _NPC_REPLACEMENT // (可开放) ANDY 置换战斗npc +#define _EMENY_CHANCEMAN // (可开放) ANDY EMENY 选择 +#define _TYPE_TOXICATION // (可开放) ANDY 中毒无法回血 +#define _PET_FUSION // (可开放) ANDY 宠物融合 enemybase1.txt +#define _NPC_FUSION // (可开放) ANDY NPC宠物融合 +#define _ITEM_EDITBASES // (可开放) ANDY 营养剂 +#define _PET_EVOLUTION // (可开放) ANDY 进化表 + +// ------------------------------------------------------------------- +// 新功能:5.0追加部分 人员: +#define _AVID_TRADETRYBUG // (可开放) ANDY 防止交易中丢宠/道具 寄(宠物)邮件 石币 +#define _ASSESS_SYSEFFICACY // (可开放) ANDY 评估系统效能 12/04 更新 +#define _ASSESS_SYSEFFICACY_SUB // (可开放) Robin 评估系统效能 增加检查内回圈 +#define _PREVENT_TEAMATTACK // (可开放) ANDY 防止同队互打 12/04 更新 +#define _ITEM_ORNAMENTS // (可开放) ANDY 装饰道具 12/04 更新 //出版部 +#define _CHIKULA_STONE // (可开放) ANDY 奇克拉之石 12/04 更新 //来吉卡 宠包 +#define _SEND_EFFECT // (可开放) WON AC送下雪、下雨等特效 12/04 更新 +#define _PETMAIL_DEFNUMS // (可开放) ANDY 宠物邮件限制 +#define _TEAM_KICKPARTY // (可开放) ANDY 队长踢人(非战斗状态) +#define _PETSKILL_TIMID // (可开放) ANDY 宠技-怯战 +#define _PETS_SELECTCON // (可开放) ANDY 宠物不可点选出战 +#define _CHRISTMAS_REDSOCKS // (可开放) ANDY 圣诞红袜 +#define _FIX_ARRAYBUG // (可开放) ANDY 修正array 溢位 +#define _USER_CHARLOOPS // (可开放) ANDY 新用物件LOOP +#define _BATTLE_PROPERTY // (可开放) ANDY 战斗属性特性 +#define _PETSKILL_PROPERTY // (可开放) ANDY 无属魔兽宠技 +#define _ITEM_FIXALLBASE // (可开放) ANDY 修复之石 +#define _ITEM_LOVERPARTY // (可开放) ANDY 情人节道具 +#define _ITEM_FORUSERNAMES // (可开放) ANDY 道具所有人 +#define _BATTLECOMMAND_TIME // (可开放) ANDY 防止玩家开缓速(回合战斗时间) +#define _NPCENEMY_ADDPOWER // (可开放) ANDY 修改怪物的能力值 +//#define _BAD_PLAYER // (不可开) WON 送坏玩家去关 + + +// ------------------------------------------------------------------- +// 新功能:专案6.0 人员: +// +#define _PETSKILL_CANNEDFOOD // (可开放) ANDY 宠物技能罐头 for 6.0 +#define _TEST_DROPITEMS // (可开放) ANDY 测试丢宠 +#define _MAP_WARPPOINT // (可开放) ANDY Map WarpPoint +//#define _AUTO_ADDADDRESS // (可开放) ANDY 自动新增名片 +#define _DEFEND_TIMECHECK // (可开放) ANDY 内部测试时间 +#define _TREASURE_BOX // (可开放) ANDY 宝箱 +#define _BENEMY_EVENTRUN // (可开放) ANDY 战斗npc给道具 +#define _BATTLE_ABDUCTII // (可开放) ANDY 旅途夥伴2 +#define _BATTLE_LIGHTTAKE // (可开放) ANDY 采光术 +#define _BATTLE_ATTCRAZED // (可开放) ANDY 疯狂暴走 +#define _STATUS_WATERWORD // (可开放) ANDY 水世界状态 +#define _ITEM_WATERWORDSTATUS // (可开放) ANDY 水世界状态道具 +//#define _KILL_12_STOP_GMSV // (可开放) WON 下sigusr2後关闭GMSV +//#define _DELBORNPLACE // (可开放) Syu 6.0 统一出生於新手村 +#define _REEDIT_PETBBIS // (可开放) ANDY 修正宠物波比图形 +#define _CAPTURE_FREES // (可开放) ANDY 补抓条件 +#define _THROWITEM_ITEMS // (可开放) 丢掷後有奖品 +#define _OBJSEND_C // (可开放) ANDY _OBJSEND_C +#define _ADD_SHOW_ITEMDAMAGE // (可开放) WON 显示物品耐久度 + +//-------------------------------------------------------------------------- +//专案 7.0 职业系统 人员:彦豪 志旺 旭诚 奇铨 + +#define _CHANGETRADERULE // (可开放) Syu ADD 交易规则修订 +#define _TRADE_SHOWHP // (可开放) Syu ADD 交易显示血量 +#define _SHOOTCHESTNUT // (可开放) Syu ADD 宠技:丢栗子 +#define _SKILLLIMIT // (可开放) Syu ADD 不得攻击我方限制 +#define _TRADESYSTEM2 // (可开放) Syu ADD 新交易系统 +#define _NPC_NOSAVEPOINT // (可开放) ANDY 纪录点不存人物资料 +#define _ACFMPK_LIST // (可开放) ANDY 家族对战列表修正 +#define _PETSKILL2_TXT // (可开放) ANDY petskill2.txt +#define _PETSKILL_CHECKTYPE // (可开放) ANDY 宠物技能使用时机 +#define _PETSKILL_TEAR // (可开放) ANDY 宠技 撕裂伤口 +#define _NPC_MAKEPAIR // (可开放) ANDY NPC 配对 +#define _ITEMSET4_TXT // (可开放) ANDY itemset4.txt +#define _ITEM_PILENUMS // (可开放) ANDY 道具素材堆叠 需 itemset4 +#define _ITEM_PILEFORTRADE // (可开放) ANDY 交易堆叠 +#define _ITEM_EQUITSPACE // (可开放) ANDY 新装备栏位 +#define _PET_LOSTPET // (可开放) ANDY 遗失宠物搜寻计划宠物 +#define _ITEMSET5_TXT // (可开放) ANDY itemset5.txt +#define _ITEMSET6_TXT // (可开放) ANDY itemset6.txt +#define _EQUIT_ARRANGE // (可开放) ANDY 挡格 需要 itemset5.txt +#define _EQUIT_SEQUENCE // (可开放) ANDY 攻击顺序 需要 itemset5.txt +#define _EQUIT_ADDPILE // (可开放) ANDY 增加可堆叠数 需要 itemset5.txt +#define _EQUIT_HITRIGHT // (可开放) ANDY 命中 需要 itemset5.txt +#define _EQUIT_NEGLECTGUARD // (可开放) ANDY 忽视目标防御力% 需要 itemset6.txt +#define _EQUIT_NEWGLOVE // (可开放) ANDY 手套栏位 +#define _FM_JOINLIMIT // (可开放) ANDY 加入家族条件限制 +#define _FIX_MAX_GOLD // (可开放) WON ADD 增加人物金钱上限 +#define _CK_ONLINE_PLAYER_COUNT // (可开放) WON 计算线上人数 (要配合ac,否则会重开) +#define _PET_SKILL_SARS // (可开放) WON ADD 毒煞蔓延 +#define _SONIC_ATTACK // (可开放) WON ADD 音波攻击 +#define _NET_REDUCESEND // (可开放) ANDY 减少DB资料传送 +#define _FEV_ADD_NEW_ITEM // (可开放) Change 增加复活守精 +#define _ALLDOMAN // (可开放) Syu ADD 排行榜NPC +#define _LOCKHELP_OK // (可开放) Syu ADD 锁定不可加入战斗 +#define _TELLCHANNEL // (可开放) Syu ADD 密语频道 +// 新功能:职业 +#define _NEWREQUESTPROTOCOL // (可开放) Syu ADD 新增Protocol要求细项 +#define _OUTOFBATTLESKILL // (可开放) Syu ADD 非战斗时技能Protocol +#define _CHAR_PROFESSION // (可开放) WON ADD 人物职业栏位 +#define _PROFESSION_SKILL // (可开放) WON ADD 人物职业技能 +#define _NPC_WELFARE // (可开放) WON ADD 职业NPC +#define _PROFESSION_FIX_LEVEL // (可开放) WON ADD 修正职业经验值(北京&韩国不必开) +#define _GM_SIGUSR2 // (可开放) Change 下达sigusr2後执行 gm_sigusr_command档案内的GM指令,若没有指令就关闭GMSV +#define _GM_BROADCAST // (可开放) WON ADD 客服公告系统 +#define _NPC_ADDLEVELUP // (可开放) ANDY NPC增加玩家等级 +#define _CHAR_FIXDATADEF // (可开放) ANDY 修正人物资料初始 +//系统改良 +#define _SIMPLIFY_ITEMSTRING // (可开放) ANDY 简化道具字串 +#define _CHAR_NEWLOGOUT // (可开放) ANDY 登出新机制 +#define _CHATROOMPROTOCOL // (可开放) Syu ADD 聊天室频道 8/27 + +#define _CHAR_POOLITEM // (可开放) ANDY 人物道具仓库共用 +#define _NPC_DEPOTITEM // (可开放) ANDY 人物道具仓库共用 + +#define _SIMPLIFY_PETSTRING // (可开放) ANDY 简化宠物存档字串 +#define _SIMPLIFY_ITEMSTRING2 // (可开放) ANDY 简化道具字串2 +#define _WOLF_TAKE_AXE // (可开放) WON ADD 抓双头狼的限制 +#define _FIX_UNNECESSARY // (可开放) ANDY 修正不必要的判断 +#define _ITEM_MAGICRECOVERY // (可开放) ANDY 新光镜守 +//9/17更新 +#define _PETSKILL_GYRATE // (可开放) Change 宠技:回旋攻击 +#define _PETSKILL_ACUPUNCTURE // (可开放) Change 宠技:针刺外皮 (client端的_PETSKILL_ACUPUNCTURE也要开) +#define _PETSKILL_RETRACE // (可开放) Change 宠技:追迹攻击 +#define _PETSKILL_HECTOR // (可开放) Change 宠技:威吓 +//10/13更新 +#define _PETSKILL_FIREKILL // (可开放) Change 宠技:火线猎杀 +#define _PETSKILL_DAMAGETOHP // (可开放) Change 宠技:暗月狂狼(嗜血技的变体) +#define _PETSKILL_BECOMEFOX // (可开放) Change 宠技:媚惑术 +//10/22更新 +// 新功能:修改WORKER(新付费机制) +#define _FIX_MESSAGE // (可开放) WON ADD 修改WORKER封包内容 (北京&韩国不必开) + +//11/12更新 +#define _PETSKILL_SHOWMERCY // (可开) Change 宠技:手下留情 +#define _NPC_ActionFreeCmp // (可开) Change 替NPC参数加入新的比较方式 +//-------------------------------------------------------------------------- + + +//11/26 +#define _NPC_ProfessionTrans // (可开) Change 替职业NPC加入判断转生 +#define _NPC_NewDelPet // (可开) Change 替NPC加入删除宠物(原本就有了,只是用warpman使用时不成功,所以先做一个顶一下) +//#define _MUSEUM // 石器博物馆 Robin 2003/11 + #ifdef _MUSEUM + #define _DELBORNPLACE + #endif +#define _CHANGEGALAXY // (可开) 星系移民 Robin 2003/10 +#define _ALLDOMAN_DEBUG // (可开) Change 修正重启server後排行榜消失bug +//20031217 +#define _CHRISTMAS_REDSOCKS_NEW // (可开) Change 新圣诞红袜 +#define _PETSKILL_COMBINED // (可开) Change 宠技:难得糊涂 [综合魔法(依参数乱数取出魔法)] +//情人节活动 +#define _NPC_ADDWARPMAN1 // (可开放) Change npcgen_warpman增加功能(设定组队人数、设定组队男女人数) +#define _ITEM_QUITPARTY // (可开放) Change 队伍解散时特定道具即会消失 +#define _ITEM_ADDEQUIPEXP // (可开) Change 装备後经验值增加 +//2004/2/18 +#define _ITEM_LVUPUP // (可开) Change 突破宠物等级限制的药(玄武专用) +//2004/02/25 +#define _PETSKILL_BECOMEPIG // (可开) Change 宠技:乌力化 +#define _ITEM_UNBECOMEPIG // (可开) Change 乌力化的解药 +#define _PET_TALKBBI // (可开) Change 增加判断bbi +#define _ITEM_USEMAGIC // (可开) Change 由道具使用魔法 +//2004/04/07 +#define _ITEM_PROPERTY // (可开) Change 改变四属性道具 +#define _SUIT_ADDENDUM // (可开) Change 替套装增加功能 (_SUIT_ITEM要开) +//2004/05/05 +#define _ITEM_CHECKDROPATLOGOUT // (可开) Change 检查回纪录点时身上有无登出後消失道具,若有,不可回纪录点 +#define _FM_MODIFY // 家族功能修改(开放) +#define _CHANNEL_MODIFY // 频道功能整合(开放) +#define _STANDBYPET // Robin 待机宠封包 +#define _PROSKILL_OPTIMUM // Robin 职业技能处理最佳化 +#define _PETSKILL_OPTIMUM // Robin 宠物技能处理最佳化 +#define _MAGIC_OPTIMUM // Robin Magic table 最佳化 +#define _AC_PIORITY // Nuke 提高AC的优先权(可开) +//2004/05/12 +#define _CHAR_POOLPET // (可开放) Robin 人物宠物仓库共用 +#define _NPC_DEPOTPET // (可开放) Robin 人物宠物仓库共用 +#define _TIMEOUTKICK // (可开) 时段制踢人 Robin 2003/10 +#define _MAGIC_RESIST_EQUIT // (可开) WON ADD 职业抗性装备 +#define _LOG_OTHER // 杂项讯息专用LOG + +//-------------------------------------------------------------------------- +//机动营测试中 + + +// ------------------------------------------------------------------- +//#define _NPC_QUIZSCOPE // (不可开) Change 替NPC增加题号 围参数 +//#define _ITEM_ADDCOMBO // (不可开) Change 装备後合击率增加(战场上要有2个人以上带才有用)未完成... +//#define _NPC_AIRDELITEM // (不可开) Change 搭加美航空时所扣除的道具(就是飞机票啦) +//#define _NPC_AIRLEVEL // (不可开) Change 搭加美航空的最大最等级限制(等级过高不给搭) + +//#define _ANDYLOG_TEST +//#define _NPC_WELFARE_2 // (不可开) WON ADD 职业NPC-2 +//#define _UNIVERSE_CHATROOM // (不可开) ANDY 全星系聊天 +//#define _FIX_ALLDOMAN // (不可开) ANDY 修正英雄战场 +//制作中 +//#define _SEND_PROF_DATA // (不可开) ANDY ADD 传送职业更新给cli +//#define _AUCPROTOCOL // (不可开) Syu ADD 拍卖频道开关Protocol +//#define _NPC_SELLSTH // (不可开) ANDY 拍卖系统 +//#define _NPC_SEPARATEDATA // (不可开) ANDY NPC 资料分离 + +//------------------------------------------------------------------------ +// 以下为冻结功能 +//------------------------------------------------------------------------ +//#define fix_login_event // (不可开) WON 补回伊甸一期的声望 (北京不必开) +//#define _FIX_DEL_MAP // (不可开) WON 玩家抽地图送监狱 +//#define _PETFIGHT // (不可开) 宠物竞技场 +//#define _EXM_RANDITEM // (不可开) NPC (Exchangeman) 乱数要求物品 (已取消) +//#define add_amulet_map // (不可开) WON 增加太阳神首饰的 围 +//#define _ACFMPK_NOFREE // (不可开) ANDY 家族无条件 +//-------------------------------------------------------------------------- +// 6.0追加功能 pile + +//#define _IMPOROVE_ITEMTABLE // (不可开) ANDY 改善ITEM TABLE +//#define _NPC_SHOPALTER01 // (不可开) Change 买卖系统修改(配合Client改为图形介面所做的修改) +#define _GM_IDENTIFY // (不可开) Change 是否秀出GM头顶上识别字串的GM指令 +//#define _GSERVER_RUNTIME // (不可开) Change 传送GSERVER执行多少时间给Mserver (Mserver要配合) +//#define _NPC_VERYWELFARE // (不可开) Change 非常好康A的NPC +//-------------------------------------------------------------------------- +//#define _ADD_NEWEVENT // (不可开) WON 多增任务旗标 +//#define _BLACK_MARKET // (不可开) shan a black market. code:shan +//#define _DYNAMIC_BUILDER_MAP // (不可开) shan (test)dynamic builder on the upper map. code:shan +//#define _TEST_ITEMMEMORY // (不可开) ANDY (测试ITEMTABL) +//#define _LASTERR_FUNCTION // (不可开) ANDY (lastFunction) +//#define _MARKET_TRADE // (不可开) ANDY 交易市集 +//#define _PAUCTION_MAN // (不可开) ANDY +//#define _SKILL_SELFEXPLODE // (不可开) vincent 宠技:自爆(缺图) +//#define _ADD_FAMILY_TAX // (不可开) WON 增加庄园税收 (要配合ac,否则会重开) +//#define _SYUTRY +/* ------------------------------------------------------------------- + * 新功能:PK星系 1121 人员:彦勋,小金 + */ +//#define _PKPETSHOP // (不可开) + +// ------------------------------------------------------------------- +//特殊活动功能 +//#define _CHECK_GAMESPEED // (不可开) ANDY 加速检测 +//#define _NPCSERVER_NEW // (不可开) ANDY NPC 伺服器 +//#define _OBJS_TALKFUN // (不可开) ANDY TALK 搜寻法 +#define _NEWOPEN_MAXEXP // (可开) ANDY MAX经验值 +//#define _MERGE_LOG // (不可开) ANDY 合成 LOG +//#define _CHECK_UCODE // (不可开) ANDY 检查 + +//#define _DEATH_FAMILYCONTEND // (不可开) ANDY 家族战报名 +//#define _NEW_INSERVERPOINT // (不可开) ANDY 登入座标 +//#define _DEATH_CONTENDWATCH // (不可开) ANDY 决斗观看 +//#define _DEATH_CONTENDTEST // (不可开) ANDY 死斗赛程加快 + +//#define _DEATH_FAMILY_GM_COMMAND // (可开) WON ADD 家族战GM指令 +//#define _DEATH_FAMILY_LOGIN_CHECK // (可开) WON ADD 家族战登入检查 +//#define _DEATH_FAMILY_STRUCT // (可开) WON ADD 家族战存放胜负资料 +//#define _DEATH_FAMILY_CANT_SCHEDULE // (可开) WON ADD 家族战玩家不能自行约战 + +//#define _ACTION_BULLSCR // (不可开) ANDY 蛮牛&朱雀 活动功能 (7/30以後才能关闭) +//#define _BULL_FIXPLAYER // (不可开) ANDY 修正人物蛮牛活动功能 +//#define _BULL_CUTBULLSCR // (不可开) ANDY 终止蛮牛活动积分 +//#define _ACTION_GMQUE // (不可开) ANDY GM活动功能 永保留 +//#define _PET_FUSIONSHOWTIME // (不可开) ANDY 宠物蛋秀时间 +//#define _NEW_PLAYERGOLD // (可开放) ANDY 新帐号给钱 +// ------------------------------------------------------------------- +//登入检查动作 + +//#define _FIX_TSKILLCAN // (可开放) ANDY 修正宠物T技罐头 以及 清除T字技(非机暴) +//#define _CHANGEGOATMETAMO // (可开放) Syu 羊年兽更换新图 + +// ------------------------------------------------------------------- +// 新功能:GM密频功能扩充 +//#define _GM_WARP_PLAYER // (不可开) WON 传送玩家 (北京&韩国不必开) +//#define _RECAL_ASK_PLAYER // (不可开) WON 要求人物资料 (北京&韩国不必开) +//#define _RECAL_SEND_COUNT // (不可开) WON 传送GS资讯 (北京&韩国不必开) +//#define _RECAL_SERVER_OFF // (不可开) WON MSERVER 关闭 GS (北京&韩国不必开) + +//#define _ENEMYTEMP_OPTIMUM // Robin EnemyBase table 最佳化 +//#define _ENEMY_OPTIMUM // Robin Enemy table 最佳化 +//#define _CHECK_BATTLETIME // Robin 纪录每一战斗指令时间(测试用) +//#define _CHECK_BATTLE_IO // Robin 纪录战斗封包传送(测试用) + +//复刻版 +//#define _BACK_VERSION //复刻版 +#define _REDHAT_V9 //(可开) Change 在REDHAT9.0的版本下编译时打开 +//#define _UN_FMPOINT // (可开) Change 关掉申请家族据点 +//#define _UN_FMMEMO //(可开)Change 关掉家族之间留言板 +//-------------------------------------------------------------------------- +//专案 7.5 精灵的招唤 人员:彦勋 奇铨 小威 +#define _NPC_EXCHANGEMANTRANS // (可开) Change 替exchangeman加入判断转生 +#define _ANGEL_SUMMON // Robin 天使召唤 + #ifdef _ANGEL_SUMMON + #define _ADD_NEWEVENT + #endif +// Terry define start ------------------------------------------------------------------- +#define _STREET_VENDOR // 摆摊功能(开放) +#define _WATCH_EVENT // 查询任务功能(开放) +#define _NEW_MANOR_LAW // 新庄园规则(开放) +#define _MAP_TIME // 特殊地图,会倒数(开放) +#define _PETSKILL_LER // 雷尔技能(开放) +#define _TEACHER_SYSTEM // 导师系统(开放) +// Terry define end ------------------------------------------------------------------- +#define _FIX_MAGIC_RESIST // (可开) Change 职业魔法抗性 +#define _ADD_DUNGEON // (可开) Change 追加地牢 +#define _PROFESSION_ADDSKILL // (可开) Change 追加职业技能 +#define _ITEM_ADDPETEXP // (可开) Change 增加宠物经验值道具(可吃此道具宠物,平常不可获得经验值) +#define _TRANS_6 // (可开) Change 人物6转 +#define _TRANS_7 // (可开) Change 人物7转 +#define _PET_2TRANS // (可开) Change 宠物2转 +#define _PET_2LIMITLEVEL // (可开) Change 帮助宠物2转的玛蕾 +#define _MAGICSTAUTS_RESIST // (可开) Change (火电冰)抗性精灵 +#define _EQUIT_RESIST // (可开) Change 单一装备抗性(可抗单一功能异常状态)有抗火 雷 冰 虚弱 魔障 沉默 落马 +#define _SUIT_TWFWENDUM // (可开) Change 四属性套装功能 (_SUIT_ITEM要开) +#define _EXCHANGEMAN_REQUEST_DELPET // (可开) Change 替exchangeman的TYPE:REQUEST增加删除宠物 +//#define _75_TEST // (不可开) 7.5测试server +//#define _PK_SERVER //百万pk活动 +//#define _DEATH_CONTEND // (可开) 百万pk活动 ANDY 死斗 +//#define _DEATH_CONTENDAB // (可开) 百万pk活动 ANDY 正式死斗 +//-------------------------------------------------------------------------- + +#define _ESCAPE_RESET // 恶宝逃跑後暂时不可组队 Robin 2004/07/22 +#define _DEL_DROP_GOLD // 删除地上过时的石币 Robin +#define _ITEM_STONE // cyg 奇怪的石头 +#define _HELP_NEWHAND // cyg 新创角色给予新手道具) +#define _DEF_FMFREETIME // cyg GM指令 退出家族时间限制设为0 +#define _DEF_GETYOU // cyg GM指令 查询自己两格 围内的玩家帐号 +#define _DEF_NEWSEND // cyg GM指令 传送玩家时可加句子也可不加 +#define _DEF_SUPERSEND // cyg GM指令 可传送已某帐号为中心附近3格内所有玩家 +#define _SUIT_ADDPART3 // (可开) Change 套装功能第叁弹 回避提高% 沉默抗性提高% 敏提高% 防提高% 攻提高% +#define _PETSKILL_2TIMID // (可开) Change 怯战第二版(狂狮怒吼) +#define CAVALRY_DEBUG // (暂时开) Change 座骑攻击除错中 +#define _SHOW_FUSION // (可开) Change 融合宠物在CLIENT端只显示转生数,修改为融合宠显示为融合(client端也要开) +#define _CONTRACT // (可开) Robin 契约功能 +#define _FONT_SIZE // (可开) Robin 字型大小功能 +#define _PROSK99 // (可开) Change 检查职技等级送白狼 +#define _TIME_TICKET // Robin 限时入场 森林捉宠用 +#define _HALLOWEEN_EFFECT // 万圣节特效 +#define _ADD_STATUS_2 // 新增传送人物状态第二类 +#define _ADD_reITEM // (可开) Change 检查道具栏位空格 +#define _ADD_NOITEM_BATTLE // 新增NPC检查人物身上没道具会进入战斗 +#define _PETSKILL_BATTLE_MODEL // 宠物技能战斗模组 +#define _RACEMAN // cyg 猎宠大会新npc +#define _PETSKILL_ANTINTER // (可开) Change 宠技:蚁之葬 参考_PETSKILL_2TIMID +#define _PETSKILL_REGRET // (可开) Change 宠技:憾甲一击 参考_SONIC_ATTACK +#define _SUIT_ADDPART4 // (可开) Change 套装功能第四弹 中毒攻击% 加强法师魔法(机率30%) 抵抗法师的魔法 + +//#define _CHECK_ENEMY_PET // (不可开) Change 检查玩家是否持有不可当宠物的角色(enemy.txt的petflg栏位为0代表不可拿来当宠物) +//#define _ITEM_TYPETABLE // (不可开) Change 追加typetable +//#define _MERGE_NEW_8 // Robin 8.0版 新合成规则 +//#define _RIGHTCLICK // Robin 滑鼠右键功能 +//#define _JOBDAILY // cyg 任务日志功能 +//#define _ALCHEMIST // Robin 精 功能 +//#define _CHECK_ITEM_MODIFY // 检查异常加强的道具 +//#define _PETSKILL_EXPLODE // (不可开) Change 宠技:爆裂攻击 + +//------------------------------------------------------------------------------------ +#define _ITEM_SETLOVER // 结婚功能 +#define _CREATE_MM_1_2 // 制作极品玛蕾菲雅 +#define _SendTo // 传送到玩家身边 +#define _GET_BATTLE_EXP // 经验设置 +#ifndef _NEW_TESTSERVER + #define _NEW_PLAYER_CF // 新手状态设置 +#endif +#define _USER_EXP_CF // 用户自定义经验 +#define _FM_RIDE_PET // 家族骑宠 +#define _UNLAW_WARP_FLOOR // 禁止传送地区 +#define _UNREG_NEMA // 禁止人物名称 +#endif diff --git a/gmsv/include/version_pk.h b/gmsv/include/version_pk.h new file mode 100644 index 0000000..dd5b101 --- /dev/null +++ b/gmsv/include/version_pk.h @@ -0,0 +1,9 @@ +#ifndef _PKSERVER_VERSION_H_ +#define _PKSERVER_VERSION_H_ + +//#define _PKSEVER_VER // (不可开) 跨星系pk伺服器 + +//赛程 +//排名 +//积分计算 +#endif diff --git a/gmsv/include/vssver.scc b/gmsv/include/vssver.scc new file mode 100644 index 0000000000000000000000000000000000000000..2902d887cbdc13ea4e8d2a79cd8dea725b0c74a3 GIT binary patch literal 685 zcmYL{%PWLY7{=%GxlCU(GOo$yF-aCkjLEe|`pErSB4J@rBvz7ZN~Ec2a_JbCru+l$ zw_G+BN+~JDf>@ZMEUYY@!#iir=IeK!=REKE-uKv|6+`arc>yq1a&_4Y%mHSt2Yea+ zmiP)X&I6%*NAL{iA*GC|#Ix>VEv2B8X~ag~>gnVodN18nxP2;$@od-dw+zGaBGrNON2yZ~*3%KwFx-DeTO z;>oZw{jt4}Ho?M(9bO?%F(Yxeg;iS0fobCLn-lBanaTnUsOjHG-`fG=NY}Fxosms( zY?;`1|2_#M${$P>@nK1_zI#P%K<4RcUagID2%UG;oE>}fc>=L8^CrqXV0mf1(Z)OIvSAhOtF3MSd~3bb7Xj<1zmRwg__`6HLADM!f&*?68Xr;MK2HzY#d#7C72*N!(JOBWF;ECxK1x4-hY8o;!Ft)9 IRpMFx0=<-gTL1t6 literal 0 HcmV?d00001 diff --git a/gmsv/init.c b/gmsv/init.c new file mode 100644 index 0000000..c567215 --- /dev/null +++ b/gmsv/init.c @@ -0,0 +1,723 @@ +#include "version.h" +#include +#include +#include +#include + + +#include "configfile.h" +#include "util.h" +#include "net.h" +#include "msignal.h" +#include "buf.h" +#include "object.h" +#include "char.h" +#include "char_data.h" +#include "item.h" +#include "readmap.h" +#include "function.h" +#include "saacproto_cli.h" +#include "lssproto_serv.h" +#include "readnpc.h" +#include "log.h" +#include "handletime.h" +#include "title.h" +#include "encount.h" +#include "enemy.h" +#include "battle.h" +#include "magic_base.h" +#include "pet_skill.h" +#include "item_gen.h" +#include "petmail.h" +#include "npc_quiz.h" + + +#ifdef _M_SERVER +#include "mclient.h" +#endif + +#ifdef _NPCSERVER_NEW +#include "npcserver.h" +#endif + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 +#include "profession_skill.h" +#endif + +#ifdef _ITEM_QUITPARTY +#include "init.h" +//int itemquitparty_num = 0; +//static DisappearItem *Disappear_Item; +#endif + +#define MESSAGEFILE "hoge.txt" + +#define OPTIONSTRING "d:f:h" +#define usage() print( "Usage: %s ["OPTIONSTRING"]\n", getProgname() ); + +void printUsage( void ) +{ + usage(); + /*print( "Usage: %s ["OPTIONSTRING"]\n", progname );*/ + print( " [-d debuglevel] default value is 0\n" ); + print( " [-f configfilename] default value is setup.cf\n" + ); +} + +/* + * 戊穴件玉仿奶件毛质 允月 + * + * 娄醒 + * argc 侬 及醒 + * argv 侬 及 + * 忒曰袄 + * TRUE(1) 恳橘卅戊穴件玉仿奶件娄醒分匀凶日 + * FALSE(0) 唱橘卅戊穴件玉仿奶件娄醒分匀凶日 + */ +BOOL parseCommandLine( int argc , char** argv ) +{ + int c; /* getopt 匹银丹 */ + extern char* optarg; /* getopt 匹银丹 */ + + + while( ( c = getopt( argc, argv ,OPTIONSTRING )) != -1 ){ + switch( c ){ + case 'd': + { + int debuglevel; + if( !strtolchecknum( optarg, (int*)&debuglevel, 10, + INT)){ + print( "Specify digit number\n" ); + return FALSE; + } + setDebuglevel( debuglevel ); + break; + } + case 'f': + setConfigfilename( optarg ); + break; + case 'h': + printUsage(); + return FALSE; + break; + + default: + printUsage(); + return FALSE; + break; + + } + } + return TRUE; +} + + +/* + * 棕雁 醒毛由□旦允月 + * 娄醒 + * env 棕雁 醒及 + * + * 漆及赭窒手仄卅中 + */ +BOOL parseEnvironment( char** env ) +{ + if( getDebuglevel() >= 3 ){ + int index=0; + while( env[index] != NULL )print( "%s " , env[index++] ); + print( "\n" ); + } + return TRUE; +} + + + + +/*lsgen迕及伐□平件弘田永白央及 五今*/ +#define LSGENWORKINGBUFFER 65536*4 + + + +#define GOTORETURNFALSEIFFALSE(x) if(!(x))goto RETURNFALSE +/* + * 赓渝祭伙□民件 + * 娄醒 + * argc argv及醒 + * argv 戊穴件玉仿奶件娄醒 + * env 棕雁 醒 + * 忒曰袄 + * TRUE(1) 岳 + * FALSE(1) 撩 + */ +BOOL init(int argc , char** argv , char** env ) +{ +#ifdef _ITEM_QUITPARTY + FILE *f; + int i; + char line[256]; +#endif + srand( getpid()); + print( "This Program is compiled at %s %s by gcc %s\n", + __DATE__ , __TIME__ , __VERSION__ ); + + defaultConfig( argv[0] ); + signalset(); + + GOTORETURNFALSEIFFALSE(parseCommandLine( argc , argv )); + GOTORETURNFALSEIFFALSE(parseEnvironment( env )); + + { + Char aho; + debug( sizeof( aho ), d); + debug( sizeof( aho.data ), d); + debug( sizeof( aho.string ), d); + debug( sizeof( aho.flg ),d); + debug( sizeof( aho.indexOfExistItems ), d); + debug( sizeof( aho.haveSkill ), d); + debug( sizeof( aho.indexOfHaveTitle ), d); + debug( sizeof( aho.addressBook ),d); + debug( sizeof( aho.workint ),d); + debug( sizeof( aho.workchar ),d); + } + + print( "配置文件: %s\n" , getConfigfilename() ); + + GOTORETURNFALSEIFFALSE(readconfigfile( getConfigfilename() ) ); + //ttom start + { int iWork = setEncodeKey(); + if( iWork == 0 ){ + // 巨件戊□玉平□毛涩烂 + printf( "----------------------------------------\n" ); + printf( "-------------[编码] 无法设置 %s\n", getConfigfilename() ); + printf( "----------------------------------------\n" ); + exit( 1 ); + }else{ + // 巨件戊□玉平□毛涩烂 + printf( "编码 = %d\n", iWork ); + } + } + // AcWBuff毛涩烂 + { int iWork = setAcWBSize(); + if( iWork == 0 ){ + printf( "----------------------------------------\n" ); + printf( "-------------[AC缓冲] 无法设置 %s\n", getConfigfilename() ); + printf( "----------------------------------------\n" ); + exit( 1 ); + }else{ + printf( "AC缓冲 = %d\n", iWork ); + } + } + //ttom end + + if( getDebuglevel() >= 1 ){ +// print("ServerType: %d\n", getServerType() ); + print("调试等级: %d\n" , getDebuglevel() ); + print("内存单元: %d\n" , getMemoryunit() ); + print("内存单元数量: %d\n" , getMemoryunitnum() ); + + print("账号服务器地址: %s\n" , getAccountservername() ); + print("账号服务器端口: %d\n" , getAccountserverport() ); + print("登陆服务器名称: %s\n", + getGameservername()); + print("登陆服务器密码: %s\n", getAccountserverpasswd()); + + print("等待连接端口: %d\n", getPortnumber() ); + + print("服务端序列号: %d\n", getServernumber() ); + + print("重复地址使用: %d\n", getReuseaddr() ); + + + print("最大在线人数: %d\n", + getFdnum() ); + print("最大在线宠数: %d\n" , getPetcharnum() ); + print("最大其他数目: %d\n" , getOtherscharnum() ); + print("最大对象数目: %d\n", getObjnum() ); + print("最大物品数目: %d\n", getItemnum() ); + print("最大战斗数目: %d\n", getBattlenum() ); +#ifdef _GET_BATTLE_EXP + print("战斗经验倍数: %d\n", getBattleexp() ); +#endif + print("顶层文件目录: %s\n" , getTopdir()); + print("地图文件目录: %s\n" , getMapdir()); + print("地图标识文件: %s\n" , getMaptilefile()); + print("物品配置文件: %s\n" , getItemfile()); + print("不可战斗文件: %s\n" , getInvfile()); + print("显示位置文件: %s\n" , getAppearfile()); + print("遇敌配置文件: %s\n" , getEffectfile()); + print("头衔名称文件: %s\n" , getTitleNamefile()); + print("头衔配置文件: %s\n" , getTitleConfigfile()); + print("遇敌坐标文件: %s\n" , getEncountfile()); + print("遇敌组群文件: %s\n" , getGroupfile()); + print("宠物基本文件: %s\n" , getEnemyBasefile()); + print("创建宠物文件: %s\n" , getEnemyfile()); + print("精灵魔法文件: %s\n" , getMagicfile()); + +#ifdef __ATTACK_MAGIC + print("攻击魔法文件: %s\n" , getAttMagicfileName() ); +#endif + + print("宠物技能文件: %s\n" , getPetskillfile()); + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + print("职业技能文件: %s\n" , getProfession()); +#endif + + print("物品成份文件: %s\n", getItematomfile()); + print("猜迷问题文件: %s\n", getQuizfile()); +#ifdef _BLACK_MARKET + print("地下市场文件: %s\n", getBMItemFile()); +#endif +#ifdef _GMRELOAD + print("G M 配置文件: %s\n", getGMSetfile()); +#endif + print("日志记录文件: %s\n" , getLsgenlogfilename() ); + print("还原资料目录: %s\n" , getStoredir()); + print("NPC 配置目录: %s\n" , getNpcdir()); + print("日志记载文件: %s\n", getLogdir()); + print("日志配置文件: %s\n", getLogconffile() ); + print("GM的指命密码: %s\n", getChatMagicPasswd() ); + print("使用GM的权限: %d\n", getChatMagicCDKeyCheck() ); + + print("NPC 模板数目: %d\n" , getNpctemplatenum() ); + print("NPC 最大数目: %d\n" , getNpccreatenum() ); + + print("走路时间间隔: %d\n" , getWalksendinterval()); + print("清除所有间隔: %d\n" , getCAsendinterval_ms()); + print("清除目标间隔: %d\n" , getCDsendinterval_ms()); + print("执行一次时间: %d\n" , getOnelooptime_ms()); + print("宠物清除时间: %d\n" , getPetdeletetime()); + print("道具清除时间: %d\n" , getItemdeletetime()); +#ifdef _DEL_DROP_GOLD + print("石器清除时间: %d\n" , getGolddeletetime()); +#endif + print("数据保存间隔: %d\n" , getCharSavesendinterval()); + + print("名片最大数目: %d\n",getAddressbookoffmsgnum()); + print("读取频率协议: %d\n",getProtocolreadfrequency()); + + print("连接错误上限: %d\n",getAllowerrornum()); + +#ifdef _M_SERVER + print("GM服务器地址: %s\n",getmservername()); + print("GM服务器端口: %d\n",getmserverport()); +#endif +#ifdef _NPCSERVER_NEW + print("Npc服务器地址: %s\n",getnpcserveraddr()); + print("Npc服务器端口: %d\n",getnpcserverport()); +#endif +#ifdef _NEW_PLAYER_CF + print("出生人物转数: %d\n",getNewplayertrans()); + print("出生人物等级: %d\n",getNewplayerlv()); + print("出生人物金钱: %d\n",getNewplayergivegold()); + print("出生宠物等级: %d\n",getNewplayerpetlv()); + print("出生拥有宠物: NO1:%d NO2:%d NO3:%d NO4:%d NO5:%d\n",getNewplayergivepet(0), + getNewplayergivepet(1), + getNewplayergivepet(2), + getNewplayergivepet(3), + getNewplayergivepet(4)); + print("出生拥有物品: ITEM1:%d ITEM2:%d ITEM3:%d ITEM4:%d ITEM5:%d\n" + "       ITEM1:%d ITEM2:%d ITEM3:%d ITEM4:%d ITEM5:%d\n" + "       ITEM1:%d ITEM2:%d ITEM3:%d ITEM4:%d ITEM5:%d\n" + ,getNewplayergiveitem(0) + ,getNewplayergiveitem(1) + ,getNewplayergiveitem(2) + ,getNewplayergiveitem(3) + ,getNewplayergiveitem(4) + ,getNewplayergiveitem(5) + ,getNewplayergiveitem(6) + ,getNewplayergiveitem(7) + ,getNewplayergiveitem(8) + ,getNewplayergiveitem(9) + ,getNewplayergiveitem(10) + ,getNewplayergiveitem(11) + ,getNewplayergiveitem(12) + ,getNewplayergiveitem(13) + ,getNewplayergiveitem(14)); +#endif +#ifdef _UNLAW_WARP_FLOOR + print("禁止传送地图: FLOOR1:%d FLOOR2:%d FLOOR3:%d FLOOR4:%d FLOOR5:%d\n",getUnlawwarpfloor(0), + getUnlawwarpfloor(1), + getUnlawwarpfloor(2), + getUnlawwarpfloor(3), + getUnlawwarpfloor(4)); +#endif +#ifdef _UNREG_NEMA + print("禁止人物名称: NAME1:%s NAME2:%s NAME3:%s NAME4:%s NAME5:%s\n",getUnregname(0), + getUnregname(1), + getUnregname(2), + getUnregname(3), + getUnregname(4)); +#endif +#ifdef _TRANS_LEVEL_CF + print("人物等级转数: %d\n",getChartrans()); + print("宠物等级转数: %d\n",getPettrans()); +#endif + +#ifdef _LOCK_IP + print("封锁 IP 设置: %s\n",getLockipPath()); +#endif + } + + { //andy_add 2003/05/05 check GameServer Name + char *GameServerName; + GameServerName = getGameserverID(); + if( GameServerName == NULL || strlen( GameServerName) <= 0 ) + return FALSE; + print("\n游戏服务器ID: %s\n", GameServerName ); + } + + print("开始初始化\n" ); + +//#define DEBUG1( arg... ) if( getDebuglevel()>1 ){##arg} + print( "建立内存空间..." ); + GOTORETURNFALSEIFFALSE(configmem( getMemoryunit(), + getMemoryunitnum() ) ); + GOTORETURNFALSEIFFALSE(memInit()); + print( "完成\n" ); + if( !initConnect(getFdnum()) ) + goto MEMEND; + while( 1 ){ + print( "尝试绑定本地端口 %d... " , getPortnumber()); + bindedfd = bindlocalhost( getPortnumber() ); + if( bindedfd == -1 ) + sleep( 10 ); + else + break; + + } + print( "完成\n" ); + print( "建立对象..." ); + if( !initObjectArray( getObjnum()) ) + goto CLOSEBIND; + print( "完成\n" ); + print( "建立人物..." ); + if(!CHAR_initCharArray( getFdnum(), getPetcharnum(),getOtherscharnum()) ) + goto CLOSEBIND; + print( "完成\n" ); + print( "建立物品:%s...", getItemfile()); + if(!ITEM_readItemConfFile( getItemfile()) ) + goto CLOSEBIND; + if(!ITEM_initExistItemsArray( getItemnum() ) ) + goto CLOSEBIND; + print( "完成\n" ); + + print( "建立战斗..." ); + if(!BATTLE_initBattleArray( getBattlenum() ) ) + goto CLOSEBIND; + print( "完成\n" ); + + print( "建立功能模块..." ); + if( !initFunctionTable() ) + goto CLOSEBIND; + print( "完成\n" ); + + print( "初始化邮件..." ); + if( !PETMAIL_initOffmsgBuffer( getAddressbookoffmsgnum() )) + goto CLOSEBIND; + print( "完成\n" ); + + print( "读取不可战斗文件..." ); + if( !CHAR_initInvinciblePlace( getInvfile() ) ) + goto CLOSEBIND; + print( "完成\n" ); + + print( "读取显示位置文件..." ); + if( !CHAR_initAppearPosition( getAppearfile() ) ) + goto CLOSEBIND; + print( "完成\n" ); + + print( "读取头衔名称文件..." ); + if( !TITLE_initTitleName( getTitleNamefile() ) ) + goto CLOSEBIND; + print( "完成\n" ); + + print( "读取头衔配置文件..." ); + if( !TITLE_initTitleConfig( getTitleConfigfile() ) ) + goto CLOSEBIND; + print( "完成\n" ); + + print( "读取遇敌坐标文件..." ); + if( !ENCOUNT_initEncount( getEncountfile() ) ) + goto CLOSEBIND; + print( "完成\n" ); + + print( "读取宠物基本文件..." ); + if( !ENEMYTEMP_initEnemy( getEnemyBasefile() ) ) + goto CLOSEBIND; + print( "完成\n" ); + + print( "读取创建宠物文件..." ); + if( !ENEMY_initEnemy( getEnemyfile() ) ) + goto CLOSEBIND; + print( "完成\n" ); + + print( "读取遇敌组群文件..." ); + if( !GROUP_initGroup( getGroupfile() ) ) + goto CLOSEBIND; + print( "完成\n" ); + print( "读取魔法文件..." ); + if( !MAGIC_initMagic( getMagicfile() ) ) + goto CLOSEBIND; + print( "完成\n" ); + + #ifdef __ATTACK_MAGIC + + print( "读取魔法攻击文件..." ); + + if( !ATTMAGIC_initMagic( getAttMagicfileName() ) ) +// if( !ATTMAGIC_initMagic( getMagicfile() ) ) + goto CLOSEBIND; + + print( "魔法攻击文件 -->%s..." , getAttMagicfileName()); + print( "完成\n" ); + + #endif + + print( "读取宠物技能文件..." ); + if( !PETSKILL_initPetskill( getPetskillfile() ) ) + goto CLOSEBIND; + print( "完成\n" ); + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + print( "读取职业技能文件..." ); + if( !PROFESSION_initSkill( getProfession() ) ){ + goto CLOSEBIND; + } + print( "完成\n" ); +#endif + + /* 失奶 丞及笺 毛 戈 */ + print( "读取物品成份文件..." ); + if( !ITEM_initItemAtom( getItematomfile()) ) + goto CLOSEBIND; + print("完成\n" ); + + print( "初始化物品高速缓冲..." ); + if( !ITEM_initItemIngCache() ) + goto CLOSEBIND; + print("完成\n" ); + + print( "初始化物品名称..." ); + if( !ITEM_initRandTable() ) + goto CLOSEBIND; + print("完成\n" ); + + print( "读取遇敌配置文件..." ); + if( !CHAR_initEffectSetting( getEffectfile() ) ) + goto CLOSEBIND; + print( "完成\n" ); + print( "读取猜迷问题文件..." ); + if( !QUIZ_initQuiz( getQuizfile() ) ) + goto CLOSEBIND; + print( "完成\n" ); + +#ifdef _BLACK_MARKET + print( "地下市场文件..." ); + if ( !LoadBMItem(getBMItemFile()) ) + goto CLOSEBIND; + print( "完成\n" ); +#endif + +#ifdef _GMRELOAD + print( "读取GM配置文件..." ); + if ( !LoadGMSet( getGMSetfile() ) ) + goto CLOSEBIND; + print( "完成\n" ); +#endif + +#ifdef _GMRELOAD + print( "读取经验配置文件..." ); + if ( !LoadEXP( getEXPfile() ) ) + goto CLOSEBIND; + print("最高等级: %d...",getMaxLevel()); + print("一般等级: %d...",getYBLevel()); + print( "完成\n" ); +#endif + +#ifdef _ANGEL_SUMMON + print("读取任务列表文件..."); + if( !LoadMissionList( ) ) + goto CLOSEBIND; + print("完成\n"); +#endif + +#ifdef _CONTRACT + print("读取契约文件..."); + //if( !LoadMissionList( ) ) + // goto CLOSEBIND; + if( !ITEM_initContractTable() ) + goto CLOSEBIND; + print("完成\n"); +#endif + +#ifdef _JOBDAILY + print("读取任务日志文件..."); + if(!LoadJobdailyfile()) + goto CLOSEBIND; + print("完成\n"); +#endif + +#ifdef _RACEMAN + print("读取宠物赛跑文件..."); + if(!LoadRacepetfile()) + goto CLOSEBIND; + print("完成\n"); +#endif + +#ifdef _LOCK_IP + print("读取锁定IP文件..."); + if(!loadLockip( getLockipPath())) + goto CLOSEBIND; + print("完成\n"); +#endif + + print( "建立地图..." ); + if( !MAP_initReadMap( getMaptilefile() , getMapdir() )) + goto CLOSEBIND; + print( "完成\n" ); + print( "读取NPC文件..." ); + if( !NPC_readNPCSettingFiles( getNpcdir(), getNpctemplatenum(), + getNpccreatenum() ) ) + goto CLOSEBIND; + print( "完成\n" ); + print( "初始化 NPC 服务器... " ); + if( lssproto_InitServer( lsrpcClientWriteFunc, LSGENWORKINGBUFFER ) < 0 ) + goto CLOSEBIND; + print( "完成\n" ); + print( "尝试连接账号服务器... " ); + acfd = connectHost( getAccountservername(), getAccountserverport()); + if(acfd == -1) + goto CLOSEBIND; + +/* + { + int errorcode; + int errorcodelen; + int qs; + + errorcodelen = sizeof(errorcode); + qs = getsockopt( acfd, SOL_SOCKET, SO_RCVBUF , &errorcode, &errorcodelen); + //andy_log + print("\n\n GETSOCKOPT SO_RCVBUF: [ %d, %d, %d] \n", qs, errorcode, errorcodelen); + } +*/ + + print( "完成\n" ); + initConnectOne( acfd, NULL , 0 ); + if( !CONNECT_acfdInitRB( acfd)) goto CLOSEAC; + if( !CONNECT_acfdInitWB( acfd)) goto CLOSEAC; + CONNECT_setCtype( acfd, AC ); + + print( "初始化 NPC 客户端 ... " ); + /* rpc(client)及赓渝祭 */ + if( saacproto_InitClient( lsrpcClientWriteFunc,LSGENWORKINGBUFFER, acfd) < 0 ) + goto CLOSEAC; + print( "完成\n" ); + + print( "向账号服务器发送登陆请求... " ); + /* 夫弘奶件邰菲毛请允 */ + saacproto_ACServerLogin_send(acfd, getGameservername(), + getAccountserverpasswd()); + print( "完成\n" ); + + if( isExistFile( getLsgenlogfilename() ) ){ + lssproto_SetServerLogFiles( getLsgenlogfilename(), + getLsgenlogfilename() ); + saacproto_SetClientLogFiles( getLsgenlogfilename(), + getLsgenlogfilename() ); + } + + + print( "初始化已完成\n" ); + +#ifdef _MUSEUM + if( getMuseum() ) + print("\n这是石器博物馆!!\n"); + else + print("\n这是普通星球!!\n"); +#endif + + print( "开始记始日志\n" ); + { + char logconffile[512]; + snprintf( logconffile, sizeof( logconffile), "%s/%s" , + getLogdir(), getLogconffile() ); + if( !initLog( logconffile ) ) + goto CLOSEAC; + } + +#ifdef _M_SERVER + print( "尝试连接GM服务器... " ); + mfd = connectmServer( getmservername(), getmserverport()); + if (mfd ==-1 ){ + print( "连接GM服务器失败... " ); + }else{ + initConnectOne( mfd, NULL , 0 ); + print( "成败连接GM服务器... " ); + } +#endif + +#ifdef _NPCSERVER_NEW + npcfd = connectNpcServer( getnpcserveraddr(), getnpcserverport()); + if( npcfd == -1 ){ + print( "连接NPC服务器失败... " ); + }else{ + initConnectOne( npcfd, NULL , 0 ); + print( "成败连接NPC服务器... " ); + NPCS_NpcSLogin_send( npcfd); + } +#endif + +#ifdef _ITEM_QUITPARTY + print( "读取队伍解散物品消失文件..." ); + + //读取档案 + f = fopen( getitemquitparty(), "r" ); + if( f != NULL ){ + while( fgets( line, sizeof( line ), f ) ){ + if( line[0] == '#' )continue; + if( line[0] == '\n' )continue; + chomp( line ); + itemquitparty_num++; + } + if( fseek( f, 0, SEEK_SET ) == -1 ){ + print( "物品录找错误\n" ); + fclose(f); + goto CLOSEAC; + } + //配记忆体 + Disappear_Item = allocateMemory( sizeof(struct tagDisappearItem) * itemquitparty_num ); + if( Disappear_Item == NULL ){ + print( "无法分配内存 %d\n", sizeof(struct tagDisappearItem) * itemquitparty_num ); + fclose( f ); + goto CLOSEAC; + } + + i = 0; + //将道具编号存入 Disappear_Item.string + while( fgets( line, sizeof( line ), f ) ){ + if( line[0] == '#' )continue; + if( line[0] == '\n' )continue; + chomp( line ); + sprintf( Disappear_Item[i].string,"%s",line ); + print("\n道具编号:%s", Disappear_Item[i].string ); + i++; + } + fclose(f); + } +#endif + + DEBUG_ADJUSTTIME = 0; + print( "\n" ); + return TRUE; + +CLOSEAC: + close( acfd ); +CLOSEBIND: + close( bindedfd ); + endConnect(); +MEMEND: + memEnd(); +RETURNFALSE: + return FALSE; +} diff --git a/gmsv/item/item.c b/gmsv/item/item.c new file mode 100644 index 0000000..86f6d58 --- /dev/null +++ b/gmsv/item/item.c @@ -0,0 +1,2327 @@ +#include "version.h" +#include +#include +#include +#include +#include +#include "common.h" +#include "char.h" +#include "char_data.h" +#include "battle.h" +#include "item.h" +#include "buf.h" +#include "function.h" +#include "magic_base.h" + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 +#include "profession_skill.h" +#endif + +static int ITEM_tblen = 0; +static ITEM_exists* ITEM_item; +static int ITEM_itemnum; +static int ITEM_UseItemnum=0; +static char* ITEM_checkString( char* string ); +static int ITEM_getRandomValue( char* string,int* randomwidth, int num ); +static int ITEM_isstring1or0( char* string,int* randomwidth, int num ); + +#ifdef _IMPOROVE_ITEMTABLE +typedef struct _tag_ITEM_transformList +{ + int Si; + int use; +}sITEM_transformList; +sITEM_transformList *ITEM_TransformList = NULL; +static int defitemtbls=0; +static int totalitemtbls=0; +#endif + +#ifdef _SIMPLIFY_ITEMSTRING +typedef struct ITEM_tag_intDataSetting +{ + char* dumpchar; + int defaults; + int table; +}ITEM_intDataSetting; + +typedef struct ITEM_tag_charDataSetting +{ + char* dumpchar; + char* defaults; + int table; +}ITEM_charDataSetting; + +static ITEM_intDataSetting ITEM_setintdata[]={ + {"id", 0, ITEM_ID }, + {"bi", 0, ITEM_BASEIMAGENUMBER }, + {"cs", 0, ITEM_COST }, + {"ep", ITEM_OTHER, ITEM_TYPE }, + {"ft", 0, ITEM_ABLEUSEFIELD }, + {"tg", 0, ITEM_TARGET }, + {"lv", 0, ITEM_LEVEL }, +#ifdef _ITEM_MAXUSERNUM + {"dib", -1, ITEM_DAMAGEBREAK }, +#endif +#ifdef _ITEMSET4_TXT + {"upin", 1, ITEM_USEPILENUMS }, + {"canpile", 0, ITEM_CANBEPILE }, + {"nestr", 0, ITEM_NEEDSTR }, + {"nedex", 0, ITEM_NEEDDEX }, + {"netra", 0, ITEM_NEEDTRANS }, + {"neprof", 0, ITEM_NEEDPROFESSION }, +#endif +#ifdef _TAKE_ITEMDAMAGE + {"dmce", 0, ITEM_DAMAGECRUSHE }, + {"mdmce", 0, ITEM_MAXDAMAGECRUSHE }, +#endif +#ifdef _ADD_DEAMGEDEFC + {"otdmag", 0, ITEM_OTHERDAMAGE }, + {"otdefc", 0, ITEM_OTHERDEFC }, +#endif +#ifdef _SUIT_ITEM + {"nsuit", 0, ITEM_SUITCODE }, +#endif + {"ann", 0, ITEM_ATTACKNUM_MIN }, + {"anx", 0, ITEM_ATTACKNUM_MAX }, + {"ma", 0, ITEM_MODIFYATTACK }, + {"md", 0, ITEM_MODIFYDEFENCE }, + + {"mh", 0, ITEM_MODIFYQUICK}, //ITEM_MODIFYHP }, ITEM_MODIFYQUICK + {"mm", 0, ITEM_MODIFYHP}, //ITEM_MODIFYMP }, ITEM_MODIFYHP + {"mq", 0, ITEM_MODIFYMP}, //ITEM_MODIFYQUICK }, ITEM_MODIFYMP + {"ml", 0, ITEM_MODIFYLUCK }, + {"mc", 0, ITEM_MODIFYCHARM }, + {"mv", 0, ITEM_MODIFYAVOID }, + {"mat", 0, ITEM_MODIFYATTRIB }, + {"mav", 0, ITEM_MODIFYATTRIBVALUE }, + {"mid", -1, ITEM_MAGICID }, + {"mpr", 0, ITEM_MAGICPROB }, + {"mu", 0, ITEM_MAGICUSEMP }, +#ifdef _ITEMSET5_TXT + {"arr", 0, ITEM_MODIFYARRANGE }, + {"seqce", 0, ITEM_MODIFYSEQUENCE }, + {"iapi", 0, ITEM_ATTACHPILE }, + {"hirt", 0, ITEM_HITRIGHT }, +#endif + +#ifdef _ITEMSET6_TXT + {"neguard", 0, ITEM_NEGLECTGUARD}, +#endif + {"mrf", 0, ITEM_MERGEFLG}, + +}; + +static ITEM_charDataSetting ITEM_setchardata[]={ + {"na", "", ITEM_NAME }, /* ITEM_NAME */ + {"sn", "", ITEM_SECRETNAME }, /* ITEM_SCRETNAME */ + {"en", "", ITEM_EFFECTSTRING }, /* ITEM_EFFECTSTRING */ + {"ar", "", ITEM_ARGUMENT }, /* ITEM_ARGUMENT */ +#ifdef _ITEM_INSLAY + {"acode", "", ITEM_TYPECODE }, /*ITEM_TYPECODE,*/ + {"inlaycode", "", ITEM_INLAYCODE}, /*ITEM_INLAYCODE,*/ +#endif + {"cdk", "", ITEM_CDKEY }, /* ITEM_CDKEY */ +#ifdef _ITEM_FORUSERNAMES + {"forname", "", ITEM_FORUSERNAME }, //ITEM_FORUSERNAME, + {"forcdkey", "", ITEM_FORUSERCDKEY }, //ITEM_FORUSERCDKEY +#endif + +#ifdef _ANGEL_SUMMON + {"mindex", "", ITEM_ANGELMISSION}, + {"angel", "", ITEM_ANGELINFO}, + {"hero", "", ITEM_HEROINFO}, +#endif + +#ifdef _CONTRACT + {"ctt", "", ITEM_CONTRACTTIME}, + {"cta", "", ITEM_CONTRACTARG}, +#endif + +#ifdef _UNIQUE_P_I + {"ucode", "", ITEM_UNIQUECODE}, /* ITEM_UNIQUECODE */ +#endif +}; + +static ITEM_charDataSetting ITEM_setmemdata={ + "", "", -1 /* ITEM_MEMO */ +}; + + +#else +typedef struct ITEM_tag_intDataSetting +{ + char* dumpchar; + int defaults; +}ITEM_intDataSetting; + +typedef struct ITEM_tag_charDataSetting +{ + char* dumpchar; + char* defaults; +}ITEM_charDataSetting; + +static ITEM_intDataSetting ITEM_setintdata[ITEM_DATAINTNUM]={ + {"id", 0}, /* ITEM_ID */ + {"bi", 0}, /* ITEM_ITEMBASEIMAGENUMBER */ + {"cs", 0}, /* ITEM_COST */ + {"ep", ITEM_OTHER}, /* ITEM_TYPE */ + {"ft", 0}, /* ITEM_ABLEUSEFIELD */ + {"tg", 0}, /* ITEM_TARGET */ + {"lv", 0}, /* ITEM_LEVEL */ + +#ifdef _ITEM_MAXUSERNUM + {"dib", -1}, /*ITEM_DAMAGEBREAK*/ +#endif + +#ifdef _ITEMSET4_TXT + {"upin", 1}, //ITEM_USEPILENUMS, + {"canpile", 0}, //ITEM_CANBEPILE + {"nestr", 0}, //ITEM_NEEDSTR, + {"nedex", 0}, //ITEM_NEEDDEX, + {"netra", 0}, //ITEM_NEEDTRANS, + {"neprof", 0}, //ITEM_NEEDPROFESSION, +#endif + +#ifdef _TAKE_ITEMDAMAGE + {"dmce", 0}, /*ITEM_DAMAGECRUSHE*/ + {"mdmce",0}, //ITEM_MAXDAMAGECRUSHE +#endif + +#ifdef _ADD_DEAMGEDEFC + {"otdmag", 0}, //ITEM_OTHERDAMAGE, + {"otdefc", 0}, //ITEM_OTHERDEFC, +#endif + +#ifdef _SUIT_ITEM + {"nsuit", 0}, //ITEM_SUITCODE, +#endif + {"ann", 0}, /* ITEM_ATTACKNUM_MIN */ + {"anx", 0}, /* ITEM_ATTACKNUM_MAX */ + {"ma", 0}, /* ITEM_MODIFYATTACK */ + {"md", 0}, /* ITEM_MODIFYDEFENCE */ + {"mh", 0}, /* ITEM_MODIFYHP */ + {"mm", 0}, /* ITEM_MODIFYMP */ + + {"mq", 0}, /* ITEM_MODIFYQUICK */ + + {"ml", 0}, /* ITEM_MODIFYLUCK */ + {"mc", 0}, /* ITEM_MODIFYCHARM */ + {"mv", 0}, /* ITEM_MODIFYAVOID */ + {"mat", 0}, /* ITEM_MODIFYATTRIB */ + {"mav", 0}, /* ITEM_MODIFYATTRIBVALUE */ + + {"mid", -1}, /* ITEM_MAGICID */ + {"mpr", 0}, /* ITEM_MAGICPROB */ + {"mu", 0}, /* ITEM_MAGICUSEMP */ +#ifdef _ITEMSET5_TXT + {"arr", 0}, /*ITEM_MODIFYARRANGE*/ + {"seqce", 0}, //ITEM_MODIFYSEQUENCE, + {"iapi", 0}, //ITEM_ATTACHPILE + {"hirt", 0}, //ITEM_HITRIGHT //额外命中 +#endif + +#ifdef _ITEMSET6_TXT + {"neguard", 0}, //ITEM_NEGLECTGUARD +// {"bemerge", 0}, //ITEM_BEMERGE +#endif + {"mpo", 0}, /* ITEM_POISON */ + {"mpa", 0}, /* ITEM_PARALYSIS */ + {"msl", 0}, /* ITEM_SLEEP */ + {"mst", 0}, /* ITEM_STONE */ + {"mdr", 0}, /* ITEM_DRUNK */ + {"mco", 0}, /* ITEM_CONFUSION */ + + {"mcr", 0}, /* ITEM_CRITICAL */ + + {"ua", -1}, /* ITEM_USEACTION */ + {"drlo",FALSE}, /* ITEM_DROPATLOGOUT */ + {"valo",FALSE}, /* ITEM_VANISHATLOGOUT */ + {"ioed",TRUE}, /* ITEM_ISOVERED */ + {"cpm", TRUE}, /* ITEM_CANPETMAIL */ + {"cmf", TRUE}, /* ITEM_CANMERGEFROM */ + {"cmt", TRUE}, /* ITEM_CANMERGETO */ + + {"ingv0",0}, /* ITEM_INGVALUE0 */ + {"ingv1",0}, + {"ingv2",0}, + {"ingv3",0}, + {"ingv4",0}, + + {"ipt", 0}, /* ITEM_PUTTIME */ + {"ll", 0}, /* ITEM_LEAKLEVEL */ + {"mrf", 0}, /* ITEM_MERGEFLG */ + {"clv", 0}, /* ITEM_CRUSHLEVEL */ + + {"v1", 0}, /* ITEM_VAR1 */ + {"v2", 0}, /* ITEM_VAR2 */ + {"v3", 0}, /* ITEM_VAR3 */ + {"v4", 0}, /* ITEM_VAR4 */ +}; + +static ITEM_charDataSetting ITEM_setchardata[ITEM_DATACHARNUM]={ + {"na", ""}, /* ITEM_NAME */ + {"sn", ""}, /* ITEM_SCRETNAME */ + {"en", ""}, /* ITEM_EFFECTSTRING */ + {"ar", ""}, /* ITEM_ARGUMENT */ +#ifdef _ITEM_INSLAY + {"acode", ""}, /*ITEM_TYPECODE,*/ + {"inlaycode", ""}, /*ITEM_INLAYCODE,*/ +#endif + {"cdk", ""}, /* ITEM_CDKEY */ +#ifdef _ITEM_FORUSERNAMES + {"forname", ""}, //ITEM_FORUSERNAME, + {"forcdkey", ""}, //ITEM_FORUSERCDKEY +#endif +// CoolFish: 2001/10/11 +#ifdef _UNIQUE_P_I + {"ucode", ""}, /* ITEM_UNIQUECODE */ +#endif + {"ingn0", ""}, /* ITEM_INGNAME0 */ + {"ingn1", ""}, + {"ingn2", ""}, + {"ingn3", ""}, + {"ingn4", ""}, + + {"inif", ""}, /* ITEM_PREOVERFUNC */ + {"preof", ""}, /* ITEM_PREOVERFUNC */ + {"posof", ""}, /* ITEM_POSTOVERFUNC */ + {"wf", "ITEM_DeleteTimeWatched"}, /* ITEM_WATCHFUNC */ + {"usef", ""}, /* ITEM_USEFUNC */ + {"atchf", ""}, /* ITEM_ATTACH */ + {"dtchf", ""}, /* ITEM_DETACH */ + {"attaf", ""}, /* ITEM_ATTACKFUNC */ + {"pickupf", ""}, /* ITEM_PICKUPFUNC */ +#ifdef _Item_ReLifeAct + {"relifes", ""}, /*ITEM_DIERELIFEFUNC*/ +#endif + +}; + +static ITEM_charDataSetting ITEM_setmemdata={ + "", "" /* ITEM_MEMO */ +}; +#endif + +typedef enum +{ + ITEM_INTENTRY=0, + ITEM_CHARENTRY=1, + ITEM_INTFUNC=2, + ITEM_CHARFUNC=3, +}ITEM_DATATYPECATEGORY; + +static struct ITEM_itemconfentry +{ + char* entryname; + ITEM_DATATYPECATEGORY type; + int index; + void* func; +}ITEM_itemconfentries[]={ + {"name", ITEM_CHARFUNC, ITEM_NAME, ITEM_checkString}, + {"secretname", ITEM_CHARFUNC, ITEM_SECRETNAME, ITEM_checkString}, + {"effectstring",ITEM_CHARFUNC, ITEM_EFFECTSTRING, ITEM_checkString}, + {"argument", ITEM_CHARENTRY, ITEM_ARGUMENT, NULL}, +#ifdef _ITEM_INSLAY + {"acode", ITEM_CHARENTRY, ITEM_TYPECODE, NULL}, + {"inlaycode", ITEM_CHARENTRY, ITEM_INLAYCODE, NULL}, +#endif + {"initfunc", ITEM_CHARENTRY, ITEM_INITFUNC, NULL}, + {"preoverfunc", ITEM_CHARENTRY, ITEM_PREOVERFUNC, NULL}, + {"postoverfunc",ITEM_CHARENTRY, ITEM_POSTOVERFUNC, NULL}, + {"watchfunc", ITEM_CHARENTRY, ITEM_WATCHFUNC, NULL}, + {"usefunc", ITEM_CHARENTRY, ITEM_USEFUNC, NULL}, + {"attachfunc", ITEM_CHARENTRY, ITEM_ATTACHFUNC, NULL}, + {"detachfunc", ITEM_CHARENTRY, ITEM_DETACHFUNC, NULL}, + {"dropfunc", ITEM_CHARENTRY, ITEM_DROPFUNC, NULL}, + {"pickupfunc", ITEM_CHARENTRY, ITEM_PICKUPFUNC, NULL}, +#ifdef _Item_ReLifeAct + {"relifefunc", ITEM_CHARENTRY, ITEM_DIERELIFEFUNC, NULL}, +#endif + {"id", ITEM_INTENTRY, ITEM_ID, NULL}, + {"imagenumber", ITEM_INTENTRY, ITEM_BASEIMAGENUMBER, NULL}, + {"cost", ITEM_INTENTRY, ITEM_COST, NULL}, + {"type", ITEM_INTENTRY, ITEM_TYPE, NULL}, + {"fieldtype", ITEM_INTENTRY, ITEM_ABLEUSEFIELD, NULL}, + {"target", ITEM_INTENTRY, ITEM_TARGET, NULL}, + + {"level", ITEM_INTENTRY, ITEM_LEVEL, NULL}, +#ifdef _ITEM_MAXUSERNUM + {"dambreak", ITEM_INTENTRY, ITEM_DAMAGEBREAK, NULL}, +#endif + +#ifdef _ITEMSET4_TXT + {"upinums", ITEM_INTENTRY, ITEM_USEPILENUMS, NULL}, + {"campile", ITEM_INTENTRY, ITEM_CANBEPILE, NULL}, + {"nestr", ITEM_INTENTRY, ITEM_NEEDSTR, NULL}, + {"nedex", ITEM_INTENTRY, ITEM_NEEDDEX, NULL}, + {"netra", ITEM_INTENTRY, ITEM_NEEDTRANS, NULL}, + {"neprof", ITEM_INTENTRY, ITEM_NEEDPROFESSION, NULL}, +#endif + +#ifdef _TAKE_ITEMDAMAGE + {"damcrushe", ITEM_INTENTRY, ITEM_DAMAGECRUSHE, NULL}, + {"maxdmce", ITEM_INTENTRY, ITEM_MAXDAMAGECRUSHE, NULL}, +#endif + +#ifdef _ADD_DEAMGEDEFC + {"otdmags", ITEM_INTENTRY, ITEM_OTHERDAMAGE, NULL}, + {"otdefcs", ITEM_INTENTRY, ITEM_OTHERDEFC, NULL}, +#endif +#ifdef _SUIT_ITEM + {"nsuit", ITEM_INTENTRY, ITEM_SUITCODE, NULL}, //ITEM_SUITCODE, +#endif + {"attacknum_min",ITEM_INTENTRY, ITEM_ATTACKNUM_MIN, NULL}, + {"attacknum_max",ITEM_INTENTRY, ITEM_ATTACKNUM_MAX, NULL}, + {"attack", ITEM_INTFUNC, ITEM_MODIFYATTACK, ITEM_getRandomValue}, + {"defence", ITEM_INTFUNC, ITEM_MODIFYDEFENCE, ITEM_getRandomValue}, + {"quick", ITEM_INTFUNC, ITEM_MODIFYQUICK, ITEM_getRandomValue}, + + {"hp", ITEM_INTFUNC, ITEM_MODIFYHP, ITEM_getRandomValue}, + {"mp", ITEM_INTFUNC, ITEM_MODIFYMP, ITEM_getRandomValue}, + {"luck", ITEM_INTFUNC, ITEM_MODIFYLUCK, ITEM_getRandomValue}, + {"charm", ITEM_INTFUNC, ITEM_MODIFYCHARM, ITEM_getRandomValue}, + {"avoid", ITEM_INTFUNC, ITEM_MODIFYAVOID, ITEM_getRandomValue}, + {"attrib", ITEM_INTENTRY, ITEM_MODIFYATTRIB, NULL}, + {"attribvalue", ITEM_INTENTRY, ITEM_MODIFYATTRIBVALUE,NULL}, + + {"magicid", ITEM_INTENTRY, ITEM_MAGICID, NULL}, + {"magicprob", ITEM_INTENTRY, ITEM_MAGICPROB, NULL}, + {"magicusemp", ITEM_INTENTRY, ITEM_MAGICUSEMP, NULL}, +#ifdef _ITEMSET5_TXT + {"arr", ITEM_INTENTRY, ITEM_MODIFYARRANGE, NULL}, + {"seqce", ITEM_INTENTRY, ITEM_MODIFYSEQUENCE, NULL}, + {"iapi", ITEM_INTENTRY, ITEM_ATTACHPILE, NULL}, + {"hirt", ITEM_INTENTRY, ITEM_HITRIGHT, NULL}, +#endif +#ifdef _ITEMSET6_TXT + {"neguard", ITEM_INTENTRY, ITEM_NEGLECTGUARD, NULL}, +// {"bemerge", ITEM_INTENTRY, ITEM_BEMERGE, NULL}, +#endif + {"poison", ITEM_INTFUNC, ITEM_POISON, ITEM_getRandomValue}, + {"paralysis", ITEM_INTFUNC, ITEM_PARALYSIS, ITEM_getRandomValue}, + {"sleep", ITEM_INTFUNC, ITEM_SLEEP, ITEM_getRandomValue}, + {"stone", ITEM_INTFUNC, ITEM_STONE, ITEM_getRandomValue}, + {"drunk", ITEM_INTFUNC, ITEM_DRUNK, ITEM_getRandomValue}, + {"confusion", ITEM_INTFUNC, ITEM_CONFUSION, ITEM_getRandomValue}, + + {"critical", ITEM_INTFUNC, ITEM_CRITICAL, ITEM_getRandomValue}, + + {"useaction", ITEM_INTENTRY, ITEM_USEACTION, NULL}, + + {"dropatlogout",ITEM_INTFUNC, ITEM_DROPATLOGOUT, ITEM_isstring1or0}, + {"vanishatdrop",ITEM_INTFUNC, ITEM_VANISHATDROP, ITEM_isstring1or0}, + {"isovered", ITEM_INTFUNC, ITEM_ISOVERED, ITEM_isstring1or0}, + {"canpetmail", ITEM_INTFUNC, ITEM_CANPETMAIL, ITEM_isstring1or0}, + {"canmergefrom",ITEM_INTFUNC, ITEM_CANMERGEFROM, ITEM_isstring1or0}, + {"canmergeto", ITEM_INTFUNC, ITEM_CANMERGETO, ITEM_isstring1or0}, + + {"ingname0", ITEM_CHARENTRY, ITEM_INGNAME0, NULL}, + {"ingvalue0", ITEM_INTENTRY, ITEM_INGVALUE0, NULL}, + {"ingname1", ITEM_CHARENTRY, ITEM_INGNAME1, NULL}, + {"ingvalue1", ITEM_INTENTRY, ITEM_INGVALUE1, NULL}, + {"ingname2", ITEM_CHARENTRY, ITEM_INGNAME2, NULL}, + {"ingvalue2", ITEM_INTENTRY, ITEM_INGVALUE2, NULL}, + {"ingname3", ITEM_CHARENTRY, ITEM_INGNAME3, NULL}, + {"ingvalue3", ITEM_INTENTRY, ITEM_INGVALUE3, NULL}, + {"ingname4", ITEM_CHARENTRY, ITEM_INGNAME4, NULL}, + {"ingvalue4", ITEM_INTENTRY, ITEM_INGVALUE4, NULL}, +}; + + +#ifdef _ITEMTBL_STAIC +ITEM_table ITEM_tbl[28000]; +#else +ITEM_table* ITEM_tbl=NULL; +#endif + +static INLINE BOOL ITEM_CHECKARRAYINDEX(int index) +{ + if( ITEM_itemnum<=(index) || (index)<0 )return FALSE; + return TRUE; +} + +INLINE BOOL _ITEM_CHECKINDEX( char *file, int line, int index) +{ + if( !ITEM_CHECKARRAYINDEX(index) ) { + if( index != -1 ) { + print( "err %s:%d \n", file, line); + } + return FALSE; + } + if( ITEM_item[index].use == FALSE ) { + return FALSE; + } + return TRUE; +} + +static INLINE int ITEM_CHECKINTDATAINDEX(int index) +{ + if( ITEM_DATAINTNUM <= index || index < 0 )return FALSE; + return TRUE; +} + +static INLINE int ITEM_CHECKCHARDATAINDEX(int index) +{ + if( ITEM_DATACHARNUM<=index || index<0 )return FALSE; + return TRUE; +} + +BOOL ITEM_initExistItemsArray( int num ) +{ + int i; + + BOOL ITEM_checksetdata( void ); + if( ITEM_checksetdata() == FALSE )return FALSE; + + ITEM_itemnum = num; + + ITEM_item = allocateMemory( sizeof( ITEM_exists ) * num ); + if( ITEM_item == NULL ) return FALSE; + + for( i = 0 ; i < num ; i ++ ){ + memset( &ITEM_item[i], 0 , sizeof( ITEM_exists )); + ITEM_item[i].use = FALSE; + } + + return TRUE; +} + +BOOL ITEM_endExistItemsArray( void ) +{ + freeMemory( ITEM_item ); + return TRUE; +} + +int _ITEM_initExistItemsOne( char *file, int line, ITEM_Item* itm ) +{ + int i; + int itemID=-1; + static int Sindex=1; + itemID = itm->data[ITEM_ID]; + if( ITEM_CHECKITEMTABLE(itm->data[ITEM_ID] ) == FALSE){ + print("CHAR itemData err Item_id:%d=%s%d!!\n", itm->data[ITEM_ID], file, line); + return -1; + } + for( i = 0 ; i < ITEM_itemnum ; i ++ ) { + Sindex++; + if( Sindex >= ITEM_itemnum ) Sindex = 1; + if( Sindex < 1 ) Sindex = 1; + if( !ITEM_item[Sindex].use){ + int charaindex; + charaindex = ITEM_item[Sindex].itm.workint[ITEM_WORKCHARAINDEX]; + if( CHAR_CHECKINDEX( charaindex) && + CHAR_getInt( charaindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER ) { + int j; + for( j = 0; j < CHAR_MAXITEMHAVE; j ++ ) { + if( CHAR_getItemIndex( charaindex, j) == Sindex) { + print( "item.c: error! chara have this item charaindex[%d] " + "itemindex[%d] Name(%s)POS(%d)NAME(%s)\n", + charaindex, Sindex, + CHAR_getUseName( charaindex ), j, + ITEM_item[Sindex].itm.string[ITEM_NAME].string ); + print( "from %s:%d\n", file, line); + ITEM_item[Sindex].use = TRUE; + break; + } + } + if( j != CHAR_MAXITEMHAVE ) continue; + } + memcpy( &ITEM_item[Sindex].itm , itm , sizeof( ITEM_Item ) ); + ITEM_item[Sindex].use = TRUE; + { + BOOL (*initfunc)(ITEM_Item*)=NULL; + initfunc = (BOOL(*)(ITEM_Item*)) getFunctionPointerFromName( itm->string[ITEM_INITFUNC].string ); + if( initfunc ){ + if( initfunc( &ITEM_item[Sindex].itm ) == FALSE ){ + ITEM_item[Sindex].use = FALSE; + fprint( "Error:Can't init item\n" ); + return -1; + } + } + } + ITEM_UseItemnum++; + ITEM_constructFunctable( Sindex); + return Sindex; + } + } + fprint( "错误:物品已满\n" ); + return -1; +} + +void _ITEM_endExistItemsOne( int index , char *file, int line) +{ + int i,j; + int hitcnt = 0; + int playernum = CHAR_getPlayerMaxNum(); + + if( !ITEM_CHECKINDEX(index)) return; + + for( i = 0; i < playernum; i ++ ) { + if( CHAR_CHECKINDEX( i)) { + for( j = 0; j < CHAR_MAXITEMHAVE; j ++ ) { + if( CHAR_getItemIndex( i, j) == index) { + print( "warning !! player have this item:%d call from [%s:%d](%s)(%s)\n", + index, file,line, CHAR_getUseName(i),ITEM_item[index].itm.string[ITEM_NAME].string ); + hitcnt ++; + if( hitcnt > 1 ) { + print( "ITEM_INDEX(%d) duplicate!!\n", index); + } + } + } + } + } + + if( hitcnt < 1 ){ + ITEM_item[index].use = FALSE; + ITEM_item[index].itm.workint[ITEM_WORKCHARAINDEX] = -1; + ITEM_UseItemnum--; + } +} + +INLINE int ITEM_getIntStrict( int index ,ITEM_DATAINT element,int* error) +{ + if(!ITEM_CHECKINDEX(index))return *error=FALSE; + if(!ITEM_CHECKINTDATAINDEX(element))return *error=FALSE; + return ITEM_item[index].itm.data[element]; +} + +INLINE int _ITEM_getInt( char *file, int line, int index ,ITEM_DATAINT element) +{ + if(!ITEM_CHECKINDEX(index)){ + return -1; + } + if(!ITEM_CHECKINTDATAINDEX(element)) { + return -1; + } + return ITEM_item[index].itm.data[element]; +} + +INLINE int ITEM_setIntStrict( int index ,ITEM_DATAINT element,int data, + int* error) +{ + int buf; + if(!ITEM_CHECKINDEX(index)) + return *error=FALSE; + if(!ITEM_CHECKINTDATAINDEX(element)) + return *error=FALSE; + buf = ITEM_item[index].itm.data[element]; + ITEM_item[index].itm.data[element] = data; + return buf; +} + +INLINE int _ITEM_setInt( char *file, int line, int index ,ITEM_DATAINT element, int data) +{ + int buf; + if( !ITEM_CHECKINDEX( index) ){ + return -1; + } + + if( !ITEM_CHECKINTDATAINDEX( element) ){ + return -1; + } + + buf = ITEM_item[ index].itm.data[ element]; + ITEM_item[ index].itm.data[ element] = data; + return buf; +} + +INLINE char* ITEM_getChar( int index ,ITEM_DATACHAR element ) +{ + if(!ITEM_CHECKINDEX(index))return NULL; + if(!ITEM_CHECKCHARDATAINDEX(element))return NULL; + return ITEM_item[index].itm.string[element].string; +} + +INLINE BOOL ITEM_setChar( int index ,ITEM_DATACHAR element , char* new) +{ + if(!ITEM_CHECKINDEX(index))return FALSE; + if(!ITEM_CHECKCHARDATAINDEX(element))return FALSE; + strcpysafe( ITEM_item[index].itm.string[element].string, + sizeof( ITEM_item[index].itm.string[element].string ), + new ); + return TRUE; +} + +INLINE int ITEM_getWorkInt( int index ,ITEM_WORKDATAINT element) +{ + if( !ITEM_CHECKINDEX(index) ) return -1; + if( element >= ITEM_WORKDATAINTNUM || element < 0 ) return -1; + return ITEM_item[index].itm.workint[element]; +} + +INLINE int ITEM_setWorkInt( int index ,ITEM_WORKDATAINT element, int data) +{ + int buf; + if( !ITEM_CHECKINDEX( index) ) return -1; + if( element >= ITEM_WORKDATAINTNUM || element < 0 ) return -1; + + buf = ITEM_item[index].itm.workint[element]; + ITEM_item[index].itm.workint[element] = data; + return buf; +} + +INLINE int ITEM_getITEM_itemnum( void ) +{ + return ITEM_itemnum; +} + +INLINE int ITEM_getITEM_UseItemnum( void ) +{ + return ITEM_UseItemnum; +} + + +INLINE BOOL ITEM_getITEM_use( int index ) +{ + if( !ITEM_CHECKINDEX(index))return FALSE; + return ITEM_item[index].use; +} + +void ITEM_constructFunctable( int itemindex ) +{ + int i; + if( !ITEM_CHECKINDEX(itemindex))return; + + for( i=ITEM_FIRSTFUNCTION; i < ITEM_LASTFUNCTION ; i++ ) { + ITEM_item[itemindex].itm.functable[i-ITEM_FIRSTFUNCTION] + = getFunctionPointerFromName( ITEM_getChar( itemindex,i ) ); + } +} + +void* ITEM_getFunctionPointer( int itemindex, int functype ) +{ + if( !ITEM_CHECKINDEX(itemindex) )return NULL; + if( functype < ITEM_FIRSTFUNCTION || functype >= ITEM_LASTFUNCTION ){ + print( "类型错误:%d\n", functype); + return NULL; + } + return ITEM_item[itemindex].itm. + functable[functype-ITEM_FIRSTFUNCTION]; +} + +int ITEM_getItemMaxIdNum( void) +{ + return ITEM_tblen; +} + +BOOL ITEM_checksetdata( void ) +{ + int i; + char* strings[ITEM_DATAINTNUM + ITEM_DATACHARNUM + 1]; +#ifdef _SIMPLIFY_ITEMSTRING + int num=0; + for(i = 0; i < arraysizeof( ITEM_setintdata) ; i ++ ) + strings[ num++ ] = ITEM_setintdata[i].dumpchar; + for( i = 0 ; i < arraysizeof( ITEM_setchardata) ; i ++ ) + strings[ num++ ] = ITEM_setchardata[i].dumpchar; + strings[ITEM_DATAINTNUM+ITEM_DATACHARNUM] = ITEM_setmemdata.dumpchar; + + if( ! checkStringsUnique( strings, num,1 ) ){ + fprint( "ITEM_set????data is overlapped.\nIt is not allowed\n"); + return FALSE; + } +#else + for(i = 0; i < ITEM_DATAINTNUM ; i ++ ) + strings[i] = ITEM_setintdata[i].dumpchar; + for( i = 0 ; i < ITEM_DATACHARNUM ; i ++ ) + strings[ITEM_DATAINTNUM+i] = ITEM_setchardata[i].dumpchar; + + + strings[ITEM_DATAINTNUM+ITEM_DATACHARNUM] = ITEM_setmemdata.dumpchar; + + if( ! checkStringsUnique( strings, arraysizeof( strings ),1 ) ){ + fprint( "ITEM_set????data is overlapped.\nIt is not allowed\n"); + return FALSE; + } +#endif + return TRUE; +} + +static char ITEM_dataString[STRINGBUFSIZ]; +char* ITEM_makeStringFromItemIndex( int index, int mode ) +{ + if( 0 <= index && index < ITEM_itemnum && ITEM_item[index].use == TRUE) + ; + else + return NULL; + return ITEM_makeStringFromItemData( &ITEM_item[index].itm, mode ); +} + +#ifdef _SIMPLIFY_ITEMSTRING2 +BOOL CHECK_HaveBeSave( int itemID, int oneNum, int type ) +{ + if( ITEM_ID == type ) return TRUE; + if( ITEMTBL_getInt( itemID, type) == oneNum ) return FALSE; + return TRUE; +} +#endif + +char* ITEM_makeStringFromItemData( ITEM_Item* one, int mode ) +{ + int i; + char delim1 = '\0'; + char delim2 = '\0'; + int strlength=0; + +#ifdef _SIMPLIFY_ITEMSTRING2 + int itemID = one->data[ ITEM_ID]; + if( !ITEM_CHECKITEMTABLE( itemID) ) return NULL; +#endif + if( mode == 0 ) { + delim1 = '='; delim2 = '|'; + }else { + delim1 = ':'; delim2 = ','; + } + +#ifdef _SIMPLIFY_ITEMSTRING + for(i = 0; i < arraysizeof( ITEM_setintdata) ; i ++ ){ + char linedata[128]; +#ifdef _SIMPLIFY_ITEMSTRING2 + if( !CHECK_HaveBeSave( itemID, one->data[ ITEM_setintdata[i].table], ITEM_setintdata[i].table) ) continue; +#endif + snprintf( linedata , sizeof(linedata), + "%s%c%d%c", ITEM_setintdata[i].dumpchar, delim1, + one->data[ ITEM_setintdata[i].table], delim2 ); + strcpysafe( &ITEM_dataString[strlength], sizeof( ITEM_dataString ) - strlength, linedata ); + strlength += strlen( linedata ); + } + + for( i = 0 ; i < arraysizeof( ITEM_setchardata) ; i ++ ){ + char linedata[128]; + char escapebuffer[128]; + if( strlen( one->string[ ITEM_setchardata[i].table].string) == 0 ) continue; + + snprintf( linedata , sizeof(linedata), + "%s%c%s%c", ITEM_setchardata[i].dumpchar,delim1, + makeEscapeString( one->string[ITEM_setchardata[i].table].string, escapebuffer, + sizeof(escapebuffer)), delim2); + strcpysafe( &ITEM_dataString[strlength], sizeof( ITEM_dataString ) - strlength, linedata ); + strlength += strlen( linedata ); + } +#else + for( i = 0 ; i < ITEM_DATAINTNUM ; i ++ ) { + char linedata[128]; + snprintf( linedata , sizeof(linedata), + "%s%c%d%c", ITEM_setintdata[i].dumpchar, delim1, one->data[i], delim2 ); + strcpysafe( &ITEM_dataString[strlength], sizeof( ITEM_dataString ) - strlength, linedata ); + strlength += strlen( linedata ); + } + + for( i = 0 ; i < ITEM_DATACHARNUM ; i ++ ){ + char linedata[128]; + char escapebuffer[128]; + if( strlen( one->string[i].string) != 0 ) { + snprintf( linedata , sizeof(linedata), + "%s%c%s%c", ITEM_setchardata[i].dumpchar,delim1, + makeEscapeString(one->string[i].string,escapebuffer, + sizeof(escapebuffer)), delim2); + strcpysafe( &ITEM_dataString[strlength], sizeof( ITEM_dataString ) - strlength, linedata ); + strlength += strlen( linedata ); + } + } +#endif + dchop( ITEM_dataString, (mode == 0 ) ? "|" : ","); + return ITEM_dataString; +} + +BOOL ITEM_makeExistItemsFromStringToArg( char* src , ITEM_Item* item, int mode ) +{ + int readindex=1; + char delim1[2]; + char delim2[2]; + + if( mode == 0 ) { + strcpy( delim1, "="); + strcpy( delim2, "|"); + } + else { + strcpy( delim1, ":"); + strcpy( delim2, ","); + } +#ifdef _SIMPLIFY_ITEMSTRING + { + + int itemID=-1; + while( 1 ){ + char linebuf[512]; + char firstToken[256]; + char secondToken[256]; + if( getStringFromIndexWithDelim( src ,delim2 , readindex, linebuf, sizeof( linebuf)) == FALSE ) break; + + readindex++; + if( getStringFromIndexWithDelim( linebuf, delim1, 1, firstToken, sizeof( firstToken )) == FALSE )return FALSE; + if( strcmp( firstToken, "id" ) ) continue; + strcpysafe( secondToken , sizeof( secondToken ), linebuf + strlen( firstToken) + strlen( delim1) ); + itemID = atoi( secondToken); + if( !ITEM_CHECKITEMTABLE( itemID) ) return FALSE; + ITEM_getDefaultItemData( itemID, item); + break; + } + readindex =1; + } +#else + ITEM_getDefaultItemSetting(item); +#endif + + while( 1 ){ + BOOL ret; + char linebuf[512]; + + char firstToken[256]; + char secondToken[256]; + int i; + + ret = getStringFromIndexWithDelim( src ,delim2 , readindex,linebuf, sizeof(linebuf) ); + if( ret == FALSE ) + break; + ret = getStringFromIndexWithDelim( linebuf, delim1, 1, firstToken, sizeof( firstToken ) ); + if( ret == FALSE ) return FALSE; + strcpysafe( secondToken , sizeof( secondToken ), + linebuf + strlen(firstToken) + strlen(delim1) ); +#ifdef _SIMPLIFY_ITEMSTRING + for(i = 0; i < arraysizeof( ITEM_setintdata) ; i ++ ){ + if( strcmp( firstToken , ITEM_setintdata[i].dumpchar) ) continue; + item->data[ITEM_setintdata[i].table] = atoi( secondToken ); + goto NEXT; + } + + for(i = 0; i < arraysizeof( ITEM_setchardata) ; i ++ ){ + if( strcmp(firstToken ,ITEM_setchardata[i].dumpchar ) ) continue; + strcpysafe( item->string[ ITEM_setchardata[i].table].string, + sizeof(item->string[ITEM_setchardata[i].table].string), + makeStringFromEscaped(secondToken)); + goto NEXT; + } +#else + for( i = 0 ; i < ITEM_DATAINTNUM ; i ++ ){ + if( strcmp(firstToken ,ITEM_setintdata[i].dumpchar) == 0 ){ + item->data[i] = atoi( secondToken ); + goto NEXT; + } + } + + for( i = 0 ; i < ITEM_DATACHARNUM ; i ++ ){ + if( strcmp(firstToken ,ITEM_setchardata[i].dumpchar ) == 0 ){ + strcpysafe( item->string[i].string, + sizeof(item->string[i].string), + makeStringFromEscaped(secondToken)); + goto NEXT; + } + } +#endif + fprint( "??? : %s[%s]\n" , src , firstToken ); + + NEXT: + readindex++; + } + + return TRUE; +} + +void ITEM_getDefaultItemSetting(ITEM_Item* itm) +{ + int i; + memset( itm, 0 , sizeof( ITEM_Item )); +#ifdef _SIMPLIFY_ITEMSTRING + for(i = 0; i < arraysizeof( ITEM_setintdata) ; i ++ ){ + itm->data[ITEM_setintdata[i].table] = ITEM_setintdata[i].defaults; + } + for(i = 0; i < arraysizeof( ITEM_setchardata) ; i ++ ){ + strcpysafe( itm->string[ITEM_setchardata[i].table].string, + sizeof( itm->string[ITEM_setchardata[i].table].string), + ITEM_setchardata[i].defaults); + } +#else + for(i=0;idata[i] = ITEM_setintdata[i].defaults; + for(i=0;istring[i].string, + sizeof(itm->string[i].string), + ITEM_setchardata[i].defaults); +#endif + + strcpysafe( itm->string[ITEM_WATCHFUNC].string, + sizeof(itm->string[ITEM_WATCHFUNC].string), "ITEM_DeleteTimeWatched" ); + + + for(i=0;iworkint[i] = -1; + } + +} + +#ifdef _SIMPLIFY_ITEMSTRING +void ITEM_getDefaultItemData( int itemID, ITEM_Item* itm) +{ + int i; +// memset( itm, 0 , sizeof( ITEM_Item )); + + for(i=0;idata[i] = ITEMTBL_getInt( itemID, i); + } + for(i=0;istring[i].string, sizeof( itm->string[i].string), + ITEMTBL_getChar( itemID, i) ); + } + for(i=0;iworkint[i] = -1; + } + + strcpysafe( itm->string[ITEM_WATCHFUNC].string, sizeof( itm->string[ITEM_WATCHFUNC].string), + "ITEM_DeleteTimeWatched" ); + +} +#endif + +static int ITEM_getRandomValue( char* string,int* randomwidth, int num ) +{ + int minvalue; + int maxvalue; + char token[64]; + int ret; +#if 1 + *randomwidth = 0; + + ret = getStringFromIndexWithDelim( string,",",num -1,token, sizeof( token)); + if( ret == FALSE ) { + return 0; + } + minvalue = atoi( token); + ret = getStringFromIndexWithDelim( string,",",num ,token, sizeof( token)); + if( ret == FALSE ) { + return minvalue; + } + maxvalue = atoi( token); + *randomwidth = ABS( maxvalue - minvalue); + return min( minvalue, maxvalue); + +#else + minvalue = atoi( string ); + startmax = index( string,',' ); + if( startmax != NULL ){ + maxvalue = atoi(startmax+1); + *randomwidth = ABS(maxvalue - minvalue); + return min(minvalue,maxvalue); + } + *randomwidth = 0; + return minvalue; +#endif +} +static int ITEM_isstring1or0( char* string,int* randomwidth, int num ) +{ + char token[64]; + int ret; + + ret = getStringFromIndexWithDelim( string,",",num -1,token, sizeof( token)); + if( ret == FALSE ) { + return FALSE; + } + + return isstring1or0( token); +} + +static char* ITEM_checkString( char* string ) +{ +#define ITEM_STRINGLEN 64 + if( strlen(string) >= ITEM_STRINGLEN ) + print( "Over %d:[%s]\n",ITEM_STRINGLEN ,string ); + return string; +#undef ITEM_STRINGLEN +} + +BOOL ITEM_readItemConfFile( char* filename ) +{ + FILE* f; + char line[512]; + char token[64]; + int linenum=0; + int i; + int maxid=0, itemid; + int ret; + int intdata[ITEM_DATAINTNUM]; + + f = fopen(filename,"r"); + if( f == NULL ){ + print( "不能打开文件\n"); + return FALSE; + } +#ifdef _ITEMSET2_ITEM + +#define ITEM_ID_TOKEN_INDEX 17 + +#else + +#ifdef _ITEM_MAXUSERNUM +#define ITEM_ID_TOKEN_INDEX 15 +#endif + +#endif + while( fgets( line, sizeof( line ), f ) ){ + linenum ++; + if( line[0] == '#' )continue; /* comment */ + if( line[0] == '\n' )continue; /* none */ + chomp( line ); + + ret = getStringFromIndexWithDelim( line, ",", ITEM_ID_TOKEN_INDEX, token, sizeof(token)); + if( ret == FALSE ){ + fprint("文件秩序错误:%s 第:%d行\n",filename,linenum); + continue; + } + itemid = atoi( token); + if( itemid > maxid ){ + maxid = itemid; + } + } + + if( maxid <=0 ) { + print( "最大ID错误\n"); + fclose(f); + return FALSE; + } + + if( fseek( f, 0, SEEK_SET ) == -1 ){ + fprint( "搜索错误\n" ); + fclose(f); + return FALSE; + } +#ifdef _IMPOROVE_ITEMTABLE + ITEM_tblen = linenum+1; + print( "物品数 %d - 大小:%d\n", linenum, sizeof(ITEM_table)); + if( ITEM_TransformList != NULL ) + freeMemory( ITEM_TransformList); + defitemtbls = (maxid+1); + ITEM_TransformList = allocateMemory( sizeof(sITEM_transformList) * defitemtbls ); + for( i = 0 ; i < (maxid+1); i ++ ) { + ITEM_TransformList[i].use = FALSE; + } +#else + print( "物品最大ID %d", maxid); + ITEM_tblen = maxid + 1; +#endif + +#ifdef _ITEMTBL_STAIC + for( i = 0 ; i < 28000 ; i ++ ) { + ITEM_tbl[i].use = FALSE; + } +#else + if( ITEM_tbl != NULL ) + freeMemory( ITEM_tbl); + ITEM_tbl = allocateMemory( sizeof(ITEM_table) * ITEM_tblen ); + + if( ITEM_tbl == NULL ){ + fprint( "无法分配内存 %d\n" , sizeof(ITEM_table)*ITEM_tblen ); + fclose( f ); + return FALSE; + } + for( i = 0 ; i < ITEM_tblen ; i ++ ) { + ITEM_tbl[i].use = FALSE; + } +#endif + linenum = 0; + while( fgets( line, sizeof( line ), f ) ){ + linenum ++; + if( line[0] == '#' )continue; /* comment */ + if( line[0] == '\n' )continue; /* none */ + chomp( line ); + replaceString( line, '\t' , ' ' ); + +{ + char buf[256]; + for( i = 0; i < strlen( line); i ++) { + if( line[i] != ' ' ) { + break; + } + strcpy( buf, &line[i]); + } + if( i != 0 ) { + strcpy( line, buf); + } +} +{ + char token[256]; + int ret; + int readpos = 1; + BOOL dataerror = FALSE; + ITEM_Item itm; + + ITEM_getDefaultItemSetting(&itm); + + for( i=0 ; i< ITEM_DATAINTNUM ; i++ ) { + intdata[i] = 0; + } + itemid = 0; + for( i = 0 ; i < arraysizeof( ITEM_itemconfentries) ; i ++ ){ + ret = getStringFromIndexWithDelim( line,",",readpos,token, sizeof(token)); + if( ret == FALSE ) { +#ifdef _Item_ReLifeAct + { + char buf[256]; + char buf1[256]; + sscanf( line,"%s,%s", buf, buf1); + print("[ITEM data Error] tbl=%d:%s line:%d[%s]\n", + readpos, ITEM_itemconfentries[i].entryname, linenum, line); + } +#else + fprint("Syntax Error tki:%d file:%s line:%d[%s]\n", + i , filename,linenum,line); +#endif + dataerror = TRUE; + break; + } + + if( readpos == ITEM_ID_TOKEN_INDEX ) + itemid = atoi( token); + + readpos ++; + + if( strlen( token ) != 0 ) { + switch(ITEM_itemconfentries[i].type){ + case ITEM_INTENTRY: + itm.data[ITEM_itemconfentries[i].index] = atoi( token ); + break; + case ITEM_CHARENTRY: + strcpysafe( itm.string[ITEM_itemconfentries[i].index].string, + sizeof(itm.string[ITEM_itemconfentries[i].index].string), + token); + break; + case ITEM_INTFUNC: + { + int (*intfunction)(char*,int*, int ); + intfunction = ITEM_itemconfentries[i].func; + itm.data[ITEM_itemconfentries[i].index] + = intfunction(line, + &intdata[ITEM_itemconfentries[i].index],readpos); + if( intfunction == ITEM_getRandomValue) readpos ++; + + } + break; + case ITEM_CHARFUNC: + { + char* (*charfunction)(char* ); + charfunction = ITEM_itemconfentries[i].func; + strcpysafe( itm.string[ITEM_itemconfentries[i].index].string, + sizeof(itm.string[ITEM_itemconfentries[i].index].string), + charfunction( token)); + break; + } + default: + break; + } + } + } + if( !dataerror) { +#ifdef _IMPOROVE_ITEMTABLE + int ListNum = itemid; + itemid = totalitemtbls; +#endif + if( itemid >= ITEM_tblen ){ + print( "ITEM_tbl full:%d err !!\n" , itemid ); + }else if( ITEM_tbl[itemid].use == TRUE ) { + fprint( "Duplicate Itemid %d.ignore\n" , itemid ); + }else{ + if( itm.string[ITEM_SECRETNAME].string[0] == '\0') { + fprint( "ERROR: ID %d item doesn't have secretname\n" + ,itemid ); + memcpy( &itm.string[ITEM_SECRETNAME].string, + &itm.string[ITEM_NAME].string, + sizeof(itm.string[ITEM_NAME].string)); + } +{ + int attacknum_min, attacknum_max; + attacknum_min = itm.data[ITEM_ATTACKNUM_MIN]; + attacknum_max = itm.data[ITEM_ATTACKNUM_MAX]; + if( attacknum_min == 0 ) attacknum_min = attacknum_max; + itm.data[ITEM_ATTACKNUM_MIN] = min( attacknum_min, + attacknum_max); + itm.data[ITEM_ATTACKNUM_MAX] = max( attacknum_min, + attacknum_max); +} + memcpy( &ITEM_tbl[itemid].itm, &itm, sizeof(ITEM_Item)); + ITEM_tbl[itemid].use = TRUE; + + for( i=0 ; i< ITEM_DATAINTNUM ; i++ ){ + ITEM_tbl[itemid].randomdata[i] = intdata[i]; + } +#ifdef _IMPOROVE_ITEMTABLE + + if( ITEM_TransformList[ ListNum].use != 0 ){ + ITEM_tbl[itemid].use = TRUE; + ITEM_TransformList[ ListNum].use = 0; + }else { + ITEM_TransformList[ ListNum].Si = totalitemtbls; + ITEM_TransformList[ ListNum].use = TRUE; + } + totalitemtbls++; +#endif + } + } +} + } + fclose(f); + return TRUE; +} + +CHAR_EquipPlace ITEM_getEquipPlace( int charaindex, int itmid ) +{ + ITEM_CATEGORY cat; + cat = ITEM_getInt( itmid , ITEM_TYPE ); + switch( cat ){ + case ITEM_FIST: + case ITEM_SPEAR: + case ITEM_AXE: + case ITEM_CLUB: +// case ITEM_SHIELD: + case ITEM_BOOMERANG: + case ITEM_BREAKTHROW: + case ITEM_BOUNDTHROW: + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + { + int i=0; + + // 勇士职业技能二刀流 + for( i=0; i 0 ) return -1; +#endif + return CHAR_ARM; + break; + +#ifdef _ITEM_EQUITSPACE + case ITEM_WBELT: + return CHAR_EQBELT; + break; + case ITEM_WSHIELD: + if( BATTLE_GetWepon( charaindex ) != ITEM_BOW ) + return CHAR_EQSHIELD; + break; + case ITEM_WSHOES: + return CHAR_EQSHOES; + break; +#endif + +#ifdef _EQUIT_NEWGLOVE + case ITEM_WGLOVE: + return CHAR_EQGLOVE; + break; +#endif + default: + break; + } + return -1; +} +#define ITEMSTRINGBUFSIZ 512 +static char ITEM_itemStatusStringBuffer[ITEMSTRINGBUFSIZ]; +char* ITEM_makeItemStatusString( int haveitemindex, int itemindex ) +{ + char escapename[256]; + char escapeeffectstring[256]; + char paramshow[256]; + int leaklevel; + int itemcolor = 0; + int flg; + char INGNAME0[4]; + char INGNAME1[4]; + + if( !ITEM_CHECKINDEX(itemindex) ) return NULL; + leaklevel = ITEM_getInt(itemindex,ITEM_LEAKLEVEL); + + //if( leaklevel >= 1 ) // Nuke debug + { + makeEscapeString( ITEM_getChar(itemindex, ITEM_SECRETNAME), + escapename, sizeof(escapename) ); + /*if( leaklevel >= 2 ) + { + static struct Showparamint{ + char* name; + int intindex; + }showparamint[]={ + { "ATK" , ITEM_MODIFYATTACK }, + { "DEF" , ITEM_MODIFYDEFENCE }, + { "HP" , ITEM_MODIFYHP }, + { "MP" , ITEM_MODIFYMP }, + { "QUICK" , ITEM_MODIFYQUICK }, + { "LUCK" , ITEM_MODIFYLUCK }, + { "CHARM" , ITEM_MODIFYCHARM }, + }; + int i; + int stringlen=0; + + paramshow[0] = '\0'; + + for( i = 0 ; i < arraysizeof( showparamint ); i ++ ){ + int value; + char sign; + char tmpbuf[128]; + value = ITEM_getInt(itemindex,showparamint[i].intindex); + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + + + +#endif + + if( value == 0 )continue; + else if( value > 0 ) sign = '+'; + else sign = '-'; + + snprintf( tmpbuf,sizeof( tmpbuf ), "%s%c%d ", + showparamint[i].name,sign,ABS(value) ); + + strcpysafe( paramshow + stringlen , + sizeof(paramshow) - stringlen, tmpbuf ); + stringlen +=strlen(tmpbuf); + if( stringlen >= arraysizeof( paramshow )) + break; + } + dchop( paramshow , " " ); + } + else*/ + paramshow[0] = '\0'; + + } + /*else{ + if(strlen(ITEM_getChar(itemindex,ITEM_SECRETNAME)) > 0){ + makeEscapeString(ITEM_getChar(itemindex,ITEM_SECRETNAME),escapename,sizeof(escapename)); + } + else makeEscapeString( ITEM_getChar(itemindex,ITEM_NAME),escapename,sizeof(escapename)); + paramshow[0] = '\0'; + }*/ + + makeEscapeString( ITEM_getChar( itemindex, ITEM_EFFECTSTRING), + escapeeffectstring, + sizeof(escapeeffectstring)); + itemcolor = CHAR_COLORWHITE; + if( strlen( ITEM_getChar( itemindex, ITEM_CDKEY)) != 0 ) { + itemcolor = CHAR_COLORGREEN; + }else { + if( ITEM_getInt( itemindex, ITEM_MERGEFLG) ) { + itemcolor = CHAR_COLORYELLOW; + } + } + flg = 0; + if( ITEM_getInt( itemindex, ITEM_CANPETMAIL)) { + flg |= 1 << 0; + } + if( ITEM_getInt( itemindex, ITEM_CANMERGEFROM)) { + flg |= 1 << 1; + } + if( ITEM_getInt( itemindex, ITEM_TYPE) == ITEM_DISH ) { + flg |= 1 << 2; + } +#ifdef _ITEM_INSLAY + if( ITEM_getInt( itemindex, ITEM_TYPE) == ITEM_METAL ) { + flg |= 1 << 3; + }else if( ITEM_getInt( itemindex, ITEM_TYPE) == ITEM_JEWEL ) { + flg |= 1 << 4; + } +#endif +#ifdef _PETSKILL_FIXITEM + if( ITEM_getInt( itemindex, ITEM_DAMAGECRUSHE) + != ITEM_getInt( itemindex, ITEM_MAXDAMAGECRUSHE) ){ + flg |= 1 << 5; + } +#endif + +#ifdef _ALCHEMIST + strcpy( INGNAME0, ITEM_getChar( itemindex, ITEM_INGNAME0) ); + strcpy( INGNAME1, ITEM_getChar( itemindex, ITEM_INGNAME1) ); + if( (INGNAME0[0] != NULL && INGNAME1[0] != NULL) || (INGNAME0[0] == NULL) ) { + strcpy( INGNAME0, "杂" ); + } +#endif + + if( haveitemindex == -1 ) { +#ifdef _ADD_SHOW_ITEMDAMAGE // WON ADD 显示物品耐久度 + char buff1[256]; + int crushe = ITEM_getInt( itemindex, ITEM_DAMAGECRUSHE); + int maxcrushe = ITEM_getInt( itemindex, ITEM_MAXDAMAGECRUSHE); + if(crushe < 1) crushe = 1; + if(maxcrushe < 1){ + sprintf(buff1, "不会损坏"); + }else{ + maxcrushe = maxcrushe/1000; + crushe = crushe/1000; + if( maxcrushe <= 0 ) maxcrushe = 1; + snprintf(buff1, sizeof(buff1), "%d%%", (int)((crushe*100)/maxcrushe) ); + } + + snprintf(ITEM_itemStatusStringBuffer, + sizeof( ITEM_itemStatusStringBuffer), +#ifdef _ITEM_PILENUMS +#ifdef _ALCHEMIST + "%s|%s|%d|%s|%d|%d|%d|%d|%d|%s|%d|%s", +#else + "%s|%s|%d|%s|%d|%d|%d|%d|%d|%s|%d", +#endif +#else + "%s|%s|%d|%s|%d|%d|%d|%d|%d|%s", +#endif + escapename, paramshow, + itemcolor, escapeeffectstring , + ITEM_getInt( itemindex, ITEM_BASEIMAGENUMBER), + ITEM_getInt( itemindex, ITEM_ABLEUSEFIELD), + ITEM_getInt( itemindex, ITEM_TARGET), + ITEM_getInt( itemindex, ITEM_LEVEL), + flg, + buff1 +#ifdef _ITEM_PILENUMS + ,ITEM_getInt( itemindex, ITEM_USEPILENUMS) +#ifdef _ALCHEMIST + ,INGNAME0 //,ITEM_getInt( itemindex, ITEM_ALCHEMIST) +#endif +#endif + ); +#else + snprintf(ITEM_itemStatusStringBuffer, + sizeof( ITEM_itemStatusStringBuffer), + "%s|%s|%d|%s|%d|%d|%d|%d|%d", + escapename, paramshow, + itemcolor, escapeeffectstring , + ITEM_getInt( itemindex, ITEM_BASEIMAGENUMBER), + ITEM_getInt( itemindex, ITEM_ABLEUSEFIELD), + ITEM_getInt( itemindex, ITEM_TARGET), + ITEM_getInt( itemindex, ITEM_LEVEL), + flg + ); +#endif + }else { +#ifdef _ADD_SHOW_ITEMDAMAGE // WON ADD 显示物品耐久度 + char buff1[256]; + int crushe = ITEM_getInt( itemindex, ITEM_DAMAGECRUSHE); + int maxcrushe = ITEM_getInt( itemindex, ITEM_MAXDAMAGECRUSHE); + if(crushe < 1) crushe = 1; + if(maxcrushe < 1){ + sprintf(buff1, "不会损坏"); + }else{ + maxcrushe = maxcrushe/1000; + crushe = crushe/1000; + if( maxcrushe <= 0 ) maxcrushe = 1; + snprintf(buff1, sizeof(buff1), "%d%%", (int)((crushe*100)/maxcrushe) ); + } + snprintf(ITEM_itemStatusStringBuffer, sizeof( ITEM_itemStatusStringBuffer), + +#ifdef _ITEM_PILENUMS +#ifdef _ALCHEMIST + "%d|%s|%s|%d|%s|%d|%d|%d|%d|%d|%s|%d|%s", +#else + "%d|%s|%s|%d|%s|%d|%d|%d|%d|%d|%s|%d", +#endif +#else + "%d|%s|%s|%d|%s|%d|%d|%d|%d|%d|%s", +#endif + haveitemindex, + escapename, paramshow, + itemcolor, escapeeffectstring , + ITEM_getInt( itemindex, ITEM_BASEIMAGENUMBER), + ITEM_getInt( itemindex, ITEM_ABLEUSEFIELD), + ITEM_getInt( itemindex, ITEM_TARGET), + ITEM_getInt( itemindex, ITEM_LEVEL), + flg, + buff1 +#ifdef _ITEM_PILENUMS + ,ITEM_getInt( itemindex, ITEM_USEPILENUMS) +#ifdef _ALCHEMIST + ,INGNAME0 //,ITEM_getInt( itemindex, ITEM_ALCHEMIST) +#endif +#endif + ); +#else + snprintf(ITEM_itemStatusStringBuffer, + sizeof( ITEM_itemStatusStringBuffer), + "%d|%s|%s|%d|%s|%d|%d|%d|%d|%d", + haveitemindex, + escapename, paramshow, + itemcolor, escapeeffectstring , + ITEM_getInt( itemindex, ITEM_BASEIMAGENUMBER), + ITEM_getInt( itemindex, ITEM_ABLEUSEFIELD), + ITEM_getInt( itemindex, ITEM_TARGET), + ITEM_getInt( itemindex, ITEM_LEVEL), + flg + ); +#endif + } + + return ITEM_itemStatusStringBuffer; +} + +char* ITEM_makeItemFalseString( void ) +{ + +#ifdef _ADD_SHOW_ITEMDAMAGE // WON ADD 显示物品耐久度 + strcpysafe( ITEM_itemStatusStringBuffer, + sizeof( ITEM_itemStatusStringBuffer), +#ifdef _ITEM_PILENUMS +#ifdef _ALCHEMIST + "|||||||||||" +#else + "||||||||||" +#endif +#else + "|||||||||" +#endif + ); + +#else + strcpysafe( ITEM_itemStatusStringBuffer, + sizeof( ITEM_itemStatusStringBuffer), + "||||||||" ); +#endif + return ITEM_itemStatusStringBuffer; +} + +char* ITEM_makeItemFalseStringWithNum( int haveitemindex ) +{ +#ifdef _ADD_SHOW_ITEMDAMAGE // WON ADD 显示物品耐久度 + snprintf( ITEM_itemStatusStringBuffer, sizeof( ITEM_itemStatusStringBuffer), + +#ifdef _ITEM_PILENUMS +#ifdef _ALCHEMIST + "%d||||||||||||", +#else + "%d|||||||||||", +#endif +#else + "%d||||||||||", +#endif + haveitemindex ); +#else + snprintf( ITEM_itemStatusStringBuffer, sizeof( ITEM_itemStatusStringBuffer), + "%d|||||||||", haveitemindex); +#endif + return ITEM_itemStatusStringBuffer; +} + +BOOL ITEM_makeItem( ITEM_Item* itm, int number ) +{ + int i; +#ifdef _IMPOROVE_ITEMTABLE + int Itemsi; +#endif + if( ITEM_CHECKITEMTABLE(number) == FALSE ){ + print(" Can't makeItem for itemid:%d!!\n", number); + return FALSE; + } +#ifdef _IMPOROVE_ITEMTABLE + Itemsi = ITEM_getSIndexFromTransList( number); + memcpy( itm, &ITEM_tbl[Itemsi].itm , sizeof( ITEM_Item ) ); //new + for( i=0 ; idata[i] = ITEM_tbl[Itemsi].itm.data[i] + randomvalue; //new + } +#else + memcpy( itm, &ITEM_tbl[number].itm , sizeof( ITEM_Item ) ); //new + for( i=0 ; idata[i] = ITEM_tbl[number].itm.data[i] + randomvalue; //new + } +#endif + itm->data[ITEM_LEAKLEVEL] = 1; + return TRUE; +} + +int ITEM_makeItemAndRegist( int number ) +{ + ITEM_Item itm; + memset( &itm, 0, sizeof( itm)); + if( ITEM_makeItem( &itm, number ) == FALSE ) + return -1; + return ITEM_initExistItemsOne( &itm ); +} + +#define EQUIP_FIX_MAX 10000000 +void ITEM_equipEffect( int index ) +{ + int i; + int attribaccum[4] = { 0,0,0,0}; +#ifdef _ANGEL_SUMMON + int angelmode, angelequip =0; +#endif + static struct itmeffectstruct{ + int itemdataintindex; + int charmodifyparamindex; + int accumulation; + int min; + int max; + int type; + }itemEffect[]={ + { ITEM_MODIFYATTACK, CHAR_WORKATTACKPOWER, 0, 0, EQUIP_FIX_MAX, 0}, + { ITEM_MODIFYDEFENCE, CHAR_WORKDEFENCEPOWER, -100, 0, EQUIP_FIX_MAX, 0}, + { ITEM_MODIFYQUICK, CHAR_WORKQUICK, -100, 0, EQUIP_FIX_MAX, 0}, + { ITEM_MODIFYHP, CHAR_WORKMAXHP, 0, 0, EQUIP_FIX_MAX, 0}, + { ITEM_MODIFYMP, CHAR_WORKMAXMP, 0, 0, 1000, 0}, // MP 反100引匹 + + { ITEM_MODIFYLUCK, CHAR_WORKFIXLUCK, 0, 1, 5, 0}, + { ITEM_MODIFYCHARM, CHAR_WORKFIXCHARM, 0, 0, 100, 0}, + { ITEM_MODIFYAVOID, CHAR_WORKFIXAVOID, 0, 0, EQUIP_FIX_MAX, 0}, + { ITEM_POISON, CHAR_WORKMODPOISON, 0, -100, 100, 0}, + { ITEM_PARALYSIS, CHAR_WORKMODPARALYSIS, 0, -100, 100, 0}, + { ITEM_SLEEP, CHAR_WORKMODSLEEP, 0, -100, 100, 0}, + { ITEM_STONE, CHAR_WORKMODSTONE, 0, -100, 100, 0}, + { ITEM_DRUNK, CHAR_WORKMODDRUNK, 0, -100, 100, 0}, + { ITEM_CONFUSION, CHAR_WORKMODCONFUSION, 0, -100, 100, 0}, + { ITEM_CRITICAL, CHAR_WORKMODCRITICAL, 0, -100, 100, 0}, +#ifdef _ADD_DEAMGEDEFC + { ITEM_OTHERDAMAGE, CHAR_WORKOTHERDMAGE, 0, -100, 100, 0}, + { ITEM_OTHERDEFC, CHAR_WORKOTHERDEFC, 0, -100, 100, 0}, +#endif + +#ifdef _ITEMSET5_TXT + { ITEM_MODIFYARRANGE, CHAR_WORKFIXARRANGE, 0, 0, 1000, 0}, + { ITEM_MODIFYSEQUENCE, CHAR_WORKFIXSEQUENCE, 0, 0, 100, 1}, + { ITEM_ATTACHPILE, CHAR_WORKATTACHPILE, 0, 0, 10, 1}, + { ITEM_HITRIGHT, CHAR_WORKHITRIGHT, 0, 0, 40, 1}, +#endif +#ifdef _ITEMSET6_TXT + { ITEM_NEGLECTGUARD, CHAR_WORKNEGLECTGUARD, 0, 0, 30, 1}, +#endif + }; + + for( i = 0 ; i < arraysizeof( itemEffect ); i ++ ) + itemEffect[i].accumulation = 0; + + if( !CHAR_CHECKINDEX(index) )return; + +#ifdef _ANGEL_SUMMON + angelmode = CHAR_getWorkInt( index, CHAR_WORKANGELMODE); +#endif + + for( i = 0 ; i < CHAR_EQUIPPLACENUM ; i ++ ){ + int id = CHAR_getItemIndex(index,i); + if( ITEM_CHECKINDEX(id) ){ + int j; + int attrib = 0; + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + if( i == CHAR_ARM ) + CHAR_sendStatusString( index , "S"); +#endif + + for( j=0; j < arraysizeof( itemEffect ); j ++ ) { +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + + if( i == CHAR_EQSHIELD ){ + int item_type = ITEM_FIST; + item_type = ITEM_getInt( id, ITEM_TYPE ); + + // 当左手装备武器的时候 + if( item_type != ITEM_WSHIELD ){ + int k; + // 勇士职业技能二刀流 + for( k=0; kskill, SKILL_LEVEL); + skill_level = PROFESSION_CHANGE_SKILL_LEVEL_A( skill_level ); + rate = (skill_level * 3 + 20); + value = ITEM_getInt( id, itemEffect[j].itemdataintindex ) * rate / 100; + itemEffect[j].accumulation += value; + } + } + }else + itemEffect[j].accumulation += ITEM_getInt( id, itemEffect[j].itemdataintindex ); + }else +#endif + itemEffect[j].accumulation += ITEM_getInt( id, itemEffect[j].itemdataintindex ); + } + + attrib = ITEM_getInt( id, ITEM_MODIFYATTRIB); + if( attrib > 0 && attrib < 5) { + attribaccum[attrib - 1] += ITEM_getInt( id, ITEM_MODIFYATTRIBVALUE); + } + +#ifdef _ANGEL_SUMMON + //if( !strcmp( ITEM_getChar( id, ITEM_USEFUNC), "ITEM_AngelToken") ) { + if( ITEM_getInt( id, ITEM_ID) == ANGELITEM ) { + //print(" 使者信物装备中 "); + angelequip = TRUE; + } +#endif + + + } + } + +#ifdef _ANGEL_SUMMON + if( angelmode == TRUE && angelequip == FALSE ) { + CHAR_setWorkInt( index, CHAR_WORKANGELMODE, FALSE); + CHAR_sendAngelMark( CHAR_getWorkInt( index, CHAR_WORKOBJINDEX), 0); + print(" 卸下使者信物 "); + } + if( angelmode == FALSE && angelequip == TRUE ) { + CHAR_setWorkInt( index, CHAR_WORKANGELMODE, TRUE); + CHAR_sendAngelMark( CHAR_getWorkInt( index, CHAR_WORKOBJINDEX), 1); + CHAR_talkToCli( index, -1, "你受到了精灵保护,不会被敌人攻击。", CHAR_COLORYELLOW ); + print(" 装备使者信物 "); + } +#endif + +#ifdef _FIX_MAXCHARMP + for(i = 3 ; i < arraysizeof( itemEffect ) ; i ++ ){ +#else + for(i = 5 ; i < arraysizeof( itemEffect ) ; i ++ ){ +#endif + int work=0; + if( itemEffect[i].type == 1 ){ + work = itemEffect[i].accumulation; + }else{ + work = CHAR_getWorkInt(index,itemEffect[i].charmodifyparamindex) + itemEffect[i].accumulation; + work = min( itemEffect[i].max, work ); + work = max( itemEffect[i].min, work ); + } + CHAR_setWorkInt( index, itemEffect[i].charmodifyparamindex, work ); + } + + + for( i = 0; i < 4; i ++ ) { + CHAR_setWorkInt( index, CHAR_WORKFIXEARTHAT + i, + CHAR_getWorkInt( index, CHAR_WORKFIXEARTHAT + i) + + attribaccum[i]); + } + for( i = 0; i < 4; i ++ ) { + int j; + for( j = 0; j < 4; j ++ ) { + if( i != j ) { + CHAR_setWorkInt( index, CHAR_WORKFIXEARTHAT + j, + CHAR_getWorkInt(index, CHAR_WORKFIXEARTHAT + j) - attribaccum[i]); + } + } + } + for( i = 0; i < 4; i ++ ) { + if( CHAR_getWorkInt( index, CHAR_WORKFIXEARTHAT + i) > CHAR_MAXATTRIB) { + CHAR_setWorkInt( index, CHAR_WORKFIXEARTHAT + i, CHAR_MAXATTRIB); + } + } + + { + int work; + work = CHAR_getWorkInt(index,CHAR_WORKFIXSTR)+ itemEffect[0].accumulation; + CHAR_setWorkInt( index, CHAR_WORKFIXSTR, max( 0, work ) ); + work = CHAR_getWorkInt(index,CHAR_WORKFIXTOUGH) + itemEffect[1].accumulation; + CHAR_setWorkInt( index, CHAR_WORKFIXTOUGH, max( -100, work ) ); + work = CHAR_getWorkInt( index, CHAR_WORKFIXDEX) + itemEffect[2].accumulation; + CHAR_setWorkInt( index, CHAR_WORKFIXDEX, max( -100, work ) ); + } + +} + +void Other_DefcharWorkInt( int index) +{ + +#ifdef _SUIT_ITEM + int mfix,mtgh,mdex,mods,maxhp; + mfix = CHAR_getWorkInt( index, CHAR_WORKFIXSTR); + mtgh = CHAR_getWorkInt( index, CHAR_WORKFIXTOUGH); + mdex = CHAR_getWorkInt( index, CHAR_WORKFIXDEX); + maxhp = CHAR_getWorkInt( index, CHAR_WORKMAXHP); + + mods = CHAR_getWorkInt( index, CHAR_WORKSUITMODSTR); + mfix = mfix+((mfix*mods)/100); + CHAR_setWorkInt( index, CHAR_WORKFIXSTR, mfix+CHAR_getWorkInt( index, CHAR_WORKSUITSTR)); + CHAR_setWorkInt( index, CHAR_WORKFIXTOUGH, mtgh+CHAR_getWorkInt( index, CHAR_WORKSUITTGH)); + CHAR_setWorkInt( index, CHAR_WORKFIXDEX, mdex+CHAR_getWorkInt( index, CHAR_WORKSUITDEX)); + CHAR_setWorkInt( index, CHAR_WORKMAXHP, maxhp+ CHAR_getWorkInt( index, CHAR_WORKSUITVIT)); +#ifdef _SUIT_ADDPART3 + if( mfix > 0 ) + CHAR_setWorkInt( index, CHAR_WORKFIXSTR, CHAR_getWorkInt( index, CHAR_WORKFIXSTR)+mfix*CHAR_getWorkInt( index, CHAR_WORKSUITSTR_P)/100.0); + if( mtgh > 0 ) + CHAR_setWorkInt( index, CHAR_WORKFIXTOUGH, CHAR_getWorkInt( index, CHAR_WORKFIXTOUGH)+mtgh*CHAR_getWorkInt( index, CHAR_WORKSUITTGH_P)/100.0); + if( mdex > 0) + CHAR_setWorkInt( index, CHAR_WORKFIXDEX, CHAR_getWorkInt( index, CHAR_WORKFIXDEX)+mdex*CHAR_getWorkInt( index, CHAR_WORKSUITDEX_P)/100.0); +#endif +#endif//_SUIT_ITEM + +#ifdef _MAGIC_RESIST_EQUIT // WON ADD 职业抗性装备 + /*{ + int f_res = -1, i_res = -1, t_res = -1; + f_res = CHAR_getWorkInt( index, CHAR_WORK_F_RESIST ); + i_res = CHAR_getWorkInt( index, CHAR_WORK_I_RESIST ); + t_res = CHAR_getWorkInt( index, CHAR_WORK_T_RESIST ); + + CHAR_setWorkInt( index, CHAR_WORK_F_RESIST, f_res+CHAR_getWorkInt( index, CHAR_WORK_F_SUIT ) ); + CHAR_setWorkInt( index, CHAR_WORK_I_RESIST, i_res+CHAR_getWorkInt( index, CHAR_WORK_I_SUIT ) ); + CHAR_setWorkInt( index, CHAR_WORK_T_RESIST, t_res+CHAR_getWorkInt( index, CHAR_WORK_T_SUIT ) ); + }*/ +#endif + + +#ifdef _PETSKILL_SETDUCK + //profession fix + //使用回避招式时,会将防值减去30%然後设定成回避值,奇怪的设定,也造成原本设定的回避值跟没设一样,因此我(Change)先把整段拿掉 + /*if( CHAR_getWorkInt( index, CHAR_MYSKILLDUCK) > 0 ){ + int mtgh = CHAR_getWorkInt( index, CHAR_WORKFIXTOUGH); + mtgh -= (mtgh*30)/100; + if( mtgh < 0 ) mtgh=0; + CHAR_setWorkInt( index, CHAR_MYSKILLDUCKPOWER, mtgh); + }*/ +#endif +#ifdef _MAGICPET_SKILL + if( CHAR_getWorkInt( index, CHAR_MYSKILLSTR) > 0 ){ + int mpower, mdef; + mpower = CHAR_getWorkInt( index, CHAR_WORKFIXSTR); + mdef = CHAR_getWorkInt( index, CHAR_MYSKILLSTRPOWER); + mpower += (mtgh*mdef)/100; + if( mtgh < 0 ) mtgh=0; + CHAR_setWorkInt( index, CHAR_WORKFIXSTR, mpower); + } + if( CHAR_getWorkInt( index, CHAR_MYSKILLTGH) > 0 ){ + int mpower, mdef; + mpower = CHAR_getWorkInt( index, CHAR_WORKFIXTOUGH); + mdef = CHAR_getWorkInt( index, CHAR_MYSKILLTGHPOWER); + mpower += (mtgh*mdef)/100; + if( mtgh < 0 ) mtgh=0; + CHAR_setWorkInt( index, CHAR_WORKFIXTOUGH, mpower); + } + if( CHAR_getWorkInt( index, CHAR_MYSKILLDEX) > 0 ){ + int mpower, mdef; + mpower = CHAR_getWorkInt( index, CHAR_WORKFIXDEX); + mdef = CHAR_getWorkInt( index, CHAR_MYSKILLDEXPOWER); + mpower += (mtgh*mdef)/100; + if( mtgh < 0 ) mtgh=0; + CHAR_setWorkInt( index, CHAR_WORKFIXDEX, mpower); + } +#endif + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + if( CHAR_getWorkInt( index, CHAR_MYSKILLHIT) > 0 ){ + int mpower, mdef; + mpower = CHAR_getWorkInt( index, CHAR_MYSKILLHIT); + mdef = CHAR_getWorkInt( index, CHAR_WORKHITRIGHT); + mpower += (mtgh*mdef)/100; + if( mtgh < 0 ) mtgh=0; + CHAR_setWorkInt( index, CHAR_MYSKILLHIT, mpower); + } + if( CHAR_getWorkInt( index, CHAR_WORK_WEAPON) > 0 ){ // 武器专精 + int mpower, mdef; + mpower = CHAR_getWorkInt( index, CHAR_WORKFIXSTR); + mdef = CHAR_getWorkInt( index, CHAR_WORKMOD_WEAPON); + mpower = mpower * ( 100 + mdef ) /100; + if( mtgh < 0 ) mtgh=0; + CHAR_setWorkInt( index, CHAR_WORKFIXSTR, mpower); + } +#endif + +#ifdef _VARY_WOLF + if(CHAR_getInt( index, CHAR_BASEIMAGENUMBER)==101428){ + int Rands=0, power; + Rands = CHAR_getWorkInt( index, CHAR_SKILLSTRPOWER); + power = CHAR_getWorkInt( index, CHAR_WORKFIXSTR); + power = power + (power*Rands)/100; + CHAR_setWorkInt( index, CHAR_WORKFIXSTR, power); + + Rands = CHAR_getWorkInt( index, CHAR_SKILLDEXPOWER); + power = CHAR_getWorkInt( index, CHAR_WORKFIXDEX); + power = power + (power*Rands)/100; + CHAR_setWorkInt( index, CHAR_WORKFIXDEX, power); + } +#endif + +#ifdef _PROFESSION_ADDSKILL + if( CHAR_getWorkInt( index, CHAR_WORKFEAR ) > 0 ){ + CHAR_setWorkInt( index, CHAR_WORKFIXSTR, CHAR_getWorkInt( index, CHAR_WORKFIXSTR ) - mfix*0.1 ); + CHAR_setWorkInt( index, CHAR_WORKFIXTOUGH, CHAR_getWorkInt( index, CHAR_WORKFIXTOUGH ) - mtgh*0.1 ); + CHAR_setWorkInt( index, CHAR_WORKFIXDEX, CHAR_getWorkInt( index, CHAR_WORKFIXDEX ) - mdex*0.2 ); + } +#endif + +#ifdef _MAGIC_WEAKEN + if(CHAR_getWorkInt(index,CHAR_WORKWEAKEN)>0){ + CHAR_setWorkInt( index, CHAR_WORKFIXSTR, CHAR_getWorkInt( index, CHAR_WORKFIXSTR)*0.8); + CHAR_setWorkInt( index, CHAR_WORKFIXTOUGH, CHAR_getWorkInt( index, CHAR_WORKFIXTOUGH)*0.8); + CHAR_setWorkInt( index, CHAR_WORKFIXDEX, CHAR_getWorkInt( index, CHAR_WORKFIXDEX)*0.8); + CHAR_setWorkInt( index, CHAR_WORKWEAKEN, CHAR_getWorkInt( index, CHAR_WORKWEAKEN)-1); + } +#endif +#ifdef _MAGIC_BARRIER// vincent 精灵:魔障 + if( CHAR_getWorkInt( index, CHAR_WORKBARRIER) > 0){ + CHAR_setWorkInt( index, CHAR_WORKBARRIER, CHAR_getWorkInt( index, CHAR_WORKBARRIER) - 1); + } +#endif + + CHAR_setWorkInt(index, CHAR_WORKATTACKPOWER, CHAR_getWorkInt( index, CHAR_WORKFIXSTR ) ); + CHAR_setWorkInt(index, CHAR_WORKDEFENCEPOWER, CHAR_getWorkInt( index, CHAR_WORKFIXTOUGH ) ); + CHAR_setWorkInt(index, CHAR_WORKQUICK, CHAR_getWorkInt( index, CHAR_WORKFIXDEX ) ); +} + +char* ITEM_getAppropriateName(int itemindex) +{ + int nameindex; + if( !ITEM_CHECKINDEX(itemindex ) )return NULL; + if( ITEM_getInt(itemindex,ITEM_LEAKLEVEL) <= 0 ) + nameindex = ITEM_NAME; + else + nameindex = ITEM_SECRETNAME; + return ITEM_getChar(itemindex,nameindex); + +} + +char* ITEM_getEffectString( int itemindex ) +{ + if( !ITEM_CHECKINDEX(itemindex))return NULL; + return ITEM_item[itemindex].itm.string[ITEM_EFFECTSTRING].string; +} + +char *ITEM_getItemInfoFromNumber( int itemid ) +{ + return ITEMTBL_getChar( itemid, ITEM_EFFECTSTRING); +} + +INLINE char* _ITEM_getNameFromNumber( char *file, int line, int itemid ) +{ + if( ITEM_CHECKITEMTABLE(itemid) == FALSE ){ + print("Can't Get ItemTable for:%d! - %s:%d\n",itemid, file, line); + return NULL; + } + return ITEMTBL_getChar( itemid, ITEM_NAME); +} + +int ITEM_getcostFromITEMtabl( int itemid ) +{ + return ITEMTBL_getInt( itemid, ITEM_COST); +} + +int ITEM_getlevelFromITEMtabl( int itemid ) +{ + return ITEMTBL_getInt( itemid, ITEM_LEVEL); +} + +int ITEM_getgraNoFromITEMtabl( int itemid ) +{ + return ITEMTBL_getInt( itemid, ITEM_BASEIMAGENUMBER); +} + +int ITEM_getcanpetmailFromITEMtabl( int itemid ) +{ + return ITEMTBL_getInt( itemid, ITEM_CANPETMAIL); +} + +int ITEM_getvanishatdropFromITEMtabl( int itemid ) +{ + return ITEMTBL_getInt( itemid, ITEM_VANISHATDROP); +} + +int ITEM_getdropatlogoutFromITEMtabl( int itemid ) +{ + return ITEMTBL_getInt( itemid, ITEM_DROPATLOGOUT); +} + +int ITEM_getmergeItemFromFromITEMtabl( int itemid ) +{ + return ITEMTBL_getInt( itemid, ITEM_CANMERGEFROM); +} + +BOOL ITEM_canuseMagic( int itemindex) +{ + if( !ITEM_CHECKINDEX(itemindex))return FALSE; + if( MAGIC_getMagicArray( ITEM_item[itemindex].itm.data[ITEM_MAGICID]) != -1 ) { + return TRUE; + } + return FALSE; +} + +INLINE ITEM_Item *ITEM_getItemPointer( int index ) +{ + if(!ITEM_CHECKINDEX(index))return NULL; + return &ITEM_item[index].itm; +} + +int ITEM_isTargetValid( int charaindex, int itemindex, int toindex) +{ + int itemtarget; + int Myside; + itemtarget = ITEM_getInt( itemindex, ITEM_TARGET ); + + Myside = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLESIDE ); + if ((toindex >= 0x0) && (toindex <= 0x13)) return 0; + + if (toindex == 0x14) {//20 右下全 0 + if (itemtarget == ITEM_TARGET_ALLMYSIDE){ + if( Myside == 0 )return 0; + }else if(itemtarget == ITEM_TARGET_ALLOTHERSIDE ){ + if( Myside == 1 )return 0; + } + }else if (toindex == 0x15) {//21 左上全 1 + if (itemtarget == ITEM_TARGET_ALLMYSIDE){ + if( Myside == 1 )return 0; + }else if( itemtarget == ITEM_TARGET_ALLOTHERSIDE ){ + if( Myside == 0 )return 0; + } + }else if (toindex == 0x16) { + if (itemtarget == ITEM_TARGET_ALL) + return 0; + } + return -1; +} +// Nuke end + + +#ifdef _ITEM_CHECKWARES +BOOL CHAR_CheckInItemForWares( int charaindex, int flg) +{ + int itemindex, i; + char token[256]; + + for( i=0; i<24; i++) { + itemindex = CHAR_getItemIndex( charaindex, i); + if( !ITEM_CHECKINDEX( itemindex) ) continue; + if( ITEM_getInt( itemindex, ITEM_TYPE) == ITEM_WARES ) { + if( flg == 0 ){ + return FALSE; + } + sprintf(token,"交出%s",ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW); + + CHAR_setItemIndex( charaindex, i ,-1); + ITEM_endExistItemsOne( itemindex); + CHAR_sendItemDataOne( charaindex, i); + } + } + return TRUE; +} +#endif + + +#ifdef _IMPOROVE_ITEMTABLE + +BOOL ITEMTBL_CHECKINDEX( int ItemID) +{ + if( ItemID < 0 || ItemID >= defitemtbls ) + return FALSE; + return ITEM_TransformList[ ItemID].use; +} + +int ITEM_getSIndexFromTransList( int ItemID) +{ + if( !ITEMTBL_CHECKINDEX( ItemID) ) + return -1; + return ITEM_TransformList[ ItemID].Si; +} + +int ITEM_getTotalitemtblsFromTransList() +{ + return totalitemtbls; +} + +int ITEM_getMaxitemtblsFromTransList() +{ + return defitemtbls; +} +#endif + +int ITEMTBL_getInt( int ItemID, ITEM_DATAINT datatype) +{ +#ifdef _IMPOROVE_ITEMTABLE + int itemsi=0; + if( !ITEM_CHECKITEMTABLE( ItemID) ) return -1; + itemsi = ITEM_getSIndexFromTransList( ItemID); + if( datatype >= ITEM_DATAINTNUM || datatype < 0 ) return -1; + return ITEM_tbl[itemsi].itm.data[datatype]; //new +#else + if( datatype >= ITEM_DATAINTNUM || datatype < 0 ) return -1; + if( ITEM_CHECKITEMTABLE(ItemID) == FALSE )return -1; + return ITEM_tbl[ItemID].itm.data[datatype]; //new +#endif +} + +char *ITEMTBL_getChar( int ItemID, ITEM_DATACHAR datatype) +{ +#ifdef _IMPOROVE_ITEMTABLE + int itemsi=0; + if( !ITEM_CHECKITEMTABLE( ItemID) ) return NULL; + itemsi = ITEM_getSIndexFromTransList( ItemID); + if( datatype >= ITEM_DATACHARNUM || datatype < 0 ) return NULL; + return ITEM_tbl[itemsi].itm.string[datatype].string; //new +#else + if( datatype >= ITEM_DATACHARNUM || datatype < 0 ) return NULL; + if( ITEM_CHECKITEMTABLE(ItemID) == FALSE )return NULL; + return ITEM_tbl[ItemID].itm.string[datatype].string; //new +#endif +} + +INLINE BOOL ITEM_CHECKITEMTABLE( int number ) +{ +#ifdef _IMPOROVE_ITEMTABLE + int itemsi=0; + if( !ITEMTBL_CHECKINDEX( number) ) return FALSE; + itemsi = ITEM_getSIndexFromTransList( number); + if( itemsi < 0 || itemsi >= ITEM_tblen ) + return FALSE; + return ITEM_tbl[itemsi].use; //new +#else + if( number < 0 || number >= ITEM_tblen ){ + //andy_log + print("ITEM_CHECKITEMTABLE() number:%d ITEM_tblen:%d !!\n", number, ITEM_tblen ); + return FALSE; + } + return ITEM_tbl[number].use; //new +#endif +} + +int ITEM_getItemDamageCrusheED( int itemindex) +{ + int crushe = ITEM_getInt( itemindex, ITEM_DAMAGECRUSHE); + int maxcrushe = ITEM_getInt( itemindex, ITEM_MAXDAMAGECRUSHE); + if(maxcrushe < 1)return -1; + if( maxcrushe > 1000000) maxcrushe = 1000000; + if( crushe > 1000000) crushe = 1000000; + + return ((int) (crushe*100)/maxcrushe); +} + +void ITEM_RsetEquit( int charaindex) +{ + int i, itemindex, ti=-1; + for( i=0; i baseData + randData ) { + char szBuffer[1024]; + ITEM_setInt( itemindex, checkList[i], baseData); + sprintf( szBuffer, " 修正异常道具: id=%d a=%d now=%d base=%d rand=%d ", + item_ID, checkList[i], nowData, baseData, randData ); + print( szBuffer); + if( CHAR_CHECKINDEX(charaindex) ) { + LogOther( + CHAR_getChar( charaindex, CHAR_CDKEY), + CHAR_getChar( charaindex, CHAR_NAME), + szBuffer ); + } + + } + } +} +#endif diff --git a/gmsv/item/item_contract.c b/gmsv/item/item_contract.c new file mode 100644 index 0000000..70a4e04 --- /dev/null +++ b/gmsv/item/item_contract.c @@ -0,0 +1,251 @@ +#include "version.h" +#ifdef _CONTRACT +#include /* strstr */ +#include /* isdigit, isalnum */ +#include "common.h" +#include "char.h" +#include "char_base.h" +#include "char_data.h" +#include "configfile.h" +#include "item.h" +#include "item_event.h" +#include "object.h" +#include "anim_tbl.h" +#include "magic.h" +#include "handletime.h" +#include "log.h" +#include "util.h" +#include "encount.h" +#include "battle.h" +#include "battle_item.h" +#include "lssproto_serv.h" +#include "net.h" +#include "pet.h" +#include "npcutil.h" +#include "enemy.h" + +typedef struct{ + int used; + char name[32]; + char fmname[32]; +} contractSignTag; + +//ITEM_contractTable ITEM_contractTbl[MAX_CONTRACTTABLE]; +static ITEM_contractTable *ITEM_contractTbl; + +BOOL ITEM_initContractTable( ) +{ + // + FILE *fp; + char data[2048]; + int i; + + print("\读取 contract.txt ...."); + + ITEM_contractTbl = (ITEM_contractTable *)allocateMemory( sizeof(struct tagITEM_contract) * MAX_CONTRACTTABLE ); + + if( ITEM_contractTbl == NULL ){ + fprint( "无法分配内存 %d\n" , + sizeof(struct tagITEM_contract)*MAX_CONTRACTTABLE); + fclose( fp ); + return FALSE; + } + + memset( ITEM_contractTbl, 0 , sizeof(struct tagITEM_contract) * MAX_CONTRACTTABLE); + + fp = fopen("data/contract.txt", "r"); + if( fp == NULL ) { + print("\n无法读取 contract.txt!! "); + return FALSE; + } + + for( i =0; i >MAX_CONTRACTTABLE; i++) { + ITEM_contractTbl[i].used = FALSE; + } + + while(1) { + int ret; + int index; + char token[2048]; + ret = fgets( data, sizeof(data), fp); + if( ret == NULL || ret == EOF) + break; + + if( getStringFromIndexWithDelim( data, "|", 1, token, sizeof(token)) == TRUE) { + index = atoi( token); + if( index <0 || index >= MAX_CONTRACTTABLE) continue; + } + else { continue; } + + if( getStringFromIndexWithDelim( data, "|", 2, token, sizeof(token)) == TRUE) { + ITEM_contractTbl[index].argnum = atoi( token); + } + else { continue; } + + if( getStringFromIndexWithDelim( data, "|", 3, token, sizeof(token)) == TRUE) { + strcpy( ITEM_contractTbl[index].detail, token); + } + else { continue; } + + ITEM_contractTbl[i].used = TRUE; + + print("\n契约[%d] %d %s", index, ITEM_contractTbl[index].argnum, ITEM_contractTbl[index].detail); + } + + fclose( fp); + + return TRUE; + +} + +void ITEM_contract( int charaindex, int toindex, int haveitemindex) +{ + int itemindex; + int conindex; + char data[2048+1024]; + + if( !CHAR_CHECKINDEX( charaindex ) ) return; + + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if( !ITEM_CHECKINDEX(itemindex) ) return; + + //conindex = atoi( ITEM_getChar( itemundex, ITEM_CONTRACTNUM)); + conindex = atoi( ITEM_getChar( itemindex, ITEM_ARGUMENT)); + + sprintf( data, "%s|%d|%s|%s", ITEM_contractTbl[conindex].detail, + ITEM_contractTbl[conindex].argnum, + ITEM_getChar( itemindex, ITEM_CONTRACTARG), + ITEM_getChar( itemindex, ITEM_CONTRACTTIME) ); + + print("\n contract_send:%s\n", data); + + lssproto_WN_send( getfdFromCharaIndex( charaindex), WINDOW_MESSAGETYPE_CONTRACT, + WINDOW_BUTTONTYPE_YESNO, + CHAR_WINDOWTYPE_CONTRACT_ANSWER, + itemindex, + data ); + +} + + +void ITEM_contractSign( int fd, int itemindex, int signindex) +{ + int charaindex; + int i; + int conIndex; + int complete =0; + int item_id; + char contractSignData[512]; + contractSignTag contractSign[4]; + + print("\n contractSign:%d:%d ", itemindex, signindex); + + charaindex = CONNECT_getCharaindex( fd ); + if( !CHAR_CHECKINDEX(charaindex)) return; + + if( signindex <0 || signindex >=4) return; + for( i=0 ; i= CHAR_MAXITEMHAVE ) return; + if( strcmp( ITEM_getChar( itemindex, ITEM_USEFUNC), "ITEM_contract") ) return; + + conIndex = atoi( ITEM_getChar( itemindex, ITEM_ARGUMENT)); + if( signindex >= ITEM_contractTbl[conIndex].argnum ) return; + + strcpy( contractSignData, ITEM_getChar( itemindex, ITEM_CONTRACTARG) ); + + for( i=0; i<4; i++) contractSign[i].used = FALSE; + + for( i=0; i<4; i++) { + int index; + char buf[512]; + char token[32]; + if( getStringFromIndexWithDelim( contractSignData, ",", i+1, buf, sizeof( buf )-1) == FALSE ) + break; + if( strlen( buf) == 0) break; + getStringFromIndexWithDelim( buf, ":", 1, token, sizeof( token )-1 ); + index = atoi( token); + if( index <0 || index >=4) break; + getStringFromIndexWithDelim( buf, ":", 2, contractSign[index].name, sizeof( contractSign[index].name )-1 ); + getStringFromIndexWithDelim( buf, ":", 3, contractSign[index].fmname, sizeof( contractSign[index].fmname )-1 ); + contractSign[index].used = TRUE; + } + + if( contractSign[signindex].used == TRUE) return; + + strcpy( contractSign[signindex].name, CHAR_getChar( charaindex, CHAR_NAME) ); + strcpy( contractSign[signindex].fmname, CHAR_getChar( charaindex, CHAR_FMNAME) ); + contractSign[signindex].used = TRUE; + + // 检查是否完成契约 + for( i =0; i<4; i++) { + if( contractSign[i].used == TRUE) + complete++; + } + if( complete >= ITEM_contractTbl[conIndex].argnum ) { + char buf[512]; + if( CHAR_findEmptyItemBoxNo( charaindex ) < ITEM_contractTbl[conIndex].argnum -1 ) { + sprintf( buf, "要完成这个契约,请先准备%d个空道具栏位。", ITEM_contractTbl[conIndex].argnum -1); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + return; + } + } + + + strcpy( contractSignData, ""); + for( i=0; i<4; i++) { + char buf[512]; + if( contractSign[i].used == FALSE) continue; + sprintf( buf, "%d:%s:%s,", i, contractSign[i].name, contractSign[i].fmname); + strcat( contractSignData, buf); + } + ITEM_setChar( itemindex, ITEM_CONTRACTARG, contractSignData); + + CHAR_talkToCli( charaindex, -1, "完成契约签名。", CHAR_COLORYELLOW); + + + // 完成契约 + if( complete >= ITEM_contractTbl[conIndex].argnum ) { + struct tm *nowtime; + char timebuf[512]; + + // 纪录日期 + nowtime = localtime( (time_t *)&NowTime.tv_sec ); + sprintf( timebuf, "%04d年%02d月%02d日", + nowtime->tm_year +1900, nowtime->tm_mon+1, nowtime->tm_mday); + ITEM_setChar( itemindex, ITEM_CONTRACTTIME, timebuf); + + CHAR_talkToCli( charaindex, -1, "完成所有签名,契约成立!", CHAR_COLORYELLOW); + // 复制契约 + item_id = ITEM_getInt( itemindex, ITEM_ID); + for( i =0 ; i < ITEM_contractTbl[conIndex].argnum -1 ; i++) + { + int emptyindex; + int newitemindex; + + emptyindex = CHAR_findEmptyItemBox( charaindex ); + + if( emptyindex < 0 ){ + CHAR_talkToCli( charaindex, -1, "空间栏位不足。", CHAR_COLORYELLOW); + break; + } + + newitemindex = ITEM_makeItemAndRegist( item_id ); + + if( newitemindex != -1 ){ + CHAR_setItemIndex( charaindex, emptyindex, newitemindex ); + ITEM_setWorkInt( newitemindex, ITEM_WORKOBJINDEX, -1); + ITEM_setWorkInt( newitemindex, ITEM_WORKCHARAINDEX, charaindex); + CHAR_sendItemDataOne( charaindex, emptyindex); + ITEM_setChar( newitemindex, ITEM_CONTRACTARG, contractSignData); + ITEM_setChar( newitemindex, ITEM_CONTRACTTIME, timebuf); + } + + CHAR_talkToCli( charaindex, -1, "复制契约书。", CHAR_COLORYELLOW); + } + } +} + +#endif diff --git a/gmsv/item/item_event.c b/gmsv/item/item_event.c new file mode 100644 index 0000000..b57221b --- /dev/null +++ b/gmsv/item/item_event.c @@ -0,0 +1,4612 @@ +#include "version.h" +#include /* strstr */ +#include /* isdigit, isalnum */ +#include "common.h" +#include "char.h" +#include "char_base.h" +#include "char_data.h" +#include "configfile.h" +#include "item.h" +#include "item_event.h" +#include "object.h" +#include "anim_tbl.h" +#include "magic.h" +#include "handletime.h" +#include "log.h" +#include "util.h" +#include "encount.h" +#include "battle.h" +#include "battle_item.h" +#include "lssproto_serv.h" +#include "net.h" +#include "pet.h" +#include "npcutil.h" +#include "enemy.h" +#ifdef _Item_ReLifeAct +#include "battle_magic.h" +#endif +#ifdef _MARKET_TRADE +#include "item_trade.h" +#endif +#ifdef _ITEM_WARP_FIX_BI +extern tagRidePetTable ridePetTable[296]; +#endif +#include "pet_skill.h" + +#ifdef _DEATH_CONTENDAB +#include "deathcontend.h" +#endif + +#ifdef _CFREE_petskill +#include "npc_freepetskillshop.h" +#endif + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 +#include "profession_skill.h" +#endif + +int ITEM_TimeDelCheck( int itemindex ) +{ int icnt, jcnt, playernum; + playernum = CHAR_getPlayerMaxNum(); + for( icnt = 0; icnt < playernum; icnt ++ ) { + if( CHAR_CHECKINDEX( icnt ) ) { + for( jcnt = 0; jcnt < CHAR_MAXITEMHAVE; jcnt ++ ) { + if( CHAR_getItemIndex( icnt, jcnt ) == itemindex ) { + print( "道具效力时间已到,进行奇怪道具处理(%s)(%s)\n", + CHAR_getUseName(icnt),ITEM_getAppropriateName(itemindex) ); + return FALSE; + } + } + } + } + return TRUE; +} + +int ITEM_eventDrop( int itemindex, int charaindex, int itemcharaindex ) +{ + typedef void (*DROPF)(int,int); + char szBuffer[256]=""; + DROPF dropfunc=NULL; + + if( ITEM_CHECKINDEX(itemindex) == FALSE )return -1; + + dropfunc=(DROPF)ITEM_getFunctionPointer( itemindex, ITEM_DROPFUNC ); + if( dropfunc ){ + dropfunc( charaindex, itemindex ); + } + + if( ITEM_getInt( itemindex, ITEM_VANISHATDROP) != 1 )return 0; + snprintf( szBuffer, sizeof( szBuffer), "%s 消灭了。", + ITEM_getAppropriateName(itemindex) ); + CHAR_talkToCli( charaindex, -1, szBuffer, CHAR_COLORWHITE ); + + { + LogItem( + CHAR_getChar( charaindex, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( charaindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), /* 失奶 丞 寞 */ +#endif + "Drop&Delete(丢出後消失)", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + } + CHAR_setItemIndex( charaindex, itemcharaindex, -1); + ITEM_endExistItemsOne( itemindex ); + return 1; +} + +#undef UNDEF +#define UNDEF (-1) + +typedef struct { + char* cmd; /* 摹 侬 */ + char* onmessage; /* 丢永本□斥 侬 */ + char* offmessage; /* 丢永本□斥 侬 */ + int element; /* 覆擂卞卅月邰豳 */ + int maxElement; /* element匹隙烂今木凶邰豳及 袄毛手勾邰豳 */ +} ITEM_EFFECTPARAM; +static ITEM_EFFECTPARAM ITEM_restorableParam[] = { + {"hp", "HP回复了。", "HP降低了。",CHAR_HP, CHAR_WORKMAXHP}, + {"mp", "MP回复了。", "MP降低了。",CHAR_MP, CHAR_WORKMAXMP}, +}; +static ITEM_EFFECTPARAM ITEM_statusParam[] = { + {"po", CHAR_POISONSTRING, CHAR_RECOVERPOISONSTRING, + CHAR_POISON, UNDEF}, + + {"pa", CHAR_PARALYSISSTRING, CHAR_RECOVERPARALYSISSTRING, + CHAR_PARALYSIS, UNDEF}, + + {"si", CHAR_SILENCESTRING, CHAR_RECOVERSILENCESTRING, + CHAR_SLEEP,UNDEF}, + + {"st", CHAR_STONESTRING, CHAR_RECOVERSTONESTRING, CHAR_STONE, UNDEF}, + + {"da", CHAR_DARKNESSSTRING, CHAR_RECOVERDARKNESSSTRING, + CHAR_DRUNK,UNDEF}, + + {"co", CHAR_CONFUSIONSTRING,CHAR_RECOVERCONFUSIONSTRING, + CHAR_CONFUSION, UNDEF}, +}; + +/*#define LOCAL_DEBUG*/ +#ifdef LOCAL_DEBUG +#define DOUTFILE "doutfile" +#include +#include +static int eprintf(char* format, ...){ + va_list arg; + long len; + FILE* fp; + fp = fopen(DOUTFILE, "a"); + va_start(arg, format); + len = vfprintf(stderr, format, arg); + if(fp){ vfprintf(fp, format, arg); fclose(fp); } + va_end(arg); + return len; +} + +#define fprint eprintf +#endif + +static BOOL ITEM_isValidEffect(char* cmd, int value){ + int i; + + for(i=0; istring[ITEM_ARGUMENT].string; + if(* effectarg == '\0') return TRUE; + for(p=effectarg; *p != '\0'; ){ + int i; + if(*p == SEPARATORI) p++; + for(q=cmd, i=0; isalnum(*p) && i 0 ) + onoroff=ITEM_restorableParam[i].onmessage; + else if( amount < 0 ) + onoroff=ITEM_restorableParam[i].offmessage; + else + return FALSE; + strcpysafe( ansmsg, sizeof(ansmsg), onoroff ); + CHAR_talkToCli( charaindex, -1, ansmsg, CHAR_COLORWHITE); + return TRUE; +#else + if(value == ITEM_EFFECT_RESTORE_NORMAL){ + int maxv, curv, amount; + maxv =CHAR_getWorkInt(charaindex, ITEM_restorableParam[i].maxElement); + curv =CHAR_getInt(charaindex, ITEM_restorableParam[i].element); + amount = 30; + if(curv + amount < 0) amount = -curv; + CHAR_setInt(charaindex, ITEM_restorableParam[i].element, min((curv+amount), maxv)); + snprintf( ansmsg, sizeof(ansmsg), "%s回复了。", + ITEM_restorableParam[i].onmessage ); + CHAR_talkToCli( charaindex, -1, ansmsg, CHAR_COLORWHITE); + return TRUE; + }else if(value == ITEM_EFFECT_RESTORE_COMPLETE){ + int maxv; + maxv =CHAR_getWorkInt(charaindex, ITEM_restorableParam[i].maxElement); + CHAR_setInt(charaindex, ITEM_restorableParam[i].element, maxv); + snprintf( ansmsg, sizeof(ansmsg), "%s已完全回复。", ITEM_restorableParam[i].onmessage ); + CHAR_talkToCli( charaindex, -1, ansmsg, CHAR_COLORWHITE ); + return TRUE; + }else + return FALSE; +#endif + + } + } + if( value >= 0 ){ + int found = 0; + for(i=0; i (int)( itemputtime + getItemdeletetime() ) ) { + if( ITEM_TimeDelCheck( itemindex ) == FALSE ){ + return ; + } + { + LogItem( + "NULL", + "NULL", +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), +#endif + "TiemDelete", + OBJECT_getFloor( objindex ), + OBJECT_getX( objindex ), + OBJECT_getY( objindex ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + } + ITEM_endExistItemsOne(itemindex); + CHAR_ObjectDelete(objindex); + } +} + +void ITEM_useEffectTohelos( int charaindex, int to_charaindex, int haveitemindex) +{ + char buf[64]; + char msgbuf[64]; + int ret; + int itemindex; + int cutrate, limitcount; + int per; + int sendcharaindex = charaindex; + + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + + CHAR_setItemIndex(charaindex, haveitemindex ,-1); + CHAR_sendItemDataOne( charaindex, haveitemindex); + ret = getStringFromIndexWithDelim( ITEM_getChar(itemindex, ITEM_ARGUMENT) , + "|", 1, buf, sizeof( buf)); + if( ret != TRUE ) { + { + LogItem( + CHAR_getChar( charaindex, CHAR_NAME ), + CHAR_getChar( charaindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), +#endif + "FieldErrorUse", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + } + ITEM_endExistItemsOne( itemindex); + return; + } + cutrate = atoi( buf); + if( cutrate < 0 ) cutrate = 0; + ret = getStringFromIndexWithDelim( ITEM_getChar(itemindex, ITEM_ARGUMENT) , + "|", 2, buf, sizeof( buf)); + if( ret != TRUE ) { + { + LogItem( + CHAR_getChar( charaindex, CHAR_NAME ), + CHAR_getChar( charaindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), +#endif + "FieldUse", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + } + ITEM_endExistItemsOne( itemindex); + return; + } + limitcount = atoi( buf); + if( limitcount < 0) limitcount = 0; + if( CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE) == CHAR_PARTY_CLIENT) { + sendcharaindex = CHAR_getWorkInt( charaindex, CHAR_WORKPARTYINDEX1); + } + CHAR_setWorkInt( sendcharaindex, CHAR_WORK_TOHELOS_CUTRATE, cutrate); + CHAR_setWorkInt( sendcharaindex, CHAR_WORK_TOHELOS_COUNT, limitcount); + + snprintf( msgbuf, sizeof(msgbuf), + "抓到了%s 。", ITEM_getChar(itemindex, ITEM_NAME) ); + CHAR_talkToCli( charaindex, -1, msgbuf, CHAR_COLORWHITE ); + + if( sendcharaindex != charaindex ) { + snprintf( msgbuf, sizeof(msgbuf), + "%s 抓到了 %s。 ", + CHAR_getChar( charaindex, CHAR_NAME), + ITEM_getChar( itemindex, ITEM_NAME) ); + CHAR_talkToCli( sendcharaindex, -1, msgbuf, CHAR_COLORWHITE ); + } + + { + LogItem( + CHAR_getChar( charaindex, CHAR_NAME ), + CHAR_getChar( charaindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), +#endif + "FieldUse", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + } + ITEM_endExistItemsOne( itemindex); + per = ENCOUNT_getEncountPercentMin( sendcharaindex, + CHAR_getInt( sendcharaindex, CHAR_FLOOR), + CHAR_getInt( sendcharaindex, CHAR_X), + CHAR_getInt( sendcharaindex, CHAR_Y)); + if( per != -1) { + CHAR_setWorkInt( sendcharaindex, CHAR_WORKENCOUNTPROBABILITY_MIN, per); + } + per = ENCOUNT_getEncountPercentMax( sendcharaindex, + CHAR_getInt( sendcharaindex, CHAR_FLOOR), + CHAR_getInt( sendcharaindex, CHAR_X), + CHAR_getInt( sendcharaindex, CHAR_Y)); + if( per != -1) { + CHAR_setWorkInt( sendcharaindex, CHAR_WORKENCOUNTPROBABILITY_MAX, per); + } + CHAR_sendStatusString( sendcharaindex, "E" ); +} + +void ITEM_dropMic( int charaindex , int itemindex ) +{ + if( !ITEM_CHECKINDEX( itemindex )) return; + + CHAR_setWorkInt( charaindex, CHAR_WORKFLG, + CHAR_getWorkInt( charaindex, CHAR_WORKFLG ) & ~WORKFLG_MICMODE ); +} + +void ITEM_useMic_Field( int charaindex, int to_charaindex, int haveitemindex ) +{ + if( CHAR_getWorkInt( charaindex, CHAR_WORKFLG ) & WORKFLG_MICMODE ){ + CHAR_setWorkInt( charaindex, CHAR_WORKFLG, + CHAR_getWorkInt( charaindex, CHAR_WORKFLG ) & ~WORKFLG_MICMODE ); + CHAR_talkToCli( charaindex, -1, "将麦克风设定为OFF。", CHAR_COLORWHITE); + }else{ + CHAR_setWorkInt( charaindex, CHAR_WORKFLG, + CHAR_getWorkInt( charaindex, CHAR_WORKFLG ) | WORKFLG_MICMODE ); + CHAR_talkToCli( charaindex, -1, "将麦克风设定为ON。", CHAR_COLORWHITE); + } +} +#if 1 +char *aszHealStringByOwn[] = { + "%s的耐久力回复%d", + "%s的气力回复%d", + "%s的魅力上升%d", + "%s的忠诚度上升%d", + "" +}; + +char *aszDownStringByOwn[] = { + "%s的耐久力减低%d", + "%s的气力减低%d", + "%s的魅力下降%d", + "%s的忠诚度下降%d", + "" +}; + +char *aszHealStringByOther[] = { + "藉由%s%s的耐久力回复%d", + "藉由%s%s的气力回复%d", + "藉由%s%s的魅力上升%d", + "藉由%s%s的忠诚度上升%d", + "" +}; + +char *aszDownStringByOther[] = { + "藉由%s%s的耐久力减低%d", + "藉由%s%s的气力减低%d", + "藉由%s%s的魅力减低%d", + "藉由%s%s的忠诚度减低%d", + "" +}; + +char *aszKeyString[] = {"体", "气", "魅", "忠", ""}; +int aHealInt[] = { CHAR_HP, CHAR_MP, CHAR_CHARM, CHAR_VARIABLEAI, -1 }; +int aHealMaxWork[] = { CHAR_WORKMAXHP, CHAR_WORKMAXMP, -1, -1, -1 }; + +void ITEM_useRecovery_Field( + int charaindex, + int toindex, + int haveitemindex +){ + int work, workmax, workmin; + int power[BD_KIND_END] = {0,0,0}, + prevhp = 0, + workhp = 0, + recovery[BD_KIND_END] = {0,0,0}; + int itemindex, kind = BD_KIND_HP, HealFlg = 0, j; + char *p = NULL, *arg, msgbuf[256]; + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if( !ITEM_CHECKINDEX(itemindex) ) return; + if( CHAR_CHECKINDEX( toindex ) == FALSE )return ; + arg = ITEM_getChar(itemindex, ITEM_ARGUMENT ); + if( arg == NULL ) return; + +#ifdef _ITEM_UNBECOMEPIG + if( (p = strstr( arg, "解猪" )) != NULL ){ + if( CHAR_getInt( toindex, CHAR_BECOMEPIG ) > -1 ){ + CHAR_setInt( toindex, CHAR_BECOMEPIG, -1 ); + CHAR_complianceParameter( toindex ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( toindex , CHAR_WORKOBJINDEX )); + CHAR_send_P_StatusString( toindex , CHAR_P_STRING_BASEBASEIMAGENUMBER); + CHAR_talkToCli( toindex,-1,"乌力化失效了。",CHAR_COLORWHITE); + CHAR_DelItemMess( charaindex, haveitemindex, 0); + } + return; + } +#endif +#ifdef _ITEM_LVUPUP + if( (p = strstr( arg, "LVUPUP" ) ) != NULL ){ + if (CHAR_getInt(toindex, CHAR_WHICHTYPE)==CHAR_TYPEPET){ + int pidx=0,lvup=0,lv=0; + sprintf( msgbuf, "%s", p+7 ); + pidx = atoi( strtok( msgbuf, " " ) ); + if( pidx != CHAR_getInt( toindex, CHAR_PETID) || CHAR_getInt(toindex, CHAR_LIMITLEVEL) == 0 ){ + CHAR_talkToCli( charaindex,-1,"无法使用",CHAR_COLORWHITE); + return; + } + lv = CHAR_getInt( toindex, CHAR_LV ); + if( lv < 10 || lv >= 140 ){ + CHAR_talkToCli( charaindex,-1,"目前等级无法使用",CHAR_COLORWHITE); + return; + } + if( (p = strstr( arg, "地" )) != NULL ) + lvup=2; + if( (p = strstr( arg, "水" )) != NULL ) + lvup=3; + if( (p = strstr( arg, "火" )) != NULL ) + lvup=0; + if( (p = strstr( arg, "风" )) != NULL ) + lvup=1; + if( lv%4 != lvup || CHAR_getInt(toindex, CHAR_LIMITLEVEL)-lv >= 1 ){// + CHAR_talkToCli( charaindex,-1,"破除封印失败",CHAR_COLORWHITE); + CHAR_DelItemMess( charaindex, haveitemindex, 0); + return; + } + CHAR_setInt(toindex, CHAR_LIMITLEVEL, CHAR_getInt(toindex, CHAR_LIMITLEVEL)+1); + CHAR_talkToCli( charaindex,-1,"封印魔咒减弱,最高等级提升",CHAR_COLORWHITE); + if( CHAR_getInt(toindex, CHAR_LIMITLEVEL) == 140 ){ + CHAR_setInt(toindex, CHAR_LIMITLEVEL, 0); + CHAR_talkToCli( charaindex,-1,"封印魔咒解除了",CHAR_COLORWHITE); + } + CHAR_DelItemMess( charaindex, haveitemindex, 0); + CHAR_complianceParameter( toindex ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( toindex , CHAR_WORKOBJINDEX )); + } + return; + } + if( (p = strstr( arg, "UPUPLV" ) ) != NULL ){ + if (CHAR_getInt(toindex, CHAR_WHICHTYPE)==CHAR_TYPEPET){ + int pidx=0,lvup=0,lv=0; + sprintf( msgbuf, "%s", p+7 ); + pidx = atoi( strtok( msgbuf, " " ) ); + if( pidx != CHAR_getInt( toindex, CHAR_PETID) || CHAR_getInt(toindex, CHAR_LIMITLEVEL) == 0 ){ + CHAR_talkToCli( charaindex,-1,"无法使用",CHAR_COLORWHITE); + return; + } + lv = CHAR_getInt( toindex, CHAR_LV ); + if( lv < 125 || lv > 140 ){ + CHAR_talkToCli( charaindex,-1,"目前等级无法使用",CHAR_COLORWHITE); + return; + } + CHAR_setInt(toindex, CHAR_LIMITLEVEL, 0); + CHAR_talkToCli( charaindex,-1,"封印魔咒解除了",CHAR_COLORWHITE); + CHAR_DelItemMess( charaindex, haveitemindex, 0); + CHAR_complianceParameter( toindex ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( toindex , CHAR_WORKOBJINDEX )); + } + return; + } +#endif +#ifdef _ITEM_PROPERTY + if( (p = strstr( arg, "PROPERTY" ) ) != NULL ){ + //print("地水火风:%s", arg ); + if (CHAR_getInt(toindex, CHAR_WHICHTYPE)!=CHAR_TYPEPLAYER) + return; + if( (p = strstr( arg, "+" ) ) != NULL ){//旋转属性 正转 + if( CHAR_getInt( toindex, CHAR_EARTHAT ) == 100 ) + CHAR_setInt( toindex, CHAR_EARTHAT, CHAR_getInt( toindex, CHAR_EARTHAT )-10 ), + CHAR_setInt( toindex, CHAR_WATERAT, CHAR_getInt( toindex, CHAR_WATERAT )+10 ); + else if( CHAR_getInt( toindex, CHAR_WATERAT ) == 100 ) + CHAR_setInt( toindex, CHAR_WATERAT, CHAR_getInt( toindex, CHAR_WATERAT )-10 ), + CHAR_setInt( toindex, CHAR_FIREAT, CHAR_getInt( toindex, CHAR_FIREAT )+10 ); + else if( CHAR_getInt( toindex, CHAR_FIREAT ) == 100 ) + CHAR_setInt( toindex, CHAR_FIREAT, CHAR_getInt( toindex, CHAR_FIREAT )-10 ), + CHAR_setInt( toindex, CHAR_WINDAT, CHAR_getInt( toindex, CHAR_WINDAT )+10 ); + else if( CHAR_getInt( toindex, CHAR_WINDAT ) == 100 ) + CHAR_setInt( toindex, CHAR_WINDAT, CHAR_getInt( toindex, CHAR_WINDAT )-10 ), + CHAR_setInt( toindex, CHAR_EARTHAT, CHAR_getInt( toindex, CHAR_EARTHAT )+10 ); + else if( CHAR_getInt( toindex, CHAR_EARTHAT ) > 0 && CHAR_getInt( toindex, CHAR_WATERAT ) > 0 ) + CHAR_setInt( toindex, CHAR_EARTHAT, CHAR_getInt( toindex, CHAR_EARTHAT )-10 ), + CHAR_setInt( toindex, CHAR_WATERAT, CHAR_getInt( toindex, CHAR_WATERAT )+10 ); + else if( CHAR_getInt( toindex, CHAR_WATERAT ) > 0 && CHAR_getInt( toindex, CHAR_FIREAT ) > 0 ) + CHAR_setInt( toindex, CHAR_WATERAT, CHAR_getInt( toindex, CHAR_WATERAT )-10 ), + CHAR_setInt( toindex, CHAR_FIREAT, CHAR_getInt( toindex, CHAR_FIREAT )+10 ); + else if( CHAR_getInt( toindex, CHAR_FIREAT ) > 0 && CHAR_getInt( toindex, CHAR_WINDAT ) > 0 ) + CHAR_setInt( toindex, CHAR_FIREAT, CHAR_getInt( toindex, CHAR_FIREAT )-10 ), + CHAR_setInt( toindex, CHAR_WINDAT, CHAR_getInt( toindex, CHAR_WINDAT )+10 ); + else if( CHAR_getInt( toindex, CHAR_WINDAT ) > 0 && CHAR_getInt( toindex, CHAR_EARTHAT ) > 0 ) + CHAR_setInt( toindex, CHAR_WINDAT, CHAR_getInt( toindex, CHAR_WINDAT )-10 ), + CHAR_setInt( toindex, CHAR_EARTHAT, CHAR_getInt( toindex, CHAR_EARTHAT )+10 ); + } + if( (p = strstr( arg, "-" ) ) != NULL ){//旋转属性 反转 + if( CHAR_getInt( toindex, CHAR_EARTHAT ) == 100 ) + CHAR_setInt( toindex, CHAR_EARTHAT, CHAR_getInt( toindex, CHAR_EARTHAT )-10 ), + CHAR_setInt( toindex, CHAR_WINDAT, CHAR_getInt( toindex, CHAR_WINDAT )+10 ); + else if( CHAR_getInt( toindex, CHAR_WATERAT ) == 100 ) + CHAR_setInt( toindex, CHAR_WATERAT, CHAR_getInt( toindex, CHAR_WATERAT )-10 ), + CHAR_setInt( toindex, CHAR_EARTHAT, CHAR_getInt( toindex, CHAR_EARTHAT )+10 ); + else if( CHAR_getInt( toindex, CHAR_FIREAT ) == 100 ) + CHAR_setInt( toindex, CHAR_FIREAT, CHAR_getInt( toindex, CHAR_FIREAT )-10 ), + CHAR_setInt( toindex, CHAR_WATERAT, CHAR_getInt( toindex, CHAR_WATERAT )+10 ); + else if( CHAR_getInt( toindex, CHAR_WINDAT ) == 100 ) + CHAR_setInt( toindex, CHAR_WINDAT, CHAR_getInt( toindex, CHAR_WINDAT )-10 ), + CHAR_setInt( toindex, CHAR_FIREAT, CHAR_getInt( toindex, CHAR_FIREAT )+10 ); + else if( CHAR_getInt( toindex, CHAR_EARTHAT ) > 0 && CHAR_getInt( toindex, CHAR_WATERAT ) > 0 ) + CHAR_setInt( toindex, CHAR_EARTHAT, CHAR_getInt( toindex, CHAR_EARTHAT )+10 ), + CHAR_setInt( toindex, CHAR_WATERAT, CHAR_getInt( toindex, CHAR_WATERAT )-10 ); + else if( CHAR_getInt( toindex, CHAR_WATERAT ) > 0 && CHAR_getInt( toindex, CHAR_FIREAT ) > 0 ) + CHAR_setInt( toindex, CHAR_WATERAT, CHAR_getInt( toindex, CHAR_WATERAT )+10 ), + CHAR_setInt( toindex, CHAR_FIREAT, CHAR_getInt( toindex, CHAR_FIREAT )-10 ); + else if( CHAR_getInt( toindex, CHAR_FIREAT ) > 0 && CHAR_getInt( toindex, CHAR_WINDAT ) > 0 ) + CHAR_setInt( toindex, CHAR_FIREAT, CHAR_getInt( toindex, CHAR_FIREAT )+10 ), + CHAR_setInt( toindex, CHAR_WINDAT, CHAR_getInt( toindex, CHAR_WINDAT )-10 ); + else if( CHAR_getInt( toindex, CHAR_WINDAT ) > 0 && CHAR_getInt( toindex, CHAR_EARTHAT ) > 0 ) + CHAR_setInt( toindex, CHAR_WINDAT, CHAR_getInt( toindex, CHAR_WINDAT )+10 ), + CHAR_setInt( toindex, CHAR_EARTHAT, CHAR_getInt( toindex, CHAR_EARTHAT )-10 ); + } + CHAR_DelItemMess( charaindex, haveitemindex, 0); + CHAR_complianceParameter( toindex ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( toindex , CHAR_WORKOBJINDEX )); + CHAR_send_P_StatusString( toindex , + CHAR_P_STRING_EARTH | + CHAR_P_STRING_WATER | + CHAR_P_STRING_FIRE | + CHAR_P_STRING_WIND + ); + return; + } +#endif +#ifdef _ITEM_ADDPETEXP + if( (p = strstr( arg, "GETEXP" )) != NULL ){ + if (CHAR_getInt(toindex, CHAR_WHICHTYPE)==CHAR_TYPEPET){ + getStringFromIndexWithDelim( arg, "|", 2, msgbuf,sizeof( msgbuf));//宠物编号 + if( atoi(msgbuf) == CHAR_getInt( toindex, CHAR_PETID) ){ + getStringFromIndexWithDelim( arg, "|", 3, msgbuf,sizeof( msgbuf));//等级上限(等级超过才可用) + if( CHAR_getInt( toindex, CHAR_LV ) >= atoi(msgbuf) ){ + getStringFromIndexWithDelim( arg, "|", 4, msgbuf,sizeof( msgbuf));//经验值增加 + if( CHAR_getInt( toindex, CHAR_LV) < CHAR_MAXUPLEVEL ){ + int UpLevel = 0; + CHAR_setWorkInt( toindex, CHAR_WORKGETEXP, atoi(msgbuf) );//回存CHAR_WORKGETEXP + CHAR_AddMaxExp( toindex, CHAR_getWorkInt( toindex, CHAR_WORKGETEXP ) ); + sprintf( msgbuf,"这石头里面不知道有什麽样的矿,让我看看。(增加经验%d)", CHAR_getWorkInt( toindex, CHAR_WORKGETEXP ) ); + CHAR_talkToCli( charaindex,-1,msgbuf,CHAR_COLORWHITE); + UpLevel = CHAR_LevelUpCheck( toindex , charaindex); + if( UpLevel > 0 ){ + if( getBattleDebugMsg( ) != 0 ){ + snprintf( msgbuf, sizeof(msgbuf), + "(%s) 升级至 %d", + CHAR_getUseName( toindex ), + CHAR_getInt( toindex, CHAR_LV ) ); + BATTLE_talkToCli( charaindex, msgbuf, CHAR_COLORYELLOW ); + } + } + for( j = 0; j < UpLevel; j ++ ){ + CHAR_PetLevelUp( toindex ); + CHAR_PetAddVariableAi( toindex, AI_FIX_PETLEVELUP ); + } + CHAR_complianceParameter( toindex ); + } + else{ + CHAR_talkToCli( charaindex,-1,"不能使用",CHAR_COLORWHITE); + } + /*CHAR_send_P_StatusString( charindex, CHAR_P_STRING_DUELPOINT| + CHAR_P_STRING_TRANSMIGRATION| CHAR_P_STRING_RIDEPET| + CHAR_P_STRING_BASEBASEIMAGENUMBER| CHAR_P_STRING_GOLD| + CHAR_P_STRING_EXP| CHAR_P_STRING_LV| CHAR_P_STRING_HP|CHAR_P_STRING_LEARNRIDE); + */ + } + else + CHAR_talkToCli( charaindex,-1,"这石头....(无法判别,无法增加经验)",CHAR_COLORWHITE); + } + CHAR_DelItemMess( charaindex, haveitemindex, 0); + CHAR_complianceParameter( toindex ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( toindex , CHAR_WORKOBJINDEX )); + return; + } + else{ + CHAR_talkToCli( charaindex,-1,"不能使用",CHAR_COLORWHITE); + } + } +#endif + for( j = 0; j < BD_KIND_END; j ++ ){ + power[j] = 0; + recovery[j] = 0; + } + if( (p = strstr( arg, "全" )) != NULL ){ + HealFlg = ( 1 << BD_KIND_HP ); + if( CHAR_getInt( toindex, CHAR_WHICHTYPE) == CHAR_TYPEPET ){ + }else{ + HealFlg |= ( 1 << BD_KIND_MP ); + } + power[BD_KIND_HP] = 10000000; + power[BD_KIND_MP] = 100; + } + kind = BD_KIND_HP; + if( (p = strstr( arg, aszKeyString[kind] )) != NULL ){ + HealFlg |= ( 1 << kind ); + if( sscanf( p+2, "%d", &work ) != 1 ){ + power[kind] = 1; + }else{ + power[kind] = RAND( (work*0.9), (work*1.1) ); + } +#ifndef _MAGIC_REHPAI + power[kind] *= GetRecoveryRate( toindex ); +#endif + } + kind = BD_KIND_MP; + if( (p = strstr( arg, aszKeyString[kind] )) != NULL + && CHAR_getInt( toindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER){ + HealFlg |= ( 1 << kind ); + if( sscanf( p+2, "%d", &work ) != 1 ){ + power[kind] = 1; + }else{ + power[kind] = RAND( (work*0.9), (work*1.1) ); + } + } + kind = BD_KIND_AI; + if( (p = strstr( arg, aszKeyString[kind] )) != NULL + && CHAR_getInt( toindex, CHAR_WHICHTYPE) == CHAR_TYPEPET){ + HealFlg |= ( 1 << kind ); + if( sscanf( p+2, "%d", &work ) != 1 ){ + power[kind] = 1; + }else{ + power[kind] = RAND( (work*0.9), (work*1.1) ); + } + power[kind] *= 100; + } + kind = BD_KIND_CHARM; + if( (p = strstr( arg, aszKeyString[kind] )) != NULL + && CHAR_getInt( toindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER ){ + HealFlg |= ( 1 << kind ); + if( sscanf( p+2, "%d", &work ) != 1 ){ + power[kind] = 1; + }else{ + power[kind] = RAND( (work*0.9), (work*1.1) ); + } + } + if( HealFlg == 0 )return; +#ifdef _TYPE_TOXICATION + if( CHAR_CanCureFlg( toindex, "HP") == FALSE )return; +#endif + + for( j = 0; j < BD_KIND_END; j ++ ){ + if( ( HealFlg & ( 1 << j ) ) == 0 )continue; + prevhp = CHAR_getInt( toindex, aHealInt[j] ); + workhp = prevhp + (int)power[j]; + + if( j == BD_KIND_CHARM ){ + workmax = 100; + workmin = 0; + }else + if( j == BD_KIND_AI ){ + workmax = 10000; + workmin = -10000; + }else{ + workmax = CHAR_getWorkInt( toindex, aHealMaxWork[j] ); + workmin = 1; + } + workhp = min( workhp, workmax ); + workhp = max( workhp, workmin ); + CHAR_setInt( toindex, aHealInt[j], workhp ); + recovery[j] = workhp - prevhp; + if( j == BD_KIND_AI ){ + recovery[j] *= 0.01; + } + } + CHAR_complianceParameter( toindex ); + + if( CHAR_getInt( toindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER) { + if( charaindex != toindex ) { + CHAR_send_P_StatusString( toindex, CHAR_P_STRING_HP|CHAR_P_STRING_MP|CHAR_P_STRING_CHARM); + } + } + CHAR_send_P_StatusString( charaindex, CHAR_P_STRING_HP|CHAR_P_STRING_MP|CHAR_P_STRING_CHARM); + if( CHAR_getInt( toindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER && + CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE ){ + CHAR_PartyUpdate( toindex, CHAR_N_STRING_HP|CHAR_N_STRING_MP ); + } + if( CHAR_getInt( toindex, CHAR_WHICHTYPE) == CHAR_TYPEPET ){ + int i; + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ) { + int workindex = CHAR_getCharPet( charaindex, i ); + if( workindex == toindex ){ + CHAR_send_K_StatusString( charaindex, i, CHAR_K_STRING_HP|CHAR_K_STRING_AI); + } + } + } + + + for( j = 0; j < BD_KIND_END; j ++ ){ + if( ( HealFlg & ( 1 << j ) ) == 0 )continue; + if( charaindex != toindex) { + if( power[j] >= 0 ){ + snprintf( msgbuf, sizeof( msgbuf), + aszHealStringByOwn[j], + CHAR_getUseName( toindex ), recovery[j] ); + }else{ + snprintf( msgbuf, sizeof( msgbuf), + aszDownStringByOwn[j], + CHAR_getUseName( toindex ), -recovery[j] ); + } + CHAR_talkToCli( charaindex, -1, msgbuf, CHAR_COLORWHITE); + if( CHAR_getInt( toindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER) { + if( power[j] >= 0 ){ + snprintf( msgbuf, sizeof( msgbuf), + aszHealStringByOther[j], + CHAR_getUseName( charaindex ), + CHAR_getUseName( toindex ), recovery[j] ); + }else{ + snprintf( msgbuf, sizeof( msgbuf), + aszDownStringByOther[j], + CHAR_getUseName( charaindex ), + CHAR_getUseName( toindex ), -recovery[j] ); + } + CHAR_talkToCli( toindex, -1, msgbuf, CHAR_COLORWHITE); + } + }else { + if( power[j] >= 0 ){ + snprintf( msgbuf, sizeof( msgbuf), + aszHealStringByOwn[j], + CHAR_getUseName( charaindex ), recovery[j] ); + }else{ + snprintf( msgbuf, sizeof( msgbuf), + aszDownStringByOwn[j], + CHAR_getUseName( charaindex ), -recovery[j] ); + } + CHAR_talkToCli( charaindex, -1, msgbuf, CHAR_COLORWHITE); + } + } + { + LogItem( + CHAR_getChar( charaindex, CHAR_NAME ), + CHAR_getChar( charaindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), +#endif + "FieldUse", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + } + CHAR_DelItemMess( charaindex, haveitemindex, 0); + +} + +#endif + +void ITEM_useRecovery( int charaindex, int toindex, int haveitemindex) +{ + int battlemode; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return ; + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + if( battlemode == BATTLE_CHARMODE_INIT ){ + }else + if( battlemode ){ + ITEM_useRecovery_Battle( charaindex, toindex, haveitemindex ); + }else{ + ITEM_useRecovery_Field( charaindex, toindex, haveitemindex ); + } + +} + +#ifdef _ITEM_MAGICRECOVERY +void ITEM_useMRecovery( int charaindex, int toindex, int haveitemindex) +{ + int battlemode; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return ; + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + if( battlemode == BATTLE_CHARMODE_INIT ){ + }else + if( battlemode ){ + ITEM_useMRecovery_Battle( charaindex, toindex, haveitemindex ); + }else{ +// ITEM_useRecovery_Field( charaindex, toindex, haveitemindex ); + } + +} + +#endif + +#ifdef _ITEM_USEMAGIC +void ITEM_useMagic( int charaindex, int toindex, int haveitemindex) +{ + int battlemode; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return ; + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + if( battlemode == BATTLE_CHARMODE_INIT ){ + }else + if( battlemode ){ + ITEM_useMagic_Battle( charaindex, toindex, haveitemindex ); + } +} +#endif + +#ifdef _PET_LIMITLEVEL +void ITEM_useOtherEditBase( int charaindex, int toindex, int haveitemindex) +{ + int itemindex,i; + int work[4]; + int num=-1,type; + int LevelUpPoint,petrank; + char buf1[256]; + char buf2[][32]={"腕力成长率","耐久力成长率","速度成长率","体力成长率","能力"}; + char buf3[][32]={"大幅提高","略为提高","略为减少"}; + if( !CHAR_CHECKINDEX( charaindex ) ) return; + if( !CHAR_CHECKINDEX( toindex ) ) return; +#define RAND(x,y) ((x-1)+1+ (int)( (double)(y-(x-1))*rand()/(RAND_MAX+1.0)) ) + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if( !ITEM_CHECKINDEX(itemindex) ) return; + if( CHAR_getInt( toindex, CHAR_PETID) == 718 +#ifdef _PET_2LIMITLEVEL + || CHAR_getInt( toindex, CHAR_PETID) == 401 +#endif + ) { + + int maxnums=50; + + if( CHAR_getInt( toindex,CHAR_LV ) < 74 ) { + sprintf(buf1,"给我的吗?好美丽的项 喔!〈能力起了变化〉"); + CHAR_talkToCli( charaindex, toindex, buf1, CHAR_COLORWHITE); + num = ITEM_MODIFYATTACK; + LevelUpPoint = CHAR_getInt( toindex, CHAR_ALLOCPOINT ); + petrank = CHAR_getInt( toindex, CHAR_PETRANK ); + work[3] =(( LevelUpPoint >> 24 ) & 0xFF); + work[0] = (( LevelUpPoint >> 16 ) & 0xFF); + work[1] = (( LevelUpPoint >> 8 ) & 0xFF); + work[2] = (( LevelUpPoint >> 0 ) & 0xFF); + for( i=0; i<4; i++) { + type = ITEM_getInt( itemindex, (num + i)); + work[i] += type; + strcpy( buf1,"\0"); + if( work[i] > maxnums ) { + sprintf(buf1,"%s 已经达到最高了。", buf2[i]); + work[i] = maxnums; + }else if( work[i] < 0 ) { + sprintf(buf1,"%s 已经为零了。", buf2[i]); + work[i] = 0; + }else { + if( type > 0 ) { + if( type > 2 ) + sprintf(buf1,"%s %s %s", buf2[i], buf3[0], "。"); + else + sprintf(buf1,"%s %s %s", buf2[i], buf3[1], "。"); + }else if( type < 0 ){ + sprintf(buf1,"%s %s %s", buf2[i], buf3[2], "。"); + } + } + if( strcmp( buf1, "\0")) { + CHAR_talkToCli( charaindex, toindex, buf1, CHAR_COLORWHITE); + } + } + + LevelUpPoint = ( work[3]<< 24) + ( work[0]<< 16) + ( work[1]<< 8) + ( work[2]<< 0); + CHAR_setInt( toindex, CHAR_ALLOCPOINT, LevelUpPoint); + CHAR_setInt( toindex, CHAR_PETRANK, petrank); + LogPetPointChange( + CHAR_getChar( charaindex, CHAR_NAME ), + CHAR_getChar( charaindex, CHAR_CDKEY ), + CHAR_getChar( charaindex, CHAR_NAME), + toindex, 4, + CHAR_getInt( toindex, CHAR_LV), + "item_use", + CHAR_getInt( charaindex, CHAR_FLOOR), + CHAR_getInt( charaindex, CHAR_X ), + CHAR_getInt( charaindex, CHAR_Y ) + ); + } + + }else { + sprintf(buf1,"???"); + } + CHAR_DelItem( charaindex, haveitemindex); + return; +} +#endif + +void ITEM_useStatusChange( int charaindex, int toindex, int haveitemindex) +{ + int battlemode; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return ; //{撩 + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + if( battlemode == BATTLE_CHARMODE_INIT ){ + }else + if( battlemode ){ + ITEM_useStatusChange_Battle( charaindex, toindex, haveitemindex ); + }else{ + } + +} + +void ITEM_useStatusRecovery( int charaindex, int toindex, int haveitemindex) +{ + int battlemode; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return ; //{撩 + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + if( battlemode == BATTLE_CHARMODE_INIT ){ + }else + if( battlemode ){ + ITEM_useStatusRecovery_Battle( charaindex, toindex, haveitemindex ); + }else{ + } +} + +void ITEM_useMagicDef( int charaindex, int toindex, int haveitemindex) +{ + int battlemode; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return; + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + if( battlemode == BATTLE_CHARMODE_INIT ){ + }else + if( battlemode ){ + ITEM_useMagicDef_Battle( charaindex, toindex, haveitemindex ); + }else{ + } + +} + +void ITEM_useParamChange( int charaindex, int toindex, int haveitemindex) +{ + int battlemode; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return ; + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + if( battlemode == BATTLE_CHARMODE_INIT ){ + }else + if( battlemode ){ + ITEM_useParamChange_Battle( charaindex, toindex, haveitemindex ); + } +} + +void ITEM_useFieldChange( int charaindex, int toindex, int haveitemindex) +{ + int battlemode; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return ; + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + if( battlemode == BATTLE_CHARMODE_INIT ){ + }else + if( battlemode ){ + ITEM_useFieldChange_Battle( charaindex, toindex, haveitemindex ); + } +} + +void ITEM_useAttReverse( int charaindex, int toindex, int haveitemindex) +{ + int battlemode; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return; + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + if( battlemode == BATTLE_CHARMODE_INIT ){ + }else + if( battlemode ){ + ITEM_useAttReverse_Battle( charaindex, toindex, haveitemindex ); + }else{ + } +} + +void ITEM_useMic( int charaindex, int toindex, int haveitemindex) +{ + int battlemode; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return; + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + if( battlemode == BATTLE_CHARMODE_INIT ){ + }else + if( battlemode ){ + }else{ + ITEM_useMic_Field( charaindex, toindex, haveitemindex ); + } + +} + +void ITEM_useCaptureUp( int charaindex, int toindex, int haveitemindex) +{ + int battlemode; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return ; //{撩 + + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + if( battlemode == BATTLE_CHARMODE_INIT ){ + }else + if( battlemode ){ + ITEM_useCaptureUp_Battle( charaindex, toindex, haveitemindex ); + }else{ + } + +} + +#ifdef _PETSKILL_CANNEDFOOD +static void ITEM_usePetSkillCanned_PrintWindow( int charaindex, int flg) +{ + int fd; + char message[256], buf[2048]; + if( !CHAR_CHECKINDEX( charaindex )) return; + fd = getfdFromCharaIndex( charaindex); + if( fd == - 1 ) return; + + memset( message, 0, sizeof(message)); + sprintf( message, "%d", flg); + lssproto_WN_send( fd, WINDOWS_MESSAGETYPE_PETSKILLSHOW, + WINDOW_BUTTONTYPE_NONE, + ITEM_WINDOWTYPE_SELECTPETSKILL_SELECT, + -1, + makeEscapeString( message, buf, sizeof( buf))); +} + +void ITEM_usePetSkillCanned_WindowResult( int charaindex, int seqno, int select, char * data) +{ + int itemindex=-1, itemNo, petindex=-1, petNo; + int SkillNo, SkillID; + char buf1[256]; + char *skillarg=NULL; + + petNo = CHAR_getWorkInt( charaindex, CHAR_WORKRENAMEITEMNUM); + itemNo = CHAR_getWorkInt( charaindex, CHAR_WORKRENAMEITEMINDEX); + + + itemindex = CHAR_getItemIndex( charaindex, itemNo); + if( !ITEM_CHECKINDEX( itemindex) ) return; + petindex = CHAR_getCharPet( charaindex, petNo); + if( !CHAR_CHECKINDEX(petindex) ) return; + SkillNo = atoi( data); + if( SkillNo < 0 || SkillNo >= CHAR_MAXPETSKILLHAVE ) return; + + skillarg = ITEM_getChar( itemindex, ITEM_ARGUMENT); + SkillID = atoi( skillarg); + +#ifdef _CFREE_petskill + if( NPC_CHECKFREEPETSKILL( charaindex, petindex, SkillID) == FALSE ){ + CHAR_talkToCli( charaindex, -1, "该宠物无法学习此项技能!", CHAR_COLORYELLOW); + return; + } +#endif + + CHAR_setPetSkill( petindex, SkillNo, SkillID); + memset( buf1, 0, sizeof(buf1)); + snprintf( buf1, sizeof( buf1 ), "W%d", petNo); + CHAR_sendStatusString( charaindex, buf1 ); + CHAR_sendStatusString( charaindex, "P"); + { + int skillarray = PETSKILL_getPetskillArray( SkillID); + sprintf( buf1, "宠物%s学习%s,道具 %s消失了。", + CHAR_getUseName( petindex), PETSKILL_getChar( skillarray, PETSKILL_NAME), + ITEM_getChar( itemindex, ITEM_NAME) ); + } + + CHAR_talkToCli( charaindex, -1, buf1, CHAR_COLORYELLOW); + CHAR_setItemIndex( charaindex, itemNo ,-1); + CHAR_sendItemDataOne( charaindex, itemNo); + ITEM_endExistItemsOne( itemindex); +} + +#endif + +static void ITEM_useRenameItem_PrintWindow( int charaindex, int page) +{ + int fd; + int pos = 0; + int i; + int btntype = WINDOW_BUTTONTYPE_CANCEL; + char message[1024]; + char msgwk[1024]; + char buf[2048]; + + if( !CHAR_CHECKINDEX( charaindex )) return; + if( page < 0 || page > 3 ) { + print( "%s:%d err\n", __FILE__, __LINE__); + return; + } + fd = getfdFromCharaIndex( charaindex); + if( fd == - 1 ) return; + + snprintf( message, sizeof( message), + "2\n 要变更那个项目的名称呢\n" + " Page:%d\n", page +1); + + for( i = page *5; i < page *5 +5; i ++ ) { + int itemindex = CHAR_getItemIndex( charaindex, i); + BOOL flg = FALSE; + while( 1 ) { + char *cdkey; + if( !ITEM_CHECKINDEX( itemindex)) break; + cdkey = ITEM_getChar( itemindex, ITEM_CDKEY); + if( !cdkey) { + print( "%s:%d err\n", __FILE__, __LINE__); + break; + } + if( ITEM_getInt( itemindex, ITEM_MERGEFLG) != 1) break; + if( ITEM_getInt( itemindex, ITEM_TYPE) == ITEM_DISH) break; + if( ITEM_getInt( itemindex, ITEM_CRUSHLEVEL) != 0 ) break; + if( strlen( cdkey) != 0 ) { + if( strcmp( cdkey, CHAR_getChar( charaindex, CHAR_CDKEY)) != 0 ) { + break; + } + } + flg = TRUE; + break; + } + if( flg ) { + char *nm = ITEM_getChar( itemindex, ITEM_SECRETNAME); + char wk[256]; + if( pos +strlen( nm) +1 > sizeof( msgwk)) { + print( "buffer over error %s:%d\n", __FILE__, __LINE__); + break; + } + snprintf( wk, sizeof( wk), "%s\n", nm); + strncpy( &msgwk[pos], wk, sizeof( msgwk) -pos -1); + pos += strlen( wk); + } + else { + if( pos +2 > sizeof( msgwk)) { + print( "buffer over error %s:%d\n", __FILE__, __LINE__); + break; + } + strncpy( &msgwk[pos], "\n", sizeof( msgwk) -pos -1 ); + pos += 1; + } + } + strcat( message, msgwk); + switch( page){ + case 0: + btntype |= WINDOW_BUTTONTYPE_NEXT; + break; + case 3: + btntype |= WINDOW_BUTTONTYPE_PREV; + break; + case 1: + case 2: + btntype |= WINDOW_BUTTONTYPE_PREV|WINDOW_BUTTONTYPE_NEXT; + break; + } + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_SELECT, + btntype, + CHAR_WINDOWTYPE_SELECTRENAMEITEM_PAGE1+page, + -1, + makeEscapeString( message, buf, sizeof(buf))); +} + +void ITEM_useRenameItem( int charaindex, int toindex, int haveitemindex) +{ + + ITEM_useRenameItem_PrintWindow( charaindex, 0); + + CHAR_setWorkInt( charaindex, CHAR_WORKRENAMEITEMNUM, -1); + CHAR_setWorkInt( charaindex, CHAR_WORKRENAMEITEMINDEX, haveitemindex); +/* + char buf[256]; + int itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if( !ITEM_CHECKINDEX( itemindex) ) return; + sprintf( buf, "%s功能已被取消。", ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( charaindex, -1, "功能已被取消。", CHAR_COLORRED ); + + { + LogItem( + CHAR_getChar( charaindex, CHAR_NAME ), + CHAR_getChar( charaindex, CHAR_CDKEY ), + itemindex, + "魔术笔DEL", + CHAR_getInt( charaindex, CHAR_FLOOR), + CHAR_getInt( charaindex, CHAR_X ), + CHAR_getInt( charaindex, CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + } + + CHAR_setItemIndex( charaindex, haveitemindex, -1); + CHAR_sendItemDataOne( charaindex, haveitemindex); + ITEM_endExistItemsOne( itemindex ); +*/ +} + +void ITEM_useRenameItem_WindowResult( int charaindex, int seqno, int select, char * data) +{ + int page = 0; + int fd; + if( select == WINDOW_BUTTONTYPE_CANCEL) return; + + fd = getfdFromCharaIndex( charaindex); + if( fd == - 1 ) return; + if( seqno != CHAR_WINDOWTYPE_SELECTRENAMEITEM_RENAME ) { + if( select == WINDOW_BUTTONTYPE_NEXT ) page = 1; + else if( select == WINDOW_BUTTONTYPE_PREV ) page = -1; + if( select == WINDOW_BUTTONTYPE_NEXT || select == WINDOW_BUTTONTYPE_PREV ) { + int winno = seqno - CHAR_WINDOWTYPE_SELECTRENAMEITEM_PAGE1; + winno += page; + if( winno < 0 ) winno = 0; + if( winno > 3 ) winno = 3; + ITEM_useRenameItem_PrintWindow( charaindex, winno); + }else { + char message[1024]; + char buf[2048]; + char haveitemindex = CHAR_getWorkInt( charaindex, CHAR_WORKRENAMEITEMNUM); + int itemindex; + if( haveitemindex == -1 ) { + haveitemindex = (seqno - CHAR_WINDOWTYPE_SELECTRENAMEITEM_PAGE1) * 5 + + ( atoi(data)-1); + CHAR_setWorkInt( charaindex, CHAR_WORKRENAMEITEMNUM, haveitemindex); + } + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + + snprintf( message, sizeof( message), + "%s 名字要更改\n" + "请输入姓名\n" + "全形13个字, 半形26个字", + ITEM_getChar( itemindex, ITEM_NAME)); + + + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGEANDLINEINPUT, + WINDOW_BUTTONTYPE_OKCANCEL, + CHAR_WINDOWTYPE_SELECTRENAMEITEM_RENAME, + -1, + makeEscapeString( message, buf, sizeof(buf))); + + } + } + else { + BOOL flg = FALSE; + char message[1024]; + char buf[2048]; + while( 1 ) { + char *p; + if( strlen( data) > 26 || strlen( data) < 1) { + if( strlen( data) > 26 ) { + strcpy( message, "超过文字限制"); + }else { + strcpy( message, "请输入一个文字以上"); + } + break; + } + + // WON ADD 修正魔术笔改名问题 + flg = TRUE; + + for( p = data; *p ; p ++) { + if( *p == ' '){ + strcpy( message, "不可空白"); + flg = FALSE; + break; + } + if( strncmp( p, " ",2) == 0 ) { + strcpy( message, "不可空白"); + flg = FALSE; + break; + } + if( *p == '|'){ + strcpy( message, "不可有特殊符号"); + flg = FALSE; + break; + } + } + + break; + } + + + if( !flg ) { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + CHAR_WINDOWTYPE_SELECTRENAMEITEM_RENAME_ATTENTION, + -1, + makeEscapeString( message, buf, sizeof(buf))); + } + else { + char haveitemindex = CHAR_getWorkInt( charaindex, CHAR_WORKRENAMEITEMNUM); + int itemindex; + int renameitemindex; + int renameitemhaveindex; + int remain; + char msgbuf[128]; + + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if( !ITEM_CHECKINDEX( itemindex)) { + print( "%s %d err\n", __FILE__, __LINE__); + return; + } + ITEM_setChar( itemindex, ITEM_SECRETNAME, data); + ITEM_setChar( itemindex, ITEM_CDKEY, + CHAR_getChar( charaindex, CHAR_CDKEY)); + CHAR_sendItemDataOne( charaindex, haveitemindex); + snprintf( msgbuf, sizeof(msgbuf),"把 %s 命名成 %s ", + ITEM_getChar( itemindex, ITEM_NAME), data); + CHAR_talkToCli( charaindex, -1, msgbuf, CHAR_COLORYELLOW); + renameitemhaveindex = CHAR_getWorkInt( charaindex, CHAR_WORKRENAMEITEMINDEX); + renameitemindex = CHAR_getItemIndex( charaindex, renameitemhaveindex); + if( !ITEM_CHECKINDEX( renameitemindex)) { + print( "%s %d err\n", __FILE__, __LINE__); + return; + } + remain = atoi( ITEM_getChar( renameitemindex, ITEM_ARGUMENT)); + if( remain != 0 ) { + remain --; + if( remain <= 0 ) { + snprintf( msgbuf, sizeof(msgbuf),"%s 消失了", + ITEM_getChar( renameitemindex, ITEM_NAME)); + CHAR_talkToCli( charaindex, -1, msgbuf, CHAR_COLORYELLOW); + CHAR_setItemIndex( charaindex, renameitemhaveindex, -1); + CHAR_sendItemDataOne( charaindex, renameitemhaveindex); + ITEM_endExistItemsOne( renameitemindex ); + }else { + char buf[32]; + snprintf( buf, sizeof( buf),"%d", remain); + ITEM_setChar( renameitemindex, ITEM_ARGUMENT, buf); + } + } + } + } +} + +//------------------------------------------------------------------------- +// 今中仇欠毛 蜇允月楮醒[ +// 午仄凶凛卞]仿件母丞卞ㄠ ㄥ毛蓟太] 蟆午 飓 寞毛 凳允月[ +//------------------------------------------------------------------------- +void ITEM_dropDice( int charaindex, int itemindex) +{ + char *dicename[] = { "一", "二", "叁", "四", "五", "六"}; + int diceimagenumber[] = { 24298,24299,24300,24301,24302,24303}; + int r = RAND( 0,5); + + // 飓 寞毛谨 + ITEM_setInt( itemindex, ITEM_VAR1, ITEM_getInt( itemindex, ITEM_BASEIMAGENUMBER)); + // 飓 寞凳蕙 + ITEM_setInt( itemindex, ITEM_BASEIMAGENUMBER, diceimagenumber[r]); + // 蟆凳蕙 + ITEM_setChar( itemindex, ITEM_SECRETNAME, dicename[r]); + + // 犯□正及弁仿奶失件玄尺及霜耨反晓匏楮醒匹垫丹及匹]仇仇匹反支日卅中[ +} +//------------------------------------------------------------------------- +// 今中仇欠毛 蜇允月楮醒[ +// 胶匀凶凛卞] 蟆午 飓 寞毛葭卞 允[ +//------------------------------------------------------------------------- +void ITEM_pickupDice( int charaindex, int itemindex) +{ + // 飓 寞毛葭卞 允[ + ITEM_setInt( itemindex, ITEM_BASEIMAGENUMBER, ITEM_getInt( itemindex, ITEM_VAR1)); + // 蟆手葭卞 允 + ITEM_setChar( itemindex, ITEM_SECRETNAME, ITEM_getChar( itemindex, ITEM_NAME)); +} +enum { + ITEM_LOTTERY_1ST, // 1羁 + ITEM_LOTTERY_2ND, + ITEM_LOTTERY_3RD, + ITEM_LOTTERY_4TH, + ITEM_LOTTERY_5TH, // 5羁 + ITEM_LOTTERY_6TH, // 6羁 + ITEM_LOTTERY_NONE, // 陆木 + ITEM_LOTTERY_NUM, +}; +//------------------------------------------------------------------------- +// 旦疋□玉仁元互综日木月凛及楮醒[ +// 仇仇匹窒羁操卞卅月井毛瑁户月[ +// 割 反动票及骚曰[ + +#define PRE_6 (10000) +#define PRE_5 (1300 + PRE_6) +#define PRE_4 (600 + PRE_5) +#define PRE_3 (300 + PRE_4) +#define PRE_2 (8 + PRE_3) +#define PRE_1 (1 + PRE_2) + + +//#define PRE_5 (13000) +//#define PRE_4 (2300 + PRE_5) +//#define PRE_3 (540 + PRE_4) +//#define PRE_2 (8 + PRE_3) +//#define PRE_1 (1 + PRE_2) + + +//#define PRE_5 (16000) +//#define PRE_4 (2500 + PRE_5) +//#define PRE_3 (400 + PRE_4) +//#define PRE_2 (10 + PRE_3) +//#define PRE_1 (1 + PRE_2) +//#define PRE_5 (27000) +//#define PRE_4 (4000 + PRE_5) +//#define PRE_3 (400 + PRE_4) +//#define PRE_2 (10 + PRE_3) +//#define PRE_1 (1 + PRE_2) +// +//------------------------------------------------------------------------- +BOOL ITEM_initLottery(ITEM_Item* itm) +{ + int r = RAND( 0, 49999); + int hit = ITEM_LOTTERY_NONE; // + char result[7]; // 请 + int countnum[6]; + int count; + int i; + int len; + // 域荚综匀化月及匹[疯粟 仄凶凛午井卞综曰卅云今木卅中方丹卞[ + if( itm->data[ITEM_VAR3] == 1 ) return TRUE; + + // 铲蓟允月[ + if( r < PRE_6 ) hit = ITEM_LOTTERY_6TH; + else if( r < PRE_5 ) hit = ITEM_LOTTERY_5TH; + else if( r < PRE_4 ) hit = ITEM_LOTTERY_4TH; + else if( r < PRE_3 ) hit = ITEM_LOTTERY_3RD; + else if( r < PRE_2 ) hit = ITEM_LOTTERY_2ND; + else if( r < PRE_1 ) hit = ITEM_LOTTERY_1ST; + else hit = ITEM_LOTTERY_NONE; + + // 请 毛瑁烂允月[ + count = 0; + memset( countnum, 0, sizeof( countnum)); + if( hit != ITEM_LOTTERY_NONE ) { + // 癫曰毛本永玄 + result[0] = result[1] = result[2] = hit+1; + count = 3; + countnum[hit] = 3; + } + while( count < 6 ) { + int r = RAND( ITEM_LOTTERY_1ST, ITEM_LOTTERY_6TH); + if( countnum[r] >= 2 ) continue; + // 2/3仁日中及割 匹]职及陆木钓 毛伉□民今六化支月[ + // 升五升五[ + if( ( hit != ITEM_LOTTERY_NONE && count == 3 ) + || ( hit == ITEM_LOTTERY_NONE && count == 0 ) ) + { + if( RAND( 0,2)) { + result[count] = result[count+1] = r+1; + countnum[r] += 2; + count += 2; + continue; + } + } + countnum[r] ++; + result[count] = r+1; + count++; + } + // 请 毛扑乓永白伙允月[ + // 癫曰及凛反2/3及割 匹]癫曰醒侬毛域 欠卞裔烂允月[ + // 玉平玉平躲绊毛谎丹啃[ + len = sizeof( result)-2; + if( hit != ITEM_LOTTERY_NONE ) { + if( RAND( 0,2) ) { + // 癫曰醒侬毛域 欠卞[ + char s = result[0]; + result[0] = result[5]; + result[5] = s; + len = sizeof( result)-3; + } + } + for( i = 0; i < 10; i ++) { + int x = RAND( 0, len); + int y = RAND( 0, len); + int s; + s = result[x]; + result[x] = result[y]; + result[y] = s; + } + // 及凶户] 侬 健中卞仄化云仁[ + result[sizeof(result)-1] = '\0'; + itm->data[ITEM_VAR1] = hit; + // 户仁匀凶市它件玄 + itm->data[ITEM_VAR2] = 0; + itm->data[ITEM_VAR3] = 1; + memcpy( itm->string[ITEM_ARGUMENT].string, result, sizeof( result)); + + return TRUE; +} +//------------------------------------------------------------------------- +// 旦疋□玉仁元毛银匀凶凛及楮醒[ +// ㄥ荚银丹午]窒羁操井及失奶 丞卞 祭允月[ +//------------------------------------------------------------------------- +void ITEM_useLottery( int charaindex, int toindex, int haveitemindex) +{ + int i,j; + int itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + int count = ITEM_getInt( itemindex, ITEM_VAR2); + int hit = ITEM_getInt( itemindex, ITEM_VAR1); + char buff[1024]; + char num[6][3] = { {"迭"},{"迫"},{"迤"},{"迨"},{"郊"}, {"郎"}}; + char numbuff[128]; + char *n; + int result; + BOOL flg; + if( !ITEM_CHECKINDEX( itemindex) ) return; + if( count == 0 ) { + ITEM_setChar( itemindex, ITEM_EFFECTSTRING, ""); + } + // ㄥ荚 及银迕反]陆木仄井丐曰 卅中及匹]仇仇匹失奶 丞毛壅允 + else if( count == 6 ) { + CHAR_setItemIndex( charaindex , haveitemindex, -1 ); + CHAR_sendItemDataOne( charaindex, haveitemindex); + ITEM_endExistItemsOne( itemindex ); + return; + } + n = ITEM_getChar( itemindex, ITEM_ARGUMENT); + // for debug +#if 0 + snprintf( buff, sizeof( buff), "羁操“%d 请 : %d%d%d%d%d%d", + hit, + (int)(n[0]+1),(int)(n[1]+1), + (int)(n[2]+1),(int)(n[3]+1), + (int)(n[4]+1),(int)(n[5]+1) + ); + CHAR_talkToCli( charaindex, -1, + buff, CHAR_COLORYELLOW ); +#endif + result = (int)n[count]-1; + // 伉□民井譬屯月 + flg = FALSE; + for( i = 0; i < count+1 && flg == FALSE; i ++ ) { + for( j = i+1; j < count+1 && flg == FALSE; j ++ ) { + if( i != j ) { + if( n[i] == n[j] ) { + flg = TRUE; + } + } + } + } + memset( numbuff, 0, sizeof( numbuff)); + memcpy( numbuff, ITEM_getChar( itemindex, ITEM_EFFECTSTRING), (count)*2); + // 躲绊 侬 卞]请 毛请允[ + snprintf( buff, sizeof( buff), "%s%s", numbuff, num[result]); + count ++; + ITEM_setInt( itemindex, ITEM_VAR2, count); + // ㄥ荚 匹癫曰卅日癫曰失奶 丞卞 凳]陆木卅日陆木午 憎] + // 戚荚母皮伙弁伉永弁匹壅允[ + if( count >= 6 ) { + // 癫曰 + if( hit != ITEM_LOTTERY_NONE ) { + int newitemindex; + char strbuff[1024]; + char msgbuff[1024]; + // 壅仄化 + CHAR_setItemIndex( charaindex , haveitemindex, -1 ); + ITEM_endExistItemsOne( itemindex ); + // 2729 - 2734 反 仁元及1 6羁 + newitemindex = ITEM_makeItemAndRegist( 2729 + hit); + CHAR_setItemIndex( charaindex , haveitemindex, newitemindex ); + // 请 手戊疋□ + snprintf( strbuff, sizeof( strbuff), "%s %s", buff, + ITEM_getChar( newitemindex, ITEM_EFFECTSTRING)); + ITEM_setChar( newitemindex, ITEM_EFFECTSTRING, strbuff); + CHAR_sendItemDataOne( charaindex, haveitemindex); + snprintf( msgbuff, sizeof( msgbuff), "中了第%d奖", hit+1 ); + CHAR_talkToCli( charaindex, -1, + msgbuff, + CHAR_COLORYELLOW ); + } + // 陆木 + else { +// CHAR_setItemIndex( charaindex , haveitemindex, -1 ); + // 请 手戊疋□ + char strbuff[1024]; + snprintf( strbuff, sizeof( strbuff), "%s 没中,下次再来", buff); + ITEM_setChar( itemindex, ITEM_EFFECTSTRING, strbuff); + CHAR_sendItemDataOne( charaindex, haveitemindex); +// ITEM_endExistItemsOne( itemindex ); +// CHAR_talkToCli( charaindex, -1, +// "反内木″", +// CHAR_COLORWHITE ); + } + } + // 公丹元扎 中凛反]犯□正毛霜曰卅云允分仃[ + else { + char strbuff[1024]; + if( flg) { + // 旦矢□旦煌遥 + // 失奶 丞及 及戊丢件玄反]ㄠ垫ㄡㄧ 侬匹] + // 旦矢□旦毛银匀化荼垫仄化中月[ + int spc = 16 + ( 6-count)*2; + char space[17]; + memset( space, ' ', spc); + space[spc] = '\0'; + snprintf( strbuff, sizeof( strbuff), "%s%s快中了", buff, space); + } + else { + strcpy( strbuff, buff); + } + ITEM_setChar( itemindex, ITEM_EFFECTSTRING, strbuff); + CHAR_sendItemDataOne( charaindex, haveitemindex); + } +} + +void ITEM_WarpDelErrorItem( int charaindex ) +{ + int j; + for(j=0; j= 12 ){ + CHAR_talkToCli(charaindex, -1, "此处无法使用。", CHAR_COLORYELLOW); + return; + } + + memset( buf, 0, sizeof( buf)); + sprintf( buf, "%d %d %d %d", flg, Mf, Mx, My); + ITEM_setChar(itemindex, ITEM_ARGUMENT, buf); + ITEM_setInt( itemindex, ITEM_DAMAGEBREAK, usenum); + sprintf( buf, "飞行纪录点(%s,%d,%d)", MapString[i], Mx, My); + ITEM_setChar( itemindex, ITEM_EFFECTSTRING, buf); + CHAR_talkToCli(charaindex, -1, buf, CHAR_COLORYELLOW); + CHAR_sendItemDataOne( charaindex, haveitemindex); + } + + // WON ADD + if( ITEM_WarpForAny(charaindex, haveitemindex, ff, fx, fy, flg) == FALSE ) + return; +} +#endif + +// Robin 0707 petFollow +void ITEM_petFollow( int charaindex, int toindex, int haveitemindex ) +{ + char *arg; + int itemindex, followLv, haveindex, i; + //print(" PetFollow_toindex:%d ", toindex); + if( CHAR_getWorkInt( charaindex, CHAR_WORKPETFOLLOW ) != -1 ){ + if( CHAR_CHECKINDEX( CHAR_getWorkInt( charaindex, CHAR_WORKPETFOLLOW ) ) ){ + CHAR_talkToCli( charaindex, -1, "请先收回放出的宠物!", CHAR_COLORWHITE ); + return; + } + CHAR_setWorkInt( charaindex, CHAR_WORKPETFOLLOW, -1); + } +#ifdef _FIX_METAMORIDE + if( CHAR_CHECKJOINENEMY( charaindex) == TRUE ){ + CHAR_talkToCli( charaindex, -1, "搭乘中无法使用!", CHAR_COLORWHITE ); + return; + } +#endif + + if( CHAR_CHECKINDEX( toindex ) == FALSE ) return; + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + arg = ITEM_getChar(itemindex, ITEM_ARGUMENT ); + if( arg == NULL )return; + + if( sscanf( arg, "%d", &followLv) != 1 ) + return; + if( CHAR_getInt( toindex, CHAR_LV ) > followLv ){ + CHAR_talkToCli( charaindex, -1, "道具的等级不足!", CHAR_COLORWHITE ); + return; + } + if( CHAR_getWorkInt( toindex, CHAR_WORKFIXAI ) < 80 ) + { + //CHAR_talkToCli( charaindex, -1, "宠物的忠诚度不足!", CHAR_COLORWHITE ); + //return; + } + + + haveindex = -1; + for( i = 0; i < 5; i++ ) + { + if( CHAR_getCharPet( charaindex, i) == toindex ) { + haveindex = i; + break; + } + } + if( haveindex == -1) return; + + + if( !PET_dropPetFollow( charaindex, haveindex, -1, -1, -1 ) ) { + CHAR_talkToCli( charaindex, -1, "宠物跟随失败!", CHAR_COLORWHITE ); + return; + } + +} + +// Nuke start 0624: Hero's bless +void ITEM_useSkup( int charaindex, int toindex, int haveitemindex) +{ + int itemindex; + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + CHAR_setInt(charaindex,CHAR_SKILLUPPOINT, + CHAR_getInt(charaindex,CHAR_SKILLUPPOINT)+1); + CHAR_Skillupsend(charaindex); + CHAR_talkToCli(charaindex, -1, "你感受到自己的能力被提升了。", CHAR_COLORWHITE); + + CHAR_DelItem( charaindex, haveitemindex); +} +// Nuke end +extern void setNoenemy(); +// Nuke start 0626: Dragon's bless +void ITEM_useNoenemy( int charaindex, int toindex, int haveitemindex) +{ + int itemindex,fd; + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + fd=CHAR_getWorkInt( charaindex, CHAR_WORKFD); + setNoenemy(fd); + CHAR_talkToCli(charaindex, -1, "你感受到周边的杀气消失了。", CHAR_COLORWHITE); + CHAR_DelItem( charaindex, haveitemindex); + +} +// Nuke end + +// Arminius 7.2: Ra's amulet +void ITEM_equipNoenemy( int charaindex, int itemindex ) +{ + char buf[4096]; + int evadelevel; + int fl,fd; + + if( ITEM_CHECKINDEX(itemindex) == FALSE )return; + + if( ITEM_getArgument( ITEM_getChar(itemindex,ITEM_ARGUMENT),"noen", buf, sizeof(buf) ) + == FALSE ){ + return; + } + + evadelevel=atoi(buf); + fl=CHAR_getInt(charaindex, CHAR_FLOOR); + fd=CHAR_getWorkInt( charaindex, CHAR_WORKFD); + if (evadelevel>=200) { + setEqNoenemy(fd, 200); + CHAR_talkToCli(charaindex, -1, "一道奇异的光芒隐藏了你的行踪。", CHAR_COLORWHITE); + return; + } else if (evadelevel>=120) { + setEqNoenemy(fd, 120); + + if ( (fl==100)||(fl==200)||(fl==300)||(fl==400)||(fl==500) ){ + CHAR_talkToCli(charaindex, -1, "一道奇异的光芒隐藏了你的行踪。", CHAR_COLORWHITE); + return; + } + } else if (evadelevel>=80) { + setEqNoenemy(fd, 80); + if ( (fl==100)||(fl==200)||(fl==300)||(fl==400) ){ + + CHAR_talkToCli(charaindex, -1, "一道奇异的光芒隐藏了你的行踪。", CHAR_COLORWHITE); + return; + } + } else if (evadelevel>=40) { + setEqNoenemy(fd, 40); + if ( (fl==100)||(fl==200) ) { + CHAR_talkToCli(charaindex, -1, "一道奇异的光芒隐藏了你的行踪。", CHAR_COLORWHITE); + return; + } + } + CHAR_talkToCli(charaindex, -1, "什麽事也没有发生。", CHAR_COLORWHITE); +} + +#ifdef _Item_MoonAct +void ITEM_randEnemyEquipOne( int charaindex, int toindex, int haveitemindex) +{ + int itemindex, RandNum=0; + char buf[256]; + + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if( !ITEM_CHECKINDEX( itemindex)) return; + + if( ITEM_getArgument( ITEM_getChar( itemindex,ITEM_ARGUMENT), "rand", buf, sizeof(buf) ) == FALSE ){ + return; + } + + if( (RandNum=atoi( buf)) > 0 ){ + int fd = CHAR_getWorkInt( charaindex, CHAR_WORKFD); + setEqRandenemy(fd, RandNum); + CHAR_talkToCli(charaindex, -1, "遇敌率降低了。", CHAR_COLORWHITE); + sprintf( buf, "道具 %s消失了。", ITEM_getChar( itemindex, ITEM_NAME) ); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + CHAR_DelItem( charaindex, haveitemindex); + return; + } + + +} + +void ITEM_randEnemyEquip( int charaindex, int itemindex) +{ + char buf[4096]; + int RandNum=0; + int fd; + + if( ITEM_CHECKINDEX(itemindex) == FALSE )return; + if( ITEM_getArgument( ITEM_getChar(itemindex,ITEM_ARGUMENT),"rand", buf, sizeof(buf) ) + == FALSE ){ + return; + } + + RandNum=atoi( buf); + fd=CHAR_getWorkInt( charaindex, CHAR_WORKFD); + if (RandNum > 0 ) { + setEqRandenemy(fd, RandNum); + CHAR_talkToCli(charaindex, -1, "遇敌率降低了。", CHAR_COLORWHITE); + return; + } + +} +void ITEM_RerandEnemyEquip( int charaindex, int itemindex) +{ + int RandNum=0; + int fd; + + if( ITEM_CHECKINDEX(itemindex) == FALSE )return; + + fd=CHAR_getWorkInt( charaindex, CHAR_WORKFD); + RandNum = getEqRandenemy( fd); + + if (RandNum > 0 ) { + clearEqRandenemy( fd); + CHAR_talkToCli(charaindex, -1, "遇敌率回复。", CHAR_COLORWHITE); + return; + } +} +#endif + +#ifdef _ITEM_WATERWORDSTATUS +void ITEM_WaterWordStatus( int charaindex, int toindex, int haveitemindex) +{ + int itemindex; + char itemarg[256]; + + if( !CHAR_CHECKINDEX( charaindex) ){ + return; + } + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if( !ITEM_CHECKINDEX( itemindex) ){ + return; + } + + if( ITEM_getArgument( ITEM_getChar( itemindex, ITEM_ARGUMENT),"time", itemarg, sizeof(itemarg) ) != FALSE ){ + char token[256]; + int nums = CHAR_getWorkInt( charaindex, CHAR_WORKSTATUSWATER); + if( nums < 0 ) nums = 0; + if( nums > 0 ){ + CHAR_talkToCli( charaindex, -1, "水中呼吸时间不得累积。", CHAR_COLORYELLOW); + return; + } + CHAR_setWorkInt( charaindex, CHAR_WORKSTATUSWATER, nums+atoi(itemarg)); + CHAR_setItemIndex(charaindex, haveitemindex ,-1); + CHAR_sendItemDataOne( charaindex, haveitemindex); + ITEM_endExistItemsOne(itemindex); + + sprintf( token, "水中呼吸时间增加%d分,总计%d分。", atoi(itemarg), + CHAR_getWorkInt( charaindex, CHAR_WORKSTATUSWATER)); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW); + }else{ + CHAR_talkToCli(charaindex, -1, "什麽事也没发生。", CHAR_COLORYELLOW); + } +} +#endif + +#ifdef _CHIKULA_STONE +void ITEM_ChikulaStone( int charaindex, int toindex, int haveitemindex) +{ + int itemindex,fd; + char itemarg[256]; + + if( !CHAR_CHECKINDEX( charaindex) ) return; + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if( !ITEM_CHECKINDEX( itemindex) ) return; + + fd = CHAR_getWorkInt( charaindex, CHAR_WORKFD); + CHAR_setWorkInt( charaindex, CHAR_WORKCHIKULAHP, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORKCHIKULAMP, 0 ); + setChiStone( fd, 0); //1hp 2mp + + if( ITEM_getArgument( ITEM_getChar( itemindex, ITEM_ARGUMENT),"hp", itemarg, sizeof(itemarg) ) != FALSE ){ + setChiStone( fd, 1); + CHAR_setWorkInt( charaindex, CHAR_WORKCHIKULAHP, atoi( itemarg) ); + }else if( ITEM_getArgument( ITEM_getChar( itemindex, ITEM_ARGUMENT),"mp", itemarg, sizeof(itemarg) ) != FALSE ){ + setChiStone( fd, 2); + CHAR_setWorkInt( charaindex, CHAR_WORKCHIKULAMP, atoi( itemarg) ); + }else{ + } + + CHAR_talkToCli(charaindex, -1, "接受奇克拉的祝福。", CHAR_COLORWHITE); + CHAR_setItemIndex(charaindex, haveitemindex ,-1); + CHAR_sendItemDataOne( charaindex, haveitemindex); + ITEM_endExistItemsOne(itemindex); +} +#endif + +#ifdef _ITEM_ORNAMENTS +void ITEM_PutOrnaments( int charaindex, int itemindex) +{ + char *arg=NULL; + char itemname[256]; + int bbnums=0; + if( !CHAR_CHECKINDEX( charaindex) ) return; + if( !ITEM_CHECKINDEX( itemindex) ) return; + arg = ITEM_getChar( itemindex, ITEM_ARGUMENT); + if( arg == NULL ) return;//ITEM_BASEIMAGENUMBER + bbnums = atoi( arg); + ITEM_setInt( itemindex, ITEM_BASEIMAGENUMBER, bbnums); + ITEM_setWorkInt( itemindex, ITEM_CANPICKUP, 1); + + sprintf( itemname,"%s%s%s",CHAR_getChar( charaindex, CHAR_NAME), "的", ITEM_getChar( itemindex, ITEM_SECRETNAME)); + ITEM_setChar( itemindex, ITEM_SECRETNAME, itemname); +} +#endif + +#ifdef _SUIT_ITEM + +/* +#ifdef _SUIT_TWFWENDUM + #define MAX_SUITTYPE 18 +#else + #ifdef _SUIT_ADDENDUM + #define MAX_SUITTYPE 14 + #else + #ifdef _MAGIC_RESIST_EQUIT // WON ADD 职业抗性装备 + #define MAX_SUITTYPE 11 + #else + #define MAX_SUITTYPE 8 + #endif//_MAGIC_RESIST_EQUIT + #endif//_SUIT_ADDENDUM +#endif//_SUIT_TWFWENDUM +*/ +void ITEM_CheckSuitEquip( int charaindex) +{ + int i, j, itemindex, defCode=-1, same=0; + int nItem[CHAR_STARTITEMARRAY]; + int maxitem; + struct tagIntSuit{ + char fun[256]; + int intfun; //CHAR_getInt + }; + struct tagIntSuit ListSuit[]={ + {"VIT",CHAR_WORKSUITVIT}, + {"FSTR",CHAR_WORKSUITMODSTR}, + {"MSTR",CHAR_WORKSUITSTR}, + {"MTGH",CHAR_WORKSUITTGH}, + {"MDEX",CHAR_WORKSUITDEX}, + {"WAST",CHAR_WORKSTATUSWATER}, + {"HP", CHAR_WORKROUNDHP}, + {"MP", CHAR_WORKROUNDMP} +#ifdef _MAGIC_RESIST_EQUIT // WON ADD 职业抗性装备 + ,{"FRES", CHAR_WORK_F_SUIT}, + {"IRES", CHAR_WORK_I_SUIT}, + {"TRES", CHAR_WORK_T_SUIT} +#endif +#ifdef _SUIT_ADDENDUM + ,{"RESIST",CHAR_WORKRESIST}, //异常抗性率 + {"COUNTER",CHAR_WORKCOUNTER}, //反击率 + {"M_POW",CHAR_WORKMPOWER} //加强法师的魔法 +#endif +#ifdef _SUIT_TWFWENDUM + ,{"EARTH",CHAR_WORK_EA}, //地 + {"WRITER",CHAR_WORK_WR}, //水 + {"FIRE",CHAR_WORK_FI}, //火 + {"WIND",CHAR_WORK_WI} //风 +#endif +#ifdef _SUIT_ADDPART3 + ,{"WDUCKPOWER",CHAR_WORKDUCKPOWER},//套装回避 + {"RENOCASE",CHAR_WORKRENOCAST}, //沉默抗性率 + {"SUITSTRP",CHAR_WORKSUITSTR_P},//攻提升 单位为% + {"SUITTGH_P",CHAR_WORKSUITTGH_P},//防提升 单位为% + {"SUITDEXP",CHAR_WORKSUITDEX_P}//敏提升 单位为% +#endif +#ifdef _SUIT_ADDPART4 + ,{"SUITPOISON",CHAR_SUITPOISON},//带毒装备 + {"M2_POW",CHAR_WORKMPOWER2}, //加强法师的魔法,与M_POW功能相同(机率30%) + {"UN_POW_M",CHAR_WORKUNMPOWER} //抵抗法师的魔法 +#endif + }; + maxitem = sizeof(ListSuit)/sizeof(ListSuit[0]); + CHAR_setWorkInt( charaindex, CHAR_WORKSUITITEM, 0); + for( i=0; i=0; k-- ){ + if( nItem[i] == nItem[k] ) same++; + } + if( same >= 3 && nItem[i] != 0 )defCode = nItem[i]; + } + if( defCode == -1 ) return; + CHAR_setWorkInt( charaindex, CHAR_WORKSUITITEM, defCode); + for( i=0; i=200) { + CHAR_talkToCli(charaindex, -1, "环绕着你的光芒消失了。", CHAR_COLORWHITE); + return; + } else if (el>=120) { + if ( (fl==100)||(fl==200)||(fl==300)||(fl==400)||(fl==500) ) { + CHAR_talkToCli(charaindex, -1, "环绕着你的光芒消失了。", CHAR_COLORWHITE); + return; + } + } else if (el>=80) { + if ( (fl==100)||(fl==200)||(fl==300)||(fl==400) ) { + CHAR_talkToCli(charaindex, -1, "环绕着你的光芒消失了。", CHAR_COLORWHITE); + return; + } + } else if (el>=40) { + if ( (fl==100)||(fl==200) ) { + CHAR_talkToCli(charaindex, -1, "环绕着你的光芒消失了。", CHAR_COLORWHITE); + return; + } + } + CHAR_talkToCli(charaindex, -1, "什麽事也没有发生。", CHAR_COLORWHITE); +} + +extern void setStayEncount(int fd); +void ITEM_useEncounter( int charaindex, int toindex, int haveitemindex) +{ + int itemindex,fd; + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + + fd=CHAR_getWorkInt( charaindex, CHAR_WORKFD); + setStayEncount(fd); +#ifdef _USER_CHARLOOPS + { + Char *ch; + ch = CHAR_getCharPointer( charaindex); + if( ch == NULL ) return; + strcpysafe( ch->charfunctable[CHAR_LOOPFUNCTEMP1].string, + sizeof( ch->charfunctable[CHAR_LOOPFUNCTEMP1]), "CHAR_BattleStayLoop");//战斗 + CHAR_setInt( charaindex, CHAR_LOOPINTERVAL, 2500); + CHAR_constructFunctable( charaindex); + } +#endif + CHAR_talkToCli(charaindex, -1, "你感受到周边突然充满了杀气!", CHAR_COLORYELLOW); + CHAR_DelItem( charaindex, haveitemindex); + +} + +#ifdef _DEATH_CONTENDWATCH +void ITEM_useWatchBattle( int charaindex, int toindex, int haveitemindex) +{ + int itemindex,fd; + int battleTi; + char buf1[256]; + char *itemarg=NULL; + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + if( (itemarg = ITEM_getChar( itemindex, ITEM_ARGUMENT)) == NULL ) return; + battleTi = atoi( itemarg); + fd = CHAR_getWorkInt( charaindex, CHAR_WORKFD); + + { + ArrangeBattleC *aBo=NULL; + ArrangeBattleC *aB1=NULL; + ArrangeBattleC *aB2=NULL; + + if( battleTi<0 || battleTi>MAXBATTLEPAGE ) return; + if( (aBo=ArrangeBattleC_getInBattleArray( battleTi)) == NULL){ + sprintf( buf1, "目前场%d并没有竞赛。", battleTi); + CHAR_talkToCli(charaindex, -1, buf1, CHAR_COLORYELLOW); + return; + } + + if( (aB1=aBo->next[0]) == NULL || + (aB2=aBo->next[1]) == NULL || + !CHAR_CHECKINDEX( aB1->toindex) || + !CHAR_CHECKINDEX( aB2->toindex) || + CHAR_getWorkInt( aB1->toindex, CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE || + CHAR_getWorkInt( aB2->toindex, CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE ){ + + sprintf( buf1, "目前场%d尚未开始战斗。", battleTi); + CHAR_talkToCli(charaindex, -1, buf1, CHAR_COLORYELLOW); + return; + } + + if( BATTLE_WatchEntry( charaindex, aB1->toindex) ){ + + }else{ + sprintf( buf1, "观战失败!", battleTi); + CHAR_talkToCli(charaindex, -1, buf1, CHAR_COLORYELLOW); + return; + } + } + + sprintf( buf1, "道具 %s消失了。", ITEM_getChar( itemindex, ITEM_NAME) ); + CHAR_talkToCli(charaindex, -1, buf1, CHAR_COLORYELLOW); + CHAR_DelItem( charaindex, haveitemindex); +} +#endif + +#ifdef _Item_DeathAct +void ITEM_UseDeathCounter( int charaindex, int toindex, int haveitemindex) +{ + int itemindex,fd; + int itemmaxuse=-1; + char buf1[256]; + char *itemarg; + char itemnumstr[32]; + int okfloor = 0; + BOOL Useflag=FALSE; + int i = 1; + + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + +#ifdef _ITEM_STONE + itemarg = ITEM_getChar(itemindex,ITEM_ARGUMENT); + while(1){ + if( getStringFromIndexWithDelim( itemarg, "|", i , itemnumstr, sizeof( itemnumstr)) == FALSE ) + break; + okfloor = atoi(itemnumstr); + if( CHAR_getInt( charaindex, CHAR_FLOOR ) == okfloor ){ + Useflag = TRUE; + break; + } + i++; + } + if(okfloor != 0){ // 奇怪的石头 + itemmaxuse = ITEM_getInt( itemindex, ITEM_DAMAGEBREAK); + if( itemmaxuse != -1 ) { + itemmaxuse--; + ITEM_setInt( itemindex, ITEM_DAMAGEBREAK, itemmaxuse); + if( itemmaxuse < 1 ) { + sprintf( buf1, "%s消失了。", ITEM_getChar( itemindex, ITEM_NAME) ); + CHAR_talkToCli(charaindex, -1, buf1, CHAR_COLORYELLOW); + CHAR_DelItem( charaindex, haveitemindex); + if(Useflag==FALSE) { + CHAR_talkToCli(charaindex, -1, "没有发生任何事情!", CHAR_COLORYELLOW); + return; + } + }else{ + sprintf( buf1, "原地遇敌,可使用次数剩馀%d次。", itemmaxuse); + ITEM_setChar( itemindex, ITEM_EFFECTSTRING, buf1); + CHAR_sendItemDataOne( charaindex, haveitemindex); + if(Useflag==FALSE) { + CHAR_talkToCli(charaindex, -1, "没有发生任何事情!", CHAR_COLORYELLOW); + return; + } + } + fd = CHAR_getWorkInt( charaindex, CHAR_WORKFD); + setStayEncount(fd); + CHAR_talkToCli(charaindex, -1, "你身边笼罩阴暗气息!", CHAR_COLORYELLOW); + }else{ + sprintf( buf1, "%s消失了。", ITEM_getChar( itemindex, ITEM_NAME) ); + CHAR_talkToCli(charaindex, -1, buf1, CHAR_COLORYELLOW); + CHAR_DelItem( charaindex, haveitemindex); + if(Useflag==FALSE) { + CHAR_talkToCli(charaindex, -1, "没有发生任何事情!", CHAR_COLORYELLOW); + return; + } + fd = CHAR_getWorkInt( charaindex, CHAR_WORKFD); + setStayEncount(fd); + CHAR_talkToCli(charaindex, -1, "你身边笼罩阴暗气息!", CHAR_COLORYELLOW); + } + }else{ //恶魔宝石 +#endif +#ifdef _ITEM_MAXUSERNUM + itemmaxuse = ITEM_getInt( itemindex, ITEM_DAMAGEBREAK); + if( itemmaxuse != -1 ) { + itemmaxuse--; + ITEM_setInt( itemindex, ITEM_DAMAGEBREAK, itemmaxuse); + if( itemmaxuse < 1 ) { + sprintf( buf1, "道具 %s消失了。", ITEM_getChar( itemindex, ITEM_NAME) ); + CHAR_talkToCli(charaindex, -1, buf1, CHAR_COLORYELLOW); + CHAR_DelItem( charaindex, haveitemindex); + }else{ + sprintf( buf1, "原地遇敌,可使用次数剩馀%d次。", itemmaxuse); + ITEM_setChar( itemindex, ITEM_EFFECTSTRING, buf1); + CHAR_sendItemDataOne( charaindex, haveitemindex); + } + fd = CHAR_getWorkInt( charaindex, CHAR_WORKFD); + setStayEncount(fd); + CHAR_talkToCli(charaindex, -1, "你感受到周边突然充满了杀气!", CHAR_COLORYELLOW); + }else{ + CHAR_DelItem( charaindex, haveitemindex); + return; + } +#else + fd = CHAR_getWorkInt( charaindex, CHAR_WORKFD); + setStayEncount(fd); + sprintf( buf1, "道具 %s消失了。", ITEM_getChar( itemindex, ITEM_NAME) ); + CHAR_talkToCli(charaindex, -1, buf1, CHAR_COLORYELLOW); + CHAR_DelItem( charaindex, haveitemindex); +#endif +#ifdef _ITEM_STONE + } +#endif +#ifdef _USER_CHARLOOPS + { + Char *ch; + ch = CHAR_getCharPointer( charaindex); + if( ch == NULL ) return; + strcpysafe( ch->charfunctable[CHAR_LOOPFUNCTEMP1].string, + sizeof( ch->charfunctable[CHAR_LOOPFUNCTEMP1]), "CHAR_BattleStayLoop");//战斗 + CHAR_setInt( charaindex, CHAR_LOOPINTERVAL, 2500); + CHAR_constructFunctable( charaindex); + } +#endif +} +#endif + +#ifdef _CHRISTMAS_REDSOCKS +void ITEM_useMaxRedSocks( int charaindex, int toindex, int haveitemindex) +{ + int itemtimes = -1, itemindex; + char *itemarg=NULL; + int present[13]={ 13061, 13062, 13063, 13064, 13088, 13089, 13090, 13091, //1. + 14756, 17256, + 13092,19692,20594}; + int nowtimes = time( NULL); + + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + + itemarg = ITEM_getChar( itemindex, ITEM_ARGUMENT); + if( itemarg == NULL ) { + CHAR_talkToCli(charaindex, -1, "道具无效!", CHAR_COLORYELLOW); + return; + } + itemtimes = atoi( itemarg); + if( nowtimes >= itemtimes && nowtimes <= itemtimes+(60*60*24) ){ //限制时间内可换礼物 + int si=0, ret; + char token[256]; + //删除 + CHAR_setItemIndex(charaindex, haveitemindex ,-1); + CHAR_sendItemDataOne( charaindex, haveitemindex); + ITEM_endExistItemsOne(itemindex); + itemindex = -1; + //新增 + si = rand()%100; + if( si > 70 ){ + si = rand()%3+10; + }else if( si > 60 ){ + si = rand()%2+8; + }else { + si = rand()%8; + } + itemindex = ITEM_makeItemAndRegist( present[ si]); + if( !ITEM_CHECKINDEX( itemindex)){ + CHAR_talkToCli(charaindex, -1, "礼物无效!", CHAR_COLORYELLOW); + return; + } + ret = CHAR_addItemSpecificItemIndex( charaindex, itemindex); + if( ret < 0 || ret >= CHAR_MAXITEMHAVE ) { + ITEM_endExistItemsOne( itemindex); + CHAR_talkToCli(charaindex, -1, "礼物置放栏位错误!", CHAR_COLORYELLOW); + return; + } + sprintf( token,"拿到%s",ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW ); + CHAR_sendItemDataOne( charaindex, ret); + }else{ + char token[256]; + if( nowtimes < itemtimes ){ + int days, hours, minute, second; + int defTimes = itemtimes - nowtimes; + + days = defTimes/(24*60*60); + defTimes = defTimes-( days*(24*60*60)); + hours = defTimes/(60*60); + defTimes = defTimes-( hours*(60*60)); + minute = defTimes/60; + defTimes = defTimes-( minute*60); + second = defTimes; + sprintf( token,"%s还差%d天%d小时%d分%d秒才可使用!", + ITEM_getChar( itemindex, ITEM_NAME), days, hours, minute, second); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW ); + }else if( nowtimes > itemtimes+(60*60*24) ){ + sprintf( token,"%s使用期限已过!", ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW ); + } + } +} +#endif + +#ifdef _CHRISTMAS_REDSOCKS_NEW +void ITEM_useMaxRedSocksNew( int charaindex, int toindex, int haveitemindex) +{ + int itemindex; + char *itemarg=NULL; + char itemnumstr[32]; + int itemnum=0; + int present[20]; + int si=0, ret,i; + char token[256]; + + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + + itemarg = ITEM_getChar( itemindex, ITEM_ARGUMENT); + if( itemarg == NULL ){ + CHAR_talkToCli(charaindex, -1, "这是个芭乐圣诞袜!", CHAR_COLORYELLOW); + return; + } + + //道具数量 + if( getStringFromIndexWithDelim( itemarg, "|", 1, itemnumstr, sizeof( itemnumstr)) == FALSE ) + return; + itemnum = atoi(itemnumstr); + if( itemnum > 20 ) + itemnum = 20; + for(i=0;i= CHAR_MAXITEMHAVE ) { + ITEM_endExistItemsOne( itemindex); + CHAR_talkToCli(charaindex, -1, "礼物置放栏位错误!", CHAR_COLORYELLOW); + return; + } + sprintf( token,"拿到%s",ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW ); + CHAR_sendItemDataOne( charaindex, ret); + +} +#endif + +#ifdef _PETSKILL_CANNEDFOOD +void ITEM_useSkillCanned( int charaindex, int toindex, int itemNo) +{ + int itemindex; + char buf1[256]; + itemindex = CHAR_getItemIndex( charaindex, itemNo); + if(!ITEM_CHECKINDEX( itemindex)) return; + if( !CHAR_CHECKINDEX( toindex) ) return; + if( CHAR_getInt( toindex, CHAR_WHICHTYPE) == CHAR_TYPEPET) { + int i, petNo=-1; + for( i=0; i -1 ){//变成乌力了 + CHAR_talkToCli( charaindex, -1, "无法变身,乌力化中不能变身!", CHAR_COLORYELLOW ); + return; + } +#endif + + +#ifdef _FIXBUG_ATTACKBOW + { + int armindex = CHAR_getItemIndex( charaindex, CHAR_ARM); + if( ITEM_CHECKINDEX( armindex) == TRUE ) { + int armtype = BATTLE_GetWepon( charaindex); + if( armtype == ITEM_BOW || armtype == ITEM_BOUNDTHROW || + armtype == ITEM_BREAKTHROW || armtype == ITEM_BOOMERANG) { + CHAR_talkToCli( charaindex, -1, "使用远距离武器无法变身!", CHAR_COLORYELLOW ); + return; + } + } + } +#endif + + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + // 爵 钒铵凛反 骰允月 + if( battlemode == BATTLE_CHARMODE_INIT ){ + return; + } + // 爵 分匀凶日 + if( IsBATTLING( charaindex ) == TRUE ){ + toindex = BATTLE_No2Index(CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ), toindex ); + + } + + if( CHAR_CHECKINDEX( toindex ) == FALSE ) return; + + haveindex = -1; + for( i = 0; i < 5; i++ ){ + if( CHAR_getCharPet( charaindex, i) == toindex ) { + haveindex = i; + break; + } + } + if( haveindex == -1 && charaindex != toindex ){ + CHAR_talkToCli( charaindex, -1, "无法变身,只能变成自己的宠物!", CHAR_COLORYELLOW ); + return; + } + + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + + arg = ITEM_getChar(itemindex, ITEM_ARGUMENT ); + if( arg == NULL )return; + if( sscanf( arg, "%d", &metamoTime) != 1 ) + return; + + + if( toindex != charaindex ){ + CHAR_setWorkInt( charaindex, CHAR_WORKITEMMETAMO, NowTime.tv_sec +metamoTime); + sprintf( msg, "变身成%s!", CHAR_getChar( toindex, CHAR_NAME) ); + } + else { + CHAR_setWorkInt( charaindex, CHAR_WORKITEMMETAMO, 0); + sprintf( msg, "变回自己!"); + } + CHAR_talkToCli( charaindex, -1, msg, CHAR_COLORYELLOW ); + + CHAR_setInt( charaindex, CHAR_BASEIMAGENUMBER, CHAR_getInt( toindex, CHAR_BASEBASEIMAGENUMBER) ); + CHAR_complianceParameter( charaindex); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( charaindex , CHAR_WORKOBJINDEX )); + CHAR_send_P_StatusString( charaindex , CHAR_P_STRING_BASEBASEIMAGENUMBER); + + CHAR_DelItem( charaindex, haveitemindex); + +} +#endif +#ifdef _ITEM_CRACKER +void ITEM_Cracker(int charaindex,int toindex,int haveitemindex) +{ + int battlemode; + // 检查玩家是否有效 + if(CHAR_CHECKINDEX(charaindex) == FALSE) return; //失败 + battlemode = CHAR_getWorkInt(charaindex,CHAR_WORKBATTLEMODE); + // 战斗中使用无效 + if(!battlemode) ITEM_useCracker_Effect(charaindex,toindex,haveitemindex); + else CHAR_talkToCli(charaindex,-1,"什麽也没发生。",CHAR_COLORWHITE); +} +#endif + +void ITEM_AddPRSkillPercent( int charaindex,int toindex,int haveitemindex) +{ +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + int level; + char token[64]; + int MySKPercent=0, itemindex=-1, i; + + if( !CHAR_CHECKINDEX( charaindex) ) return; + if( CHAR_getInt( charaindex, PROFESSION_CLASS ) == 0 ) return; + + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if( !ITEM_CHECKINDEX( itemindex) )return; + level=atoi(ITEM_getChar(itemindex,ITEM_ARGUMENT)); + + for( i=0; i 10000 ) MySKPercent = 10000; + CHAR_setIntPSkill( charaindex, i, SKILL_LEVEL, MySKPercent); + } + + CHAR_setItemIndex( charaindex, haveitemindex ,-1); + CHAR_sendItemDataOne( charaindex, haveitemindex); + ITEM_endExistItemsOne( itemindex ); + CHAR_sendStatusString( charaindex , "S"); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( charaindex , CHAR_WORKOBJINDEX )); + sprintf( token, "所有职业技能熟练度上升%d%。", level); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW); +#endif +} + +void ITEM_AddPRSkillPoint( int charaindex,int toindex,int haveitemindex) +{ +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + int point; + char token[64]; + int MyPRpoint=0, itemindex=-1; + if( !CHAR_CHECKINDEX( charaindex) ) return; + if( CHAR_getInt( charaindex, PROFESSION_CLASS ) == 0 ) return; + + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if( !ITEM_CHECKINDEX( itemindex) )return; + point=atoi(ITEM_getChar(itemindex,ITEM_ARGUMENT)); + + MyPRpoint = CHAR_getInt( charaindex, PROFESSION_SKILL_POINT); + CHAR_setInt( charaindex, PROFESSION_SKILL_POINT, MyPRpoint+point ); + + + CHAR_setItemIndex( charaindex, haveitemindex ,-1); + CHAR_sendItemDataOne( charaindex, haveitemindex); + ITEM_endExistItemsOne( itemindex ); + + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( charaindex , CHAR_WORKOBJINDEX )); + + CHAR_talkToCli( charaindex, -1, "增加一点职业技能点数。", CHAR_COLORYELLOW); + sprintf( token, "增加%d点职业技能点数。", point); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW); +#endif +} + +#ifdef _ITEM_ADDEXP //vincent 经验提升 +void ITEM_Addexp(int charaindex,int toindex,int haveitemindex) +{ + // 检查玩家是否有效 + if(CHAR_CHECKINDEX(charaindex) == FALSE) return; //失败 +#if 1 + ITEM_useAddexp_Effect(charaindex,toindex,haveitemindex); +#else + if( !CHAR_getWorkInt(charaindex,CHAR_WORKITEM_ADDEXP)){ + ITEM_useAddexp_Effect(charaindex,toindex,haveitemindex); + }else{ + CHAR_talkToCli(charaindex,-1,"先前使用之药效依然存在",CHAR_COLORYELLOW); + } +#endif +} +#endif + +#ifdef _ITEM_REFRESH //vincent 解除异常状态道具 +void ITEM_Refresh(int charaindex,int toindex,int haveitemindex) +{ + int battlemode,itemindex; +print("\nvincent--ITEM_Refresh"); + // 检查玩家是否有效 + if(CHAR_CHECKINDEX(charaindex) == FALSE) + { +print("\nvincent--(charaindex) == FALSE"); + return; //失败 + } + itemindex = CHAR_getItemIndex(charaindex,haveitemindex); + + battlemode = CHAR_getWorkInt(charaindex,CHAR_WORKBATTLEMODE); + if(battlemode) + { +print("\nvincent--enter ITEM_useAddexp_Effect"); +print("\nvincent-->charaindex:%d,toindex:%d",charaindex,toindex); + ITEM_useRefresh_Effect(charaindex,toindex,haveitemindex); + } + else CHAR_talkToCli(charaindex,-1,"什麽也没发生。",CHAR_COLORWHITE); + + /* 平乓仿弁正□及赭 伉旦玄井日壅蛔 */ + CHAR_setItemIndex(charaindex, haveitemindex ,-1); + CHAR_sendItemDataOne( charaindex, haveitemindex);/* 失奶 丞凳蕙 */ + /* 壅允 */ + ITEM_endExistItemsOne( itemindex ); +} +#endif +//Terry 2001/12/21 +#ifdef _ITEM_FIRECRACKER +void ITEM_firecracker(int charaindex,int toindex,int haveitemindex) +{ + int battlemode; + + // 检查玩家是否有效 + if(CHAR_CHECKINDEX(charaindex) == FALSE) return; //失败 + + battlemode = CHAR_getWorkInt(charaindex,CHAR_WORKBATTLEMODE); + + if( battlemode // 检查是否在战斗中 +#ifdef _PETSKILL_BECOMEPIG + && CHAR_getInt( charaindex, CHAR_BECOMEPIG) == -1 +#endif + ) + ITEM_useFirecracker_Battle(charaindex,toindex,haveitemindex); + else + CHAR_talkToCli(charaindex,-1,"什麽也没发生。",CHAR_COLORWHITE); +} +#endif +//Terry end + + +void ITEM_WearEquip( int charaindex, int itemindex) +{ + // WON ADD +// if( ITEM_getInt(itemindex,ITEM_ID) == 20130 ){ + CHAR_setWorkInt( charaindex, CHAR_PickAllPet, TRUE); +/// } + return; +} +void ITEM_ReWearEquip( int charaindex, int itemindex) +{ + CHAR_setWorkInt( charaindex, CHAR_PickAllPet, FALSE); + return; +} + + +#ifdef _Item_ReLifeAct +void ITEM_DIErelife( int charaindex, int itemindex, int eqw) +{ + int ReceveEffect=-1; + int toNo; + int battleindex=-1; + int attackNo=-1; + int WORK_HP=1; + char buf[256]; + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + if( BATTLE_CHECKINDEX( battleindex ) == FALSE ) { + print("\n battleindex =%d return", battleindex); + return; + } + if( CHAR_CHECKINDEX( charaindex) == FALSE ) + return; + if( ITEM_CHECKINDEX( itemindex) == FALSE ) + return; +#ifdef _DUMMYDIE + if( CHAR_getFlg( charaindex, CHAR_ISDUMMYDIE) == FALSE ) { +#else + if( CHAR_getFlg( charaindex, CHAR_ISDIE) == FALSE ) { +#endif + print("\n [ %d, CHAR_ISDIE DUMMY FALSE] return !", charaindex); + return; + } + + if( ITEM_getArgument( ITEM_getChar(itemindex,ITEM_ARGUMENT),"HP", buf, sizeof(buf) ) + == FALSE ){ + WORK_HP = 1; + }else { + if( !strcmp( buf, "FULL") ) { + WORK_HP = CHAR_getWorkInt( charaindex, CHAR_WORKMAXHP ); + }else { + WORK_HP=atoi( buf); + } + } + + ReceveEffect = SPR_fukkatu3; + toNo = BATTLE_Index2No( battleindex, charaindex ); + attackNo = -1; + + BATTLE_MultiReLife( battleindex, attackNo, toNo, WORK_HP, ReceveEffect ); + CHAR_setItemIndex( charaindex, eqw ,-1); + ITEM_endExistItemsOne( itemindex); + CHAR_sendItemDataOne( charaindex, eqw); + return; +} +#endif + +#ifdef _EQUIT_DEFMAGIC +void ITEM_MagicEquitWear( int charaindex, int itemindex) +{ + char buf[256]; + char *itemarg; + char Free[][128]={"EA","WA","FI","WI","QU"}; + int index=0; + int dMagic=0; + itemarg = ITEM_getChar(itemindex,ITEM_ARGUMENT); + memset( buf, 0, sizeof( char) *256); + if( itemarg == NULL ) return; + while( index < arraysizeof( Free) ) { + if( ITEM_getArgument( itemarg, Free[ index], buf, sizeof(buf)) == TRUE ) { + dMagic = atoi( buf); + if( dMagic <= 100 && dMagic >= -100 ) { + int def_magic = CHAR_getWorkInt( charaindex, CHAR_EQUITDEFMAGIC_E+index); + CHAR_setWorkInt( charaindex, CHAR_EQUITDEFMAGIC_E+index, def_magic + dMagic); + } + dMagic = 0; + } + index++; + if( (CHAR_EQUITDEFMAGIC_E+index) > CHAR_EQUITQUIMAGIC ) + break; + } + + return; +} + +void ITEM_MagicEquitReWear( int charaindex, int itemindex){ + char buf[256]; + char *itemarg; + char Free[][128]={"EA","WA","FI","WI","QU"}; + int index=0; + int dMagic=0; + + itemarg = ITEM_getChar(itemindex,ITEM_ARGUMENT); + memset( buf, 0, sizeof( char) *256); + if( itemarg == NULL ) return; + while( index < arraysizeof( Free) ) { + if( ITEM_getArgument( itemarg, Free[ index], buf, sizeof(buf)) == TRUE ) { + dMagic = atoi( buf); + if( dMagic <= 100 && dMagic >= -100 ) { + int def_magic = CHAR_getWorkInt( charaindex, CHAR_EQUITDEFMAGIC_E+index); + CHAR_setWorkInt( charaindex, CHAR_EQUITDEFMAGIC_E+index, def_magic - dMagic); + } + dMagic = 0; + } + index++; + if( (CHAR_EQUITDEFMAGIC_E+index) > CHAR_EQUITQUIMAGIC ) + break; + } + + return; +} +#endif + +#ifdef _EQUIT_RESIST +void ITEM_MagicResist( int charaindex, int itemindex) +{ + char *itemarg,*p=NULL; + itemarg = ITEM_getChar(itemindex,ITEM_ARGUMENT); + if( itemarg == NULL ) return; + if( p = strstr( itemarg, "抗火" ) ){ + CHAR_setWorkInt( charaindex, CHAR_WORKEQUITFIRE, atoi( p+4 ) ); + } + else if( p = strstr( itemarg, "抗雷" ) ){ + CHAR_setWorkInt( charaindex, CHAR_WORKEQUITTHUNDER, atoi( p+4 ) ); + } + else if( p = strstr( itemarg, "抗冰" ) ){ + CHAR_setWorkInt( charaindex, CHAR_WORKEQUITICE, atoi( p+4 ) ); + } + else if( p = strstr( itemarg, "虚弱" ) ){ + CHAR_setWorkInt( charaindex, CHAR_WORKEQUITWEAKEN, atoi( p+4 ) ); + } + else if( p = strstr( itemarg, "魔障" ) ){ + CHAR_setWorkInt( charaindex, CHAR_WORKEQUITBARRIER, atoi( p+4 ) ); + } + else if( p = strstr( itemarg, "沉默" ) ){ + CHAR_setWorkInt( charaindex, CHAR_WORKEQUITNOCAST, atoi( p+4 ) ); + } + else if( p = strstr( itemarg, "落马" ) ){ + CHAR_setWorkInt( charaindex, CHAR_WORKEQUITFALLRIDE, atoi( p+4 ) ); + } + +} + +void ITEM_MagicReResist( int charaindex, int itemindex) +{ + char *itemarg,*p=NULL; + itemarg = ITEM_getChar(itemindex,ITEM_ARGUMENT); + if( itemarg == NULL ) return; + if( p = strstr( itemarg, "抗火" ) ){ + CHAR_setWorkInt( charaindex, CHAR_WORKEQUITFIRE, 0 ); + } + else if( p = strstr( itemarg, "抗雷" ) ){ + CHAR_setWorkInt( charaindex, CHAR_WORKEQUITFIRE, 0 ); + } + else if( p = strstr( itemarg, "抗冰" ) ){ + CHAR_setWorkInt( charaindex, CHAR_WORKEQUITFIRE, 0 ); + } + else if( p = strstr( itemarg, "虚弱" ) ){ + CHAR_setWorkInt( charaindex, CHAR_WORKEQUITFIRE, 0 ); + } + else if( p = strstr( itemarg, "魔障" ) ){ + CHAR_setWorkInt( charaindex, CHAR_WORKEQUITFIRE, 0 ); + } + else if( p = strstr( itemarg, "沉默" ) ){ + CHAR_setWorkInt( charaindex, CHAR_WORKEQUITFIRE, 0 ); + } + else if( p = strstr( itemarg, "落马" ) ){ + CHAR_setWorkInt( charaindex, CHAR_WORKEQUITFIRE, 0 ); + } +} +#endif + +#ifdef _MAGIC_RESIST_EQUIT // WON ADD 职业抗性装备 +void ITEM_P_MagicEquitWear( int charaindex, int itemindex ) +{ + char buf[256] = {0}; + char *itemarg; + char Free[][128]={"FR","IR","TR"}; + int dMagic=0; + int i; + + itemarg = ITEM_getChar(itemindex,ITEM_ARGUMENT); + if( itemarg == NULL ) return; + +// print("\n won test 10.0 ==> itemarg(%s)", itemarg ); + + for( i=0; i<3; i++ ){ + if( ITEM_getArgument( itemarg, Free[ i ], buf, sizeof(buf)) == TRUE ) { + dMagic = atoi( buf); +// print("\n won test 10.1 ==> i(%d) dMagic(%d)", i, dMagic ); + + if( dMagic <= 100 && dMagic >= -100 ){ + int def_magic = CHAR_getWorkInt( charaindex, CHAR_WORK_F_SUIT+i ); + CHAR_setWorkInt( charaindex, CHAR_WORK_F_SUIT+i, def_magic + dMagic); + +// print("\n won test 10.2 ==> i(%d)(%d)", i, CHAR_getWorkInt( charaindex, CHAR_WORK_F_SUIT+i ) ); + } + dMagic = 0; + } + } + + return; +} + + +void ITEM_P_MagicEquitReWear( int charaindex, int itemindex ) +{ + char buf[256] = {0}; + char *itemarg; + char Free[][128]={"FR","IR","TR"}; + int dMagic=0; + int i; + + itemarg = ITEM_getChar(itemindex,ITEM_ARGUMENT); + if( itemarg == NULL ) return; + +// print("\n won test 10.0 ==> itemarg(%s)", itemarg ); + + for( i=0; i<3; i++ ){ + if( ITEM_getArgument( itemarg, Free[ i ], buf, sizeof(buf)) == TRUE ) { + dMagic = atoi( buf); +// print("\n won test 10.1 ==> i(%d) dMagic(%d)", i, dMagic ); + + if( dMagic <= 100 && dMagic >= -100 ){ + int def_magic = CHAR_getWorkInt( charaindex, CHAR_WORK_F_SUIT+i ); + CHAR_setWorkInt( charaindex, CHAR_WORK_F_SUIT+i, def_magic - dMagic); + +// print("\n won test 10.2 ==> i(%d)(%d)", i, CHAR_getWorkInt( charaindex, CHAR_WORK_F_SUIT+i ) ); + } + dMagic = 0; + } + } + + return; + +} +#endif + + + +#ifdef _ITEM_WARP_FIX_BI +void recoverbi(int index) +{ + int eBbi=-1, eArm=-1, eNum=-1, eBi=-1, bi=-1; + + bi = CHAR_getInt( index, CHAR_BASEIMAGENUMBER); + eBbi = CHAR_getInt( index, CHAR_BASEBASEIMAGENUMBER); + eArm = CHAR_getItemIndex( index, CHAR_ARM); + eNum = ITEM_FIST; + if(ITEM_CHECKINDEX(eArm)) + eNum = ITEM_getInt( eArm, ITEM_TYPE); + + eBi = CHAR_getNewImagenumberFromEquip( eBbi, eNum); + + if(CHAR_getInt( index, CHAR_RIDEPET)!=-1) //骑宠 + CHAR_complianceParameter(index); + else //非骑宠 + if((eBi!=-1)&&(eBi!=bi)) + CHAR_setInt( index, CHAR_BASEIMAGENUMBER, eBi); +} +#endif + +#ifdef _ITEM_TIME_LIMIT +void ITEM_TimeLimit( int charaindex) +{ + int i = 0; + int iid = 0; + long lTime = 0; + char buff[256]; + + if( !CHAR_CHECKINDEX( charaindex) ) return; + for( i=0; i < CHAR_MAXITEMHAVE ; i++ ){ + int itemindex = CHAR_getItemIndex( charaindex , i ); + if( !ITEM_CHECKINDEX( itemindex ) ) continue; + lTime = ITEM_getWorkInt( itemindex, ITEM_WORKTIMELIMIT); + if( ITEM_getInt( itemindex, ITEM_ID) == 20173 //燃烧火把 + || ITEM_getInt( itemindex, ITEM_ID) == 20704 ){ + if( lTime > 0 && NowTime.tv_sec > lTime ){ + iid = ITEM_getInt( itemindex, ITEM_ID) + 1; + snprintf( buff, sizeof( buff), "%s的效果已消失..", ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( charaindex, -1, buff, CHAR_COLORGREEN); + CHAR_DelItemMess( charaindex, i, 0); + itemindex = ITEM_makeItemAndRegist( iid); + if(itemindex!=-1){ + CHAR_setItemIndex( charaindex, i, itemindex); + ITEM_setWorkInt( itemindex, ITEM_WORKOBJINDEX, -1); + ITEM_setWorkInt( itemindex, ITEM_WORKCHARAINDEX, charaindex); + CHAR_sendItemDataOne( charaindex, i); + } + } + } + } + +} +#endif + +#ifdef _BLACK_MARKET +void ITEM_BM_Exchange( int charaindex, int iindex) +{ + BOOL pckConfirm=FALSE; + int cdnConfirm=0; + int i, j, fd, id, itemindex, gTmp; + char sBuf[256]=""; + + fd = getfdFromCharaIndex( charaindex); + + if(!CHAR_CHECKINDEX( charaindex)) return; + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE)!=BATTLE_CHARMODE_NONE) return; + if( CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE)!=CHAR_PARTY_NONE) return; + if( CHAR_getFlg( charaindex, CHAR_ISTRADE)) return; + if( iindex==-1) return; + + for( i=0; i<12; i++){ + if(iindex==CONNECT_get_BMList( getfdFromCharaIndex( charaindex), i)){ + pckConfirm = TRUE; + break; + } + } + + if(pckConfirm){ + if(!BMItem[iindex].GCondition||BMItem[iindex].GCondition=CHAR_MAXITEMHAVE){ + print( "npc_exchange.c: ACCEPTadditem error itemindex[%d]\n", itemindex); + ITEM_endExistItemsOne( itemindex); + sprintf( sBuf, "交易失败..."); + CHAR_talkToCli( charaindex, -1, sBuf, CHAR_COLORRED); + return; + } + CHAR_sendItemDataOne( charaindex, ret); + } + gTmp = CHAR_getInt( charaindex, CHAR_GOLD); + gTmp -= BMItem[iindex].GCondition; + CHAR_setInt( charaindex, CHAR_GOLD, gTmp); + CHAR_complianceParameter( charaindex); + CHAR_send_P_StatusString( charaindex, CHAR_P_STRING_GOLD); + + sprintf( sBuf,"交出石币 %d", BMItem[iindex].GCondition); + CHAR_talkToCli( charaindex, -1, sBuf, CHAR_COLORWHITE); + // test shan shan + sprintf( sBuf, "....这个你就收下吧!!"); + CHAR_talkToCli( charaindex, -1, sBuf, CHAR_COLORYELLOW); + // add to Empty + for( i=0; i<12; i++){ + if(BMSellList[i]==iindex){ + BMSellList[i] = RAND(0, BMINum-1); + break; + } + } + for( i=0; i<12; i++) + CONNECT_set_BMList( getfdFromCharaIndex( charaindex), i, -1); + return; + } + } + } + sprintf( sBuf, "交易失败..."); + CHAR_talkToCli( charaindex, -1, sBuf, CHAR_COLORRED); +} +#endif + +#ifdef _ITEM_CONSTITUTION +void ITEM_Constitution( int charaindex, int toindex, int haveitemindex) +{ + char buf[256]; + char *itemarg; + char Free[][128]={"VI","ST","TG","DE"}; + int index=0, FixPoint=0, itemindex; + BOOL FIXs=FALSE; + int AllPoint=0; + + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE) != CHAR_TYPEPLAYER ) + return; + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + + itemarg = ITEM_getChar( itemindex, ITEM_ARGUMENT); + if( itemarg == NULL ) return; + memset( buf, 0, sizeof( char) *256); + + AllPoint = CHAR_getInt( charaindex, CHAR_VITAL) + +CHAR_getInt( charaindex, CHAR_VITAL+1) + +CHAR_getInt( charaindex, CHAR_VITAL+2) + +CHAR_getInt( charaindex, CHAR_VITAL+3); + + while( index < arraysizeof( Free) ) { + if( ITEM_getArgument( itemarg, Free[ index], buf, sizeof(buf)) == TRUE ) { + FixPoint = atoi( buf); + if( FixPoint <= 100 && FixPoint > 0 ) { + int points = CHAR_getInt( charaindex, CHAR_VITAL+index); + //Change Fix + //if( points < (FixPoint*100) ) break; + if( points < (FixPoint*100) || AllPoint-(FixPoint*100) <= 0 ) + { + CHAR_talkToCli( charaindex, -1, "物品无效。", CHAR_COLORYELLOW); + return; + } + CHAR_setInt( charaindex, CHAR_VITAL+index, (points-(FixPoint*100))); + CHAR_setInt( charaindex, CHAR_SKILLUPPOINT, CHAR_getInt( charaindex, CHAR_SKILLUPPOINT) + FixPoint); + FIXs = TRUE; + } + FixPoint = 0; + } + index++; + if( (CHAR_VITAL+index) > CHAR_DEX ) + break; + } + CHAR_complianceParameter( charaindex); + CHAR_send_P_StatusString( charaindex, + CHAR_P_STRING_MAXHP|CHAR_P_STRING_HP|CHAR_P_STRING_LV|CHAR_P_STRING_EXP| + CHAR_P_STRING_ATK|CHAR_P_STRING_DEF|CHAR_P_STRING_QUICK| + CHAR_P_STRING_VITAL|CHAR_P_STRING_STR|CHAR_P_STRING_TOUGH|CHAR_P_STRING_DEX); + + CHAR_Skillupsend( charaindex); + memset( buf, 0, sizeof( buf)); + if( FIXs == TRUE ) { + sprintf( buf, "%s", "你的身体感到变化。"); + }else { + sprintf( buf, "%s", "物品无效。"); + } + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + CHAR_DelItem( charaindex, haveitemindex); +} +#endif + +#ifdef _NEW_RIDEPETS +void ITEM_useLearnRideCode( int charaindex, int toindex, int haveitemindex) +{//CHAR_LOWRIDEPETS + int itemindex, i; + char buf1[256]; + char *itemarg; + int ridetrans; + typedef struct{ + char arg[256]; + int Code; + }tagNewRideCode; + tagNewRideCode NewRides[12]={ + { "RIDE_PET0", RIDE_PET0}, { "RIDE_PET1", RIDE_PET1}, { "RIDE_PET2", RIDE_PET2}, + { "RIDE_PET3", RIDE_PET3}, { "RIDE_PET4", RIDE_PET4}, { "RIDE_PET5", RIDE_PET5}, + { "RIDE_PET6", RIDE_PET6}, { "RIDE_PET7", RIDE_PET7}, { "RIDE_PET8", RIDE_PET8}, + { "RIDE_PET9", RIDE_PET9}, { "RIDE_PET10", RIDE_PET10}, { "RIDE_PET11", RIDE_PET11} + }; + + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + itemarg = ITEM_getChar( itemindex, ITEM_ARGUMENT); + if( itemarg == NULL ) return; + memset( buf1, 0, sizeof( buf1)); + if( getStringFromIndexWithDelim(itemarg,"|", 3, buf1, sizeof(buf1)) == FALSE ) + ridetrans=0; + else + ridetrans=atoi(buf1); + if( getStringFromIndexWithDelim(itemarg,"|", 1, buf1, sizeof(buf1)) == FALSE ) + return; + for( i=0; i<12; i++) { + if( !strcmp( NewRides[i].arg, buf1) ) { + int LRCode = CHAR_getInt( charaindex, CHAR_LOWRIDEPETS); + if(CHAR_getInt( charaindex, CHAR_TRANSMIGRATION) < ridetrans){ + char token[256]; + memset( token, 0, sizeof( token)); + if( getStringFromIndexWithDelim(itemarg,"|", 2, buf1, sizeof(buf1)) != FALSE ){ + sprintf( token, "必须%d转人以上才能学习骑%s。",ridetrans,buf1); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW); + return; + } + } + LRCode = LRCode|NewRides[i].Code; + CHAR_setInt( charaindex, CHAR_LOWRIDEPETS, LRCode); + memset( buf1, 0, sizeof( buf1)); + if( getStringFromIndexWithDelim(itemarg,"|", 2, buf1, sizeof(buf1)) != FALSE ){ + char token[256]; + memset( token, 0, sizeof( token)); + sprintf( token, "学习了新的骑宠 (%s)。", buf1); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW); + CHAR_DelItem( charaindex, haveitemindex); + CHAR_sendStatusString( charaindex, "x"); + } + break; + } + } +} + +#endif + + + + + +#ifdef _ITEM_EDITBASES +void ITEM_useFusionEditBase( int charaindex, int toindex, int haveitemindex) +{ + int itemindex; + int work[4]={0,0,0,0}; + int anhour = PETFEEDTIME;//宠物 食时间(单位:秒) + + if( !CHAR_CHECKINDEX( charaindex ) ) return; + if( !CHAR_CHECKINDEX( toindex ) ) return; + if( CHAR_getInt( toindex, CHAR_WHICHTYPE) != CHAR_TYPEPET){ + CHAR_talkToCli( charaindex, -1, "物品仅限宠物使用。", CHAR_COLORYELLOW); + return; + } + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if( !ITEM_CHECKINDEX(itemindex) ) return; + if( CHAR_getInt( toindex, CHAR_FUSIONBEIT) == 1 && + CHAR_getInt( toindex, CHAR_FUSIONRAISE) > 0 ){//检查是否为融合宠 + +#ifdef _TEST_PETFUSIONTIME +#else + int time_l; + int nowTime; // Robin fix + time_l = CHAR_getInt( toindex, CHAR_FUSIONTIMELIMIT); + nowTime = (int)time(NULL); +#if 1 // 消化药 + { + char *arg = NULL; + int deltime; + char msg[1024]; + arg = ITEM_getChar( itemindex, ITEM_ARGUMENT); + if( arg != NULL && !strncmp( arg, "消", 2) ) { + sscanf( arg, "消 %d", &deltime); + time_l -= (deltime*60); + CHAR_setInt( toindex, CHAR_FUSIONTIMELIMIT, time_l); + CHAR_DelItem( charaindex, haveitemindex); + sprintf( msg, "加快宠物蛋的消化速度 %d 分钟。", deltime); + CHAR_talkToCli( charaindex, -1, msg, CHAR_COLORYELLOW); + if( (time_l + anhour) <= nowTime ) { + int min, sec, deftime; + deftime = nowTime - (time_l + anhour); + min = deftime/60; + sec = deftime%60; + sprintf( msg, "宠物蛋已经可以 食了,超过 食时间%d分%d秒。", min, sec); + CHAR_talkToCli( charaindex, -1, msg, CHAR_COLORYELLOW); + return; + } + } + } +#endif + if( (time_l + anhour) > nowTime ){ //现在的时间要超过(time_l+anhour)才可以 食 + char Mess1[256]; + int min, sec, deftime; + //int nowTime = (int)time(NULL); + deftime = (time_l + anhour) - nowTime; + min = deftime/60; + sec = deftime%60; + sprintf( Mess1, "宠物蛋需过%d分%d秒才可 食。", min, sec); + CHAR_talkToCli( charaindex, -1, Mess1, CHAR_COLORYELLOW); + return; + } +#endif +//--------------------------------------------- + work[3] = CHAR_getInt( toindex, CHAR_EVOLUTIONBASEVTL); + work[0] = CHAR_getInt( toindex, CHAR_EVOLUTIONBASESTR); + work[1] = CHAR_getInt( toindex, CHAR_EVOLUTIONBASETGH); + work[2] = CHAR_getInt( toindex, CHAR_EVOLUTIONBASEDEX); + PET_showEditBaseMsg( charaindex, toindex, itemindex, work); + CHAR_setInt( toindex, CHAR_EVOLUTIONBASEVTL, work[3]); + CHAR_setInt( toindex, CHAR_EVOLUTIONBASESTR, work[0]); + CHAR_setInt( toindex, CHAR_EVOLUTIONBASETGH, work[1]); + CHAR_setInt( toindex, CHAR_EVOLUTIONBASEDEX, work[2]); +//--------------------------------------------- + LogPetPointChange( + CHAR_getChar( charaindex, CHAR_NAME ), + CHAR_getChar( charaindex, CHAR_CDKEY ), + CHAR_getChar( charaindex, CHAR_NAME), + toindex, 4, + CHAR_getInt( toindex, CHAR_LV), + "item_use", + CHAR_getInt( charaindex, CHAR_FLOOR), + CHAR_getInt( charaindex, CHAR_X ), + CHAR_getInt( charaindex, CHAR_Y ) + ); + + LogPetFeed( + CHAR_getChar( charaindex, CHAR_NAME), + CHAR_getChar( charaindex, CHAR_CDKEY), + CHAR_getChar( toindex, CHAR_NAME), + toindex, + CHAR_getInt( toindex, CHAR_LV), + ITEM_getChar( itemindex, CHAR_NAME), // Key + CHAR_getInt( charaindex, CHAR_FLOOR), + CHAR_getInt( charaindex, CHAR_X), + CHAR_getInt( charaindex, CHAR_Y), + CHAR_getChar( toindex, CHAR_UNIQUECODE) ); + +#ifdef _PET_EVOLUTION + { + int raise = CHAR_getInt( toindex, CHAR_FUSIONRAISE); + CHAR_setInt( toindex, CHAR_FUSIONRAISE, --raise); + CHAR_setInt( toindex, CHAR_FUSIONTIMELIMIT, nowTime); + if( CHAR_getInt( toindex, CHAR_FUSIONRAISE) <= 0 ){//孵化 + char buf[256], buf1[256]; + int newindex; + sprintf( buf, "蛋〈%s〉孵化成", CHAR_getUseName( toindex )); + + newindex = EVOLUTION_createPetFromEnemyIndex( charaindex, toindex, 1); + if( !CHAR_CHECKINDEX( newindex) ){ + CHAR_talkToCli( charaindex, -1, "宠物孵化发生错误。", CHAR_COLORYELLOW); + return; + } + sprintf( buf1, "〈%s〉。", CHAR_getChar( newindex, CHAR_NAME)); + strcat( buf, buf1); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + + LogPetFeed( + CHAR_getChar( charaindex, CHAR_NAME), + CHAR_getChar( charaindex, CHAR_CDKEY), + CHAR_getChar( toindex, CHAR_NAME), + toindex, + CHAR_getInt( toindex, CHAR_LV), + buf, // Key + CHAR_getInt( charaindex, CHAR_FLOOR), + CHAR_getInt( charaindex, CHAR_X), + CHAR_getInt( charaindex, CHAR_Y), + CHAR_getChar( toindex, CHAR_UNIQUECODE) ); + + } + } +#endif + }else { + CHAR_talkToCli( charaindex, -1, "???", CHAR_COLORYELLOW); + } + CHAR_DelItem( charaindex, haveitemindex); + return; +} +#endif + +#ifdef _THROWITEM_ITEMS +static int Niceitem = 0; + int golds[3]={ 10000, 20000, 50000}; + int items1[18] = { 13092, 13091, 20439, 20417, 1284, 20172, 18210, 19014, 18360, 18362, 18364, + 18359, 18356, 18357, 18510, 20418, 20419, 1452}; + int items2[11] = { 15842, 16136, 14334, 14034, 14634, 14934, 15534, 14934, 16432, 17057, 19695}; + + int items3[10] = { 16014, 16314, 14515, 14215, 14815, 15115, 15715, 15295, 16552, 17157}; + + int items4[18] = { 14516, 14513, 14216, 14213, 14816, 14813, 15116, 15716, 15415, 17360, 20279, + 20282, 20276, 20270, 20288, 20290, 20291, 20289}; + int items5[5] = { 20280, 20283, 20277, 20271, 20274}; + int items6[5] = { 20284, 20272, 20275, 20281, 20278}; +void ITEM_ThrowItemBox( int charaindex, int toindex, int haveitemindex) +{ + int i, ret, Iindex, ItemID=-1, itemindex; + char token[256]; + + if( !CHAR_CHECKINDEX(charaindex) ) return; + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if( !ITEM_CHECKINDEX(itemindex) ) return; + + if( Niceitem > 10 ) ret = rand()%920; + else ret = rand()%1000; + + for( i = CHAR_STARTITEMARRAY ; i < CHAR_MAXITEMHAVE ; i++ ){ + Iindex = CHAR_getItemIndex( charaindex , i ); + if( !ITEM_CHECKINDEX(itemindex) ) continue; + if( itemindex == Iindex ){ + CHAR_DelItem( charaindex, i); + + LogItem( + CHAR_getChar( charaindex, CHAR_NAME ), CHAR_getChar( charaindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID), +#endif + "WarpManDelItem", + CHAR_getInt( charaindex, CHAR_FLOOR), CHAR_getInt( charaindex, CHAR_X ), + CHAR_getInt( charaindex, CHAR_Y ), ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + break; + } + } + if( i >= CHAR_MAXITEMHAVE ){ + return; + } + + if( ret <= 774 ){ + int Golds=0; + Golds = golds[ RAND(0,2)]; + CHAR_AddGold( charaindex, Golds); + }else { + if( ret < 924 ){ + ItemID = items1[RAND(0,17)]; + }else if( ret < 964 ){ + ItemID = items2[RAND(0,10)]; + }else if( ret < 984 ){ + ItemID = items3[RAND(0,9)]; + Niceitem++; + }else if( ret < 994 ){ + ItemID = items4[RAND(0,17)]; + Niceitem++; + }else if( ret < 999 ){ + ItemID = items5[RAND(0,4)]; + Niceitem++; + }else { + ItemID = items6[RAND(0,4)]; + Niceitem++; + } + + Iindex = ITEM_makeItemAndRegist( ItemID); + if( !ITEM_CHECKINDEX( Iindex) ){ + return; + } + ret = CHAR_addItemSpecificItemIndex( charaindex, Iindex); + if( ret < 0 || ret >= CHAR_MAXITEMHAVE ) { + ITEM_endExistItemsOne( Iindex); + return; + } + sprintf( token,"拿到%s", ITEM_getChar( Iindex, ITEM_NAME)); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW ); + CHAR_sendItemDataOne( charaindex, ret); + } +} +#endif + +#ifdef _ITEM_LOVERPARTY +void ITEM_LoverSelectUser( int charaindex, int toindex, int haveitemindex) +{ + int itemindex, i; + int playernum = CHAR_getPlayerMaxNum(); + + if( !CHAR_CHECKINDEX( charaindex ) ) return; + if( !CHAR_CHECKINDEX( toindex ) ) return; + if( CHAR_getInt( toindex, CHAR_WHICHTYPE) != CHAR_TYPEPLAYER){ + CHAR_talkToCli( charaindex, -1, "物品仅限人物使用。", CHAR_COLORYELLOW); + return; + } + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if( !ITEM_CHECKINDEX(itemindex) ) return; + if( ITEM_getInt( itemindex, ITEM_TYPE) != 16 ){ + ITEM_setInt( itemindex, ITEM_TYPE, 16); + return; + } + if( !strcmp( ITEM_getChar( itemindex, ITEM_FORUSERNAME), "") || + !strcmp( ITEM_getChar( itemindex, ITEM_FORUSERCDKEY), "") ){//寻找设定对象 + if( charaindex == toindex ){ + CHAR_talkToCli( charaindex, -1, "不能选择自己使用。", CHAR_COLORYELLOW); + return; + } + ITEM_setChar( itemindex, ITEM_FORUSERNAME, CHAR_getChar( toindex, CHAR_NAME) ); + ITEM_setChar( itemindex, ITEM_FORUSERCDKEY, CHAR_getChar( toindex, CHAR_CDKEY) ); + ITEM_setInt( itemindex, ITEM_TARGET, 0); + { + char token[256]; + sprintf( token, "%s(%s)", + ITEM_getChar( itemindex, ITEM_SECRETNAME), CHAR_getChar( toindex, CHAR_NAME)); + ITEM_setChar( itemindex, ITEM_SECRETNAME, token); + sprintf( token, "传送对象设定为%s。", CHAR_getChar( toindex, CHAR_NAME)); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW); + } + CHAR_sendItemDataOne( charaindex, haveitemindex); + }else{ + char buf1[256]; + //if( CHAR_getInt( charaindex, CHAR_FLOOR) == 117 || CHAR_getInt( charaindex, CHAR_FLOOR) == 887 || + //CHAR_getInt( charaindex, CHAR_FLOOR) == 1042 || CHAR_getInt( charaindex, CHAR_FLOOR) == 2032 || + //CHAR_getInt( charaindex, CHAR_FLOOR) == 3032 || CHAR_getInt( charaindex, CHAR_FLOOR) == 4032 || + //CHAR_getInt( charaindex, CHAR_FLOOR) == 5032 || CHAR_getInt( charaindex, CHAR_FLOOR) == 6032 || + //CHAR_getInt( charaindex, CHAR_FLOOR) == 7032 || CHAR_getInt( charaindex, CHAR_FLOOR) == 8032 || + //CHAR_getInt( charaindex, CHAR_FLOOR) == 9032 ){ + if( checkUnlawWarpFloor( CHAR_getInt( charaindex, CHAR_FLOOR) ) ) { + CHAR_talkToCli( charaindex, -1, "你的所在位置无法传送。", CHAR_COLORYELLOW ); + return; + } + + for( i=0; i= 10000) continue; + + if( (int)NowTime.tv_sec > (int)( OBJECT_getTime( objindex) + getItemdeletetime() ) ) { + + LogStone( + -1, + "NULL", + "NULL", + amount, + 0, + "Del(删除过时金钱)", + OBJECT_getFloor( objindex ), + OBJECT_getX( objindex ), + OBJECT_getY( objindex ) + ); + + CHAR_ObjectDelete(objindex); + } + } +} + +void GOLD_DeleteTimeCheckOne( int objindex) +{ + int amount; + + if( CHECKOBJECT( objindex ) == FALSE ) return; + if( OBJECT_getType( objindex) != OBJTYPE_GOLD) return; + + amount = OBJECT_getIndex( objindex); + if( amount >= 10000) return; + + if( (int)NowTime.tv_sec > (int)( OBJECT_getTime( objindex) + getItemdeletetime() ) ) { + + LogStone( + -1, + "NULL", + "NULL", + amount, + 0, + "Del(删除过时金钱)", + OBJECT_getFloor( objindex ), + OBJECT_getX( objindex ), + OBJECT_getY( objindex ) + ); + + CHAR_ObjectDelete(objindex); + } + +} + +#endif + +#ifdef _TIME_TICKET +void ITEM_timeticket( int charaindex, int toindex, int haveitemindex) +{ + ITEM_timeticketEx( charaindex, toindex, haveitemindex, 0); +} + +void ITEM_timeticketEx( int charaindex, int toindex, int haveitemindex, int flag) +{ + int itemindex; + int addtime; + int nowtime = time(NULL); + int tickettime; + int lefttime; + char msg[1024]; + + if( !CHAR_CHECKINDEX( charaindex ) ) return; + + if( check_TimeTicketMap( CHAR_getInt( charaindex, CHAR_FLOOR)) == FALSE + && flag == 0 ) { + CHAR_talkToCli( charaindex, -1, "这个地点不可使用。", CHAR_COLORYELLOW); + return; + } + + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if( !ITEM_CHECKINDEX(itemindex) ) return; + + tickettime = CHAR_getWorkInt( charaindex, CHAR_WORKTICKETTIME); + if( tickettime > nowtime+20 ) { + CHAR_talkToCli( charaindex, -1, "时间必须剩下20秒以内才可使用。", CHAR_COLORYELLOW); + return; + } + // 第一次使用的话 + if( tickettime == 0 ) { + tickettime = nowtime; + CHAR_setWorkInt( charaindex, CHAR_WORKTICKETTIMESTART, nowtime); + } + // 战斗中且超过时限时使用 + //if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE + // && tickettime < nowtime ) { + //tickettime = nowtime; + // sprintf(msg, "时间不足%d秒。", nowtime - tickettime ); + // CHAR_talkToCli( charaindex, -1, msg, CHAR_COLORYELLOW); + //} + + addtime = atoi( ITEM_getChar( itemindex, ITEM_ARGUMENT)); + tickettime += addtime; + CHAR_setWorkInt( charaindex, CHAR_WORKTICKETTIME, tickettime ); + lefttime = tickettime - nowtime; + if( lefttime > 0 ) + sprintf(msg, "时间增加%d秒,还剩下%d分%d秒。", addtime, lefttime/60, lefttime%60 ); + else + sprintf(msg, "时间增加%d秒,还不足%d分%d秒。", addtime, (-lefttime)/60, (-lefttime)%60 ); + CHAR_talkToCli( charaindex, -1, msg, CHAR_COLORYELLOW); + CHAR_DelItem( charaindex, haveitemindex); +} +#endif + +#ifdef _ITEM_SETLOVER +void ITEM_SetLoverUser( int charaindex, int toindex, int haveitemindex) +{ + int itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + int playernum = CHAR_getPlayerMaxNum(); + char token[256],*pActionNumber,szMsg[128]; + int floor = CHAR_getInt(charaindex,CHAR_FLOOR); + + if( !strcmp( CHAR_getChar( charaindex, CHAR_LOVE), "YES")) + { + CHAR_talkToCli( charaindex, -1, "重婚是违法的!您已经结婚了哦~", CHAR_COLORYELLOW); + return; + } + if( !CHAR_CHECKINDEX( charaindex ) ) return; + if( !CHAR_CHECKINDEX( toindex ) ) return; + if( CHAR_getInt( toindex, CHAR_WHICHTYPE) != CHAR_TYPEPLAYER) + { + CHAR_talkToCli( charaindex, -1, "只能和玩家结婚哦", CHAR_COLORYELLOW); + return; + } + if( CHAR_getInt(charaindex,CHAR_TRANSMIGRATION)<3 ||CHAR_getInt(toindex,CHAR_TRANSMIGRATION)<3) + { + CHAR_talkToCli( charaindex, -1, "如果想结婚的话,双方必须3转以上哦~", CHAR_COLORYELLOW); + return; + } + if( charaindex == toindex ) + { + CHAR_talkToCli( charaindex, -1, "难道您想和自己结婚吗?", CHAR_COLORYELLOW); + return; + } + if ( IsMale(charaindex)==IsMale(toindex)) + { + CHAR_talkToCli( charaindex, -1, "同性怎么结婚呢?", CHAR_COLORYELLOW); + return; + } + if( !ITEM_CHECKINDEX(itemindex) ) return; + int id = ITEM_getInt( itemindex, ITEM_ID); + itemindex = ITEM_makeItemAndRegist( id ); + + if( strcmp( CHAR_getChar( charaindex, CHAR_LOVE), "YES") && + strcmp( CHAR_getChar( toindex, CHAR_LOVE), "YES"))//第二次判断双方是否已经结婚 + { + if( itemindex != -1 ){ + CHAR_setChar( charaindex, CHAR_LOVERID, CHAR_getChar( toindex, CHAR_CDKEY) ); + CHAR_setChar( charaindex, CHAR_LOVERNAME, CHAR_getChar( toindex, CHAR_NAME) ); + if (strcmp(CHAR_getChar( toindex, CHAR_LOVERID), CHAR_getChar( charaindex, CHAR_CDKEY))==0 && + strcmp(CHAR_getChar( toindex, CHAR_LOVERNAME), CHAR_getChar( charaindex, CHAR_NAME))==0) + { + int i; + char szMsg1[16],*arg; + + sprintf( token, "已经答应了%s的求婚", CHAR_getChar( toindex, CHAR_NAME)); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW); + sprintf( token, "%s已经响应了你的求婚", CHAR_getChar( charaindex, CHAR_NAME)); + CHAR_talkToCli( toindex, -1, token, CHAR_COLORYELLOW); + + CHAR_setChar( toindex, CHAR_LOVE,"YES"); + CHAR_setChar( charaindex, CHAR_LOVE,"YES"); + CHAR_setChar( charaindex, CHAR_LOVERID, CHAR_getChar( toindex, CHAR_CDKEY) ); + CHAR_setChar( charaindex, CHAR_LOVERNAME, CHAR_getChar( toindex, CHAR_NAME) ); + CHAR_setChar( toindex, CHAR_LOVERID, CHAR_getChar( charaindex, CHAR_CDKEY) ); + CHAR_setChar( toindex, CHAR_LOVERNAME, CHAR_getChar( charaindex, CHAR_NAME) ); + sprintf(szMsg,"%d 8 101883",floor); + CHAR_CHAT_DEBUG_effect(charaindex,szMsg); + CHAR_DelItem( charaindex, haveitemindex); + for(i=0;i=playernum) + { + CHAR_talkToCli( charaindex, -1, "很抱歉,您的爱人不在线哦~", CHAR_COLORYELLOW ); + return; + } + + if( !CHAR_CHECKINDEX( charaindex ) ) return; + if( !CHAR_CHECKINDEX( i ) ) return; + + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if( !ITEM_CHECKINDEX(itemindex) ) return; + + if( checkUnlawWarpFloor( CHAR_getInt( charaindex, CHAR_FLOOR) ) ) { + CHAR_talkToCli( charaindex, -1, "很抱歉,您的爱人在神秘遥远地方,无法传送。", CHAR_COLORYELLOW ); + return; + }//UNWARP地图禁止使用 + if( checkUnlawWarpFloor( CHAR_getInt( i, CHAR_FLOOR) ) ) { + CHAR_talkToCli( charaindex, -1, "很抱歉,您的爱人在神秘遥远地方,无法传送。", CHAR_COLORYELLOW ); + return; + }//UNWARP地图禁止使用 + int itemmaxuse=0; + + if(strcmp(CHAR_getChar(i,CHAR_LOVERID),CHAR_getChar(charaindex,CHAR_CDKEY)) == 0 && + strcmp(CHAR_getChar(i,CHAR_LOVERNAME),CHAR_getChar(charaindex,CHAR_NAME)) == 0) + { + CHAR_DischargePartyNoMsg( charaindex);//解散团队 + int floor, x, y; + char token[256]; + floor = CHAR_getInt( i, CHAR_FLOOR); + x = CHAR_getInt( i, CHAR_X); + y = CHAR_getInt( i, CHAR_Y); + + CHAR_warpToSpecificPoint( charaindex, floor, x, y ); + sprintf( token, "%s:亲爱的,我来了!", CHAR_getChar( charaindex, CHAR_NAME)); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "已传送到爱人%s身边!", CHAR_getChar( i, CHAR_NAME)); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW ); + print("\n玩家% 传送到玩家%s身边", CHAR_getChar( charaindex, CHAR_NAME),CHAR_getChar(i, CHAR_NAME)); + return; + } + }else + CHAR_talkToCli( charaindex, -1, "您没有结婚哦~", CHAR_COLORYELLOW ); +} + +void ITEM_LoverUnmarry( int charaindex, int toindex, int haveitemindex) +{ + int itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + int i; + char token[256]; + int playernum = CHAR_getPlayerMaxNum(); + //检查是否结婚 + if( !strcmp( CHAR_getChar( charaindex, CHAR_LOVE), "YES")) + { + for(i=0;i=playernum) + { + CHAR_talkToCli( charaindex, -1, "很抱歉,您的爱人不在线哦~", CHAR_COLORYELLOW ); + return; + } + + if( !CHAR_CHECKINDEX( charaindex ) ) return; + if( !CHAR_CHECKINDEX( i ) ) return; + if( !ITEM_CHECKINDEX(itemindex) ) return; + + if(strcmp(ITEM_getChar( itemindex, ITEM_SECRETNAME), "同意离婚戒指")){ + int id = ITEM_getInt( itemindex, ITEM_ID); + itemindex = ITEM_makeItemAndRegist( id ); + + if( itemindex != -1 ){ + + int emptyitemindexinchara = CHAR_findEmptyItemBox( toindex ); + + if( emptyitemindexinchara < 0 ){ + sprintf( token, "%s物品栏已满。离婚失败" , CHAR_getChar( i, CHAR_NAME)); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW); + sprintf( token, "%s向您发起离婚,但您的物品栏已满。" , CHAR_getChar( charaindex, CHAR_NAME)); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW);} + else{ + CHAR_setItemIndex( i, emptyitemindexinchara, itemindex); + ITEM_setChar( itemindex, ITEM_NAME, "同意离婚戒指"); + ITEM_setChar( itemindex, ITEM_SECRETNAME, "同意离婚戒指"); + sprintf( token, "%s向你申请离婚,如果同意请使用该戒指!", CHAR_getChar( charaindex, CHAR_NAME)); + ITEM_setChar( itemindex, ITEM_EFFECTSTRING, token); + CHAR_sendItemDataOne( i, emptyitemindexinchara); + ITEM_endExistItemsOne(itemindex); + sprintf( token, " %s向您提出离婚并把 %s 给你!", CHAR_getChar( charaindex, CHAR_NAME),ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW); + sprintf( token, "已经向%s发起离婚", CHAR_getChar( i, CHAR_NAME)); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW); + CHAR_DelItem( charaindex, haveitemindex); + return;}} + }else{ + CHAR_setChar( i, CHAR_LOVE,""); + CHAR_setChar( i, CHAR_LOVERID,""); + CHAR_setChar( i, CHAR_LOVERNAME,""); + CHAR_setChar( charaindex, CHAR_LOVE,""); + CHAR_setChar( charaindex, CHAR_LOVERID,""); + CHAR_setChar( charaindex, CHAR_LOVERNAME,""); + CHAR_talkToCli( i, -1, "双方离婚成功!", CHAR_COLORYELLOW); + CHAR_talkToCli( charaindex, -1, "双方离婚成功!", CHAR_COLORYELLOW);} + CHAR_DelItem( charaindex, haveitemindex); + }else + CHAR_talkToCli( charaindex, -1, "您没有结婚哦~", CHAR_COLORYELLOW ); +} + + +#endif + +#ifdef _ITEM_METAMO +void ITEM_ColorMetamo( int charaindex, int toindex, int haveitemindex) +{ + int MetamoList[12][5]={ + /*{ 造型 , 红 , 绿 , 黄 , 灰 }, //此行为说明行*/ + { 100000, 100000, 100005, 100010, 100015}, //小矮子 + { 100020, 100025, 100030, 100035, 100020}, //赛亚人 + { 100040, 100055, 100050, 100045, 100040}, //辫子男孩 + { 100060, 100060, 100065, 100070, 100075}, //酷哥 + { 100080, 100095, 100085, 100090, 100080}, //熊皮男 + { 100100, 100100, 100115, 100110, 100105}, //大个 + { 100120, 100135, 100120, 100125, 100130}, //小矮妹 + { 100140, 100145, 100140, 100150, 100155}, //熊皮妹 + { 100160, 100165, 100170, 100160, 100175}, //帽子妹 + { 100180, 100190, 100195, 100185, 100180}, //短发夹妹 + { 100200, 100200, 100210, 100210, 100205}, //手套女 + { 100220, 100230, 100225, 100220, 100235}, //辣妹 + }; + int itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + char *itemarg,p; + int OldMetamoId, NewMetamoId, i; + itemarg=ITEM_getChar(itemindex,ITEM_ARGUMENT); + if( itemarg == NULL ) return; + OldMetamoId=CHAR_getInt( charaindex, CHAR_BASEBASEIMAGENUMBER); + for(i=0;i<12;i++) + if(OldMetamoId>=MetamoList[i][0] && OldMetamoId=MetamoList[11][0]) + break; + if(i==12){ + CHAR_talkToCli( charaindex, -1, "变色失败,你造型并不是人物造型", CHAR_COLORYELLOW); + return; + } + if( strstr( itemarg, "红" ) ){ + CHAR_talkToCli( charaindex, -1, "变成红色", CHAR_COLORYELLOW); + NewMetamoId=MetamoList[i][1]; + }else if( strstr( itemarg, "绿" ) ){ + CHAR_talkToCli( charaindex, -1, "变成绿色", CHAR_COLORYELLOW); + NewMetamoId=MetamoList[i][2]; + }else if( strstr( itemarg, "黄" ) ){ + CHAR_talkToCli( charaindex, -1, "变成黄色", CHAR_COLORYELLOW); + NewMetamoId=MetamoList[i][3]; + }else if( strstr( itemarg, "灰" ) ){ + CHAR_talkToCli( charaindex, -1, "变成灰色", CHAR_COLORYELLOW); + NewMetamoId=MetamoList[i][4]; + }else if( strstr( itemarg, "随" ) ){ + srand(time(0)); + do + NewMetamoId=MetamoList[i][rand()%4+1]; + while(NewMetamoId==OldMetamoId); + CHAR_talkToCli( charaindex, -1, "随机变色成功", CHAR_COLORYELLOW); + }else{ + CHAR_talkToCli( charaindex, -1, "变色失败", CHAR_COLORYELLOW); + return; + } + if(NewMetamoId==0)return; + CHAR_setInt( charaindex , CHAR_BASEIMAGENUMBER , NewMetamoId ); + CHAR_setInt( charaindex , CHAR_BASEBASEIMAGENUMBER , NewMetamoId ); + + CHAR_complianceParameter( charaindex ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( charaindex , CHAR_WORKOBJINDEX )); + CHAR_send_P_StatusString( charaindex , CHAR_P_STRING_BASEBASEIMAGENUMBER); + CHAR_DelItem( charaindex, haveitemindex); +} + +void ITEM_CharaMetamo( int charaindex, int toindex, int haveitemindex) +{ + int OldMetamoId=0, NewMetamoId=0; + int itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + char *itemarg,p; + itemarg=ITEM_getChar(itemindex,ITEM_ARGUMENT); + if( itemarg == NULL ) return; + OldMetamoId=CHAR_getInt( charaindex, CHAR_BASEBASEIMAGENUMBER); + if(OldMetamoId >= 100000 || OldMetamoId < 100240){ + if( strstr( itemarg, "豆丁囝" ) && OldMetamoId < 100120){ + CHAR_talkToCli( charaindex, -1, "更改造型为豆囝", CHAR_COLORYELLOW); + NewMetamoId=(OldMetamoId/1000)*1000+(OldMetamoId%20); + }else if( strstr( itemarg, "赛亚人" ) && OldMetamoId < 100120 ){ + CHAR_talkToCli( charaindex, -1, "更改造型为赛亚人", CHAR_COLORYELLOW); + NewMetamoId=(OldMetamoId/1000)*1000+20+(OldMetamoId%20); + }else if( strstr( itemarg, "辫子男孩" ) && OldMetamoId < 100120 ){ + CHAR_talkToCli( charaindex, -1, "更改造型为辫子男孩", CHAR_COLORYELLOW); + NewMetamoId=(OldMetamoId/1000)*1000+40+(OldMetamoId%20); + }else if( strstr( itemarg, "酷哥" ) && OldMetamoId < 100120 ){ + CHAR_talkToCli( charaindex, -1, "更改造型为酷哥", CHAR_COLORYELLOW); + NewMetamoId=(OldMetamoId/1000)*1000+60+(OldMetamoId%20); + }else if( strstr( itemarg, "熊皮男" ) && OldMetamoId < 100120 ){ + CHAR_talkToCli( charaindex, -1, "更改造型为熊皮男", CHAR_COLORYELLOW); + NewMetamoId=(OldMetamoId/1000)*1000+80+(OldMetamoId%20); + }else if( strstr( itemarg, "大只佬" ) && OldMetamoId < 100120 ){ + CHAR_talkToCli( charaindex, -1, "更改造型为大只佬", CHAR_COLORYELLOW); + NewMetamoId=(OldMetamoId/1000)*1000+100+(OldMetamoId%20); + }else if( strstr( itemarg, "随机" ) && OldMetamoId < 100120 ){ + srand(time(0)); + do + NewMetamoId=(OldMetamoId/1000)*1000+(rand()%6)*20+(OldMetamoId%20); + while(NewMetamoId==OldMetamoId); + CHAR_talkToCli( charaindex, -1, "随机更改造型成功", CHAR_COLORYELLOW); + } + if( strstr( itemarg, "豆丁囡" ) && OldMetamoId >= 100120 ){ + CHAR_talkToCli( charaindex, -1, "更改造型为豆丁囡", CHAR_COLORYELLOW); + NewMetamoId=(OldMetamoId/1000)*1000+120+(OldMetamoId%20); + }else if( strstr( itemarg, "熊皮妹" ) && OldMetamoId >= 100120 ){ + CHAR_talkToCli( charaindex, -1, "更改造型为熊皮妹", CHAR_COLORYELLOW); + NewMetamoId=(OldMetamoId/1000)*1000+140+(OldMetamoId%20); + }else if( strstr( itemarg, "帽子妹" ) && OldMetamoId >= 100120 ){ + CHAR_talkToCli( charaindex, -1, "更改造型为帽子妹", CHAR_COLORYELLOW); + NewMetamoId=(OldMetamoId/1000)*1000+160+(OldMetamoId%20); + }else if( strstr( itemarg, "短发夹妹" ) && OldMetamoId >= 100120 ){ + CHAR_talkToCli( charaindex, -1, "更改造型为短发夹妹", CHAR_COLORYELLOW); + NewMetamoId=(OldMetamoId/1000)*1000+180+(OldMetamoId%20); + }else if( strstr( itemarg, "手套女" ) && OldMetamoId >= 100120 ){ + CHAR_talkToCli( charaindex, -1, "更改造型为手套女", CHAR_COLORYELLOW); + NewMetamoId=(OldMetamoId/1000)*1000+200+(OldMetamoId%20); + }else if( strstr( itemarg, "辣妹" ) && OldMetamoId >= 100120 ){ + CHAR_talkToCli( charaindex, -1, "更改造型为辣妹", CHAR_COLORYELLOW); + NewMetamoId=(OldMetamoId/1000)*1000+220+(OldMetamoId%20); + }else if( strstr( itemarg, "随机" ) && OldMetamoId >= 100120 ){ + srand(time(0)); + do + NewMetamoId=(OldMetamoId/1000)*1000+(rand()%6)*20+120+(OldMetamoId%20); + while(NewMetamoId==OldMetamoId); + CHAR_talkToCli( charaindex, -1, "随机更改造型成功", CHAR_COLORYELLOW); + } + }else{ + CHAR_talkToCli( charaindex, -1, "你并不是人物造型!", CHAR_COLORYELLOW); + return; + } + if(NewMetamoId==0){ + CHAR_talkToCli( charaindex, -1, "你的性别不同,无没更改此造型!", CHAR_COLORYELLOW); + return;} + CHAR_setInt( charaindex , CHAR_BASEIMAGENUMBER , NewMetamoId ); + CHAR_setInt( charaindex , CHAR_BASEBASEIMAGENUMBER , NewMetamoId ); + + CHAR_complianceParameter( charaindex ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( charaindex , CHAR_WORKOBJINDEX )); + CHAR_send_P_StatusString( charaindex , CHAR_P_STRING_BASEBASEIMAGENUMBER); + CHAR_DelItem( charaindex, haveitemindex); +} + +void ITEM_SexMetamo( int charaindex, int toindex, int haveitemindex) +{ + int OldMetamoId, NewMetamoId; + OldMetamoId=CHAR_getInt( charaindex, CHAR_BASEBASEIMAGENUMBER); + if(OldMetamoId>=100000 && OldMetamoId <100020){ //豆丁囝 + NewMetamoId=OldMetamoId+120; + CHAR_talkToCli( charaindex, -1, "恭喜你变性成豆丁囡!", CHAR_COLORYELLOW); + }else if(OldMetamoId>=100020 && OldMetamoId <100040){ //赛亚人 + NewMetamoId=OldMetamoId+160; + CHAR_talkToCli( charaindex, -1, "恭喜你变性成短发夹妹!", CHAR_COLORYELLOW); + }else if(OldMetamoId>=100040 && OldMetamoId <100060){ //辫子男孩 + NewMetamoId=OldMetamoId+120; + CHAR_talkToCli( charaindex, -1, "恭喜你变性成帽子妹!", CHAR_COLORYELLOW); + }else if(OldMetamoId>=100060 && OldMetamoId <100080){ //酷哥 + NewMetamoId=OldMetamoId+160; + CHAR_talkToCli( charaindex, -1, "恭喜你变性成辣妹!", CHAR_COLORYELLOW); + }else if(OldMetamoId>=100080 && OldMetamoId <100100){ //熊皮男 + NewMetamoId=OldMetamoId+60; + CHAR_talkToCli( charaindex, -1, "恭喜你变性成熊皮妹!", CHAR_COLORYELLOW); + }else if(OldMetamoId>=100100 && OldMetamoId <100120){ //大只佬 + NewMetamoId=OldMetamoId+100; + CHAR_talkToCli( charaindex, -1, "恭喜你变性成手套女!", CHAR_COLORYELLOW); + }else if(OldMetamoId>=100120 && OldMetamoId <100140){ //豆丁囡 + NewMetamoId=OldMetamoId-120; + CHAR_talkToCli( charaindex, -1, "恭喜你变性成豆丁囝!", CHAR_COLORYELLOW); + }else if(OldMetamoId>=100140 && OldMetamoId <100160){ //熊皮妹 + NewMetamoId=OldMetamoId-60; + CHAR_talkToCli( charaindex, -1, "恭喜你变性成熊皮男!", CHAR_COLORYELLOW); + }else if(OldMetamoId>=100160 && OldMetamoId <100180){ //帽子妹 + NewMetamoId=OldMetamoId-120; + CHAR_talkToCli( charaindex, -1, "恭喜你变性成辫子男孩!", CHAR_COLORYELLOW); + }else if(OldMetamoId>=100180 && OldMetamoId <100200){ //短发夹妹 + NewMetamoId=OldMetamoId-160; + CHAR_talkToCli( charaindex, -1, "恭喜你变性成赛亚人!", CHAR_COLORYELLOW); + }else if(OldMetamoId>=100200 && OldMetamoId <100220){ //手套女 + NewMetamoId=OldMetamoId-100; + CHAR_talkToCli( charaindex, -1, "恭喜你变性成大只佬!", CHAR_COLORYELLOW); + }else if(OldMetamoId>=100220 && OldMetamoId <100240){ //辣妹 + NewMetamoId=OldMetamoId-160; + CHAR_talkToCli( charaindex, -1, "恭喜你变性成酷哥!", CHAR_COLORYELLOW); + }else{ + CHAR_talkToCli( charaindex, -1, "你并不是人物造型,无法变性!", CHAR_COLORYELLOW); + return;} + if(NewMetamoId==0)return; + CHAR_setInt( charaindex , CHAR_BASEIMAGENUMBER , NewMetamoId ); + CHAR_setInt( charaindex , CHAR_BASEBASEIMAGENUMBER , NewMetamoId ); + + CHAR_complianceParameter( charaindex ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( charaindex , CHAR_WORKOBJINDEX )); + CHAR_send_P_StatusString( charaindex , CHAR_P_STRING_BASEBASEIMAGENUMBER); + CHAR_DelItem( charaindex, haveitemindex); +} +#endif + +#ifdef _GM_ITEM +void ITEM_GMFUNCTION( int charaindex, int toindex, int haveitemindex) +{ + int itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + char *itemarg; + char gmtime[16]; + char gmfunction[16]; + char token[64]; + itemarg=ITEM_getChar(itemindex,ITEM_ARGUMENT); + if( itemarg == NULL ) return; + memset( gmfunction, 0, sizeof( gmfunction)); + memset( gmtime, 0, sizeof( gmtime)); + getStringFromIndexWithDelim(itemarg,"|", 1, gmfunction, sizeof(gmfunction)); + getStringFromIndexWithDelim(itemarg,"|", 2, gmtime, sizeof(gmtime)); + CHAR_setChar( charaindex , CHAR_GMFUNCTION, gmfunction ); + CHAR_setInt( charaindex , CHAR_GMTIME, atoi(gmtime) ); + sprintf( token, "获得使用%s权限%d!", gmfunction, atoi(gmtime)); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW); + sprintf( token, "相关使用请查看[help %s]无需GM密码!",CHAR_getChar( charaindex, CHAR_GMFUNCTION), gmfunction); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW ); + CHAR_DelItem( charaindex, haveitemindex); +} +#endif + diff --git a/gmsv/item/item_event.c.bak b/gmsv/item/item_event.c.bak new file mode 100644 index 0000000..07057e5 --- /dev/null +++ b/gmsv/item/item_event.c.bak @@ -0,0 +1,4635 @@ +#include "version.h" +#include /* strstr */ +#include /* isdigit, isalnum */ +#include "common.h" +#include "char.h" +#include "char_base.h" +#include "char_data.h" +#include "configfile.h" +#include "item.h" +#include "item_event.h" +#include "object.h" +#include "anim_tbl.h" +#include "magic.h" +#include "handletime.h" +#include "log.h" +#include "util.h" +#include "encount.h" +#include "battle.h" +#include "battle_item.h" +#include "lssproto_serv.h" +#include "net.h" +#include "pet.h" +#include "npcutil.h" +#include "enemy.h" +#ifdef _Item_ReLifeAct +#include "battle_magic.h" +#endif +#ifdef _MARKET_TRADE +#include "item_trade.h" +#endif +#ifdef _ITEM_WARP_FIX_BI +extern tagRidePetTable ridePetTable[146]; +#endif +#include "pet_skill.h" + +#ifdef _DEATH_CONTENDAB +#include "deathcontend.h" +#endif + +#ifdef _CFREE_petskill +#include "npc_freepetskillshop.h" +#endif + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 +#include "profession_skill.h" +#endif + +int ITEM_TimeDelCheck( int itemindex ) +{ int icnt, jcnt, playernum; + playernum = CHAR_getPlayerMaxNum(); + for( icnt = 0; icnt < playernum; icnt ++ ) { + if( CHAR_CHECKINDEX( icnt ) ) { + for( jcnt = 0; jcnt < CHAR_MAXITEMHAVE; jcnt ++ ) { + if( CHAR_getItemIndex( icnt, jcnt ) == itemindex ) { + print( "道具效力时间已到,进行奇怪道具处理(%s)(%s)\n", + CHAR_getUseName(icnt),ITEM_getAppropriateName(itemindex) ); + return FALSE; + } + } + } + } + return TRUE; +} + +int ITEM_eventDrop( int itemindex, int charaindex, int itemcharaindex ) +{ + typedef void (*DROPF)(int,int); + char szBuffer[256]=""; + DROPF dropfunc=NULL; + + if( ITEM_CHECKINDEX(itemindex) == FALSE )return -1; + + dropfunc=(DROPF)ITEM_getFunctionPointer( itemindex, ITEM_DROPFUNC ); + if( dropfunc ){ + dropfunc( charaindex, itemindex ); + } + + if( ITEM_getInt( itemindex, ITEM_VANISHATDROP) != 1 )return 0; + snprintf( szBuffer, sizeof( szBuffer), "%s 消灭了。", + ITEM_getAppropriateName(itemindex) ); + CHAR_talkToCli( charaindex, -1, szBuffer, CHAR_COLORWHITE ); + + { + LogItem( + CHAR_getChar( charaindex, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( charaindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), /* 失奶 丞 寞 */ +#endif + "Drop&Delete(丢出後消失)", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + } + CHAR_setItemIndex( charaindex, itemcharaindex, -1); + ITEM_endExistItemsOne( itemindex ); + return 1; +} + +#undef UNDEF +#define UNDEF (-1) + +typedef struct { + char* cmd; /* 摹 侬 */ + char* onmessage; /* 丢永本□斥 侬 */ + char* offmessage; /* 丢永本□斥 侬 */ + int element; /* 覆擂卞卅月邰豳 */ + int maxElement; /* element匹隙烂今木凶邰豳及 袄毛手勾邰豳 */ +} ITEM_EFFECTPARAM; +static ITEM_EFFECTPARAM ITEM_restorableParam[] = { + {"hp", "HP回复了。", "HP降低了。",CHAR_HP, CHAR_WORKMAXHP}, + {"mp", "MP回复了。", "MP降低了。",CHAR_MP, CHAR_WORKMAXMP}, +}; +static ITEM_EFFECTPARAM ITEM_statusParam[] = { + {"po", CHAR_POISONSTRING, CHAR_RECOVERPOISONSTRING, + CHAR_POISON, UNDEF}, + + {"pa", CHAR_PARALYSISSTRING, CHAR_RECOVERPARALYSISSTRING, + CHAR_PARALYSIS, UNDEF}, + + {"si", CHAR_SILENCESTRING, CHAR_RECOVERSILENCESTRING, + CHAR_SLEEP,UNDEF}, + + {"st", CHAR_STONESTRING, CHAR_RECOVERSTONESTRING, CHAR_STONE, UNDEF}, + + {"da", CHAR_DARKNESSSTRING, CHAR_RECOVERDARKNESSSTRING, + CHAR_DRUNK,UNDEF}, + + {"co", CHAR_CONFUSIONSTRING,CHAR_RECOVERCONFUSIONSTRING, + CHAR_CONFUSION, UNDEF}, +}; + +/*#define LOCAL_DEBUG*/ +#ifdef LOCAL_DEBUG +#define DOUTFILE "doutfile" +#include +#include +static int eprintf(char* format, ...){ + va_list arg; + long len; + FILE* fp; + fp = fopen(DOUTFILE, "a"); + va_start(arg, format); + len = vfprintf(stderr, format, arg); + if(fp){ vfprintf(fp, format, arg); fclose(fp); } + va_end(arg); + return len; +} + +#define fprint eprintf +#endif + +static BOOL ITEM_isValidEffect(char* cmd, int value){ + int i; + + for(i=0; istring[ITEM_ARGUMENT].string; + if(* effectarg == '\0') return TRUE; + for(p=effectarg; *p != '\0'; ){ + int i; + if(*p == SEPARATORI) p++; + for(q=cmd, i=0; isalnum(*p) && i 0 ) + onoroff=ITEM_restorableParam[i].onmessage; + else if( amount < 0 ) + onoroff=ITEM_restorableParam[i].offmessage; + else + return FALSE; + strcpysafe( ansmsg, sizeof(ansmsg), onoroff ); + CHAR_talkToCli( charaindex, -1, ansmsg, CHAR_COLORWHITE); + return TRUE; +#else + if(value == ITEM_EFFECT_RESTORE_NORMAL){ + int maxv, curv, amount; + maxv =CHAR_getWorkInt(charaindex, ITEM_restorableParam[i].maxElement); + curv =CHAR_getInt(charaindex, ITEM_restorableParam[i].element); + amount = 30; + if(curv + amount < 0) amount = -curv; + CHAR_setInt(charaindex, ITEM_restorableParam[i].element, min((curv+amount), maxv)); + snprintf( ansmsg, sizeof(ansmsg), "%s回复了。", + ITEM_restorableParam[i].onmessage ); + CHAR_talkToCli( charaindex, -1, ansmsg, CHAR_COLORWHITE); + return TRUE; + }else if(value == ITEM_EFFECT_RESTORE_COMPLETE){ + int maxv; + maxv =CHAR_getWorkInt(charaindex, ITEM_restorableParam[i].maxElement); + CHAR_setInt(charaindex, ITEM_restorableParam[i].element, maxv); + snprintf( ansmsg, sizeof(ansmsg), "%s已完全回复。", ITEM_restorableParam[i].onmessage ); + CHAR_talkToCli( charaindex, -1, ansmsg, CHAR_COLORWHITE ); + return TRUE; + }else + return FALSE; +#endif + + } + } + if( value >= 0 ){ + int found = 0; + for(i=0; i (int)( itemputtime + getItemdeletetime() ) ) { + if( ITEM_TimeDelCheck( itemindex ) == FALSE ){ + return ; + } + { + LogItem( + "NULL", + "NULL", +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), +#endif + "TiemDelete", + OBJECT_getFloor( objindex ), + OBJECT_getX( objindex ), + OBJECT_getY( objindex ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + } + ITEM_endExistItemsOne(itemindex); + CHAR_ObjectDelete(objindex); + } +} + +void ITEM_useEffectTohelos( int charaindex, int to_charaindex, int haveitemindex) +{ + char buf[64]; + char msgbuf[64]; + int ret; + int itemindex; + int cutrate, limitcount; + int per; + int sendcharaindex = charaindex; + + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + + CHAR_setItemIndex(charaindex, haveitemindex ,-1); + CHAR_sendItemDataOne( charaindex, haveitemindex); + ret = getStringFromIndexWithDelim( ITEM_getChar(itemindex, ITEM_ARGUMENT) , + "|", 1, buf, sizeof( buf)); + if( ret != TRUE ) { + { + LogItem( + CHAR_getChar( charaindex, CHAR_NAME ), + CHAR_getChar( charaindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), +#endif + "FieldErrorUse", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + } + ITEM_endExistItemsOne( itemindex); + return; + } + cutrate = atoi( buf); + if( cutrate < 0 ) cutrate = 0; + ret = getStringFromIndexWithDelim( ITEM_getChar(itemindex, ITEM_ARGUMENT) , + "|", 2, buf, sizeof( buf)); + if( ret != TRUE ) { + { + LogItem( + CHAR_getChar( charaindex, CHAR_NAME ), + CHAR_getChar( charaindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), +#endif + "FieldUse", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + } + ITEM_endExistItemsOne( itemindex); + return; + } + limitcount = atoi( buf); + if( limitcount < 0) limitcount = 0; + if( CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE) == CHAR_PARTY_CLIENT) { + sendcharaindex = CHAR_getWorkInt( charaindex, CHAR_WORKPARTYINDEX1); + } + CHAR_setWorkInt( sendcharaindex, CHAR_WORK_TOHELOS_CUTRATE, cutrate); + CHAR_setWorkInt( sendcharaindex, CHAR_WORK_TOHELOS_COUNT, limitcount); + + snprintf( msgbuf, sizeof(msgbuf), + "抓到了%s 。", ITEM_getChar(itemindex, ITEM_NAME) ); + CHAR_talkToCli( charaindex, -1, msgbuf, CHAR_COLORWHITE ); + + if( sendcharaindex != charaindex ) { + snprintf( msgbuf, sizeof(msgbuf), + "%s 抓到了 %s。 ", + CHAR_getChar( charaindex, CHAR_NAME), + ITEM_getChar( itemindex, ITEM_NAME) ); + CHAR_talkToCli( sendcharaindex, -1, msgbuf, CHAR_COLORWHITE ); + } + + { + LogItem( + CHAR_getChar( charaindex, CHAR_NAME ), + CHAR_getChar( charaindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), +#endif + "FieldUse", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + } + ITEM_endExistItemsOne( itemindex); + per = ENCOUNT_getEncountPercentMin( sendcharaindex, + CHAR_getInt( sendcharaindex, CHAR_FLOOR), + CHAR_getInt( sendcharaindex, CHAR_X), + CHAR_getInt( sendcharaindex, CHAR_Y)); + if( per != -1) { + CHAR_setWorkInt( sendcharaindex, CHAR_WORKENCOUNTPROBABILITY_MIN, per); + } + per = ENCOUNT_getEncountPercentMax( sendcharaindex, + CHAR_getInt( sendcharaindex, CHAR_FLOOR), + CHAR_getInt( sendcharaindex, CHAR_X), + CHAR_getInt( sendcharaindex, CHAR_Y)); + if( per != -1) { + CHAR_setWorkInt( sendcharaindex, CHAR_WORKENCOUNTPROBABILITY_MAX, per); + } + CHAR_sendStatusString( sendcharaindex, "E" ); +} + +void ITEM_dropMic( int charaindex , int itemindex ) +{ + if( !ITEM_CHECKINDEX( itemindex )) return; + + CHAR_setWorkInt( charaindex, CHAR_WORKFLG, + CHAR_getWorkInt( charaindex, CHAR_WORKFLG ) & ~WORKFLG_MICMODE ); +} + +void ITEM_useMic_Field( int charaindex, int to_charaindex, int haveitemindex ) +{ + if( CHAR_getWorkInt( charaindex, CHAR_WORKFLG ) & WORKFLG_MICMODE ){ + CHAR_setWorkInt( charaindex, CHAR_WORKFLG, + CHAR_getWorkInt( charaindex, CHAR_WORKFLG ) & ~WORKFLG_MICMODE ); + CHAR_talkToCli( charaindex, -1, "将麦克风设定为OFF。", CHAR_COLORWHITE); + }else{ + CHAR_setWorkInt( charaindex, CHAR_WORKFLG, + CHAR_getWorkInt( charaindex, CHAR_WORKFLG ) | WORKFLG_MICMODE ); + CHAR_talkToCli( charaindex, -1, "将麦克风设定为ON。", CHAR_COLORWHITE); + } +} +#if 1 +char *aszHealStringByOwn[] = { + "%s的耐久力回复%d", + "%s的气力回复%d", + "%s的魅力上升%d", + "%s的忠诚度上升%d", + "" +}; + +char *aszDownStringByOwn[] = { + "%s的耐久力减低%d", + "%s的气力减低%d", + "%s的魅力下降%d", + "%s的忠诚度下降%d", + "" +}; + +char *aszHealStringByOther[] = { + "藉由%s%s的耐久力回复%d", + "藉由%s%s的气力回复%d", + "藉由%s%s的魅力上升%d", + "藉由%s%s的忠诚度上升%d", + "" +}; + +char *aszDownStringByOther[] = { + "藉由%s%s的耐久力减低%d", + "藉由%s%s的气力减低%d", + "藉由%s%s的魅力减低%d", + "藉由%s%s的忠诚度减低%d", + "" +}; + +char *aszKeyString[] = {"体", "气", "魅", "忠", ""}; +int aHealInt[] = { CHAR_HP, CHAR_MP, CHAR_CHARM, CHAR_VARIABLEAI, -1 }; +int aHealMaxWork[] = { CHAR_WORKMAXHP, CHAR_WORKMAXMP, -1, -1, -1 }; + +void ITEM_useRecovery_Field( + int charaindex, + int toindex, + int haveitemindex +){ + int work, workmax, workmin; + int power[BD_KIND_END] = {0,0,0}, + prevhp = 0, + workhp = 0, + recovery[BD_KIND_END] = {0,0,0}; + int itemindex, kind = BD_KIND_HP, HealFlg = 0, j; + char *p = NULL, *arg, msgbuf[256]; + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if( !ITEM_CHECKINDEX(itemindex) ) return; + if( CHAR_CHECKINDEX( toindex ) == FALSE )return ; + arg = ITEM_getChar(itemindex, ITEM_ARGUMENT ); + if( arg == NULL ) return; + +#ifdef _ITEM_UNBECOMEPIG + if( (p = strstr( arg, "解猪" )) != NULL ){ + if( CHAR_getInt( toindex, CHAR_BECOMEPIG ) > -1 ){ + CHAR_setInt( toindex, CHAR_BECOMEPIG, -1 ); + CHAR_complianceParameter( toindex ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( toindex , CHAR_WORKOBJINDEX )); + CHAR_send_P_StatusString( toindex , CHAR_P_STRING_BASEBASEIMAGENUMBER); + CHAR_talkToCli( toindex,-1,"乌力化失效了。",CHAR_COLORWHITE); + CHAR_DelItemMess( charaindex, haveitemindex, 0); + } + return; + } +#endif +#ifdef _ITEM_LVUPUP + if( (p = strstr( arg, "LVUPUP" ) ) != NULL ){ + if (CHAR_getInt(toindex, CHAR_WHICHTYPE)==CHAR_TYPEPET){ + int pidx=0,lvup=0,lv=0; + sprintf( msgbuf, "%s", p+7 ); + pidx = atoi( strtok( msgbuf, " " ) ); + if( pidx != CHAR_getInt( toindex, CHAR_PETID) || CHAR_getInt(toindex, CHAR_LIMITLEVEL) == 0 ){ + CHAR_talkToCli( charaindex,-1,"无法使用",CHAR_COLORWHITE); + return; + } + lv = CHAR_getInt( toindex, CHAR_LV ); + if( lv < 10 || lv >= 140 ){ + CHAR_talkToCli( charaindex,-1,"目前等级无法使用",CHAR_COLORWHITE); + return; + } + if( (p = strstr( arg, "地" )) != NULL ) + lvup=2; + if( (p = strstr( arg, "水" )) != NULL ) + lvup=3; + if( (p = strstr( arg, "火" )) != NULL ) + lvup=0; + if( (p = strstr( arg, "风" )) != NULL ) + lvup=1; + if( lv%4 != lvup || CHAR_getInt(toindex, CHAR_LIMITLEVEL)-lv >= 1 ){// + CHAR_talkToCli( charaindex,-1,"破除封印失败",CHAR_COLORWHITE); + CHAR_DelItemMess( charaindex, haveitemindex, 0); + return; + } + CHAR_setInt(toindex, CHAR_LIMITLEVEL, CHAR_getInt(toindex, CHAR_LIMITLEVEL)+1); + CHAR_talkToCli( charaindex,-1,"封印魔咒减弱,最高等级提升",CHAR_COLORWHITE); + if( CHAR_getInt(toindex, CHAR_LIMITLEVEL) == 140 ){ + CHAR_setInt(toindex, CHAR_LIMITLEVEL, 0); + CHAR_talkToCli( charaindex,-1,"封印魔咒解除了",CHAR_COLORWHITE); + } + CHAR_DelItemMess( charaindex, haveitemindex, 0); + CHAR_complianceParameter( toindex ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( toindex , CHAR_WORKOBJINDEX )); + } + return; + } + if( (p = strstr( arg, "UPUPLV" ) ) != NULL ){ + if (CHAR_getInt(toindex, CHAR_WHICHTYPE)==CHAR_TYPEPET){ + int pidx=0,lvup=0,lv=0; + sprintf( msgbuf, "%s", p+7 ); + pidx = atoi( strtok( msgbuf, " " ) ); + if( pidx != CHAR_getInt( toindex, CHAR_PETID) || CHAR_getInt(toindex, CHAR_LIMITLEVEL) == 0 ){ + CHAR_talkToCli( charaindex,-1,"无法使用",CHAR_COLORWHITE); + return; + } + lv = CHAR_getInt( toindex, CHAR_LV ); + if( lv < 125 || lv > 140 ){ + CHAR_talkToCli( charaindex,-1,"目前等级无法使用",CHAR_COLORWHITE); + return; + } + CHAR_setInt(toindex, CHAR_LIMITLEVEL, 0); + CHAR_talkToCli( charaindex,-1,"封印魔咒解除了",CHAR_COLORWHITE); + CHAR_DelItemMess( charaindex, haveitemindex, 0); + CHAR_complianceParameter( toindex ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( toindex , CHAR_WORKOBJINDEX )); + } + return; + } +#endif +#ifdef _ITEM_PROPERTY + if( (p = strstr( arg, "PROPERTY" ) ) != NULL ){ + //print("地水火风:%s", arg ); + if (CHAR_getInt(toindex, CHAR_WHICHTYPE)!=CHAR_TYPEPLAYER) + return; + if( (p = strstr( arg, "+" ) ) != NULL ){//旋转属性 正转 + if( CHAR_getInt( toindex, CHAR_EARTHAT ) == 100 ) + CHAR_setInt( toindex, CHAR_EARTHAT, CHAR_getInt( toindex, CHAR_EARTHAT )-10 ), + CHAR_setInt( toindex, CHAR_WATERAT, CHAR_getInt( toindex, CHAR_WATERAT )+10 ); + else if( CHAR_getInt( toindex, CHAR_WATERAT ) == 100 ) + CHAR_setInt( toindex, CHAR_WATERAT, CHAR_getInt( toindex, CHAR_WATERAT )-10 ), + CHAR_setInt( toindex, CHAR_FIREAT, CHAR_getInt( toindex, CHAR_FIREAT )+10 ); + else if( CHAR_getInt( toindex, CHAR_FIREAT ) == 100 ) + CHAR_setInt( toindex, CHAR_FIREAT, CHAR_getInt( toindex, CHAR_FIREAT )-10 ), + CHAR_setInt( toindex, CHAR_WINDAT, CHAR_getInt( toindex, CHAR_WINDAT )+10 ); + else if( CHAR_getInt( toindex, CHAR_WINDAT ) == 100 ) + CHAR_setInt( toindex, CHAR_WINDAT, CHAR_getInt( toindex, CHAR_WINDAT )-10 ), + CHAR_setInt( toindex, CHAR_EARTHAT, CHAR_getInt( toindex, CHAR_EARTHAT )+10 ); + else if( CHAR_getInt( toindex, CHAR_EARTHAT ) > 0 && CHAR_getInt( toindex, CHAR_WATERAT ) > 0 ) + CHAR_setInt( toindex, CHAR_EARTHAT, CHAR_getInt( toindex, CHAR_EARTHAT )-10 ), + CHAR_setInt( toindex, CHAR_WATERAT, CHAR_getInt( toindex, CHAR_WATERAT )+10 ); + else if( CHAR_getInt( toindex, CHAR_WATERAT ) > 0 && CHAR_getInt( toindex, CHAR_FIREAT ) > 0 ) + CHAR_setInt( toindex, CHAR_WATERAT, CHAR_getInt( toindex, CHAR_WATERAT )-10 ), + CHAR_setInt( toindex, CHAR_FIREAT, CHAR_getInt( toindex, CHAR_FIREAT )+10 ); + else if( CHAR_getInt( toindex, CHAR_FIREAT ) > 0 && CHAR_getInt( toindex, CHAR_WINDAT ) > 0 ) + CHAR_setInt( toindex, CHAR_FIREAT, CHAR_getInt( toindex, CHAR_FIREAT )-10 ), + CHAR_setInt( toindex, CHAR_WINDAT, CHAR_getInt( toindex, CHAR_WINDAT )+10 ); + else if( CHAR_getInt( toindex, CHAR_WINDAT ) > 0 && CHAR_getInt( toindex, CHAR_EARTHAT ) > 0 ) + CHAR_setInt( toindex, CHAR_WINDAT, CHAR_getInt( toindex, CHAR_WINDAT )-10 ), + CHAR_setInt( toindex, CHAR_EARTHAT, CHAR_getInt( toindex, CHAR_EARTHAT )+10 ); + } + if( (p = strstr( arg, "-" ) ) != NULL ){//旋转属性 反转 + if( CHAR_getInt( toindex, CHAR_EARTHAT ) == 100 ) + CHAR_setInt( toindex, CHAR_EARTHAT, CHAR_getInt( toindex, CHAR_EARTHAT )-10 ), + CHAR_setInt( toindex, CHAR_WINDAT, CHAR_getInt( toindex, CHAR_WINDAT )+10 ); + else if( CHAR_getInt( toindex, CHAR_WATERAT ) == 100 ) + CHAR_setInt( toindex, CHAR_WATERAT, CHAR_getInt( toindex, CHAR_WATERAT )-10 ), + CHAR_setInt( toindex, CHAR_EARTHAT, CHAR_getInt( toindex, CHAR_EARTHAT )+10 ); + else if( CHAR_getInt( toindex, CHAR_FIREAT ) == 100 ) + CHAR_setInt( toindex, CHAR_FIREAT, CHAR_getInt( toindex, CHAR_FIREAT )-10 ), + CHAR_setInt( toindex, CHAR_WATERAT, CHAR_getInt( toindex, CHAR_WATERAT )+10 ); + else if( CHAR_getInt( toindex, CHAR_WINDAT ) == 100 ) + CHAR_setInt( toindex, CHAR_WINDAT, CHAR_getInt( toindex, CHAR_WINDAT )-10 ), + CHAR_setInt( toindex, CHAR_FIREAT, CHAR_getInt( toindex, CHAR_FIREAT )+10 ); + else if( CHAR_getInt( toindex, CHAR_EARTHAT ) > 0 && CHAR_getInt( toindex, CHAR_WATERAT ) > 0 ) + CHAR_setInt( toindex, CHAR_EARTHAT, CHAR_getInt( toindex, CHAR_EARTHAT )+10 ), + CHAR_setInt( toindex, CHAR_WATERAT, CHAR_getInt( toindex, CHAR_WATERAT )-10 ); + else if( CHAR_getInt( toindex, CHAR_WATERAT ) > 0 && CHAR_getInt( toindex, CHAR_FIREAT ) > 0 ) + CHAR_setInt( toindex, CHAR_WATERAT, CHAR_getInt( toindex, CHAR_WATERAT )+10 ), + CHAR_setInt( toindex, CHAR_FIREAT, CHAR_getInt( toindex, CHAR_FIREAT )-10 ); + else if( CHAR_getInt( toindex, CHAR_FIREAT ) > 0 && CHAR_getInt( toindex, CHAR_WINDAT ) > 0 ) + CHAR_setInt( toindex, CHAR_FIREAT, CHAR_getInt( toindex, CHAR_FIREAT )+10 ), + CHAR_setInt( toindex, CHAR_WINDAT, CHAR_getInt( toindex, CHAR_WINDAT )-10 ); + else if( CHAR_getInt( toindex, CHAR_WINDAT ) > 0 && CHAR_getInt( toindex, CHAR_EARTHAT ) > 0 ) + CHAR_setInt( toindex, CHAR_WINDAT, CHAR_getInt( toindex, CHAR_WINDAT )+10 ), + CHAR_setInt( toindex, CHAR_EARTHAT, CHAR_getInt( toindex, CHAR_EARTHAT )-10 ); + } + CHAR_DelItemMess( charaindex, haveitemindex, 0); + CHAR_complianceParameter( toindex ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( toindex , CHAR_WORKOBJINDEX )); + CHAR_send_P_StatusString( toindex , + CHAR_P_STRING_EARTH | + CHAR_P_STRING_WATER | + CHAR_P_STRING_FIRE | + CHAR_P_STRING_WIND + ); + return; + } +#endif +#ifdef _ITEM_ADDPETEXP + if( (p = strstr( arg, "GETEXP" )) != NULL ){ + if (CHAR_getInt(toindex, CHAR_WHICHTYPE)==CHAR_TYPEPET){ + getStringFromIndexWithDelim( arg, "|", 2, msgbuf,sizeof( msgbuf));//宠物编号 + if( atoi(msgbuf) == CHAR_getInt( toindex, CHAR_PETID) ){ + getStringFromIndexWithDelim( arg, "|", 3, msgbuf,sizeof( msgbuf));//等级上限(等级超过才可用) + if( CHAR_getInt( toindex, CHAR_LV ) >= atoi(msgbuf) ){ + getStringFromIndexWithDelim( arg, "|", 4, msgbuf,sizeof( msgbuf));//经验值增加 + if( CHAR_getInt( toindex, CHAR_LV) < CHAR_MAXUPLEVEL ){ + int UpLevel = 0; + CHAR_setWorkInt( toindex, CHAR_WORKGETEXP, atoi(msgbuf) );//回存CHAR_WORKGETEXP + CHAR_AddMaxExp( toindex, CHAR_getWorkInt( toindex, CHAR_WORKGETEXP ) ); + sprintf( msgbuf,"这石头里面不知道有什麽样的矿,让我看看。(增加经验%d)", CHAR_getWorkInt( toindex, CHAR_WORKGETEXP ) ); + CHAR_talkToCli( charaindex,-1,msgbuf,CHAR_COLORWHITE); + UpLevel = CHAR_LevelUpCheck( toindex , charaindex); + if( UpLevel > 0 ){ + if( getBattleDebugMsg( ) != 0 ){ + snprintf( msgbuf, sizeof(msgbuf), + "(%s) 升级至 %d", + CHAR_getUseName( toindex ), + CHAR_getInt( toindex, CHAR_LV ) ); + BATTLE_talkToCli( charaindex, msgbuf, CHAR_COLORYELLOW ); + } + } + for( j = 0; j < UpLevel; j ++ ){ + CHAR_PetLevelUp( toindex ); + CHAR_PetAddVariableAi( toindex, AI_FIX_PETLEVELUP ); + } + CHAR_complianceParameter( toindex ); + } + else{ + CHAR_talkToCli( charaindex,-1,"不能使用",CHAR_COLORWHITE); + } + /*CHAR_send_P_StatusString( charindex, CHAR_P_STRING_DUELPOINT| + CHAR_P_STRING_TRANSMIGRATION| CHAR_P_STRING_RIDEPET| + CHAR_P_STRING_BASEBASEIMAGENUMBER| CHAR_P_STRING_GOLD| + CHAR_P_STRING_EXP| CHAR_P_STRING_LV| CHAR_P_STRING_HP|CHAR_P_STRING_LEARNRIDE); + */ + } + else + CHAR_talkToCli( charaindex,-1,"这石头....(无法判别,无法增加经验)",CHAR_COLORWHITE); + } + CHAR_DelItemMess( charaindex, haveitemindex, 0); + CHAR_complianceParameter( toindex ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( toindex , CHAR_WORKOBJINDEX )); + return; + } + else{ + CHAR_talkToCli( charaindex,-1,"不能使用",CHAR_COLORWHITE); + } + } +#endif + for( j = 0; j < BD_KIND_END; j ++ ){ + power[j] = 0; + recovery[j] = 0; + } + if( (p = strstr( arg, "全" )) != NULL ){ + HealFlg = ( 1 << BD_KIND_HP ); + if( CHAR_getInt( toindex, CHAR_WHICHTYPE) == CHAR_TYPEPET ){ + }else{ + HealFlg |= ( 1 << BD_KIND_MP ); + } + power[BD_KIND_HP] = 10000000; + power[BD_KIND_MP] = 100; + } + kind = BD_KIND_HP; + if( (p = strstr( arg, aszKeyString[kind] )) != NULL ){ + HealFlg |= ( 1 << kind ); + if( sscanf( p+2, "%d", &work ) != 1 ){ + power[kind] = 1; + }else{ + power[kind] = RAND( (work*0.9), (work*1.1) ); + } +#ifndef _MAGIC_REHPAI + power[kind] *= GetRecoveryRate( toindex ); +#endif + } + kind = BD_KIND_MP; + if( (p = strstr( arg, aszKeyString[kind] )) != NULL + && CHAR_getInt( toindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER){ + HealFlg |= ( 1 << kind ); + if( sscanf( p+2, "%d", &work ) != 1 ){ + power[kind] = 1; + }else{ + power[kind] = RAND( (work*0.9), (work*1.1) ); + } + } + kind = BD_KIND_AI; + if( (p = strstr( arg, aszKeyString[kind] )) != NULL + && CHAR_getInt( toindex, CHAR_WHICHTYPE) == CHAR_TYPEPET){ + HealFlg |= ( 1 << kind ); + if( sscanf( p+2, "%d", &work ) != 1 ){ + power[kind] = 1; + }else{ + power[kind] = RAND( (work*0.9), (work*1.1) ); + } + power[kind] *= 100; + } + kind = BD_KIND_CHARM; + if( (p = strstr( arg, aszKeyString[kind] )) != NULL + && CHAR_getInt( toindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER ){ + HealFlg |= ( 1 << kind ); + if( sscanf( p+2, "%d", &work ) != 1 ){ + power[kind] = 1; + }else{ + power[kind] = RAND( (work*0.9), (work*1.1) ); + } + } + if( HealFlg == 0 )return; +#ifdef _TYPE_TOXICATION + if( CHAR_CanCureFlg( toindex, "HP") == FALSE )return; +#endif + + for( j = 0; j < BD_KIND_END; j ++ ){ + if( ( HealFlg & ( 1 << j ) ) == 0 )continue; + prevhp = CHAR_getInt( toindex, aHealInt[j] ); + workhp = prevhp + (int)power[j]; + + if( j == BD_KIND_CHARM ){ + workmax = 100; + workmin = 0; + }else + if( j == BD_KIND_AI ){ + workmax = 10000; + workmin = -10000; + }else{ + workmax = CHAR_getWorkInt( toindex, aHealMaxWork[j] ); + workmin = 1; + } + workhp = min( workhp, workmax ); + workhp = max( workhp, workmin ); + CHAR_setInt( toindex, aHealInt[j], workhp ); + recovery[j] = workhp - prevhp; + if( j == BD_KIND_AI ){ + recovery[j] *= 0.01; + } + } + CHAR_complianceParameter( toindex ); + + if( CHAR_getInt( toindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER) { + if( charaindex != toindex ) { + CHAR_send_P_StatusString( toindex, CHAR_P_STRING_HP|CHAR_P_STRING_MP|CHAR_P_STRING_CHARM); + } + } + CHAR_send_P_StatusString( charaindex, CHAR_P_STRING_HP|CHAR_P_STRING_MP|CHAR_P_STRING_CHARM); + if( CHAR_getInt( toindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER && + CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE ){ + CHAR_PartyUpdate( toindex, CHAR_N_STRING_HP|CHAR_N_STRING_MP ); + } + if( CHAR_getInt( toindex, CHAR_WHICHTYPE) == CHAR_TYPEPET ){ + int i; + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ) { + int workindex = CHAR_getCharPet( charaindex, i ); + if( workindex == toindex ){ + CHAR_send_K_StatusString( charaindex, i, CHAR_K_STRING_HP|CHAR_K_STRING_AI); + } + } + } + + + for( j = 0; j < BD_KIND_END; j ++ ){ + if( ( HealFlg & ( 1 << j ) ) == 0 )continue; + if( charaindex != toindex) { + if( power[j] >= 0 ){ + snprintf( msgbuf, sizeof( msgbuf), + aszHealStringByOwn[j], + CHAR_getUseName( toindex ), recovery[j] ); + }else{ + snprintf( msgbuf, sizeof( msgbuf), + aszDownStringByOwn[j], + CHAR_getUseName( toindex ), -recovery[j] ); + } + CHAR_talkToCli( charaindex, -1, msgbuf, CHAR_COLORWHITE); + if( CHAR_getInt( toindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER) { + if( power[j] >= 0 ){ + snprintf( msgbuf, sizeof( msgbuf), + aszHealStringByOther[j], + CHAR_getUseName( charaindex ), + CHAR_getUseName( toindex ), recovery[j] ); + }else{ + snprintf( msgbuf, sizeof( msgbuf), + aszDownStringByOther[j], + CHAR_getUseName( charaindex ), + CHAR_getUseName( toindex ), -recovery[j] ); + } + CHAR_talkToCli( toindex, -1, msgbuf, CHAR_COLORWHITE); + } + }else { + if( power[j] >= 0 ){ + snprintf( msgbuf, sizeof( msgbuf), + aszHealStringByOwn[j], + CHAR_getUseName( charaindex ), recovery[j] ); + }else{ + snprintf( msgbuf, sizeof( msgbuf), + aszDownStringByOwn[j], + CHAR_getUseName( charaindex ), -recovery[j] ); + } + CHAR_talkToCli( charaindex, -1, msgbuf, CHAR_COLORWHITE); + } + } + { + LogItem( + CHAR_getChar( charaindex, CHAR_NAME ), + CHAR_getChar( charaindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), +#endif + "FieldUse", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + } + CHAR_DelItemMess( charaindex, haveitemindex, 0); + +} + +#endif + +void ITEM_useRecovery( int charaindex, int toindex, int haveitemindex) +{ + int battlemode; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return ; + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + if( battlemode == BATTLE_CHARMODE_INIT ){ + }else + if( battlemode ){ + ITEM_useRecovery_Battle( charaindex, toindex, haveitemindex ); + }else{ + ITEM_useRecovery_Field( charaindex, toindex, haveitemindex ); + } + +} + +#ifdef _ITEM_MAGICRECOVERY +void ITEM_useMRecovery( int charaindex, int toindex, int haveitemindex) +{ + int battlemode; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return ; + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + if( battlemode == BATTLE_CHARMODE_INIT ){ + }else + if( battlemode ){ + ITEM_useMRecovery_Battle( charaindex, toindex, haveitemindex ); + }else{ +// ITEM_useRecovery_Field( charaindex, toindex, haveitemindex ); + } + +} + +#endif + +#ifdef _ITEM_USEMAGIC +void ITEM_useMagic( int charaindex, int toindex, int haveitemindex) +{ + int battlemode; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return ; + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + if( battlemode == BATTLE_CHARMODE_INIT ){ + }else + if( battlemode ){ + ITEM_useMagic_Battle( charaindex, toindex, haveitemindex ); + } +} +#endif + +#ifdef _PET_LIMITLEVEL +void ITEM_useOtherEditBase( int charaindex, int toindex, int haveitemindex) +{ + int itemindex,i; + int work[4]; + int num=-1,type; + int LevelUpPoint,petrank; + char buf1[256]; + char buf2[][32]={"腕力成长率","耐久力成长率","速度成长率","体力成长率","能力"}; + char buf3[][32]={"大幅提高","略为提高","略为减少"}; + if( !CHAR_CHECKINDEX( charaindex ) ) return; + if( !CHAR_CHECKINDEX( toindex ) ) return; +#define RAND(x,y) ((x-1)+1+ (int)( (double)(y-(x-1))*rand()/(RAND_MAX+1.0)) ) + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if( !ITEM_CHECKINDEX(itemindex) ) return; + if( CHAR_getInt( toindex, CHAR_PETID) == 718 +#ifdef _PET_2LIMITLEVEL + || CHAR_getInt( toindex, CHAR_PETID) == 401 +#endif + ) { + + int maxnums=50; + + if( CHAR_getInt( toindex,CHAR_LV ) < 74 ) { + sprintf(buf1,"给我的吗?好美丽的项 喔!〈能力起了变化〉"); + CHAR_talkToCli( charaindex, toindex, buf1, CHAR_COLORWHITE); + num = ITEM_MODIFYATTACK; + LevelUpPoint = CHAR_getInt( toindex, CHAR_ALLOCPOINT ); + petrank = CHAR_getInt( toindex, CHAR_PETRANK ); + work[3] =(( LevelUpPoint >> 24 ) & 0xFF); + work[0] = (( LevelUpPoint >> 16 ) & 0xFF); + work[1] = (( LevelUpPoint >> 8 ) & 0xFF); + work[2] = (( LevelUpPoint >> 0 ) & 0xFF); + for( i=0; i<4; i++) { + type = ITEM_getInt( itemindex, (num + i)); + work[i] += type; + strcpy( buf1,"\0"); + if( work[i] > maxnums ) { + sprintf(buf1,"%s 已经达到最高了。", buf2[i]); + work[i] = maxnums; + }else if( work[i] < 0 ) { + sprintf(buf1,"%s 已经为零了。", buf2[i]); + work[i] = 0; + }else { + if( type > 0 ) { + if( type > 2 ) + sprintf(buf1,"%s %s %s", buf2[i], buf3[0], "。"); + else + sprintf(buf1,"%s %s %s", buf2[i], buf3[1], "。"); + }else if( type < 0 ){ + sprintf(buf1,"%s %s %s", buf2[i], buf3[2], "。"); + } + } + if( strcmp( buf1, "\0")) { + CHAR_talkToCli( charaindex, toindex, buf1, CHAR_COLORWHITE); + } + } + + LevelUpPoint = ( work[3]<< 24) + ( work[0]<< 16) + ( work[1]<< 8) + ( work[2]<< 0); + CHAR_setInt( toindex, CHAR_ALLOCPOINT, LevelUpPoint); + CHAR_setInt( toindex, CHAR_PETRANK, petrank); + LogPetPointChange( + CHAR_getChar( charaindex, CHAR_NAME ), + CHAR_getChar( charaindex, CHAR_CDKEY ), + CHAR_getChar( charaindex, CHAR_NAME), + toindex, 4, + CHAR_getInt( toindex, CHAR_LV), + "item_use", + CHAR_getInt( charaindex, CHAR_FLOOR), + CHAR_getInt( charaindex, CHAR_X ), + CHAR_getInt( charaindex, CHAR_Y ) + ); + } + + }else { + sprintf(buf1,"???"); + } + CHAR_DelItem( charaindex, haveitemindex); + return; +} +#endif + +void ITEM_useStatusChange( int charaindex, int toindex, int haveitemindex) +{ + int battlemode; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return ; //{撩 + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + if( battlemode == BATTLE_CHARMODE_INIT ){ + }else + if( battlemode ){ + ITEM_useStatusChange_Battle( charaindex, toindex, haveitemindex ); + }else{ + } + +} + +void ITEM_useStatusRecovery( int charaindex, int toindex, int haveitemindex) +{ + int battlemode; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return ; //{撩 + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + if( battlemode == BATTLE_CHARMODE_INIT ){ + }else + if( battlemode ){ + ITEM_useStatusRecovery_Battle( charaindex, toindex, haveitemindex ); + }else{ + } +} + +void ITEM_useMagicDef( int charaindex, int toindex, int haveitemindex) +{ + int battlemode; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return; + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + if( battlemode == BATTLE_CHARMODE_INIT ){ + }else + if( battlemode ){ + ITEM_useMagicDef_Battle( charaindex, toindex, haveitemindex ); + }else{ + } + +} + +void ITEM_useParamChange( int charaindex, int toindex, int haveitemindex) +{ + int battlemode; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return ; + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + if( battlemode == BATTLE_CHARMODE_INIT ){ + }else + if( battlemode ){ + ITEM_useParamChange_Battle( charaindex, toindex, haveitemindex ); + } +} + +void ITEM_useFieldChange( int charaindex, int toindex, int haveitemindex) +{ + int battlemode; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return ; + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + if( battlemode == BATTLE_CHARMODE_INIT ){ + }else + if( battlemode ){ + ITEM_useFieldChange_Battle( charaindex, toindex, haveitemindex ); + } +} + +void ITEM_useAttReverse( int charaindex, int toindex, int haveitemindex) +{ + int battlemode; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return; + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + if( battlemode == BATTLE_CHARMODE_INIT ){ + }else + if( battlemode ){ + ITEM_useAttReverse_Battle( charaindex, toindex, haveitemindex ); + }else{ + } +} + +void ITEM_useMic( int charaindex, int toindex, int haveitemindex) +{ + int battlemode; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return; + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + if( battlemode == BATTLE_CHARMODE_INIT ){ + }else + if( battlemode ){ + }else{ + ITEM_useMic_Field( charaindex, toindex, haveitemindex ); + } + +} + +void ITEM_useCaptureUp( int charaindex, int toindex, int haveitemindex) +{ + int battlemode; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return ; //{撩 + + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + if( battlemode == BATTLE_CHARMODE_INIT ){ + }else + if( battlemode ){ + ITEM_useCaptureUp_Battle( charaindex, toindex, haveitemindex ); + }else{ + } + +} + +#ifdef _PETSKILL_CANNEDFOOD +static void ITEM_usePetSkillCanned_PrintWindow( int charaindex, int flg) +{ + int fd; + char message[256], buf[2048]; + if( !CHAR_CHECKINDEX( charaindex )) return; + fd = getfdFromCharaIndex( charaindex); + if( fd == - 1 ) return; + + memset( message, 0, sizeof(message)); + sprintf( message, "%d", flg); + lssproto_WN_send( fd, WINDOWS_MESSAGETYPE_PETSKILLSHOW, + WINDOW_BUTTONTYPE_NONE, + ITEM_WINDOWTYPE_SELECTPETSKILL_SELECT, + -1, + makeEscapeString( message, buf, sizeof( buf))); +} + +void ITEM_usePetSkillCanned_WindowResult( int charaindex, int seqno, int select, char * data) +{ + int itemindex=-1, itemNo, petindex=-1, petNo; + int SkillNo, SkillID; + char buf1[256]; + char *skillarg=NULL; + + petNo = CHAR_getWorkInt( charaindex, CHAR_WORKRENAMEITEMNUM); + itemNo = CHAR_getWorkInt( charaindex, CHAR_WORKRENAMEITEMINDEX); + + + itemindex = CHAR_getItemIndex( charaindex, itemNo); + if( !ITEM_CHECKINDEX( itemindex) ) return; + petindex = CHAR_getCharPet( charaindex, petNo); + if( !CHAR_CHECKINDEX(petindex) ) return; + SkillNo = atoi( data); + if( SkillNo < 0 || SkillNo >= CHAR_MAXPETSKILLHAVE ) return; + + skillarg = ITEM_getChar( itemindex, ITEM_ARGUMENT); + SkillID = atoi( skillarg); + +#ifdef _CFREE_petskill + if( NPC_CHECKFREEPETSKILL( charaindex, petindex, SkillID) == FALSE ){ + CHAR_talkToCli( charaindex, -1, "该宠物无法学习此项技能!", CHAR_COLORYELLOW); + return; + } +#endif + + CHAR_setPetSkill( petindex, SkillNo, SkillID); + memset( buf1, 0, sizeof(buf1)); + snprintf( buf1, sizeof( buf1 ), "W%d", petNo); + CHAR_sendStatusString( charaindex, buf1 ); + CHAR_sendStatusString( charaindex, "P"); + { + int skillarray = PETSKILL_getPetskillArray( SkillID); + sprintf( buf1, "宠物%s学习%s,道具 %s消失了。", + CHAR_getUseName( petindex), PETSKILL_getChar( skillarray, PETSKILL_NAME), + ITEM_getChar( itemindex, ITEM_NAME) ); + } + + CHAR_talkToCli( charaindex, -1, buf1, CHAR_COLORYELLOW); + CHAR_setItemIndex( charaindex, itemNo ,-1); + CHAR_sendItemDataOne( charaindex, itemNo); + ITEM_endExistItemsOne( itemindex); +} + +#endif + +static void ITEM_useRenameItem_PrintWindow( int charaindex, int page) +{ + int fd; + int pos = 0; + int i; + int btntype = WINDOW_BUTTONTYPE_CANCEL; + char message[1024]; + char msgwk[1024]; + char buf[2048]; + + if( !CHAR_CHECKINDEX( charaindex )) return; + if( page < 0 || page > 3 ) { + print( "%s:%d err\n", __FILE__, __LINE__); + return; + } + fd = getfdFromCharaIndex( charaindex); + if( fd == - 1 ) return; + + snprintf( message, sizeof( message), + "2\n 要变更那个项目的名称呢\n" + " Page:%d\n", page +1); + + for( i = page *5; i < page *5 +5; i ++ ) { + int itemindex = CHAR_getItemIndex( charaindex, i); + BOOL flg = FALSE; + while( 1 ) { + char *cdkey; + if( !ITEM_CHECKINDEX( itemindex)) break; + cdkey = ITEM_getChar( itemindex, ITEM_CDKEY); + if( !cdkey) { + print( "%s:%d err\n", __FILE__, __LINE__); + break; + } + if( ITEM_getInt( itemindex, ITEM_MERGEFLG) != 1) break; + if( ITEM_getInt( itemindex, ITEM_TYPE) == ITEM_DISH) break; + if( ITEM_getInt( itemindex, ITEM_CRUSHLEVEL) != 0 ) break; + if( strlen( cdkey) != 0 ) { + if( strcmp( cdkey, CHAR_getChar( charaindex, CHAR_CDKEY)) != 0 ) { + break; + } + } + flg = TRUE; + break; + } + if( flg ) { + char *nm = ITEM_getChar( itemindex, ITEM_SECRETNAME); + char wk[256]; + if( pos +strlen( nm) +1 > sizeof( msgwk)) { + print( "buffer over error %s:%d\n", __FILE__, __LINE__); + break; + } + snprintf( wk, sizeof( wk), "%s\n", nm); + strncpy( &msgwk[pos], wk, sizeof( msgwk) -pos -1); + pos += strlen( wk); + } + else { + if( pos +2 > sizeof( msgwk)) { + print( "buffer over error %s:%d\n", __FILE__, __LINE__); + break; + } + strncpy( &msgwk[pos], "\n", sizeof( msgwk) -pos -1 ); + pos += 1; + } + } + strcat( message, msgwk); + switch( page){ + case 0: + btntype |= WINDOW_BUTTONTYPE_NEXT; + break; + case 3: + btntype |= WINDOW_BUTTONTYPE_PREV; + break; + case 1: + case 2: + btntype |= WINDOW_BUTTONTYPE_PREV|WINDOW_BUTTONTYPE_NEXT; + break; + } + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_SELECT, + btntype, + CHAR_WINDOWTYPE_SELECTRENAMEITEM_PAGE1+page, + -1, + makeEscapeString( message, buf, sizeof(buf))); +} + +void ITEM_useRenameItem( int charaindex, int toindex, int haveitemindex) +{ + + ITEM_useRenameItem_PrintWindow( charaindex, 0); + + CHAR_setWorkInt( charaindex, CHAR_WORKRENAMEITEMNUM, -1); + CHAR_setWorkInt( charaindex, CHAR_WORKRENAMEITEMINDEX, haveitemindex); +/* + char buf[256]; + int itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if( !ITEM_CHECKINDEX( itemindex) ) return; + sprintf( buf, "%s功能已被取消。", ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( charaindex, -1, "功能已被取消。", CHAR_COLORRED ); + + { + LogItem( + CHAR_getChar( charaindex, CHAR_NAME ), + CHAR_getChar( charaindex, CHAR_CDKEY ), + itemindex, + "魔术笔DEL", + CHAR_getInt( charaindex, CHAR_FLOOR), + CHAR_getInt( charaindex, CHAR_X ), + CHAR_getInt( charaindex, CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + } + + CHAR_setItemIndex( charaindex, haveitemindex, -1); + CHAR_sendItemDataOne( charaindex, haveitemindex); + ITEM_endExistItemsOne( itemindex ); +*/ +} + +void ITEM_useRenameItem_WindowResult( int charaindex, int seqno, int select, char * data) +{ + int page = 0; + int fd; + if( select == WINDOW_BUTTONTYPE_CANCEL) return; + + fd = getfdFromCharaIndex( charaindex); + if( fd == - 1 ) return; + if( seqno != CHAR_WINDOWTYPE_SELECTRENAMEITEM_RENAME ) { + if( select == WINDOW_BUTTONTYPE_NEXT ) page = 1; + else if( select == WINDOW_BUTTONTYPE_PREV ) page = -1; + if( select == WINDOW_BUTTONTYPE_NEXT || select == WINDOW_BUTTONTYPE_PREV ) { + int winno = seqno - CHAR_WINDOWTYPE_SELECTRENAMEITEM_PAGE1; + winno += page; + if( winno < 0 ) winno = 0; + if( winno > 3 ) winno = 3; + ITEM_useRenameItem_PrintWindow( charaindex, winno); + }else { + char message[1024]; + char buf[2048]; + char haveitemindex = CHAR_getWorkInt( charaindex, CHAR_WORKRENAMEITEMNUM); + int itemindex; + if( haveitemindex == -1 ) { + haveitemindex = (seqno - CHAR_WINDOWTYPE_SELECTRENAMEITEM_PAGE1) * 5 + + ( atoi(data)-1); + CHAR_setWorkInt( charaindex, CHAR_WORKRENAMEITEMNUM, haveitemindex); + } + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + + snprintf( message, sizeof( message), + "%s 名字要更改\n" + "请输入姓名\n" + "全形13个字, 半形26个字", + ITEM_getChar( itemindex, ITEM_NAME)); + + + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGEANDLINEINPUT, + WINDOW_BUTTONTYPE_OKCANCEL, + CHAR_WINDOWTYPE_SELECTRENAMEITEM_RENAME, + -1, + makeEscapeString( message, buf, sizeof(buf))); + + } + } + else { + BOOL flg = FALSE; + char message[1024]; + char buf[2048]; + while( 1 ) { + char *p; + if( strlen( data) > 26 || strlen( data) < 1) { + if( strlen( data) > 26 ) { + strcpy( message, "超过文字限制"); + }else { + strcpy( message, "请输入一个文字以上"); + } + break; + } + + // WON ADD 修正魔术笔改名问题 + flg = TRUE; + + for( p = data; *p ; p ++) { + if( *p == ' '){ + strcpy( message, "不可空白"); + flg = FALSE; + break; + } + if( strncmp( p, " ",2) == 0 ) { + strcpy( message, "不可空白"); + flg = FALSE; + break; + } + if( *p == '|'){ + strcpy( message, "不可有特殊符号"); + flg = FALSE; + break; + } + } + + break; + } + + + if( !flg ) { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + CHAR_WINDOWTYPE_SELECTRENAMEITEM_RENAME_ATTENTION, + -1, + makeEscapeString( message, buf, sizeof(buf))); + } + else { + char haveitemindex = CHAR_getWorkInt( charaindex, CHAR_WORKRENAMEITEMNUM); + int itemindex; + int renameitemindex; + int renameitemhaveindex; + int remain; + char msgbuf[128]; + + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if( !ITEM_CHECKINDEX( itemindex)) { + print( "%s %d err\n", __FILE__, __LINE__); + return; + } + ITEM_setChar( itemindex, ITEM_SECRETNAME, data); + ITEM_setChar( itemindex, ITEM_CDKEY, + CHAR_getChar( charaindex, CHAR_CDKEY)); + CHAR_sendItemDataOne( charaindex, haveitemindex); + snprintf( msgbuf, sizeof(msgbuf),"把 %s 命名成 %s ", + ITEM_getChar( itemindex, ITEM_NAME), data); + CHAR_talkToCli( charaindex, -1, msgbuf, CHAR_COLORYELLOW); + renameitemhaveindex = CHAR_getWorkInt( charaindex, CHAR_WORKRENAMEITEMINDEX); + renameitemindex = CHAR_getItemIndex( charaindex, renameitemhaveindex); + if( !ITEM_CHECKINDEX( renameitemindex)) { + print( "%s %d err\n", __FILE__, __LINE__); + return; + } + remain = atoi( ITEM_getChar( renameitemindex, ITEM_ARGUMENT)); + if( remain != 0 ) { + remain --; + if( remain <= 0 ) { + snprintf( msgbuf, sizeof(msgbuf),"%s 消失了", + ITEM_getChar( renameitemindex, ITEM_NAME)); + CHAR_talkToCli( charaindex, -1, msgbuf, CHAR_COLORYELLOW); + CHAR_setItemIndex( charaindex, renameitemhaveindex, -1); + CHAR_sendItemDataOne( charaindex, renameitemhaveindex); + ITEM_endExistItemsOne( renameitemindex ); + }else { + char buf[32]; + snprintf( buf, sizeof( buf),"%d", remain); + ITEM_setChar( renameitemindex, ITEM_ARGUMENT, buf); + } + } + } + } +} + +//------------------------------------------------------------------------- +// 今中仇欠毛 蜇允月楮醒[ +// 午仄凶凛卞]仿件母丞卞ㄠ ㄥ毛蓟太] 蟆午 飓 寞毛 凳允月[ +//------------------------------------------------------------------------- +void ITEM_dropDice( int charaindex, int itemindex) +{ + char *dicename[] = { "一", "二", "叁", "四", "五", "六"}; + int diceimagenumber[] = { 24298,24299,24300,24301,24302,24303}; + int r = RAND( 0,5); + + // 飓 寞毛谨 + ITEM_setInt( itemindex, ITEM_VAR1, ITEM_getInt( itemindex, ITEM_BASEIMAGENUMBER)); + // 飓 寞凳蕙 + ITEM_setInt( itemindex, ITEM_BASEIMAGENUMBER, diceimagenumber[r]); + // 蟆凳蕙 + ITEM_setChar( itemindex, ITEM_SECRETNAME, dicename[r]); + + // 犯□正及弁仿奶失件玄尺及霜耨反晓匏楮醒匹垫丹及匹]仇仇匹反支日卅中[ +} +//------------------------------------------------------------------------- +// 今中仇欠毛 蜇允月楮醒[ +// 胶匀凶凛卞] 蟆午 飓 寞毛葭卞 允[ +//------------------------------------------------------------------------- +void ITEM_pickupDice( int charaindex, int itemindex) +{ + // 飓 寞毛葭卞 允[ + ITEM_setInt( itemindex, ITEM_BASEIMAGENUMBER, ITEM_getInt( itemindex, ITEM_VAR1)); + // 蟆手葭卞 允 + ITEM_setChar( itemindex, ITEM_SECRETNAME, ITEM_getChar( itemindex, ITEM_NAME)); +} +enum { + ITEM_LOTTERY_1ST, // 1羁 + ITEM_LOTTERY_2ND, + ITEM_LOTTERY_3RD, + ITEM_LOTTERY_4TH, + ITEM_LOTTERY_5TH, // 5羁 + ITEM_LOTTERY_6TH, // 6羁 + ITEM_LOTTERY_NONE, // 陆木 + ITEM_LOTTERY_NUM, +}; +//------------------------------------------------------------------------- +// 旦疋□玉仁元互综日木月凛及楮醒[ +// 仇仇匹窒羁操卞卅月井毛瑁户月[ +// 割 反动票及骚曰[ + +#define PRE_6 (10000) +#define PRE_5 (1300 + PRE_6) +#define PRE_4 (600 + PRE_5) +#define PRE_3 (300 + PRE_4) +#define PRE_2 (8 + PRE_3) +#define PRE_1 (1 + PRE_2) + + +//#define PRE_5 (13000) +//#define PRE_4 (2300 + PRE_5) +//#define PRE_3 (540 + PRE_4) +//#define PRE_2 (8 + PRE_3) +//#define PRE_1 (1 + PRE_2) + + +//#define PRE_5 (16000) +//#define PRE_4 (2500 + PRE_5) +//#define PRE_3 (400 + PRE_4) +//#define PRE_2 (10 + PRE_3) +//#define PRE_1 (1 + PRE_2) +//#define PRE_5 (27000) +//#define PRE_4 (4000 + PRE_5) +//#define PRE_3 (400 + PRE_4) +//#define PRE_2 (10 + PRE_3) +//#define PRE_1 (1 + PRE_2) +// +//------------------------------------------------------------------------- +BOOL ITEM_initLottery(ITEM_Item* itm) +{ + int r = RAND( 0, 49999); + int hit = ITEM_LOTTERY_NONE; // + char result[7]; // 请 + int countnum[6]; + int count; + int i; + int len; + // 域荚综匀化月及匹[疯粟 仄凶凛午井卞综曰卅云今木卅中方丹卞[ + if( itm->data[ITEM_VAR3] == 1 ) return TRUE; + + // 铲蓟允月[ + if( r < PRE_6 ) hit = ITEM_LOTTERY_6TH; + else if( r < PRE_5 ) hit = ITEM_LOTTERY_5TH; + else if( r < PRE_4 ) hit = ITEM_LOTTERY_4TH; + else if( r < PRE_3 ) hit = ITEM_LOTTERY_3RD; + else if( r < PRE_2 ) hit = ITEM_LOTTERY_2ND; + else if( r < PRE_1 ) hit = ITEM_LOTTERY_1ST; + else hit = ITEM_LOTTERY_NONE; + + // 请 毛瑁烂允月[ + count = 0; + memset( countnum, 0, sizeof( countnum)); + if( hit != ITEM_LOTTERY_NONE ) { + // 癫曰毛本永玄 + result[0] = result[1] = result[2] = hit+1; + count = 3; + countnum[hit] = 3; + } + while( count < 6 ) { + int r = RAND( ITEM_LOTTERY_1ST, ITEM_LOTTERY_6TH); + if( countnum[r] >= 2 ) continue; + // 2/3仁日中及割 匹]职及陆木钓 毛伉□民今六化支月[ + // 升五升五[ + if( ( hit != ITEM_LOTTERY_NONE && count == 3 ) + || ( hit == ITEM_LOTTERY_NONE && count == 0 ) ) + { + if( RAND( 0,2)) { + result[count] = result[count+1] = r+1; + countnum[r] += 2; + count += 2; + continue; + } + } + countnum[r] ++; + result[count] = r+1; + count++; + } + // 请 毛扑乓永白伙允月[ + // 癫曰及凛反2/3及割 匹]癫曰醒侬毛域 欠卞裔烂允月[ + // 玉平玉平躲绊毛谎丹啃[ + len = sizeof( result)-2; + if( hit != ITEM_LOTTERY_NONE ) { + if( RAND( 0,2) ) { + // 癫曰醒侬毛域 欠卞[ + char s = result[0]; + result[0] = result[5]; + result[5] = s; + len = sizeof( result)-3; + } + } + for( i = 0; i < 10; i ++) { + int x = RAND( 0, len); + int y = RAND( 0, len); + int s; + s = result[x]; + result[x] = result[y]; + result[y] = s; + } + // 及凶户] 侬 健中卞仄化云仁[ + result[sizeof(result)-1] = '\0'; + itm->data[ITEM_VAR1] = hit; + // 户仁匀凶市它件玄 + itm->data[ITEM_VAR2] = 0; + itm->data[ITEM_VAR3] = 1; + memcpy( itm->string[ITEM_ARGUMENT].string, result, sizeof( result)); + + return TRUE; +} +//------------------------------------------------------------------------- +// 旦疋□玉仁元毛银匀凶凛及楮醒[ +// ㄥ荚银丹午]窒羁操井及失奶 丞卞 祭允月[ +//------------------------------------------------------------------------- +void ITEM_useLottery( int charaindex, int toindex, int haveitemindex) +{ + int i,j; + int itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + int count = ITEM_getInt( itemindex, ITEM_VAR2); + int hit = ITEM_getInt( itemindex, ITEM_VAR1); + char buff[1024]; + char num[6][3] = { {"迭"},{"迫"},{"迤"},{"迨"},{"郊"}, {"郎"}}; + char numbuff[128]; + char *n; + int result; + BOOL flg; + if( !ITEM_CHECKINDEX( itemindex) ) return; + if( count == 0 ) { + ITEM_setChar( itemindex, ITEM_EFFECTSTRING, ""); + } + // ㄥ荚 及银迕反]陆木仄井丐曰 卅中及匹]仇仇匹失奶 丞毛壅允 + else if( count == 6 ) { + CHAR_setItemIndex( charaindex , haveitemindex, -1 ); + CHAR_sendItemDataOne( charaindex, haveitemindex); + ITEM_endExistItemsOne( itemindex ); + return; + } + n = ITEM_getChar( itemindex, ITEM_ARGUMENT); + // for debug +#if 0 + snprintf( buff, sizeof( buff), "羁操“%d 请 : %d%d%d%d%d%d", + hit, + (int)(n[0]+1),(int)(n[1]+1), + (int)(n[2]+1),(int)(n[3]+1), + (int)(n[4]+1),(int)(n[5]+1) + ); + CHAR_talkToCli( charaindex, -1, + buff, CHAR_COLORYELLOW ); +#endif + result = (int)n[count]-1; + // 伉□民井譬屯月 + flg = FALSE; + for( i = 0; i < count+1 && flg == FALSE; i ++ ) { + for( j = i+1; j < count+1 && flg == FALSE; j ++ ) { + if( i != j ) { + if( n[i] == n[j] ) { + flg = TRUE; + } + } + } + } + memset( numbuff, 0, sizeof( numbuff)); + memcpy( numbuff, ITEM_getChar( itemindex, ITEM_EFFECTSTRING), (count)*2); + // 躲绊 侬 卞]请 毛请允[ + snprintf( buff, sizeof( buff), "%s%s", numbuff, num[result]); + count ++; + ITEM_setInt( itemindex, ITEM_VAR2, count); + // ㄥ荚 匹癫曰卅日癫曰失奶 丞卞 凳]陆木卅日陆木午 憎] + // 戚荚母皮伙弁伉永弁匹壅允[ + if( count >= 6 ) { + // 癫曰 + if( hit != ITEM_LOTTERY_NONE ) { + int newitemindex; + char strbuff[1024]; + char msgbuff[1024]; + // 壅仄化 + CHAR_setItemIndex( charaindex , haveitemindex, -1 ); + ITEM_endExistItemsOne( itemindex ); + // 2729 - 2734 反 仁元及1 6羁 + newitemindex = ITEM_makeItemAndRegist( 2729 + hit); + CHAR_setItemIndex( charaindex , haveitemindex, newitemindex ); + // 请 手戊疋□ + snprintf( strbuff, sizeof( strbuff), "%s %s", buff, + ITEM_getChar( newitemindex, ITEM_EFFECTSTRING)); + ITEM_setChar( newitemindex, ITEM_EFFECTSTRING, strbuff); + CHAR_sendItemDataOne( charaindex, haveitemindex); + snprintf( msgbuff, sizeof( msgbuff), "中了第%d奖", hit+1 ); + CHAR_talkToCli( charaindex, -1, + msgbuff, + CHAR_COLORYELLOW ); + } + // 陆木 + else { +// CHAR_setItemIndex( charaindex , haveitemindex, -1 ); + // 请 手戊疋□ + char strbuff[1024]; + snprintf( strbuff, sizeof( strbuff), "%s 没中,下次再来", buff); + ITEM_setChar( itemindex, ITEM_EFFECTSTRING, strbuff); + CHAR_sendItemDataOne( charaindex, haveitemindex); +// ITEM_endExistItemsOne( itemindex ); +// CHAR_talkToCli( charaindex, -1, +// "反内木″", +// CHAR_COLORWHITE ); + } + } + // 公丹元扎 中凛反]犯□正毛霜曰卅云允分仃[ + else { + char strbuff[1024]; + if( flg) { + // 旦矢□旦煌遥 + // 失奶 丞及 及戊丢件玄反]ㄠ垫ㄡㄧ 侬匹] + // 旦矢□旦毛银匀化荼垫仄化中月[ + int spc = 16 + ( 6-count)*2; + char space[17]; + memset( space, ' ', spc); + space[spc] = '\0'; + snprintf( strbuff, sizeof( strbuff), "%s%s快中了", buff, space); + } + else { + strcpy( strbuff, buff); + } + ITEM_setChar( itemindex, ITEM_EFFECTSTRING, strbuff); + CHAR_sendItemDataOne( charaindex, haveitemindex); + } +} + +void ITEM_WarpDelErrorItem( int charaindex ) +{ + int j; + for(j=0; j= 12 ){ + CHAR_talkToCli(charaindex, -1, "此处无法使用。", CHAR_COLORYELLOW); + return; + } + + memset( buf, 0, sizeof( buf)); + sprintf( buf, "%d %d %d %d", flg, Mf, Mx, My); + ITEM_setChar(itemindex, ITEM_ARGUMENT, buf); + ITEM_setInt( itemindex, ITEM_DAMAGEBREAK, usenum); + sprintf( buf, "飞行纪录点(%s,%d,%d)", MapString[i], Mx, My); + ITEM_setChar( itemindex, ITEM_EFFECTSTRING, buf); + CHAR_talkToCli(charaindex, -1, buf, CHAR_COLORYELLOW); + CHAR_sendItemDataOne( charaindex, haveitemindex); + } + + // WON ADD + if( ITEM_WarpForAny(charaindex, haveitemindex, ff, fx, fy, flg) == FALSE ) + return; +} +#endif + +// Robin 0707 petFollow +void ITEM_petFollow( int charaindex, int toindex, int haveitemindex ) +{ + char *arg; + int itemindex, followLv, haveindex, i; + //print(" PetFollow_toindex:%d ", toindex); + if( CHAR_getWorkInt( charaindex, CHAR_WORKPETFOLLOW ) != -1 ){ + if( CHAR_CHECKINDEX( CHAR_getWorkInt( charaindex, CHAR_WORKPETFOLLOW ) ) ){ + CHAR_talkToCli( charaindex, -1, "请先收回放出的宠物!", CHAR_COLORWHITE ); + return; + } + CHAR_setWorkInt( charaindex, CHAR_WORKPETFOLLOW, -1); + } +#ifdef _FIX_METAMORIDE + if( CHAR_CHECKJOINENEMY( charaindex) == TRUE ){ + CHAR_talkToCli( charaindex, -1, "搭乘中无法使用!", CHAR_COLORWHITE ); + return; + } +#endif + + if( CHAR_CHECKINDEX( toindex ) == FALSE ) return; + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + arg = ITEM_getChar(itemindex, ITEM_ARGUMENT ); + if( arg == NULL )return; + + if( sscanf( arg, "%d", &followLv) != 1 ) + return; + if( CHAR_getInt( toindex, CHAR_LV ) > followLv ){ + CHAR_talkToCli( charaindex, -1, "道具的等级不足!", CHAR_COLORWHITE ); + return; + } + if( CHAR_getWorkInt( toindex, CHAR_WORKFIXAI ) < 80 ) + { + //CHAR_talkToCli( charaindex, -1, "宠物的忠诚度不足!", CHAR_COLORWHITE ); + //return; + } + + + haveindex = -1; + for( i = 0; i < 5; i++ ) + { + if( CHAR_getCharPet( charaindex, i) == toindex ) { + haveindex = i; + break; + } + } + if( haveindex == -1) return; + + + if( !PET_dropPetFollow( charaindex, haveindex, -1, -1, -1 ) ) { + CHAR_talkToCli( charaindex, -1, "宠物跟随失败!", CHAR_COLORWHITE ); + return; + } + +} + +// Nuke start 0624: Hero's bless +void ITEM_useSkup( int charaindex, int toindex, int haveitemindex) +{ + int itemindex; + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + CHAR_setInt(charaindex,CHAR_SKILLUPPOINT, + CHAR_getInt(charaindex,CHAR_SKILLUPPOINT)+1); + CHAR_Skillupsend(charaindex); + CHAR_talkToCli(charaindex, -1, "你感受到自己的能力被提升了。", CHAR_COLORWHITE); + + CHAR_DelItem( charaindex, haveitemindex); +} +// Nuke end +extern void setNoenemy(); +// Nuke start 0626: Dragon's bless +void ITEM_useNoenemy( int charaindex, int toindex, int haveitemindex) +{ + int itemindex,fd; + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + fd=CHAR_getWorkInt( charaindex, CHAR_WORKFD); + setNoenemy(fd); + CHAR_talkToCli(charaindex, -1, "你感受到周边的杀气消失了。", CHAR_COLORWHITE); + CHAR_DelItem( charaindex, haveitemindex); + +} +// Nuke end + +// Arminius 7.2: Ra's amulet +void ITEM_equipNoenemy( int charaindex, int itemindex ) +{ + char buf[4096]; + int evadelevel; + int fl,fd; + + if( ITEM_CHECKINDEX(itemindex) == FALSE )return; + + if( ITEM_getArgument( ITEM_getChar(itemindex,ITEM_ARGUMENT),"noen", buf, sizeof(buf) ) + == FALSE ){ + return; + } + + evadelevel=atoi(buf); + fl=CHAR_getInt(charaindex, CHAR_FLOOR); + fd=CHAR_getWorkInt( charaindex, CHAR_WORKFD); + if (evadelevel>=200) { + setEqNoenemy(fd, 200); + CHAR_talkToCli(charaindex, -1, "一道奇异的光芒隐藏了你的行踪。", CHAR_COLORWHITE); + return; + } else if (evadelevel>=120) { + setEqNoenemy(fd, 120); + + if ( (fl==100)||(fl==200)||(fl==300)||(fl==400)||(fl==500) ){ + CHAR_talkToCli(charaindex, -1, "一道奇异的光芒隐藏了你的行踪。", CHAR_COLORWHITE); + return; + } + } else if (evadelevel>=80) { + setEqNoenemy(fd, 80); + if ( (fl==100)||(fl==200)||(fl==300)||(fl==400) ){ + + CHAR_talkToCli(charaindex, -1, "一道奇异的光芒隐藏了你的行踪。", CHAR_COLORWHITE); + return; + } + } else if (evadelevel>=40) { + setEqNoenemy(fd, 40); + if ( (fl==100)||(fl==200) ) { + CHAR_talkToCli(charaindex, -1, "一道奇异的光芒隐藏了你的行踪。", CHAR_COLORWHITE); + return; + } + } + CHAR_talkToCli(charaindex, -1, "什麽事也没有发生。", CHAR_COLORWHITE); +} + +#ifdef _Item_MoonAct +void ITEM_randEnemyEquipOne( int charaindex, int toindex, int haveitemindex) +{ + int itemindex, RandNum=0; + char buf[256]; + + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if( !ITEM_CHECKINDEX( itemindex)) return; + + if( ITEM_getArgument( ITEM_getChar( itemindex,ITEM_ARGUMENT), "rand", buf, sizeof(buf) ) == FALSE ){ + return; + } + + if( (RandNum=atoi( buf)) > 0 ){ + int fd = CHAR_getWorkInt( charaindex, CHAR_WORKFD); + setEqRandenemy(fd, RandNum); + CHAR_talkToCli(charaindex, -1, "遇敌率降低了。", CHAR_COLORWHITE); + sprintf( buf, "道具 %s消失了。", ITEM_getChar( itemindex, ITEM_NAME) ); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + CHAR_DelItem( charaindex, haveitemindex); + return; + } + + +} + +void ITEM_randEnemyEquip( int charaindex, int itemindex) +{ + char buf[4096]; + int RandNum=0; + int fd; + + if( ITEM_CHECKINDEX(itemindex) == FALSE )return; + if( ITEM_getArgument( ITEM_getChar(itemindex,ITEM_ARGUMENT),"rand", buf, sizeof(buf) ) + == FALSE ){ + return; + } + + RandNum=atoi( buf); + fd=CHAR_getWorkInt( charaindex, CHAR_WORKFD); + if (RandNum > 0 ) { + setEqRandenemy(fd, RandNum); + CHAR_talkToCli(charaindex, -1, "遇敌率降低了。", CHAR_COLORWHITE); + return; + } + +} +void ITEM_RerandEnemyEquip( int charaindex, int itemindex) +{ + int RandNum=0; + int fd; + + if( ITEM_CHECKINDEX(itemindex) == FALSE )return; + + fd=CHAR_getWorkInt( charaindex, CHAR_WORKFD); + RandNum = getEqRandenemy( fd); + + if (RandNum > 0 ) { + clearEqRandenemy( fd); + CHAR_talkToCli(charaindex, -1, "遇敌率回复。", CHAR_COLORWHITE); + return; + } +} +#endif + +#ifdef _ITEM_WATERWORDSTATUS +void ITEM_WaterWordStatus( int charaindex, int toindex, int haveitemindex) +{ + int itemindex; + char itemarg[256]; + + if( !CHAR_CHECKINDEX( charaindex) ){ + return; + } + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if( !ITEM_CHECKINDEX( itemindex) ){ + return; + } + + if( ITEM_getArgument( ITEM_getChar( itemindex, ITEM_ARGUMENT),"time", itemarg, sizeof(itemarg) ) != FALSE ){ + char token[256]; + int nums = CHAR_getWorkInt( charaindex, CHAR_WORKSTATUSWATER); + if( nums < 0 ) nums = 0; + if( nums > 0 ){ + CHAR_talkToCli( charaindex, -1, "水中呼吸时间不得累积。", CHAR_COLORYELLOW); + return; + } + CHAR_setWorkInt( charaindex, CHAR_WORKSTATUSWATER, nums+atoi(itemarg)); + CHAR_setItemIndex(charaindex, haveitemindex ,-1); + CHAR_sendItemDataOne( charaindex, haveitemindex); + ITEM_endExistItemsOne(itemindex); + + sprintf( token, "水中呼吸时间增加%d分,总计%d分。", atoi(itemarg), + CHAR_getWorkInt( charaindex, CHAR_WORKSTATUSWATER)); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW); + }else{ + CHAR_talkToCli(charaindex, -1, "什麽事也没发生。", CHAR_COLORYELLOW); + } +} +#endif + +#ifdef _CHIKULA_STONE +void ITEM_ChikulaStone( int charaindex, int toindex, int haveitemindex) +{ + int itemindex,fd; + char itemarg[256]; + + if( !CHAR_CHECKINDEX( charaindex) ) return; + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if( !ITEM_CHECKINDEX( itemindex) ) return; + + fd = CHAR_getWorkInt( charaindex, CHAR_WORKFD); + CHAR_setWorkInt( charaindex, CHAR_WORKCHIKULAHP, 0 ); + CHAR_setWorkInt( charaindex, CHAR_WORKCHIKULAMP, 0 ); + setChiStone( fd, 0); //1hp 2mp + + if( ITEM_getArgument( ITEM_getChar( itemindex, ITEM_ARGUMENT),"hp", itemarg, sizeof(itemarg) ) != FALSE ){ + setChiStone( fd, 1); + CHAR_setWorkInt( charaindex, CHAR_WORKCHIKULAHP, atoi( itemarg) ); + }else if( ITEM_getArgument( ITEM_getChar( itemindex, ITEM_ARGUMENT),"mp", itemarg, sizeof(itemarg) ) != FALSE ){ + setChiStone( fd, 2); + CHAR_setWorkInt( charaindex, CHAR_WORKCHIKULAMP, atoi( itemarg) ); + }else{ + } + + CHAR_talkToCli(charaindex, -1, "接受奇克拉的祝福。", CHAR_COLORWHITE); + CHAR_setItemIndex(charaindex, haveitemindex ,-1); + CHAR_sendItemDataOne( charaindex, haveitemindex); + ITEM_endExistItemsOne(itemindex); +} +#endif + +#ifdef _ITEM_ORNAMENTS +void ITEM_PutOrnaments( int charaindex, int itemindex) +{ + char *arg=NULL; + char itemname[256]; + int bbnums=0; + if( !CHAR_CHECKINDEX( charaindex) ) return; + if( !ITEM_CHECKINDEX( itemindex) ) return; + arg = ITEM_getChar( itemindex, ITEM_ARGUMENT); + if( arg == NULL ) return;//ITEM_BASEIMAGENUMBER + bbnums = atoi( arg); + ITEM_setInt( itemindex, ITEM_BASEIMAGENUMBER, bbnums); + ITEM_setWorkInt( itemindex, ITEM_CANPICKUP, 1); + + sprintf( itemname,"%s%s%s",CHAR_getChar( charaindex, CHAR_NAME), "的", ITEM_getChar( itemindex, ITEM_SECRETNAME)); + ITEM_setChar( itemindex, ITEM_SECRETNAME, itemname); +} +#endif + +#ifdef _SUIT_ITEM + +/* +#ifdef _SUIT_TWFWENDUM + #define MAX_SUITTYPE 18 +#else + #ifdef _SUIT_ADDENDUM + #define MAX_SUITTYPE 14 + #else + #ifdef _MAGIC_RESIST_EQUIT // WON ADD 职业抗性装备 + #define MAX_SUITTYPE 11 + #else + #define MAX_SUITTYPE 8 + #endif//_MAGIC_RESIST_EQUIT + #endif//_SUIT_ADDENDUM +#endif//_SUIT_TWFWENDUM +*/ +void ITEM_CheckSuitEquip( int charaindex) +{ + int i, j, itemindex, defCode=-1, same=0; + int nItem[CHAR_STARTITEMARRAY]; + int maxitem; + struct tagIntSuit{ + char fun[256]; + int intfun; //CHAR_getInt + }; + struct tagIntSuit ListSuit[]={ + {"VIT",CHAR_WORKSUITVIT}, + {"FSTR",CHAR_WORKSUITMODSTR}, + {"MSTR",CHAR_WORKSUITSTR}, + {"MTGH",CHAR_WORKSUITTGH}, + {"MDEX",CHAR_WORKSUITDEX}, + {"WAST",CHAR_WORKSTATUSWATER}, + {"HP", CHAR_WORKROUNDHP}, + {"MP", CHAR_WORKROUNDMP} +#ifdef _MAGIC_RESIST_EQUIT // WON ADD 职业抗性装备 + ,{"FRES", CHAR_WORK_F_SUIT}, + {"IRES", CHAR_WORK_I_SUIT}, + {"TRES", CHAR_WORK_T_SUIT} +#endif +#ifdef _SUIT_ADDENDUM + ,{"RESIST",CHAR_WORKRESIST}, //异常抗性率 + {"COUNTER",CHAR_WORKCOUNTER}, //反击率 + {"M_POW",CHAR_WORKMPOWER} //加强法师的魔法 +#endif +#ifdef _SUIT_TWFWENDUM + ,{"EARTH",CHAR_WORK_EA}, //地 + {"WRITER",CHAR_WORK_WR}, //水 + {"FIRE",CHAR_WORK_FI}, //火 + {"WIND",CHAR_WORK_WI} //风 +#endif +#ifdef _SUIT_ADDPART3 + ,{"WDUCKPOWER",CHAR_WORKDUCKPOWER},//套装回避 + {"RENOCASE",CHAR_WORKRENOCAST}, //沉默抗性率 + {"SUITSTRP",CHAR_WORKSUITSTR_P},//攻提升 单位为% + {"SUITTGH_P",CHAR_WORKSUITTGH_P},//防提升 单位为% + {"SUITDEXP",CHAR_WORKSUITDEX_P}//敏提升 单位为% +#endif +#ifdef _SUIT_ADDPART4 + ,{"SUITPOISON",CHAR_SUITPOISON},//带毒装备 + {"M2_POW",CHAR_WORKMPOWER2}, //加强法师的魔法,与M_POW功能相同(机率30%) + {"UN_POW_M",CHAR_WORKUNMPOWER} //抵抗法师的魔法 +#endif + }; + maxitem = sizeof(ListSuit)/sizeof(ListSuit[0]); + CHAR_setWorkInt( charaindex, CHAR_WORKSUITITEM, 0); + for( i=0; i=0; k-- ){ + if( nItem[i] == nItem[k] ) same++; + } + if( same >= 3 && nItem[i] != 0 )defCode = nItem[i]; + } + if( defCode == -1 ) return; + CHAR_setWorkInt( charaindex, CHAR_WORKSUITITEM, defCode); + for( i=0; i=200) { + CHAR_talkToCli(charaindex, -1, "环绕着你的光芒消失了。", CHAR_COLORWHITE); + return; + } else if (el>=120) { + if ( (fl==100)||(fl==200)||(fl==300)||(fl==400)||(fl==500) ) { + CHAR_talkToCli(charaindex, -1, "环绕着你的光芒消失了。", CHAR_COLORWHITE); + return; + } + } else if (el>=80) { + if ( (fl==100)||(fl==200)||(fl==300)||(fl==400) ) { + CHAR_talkToCli(charaindex, -1, "环绕着你的光芒消失了。", CHAR_COLORWHITE); + return; + } + } else if (el>=40) { + if ( (fl==100)||(fl==200) ) { + CHAR_talkToCli(charaindex, -1, "环绕着你的光芒消失了。", CHAR_COLORWHITE); + return; + } + } + CHAR_talkToCli(charaindex, -1, "什麽事也没有发生。", CHAR_COLORWHITE); +} + +extern void setStayEncount(int fd); +void ITEM_useEncounter( int charaindex, int toindex, int haveitemindex) +{ + int itemindex,fd; + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + + fd=CHAR_getWorkInt( charaindex, CHAR_WORKFD); + setStayEncount(fd); +#ifdef _USER_CHARLOOPS + { + Char *ch; + ch = CHAR_getCharPointer( charaindex); + if( ch == NULL ) return; + strcpysafe( ch->charfunctable[CHAR_LOOPFUNCTEMP1].string, + sizeof( ch->charfunctable[CHAR_LOOPFUNCTEMP1]), "CHAR_BattleStayLoop");//战斗 + CHAR_setInt( charaindex, CHAR_LOOPINTERVAL, 2500); + CHAR_constructFunctable( charaindex); + } +#endif + CHAR_talkToCli(charaindex, -1, "你感受到周边突然充满了杀气!", CHAR_COLORYELLOW); + CHAR_DelItem( charaindex, haveitemindex); + +} + +#ifdef _DEATH_CONTENDWATCH +void ITEM_useWatchBattle( int charaindex, int toindex, int haveitemindex) +{ + int itemindex,fd; + int battleTi; + char buf1[256]; + char *itemarg=NULL; + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + if( (itemarg = ITEM_getChar( itemindex, ITEM_ARGUMENT)) == NULL ) return; + battleTi = atoi( itemarg); + fd = CHAR_getWorkInt( charaindex, CHAR_WORKFD); + + { + ArrangeBattleC *aBo=NULL; + ArrangeBattleC *aB1=NULL; + ArrangeBattleC *aB2=NULL; + + if( battleTi<0 || battleTi>MAXBATTLEPAGE ) return; + if( (aBo=ArrangeBattleC_getInBattleArray( battleTi)) == NULL){ + sprintf( buf1, "目前场%d并没有竞赛。", battleTi); + CHAR_talkToCli(charaindex, -1, buf1, CHAR_COLORYELLOW); + return; + } + + if( (aB1=aBo->next[0]) == NULL || + (aB2=aBo->next[1]) == NULL || + !CHAR_CHECKINDEX( aB1->toindex) || + !CHAR_CHECKINDEX( aB2->toindex) || + CHAR_getWorkInt( aB1->toindex, CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE || + CHAR_getWorkInt( aB2->toindex, CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE ){ + + sprintf( buf1, "目前场%d尚未开始战斗。", battleTi); + CHAR_talkToCli(charaindex, -1, buf1, CHAR_COLORYELLOW); + return; + } + + if( BATTLE_WatchEntry( charaindex, aB1->toindex) ){ + + }else{ + sprintf( buf1, "观战失败!", battleTi); + CHAR_talkToCli(charaindex, -1, buf1, CHAR_COLORYELLOW); + return; + } + } + + sprintf( buf1, "道具 %s消失了。", ITEM_getChar( itemindex, ITEM_NAME) ); + CHAR_talkToCli(charaindex, -1, buf1, CHAR_COLORYELLOW); + CHAR_DelItem( charaindex, haveitemindex); +} +#endif + +#ifdef _Item_DeathAct +void ITEM_UseDeathCounter( int charaindex, int toindex, int haveitemindex) +{ + int itemindex,fd; + int itemmaxuse=-1; + char buf1[256]; + char *itemarg; + char itemnumstr[32]; + int okfloor = 0; + BOOL Useflag=FALSE; + int i = 1; + + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + +#ifdef _ITEM_STONE + itemarg = ITEM_getChar(itemindex,ITEM_ARGUMENT); + while(1){ + if( getStringFromIndexWithDelim( itemarg, "|", i , itemnumstr, sizeof( itemnumstr)) == FALSE ) + break; + okfloor = atoi(itemnumstr); + if( CHAR_getInt( charaindex, CHAR_FLOOR ) == okfloor ){ + Useflag = TRUE; + break; + } + i++; + } + if(okfloor != 0){ // 奇怪的石头 + itemmaxuse = ITEM_getInt( itemindex, ITEM_DAMAGEBREAK); + if( itemmaxuse != -1 ) { + itemmaxuse--; + ITEM_setInt( itemindex, ITEM_DAMAGEBREAK, itemmaxuse); + if( itemmaxuse < 1 ) { + sprintf( buf1, "%s消失了。", ITEM_getChar( itemindex, ITEM_NAME) ); + CHAR_talkToCli(charaindex, -1, buf1, CHAR_COLORYELLOW); + CHAR_DelItem( charaindex, haveitemindex); + if(Useflag==FALSE) { + CHAR_talkToCli(charaindex, -1, "没有发生任何事情!", CHAR_COLORYELLOW); + return; + } + }else{ + sprintf( buf1, "原地遇敌,可使用次数剩馀%d次。", itemmaxuse); + ITEM_setChar( itemindex, ITEM_EFFECTSTRING, buf1); + CHAR_sendItemDataOne( charaindex, haveitemindex); + if(Useflag==FALSE) { + CHAR_talkToCli(charaindex, -1, "没有发生任何事情!", CHAR_COLORYELLOW); + return; + } + } + fd = CHAR_getWorkInt( charaindex, CHAR_WORKFD); + setStayEncount(fd); + CHAR_talkToCli(charaindex, -1, "你身边笼罩阴暗气息!", CHAR_COLORYELLOW); + }else{ + sprintf( buf1, "%s消失了。", ITEM_getChar( itemindex, ITEM_NAME) ); + CHAR_talkToCli(charaindex, -1, buf1, CHAR_COLORYELLOW); + CHAR_DelItem( charaindex, haveitemindex); + if(Useflag==FALSE) { + CHAR_talkToCli(charaindex, -1, "没有发生任何事情!", CHAR_COLORYELLOW); + return; + } + fd = CHAR_getWorkInt( charaindex, CHAR_WORKFD); + setStayEncount(fd); + CHAR_talkToCli(charaindex, -1, "你身边笼罩阴暗气息!", CHAR_COLORYELLOW); + } + }else{ //恶魔宝石 +#endif +#ifdef _ITEM_MAXUSERNUM + itemmaxuse = ITEM_getInt( itemindex, ITEM_DAMAGEBREAK); + if( itemmaxuse != -1 ) { + itemmaxuse--; + ITEM_setInt( itemindex, ITEM_DAMAGEBREAK, itemmaxuse); + if( itemmaxuse < 1 ) { + sprintf( buf1, "道具 %s消失了。", ITEM_getChar( itemindex, ITEM_NAME) ); + CHAR_talkToCli(charaindex, -1, buf1, CHAR_COLORYELLOW); + CHAR_DelItem( charaindex, haveitemindex); + }else{ + sprintf( buf1, "原地遇敌,可使用次数剩馀%d次。", itemmaxuse); + ITEM_setChar( itemindex, ITEM_EFFECTSTRING, buf1); + CHAR_sendItemDataOne( charaindex, haveitemindex); + } + fd = CHAR_getWorkInt( charaindex, CHAR_WORKFD); + setStayEncount(fd); + CHAR_talkToCli(charaindex, -1, "你感受到周边突然充满了杀气!", CHAR_COLORYELLOW); + }else{ + CHAR_DelItem( charaindex, haveitemindex); + return; + } +#else + fd = CHAR_getWorkInt( charaindex, CHAR_WORKFD); + setStayEncount(fd); + sprintf( buf1, "道具 %s消失了。", ITEM_getChar( itemindex, ITEM_NAME) ); + CHAR_talkToCli(charaindex, -1, buf1, CHAR_COLORYELLOW); + CHAR_DelItem( charaindex, haveitemindex); +#endif +#ifdef _ITEM_STONE + } +#endif +#ifdef _USER_CHARLOOPS + { + Char *ch; + ch = CHAR_getCharPointer( charaindex); + if( ch == NULL ) return; + strcpysafe( ch->charfunctable[CHAR_LOOPFUNCTEMP1].string, + sizeof( ch->charfunctable[CHAR_LOOPFUNCTEMP1]), "CHAR_BattleStayLoop");//战斗 + CHAR_setInt( charaindex, CHAR_LOOPINTERVAL, 2500); + CHAR_constructFunctable( charaindex); + } +#endif +} +#endif + +#ifdef _CHRISTMAS_REDSOCKS +void ITEM_useMaxRedSocks( int charaindex, int toindex, int haveitemindex) +{ + int itemtimes = -1, itemindex; + char *itemarg=NULL; + int present[13]={ 13061, 13062, 13063, 13064, 13088, 13089, 13090, 13091, //1. + 14756, 17256, + 13092,19692,20594}; + int nowtimes = time( NULL); + + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + + itemarg = ITEM_getChar( itemindex, ITEM_ARGUMENT); + if( itemarg == NULL ) { + CHAR_talkToCli(charaindex, -1, "道具无效!", CHAR_COLORYELLOW); + return; + } + itemtimes = atoi( itemarg); + if( nowtimes >= itemtimes && nowtimes <= itemtimes+(60*60*24) ){ //限制时间内可换礼物 + int si=0, ret; + char token[256]; + //删除 + CHAR_setItemIndex(charaindex, haveitemindex ,-1); + CHAR_sendItemDataOne( charaindex, haveitemindex); + ITEM_endExistItemsOne(itemindex); + itemindex = -1; + //新增 + si = rand()%100; + if( si > 70 ){ + si = rand()%3+10; + }else if( si > 60 ){ + si = rand()%2+8; + }else { + si = rand()%8; + } + itemindex = ITEM_makeItemAndRegist( present[ si]); + if( !ITEM_CHECKINDEX( itemindex)){ + CHAR_talkToCli(charaindex, -1, "礼物无效!", CHAR_COLORYELLOW); + return; + } + ret = CHAR_addItemSpecificItemIndex( charaindex, itemindex); + if( ret < 0 || ret >= CHAR_MAXITEMHAVE ) { + ITEM_endExistItemsOne( itemindex); + CHAR_talkToCli(charaindex, -1, "礼物置放栏位错误!", CHAR_COLORYELLOW); + return; + } + sprintf( token,"拿到%s",ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW ); + CHAR_sendItemDataOne( charaindex, ret); + }else{ + char token[256]; + if( nowtimes < itemtimes ){ + int days, hours, minute, second; + int defTimes = itemtimes - nowtimes; + + days = defTimes/(24*60*60); + defTimes = defTimes-( days*(24*60*60)); + hours = defTimes/(60*60); + defTimes = defTimes-( hours*(60*60)); + minute = defTimes/60; + defTimes = defTimes-( minute*60); + second = defTimes; + sprintf( token,"%s还差%d天%d小时%d分%d秒才可使用!", + ITEM_getChar( itemindex, ITEM_NAME), days, hours, minute, second); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW ); + }else if( nowtimes > itemtimes+(60*60*24) ){ + sprintf( token,"%s使用期限已过!", ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW ); + } + } +} +#endif + +#ifdef _CHRISTMAS_REDSOCKS_NEW +void ITEM_useMaxRedSocksNew( int charaindex, int toindex, int haveitemindex) +{ + int itemindex; + char *itemarg=NULL; + char itemnumstr[32]; + int itemnum=0; + int present[20]; + int si=0, ret,i; + char token[256]; + + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + + itemarg = ITEM_getChar( itemindex, ITEM_ARGUMENT); + if( itemarg == NULL ){ + CHAR_talkToCli(charaindex, -1, "这是个芭乐圣诞袜!", CHAR_COLORYELLOW); + return; + } + + //道具数量 + if( getStringFromIndexWithDelim( itemarg, "|", 1, itemnumstr, sizeof( itemnumstr)) == FALSE ) + return; + itemnum = atoi(itemnumstr); + if( itemnum > 20 ) + itemnum = 20; + for(i=0;i= CHAR_MAXITEMHAVE ) { + ITEM_endExistItemsOne( itemindex); + CHAR_talkToCli(charaindex, -1, "礼物置放栏位错误!", CHAR_COLORYELLOW); + return; + } + sprintf( token,"拿到%s",ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW ); + CHAR_sendItemDataOne( charaindex, ret); + +} +#endif + +#ifdef _PETSKILL_CANNEDFOOD +void ITEM_useSkillCanned( int charaindex, int toindex, int itemNo) +{ + int itemindex; + char buf1[256]; + itemindex = CHAR_getItemIndex( charaindex, itemNo); + if(!ITEM_CHECKINDEX( itemindex)) return; + if( !CHAR_CHECKINDEX( toindex) ) return; + if( CHAR_getInt( toindex, CHAR_WHICHTYPE) == CHAR_TYPEPET) { + int i, petNo=-1; + for( i=0; i -1 ){//变成乌力了 + CHAR_talkToCli( charaindex, -1, "无法变身,乌力化中不能变身!", CHAR_COLORYELLOW ); + return; + } +#endif + + +#ifdef _FIXBUG_ATTACKBOW + { + int armindex = CHAR_getItemIndex( charaindex, CHAR_ARM); + if( ITEM_CHECKINDEX( armindex) == TRUE ) { + int armtype = BATTLE_GetWepon( charaindex); + if( armtype == ITEM_BOW || armtype == ITEM_BOUNDTHROW || + armtype == ITEM_BREAKTHROW || armtype == ITEM_BOOMERANG) { + CHAR_talkToCli( charaindex, -1, "使用远距离武器无法变身!", CHAR_COLORYELLOW ); + return; + } + } + } +#endif + + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + // 爵 钒铵凛反 骰允月 + if( battlemode == BATTLE_CHARMODE_INIT ){ + return; + } + // 爵 分匀凶日 + if( IsBATTLING( charaindex ) == TRUE ){ + toindex = BATTLE_No2Index(CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ), toindex ); + + } + + if( CHAR_CHECKINDEX( toindex ) == FALSE ) return; + + haveindex = -1; + for( i = 0; i < 5; i++ ){ + if( CHAR_getCharPet( charaindex, i) == toindex ) { + haveindex = i; + break; + } + } + if( haveindex == -1 && charaindex != toindex ){ + CHAR_talkToCli( charaindex, -1, "无法变身,只能变成自己的宠物!", CHAR_COLORYELLOW ); + return; + } + + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + + arg = ITEM_getChar(itemindex, ITEM_ARGUMENT ); + if( arg == NULL )return; + if( sscanf( arg, "%d", &metamoTime) != 1 ) + return; + + + if( toindex != charaindex ){ + CHAR_setWorkInt( charaindex, CHAR_WORKITEMMETAMO, NowTime.tv_sec +metamoTime); + sprintf( msg, "变身成%s!", CHAR_getChar( toindex, CHAR_NAME) ); + } + else { + CHAR_setWorkInt( charaindex, CHAR_WORKITEMMETAMO, 0); + sprintf( msg, "变回自己!"); + } + CHAR_talkToCli( charaindex, -1, msg, CHAR_COLORYELLOW ); + + CHAR_setInt( charaindex, CHAR_BASEIMAGENUMBER, CHAR_getInt( toindex, CHAR_BASEBASEIMAGENUMBER) ); + CHAR_complianceParameter( charaindex); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( charaindex , CHAR_WORKOBJINDEX )); + CHAR_send_P_StatusString( charaindex , CHAR_P_STRING_BASEBASEIMAGENUMBER); + + CHAR_DelItem( charaindex, haveitemindex); + +} +#endif +#ifdef _ITEM_CRACKER +void ITEM_Cracker(int charaindex,int toindex,int haveitemindex) +{ + int battlemode; + // 检查玩家是否有效 + if(CHAR_CHECKINDEX(charaindex) == FALSE) return; //失败 + battlemode = CHAR_getWorkInt(charaindex,CHAR_WORKBATTLEMODE); + // 战斗中使用无效 + if(!battlemode) ITEM_useCracker_Effect(charaindex,toindex,haveitemindex); + else CHAR_talkToCli(charaindex,-1,"什麽也没发生。",CHAR_COLORWHITE); +} +#endif + +void ITEM_AddPRSkillPercent( int charaindex,int toindex,int haveitemindex) +{ +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + + int MySKPercent=0, itemindex=-1, i; + + if( !CHAR_CHECKINDEX( charaindex) ) return; + if( CHAR_getInt( charaindex, PROFESSION_CLASS ) == 0 ) return; + + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if( !ITEM_CHECKINDEX( itemindex) )return; + + for( i=0; i 100 ) MySKPercent = 100; + CHAR_setIntPSkill( charaindex, i, SKILL_LEVEL, MySKPercent); + } + + CHAR_setItemIndex( charaindex, haveitemindex ,-1); + CHAR_sendItemDataOne( charaindex, haveitemindex); + ITEM_endExistItemsOne( itemindex ); + CHAR_sendStatusString( charaindex , "S"); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( charaindex , CHAR_WORKOBJINDEX )); + CHAR_talkToCli( charaindex, -1, "所有职业技能熟练度上升10%。", CHAR_COLORYELLOW); +#endif +} + +void ITEM_AddPRSkillPoint( int charaindex,int toindex,int haveitemindex) +{ +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + + int MyPRpoint=0, itemindex=-1; + if( !CHAR_CHECKINDEX( charaindex) ) return; + if( CHAR_getInt( charaindex, PROFESSION_CLASS ) == 0 ) return; + + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if( !ITEM_CHECKINDEX( itemindex) )return; + + MyPRpoint = CHAR_getInt( charaindex, PROFESSION_SKILL_POINT); + CHAR_setInt( charaindex, PROFESSION_SKILL_POINT, MyPRpoint+1 ); + + + CHAR_setItemIndex( charaindex, haveitemindex ,-1); + CHAR_sendItemDataOne( charaindex, haveitemindex); + ITEM_endExistItemsOne( itemindex ); + + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( charaindex , CHAR_WORKOBJINDEX )); + + CHAR_talkToCli( charaindex, -1, "增加一点职业技能点数。", CHAR_COLORYELLOW); +#endif +} + +#ifdef _ITEM_ADDEXP //vincent 经验提升 +void ITEM_Addexp(int charaindex,int toindex,int haveitemindex) +{ + // 检查玩家是否有效 + if(CHAR_CHECKINDEX(charaindex) == FALSE) return; //失败 +#if 1 + ITEM_useAddexp_Effect(charaindex,toindex,haveitemindex); +#else + if( !CHAR_getWorkInt(charaindex,CHAR_WORKITEM_ADDEXP)){ + ITEM_useAddexp_Effect(charaindex,toindex,haveitemindex); + }else{ + CHAR_talkToCli(charaindex,-1,"先前使用之药效依然存在",CHAR_COLORYELLOW); + } +#endif +} +#endif + +#ifdef _ITEM_REFRESH //vincent 解除异常状态道具 +void ITEM_Refresh(int charaindex,int toindex,int haveitemindex) +{ + int battlemode,itemindex; +print("\nvincent--ITEM_Refresh"); + // 检查玩家是否有效 + if(CHAR_CHECKINDEX(charaindex) == FALSE) + { +print("\nvincent--(charaindex) == FALSE"); + return; //失败 + } + itemindex = CHAR_getItemIndex(charaindex,haveitemindex); + + battlemode = CHAR_getWorkInt(charaindex,CHAR_WORKBATTLEMODE); + if(battlemode) + { +print("\nvincent--enter ITEM_useAddexp_Effect"); +print("\nvincent-->charaindex:%d,toindex:%d",charaindex,toindex); + ITEM_useRefresh_Effect(charaindex,toindex,haveitemindex); + } + else CHAR_talkToCli(charaindex,-1,"什麽也没发生。",CHAR_COLORWHITE); + + /* 平乓仿弁正□及赭 伉旦玄井日壅蛔 */ + CHAR_setItemIndex(charaindex, haveitemindex ,-1); + CHAR_sendItemDataOne( charaindex, haveitemindex);/* 失奶 丞凳蕙 */ + /* 壅允 */ + ITEM_endExistItemsOne( itemindex ); +} +#endif +//Terry 2001/12/21 +#ifdef _ITEM_FIRECRACKER +void ITEM_firecracker(int charaindex,int toindex,int haveitemindex) +{ + int battlemode; + + // 检查玩家是否有效 + if(CHAR_CHECKINDEX(charaindex) == FALSE) return; //失败 + + battlemode = CHAR_getWorkInt(charaindex,CHAR_WORKBATTLEMODE); + + if( battlemode // 检查是否在战斗中 +#ifdef _PETSKILL_BECOMEPIG + && CHAR_getInt( charaindex, CHAR_BECOMEPIG) == -1 +#endif + ) + ITEM_useFirecracker_Battle(charaindex,toindex,haveitemindex); + else + CHAR_talkToCli(charaindex,-1,"什麽也没发生。",CHAR_COLORWHITE); +} +#endif +//Terry end + + +void ITEM_WearEquip( int charaindex, int itemindex) +{ + // WON ADD +// if( ITEM_getInt(itemindex,ITEM_ID) == 20130 ){ + CHAR_setWorkInt( charaindex, CHAR_PickAllPet, TRUE); +/// } + return; +} +void ITEM_ReWearEquip( int charaindex, int itemindex) +{ + CHAR_setWorkInt( charaindex, CHAR_PickAllPet, FALSE); + return; +} + + +#ifdef _Item_ReLifeAct +void ITEM_DIErelife( int charaindex, int itemindex, int eqw) +{ + int ReceveEffect=-1; + int toNo; + int battleindex=-1; + int attackNo=-1; + int WORK_HP=1; + char buf[256]; + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + if( BATTLE_CHECKINDEX( battleindex ) == FALSE ) { + print("\n battleindex =%d return", battleindex); + return; + } + if( CHAR_CHECKINDEX( charaindex) == FALSE ) + return; + if( ITEM_CHECKINDEX( itemindex) == FALSE ) + return; +#ifdef _DUMMYDIE + if( CHAR_getFlg( charaindex, CHAR_ISDUMMYDIE) == FALSE ) { +#else + if( CHAR_getFlg( charaindex, CHAR_ISDIE) == FALSE ) { +#endif + print("\n [ %d, CHAR_ISDIE DUMMY FALSE] return !", charaindex); + return; + } + + if( ITEM_getArgument( ITEM_getChar(itemindex,ITEM_ARGUMENT),"HP", buf, sizeof(buf) ) + == FALSE ){ + WORK_HP = 1; + }else { + if( !strcmp( buf, "FULL") ) { + WORK_HP = CHAR_getWorkInt( charaindex, CHAR_WORKMAXHP ); + }else { + WORK_HP=atoi( buf); + } + } + + ReceveEffect = SPR_fukkatu3; + toNo = BATTLE_Index2No( battleindex, charaindex ); + attackNo = -1; + + BATTLE_MultiReLife( battleindex, attackNo, toNo, WORK_HP, ReceveEffect ); + CHAR_setItemIndex( charaindex, eqw ,-1); + ITEM_endExistItemsOne( itemindex); + CHAR_sendItemDataOne( charaindex, eqw); + return; +} +#endif + +#ifdef _EQUIT_DEFMAGIC +void ITEM_MagicEquitWear( int charaindex, int itemindex) +{ + char buf[256]; + char *itemarg; + char Free[][128]={"EA","WA","FI","WI","QU"}; + int index=0; + int dMagic=0; + itemarg = ITEM_getChar(itemindex,ITEM_ARGUMENT); + memset( buf, 0, sizeof( char) *256); + if( itemarg == NULL ) return; + while( index < arraysizeof( Free) ) { + if( ITEM_getArgument( itemarg, Free[ index], buf, sizeof(buf)) == TRUE ) { + dMagic = atoi( buf); + if( dMagic <= 100 && dMagic >= -100 ) { + int def_magic = CHAR_getWorkInt( charaindex, CHAR_EQUITDEFMAGIC_E+index); + CHAR_setWorkInt( charaindex, CHAR_EQUITDEFMAGIC_E+index, def_magic + dMagic); + } + dMagic = 0; + } + index++; + if( (CHAR_EQUITDEFMAGIC_E+index) > CHAR_EQUITQUIMAGIC ) + break; + } + + return; +} + +void ITEM_MagicEquitReWear( int charaindex, int itemindex){ + char buf[256]; + char *itemarg; + char Free[][128]={"EA","WA","FI","WI","QU"}; + int index=0; + int dMagic=0; + + itemarg = ITEM_getChar(itemindex,ITEM_ARGUMENT); + memset( buf, 0, sizeof( char) *256); + if( itemarg == NULL ) return; + while( index < arraysizeof( Free) ) { + if( ITEM_getArgument( itemarg, Free[ index], buf, sizeof(buf)) == TRUE ) { + dMagic = atoi( buf); + if( dMagic <= 100 && dMagic >= -100 ) { + int def_magic = CHAR_getWorkInt( charaindex, CHAR_EQUITDEFMAGIC_E+index); + CHAR_setWorkInt( charaindex, CHAR_EQUITDEFMAGIC_E+index, def_magic - dMagic); + } + dMagic = 0; + } + index++; + if( (CHAR_EQUITDEFMAGIC_E+index) > CHAR_EQUITQUIMAGIC ) + break; + } + + return; +} +#endif + +#ifdef _EQUIT_RESIST +void ITEM_MagicResist( int charaindex, int itemindex) +{ + char *itemarg,*p=NULL; + itemarg = ITEM_getChar(itemindex,ITEM_ARGUMENT); + if( itemarg == NULL ) return; + if( p = strstr( itemarg, "抗火" ) ){ + CHAR_setWorkInt( charaindex, CHAR_WORKEQUITFIRE, atoi( p+4 ) ); + } + else if( p = strstr( itemarg, "抗雷" ) ){ + CHAR_setWorkInt( charaindex, CHAR_WORKEQUITTHUNDER, atoi( p+4 ) ); + } + else if( p = strstr( itemarg, "抗冰" ) ){ + CHAR_setWorkInt( charaindex, CHAR_WORKEQUITICE, atoi( p+4 ) ); + } + else if( p = strstr( itemarg, "虚弱" ) ){ + CHAR_setWorkInt( charaindex, CHAR_WORKEQUITWEAKEN, atoi( p+4 ) ); + } + else if( p = strstr( itemarg, "魔障" ) ){ + CHAR_setWorkInt( charaindex, CHAR_WORKEQUITBARRIER, atoi( p+4 ) ); + } + else if( p = strstr( itemarg, "沉默" ) ){ + CHAR_setWorkInt( charaindex, CHAR_WORKEQUITNOCAST, atoi( p+4 ) ); + } + else if( p = strstr( itemarg, "落马" ) ){ + CHAR_setWorkInt( charaindex, CHAR_WORKEQUITFALLRIDE, atoi( p+4 ) ); + } + +} + +void ITEM_MagicReResist( int charaindex, int itemindex) +{ + char *itemarg,*p=NULL; + itemarg = ITEM_getChar(itemindex,ITEM_ARGUMENT); + if( itemarg == NULL ) return; + if( p = strstr( itemarg, "抗火" ) ){ + CHAR_setWorkInt( charaindex, CHAR_WORKEQUITFIRE, 0 ); + } + else if( p = strstr( itemarg, "抗雷" ) ){ + CHAR_setWorkInt( charaindex, CHAR_WORKEQUITFIRE, 0 ); + } + else if( p = strstr( itemarg, "抗冰" ) ){ + CHAR_setWorkInt( charaindex, CHAR_WORKEQUITFIRE, 0 ); + } + else if( p = strstr( itemarg, "虚弱" ) ){ + CHAR_setWorkInt( charaindex, CHAR_WORKEQUITFIRE, 0 ); + } + else if( p = strstr( itemarg, "魔障" ) ){ + CHAR_setWorkInt( charaindex, CHAR_WORKEQUITFIRE, 0 ); + } + else if( p = strstr( itemarg, "沉默" ) ){ + CHAR_setWorkInt( charaindex, CHAR_WORKEQUITFIRE, 0 ); + } + else if( p = strstr( itemarg, "落马" ) ){ + CHAR_setWorkInt( charaindex, CHAR_WORKEQUITFIRE, 0 ); + } +} +#endif + +#ifdef _MAGIC_RESIST_EQUIT // WON ADD 职业抗性装备 +void ITEM_P_MagicEquitWear( int charaindex, int itemindex ) +{ + char buf[256] = {0}; + char *itemarg; + char Free[][128]={"FR","IR","TR"}; + int dMagic=0; + int i; + + itemarg = ITEM_getChar(itemindex,ITEM_ARGUMENT); + if( itemarg == NULL ) return; + +// print("\n won test 10.0 ==> itemarg(%s)", itemarg ); + + for( i=0; i<3; i++ ){ + if( ITEM_getArgument( itemarg, Free[ i ], buf, sizeof(buf)) == TRUE ) { + dMagic = atoi( buf); +// print("\n won test 10.1 ==> i(%d) dMagic(%d)", i, dMagic ); + + if( dMagic <= 100 && dMagic >= -100 ){ + int def_magic = CHAR_getWorkInt( charaindex, CHAR_WORK_F_SUIT+i ); + CHAR_setWorkInt( charaindex, CHAR_WORK_F_SUIT+i, def_magic + dMagic); + +// print("\n won test 10.2 ==> i(%d)(%d)", i, CHAR_getWorkInt( charaindex, CHAR_WORK_F_SUIT+i ) ); + } + dMagic = 0; + } + } + + return; +} + + +void ITEM_P_MagicEquitReWear( int charaindex, int itemindex ) +{ + char buf[256] = {0}; + char *itemarg; + char Free[][128]={"FR","IR","TR"}; + int dMagic=0; + int i; + + itemarg = ITEM_getChar(itemindex,ITEM_ARGUMENT); + if( itemarg == NULL ) return; + +// print("\n won test 10.0 ==> itemarg(%s)", itemarg ); + + for( i=0; i<3; i++ ){ + if( ITEM_getArgument( itemarg, Free[ i ], buf, sizeof(buf)) == TRUE ) { + dMagic = atoi( buf); +// print("\n won test 10.1 ==> i(%d) dMagic(%d)", i, dMagic ); + + if( dMagic <= 100 && dMagic >= -100 ){ + int def_magic = CHAR_getWorkInt( charaindex, CHAR_WORK_F_SUIT+i ); + CHAR_setWorkInt( charaindex, CHAR_WORK_F_SUIT+i, def_magic - dMagic); + +// print("\n won test 10.2 ==> i(%d)(%d)", i, CHAR_getWorkInt( charaindex, CHAR_WORK_F_SUIT+i ) ); + } + dMagic = 0; + } + } + + return; + +} +#endif + + + +#ifdef _ITEM_WARP_FIX_BI +void recoverbi(int index) +{ + int eBbi=-1, eArm=-1, eNum=-1, eBi=-1, bi=-1; + + bi = CHAR_getInt( index, CHAR_BASEIMAGENUMBER); + eBbi = CHAR_getInt( index, CHAR_BASEBASEIMAGENUMBER); + eArm = CHAR_getItemIndex( index, CHAR_ARM); + eNum = ITEM_FIST; + if(ITEM_CHECKINDEX(eArm)) + eNum = ITEM_getInt( eArm, ITEM_TYPE); + + eBi = CHAR_getNewImagenumberFromEquip( eBbi, eNum); + + if(CHAR_getInt( index, CHAR_RIDEPET)!=-1) //骑宠 + CHAR_complianceParameter(index); + else //非骑宠 + if((eBi!=-1)&&(eBi!=bi)) + CHAR_setInt( index, CHAR_BASEIMAGENUMBER, eBi); +} +#endif + +#ifdef _ITEM_TIME_LIMIT +void ITEM_TimeLimit( int charaindex) +{ + int i = 0; + int iid = 0; + long lTime = 0; + char buff[256]; + + if( !CHAR_CHECKINDEX( charaindex) ) return; + for( i=0; i < CHAR_MAXITEMHAVE ; i++ ){ + int itemindex = CHAR_getItemIndex( charaindex , i ); + if( !ITEM_CHECKINDEX( itemindex ) ) continue; + lTime = ITEM_getWorkInt( itemindex, ITEM_WORKTIMELIMIT); + if( ITEM_getInt( itemindex, ITEM_ID) == 20173 //燃烧火把 + || ITEM_getInt( itemindex, ITEM_ID) == 20704 ){ + if( lTime > 0 && NowTime.tv_sec > lTime ){ + iid = ITEM_getInt( itemindex, ITEM_ID) + 1; + snprintf( buff, sizeof( buff), "%s的效果已消失..", ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( charaindex, -1, buff, CHAR_COLORGREEN); + CHAR_DelItemMess( charaindex, i, 0); + itemindex = ITEM_makeItemAndRegist( iid); + if(itemindex!=-1){ + CHAR_setItemIndex( charaindex, i, itemindex); + ITEM_setWorkInt( itemindex, ITEM_WORKOBJINDEX, -1); + ITEM_setWorkInt( itemindex, ITEM_WORKCHARAINDEX, charaindex); + CHAR_sendItemDataOne( charaindex, i); + } + } + } + } + +} +#endif + +#ifdef _BLACK_MARKET +void ITEM_BM_Exchange( int charaindex, int iindex) +{ + BOOL pckConfirm=FALSE; + int cdnConfirm=0; + int i, j, fd, id, itemindex, gTmp; + char sBuf[256]=""; + + fd = getfdFromCharaIndex( charaindex); + + if(!CHAR_CHECKINDEX( charaindex)) return; + if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE)!=BATTLE_CHARMODE_NONE) return; + if( CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE)!=CHAR_PARTY_NONE) return; + if( CHAR_getFlg( charaindex, CHAR_ISTRADE)) return; + if( iindex==-1) return; + + for( i=0; i<12; i++){ + if(iindex==CONNECT_get_BMList( getfdFromCharaIndex( charaindex), i)){ + pckConfirm = TRUE; + break; + } + } + + if(pckConfirm){ + if(!BMItem[iindex].GCondition||BMItem[iindex].GCondition=CHAR_MAXITEMHAVE){ + print( "npc_exchange.c: ACCEPTadditem error itemindex[%d]\n", itemindex); + ITEM_endExistItemsOne( itemindex); + sprintf( sBuf, "交易失败..."); + CHAR_talkToCli( charaindex, -1, sBuf, CHAR_COLORRED); + return; + } + CHAR_sendItemDataOne( charaindex, ret); + } + gTmp = CHAR_getInt( charaindex, CHAR_GOLD); + gTmp -= BMItem[iindex].GCondition; + CHAR_setInt( charaindex, CHAR_GOLD, gTmp); + CHAR_complianceParameter( charaindex); + CHAR_send_P_StatusString( charaindex, CHAR_P_STRING_GOLD); + + sprintf( sBuf,"交出石币 %d", BMItem[iindex].GCondition); + CHAR_talkToCli( charaindex, -1, sBuf, CHAR_COLORWHITE); + // test shan shan + sprintf( sBuf, "....这个你就收下吧!!"); + CHAR_talkToCli( charaindex, -1, sBuf, CHAR_COLORYELLOW); + // add to Empty + for( i=0; i<12; i++){ + if(BMSellList[i]==iindex){ + BMSellList[i] = RAND(0, BMINum-1); + break; + } + } + for( i=0; i<12; i++) + CONNECT_set_BMList( getfdFromCharaIndex( charaindex), i, -1); + return; + } + } + } + sprintf( sBuf, "交易失败..."); + CHAR_talkToCli( charaindex, -1, sBuf, CHAR_COLORRED); +} +#endif + +#ifdef _ITEM_CONSTITUTION +void ITEM_Constitution( int charaindex, int toindex, int haveitemindex) +{ + char buf[256]; + char *itemarg; + char Free[][128]={"VI","ST","TG","DE"}; + int index=0, FixPoint=0, itemindex; + BOOL FIXs=FALSE; + int AllPoint=0; + + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE) != CHAR_TYPEPLAYER ) + return; + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + + itemarg = ITEM_getChar( itemindex, ITEM_ARGUMENT); + if( itemarg == NULL ) return; + memset( buf, 0, sizeof( char) *256); + + AllPoint = CHAR_getInt( charaindex, CHAR_VITAL) + +CHAR_getInt( charaindex, CHAR_VITAL+1) + +CHAR_getInt( charaindex, CHAR_VITAL+2) + +CHAR_getInt( charaindex, CHAR_VITAL+3); + + while( index < arraysizeof( Free) ) { + if( ITEM_getArgument( itemarg, Free[ index], buf, sizeof(buf)) == TRUE ) { + FixPoint = atoi( buf); + if( FixPoint <= 100 && FixPoint > 0 ) { + int points = CHAR_getInt( charaindex, CHAR_VITAL+index); + //Change Fix + //if( points < (FixPoint*100) ) break; + if( points < (FixPoint*100) || AllPoint-(FixPoint*100) <= 0 ) + { + CHAR_talkToCli( charaindex, -1, "物品无效。", CHAR_COLORYELLOW); + return; + } + CHAR_setInt( charaindex, CHAR_VITAL+index, (points-(FixPoint*100))); + CHAR_setInt( charaindex, CHAR_SKILLUPPOINT, CHAR_getInt( charaindex, CHAR_SKILLUPPOINT) + FixPoint); + FIXs = TRUE; + } + FixPoint = 0; + } + index++; + if( (CHAR_VITAL+index) > CHAR_DEX ) + break; + } + CHAR_complianceParameter( charaindex); + CHAR_send_P_StatusString( charaindex, + CHAR_P_STRING_MAXHP|CHAR_P_STRING_HP|CHAR_P_STRING_LV|CHAR_P_STRING_EXP| + CHAR_P_STRING_ATK|CHAR_P_STRING_DEF|CHAR_P_STRING_QUICK| + CHAR_P_STRING_VITAL|CHAR_P_STRING_STR|CHAR_P_STRING_TOUGH|CHAR_P_STRING_DEX); + + CHAR_Skillupsend( charaindex); + memset( buf, 0, sizeof( buf)); + if( FIXs == TRUE ) { + sprintf( buf, "%s", "你的身体感到变化。"); + }else { + sprintf( buf, "%s", "物品无效。"); + } + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + CHAR_DelItem( charaindex, haveitemindex); +} +#endif + +#ifdef _NEW_RIDEPETS +void ITEM_useLearnRideCode( int charaindex, int toindex, int haveitemindex) +{//CHAR_LOWRIDEPETS + int itemindex, i; + char buf1[256]; + char *itemarg; + typedef struct{ + char arg[256]; + int Code; + }tagNewRideCode; + tagNewRideCode NewRides[12]={ + { "RIDE_PET0", RIDE_PET0}, { "RIDE_PET1", RIDE_PET1}, { "RIDE_PET2", RIDE_PET2}, + { "RIDE_PET3", RIDE_PET3}, { "RIDE_PET4", RIDE_PET4}, { "RIDE_PET5", RIDE_PET5}, + { "RIDE_PET6", RIDE_PET6}, { "RIDE_PET7", RIDE_PET7}, { "RIDE_PET8", RIDE_PET8}, + { "RIDE_PET9", RIDE_PET9}, { "RIDE_PET10", RIDE_PET10}, { "RIDE_PET11", RIDE_PET11} + }; + + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if(!ITEM_CHECKINDEX(itemindex)) return; + itemarg = ITEM_getChar( itemindex, ITEM_ARGUMENT); + if( itemarg == NULL ) return; + memset( buf1, 0, sizeof( buf1)); + if( getStringFromIndexWithDelim(itemarg,"|", 1, buf1, sizeof(buf1)) == FALSE ) + return; +#ifdef _FM_RIDE_PET + int fmRides=0; + switch( CHAR_getWorkInt( charaindex, CHAR_WORKFMFLOOR) ) + { + case 1041: + fmRides = RIDE_PET9; + break; + case 2031: + fmRides = RIDE_PET8; + break; + case 3031: + fmRides = RIDE_PET7; + break; + case 4031: + fmRides = RIDE_PET1; + break; + case 5031: + fmRides = RIDE_PET3; + break; + case 6031: + fmRides = RIDE_PET5; + break; + case 7031: + fmRides = RIDE_PET4; + break; + case 8031: + fmRides = RIDE_PET6; + break; + case 9031: + fmRides = RIDE_PET2; + break; + default: + fmRides = 0; + } +#endif + for( i=0; i<12; i++) { + if( !strcmp( NewRides[i].arg, buf1) ) { + int LRCode = CHAR_getInt( charaindex, CHAR_LOWRIDEPETS); + if( RIDE_PET0 == NewRides[i].Code + && CHAR_getInt( charaindex, CHAR_TRANSMIGRATION) < 5 + ){ + char token[256]; + memset( token, 0, sizeof( token)); + if( getStringFromIndexWithDelim(itemarg,"|", 2, buf1, sizeof(buf1)) != FALSE ){ + sprintf( token, "必须五转转人以上才能学习骑%s。",buf1); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW); + return;//机暴限五转 + } + } + if( (RIDE_PET10 == NewRides[i].Code || RIDE_PET11 == NewRides[i].Code) + && CHAR_getInt( charaindex, CHAR_TRANSMIGRATION) < 6 + ){ + char token[256]; + memset( token, 0, sizeof( token)); + if( getStringFromIndexWithDelim(itemarg,"|", 2, buf1, sizeof(buf1)) != FALSE ){ + sprintf( token, "必须六转人以上才能学习骑%s。",buf1); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW); + return;//新骑宠限六转 + } + } + if(((fmRides == NewRides[i].Code + && CHAR_getInt( charaindex, CHAR_FMLEADERFLAG ) != FMMEMBER_NONE + && CHAR_getInt( charaindex, CHAR_FMLEADERFLAG ) != FMMEMBER_APPLY) + || (RIDE_PET0 == NewRides[i].Code + || RIDE_PET10 == NewRides[i].Code + || RIDE_PET11 == NewRides[i].Code)) + || getFmridepet()==0) + { + LRCode = LRCode|NewRides[i].Code; + CHAR_setInt( charaindex, CHAR_LOWRIDEPETS, LRCode); + memset( buf1, 0, sizeof( buf1)); + if( getStringFromIndexWithDelim(itemarg,"|", 2, buf1, sizeof(buf1)) != FALSE ){ + char token[256]; + memset( token, 0, sizeof( token)); + sprintf( token, "学习了新的骑宠 (%s)。", buf1); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW); + CHAR_DelItem( charaindex, haveitemindex); + CHAR_sendStatusString( charaindex, "x"); + } + break; + }else{ + char token[256]; + memset( token, 0, sizeof( token)); + if( getStringFromIndexWithDelim(itemarg,"|", 2, buf1, sizeof(buf1)) != FALSE ){ + sprintf( token, "必须拥有该庄园的正式成员才能学习骑%s。",buf1); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW); + return; + } + } + } + } +} + +#endif + + + + + +#ifdef _ITEM_EDITBASES +void ITEM_useFusionEditBase( int charaindex, int toindex, int haveitemindex) +{ + int itemindex; + int work[4]={0,0,0,0}; + int anhour = PETFEEDTIME;//宠物 食时间(单位:秒) + + if( !CHAR_CHECKINDEX( charaindex ) ) return; + if( !CHAR_CHECKINDEX( toindex ) ) return; + if( CHAR_getInt( toindex, CHAR_WHICHTYPE) != CHAR_TYPEPET){ + CHAR_talkToCli( charaindex, -1, "物品仅限宠物使用。", CHAR_COLORYELLOW); + return; + } + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if( !ITEM_CHECKINDEX(itemindex) ) return; + if( CHAR_getInt( toindex, CHAR_FUSIONBEIT) == 1 && + CHAR_getInt( toindex, CHAR_FUSIONRAISE) > 0 ){//检查是否为融合宠 + +#ifdef _TEST_PETFUSIONTIME +#else + int time_l; + int nowTime; // Robin fix + time_l = CHAR_getInt( toindex, CHAR_FUSIONTIMELIMIT); + nowTime = (int)time(NULL); +#if 1 // 消化药 + { + char *arg = NULL; + int deltime; + char msg[1024]; + arg = ITEM_getChar( itemindex, ITEM_ARGUMENT); + if( arg != NULL && !strncmp( arg, "消", 2) ) { + sscanf( arg, "消 %d", &deltime); + time_l -= (deltime*60); + CHAR_setInt( toindex, CHAR_FUSIONTIMELIMIT, time_l); + CHAR_DelItem( charaindex, haveitemindex); + sprintf( msg, "加快宠物蛋的消化速度 %d 分钟。", deltime); + CHAR_talkToCli( charaindex, -1, msg, CHAR_COLORYELLOW); + if( (time_l + anhour) <= nowTime ) { + int min, sec, deftime; + deftime = nowTime - (time_l + anhour); + min = deftime/60; + sec = deftime%60; + sprintf( msg, "宠物蛋已经可以 食了,超过 食时间%d分%d秒。", min, sec); + CHAR_talkToCli( charaindex, -1, msg, CHAR_COLORYELLOW); + return; + } + } + } +#endif + if( (time_l + anhour) > nowTime ){ //现在的时间要超过(time_l+anhour)才可以 食 + char Mess1[256]; + int min, sec, deftime; + //int nowTime = (int)time(NULL); + deftime = (time_l + anhour) - nowTime; + min = deftime/60; + sec = deftime%60; + sprintf( Mess1, "宠物蛋需过%d分%d秒才可 食。", min, sec); + CHAR_talkToCli( charaindex, -1, Mess1, CHAR_COLORYELLOW); + return; + } +#endif +//--------------------------------------------- + work[3] = CHAR_getInt( toindex, CHAR_EVOLUTIONBASEVTL); + work[0] = CHAR_getInt( toindex, CHAR_EVOLUTIONBASESTR); + work[1] = CHAR_getInt( toindex, CHAR_EVOLUTIONBASETGH); + work[2] = CHAR_getInt( toindex, CHAR_EVOLUTIONBASEDEX); + PET_showEditBaseMsg( charaindex, toindex, itemindex, work); + CHAR_setInt( toindex, CHAR_EVOLUTIONBASEVTL, work[3]); + CHAR_setInt( toindex, CHAR_EVOLUTIONBASESTR, work[0]); + CHAR_setInt( toindex, CHAR_EVOLUTIONBASETGH, work[1]); + CHAR_setInt( toindex, CHAR_EVOLUTIONBASEDEX, work[2]); +//--------------------------------------------- + LogPetPointChange( + CHAR_getChar( charaindex, CHAR_NAME ), + CHAR_getChar( charaindex, CHAR_CDKEY ), + CHAR_getChar( charaindex, CHAR_NAME), + toindex, 4, + CHAR_getInt( toindex, CHAR_LV), + "item_use", + CHAR_getInt( charaindex, CHAR_FLOOR), + CHAR_getInt( charaindex, CHAR_X ), + CHAR_getInt( charaindex, CHAR_Y ) + ); + + LogPetFeed( + CHAR_getChar( charaindex, CHAR_NAME), + CHAR_getChar( charaindex, CHAR_CDKEY), + CHAR_getChar( toindex, CHAR_NAME), + toindex, + CHAR_getInt( toindex, CHAR_LV), + ITEM_getChar( itemindex, CHAR_NAME), // Key + CHAR_getInt( charaindex, CHAR_FLOOR), + CHAR_getInt( charaindex, CHAR_X), + CHAR_getInt( charaindex, CHAR_Y), + CHAR_getChar( toindex, CHAR_UNIQUECODE) ); + +#ifdef _PET_EVOLUTION + { + int raise = CHAR_getInt( toindex, CHAR_FUSIONRAISE); + CHAR_setInt( toindex, CHAR_FUSIONRAISE, --raise); + CHAR_setInt( toindex, CHAR_FUSIONTIMELIMIT, nowTime); + if( CHAR_getInt( toindex, CHAR_FUSIONRAISE) <= 0 ){//孵化 + char buf[256], buf1[256]; + int newindex; + sprintf( buf, "蛋〈%s〉孵化成", CHAR_getUseName( toindex )); + + newindex = EVOLUTION_createPetFromEnemyIndex( charaindex, toindex, 1); + if( !CHAR_CHECKINDEX( newindex) ){ + CHAR_talkToCli( charaindex, -1, "宠物孵化发生错误。", CHAR_COLORYELLOW); + return; + } + sprintf( buf1, "〈%s〉。", CHAR_getChar( newindex, CHAR_NAME)); + strcat( buf, buf1); + CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); + + LogPetFeed( + CHAR_getChar( charaindex, CHAR_NAME), + CHAR_getChar( charaindex, CHAR_CDKEY), + CHAR_getChar( toindex, CHAR_NAME), + toindex, + CHAR_getInt( toindex, CHAR_LV), + buf, // Key + CHAR_getInt( charaindex, CHAR_FLOOR), + CHAR_getInt( charaindex, CHAR_X), + CHAR_getInt( charaindex, CHAR_Y), + CHAR_getChar( toindex, CHAR_UNIQUECODE) ); + + } + } +#endif + }else { + CHAR_talkToCli( charaindex, -1, "???", CHAR_COLORYELLOW); + } + CHAR_DelItem( charaindex, haveitemindex); + return; +} +#endif + +#ifdef _THROWITEM_ITEMS +static int Niceitem = 0; + int golds[3]={ 10000, 20000, 50000}; + int items1[18] = { 13092, 13091, 20439, 20417, 1284, 20172, 18210, 19014, 18360, 18362, 18364, + 18359, 18356, 18357, 18510, 20418, 20419, 1452}; + int items2[11] = { 15842, 16136, 14334, 14034, 14634, 14934, 15534, 14934, 16432, 17057, 19695}; + + int items3[10] = { 16014, 16314, 14515, 14215, 14815, 15115, 15715, 15295, 16552, 17157}; + + int items4[18] = { 14516, 14513, 14216, 14213, 14816, 14813, 15116, 15716, 15415, 17360, 20279, + 20282, 20276, 20270, 20288, 20290, 20291, 20289}; + int items5[5] = { 20280, 20283, 20277, 20271, 20274}; + int items6[5] = { 20284, 20272, 20275, 20281, 20278}; +void ITEM_ThrowItemBox( int charaindex, int toindex, int haveitemindex) +{ + int i, ret, Iindex, ItemID=-1, itemindex; + char token[256]; + + if( !CHAR_CHECKINDEX(charaindex) ) return; + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if( !ITEM_CHECKINDEX(itemindex) ) return; + + if( Niceitem > 10 ) ret = rand()%920; + else ret = rand()%1000; + + for( i = CHAR_STARTITEMARRAY ; i < CHAR_MAXITEMHAVE ; i++ ){ + Iindex = CHAR_getItemIndex( charaindex , i ); + if( !ITEM_CHECKINDEX(itemindex) ) continue; + if( itemindex == Iindex ){ + CHAR_DelItem( charaindex, i); + + LogItem( + CHAR_getChar( charaindex, CHAR_NAME ), CHAR_getChar( charaindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID), +#endif + "WarpManDelItem", + CHAR_getInt( charaindex, CHAR_FLOOR), CHAR_getInt( charaindex, CHAR_X ), + CHAR_getInt( charaindex, CHAR_Y ), ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + break; + } + } + if( i >= CHAR_MAXITEMHAVE ){ + return; + } + + if( ret <= 774 ){ + int Golds=0; + Golds = golds[ RAND(0,2)]; + CHAR_AddGold( charaindex, Golds); + }else { + if( ret < 924 ){ + ItemID = items1[RAND(0,17)]; + }else if( ret < 964 ){ + ItemID = items2[RAND(0,10)]; + }else if( ret < 984 ){ + ItemID = items3[RAND(0,9)]; + Niceitem++; + }else if( ret < 994 ){ + ItemID = items4[RAND(0,17)]; + Niceitem++; + }else if( ret < 999 ){ + ItemID = items5[RAND(0,4)]; + Niceitem++; + }else { + ItemID = items6[RAND(0,4)]; + Niceitem++; + } + + Iindex = ITEM_makeItemAndRegist( ItemID); + if( !ITEM_CHECKINDEX( Iindex) ){ + return; + } + ret = CHAR_addItemSpecificItemIndex( charaindex, Iindex); + if( ret < 0 || ret >= CHAR_MAXITEMHAVE ) { + ITEM_endExistItemsOne( Iindex); + return; + } + sprintf( token,"拿到%s", ITEM_getChar( Iindex, ITEM_NAME)); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW ); + CHAR_sendItemDataOne( charaindex, ret); + } +} +#endif + +#ifdef _ITEM_LOVERPARTY +void ITEM_LoverSelectUser( int charaindex, int toindex, int haveitemindex) +{ + int itemindex, i; + int playernum = CHAR_getPlayerMaxNum(); + + if( !CHAR_CHECKINDEX( charaindex ) ) return; + if( !CHAR_CHECKINDEX( toindex ) ) return; + if( CHAR_getInt( toindex, CHAR_WHICHTYPE) != CHAR_TYPEPLAYER){ + CHAR_talkToCli( charaindex, -1, "物品仅限人物使用。", CHAR_COLORYELLOW); + return; + } + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if( !ITEM_CHECKINDEX(itemindex) ) return; + if( ITEM_getInt( itemindex, ITEM_TYPE) != 16 ){ + ITEM_setInt( itemindex, ITEM_TYPE, 16); + return; + } + if( !strcmp( ITEM_getChar( itemindex, ITEM_FORUSERNAME), "") || + !strcmp( ITEM_getChar( itemindex, ITEM_FORUSERCDKEY), "") ){//寻找设定对象 + if( charaindex == toindex ){ + CHAR_talkToCli( charaindex, -1, "不能选择自己使用。", CHAR_COLORYELLOW); + return; + } + ITEM_setChar( itemindex, ITEM_FORUSERNAME, CHAR_getChar( toindex, CHAR_NAME) ); + ITEM_setChar( itemindex, ITEM_FORUSERCDKEY, CHAR_getChar( toindex, CHAR_CDKEY) ); + ITEM_setInt( itemindex, ITEM_TARGET, 0); + { + char token[256]; + sprintf( token, "%s(%s)", + ITEM_getChar( itemindex, ITEM_SECRETNAME), CHAR_getChar( toindex, CHAR_NAME)); + ITEM_setChar( itemindex, ITEM_SECRETNAME, token); + sprintf( token, "传送对象设定为%s。", CHAR_getChar( toindex, CHAR_NAME)); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW); + } + CHAR_sendItemDataOne( charaindex, haveitemindex); + }else{ + char buf1[256]; + //if( CHAR_getInt( charaindex, CHAR_FLOOR) == 117 || CHAR_getInt( charaindex, CHAR_FLOOR) == 887 || + //CHAR_getInt( charaindex, CHAR_FLOOR) == 1042 || CHAR_getInt( charaindex, CHAR_FLOOR) == 2032 || + //CHAR_getInt( charaindex, CHAR_FLOOR) == 3032 || CHAR_getInt( charaindex, CHAR_FLOOR) == 4032 || + //CHAR_getInt( charaindex, CHAR_FLOOR) == 5032 || CHAR_getInt( charaindex, CHAR_FLOOR) == 6032 || + //CHAR_getInt( charaindex, CHAR_FLOOR) == 7032 || CHAR_getInt( charaindex, CHAR_FLOOR) == 8032 || + //CHAR_getInt( charaindex, CHAR_FLOOR) == 9032 ){ + if( checkUnlawWarpFloor( CHAR_getInt( charaindex, CHAR_FLOOR) ) ) { + CHAR_talkToCli( charaindex, -1, "你的所在位置无法传送。", CHAR_COLORYELLOW ); + return; + } + + for( i=0; i= 10000) continue; + + if( (int)NowTime.tv_sec > (int)( OBJECT_getTime( objindex) + getItemdeletetime() ) ) { + + LogStone( + -1, + "NULL", + "NULL", + amount, + 0, + "Del(删除过时金钱)", + OBJECT_getFloor( objindex ), + OBJECT_getX( objindex ), + OBJECT_getY( objindex ) + ); + + CHAR_ObjectDelete(objindex); + } + } +} + +void GOLD_DeleteTimeCheckOne( int objindex) +{ + int amount; + + if( CHECKOBJECT( objindex ) == FALSE ) return; + if( OBJECT_getType( objindex) != OBJTYPE_GOLD) return; + + amount = OBJECT_getIndex( objindex); + if( amount >= 10000) return; + + if( (int)NowTime.tv_sec > (int)( OBJECT_getTime( objindex) + getItemdeletetime() ) ) { + + LogStone( + -1, + "NULL", + "NULL", + amount, + 0, + "Del(删除过时金钱)", + OBJECT_getFloor( objindex ), + OBJECT_getX( objindex ), + OBJECT_getY( objindex ) + ); + + CHAR_ObjectDelete(objindex); + } + +} + +#endif + +#ifdef _TIME_TICKET +void ITEM_timeticket( int charaindex, int toindex, int haveitemindex) +{ + ITEM_timeticketEx( charaindex, toindex, haveitemindex, 0); +} + +void ITEM_timeticketEx( int charaindex, int toindex, int haveitemindex, int flag) +{ + int itemindex; + int addtime; + int nowtime = time(NULL); + int tickettime; + int lefttime; + char msg[1024]; + + if( !CHAR_CHECKINDEX( charaindex ) ) return; + + if( check_TimeTicketMap( CHAR_getInt( charaindex, CHAR_FLOOR)) == FALSE + && flag == 0 ) { + CHAR_talkToCli( charaindex, -1, "这个地点不可使用。", CHAR_COLORYELLOW); + return; + } + + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if( !ITEM_CHECKINDEX(itemindex) ) return; + + tickettime = CHAR_getWorkInt( charaindex, CHAR_WORKTICKETTIME); + if( tickettime > nowtime+20 ) { + CHAR_talkToCli( charaindex, -1, "时间必须剩下20秒以内才可使用。", CHAR_COLORYELLOW); + return; + } + // 第一次使用的话 + if( tickettime == 0 ) { + tickettime = nowtime; + CHAR_setWorkInt( charaindex, CHAR_WORKTICKETTIMESTART, nowtime); + } + // 战斗中且超过时限时使用 + //if( CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE + // && tickettime < nowtime ) { + //tickettime = nowtime; + // sprintf(msg, "时间不足%d秒。", nowtime - tickettime ); + // CHAR_talkToCli( charaindex, -1, msg, CHAR_COLORYELLOW); + //} + + addtime = atoi( ITEM_getChar( itemindex, ITEM_ARGUMENT)); + tickettime += addtime; + CHAR_setWorkInt( charaindex, CHAR_WORKTICKETTIME, tickettime ); + lefttime = tickettime - nowtime; + if( lefttime > 0 ) + sprintf(msg, "时间增加%d秒,还剩下%d分%d秒。", addtime, lefttime/60, lefttime%60 ); + else + sprintf(msg, "时间增加%d秒,还不足%d分%d秒。", addtime, (-lefttime)/60, (-lefttime)%60 ); + CHAR_talkToCli( charaindex, -1, msg, CHAR_COLORYELLOW); + CHAR_DelItem( charaindex, haveitemindex); +} +#endif + +#ifdef _ITEM_SETLOVER +void ITEM_SetLoverUser( int charaindex, int toindex, int haveitemindex) +{ + int itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + int playernum = CHAR_getPlayerMaxNum(); + char token[256],*pActionNumber,szMsg[128]; + int floor = CHAR_getInt(charaindex,CHAR_FLOOR); + + if( !strcmp( CHAR_getChar( charaindex, CHAR_LOVE), "YES")) + { + CHAR_talkToCli( charaindex, -1, "重婚是违法的!您已经结婚了哦~", CHAR_COLORYELLOW); + return; + } + if( !CHAR_CHECKINDEX( charaindex ) ) return; + if( !CHAR_CHECKINDEX( toindex ) ) return; + if( CHAR_getInt( toindex, CHAR_WHICHTYPE) != CHAR_TYPEPLAYER) + { + CHAR_talkToCli( charaindex, -1, "只能和玩家结婚哦", CHAR_COLORYELLOW); + return; + } + if( CHAR_getInt(charaindex,CHAR_TRANSMIGRATION)<1 ||CHAR_getInt(toindex,CHAR_TRANSMIGRATION)<1) + { + CHAR_talkToCli( charaindex, -1, "如果想结婚的话,双方必须1转以上哦~", CHAR_COLORYELLOW); + return; + } + if( charaindex == toindex ) + { + CHAR_talkToCli( charaindex, -1, "难道您想和自己结婚吗?", CHAR_COLORYELLOW); + return; + } + if ( IsMale(charaindex)==IsMale(toindex)) + { + CHAR_talkToCli( charaindex, -1, "同性怎么结婚呢?", CHAR_COLORYELLOW); + return; + } + if( !ITEM_CHECKINDEX(itemindex) ) return; + int id = ITEM_getInt( itemindex, ITEM_ID); + itemindex = ITEM_makeItemAndRegist( id ); + + if( strcmp( CHAR_getChar( charaindex, CHAR_LOVE), "YES") && + strcmp( CHAR_getChar( toindex, CHAR_LOVE), "YES"))//第二次判断双方是否已经结婚 + { + if( itemindex != -1 ){ + CHAR_setChar( charaindex, CHAR_LOVERID, CHAR_getChar( toindex, CHAR_CDKEY) ); + CHAR_setChar( charaindex, CHAR_LOVERNAME, CHAR_getChar( toindex, CHAR_NAME) ); + if (strcmp(CHAR_getChar( toindex, CHAR_LOVERID), CHAR_getChar( charaindex, CHAR_CDKEY))==0 && + strcmp(CHAR_getChar( toindex, CHAR_LOVERNAME), CHAR_getChar( charaindex, CHAR_NAME))==0) + { + int i; + char szMsg1[16],*arg; + + sprintf( token, "已经答应了%s的求婚", CHAR_getChar( toindex, CHAR_NAME)); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW); + sprintf( token, "%s已经响应了你的求婚", CHAR_getChar( charaindex, CHAR_NAME)); + CHAR_talkToCli( toindex, -1, token, CHAR_COLORYELLOW); + + CHAR_setChar( toindex, CHAR_LOVE,"YES"); + CHAR_setChar( charaindex, CHAR_LOVE,"YES"); + CHAR_setChar( charaindex, CHAR_LOVERID, CHAR_getChar( toindex, CHAR_CDKEY) ); + CHAR_setChar( charaindex, CHAR_LOVERNAME, CHAR_getChar( toindex, CHAR_NAME) ); + CHAR_setChar( toindex, CHAR_LOVERID, CHAR_getChar( charaindex, CHAR_CDKEY) ); + CHAR_setChar( toindex, CHAR_LOVERNAME, CHAR_getChar( charaindex, CHAR_NAME) ); + sprintf(szMsg,"%d 8 101883",floor); + CHAR_CHAT_DEBUG_effect(charaindex,szMsg); + CHAR_DelItem( charaindex, haveitemindex); + for(i=0;i=playernum) + { + CHAR_talkToCli( charaindex, -1, "很抱歉,您的爱人不在线哦~", CHAR_COLORYELLOW ); + return; + } + + if( !CHAR_CHECKINDEX( charaindex ) ) return; + if( !CHAR_CHECKINDEX( i ) ) return; + + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if( !ITEM_CHECKINDEX(itemindex) ) return; + + if( checkUnlawWarpFloor( CHAR_getInt( charaindex, CHAR_FLOOR) ) ) { + CHAR_talkToCli( charaindex, -1, "很抱歉,您的爱人在神秘遥远地方,无法传送。", CHAR_COLORYELLOW ); + return; + }//UNWARP地图禁止使用 + if( checkUnlawWarpFloor( CHAR_getInt( i, CHAR_FLOOR) ) ) { + CHAR_talkToCli( charaindex, -1, "很抱歉,您的爱人在神秘遥远地方,无法传送。", CHAR_COLORYELLOW ); + return; + }//UNWARP地图禁止使用 + int itemmaxuse=0; + + if(strcmp(CHAR_getChar(i,CHAR_LOVERID),CHAR_getChar(charaindex,CHAR_CDKEY)) == 0 && + strcmp(CHAR_getChar(i,CHAR_LOVERNAME),CHAR_getChar(charaindex,CHAR_NAME)) == 0) + { + CHAR_DischargePartyNoMsg( charaindex);//解散团队 + int floor, x, y; + char token[256]; + floor = CHAR_getInt( i, CHAR_FLOOR); + x = CHAR_getInt( i, CHAR_X); + y = CHAR_getInt( i, CHAR_Y); + + CHAR_warpToSpecificPoint( charaindex, floor, x, y ); + sprintf( token, "%s:亲爱的,我来了!", CHAR_getChar( charaindex, CHAR_NAME)); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW ); + sprintf( token, "已传送到爱人%s身边!", CHAR_getChar( i, CHAR_NAME)); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW ); + print("\n玩家% 传送到玩家%s身边", CHAR_getChar( charaindex, CHAR_NAME),CHAR_getChar(i, CHAR_NAME)); + return; + } + }else + CHAR_talkToCli( charaindex, -1, "您没有结婚哦~", CHAR_COLORYELLOW ); +} + +void ITEM_LoverUnmarry( int charaindex, int toindex, int haveitemindex) +{ + int itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + int i; + char token[256]; + int playernum = CHAR_getPlayerMaxNum(); + //检查是否结婚 + if( !strcmp( CHAR_getChar( charaindex, CHAR_LOVE), "YES")) + { + for(i=0;i=playernum) + { + CHAR_talkToCli( charaindex, -1, "很抱歉,您的爱人不在线哦~", CHAR_COLORYELLOW ); + return; + } + + if( !CHAR_CHECKINDEX( charaindex ) ) return; + if( !CHAR_CHECKINDEX( i ) ) return; + if( !ITEM_CHECKINDEX(itemindex) ) return; + + if(strcmp(ITEM_getChar( itemindex, ITEM_SECRETNAME), "同意离婚戒指")){ + int id = ITEM_getInt( itemindex, ITEM_ID); + itemindex = ITEM_makeItemAndRegist( id ); + + if( itemindex != -1 ){ + + int emptyitemindexinchara = CHAR_findEmptyItemBox( toindex ); + + if( emptyitemindexinchara < 0 ){ + sprintf( token, "%s物品栏已满。离婚失败" , CHAR_getChar( i, CHAR_NAME)); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW); + sprintf( token, "%s向您发起离婚,但您的物品栏已满。" , CHAR_getChar( charaindex, CHAR_NAME)); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW);} + else{ + CHAR_setItemIndex( i, emptyitemindexinchara, itemindex); + ITEM_setChar( itemindex, ITEM_NAME, "同意离婚戒指"); + ITEM_setChar( itemindex, ITEM_SECRETNAME, "同意离婚戒指"); + sprintf( token, "%s向你申请离婚,如果同意请使用该戒指!", CHAR_getChar( charaindex, CHAR_NAME)); + ITEM_setChar( itemindex, ITEM_EFFECTSTRING, token); + CHAR_sendItemDataOne( i, emptyitemindexinchara); + ITEM_endExistItemsOne(itemindex); + sprintf( token, " %s向您提出离婚并把 %s 给你!", CHAR_getChar( charaindex, CHAR_NAME),ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW); + sprintf( token, "已经向%s发起离婚", CHAR_getChar( i, CHAR_NAME)); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW); + CHAR_DelItem( charaindex, haveitemindex); + return;}} + }else{ + CHAR_setChar( i, CHAR_LOVE,""); + CHAR_setChar( i, CHAR_LOVERID,""); + CHAR_setChar( i, CHAR_LOVERNAME,""); + CHAR_setChar( charaindex, CHAR_LOVE,""); + CHAR_setChar( charaindex, CHAR_LOVERID,""); + CHAR_setChar( charaindex, CHAR_LOVERNAME,""); + CHAR_talkToCli( i, -1, "双方离婚成功!", CHAR_COLORYELLOW); + CHAR_talkToCli( charaindex, -1, "双方离婚成功!", CHAR_COLORYELLOW);} + CHAR_DelItem( charaindex, haveitemindex); + }else + CHAR_talkToCli( charaindex, -1, "您没有结婚哦~", CHAR_COLORYELLOW ); +} + + +#endif + +#ifdef _ITEM_METAMO +void ITEM_ColorMetamo( int charaindex, int toindex, int haveitemindex) +{ + int itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + char *itemarg,p; + int OldMetamoId, NewMetamoId; + itemarg=ITEM_getChar(itemindex,ITEM_ARGUMENT); + if( itemarg == NULL ) return; + OldMetamoId=CHAR_getInt( charaindex, CHAR_BASEBASEIMAGENUMBER); + if(OldMetamoId >= 100000 || OldMetamoId < 100240){ + if( strstr( itemarg, "红" ) ){ + CHAR_talkToCli( charaindex, -1, "变成红色", CHAR_COLORYELLOW); + if(((OldMetamoId%100)/10)%2==0) + NewMetamoId=(OldMetamoId/10)*10; + else + NewMetamoId=(OldMetamoId/10)*10-10; + }else if( strstr( itemarg, "绿" ) ){ + CHAR_talkToCli( charaindex, -1, "变成绿色", CHAR_COLORYELLOW); + if(((OldMetamoId%100)/10)%2==0) + NewMetamoId=(OldMetamoId/10)*10+5; + else + NewMetamoId=(OldMetamoId/10)*10-5; + }else if( strstr( itemarg, "黄" ) ){ + CHAR_talkToCli( charaindex, -1, "变成黄色", CHAR_COLORYELLOW); + if(((OldMetamoId%100)/10)%2==0) + NewMetamoId=(OldMetamoId/10)*10+10; + else + NewMetamoId=(OldMetamoId/10)*10; + }else if( strstr( itemarg, "灰" ) ){ + CHAR_talkToCli( charaindex, -1, "变成灰色", CHAR_COLORYELLOW); + if(((OldMetamoId%100)/10)%2==0) + NewMetamoId=(OldMetamoId/10)*10+15; + else + NewMetamoId=(OldMetamoId/10)*10+5; + }else if( strstr( itemarg, "随" ) ){ + srand(time(0)); + do + if(((OldMetamoId%100)/10)%2==0) + NewMetamoId=(OldMetamoId/10)*10+(rand()%4)*5; + else + NewMetamoId=(OldMetamoId/10)*10+(rand()%4)*5-10; + while(NewMetamoId==OldMetamoId); + CHAR_talkToCli( charaindex, -1, "随机变色成功", CHAR_COLORYELLOW); + }else{ + CHAR_talkToCli( charaindex, -1, "变色失败", CHAR_COLORYELLOW); + return;} + }else + CHAR_talkToCli( charaindex, -1, "变色失败,你造型并不是人物造型", CHAR_COLORYELLOW); + if(NewMetamoId==0)return; + CHAR_setInt( charaindex , CHAR_BASEIMAGENUMBER , NewMetamoId ); + CHAR_setInt( charaindex , CHAR_BASEBASEIMAGENUMBER , NewMetamoId ); + + CHAR_complianceParameter( charaindex ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( charaindex , CHAR_WORKOBJINDEX )); + CHAR_send_P_StatusString( charaindex , CHAR_P_STRING_BASEBASEIMAGENUMBER); + CHAR_DelItem( charaindex, haveitemindex); +} + +void ITEM_CharaMetamo( int charaindex, int toindex, int haveitemindex) +{ + int OldMetamoId=0, NewMetamoId=0; + int itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + char *itemarg,p; + itemarg=ITEM_getChar(itemindex,ITEM_ARGUMENT); + if( itemarg == NULL ) return; + OldMetamoId=CHAR_getInt( charaindex, CHAR_BASEBASEIMAGENUMBER); + if(OldMetamoId >= 100000 || OldMetamoId < 100240){ + if( strstr( itemarg, "豆丁囝" ) && OldMetamoId < 100120){ + CHAR_talkToCli( charaindex, -1, "更改造型为豆囝", CHAR_COLORYELLOW); + NewMetamoId=(OldMetamoId/1000)*1000+(OldMetamoId%20); + }else if( strstr( itemarg, "赛亚人" ) && OldMetamoId < 100120 ){ + CHAR_talkToCli( charaindex, -1, "更改造型为赛亚人", CHAR_COLORYELLOW); + NewMetamoId=(OldMetamoId/1000)*1000+20+(OldMetamoId%20); + }else if( strstr( itemarg, "辫子男孩" ) && OldMetamoId < 100120 ){ + CHAR_talkToCli( charaindex, -1, "更改造型为辫子男孩", CHAR_COLORYELLOW); + NewMetamoId=(OldMetamoId/1000)*1000+40+(OldMetamoId%20); + }else if( strstr( itemarg, "酷哥" ) && OldMetamoId < 100120 ){ + CHAR_talkToCli( charaindex, -1, "更改造型为酷哥", CHAR_COLORYELLOW); + NewMetamoId=(OldMetamoId/1000)*1000+60+(OldMetamoId%20); + }else if( strstr( itemarg, "熊皮男" ) && OldMetamoId < 100120 ){ + CHAR_talkToCli( charaindex, -1, "更改造型为熊皮男", CHAR_COLORYELLOW); + NewMetamoId=(OldMetamoId/1000)*1000+80+(OldMetamoId%20); + }else if( strstr( itemarg, "大只佬" ) && OldMetamoId < 100120 ){ + CHAR_talkToCli( charaindex, -1, "更改造型为大只佬", CHAR_COLORYELLOW); + NewMetamoId=(OldMetamoId/1000)*1000+100+(OldMetamoId%20); + }else if( strstr( itemarg, "随机" ) && OldMetamoId < 100120 ){ + srand(time(0)); + do + NewMetamoId=(OldMetamoId/1000)*1000+(rand()%6)*20+(OldMetamoId%20); + while(NewMetamoId==OldMetamoId); + CHAR_talkToCli( charaindex, -1, "随机更改造型成功", CHAR_COLORYELLOW); + } + if( strstr( itemarg, "豆丁囡" ) && OldMetamoId >= 100120 ){ + CHAR_talkToCli( charaindex, -1, "更改造型为豆丁囡", CHAR_COLORYELLOW); + NewMetamoId=(OldMetamoId/1000)*1000+120+(OldMetamoId%20); + }else if( strstr( itemarg, "熊皮妹" ) && OldMetamoId >= 100120 ){ + CHAR_talkToCli( charaindex, -1, "更改造型为熊皮妹", CHAR_COLORYELLOW); + NewMetamoId=(OldMetamoId/1000)*1000+140+(OldMetamoId%20); + }else if( strstr( itemarg, "帽子妹" ) && OldMetamoId >= 100120 ){ + CHAR_talkToCli( charaindex, -1, "更改造型为帽子妹", CHAR_COLORYELLOW); + NewMetamoId=(OldMetamoId/1000)*1000+160+(OldMetamoId%20); + }else if( strstr( itemarg, "短发夹妹" ) && OldMetamoId >= 100120 ){ + CHAR_talkToCli( charaindex, -1, "更改造型为短发夹妹", CHAR_COLORYELLOW); + NewMetamoId=(OldMetamoId/1000)*1000+180+(OldMetamoId%20); + }else if( strstr( itemarg, "手套女" ) && OldMetamoId >= 100120 ){ + CHAR_talkToCli( charaindex, -1, "更改造型为手套女", CHAR_COLORYELLOW); + NewMetamoId=(OldMetamoId/1000)*1000+200+(OldMetamoId%20); + }else if( strstr( itemarg, "辣妹" ) && OldMetamoId >= 100120 ){ + CHAR_talkToCli( charaindex, -1, "更改造型为辣妹", CHAR_COLORYELLOW); + NewMetamoId=(OldMetamoId/1000)*1000+220+(OldMetamoId%20); + }else if( strstr( itemarg, "随机" ) && OldMetamoId >= 100120 ){ + srand(time(0)); + do + NewMetamoId=(OldMetamoId/1000)*1000+(rand()%6)*20+120+(OldMetamoId%20); + while(NewMetamoId==OldMetamoId); + CHAR_talkToCli( charaindex, -1, "随机更改造型成功", CHAR_COLORYELLOW); + } + }else{ + CHAR_talkToCli( charaindex, -1, "你并不是人物造型!", CHAR_COLORYELLOW); + return; + } + if(NewMetamoId==0){ + CHAR_talkToCli( charaindex, -1, "你的性别不同,无没更改此造型!", CHAR_COLORYELLOW); + return;} + CHAR_setInt( charaindex , CHAR_BASEIMAGENUMBER , NewMetamoId ); + CHAR_setInt( charaindex , CHAR_BASEBASEIMAGENUMBER , NewMetamoId ); + + CHAR_complianceParameter( charaindex ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( charaindex , CHAR_WORKOBJINDEX )); + CHAR_send_P_StatusString( charaindex , CHAR_P_STRING_BASEBASEIMAGENUMBER); + CHAR_DelItem( charaindex, haveitemindex); +} + +void ITEM_SexMetamo( int charaindex, int toindex, int haveitemindex) +{ + int OldMetamoId, NewMetamoId; + OldMetamoId=CHAR_getInt( charaindex, CHAR_BASEBASEIMAGENUMBER); + if(OldMetamoId>=100000 && OldMetamoId <100020){ //豆丁囝 + NewMetamoId=OldMetamoId+120; + CHAR_talkToCli( charaindex, -1, "恭喜你变性成豆丁囡!", CHAR_COLORYELLOW); + }else if(OldMetamoId>=100020 && OldMetamoId <100040){ //赛亚人 + NewMetamoId=OldMetamoId+160; + CHAR_talkToCli( charaindex, -1, "恭喜你变性成短发夹妹!", CHAR_COLORYELLOW); + }else if(OldMetamoId>=100040 && OldMetamoId <100060){ //辫子男孩 + NewMetamoId=OldMetamoId+120; + CHAR_talkToCli( charaindex, -1, "恭喜你变性成帽子妹!", CHAR_COLORYELLOW); + }else if(OldMetamoId>=100060 && OldMetamoId <100080){ //酷哥 + NewMetamoId=OldMetamoId+160; + CHAR_talkToCli( charaindex, -1, "恭喜你变性成辣妹!", CHAR_COLORYELLOW); + }else if(OldMetamoId>=100080 && OldMetamoId <100100){ //熊皮男 + NewMetamoId=OldMetamoId+60; + CHAR_talkToCli( charaindex, -1, "恭喜你变性成熊皮妹!", CHAR_COLORYELLOW); + }else if(OldMetamoId>=100100 && OldMetamoId <100120){ //大只佬 + NewMetamoId=OldMetamoId+100; + CHAR_talkToCli( charaindex, -1, "恭喜你变性成手套女!", CHAR_COLORYELLOW); + }else if(OldMetamoId>=100120 && OldMetamoId <100140){ //豆丁囡 + NewMetamoId=OldMetamoId-120; + CHAR_talkToCli( charaindex, -1, "恭喜你变性成豆丁囝!", CHAR_COLORYELLOW); + }else if(OldMetamoId>=100140 && OldMetamoId <100160){ //熊皮妹 + NewMetamoId=OldMetamoId-60; + CHAR_talkToCli( charaindex, -1, "恭喜你变性成熊皮男!", CHAR_COLORYELLOW); + }else if(OldMetamoId>=100160 && OldMetamoId <100180){ //帽子妹 + NewMetamoId=OldMetamoId-120; + CHAR_talkToCli( charaindex, -1, "恭喜你变性成辫子男孩!", CHAR_COLORYELLOW); + }else if(OldMetamoId>=100180 && OldMetamoId <100200){ //短发夹妹 + NewMetamoId=OldMetamoId-160; + CHAR_talkToCli( charaindex, -1, "恭喜你变性成赛亚人!", CHAR_COLORYELLOW); + }else if(OldMetamoId>=100200 && OldMetamoId <100220){ //手套女 + NewMetamoId=OldMetamoId-100; + CHAR_talkToCli( charaindex, -1, "恭喜你变性成大只佬!", CHAR_COLORYELLOW); + }else if(OldMetamoId>=100220 && OldMetamoId <100240){ //辣妹 + NewMetamoId=OldMetamoId-160; + CHAR_talkToCli( charaindex, -1, "恭喜你变性成酷哥!", CHAR_COLORYELLOW); + }else{ + CHAR_talkToCli( charaindex, -1, "你并不是人物造型,无法变性!", CHAR_COLORYELLOW); + return;} + if(NewMetamoId==0)return; + CHAR_setInt( charaindex , CHAR_BASEIMAGENUMBER , NewMetamoId ); + CHAR_setInt( charaindex , CHAR_BASEBASEIMAGENUMBER , NewMetamoId ); + + CHAR_complianceParameter( charaindex ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( charaindex , CHAR_WORKOBJINDEX )); + CHAR_send_P_StatusString( charaindex , CHAR_P_STRING_BASEBASEIMAGENUMBER); + CHAR_DelItem( charaindex, haveitemindex); +} +#endif \ No newline at end of file diff --git a/gmsv/item/item_gen.c b/gmsv/item/item_gen.c new file mode 100644 index 0000000..75280f8 --- /dev/null +++ b/gmsv/item/item_gen.c @@ -0,0 +1,1889 @@ +/*********************************************** + * 失奶 丞宁岳″ + **********************************************/ +#include "version.h" +#include +#include +#include +#include +#include +#include +#include + +#include "configfile.h" +#include "util.h" +#include "buf.h" + +#include "char.h" +#include "item.h" +#include "item_gen.h" +#include "enemy.h" +#include "log.h" +#include "saacproto_cli.h" +#include "family.h" +#include "magic_base.h" + +#define DEBUGPRINT 0 +#define DEBUGPRINT_DETAIL 0 + +// shan begin +#define FOOD_HP_RATE 200 +#define FOOD_MP_RATE 200 +#define FOOD_SUCCESS_RATE 150 +#define FOOD_TURN_ADDPOINT 1 +// shan end + +static int ITEM_getTableNum( int num); + +/* 豳笺及袄及MAX袄 */ +#define ITEM_ATOMIND_MAX 1000 +// shan add +#define ITEM_ATOMIND_FM_MAX 4000 + +#define ITEM_RANDRANGEDOM 1000 +#ifdef _MERGE_NEW_8 // 1st +#define ITEM_RANDRANGEDOM_BASE 600 +#else +#define ITEM_RANDRANGEDOM_BASE 0 +#endif +// shan add +#define ITEM_FM_RANDRANGEDOM 4000 + +/*********************************************** + * (ITEM_GEN_RAND_MIN/1000) * ITEN_GEN_SEARCH_MIN + * - (ITEM_GEN_RAND_MAX/1000) * ITEN_GEN_SEARCH_MAX + * 仇木分仃及汔及豳笺及 区毛潸曰丹月仪卞卅月[ + **********************************************/ + +/* 豳笺及袄 及仿件母丞汔及 剂午 ㄠㄟㄟㄟ坌 */ +#define ITEM_GEN_RAND_MIN 700 +#define ITEM_GEN_RAND_MAX 1200 + +/* 失奶 丞毛腹绸允月豳笺及袄及汔及 剂午 及 (double) */ +#define ITEN_GEN_SEARCH_MIN (0.7) +#define ITEN_GEN_SEARCH_MAX (1.10) + +static struct tagItemSearchRangeTable { + double searchmin; + double searchmax; +}ItemSearchTable[2] = { +// { 0.7, 1.1}, +// shan add +// { 0.7, 1.3}, +// { 0.5, 1.5} + { 0.8, 1.2}, + { 0.7, 1.3} +}; + +static struct tagItemRandRangeTable { + int randmin; + int randmax; +}ItemRandTable[2] = { +// { 700, 1200}, + { 700, 1300}, + { 900, 1100} +}; + +#define ITEM_GEN_RATE 0.7 + +static struct _tagItemRandRangeTableForItem { + int num; /* 豳笺及备仿件弁及湘 袄 */ + int minnum; /* 仿件弁 潸曰丹月袄及Min */ + int maxnum; /* 仿件弁 潸曰丹月袄及MAX num +戚及仿件弁及犒*ITEM_GEN_RATE) */ + double rate; /* maxnum / num*/ +}ItemRandTableForItem[] = { + { 10, 0,0,0 }, + { 30, 0,0,0 }, + { 65, 0,0,0 }, + { 125, 0,0,0 }, + { 205, 0,0,0 }, + { 305, 0,0,0 }, + { 425, 0,0,0 }, + { 565, 0,0,0 }, + { 725, 0,0,0 }, + { 905, 0,0,0 }, + { 1125, 0,0,0 }, // shan add + { 1354, 0,0,0 }, + { 1594, 0,0,0 }, + { 1825, 0,0,0 }, + { 2105, 0,0,0 }, + { 2405, 0,0,0 }, + { 2725, 0,0,0 }, + { 3065, 0,0,0 }, + { 3425, 0,0,0 }, + { 3805, 0,0,0 } +}; + +#define ATOM_LEVEL_MAX 16 +struct item_atom +{ + char name[32]; + unsigned int name_hash; + int magicflg; +}; + + +struct item_atom *item_atoms; +int item_atoms_size; +#define MAX_ITEM_ATOMS_SIZE 256 + +struct item_ingindtable { + double data[MAX_ITEM_ATOMS_SIZE]; + int index; + int num; +}; + +static int ITEM_getAtomIndexByName( char *nm ) // 从素材名称取得素材index +{ + int i; + unsigned int h = hashpjw( nm ); + for( i = 0; i < item_atoms_size; i ++ ){ + if( item_atoms[i].name_hash == h && + strcmp( item_atoms[i].name, nm) == 0 ){ + return i; + } + } + return -1; +} + +#ifdef _ITEMTBL_STAIC +extern ITEM_table ITEM_tbl[28000]; +#else +extern ITEM_table *ITEM_tbl; +#endif + +struct ingcache +{ + int use; +#define MAXING_ONE 5 + int inguse; + int canmergefrom; + int canmergeto; + int hitnum; + int ingind[MAXING_ONE]; + int ingval[MAXING_ONE]; +}; + +int ITEM_initRandTable( void) +{ + int i; + for( i = 0; i < arraysizeof( ItemRandTableForItem); i ++) { + if( i == 0 ) ItemRandTableForItem[i].minnum = 0; + else { + ItemRandTableForItem[i].minnum = ItemRandTableForItem[i-1].maxnum+1; + } + if( i + 1 != arraysizeof( ItemRandTableForItem)) { + ItemRandTableForItem[i].maxnum = + ItemRandTableForItem[i].num + + (ItemRandTableForItem[i+1].num - ItemRandTableForItem[i].num) + *ITEM_GEN_RATE; + + } + else { + // shan add + ItemRandTableForItem[i].maxnum = 4000; + //ItemRandTableForItem[i].maxnum = 1000; + } + ItemRandTableForItem[i].rate = ItemRandTableForItem[i].maxnum + / (double)ItemRandTableForItem[i].num; + } + /*for( i = 0; i < arraysizeof( ItemRandTableForItem); i ++) { + print( "\ntable num:[%d] min:[%d] max:[%d] rate:[%3.3f] ", + ItemRandTableForItem[i].num, + ItemRandTableForItem[i].minnum, + ItemRandTableForItem[i].maxnum, + ItemRandTableForItem[i].rate); + }*/ + return TRUE; +} + +static struct ingcache *icache; +int icache_num; + +#ifdef _IMPOROVE_ITEMTABLE +int ADD_ICACHE_INGRED( int ItemID) +{ + char *itemarg; + int i, nk=0; + + for( i=0; i<5; i++){ + itemarg = ITEMTBL_getChar( ItemID, ITEM_INGNAME0+i);//成分名 + if( itemarg == NULL ) continue; + if( itemarg[0] ){ + icache[ItemID].ingind[nk] = ITEM_getAtomIndexByName( itemarg); + if( icache[ItemID].ingind[nk] < 0 ){ + + print( "fuck ing[%s][%d] for %d %s\n", + itemarg, + ITEMTBL_getInt( ItemID, ITEM_INGVALUE0+i), + ITEMTBL_getInt( ItemID, ITEM_ID), + ITEMTBL_getChar( ItemID, ITEM_NAME) ); + + }else { + icache[ItemID].ingval[nk] = ITEMTBL_getInt( ItemID, ITEM_INGVALUE0+i); + nk++; + } + } + } + return nk; +} + +int ITEM_initItemIngCache( void ) +{ + int i; + print ( "初始化物品缓冲: 最大ID数:%d\n", ITEM_getItemMaxIdNum( ) ); + icache_num = ITEM_getMaxitemtblsFromTransList( ); + + icache = allocateMemory( sizeof( struct ingcache ) * icache_num ); + if( icache == NULL ){ + print( "初始化物品缓冲: 没有物品\n" ); + return FALSE; + } + print( "初始化物品缓冲: 读取物品数=%d\n", icache_num); + remove( "icache.txt"); + + memset( icache, 0, icache_num * sizeof( struct ingcache) ); + for( i=0; i= MAX_ITEM_ATOMS_SIZE ){ + print( "初始化物品成份: 物品成份太多了\n" ); + return FALSE; + } + + item_atoms_size = count; + print( "初始化物品成份: 读取 %d 物品成份...", count ); + + return TRUE; +} + +/* + + 刭醒及伊□玄 + + base 互 100 匹 min 互 0.7 匹 max 互 1.3 分匀凶日} + 70 ~ 130 卞剽域卞坌 允月[午曰丐尹内剽域[ + 剽域元扎卅仁仄凶曰允月井手仄木卅中及匹} + 失奶 丞毁迕伙□民件午仄化仇仇卞烂聒允月 by ringo 1999Oct1 + 1000坌及min_rate,max_rate匹健丹[ + double 支float 反]支支仇仄中及匹银歹卅中[ + */ +static int +ITEM_randRange( int base, int min_rate , int max_rate ) +{ + int minnum; + int maxnum; + int range; + +#ifdef _MERGE_LOG + print("\n物品队列(基本:%d, 最小价格%d, 最大价格:%d) ", base, min_rate, max_rate); +#endif + + if( min_rate > max_rate) { + int tmp; + tmp = min_rate; + min_rate = max_rate; + max_rate = tmp; + } + minnum = rint((double)base / ITEM_RANDRANGEDOM * min_rate); + maxnum = rint((double)base / ITEM_RANDRANGEDOM * max_rate); + range = ( maxnum - minnum ); + + if( min_rate == max_rate && min_rate == 0 ) return 0; + if( range == 0 ) return base; + if( range < 0 ) return 0; + +#ifdef _MERGE_LOG + print("\n最後下限:%d 最後上限:%d ", minnum, minnum+range); +#endif + + return minnum + RAND( 0, range); +} + +typedef int (*FUNC)( const void *, const void * ); + +static int cmprutine( double *p1, double *p2) +{ + if( *p1 < *p2 ) return -1; + if( *p1 > *p2 ) return 1; + return 0; +} +/* + * 嫖中及卞丐歹六月 + * 忒曰袄反 互中仁勾卞卅匀凶井[ + * 宁歹六月蟆卞]末□玄仄化岈屯化] + * table卞梯匀凶 坌]箫仄化中仁[ + */ + +static void ITEM_simplify_atoms( struct item_ingindtable *inds, int num, + int *retinds, int *retvals, int petindex, int alchemist) +{ + //int newinds[MAX_ITEM_ATOMS_SIZE]; + //int newvals[MAX_ITEM_ATOMS_SIZE]; + int i; + double oddstable[] = { + 0.1, + 0.25, + 0.35, + 0.4, + 0.42, + 0.44, + 0.46, + 0.47, + 0.48, + 0.49, + 0.5, + 0.51, + 0.52, + 0.53 + }; +#if 0 + double oddstable[] = { + 0.08, + 0.224, + 0.315, + 0.37, + 0.395, + 0.405, + 0.415, + 0.42, + 0.425, + 0.43, + 0.435, + 0.44, + 0.445, + 0.45 + }; + double oddstable[] = { + 0.05, + 0.175, + 0.247, + 0.305, + 0.342, + 0.361, + 0.37, + 0.375, + 0.379, + 0.382, + 0.387, + 0.39, + 0.393, + 0.396 + }; +#endif + for( i = 0; i < num; i ++ ) { + int datacnt = (inds + i)->num; + if( datacnt > 1 ) { + int j; + qsort( (inds + i)->data, datacnt, + sizeof( double ), (FUNC)cmprutine); + for( j = 1; j < datacnt; j ++ ) { + int tablenum; + double rate; + tablenum = ITEM_getTableNum( (inds + i)->data[j-1]); + rate = ItemRandTableForItem[tablenum].rate / ItemRandTableForItem[0].rate; + (inds + i)->data[j] += (inds + i)->data[j-1] * oddstable[j-1] * rate; + } + } + *(retinds + i) = ( inds + i)->index; + *(retvals + i) = (int)( inds + i)->data[ datacnt-1]; + // shan add begin + if( petindex != -1 ){ +#ifdef _MERGE_NEW_8 + /*if( alchemist ) { // 使用守护兽精 时无上限 // 改:皆有上限 + if (CHAR_getInt(petindex, CHAR_PETFAMILY) == 1){ + if( *( retvals + i) > ITEM_ATOMIND_FM_MAX ){ + *( retvals + i) = ITEM_ATOMIND_FM_MAX; + } + }else{ + if( *( retvals + i) > ITEM_ATOMIND_MAX ){ + *( retvals + i) = ITEM_ATOMIND_MAX; + } + } + } + else */ + { // 非精 时有上限 + if( *( retvals + i) > ITEM_ATOMIND_MAX ){ + *( retvals + i) = ITEM_ATOMIND_MAX; + } + } +#else + if (CHAR_getInt(petindex, CHAR_PETFAMILY) == 1){ + if( *( retvals + i) > ITEM_ATOMIND_FM_MAX ){ + *( retvals + i) = ITEM_ATOMIND_FM_MAX; + } + }else{ + if( *( retvals + i) > ITEM_ATOMIND_MAX ){ + *( retvals + i) = ITEM_ATOMIND_MAX; + } + } +#endif + } + // shan end + } +} + +/* +PET_ADD_INGRED( nm,vl1,vl2,vl3) +{ + if( strlen( ENEMYTEMP_getChar( petarray, nm)) != 0 ) + { + fixatom[ingnum] =ITEM_getAtomIndexByName( ENEMYTEMP_getChar( petarray, nm) ); + if( fixatom[ingnum] < 0 ) + { + print( "\nfucking atom:[%s] for pet id %d", ENEMYTEMP_getChar( petarray, nm), petid ); + continue; + } + + baseup[ingnum] = ENEMYTEMP_getInt( petarray, vl1); + minadd[ingnum] = ENEMYTEMP_getInt( petarray, vl2); + maxadd[ingnum] = ENEMYTEMP_getInt( petarray, vl3); + + if( petindex != -1) + { + if( CHAR_getInt(petindex, CHAR_PETFAMILY) == 1 ) + { + int ownerindex = CHAR_getWorkInt(petindex, CHAR_WORKPLAYERINDEX); + if (!CHAR_CHECKINDEX(ownerindex)) + { + print("ownerindex err!\n"); + return; + } + if( CHAR_getInt( ownerindex, CHAR_FMLEADERFLAG) != FMMEMBER_LEADER) + { + print("\n Pet Ownerindex Error"); + return; + } + baseup[ingnum] = PetLv[getFmLv(ownerindex)]; + } + } + + if( minadd[ingnum] > maxadd[ingnum] ) + { + int tmp = minadd[ingnum]; + minadd[ingnum] = maxadd[ingnum];maxadd[ingnum] = tmp; + } + + if( CHAR_getInt(petid, CHAR_PETFAMILY) == 1 ) + { + if( minadd[ingnum]<0 ) + minadd[ingnum] = ITEM_FM_RANDRANGEDOM; + if( maxadd[ingnum]<0 ) + maxadd[ingnum] = ITEM_FM_RANDRANGEDOM; + } + else + { + if( minadd[ingnum]<0 ) + minadd[ingnum] = ITEM_RANDRANGEDOM; + if( maxadd[ingnum]<0 ) + maxadd[ingnum] = ITEM_RANDRANGEDOM; + } + ingnum++; + } +} +*/ + + +#ifdef _MERGE_NEW_8 +int PET_ADD_INGRED( int nm, int vl1, int vl2, int vl3, + int petindex, int petarray, int petid, int ingnum, + int *baseup, int *minadd, int *maxadd, int *fixatom ) +{ + // 家族修正 守护兽时用 + int PetLv[] = { 0, 77, 108, 145, 188, 237, 292, 353, 420, 493, 572}; + // 家族(个人)修正 非守护兽时用 + //int PetLvPersonal[] = { 0, 77, 108, 145, 188, 237, 292, 353, 420, 493, 572}; + + if( strlen( ENEMYTEMP_getChar( petarray, nm)) != 0 ) { + fixatom[ingnum] =ITEM_getAtomIndexByName( ENEMYTEMP_getChar( petarray, nm) ); + if( fixatom[ingnum] < 0 ) { + print( "\nfucking atom:[%s] for pet id %d", ENEMYTEMP_getChar( petarray, nm), petid ); + return 1; //continue; + } + baseup[ingnum] = ENEMYTEMP_getInt( petarray, vl1); + minadd[ingnum] = ITEM_RANDRANGEDOM_BASE + ENEMYTEMP_getInt( petarray, vl2); + maxadd[ingnum] = ITEM_RANDRANGEDOM_BASE + ENEMYTEMP_getInt( petarray, vl3); + + if( petindex != -1) { + int ownerindex = CHAR_getWorkInt(petindex, CHAR_WORKPLAYERINDEX); + + if (!CHAR_CHECKINDEX(ownerindex)) { + print("宠物主人错误\n"); + return 2; // just return; + } + + if( CHAR_getInt(petindex, CHAR_PETFAMILY) == 1 ) { + if( CHAR_getInt( ownerindex, CHAR_FMLEADERFLAG) != FMMEMBER_LEADER) { + print("宠物主人错误\n"); + CHAR_talkToCli( ownerindex, -1, "非族长不能用守护兽加工唷!", CHAR_COLORYELLOW); + return 2; // just return; + } + baseup[ingnum] = PetLv[getFmLv(ownerindex)]; + } + else { // 8.0新增 + baseup[ingnum] = PetLv[getFameLv(ownerindex)]; + } + } + + if( minadd[ingnum] > maxadd[ingnum] ) { + int tmp = minadd[ingnum]; + minadd[ingnum] = maxadd[ingnum]; + maxadd[ingnum] = tmp; + } + + if( CHAR_getInt(petid, CHAR_PETFAMILY) == 1 ) { + if( minadd[ingnum]<0 ) + minadd[ingnum] = ITEM_FM_RANDRANGEDOM; + if( maxadd[ingnum]<0 ) + maxadd[ingnum] = ITEM_FM_RANDRANGEDOM; + } + else { + if( minadd[ingnum]<0 ) + minadd[ingnum] = ITEM_RANDRANGEDOM; + if( maxadd[ingnum]<0 ) + maxadd[ingnum] = ITEM_RANDRANGEDOM; + } + ingnum++; + } +} +#endif + +/* + 矢永玄及ID井日}刭醒及膜恳涩烂毛潸曰分允[ + + int *fixuse : 袄瑛绊娄醒[ 及 醒毛午曰}烂聒醒毛中木化井尹允 + + int *fixatom : 升及豳笺卞覆允月膜恳卅及井 + int *baseup : 湘 袄卞凶中允月笛遥 + int *minadd : 井仃遥及 凝卞凶中允月笛遥 + int *maxadd : 井仃遥及 卞凶中允月笛遥 + + */ + +static void +ITEM_merge_getPetFix( int petid, int *fixuse, int *fixatom, + int *baseup, + int *minadd, + int *maxadd, + int petindex, + int *fm_fix) +{ + int i; + int ingnum = 0; + int petarray; + +// shan begin +#define FamilyLv 11 + //int PetLv[FamilyLv]; + //for(i=0; i maxadd[ingnum] ) { int tmp = minadd[ingnum];minadd[ingnum] = maxadd[ingnum];maxadd[ingnum] = tmp;}if( CHAR_getInt(petid, CHAR_PETFAMILY) == 1 ){if( minadd[ingnum]<0 ) minadd[ingnum] = ITEM_FM_RANDRANGEDOM;if( maxadd[ingnum]<0 ) maxadd[ingnum] = ITEM_FM_RANDRANGEDOM;}else{if( minadd[ingnum]<0 ) minadd[ingnum] = ITEM_RANDRANGEDOM;if( maxadd[ingnum]<0 ) maxadd[ingnum] = ITEM_RANDRANGEDOM;}ingnum++;} +#define PET_ADD_INGRED( nm,vl1,vl2,vl3) if( strlen( ENEMYTEMP_getChar( petarray, nm)) != 0 ) { fixatom[ingnum] =ITEM_getAtomIndexByName( ENEMYTEMP_getChar( petarray, nm) ); if( fixatom[ingnum] < 0 ){ print( "\nfucking atom:[%s] for pet id %d", ENEMYTEMP_getChar( petarray, nm), petid ); continue;} baseup[ingnum] = ENEMYTEMP_getInt( petarray, vl1); minadd[ingnum] = ITEM_RANDRANGEDOM_BASE + ENEMYTEMP_getInt( petarray, vl2); maxadd[ingnum] = ITEM_RANDRANGEDOM_BASE + ENEMYTEMP_getInt( petarray, vl3); if( petindex != -1){ if( CHAR_getInt(petindex, CHAR_PETFAMILY) == 1 ){ int ownerindex = CHAR_getWorkInt(petindex, CHAR_WORKPLAYERINDEX); if (!CHAR_CHECKINDEX(ownerindex)){print("ownerindex err!\n");return;}if( CHAR_getInt( ownerindex, CHAR_FMLEADERFLAG) != FMMEMBER_LEADER){print("\n Pet Ownerindex Error");return;}baseup[ingnum] = PetLv[getFmLv(ownerindex)];}}if( minadd[ingnum] > maxadd[ingnum] ) { int tmp = minadd[ingnum];minadd[ingnum] = maxadd[ingnum];maxadd[ingnum] = tmp;}if( CHAR_getInt(petid, CHAR_PETFAMILY) == 1 ){if( minadd[ingnum]<0 ) minadd[ingnum] = ITEM_FM_RANDRANGEDOM;if( maxadd[ingnum]<0 ) maxadd[ingnum] = ITEM_FM_RANDRANGEDOM;}else{if( minadd[ingnum]<0 ) minadd[ingnum] = ITEM_RANDRANGEDOM;if( maxadd[ingnum]<0 ) maxadd[ingnum] = ITEM_RANDRANGEDOM;}ingnum++;} +#else +#define PET_ADD_INGRED( nm,vl1,vl2,vl3) if( strlen( ENEMYTEMP_getChar( petarray, nm)) != 0 ) { fixatom[ingnum] =ITEM_getAtomIndexByName( ENEMYTEMP_getChar( petarray, nm) ); if( fixatom[ingnum] < 0 ){ print( "\nfucking atom:[%s] for pet id %d", ENEMYTEMP_getChar( petarray, nm), petid ); continue;} baseup[ingnum] = ENEMYTEMP_getInt( petarray, vl1); minadd[ingnum] = ENEMYTEMP_getInt( petarray, vl2); maxadd[ingnum] = ENEMYTEMP_getInt( petarray, vl3); if( petindex != -1){ if( CHAR_getInt(petindex, CHAR_PETFAMILY) == 1 ){ int ownerindex = CHAR_getWorkInt(petindex, CHAR_WORKPLAYERINDEX); if (!CHAR_CHECKINDEX(ownerindex)){print("ownerindex err!\n");return;}if( CHAR_getInt( ownerindex, CHAR_FMLEADERFLAG) != 1){print("\n Pet Ownerindex Error");return;}baseup[ingnum] = PetLv[getFmLv(ownerindex)];}}if( minadd[ingnum] > maxadd[ingnum] ) {int tmp = minadd[ingnum];minadd[ingnum] = maxadd[ingnum];maxadd[ingnum] = tmp;}if( CHAR_getInt(petid, CHAR_PETFAMILY) == 1 ){if( minadd[ingnum]<0 ) minadd[ingnum] = ITEM_FM_RANDRANGEDOM;if( maxadd[ingnum]<0 ) maxadd[ingnum] = ITEM_FM_RANDRANGEDOM;}else{if( minadd[ingnum]<0 ) minadd[ingnum] = ITEM_RANDRANGEDOM;if( maxadd[ingnum]<0 ) maxadd[ingnum] = ITEM_RANDRANGEDOM;}ingnum++;} +#endif + +#ifdef _MERGE_NEW_8 +#undef PET_ADD_INGRED + ret = PET_ADD_INGRED( E_T_ATOMFIXNAME1, E_T_ATOMBASEADD1, E_T_ATOMFIXMIN1, E_T_ATOMFIXMAX1, petindex, petarray, petid, ingnum, baseup, minadd, maxadd, fixatom ); + if( ret == 1 ) continue; else if( ret == 2 ) return; + ret = PET_ADD_INGRED( E_T_ATOMFIXNAME2, E_T_ATOMBASEADD2, E_T_ATOMFIXMIN2, E_T_ATOMFIXMAX2, petindex, petarray, petid, ingnum, baseup, minadd, maxadd, fixatom ); + if( ret == 1 ) continue; else if( ret == 2 ) return; + ret = PET_ADD_INGRED( E_T_ATOMFIXNAME3, E_T_ATOMBASEADD3, E_T_ATOMFIXMIN3, E_T_ATOMFIXMAX3, petindex, petarray, petid, ingnum, baseup, minadd, maxadd, fixatom ); + if( ret == 1 ) continue; else if( ret == 2 ) return; + ret = PET_ADD_INGRED( E_T_ATOMFIXNAME4, E_T_ATOMBASEADD4, E_T_ATOMFIXMIN4, E_T_ATOMFIXMAX4, petindex, petarray, petid, ingnum, baseup, minadd, maxadd, fixatom ); + if( ret == 1 ) continue; else if( ret == 2 ) return; + ret = PET_ADD_INGRED( E_T_ATOMFIXNAME5, E_T_ATOMBASEADD5, E_T_ATOMFIXMIN5, E_T_ATOMFIXMAX5, petindex, petarray, petid, ingnum, baseup, minadd, maxadd, fixatom ); + if( ret == 1 ) continue; else if( ret == 2 ) return; +#else + PET_ADD_INGRED( E_T_ATOMFIXNAME1, E_T_ATOMBASEADD1, E_T_ATOMFIXMIN1, E_T_ATOMFIXMAX1); + PET_ADD_INGRED( E_T_ATOMFIXNAME2, E_T_ATOMBASEADD2, E_T_ATOMFIXMIN2, E_T_ATOMFIXMAX2); + PET_ADD_INGRED( E_T_ATOMFIXNAME3, E_T_ATOMBASEADD3, E_T_ATOMFIXMIN3, E_T_ATOMFIXMAX3); + PET_ADD_INGRED( E_T_ATOMFIXNAME4, E_T_ATOMBASEADD4, E_T_ATOMFIXMIN4, E_T_ATOMFIXMAX4); + PET_ADD_INGRED( E_T_ATOMFIXNAME5, E_T_ATOMBASEADD5, E_T_ATOMFIXMIN5, E_T_ATOMFIXMAX5); +#endif + +#ifdef _MERGE_LOG + print("\n %d.[ me:%s, min%d, b:%d, max:%d]", i, ENEMYTEMP_getChar( petarray, E_T_ATOMFIXNAME1+i), + minadd[i], baseup[i], maxadd[i]); +#endif + } + + if( CHAR_getInt(petindex, CHAR_PETFAMILY) == 1 ) { + int ownerindex = CHAR_getWorkInt(petindex, CHAR_WORKPLAYERINDEX); + if( CHAR_CHECKINDEX(ownerindex) ) { + *fm_fix = PetLv[getFmLv(ownerindex)]; + } + } + + *fixuse = ingnum; + return; +} + +/* + * 公及 互]宁岳葭失奶 丞卞丐匀凶日FALSE毛忒允 + */ + +static BOOL ITEM_merge_checkitem( ITEM_Item *items, int itemsnum, int id) +{ + int loop; + for( loop = 0; loop < itemsnum; loop ++ ) { + if( items[loop].data[ITEM_ID] == id ) break; + } + if( loop == itemsnum ) return TRUE; + return FALSE; +} + +static int ITEM_merge_with_retry( ITEM_Item *items,int itemsnum, + int *ingindtable, int ingnum, + int *ingtable, int searchtable, int petindex ) +{ + + int ideal; + int idel_num[5][5] = { { 0}, + { 250,0 }, + { 400,150,0}, + { 700,260,70,0}, + { 740,500,200,40,0} + }; + int endflg[5]; + BOOL first = TRUE; + int extractcnt = 0; +#define MAXMATCH 2048 + int matchid[MAXMATCH]; + int i,j,k; + + + if( ingnum > 5 ) ideal = 5; + else ideal = ingnum; + memset( endflg, 0, sizeof( endflg)); + while( 1 ) { + int r = RAND( 0, 999); + int extractnum; + int match = 0; + if( extractcnt >= ideal ) break; + // 计算合成道具的必须材料数 + for( extractnum = 0; extractnum < ideal; extractnum ++ ) { + if( r >= idel_num[ideal-1][extractnum] ) { + break; + } + } + if( endflg[extractnum] == TRUE ) continue; + endflg[extractnum] = TRUE; + extractcnt++; + extractnum = ideal - ( extractnum ); + + if( first ) { + for( i = 0; i < icache_num; i++ ){ // 搜寻全部ITEM + if( icache[i].use && icache[i].canmergeto) { // 如果是可合成的ITEM + icache[i].hitnum = 0; + for( j = 0; j < icache[i].inguse; j ++ ) { // 这个ITEM的材料数 + for( k = 0; k < ingnum ; k ++){ // 合成的材料数 + if( icache[i].ingind[j] == ingindtable[k] ) { // 材料符合 + if( searchtable == 0 ) { // 道具合成的话 + int tablenum = ITEM_getTableNum( ingtable[k]); // 材料等级 + // shan begin + if( petindex != -1){ + if( CHAR_getInt(petindex, CHAR_PETFAMILY) == 1 ){ // 如果是守护兽的话 + int ownerindex = CHAR_getWorkInt(petindex, CHAR_WORKPLAYERINDEX); + int familyLevel = getFmLv(ownerindex); + if (!CHAR_CHECKINDEX(ownerindex)){ + print("主人索引错误!\n"); + return -1; + } +#ifdef _FMVER21 + if( CHAR_getInt( ownerindex, CHAR_FMLEADERFLAG) != FMMEMBER_LEADER){ +#else + if( CHAR_getInt( ownerindex, CHAR_FMLEADERFLAG) != 1){ +#endif + print("\n 宠物主人索引错误"); + return -1; + } + // 需符合上下限 + if( icache[i].ingval[j] <= ingtable[k]*ItemRandTableForItem[tablenum].rate && + icache[i].ingval[j] >= ingtable[k]*(1/ItemRandTableForItem[tablenum].rate) && + icache[i].ingval[j] <= ItemRandTableForItem[familyLevel+9].maxnum) { + icache[i].hitnum++; + break; + } + }else{ // 非守护兽的话 + float toplimit = ingtable[k]*ItemRandTableForItem[tablenum].rate; + if( toplimit > 1000) toplimit = 1000; + // 需符合上下限 + if( icache[i].ingval[j] <= toplimit && + icache[i].ingval[j] >= ingtable[k]*(1/ItemRandTableForItem[tablenum].rate)){ + icache[i].hitnum++; + break; + } + } + } + // shan end + }else { // 食物合成的话 + // shan begin + if( CHAR_getInt(petindex, CHAR_PETFAMILY) == 1 ){ + int ownerindex = CHAR_getWorkInt(petindex, CHAR_WORKPLAYERINDEX); + int familyLevel = getFmLv(ownerindex); + if (!CHAR_CHECKINDEX(ownerindex)){ + print("主人索引错误!\n"); + return -1; + } +#ifdef _FMVER21 + if( CHAR_getInt( ownerindex, CHAR_FMLEADERFLAG) != FMMEMBER_LEADER){ +#else + if( CHAR_getInt( ownerindex, CHAR_FMLEADERFLAG) != 1){ +#endif + print("\n 宠物主人索引错误"); + return -1; + } + if( ingtable[k] > ItemRandTableForItem[familyLevel+9].maxnum / + ItemSearchTable[searchtable].searchmax ){ + ingtable[k] = ItemRandTableForItem[familyLevel+9].maxnum / + ItemSearchTable[searchtable].searchmax; + } + }else{ + if( ingtable[k] > ItemRandTableForItem[9].maxnum / + ItemSearchTable[searchtable].searchmax ){ + ingtable[k] = ItemRandTableForItem[9].maxnum / + ItemSearchTable[searchtable].searchmax; + } + } + // shan end + + if( icache[i].ingval[j] <= ingtable[k]*ItemSearchTable[searchtable].searchmax && + icache[i].ingval[j] >= ingtable[k]*ItemSearchTable[searchtable].searchmin){ + icache[i].hitnum++; + break; + } + } + } + } + } + // 符合的材料数必须相同 + if( icache[i].hitnum == icache[i].inguse && icache[i].hitnum == extractnum ){ + if( ITEM_merge_checkitem(items,itemsnum,i)) { + matchid[match++] = i; + } + } + } + } + first = FALSE; + }else { + for( i = 0; i < icache_num; i++ ){ + if( icache[i].use && icache[i].canmergeto) { + if( icache[i].hitnum == icache[i].inguse && icache[i].hitnum == extractnum ){ + if( ITEM_merge_checkitem(items,itemsnum,i)) { + matchid[match++] = i; + } + } + } + } + } +#ifdef _MERGE_LOG + print("\n 必须符合的材料数(乱数):%d \n", extractnum); + + { + int j; + + for( j =0; j 0 ) { + int i; + + print("\n matchid[%d]={",match); + for( i=0; i 0 ) { + return matchid[ random() % match ]; + }else { + + } + } + return -1; + +} + +#ifdef _NEW_MANOR_LAW +extern struct FM_POINTLIST fmpointlist; +#endif + +int ITEM_mergeItem( int charaindex, ITEM_Item *items, int num , int money, int petid, int searchtable, int petindex, int alchemist) +{ + int i; + + // shan add + int item_type = -1; + int ingnum =0; + struct item_ingindtable ingindtable[MAX_ITEM_ATOMS_SIZE]; + int sortedingindtable[MAX_ITEM_ATOMS_SIZE]; + int sortedingtable[MAX_ITEM_ATOMS_SIZE]; + /* 矢永玄卞方月膜恳迕 */ + int pet_fixatom[MAX_ITEM_ATOMS_SIZE]; + int pet_baseup[MAX_ITEM_ATOMS_SIZE]; + int pet_minadd[MAX_ITEM_ATOMS_SIZE]; + int pet_maxadd[MAX_ITEM_ATOMS_SIZE]; + int pet_fixuse = MAX_ITEM_ATOMS_SIZE; + int fm_fix; + + int nowtime; + + nowtime = time( NULL); + // 如果合成封包过於频繁... + if( nowtime - CHAR_getWorkInt( charaindex, CHAR_WORKLASTMERGETIME) < 5+(num-2) ) { + CHAR_setWorkInt( charaindex, CHAR_WORKLASTMERGETIME, nowtime); + //CHAR_talkToCli( charaindex, -1 ,"合成料理过於频繁,休息一下比较好哟。", CHAR_COLORRED); + print(" 合成频繁 "); + return items[RAND( 0, (num-1))].data[ITEM_ID]; + } + CHAR_setWorkInt( charaindex, CHAR_WORKLASTMERGETIME, nowtime); + + for( i = 0; i < arraysizeof( ingindtable); i ++ ) { + int j; + for( j = 0; j < MAX_ITEM_ATOMS_SIZE; j ++ ) { + ingindtable[i].data[j] = 0.0; + } + ingindtable[i].num = 0; + ingindtable[i].index = -1; + } + for(i=0; i ItemRandTableForItem[familyLevel+9].maxnum ){ + sortedingtable[i] = RAND(ItemRandTableForItem[familyLevel+9].minnum, + ItemRandTableForItem[familyLevel+9].maxnum); + } + }else{ + sortedingtable[i] = ITEM_randRange( sortedingtable[i], + ItemRandTable[searchtable].randmin , + ItemRandTable[searchtable].randmax); + } + } + else{ + if( searchtable == 0 ) { + sortedingtable[i] = ITEM_randRange( sortedingtable[i], + ((1/ItemRandTableForItem[tablenum].rate)*ITEM_MERGE_RANGEWIDTH_FORMIN) + * ITEM_RANDRANGEDOM, + ItemRandTableForItem[tablenum].rate * ITEM_MERGE_RANGEWIDTH_FORMAX + * ITEM_RANDRANGEDOM); + if(sortedingtable[i] > 905) sortedingtable[i] = 905; + } + else { + sortedingtable[i] = ITEM_randRange( sortedingtable[i], + ItemRandTable[searchtable].randmin , + ItemRandTable[searchtable].randmax); + } + } + } + // shan end + } + } +#ifdef _MERGE_LOG + { + int k; + //char mergech[][256] = {"石","木","骨","牙","皮","线","贝壳","壳","材9","材10","材11","材12","材13","材14","材15","材16"}; + for( k=0;k<5;k++) { + print("\n merger(宠物能力配上)(材料): %d.[ %s, %d]", + k, /*mergech[ sortedingindtable[k]]*/item_atoms[ sortedingindtable[k]].name, sortedingtable[k]); + } + } +#endif + + if( ingnum == 0 ) + return -1; + { + int created; + for( i = 0 ; i < 5; i++ ) { + created = ITEM_merge_with_retry( items, num, sortedingindtable,ingnum, + sortedingtable, searchtable, petindex); + if( created >= 0 ) { + // shan begin + if( petindex != -1){ +#ifdef _FMVER21 +#else + if( CHAR_getInt( CHAR_getWorkInt(petindex, CHAR_WORKPLAYERINDEX), CHAR_FMLEADERFLAG ) > 0 ){ +#endif + int kind_num = 0; + int syndp = 0; + int fooddp = 0; + char buf[64]; + int ownerindex = CHAR_getWorkInt(petindex, CHAR_WORKPLAYERINDEX); + if (!CHAR_CHECKINDEX(ownerindex)){ + print("ownerindex err!\n"); + return -1; + } + if( searchtable == 1 ){ + + if( ITEMTBL_getInt( created, ITEM_INGVALUE0) != 0 ) kind_num++; + if( ITEMTBL_getInt( created, ITEM_INGVALUE1) != 0 ) kind_num++; + if( ITEMTBL_getInt( created, ITEM_INGVALUE2) != 0 ) kind_num++; + if( ITEMTBL_getInt( created, ITEM_INGVALUE3) != 0 ) kind_num++; + if( ITEMTBL_getInt( created, ITEM_INGVALUE4) != 0 ) kind_num++; + + fooddp = ITEMTBL_getInt( created, ITEM_INGVALUE0) + + ITEMTBL_getInt( created, ITEM_INGVALUE1) + + ITEMTBL_getInt( created, ITEM_INGVALUE2) + + ITEMTBL_getInt( created, ITEM_INGVALUE3) + + ITEMTBL_getInt( created, ITEM_INGVALUE4); +#ifndef _NEW_MANOR_LAW + #ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + fooddp = sqrt(fooddp) * pow(2,kind_num-2) * RAND(0,6) / 200; + #else + fooddp = sqrt(fooddp) * pow(2,kind_num-2) * RAND(0,6) / 100; + #endif + print("FoodDP: num->%d sumdp->%d", kind_num, fooddp); + sprintf(buf, "%d", fooddp); + + #ifdef _PERSONAL_FAME // Arminius 8.30: 家族个人声望 + CHAR_earnFame(ownerindex, fooddp); + #endif + + #ifdef _FMVER21 + if( CHAR_getInt( CHAR_getWorkInt(petindex, CHAR_WORKPLAYERINDEX), CHAR_FMLEADERFLAG ) > 0 && + CHAR_getInt( CHAR_getWorkInt(petindex, CHAR_WORKPLAYERINDEX), CHAR_FMLEADERFLAG ) != FMMEMBER_APPLY ) + { + // CoolFish: 2001/10/03 + int fd = getfdFromCharaIndex(ownerindex); + saacproto_ACFixFMData_send(acfd, + CHAR_getChar(ownerindex, CHAR_FMNAME), + CHAR_getInt(ownerindex, CHAR_FMINDEX), + CHAR_getWorkInt(ownerindex, CHAR_WORKFMINDEXI), + FM_FIX_FMDEALFOOD, buf, "", + // CoolFish: 2001/10/03 + CHAR_getWorkInt(ownerindex, CHAR_WORKFMCHARINDEX), + CONNECT_getFdid(fd)); + // CHAR_getWorkInt(ownerindex, CHAR_WORKFMCHARINDEX), 0); + } + #else + saacproto_ACFixFMData_send(acfd, + CHAR_getChar(ownerindex, CHAR_FMNAME), + CHAR_getInt(ownerindex, CHAR_FMINDEX), + CHAR_getWorkInt(ownerindex, CHAR_WORKFMINDEXI), + FM_FIX_FMDEALFOOD, buf, "", + CHAR_getWorkInt(ownerindex, CHAR_WORKFMCHARINDEX), 0); + #endif +#endif + }else{ + int ownerindex = CHAR_getWorkInt(petindex, CHAR_WORKPLAYERINDEX); + syndp = ITEMTBL_getInt( created, ITEM_INGVALUE0) + + ITEMTBL_getInt( created, ITEM_INGVALUE1) + + ITEMTBL_getInt( created, ITEM_INGVALUE2) + + ITEMTBL_getInt( created, ITEM_INGVALUE3) + + ITEMTBL_getInt( created, ITEM_INGVALUE4); +#ifndef _NEW_MANOR_LAW + #ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + syndp = syndp / 200; + #else + syndp = syndp / 100; + #endif + sprintf(buf, "%d", syndp); + + #ifdef _PERSONAL_FAME // Arminius 8.30: 家族个人声望 + CHAR_earnFame(ownerindex, syndp); + #endif + + #ifdef _FMVER21 + if( CHAR_getInt( CHAR_getWorkInt(petindex, CHAR_WORKPLAYERINDEX), CHAR_FMLEADERFLAG ) > 0 && + CHAR_getInt( CHAR_getWorkInt(petindex, CHAR_WORKPLAYERINDEX), CHAR_FMLEADERFLAG ) != FMMEMBER_APPLY ) + { + // CoolFish: 2001/10/03 + int fd = getfdFromCharaIndex(ownerindex); + saacproto_ACFixFMData_send(acfd, + CHAR_getChar(ownerindex, CHAR_FMNAME), + CHAR_getInt(ownerindex, CHAR_FMINDEX), + CHAR_getWorkInt(ownerindex, CHAR_WORKFMINDEXI), + FM_FIX_FMSYNTHESIZE, buf, "", + // CoolFish: 2001/10/03 + CHAR_getWorkInt(ownerindex, CHAR_WORKFMCHARINDEX), + CONNECT_getFdid(fd)); + } + #else + saacproto_ACFixFMData_send(acfd, + CHAR_getChar(ownerindex, CHAR_FMNAME), + CHAR_getInt(ownerindex, CHAR_FMINDEX), + CHAR_getWorkInt(ownerindex, CHAR_WORKFMINDEXI), + FM_FIX_FMSYNTHESIZE, buf, "", + CHAR_getWorkInt(ownerindex, CHAR_WORKFMCHARINDEX), 0); + #endif +#endif + } +#ifdef _FMVER21 +#else + } +#endif + } + // shan end +#ifdef _MERGE_LOG + print( "\nANDY merged: item[%s] atom[%s]:[%d] [%s]:[%d] [%s]:[%d] [%s]:[%d] [%s]:[%d]", + ITEMTBL_getChar( created, ITEM_NAME), + ITEMTBL_getChar( created, ITEM_INGNAME0), + ITEMTBL_getInt( created, ITEM_INGVALUE0), + ITEMTBL_getChar( created, ITEM_INGNAME1), + ITEMTBL_getInt( created, ITEM_INGVALUE1), + ITEMTBL_getChar( created, ITEM_INGNAME2), + ITEMTBL_getInt( created, ITEM_INGVALUE2), + ITEMTBL_getChar( created, ITEM_INGNAME3), + ITEMTBL_getInt( created, ITEM_INGVALUE3), + ITEMTBL_getChar( created, ITEM_INGNAME4), + ITEMTBL_getInt( created, ITEM_INGVALUE4) ); +#endif + /* + #ifdef _ACTION_BULLSCR + if( CHAR_CHECKINDEX( charaindex) && (CHAR_getInt( charaindex, CHAR_ABULLSTART) == 10) ){ + int cTableLevel=0, adScore=0; + char buf1[256]; + int Myscore = CHAR_getInt( charaindex, CHAR_ABULLSCORE); + memset( buf1, 0, sizeof( buf1)); + cTableLevel = ITEM_getTableNum( ITEMTBL_getInt( created, ITEM_INGVALUE0)); + if( cTableLevel >= 15 ) adScore = 4; + else if( cTableLevel >= 6 ) adScore = 1; + else adScore = 0; + if( adScore > 0 ){ + sprintf( buf1, "合成料理等级:%d,增加绩分:%d,总共绩分:%d。", + cTableLevel, adScore, Myscore+adScore); + CHAR_setInt( charaindex, CHAR_ABULLSCORE, Myscore+adScore); + }else{ + sprintf( buf1, "合成料理等级:%d,需等级6以上才加分。", + cTableLevel); + } + CHAR_talkToCli( charaindex, -1, buf1, CHAR_COLORYELLOW); + } + #endif + */ + return created; + } + } + return items[RAND( 0, (num-1))].data[ITEM_ID]; + } + return -3; +} + +int ITEM_canDigest( ITEM_Item *itm ) +{ + /* 1蜊 及笺 及 蟆互涩烂今木化中凶日1} + 公丹匹卅中卅日0 */ + if( itm->string[ITEM_INGNAME0].string[0] ) return 1; else return 0; +} + + + +int ITEM_merge_test(void) +{ + int iid,i,k; + ITEM_Item itm[1]; + + for( k = 0 ; k < 10 ; k ++ ){ + iid = 1; + for( i = 0 ; i < 20 ; i ++ ){ + ITEM_makeItem( &itm[0] , iid ); + print( "%d RETURN: %d\n", i, + // shan + iid = ITEM_mergeItem( -1, itm, 1 , 0, -1,0,-1,0) ); + } + print( "------\n" ); + } + return 0; +} + +int ITEM_mergeItem_merge( int charaindex, int petid, char *data, int petindex, int alchemist) +{ + BOOL result = FALSE; + int i; + int ret; + int cnt = 0; + int itemindexs[CHAR_MAXITEMHAVE - CHAR_STARTITEMARRAY]; + int haveitemindexs[CHAR_MAXITEMHAVE - CHAR_STARTITEMARRAY]; + // Nuke +2 1026: Avoid merge cheat + int itemflag[CHAR_MAXITEMHAVE - CHAR_STARTITEMARRAY]; + int j,collision=0; + + char buff[64]; + + ITEM_Item items[CHAR_MAXITEMHAVE - CHAR_STARTITEMARRAY]; + // Nuke +1 1026 + memset(itemflag,0,sizeof(itemflag)); + + { + int emptyindex = CHAR_findEmptyItemBox( charaindex ); + if( emptyindex == -1 ){ + CHAR_talkToCli( charaindex, -1, "合成时,最少需空一格物品栏位!", CHAR_COLORYELLOW); + return -1; + } + } + + for( i = CHAR_STARTITEMARRAY; i < CHAR_MAXITEMHAVE; i ++ ) { + int haveitemindex; + ret = getStringFromIndexWithDelim( data , "|", + i - CHAR_STARTITEMARRAY+1, + buff, sizeof( buff ) ); + if( ret == FALSE ) break; + haveitemindex = atoi( buff); + if( CHAR_CHECKITEMINDEX( charaindex, haveitemindex) ) { + int itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if( ITEM_CHECKINDEX( itemindex)) { +#ifdef _ITEM_INSLAY + char *code; + if( (code = ITEM_getChar( itemindex, ITEM_TYPECODE)) == NULL ) { + if( strcmp( code, "\0") ) { + char token[256]; + snprintf( token, sizeof( token), "似乎对%s没有兴趣。", + ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW); + return FALSE; + } + } +#endif + if( ITEM_getmergeItemFromFromITEMtabl( ITEM_getInt( itemindex, ITEM_ID)) == TRUE ){ //检查是否可合成 + ITEM_Item *itm; + itm = ITEM_getItemPointer(itemindex); + if( itm != NULL ) { + ITEM_makeItem( &items[cnt], ITEM_getInt( itemindex, ITEM_ID)); + itemindexs[cnt] = itemindex; + haveitemindexs[cnt] = haveitemindex; + // Nuke start 1026 + for (j=0;j 1 ) { + int randtable = 0; + if( items[0].data[ITEM_TYPE] == ITEM_DISH ) { + randtable = 1; + } + ret = ITEM_mergeItem( charaindex, items, cnt, 0, petid, randtable, petindex, alchemist); + if( ret == -10) + CHAR_talkToCli( charaindex, -1, "非法的合成方法", CHAR_COLORWHITE); + CHAR_setInt( charaindex, CHAR_MERGEITEMCOUNT, + CHAR_getInt( charaindex, CHAR_MERGEITEMCOUNT)+1); + + for( i = 0; i < cnt; i ++ ) { +#ifdef _ITEM_PILENUMS + int pilenum=0; + int itemindex = CHAR_getItemIndex( charaindex, haveitemindexs[i]); + if( !ITEM_CHECKINDEX( itemindex) ) continue; + pilenum = ITEM_getInt( itemindex, ITEM_USEPILENUMS); + pilenum -= 1; + ITEM_setInt( itemindex, ITEM_USEPILENUMS, pilenum); + if( pilenum <= 0 ){ +#endif + CHAR_setItemIndex( charaindex, haveitemindexs[i], -1); + LogItem( + CHAR_getChar( charaindex, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( charaindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindexs[i], +#else + ITEM_getInt( itemindexs[i], ITEM_ID), /* 失奶 丞 寞 */ +#endif + "mergedel(合成所删除的道具)", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + ITEM_getChar( itemindexs[i], ITEM_UNIQUECODE), + ITEM_getChar( itemindexs[i], ITEM_NAME), + ITEM_getInt( itemindexs[i], ITEM_ID) + ); + + ITEM_endExistItemsOne( itemindexs[i]); +#ifdef _ITEM_PILENUMS + } +#endif + } + CHAR_sendItemData( charaindex, haveitemindexs, cnt); + + if( ret >= 0 ) { + int rc; + int createitemindex = ITEM_makeItemAndRegist( ret); +#ifdef _MERGE_LOG + print("\n merge[ret:%d]", ret); + print("\n merge[createitemindex:%d]", createitemindex); +#endif + // shan begin + if( createitemindex != -1 ){ + if( petindex != -1){ + if( CHAR_getInt(petindex, CHAR_PETFAMILY) == 1 ){ + int ownerindex = CHAR_getWorkInt(petindex, CHAR_WORKPLAYERINDEX); + if (!CHAR_CHECKINDEX(ownerindex)){ + print("ownerindex err!\n"); + return -1; + } +#ifdef _FMVER21 + if( CHAR_getInt( ownerindex, CHAR_FMLEADERFLAG) != FMMEMBER_LEADER){ +#else + if( CHAR_getInt( ownerindex, CHAR_FMLEADERFLAG) != 1){ +#endif + print("\n Pet Ownerindex Error"); + return -1; + } + if( randtable == 1){ + char *p; + char charbuf1[512]="",charbuf2[1024]="",charbuf[128]=""; + char argbuf[256]; + int arg1 = 0, arg2 = 0; + if( ITEM_getInt( createitemindex, ITEM_TYPE) == 20){ + if( (p = strstr( ITEM_getChar(createitemindex, ITEM_ARGUMENT), "气")) ){ + strcpy( argbuf, (p+2)); + arg1 = atoi(argbuf); + arg1 = arg1 * FOOD_MP_RATE / 100; + } + if( (p = strstr( ITEM_getChar(createitemindex, ITEM_ARGUMENT), "体")) ){ + strcpy( argbuf, (p+2)); + arg2 = atoi(argbuf); + arg2 = arg2 * FOOD_HP_RATE / 100; + } + if( arg1 != 0 && arg2 != 0 ){ + sprintf( charbuf1, "气%d体%d", arg1, arg2); + } + else if( arg1 != 0){ + sprintf( charbuf1, "气%d", arg1); + } + else if( arg2 != 0){ + sprintf( charbuf1, "体%d", arg2); + } + sprintf( charbuf, "(家族料理)"); + strcpy( charbuf2, ITEM_getChar( createitemindex, ITEM_EFFECTSTRING)); + strncat( charbuf2, charbuf, 10); + ITEM_setChar( createitemindex, ITEM_ARGUMENT, charbuf1); + ITEM_setChar( createitemindex, ITEM_EFFECTSTRING, charbuf2); + } + } + } + } + } + // shan end + ITEM_setInt( createitemindex, ITEM_MERGEFLG, TRUE); + if( createitemindex != -1 ) { + rc = CHAR_addItemSpecificItemIndex( charaindex, createitemindex); + if( rc >= 0 && rc < CHAR_MAXITEMHAVE) { + CHAR_sendItemDataOne( charaindex, rc); + LogItem( + CHAR_getChar( charaindex, CHAR_NAME ), + CHAR_getChar( charaindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + createitemindex, +#else + ITEM_getInt( createitemindex, ITEM_ID), +#endif + "mergeadd(合成出来的道具)", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + ITEM_getChar( createitemindex, ITEM_UNIQUECODE), + ITEM_getChar( createitemindex, ITEM_NAME), + ITEM_getInt( createitemindex, ITEM_ID) + ); + result = TRUE; + } + else { + ITEM_endExistItemsOne( createitemindex); + } + } + } + } + return result; +} + +static int ITEM_getTableNum( int num) +{ + int i; + for( i = 0; i < arraysizeof( ItemRandTableForItem); i ++) { + if( num <= ItemRandTableForItem[i].maxnum ) { + break; + } + } + if( i == arraysizeof( ItemRandTableForItem)) i--; + return i; +} + +#ifdef _ITEM_INSLAY +int PETSKILL_ITEM_inslay( int charindex, int inslayindex, int itemindex) +{ + char *inslaystr , *code; + char buf1[256], buf2[256]; + char codeTemp[][32]={ "NULL", "NULL", "NULL"}; + char TypeName[][256]={ + "攻", "防", "敏", "HP", "MP", "幸运", "伤", "吸", "魔法ID" + }; + int worktyp[] = { + ITEM_MODIFYATTACK, ITEM_MODIFYDEFENCE, ITEM_MODIFYQUICK, + ITEM_MODIFYHP, ITEM_MODIFYMP, ITEM_MODIFYLUCK, + ITEM_OTHERDAMAGE, ITEM_OTHERDEFC, ITEM_MAGICID + }; + int worknum[ arraysizeof(worktyp)]; + + int i; +#define MAXCANINSLAY 3 + + memset( worknum, 0, sizeof( worknum)); + if( !CHAR_CHECKINDEX( charindex) ) return FALSE; + if( !ITEM_CHECKINDEX( inslayindex) ) return FALSE; + if( !ITEM_CHECKINDEX( itemindex) ) return FALSE; + if( itemindex == inslayindex ) return FALSE; + if( (code = ITEM_getChar( itemindex, ITEM_TYPECODE)) == NULL ) { + print(" ITEM_TYPECODE == NULL error !!\n"); + return FALSE; + } + if( !strcmp( code, "\0") || !strcmp( code, "NULL" ) ) return FALSE; + if( (inslaystr = ITEM_getChar( inslayindex, ITEM_INLAYCODE)) == NULL ) { + print(" ITEM_INLAYCODE == NULL error !!\n"); + return FALSE; + } + + for( i = 0; i < MAXCANINSLAY; i ++ ) { + if( getStringFromIndexWithDelim( inslaystr , "|", i+1, buf1, sizeof( buf1 ) ) == TRUE ){ + if( strcmp( buf1, "\0")){ + sprintf( codeTemp[i], "%s", buf1); + } + continue; + } + break; + } + + for( i = 0; i < MAXCANINSLAY; i ++ ) { + if( strcmp( codeTemp[i], "NULL") ) continue; + sprintf( codeTemp[i], "%s", code); + break; + } + if( i == MAXCANINSLAY ) { + CHAR_talkToCli( charindex, -1, "武器或防具已经镶满了。", CHAR_COLORYELLOW); + return FALSE; + } + memset( buf2, 0, sizeof( buf2)); + sprintf( buf2, "%s|%s|%s", codeTemp[0], codeTemp[1], codeTemp[2]); + print("buf2:%s\n", buf2); + ITEM_setChar( inslayindex, ITEM_INLAYCODE, buf2); + + for( i=0; i 0 ) { //魔法 ID + int magicid,mp; + magicid = ITEM_getInt( itemindex, ITEM_MAGICID); + ITEM_setInt( inslayindex, ITEM_MAGICID, magicid); + mp = ITEM_getInt( itemindex, ITEM_MAGICUSEMP ); + ITEM_setInt( inslayindex, ITEM_MAGICUSEMP, mp); + } + for( i=ITEM_FIRSTFUNCTION; i 0 ) { //取得魔法名称 + int marray = MAGIC_getMagicArray( ITEM_getInt( inslayindex, ITEM_MAGICID)); + if( marray != -1 ){ + if( (magicname = MAGIC_getChar( marray, MAGIC_NAME)) != NULL ){ + sprintf( Mname, "%s", magicname); + } + } + ITEM_setInt( inslayindex, ITEM_MAGICID, ITEM_getInt( inslayindex, ITEM_MAGICID)); + } + sprintf( secretname, "%s%s%d %s%s%d %s%s%d %s%s%d %s%s%d %s%s%d %s%s%d %s", + TypeName[0],(worknum[0]>=0)?"+":"",worknum[0], + TypeName[1],(worknum[1]>=0)?"+":"",worknum[1], + TypeName[2],(worknum[2]>=0)?"+":"",worknum[2], + TypeName[3],(worknum[3]>=0)?"+":"",worknum[3], + TypeName[4],(worknum[4]>=0)?"+":"",worknum[4], + TypeName[6],(worknum[6]>=0)?"+":"",worknum[6], + TypeName[7],(worknum[7]>=0)?"+":"",worknum[7], Mname); + ITEM_setChar( inslayindex, ITEM_EFFECTSTRING, secretname); + } + + return TRUE; +} + +#endif + +#ifdef _PETSKILL_FIXITEM +int PETSKILL_ITEM_FixItem( int charindex, int fixindex, int *itemindex) +{ + int index, i; + char *buf2; + int crushes, maxcrushes; +#define MAXFIXNUM 2 + index = 0; + for( i=0; i= 5 ){ +#ifdef _ITEM_FIXALLBASE + char *ITEM_ARG = ITEM_getChar( index, ITEM_ARGUMENT); + if( ITEM_ARG != NULL && !strcmp( ITEM_ARG, "FIXITEMALL") ){ + }else{ +#endif + CHAR_talkToCli( charindex, -1, "材料不符", CHAR_COLORYELLOW); + return FALSE; +#ifdef _ITEM_FIXALLBASE + } +#endif + } + + crushes = ITEM_getInt( fixindex, ITEM_DAMAGECRUSHE); + maxcrushes = ITEM_getInt( fixindex, ITEM_MAXDAMAGECRUSHE); + if( crushes >= (maxcrushes*0.80) ) { + char buff[256]; + sprintf( buff, "%s并没有损坏到需要修复。", ITEM_getChar( fixindex, ITEM_NAME)); + CHAR_talkToCli( charindex, -1, buff, CHAR_COLORYELLOW); + return FALSE; + }else { + char *buf1; + if( maxcrushes < 500 ){ + CHAR_talkToCli( charindex, -1, "此物品已不能修复", CHAR_COLORYELLOW); + return FALSE; + } + if( crushes <= 0 ) return FALSE; + maxcrushes = maxcrushes*0.85; + crushes = maxcrushes; + ITEM_setInt( fixindex, ITEM_DAMAGECRUSHE, crushes); + ITEM_setInt( fixindex, ITEM_MAXDAMAGECRUSHE, maxcrushes); + //修正名称 + buf1 = ITEM_getChar( fixindex, ITEM_SECRETNAME); + if( strstr( buf1, "(") != 0 ) { + char buf5[256]; + if( getStringFromIndexWithDelim( buf1,"(",1, buf5, sizeof( buf5)) != FALSE ) { + sprintf( buf1, buf5); + } + } + ITEM_setChar( fixindex, ITEM_SECRETNAME, buf1); + ITEM_setInt( fixindex, ITEM_CRUSHLEVEL, 0); + } + return TRUE; +} +#endif + + + diff --git a/gmsv/item/item_trade.c b/gmsv/item/item_trade.c new file mode 100644 index 0000000..123bbc8 --- /dev/null +++ b/gmsv/item/item_trade.c @@ -0,0 +1,477 @@ +/********************/ +/* 市集交易系统 */ +/********************/ +#include +#include "version.h" +#include "item_trade.h" +#include "handletime.h" +#include "object.h" +#include "trade.h" +#include "readmap.h" +#include "lssproto_serv.h" +#include "enemy.h" +#include "pet.h" + +#ifdef _MARKET_TRADE +#define MAXTRADES 4 +MapTrade TRADE_DATAS[MAXTRADES] = { + { -1, 5, 5, 0, -1, "NULL"},{ -1, 10, 5, 0, -1, "NULL"}, + { -1, 5, 10, 0, -1, "NULL"},{ -1, 10, 10, 0, -1, "NULL"} +}; +void InitMapTradeData( int index, int Stime) +{ + int i; + for( i=0; i= TRADE_DATAS[i].x && x < (TRADE_DATAS[i].x+TRADEXSIZE) ) { + if( y >= TRADE_DATAS[i].y && y < (TRADE_DATAS[i].y+TRADEYSIZE) ) { + FIND = TRUE; + break; + } + } + if( FIND == TRUE ) break; + i++; + } + if( i >= arraysizeof( TRADE_DATAS) ) + return -1; + return i; +} + +BOOL MAP_TRADEDROP( int charindex, int itemindex,int floor, int x, int y) +{ //return FALSE 物品丢在地上 TRUE 不丢在地上(可能是贩卖道具) + int exhibition=-1; + int CreateItem=-1,/*itemID=-1,*/ itemimage=-1; + int objindex; + char itemname[256]="(样)"; + + if( CHECKMAP_TRADE( charindex, floor, x, y) == FALSE ) + return FALSE; + if( (exhibition = CHECKMAP_TRADEXY(charindex, floor, x, y)) == -1 ) + return FALSE; + exhibition+=TRADESTARTNUM; + if( CHAR_getWorkInt( charindex, CHAR_MAPTRADETYPE) != exhibition ) { + print("\n 不是摊位[%d]主人[%d] ", exhibition, CHAR_getWorkInt( charindex, CHAR_MAPTRADETYPE)); + return TRUE; + } + + if( MAPTRADE_CHECKMAPFULL( floor, x, y) == TRUE ) { + CHAR_talkToCli( charindex, -1, "前方已有贩卖样品!", CHAR_COLORYELLOW); + return TRUE; + } + + //itemID = ITEM_getInt( itemindex, ITEM_ID ); + //CreateItem = ITEM_makeItemAndRegist( itemID); + itemimage = ITEM_getInt( itemindex, ITEM_BASEIMAGENUMBER); + if( ITEM_getChar( itemindex, ITEM_SECRETNAME) != NULL ) { + if( strstr( ITEM_getChar( itemindex, ITEM_SECRETNAME), "(样)") == NULL ) { + sprintf( itemname, "%s(样)", ITEM_getChar( itemindex, ITEM_SECRETNAME)); + } + } + + //CREAT 贩卖样品 + CreateItem = ITEM_makeItemAndRegist( TRADEITEMID); + if( !ITEM_CHECKINDEX( CreateItem ) ) + return TRUE; + //复制ITEM资料 + ITEM_setInt( CreateItem, ITEM_BASEIMAGENUMBER, itemimage); + ITEM_setChar( CreateItem, ITEM_NAME, itemname); + ITEM_setChar( CreateItem, ITEM_SECRETNAME, itemname); + ITEM_setChar( CreateItem, ITEM_EFFECTSTRING, "贩卖样品");//ITEM_EFFECTSTRING + ITEM_setChar( CreateItem, ITEM_ARGUMENT, "贩卖样品"); + + //丢 + ITEM_setWorkInt( CreateItem, ITEM_WORKOBJINDEX, -1); + ITEM_setWorkInt( CreateItem, ITEM_WORKCHARAINDEX, charindex); + ITEM_setInt( CreateItem, ITEM_PUTTIME, NowTime.tv_sec); + objindex = CHAR_DropItemAbsolute( CreateItem, floor, x, y, TRUE); + if( objindex == -1 ) { + ITEM_endExistItemsOne( CreateItem ); + return TRUE; + } + + ITEM_setWorkInt( CreateItem, ITEM_WORKTRADEINDEX, exhibition); + ITEM_setWorkInt( CreateItem, ITEM_WORKTRADETYPE, TRADETYPE_SELL ); + ITEM_setWorkInt( CreateItem, ITEM_WORKTRADESELLINDEX, itemindex); + ITEM_setWorkInt( CreateItem, ITEM_WORKCHARAINDEX, charindex); + + CHAR_sendWatchEvent( objindex,CHAR_ACTSTAND,NULL,0,TRUE); + CHAR_sendCToArroundCharacter( objindex); + TRADE_DATAS[exhibition-TRADESTARTNUM ].Goodindex = CreateItem; + + sprintf( TRADE_DATAS[exhibition-TRADESTARTNUM ].Goodname,"道具-%s", itemname); + return TRUE; +} + +BOOL MAP_TRADEPICKUP( int charindex, int index, int floor, int x, int y, int flg) +{ + int masterindex; + int objindex=-1; + int exhibition;//摊位 + + if( (exhibition = CHECKMAP_TRADEXY(charindex, floor, x, y)) == -1 ) + return FALSE; + masterindex = TRADE_getMasterInt( exhibition); + if( MAPTRADE_CHECKMASTERIN( masterindex, charindex, exhibition) == FALSE ) + return TRUE; + + if( masterindex == charindex || !CHAR_CHECKINDEX( masterindex) ) {//主人收回 + switch( flg ) { //清除 + case TRADEITEMTYPE: + objindex = ITEM_getWorkInt( index, ITEM_WORKOBJINDEX); + ITEM_endExistItemsOne( index); + OBJECT_setIndex( objindex, 0); + CHAR_ObjectDelete( objindex); + break; + case TRADEPETTYPE: + objindex = CHAR_getWorkInt( index, CHAR_WORKOBJINDEX); + CHAR_CharaDelete( index); + ITEM_endExistItemsOne( index); + break; + } + }else { //交易 + char buf1[256], msg[256]; + int fd = getfdFromCharaIndex( charindex); + int mfd = getfdFromCharaIndex( masterindex); + int snum=-1; + memset( buf1, 0, sizeof( buf1)); +//======================= + //masterindex + if( CHAR_getWorkInt( masterindex, CHAR_WORKTRADEMODE) == CHAR_TRADE_TRADING || + CHAR_getWorkInt( masterindex, CHAR_WORKTRADEMODE) == CHAR_TRADE_TRADING ){ + CHAR_talkToCli( charindex, -1, "主人正在买卖中!", CHAR_COLORYELLOW); + return TRUE; + } + CHAR_talkToCli(charindex, -1, "请稍候。", CHAR_COLORYELLOW); + sprintf(buf1, "C|%d|%s|1", fd, CHAR_getChar( charindex, CHAR_NAME)); + lssproto_TD_send( mfd, -1, buf1); + sprintf(buf1, "C|%d|%s|1", mfd, CHAR_getChar( masterindex, CHAR_NAME)); + lssproto_TD_send( fd, -1, buf1); + + CHAR_setWorkInt( charindex, CHAR_WORKTRADEMODE, CHAR_TRADE_TRADING); + CHAR_setWorkInt( masterindex, CHAR_WORKTRADEMODE, CHAR_TRADE_TRADING); + CONNECT_set_confirm( fd, FALSE); + CONNECT_set_confirm( mfd, FALSE); + CHAR_sendTradeEffect( charindex, 1); + CHAR_sendTradeEffect( masterindex, 1); + + switch( flg ) { //清除 + case TRADEITEMTYPE: //CHAR_Trade + if( (snum = MAPTRADE_getItemSpace( masterindex, index)) != -1 ) { + sprintf( buf1, "T|%d|%s|I|1|%d", fd, CHAR_getChar( charindex, CHAR_NAME), + snum ); + print(" MAP_TRADEPICKUP_check1 "); + CHAR_Trade( mfd, masterindex, buf1); + } + + snprintf(msg, sizeof(msg), "T|%d|%s|S|I|%d|%d", mfd, CHAR_getChar( masterindex, CHAR_NAME), snum, 1); + lssproto_TD_send( mfd, -1, msg); + break; + case TRADEPETTYPE: + if((snum = MAPTRADE_getPetSpace( masterindex, index)) != -1 ) { + sprintf( buf1, "T|%d|%s|P|3|%d", fd, CHAR_getChar( charindex, CHAR_NAME), + snum ); + print(" MAP_TRADEPICKUP_check2 "); + CHAR_Trade( mfd, masterindex, buf1); + } + snprintf(msg, sizeof(msg), "T|%d|%s|S|P|%d|%d", mfd, + CHAR_getChar( masterindex, CHAR_NAME), snum, 3); + lssproto_TD_send( mfd, -1, msg); + break; + } +//======================= + } + return TRUE; +} + + +int TRADE_getMasterInt( int index) +{ + if( index < 0 || index >= arraysizeof( TRADE_DATAS) ) + return -1; + return TRADE_DATAS[index].masterindex; +} + +int TRADE_getTimeInt( int index) +{ + if( index < 0 || index >= arraysizeof( TRADE_DATAS) ) + return FALSE; + return TRADE_DATAS[index].Ttime; +} + +BOOL TRADE_setMasterInt( int index, int Num) +{ + if( index < 0 || index >= arraysizeof( TRADE_DATAS) ) + return FALSE; + TRADE_DATAS[index].masterindex = Num; + return TRUE; +} + +BOOL TRADE_setTimeInt( int index, int Num) +{ + if( index < 0 || index >= arraysizeof( TRADE_DATAS) ) + return FALSE; + TRADE_DATAS[index].Ttime = Num; + return TRUE; +} + +int TRADE_getMaxNumInt() +{ + return arraysizeof( TRADE_DATAS); +} + +int TRADE_AddMasrerTrade( int toindex) +{ //设定摊位主人 + int i; + if( CHAR_getWorkInt( toindex, CHAR_MAPTRADETYPE) > 0 ) + return -1; + for( i=0; i< arraysizeof( TRADE_DATAS); i++) { + if( TRADE_DATAS[i].masterindex < 0 ) { + TRADE_setMasterInt( i, toindex); + TRADE_setTimeInt( i, NowTime.tv_sec); + return i+TRADESTARTNUM; + } + } + return -1; +} + +void MAPTRADE_CLEANGOLD( int floor, int num) +{ //TRADE_DATAS + OBJECT object; + int x,y; + + if( TRADE_DATAS[ num].masterindex != -1 ) { + print("\n 删除摊位[%d], 主人[%d]存在!!", num, TRADE_DATAS[ num].masterindex); + return; + } + for( x=TRADE_DATAS[ num].x; x<(TRADE_DATAS[ num].x+TRADEXSIZE); x++ ) { + for( y=TRADE_DATAS[ num].y; y<(TRADE_DATAS[ num].y+TRADEYSIZE); y++) { + for( object=MAP_getTopObj(floor,x,y) ; object ; object = NEXT_OBJECT(object ) ) { + int index = GET_OBJINDEX(object); + int objtype = OBJECT_getType(index); + int objindex = OBJECT_getIndex( index); + + if( objtype == OBJTYPE_NOUSE )continue; + if( objtype == OBJTYPE_ITEM ){ + if( ITEM_getWorkInt( objindex, ITEM_WORKTRADETYPE) == TRADETYPE_SELL ) { + ITEM_endExistItemsOne( objindex); + OBJECT_setIndex( index, 0); + CHAR_ObjectDelete(index); //清除 + print("clean( %d )", index ); + } + break; + } + if( objtype == OBJTYPE_CHARA ){ + if( CHAR_getInt( objindex, CHAR_WHICHTYPE) == CHAR_TYPEPET) { + if( CHAR_getWorkInt( objindex, CHAR_WORKTRADETYP) == TRADETYPE_SELL ) { + ITEM_endExistItemsOne( objindex); + OBJECT_setIndex( index, 0); + CHAR_CharaDelete( objindex); + } + } + } + } + } + } +} + +BOOL MAPTRADE_CHECKMASTERIN( int masterindex , int toindex, int num) +{ + int exhibition = num; + exhibition+=TRADESTARTNUM; + if( !CHAR_CHECKINDEX( masterindex) ) return FALSE; + if( CHAR_getWorkInt( masterindex, CHAR_MAPTRADETYPE) != exhibition ) + return FALSE; + + if( CHAR_getInt( masterindex, CHAR_FLOOR) != TRADEMAP ) { //主人不在了 + CHAR_talkToCli( toindex, -1, "主人不在!", CHAR_COLORYELLOW); + return FALSE; + }else { + int mapnum = CHECKMAP_TRADEXY( masterindex, CHAR_getInt( masterindex, CHAR_FLOOR), + CHAR_getInt( masterindex, CHAR_X), + CHAR_getInt( masterindex, CHAR_Y)); + if( (mapnum == -1 ) || + CHAR_getWorkInt( masterindex, CHAR_MAPTRADETYPE) != (mapnum+TRADESTARTNUM) ) { + CHAR_talkToCli( toindex, -1, "主人不在摊位上!", CHAR_COLORYELLOW); + //主人不在位置上 + return FALSE; + } + + } + return TRUE; +} + +BOOL MAPTRADE_CHECKMAPFULL(int fl, int x, int y) +{ + OBJECT object; + BOOL FIND=FALSE; + for( object=MAP_getTopObj(fl,x,y) ; object ; + object = NEXT_OBJECT(object ) ){ + int objindex = GET_OBJINDEX(object); + int index = OBJECT_getIndex( objindex); + + switch( OBJECT_getType(objindex) ){ + case OBJTYPE_NOUSE: + break; + case OBJTYPE_CHARA: + if( CHAR_getInt( index, CHAR_WHICHTYPE) != CHAR_TYPEPET ) { + break; + } + case OBJTYPE_ITEM: + FIND = TRUE; + break; + } + } + return FIND; +} + +BOOL MAP_TRADEPETDROP( int charindex, int petindex,int floor, int x, int y) +{ + int exhibition=-1; + int Createpet=-1,petid=-1, petimage=-1; + int objindex, i, enemynum=-1; + char petname[256]="(样)"; + if( CHECKMAP_TRADE( charindex, floor, x, y) == FALSE ) + return FALSE; + if( (exhibition = CHECKMAP_TRADEXY(charindex, floor, x, y)) == -1 ) + return FALSE; + exhibition+=TRADESTARTNUM; + + if( CHAR_getWorkInt( charindex, CHAR_MAPTRADETYPE) != exhibition ) { + print("\n 不是摊位[%d]主人[%d] ", exhibition, CHAR_getWorkInt( charindex, CHAR_MAPTRADETYPE)); + return TRUE; + } + + if( MAPTRADE_CHECKMAPFULL( floor, x, y) == TRUE ) { + CHAR_talkToCli( charindex, -1, "前方已有贩卖样品!", CHAR_COLORYELLOW); + return TRUE; + } + + + petimage = CHAR_getInt( petindex, CHAR_BASEIMAGENUMBER); + if( CHAR_getChar( petindex, CHAR_NAME) != NULL ) { + if( strstr( CHAR_getChar( petindex, CHAR_NAME), "(样)") == NULL ) { + sprintf( petname ,"%s(样)", CHAR_getChar( petindex, CHAR_NAME) ); + } + } + + //CREAT 贩卖样品 ENEMY_TEST_createPetIndex + + petid = CHAR_getInt( petindex, CHAR_PETID ); + enemynum = ENEMY_getEnemyNum(); + for( i = 0; i < enemynum; i ++ ) { + if( ENEMY_getInt( i, ENEMY_ID ) == petid ){//ENEMY_TEMPNO + print("\n find pet[%d]", petid); + break; + } + } + if( i == enemynum ) + return FALSE; + Createpet = ENEMY_TEST_createPetIndex( i); + if( !CHAR_CHECKINDEX( Createpet ) ) return TRUE; + //复制可视条件 + CHAR_setChar( Createpet, CHAR_NAME, petname); + CHAR_setInt( Createpet, CHAR_BASEIMAGENUMBER, petimage); + CHAR_setInt( Createpet, CHAR_BASEBASEIMAGENUMBER, petimage); + + //丢下宠物 + objindex = PET_dropPetAbsolute( Createpet,floor,x,y, FALSE ); + if( objindex == -1 ) { + CHAR_endCharOneArray( Createpet ); + return TRUE; + } + + CHAR_setWorkInt( Createpet, CHAR_WORKOBJINDEX, objindex ); + CHAR_setWorkInt( Createpet, CHAR_WORKTRADETYP, TRADETYPE_SELL); + CHAR_setWorkInt( Createpet, CHAR_WORKTRADESELLINDEX, petindex); + + CHAR_setInt( Createpet, CHAR_ALLOCPOINT, TRADEPETUPLV ); + CHAR_setChar( Createpet, CHAR_OWNERCDKEY, "WAEI_SYSOWN"); + CHAR_setChar( Createpet, CHAR_OWNERCHARANAME, "WAEI_SYSOWN"); + CHAR_setInt( Createpet, CHAR_FLOOR, floor); + CHAR_setInt( Createpet, CHAR_X, x); + CHAR_setInt( Createpet, CHAR_Y, y); + CHAR_setInt( Createpet, CHAR_PUTPETTIME, NowTime.tv_sec); + CHAR_sendCToArroundCharacter( objindex); + TRADE_DATAS[exhibition-TRADESTARTNUM ].Goodindex = Createpet; + + sprintf( TRADE_DATAS[exhibition-TRADESTARTNUM ].Goodname,"宠物-%s", petname); + return TRUE; +} + +int MAPTRADE_getItemSpace( int meindex, int itemindex) +{ + int i; + int index = ITEM_getWorkInt( itemindex, ITEM_WORKTRADESELLINDEX); + for( i=CHAR_EQUIPPLACENUM; i= arraysizeof( TRADE_DATAS) ) + return -1; + return TRADE_DATAS[index].Goodindex; +} + +BOOL MAPTRADE_setSellIndex( int index, int num) +{ + if( index < 0 || index >= arraysizeof( TRADE_DATAS) ) + return FALSE; + TRADE_DATAS[index].Goodindex = num; + return TRUE; +} + +void MAPTRADE_setCharSellName( int index, char *buf) +{ + if( index < 0 || index >= arraysizeof( TRADE_DATAS) ) + return; + if( buf == NULL ) + return; + snprintf( TRADE_DATAS[index].Goodname, sizeof( TRADE_DATAS[index].Goodname), buf); +} + +char* MAPTRADE_getCharSellName( int index ) +{ + if( index < 0 || index >= arraysizeof( TRADE_DATAS) ) + return NULL; + return TRADE_DATAS[index].Goodname; +} +#endif + + + + diff --git a/gmsv/item/makefile b/gmsv/item/makefile new file mode 100644 index 0000000..16252a0 --- /dev/null +++ b/gmsv/item/makefile @@ -0,0 +1,249 @@ +INCFLAGS=-I. -I../include + +CFLAGS=-w -O3 $(INCFLAGS) + +PROG=libitem.a + +SRC=item.c item_event.c item_gen.c item_trade.c item_contract.c +OBJ=$(SRC:.c=.o) + +ifeq (0,$(MAKELEVEL)) +CC=gcc +RM=rm -f +AR=ar cr +MV=mv +RANLIB=ranlib +SED=sed +SHELL=/bin/sh +endif + +all: $(PROG) + +$(PROG): $(OBJ) + $(RM) $(PROG) + $(AR) $(PROG) $(OBJ) + $(RANLIB) $(PROG) + +depend: + $(MV) makefile makefile.bak + $(SED) -ne '1,/^# DO NOT DELETE THIS LINE/p' makefile.bak>makefile + $(CC) $(INCFLAGS) -M $(SRC) >> makefile + +clean: + $(RM) $(PROG) + $(RM) $(OBJ) + $(RM) *~ + +distclean: + $(RM) $(PROG) + $(RM) $(OBJ) + $(RM) *~ + $(MV) makefile Makefile.bak + $(SED) -ne '1,/^# DO NOT DELETE THIS LINE/p' makefile.bak>makefile + $(RM) makefile.bak + +# DO NOT DELETE THIS LINE +item.o: item.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \ + /usr/include/strings.h /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h ../include/common.h \ + ../include/char.h ../include/char_base.h ../include/skill.h \ + ../include/util.h /usr/include/sys/time.h ../include/title.h \ + ../include/addressbook.h ../include/net.h /usr/include/netinet/in.h \ + /usr/include/stdint.h /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/battle.h ../include/buf.h ../include/function.h \ + ../include/magic_base.h ../include/profession_skill.h +item_event.o: item_event.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/ctype.h /usr/include/bits/types.h \ + /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \ + /usr/include/endian.h /usr/include/bits/endian.h ../include/common.h \ + /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \ + /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h ../include/char.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/configfile.h ../include/item_event.h ../include/object.h \ + ../include/anim_tbl.h ../include/magic.h ../include/handletime.h \ + ../include/log.h ../include/encount.h ../include/battle.h \ + ../include/battle_item.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/pet.h ../include/npcutil.h \ + ../include/enemy.h ../include/battle_magic.h ../include/pet_skill.h \ + ../include/npc_freepetskillshop.h ../include/profession_skill.h +item_gen.o: item_gen.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \ + /usr/include/strings.h /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + /usr/include/ctype.h /usr/include/math.h /usr/include/bits/huge_val.h \ + /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \ + ../include/configfile.h ../include/common.h ../include/util.h \ + /usr/include/sys/time.h ../include/buf.h ../include/char.h \ + ../include/char_base.h ../include/skill.h ../include/title.h \ + ../include/addressbook.h ../include/net.h /usr/include/netinet/in.h \ + /usr/include/stdint.h /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/item_gen.h ../include/enemy.h ../include/log.h \ + ../include/saacproto_cli.h ../include/saacproto_util.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h ../include/family.h \ + ../include/magic_base.h +item_trade.o: item_trade.c /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/version.h ../include/correct_bug.h ../include/version_pk.h \ + ../include/item_trade.h ../include/char.h ../include/common.h \ + /usr/include/stdio.h /usr/include/bits/types.h \ + /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/include/bits/wchar.h /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/handletime.h ../include/object.h ../include/trade.h \ + ../include/readmap.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/enemy.h ../include/pet.h +item_contract.o: item_contract.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/ctype.h /usr/include/bits/types.h \ + /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \ + /usr/include/endian.h /usr/include/bits/endian.h ../include/common.h \ + /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \ + /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h ../include/char.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/configfile.h ../include/item_event.h ../include/object.h \ + ../include/anim_tbl.h ../include/magic.h ../include/handletime.h \ + ../include/log.h ../include/encount.h ../include/battle.h \ + ../include/battle_item.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/pet.h ../include/npcutil.h \ + ../include/enemy.h diff --git a/gmsv/item/makefile.bak b/gmsv/item/makefile.bak new file mode 100644 index 0000000..e2e93de --- /dev/null +++ b/gmsv/item/makefile.bak @@ -0,0 +1,183 @@ +INCFLAGS=-I. -I../include + +CFLAGS=-w -O3 $(INCFLAGS) + +PROG=libitem.a + +SRC=item.c item_event.c item_gen.c item_trade.c item_contract.c +OBJ=$(SRC:.c=.o) + +ifeq (0,$(MAKELEVEL)) +CC=gcc +RM=rm -f +AR=ar cr +MV=mv +RANLIB=ranlib +SED=sed +SHELL=/bin/sh +endif + +all: $(PROG) + +$(PROG): $(OBJ) + $(RM) $(PROG) + $(AR) $(PROG) $(OBJ) + $(RANLIB) $(PROG) + +depend: + $(MV) makefile makefile.bak + $(SED) -ne '1,/^# DO NOT DELETE THIS LINE/p' makefile.bak>makefile + $(CC) $(INCFLAGS) -M $(SRC) >> makefile + +clean: + $(RM) $(PROG) + $(RM) $(OBJ) + $(RM) *~ + +distclean: + $(RM) $(PROG) + $(RM) $(OBJ) + $(RM) *~ + $(MV) makefile Makefile.bak + $(SED) -ne '1,/^# DO NOT DELETE THIS LINE/p' makefile.bak>makefile + $(RM) makefile.bak + +# DO NOT DELETE THIS LINE +item.o: item.c /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h /usr/include/string.h /usr/include/strings.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/common.h ../include/char.h ../include/char_base.h \ + ../include/skill.h ../include/util.h /usr/include/sys/time.h \ + /usr/include/bits/time.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/buf.h ../include/function.h ../include/magic_base.h +item_event.o: item_event.c /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/ctype.h /usr/include/bits/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/libio.h /usr/include/_G_config.h \ + /usr/include/bits/stdio_lim.h ../include/char.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/configfile.h ../include/item_event.h ../include/object.h \ + ../include/anim_tbl.h ../include/magic.h ../include/handletime.h \ + ../include/log.h ../include/encount.h ../include/battle.h \ + ../include/battle_item.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h +item_gen.o: item_gen.c /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h /usr/include/string.h /usr/include/strings.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + /usr/include/ctype.h /usr/include/math.h /usr/include/bits/huge_val.h \ + /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/float.h \ + ../include/configfile.h ../include/common.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/bits/time.h ../include/buf.h \ + ../include/char.h ../include/char_base.h ../include/skill.h \ + ../include/title.h ../include/addressbook.h ../include/net.h \ + /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/item_gen.h ../include/enemy.h ../include/log.h +item_trade.o: item_trade.c /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h /usr/include/string.h /usr/include/strings.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + /usr/include/ctype.h /usr/include/math.h /usr/include/bits/huge_val.h \ + /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/float.h \ + ../include/configfile.h ../include/common.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/bits/time.h ../include/buf.h \ + ../include/char.h ../include/char_base.h ../include/skill.h \ + ../include/title.h ../include/addressbook.h ../include/net.h \ + /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/item_gen.h ../include/enemy.h ../include/log.h \ + ../include/item_trade.h diff --git a/gmsv/link.c b/gmsv/link.c new file mode 100644 index 0000000..f71d32d --- /dev/null +++ b/gmsv/link.c @@ -0,0 +1,153 @@ +#include +#include "version.h" +#include "link.h" +#include "buf.h" + +/* + * 伉件弁及 卞勾仃月 + * 娄醒 + * top 玄永皿用□玉 + * add 尥仃笛尹月用□玉及 毛忡 允月用□玉尺及禾奶件正□ + * 忒曰袄 + * TRUE(1) 岳 + * FALSE(0) 撩 + */ +BOOL Nodeappendtail( Node** top , Node* add ) +{ + Node* c; /*伙□皿迕*/ + Node* next; /*蕙仄仁综月用□玉迕*/ + + /*玄永皿互NULL井升丹井及民尼永弁*/ + if( *top == NULL ){ + *top = allocateMemory( sizeof( Node ) ); + if( *top== NULL ) return FALSE; + (*top)->next = NULL; /*粮五反 中*/ + (*top)->size = add->size; /*赢今及忡栋*/ + (*top)->val = add->val; /*禾奶件正□及戊疋□*/ + return TRUE; + } + + for( c = *top ; c->next ; c = c->next ); /* c及匏 毛内日允 */ + next = allocateMemory( sizeof(Node) ); + if( next == NULL )return FALSE; + c->next = next; /* next卞袄毛涩烂允月 */ + next->next = NULL; /*粮五反 中*/ + next->val = add->val; /*禾奶件正□及戊疋□*/ + next->size = add->size; /*赢今及忡栋*/ + return TRUE; +} + + + + +/* + * 伉件弁及蟆卞勾仃月 + * 娄醒 + * top 玄永皿用□玉 + * add 尥仃笛尹月用□玉及 毛忡 允月用□玉尺及禾奶件正□ + * 忒曰袄 + * TRUE(1) 岳 + * FALSE(0) 撩 + */ +BOOL Nodeappendhead( Node** nowtop , Node* add ) +{ + Node* newtop; /*蕙仄中燮 迕*/ + + /*玄永皿互NULL井升丹井及民尼永弁*/ + if( *nowtop == NULL ){ + *nowtop = allocateMemory( sizeof( Node ) ); + if( *nowtop == NULL ) return FALSE; + (*nowtop)->next = NULL; /*粮五反 中*/ + (*nowtop)->size = add->size; /*赢今及忡栋*/ + (*nowtop)->val = add->val; /*禾奶件正□及戊疋□*/ + return TRUE; + } + + /* + * 蕙仄中用□玉毛域勾综月 + * next 互犒允手及毛 nowtop 卞允月[ + * nowtop 卞反 割忡仄凶 newtop 毛医 允月[ + */ + newtop = allocateMemory( sizeof(Node) ); + newtop->next = *nowtop; + newtop->val = add->val; + newtop->size = add->size; + *nowtop = newtop; + return TRUE; +} + + + + +/* + * 域 赓及用□玉毛娄醒卞戊疋□仄化潸曰轮仁 + * 娄醒 + * top 用□玉及燮 + * ret 潸曰轮中凶用□玉及戊疋□ + * 忒曰袄 + * TRUE(1) 岳 + * FALSE(0) 撩 用□玉及燮 互NULL + */ +BOOL Noderemovehead( Node** top , Node* ret) +{ + Node* newtop; /*蕙仄仁燮 卞卅月用□玉*/ + + if( *top == NULL )return FALSE; + + ret->val = (*top)->val; + ret->size = (*top)->size; + newtop = (*top)->next; + freeMemory( *top ); + *top = newtop; + + return TRUE; +} + + + + + +/* + * 域 及用□玉毛娄醒卞戊疋□仄化潸曰轮仁 + * 娄醒 + * top 用□玉及燮 + * ret 潸曰轮中凶用□玉及戊疋□ + * 忒曰袄 + * TRUE(1) 岳 + * FALSE(0) 撩 用□玉及燮 互NULL + */ +BOOL Noderemovetail( Node** top , Node* ret) +{ + Node* c; /*伙□皿迕*/ + Node* c1; /*伙□皿迕 中勾匹手 c->next毛隙允*/ + + if( *top == NULL )return FALSE; + + c = *top; /*赓渝袄涩烂*/ + c1 = c->next; /*赓渝袄涩烂*/ + while(1){ + if( c1->next == NULL ) + /* + * 仇及凛鳔匹 c1 + * | + * c ---> +------+ + * | next |---->+------+ + * |------| | next |---->NULL + * | | +------+ + * +------+ | | + * +------+ + *午卅匀化中月 + */ + break; + c=c->next; + c1=c->next; + } + c->next = NULL; /*c1卞丐凶月手及毛绰轮允月及匹next反NULL午允月*/ + /*戊疋□*/ + ret->val = c1->val; + ret->size = c1->size; + + freeMemory( c1 ); + + return TRUE; +} diff --git a/gmsv/log.c b/gmsv/log.c new file mode 100644 index 0000000..922a98f --- /dev/null +++ b/gmsv/log.c @@ -0,0 +1,926 @@ +#include "version.h" +#include +#include +#include +#include + +#include "common.h" +#include "util.h" +#include "log.h" +#include "handletime.h" +#include "net.h" +#include "char_base.h" + +/* + * + * 夫弘白央奶伙及潘 反append 允月手及午仄卅中手及互丐月[ + * append允月手及反 赓卞白央奶伙毛夫日中化云仁[ + * 公丹匹卅中手及反踏五仇心及凶太卞fopen(..,"w")允月 + * by ringo + */ + +struct tagLogconf{ + char* label; + char* entry; + char filename[256]; + FILE* f; + BOOL append; /* append 允月井}踏五仇心及凶太卞SEEK_SET允月井 */ +}LogConf[LOG_TYPE_NUM]={ + { "TALK: ", "talklog" ,"", NULL , TRUE}, + { "PROC: ", "proc" , "" , NULL , FALSE}, + { "ITEM: ", "itemlog" ,"", NULL , TRUE}, + { "STONE: ", "stonelog" ,"", NULL , TRUE}, + { "PET: ", "petlog" ,"", NULL , TRUE}, + { "TENSEI: ", "tenseilog" ,"", NULL , TRUE}, + { "KILL: ", "killlog","",NULL,TRUE}, + // CoolFish: 2001/4/19 + { "TRADE: ", "tradelog", "", NULL, TRUE}, + // Arminius: 2001/6/14 + { "HACK: ", "hacklog", "", NULL, TRUE}, + // Nuke: 0626 Speed + { "SPEED: ", "speedlog", "", NULL, TRUE}, + // CoolFish: FMPopular 2001/9/12 + { "FMPOP: ", "fmpoplog", "", NULL, TRUE}, + // Robin 10/02 + { "FAMILY: ", "familylog", "", NULL, TRUE}, + // Shan 11/02 + { "GM: ", "gmlog", "", NULL, TRUE}, + // Terry 2001/09/28 +#ifdef _SERVICE + { "SERVICE: ", "servicelog", "", NULL, TRUE}, +#endif +#ifdef _GAMBLE_ROULETTE + { "", "gamblelog", "", NULL, TRUE}, +#endif +#ifdef _TEST_PETCREATE + { "", "creatpetlog", "", NULL, TRUE}, + { "", "creatpetavglog", "", NULL, TRUE}, +#endif + { "LOGIN: ", "loginlog", "", NULL, TRUE}, + { "", "pettranslog", "", NULL, TRUE}, +//Syu 增加庄园战胜负Log + { "FMPKRESULT: ", "fmpkresultlog" ,"", NULL , TRUE}, + +// Syu ADD 新增家族个人银行存取Log (不含家族银行) + { "BANKSTONELOG: ", "bankstonelog" ,"", NULL , TRUE}, + + { "ACMESSAGE: ", "acmessagelog" ,"", NULL , TRUE}, + { "PKCONTEND:", "pkcontendlog", "", NULL, TRUE}, +#ifdef _STREET_VENDOR + { "STREETVENDOR: ", "StreetVendorlog" ,"", NULL , TRUE}, +#endif +#ifdef _ANGEL_SUMMON + { "ANGEL: ", "angellog" ,"", NULL , TRUE}, +#endif +#ifdef _LOG_OTHER + { "OTHER: ", "otherlog" ,"", NULL , TRUE}, +#endif +#ifdef _NEW_MANOR_LAW + { "FMPKGETMONEY: ","FMPKGetMoneylog","",NULL,TRUE}, + { "FMFAMESHOP: ","FMFameShoplog","",NULL,TRUE}, +#endif +}; + +tagWarplog warplog[MAXMAPNUM]; +tagWarpCount warpCount[MAXMAPLINK]; + +/*------------------------------------------------------------ + * 夫弘涩烂白央奶伙毛 氏匹 file 毛钒仁 + * 娄醒 + * filename char* 夫弘涩烂白央奶伙 + * 忒曰袄 + * FALSE 反褐 卅撩 匹丐月[ + ------------------------------------------------------------*/ +static BOOL readLogConfFile( char* filename ) +{ + FILE* f; + char line[256]; + char basedir[256]; + int linenum=0; + + { + char* r; + r = rindex( filename, '/' ); + if( r == NULL )snprintf(basedir,sizeof(basedir),"." ); + else{ + memcpy( basedir,filename,r-filename ); + basedir[r-filename] = '\0'; + } + } + + f = fopen( filename , "r"); + if( f == NULL ){ + print( "Can't open %s\n" , filename ); + return FALSE; + } + while( fgets( line, sizeof( line ) ,f ) ){ + char firstToken[256]; + int i; + BOOL ret; + + linenum++; + deleteWhiteSpace(line); /* remove whitespace */ + if( line[0] == '#' )continue; /* comment */ + if( line[0] == '\n' )continue; /* none */ + chomp( line ); /* remove tail newline */ + ret = getStringFromIndexWithDelim( line , "=", 1, firstToken, sizeof(firstToken) ); + if( ret == FALSE ){ + print( "Find error at %s in line %d. Ignore\n", + filename , linenum); + continue; + } + for( i=0 ; i= LOG_TYPE_NUM )return; + if( LogConf[logtype].append ){ + if( !LogConf[logtype].f )return; + fputs( LogConf[logtype].label, LogConf[logtype].f); + va_start(arg,format); + vfprintf( LogConf[logtype].f,format,arg ); + va_end( arg ); + fputc( '\n', LogConf[logtype].f ); + } else { + FILE *f = fopen( LogConf[logtype].filename ,"w" ); + if( !f ) return; + fputs(LogConf[logtype].label , f ); + va_start(arg,format); + vfprintf( f , format,arg); + va_end(arg); + fputc( '\n' , f); + fclose(f); + } +} + +BOOL initLog( char* filename ) +{ + if( readLogConfFile( filename ) == FALSE )return FALSE; + openAllLogFile(); + return TRUE; +} + +//Syu 增加庄园战胜负Log +void Logfmpk( + char *winner, int winnerindex, int num1, + char *loser, int loserindex, int num2, + char *date, char *buf1, char *buf2, int flg) +{ + switch( flg){ + case 1: + { + struct tm tm1; + char buf[256]; + memcpy( &tm1, localtime( (time_t *)&NowTime.tv_sec), sizeof( tm1)); + sprintf( buf, " (%d:%d)", tm1.tm_hour, tm1.tm_min); + printl( LOG_FMPKRESULT, "\nFMPK: [%s]地点:%s %s(%d) 约战要求 %s(%d) time:%s", + buf1, buf2, + winner, winnerindex, loser, loserindex, buf); + } + break; + case 2: + printl( LOG_FMPKRESULT, "\nFMPK: Winner %s(%d)=>%d Loser %s(%d)=>%d time:%s", + winner, winnerindex, num1, + loser, loserindex, num2 ,date); + break; + } +} + +#ifdef _NEW_MANOR_LAW +void LogFMPKGetMomey(char *szFMName,char *szID,char *szCharName,int iMomentum,int iGetMoney,int iDest) +{ + struct tm tm1; + char szDest[3][6] = {"身上","银行","错误"}; + + if(iDest < 0 || iDest > 1) iDest = 2; + memcpy(&tm1,localtime((time_t*)&NowTime.tv_sec),sizeof(tm1)); + printl(LOG_FMPK_GETMONEY,"FMName:%s\tID:%s\tName:%s\tMomentum:%d\tGetMoney:%d\tAddTo:%s\t(%d:%d)", + szFMName,szID,szCharName,iMomentum,iGetMoney,szDest[iDest],tm1.tm_hour,tm1.tm_min); +} + +void LogFMFameShop(char *szFMName,char *szID,char *szCharName,int iFame,int iCostFame) +{ + struct tm tm1; + + memcpy(&tm1,localtime((time_t*)&NowTime.tv_sec),sizeof(tm1)); + printl(LOG_FM_FAME_SHOP,"FMName:%s\tID:%s\tName:%s\tFame:%d\tCostFame:%d\t(%d:%d)", + szFMName,szID,szCharName,iFame,iCostFame,tm1.tm_hour,tm1.tm_min); +} +#endif + +void LogAcMess( int fd, char *type, char *mess ) +{ + struct tm tm1; + memcpy( &tm1, localtime( (time_t *)&NowTime.tv_sec), sizeof( tm1)); + if( strstr( mess, "Broadcast") != NULL ) return; + printl( LOG_ACMESS, "%d %s [%s] (%d:%d)" , fd, type, mess, tm1.tm_hour, tm1.tm_min); +} + +void LogItem( + char *CharName, /* 平乓仿弁正 */ + char *CharID, /* 平乓仿弁正ID */ + int ItemNo, /* 失奶 丞 寞 */ + char *Key, /* 平□伐□玉 */ + int floor, /* 甄 */ + int x, + int y, + char *uniquecode, // shan 2001/12/14 + char *itemname, int itemID +){ + struct tm tm1; + memcpy( &tm1, localtime( (time_t *)&NowTime.tv_sec), sizeof( tm1)); + + printl( LOG_ITEM, "%s\t%s\t%d(%s)=%s,(%d,%d,%d)(%d:%d),%s" , CharName, CharID, + itemID, itemname, + Key, floor, x, y, tm1.tm_hour, tm1.tm_min, uniquecode ); + + +} +void LogPkContend( char *teamname1, char *teamname2, + int floor, + int x, + int y, + int flg +) +{ + struct tm tm1; + memcpy( &tm1, localtime( (time_t *)&NowTime.tv_sec), sizeof( tm1)); + + if( flg == 0 ) { + printl( LOG_PKCONTEND, "[%32s 胜 %32s],(%5d,%4d,%4d)(%d:%d)" , + teamname1, teamname2, + floor, x, y, tm1.tm_hour, tm1.tm_min); + }else{ + printl( LOG_PKCONTEND, "Msg:[%s],(%5d,%4d,%4d)(%d:%d)" , + teamname1, floor, x, y, tm1.tm_hour, tm1.tm_min); + } + +} + +void LogPetTrans( + char *cdkey, char *uniwuecde, char *uniwuecde2, + char *CharName, int floor, int x, int y, + int petID1, char *PetName1, int petLV, int petrank, int vital1, int str1, int tgh1, int dex1, int total1, + int petID2, char *PetName2, int vital2, int str2, int tgh2, int dex2, int total2, + int work0, int work1, int work2, int work3, int ans, int trans + ){ + struct tm tm1; + memcpy( &tm1, localtime( (time_t *)&NowTime.tv_sec), sizeof( tm1)); + printl( PETTRANS, "\n*PETTRANS cdkey=%s unid=%s munid=%s %s (%d:%d) %d=%s LV:%d rand:%d trans:%d :[ %d, %d, %d, %d]=%d %d=%s :[ %d, %d, %d, %d]=%d [ %d, %d, %d, %d]=%d\n", + cdkey, uniwuecde, uniwuecde2, + CharName, tm1.tm_hour, tm1.tm_min, + petID1, PetName1, petLV, petrank, trans, vital1, str1, tgh1, dex1, total1, + petID2, PetName2, vital2, str2, tgh2, dex2, total2, + work0, work1, work2, work3, ans ); +} +/*------------------------------------------------------------ + * + * 矢永玄夫弘毛潸月 + * +-------------------------------------------------------------*/ +void LogPet( + char *CharName, /* 平乓仿弁正 */ + char *CharID, + char *PetName, + int PetLv, + char *Key, /* 平□伐□玉 */ + int floor, /* 甄 */ + int x, + int y, + char *uniquecode // shan 2001/12/14 +){ + struct tm tm1; + memcpy( &tm1, localtime( (time_t *)&NowTime.tv_sec), sizeof( tm1)); + // shan 2001/12/14 + //printl( LOG_PET, "%s\t%s\t%s:%d=%s,(%d,%d,%d)(%d:%d)" , CharName, CharID, + // PetName, PetLv, + // Key, + // floor, x, y, tm1.tm_hour, tm1.tm_min ); + printl( LOG_PET, "%s\t%s\t%s:%d=%s,(%d,%d,%d)(%d:%d),%s" , CharName, CharID, + PetName, PetLv, + Key, + floor, x, y, tm1.tm_hour, tm1.tm_min, uniquecode); +} + +#ifdef _STREET_VENDOR +void LogStreetVendor( + char *SellName, + char *SellID, + char *BuyName, + char *BuyID, + char *ItemPetName, + int PetLv, //若是道具此值为 -1 + int iPrice, + char *Key, + int Sfloor, + int Sx, + int Sy, + int Bfloor, + int Bx, + int By, + char *uniquecode +){ + struct tm tm1; + memcpy(&tm1,localtime((time_t *)&NowTime.tv_sec),sizeof(tm1)); + printl(LOG_STREET_VENDOR,"Sell:%s\t%s\tBuy:%s\t%s\tName=%s:Lv=%d|Price:%d,%s,SXY(%d,%d,%d)BXY(%d,%d,%d)(%d:%d),%s",SellName,SellID,BuyName,BuyID, + ItemPetName,PetLv,iPrice,Key,Sfloor,Sx,Sy,Bfloor,Bx,By,tm1.tm_hour,tm1.tm_min,uniquecode); +} +#endif + +void LogBankStone( + char *CharName, /* 平乓仿弁正 */ + char *CharId, /* 交□扒□ID */ + int meindex, + int Gold, /* 嗯喊 */ + char *Key, /* 平□伐□玉 */ + int floor, /* 甄 */ + int x, + int y, + int my_gold, + int my_personagold + +){ + struct tm tm1; + + memcpy( &tm1, localtime( (time_t *)&NowTime.tv_sec), sizeof( tm1)); + printl( LOG_STONE, "%s:%s\ts:%d=%s,(%d,%d,%d)(%d:%d) <>" , + CharId, CharName, Gold, Key, + floor, x, y, tm1.tm_hour, tm1.tm_min , my_gold, my_personagold ); +} + +void LogPetPointChange( + char * CharName, char *CharID, char *PetName, int petindex, int errtype, + int PetLv, char *Key,int floor, int x, int y) { + + struct tm tm1; + int vit,str,tgh,dex; + int l_vit,l_str,l_tgh,l_dex; + int pet_ID, levellvup; + + pet_ID = CHAR_getInt( petindex, CHAR_PETID ); + vit = CHAR_getInt( petindex, CHAR_VITAL ); + str = CHAR_getInt( petindex, CHAR_STR ); + tgh = CHAR_getInt( petindex, CHAR_TOUGH ); + dex = CHAR_getInt( petindex, CHAR_DEX ); + levellvup = CHAR_getInt( petindex, CHAR_ALLOCPOINT); + + l_vit = (levellvup >> 24); + l_str = (levellvup >> 16)&0xff; + l_tgh = (levellvup >> 8 )&0xff; + l_dex = (levellvup >> 0 )&0xff; + + memcpy( &tm1, localtime( (time_t *)&NowTime.tv_sec), sizeof( tm1)); + printl( LOG_PET, "%s\t%s\t%s:%d=%s,(%d,%d,%d)(%d:%d),err:%d %d<<%d,%d,%d,%d>>lvup<<%d,%d,%d,%d>>" , + CharName, CharID, PetName, PetLv, Key, floor, x, y, tm1.tm_hour, tm1.tm_min , errtype, + pet_ID ,vit,str,tgh,dex,l_vit,l_str,l_tgh,l_dex); +} + +/*------------------------------------------------------------ + * + * 鳖戏夫弘毛潸月 + * +-------------------------------------------------------------*/ +void LogTensei( + char *CharName, /* 平乓仿弁正 */ + char *CharID, + char *Key, /* 平□伐□玉 */ + int level, //伊矛伙 + int transNum, //鳖戏荚醒 + int quest, //弁巨旦玄醒 + int home, //请褥哗 + int item, // 笛失奶 丞 井曰醒 + int pet, // 笛矢永玄 井曰醒 + int vital, // 祭蟆Vital + int b_vital, // 祭 vital + int str, // 祭蟆str + int b_str, // 祭 str + int tgh, // 祭蟆 + int b_tgh, // 祭 + int dex, // 祭蟆 + int b_dex // 祭 +){ + struct tm tm1; + memcpy( &tm1, localtime( (time_t *)&NowTime.tv_sec), sizeof( tm1)); + printl( LOG_TENSEI, "%s\t%s\t%s=(%d,%d,%d,%d,%d,%d),(vi=%d->%d,str=%d->%d,tgh=%d->%d,dex=%d->%d),(%d,%d)" + ,CharName, + CharID, + Key, + level, + transNum, + quest, + home, + item, + pet, + vital, + b_vital, + str, + b_str, + tgh, + b_tgh, + dex, + b_dex, + tm1.tm_hour, tm1.tm_min + ); +} + +// LOG_TALK +void LogTalk( + char *CharName, /* 平乓仿弁正 */ + char *CharID, + int floor, /* 甄 */ + int x, + int y, + char *message +){ + struct tm tm1; + memcpy( &tm1, localtime( (time_t *)&NowTime.tv_sec), sizeof( tm1)); + + printl( LOG_TALK, "%2d:%2d\t%s\t%s\t%d_%d_%d\tT=%s" , + tm1.tm_hour, tm1.tm_min, + (CharID==NULL) ? "(null)" :CharID, + (CharName==NULL) ? "(null)" :CharName, + floor, x, y, + message ); + + +} +#ifdef _TEST_PETCREATE +void backupTempLogFile( char *buf, char *entryname, int Num) +{ + int i; + char szBuffer[256]; + //entry + for( i=0 ; itm_year+1900, ptm->tm_mon+1, ptm->tm_mday ); + + if( LogConf[i].f != NULL ){ + /* 左□皿件今木化中凶日弁夫□术 */ + fclose( LogConf[i].f ); + /* 伉生□丞 */ + rename( LogConf[i].filename, szBuffer ); + /* 疯太左□皿件 */ + LogConf[i].f = fopen( LogConf[i].filename , "a" ); + + }else{ + /* 伉生□丞 */ + rename( LogConf[i].filename, szBuffer ); + /* 疯太左□皿件 */ + LogConf[i].f = fopen( LogConf[i].filename , "a" ); + + } + } +} +/*------------------------------------------------------------ +* +* 云嗯毛胶丹 +* +-------------------------------------------------------------*/ +// Syu ADD 新增家族个人银行存取Log (不含家族银行) +void LogFamilyBankStone( + char *CharName, + char *CharId, + int Gold, + int MyGold, + char *Key, + int floor, + int x, + int y, + int banksum +){ + struct tm tm1; + memcpy( &tm1, localtime( (time_t *)&NowTime.tv_sec), sizeof( tm1)); + printl( LOG_BANKSTONELOG, "%s:%s\t%d=%s [%d] CHAR_GOLD(%d),(%d,%d,%d)(%d:%d)" , CharId, CharName, Gold, Key,banksum, + MyGold, floor, x, y, tm1.tm_hour, tm1.tm_min ); + print("\n%s:%s\t%d=%s [%d] CHAR_GOLD(%d),(%d,%d,%d)(%d:%d)\n" , CharId, CharName, Gold, Key,banksum, + MyGold, floor, x, y, tm1.tm_hour, tm1.tm_min ); +} + +void LogStone( + int TotalGold, + char *CharName, /* 平乓仿弁正 */ + char *CharId, /* 交□扒□ID */ + int Gold, /* 嗯喊 */ + int MyGold, + char *Key, /* 平□伐□玉 */ + int floor, /* 甄 */ + int x, + int y +){ + struct tm tm1; + memcpy( &tm1, localtime( (time_t *)&NowTime.tv_sec), sizeof( tm1)); + if(TotalGold == -1){ + printl( LOG_STONE, "%s:%s\t%d=%s TOTAL_GOLD(%d),CHAR_GOLD(%d),(%d,%d,%d)(%d:%d)" , CharId, CharName, Gold, Key,TotalGold, + MyGold, floor, x, y, tm1.tm_hour, tm1.tm_min ); + } + else{ + printl( LOG_STONE, "%s:%s\t%d=%s CHAR_GOLD(%d),(%d,%d,%d)(%d:%d)" , CharId, CharName, Gold, Key, + MyGold, floor, x, y, tm1.tm_hour, tm1.tm_min ); + } +} + +//ttom 12/26/2000 print the kill log +void LogKill( + char *CharName, + char *CharId, + char *CharPet_Item +){ + struct tm tm1; + memcpy( &tm1, localtime( (time_t *)&NowTime.tv_sec), sizeof( tm1)); + printl( LOG_KILL, "Name=%s:ID=%s\t%s (%d:%d)" ,CharName,CharId, CharPet_Item, + tm1.tm_hour, tm1.tm_min ); +} +//ttom + +// CoolFish: Trade 2001/4/19 +void LogTrade(char *message) +{ + struct tm tm1; + memcpy( &tm1, localtime( (time_t *)&NowTime.tv_sec), sizeof( tm1)); + printl( LOG_TRADE, "%s (%d:%d)" , message, tm1.tm_hour, tm1.tm_min ); +} + +// CoolFish: Family Popular 2001/9/12 +void LogFMPOP(char *message) +{ + struct tm tm1; + memcpy( &tm1, localtime( (time_t *)&NowTime.tv_sec), sizeof( tm1)); + + printl( LOG_FMPOP, "%s (%d:%d)" , message, tm1.tm_hour, tm1.tm_min ); +} + +// Arminius 2001/6/14 +char hackmsg[HACK_TYPE_NUM][4096]= + { "??? 什麽事也没有发生", + "无法取得通讯协定码", + "收到无法辨识的通讯协定码", + "检查码错误", + "人物的HP为负", + }; + +void logHack(int fd, int errcode) +{ + struct tm tm1; + char cdkey[4096]; + char charname[4096]; + unsigned long ip; + char ipstr[4096]; + + memcpy( &tm1, localtime( (time_t *)&NowTime.tv_sec), sizeof( tm1)); + CONNECT_getCdkey( fd, cdkey, 4096); + CONNECT_getCharname( fd, charname, 4096); + ip=CONNECT_get_userip(fd); + sprintf(ipstr,"%d.%d.%d.%d", + ((unsigned char *)&ip)[0], + ((unsigned char *)&ip)[1], + ((unsigned char *)&ip)[2], + ((unsigned char *)&ip)[3]); + if ((errcode<0) || (errcode>=HACK_TYPE_NUM)) errcode=HACK_NOTHING; + + printl( LOG_HACK, "(%d:%d) %s ip=%s cdkey=%s charname=%s", + tm1.tm_hour, tm1.tm_min, hackmsg[errcode], ipstr, cdkey, charname); +} + +// Nuke 0626 +void logSpeed(int fd) +{ + struct tm tm1; + char cdkey[4096]; + char charname[4096]; + unsigned long ip; + char ipstr[4096]; + + memcpy( &tm1, localtime( (time_t *)&NowTime.tv_sec), sizeof( tm1)); + CONNECT_getCdkey( fd, cdkey, 4096); + CONNECT_getCharname( fd, charname, 4096); + ip=CONNECT_get_userip(fd); + sprintf(ipstr,"%d.%d.%d.%d", + ((unsigned char *)&ip)[0], + ((unsigned char *)&ip)[1], + ((unsigned char *)&ip)[2], + ((unsigned char *)&ip)[3]); + printl( LOG_SPEED, "(%d:%d) ip=%s cdkey=%s charname=%s", + tm1.tm_hour, tm1.tm_min, ipstr, cdkey, charname); +} + +// Shan +void LogGM( + char *CharName, //角色名称 + char *CharID, //玩家ID + char *Message, //指令内容 + int floor, + int x, + int y +) +{ + struct tm tm1; + + memcpy(&tm1,localtime((time_t *)&NowTime.tv_sec),sizeof(tm1)); + printl(LOG_GM,"%s\t%s\t%s\t(%d,%d,%d)\t(%d:%d)", + CharName,CharID,Message,floor,x,y,tm1.tm_hour,tm1.tm_min); +} + +// Robin 10/02 +void LogFamily( + char *FMName, + int fmindex, + char *charName, + char *charID, + char *keyWord, + char *data +){ + struct tm tm1; + memcpy( &tm1, localtime( (time_t *)&NowTime.tv_sec), sizeof( tm1)); + // CoolFish: 2001/10/11 log time + printl( LOG_FAMILY, "%s\t%d\t%s\t%s\t= %s, %s (%d:%d)", + FMName, fmindex, charName, charID, + keyWord, data, tm1.tm_hour, tm1.tm_min ); +} + +// Terry 2001/09/28 +#ifdef _SERVICE +void LogService( + char *CharName, //角色名称 + char *CharID, //玩家ID + int itemid, //物品ID + char *Key, //说明 + int floor, + int x, + int y +) +{ + struct tm tm1; + + memcpy(&tm1,localtime((time_t *)&NowTime.tv_sec),sizeof(tm1)); + printl(LOG_SERVICE,"%s\t%s\t%d=%s,(%d,%d,%d)(%d:%d)", + CharName,CharID,itemid,Key,floor,x,y,tm1.tm_hour,tm1.tm_min); + print("%s\t%s\t%d=%s,(%d,%d,%d)(%d:%d)", + CharName,CharID,itemid,Key,floor,x,y,tm1.tm_hour,tm1.tm_min); +} +#endif + +#ifdef _TEST_PETCREATE +void LogCreatPet( + char *PetName, int petid, int lv, int hp, + int char_vital, int char_str, int char_tgh, int char_dex, + int vital, int str, int tgh, int dex, + int fixstr, int fixtgh, int fixdex, + int lvup, int petrank, + int flg + ) { + struct tm tm1; + memcpy(&tm1,localtime((time_t *)&NowTime.tv_sec),sizeof(tm1)); + if( flg == 0 ) { + printl(LOG_CREATPET,"%s,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,power,%d,%d,%d", + PetName, petid, lv, hp, char_vital/100, char_str/100, char_tgh/100, char_dex/100, + vital, str, tgh, dex, lvup, petrank,fixstr,fixtgh,fixdex); + }else { + printl(LOG_AVGCREATPET,"%s,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,power,%d,%d,%d", + PetName, petid, lv, hp, char_vital/100, char_str/100, char_tgh/100, char_dex/100, + vital, str, tgh, dex, lvup, petrank,fixstr,fixtgh,fixdex); + } +} +#endif + +#ifdef _GAMBLE_ROULETTE +void LogGamble( + char *CharName, //角色名称 + char *CharID, //玩家ID + char *Key, //说明 + int floor, + int x, + int y, + int player_stone, //所拥有金钱 + int Gamble_stone, //下注本金 + int get_stone, //获得 + int Gamble_num, + int flg //flg = 1 玩家 2 庄家 +) +{ + struct tm tm1; + memcpy(&tm1,localtime((time_t *)&NowTime.tv_sec),sizeof(tm1)); + + if( flg == 1 ) { + printl(LOG_GAMBLE,"%s\t%s\t TYPE:%s <>\t(%d,%d,%d)-(%d:%d) GAMBLENUM=%d", + CharName,CharID,Key, player_stone, Gamble_stone, get_stone, floor,x,y,tm1.tm_hour,tm1.tm_min, Gamble_num); + }else if( flg == 2 ) { + printl(LOG_GAMBLE,"%s\tROULETTE MASTER\t TYPE:%s <>\t(%d,%d,%d)-(%d:%d)", + CharName,Key, player_stone, floor,x,y,tm1.tm_hour,tm1.tm_min); + } +} + +#endif + +void LogLogin( + char *CharID, //玩家ID + char *CharName, //角色名称 + int saveIndex, + char *ipadress +) +{ + struct tm tm1; + + memcpy(&tm1,localtime((time_t *)&NowTime.tv_sec),sizeof(tm1)); + + printl(LOG_LOGIN,"%s\t%s\ti=%d\t%s\t(%d:%d)", + CharID,CharName,saveIndex,ipadress,tm1.tm_hour,tm1.tm_min); + +} + + +void warplog_to_file() +{ + int i =0; + char outbuf[128]; + FILE *f; + f = fopen("log/warp1.log" ,"w" ); + if( !f ) return; + + for( i=0; i +#include +#include + + +void lssproto_SetServerLogFiles( char *r , char *w ) +{ + lssproto_strcpysafe( lssproto_writelogfilename , w , sizeof(lssproto_writelogfilename )); + lssproto_strcpysafe( lssproto_readlogfilename , r , sizeof(lssproto_readlogfilename )); +} +int lssproto_InitServer( int (*writefunc)(int,char*,int) , int worksiz ) +{ + int i; + if( (void*)writefunc == NULL){lssproto.write_func = lssproto_default_write_wrap;} else {lssproto.write_func = writefunc;} + lssproto_AllocateCommonWork(worksiz); + lssproto_stringwrapper = (char**)calloc( 1,sizeof(char*) * MAXLSRPCARGS); + if(lssproto_stringwrapper ==NULL)return -1; + memset( lssproto_stringwrapper , 0, sizeof(char*)*MAXLSRPCARGS); + for(i=0;i",fd,__LINE__,func) + +int lssproto_ServerDispatchMessage(int fd, char *encoded) +{ + int func,fieldcount; + char raw[65500]; + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + + util_DecodeMessage(raw,encoded); + + if( !util_SplitMessage(raw,SEPARATOR) ){ + print("\nDME1:package=%s\n",raw); + DME(); return -1; + } + if (!util_GetFunctionFromSlice(&func, &fieldcount)) { + logHack(fd,HACK_GETFUNCFAIL); + DME(); return -1; + } + + if (func==LSSPROTO_W_RECV) { + int checksum=0, checksumrecv; + int x; + int y; + char direction[65500]; + + checksum += util_deint(2, &x); + checksum += util_deint(3, &y); + checksum += util_destring(4, direction); + util_deint(5, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_W_recv(fd, x, y, direction); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_W2_RECV) { + int checksum=0, checksumrecv; + int x; + int y; + char direction[65500]; + + checksum += util_deint(2, &x); + checksum += util_deint(3, &y); + checksum += util_destring(4, direction); + util_deint(5, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_W2_recv(fd, x, y, direction); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_EV_RECV) { + int checksum=0, checksumrecv; + int event; + int seqno; + int x; + int y; + int dir; + + checksum += util_deint(2, &event); + checksum += util_deint(3, &seqno); + checksum += util_deint(4, &x); + checksum += util_deint(5, &y); + checksum += util_deint(6, &dir); + util_deint(7, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_EV_recv(fd, event, seqno, x, y, dir); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_DU_RECV) { + int checksum=0, checksumrecv; + int x; + int y; + + checksum += util_deint(2, &x); + checksum += util_deint(3, &y); + util_deint(4, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_DU_recv(fd, x, y); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_EO_RECV) { + int checksum=0, checksumrecv; + int dummy; + + checksum += util_deint(2, &dummy); + util_deint(3, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_EO_recv(fd, dummy); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_BU_RECV) { + int checksum=0, checksumrecv; + int dummy; + + checksum += util_deint(2, &dummy); + util_deint(3, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_BU_recv(fd, dummy); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_JB_RECV) { + int checksum=0, checksumrecv; + int x; + int y; + + checksum += util_deint(2, &x); + checksum += util_deint(3, &y); + util_deint(4, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_JB_recv(fd, x, y); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_LB_RECV) { + int checksum=0, checksumrecv; + int x; + int y; + + checksum += util_deint(2, &x); + checksum += util_deint(3, &y); + util_deint(4, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_LB_recv(fd, x, y); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_B_RECV) { + int checksum=0, checksumrecv; + char command[65500]; + + checksum += util_destring(2, command); + util_deint(3, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_B_recv(fd, command); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_SKD_RECV) { + int checksum=0, checksumrecv; + int dir; + int index; + + checksum += util_deint(2, &dir); + checksum += util_deint(3, &index); + util_deint(4, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_SKD_recv(fd, dir, index); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_ID_RECV) { + int checksum=0, checksumrecv; + int x; + int y; + int haveitemindex; + int toindex; + + checksum += util_deint(2, &x); + checksum += util_deint(3, &y); + checksum += util_deint(4, &haveitemindex); + checksum += util_deint(5, &toindex); + util_deint(6, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_ID_recv(fd, x, y, haveitemindex, toindex); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_PI_RECV) { + int checksum=0, checksumrecv; + int x; + int y; + int dir; + + checksum += util_deint(2, &x); + checksum += util_deint(3, &y); + checksum += util_deint(4, &dir); + util_deint(5, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_PI_recv(fd, x, y, dir); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_DI_RECV) { + int checksum=0, checksumrecv; + int x; + int y; + int itemindex; + + checksum += util_deint(2, &x); + checksum += util_deint(3, &y); + checksum += util_deint(4, &itemindex); + util_deint(5, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_DI_recv(fd, x, y, itemindex); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_DG_RECV) { + int checksum=0, checksumrecv; + int x; + int y; + int amount; + + checksum += util_deint(2, &x); + checksum += util_deint(3, &y); + checksum += util_deint(4, &amount); + util_deint(5, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_DG_recv(fd, x, y, amount); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_DP_RECV) { + int checksum=0, checksumrecv; + int x; + int y; + int petindex; + + checksum += util_deint(2, &x); + checksum += util_deint(3, &y); + checksum += util_deint(4, &petindex); + util_deint(5, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_DP_recv(fd, x, y, petindex); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_MI_RECV) { + int checksum=0, checksumrecv; + int fromindex; + int toindex; + + checksum += util_deint(2, &fromindex); + checksum += util_deint(3, &toindex); + util_deint(4, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_MI_recv(fd, fromindex, toindex); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_MSG_RECV) { + int checksum=0, checksumrecv; + int index; + char message[65500]; + int color; + + checksum += util_deint(2, &index); + checksum += util_destring(3, message); + checksum += util_deint(4, &color); + util_deint(5, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_MSG_recv(fd, index, message, color); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_PMSG_RECV) { + int checksum=0, checksumrecv; + int index; + int petindex; + int itemindex; + char message[65500]; + int color; + + checksum += util_deint(2, &index); + checksum += util_deint(3, &petindex); + checksum += util_deint(4, &itemindex); + checksum += util_destring(5, message); + checksum += util_deint(6, &color); + util_deint(7, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_PMSG_recv(fd, index, petindex, itemindex, message, color); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_AB_RECV) { + int checksum=0, checksumrecv; + util_deint(2, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_AB_recv(fd); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_DAB_RECV) { + int checksum=0, checksumrecv; + int index; + + checksum += util_deint(2, &index); + util_deint(3, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_DAB_recv(fd, index); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_AAB_RECV) { + int checksum=0, checksumrecv; + int x; + int y; + + checksum += util_deint(2, &x); + checksum += util_deint(3, &y); + util_deint(4, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_AAB_recv(fd, x, y); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_L_RECV) { + int checksum=0, checksumrecv; + int dir; + + checksum += util_deint(2, &dir); + util_deint(3, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_L_recv(fd, dir); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_TK_RECV) { + int checksum=0, checksumrecv; + int x; + int y; + char message[65500]; + int color; + int area; + + checksum += util_deint(2, &x); + checksum += util_deint(3, &y); + checksum += util_destring(4, message); + checksum += util_deint(5, &color); + checksum += util_deint(6, &area); + util_deint(7, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_TK_recv(fd, x, y, message, color, area); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_M_RECV) { + int checksum=0, checksumrecv; + int fl; + int x1; + int y1; + int x2; + int y2; + + checksum += util_deint(2, &fl); + checksum += util_deint(3, &x1); + checksum += util_deint(4, &y1); + checksum += util_deint(5, &x2); + checksum += util_deint(6, &y2); + util_deint(7, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_M_recv(fd, fl, x1, y1, x2, y2); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_C_RECV) { + int checksum=0, checksumrecv; + int index; + + checksum += util_deint(2, &index); + util_deint(3, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_C_recv(fd, index); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_S_RECV) { + int checksum=0, checksumrecv; + char category[65500]; + + checksum += util_destring(2, category); + util_deint(3, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_S_recv(fd, category); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_FS_RECV) { + int checksum=0, checksumrecv; + int flg; + + checksum += util_deint(2, &flg); + util_deint(3, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_FS_recv(fd, flg); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_HL_RECV) { + int checksum=0, checksumrecv; + int flg; + + checksum += util_deint(2, &flg); + util_deint(3, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_HL_recv(fd, flg); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_PR_RECV) { + int checksum=0, checksumrecv; + int x; + int y; + int request; + + checksum += util_deint(2, &x); + checksum += util_deint(3, &y); + checksum += util_deint(4, &request); + util_deint(5, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_PR_recv(fd, x, y, request); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_KS_RECV) { + int checksum=0, checksumrecv; + int petarray; + checksum += util_deint(2, &petarray); + util_deint(3, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_KS_recv(fd, petarray); + util_DiscardMessage(); + return 0; + } + +#ifdef _STANDBYPET + if (func==LSSPROTO_SPET_RECV) { + int checksum=0, checksumrecv; + int standbypet; + checksum += util_deint(2, &standbypet); + util_deint(3, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_SPET_recv(fd, standbypet); + util_DiscardMessage(); + return 0; + } +#endif + +#ifdef _RIGHTCLICK + if (func==LSSPROTO_RCLICK_RECV) { + int checksum=0, checksumrecv; + int type; + char data[1024]; + checksum += util_deint(2, &type); + checksum += util_destring(3, data); + util_deint(4, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_RCLICK_recv(fd, type, data); + util_DiscardMessage(); + return 0; + } +#endif + + if (func==LSSPROTO_AC_RECV) { + int checksum=0, checksumrecv; + int x; + int y; + int actionno; + + checksum += util_deint(2, &x); + checksum += util_deint(3, &y); + checksum += util_deint(4, &actionno); + util_deint(5, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_AC_recv(fd, x, y, actionno); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_MU_RECV) { + int checksum=0, checksumrecv; + int x; + int y; + int array; + int toindex; + + checksum += util_deint(2, &x); + checksum += util_deint(3, &y); + checksum += util_deint(4, &array); + checksum += util_deint(5, &toindex); + util_deint(6, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_MU_recv(fd, x, y, array, toindex); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_PS_RECV) { + int checksum=0, checksumrecv; + int havepetindex; + int havepetskill; + int toindex; + char data[65500]; + + checksum += util_deint(2, &havepetindex); + checksum += util_deint(3, &havepetskill); + checksum += util_deint(4, &toindex); + checksum += util_destring(5, data); + util_deint(6, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_PS_recv(fd, havepetindex, havepetskill, toindex, data); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_ST_RECV) { + int checksum=0, checksumrecv; + int titleindex; + + checksum += util_deint(2, &titleindex); + util_deint(3, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_ST_recv(fd, titleindex); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_DT_RECV) { + int checksum=0, checksumrecv; + int titleindex; + + checksum += util_deint(2, &titleindex); + util_deint(3, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_DT_recv(fd, titleindex); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_FT_RECV) { + int checksum=0, checksumrecv; + char data[65500]; + + checksum += util_destring(2, data); + util_deint(3, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_FT_recv(fd, data); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_SKUP_RECV) { + int checksum=0, checksumrecv; + int skillid; + + checksum += util_deint(2, &skillid); + util_deint(3, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_SKUP_recv(fd, skillid); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_KN_RECV) { + int checksum=0, checksumrecv; + int havepetindex; + char data[65500]; + + checksum += util_deint(2, &havepetindex); + checksum += util_destring(3, data); + util_deint(4, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_KN_recv(fd, havepetindex, data); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_WN_RECV) { + int checksum=0, checksumrecv; + int x; + int y; + int seqno; + int objindex; + int select; + char data[65500]; + + checksum += util_deint(2, &x); + checksum += util_deint(3, &y); + checksum += util_deint(4, &seqno); + checksum += util_deint(5, &objindex); + checksum += util_deint(6, &select); + checksum += util_destring(7, data); + + util_deint(8, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_WN_recv(fd, x, y, seqno, objindex, select, data); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_SP_RECV) { + int checksum=0, checksumrecv; + int x; + int y; + int dir; + + checksum += util_deint(2, &x); + checksum += util_deint(3, &y); + checksum += util_deint(4, &dir); + util_deint(5, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_SP_recv(fd, x, y, dir); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_CLIENTLOGIN_RECV) { + int checksum=0, checksumrecv; + char cdkey[65500]; + char passwd[65500]; + + strcpy(PersonalKey, _DEFAULT_PKEY); + + checksum += util_destring(2, cdkey); + checksum += util_destring(3, passwd); + + util_deint(4, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + + lssproto_ClientLogin_recv(fd, cdkey, passwd); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_CREATENEWCHAR_RECV) { + int checksum=0, checksumrecv; + int dataplacenum; + char charname[65500]; + int imgno; + int faceimgno; + int vital; + int str; + int tgh; + int dex; + int earth; + int water; + int fire; + int wind; + int hometown; + + checksum += util_deint(2, &dataplacenum); + checksum += util_destring(3, charname); + checksum += util_deint(4, &imgno); + checksum += util_deint(5, &faceimgno); + checksum += util_deint(6, &vital); + checksum += util_deint(7, &str); + checksum += util_deint(8, &tgh); + checksum += util_deint(9, &dex); + checksum += util_deint(10, &earth); + checksum += util_deint(11, &water); + checksum += util_deint(12, &fire); + checksum += util_deint(13, &wind); + checksum += util_deint(14, &hometown); + util_deint(15, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_CreateNewChar_recv(fd, dataplacenum, charname, imgno, faceimgno, vital, str, tgh, dex, earth, water, fire, wind, hometown); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_CHARDELETE_RECV) { + int checksum=0, checksumrecv; + char charname[65500]; + + checksum += util_destring(2, charname); + util_deint(3, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_CharDelete_recv(fd, charname); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_CHARLOGIN_RECV) { + int checksum=0, checksumrecv; + char charname[65500]; + + checksum += util_destring(2, charname); + util_deint(3, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_CharLogin_recv(fd, charname); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_CHARLIST_RECV) { + int checksum=0, checksumrecv; +#ifdef _PKSEVER_VER + int star = 0; + util_deint(2, &checksumrecv); + util_deint(3, &star); +#else + util_deint(2, &checksumrecv); +#endif + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + +//#ifdef _PKSEVER_VER +// lssproto_CharList_recv( fd, star); +//#else + lssproto_CharList_recv( fd); +//#endif + + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_CHARLOGOUT_RECV) { + int checksum=0, checksumrecv; + int Flg=1; +#ifdef _CHAR_NEWLOGOUT + checksum += util_deint(2, &Flg); + util_deint(3, &checksumrecv); +#else + util_deint(2, &checksumrecv); +#endif + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_CharLogout_recv(fd, Flg); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_PROCGET_RECV) { + int checksum=0, checksumrecv; + + strcpy( PersonalKey, _DEFAULT_PKEY); + + util_deint(2, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_ProcGet_recv(fd); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_PLAYERNUMGET_RECV) { + int checksum=0, checksumrecv; + util_deint(2, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_PlayerNumGet_recv(fd); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_ECHO_RECV) { + int checksum=0, checksumrecv; + char test[65500]; + + checksum += util_destring(2, test); + util_deint(3, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_Echo_recv(fd, test); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_SHUTDOWN_RECV) { + int checksum=0, checksumrecv; + char passwd[65500]; + int min; + + checksum += util_destring(2, passwd); + checksum += util_deint(3, &min); + util_deint(4, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_Shutdown_recv(fd, passwd, min); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_TD_RECV) { + int checksum=0, checksumrecv; + char message[65500]; + + checksum += util_destring(2, message); + util_deint(3, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_TD_recv(fd, message); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_FM_RECV) { + int checksum=0, checksumrecv; + char message[65500]; + + checksum += util_destring(2, message); + util_deint(3, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_FM_recv(fd, message); + util_DiscardMessage(); + return 0; + } + + if (func==LSSPROTO_PETST_RECV) { + int checksum=0, checksumrecv; + int nPet; + int sPet; + + checksum += util_deint(2, &nPet); + checksum += util_deint(3, &sPet); + util_deint(4, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_PETST_recv(fd, nPet, sPet); + util_DiscardMessage(); + return 0; + } + + // _BLACK_MARKET + if (func==LSSPROTO_BM_RECV) { + int checksum=0, checksumrecv; + int iindex; + + checksum += util_deint(2, &iindex); + util_deint(3, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_BM_recv(fd, iindex); + util_DiscardMessage(); + return 0; + } + +#ifdef _FIX_DEL_MAP // WON ADD 玩家抽地图送监狱 + if (func==LSSPROTO_DM_RECV) { + char buffer[2]; + buffer[0] = '\0'; + lssproto_DM_recv( fd ); + util_DiscardMessage(); + return 0; + } + +#endif + +#ifdef _CHECK_GAMESPEED + if (func==LSSPROTO_CS_RECV) { + char buffer[2]; + buffer[0] = '\0'; + lssproto_CS_recv( fd ); + util_DiscardMessage(); + return 0; + } +#endif +#ifdef _TEAM_KICKPARTY + if ( func == LSSPROTO_KTEAM_RECV ) { + int checksum = 0, checksumrecv; + int sindex; + checksum += util_deint( 2, &sindex); + util_deint( 3, &checksumrecv); + if(checksum!=checksumrecv){ + util_DiscardMessage(); + logHack( fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_KTEAM_recv( fd, sindex); + util_DiscardMessage(); + return 0; + } +#endif + +#ifdef _MIND_ICON + if(func==LSSPROTO_MA_RECV){ + int checksum = 0, checksumrecv; + int nMind; + int x, y; + + checksum += util_deint( 2, &nMind); + checksum += util_deint( 3, &x); + checksum += util_deint( 4, &y); + util_deint( 5, &checksumrecv); + if(checksum!=checksumrecv){ + util_DiscardMessage(); + logHack( fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_MA_recv(fd, x, y, nMind); + util_DiscardMessage(); + return 0; + } +#endif + +#ifdef _CHATROOMPROTOCOL // (不可开) Syu ADD 聊天室频道 + if (func==LSSPROTO_CHATROOM_RECV) { + int checksum=0, checksumrecv; + char test[65500]; + + checksum += util_destring(2, test); + util_deint(3, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_CHATROOM_recv(fd, test); + util_DiscardMessage(); + return 0; + } +#endif + +#ifdef _NEWREQUESTPROTOCOL // (不可开) Syu ADD 新增Protocol要求细项 + if ( func==LSSPROTO_RESIST_RECV ) { + char buffer[2]; + buffer[0] = '\0'; + lssproto_RESIST_recv( fd ); + util_DiscardMessage(); + return 0; + } +#endif +#ifdef _OUTOFBATTLESKILL // (不可开) Syu ADD 非战斗时技能Protocol + if(func==LSSPROTO_BATTLESKILL_RECV){ + int checksum = 0, checksumrecv; + int iNum; + + checksum += util_deint( 2, &iNum); + util_deint( 3, &checksumrecv); + if(checksum!=checksumrecv){ + util_DiscardMessage(); + logHack( fd, HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_BATTLESKILL_recv(fd, iNum); + util_DiscardMessage(); + return 0; + } +#endif +#ifdef _STREET_VENDOR + if(func == LSSPROTO_STREET_VENDOR_RECV){ + int checksum = 0,checksumrecv; + char message[65500]; + + checksum += util_destring(2,message); + util_deint(3,&checksumrecv); + if(checksum != checksumrecv){ + util_DiscardMessage(); + logHack(fd,HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_STREET_VENDOR_recv(fd,message); + util_DiscardMessage(); + return 0; + } +#endif +#ifdef _JOBDAILY + if(func == LSSPROTO_JOBDAILY_RECV){ + int checksum = 0,checksumrecv; + char buffer[16384]; + + buffer[0] = '\0'; + memset(buffer,0,16384); //kkkkkkkkk + checksum += util_destring(2,buffer); + util_deint(3,&checksumrecv); + if(checksum != checksumrecv){ + util_DiscardMessage(); + logHack(fd,HACK_CHECKSUMERROR); + DME(); return -1; + } + print("\njobdaily:%s ",buffer); + lssproto_JOBDAILY_recv(fd,buffer); + util_DiscardMessage(); + return 0; + + } +#endif +#ifdef _TEACHER_SYSTEM + if(func == LSSPROTO_TEACHER_SYSTEM_RECV){ + int checksum = 0,checksumrecv; + char message[65500]; + + checksum += util_destring(2,message); + util_deint(3,&checksumrecv); + if(checksum != checksumrecv){ + util_DiscardMessage(); + logHack(fd,HACK_CHECKSUMERROR); + DME(); return -1; + } + lssproto_TEACHER_SYSTEM_recv(fd,message); + util_DiscardMessage(); + return 0; + } +#endif +#ifdef _ADD_STATUS_2 + if(func == LSSPROTO_S2_RECV){ + return 0; + } +#endif + + util_DiscardMessage(); + logHack(fd,HACK_NOTDISPATCHED); + DME(); return -1; +} + +/* + servertoclient XYD( int x, int y, int dir ); + 潜卞爵 蔽 卞皿伊奶乩□及匏 毛 譬帮允月凶户卞银丹[ +*/ +void lssproto_XYD_send(int fd,int x,int y,int dir) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkint(buffer, x); + checksum += util_mkint(buffer, y); + checksum += util_mkint(buffer, dir); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_XYD_SEND, buffer); +} + +void lssproto_EV_send(int fd,int seqno,int result) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkint(buffer, seqno); + checksum += util_mkint(buffer, result); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_EV_SEND, buffer); +} + +void lssproto_EN_send(int fd,int result,int field) +{ + char buffer[65500]; + int checksum=0; + + //print(" EN_send "); + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkint(buffer, result); + checksum += util_mkint(buffer, field); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_EN_SEND, buffer); +} + + +void lssproto_RS_send(int fd,char* data) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkstring(buffer, data); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_RS_SEND, buffer); +} + + +void lssproto_RD_send(int fd,char* data) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkstring(buffer, data); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_RD_SEND, buffer); +} + +void lssproto_B_send(int fd,char* command) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkstring(buffer, command); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_B_SEND, buffer); +} + +void lssproto_I_send(int fd,char* data) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkstring(buffer, data); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_I_SEND, buffer); +} + +void lssproto_SI_send(int fd,int fromindex,int toindex) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkint(buffer, fromindex); + checksum += util_mkint(buffer, toindex); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_SI_SEND, buffer); +} + +void lssproto_MSG_send(int fd,int aindex,char* text,int color) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkint(buffer, aindex); + checksum += util_mkstring(buffer, text); + checksum += util_mkint(buffer, color); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_MSG_SEND, buffer); +} + + +void lssproto_PME_send(int fd,int objindex,int graphicsno,int x,int y,int dir,int flg,int no,char* cdata) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkint(buffer, objindex); + checksum += util_mkint(buffer, graphicsno); + checksum += util_mkint(buffer, x); + checksum += util_mkint(buffer, y); + checksum += util_mkint(buffer, dir); + checksum += util_mkint(buffer, flg); + checksum += util_mkint(buffer, no); + checksum += util_mkstring(buffer, cdata); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_PME_SEND, buffer); +} + + +void lssproto_AB_send(int fd,char* data) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkstring(buffer, data); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_AB_SEND, buffer); +} + + +void lssproto_ABI_send(int fd,int num,char* data) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkint(buffer, num); + checksum += util_mkstring(buffer, data); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_ABI_SEND, buffer); +} + +void lssproto_TK_send(int fd,int index,char* message,int color) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkint(buffer, index); + checksum += util_mkstring(buffer, message); + checksum += util_mkint(buffer, color); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_TK_SEND, buffer); +} + +void lssproto_MC_send(int fd,int fl,int x1,int y1,int x2,int y2,int tilesum,int objsum,int eventsum,char* data) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkint(buffer, fl); + checksum += util_mkint(buffer, x1); + checksum += util_mkint(buffer, y1); + checksum += util_mkint(buffer, x2); + checksum += util_mkint(buffer, y2); + checksum += util_mkint(buffer, tilesum); + checksum += util_mkint(buffer, objsum); + checksum += util_mkint(buffer, eventsum); + checksum += util_mkstring(buffer, data); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_MC_SEND, buffer); +} + + +void lssproto_M_send(int fd,int fl,int x1,int y1,int x2,int y2,char* data) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkint(buffer, fl); + checksum += util_mkint(buffer, x1); + checksum += util_mkint(buffer, y1); + checksum += util_mkint(buffer, x2); + checksum += util_mkint(buffer, y2); + checksum += util_mkstring(buffer, data); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_M_SEND, buffer); +} + +/* + servertoclient C( string data ); + (Characters) + 弁仿奶失件玄反 CA 互 化}公及平乓仿卞勾中化譬卅井匀凶凛反} C + 匹仇及楮醒毛邰菲匹五月[扔□田反民尼永弁仄卅中[ + + string data + 白巧□穴永玄反 动票及3潘 及嫩 毛戊件穴匹卅日屯凶 + 手及匹丐月.公木冗木及嫩 及 褥反今日卞凶化徇'|'匹仁亢日木 + 化中月[ + + 凶化徇匹仁亢日木凶玄□弁件互12蜊及桦宁 + 玄□弁件及 反 + + WHICHTYPE|CHARINDEX|X|Y|DIR|BASEIMG|LEVEL|NAMECOLOR|NAME|SELFTITLE|WALKABLE|HEIGHT|POPUPNAMECOLOR + 仇及左皮斥尼弁玄反平乓仿弁正□匹丐月午中丹仇午匹丐月[ + + WHICHTYPE 反]仇及平乓仿弁正□互升丹中匀凶潘 及手及 + 匹丐月井[仇木反扔□田□匹反动票及方丹卞烂聒今木化中月[ + + typedef enum + { + CHAR_TYPENONE, 窒匹手卅中 + CHAR_TYPEPLAYER, 皿伊奶乩□ + CHAR_TYPEENEMY, 衬 + CHAR_TYPEPET, 矢永玄 + CHAR_TYPEDOOR, 玉失 + CHAR_TYPEBOX , + CHAR_TYPEMSG , 枣 + CHAR_TYPEWARP , 伐□皿札□件 + CHAR_TYPESHOP , 饕 + CHAR_TYPEHEALER , 甲□仿□ + CHAR_TYPEOLDMAN , 赢 + CHAR_TYPEROOMADMIN, 尕 遣盒 + CHAR_TYPETOWNPEOPLE, 引切及夫午 + CHAR_TYPEDENGON, 鳗蜕 + CHAR_TYPEADM, 鳗蜕 + CHAR_TYPETEMPLE, Temple master + CHAR_TYPESTORYTELLER, 贿曰 + CHAR_TYPERANKING, 尕 遣仿件平件弘 憎 + CHAR_TYPEOTHERNPC, 公及职及腹绸覆擂卞卅日卅中NPC + CHAR_TYPEPRINTPASSMAN, 玉失及由旦伐□玉 憎允月NPC + CHAR_TYPENPCENEMY, 裔烂衬 + CHAR_TYPEACTION, 失弁扑亦件卞 杀允月NPC + CHAR_TYPEWINDOWMAN, 它奴件玉它 憎允月NPC 旦玄井手) + CHAR_TYPESAVEPOINT, 本□皮禾奶件玄 + CHAR_TYPEWINDOWHEALER, 它奶件玉它正奶皿及甲□仿□ + CHAR_TYPEITEMSHOP, 云饕 + CHAR_TYPESTONESHOP, 檗 盒 矢永玄及 盒 + CHAR_TYPEDUELRANKING, DUEL仿件平件弘NPC + CHAR_TYPEWARPMAN, 伐□皿穴件NPC + CHAR_TYPEEVENT, 奶矛件玄NPC + CHAR_TYPEMIC, 奶矛件玄NPC + CHAR_TYPELUCKYMAN, 奶矛件玄NPC + CHAR_TYPEBUS, 穴件乒旦田旦 + CHAR_TYPECHARM, 奶矛件玄NPC + CHAR_TYPENUM, + }CHAR_TYPE; + + 公木反职及皿伊奶乩□支NPC支衬匹丐月[扔□田□互霜耨 + 允月午五反苇尹月 区卞勾中化蝈 霜耨允月[勾引 + 曰弁仿奶失件玄反}仇及由弗永玄毛熬仃午匀凶午五卞仇及 + 由弗永玄卞踏井木化中卅中平乓仿毛 匀化中凶日壅仄化仄 + 引匀化方中午中丹仇午匹丐月[引凶}穴它旦市□末伙毛丐 + 歹六凶午五卞 憎允月树 反仇及树 及心卞湘中化中月[ + 分井日}穴它旦市□末伙毛丐歹六凶午五卞 憎允月仇午互 + 凳今木凶桦宁反}扔□田□反}仇及楮醒毛 读卞裟太 + 分今卅仃木壬卅日卅中[ SELFTITLE卞勾中化反}犯伉立正 + 匹丐月凶化徇毛孔仁引卅中方丹卞巨旦弗□皿今木化中月[ + 弁仿奶失件玄反失弁扑亦件及戊穴件玉(CA)互仁月引匹反 + 切匹 憎允月[CHARINDEX扔□田□ 及域啦卞平乓仿毛 + 烂匹五月 寞}BASEIMG反 憎及凶户及 寞}LEVEL反平乓 + 仿及伊矛伙(0卅日 憎仄卅中[仇及袄反NPC卅升卞银丹[) + WALKABLE反1及午五公及晓毛骚聊允月仇午互匹五}0卅日骚 + 聊允月仇午互匹五卅中[HEIGHT反嫖今毛手勾手及井公丹匹 + 卅中及井及隙烂[ + + 平乓仿弁正□及 蟆午愤 惫寞反} + 巨旦弗□皿今木卅仃木壬卅日卅中['|'匹玄□弁件毛 + 潸曰分仄化井日巨旦弗□皿毛荸轮允月[巨旦弗□皿允月午' + |'互幻井及 侬卞云五井歹月及匹} 赓反签账卞'|'毛犯 + 伉立正午仄化方中[霜耨允月 手} 蟆午愤 惫寞毛巨旦 + 弗□皿仄化井日凶化徇匹勾卅中匹井日霜耨允月[ + 引凶]矢永玄及桦宁反愤 惫寞及医歹曰卞交□扒□互涩烂 + 仄凶矢永玄及 蟆互霜耨今木化仁月[ + + 凶化徇匹仁亢日木凶玄□弁件互6蜊及桦宁 + 玄□弁件及 反 + INDEX|X|Y|BASEIMG|LEVEL|ITEM1LINEINFO + 匹哗 卞 切化中月失奶 丞卞勾中化及树 匹丐月[ + INDEX反平乓仿及奶件犯弁永旦午井少日卅中INDEX匹丐月[ + 公及失奶 丞毛壅允凛卞银迕允月[X,Y反失奶 丞及弘夫□ + 田伙匏 [BASEIMG反 飓及 寞[ITEM1LINEINFO反1垫 + info卞 憎允月凶户及树 匹丐月[失奶 丞它奶件玉它 + 及 憎迕及树 反 及 芊匹迕啦允月[失奶 丞卞楮仄化 + 反CA反 卅中[ITEM1LINEINFO反巨旦弗□ + 皿今木月[仇及巨旦弗□皿及 芊反晓及嫩 毛辅寰[ + + 凶化徇匹仁亢日木凶玄□弁件互4蜊及桦宁 + 玄□弁件及 反 + INDEX|X|Y|VALUE + 匹哗 卞 切化中月云嗯卞勾中化及树 匹丐月[ 反允 + 屯化醒侬[INDEX,X,Y 反失奶 丞午 元[VALUE 反升木分 + 仃及汹井午中丹仪匹丐月[失奶 丞卞勾中化及树 匹丐月[ + 凶化徇匹仁亢日木凶玄□弁件互1蜊及桦宁 + INDEX + 仇及平乓仿及C反项尹日木卅中[ +*/ +void lssproto_C_send(int fd,char* data) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkstring(buffer, data); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_C_SEND, buffer); +} + +/* + servertoclient CA( string data ); + (CharacterAction) + 苇尹月 区卞中月平乓仿及失弁扑亦件橇谪毛凳蕙允月[ + 扔□田□井日弁仿奶失件玄卞域 读卞霜耨允月[ + 备平乓仿及1失弁扑亦件仍午卞霜耨[扔□田□反失弁扑亦件毛匹五月分 + 仃做谅允月仇午[ + + string data + CHARINDEX|X|Y|ACTION|PARAM1|PARAM2|PARAM3|PARAM4|....毛戊 + 件穴匹仁亢匀凶手及卞允月[PARAM反失弁扑亦件仍午卞蜊醒手 + 银中井凶手仇午卅月[动票反失弁扑亦件域 [X,Y反匏 匹升 + 及失弁扑亦件匹手}丐凶日仄中匏 毛隙烂允月[ + 仇及 侬 反巨旦弗□皿今木卅中[ + + ACTION PARAM1 PARAM2 + PARAM3 PARAM4 + Stand:0 轾0~7 + Walk:1 轾0~7 + Attack:2 轾0~7 + Throw:3 轾0~7 + Damage:4 轾0~7 + Dead:5 轾0~7 + UseMagic:6 轾0~7 + UseItem:7 轾0~7 + Effect:8 轾0~7 巨白尼弁玄 寞 + Down:10 (逦木月) 轾0~7 + Sit:11 (甄月) 轾0~7 + Hand:12 (澎毛蕊月) 轾0~7 + Pleasure:13 (减少) 轾0~7 + Angry:14 (变月) 轾0~7 + Sad:15 ( 仄戈) 轾0~7 + Guard:16 (布□玉) 轾0~7 + actionwalk:17 (失弁扑亦件迕汹五) 轾0~7 + nod:18 (丹卅内仁) 轾0~7 + actionstand:19 (失弁扑亦件迕 切禾□术) 轾0~7 + Battle:20 (爵 树 ) 轾0~7 BattleNo(-1 卅日 憎壅允 SideNo HelpNo ㄠ卅日踞仃毛裟少CA 憎]ㄟ卅日壅允]引凶反 仄 + Leader:21 (伉□母□树 ) 轾0~7 0: 憎壅允 1: 憎 + Watch:22 (爵 棋爵) 轾0~7 0: 憎壅允 1: 憎 + namecolor:23( 蟆及缙树 ) 轾0~7 蟆及缙 寞 + Turn:30( 轾 晶) 轾0~7 + Warp:31(伐□皿) 轾0~7 + + ACTION及袄反帮醒匹} 反晓及 及尔羹及嫩 匹丐月[ +*/ +void lssproto_CA_send(int fd,char* data) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkstring(buffer, data); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_CA_SEND, buffer); +} + +/* + servertoclient CD( string data ); + (CharacterDelete) + data 反犯伉立正 , 匹嗉濠日木凶奶件犯永弁旦[ + 醒瘀霜月仪互请 月[ + 仇及ID毛 匀化中月平乓仿弁正互壅尹凶凛卞扔□田井日弁仿奶失件玄尺 + 午鳗歹月[ +*/ +void lssproto_CD_send(int fd,char* data) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkstring(buffer, data); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_CD_SEND, buffer); +} + +/* + servertoclient R( string data ); + (Radar) + 伊□母□及 毛弁仿奶失件玄卞霜耨允月[弁仿奶失件玄反仇及霜耨毛 + 邰菲允月仇午反卅中[扔□田□互赝癫卅正奶立件弘匹霜耨允月[ + 凶午尹壬10汹丐月仁仍午午井}1坌仍午午井[ + + string data + x ,y, kind ,及赐卞袄毛'|'匹仁亢匀化卅日屯凶手及毛 + 今日卞'|'匹卅日屯凶手及[ + x,y反平乓仿井日及濮覆匏 [kind反动票卞仄户允醒袄匹反卅中 + 筏寞[伊□母□卞丹勾月 及潘 毛隙烂允月[霜日木化仁月手及 + 及潘 反}公木引匹卞儒尹凶 芊午井}旦平伙匹 祭仄}公木反 + 扔□田□互哔尹月[ + + kind及袄 + E 衬 + P 皿伊奶乩□ + S 熔 + G 云嗯 + I 失奶 丞(熔动陆) + + data及 “"12|22|E|13|24|P|14|28|P" + 仇及 侬 反巨旦弗□皿今木卅中[ +*/ +void lssproto_R_send(int fd,char* data) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkstring(buffer, data); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_R_SEND, buffer); +} + +/* + servertoclient S( string data ); + (Status) + 平乓仿及旦 □正旦毛霜耨允月[ + 犯□正反 市 打伉筏寞 侬(域 侬) 午卅匀化中月[勾引曰 赓及 + 1 侬毛苇木壬窒及旦 □正旦井坌月[ 反2 侬 井日匹丐月[ + 反动票及白巧□穴永玄卞仄凶互丹[凶化徇筏寞'|'互犯伉立正匹丐月[ + 2蜊 动嫦及玄□弁件互 匹丐月[ + + P 蝈由仿丢□正 + kubun hp maxhp mp maxmp str tough exp maxexp exp + level attackpower deffencepower + fixdex fixcharm fixluck fixfireat fixwaterat fixearthat fixwindat + gold 尥仃化中月 + 惫寞及index 蟆 愤裘惫寞 + + 犯伉立正反 '|' 匹丐月[引凶 蟆午愤裘惫寞反} + 巨旦弗□皿仄凶手及毛 + 凶化徇匹勾卅仆凶手及互骚耨今木月[ + 公木冗木及袄及滇反动票[ + kubun 卞ㄠ互 匀化中月午蟆由仿丢□正毛霜耨] + ㄡ动晓分午]备申永玄及 匀化中月手及及由仿丢□正互赐 卞 匀化霜耨今木化中月[ + 尹壬]ㄢ互 凶日hp午Maxhp互kubun 动嫦及玄□弁件卞 户日木化中月[ + + kunun int + Hp( )hp int + MaxHp int + Mp(热诸由伐□) int + MaxMp int + Vital( ) int + Str( ) int + Tough(暹屺今) int + Dex(豳镀今) int + Exp(烦董袄)exp int + MaxExp(戚引匹及烦董袄) int + Level(伊矛伙) int + Attack( 猾 ) int + Defense(潮 ) int + fQuick( 蔽豳镀今) int + fCharm( ) int + fLuck(扪) int + fEarth(哗)fixearthat int + fWater( ) int + fFire(绍) int + fWid(氘)fixwindat int + Gold(云嗯) int + 惫寞及index int + 犯亘巨伙禾奶件玄 int + 鳖戏荚醒 int + 蟆 侬 + 愤裘惫寞 侬 + + 填 ( char 及 公及引引踏仁 ) + + P10|20|10|20|10|10|10|1|2|13|13|1|100|10|尺氏天|abc|def + + C 甄 + floor maxx maxy x y + 毛 | 匹嗉濠匀化霜月[ + 填 ( char 及 公及引引踏仁 ) + + C1024|100|100|10|20 + + 晓筏及 匹反}白夫失ID1024, 扔奶术100x100 X 10,Y 20及午仇 + 欠卞平乓仿弁正□互中月午中丹 卞卅月[仇及穴奶平乓仿及白 + 夫失手孔仁户凶甄 毛弁仿奶失件玄互襞月仇午互匹五月及反仇及 + 戊穴件玉及心匹丐月[汹五及瑛绊反白夫失 及匏 仄井歹井日卅 + 中[方匀化}必□丞钒铵凛}闭蟾银迕及午五}伐□皿及午五卅升 + 反}仇及戊穴件玉毛勾井匀化恳仄中袄毛霜耨仄卅仁化反卅日卅中[ + + I 蝈失奶 丞 + (失奶 丞1)|(失奶 丞2)...(失奶 丞n) + 失奶 丞及 反动票及 芊匹由永弁允月[ + 夫午勾及失奶 丞反}井卅日内动票及6勾及玄□弁件及本永玄匹 + 霜耨今木月[夫午勾夫午勾及 反} + + 蟆| 蟆2|旦 □斥|失奶 丞及 |失瓦丢 寞|银迕第 桦赭|银迕覆擂|失奶 丞伊矛伙|白仿弘 + + 失奶 丞 反摹 伊矛伙匹愤 读卞 凳今木月[ + 蟆2反摹 伊矛伙卞方匀化}失奶 丞及 互 月 烂[ + 弁仿奶失件玄及失奶 丞 及2垫 卞 木月仪[ + 旦 □斥反 蟆及缙毛赘月及卞银丹[ + 失奶 丞及 [ + 失瓦丢 寞反} 飓 寞[ + 银迕第 桦赭午反]仇及失奶 丞互升仇匹银迕允月仪互第 井互 匀化中月[ + 仇木反]扔□田□匹反动票及方丹卞烂聒今木化中月[ + + typedef enum + { + ITEM_FIELD_ALL, 允屯化及桦赭匹银尹月 + ITEM_FIELD_BATTLE, 爵 及心 + ITEM_FIELD_MAP, 骚橘穴永皿晓及心 + + }ITEM_FIELDTYPE; + + 银迕覆擂午反]仇及失奶 丞毛银迕允月仇午及请 月覆擂互 匀化中月[ + 扔□田□匹反动票及方丹卞烂聒今木化中月[ + + typedef enum + { + ITEM_TARGET_MYSELF, 愤坌及心 + ITEM_TARGET_OTHER, 职及谛 愤坌殖戈) + ITEM_TARGET_ALLMYSIDE, 蝈 + ITEM_TARGET_ALLOTHERSIDE, 锹澎础蝈 + ITEM_TARGET_ALL, 蝈化 + }ITEM_TARGETTYPE; + + 仇及醒侬卞100毛箫允午]韶氏匹中月樊手覆擂午卅月[ + 失奶 丞伊矛伙[仇及伊矛伙动晓及樊匹卅中午隶 请 卅中[ + 白仿弘 [缙氏卅白仿弘毛霜耨允月[备申永玄及覆杀反动票及骚曰[ + + 0bit 矢永玄丢□伙匹霜耨第 卅失奶 丞井升丹井[霜耨第 分午ㄠ[ㄟ分午霜耨匹五卅中[ + 1Bit 仇及失奶 丞互宁岳请 月井升丹井[ + 2Bit 仇及失奶 丞互 井升丹井[1分午 匹丐月[ + + 仇仇及 匹反巨旦弗□皿允月[ + 填 ( char 及 公及引引踏仁 ) + + I丐幻 卅 阂|str+2|1|丐幻\|中元|10|2|0 + + 旦 □斥及袄及啦 反}帮醒袄匹 + + 1 旦 □斥A + 2 旦 □斥B + 3 旦 □斥C + 4 旦 □斥D + + 午允月[引凶}失奶 丞 及坞及 坌卞勾中化反}5蜊及玄□弁件互 + 坞匹}勾引曰凶化徇互卅日氏分橇谪匹霜耨今木化仁月[ + + S 蝈旦平伙 + (旦平伙0)|(旦平伙1)|(旦平伙2) ... (旦平伙n) + 惫寞午 元匹}平乓仿互手化月 旦平伙醒坌毛霜耨允月[勾引 + 曰卅中手及反 ||| 午卅月及匹丐月[ + 备巨件玄伉及 反} + 旦平伙及潘 戊□玉|伊矛伙 + 匹丐月[ + 填 ( char 及 公及引引踏仁 ) + + S10|2|20|2||| + + T 惫寞 + (惫寞0)|(惫寞1)|(惫寞2) ... (惫寞n) + 惫寞及巨件玄伉互坞及桦宁反 '|' 互 粮允月及匹} 粮仄凶手 + 及毛 仄化旦平乓件仄化反卅日卅中[井卅日内 蜊醒坌霜耨 + 允月[ + 夫午勾}夫午勾及 反} + 蟆 + 及心匹丐月[ + 填 ( 霜日木化仁月 char 及 公及引引匹丐月 ) + + T丐幻|方匀天日中 + + 仇木手巨旦弗□皿允月[ + + M 坌由仿丢□正 + 平乓仿弁正□及旦 □正旦及丹切} 卞 凳今木月手及(蜇箕 + 袄)午公丹匹卅中手及( 袄卅升)互丐月[升木井及旦 □正旦 + 互 凳今木月凶太卞 荚蝈 及由仿丢□正毛霜耨允月及反生永玄 + 伐□弁玄仿白奴永弁毛 蛲卞银丹仇午卞卅月及匹} 卞HP , + MP,EXP及袄分仃卞仄廿匀凶由仿丢□正霜耨戊穴件玉毛迕啦允月[ + 公木互仇及M戊穴件玉匹丐月[2 侬 动嫦及 域玄□弁件反HP及 + 蜇箕袄 , 玄□弁件反MP} 赶玄□弁件反EXP匹丐月[ + 动票卞填 毛仄户允[ + + M54|210|8944909 + + 仇及 匹反HP及蜇箕袄互54}MP及蜇箕袄互210}烦董袄互8944909 + 卞卅匀化中月及分[仇及3潘 反 卞 凳 蘸互嫖中午 歹木月 + 凶户 仄凶戊穴件玉祭仄凶互}手切欠氏仇及M戊穴件玉及井歹 + 曰卞P戊穴件玉匹蝈由仿丢□正毛霜耨仄化手方中[凶分仄} 赝 + 卞生永玄伐□弁毛银丹凶户卞反}仇及戊穴件玉毛银丹仇午互蹂俦 + 今木月[ + + D 平乓仿及ID + 夫弘奶件凛卞分仃霜月平乓仿及index]公木午凛棉毛霜月[ + D1000|912766409午井匹霜日木月[ + + E 巨件市它件玄割 票蜃)|(晓蜃) + 巨件市它件玄 毛霜耨允月[割 反n/100 + 弁仿奶失件玄反]票蜃及袄井日旦正□玄仄化]ㄠ汹汹仁 卞+1仄凶割 匹巨件市它件玄允月井毛 蝇允月[ + 凶分仄]晓蜃及袄毛旋尹卅中方丹卞允月[ + 戚荚卞仇木互霜日木化仁月引匹仇及割 匹巨件市它件玄毛煌遥允月仪[ + + J0 J6 银尹月热诸及 + 银尹月热诸及 毛霜耨允月[ + 0 6 反公木冗木失奶 丞及隶 组赭卞覆杀仄化中月[域 及隶 组赭 ] ]澎]隶澡 + 仄井隶 请 卅中 烂分互]漆 傀舰及啃卞蝈化及隶 组赭及树 毛霜月 + J0|kubun|mp|field|target|name|comment + 午中丹白巧□穴永玄卞卅匀化中月[ + kubun 反公及 互丐月井 中井[ㄟ分午 中[公木动嫦卞玄□弁件允日卅中[ㄠ分午丐月[ + mp反壅 竣 毛 允[ + field反升及桦赭匹银尹月井[扔□田□匹反动票及 卞烂聒今木化中月[ + + typedef enum + { + MAGIC_FIELD_ALL, 允屯化及桦赭匹银尹月 + MAGIC_FIELD_BATTLE, 爵 及心 + MAGIC_FIELD_MAP, 骚橘穴永皿晓及心 + + }MAGIC_FIELDTYPE; + + target反升木毛覆擂卞请 月井[扔□田□匹反动票及方丹卞烂聒今木化中月[ + + typedef enum + { + MAGIC_TARGET_MYSELF, 愤坌及心 + MAGIC_TARGET_OTHER, 职及谛 愤坌殖戈) + MAGIC_TARGET_ALLMYSIDE, 蝈 + MAGIC_TARGET_ALLOTHERSIDE, 锹澎础蝈 + MAGIC_TARGET_ALL, 蝈化 + MAGIC_TARGET_NONE, 簿手蓟 请 卅中[ 豢支凶户及凛 + MAGIC_TARGET_OTHERWITHOUTMYSELF,职及谛 愤坌殖引卅中) + MAGIC_TARGET_WITHOUTMYSELFANDPET, 愤坌午矢永玄动陆 + MAGIC_TARGET_WHOLEOTHERSIDE, 及扔奶玉蝈 + }MAGIC_TARGETTYPE; + + 仇及醒侬卞100毛箫允午]韶氏匹中月樊手覆擂午卅月[ + + name反热诸 [ + comment反仇及热诸及 [ + + N0 N3 醮棉及由仿丢□正 + 醮棉卞卅匀化中月谛及树 毛霜耨允月[ + N0|kubun|level|charaindex|maxhp|hp|mp|name + + kubun 反公及 互丐月井 中井[ㄟ分午 中[公木动嫦卞玄□弁件允日卅中[ㄠ蝈由仿丢□正[ + 2动晓分午]备申永玄及 匀化中月手及及由仿丢□正 1bit level 2bit charaindex卅升 + 互霜耨今木月[ + charaindex 反醮棉及charaindex + level反公及谛及伊矛伙[ + maxhp反公及谛及MAXHP + hp反公及谛及蜇箕及HP + mp反公及谛及竣 + name 反公及谛及 蟆[ + + K0 K4 雯 由仿丢□正 + hp maxhp mp maxmp str tough exp + level attackpower deffencepower + fixdex fixcharm fixluck fixfireat fixwaterat fixearthat fixwindat + 蟆 status + K及 卞0 4毛隙烂仄化}升及雯 井毛隙烂允月仇午[ + 公及戚及玄□弁件卞0互 凶日公及矢永玄 反 中午蜕丹仪[ + 丐月桦宁反ㄠ匹丐月[1分午蝈由仿丢□正[ + 2动晓分午]备申永玄及 匀化中月手及及由仿丢□正 1bit hp 2bit maxhp卅升 + 互霜耨今木月[ + 犯伉立正反 '|' 匹丐月[引凶 蟆午愤裘惫寞反} + 巨旦弗□皿仄凶手及毛 + 凶化徇匹勾卅仆凶手及互骚耨今木月[ + 公木冗木及袄及滇反动票[ + + No.( 寞) int + islive(戏韶) int + GRA( 飓 寞) int + Hp(觐菁 ) int + MaxHp( 觐菁 ) int + Mp int + MapMp int + Exp(烦董袄) int + MaxExp(戚引匹及烦董袄) int + Level(伊矛伙) int + Attack( 猾 ) int + Defense(潮 ) int + Quick(豳镀今) int + Ai(镝擦蘸) int + fEarth(哗) int + fWater( ) int + fFire(绍) int + fWid(氘) int + Slot( 檗 醒) int + 蟆 凳袱第白仿弘 int + 蟆 侬 + 交□扒□矢永玄 侬 + + 蟆 凳袱第白仿弘午反]仇及矢永玄及 蟆毛 凳仄化方中井升丹井及白仿弘匹] + 1 分午 凳 ]ㄟ分午 凳尕第午卅月[ + + 填 ( char 及 公及引引踏仁 ) + + P10|20|10|20|10|10|10|1|2|13|13|1|100|10|尺氏天|PC + + W0 W4 矢永玄及 犯□正 + W0|skillid|field|target|name|comment| x 7 + W0 W4 反公木冗木及矢永玄卞覆杀仄化中月[ + petskillid 反]矢永玄及 及 寞[pet_skillinfo.h卞烂聒今木化中月[ + field 反公及 互升仇匹银迕匹五月井[扔□田□匹反动票及方丹卞烂聒今木化中月[ + + typedef enum + { + PETSKILL_FIELD_ALL, 允屯化及桦赭匹银尹月 + PETSKILL_FIELD_BATTLE, 爵 及心 + PETSKILL_FIELD_MAP, 骚橘穴永皿晓及心 + + }PETSKILL_FIELDTYPE; + + target 反公及 及覆擂互升丹中丹手及井[扔□田□匹反戚及方丹卞烂聒今木化中月[ + + typedef enum + { + PETSKILL_TARGET_MYSELF, 愤坌及心 + PETSKILL_TARGET_OTHER, 职及谛 愤坌殖戈) + PETSKILL_TARGET_ALLMYSIDE, 蝈 + PETSKILL_TARGET_ALLOTHERSIDE, 锹澎础蝈 + PETSKILL_TARGET_ALL, 蝈化 + PETSKILL_TARGET_NONE, 簿手蓟 请 卅中[ 豢支凶户及凛 + PETSKILL_TARGET_OTHERWITHOUTMYSELF,职及谛 愤坌殖引卅中) + PETSKILL_TARGET_WITHOUTMYSELFANDPET, 愤坌午矢永玄动陆 + }PETSKILL_TARGETTYPE; + + name 反 及 蟆[ + comment反公及 卞覆允月 [ + target|name|comment| 反 及醒及坌ㄠ垫匹霜日木化仁月[ + 反域杀ㄦ勾引匹[ 匹 互 仃化中月 "|"及心互粮仁 桦宁 + 反弁仿奶失件玄匹腴户化 憎允月仪[ +*/ +void lssproto_S_send(int fd,char* data) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkstring(buffer, data); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_S_SEND, buffer); +} + +/* + servertoclient D( int category , int dx , int dy , string data ); + (Display) + 卞窒井 憎允月隙 [ + + + int category + 窒毛 憎允月井[ + + 袄 + 1 愤坌动陆卞芨尹凶母丢□斥[data反 侬 + 卞卅匀凶袄[ + 2 愤坌互丹仃凶母丢□斥[data反 侬 卞 + 卅匀凶袄 + + int dx + 穴奶平乓仿井日及弘伉永玉锹覆匏 X[域 读卞反奶矛件玄互 戏 + 仄凶匏 [弁仿奶失件玄反仇及袄井日赝给赝濠卅匏 毛煌遥仄化 + 允月[ + int dy + 锹覆匏 Y + string data + 憎允月 [ 反category卞方匀化瑁引月[ + 仇及 侬 反巨旦弗□皿今木卅仃木壬 + 卅日卅中[ +*/ +void lssproto_D_send(int fd,int category,int dx,int dy,char* data) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkint(buffer, category); + checksum += util_mkint(buffer, dx); + checksum += util_mkint(buffer, dy); + checksum += util_mkstring(buffer, data); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_D_SEND, buffer); +} + +/* + servertoclient FS( int flg); + (FlgSet)PS及及杀蚕[引凶反夫弘奶件凛卅升卞愤坌及橇谪午仄化霜日木化仁月[ + + int flg + 0 bit 0: 醮棉Off 1: 醮棉On + 蜇箕 银迕 1 bit 0: 爵 辅笛off 1: 爵 辅笛On + 2 bit 0: DUEL off 1: DUEL On + 3 bit 0: 骚及民乓永玄乒□玉 1: 由□ 奴卞仄井民乓永玄互 壬卅中乒□玉 + 4 bit 0: 铜跟晶OK 1: 铜跟晶蛐 +*/ +void lssproto_FS_send(int fd,int flg) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkint(buffer, flg); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_FS_SEND, buffer); +} + +/* + servertoclient HL( int flg); + (HeLp)HL及及杀蚕[引凶反由□ 奴及醮棉互爵 及云踞仃乒□玉毛 凳仄凶桦宁卞霜日木化仁月[ + + int flg + 0: 云踞仃乒□玉Off 1: 云踞仃乒□玉On +*/ +void lssproto_HL_send(int fd,int flg) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkint(buffer, flg); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_HL_SEND, buffer); +} + +/* + servertoclient PR( int request, int result); + (PartyRequest)醮棉邰菲及杀蚕[PR毛弁仿奶失件玄互霜匀化中卅仁化手仇木毛熬仃潸月凛互丐月[ + 由□ 奴互 螺荸辣 褪互 仃凶 卅升及凛[ + + int request + 0: 轮迩 1: 迩 + int result + 0: 撩 1: 岳 +*/ +void lssproto_PR_send(int fd,int request,int result) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkint(buffer, request); + checksum += util_mkint(buffer, result); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_PR_SEND, buffer); +} + +#ifdef _PETS_SELECTCON +void lssproto_PETS_send(int fd,int petarray,int result) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkint(buffer, petarray); + checksum += util_mkint(buffer, result); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_PETST_SEND, buffer); +} +#endif + +void lssproto_KS_send(int fd,int petarray,int result) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkint(buffer, petarray); + checksum += util_mkint(buffer, result); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_KS_SEND, buffer); +} + +void lssproto_SPET_send(int fd, int standbypet, int result) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkint(buffer, standbypet); + checksum += util_mkint(buffer, result); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_SPET_SEND, buffer); +} + +/* + servertoclient PS( int result, int havepetindex, int havepetskill, int toindex); + (PetSkill use result)矢永玄及 毛银匀凶瑛绊弁仿奶失件玄及PS卞覆杀仄化霜日木化仁月[ + result 动陆反弁仿奶失件玄及PS卞覆杀仄化中月[白奴□伙玉晓井日仄井裟壬木卅中[ + + int result + 瑛绊[0: 撩 1:岳 + int havepetindex + 窒 及矢永玄互银迕仄凶井[ + int havepetskill + 窒 及 毛银迕仄凶井[ + int toindex + 簿卞 芊毛银迕仄凶井[仇木反左皮斥尼弁玄支平乓仿及index匹反卅中[动票及 卞卅匀化中月[ + + 愤坌 = 0 + 矢永玄 = 1 5 + 醮棉 = 6 10 S N 及0 4卞覆杀[愤坌愤褥手殖引木化中月 + + 覆擂互蝈够]午井坌井日卅中]午井及桦宁反-1匹霜耨允月[ +*/ +void lssproto_PS_send(int fd,int result,int havepetindex,int havepetskill,int toindex) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkint(buffer, result); + checksum += util_mkint(buffer, havepetindex); + checksum += util_mkint(buffer, havepetskill); + checksum += util_mkint(buffer, toindex); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_PS_SEND, buffer); +} + +/* + servertoclient SKUP( int point ); + (SKillUP) + 旦平伙失永皿互匹五月仪毛扔□田互骚襞允月[中仁勾晓仆日木月井毛隙烂允月[ +*/ +void lssproto_SKUP_send(int fd,int point) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkint(buffer, point); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_SKUP_SEND, buffer); +} + +/* + servertoclient WN( int windowtype, int buttontype, int seqno, int objindex, string data ); + (Window) + 它奴件玉它毛 憎六方午扔□田□互弁仿奶失件玄卞骚襞允月[ + + int windowtype + 它奴件玉它正奶皿[升及方丹卅溥挚及它奴件玉它毛 憎允月井[仇木午buttontype 及赚心宁歹六匹 + 它奴件玉它互瑁烂允月[ + 扔□田□匹反动票及 卞涩烂今木化中月[ + + typedef enum + { + WINDOW_MESSAGETYPE_MESSAGE, 丢永本□斥及心 + WINDOW_MESSAGETYPE_MESSAGEANDLINEINPUT, 丢永本□斥午域垫 + WINDOW_MESSAGETYPE_SELECT, 蓟 它奴件玉它 + WINDOW_MESSAGETYPE_PETSELECT, 矢永玄蓟 它奴件玉它 + WINDOW_MESSAGETYPE_PARTYSELECT, 醮棉蓟 它奴件玉它 + WINDOW_MESSAGETYPE_PETANDPARTYSELECT, 矢永玄]醮棉蓟 它奴件玉它 + WINDOW_MESSAGETYPE_ITEMSHOPMENU, 云饕及丢瓦亘□它奶件玉它 + WINDOW_MWSSAGETYPE_ITEMSHOPYMAIN, 云饕及丢奶件它奶件玉它 + WINDOW_MESSAGETYPE_LIMITITEMSHOPMAIN, 中潸曰毁 失奶 丞盒及丢奶件它奶件玉它 + WINDOW_MESSAGETYPE_PETSKILLSHOP, 矢永玄及 盒今氏它奶件玉它 + WINDOW_MESSAGETYPE_WIDEMESSAGE, 丢永本□斥及心 五中 + WINDOW_MESSAGETYPE_WIDEMESSAGEANDLINEINPUT, 丢永本□斥午域垫 五中 + + }WINDOW_MESSAGETYPE; + + int buttontype + 示正件及溥挚毛隙烂允月[扔□田□匹反动票及迕卞烂聒今木化中月[ + + #define WINDOW_BUTTONTYPE_NONE (0) + #define WINDOW_BUTTONTYPE_OK (1 << 0) + #define WINDOW_BUTTONTYPE_CANCEL (1 << 1) + #define WINDOW_BUTTONTYPE_YES (1 << 2) + #define WINDOW_BUTTONTYPE_NO (1 << 3) + #define WINDOW_BUTTONTYPE_PREV (1 << 4) + #define WINDOW_BUTTONTYPE_NEXT (1 << 5) + + 仇木日及赚心宁歹六匹霜耨允月[ 尹壬]YES示正件午NO示正件互 仄中凛反 + WINDOW_BUTTONTYPE_YES | WINDOW_BUTTONTYPE_NO (=12) + 匹霜月[ + + int seqno + 仇及它奴件玉它及 寞毛憎允[扔□田□互栋 允月[ + 弁仿奶失件玄反WN卞化仇及它奴件玉它及丑综瑛绊毛忒允及卞]仇及 寞毛骄尹化忒蚕允月[ + 仇木卞方匀化扔□田□反升及NPC及升及桦 匹及它奴件玉它井毛 蝇请 月方丹卞允月[ + int objindex + 仇及它奴件玉它毛请六午蜕匀凶NPC卅升及index互伞 今木化中月[ + 扑旦 丞互请六午蜕匀凶桦宁反-1卅升互 匀化中月[ + 弁仿奶失件玄反]它奴件玉它 及WN皿夫玄戊伙匹仇及醒袄毛公及引引忒六壬 中[ + string data + 丢永本□斥 毛憎允[ 反巨旦弗□皿允月["\n"匹嗉濠月午荼垫午中丹啦 午允月[ + 引凶]弁仿奶失件玄及它奴件玉它匹 憎请 月产汔毛旋尹凶端反愤 读卞荼垫今木月[ + 蓟 饷及丐月它奴件玉它匹反]"\n"匹嗉濠日木凶 赓及玄□弁件互丢永本□斥及垫醒 + 午卅曰]戚卞丢永本□斥及玄□弁件互 赓及玄□弁件匹隙烂今木凶蜊醒粮五] + 公及丐午及玄□弁件 互ㄠ勾内勾及蓟 饷午卅月[引凶蟆井日赐卞 1 井日 + 寞毛喃曰癫化]蓟 仄凶桦宁及WN匹及忒蚕及凛卞忒允[ + string data(云饕迕 + 丢永本□斥 毛憎允[ 反巨旦弗□皿允月["\n"匹嗉濠月午荼垫午中丹啦 午允月[ + 引凶]弁仿奶失件玄及它奴件玉它匹 憎请 月产汔毛旋尹凶端反愤 读卞荼垫今木月[ + 犯□正 反嫩 卞" "匹嗉濠日木化中引允[ + U 丹V + 中 月白仿弘 丹ㄟ“ 月ㄠ 蟆及犯□正银丹井白仿弘 银丹ㄟ“银歹卅中“1 + 饕及 蟆 丢永本□斥 饕丢永本□斥 蜊醒蓟 丢永本□斥 伊矛伙箫曰卅中丢永本□斥 割 丢永本□斥 + 失奶 丞互中匀天中丢永本□斥 失奶 丞 尹月 尹卅中白仿弘 尹月“ㄟ 尹卅中“ㄠ 失奶 丞伊矛伙 + 袄蟾 飓 寞 失奶 丞 尹月 尹卅中白仿弘 失奶 丞伊矛伙 袄蟾 飓 寞 + + 0|1|扔丞幼伙及 湛盒|中日匀仄扎中}窒及方丹分中|中日匀仄扎中升木卞允月|窒蜊 邰分中|公木毛隶 允月卞反伊矛伙互 + 箫曰卅中仃升中中及井中| 癫卞中中氏分友|云中云中失奶 丞互中匀天中元扎友尹井″ 皮□丢仿件| + ㄟ|ㄠㄟㄟ|ㄠㄥㄟㄟㄟ|产域 卞 猾\n躲绊 歇|泔阕|ㄟ|ㄤㄟ|ㄠㄥㄟㄟㄡ| ㄡㄟ荚汊\n 莴卞反勾五 \n兜中 + + U 月V + 中 月白仿弘 丹ㄟ“ 月ㄠ 蟆及犯□正银丹井白仿弘 银丹ㄟ“银歹卅中“1 + 饕及 蟆 丢永本□斥 饕丢永本□斥 云嗯互中匀天中卞卅匀切扎丹丢永本□斥|割 丢永本□斥 + 失奶 丞 木月 木卅中白仿弘 袄蟾 飓 寞 失奶 丞 木月 木卅中白仿弘 + 袄蟾 飓 寞 + + ㄠ|1|扔丞幼伙及 填盒|中日匀仄扎中}升月允月" 中日匀仄扎中升木毛 匀化仁木月[| 癫卞中中氏分友| + 公木分午}云嗯互左□田□仄切扎丹友 皮□丢仿件|ㄟ|ㄡㄟ|ㄠㄥㄟㄟㄟ| + 产域 卞 猾\n躲绊 歇|泔阕|ㄟ|ㄠㄟ|ㄠㄥㄟㄟㄡ| ㄡㄟ荚汊\n 莴卞反勾五 \n兜中 + U失奶 丞 仃月V + 白仿弘 月=ㄟ 丐午窒蜊 仃日木月井 + 饕及 蟆 + 仃月丢永本□斥 仇木动晓 仃日木卅中丢永本□斥 割 丢永本□斥 + 蟆 仃日木月井白仿弘 第 >ㄟ]尕第>ㄠ 袄蟾 飓 寞 域垫奶件白巧 失奶 丞 寞 ㄠ井日 + 蟆 仃日木月井白仿弘 第 >ㄟ]尕第>ㄠ 袄蟾 飓 寞 域垫奶件白巧 失奶 丞 寞 ㄠ井日 + U失奶 丞娄五潸月V + 白仿弘 娄五潸月=ㄠ + 饕及 蟆 娄五请允丢永本□斥 失奶 丞互域 及凛及丢永本□斥|割 丢永本□斥 + 蟆 娄五请六月井升丹井白仿弘 第 >ㄟ]尕第>ㄠ 失奶 丞伊矛伙 袄蟾 飓 寞 域垫奶件白巧 + 蟆 娄五请六月井升丹井白仿弘 第 >ㄟ]尕第>ㄠ 失奶 丞伊矛伙 袄蟾 飓 寞 域垫奶件白巧 + + U公及职V + 饕及 蟆 丢永本□斥 + + 扔丞幼伙及 填盒|中日匀仄扎中}升月允月" + + string data(矢永玄及 盒今氏迕 + 丢永本□斥 毛憎允[ 反巨旦弗□皿允月["\n"匹嗉濠月午荼垫午中丹啦 午允月[ + 引凶]弁仿奶失件玄及它奴件玉它匹 憎请 月产汔毛旋尹凶端反愤 读卞荼垫今木月[ + 犯□正 反嫩 卞" "匹嗉濠日木化中引允[ + U矢永玄及 潸 V + 蟆及树 银丹井升丹井" 银丹“0{银歹卅中“1 饕及 蟆 丢奶件丢永本□斥 + 袄蟾 袄蟾 + + 1 扔丞幼伙及 湛盒 中日匀仄扎中引匀六[允壬日仄中 壬匀井匹允方 + 及讽公及迭 500 猾 ㄢㄟ⊙ { 豢 ㄢㄟ⊙ + 哗萄域葱 1000 蕙仄中 苇互丐月井手 赝癫 +*/ +void lssproto_WN_send(int fd,int windowtype,int buttontype,int seqno,int objindex,char* data) +{ + char buffer[65500]; + int checksum=0; + +#ifdef _NO_WARP + // shan hanjj add Begin + CONNECT_set_seqno(fd,seqno); + CONNECT_set_selectbutton(fd,buttontype); + // shan End +#endif + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkint(buffer, windowtype); + checksum += util_mkint(buffer, buttontype); + checksum += util_mkint(buffer, seqno); + checksum += util_mkint(buffer, objindex); + checksum += util_mkstring(buffer, data); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_WN_SEND, buffer); + +} + +/* + servertoclient EF( int effect, int level, string option ); + (EFfect) + 湿支惚毛嫦日仄凶曰[弁仿奶失件玄卞蝈 读卅躲绊 蜇六方午霜月[ + + int effect + 躲绊 寞[公木冗木毛箫仄遥允月午] 午手及躲绊互 日木引允[ㄢ卞允月午惚午湿互嫦匀凶曰午井仄引允[ + + 1:惚 + 2:湿 + 4:饼蹄湿 烂 + + int level + 躲绊及雄今[ㄟ反壅允[ㄠ ㄤ反 蜇及雄今毛 允[ + string option + 漆 傀舰迕 +*/ +/* Arminius + 新增给丢骰子的动画 + int effect = 10 丢骰子 + level dont care + option = "pet1x|pet1y|dice1|pet2x|pet2y|dice2" (no makeEscapeString) +*/ +void lssproto_EF_send(int fd,int effect,int level,char* option) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkint(buffer, effect); + checksum += util_mkint(buffer, level); + checksum += util_mkstring(buffer, option); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_EF_SEND, buffer); +} + +/* + servertoclient SE( int x, int y, int senumber, int sw ); + (SoundEffect) + 弁仿奶失件玄卞SE毛 日允方丹卞隙憎允月[ + + int x,y + SE毛 耨葭及甄 [ + int senumber + 及 寞 + int sw + 毛 日允井鞅户月井[ + + 0:鞅户月 + 1: 日允 +*/ +void lssproto_SE_send(int fd,int x,int y,int senumber,int sw) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkint(buffer, x); + checksum += util_mkint(buffer, y); + checksum += util_mkint(buffer, senumber); + checksum += util_mkint(buffer, sw); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_SE_SEND, buffer); +} + +/* + servertoclient ClientLogin(string result); + ClientLogin及忒蚕[ + + string result + "ok" 午中丹 侬 [仇及 侬 反巨旦弗□皿今木卅中[ +*/ +void lssproto_ClientLogin_send(int fd,char* result) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkstring(buffer, result); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_CLIENTLOGIN_SEND, buffer); +} + +/* + servertoclient CreateNewChar(string result,string data); + CreateNewChar及忒蚕[ + + string result + "successful" 井 "failed" 及中内木井[仇及 侬 反巨旦弗□ + 皿仄卅中[ + string data + "failed" 及凛反 毛憎允谛棉及苇化坌月 侬 + 匹丐月[失市它件玄扔□田井日及忒蚕公及引引匹丐月[ + 动票及 侬 + + "failed bad parameter" + + 及桦宁反}平乓仿综岳及午五卞筋烂及由仿丢□正及 区毛旋尹化 + 中月午中丹午毛啦 允月[仇木反必□丞扔□田□互请 允月丢永 + 本□斥匹丐月[仇及 侬 反巨旦弗□皿仄卅中[ +*/ +void lssproto_CreateNewChar_send(int fd,char* result,char* data) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkstring(buffer, result); + checksum += util_mkstring(buffer, data); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_CREATENEWCHAR_SEND, buffer); +} + +/* + servertoclient CharDelete(string result,string data); + CharDelete 及忒蚕[ + + string result + "successful" 井 "failed" 及中内木井[巨旦弗□皿仄卅中[ + string data + "failed" 及凛反 毛憎允谛棉及苇化坌月 侬 + 匹丐月[失市它件玄扔□田井日及忒蚕公及引引匹丐月[ + 犯伉立正毛孔仁引卅中及匹}巨旦弗□皿仄卅中[ +*/ +void lssproto_CharDelete_send(int fd,char* result,char* data) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkstring(buffer, result); + checksum += util_mkstring(buffer, data); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_CHARDELETE_SEND, buffer); +} + +/* + servertoclient CharLogin(string result,string data); + CharaLogin及忒蚕[ + + string result + "successful" 井 "failed" 及中内木井[巨旦弗□皿仄卅中[ + string data + "failed" 及凛反 公及 及 侬 [巨旦弗□皿仄卅中[ +*/ +void lssproto_CharLogin_send(int fd,char* result,char* data) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkstring(buffer, result); + checksum += util_mkstring(buffer, data); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_CHARLOGIN_SEND, buffer); +} + +/* + servertoclient CharList(string result,string data); + CharList及忒蚕[ + + string result + "successful" 井 "failed" 及中内木井[巨旦弗□皿仄卅中 + string data + result互"successful"及凛反}失市它件玄扔□田□卞忡绣今木化 + 中月允屯化及平乓仿及 蟆}左皿扑亦件毛毛旦矢□旦匹嗉濠匀凶 + 域蜊及 侬 [仇及 侬 毛综匀化中月及反}失市它件玄扔□田[ + result 互 "failed" 及凛反 毛憎允谛棉及苇化坌月 侬 匹 + 丐月[岳 及凛及左皿扑亦件及 褥反动票及午云曰匹丐月[ + dataplace|faceimage|level|maxhp|atk|def|quick|charm|earth|water|fire|wind|logincount|name|place + + dataplace + 本□皮犯□正及窒 井[仇木匹平乓仿弁正□伉旦玄及窒 井毛瑁烂允月[ + faceimage + 涌及 飓 寞 + level + 平乓仿及伊矛伙 + maxhp,atk,def,quick,charm + 备由仿丢□正[ + earth.water,fire,wind + 备箪岭袄 + logincount + 夫弘奶件市它件玄 + name + 平乓仿及 蟆 + place + 平乓仿及中月桦赭 + + "|" 匹嗉濠日木化中月[ 公木冗木及嫩 反}巨旦弗□皿今木化中月[公及丐午凶化徇 + 匹勾卅仆月[ +*/ +void lssproto_CharList_send(int fd,char* result,char* data) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkstring(buffer, result); + checksum += util_mkstring(buffer, data); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_CHARLIST_SEND, buffer); +} + +/* + servertoclient CharLogout(string result , string data); + Logout卞覆允月忒蚕[ + + string result + "successful" 井 "failed" 及中内木井[巨旦弗□皿仄卅中[ + string data + "failed" 及凛卞及心啦 互丐曰}撩 及 (橇谪)毛憎允谛棉 + 及苇化坌月 侬 匹丐月[巨旦弗□皿仄卅中[ +*/ +void lssproto_CharLogout_send(int fd,char* result,char* data) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkstring(buffer, result); + checksum += util_mkstring(buffer, data); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_CHARLOGOUT_SEND, buffer); +} + +/* + servertoclient ProcGet( string data); + ProcGet及忒蚕[ + + string data + 巨旦弗□皿允月[必□丞扔□田□及 树 毛霜耨允月[ 反log/proc白央奶伙卞踏井木月 午 元[ +*/ +void lssproto_ProcGet_send(int fd,char* data) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkstring(buffer, data); + + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_PROCGET_SEND, buffer); +} + +/* + servertoclient PlayerNumGet( int logincount, int player); + PlayerNumGet及忒蚕[ + + int logincount,player +*/ +void lssproto_PlayerNumGet_send(int fd,int logincount,int player) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkint(buffer, logincount); + checksum += util_mkint(buffer, player); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_PLAYERNUMGET_SEND, buffer); +} + +/* + servertoclient Echo( string test ); + Echo卞覆允月忒蚕[ + + string test + 今五幻升 今木凶 侬 [巨旦弗□皿仄卅中[ +*/ +void lssproto_Echo_send(int fd,char* test) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkstring(buffer, test); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_ECHO_SEND, buffer); +} + +// CoolFish: Trade 2001/4/18 + +void lssproto_TD_send(int fd, int index, char* message) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkstring(buffer, message); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_TD_SEND, buffer); +} +#ifdef _CHATROOMPROTOCOL // (不可开) Syu ADD 聊天室频道 +void lssproto_CHATROOM_send ( int fd , char* message ) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkstring(buffer, message); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_CHATROOM_SEND, buffer); +} +#endif +#ifdef _NEWREQUESTPROTOCOL // (不可开) Syu ADD 新增Protocol要求细项 +void lssproto_RESIST_send ( int fd , char* message ) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkstring(buffer, message); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_RESIST_SEND, buffer); +} +#endif +#ifdef _OUTOFBATTLESKILL // (不可开) Syu ADD 非战斗时技能Protocol +void lssproto_BATTLESKILL_send ( int fd , char* message ) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkstring(buffer, message); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_BATTLESKILL_SEND, buffer); +} +#endif +void lssproto_NU_send(int fd, int nu) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkint(buffer, nu); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_NU_SEND, buffer); +} + + +void lssproto_FM_send(int fd, char* message) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkstring(buffer, message); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_FM_SEND, buffer); +} + + +void lssproto_WO_send(int fd,int effect) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkint(buffer, effect); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_WO_SEND, buffer); +} +#ifdef _ITEM_CRACKER +void lssproto_IC_send(int fd, int x, int y) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkint(buffer, x); + checksum += util_mkint(buffer, y); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_IC_SEND, buffer); +} +#endif +#ifdef _MAGIC_NOCAST // 精灵:沉默 +void lssproto_NC_send(int fd,int flg) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkint(buffer, flg); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_NC_SEND, buffer); +} +#endif + +#ifdef _CHECK_GAMESPEED +void lssproto_CS_send( int fd, int deltimes) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkint( buffer, deltimes); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_CS_SEND, buffer); +} +#endif + +#ifdef _STREET_VENDOR +void lssproto_STREET_VENDOR_send(int fd,char *message) +{ + char buffer[65500]; + int checksum = 0; + + strcpy(buffer,""); + + CONNECT_getCdkey(fd,PersonalKey,4096); + strcat(PersonalKey,_RUNNING_KEY); + + checksum += util_mkstring(buffer,message); + util_mkint(buffer,checksum); + util_SendMesg(fd,LSSPROTO_STREET_VENDOR_SEND,buffer); +} +#endif + +#ifdef _RIGHTCLICK +void lssproto_RCLICK_send(int fd, int type, char* data) +{ + char buffer[65500]; + int checksum=0; + + print("\n RCLICK_send( type=%d data=%s) ", type, data ); + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkint(buffer, type); + checksum += util_mkint(buffer, data); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_RCLICK_SEND, buffer); +} +#endif + +#ifdef _JOBDAILY +void lssproto_JOBDAILY_send(int fd,char *data) +{ + char buffer[65500]; + int checksum = 0; + + strcpy(buffer,""); + + CONNECT_getCdkey(fd,PersonalKey,4096); + strcat(PersonalKey,_RUNNING_KEY); + + //print("tocli_data:%s ",data); + checksum += util_mkstring(buffer,data); + util_mkint(buffer,checksum); + //print("tocli_buffer:%s ",buffer); + util_SendMesg(fd,LSSPROTO_JOBDAILY_SEND,buffer); +} +#endif + +#ifdef _TEACHER_SYSTEM +void lssproto_TEACHER_SYSTEM_send(int fd,char *data) +{ + char buffer[65500]; + int checksum = 0; + + strcpy(buffer,""); + + CONNECT_getCdkey(fd,PersonalKey,4096); + strcat(PersonalKey,_RUNNING_KEY); + + checksum += util_mkstring(buffer,data); + util_mkint(buffer,checksum); + util_SendMesg(fd,LSSPROTO_TEACHER_SYSTEM_SEND,buffer); +} +#endif + +#ifdef _ADD_STATUS_2 +void lssproto_S2_send(int fd,char* data) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer,""); + + CONNECT_getCdkey( fd, PersonalKey, 4096); + strcat(PersonalKey, _RUNNING_KEY); + + checksum += util_mkstring(buffer, data); + util_mkint(buffer, checksum); + util_SendMesg(fd, LSSPROTO_S2_SEND, buffer); +} +#endif diff --git a/gmsv/lssproto_util.c b/gmsv/lssproto_util.c new file mode 100644 index 0000000..ca66441 --- /dev/null +++ b/gmsv/lssproto_util.c @@ -0,0 +1,1475 @@ +#define _LSSPROTOUTIL_C_ +#include "version.h" +#include +#include +#include +#ifndef WIN32 +#include +#include +#endif +#include "lssproto_util.h" +//ttom +2 for degug +#define IS_2BYTEWORD( _a_ ) ( (char)(0x80) <= (_a_) && (_a_) <= (char)(0xFF) ) + +#include "common.h" +#ifdef lssproto__ENCRYPT +long lssproto_ringoCompressor( unsigned char *code , long codelen , unsigned char *text , long textlen); +long lssproto_ringoDecompressor( unsigned char *text , long textlen , unsigned char *code , long codelen); +#endif +/* + lsrpc routines +*/ +int lssproto_AllocateCommonWork(int bufsiz) +{ + lssproto.workbufsize = bufsiz; + lssproto.work = NULL; + lssproto.arraywork = NULL; + lssproto.escapework = NULL; + lssproto.val_str = NULL; + lssproto.token_list = NULL; + lssproto.cryptwork = NULL; + lssproto.jencodecopy = NULL; + lssproto.jencodeout = NULL; + lssproto.compresswork = NULL; + lssproto.work = (char*)calloc( 1, lssproto.workbufsize ); + lssproto.arraywork = (char*)calloc( 1, lssproto.workbufsize ); + lssproto.escapework = (char*)calloc( 1, lssproto.workbufsize ); + lssproto.val_str = (char*)calloc( 1, lssproto.workbufsize ); + lssproto.token_list = (char**)calloc( 1, lssproto.workbufsize *sizeof( char** ) ); + lssproto.cryptwork = (char*)calloc( 1, lssproto.workbufsize * 3 ); + lssproto.jencodecopy = (char*)calloc( 1, lssproto.workbufsize * 3 ); + lssproto.jencodeout = (char*)calloc( 1, lssproto.workbufsize * 3 ); + lssproto.compresswork = (char*)calloc( 1, lssproto.workbufsize * 3 ); + memset( lssproto.work , 0, lssproto.workbufsize ); + memset( lssproto.arraywork , 0, lssproto.workbufsize ); + memset( lssproto.escapework , 0, lssproto.workbufsize ); + memset( lssproto.val_str , 0, lssproto.workbufsize ); + memset( (char*)lssproto.token_list ,0, lssproto.workbufsize*sizeof(char**) ); + memset( lssproto.cryptwork , 0, lssproto.workbufsize*3 ); + memset( lssproto.jencodecopy , 0, lssproto.workbufsize*3 ); + memset( lssproto.jencodeout , 0, lssproto.workbufsize*3 ); + memset( lssproto.compresswork , 0, lssproto.workbufsize*3 ); + if( lssproto.work == NULL || + lssproto.arraywork == NULL || + lssproto.escapework == NULL || + lssproto.val_str == NULL || + lssproto.token_list == NULL || + lssproto.cryptwork == NULL || + lssproto.jencodecopy == NULL || + lssproto.jencodeout == NULL || + lssproto.compresswork == NULL ){ + free( lssproto.work);free( lssproto.val_str); + free( lssproto.escapework);free( lssproto.arraywork ); + free( lssproto.token_list);free( lssproto.cryptwork ); + free( lssproto.jencodecopy);free( lssproto.jencodeout ); + free( lssproto.compresswork ); + return -1; + } + return 0; +} +/********** + Get message information from a network input +**********/ +void lssproto_GetMessageInfo( int *id , char *funcname , int len, char **tk ) +{ + if( tk[0] == NULL || tk[1] == NULL ){ + *id = 0; + lssproto_strcpysafe( funcname , "" , len ); + return; + } + *id = strtoul( tk[0] ,NULL,10); + lssproto_strcpysafe( funcname , tk[1] , len ); + return; +} +/******************************************** + string utilities +*********************************************/ +void lssproto_strcpysafe( char *dest, char *src, int maxlen ) +{ + int i; + for(i=0;i (int)( lssproto.workbufsize*3-2) ){ + fprintf( stderr, "lsgen: badly configured work buflen\n" ); + exit(1); + } + if( (flag%2) == 1 ) flag ++; + lssproto.compresswork[0] = flag; + memcpy( lssproto.compresswork+1,src,srclen ); + compressed_l = srclen + 1; + } else { + if((flag%2)==0)flag++; + lssproto.compresswork[0] = flag; + compressed_l = lssproto_ringoCompressor( + (unsigned char*)lssproto.compresswork + 1 , + (long)lssproto.workbufsize*3 - 1, + (unsigned char*)src , + (long)strlen(src) ) + 1; /* be careful! */ + } + /* return empty line if error or buffer excess */ + if( compressed_l <= 0 ){ + lssproto_strcpysafe( out , "\n" , maxoutlen ); + return; + } + memcpy( lssproto.jencodecopy ,lssproto.compresswork ,compressed_l ); + lssproto_jEncode( lssproto.jencodecopy , compressed_l , JENCODE_KEY , + lssproto.jencodeout, &jencodedlen , lssproto.workbufsize*3 -1 ); + lssproto_encode64( (unsigned char*)lssproto.jencodeout , jencodedlen, (unsigned char*)out ); +} +/* translate code64 text to original lsrpc text */ +static void lssproto_decodeString( char *src , char *out ) +{ + int compressed_l =0, outlen64; + int l; + long decompressed_l = 0; + /* copy src to copybuffer because jencoder modifies the input buffer */ + l = strlen( src ); + if( src[l-1]=='\n' || src[l-1]=='\r' )src[l-1]=0; + if( src[l-2]=='\n' || src[l-2]=='\r' )src[l-2]=0; + outlen64 = lssproto_decode64( (unsigned char*)src , (unsigned char*)lssproto.jencodecopy ); + lssproto_jDecode( lssproto.jencodecopy , outlen64 , JENCODE_KEY, + lssproto.compresswork , &compressed_l); + /*out[outlen]=0; PENDING*/ + if( (lssproto.compresswork[0] % 2 ) == 0 ){ + if( compressed_l <= 0 ){ + decompressed_l = 0; + fprintf( stderr, "LSRPC: too short:[%s]\n", src ); + } else { + memcpy( out, lssproto.compresswork+1, compressed_l -1 ); + decompressed_l = compressed_l -1; + } + } else { + decompressed_l = + lssproto_ringoDecompressor( (unsigned char*)out , + (long)lssproto.workbufsize , + (unsigned char*)lssproto.compresswork+1 , + (long)compressed_l -1 ); + } + out[decompressed_l] = 0; +} +/* followings are taken from code64.c */ +char lssproto_charset[64]={ + 'A','B','C','D', 'E','F','G','H', + 'I','J','K','L', 'M','N','O','P', + 'Q','R','S','T', 'U','V','W','X', + 'Y','Z','a','b', 'c','d','e','f', + 'g','h','i','j', 'k','l','m','n', + 'o','p','q','r', 's','t','u','v', + 'w','x','y','z', '0','1','2','3', + '4','5','6','7', '8','9','+','-' +}; +char lssproto_reversecharset[256]={ + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,62, 0,63,0,0, + 52,53,54,55, 56,57,58,59, + 60,61,0,0, 0,0,0,0, + 0,0,1,2, 3,4,5,6, + 7,8,9,10, 11,12,13,14, + 15,16,17,18, 19,20,21,22, + 23,24,25,0, 0,0,0,0, + 0,26,27,28, 29,30,31,32, + 33,34,35,36, 37,38,39,40, + 41,42,43,44, 45,46,47,48, + 49,50,51,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0 +}; + +static void lssproto_encode64( unsigned char *in , int len , unsigned char *out ) +{ + int i; + int use_bytes; + int address = 0; + out[0] = 0; + for(i=0;;i+=3){ + unsigned char in1 , in2 , in3; + unsigned char out1 ,out2 , out3 , out4; + if( i >= len ) break; + if( i >= (len-1)){ /* the last letter ( to be thrown away ) */ + in1 = in[i] & 0xff; + in2 = in3 = 0; + use_bytes = 2; + } else if( i >= (len-2)){ /* the last 2 letters ( process only 1 byte)*/ + in1 = in[i] & 0xff; + in2 = in[i+1] & 0xff; + in3 = 0; + use_bytes = 3; + } else { /* there are more or equal than 3 letters */ + in1 = in[i] & 0xff; + in2 = in[i+1] & 0xff; + in3 = in[i+2] & 0xff; + use_bytes = 4; + } + out1 = ((in1 & 0xfc)>>2) & 0x3f; + out2 = ((in1 & 0x03)<<4) | ((( in2 & 0xf0)>>4)&0x0f); + out3 = ((in2 & 0x0f)<<2) | ((( in3 & 0xc0)>>6)&0x03); + out4 = (in3 & 0x3f ); + if( use_bytes >= 2 ){ + out[address++] = lssproto_charset[out1]; + out[address++] = lssproto_charset[out2]; + out[address]=0; + } + if( use_bytes >= 3 ){ + out[address++] = lssproto_charset[out3]; + out[address]=0; + } + if( use_bytes >= 4 ){ + out[address++] = lssproto_charset[out4]; + out[address]=0; + } + } +} +/* + * Decode it + * char *in : encoded ascii chars + * char *out : decoded( output) + * return value : output byte count + * + * note: no need to have bigger buffer. because output is to + * be smaller than input string size + */ +static int lssproto_decode64( unsigned char *in , unsigned char *out ) +{ + unsigned char in1 , in2 , in3 , in4; + unsigned char out1 , out2 , out3; + int use_bytes; + int address= 0; + int i; + for(i=0;;i+=4 ){ + if( in[i] == 0 ){ + break; + } else if( in[i+1] == 0 ){ /* the last letter */ + break; + } else if( in[i+2] == 0 ){ /* the last 2 letters */ + in1 = lssproto_reversecharset[in[i]]; + in2 = lssproto_reversecharset[in[i+1]]; + in3 = in4 = 0; + use_bytes = 1; + } else if( in[i+3] == 0 ){ /* the last 3 letters */ + in1 = lssproto_reversecharset[in[i]]; + in2 = lssproto_reversecharset[in[i+1]]; + in3 = lssproto_reversecharset[in[i+2]]; + in4 = 0; + use_bytes = 2; + } else { /* process 4 letters */ + in1 = lssproto_reversecharset[in[i]]; + in2 = lssproto_reversecharset[in[i+1]]; + in3 = lssproto_reversecharset[in[i+2]]; + in4 = lssproto_reversecharset[in[i+3]]; + use_bytes = 3; + } + out1 = (in1<<2) | (((in2 & 0x30)>>4)&0x0f) ; + out2 = ((in2 & 0x0f )<<4) | ((( in3 & 0x3c)>>2)&0x0f); + out3 = ( (in3 &0x03)<<6) | ( in4 & 0x3f ); + if( use_bytes >= 1 ){ + out[address++] = out1; + } + if( use_bytes >= 2 ){ + out[address++] = out2; + } + if( use_bytes >= 3 ){ + out[address++] = out3; + } + if( use_bytes != 3 ){ + break; + } + } + return address; +} + +/* followings are taken from Jencode.c by jun */ +static void lssproto_jEncode(char *src,int srclen,int key,char *encoded,int *encodedlen,int maxencodedlen) +{ + char sum=0; + int i; + if(srclen+1 > maxencodedlen){ + *encodedlen = maxencodedlen; + for(i=0;i<(*encodedlen);i++)encoded[i] = src[i]; + } + if(srclen+1 <= maxencodedlen){ + *encodedlen=srclen+1; + for(i=0;i i) encoded[i] = src[i] + sum*((i*i)%3); + if(abs((key%srclen)) == i) encoded[i] = sum; + if(abs((key%srclen)) < i) encoded[i] = src[i-1] + sum*((i*i)%7); + } + } +} +static void lssproto_jDecode(char *src,int srclen,int key,char *decoded,int *decodedlen) +{ + char sum=0; + int i; + *decodedlen=srclen-1; + if( *decodedlen == 0 ){ + return; /* return error if length is 0 */ + } + sum = src[abs(key%(*decodedlen))]; + for(i=0;i i) decoded[i] = src[i] - sum*((i*i)%3); + if(abs((key%(*decodedlen))) < i) decoded[i-1] = src[i] - sum*((i*i)%7); + } + for(i=0;i<(*decodedlen);i++){ + if(((key%7) == (i%5))||((key%2) == (i%2)))decoded[i] = ~decoded[i]; + } +} + +/*****************************************************************/ +/* Compress / Decompress routine */ +/*****************************************************************/ +#define B00000000 0 +#define B00000001 1 +#define B00000010 2 +#define B00000011 3 +#define B00000100 4 +#define B00000101 5 +#define B00000110 6 +#define B00000111 7 +#define B00001000 8 +#define B00001001 9 +#define B00001010 10 +#define B00001011 11 +#define B00001100 12 +#define B00001101 13 +#define B00001110 14 +#define B00001111 15 +#define B00010000 16 +#define B00010001 17 +#define B00010010 18 +#define B00010011 19 +#define B00010100 20 +#define B00010101 21 +#define B00010110 22 +#define B00010111 23 +#define B00011000 24 +#define B00011001 25 +#define B00011010 26 +#define B00011011 27 +#define B00011100 28 +#define B00011101 29 +#define B00011110 30 +#define B00011111 31 +#define B00100000 32 +#define B00100001 33 +#define B00100010 34 +#define B00100011 35 +#define B00100100 36 +#define B00100101 37 +#define B00100110 38 +#define B00100111 39 +#define B00101000 40 +#define B00101001 41 +#define B00101010 42 +#define B00101011 43 +#define B00101100 44 +#define B00101101 45 +#define B00101110 46 +#define B00101111 47 +#define B00110000 48 +#define B00110001 49 +#define B00110010 50 +#define B00110011 51 +#define B00110100 52 +#define B00110101 53 +#define B00110110 54 +#define B00110111 55 +#define B00111000 56 +#define B00111001 57 +#define B00111010 58 +#define B00111011 59 +#define B00111100 60 +#define B00111101 61 +#define B00111110 62 +#define B00111111 63 +#define B01000000 64 +#define B01000001 65 +#define B01000010 66 +#define B01000011 67 +#define B01000100 68 +#define B01000101 69 +#define B01000110 70 +#define B01000111 71 +#define B01001000 72 +#define B01001001 73 +#define B01001010 74 +#define B01001011 75 +#define B01001100 76 +#define B01001101 77 +#define B01001110 78 +#define B01001111 79 +#define B01010000 80 +#define B01010001 81 +#define B01010010 82 +#define B01010011 83 +#define B01010100 84 +#define B01010101 85 +#define B01010110 86 +#define B01010111 87 +#define B01011000 88 +#define B01011001 89 +#define B01011010 90 +#define B01011011 91 +#define B01011100 92 +#define B01011101 93 +#define B01011110 94 +#define B01011111 95 +#define B01100000 96 +#define B01100001 97 +#define B01100010 98 +#define B01100011 99 +#define B01100100 100 +#define B01100101 101 +#define B01100110 102 +#define B01100111 103 +#define B01101000 104 +#define B01101001 105 +#define B01101010 106 +#define B01101011 107 +#define B01101100 108 +#define B01101101 109 +#define B01101110 110 +#define B01101111 111 +#define B01110000 112 +#define B01110001 113 +#define B01110010 114 +#define B01110011 115 +#define B01110100 116 +#define B01110101 117 +#define B01110110 118 +#define B01110111 119 +#define B01111000 120 +#define B01111001 121 +#define B01111010 122 +#define B01111011 123 +#define B01111100 124 +#define B01111101 125 +#define B01111110 126 +#define B01111111 127 +#define B10000000 128 +#define B10000001 129 +#define B10000010 130 +#define B10000011 131 +#define B10000100 132 +#define B10000101 133 +#define B10000110 134 +#define B10000111 135 +#define B10001000 136 +#define B10001001 137 +#define B10001010 138 +#define B10001011 139 +#define B10001100 140 +#define B10001101 141 +#define B10001110 142 +#define B10001111 143 +#define B10010000 144 +#define B10010001 145 +#define B10010010 146 +#define B10010011 147 +#define B10010100 148 +#define B10010101 149 +#define B10010110 150 +#define B10010111 151 +#define B10011000 152 +#define B10011001 153 +#define B10011010 154 +#define B10011011 155 +#define B10011100 156 +#define B10011101 157 +#define B10011110 158 +#define B10011111 159 +#define B10100000 160 +#define B10100001 161 +#define B10100010 162 +#define B10100011 163 +#define B10100100 164 +#define B10100101 165 +#define B10100110 166 +#define B10100111 167 +#define B10101000 168 +#define B10101001 169 +#define B10101010 170 +#define B10101011 171 +#define B10101100 172 +#define B10101101 173 +#define B10101110 174 +#define B10101111 175 +#define B10110000 176 +#define B10110001 177 +#define B10110010 178 +#define B10110011 179 +#define B10110100 180 +#define B10110101 181 +#define B10110110 182 +#define B10110111 183 +#define B10111000 184 +#define B10111001 185 +#define B10111010 186 +#define B10111011 187 +#define B10111100 188 +#define B10111101 189 +#define B10111110 190 +#define B10111111 191 +#define B11000000 192 +#define B11000001 193 +#define B11000010 194 +#define B11000011 195 +#define B11000100 196 +#define B11000101 197 +#define B11000110 198 +#define B11000111 199 +#define B11001000 200 +#define B11001001 201 +#define B11001010 202 +#define B11001011 203 +#define B11001100 204 +#define B11001101 205 +#define B11001110 206 +#define B11001111 207 +#define B11010000 208 +#define B11010001 209 +#define B11010010 210 +#define B11010011 211 +#define B11010100 212 +#define B11010101 213 +#define B11010110 214 +#define B11010111 215 +#define B11011000 216 +#define B11011001 217 +#define B11011010 218 +#define B11011011 219 +#define B11011100 220 +#define B11011101 221 +#define B11011110 222 +#define B11011111 223 +#define B11100000 224 +#define B11100001 225 +#define B11100010 226 +#define B11100011 227 +#define B11100100 228 +#define B11100101 229 +#define B11100110 230 +#define B11100111 231 +#define B11101000 232 +#define B11101001 233 +#define B11101010 234 +#define B11101011 235 +#define B11101100 236 +#define B11101101 237 +#define B11101110 238 +#define B11101111 239 +#define B11110000 240 +#define B11110001 241 +#define B11110010 242 +#define B11110011 243 +#define B11110100 244 +#define B11110101 245 +#define B11110110 246 +#define B11110111 247 +#define B11111000 248 +#define B11111001 249 +#define B11111010 250 +#define B11111011 251 +#define B11111100 252 +#define B11111101 253 +#define B11111110 254 +#define B11111111 255 +/* masks for first byte ( write )*/ +int lssproto_modifymask_first[8][9]={ + {0, B00000001,B00000011,B00000111,B00001111,B00011111,B00111111,B01111111,B11111111},/* mod 0*/ + {0, B00000011,B00000111,B00001111,B00011111,B00111111,B01111111,B11111111,B11111111},/* mod 1*/ + {0, B00000111,B00001111,B00011111,B00111111,B01111111,B11111111,B11111111,B11111111},/* mod 2*/ + {0, B00001111,B00011111,B00111111,B01111111,B11111111,B11111111,B11111111,B11111111},/* mod 3*/ + {0, B00011111,B00111111,B01111111,B11111111,B11111111,B11111111,B11111111,B11111111},/* mod 4*/ + {0, B00111111,B01111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111},/* mod 5*/ + {0, B01111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111},/* mod 6*/ + {0, B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111},/* mod 7*/ +}; +/* masks for second byte ( write ) */ +int lssproto_modifymask_second[8][9]={ + {0, B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000},/* mod 0 */ + {0, B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001},/* mod 1 */ + {0, B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B00000011},/* mod 2 */ + {0, B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B00000011,B00000111},/* mod 3 */ + {0, B00000000,B00000000,B00000000,B00000000,B00000001,B00000011,B00000111,B00001111},/* mod 4 */ + {0, B00000000,B00000000,B00000000,B00000001,B00000011,B00000111,B00001111,B00011111},/* mod 5 */ + {0, B00000000,B00000000,B00000001,B00000011,B00000111,B00001111,B00011111,B00111111},/* mod 6 */ + {0, B00000000,B00000001,B00000011,B00000111,B00001111,B00011111,B00111111,B01111111},/* mod 7 */ +}; +/* + * used by bitstream routines + */ +int bitstream_maxbyte, bitstream_bitaddr ; +char *bitstream_buf; +/* initialize bitstream for output */ +static int initOutputBitStream( char *buf ,int buflen) +{ + bitstream_bitaddr = 0; + bitstream_maxbyte = buflen; + bitstream_buf = buf; + memset( buf,0, buflen); + return 0; +} +/* initialize bitstream for input */ +static int initInputBitStream( char *buf , int buflen) +{ + bitstream_bitaddr = 0; + bitstream_maxbyte = buflen; + bitstream_buf = buf; + return 0; +} +/* + * read from bit stream. used only from 1 bit to 8 bits + * this is a base routine + */ +static unsigned int readInputBitStreamBody( int bwidth ) +{ + int mod = bitstream_bitaddr % 8; + int byteaddr = bitstream_bitaddr / 8; + /* return if excess */ + if( byteaddr >= bitstream_maxbyte)return 0; + if( bwidth >= 1 && bwidth <= 8){ + int b1 = (( bitstream_buf[byteaddr] & lssproto_modifymask_first[mod][bwidth] )>>mod); + int b2 = (( bitstream_buf[byteaddr+1] & lssproto_modifymask_second[mod][bwidth])<<(8-mod)); + bitstream_bitaddr += bwidth; + return b1 | b2; + } else { + return 0; + } +} +/* + * read from bit stream. used from 1 bit to 32 bits + * + */ +static unsigned int readInputBitStream( int bwidth ) +{ + if( bwidth <= 0 ){ + return 0; + } else if( bwidth >= 1 && bwidth <= 8 ){ + return readInputBitStreamBody( bwidth ); + } else if( bwidth >= 9 && bwidth <= 16 ){ + unsigned int first = readInputBitStreamBody(8); + unsigned int second = readInputBitStreamBody( bwidth-8); + return first + (second << 8 ); + } else if( bwidth >= 17 && bwidth <= 24 ){ + unsigned int first = readInputBitStreamBody(8); + unsigned int second = readInputBitStreamBody(8); + unsigned int third = readInputBitStreamBody(bwidth-8); + return first + ( second << 8 ) + ( third << 16 ); + } else if( bwidth >= 25 && bwidth <= 32 ){ + unsigned int first = readInputBitStreamBody(8); + unsigned int second = readInputBitStreamBody(8); + unsigned int third = readInputBitStreamBody(8); + unsigned int forth = readInputBitStreamBody(bwidth-8); + return first + ( second << 8 ) + ( third << 16 ) + ( forth << 24 ); + } + return 0; +} +/* + * write to a bitstream. only used from 1 bit to 8 bits + * this is a base routine. + */ +static int writeOutputBitStreamBody( int bwidth , unsigned char b) +{ + int mod = bitstream_bitaddr % 8; + int byteaddr = bitstream_bitaddr / 8; + /* return error if excess */ + if( bitstream_maxbyte <= (byteaddr+1)) return -1; + bitstream_buf[byteaddr] &= lssproto_modifymask_first[mod][bwidth]; + bitstream_buf[byteaddr] |= (b << mod) & lssproto_modifymask_first[mod][bwidth]; + bitstream_buf[byteaddr+1] &= lssproto_modifymask_second[mod][bwidth]; + bitstream_buf[byteaddr+1] |= (b>>(8-mod))& lssproto_modifymask_second[mod][bwidth]; + bitstream_bitaddr += bwidth; + return byteaddr+1; +} +/* + * write to a bitstream. used from 1 bits to 32 bits + * returns -1 if error or buffer excession + */ +static int writeOutputBitStream( int bwidth, unsigned int dat) +{ + int ret; + if( bwidth <= 0){ + return -1; + } else if( bwidth >= 1 && bwidth <= 8 ){ + if((ret=writeOutputBitStreamBody( bwidth , (unsigned char)dat))<0)return -1; + } else if( bwidth > 8 && bwidth <= 16 ){ + if(writeOutputBitStreamBody( 8 , (unsigned char)(dat&0xff))<0)return -1; + if((ret=writeOutputBitStreamBody( bwidth - 8 , ( unsigned char)((dat>>8)&0xff)))<0)return -1; + } else if( bwidth > 16 && bwidth <= 24 ){ + if(writeOutputBitStreamBody( 8 , (unsigned char)(dat&0xff))<0)return -1; + if(writeOutputBitStreamBody( 8 , (unsigned char)((dat>>8)&0xff))<0)return -1; + if((ret=writeOutputBitStreamBody( bwidth-16,(unsigned char)((dat>>16)&0xff)))<0)return -1; + } else if( bwidth > 24 && bwidth <= 32 ){ + if(writeOutputBitStreamBody( 8 , (unsigned char)(dat&0xff))<0)return -1; + if(writeOutputBitStreamBody( 8 , (unsigned char)((dat>>8)&0xff))<0)return -1; + if(writeOutputBitStreamBody( 8 , (unsigned char)((dat>>16)&0xff))<0)return -1; + if((ret=writeOutputBitStreamBody( bwidth-24,(unsigned char)((dat>>24)&0xff)))<0)return -1; + } else { + return -1; + } + return ret; +} +#define CHAR_SIZE 256 +#define NODE_SIZE 512 +#define BITS_LEN 9 /* 9 bit lzw compression */ +typedef struct { + unsigned char chr; + int parent; + int brother; + int child; +}NODE; +long lssproto_ringoCompressor( unsigned char *code , long codelen , + unsigned char *text , long textlen) +{ + NODE node[NODE_SIZE]; + int freeNode; + int w,k; /* used in this algo */ + int textind; /* index to text buffer */ + int i; + int position = 0; /* indicates the last byte of code buffer */ + if( textlen <= 0 ) return -1; + initOutputBitStream((char*) code,codelen); + /* fill characters ( 0 ~ 255 ) in the beggining part of + Node list */ + for(i=0; i<= CHAR_SIZE; i++){ + node[i].chr = (unsigned char)i; + node[i].brother = i + 1; + node[i].parent = 0; + node[i].child = 0; + } + node[CHAR_SIZE].brother = 0; + freeNode = CHAR_SIZE + 1; + w = text[0]; + textind = 1; + while(1){ + int rv; + if( textind >= textlen ){ + k = CHAR_SIZE; /* indicates EOF */ + } else { + k = text[textind]; + } + /* search if pattern 'wk' is registered or not. */ + rv = node[w].child; + while(1){ + if( rv <= 0 ) break; + if( node[rv].chr == k ) break; + rv = node[rv].brother; + } + if( rv > 0 ){ + /* found it */ + w = rv; + } else { + position = writeOutputBitStream( BITS_LEN ,w ); + /* return if buffer excession */ + if( position > codelen ) return -1; + /* register pattern 'wk' in the dictionary */ + if( freeNode < NODE_SIZE ){ + node[freeNode].parent = w; + node[freeNode].chr = k; + node[freeNode].brother = node[w].child; + node[freeNode].child = 0; + node[w].child = freeNode; + freeNode++; + } + w = k; + } + if( textind == ( textlen + 1 ) ) break; + textind++; + } + return position; +} + +/* + * Decoder. + * return -1 if buffer excession. Notice buffer text + * is modified . + */ +long lssproto_ringoDecompressor( unsigned char *text , long textlen , + unsigned char *code , long codelen) +{ + NODE node[NODE_SIZE]; + int stack[NODE_SIZE]; + int sp; + int freeNode; + int len; + int i; + int k = 0; + int w = 0; + if( codelen <= 0 ) return -1; + initInputBitStream( (char*)code , codelen ); + for(i=0;i= freeNode ){ + stack[sp++] = k; /* exception */ + if( sp >=( sizeof( stack ) /sizeof(stack[0] )) )return -1; + k = w; + } else { + k = rv; + } + while(k> CHAR_SIZE ){ + if( k >= (sizeof(node)/sizeof(node[0]))) return -1; + stack[sp++] = node[k].chr; + k = node[k].parent; + if( sp >=( sizeof( stack ) /sizeof(stack[0] )) ) return -1; + } + stack[sp++] = k; + if( sp >= ( sizeof( stack ) /sizeof(stack[0] )) ) return -1; + /* output to text buffer from stack.*/ + while(sp){ + if( ++len > textlen ) return -1; + *text++ = stack[--sp]; + } + /* register the pattern 'wk'*/ + if( len > 1 && freeNode < NODE_SIZE ){ + node[freeNode].parent = w; + node[freeNode].chr = k; + if( w >= (sizeof(node)/sizeof(node[0])))return -1; + node[freeNode].brother = node[w].child; + node[freeNode].child = 0; + node[w].child = freeNode; + freeNode++; + } + w = rv; + } + return len; +} +#endif /* ifdef lssproto__ENCRYPT */ + +/* Convert 62-base digits to 10 digits */ +int lssproto_a62toi( char *a ) +{ + int ret = 0; + int minus ; + if( a[0] == '-' ){ + minus = -1; + a++; + } else { + minus = 1; + } + + while( *a != '\0' ) + { + ret *= 62; + if( '0' <= (*a) && (*a) <= '9' ) + ret += (*a)-'0'; + else + if( 'a' <= (*a) && (*a) <= 'z' ) + ret += (*a)-'a'+10; + else + if( 'A' <= (*a) && (*a) <= 'Z' ) + ret += (*a)-'A'+36; + else + return 0; + a++; + } + return ret * minus; +} + +/* Convert 10-base digits into 62-base digits. */ +char *lssproto_cnv10to62( int a, char *out, int outlen ) +{ + int i, j; + char base[] = { "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"}; + int tmp[64]; + int src; + int minus; + int baselen = sizeof( base)-1; + if( a < 0 ){ + minus = 1; + a *= -1; + } else { + minus = 0; + } + /* special case */ + if( a < baselen) { + if( minus ){ + *(out) = '-'; + *(out+1) = base[a]; + *(out+2) = '\0'; + return (out); + } else { + *out = base[a]; + *(out+1) = '\0'; + return( out); + } + } + src = a; + for( i = 0; src >= baselen; i ++ ) { + tmp[i] = src % baselen; + src /= baselen; + } + i--; + if( minus ){ + *out = '-'; + *(out+1) = base[src]; + for( j = 2; i >= 0; i --, j ++ ) { + if( j > outlen - 2 ) return NULL; + *(out+j) = base[tmp[i]]; + } + } else { + *out = base[src]; + for( j = 1; i >= 0; i --, j ++ ) { + if( j > outlen - 2 ) return NULL; + *(out+j) = base[tmp[i]]; + } + } + *(out+j) = '\0'; + return( out); +} diff --git a/gmsv/magic/magic.c b/gmsv/magic/magic.c new file mode 100644 index 0000000..a4f3ebf --- /dev/null +++ b/gmsv/magic/magic.c @@ -0,0 +1,846 @@ +#include "version.h" +#include +#include + +#include "common.h" +#include "char_base.h" +#include "char_data.h" +#include "item.h" +#include "battle.h" +#include "magic_base.h" +#include "magic.h" +#include "magic_field.h" +#include "family.h" +#include "handletime.h" +#include "battle_magic.h" +#include "battle_event.h" +#include"lssproto_serv.h" +#ifdef _ITEM_ATTSKILLMAGIC +#include "pet_skill.h" +#endif +//#include "battle_event.h" +// shan add code +#define MP_RATE 0.7 + + +int MAGIC_Use( int charaindex, int haveitemindex, int toindex) +{ + int itemindex; + int magicid,marray,mp; + int ret; + MAGIC_CALLFUNC func; + + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if( !ITEM_CHECKINDEX( itemindex) ) return FALSE; + magicid = ITEM_getInt( itemindex, ITEM_MAGICID); + marray = MAGIC_getMagicArray( magicid); + if( marray == -1 ) return FALSE; + + func = MAGIC_getMagicFuncPointer( MAGIC_getChar( marray, MAGIC_FUNCNAME));//MAGIC_NAME + if( (mp = ITEM_getInt( itemindex, ITEM_MAGICUSEMP)) < 0 ){ + print("err mp:%d -%s-%d\n", mp, ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) ); + + } + + // shan add begin + if( CHAR_getInt( charaindex, CHAR_FMINDEX ) >= 1 ){ + // 光精 + if( CHAR_getInt( charaindex, CHAR_FMSPRITE ) == 0){ + if( (marray >=0 && marray <=31) || (marray >= 105 && marray <=107 )) + mp *= MP_RATE; + } + // 暗精 + if( CHAR_getInt( charaindex, CHAR_FMSPRITE ) == 1){ + if( marray >=32 && marray <=81 ) + mp *= MP_RATE; + } + } + // shan end + if( func ) { + ret = func( charaindex, toindex, marray, mp ); + }else { + ret = FALSE; + } + return ret; +} + +int MAGIC_GetArrayNo( int charaindex, int haveitemindex) +{ + int itemindex; + int magicid; + itemindex = CHAR_getItemIndex( charaindex, haveitemindex); + if( !ITEM_CHECKINDEX( itemindex) ) return FALSE; + + magicid = ITEM_getInt( itemindex, ITEM_MAGICID); + + return magicid; +} +int MAGIC_DirectUse( + int charaindex, + int magicid, + int toindex, + int itemnum +) +{ + MAGIC_CALLFUNC func; + int mp, ret, marray; + int itemindex=-1; +#ifdef _MAGIC_NOCAST//沉默状态无法施法 + if( CHAR_getWorkInt( charaindex, CHAR_WORKNOCAST ) > 0 ){ + CHAR_talkToCli(charaindex, -1, "沉默中无法吟唱咒术", CHAR_COLORYELLOW); + return FALSE; + } +#endif + + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER){ + itemindex = CHAR_getItemIndex( charaindex, itemnum); + if( !ITEM_CHECKINDEX( itemindex) ){ + print("ANDY err MAGIC_DirectUse() itemindex:%d !\n", itemindex); + return FALSE; + } + }else{ + itemindex = itemnum; + } + + marray = MAGIC_getMagicArray( magicid ); + func = MAGIC_getMagicFuncPointer( MAGIC_getChar( marray, MAGIC_FUNCNAME ) ); + if( (mp = ITEM_getInt( itemindex, ITEM_MAGICUSEMP )) < 0 ){ + } + // shan add begin + if( CHAR_getInt( charaindex, CHAR_FMINDEX ) >= 1 ){ + // 光精 + if( CHAR_getInt( charaindex, CHAR_FMSPRITE ) == 0){ + if( (marray >=0 && marray <=31) ) + mp *= MP_RATE; + } + // 暗精 + if( CHAR_getInt( charaindex, CHAR_FMSPRITE ) == 1){ + if( marray >=32 && marray <=81 ) + mp *= MP_RATE; + } + } + if( func ) { + ret = func( charaindex, toindex, marray, mp ); + } + else { + ret = FALSE; + } + return ret; +} + +int MAGIC_Recovery( int charaindex, int toindex, int marray, int mp ) +{ + int battlemode; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return FALSE; + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + if( battlemode == BATTLE_CHARMODE_INIT ){ + return FALSE; + } + + + if( CHAR_getInt( charaindex, CHAR_MP ) < mp )return FALSE; + CHAR_setInt( charaindex, CHAR_MP, + CHAR_getInt( charaindex, CHAR_MP ) - mp ); + if( IsBATTLING( charaindex ) == TRUE ){ +#ifdef _PREVENT_TEAMATTACK //恩惠不得 使用敌方 + int battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER && + BattleArray[battleindex].type != BATTLE_TYPE_P_vs_P ){ + + if( BATTLE_CheckSameSide( charaindex, toindex) == 0 ){//不同边 + int battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + BATTLE_NoAction( battleindex, BATTLE_Index2No( battleindex, charaindex) ); + CHAR_talkToCli( charaindex, -1, "恩惠精灵..不得施予非玩家敌方。", CHAR_COLORYELLOW); + return FALSE; + } + } +#endif + if (toindex==22){print("jinchao err\n");return FALSE;} // shan(对全体使用魔法的bug),修改者jinchao+2001/12/07 + MAGIC_Recovery_Battle( charaindex, toindex, marray, mp ); + }else{ + if( CHAR_CHECKINDEX( toindex ) == FALSE )return FALSE; // shan(对全体使用魔法的bug),修改者jinchao+2001/12/07 + MAGIC_Recovery_Field( charaindex, marray); + } + + return TRUE; +} + +int MAGIC_OtherRecovery( int charaindex, int toindex, int marray, int mp ) +{ + int battlemode; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return FALSE; //{撩 + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + if( battlemode == BATTLE_CHARMODE_INIT ){ + return FALSE; + } + + if( CHAR_getInt( charaindex, CHAR_MP ) < mp )return FALSE; // 井匀凶日母丢 + CHAR_setInt( charaindex, CHAR_MP, + CHAR_getInt( charaindex, CHAR_MP ) - mp ); + if( IsBATTLING( charaindex ) == TRUE ){ +#ifdef _PREVENT_TEAMATTACK //滋润 不得使用敌方 + int battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER && + BattleArray[battleindex].type != BATTLE_TYPE_P_vs_P ){ + if( BATTLE_CheckSameSide( charaindex, toindex) == 0 ){//不同边 + int battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + BATTLE_NoAction( battleindex, BATTLE_Index2No( battleindex, charaindex) ); + CHAR_talkToCli( charaindex, -1, "滋润精灵..不得施予非玩家敌方。", CHAR_COLORYELLOW); + return FALSE; + } + } +#endif + MAGIC_Recovery_Battle( charaindex, toindex, marray, mp ); + }else{ + if( CHAR_CHECKINDEX( toindex ) == FALSE )return FALSE; //{撩 + MAGIC_OtherRecovery_Field( charaindex, toindex, marray); + } + return TRUE; +} + +// 白奴□伙玉及箪岭毛 祭今六月 芊 +int MAGIC_FieldAttChange( int charaindex, int toindex, int marray, int mp ) +{ + int battlemode; + + // INDEX民尼永弁 + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return FALSE; //{撩 + + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + + // 爵 钒铵凛反 骰允月 + if( battlemode == BATTLE_CHARMODE_INIT ){ + return FALSE; + } + + // 壅 民尼永弁 + if( CHAR_getInt( charaindex, CHAR_MP ) < mp )return FALSE; // 井匀凶日母丢 + // 仇及 芊反 骚卞 壅 仄化 中[穴奶瓜旦卞卅月仇午反 中 + CHAR_setInt( charaindex, CHAR_MP, + CHAR_getInt( charaindex, CHAR_MP ) - mp ); + + // 爵 分匀凶日 + if( IsBATTLING( charaindex ) == TRUE ){ + return MAGIC_FieldAttChange_Battle( charaindex, toindex, marray, mp ); + }else{ + // 爵 匹卅井匀凶日 + return FALSE; + } +} +int MAGIC_StatusChange( int charaindex, int toindex, int marray, int mp ) +{ + int battlemode; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return FALSE; + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + if( battlemode == BATTLE_CHARMODE_INIT ){ + return FALSE; + } + + if( CHAR_getInt( charaindex, CHAR_MP ) < mp )return FALSE; + CHAR_setInt( charaindex, CHAR_MP, CHAR_getInt( charaindex, CHAR_MP ) - mp ); + if( IsBATTLING( charaindex ) == TRUE ){ +#ifdef _PREVENT_TEAMATTACK //异常状态不得使用友方 + int battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER && + BattleArray[battleindex].type != BATTLE_TYPE_P_vs_P ){ + if( BATTLE_CheckSameSide( charaindex, toindex) == 1 ){//同边 + int battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + BATTLE_NoAction( battleindex, BATTLE_Index2No( battleindex, charaindex) ); + CHAR_talkToCli( charaindex, -1, "异常状态..不得施予友方。", CHAR_COLORYELLOW); + return FALSE; + } + } +#endif + return MAGIC_StatusChange_Battle( charaindex, toindex, marray, mp ); + }else{ + return FALSE; + } +} + +#ifdef _OTHER_MAGICSTAUTS +int MAGIC_MagicStatusChange( int charaindex, int toindex, int marray, int mp ) +{ + int battlemode; + if( CHAR_CHECKINDEX( charaindex ) == FALSE ) return FALSE; + + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + if( battlemode == BATTLE_CHARMODE_INIT ){ + return FALSE; + } + if( CHAR_getInt( charaindex, CHAR_MP ) < mp )return FALSE; + CHAR_setInt( charaindex, CHAR_MP, CHAR_getInt( charaindex, CHAR_MP ) - mp ); + if( IsBATTLING( charaindex ) == TRUE ){ + return MAGIC_MagicStatusChange_Battle( charaindex, toindex, marray, mp ); + }else{ + return FALSE; + } +} +#endif + +#ifdef _MAGIC_DEEPPOISON//新增ver2,主要设定毒状态5回未解时人物会阵亡 +// 旦 □正旦唱橘毛芨尹月 芊 +int MAGIC_StatusChange2( int charaindex, int toindex, int marray, int mp ) +{ + int battlemode; + + // INDEX民尼永弁 + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return FALSE; //{撩 + + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + + // 爵 钒铵凛反 骰允月 + if( battlemode == BATTLE_CHARMODE_INIT ){ + return FALSE; + } + + //扣气 + if( CHAR_getInt( charaindex, CHAR_MP ) < mp )return FALSE; + + CHAR_setInt( charaindex, CHAR_MP, + CHAR_getInt( charaindex, CHAR_MP ) - mp ); + + //call func + if( IsBATTLING( charaindex ) == TRUE ){ + return MAGIC_StatusChange_Battle2( charaindex, toindex, marray, mp ); + }else{ + return FALSE; + } +} +#endif +// 旦 □正旦唱橘荚汊今六月 芊 +int MAGIC_StatusRecovery( int charaindex, int toindex, int marray, int mp ) +{ + int battlemode; + + // INDEX民尼永弁 + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return FALSE; //{撩 + + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + + // 爵 钒铵凛反 骰允月 + if( battlemode == BATTLE_CHARMODE_INIT ){ + return FALSE; + } + + // 壅 民尼永弁 + if( CHAR_getInt( charaindex, CHAR_MP ) < mp )return FALSE; // 井匀凶日母丢 + // 仇及 芊反 骚卞 壅 仄化 中[穴奶瓜旦卞卅月仇午反 中 + CHAR_setInt( charaindex, CHAR_MP, + CHAR_getInt( charaindex, CHAR_MP ) - mp ); + + // 爵 分匀凶日 + if( IsBATTLING( charaindex ) == TRUE ){ + return MAGIC_StatusRecovery_Battle( charaindex, toindex, marray, mp ); + }else{ + // 爵 匹卅井匀凶日 + return FALSE; + } +} + +int MAGIC_MagicDef( int charaindex, int toindex, int marray, int mp ) +{ + int battlemode; + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return FALSE; + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + if( battlemode == BATTLE_CHARMODE_INIT ){ + return FALSE; + } + + if( CHAR_getInt( charaindex, CHAR_MP ) < mp )return FALSE; + CHAR_setInt( charaindex, CHAR_MP, CHAR_getInt( charaindex, CHAR_MP ) - mp ); + if( IsBATTLING( charaindex ) == TRUE ){ +#ifdef _PREVENT_TEAMATTACK //光镜守..不得使用敌方 + int battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER + /*&& BattleArray[battleindex].type != BATTLE_TYPE_P_vs_P*/ ){ + if( BATTLE_CheckSameSide( charaindex, toindex) == 0 ){//不同边 + int battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + BATTLE_NoAction( battleindex, BATTLE_Index2No( battleindex, charaindex) ); + CHAR_talkToCli( charaindex, -1, "光镜守..不得施予敌方。", CHAR_COLORYELLOW); + return FALSE; + } + } +#endif + return MAGIC_MagicDef_Battle( charaindex, toindex, marray, mp ); + }else{ + return FALSE; + } +} + + +// 竣濮井日汊唾今六月 芊 +int MAGIC_Ressurect( int charaindex, int toindex, int marray, int mp ) +{ + int battlemode; + + // INDEX民尼永弁 + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return FALSE; //{撩 + + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + + // 爵 钒铵凛反 骰允月 + if( battlemode == BATTLE_CHARMODE_INIT ){ + return FALSE; + } + + // 壅 民尼永弁 + if( CHAR_getInt( charaindex, CHAR_MP ) < mp )return FALSE; // 井匀凶日母丢 + // 仇及 芊反 骚卞 壅 仄化 中[穴奶瓜旦卞卅月仇午反 中 + CHAR_setInt( charaindex, CHAR_MP, + CHAR_getInt( charaindex, CHAR_MP ) - mp ); + + // 爵 分匀凶日 + if( IsBATTLING( charaindex ) == TRUE ){ + return MAGIC_Ressurect_Battle( charaindex, toindex, marray, mp ); + }else{ + // 爵 匹卅井匀凶日 + return FALSE; + } +} + +// 箪岭毛 鳖今六月 芊 +int MAGIC_AttReverse( int charaindex, int toindex, int marray, int mp ) +{ + int battlemode; + + // INDEX民尼永弁 + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return FALSE; //{撩 + + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + + // 爵 钒铵凛反 骰允月 + if( battlemode == BATTLE_CHARMODE_INIT ){ + return FALSE; + } + + // 壅 民尼永弁 + if( CHAR_getInt( charaindex, CHAR_MP ) < mp )return FALSE; // 井匀凶日母丢 + // 仇及 芊反 骚卞 壅 仄化 中[穴奶瓜旦卞卅月仇午反 中 + CHAR_setInt( charaindex, CHAR_MP, + CHAR_getInt( charaindex, CHAR_MP ) - mp ); + + // 爵 分匀凶日 + if( IsBATTLING( charaindex ) == TRUE ){ + return MAGIC_AttReverse_Battle( charaindex, toindex, marray, mp ); + }else{ + // 爵 匹卅井匀凶日 + return FALSE; + } +} + + + +// 竣濮井日汊唾≈ 芊 豢 +int MAGIC_ResAndDef( int charaindex, int toindex, int marray, int mp ) +{ + int battlemode; + + // INDEX民尼永弁 + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return FALSE; //{撩 + + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + + // 爵 钒铵凛反 骰允月 + if( battlemode == BATTLE_CHARMODE_INIT ){ + return FALSE; + } + + // 壅 民尼永弁 + if( CHAR_getInt( charaindex, CHAR_MP ) < mp )return FALSE; // 井匀凶日母丢 + // 仇及 芊反 骚卞 壅 仄化 中[穴奶瓜旦卞卅月仇午反 中 + CHAR_setInt( charaindex, CHAR_MP, + CHAR_getInt( charaindex, CHAR_MP ) - mp ); + + // 爵 分匀凶日 + if( IsBATTLING( charaindex ) == TRUE ){ + return MAGIC_ResAndDef_Battle( charaindex, toindex, marray, mp ); + }else{ + // 爵 匹卅井匀凶日 + return FALSE; + } +} + + + +#ifdef __ATTACK_MAGIC + +int MAGIC_AttMagic( int charaindex , int toindex , int marray , int mp ) +{ + int battlemode; + + if( FALSE == CHAR_CHECKINDEX( charaindex ) ) + return FALSE; + + battlemode = CHAR_getWorkInt( charaindex , CHAR_WORKBATTLEMODE ); + if( BATTLE_CHARMODE_INIT == battlemode ) + return FALSE; + // 若是宠物魔法,不扣mp + if(CHAR_getInt(charaindex,CHAR_WHICHTYPE) == CHAR_TYPEPLAYER) + { + if( CHAR_getInt( charaindex , CHAR_MP ) < mp ) + return FALSE; + + CHAR_setInt( charaindex , CHAR_MP , CHAR_getInt( charaindex , CHAR_MP ) - mp ); + } + + if( TRUE == IsBATTLING( charaindex ) ) + return MAGIC_AttMagic_Battle( charaindex , toindex , marray , mp ); + + return FALSE; + +} + +#endif + +#ifdef _ITEM_METAMO +int MAGIC_Metamo( int charaindex, int toindex, int marray, int mp ) +{ + int battlemode, haveindex, power, i; + char msg[128]; + + if( CHAR_CHECKINDEX( charaindex ) == FALSE ) return FALSE; + + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + // 爵 钒铵凛反 骰允月 + if( battlemode == BATTLE_CHARMODE_INIT ){ + return FALSE; + } + // 爵 分匀凶日 + if( IsBATTLING( charaindex ) == TRUE ){ + //MAGIC_Recovery_Battle( charaindex, toindex, marray, mp ); + //return FALSE; + toindex = BATTLE_No2Index( + CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ), toindex ); + //print(" battle_metamo:%d ", toindex); + } + + if( CHAR_CHECKINDEX( toindex ) == FALSE ) return FALSE; + + if( CHAR_getInt( charaindex, CHAR_RIDEPET ) != -1 ){ + CHAR_talkToCli( charaindex, -1, "无法变身,骑乘中不能变身!", CHAR_COLORWHITE ); + return FALSE; + } +#ifdef _FIX_METAMORIDE + if( CHAR_CHECKJOINENEMY( charaindex) == TRUE ){ + CHAR_talkToCli( charaindex, -1, "无法变身,搭乘中不能变身!", CHAR_COLORYELLOW ); + return FALSE; + } +#else + if( CHAR_getInt( charaindex, CHAR_BASEIMAGENUMBER) == 100259 ){ + CHAR_talkToCli( charaindex, -1, "无法变身,搭乘中不能变身!", CHAR_COLORWHITE ); + return FALSE; + } +#endif +#ifdef _FIXBUG_ATTACKBOW + { + int armindex = CHAR_getItemIndex( charaindex, CHAR_ARM); + if( ITEM_CHECKINDEX( armindex) == TRUE ) { + int armtype = BATTLE_GetWepon( charaindex); + if( armtype == ITEM_BOW || armtype == ITEM_BOUNDTHROW || + armtype == ITEM_BREAKTHROW || armtype == ITEM_BOOMERANG) { + CHAR_talkToCli( charaindex, -1, "使用远距离武器无法变身!", CHAR_COLORYELLOW ); + return FALSE; + } + } + } +#endif + haveindex = -1; + for( i = 0; i < 5; i++ ) + { + if( CHAR_getCharPet( charaindex, i) == toindex ) { + haveindex = i; + break; + } + } + if( haveindex == -1 && charaindex != toindex ) + { + CHAR_talkToCli( charaindex, -1, "无法变身,只能变成自己的宠物!", CHAR_COLORWHITE ); + return FALSE; + } + + if( CHAR_getInt( toindex, CHAR_BASEIMAGENUMBER) == 100259 ){ + CHAR_talkToCli( charaindex, -1, "不能变身成加美!", CHAR_COLORWHITE ); + return FALSE; + } + + power = atoi(MAGIC_getChar( marray, MAGIC_OPTION )); + + if( CHAR_getInt( charaindex, CHAR_MP ) < mp )return FALSE; + CHAR_setInt( charaindex, CHAR_MP, + CHAR_getInt( charaindex, CHAR_MP ) - mp ); + CHAR_send_P_StatusString( charaindex , CHAR_P_STRING_MP); + + if( toindex != charaindex ) { + CHAR_setWorkInt( charaindex, CHAR_WORKITEMMETAMO, NowTime.tv_sec +power); + sprintf( msg, "变身成%s!", CHAR_getChar( toindex, CHAR_NAME) ); + } + else { + CHAR_setWorkInt( charaindex, CHAR_WORKITEMMETAMO, 0); + sprintf( msg, "变回自己!"); + } + CHAR_talkToCli( charaindex, -1, msg, CHAR_COLORWHITE ); + + CHAR_setInt( charaindex, CHAR_BASEIMAGENUMBER, + CHAR_getInt( toindex, CHAR_BASEBASEIMAGENUMBER) ); + CHAR_complianceParameter( charaindex); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( charaindex , CHAR_WORKOBJINDEX )); + CHAR_send_P_StatusString( charaindex , CHAR_P_STRING_BASEBASEIMAGENUMBER); +//#endif + + return TRUE; +} +#endif + +#ifdef _ITEM_ATTSKILLMAGIC +int MAGIC_AttSkill( int charaindex, int toindex,int marray, int mp ) +{ + int battlemode; + int battleindex=-1; + char *magicarg, funName[256]; + int skillID=-1; + PETSKILL_CALLFUNC func; + if( CHAR_CHECKINDEX( charaindex ) == FALSE ) return FALSE; + if( IsBATTLING( charaindex ) == FALSE ) return FALSE; + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + if( BATTLE_CHECKINDEX( battleindex ) == FALSE ) return FALSE; + + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + if( battlemode == BATTLE_CHARMODE_INIT ) return FALSE; + if( toindex < 0 || toindex > 19 ) return FALSE; + if( CHAR_getInt( charaindex, CHAR_MP ) < mp ) return FALSE; + + memset( funName, 0, sizeof( char)*256 ); + //MAGIC_Recovery_Battle( charaindex, toindex, marray, mp ); + magicarg = MAGIC_getChar( marray, MAGIC_OPTION ); + if (!magicarg) return FALSE; + if( strstr( magicarg, ";" ) != NULL ) { + char buff1[256]; + if( getStringFromIndexWithDelim( magicarg, ";", 1, buff1, sizeof( buff1)) == FALSE ) + return FALSE; + snprintf( funName, sizeof(funName), buff1); + if( getStringFromIndexWithDelim( magicarg, ";", 2, buff1, sizeof( buff1)) == FALSE ) + return FALSE; + skillID = atoi( buff1); + }else + return FALSE; + func = PETSKILL_getPetskillFuncPointer( funName); + if( !func ){ + print("\n *func not FOUND !!"); + return FALSE; + } + if( func( charaindex, toindex, skillID, "MAGICSKILL" ) == FALSE ) return FALSE; + CHAR_setInt( charaindex, CHAR_MP, CHAR_getInt( charaindex, CHAR_MP ) - mp ); + return TRUE; + +} +#endif +#ifdef _MAGIC_BARRIER// vincent 精灵:魔障 +int MAGIC_Barrier( int charaindex, int toindex, int marray, int mp ) +{ + + int battlemode; + int i,turn,perStatus; + int ToList[SIDE_OFFSET*2+1]; + char *magicarg; + int attackNo=0; + int battleindex,Success = 0; + char szTurn[] = "turn"; + char szSuccess[] = "成"; + char *pszP; + + //check index + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return FALSE; + + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + + // 爵 钒铵凛反 骰允月//?? + if( battlemode == BATTLE_CHARMODE_INIT ){ + return FALSE; + } + + //mp不足 + if( CHAR_getInt( charaindex, CHAR_MP ) < mp )return FALSE; + //消耗mp + CHAR_setInt( charaindex, CHAR_MP, + CHAR_getInt( charaindex, CHAR_MP ) - mp ); + //魔法名称 + magicarg = MAGIC_getChar( marray, MAGIC_OPTION ); + if( magicarg == NULL ) { + print("\n magicarg == NULL "); + return FALSE; + } + pszP = magicarg; + + //读取作用回合数 + if( ( pszP = strstr( pszP, szTurn ) ) != NULL){ + pszP += sizeof( szTurn ); + sscanf( pszP, "%d", &turn ); + } + // 岳 涩烂//命中率 + if( ( pszP = strstr( pszP, szSuccess ) ) != NULL){ + pszP += sizeof( szSuccess ); + sscanf( pszP, "%d", &Success ); + } + + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + attackNo = BATTLE_Index2No( battleindex, charaindex ); + BATTLE_MultiList( battleindex, toindex, ToList ); +//施魔法动画效果 + BATTLE_MagicEffect(battleindex, attackNo, ToList, MAGIC_EFFECT_USER, SPR_hoshi); + + charaindex = BATTLE_No2Index( battleindex, attackNo ); + //check是否战斗中 + if( IsBATTLING( charaindex ) == TRUE ) + { + + for( i = 0; ToList[i] != -1; i ++ ) + { + toindex = BATTLE_No2Index( battleindex, ToList[i] ); + if( BATTLE_StatusAttackCheck( charaindex,toindex, BATTLE_ST_BARRIER, Success, 30, 1.0, &perStatus ) == TRUE ) + { + CHAR_setWorkInt( toindex, CHAR_WORKBARRIER, turn+1 ); +// BATTLE_BadStatusString( ToList[i], BATTLE_ST_BARRIER ); + } + } + return TRUE; + }else{ + return FALSE; + } +} +#endif +#ifdef _MAGIC_NOCAST// vincent 精灵:沉默 +int MAGIC_Nocast( int charaindex, int toindex, int marray, int mp ) +{ + + int battlemode; + int i,turn,perStatus; + int ToList[SIDE_OFFSET*2+1]; + char *magicarg; + int attackNo=0; + int battleindex,Success = 0; + char szTurn[] = "turn"; + char szSuccess[] = "成"; + char *pszP; + + //check index + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return FALSE; + + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + + // 爵 钒铵凛反 骰允月//?? + if( battlemode == BATTLE_CHARMODE_INIT ){ + return FALSE; + } + + //mp不足 + if( CHAR_getInt( charaindex, CHAR_MP ) < mp )return FALSE; + //消耗mp + CHAR_setInt( charaindex, CHAR_MP, + CHAR_getInt( charaindex, CHAR_MP ) - mp ); + //魔法名称 + magicarg = MAGIC_getChar( marray, MAGIC_OPTION ); + if( magicarg == NULL ) { + print("\n magicarg == NULL "); + return FALSE; + } + pszP = magicarg; + + //读取作用回合数 + if( ( pszP = strstr( pszP, szTurn ) ) != NULL){ + pszP += sizeof( szTurn ); + sscanf( pszP, "%d", &turn ); + } + // 岳 涩烂//命中率 + if( ( pszP = strstr( pszP, szSuccess ) ) != NULL){ + pszP += sizeof( szSuccess ); + sscanf( pszP, "%d", &Success ); + } +// print("\nvincent-->MAGIC_Nocast use"); + battleindex = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX ); + attackNo = BATTLE_Index2No( battleindex, charaindex ); + BATTLE_MultiList( battleindex, toindex, ToList ); +//施魔法动画效果 + BATTLE_MagicEffect(battleindex, attackNo, ToList, MAGIC_EFFECT_USER, SPR_hoshi); + charaindex = BATTLE_No2Index( battleindex, attackNo ); + //check是否战斗中 + if( IsBATTLING( charaindex ) == TRUE ) + { + + for( i = 0; ToList[i] != -1; i ++ ) + { + toindex = BATTLE_No2Index( battleindex, ToList[i] ); + if( BATTLE_StatusAttackCheck( charaindex,toindex, BATTLE_ST_NOCAST, Success, 30, 1.0, &perStatus ) == TRUE + && CHAR_getInt( toindex, CHAR_WHICHTYPE) != CHAR_TYPEPET) + { + CHAR_setWorkInt( toindex, CHAR_WORKNOCAST, turn ); +//无法展开咒术页 + lssproto_NC_send( getfdFromCharaIndex( toindex ), 1); + //print("\nvincent-->NOCASTING2"); +// BATTLE_BadStatusString( ToList[i], BATTLE_ST_NOCAST ); + } + } + return TRUE; + }else{ + return FALSE; + } +} +#endif + +#ifdef _MAGIC_WEAKEN// vincent 精灵:虚弱 +int MAGIC_Weaken( int charaindex, int toindex, int marray, int mp ) +{ + + int battlemode; + //check index + if( CHAR_CHECKINDEX( charaindex ) == FALSE )return FALSE; + + battlemode = CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEMODE ); + + // 爵 钒铵凛反 骰允月//?? + if( battlemode == BATTLE_CHARMODE_INIT ){ + return FALSE; + } + + //mp不足 + if( CHAR_getInt( charaindex, CHAR_MP ) < mp )return FALSE; + //消耗mp + CHAR_setInt( charaindex, CHAR_MP, + CHAR_getInt( charaindex, CHAR_MP ) - mp ); + + //check是否战斗中 + if( IsBATTLING( charaindex ) == TRUE ){ + return MAGIC_ParamChange_Turn_Battle( charaindex, toindex, marray, mp ); + }else{ + return FALSE; + } +} +#endif + +#ifdef _MAGIC_TOCALL +int MAGIC_ToCallDragon( int charaindex, int toindex,int marray, int mp ) +{ + int battlemode; + + print("MAGIC_ToCallDragon in .................\n"); + if( FALSE == CHAR_CHECKINDEX( charaindex ) ) + return FALSE; + + battlemode = CHAR_getWorkInt( charaindex , CHAR_WORKBATTLEMODE ); + if( BATTLE_CHARMODE_INIT == battlemode ) + return FALSE; + if( CHAR_getInt( charaindex , CHAR_MP ) < mp ) + return FALSE; + + CHAR_setInt( charaindex , CHAR_MP , CHAR_getInt( charaindex , CHAR_MP ) - mp ); + + if( TRUE == IsBATTLING( charaindex ) ) + return MAGIC_ToCallDragon_Battle( charaindex , toindex , marray , mp ); + + return FALSE; +} +#endif + + + + diff --git a/gmsv/magic/magic_base.c b/gmsv/magic/magic_base.c new file mode 100644 index 0000000..4cf3cb8 --- /dev/null +++ b/gmsv/magic/magic_base.c @@ -0,0 +1,521 @@ +#include "version.h" +#include +#include + +#include "common.h" +#include "buf.h" +#include "configfile.h" +#include "magic_base.h" +#include "magic.h" + +static Magic *MAGIC_magic; +static int MAGIC_magicnum; + + + +#ifdef __ATTACK_MAGIC + +AttMagic *ATTMAGIC_magic; +int ATTMAGIC_magicnum; + +#endif + + + +typedef struct tagMagic_MagicFunctionTable +{ + char *functionname; /* 热诸涩烂白央奶伙卞踏仁楮醒及 蟆 */ + MAGIC_CALLFUNC func; /* 端卞裟太请今木月楮醒 */ + int hash; /* hash */ +}MAGIC_MagicFunctionTable; + +/* 热诸毛 支仄凶日仇仇卞瓒 允月仪 */ +static MAGIC_MagicFunctionTable MAGIC_functbl[] = { + { "MAGIC_Recovery", MAGIC_Recovery, 0}, + { "MAGIC_OtherRecovery", MAGIC_OtherRecovery, 0}, + { "MAGIC_FieldAttChange", MAGIC_FieldAttChange, 0}, + { "MAGIC_StatusChange", MAGIC_StatusChange, 0}, + { "MAGIC_MagicDef", MAGIC_MagicDef, 0}, + { "MAGIC_StatusRecovery", MAGIC_StatusRecovery, 0}, + { "MAGIC_Ressurect", MAGIC_Ressurect, 0}, + { "MAGIC_AttReverse", MAGIC_AttReverse, 0}, + { "MAGIC_ResAndDef", MAGIC_ResAndDef, 0}, + +#ifdef __ATTACK_MAGIC + { "MAGIC_AttMagic" , MAGIC_AttMagic , 0 }, +#endif +#ifdef _OTHER_MAGICSTAUTS + { "MAGIC_MagicStatusChange", MAGIC_MagicStatusChange, 0}, +#endif +#ifdef _ITEM_METAMO + { "MAGIC_Metamo", MAGIC_Metamo, 0}, +#endif +#ifdef _ITEM_ATTSKILLMAGIC + //{ "MAGIC_AttSkill", MAGIC_AttSkill, 0}, +#endif +#ifdef _MAGIC_WEAKEN // vincent 精灵:虚弱 + { "MAGIC_Weaken", MAGIC_Weaken, 0}, +#endif +#ifdef _MAGIC_DEEPPOISON // vincent 精灵:剧毒 + { "MAGIC_StatusChange2", MAGIC_StatusChange2,0}, +#endif +#ifdef _MAGIC_BARRIER // vincent 精灵:魔障 + { "MAGIC_Barrier", MAGIC_Barrier, 0}, +#endif +#ifdef _MAGIC_NOCAST // vincent 精灵:沉默 + { "MAGIC_Nocast", MAGIC_Nocast, 0}, +#endif +#ifdef _MAGIC_TOCALL // 奔龙阵 + { "MAGIC_ToCallDragon", MAGIC_ToCallDragon, 0}, +#endif +}; + +/*----------------------------------------------------------------------*/ + + +/* 湘 民尼永弁]失弁本旦楮溢 */ +/*----------------------------------------------------------------------*/ +INLINE BOOL MAGIC_CHECKINDEX( int index ) +{ + if( MAGIC_magicnum<=index || index<0 )return FALSE; + return TRUE; +} +/*----------------------------------------------------------------------*/ +static INLINE BOOL MAGIC_CHECKINTDATAINDEX( int index) +{ + if( MAGIC_DATAINTNUM <= index || index < 0 ) return FALSE; + return TRUE; +} +/*----------------------------------------------------------------------*/ +static INLINE BOOL MAGIC_CHECKCHARDATAINDEX( int index) +{ + if( MAGIC_DATACHARNUM <= index || index < 0 ) return FALSE; + return TRUE; +} +/*----------------------------------------------------------------------*/ +INLINE int MAGIC_getInt( int index, MAGIC_DATAINT element) +{ + return MAGIC_magic[index].data[element]; +} +/*----------------------------------------------------------------------*/ +INLINE int MAGIC_setInt( int index, MAGIC_DATAINT element, int data) +{ + int buf; + buf = MAGIC_magic[index].data[element]; + MAGIC_magic[index].data[element]=data; + return buf; +} +/*----------------------------------------------------------------------*/ +INLINE char* MAGIC_getChar( int index, MAGIC_DATACHAR element) +{ + if( !MAGIC_CHECKINDEX( index)) return NULL; + if( !MAGIC_CHECKCHARDATAINDEX( element)) return NULL; + return MAGIC_magic[index].string[element].string; +} + +/*----------------------------------------------------------------------*/ +INLINE BOOL MAGIC_setChar( int index ,MAGIC_DATACHAR element, char* new ) +{ + if(!MAGIC_CHECKINDEX(index))return FALSE; + if(!MAGIC_CHECKCHARDATAINDEX(element))return FALSE; + strcpysafe( MAGIC_magic[index].string[element].string, + sizeof(MAGIC_magic[index].string[element].string), + new ); + return TRUE; +} +/*---------------------------------------------------------------------- + * 芊及醒毛襞月[ + *---------------------------------------------------------------------*/ +int MAGIC_getMagicNum( void) +{ + return MAGIC_magicnum; +} + +/*---------------------------------------------------------------------- + * 芊及涩烂白央奶伙毛 戈 + *---------------------------------------------------------------------*/ +BOOL MAGIC_initMagic( char *filename) +{ + FILE* f; + char line[256]; + int linenum=0; + int magic_readlen=0; + int i,j; + + int max_magicid =0; + char token[256]; + + f = fopen(filename,"r"); + if( f == NULL ){ + print( "文件打开失败\n"); + return FALSE; + } + + MAGIC_magicnum=0; + + /* 引内 躲卅垫互窒垫丐月井升丹井譬屯月 */ + while( fgets( line, sizeof( line ), f ) ){ + linenum ++; + if( line[0] == '#' )continue; /* comment */ + if( line[0] == '\n' )continue; /* none */ + chomp( line ); + +#ifdef _MAGIC_OPTIMUM // Robin 取出最大MAGIC ID + if( getStringFromIndexWithDelim( line, ",", MAGIC_DATACHARNUM+MAGIC_ID+1, + token, sizeof(token)) == FALSE ) + continue; + max_magicid = max( atoi( token), max_magicid); +#endif + + MAGIC_magicnum++; + } + +#ifdef _MAGIC_OPTIMUM + print("有效魔法:%d 最大魔法:%d ...", MAGIC_magicnum, max_magicid); + MAGIC_magicnum = max_magicid +1; +#endif + + if( fseek( f, 0, SEEK_SET ) == -1 ){ + fprint( "搜索错误\n" ); + fclose(f); + return FALSE; + } + + MAGIC_magic = allocateMemory( sizeof(struct tagMagic) + * MAGIC_magicnum ); + if( MAGIC_magic == NULL ){ + fprint( "无法分配内存 %d\n" , + sizeof(struct tagMagic)*MAGIC_magicnum); + fclose( f ); + return FALSE; + } + + /* 赓渝祭 */ + for( i = 0; i < MAGIC_magicnum; i ++ ) { + for( j = 0; j < MAGIC_DATAINTNUM; j ++ ) { + MAGIC_setInt( i,j,-1); + } + for( j = 0; j < MAGIC_DATACHARNUM; j ++ ) { + MAGIC_setChar( i,j,""); + } + } + + /* 引凶 心 允 */ + linenum = 0; + while( fgets( line, sizeof( line ), f ) ){ + linenum ++; + if( line[0] == '#' )continue; /* comment */ + if( line[0] == '\n' )continue; /* none */ + chomp( line ); + + /* 垫毛帮溥允月 */ + /* 引内 tab 毛 " " 卞 五晶尹月 */ + replaceString( line, '\t' , ' ' ); + /* 燮 及旦矢□旦毛潸月[*/ +{ + char buf[256]; + for( i = 0; i < strlen( line); i ++) { + if( line[i] != ' ' ) { + break; + } + strcpy( buf, &line[i]); + } + if( i != 0 ) { + strcpy( line, buf); + } +} +{ + char token[256]; + int ret; + +#ifdef _MAGIC_OPTIMUM + if( getStringFromIndexWithDelim( line, ",", MAGIC_DATACHARNUM+MAGIC_ID+1, + token, sizeof(token)) == FALSE ) + continue; + magic_readlen = atoi( token); +#endif + + for( i = 0; i < MAGIC_DATACHARNUM; i ++ ) { + + /* 侬 迕玄□弁件毛苇月 */ + ret = getStringFromIndexWithDelim( line,",", + i + 1, + token,sizeof(token)); + if( ret==FALSE ){ + fprint("文件语法错误:%s 第%d行\n",filename,linenum); + break; + } + MAGIC_setChar( magic_readlen, i, token); + } + /* 4勾 动嫦反醒袄犯□正 */ +#define MAGIC_STARTINTNUM 5 + for( i = MAGIC_STARTINTNUM; i < MAGIC_DATAINTNUM+MAGIC_STARTINTNUM; i ++ ) { + ret = getStringFromIndexWithDelim( line,",",i,token, + sizeof(token)); + +#ifdef __ATTACK_MAGIC + + if( FALSE == ret ) + + break; + + if( 0 != strlen( token ) ) + { + MAGIC_setInt( magic_readlen , i - MAGIC_STARTINTNUM , atoi( token ) ); + } + +#else + + if( ret==FALSE ){ + fprint("文件语法错误:%s 第%d行\n",filename,linenum); + break; + } + if( strlen( token) != 0 ) { + MAGIC_setInt( magic_readlen, i - MAGIC_STARTINTNUM, atoi( token)); + } + + #endif + } + +#ifdef __ATTACK_MAGIC + + if( i != MAGIC_STARTINTNUM + MAGIC_IDX && i != MAGIC_DATAINTNUM + MAGIC_STARTINTNUM ) + continue; + +#else + + if( i < MAGIC_DATAINTNUM+MAGIC_STARTINTNUM ) + continue; + +#endif + /* 切斤匀午尕称鼎分仃升仇丹允月[ */ + if( MAGIC_getInt( magic_readlen, MAGIC_TARGET_DEADFLG) == 1 ) { + MAGIC_setInt( magic_readlen, MAGIC_TARGET, + MAGIC_getInt( magic_readlen, MAGIC_TARGET)+100); + } + + magic_readlen ++; +} + } + fclose(f); + + MAGIC_magicnum = magic_readlen; + + + print( "有效魔法数是 %d...", MAGIC_magicnum ); + + /* hash 及瓒 */ + for( i = 0; i < arraysizeof( MAGIC_functbl); i ++ ) { + MAGIC_functbl[i].hash = hashpjw( MAGIC_functbl[i].functionname); + } +#if 0 + for( i=0; i = 0 && magicid < MAGIC_magicnum) + return magicid; +#else + int i; + for( i = 0; i < MAGIC_magicnum; i ++ ) { + if( MAGIC_magic[i].data[MAGIC_ID] == magicid ) { + return i; + } + } +#endif + return -1; +} +/*------------------------------------------------------------ + * 热诸及楮醒 井日禾奶件正□毛忒允 + * 娄醒 + * name char* 热诸及 蟆 + * 忒曰袄 + * 楮醒尺及禾奶件正[卅中桦宁卞反NULL + ------------------------------------------------------------*/ +MAGIC_CALLFUNC MAGIC_getMagicFuncPointer(char* name) +{ + int i; + int hash; //ttom + //ttom 12/18/2000 + if(name==NULL) return NULL; + //ttom + //int hash = hashpjw( name ); + hash=hashpjw(name); + for( i = 0 ; i< arraysizeof( MAGIC_functbl) ; i++ ) { + if( MAGIC_functbl[i].hash == hash ) { + if( strcmp( MAGIC_functbl[i].functionname, name ) == 0 ) { + return MAGIC_functbl[i].func; + } + } + } + return NULL; +} + + +// Nuke start (08/23) +/* + 酱 Nuke 今氏及民尼永弁[ + 芊及躲绊 区毛民尼永弁允月[ + + Check the validity of the target of a magic. + Return value: + 0: Valid + -1: Invalid +*/ +int MAGIC_isTargetValid( int magicid, int toindex) +{ + int marray; + marray= MAGIC_getMagicArray( magicid); + + #ifdef __ATTACK_MAGIC + + if( toindex >= 0 && toindex <= 19 ) + return 0; + + // One side of players + if( 20 == toindex || 21 == toindex ) + { + if( MAGIC_TARGET_WHOLEOTHERSIDE == MAGIC_magic[marray].data[MAGIC_TARGET] || MAGIC_TARGET_ALL_ROWS == MAGIC_magic[marray].data[MAGIC_TARGET] ) + return 0; + else + return -1; + } + + // All players + if( 22 == toindex ) + { + if( MAGIC_TARGET_ALL == MAGIC_magic[marray].data[MAGIC_TARGET] ) + return 0; + else + return -1; + } + + // One row + if( 23 == toindex || 24 == toindex || 25 == toindex || 26 == toindex ) + { + if( MAGIC_TARGET_ONE_ROW == MAGIC_magic[marray].data[MAGIC_TARGET] ) + return 0; + else + return -1; + } + + #else + + // Single player + if ((toindex >= 0x0) && (toindex <= 0x13)) return 0; + // All players + if (toindex == 0x16) { + if (MAGIC_magic[marray].data[MAGIC_TARGET] == MAGIC_TARGET_ALL) + return 0; else return -1; + } + // One side of players + if ((toindex == 0x14) || (toindex == 0x15)) { + if (MAGIC_magic[marray].data[MAGIC_TARGET] == MAGIC_TARGET_WHOLEOTHERSIDE) + return 0; else return -1; + } + + #endif + + // Others: Error + return -1; +} +// Nuke end diff --git a/gmsv/magic/magic_field.c b/gmsv/magic/magic_field.c new file mode 100644 index 0000000..ecf2255 --- /dev/null +++ b/gmsv/magic/magic_field.c @@ -0,0 +1,149 @@ +#include "version.h" +#include + +#include "common.h" +#include "char_base.h" +#include "char.h" +#include "magic_base.h" +#include "magic.h" +#include "magic_field.h" + +/* + * 哗晓匹及 芊及质 + */ +/*---------------------------------------------------------------------- + * 愤坌及心荚汊 + * 娄醒 + * charaindex int 愤坌及index + * magicindex int 芊及index + *---------------------------------------------------------------------*/ +int MAGIC_Recovery_Field( int charaindex, int magicindex) +{ + char *magicarg; + float power; + int workhp; + int prevhp; + char msgbuf[64]; + +#ifdef _TYPE_TOXICATION + if( CHAR_CanCureFlg( charaindex, "HP") == FALSE ) return TRUE; +#endif + magicarg = MAGIC_getChar( magicindex, MAGIC_OPTION ); + power = atoi( magicarg ); + power = RAND( (power*0.9), (power*1.1) ); +#ifndef _MAGIC_REHPAI + power *= GetRecoveryRate( charaindex ); +#endif + prevhp = CHAR_getInt( charaindex, CHAR_HP ); + workhp = prevhp + (int)power; + CHAR_setInt( charaindex, CHAR_HP, + min( workhp, CHAR_getWorkInt( charaindex, CHAR_WORKMAXHP ) ) ); + CHAR_send_P_StatusString( charaindex , CHAR_P_STRING_HP|CHAR_P_STRING_MP); + if( CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE ) { + int mypartyarray = -1; + int oyaindex = CHAR_getWorkInt( charaindex, CHAR_WORKPARTYINDEX1); + if( CHAR_CHECKINDEX( oyaindex )) { + int i; + for( i = 0; i < CHAR_PARTYMAX; i ++ ) { + int workindex = CHAR_getWorkInt( oyaindex, CHAR_WORKPARTYINDEX1 +i); + if( CHAR_CHECKINDEX( workindex) ) { + if( workindex == charaindex ) { + mypartyarray = i; + break; + } + } + } + if( mypartyarray != -1 ) { + for( i = 0; i < CHAR_PARTYMAX; i ++ ) { + int index = CHAR_getPartyIndex( charaindex, i); + if( CHAR_CHECKINDEX( index) ) { + if( index != charaindex) { + CHAR_send_N_StatusString( index, mypartyarray, + CHAR_N_STRING_HP|CHAR_N_STRING_MP); + } + } + } + } + } + } + snprintf( msgbuf, sizeof( msgbuf), "耐久力回复%d", + min( workhp, CHAR_getWorkInt( charaindex, CHAR_WORKMAXHP)) - prevhp); + CHAR_talkToCli( charaindex, -1, msgbuf, CHAR_COLORWHITE); + return TRUE; + +} +/*---------------------------------------------------------------------- + * 职谛毛荚汊 + * 娄醒 + * charaindex int 愤坌及index + * toindex int 荚汊允月谛及index + * magicindex int 芊及index + *---------------------------------------------------------------------*/ +int MAGIC_OtherRecovery_Field( int charaindex, int toindex, int magicindex) +{ + char *magicarg; + float power; + int workhp; + int prevhp; + char msgbuf[64]; + +#ifdef _TYPE_TOXICATION + if( CHAR_CanCureFlg( charaindex, "HP") == FALSE )return FALSE; +#endif + magicarg = MAGIC_getChar( magicindex, MAGIC_OPTION ); + power = atoi( magicarg ); + power = RAND( (power*0.9), (power*1.1) ); +#ifndef _MAGIC_REHPAI + power *= GetRecoveryRate( toindex ); +#endif + prevhp = CHAR_getInt( toindex, CHAR_HP ); + workhp = prevhp + (int)power; + CHAR_setInt( toindex, CHAR_HP, + min( workhp, CHAR_getWorkInt( toindex, CHAR_WORKMAXHP ) ) ); + if( CHAR_getInt( toindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER) { + if( charaindex != toindex ) { + CHAR_send_P_StatusString( toindex, CHAR_P_STRING_HP); + } + } + CHAR_send_P_StatusString( charaindex, CHAR_P_STRING_HP|CHAR_P_STRING_MP); + if( charaindex != toindex) { + CHAR_PartyUpdate( charaindex, CHAR_N_STRING_MP); + CHAR_PartyUpdate( toindex, CHAR_N_STRING_HP); + } + else { + CHAR_PartyUpdate( charaindex, CHAR_N_STRING_MP|CHAR_N_STRING_HP); + } + if( CHAR_getInt( toindex, CHAR_WHICHTYPE) == CHAR_TYPEPET ){ + int i; + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ) { + int workindex = CHAR_getCharPet( charaindex, i ); + if( workindex == toindex ){ + CHAR_send_K_StatusString( charaindex, i, CHAR_K_STRING_HP); + } + } + } + + if( charaindex != toindex) { + snprintf( msgbuf, sizeof( msgbuf), "%s的耐久力回复%d", + CHAR_getUseName( toindex ), + min( workhp, CHAR_getWorkInt( toindex, CHAR_WORKMAXHP)) - prevhp); + CHAR_talkToCli( charaindex, -1, msgbuf, CHAR_COLORWHITE); + + if( CHAR_getInt( toindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER) { + snprintf( msgbuf, sizeof( msgbuf), "藉由%s耐久力回复%d", + CHAR_getUseName( charaindex ), + min( workhp,CHAR_getWorkInt( toindex, CHAR_WORKMAXHP)) - prevhp); + CHAR_talkToCli( toindex, -1, msgbuf, CHAR_COLORWHITE); + } + } + else { + snprintf( msgbuf, sizeof( msgbuf), "耐久力回复%d", + min( workhp,CHAR_getWorkInt( charaindex, CHAR_WORKMAXHP)) - prevhp); + CHAR_talkToCli( charaindex, -1, msgbuf, CHAR_COLORWHITE); + + } + + return TRUE; + +} + diff --git a/gmsv/magic/makefile b/gmsv/magic/makefile new file mode 100644 index 0000000..996a7ba --- /dev/null +++ b/gmsv/magic/makefile @@ -0,0 +1,145 @@ +INCFLAGS=-I. -I../include + + +CFLAGS=-w -O3 $(INCFLAGS) + +PROG=libmagic.a + +SRC=magic.c magic_base.c magic_field.c +OBJ=$(SRC:.c=.o) + + +ifeq (0,$(MAKELEVEL)) +CC=gcc +RM=rm -f +AR=ar cr +MV=mv +RANLIB=ranlib +SED=sed +SHELL=/bin/sh +endif + +all: $(PROG) + +$(PROG): $(OBJ) + $(RM) $(PROG) + $(AR) $(PROG) $(OBJ) + $(RANLIB) $(PROG) + +depend: + $(MV) makefile makefile.bak + $(SED) -ne '1,/^# DO NOT DELETE THIS LINE/p' makefile.bak>makefile + $(CC) $(INCFLAGS) -M $(SRC) >> makefile + +clean: + $(RM) $(PROG) + $(RM) $(OBJ) + $(RM) *~ + +distclean: + $(RM) $(PROG) + $(RM) $(OBJ) + $(RM) *~ + $(MV) makefile makefile.bak + $(SED) -ne '1,/^# DO NOT DELETE THIS LINE/p' makefile.bak>makefile + $(RM) makefile.bak + +# DO NOT DELETE THIS LINE +magic.o: magic.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/string.h ../include/common.h /usr/include/errno.h \ + /usr/include/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/asm/errno.h ../include/char_base.h ../include/skill.h \ + ../include/util.h /usr/include/sys/time.h /usr/include/time.h \ + /usr/include/bits/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/char.h ../include/battle.h ../include/magic_base.h \ + ../include/magic.h ../include/magic_field.h ../include/family.h \ + ../include/handletime.h ../include/battle_magic.h \ + ../include/battle_event.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/pet_skill.h +magic_base.o: magic_base.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/string.h ../include/common.h /usr/include/errno.h \ + /usr/include/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/asm/errno.h ../include/buf.h ../include/configfile.h \ + ../include/magic_base.h ../include/util.h /usr/include/sys/time.h \ + /usr/include/time.h /usr/include/bits/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/magic.h +magic_field.o: magic_field.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/stdio.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + ../include/common.h /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/magic_base.h ../include/magic.h \ + ../include/magic_field.h diff --git a/gmsv/magic/makefile.bak b/gmsv/magic/makefile.bak new file mode 100644 index 0000000..bb734b9 --- /dev/null +++ b/gmsv/magic/makefile.bak @@ -0,0 +1,121 @@ +INCFLAGS=-I. -I../include + + +CFLAGS=-w -O3 $(INCFLAGS) + +PROG=libmagic.a + +SRC=magic.c magic_base.c magic_field.c +OBJ=$(SRC:.c=.o) + + +ifeq (0,$(MAKELEVEL)) +CC=gcc +RM=rm -f +AR=ar cr +MV=mv +RANLIB=ranlib +SED=sed +SHELL=/bin/sh +endif + +all: $(PROG) + +$(PROG): $(OBJ) + $(RM) $(PROG) + $(AR) $(PROG) $(OBJ) + $(RANLIB) $(PROG) + +depend: + $(MV) makefile makefile.bak + $(SED) -ne '1,/^# DO NOT DELETE THIS LINE/p' makefile.bak>makefile + $(CC) $(INCFLAGS) -M $(SRC) >> makefile + +clean: + $(RM) $(PROG) + $(RM) $(OBJ) + $(RM) *~ + +distclean: + $(RM) $(PROG) + $(RM) $(OBJ) + $(RM) *~ + $(MV) makefile makefile.bak + $(SED) -ne '1,/^# DO NOT DELETE THIS LINE/p' makefile.bak>makefile + $(RM) makefile.bak + +# DO NOT DELETE THIS LINE +magic.o: magic.c /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/common.h ../include/char_base.h ../include/skill.h \ + ../include/util.h /usr/include/sys/time.h /usr/include/time.h \ + /usr/include/bits/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/char.h ../include/battle.h ../include/magic_base.h \ + ../include/magic.h ../include/battle_magic.h ../include/magic_field.h +magic_base.o: magic_base.c /usr/include/stdio.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + /usr/include/string.h ../include/common.h ../include/buf.h \ + ../include/configfile.h ../include/magic_base.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/magic.h +magic_field.o: magic_field.c /usr/include/stdio.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/common.h ../include/char_base.h ../include/skill.h \ + ../include/util.h /usr/include/sys/time.h /usr/include/time.h \ + /usr/include/bits/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/magic_base.h ../include/magic.h \ + ../include/magic_field.h diff --git a/gmsv/main.c b/gmsv/main.c new file mode 100644 index 0000000..191184e --- /dev/null +++ b/gmsv/main.c @@ -0,0 +1,379 @@ +#include "version.h" +#include +#include +#include +#include +#include + + +#include "init.h" +#include "net.h" +#include "handletime.h" +#include "char.h" +#include "map_warppoint.h" +#include "npcgen.h" +#include "log.h" +#include "configfile.h" +#include "battle.h" +#include "petmail.h" +#include "autil.h" +#include "family.h" +#include "defend.h" +#include "trade.h" + +#ifdef _NPCSERVER_NEW +#include "npcserver.h" +#endif + +#ifdef _RECAL_SEND_COUNT // WON 传送GS资讯 +#include "mclient.h" +#endif + +#ifdef _DEATH_CONTEND +#include "deathcontend.h" +#endif +#ifdef _CHATROOMPROTOCOL // (不可开) Syu ADD 聊天室频道 +#include "chatroom.h" +#endif + +static void ShutdownProc( void); +void mainloop( void ); +struct tm tmNow, tmOld; +void family_proc(); +// Terry add 2001/10/11 +#ifdef _SERVICE +extern int g_nServiceSocket; +#endif + +#ifdef _CHANNEL_MODIFY +extern int InitOccChannel(void); +#endif + +#ifdef _ANGEL_SUMMON +#define ANGELTIMELIMIT 3*24*60*60 // 完成任务时限(秒) +int AngelReady =0; +int AngelTimelimit = ANGELTIMELIMIT; +time_t AngelNextTime; +void AngelReadyProc(); +#endif + +#include "genver.h" + +void warplog_proc(); + +int main( int argc , char** argv, char** env ) +{ + /* 午曰丐尹内凛棉毛涩烂仄化云仁 */ + setNewTime(); + + if ( argc > 1 && 0==strcmp(argv[1],"-v")) + { + printf("%s",genver); + exit(0); + } + else fprintf(stderr,"%s",genver); + + EXITWITHEXITCODEIFFALSE( util_Init() , 1); + + LoadAnnounce(); // Arminius 7.12 loginannounce + + /* 赓渝涩烂 */ + memcpy( &tmOld, localtime( (time_t *)&NowTime.tv_sec), sizeof( tmNow ) ); + + EXITWITHEXITCODEIFFALSE( init(argc , argv ,env ) , 1); + + LoadPetTalk(); // Arminius 8.14 pet talk + +#ifdef _GAMBLE_BANK + Load_GambleBankItems(); +#endif + +#ifdef _CFREE_petskill + Load_PetSkillCodes(); +#endif +#ifdef _ITEM_PILEFORTRADE + TRADE_InitTradeList(); +#endif + +#ifdef _DEATH_CONTEND + if( PKLIST_InitPkTeamList( MAXTEAMNUM ) == -1 ) return 1; +#endif + +#if USE_MTIO + /* 穴伙民旦伊永玉及午五反仇仇匹坌昴 */ + if( MTIO_setup() < 0 ){ + print( "cannot setup MT environment\n" ); + return 1; + } + + /* 仇仇匹 join 仄化蔽 */ + MTIO_join(); +#else + mainloop(); +#endif + + return 0; +} + +void mainloop( void ) +{ + NPC_generateLoop( 1 ); + signal(SIGUSR1,sigusr1); + signal(SIGUSR2,sigusr2); +#ifdef _MAP_WARPPOINT + MAPPOINT_InitMapWarpPoint(); + if( !MAPPOINT_loadMapWarpPoint() ){ + return; + } +#endif + +#ifdef _ASSESS_SYSEFFICACY + Assess_InitSysEfficacy(); +#endif + +#ifdef _CHECK_BATTLETIME + check_battle_com_init(); +#endif + +#ifdef _CHATROOMPROTOCOL // (不可开) Syu ADD 聊天室频道 + InitChatRoom(); +#endif + +#ifdef _CHANNEL_MODIFY + if(!InitOccChannel()) return; // 初始化职业频道 +#endif + +#ifdef _GM_BROADCAST // WON ADD 客服公告系统 + Init_GM_BROADCAST( 0, 0, 0, "" ); +#endif + +#ifdef _DEATH_FAMILY_STRUCT // WON ADD 家族战存放胜负资料 + Init_FM_PK_STRUCT(); +#endif + +#ifdef _ANGEL_SUMMON + AngelReady = 0; + AngelNextTime = time(NULL) + 1*60; +#endif + +//#ifdef _ALLDOMAN +// InitHeroList(); +//#endif + while(1){ +#ifdef _ASSESS_SYSEFFICACY + Assess_SysEfficacy( 0 ); +#endif + setNewTime(); + memcpy(&tmNow, localtime( (time_t *)&NowTime.tv_sec), + sizeof( tmNow ) ); + if( tmOld.tm_hour != getLogHour( ) && tmNow.tm_hour == getLogHour( ) ){ + backupAllLogFile( &tmOld ); + } + setNewTime(); + +#ifdef _ASSESS_SYSEFFICACY_SUB //显示LOOP时间 +Assess_SysEfficacy_sub( 0, 1); + netloop_faster(); +Assess_SysEfficacy_sub( 1, 1); + +//Assess_SysEfficacy_sub( 0, 2); + NPC_generateLoop( 0 ); +//Assess_SysEfficacy_sub( 1, 2); + +Assess_SysEfficacy_sub( 0, 3); + BATTLE_Loop(); +Assess_SysEfficacy_sub( 1, 3); + +Assess_SysEfficacy_sub( 0, 4); + CHAR_Loop(); +Assess_SysEfficacy_sub( 1, 4); + +//Assess_SysEfficacy_sub( 0, 5); + PETMAIL_proc(); +//Assess_SysEfficacy_sub( 1, 5); + +//Assess_SysEfficacy_sub( 0, 6); + family_proc(); +//Assess_SysEfficacy_sub( 1, 6); + +//Assess_SysEfficacy_sub( 0, 7); + chardatasavecheck(); +//Assess_SysEfficacy_sub( 1, 7); +#ifdef _GM_BROADCAST // WON ADD 客服公告系统 +//Assess_SysEfficacy_sub( 0, 8); + GM_BROADCAST(); +//Assess_SysEfficacy_sub( 1, 8); +#endif + +#else //不显示LOOP时间 + netloop_faster(); + NPC_generateLoop( 0 ); + BATTLE_Loop(); + CHAR_Loop(); + PETMAIL_proc(); + family_proc(); + chardatasavecheck(); +#ifdef _GM_BROADCAST // WON ADD 客服公告系统 + GM_BROADCAST(); +#endif +#endif + +#ifdef _ANGEL_SUMMON + AngelReadyProc(); +#endif + + if( tmOld.tm_sec != tmNow.tm_sec ) { + CHAR_checkEffectLoop(); + } + if( SERVSTATE_getShutdown()> 0 ) { + ShutdownProc(); + } + + tmOld = tmNow; +#ifdef _ASSESS_SYSEFFICACY + Assess_SysEfficacy( 1); +#endif + } +#ifdef _SERVICE + close(g_nServiceSocket); +#endif +} + +static void sendmsg_toall( char *msg ) +{ + int i; + int playernum = CHAR_getPlayerMaxNum(); + + for( i = 0 ; i < playernum ; i++) { + if( CHAR_getCharUse(i) != FALSE ) { + CHAR_talkToCli( i, -1, msg, CHAR_COLORYELLOW); + } + } +} +static void ShutdownProc( void) +{ +#define SYSINFO_SHUTDOWN_MSG "再过 %d 分钟後,即开始进行server系统维护。" +#define SYSINFO_SHUTDOWN_MSG_COMP "server已关闭。" + int diff,hun; + + diff = NowTime.tv_sec - SERVSTATE_getShutdown(); + hun = SERVSTATE_getLimittime() - (diff/60); + if( hun != SERVSTATE_getDsptime() ){ + char buff[256]; + if( hun != 0 ) { + snprintf( buff, sizeof(buff), SYSINFO_SHUTDOWN_MSG, hun); + } + else { + strcpy( buff, SYSINFO_SHUTDOWN_MSG_COMP); + } + sendmsg_toall( buff); + SERVSTATE_setDsptime(hun); + if( hun == 1 ) { + SERVSTATE_SetAcceptMore( 0 ); + } + } + /* closesallsockets */ + if( hun == 0) { + closeAllConnectionandSaveData(); + SERVSTATE_setShutdown(0); + SERVSTATE_setDsptime(0); + SERVSTATE_setLimittime(0); +#ifdef _KILL_12_STOP_GMSV // WON ADD 下sigusr2後关闭GMSV + //andy_reEdit 2003/04/28不准开... + //system("./stop.sh"); +#endif + } + +} + +void family_proc() +{ + static unsigned long gettime = 0; + static unsigned long checktime = 0; + static unsigned long proctime = 0; + +#ifdef _CK_ONLINE_PLAYER_COUNT // WON ADD 计算线上人数 + static unsigned long player_count_time = 0; + int PLAYER_COUNT_TIME = 60*5; // 30秒传一次人数至 AC +#endif + +#ifdef _RECAL_SEND_COUNT // WON 传送GS资讯 + static unsigned long recal_count_time = 0; + int RECAL_COUNT_TIME = 60; + if( (unsigned long)NowTime.tv_sec > recal_count_time ){ + recal_get_count(); +#ifdef _GSERVER_RUNTIME //传送GSERVER执行多少时间给MSERVER + gserver_runtime(); +#endif + recal_count_time = (unsigned long)NowTime.tv_sec + RECAL_COUNT_TIME; + } +#endif + + if( time(NULL) < proctime ) return; + proctime = time(NULL)+5; + + if( (unsigned long)NowTime.tv_sec > gettime ){ + getNewFMList(); + gettime = (unsigned long)NowTime.tv_sec + 60*10; + } + + if( (unsigned long)NowTime.tv_sec > checktime ){ + //checkFamilyIndex(); + + checktime = (unsigned long)NowTime.tv_sec + 60*30; + } + +#ifdef _CK_ONLINE_PLAYER_COUNT // WON ADD 计算线上人数 + if( (unsigned long)NowTime.tv_sec > player_count_time ){ + GS_SEND_PLAYER_COUNT(); + player_count_time = (unsigned long)NowTime.tv_sec + PLAYER_COUNT_TIME; + } +#endif +} + +void warplog_proc() +{ + static unsigned long checktime = 0; + + if( (unsigned long)NowTime.tv_sec > checktime ){ + warplog_to_file(); + checktime = (unsigned long)NowTime.tv_sec + 300; + } +} + +#ifdef _ANGEL_SUMMON + +extern int player_online; + +void AngelReadyProc() +{ + //static time_t lastCreateTime = time(NULL); + time_t nowTime; + //static unsigned long AngelNextTime = 30*60; + struct tm *temptime; + char msg[1024]; + + nowTime = time(NULL); + + if( nowTime < AngelNextTime ) + return; + + if( player_online <= 10 ) + { + //print(" ANGEL:线上人数不足=%d ", player_online); + return; + } + + AngelReady = 1; + //AngelNextTime = min( (int)(10000/player_online), 100)*60 + (unsigned long)nowTime; + AngelNextTime = min( (int)(5000/player_online), 100)*60 + (unsigned long)nowTime; + + temptime = localtime( &AngelNextTime ); + sprintf( msg, " ANGEL:产生一位缺额 下次产生时间=(%d/%d %d:%d) 目前人数=%d ", + temptime->tm_mon+1, temptime->tm_mday, temptime->tm_hour, temptime->tm_min, player_online ); + print( msg); + //LogAngel( msg); + +} + +#endif diff --git a/gmsv/makefile b/gmsv/makefile new file mode 100644 index 0000000..68304bd --- /dev/null +++ b/gmsv/makefile @@ -0,0 +1,940 @@ +export CC=gcc +export RM=rm -f +export AR=ar cr +export MV=mv +export RANLIB=ranlib +export SED=sed + + +export SHELL=/bin/sh + +# USE_MITO 鍙嶇┐浼欐皯鏃︿紛姘哥帀IO姣涢摱涓规柟涓瑰崬鍏佹湀锛1陇7indy鍖规垔浠剁敱濂朵紮鍏佹湀鍗堜簲鍙1陇7 +# pthread 鍙嶉獨鏃ュ崊涓強鍖癸綕浠囨湪姣涘弽鍐呬粍鍖杙thread 鎵嬪弽鍐呭厑浠囧崍 + +INCFLAGS=-Iinclude + +CFLAGS=-w -O3 $(INCFLAGS) + +PROG=gmsv + +#TOP=../.. +TOP=.. + +PERL=/usr/bin/env perl + +SIMPLEEX=$(TOP)/bin/simpleex.perl + +#RPC +RPCGEN=~/bin/lsgen.perl +CLIRPCHTML=~/doc/saacproto.html +CLIRPCSRC=saacproto_cli.c saacproto_util.c +CLIRPCINCLUDE=include/saacproto_cli.h include/saacproto_util.h +CLIRPCNOUSE=saacproto_serv.c include/saacproto_serv.h +CLIRPCOPTION=-h include -o . -euc + +SERVRPCHTML=~/doc/lssproto.html +SERVRPCSRC=lssproto_serv.c lssproto_util.c +SERVRPCINCLUDE=include/lssproto_serv.h include/lssproto_util.h +SERVRPCNOUSE=lssproto_cli.c include/lssproto_cli.h +SERVRPCOPTION= -h include -o . -euc -e + +RPCSRC=$(CLIRPCSRC) $(SERVRPCSRC) + +#PETSKILL +PETSKILLGEN=~/bin/makedefs.perl +PETSKILLTXT=data/petskill.txt +PETSKILLOPTION= -name 8 -value 4 -o + +#CHAR_ANIM +ANIMDATAGEN=~/bin/convertStringtographicnumber.perl +ANIMDATATXT=include/anim_tbl.h +ANIMDATAFILE=char/ls2data.h + + +SUBDIR=char npc map item battle magic +LIBS=char/libchar.a npc/libnpc.a map/libmap.a\ +item/libitem.a \ +magic/libmagic.a \ +battle/libbattle.a \ + +SRC=main.c init.c configfile.c util.c net.c buf.c msignal.c link.c mclient.c \ +callfromac.c callfromcli.c object.c handletime.c function.c log.c npcserver.c \ +autil.c npcshandle.c\ +$(CLIRPCSRC) $(SERVRPCSRC) + +OBJ=$(SRC:.c=.o) + + +#LDFLAGS=-lm -lpthread +LDFLAGS=-lm + + +ifeq ($(shell uname),Linux) + LDFLAGS+= +endif +ifeq ($(shell uname),SunOS) + LDFLAGS+=-lnsl -lsocket +endif +ifeq ($(shell uname),FreeBSD) + LDFLAGS+= +endif + +all: $(PROG) + +$(PROG): genver $(RPCSRC) $(ANIMDATAFILE) $(LIBS) $(OBJ) + $(CC) $(CFLAGS) -o $(PROG) $(OBJ) $(LIBS) $(LDFLAGS) + +genver: + $(SHELL) ./genver.sh + +depend: $(RPCSRC) $(ANIMDATAFILE) + @for dir in $(SUBDIR) ; do \ + $(MAKE) -C $$dir depend;\ + done + $(MV) makefile makefile.bak + $(SED) -ne '1,/^# DO NOT DELETE THIS LINE/p' makefile.bak>makefile + $(CC) $(INCFLAGS) -M $(SRC) >> makefile + +clean: + @for dir in $(SUBDIR) ; do \ + $(MAKE) -C $$dir clean;\ + done + $(RM) $(PROG) + $(RM) $(OBJ) + $(RM) *~ + +distclean: + @for dir in $(SUBDIR) ; do \ + $(MAKE) -C $$dir distclean;\ + done + $(RM) $(CLIRPCSRC) + $(RM) $(CLIRPCINCLUDE) + $(RM) $(SERVRPCSRC) + $(RM) $(SERVRPCINCLUDE) + $(RM) $(ANIMDATAFILE) + $(RM) include/*~ + + $(RM) $(PROG) + $(RM) $(OBJ) + $(RM) *~ + + $(MV) Makefile Makefile.bak + $(SED) -ne '1,/^# DO NOT DELETE THIS LINE/p' Makefile.bak>Makefile + $(RM) Makefile.bak + +data: $(RPCSRC) $(ANIMDATAFILE) + +$(CLIRPCSRC): #$(RPCGEN) $(CLIRPCHTML) $(CLIRPCGEN) +# $(PERL) $(RPCGEN) $(CLIRPCOPTION) $(CLIRPCHTML) +# $(RM) $(CLIRPCNOUSE) + +$(SERVRPCSRC): #$(RPCGEN) $(SERVRPCHTML) $(SERVRPCGEN) +# $(PERL) $(RPCGEN) $(SERVRPCOPTION) $(SERVRPCHTML) +# $(RM) $(SERVRPCNOUSE) + +$(ANIMDATAFILE): #$(ANIMDATAGEN) $(ANIMDATATXT) +# $(PERL) $(ANIMDATAGEN) $(ANIMDATATXT) > $(ANIMDATAFILE) + +$(LIBS): + @target=`echo $@ | $(SED) s/\\\\/.\\*//`; \ + $(MAKE) -C $$target; + + +jpex : + $(PERL) $(SIMPLEEX) *.c */*.c | nkf -s > jp_literal.sjis + + + +# DO NOT DELETE THIS LINE +main.o: main.c include/version.h include/correct_bug.h \ + include/version_pk.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/time.h /usr/include/bits/time.h /usr/include/string.h \ + /usr/include/signal.h /usr/include/bits/sigset.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/bits/sigthread.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h include/init.h include/common.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h include/net.h \ + /usr/include/sys/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/netinet/in.h \ + /usr/include/stdint.h /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/sys/types.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h include/link.h \ + include/handletime.h include/char.h include/char_base.h include/skill.h \ + include/util.h /usr/include/stdlib.h /usr/include/alloca.h \ + include/title.h include/addressbook.h include/char_data.h \ + include/item.h include/map_warppoint.h include/npcgen.h include/log.h \ + include/configfile.h include/battle.h include/petmail.h include/autil.h \ + include/family.h include/defend.h include/trade.h include/chatroom.h \ + genver.h +init.o: init.c include/version.h include/correct_bug.h \ + include/version_pk.h /usr/include/unistd.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/types.h \ + /usr/include/bits/wordsize.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/typesizes.h /usr/include/bits/confname.h \ + /usr/include/getopt.h /usr/include/stdio.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/strings.h include/configfile.h include/common.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h include/net.h /usr/include/netinet/in.h \ + /usr/include/stdint.h /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + include/link.h include/msignal.h include/buf.h include/object.h \ + include/char.h include/char_base.h include/skill.h include/title.h \ + include/addressbook.h include/char_data.h include/item.h \ + include/readmap.h include/function.h include/saacproto_cli.h \ + include/saacproto_util.h /usr/include/string.h include/lssproto_serv.h \ + include/lssproto_util.h include/readnpc.h include/log.h \ + include/handletime.h include/encount.h include/enemy.h include/battle.h \ + include/magic_base.h include/pet_skill.h include/item_gen.h \ + include/petmail.h include/npc_quiz.h include/profession_skill.h \ + include/init.h +configfile.o: configfile.c include/version.h include/correct_bug.h \ + include/version_pk.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/string.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h include/util.h /usr/include/sys/time.h \ + /usr/include/time.h /usr/include/bits/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h include/common.h /usr/include/errno.h \ + /usr/include/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/asm/errno.h include/lssproto_util.h include/configfile.h \ + include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + include/link.h include/npcutil.h include/char.h include/char_base.h \ + include/skill.h include/title.h include/addressbook.h \ + include/char_data.h include/item.h include/lssproto_serv.h \ + include/npc_raceman.h +util.o: util.c include/version.h include/correct_bug.h \ + include/version_pk.h /usr/include/sys/types.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/bits/time.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/sys/socket.h /usr/include/sys/uio.h \ + /usr/include/bits/uio.h /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/sys/time.h /usr/include/sys/stat.h \ + /usr/include/bits/stat.h /usr/include/netinet/in.h \ + /usr/include/stdint.h /usr/include/bits/wchar.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/arpa/inet.h \ + /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \ + /usr/include/wchar.h /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/string.h /usr/include/stdlib.h /usr/include/alloca.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + /usr/include/dirent.h /usr/include/bits/dirent.h /usr/include/netdb.h \ + /usr/include/rpc/netdb.h /usr/include/bits/netdb.h /usr/include/errno.h \ + /usr/include/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/asm/errno.h /usr/include/ctype.h include/common.h \ + include/util.h include/configfile.h +net.o: net.c include/version.h include/correct_bug.h include/version_pk.h \ + /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/netdb.h \ + /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/rpc/netdb.h /usr/include/bits/netdb.h \ + /usr/include/sys/socket.h /usr/include/sys/uio.h \ + /usr/include/bits/uio.h /usr/include/sys/time.h \ + /usr/include/arpa/inet.h /usr/include/netinet/tcp.h \ + /usr/include/sys/timeb.h include/net.h include/common.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + include/link.h include/buf.h include/msignal.h include/configfile.h \ + include/util.h include/saacproto_cli.h include/saacproto_util.h \ + /usr/include/strings.h include/lssproto_serv.h include/lssproto_util.h \ + include/char.h include/char_base.h include/skill.h include/title.h \ + include/addressbook.h include/char_data.h include/item.h \ + include/handletime.h include/log.h include/object.h \ + include/item_event.h include/enemy.h include/battle.h \ + include/pet_event.h include/char_talk.h include/petmail.h \ + include/chatmagic.h +buf.o: buf.c include/version.h include/correct_bug.h include/version_pk.h \ + /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \ + include/buf.h include/common.h /usr/include/errno.h \ + /usr/include/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/asm/errno.h include/handletime.h /usr/include/sys/time.h +msignal.o: msignal.c include/version.h include/correct_bug.h \ + include/version_pk.h /usr/include/signal.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/include/bits/sigset.h /usr/include/bits/types.h \ + /usr/include/bits/wordsize.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/typesizes.h /usr/include/bits/signum.h \ + /usr/include/time.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/bits/sigthread.h /usr/include/errno.h \ + /usr/include/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/asm/errno.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h /usr/include/stdio.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + include/buf.h include/common.h include/net.h /usr/include/sys/time.h \ + /usr/include/bits/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/netinet/in.h \ + /usr/include/stdint.h /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/sys/types.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h include/link.h \ + include/char.h include/char_base.h include/skill.h include/util.h \ + /usr/include/stdlib.h /usr/include/alloca.h include/title.h \ + include/addressbook.h include/char_data.h include/item.h \ + include/object.h include/configfile.h include/lssproto_serv.h \ + include/lssproto_util.h /usr/include/string.h /usr/include/strings.h \ + include/saacproto_cli.h include/saacproto_util.h include/log.h \ + include/petmail.h +link.o: link.c /usr/include/stdlib.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/sys/types.h /usr/include/bits/types.h \ + /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \ + /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/alloca.h include/version.h \ + include/correct_bug.h include/version_pk.h include/link.h \ + include/common.h /usr/include/stdio.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h include/buf.h +mclient.o: mclient.c /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/string.h /usr/include/strings.h /usr/include/sys/types.h \ + /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/sys/socket.h \ + /usr/include/sys/uio.h /usr/include/bits/uio.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/sys/time.h /usr/include/sys/stat.h \ + /usr/include/bits/stat.h /usr/include/netinet/in.h \ + /usr/include/stdint.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/arpa/inet.h \ + /usr/include/stdlib.h /usr/include/alloca.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \ + /usr/include/netdb.h /usr/include/rpc/netdb.h /usr/include/bits/netdb.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h include/autil.h \ + include/version.h include/correct_bug.h include/version_pk.h \ + include/common.h include/util.h include/net.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + /usr/include/bits/sigthread.h include/link.h include/char.h \ + include/char_base.h include/skill.h include/title.h \ + include/addressbook.h include/char_data.h include/item.h \ + include/mclient.h include/log.h include/handletime.h \ + include/chatmagic.h +callfromac.o: callfromac.c /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + include/version.h include/correct_bug.h include/version_pk.h \ + include/common.h /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + include/saacproto_cli.h include/saacproto_util.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/time.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/bits/time.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h /usr/include/string.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + include/lssproto_serv.h include/lssproto_util.h include/net.h \ + /usr/include/sys/time.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + include/link.h include/char.h include/char_base.h include/skill.h \ + include/util.h include/title.h include/addressbook.h \ + include/char_data.h include/item.h include/object.h include/readmap.h \ + include/msignal.h include/map_deal.h include/npc_duelranking.h \ + include/npc_warpman.h include/handletime.h include/npc_scheduleman.h \ + include/configfile.h include/chatroom.h include/npc_eventaction.h \ + include/family.h include/defend.h include/log.h include/buf.h \ + include/npc_alldoman.h include/npc_raceman.h +callfromcli.o: callfromcli.c include/version.h include/correct_bug.h \ + include/version_pk.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/time.h /usr/include/bits/time.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/alloca.h include/common.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h include/util.h \ + /usr/include/sys/time.h include/lssproto_serv.h include/lssproto_util.h \ + /usr/include/string.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h include/saacproto_cli.h include/saacproto_util.h \ + include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + include/link.h include/char.h include/char_base.h include/skill.h \ + include/title.h include/addressbook.h include/char_data.h \ + include/item.h include/object.h include/readmap.h include/handletime.h \ + include/configfile.h include/event.h include/pet.h include/battle.h \ + include/battle_command.h include/magic.h include/petmail.h \ + include/item_gen.h include/pet_skill.h include/log.h include/map_deal.h \ + include/trade.h include/family.h include/item_event.h \ + include/profession_skill.h include/chatroom.h +object.o: object.c include/version.h include/correct_bug.h \ + include/version_pk.h /usr/include/sys/stat.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/typesizes.h /usr/include/time.h \ + /usr/include/bits/stat.h /usr/include/stdio.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/string.h /usr/include/stdlib.h /usr/include/sys/types.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/dirent.h \ + /usr/include/bits/dirent.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + include/common.h /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h include/object.h \ + include/char_base.h include/skill.h include/util.h \ + /usr/include/sys/time.h include/title.h include/addressbook.h \ + include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix2_lim.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + /usr/include/bits/sigthread.h include/link.h include/char.h \ + include/char_data.h include/item.h include/buf.h include/readmap.h \ + include/pet.h +handletime.o: handletime.c include/version.h include/correct_bug.h \ + include/version_pk.h /usr/include/time.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/time.h /usr/include/bits/types.h \ + /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \ + /usr/include/sys/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h include/common.h \ + /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \ + /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + include/handletime.h +function.o: function.c include/version.h include/correct_bug.h \ + include/version_pk.h /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + include/common.h /usr/include/stdio.h /usr/include/bits/types.h \ + /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/include/bits/wchar.h /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h include/char_event.h include/char_base.h \ + include/skill.h include/title.h include/addressbook.h include/net.h \ + /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + include/link.h include/char.h include/char_data.h include/item.h \ + include/item_event.h include/magic.h include/pet_event.h \ + include/npc_townpeople.h include/npc_Dengon.h include/npc_door.h \ + include/npc_healer.h include/npc_oldman.h include/npc_warp.h \ + include/npc_storyteller.h include/npc_msg.h include/npc_npcenemy.h \ + include/npc_action.h include/npc_windowman.h include/npc_savepoint.h \ + include/npc_windowhealer.h include/npc_itemshop.h include/npc_sysinfo.h \ + include/npc_duelranking.h include/npc_petskillshop.h \ + include/npc_petshop.h include/npc_signboard.h include/npc_warpman.h \ + include/npc_exchangeman.h include/petmail.h include/npc_timeman.h \ + include/npc_bodylan.h include/npc_mic.h include/npc_luckyman.h \ + include/npc_bus.h include/npc_charm.h include/npc_poolitemshop.h \ + include/npc_quiz.h include/npc_checkman.h include/npc_janken.h \ + include/npc_transmigration.h include/battle_event.h include/enemy.h \ + include/npc_familyman.h include/npc_bankman.h include/npc_fmdengon.h \ + include/npc_fmhealer.h include/npc_petmaker.h include/npc_fmwarpman.h \ + include/npc_fmpkman.h include/npc_fmpkcallman.h include/npc_airplane.h \ + include/npc_scheduleman.h include/npc_manorsman.h \ + include/npc_riderman.h include/npc_fmletter.h \ + include/npc_stoneserviceman.h include/npc_gamblebank.h \ + include/npc_newnpcman.h include/npc_gambleroulette.h \ + include/npc_gamblemaster.h include/npc_transerman.h \ + include/npc_freepetskillshop.h include/npc_petracemaster.h \ + include/npc_petracepet.h include/npc_itemchange.h \ + include/npc_makepair.h include/npc_petfusion.h include/npc_alldoman.h \ + include/npc_welfare.h include/npc_raceman.h +log.o: log.c include/version.h include/correct_bug.h include/version_pk.h \ + /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/string.h /usr/include/time.h /usr/include/bits/time.h \ + include/common.h /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h include/util.h \ + /usr/include/sys/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h include/log.h include/handletime.h include/net.h \ + /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + include/link.h include/char_base.h include/skill.h include/title.h \ + include/addressbook.h +npcserver.o: npcserver.c /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/strings.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/sys/socket.h \ + /usr/include/sys/uio.h /usr/include/bits/uio.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/sys/time.h /usr/include/sys/stat.h \ + /usr/include/bits/stat.h /usr/include/netinet/in.h \ + /usr/include/stdint.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/arpa/inet.h \ + /usr/include/stdlib.h /usr/include/alloca.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \ + /usr/include/netdb.h /usr/include/rpc/netdb.h /usr/include/bits/netdb.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h include/autil.h \ + include/version.h include/correct_bug.h include/version_pk.h \ + include/common.h include/util.h include/net.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + /usr/include/bits/sigthread.h include/link.h include/char.h \ + include/char_base.h include/skill.h include/title.h \ + include/addressbook.h include/char_data.h include/item.h include/log.h \ + include/handletime.h include/npcserver.h include/lssproto_serv.h \ + include/lssproto_util.h /usr/include/string.h +autil.o: autil.c include/version.h include/correct_bug.h \ + include/version_pk.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/alloca.h include/autil.h \ + include/common.h /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h include/char.h \ + include/char_base.h include/skill.h include/util.h \ + /usr/include/sys/time.h include/title.h include/addressbook.h \ + include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + include/link.h include/char_data.h include/item.h \ + include/lssproto_util.h /usr/include/string.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h +npcshandle.o: npcshandle.c /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/strings.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/sys/socket.h \ + /usr/include/sys/uio.h /usr/include/bits/uio.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/sys/time.h /usr/include/sys/stat.h \ + /usr/include/bits/stat.h /usr/include/netinet/in.h \ + /usr/include/stdint.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/arpa/inet.h \ + /usr/include/stdlib.h /usr/include/alloca.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \ + /usr/include/netdb.h /usr/include/rpc/netdb.h /usr/include/bits/netdb.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h include/autil.h \ + include/version.h include/correct_bug.h include/version_pk.h \ + include/common.h include/util.h include/net.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + /usr/include/bits/sigthread.h include/link.h include/object.h \ + include/char.h include/char_base.h include/skill.h include/title.h \ + include/addressbook.h include/char_data.h include/item.h include/log.h \ + include/handletime.h include/npcserver.h include/lssproto_serv.h \ + include/lssproto_util.h /usr/include/string.h include/npcshandle.h \ + include/npcutil.h include/npc_eventaction.h +saacproto_cli.o: saacproto_cli.c include/version.h include/correct_bug.h \ + include/version_pk.h include/saacproto_cli.h include/saacproto_util.h \ + /usr/include/stdlib.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/sys/types.h /usr/include/bits/types.h \ + /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \ + /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h /usr/include/stdio.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + include/common.h /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h include/net.h \ + /usr/include/sys/time.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + include/link.h include/chatmagic.h +saacproto_util.o: saacproto_util.c include/version.h \ + include/correct_bug.h include/version_pk.h /usr/include/stdio.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + /usr/include/strings.h include/saacproto_util.h +lssproto_serv.o: lssproto_serv.c include/version.h include/correct_bug.h \ + include/version_pk.h include/autil.h include/common.h \ + /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + include/lssproto_serv.h include/lssproto_util.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/time.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/bits/time.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h /usr/include/string.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h include/log.h \ + include/char.h include/char_base.h include/skill.h include/util.h \ + /usr/include/sys/time.h include/title.h include/addressbook.h \ + include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + include/link.h include/char_data.h include/item.h +lssproto_util.o: lssproto_util.c include/version.h include/correct_bug.h \ + include/version_pk.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + /usr/include/strings.h include/lssproto_util.h include/common.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h diff --git a/gmsv/map/makefile b/gmsv/map/makefile new file mode 100644 index 0000000..ec4526c --- /dev/null +++ b/gmsv/map/makefile @@ -0,0 +1,175 @@ +INCFLAGS=-I.. -I../include + + +CFLAGS=-w -O3 $(INCFLAGS) + +PROG=libmap.a + +SRC=readmap.c map_deal.c map_util.c map_warppoint.c +OBJ=$(SRC:.c=.o) + +ifeq (0,$(MAKELEVEL)) +CC=gcc +RM=rm -f +AR=ar cr +MV=mv +RANLIB=ranlib +SED=sed +SHELL=/bin/sh +endif + +all: $(PROG) + +$(PROG): $(OBJ) + $(RM) $(PROG) + $(AR) $(PROG) $(OBJ) + $(RANLIB) $(PROG) + +depend: + $(MV) Makefile makefile.bak + $(SED) -ne '1,/^# DO NOT DELETE THIS LINE/p' makefile.bak>makefile + $(CC) $(INCFLAGS) -M $(SRC) >> makefile + +clean: + $(RM) $(PROG) + $(RM) $(OBJ) + $(RM) *~ + +distclean: + $(RM) $(PROG) + $(RM) $(OBJ) + $(RM) *~ + $(MV) makefile makefile.bak + $(SED) -ne '1,/^# DO NOT DELETE THIS LINE/p' makefile.bak>makefile + $(RM) makefile.bak + +# DO NOT DELETE THIS LINE +readmap.o: readmap.c /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h /usr/include/string.h /usr/include/dirent.h \ + /usr/include/bits/dirent.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix2_lim.h \ + /usr/include/stdint.h /usr/include/bits/wordsize.h \ + /usr/include/bits/socket.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/sys/stat.h /usr/include/bits/stat.h ../include/common.h \ + ../include/object.h ../include/readmap.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/bits/time.h ../include/buf.h \ + ../include/char.h ../include/char_base.h ../include/skill.h \ + ../include/title.h ../include/addressbook.h ../include/net.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h ../include/link.h ../include/char_data.h \ + ../include/item.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + ../include/configfile.h +map_deal.o: map_deal.c ../include/common.h /usr/include/stdio.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/readmap.h ../include/util.h /usr/include/sys/time.h \ + /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/char.h ../include/char_base.h \ + ../include/skill.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/map_util.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/string.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/anim_tbl.h +map_util.o: map_util.c ../include/common.h /usr/include/stdio.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char.h ../include/char_base.h ../include/skill.h \ + ../include/util.h /usr/include/sys/time.h /usr/include/time.h \ + /usr/include/bits/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/readmap.h +map_warppoint.o: map_warppoint.c ../include/common.h /usr/include/stdio.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char.h ../include/char_base.h ../include/skill.h \ + ../include/util.h /usr/include/sys/time.h /usr/include/time.h \ + /usr/include/bits/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/readmap.h ../include/map_warppoint.h diff --git a/gmsv/map/map_deal.c b/gmsv/map/map_deal.c new file mode 100644 index 0000000..fb6b0fd --- /dev/null +++ b/gmsv/map/map_deal.c @@ -0,0 +1,318 @@ +#include "version.h" +#include "common.h" +#include "readmap.h" +#include "char.h" +#include "map_util.h" +#include "lssproto_serv.h" +#include "net.h" +#include "anim_tbl.h" + +/*#define MAPEDITORTROUBLE*/ +#define SPR_kmydamY CG_HIT_MARK_10 // anim_tbl.h 卞瓒 今木月引匹 及巨白尼弁玄 + +/*------------------------------------------------------------ + * 汹仃月井升丹井 蝇允月[平乓仿互 氏匹中月井升丹井娄醒互丐月[ + * 娄醒 + * ff int floor + * fx int x甄 + * fy int y甄 + * isfly int 氏匹中月井升丹井 + * 忒曰袄 + * 汹仃月 TRUE(1) + * 汹仃卅中 FALSE(0) + ------------------------------------------------------------*/ +BOOL MAP_walkAbleFromPoint( int ff, int fx, int fy, BOOL isfly ) +{ + int map[2]; + + if( !MAP_getTileAndObjData( ff,fx,fy, &map[0], &map[1] ) ){ + return FALSE; + } + + if( isfly ){ + int i; + for( i = 0 ; i < 2 ; i ++ ) + if( MAP_getImageInt( map[i], MAP_HAVEHEIGHT ) == TRUE ){ + return FALSE; + } + return TRUE; + }else{ + switch( MAP_getImageInt( map[1], MAP_WALKABLE ) ){ + case 0: + return FALSE; + break; + case 1: + if( MAP_getImageInt( map[0], MAP_WALKABLE ) == 1 ){ + return TRUE; + }else{ + return FALSE; + } + break; + case 2: + return TRUE; + break; + default: + return FALSE; + break; + } + } + + return FALSE; +} + + + +/*------------------------------------------------------------ + * 汹仃月井升丹井 蝇允月[ + * 娄醒 + * index int Char 匹及 Index + * ff int floor id + * fx int x甄 + * fy int y甄 + * 忒曰袄 + * 汹中化方中 TRUE(1) + * 汹中化反母丢 FALSE(0) + ------------------------------------------------------------*/ +BOOL MAP_walkAble( int index,int ff, int fx, int fy) +{ + /* 平乓仿卅日OK */ + if( CHAR_getFlg( index, CHAR_ISTRANSPARENT ) ) return TRUE; + + // Arminius 7.9 Airplane ok + if( CHAR_getInt( index, CHAR_WHICHTYPE ) == CHAR_TYPEBUS) return TRUE; + if( CHAR_getWorkInt( index, CHAR_WORKPARTYMODE) == CHAR_PARTY_CLIENT ) { + int oyaindex = CHAR_getWorkInt( index, CHAR_WORKPARTYINDEX1); + if( CHAR_CHECKINDEX( oyaindex)) { + if (CHAR_getInt( oyaindex, CHAR_WHICHTYPE ) == CHAR_TYPEBUS) return TRUE; + } + } + + return MAP_walkAbleFromPoint( ff,fx,fy,CHAR_getFlg(index,CHAR_ISFLYING)|CHAR_getWorkInt(index,CHAR_WORKSKYWALKER) ); +} + +/*------------------------------------------------------------ + * 甄 毛隙烂仄化}公仇及左皮斥尼弁玄卞嫖今互丐月井升丹井 + * 娄醒 + * fl int 白夫失 + * x int x 甄 + * y int y 甄 + * 忒曰袄 + * 嫖今互丐月 TRUE + * 嫖今互卅中 FALSE + ------------------------------------------------------------*/ +BOOL MAP_haveHeight( int fl, int x, int y ) +{ + int map[2]; + + /* 穴永皿犯□正毛 化仁月 */ + if( !MAP_getTileAndObjData( fl,x,y, &map[0], &map[1] ) ) + return FALSE; + + return MAP_getImageInt( map[1], MAP_HAVEHEIGHT ); +} + + + +/*---------------------------------------- + * 旦 □正旦 祭烟及 凳毛允月 + * 娄醒 + * index int 平乓仿及奶件犯永弁旦 + * map int 穴永皿犯□正 + * outof BOOL 褡戈凛}转仁凛井 TRUE 卅日壬 褡戈凛匹丐月[ + * 忒曰袄 + * 由仿丢□正 祭毛仄凶 TRUE + * 由仿丢□正 祭毛仄卅井匀凶 FALSE + ----------------------------------------*/ +static BOOL MAP_changeCharStatusFromMapDataAndTime( int index, + int map, BOOL outof) +{ +#if 0 +// 旦玄□件巨奶斥匹反银歹卅中 + int i; + int offset; + BOOL change=FALSE; + static struct tagStatusInteractionOfBitAndDefine{ + int mapdataindex; + int charadataindex; + }statusInteraction[]={ + {MAP_INTOPOISON, CHAR_POISON}, + {MAP_INTOPARALYSIS, CHAR_PARALYSIS}, + {MAP_INTOSILENCE, CHAR_SLEEP}, + {MAP_INTOSTONE, CHAR_STONE}, + {MAP_INTODARKNESS, CHAR_DRUNK}, + {MAP_INTOCONFUSION, CHAR_CONFUSION}, + + {MAP_OUTOFPOISON, CHAR_POISON}, + {MAP_OUTOFPARALYSIS, CHAR_PARALYSIS}, + {MAP_OUTOFSILENCE, CHAR_SLEEP}, + {MAP_OUTOFSTONE, CHAR_STONE}, + {MAP_OUTOFDARKNESS, CHAR_DRUNK}, + {MAP_OUTOFCONFUSION, CHAR_CONFUSION}, + }; + + if( outof == FALSE )offset = 6; + else offset= 0; + for( i = 0 ; i < 6 ; i ++ ){ + int newdata; + newdata = MAP_getImageInt(map,statusInteraction[i+offset]. + mapdataindex); + if( newdata > 0 ){ + change=TRUE; + /* 旦 □正旦及涩烂 */ + CHAR_setInt( index, + statusInteraction[i+offset].charadataindex, + CHAR_getInt(index, + statusInteraction[i+offset]. + charadataindex ) + newdata ); + } + } + return change; +#else + return FALSE; +#endif +} + + +/*------------------------------------------------------------ + * Map 奶矛件玄及 pre post毛质 允月 + * 娄醒 + * index int 昙欠丹午仄化中月平乓仿及奶件犯永弁旦 + * mode BOOL TRUE及凛反}in FALSE及凛反 out 卞覆杀 + * 忒曰袄卅仄 + ------------------------------------------------------------*/ +static void MAP_dealprepostevent( int index, BOOL mode ) +{ + int map[2]; + int i; + int damaged=FALSE,statuschange=FALSE; + + if( CHAR_getFlg(index,CHAR_ISFLYING) ) + /* 氏匹月支勾卞反窒手仄卅中 */ + return; + + if( !MAP_getMapDataFromCharIndex( index , map ) ) return; + + for( i = 0 ; i < 2 ; i ++ ){ + /* damage */ + int damage; + damage = MAP_getImageInt(map[i], + mode ? MAP_INTODAMAGE : MAP_OUTOFDAMAGE); + if( damage != 0 ){ + /* 母丢□斥汹毛恳匹 蜇允月及匹 寞 木赘尹 */ + int opt[2]={SPR_kmydamY,-damage}; + damaged=TRUE; + CHAR_setInt(index, CHAR_HP, + CHAR_getInt(index,CHAR_HP) + damage ); + CHAR_complianceParameter(index); + /* 母丢□斥熬仃凶巨白尼弁玄请允 */ + CHAR_sendWatchEvent(CHAR_getWorkInt(index,CHAR_WORKOBJINDEX), + CHAR_ACTDAMAGE,opt,2,TRUE); + } + if( MAP_changeCharStatusFromMapDataAndTime( + index,map[i], mode ? TRUE : FALSE ) ) + statuschange=TRUE; + } + if( damaged ) CHAR_sendStatusString(index,"M"); + if( statuschange ){ + CHAR_sendCToArroundCharacter(index); + CHAR_sendStatusString(index,"P"); + } + +} + + +/*---------------------------------------- + * 公及正奶伙卞昙月蟆卞裟壬木月[仇仇匹公仇井日转仁午}xxx烟及 + * 仪毛 蜇允月[ + * 娄醒 + * index int 昙欠丹午仄化中月平乓仿及奶件犯永弁旦 + * flooor int 白夫失ID + * fx int x甄 + * fy int y甄 + * 忒曰袄 + * 卅仄 + ----------------------------------------*/ +void MAP_preovered( int index ) +{ + MAP_dealprepostevent( index, FALSE ); +} + +/*---------------------------------------- + * 公及正奶伙卞昙匀凶 卞裟壬木月[ + * 娄醒 + * index int 昙欠丹午仄化中月平乓仿及奶件犯永弁旦 + * 忒曰袄 + * 卅仄 + ----------------------------------------*/ +void MAP_postovered( int index ) +{ + MAP_dealprepostevent( index, TRUE ); +} + + +/*---------------------------------------- + * 平乓仿及璃曰及穴永皿毛允屯化霜月 + * 娄醒 + * fd int + * charaindex int 平乓仿及奶件犯永弁旦 + * 忒曰袄 + * 岳 TRUE(1) + * 撩 FALSE(0) + ----------------------------------------*/ +BOOL MAP_sendArroundCharNeedFD( int fd,int charaindex ) +{ + char* stringdata; + int x=CHAR_getInt(charaindex,CHAR_X); + int y=CHAR_getInt(charaindex,CHAR_Y); + int fl=CHAR_getInt(charaindex,CHAR_FLOOR); + int size=MAP_CHAR_DEFAULTSEESIZ; + RECT seekr,retr; + seekr.x = x - (int)(size/2); + seekr.y = y - (int)(size/2); + seekr.width = size; + seekr.height = size; +#if 1 +{ + int tilesum, objsum, eventsum; + stringdata = MAP_getChecksumFromRECT(fl,&seekr,&retr, &tilesum,&objsum,&eventsum); + if( stringdata == NULL ) + return FALSE; + + lssproto_MC_send(fd,fl, + retr.x, retr.y, + retr.x + retr.width, retr.y + retr.height, + tilesum, + objsum, + eventsum, + stringdata ); +} +#else + stringdata = MAP_getdataFromRECT(fl,&seekr,&retr); + if( stringdata == NULL ) + return FALSE; + + lssproto_M_send(fd,fl, + retr.x, retr.y, + retr.x + retr.width, retr.y + retr.height, + stringdata ); +#endif + return TRUE; +} + + +/*---------------------------------------- + * 穴永皿犯□正毛 月[ + * 娄醒 + * charaindex int 平乓仿及奶件犯永弁旦 + * 忒曰袄 + * 岳 TRUE(1) + * 撩 FALSE(0) + ----------------------------------------*/ +BOOL MAP_sendArroundChar(int charaindex) +{ + int fd; + fd = getfdFromCharaIndex( charaindex ); + if( fd == -1 )return FALSE; + + return MAP_sendArroundCharNeedFD(fd, charaindex); +} diff --git a/gmsv/map/map_util.c b/gmsv/map/map_util.c new file mode 100644 index 0000000..ead0a3f --- /dev/null +++ b/gmsv/map/map_util.c @@ -0,0 +1,35 @@ +#include "version.h" +#include "common.h" +#include "char.h" +#include "readmap.h" + + +#define MAP_CHARFLOOR(x) CHAR_getInt(x,CHAR_FLOOR) +#define MAP_CHARX(x) CHAR_getInt(x,CHAR_X) +#define MAP_CHARY(x) CHAR_getInt(x,CHAR_Y) + +BOOL MAP_getMapDataFromCharIndex( int index , int* map ) +{ + int mapdata[2]; + int ret; + + ret = MAP_getTileAndObjData(MAP_CHARFLOOR(index), + MAP_CHARX(index), + MAP_CHARY(index), + &mapdata[0],&mapdata[1] ); + map[0] = mapdata[0]; + map[1] = mapdata[1]; + return ret; +} + +BOOL MAP_getMapDataFromFXY( int f , int x , int y, int* map ) +{ + int mapdata[2]; + int ret; + + ret = MAP_getTileAndObjData(f,x,y,&mapdata[0],&mapdata[1] ); + map[0] = mapdata[0]; + map[1] = mapdata[1]; + return ret; +} + diff --git a/gmsv/map/map_warppoint.c b/gmsv/map/map_warppoint.c new file mode 100644 index 0000000..17228b8 --- /dev/null +++ b/gmsv/map/map_warppoint.c @@ -0,0 +1,283 @@ +#include "version.h" + +#include +#include "common.h" +#include "char.h" +#include "char_base.h" +#include "object.h" +#include "buf.h" +#include "util.h" +#include "configfile.h" +#include "readmap.h" +#include "map_warppoint.h" + +#ifdef _MAP_WARPPOINT +#define MAP_MAXWARPPOINT 5000 + +typedef struct _tagMAPwarpPoints{ + int use; + int ofloor; + int ox; + int oy; + + int floor; + int x; + int y; + int type; +}_MAPwarpPoints; + +_MAPwarpPoints *MapWarppoint; +static int MapWarpPoints=0; +char PointType[3][256]={ "NONE", "FREE", "ERROR"}; + +char Filename[256]; +int MAPPOINT_InitMapWarpPoint() +{ + MapWarppoint = ( _MAPwarpPoints *)calloc( 1, sizeof( struct _tagMAPwarpPoints)*MAP_MAXWARPPOINT); + if( MapWarppoint == NULL ) return 0; + + sprintf(Filename, "%s/mapwarp.txt", getMapdir()); + MAPPOINT_resetMapWarpPoint( 0); + return MAP_MAXWARPPOINT; +} +/* +void MAPPOINT_checkMapWarpPoint( int floor, int x, int y) +{ + OBJECT object; + + for( object = MAP_getTopObj(fl,x,y) ; object ; + object = NEXT_OBJECT(object) ){ + int o = GET_OBJINDEX(object); + if( OBJECT_getType(o) == OBJTYPE_WARPPOINT){ + if( !MAPPOINT_CHECKINDEX( OBJECT_getIndex( o)) ) continue; + if( OBJECT_getchartype( o) != event ) continue; + MAPPOINT_MapWarpHandle( charaindex, OBJECT_getIndex( o), fl, x, y ); + found = TRUE; + break; + } + +} +*/ +void MAPPOINT_resetMapWarpPoint( int flg) +{ + int i; + if( MapWarppoint == NULL ) return; + for( i=0; i= MAP_MAXWARPPOINT ) + return FALSE; + + return MapWarppoint[ ps].use; +} + +int MAPPOINT_getMPointEVType( int ps) +{ + if( !MAPPOINT_CHECKINDEX( ps) ) + return -1; + return MapWarppoint[ ps].type; +} + +int MAPPOINT_setMapWarpFrom( int ps, char *buf) +{ + char buf1[256]; + + if( MAPPOINT_CHECKINDEX( ps) ){ + print(" 放置传送点从 %s 获得!!\n", buf); + return -1; + } + + memset( buf1, 0, sizeof( buf1)); + if( getStringFromIndexWithDelim( buf, ",", 1, buf1, sizeof(buf1)) ==FALSE ) return -1;//原点 + MapWarppoint[ps].ofloor = atoi( buf1); + if( getStringFromIndexWithDelim( buf, ",", 2, buf1, sizeof(buf1)) ==FALSE ) return -1;//原点 + MapWarppoint[ps].ox = atoi( buf1); + if( getStringFromIndexWithDelim( buf, ",", 3, buf1, sizeof(buf1)) ==FALSE ) return -1;//原点 + MapWarppoint[ps].oy = atoi( buf1); + return 1; +} + +int MAPPOINT_setMapWarpGoal( int ps, char *buf) +{ + char buf1[256]; + if( MAPPOINT_CHECKINDEX( ps) ){ + print(" 放置传送点获得 :%s!!\n", buf); + return -1; + } + + memset( buf1, 0, sizeof( buf1)); + if( getStringFromIndexWithDelim( buf, ",", 1, buf1, sizeof(buf1)) ==FALSE ) return -1;//原点 + MapWarppoint[ps].floor = atoi( buf1); + if( getStringFromIndexWithDelim( buf, ",", 2, buf1, sizeof(buf1)) ==FALSE ) return -1;//原点 + MapWarppoint[ps].x = atoi( buf1); + if( getStringFromIndexWithDelim( buf, ",", 3, buf1, sizeof(buf1)) ==FALSE ) return -1;//原点 + MapWarppoint[ps].y = atoi( buf1); + return 1; +} + +int MAPPOINT_getMapWarpGoal( int ps, int ofl, int ox, int oy, int *fl, int *x, int *y) +{ + if( !MAPPOINT_CHECKINDEX( ps) ){ + print("获取传送点PS:%d 错误!!\n", ps); + return -1; + } + + if( MapWarppoint[ps].ofloor != ofl || + MapWarppoint[ps].ox != ox || MapWarppoint[ps].oy != oy ){ + print( "不正常传送点: 旧的有问题传送点 %d %d %d !!\n" , ofl,ox,oy ); + return -1; + } + //可加判断条件 + if( MAP_IsValidCoordinate( MapWarppoint[ps].floor, MapWarppoint[ps].x, MapWarppoint[ps].y)== FALSE ){ + print( "不正常传送点:有问题 %d %d %d !!\n" , + MapWarppoint[ps].floor,MapWarppoint[ps].x, MapWarppoint[ps].y ); + return -1; + } + *fl = MapWarppoint[ps].floor; + *x = MapWarppoint[ps].x; + *y = MapWarppoint[ps].y; + return 1; +} + +int MAPPOINT_loadMapWarpPoint( ) +{ + int i=0, ps=0, objtype; + FILE *fp=NULL; + char buf[256], buf1[256]; + + if( Filename == NULL ) return -1; + fp = fopen( Filename, "r"); + if( fp == NULL ){ + return 0; + } + while( fgets( buf, sizeof( buf)-1, fp) != NULL ){ + if( strstr( buf, "#") != 0 ) continue; + if( getStringFromIndexWithDelim( buf, ":", 1, buf1, sizeof(buf1)) ==FALSE ) + continue; + for( i=0; i= arraysizeof( PointType) ){ + print(" 1.map 传送点错误 %s \n", buf); + continue; + } + MapWarppoint[ps].type = i; + if( getStringFromIndexWithDelim( buf, ":", 2, buf1, sizeof(buf1)) ==FALSE ) continue; + objtype = CHAR_EVENT_WARP; + if( !strcmp( buf1, "NULL")){ + }else if( !strcmp( buf1, "M")){ + objtype = CHAR_EVENT_WARP_MORNING; + }else if( !strcmp( buf1, "N")){ + objtype = CHAR_EVENT_WARP_NIGHT; + }else if( !strcmp( buf1, "A")){ + objtype = CHAR_EVENT_WARP_NOON; + } + memset( buf1, 0, sizeof(buf1)); + if( getStringFromIndexWithDelim( buf, ":", 3, buf1, sizeof(buf1)) ==FALSE )continue; + + if( MAPPOINT_setMapWarpFrom( ps, buf1) == -1){ + print(" 2-1.map 传送点错误 %s [%s] \n", buf, buf1); + continue; + } + if( MAPPOINT_creatMapWarpObj( ps, buf1, objtype) == -1 ){ + print(" 2.map 传送点错误 %s [%s] \n", buf, buf1); + continue; + } + memset( buf1, 0, sizeof(buf1)); + if( getStringFromIndexWithDelim( buf, ":", 4, buf1, sizeof(buf1)) ==FALSE ){ + print(" 3.map 传送点错误 %s [%s] \n", buf, buf1); + continue; + } + if( MAPPOINT_setMapWarpGoal( ps, buf1) == -1 ){ + print(" 4.map 传送点错误 %s \n", buf); + continue; + } + memset( buf1, 0, sizeof(buf1)); + if( getStringFromIndexWithDelim( buf, ":", 5, buf1, sizeof(buf1)) ==FALSE ){ + print(" 5.map 传送点错误 %s [%s] \n", buf, buf1); + continue; + } + MapWarppoint[ps].use = 1; + MapWarpPoints++; + ps++; + if( ps >= MAP_MAXWARPPOINT ){ + break; + } + } + //andy_log + print("初始化 %d 地图传送点...", MapWarpPoints); + fclose( fp); + print("完成\n"); + return 1; +} + +void MAPPOINT_MapWarpHandle( int charaindex, int ps, int ofl, int ox, int oy ) +{ + int floor, x, y; + if( MAPPOINT_getMapWarpGoal( ps, ofl, ox, oy, &floor, &x, &y) == -1 ){ + //andy_log + print( "获取传送点( %d, %d,%d,%d)错误!!\n", ps, ofl, ox, oy); + return; + } + if( floor == 777 ) return; + CHAR_warpToSpecificPoint( charaindex, floor, x, y); + if( CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE ) == CHAR_PARTY_LEADER ) { + int i; + for( i = 1; i < CHAR_PARTYMAX; i ++ ) { + int index = CHAR_getWorkInt( charaindex, i + CHAR_WORKPARTYINDEX1); + if( CHAR_CHECKINDEX(index) ) { + CHAR_warpToSpecificPoint( index, floor, x, y); + } + } + } +} +#endif + + + diff --git a/gmsv/map/readmap.c b/gmsv/map/readmap.c new file mode 100644 index 0000000..e13d971 --- /dev/null +++ b/gmsv/map/readmap.c @@ -0,0 +1,1453 @@ +#include "version.h" +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "common.h" +#include "object.h" +#include "readmap.h" +#include "buf.h" +#include "util.h" +#include "char.h" +#include "lssproto_serv.h" +#include "configfile.h" + +#define MAP_MAGIC "LS2MAP" + +static void MAP_makeDefaultImageData( MAP_ImageData* one ) +{ + one->data[MAP_WALKABLE] = TRUE; + one->data[MAP_HAVEHEIGHT] = FALSE; + one->data[MAP_DEFENCE] = 0; + one->data[MAP_INTODAMAGE] = 0; + one->data[MAP_OUTOFDAMAGE] = 0; + + one->data[MAP_SETED_BATTLEMAP] = 0; + one->data[MAP_BATTLEMAP] = 0; + one->data[MAP_BATTLEMAP2] = 0; + one->data[MAP_BATTLEMAP3] = 0; + one->data[MAP_INTODARKNESS] = 0; + one->data[MAP_INTOCONFUSION] = 0; + + one->data[MAP_OUTOFPOISON] = 0; + one->data[MAP_OUTOFPARALYSIS] = 0; + one->data[MAP_OUTOFSILENCE] = 0; + one->data[MAP_OUTOFSTONE] = 0; + one->data[MAP_OUTOFDARKNESS] = 0; + one->data[MAP_OUTOFCONFUSION] = 0; + +} + +static int MAP_flgSet( char* string ) +{ + int tmp; + tmp = atoi(string); + if( tmp == 0 ) + return 0; + return 1; +} +typedef enum +{ + MAP_INTENTRY=0, + MAP_CHARENTRY=1, + MAP_INTFUNC=2, + MAP_CHARFUNC=3, +}MAP_DATATYPECATEGORY; +static struct MAP_itemconfentry +{ + int type; + int index; + void* func; +}MAP_confentries[MAP_DATAINT_NUM+MAP_DATACHAR_NUM]={ + {MAP_INTENTRY, MAP_WALKABLE, MAP_flgSet}, + {MAP_INTENTRY, MAP_HAVEHEIGHT, MAP_flgSet}, + {MAP_INTENTRY, MAP_DEFENCE, NULL}, + {MAP_INTENTRY, MAP_INTODAMAGE, NULL}, + {MAP_INTENTRY, MAP_OUTOFDAMAGE, NULL}, + + {MAP_INTENTRY, MAP_SETED_BATTLEMAP, NULL}, + {MAP_INTENTRY, MAP_BATTLEMAP, NULL}, + {MAP_INTENTRY, MAP_BATTLEMAP2, NULL}, + {MAP_INTENTRY, MAP_BATTLEMAP3, NULL}, + {MAP_INTENTRY, MAP_INTODARKNESS, NULL}, + {MAP_INTENTRY, MAP_INTOCONFUSION, NULL}, + + {MAP_INTENTRY, MAP_OUTOFPOISON, NULL}, + {MAP_INTENTRY, MAP_OUTOFPARALYSIS, NULL}, + {MAP_INTENTRY, MAP_OUTOFSILENCE, NULL}, + {MAP_INTENTRY, MAP_OUTOFSTONE, NULL}, + {MAP_INTENTRY, MAP_OUTOFDARKNESS, NULL}, + {MAP_INTENTRY, MAP_OUTOFCONFUSION, NULL}, + +}; + +static MAP_ImageData* MAP_imagedata; +static unsigned int MAP_imagedatanum; +static int MAP_imgfilt[65535]; + +BOOL MAP_readMapConfFile( char* filename ) +{ + FILE* file; + char line[512]; + int maximagenumber=0; + int i; + int linenum=0; + int imgdataindex=0; + + file = fopen( filename , "r" ); + if( file == NULL ){ + fprint( "无法打开文件 %s\n", filename ); + return FALSE; + } + while( fgets( line , sizeof( line ) , file ) ){ + char imgnum[16]; + BOOL ret; + int imgnumber; + deleteSequentChar( line, " \t" ); + pohcd( line, " \t" ); + dchop(line, " \t"); + + if( line[0] == '#' )continue; + if( line[0] == '\n' )continue; + chomp( line ); + ret = getStringFromIndexWithDelim( line , " " , 1 , imgnum , sizeof( imgnum ) ); + if( ret == FALSE )continue; + imgnumber = atoi(imgnum); + maximagenumber = max( maximagenumber , imgnumber ); + } + + MAP_imagedatanum = maximagenumber + 1; + MAP_imagedata=allocateMemory(sizeof(MAP_ImageData)*MAP_imagedatanum); + if( MAP_imagedata == NULL ){ + fprint("无法分配地图数据大小=%d\n",MAP_imagedatanum); + return FALSE; + } + for( i = 0; i data[MAP_confentries[i].index] + = atoi( token ); + break; + case MAP_CHARENTRY: + strcpysafe( one->string[MAP_confentries[i].index].string, + sizeof( one->string[MAP_confentries[i].index]. + string), + token); + break; + case MAP_INTFUNC: + { + int (*intfunction)(char* ); + intfunction = MAP_confentries[i].func; + one->data[MAP_confentries[i].index] + = intfunction(token); + break; + } + case MAP_CHARFUNC: + { + char* (*charfunction)(char* ); + charfunction = MAP_confentries[i].func; + + strcpysafe( one->string[MAP_confentries[i].index].string, + sizeof(one->string[MAP_confentries[i].index]. + string), + charfunction(token)); + break; + } + default: + break; + } + } + } + + fclose( file ); + return TRUE; +} + + + + + + + +#if 1 +BOOL MAP_readBattleMapConfFile( char* filename ) +{ + FILE* file; + char line[512]; + + int i, j; + int linenum=0; + int BattleMapNo[3], iRet, iWork, iPre[3],iFirst, iLast; + + file = fopen( filename , "r" ); + if( file == NULL ){ + fprint( "无法打开 %s\n", filename ); + return FALSE; + } + + BattleMapNo[0] = 0; + BattleMapNo[1] = 0; + BattleMapNo[2] = 0; + while( fgets( line , sizeof( line ) , file ) ){ + char *p; + linenum++; + + pohcd( line, " \t" ); + dchop(line, " \t"); + + if( line[0] == '#' )continue; + if( line[0] == '\n' )continue; + chomp( line ); + + if( line[0] == '$' ){ + iRet = sscanf( line+1, "%d %d %d", &iPre[0], &iPre[1], &iPre[2] ); + BattleMapNo[0] = BattleMapNo[1] = BattleMapNo[2] = iPre[0]; + if( iRet < 1 ){ + print( "!!!!!错误 无法读取战斗地图(%s)( line %d )\n", filename, linenum ); + } + for( i = 0; i < iRet; i ++ ){ + BattleMapNo[i] = iPre[i]; + if( BattleMapNo[i] < 0 ){ + print( "!!!!!错误 战斗地图号码为负值 (%s)( line %d )\n", filename, linenum ); + } + } + + continue; + + } + if( sscanf( line, "%d", &iWork ) != 1 ){ + continue; + } + if( iWork < 0 ){ + print( "!!!!!错误 金钱号码为负值 (%s)( line %d )\n", filename, linenum ); + continue; + } + iFirst = iWork; + p = strstr( line, "to" ); + if( p != NULL ){ + if( sscanf( p+2, "%d", &iWork ) != 1 ){ + iLast = iFirst; + }else{ + iLast = iWork; + } + if( iWork < 0 ){ + print( "!!!!!错误 金钱号码为负值 (%s)( line %d )\n", filename, linenum ); + continue; + } + }else{ + iLast = iFirst; + } + + for( i = iFirst; i <= iLast; i ++ ){ + if( MAP_getImageInt( i, MAP_SETED_BATTLEMAP ) > 0 ){ + print( "!!!!!错误 相同金钱重复设定了两次(%s)( line %d )(%d)(%d & %d)\n", + filename, linenum, i, + MAP_getImageInt( i, MAP_BATTLEMAP ), + BattleMapNo[0] ); + } + + // 飓 寞恳仄中井" + if( IsValidImagenumber( i ) == FALSE ){ + continue; + } + MAP_setImageInt( i, MAP_BATTLEMAP, BattleMapNo[0] ); + MAP_setImageInt( i, MAP_BATTLEMAP2, BattleMapNo[1] ); + MAP_setImageInt( i, MAP_BATTLEMAP3, BattleMapNo[2] ); + MAP_setImageInt( i, MAP_SETED_BATTLEMAP, 1 ); + } + + } + fclose( file ); + + for( j = 0; j < arraysizeof( MAP_imgfilt ); j ++ ){ + if( MAP_imgfilt[j] == -1 )continue; + if( MAP_getImageInt( j, MAP_SETED_BATTLEMAP ) == 0 ){ + print( "!!!!!错误 金钱(%d)尚未设定 (%s)\n", j, filename ); + } + } + return TRUE; +} +#endif + +BOOL IsValidImagenumber( int imagenumber ) +{ + if( imagenumber < 0 || imagenumber >= arraysizeof( MAP_imgfilt ) ) + return FALSE; + + if( MAP_imgfilt[imagenumber] == -1 ) + return FALSE; + return TRUE; +} + +int MAP_getImageInt( int imagenumber, int element ) +{ + if( imagenumber < 0 || imagenumber >= arraysizeof( MAP_imgfilt )) + return FALSE; + + if( MAP_imgfilt[imagenumber] == -1 )return FALSE; + return MAP_imagedata[MAP_imgfilt[imagenumber]].data[element]; +} + +BOOL MAP_setImageInt( int imagenumber, int element, int value ) +{ + if( imagenumber < 0 || imagenumber >= arraysizeof( MAP_imgfilt )) + return FALSE; + + if( MAP_imgfilt[imagenumber] == -1 )return FALSE; + MAP_imagedata[MAP_imgfilt[imagenumber]].data[element] = value; + + return TRUE; +} + +static MAP_Map* MAP_map; +static unsigned int MAP_mapnum; +static unsigned int MAP_mapnum_index; + + +static int* MAP_idjumptbl; +static int MAP_idtblsize; + +BOOL MAP_initMapArray( int num ) +{ + MAP_mapnum = num ; + + MAP_map = allocateMemory( sizeof( MAP_Map ) * MAP_mapnum ); + if( MAP_map == NULL )return FALSE; + + MAP_mapnum_index = 0; + + return TRUE; +} + +void MAP_endMapArray( void ) +{ + int i; + for( i = 0 ; i < MAP_mapnum ; i ++ ){ + if( MAP_map[i].tile != NULL ) + freeMemory( MAP_map[i].tile ); + + if( MAP_map[i].obj != NULL) + freeMemory( MAP_map[i].obj ); + + } + MAP_mapnum = 0; + MAP_mapnum_index = 0; + freeMemory( MAP_map ); + MAP_map = NULL; +} + +static BOOL MAP_IsMapFile( char* filename ) +{ + FILE* f; + char buf[16]; + int ret; + + f = fopen(filename, "r"); + if( f == NULL ){ + errorprint; + return FALSE; + } + + ret = fread( buf , sizeof( char ) , 6 , f); + if( ret != 6 ) + goto FCLOSERETURNFALSE; + buf[ret] = '\0'; + + if( strcmp( buf , MAP_MAGIC ) != 0 ) + goto FCLOSERETURNFALSE; + else + goto FCLOSERETURNTRUE; + +FCLOSERETURNFALSE: + fclose(f); + return FALSE; +FCLOSERETURNTRUE: + fclose(f); + return TRUE; +} + +static BOOL MAP_readMapOne( char* filename ) +{ + FILE* f; /* 白央奶伙 */ + char buf[16]; /* 穴斥永弁瓜件田□ 心迕 */ + short data[1024]; /* 扑亦□玄 心迕田永白央 */ + int ret; /* 忒曰袄熬仃潸曰迕 */ + int i; /* 伙□皿 醒 */ + int mapindex; + + int id=0,xsiz=0,ysiz=0; /* 穴永皿犯□正及域凛伞 桦赭 */ + + short *tile=NULL; + short *obj=NULL; + MAP_Objlink** olink=NULL; + char showstring[32]; /* 穴永皿犯□正及域凛伞 桦赭 */ + struct stat filestat; /* 民尼永弁迕卞银丹 */ + BOOL invaliddata=FALSE; + if( MAP_mapnum_index >= MAP_mapnum ){ + fprint( "这里没有足够空间装载地图数组.\n" ); + return FALSE; + } + mapindex=MAP_mapnum_index; + f = fopen(filename, "r"); + if( f == NULL ){ + errorprint; + return FALSE; + } + if( fstat( fileno(f) , &filestat ) != 0 ){ + errorprint; + goto FCLOSERETURNFALSE; + } + + ret = fread( buf , sizeof( char ) , 6 , f); + if( ret != 6 ){ + errorprint; + goto FCLOSERETURNFALSE; + } + buf[ret] = '\0'; + + if( strcmp( buf , MAP_MAGIC ) != 0 ) + goto FCLOSERETURNFALSE; + ret = fread( data , sizeof( short ) , 1 , f); + if( ret != 1 ){ + errorprint; + goto FCLOSERETURNFALSE; + } + id = ntohs( data[0] ); + + ret = fread( showstring , sizeof(char), arraysizeof(showstring), f); + if( ret != arraysizeof(showstring) ){ + errorprint; + goto FCLOSERETURNFALSE; + } + showstring[arraysizeof(showstring)-1] = '\0'; + ret = fread( data, sizeof( short ) , 1 , f); + if( ret != 1 ){ + errorprint; + goto FCLOSERETURNFALSE; + } + xsiz = ntohs( data[0] ); + ret = fread( data, sizeof( short ) , 1 , f); + if( ret != 1 ){ + errorprint; + goto FCLOSERETURNFALSE; + } + ysiz = ntohs( data[0] ); + tile = allocateMemory( sizeof( short ) * xsiz * ysiz ); + if( tile == NULL ){ + fprint( "无法分配内存给头衔名称:%s xsiz:%d ysiz:%d\n", filename, xsiz, ysiz); + goto FREEOBJHP; + } + + obj = allocateMemory( sizeof( short ) * xsiz * ysiz ); + if( obj == NULL ){ + fprint( "无法分配内存给对象\n"); + goto FREETILE; + } + + olink = allocateMemory( sizeof(MAP_Objlink*) * xsiz * ysiz ); + if( olink == NULL ){ + fprint( "无法分配内存给链接\n"); + goto FREEOBJ; + } + + ret = fread( tile , sizeof( short )*xsiz*ysiz,1,f ); + if( ret != 1 ){ + errorprint; + goto FREELINK; + } + for( i = 0 ; i < xsiz * ysiz ; i ++ ) + tile[i] = ntohs( tile[i] ); + for( i = 0 ; i < xsiz * ysiz ; i ++ ){ + if( !IsValidImagenumber( tile[i] ) ){ + fprint( + "地图的图片有问题:%d x:%d y:%d 数量:%d\n", + id, i % xsiz, (int)(i / xsiz) , tile[i]); + invaliddata = TRUE; + } + } + ret = fread( obj , sizeof( short )*xsiz*ysiz,1,f ); + if( ret != 1 ){ + errorprint; + goto FREELINK; + } + for( i = 0 ; i < xsiz * ysiz ; i ++ ) + obj[i] = ntohs( obj[i] ); + for( i = 0 ; i < xsiz * ysiz ; i ++ ){ + if( !IsValidImagenumber( obj[i] ) ){ + fprint( + "地图的图片有问题:%d x:%d y:%d 数量:%d\n", + id, i % xsiz, (int)(i / xsiz) , obj[i]); + invaliddata = TRUE; + } + } + if( invaliddata )goto FREELINK; + if( ftell(f) != filestat.st_size) + fprintf(stderr,"文件大小不正确(%s). 目标文件大小:%" +#ifdef linux + "l" +#elif __FreeBSD__ + "ll" +#endif + "d 实际大小:%ld\n", + filename, filestat.st_size,ftell(f)); + + for( i=0 ; i< xsiz*ysiz ; i ++ ) + olink[i] = NULL; + + MAP_map[mapindex].id = id; + MAP_map[mapindex].xsiz = xsiz; + MAP_map[mapindex].ysiz = ysiz; + strcpysafe( MAP_map[mapindex].string , + sizeof(MAP_map[mapindex].string), + showstring ); + MAP_map[mapindex].tile = tile; + MAP_map[mapindex].obj = obj; + MAP_map[mapindex].olink = olink; +#ifdef _MAP_NOEXIT + { + FILE *fp; + char mpexit[128]; + int floorID=0,exfloor=0,ex_X=0,ex_Y=0; + int map_type=0; + MAP_map[mapindex].startpoint = 0; + fp = fopen( "./data/map/map_noexit.txt","r"); + if( fp != NULL ){ + while( fgets(mpexit, 128, fp) != NULL ) { + sscanf( mpexit,"%d %d %d %d %d", &floorID, &exfloor, &ex_X, &ex_Y, &map_type); + if( strstr( mpexit, "#" ) != NULL) + continue; + if( floorID == id) { + MAP_map[mapindex].startpoint = (exfloor<<16)+(ex_X << 8)+(ex_Y<<0); + MAP_map[mapindex].MapType = map_type; + } + } + // Nuke 1204: Bug fix + fclose(fp); + }else { + print("\n **错误** 找不到 map_noexit.txt 文件!!!"); + } + } +#endif + goto FCLOSERETURNTRUE; + +FCLOSERETURNTRUE: + MAP_mapnum_index++; + fclose(f); + return TRUE; + +FREELINK: + freeMemory( olink ); +FREEOBJ: + freeMemory( obj ); +FREETILE: + freeMemory( tile ); +FREEOBJHP: +FCLOSERETURNFALSE: + fclose(f); + return FALSE; +} +#ifdef _MAP_NOEXIT +unsigned int MAP_getExFloor_XY( int floor, int *map_type) +{ + int i; + int exfloor; + for( i=0; i 0 ) { + exfloor = (MAP_map[i].startpoint>>16)&0xffffff; + if( exfloor >= 0 ) { + *map_type = MAP_map[i].MapType; + return MAP_map[i].startpoint ; + } + } + } + } + return 0; +} +BOOL CHECKFLOORID( id) +{ + int i; + + if( id < 0 ) + return FALSE; + + for( i=0; i MAP_getfloorX(mapid) || + y < 0 || y > MAP_getfloorY(mapid)) + return FALSE; + + return TRUE; +} + +#define MAP_GETMAXSIZE 45 +static char MAP_dataString[STRINGBUFSIZ*3]; +static int MAP_workdatabuffer[MAP_GETMAXSIZE*MAP_GETMAXSIZE]; +#define MAP_DATADELIMITER "," + +char* MAP_getdataFromRECT( int floor, RECT* seekr, RECT* realr ) +{ + int floorindex; + int stringlength=0; + char tmpbuffer[128]; + int i,j; + int floorx; + int databufferindex=0; + RECT scr; + char escapebuffer[128]; + + floorindex = MAP_getfloorIndex( floor ); + if( floorindex == -1 ) { + print( "%s:%d:err\n", __FILE__, __LINE__); + return NULL; + } + if( seekr->width < 0 || seekr->height < 0 || + MAP_GETMAXSIZE < seekr->width || MAP_GETMAXSIZE < seekr->height ){ + print( "%s:%d:err\n", __FILE__, __LINE__); + return NULL; + } + snprintf( tmpbuffer,sizeof(tmpbuffer), + "%s|" , + makeEscapeString( MAP_map[floorindex].string, + escapebuffer,sizeof(escapebuffer))); + + strcpysafe( MAP_dataString, sizeof( MAP_dataString ), tmpbuffer ); + stringlength = strlen( tmpbuffer ); + + floorx = MAP_map[floorindex].xsiz; + scr.x = 0; + scr.y = 0; + scr.width = floorx; + scr.height= MAP_map[floorindex].ysiz; + + if( clipRect( seekr,&scr,realr ) == FALSE ){ + realr->x=realr->y=realr->width=realr->height=0; + return MAP_dataString; + } + for( i = realr->y ; i < realr->y + realr->height ; i ++ ){ + for( j = realr->x ; j < realr->x + realr->width ; j ++ ){ + MAP_workdatabuffer[databufferindex++] + = MAP_map[floorindex].tile[i*floorx+j]; + } + } + for( i = 0 ; i < databufferindex ; i ++ ){ + char buf[64]; + snprintf( tmpbuffer,sizeof(tmpbuffer),"%s" MAP_DATADELIMITER , + cnv10to62( MAP_workdatabuffer[i], buf, sizeof( buf)) ); + strcpysafe( &MAP_dataString[stringlength] , + sizeof( MAP_dataString ) - stringlength, + tmpbuffer ); + stringlength += strlen( tmpbuffer ); + } + if( stringlength < sizeof( MAP_dataString ) ) + MAP_dataString[stringlength-1] = NONCHAR_DELIMITER[0]; + databufferindex=0; + for( i = realr->y ; i < realr->y + realr->height ; i ++ ){ + for( j = realr->x ; j < realr->x + realr->width ; j ++ ){ + MAP_workdatabuffer[databufferindex++] + = MAP_map[floorindex].obj[i*floorx+j]; + } + } + for( i = 0 ; i < databufferindex ; i ++ ){ + char buf[64]; + if( MAP_workdatabuffer[i] == 0 ) buf[0] = '\0'; + else cnv10to62( MAP_workdatabuffer[i], buf, sizeof( buf)); + snprintf( tmpbuffer,sizeof(tmpbuffer),"%s" MAP_DATADELIMITER , + buf ); + strcpysafe( &MAP_dataString[stringlength] , + sizeof( MAP_dataString ) - stringlength, + tmpbuffer ); + stringlength += strlen( tmpbuffer ); + } + + if( stringlength < sizeof( MAP_dataString ) ) + MAP_dataString[stringlength-1] = NONCHAR_DELIMITER[0]; + + databufferindex=0; + for( i = realr->y ; i < realr->y + realr->height ; i ++ ){ + for( j = realr->x ; j < realr->x + realr->width ; j ++ ){ + OBJECT object; + BOOL found = FALSE; + for( object = MAP_getTopObj(floor,j,i) ; object ; + object = NEXT_OBJECT(object) ){ + int o = GET_OBJINDEX(object); + if( OBJECT_getType(o) == OBJTYPE_CHARA ){ + int etype; + int charaindex=OBJECT_getIndex(o); + if( !CHAR_CHECKINDEX(charaindex) )continue; + etype = CHAR_getWorkInt( charaindex, CHAR_WORKEVENTTYPE); + if( etype != CHAR_EVENT_NONE ) { + MAP_workdatabuffer[databufferindex++] = etype; + found = TRUE; + break; + } + } +#ifdef _MAP_WARPPOINT + else if( OBJECT_getType(o) == OBJTYPE_WARPPOINT ){ + int etype = OBJECT_getchartype( o); + if( etype != CHAR_EVENT_NONE ) { + MAP_workdatabuffer[databufferindex++] = (unsigned short)etype; + found = TRUE; + break; + } + } +#endif + } + if( !found ) { + MAP_workdatabuffer[databufferindex++] + = CHAR_EVENT_NONE; + } + } + } + for( i = 0 ; i < databufferindex ; i ++ ){ + char buf[64]; + if( MAP_workdatabuffer[i] == 0 ) buf[0] = '\0'; + else cnv10to62( MAP_workdatabuffer[i], buf, sizeof( buf)); + + snprintf( tmpbuffer,sizeof(tmpbuffer),"%s" MAP_DATADELIMITER, buf); + strcpysafe( &MAP_dataString[stringlength] , + sizeof( MAP_dataString ) - stringlength, tmpbuffer ); + stringlength += strlen( tmpbuffer ); + } + dchop( MAP_dataString, MAP_DATADELIMITER ); + return MAP_dataString; +} + +char *MAP_getChecksumFromRECT( int floor, RECT* seekr, RECT* realr, + int *tilesum, int *objsum, int *eventsum ) +{ + int floorindex; + int i,j; + int floorx; + int databufferindex=0; + RECT scr; + char escapebuffer[128]; + unsigned short eventbuf[MAP_CHAR_DEFAULTSEESIZ * MAP_CHAR_DEFAULTSEESIZ]; + unsigned short tilebuf[ MAP_CHAR_DEFAULTSEESIZ * MAP_CHAR_DEFAULTSEESIZ]; + unsigned short objbuf[ MAP_CHAR_DEFAULTSEESIZ * MAP_CHAR_DEFAULTSEESIZ]; + + floorindex = MAP_getfloorIndex( floor ); + if( floorindex == -1 ) return NULL; + if( seekr->width < 0 || seekr->height < 0 || + MAP_GETMAXSIZE < seekr->width || MAP_GETMAXSIZE < seekr->height ) + return NULL; + + strcpysafe( MAP_dataString, sizeof( MAP_dataString ), + makeEscapeString( MAP_map[floorindex].string, + escapebuffer,sizeof(escapebuffer))); + + floorx = MAP_map[floorindex].xsiz; + scr.x = 0; + scr.y = 0; + scr.width = floorx; + scr.height= MAP_map[floorindex].ysiz; + + if( clipRect( seekr,&scr,realr ) == FALSE ){ + realr->x=realr->y=realr->width=realr->height=0; + return MAP_dataString; + } + + *tilesum = 0; + *objsum =0; + *eventsum = 0; + memset( tilebuf, 0, sizeof( tilebuf)); + memset( objbuf, 0, sizeof( objbuf)); + memset( eventbuf, 0, sizeof( eventbuf)); + for( i = realr->y ; i < realr->y + realr->height ; i ++ ){ + for( j = realr->x ; j < realr->x + realr->width ; j ++ ){ + OBJECT object; + //BOOL found = FALSE; + for( object = MAP_getTopObj(floor,j,i) ; object ; + object = NEXT_OBJECT(object) ){ + int o = GET_OBJINDEX(object); + if( OBJECT_getType(o) == OBJTYPE_CHARA ){ + int etype; + int charaindex=OBJECT_getIndex(o); + if( !CHAR_CHECKINDEX(charaindex) )continue; + etype = CHAR_getWorkInt( charaindex, CHAR_WORKEVENTTYPE); + if( etype != CHAR_EVENT_NONE ) { + eventbuf[databufferindex] = (unsigned short)etype; + break; + } + } +#ifdef _MAP_WARPPOINT + else if( OBJECT_getType(o) == OBJTYPE_WARPPOINT ){ + int etype = OBJECT_getchartype( o); + if( etype != CHAR_EVENT_NONE ) { + eventbuf[databufferindex] = (unsigned short)etype; + break; + } + } +#endif + } + tilebuf[databufferindex] = (unsigned short)MAP_map[floorindex].tile[i*floorx+j]; + objbuf[databufferindex] = (unsigned short)MAP_map[floorindex].obj[i*floorx+j]; + databufferindex++; + } + } + *tilesum = CheckCRC( (unsigned char*)tilebuf, sizeof( tilebuf)); + *objsum = CheckCRC( (unsigned char*)objbuf, sizeof( objbuf)); + *eventsum = CheckCRC( (unsigned char*)eventbuf, sizeof( eventbuf)); + + return MAP_dataString; +} + +BOOL MAP_getTileAndObjData( int ff ,int fx, int fy, int* tile, int* obj) +{ + int floorindex,xsiz; + floorindex = MAP_getfloorIndex( ff ); + if( floorindex == -1 ) { + print( "%s:%d:err\n", __FILE__, __LINE__); + return FALSE; + } + xsiz = MAP_map[floorindex].xsiz; + + if( fx < 0 || fx >= xsiz ) { + return FALSE; + } + if( fy < 0 || fy >= MAP_map[floorindex].ysiz ) { + return FALSE; + } + + if( tile ) + *tile = MAP_map[floorindex].tile[fy*xsiz+fx]; + if( obj ) + *obj = MAP_map[floorindex].obj[fy*xsiz+fx]; + + return TRUE; +} + +BOOL MAP_setTileAndObjData( int ff ,int fx, int fy, int tile, int obj) +{ + int floorindex,xsiz; + floorindex = MAP_getfloorIndex( ff ); + if( floorindex == -1 ) { + print( "%s:%d:err\n", __FILE__, __LINE__); + return FALSE; + } + xsiz = MAP_map[floorindex].xsiz; + if( fx < 0 || fx >= xsiz ) { + return FALSE; + } + if( fy < 0 || fy >= MAP_map[floorindex].ysiz ) { + return FALSE; + } + if( tile != -1 ) + MAP_map[floorindex].tile[fy*xsiz+fx] = tile; + if( obj != -1) + MAP_map[floorindex].obj[fy*xsiz+fx] = obj; + return TRUE; +} + +BOOL MAP_initReadMap( char* maptilefile , char* mapdir ) +{ + print("\n"); + if( !MAP_readMapConfFile(maptilefile) ) + return FALSE; + if( !MAP_readBattleMapConfFile( getBattleMapfile( ) ) ) + return FALSE; + if( !MAP_readMapDir(mapdir) ) + return FALSE; + return TRUE; +} + +static int MAP_coKindAndInt[MAP_KINDNUM]= +{ + MAP_WALKABLE, +}; + +BOOL MAP_makeVariousMap(char* atile, char* aobj, int floor, int startx, + int starty, int xsiz, int ysiz, MAP_kind kind ) +{ + int i,j; + int findex; + int fxsiz; + int startpoint; + + if( atile == NULL || aobj == NULL || kind < 0 || kind >= MAP_KINDNUM ) { + print( "%s:%d:err\n", __FILE__, __LINE__); + return FALSE; + } + findex = MAP_getfloorIndex( floor ); + if( findex == -1 ) { + print( "%s:%d:err\n", __FILE__, __LINE__); + return FALSE; + } + fxsiz = MAP_map[findex].xsiz; + startpoint = startx + starty * fxsiz ; + + for( i = 0 ; i < ysiz ; i ++ ){ + for( j = 0 ; j < xsiz ; j ++ ){ + atile[i*xsiz+j] = MAP_getImageInt( MAP_map[findex].tile[ + startpoint + i*xsiz + j],MAP_coKindAndInt[kind] ) + ? 1 : 0; + + aobj[i*xsiz+j] = MAP_getImageInt( MAP_map[findex].obj[ + startpoint + i*xsiz + j],MAP_coKindAndInt[kind] ) + ? 1 : 0; + } + } + return TRUE; +} + +BOOL MAP_makeWalkableMap( char* data, int floor, int startx, int starty, + int xsiz, int ysiz ) +{ + int i,j; + char* obj; + obj = allocateMemory(xsiz*ysiz*sizeof(char)); + if( obj == NULL )return FALSE; + + if( MAP_makeVariousMap( data, obj, floor, startx, starty, xsiz, ysiz, + MAP_KINDWALKABLE ) == FALSE ){ + freeMemory( obj ); + return FALSE; + } + + for( i = 0 ; i < ysiz ; i ++ ) + for( j = 0 ; j < xsiz ; j ++ ) + data[j+i*ysiz] = data[j+i*ysiz] & obj[j+i*ysiz]; + +#ifdef DEBUG + for( i = 0 ; i < ysiz ; i ++ ){ + for( j = 0 ; j < xsiz ; j ++ ) + if( data[j+i*ysiz] ){ + print(" "); + }else + print("O"); + print("\n"); + } +#endif /*DEBUG*/ + + return TRUE; +} + +BOOL MAP_IsThereSpecificFloorid( int floorid ) +{ + if( MAP_getfloorIndex(floorid)== -1)return FALSE; + else return TRUE; +} + +BOOL MAP_IsValidCoordinate( int floor, int x, int y ) +{ + if( MAP_IsThereSpecificFloorid(floor)==FALSE )return FALSE; + if( x < 0 || MAP_getfloorX(floor)<=x )return FALSE; + if( y < 0 || MAP_getfloorY(floor)<=y )return FALSE; + return TRUE; +} + +int MAP_attackSpecificPoint( int floor, int x, int y, int damage , + int charaindex ) +{ +#if 0 + int mapindex; + int xsiz; + int objimagenumber; + + mapindex = MAP_getfloorIndex(floor); + if( mapindex == -1 ) { + print( "%s:%d:err\n", __FILE__, __LINE__); + return 5; + } + xsiz = MAP_map[mapindex].xsiz; + if( 0 > x || x >= xsiz || 0 >y || y >= MAP_map[mapindex].ysiz ) { + print( "%s:%d:err\n", __FILE__, __LINE__); + return 5; + } + if( damage <= 0 )return 5; + + objimagenumber = MAP_map[mapindex].obj[x+y*xsiz]; + + if( MAP_getImageInt( objimagenumber,MAP_DEFENCE ) > 0 ){ + MAP_map[mapindex].objhp[x+y*xsiz] -= damage; + if( MAP_map[mapindex].objhp[x+y*xsiz] < 0 ){ + MAP_map[mapindex].obj[x+y*xsiz] = 0; +#if 1 + { + char *stringdata; + RECT seekr , retr; + seekr.x = x; + seekr.y = y; + seekr.width = 1; + seekr.height = 1; + stringdata = MAP_getdataFromRECT(floor,&seekr,&retr); + if( stringdata ){ + print("RINGO: RETR: %d %d %d %d\n", + retr.x,retr.y,retr.width,retr.height); + if( CHAR_getInt( charaindex , CHAR_WHICHTYPE ) + == CHAR_TYPEPLAYER ){ + int fd = getfdFromCharaIndex( charaindex ); + lssproto_M_send(fd,floor, retr.x, retr.y, + retr.x + retr.width, retr.y + retr.height, + stringdata ); + } + } else { + print("RINGO: bad stringdata. %d %d %d %d\n", + seekr.x,seekr.y,seekr.width,seekr.height); + + } + + } +#endif + return 1; + } + return 2; + } + + if( MAP_getImageInt(MAP_map[mapindex].obj[y*xsiz+x],MAP_HAVEHEIGHT ) + == 0 ) + return 4; +#endif + return 3; +} + +BOOL MAP_appendTailObj( int floor, int x, int y, int objindex ) +{ + int mapindex; + int xsiz; + int dataindex; + MAP_Objlink* c; + MAP_Objlink* top; + + mapindex = MAP_getfloorIndex( floor ); + if( mapindex == -1 ) { + //print( "%s:%d:err(fl=%d,x=%d,y=%d)\n", __FILE__, __LINE__, floor, x, y ); + return FALSE; + } + xsiz = MAP_map[mapindex].xsiz; + if( 0 > x || x >= xsiz || 0 >y || y >= MAP_map[mapindex].ysiz ) { + //print( "%s:%d:err(fl=%d,x=%d,y=%d)\n", __FILE__, __LINE__, floor, x, y); + return FALSE; + } + dataindex = y*xsiz+x; + top = MAP_map[mapindex].olink[dataindex]; + if( top == NULL ){ + top = allocateMemory( sizeof(MAP_Objlink) ); + if( top == NULL ) { + //print( "%s:%d:err(fl=%d,x=%d,y=%d)\n", __FILE__, __LINE__, floor, x, y); + return FALSE; + } + top->next = NULL; + top->objindex = objindex; + MAP_map[mapindex].olink[dataindex] = top; + return TRUE; + } + for( c=top ; c->next ; c = c->next ); + c->next = allocateMemory(sizeof(MAP_Objlink)); + if( c->next == NULL )return FALSE; + c->next->next = NULL; + c->next->objindex = objindex; + return TRUE; +} + +BOOL MAP_removeObj( int floor, int x, int y, int objindex ) +{ + int mapindex; + int xsiz; + int dataindex; + MAP_Objlink* c; + MAP_Objlink* last=NULL; + + mapindex = MAP_getfloorIndex( floor ); + if( mapindex == -1 ) { + print( "%s:%d:错误\n", __FILE__, __LINE__); + return FALSE; + } + xsiz = MAP_map[mapindex].xsiz; + if( 0 > x || x >= xsiz || 0 >y || y >= MAP_map[mapindex].ysiz ) { + print( "%s:%d:错误 地图号[%d] x:[%d] y:[%d]\n", __FILE__, __LINE__, floor, x, y); + return FALSE; + } + dataindex = y*xsiz+x; + c = MAP_map[mapindex].olink[dataindex]; + while( c ){ + if( c->objindex == objindex ){ + if( last ) + last->next = c->next; + else + MAP_map[mapindex].olink[dataindex] = c->next; + freeMemory( c ); + return TRUE; + } + last = c; + c = c->next; + } + print( "%s:%d:错误\n", __FILE__, __LINE__); + return FALSE; +} + +BOOL _MAP_objmove( char *file, int line, int objindex, int ofloor, int ox, int oy, int nfloor, + int nx, int ny ) +{ +#if 1 + + int oldmapindex; + int oldxsiz; + + int dataindex; + MAP_Objlink* c; + MAP_Objlink* last=NULL; + MAP_Objlink* pointer=NULL; + + oldmapindex = MAP_getfloorIndex( ofloor ); + if( oldmapindex == -1 ) { + print( "%s:%d:错误 地图号[%d] x:[%d] y:[%d]\n", __FILE__, __LINE__, + ofloor, ox, oy); + return FALSE; + } + oldxsiz = MAP_map[oldmapindex].xsiz; + if( 0 > ox || ox >= oldxsiz + || 0 >oy || oy >= MAP_map[oldmapindex].ysiz ) + { + print( "%s:%d:错误 地图号[%d] x:[%d] y:[%d]\n", __FILE__, __LINE__, + ofloor, ox, oy); + return FALSE; + } + dataindex = oy*oldxsiz+ox; + c = MAP_map[oldmapindex].olink[dataindex]; + while( c ){ + if( c->objindex == objindex ){ + if( last ) + last->next = c->next; + else + MAP_map[oldmapindex].olink[dataindex] = c->next; + + pointer = c; + pointer->next = NULL; + break; + } + last = c; + c = c->next; + } + if( !pointer ) { + print( "\n%s:%d:错误( %d,%d,%d )->(%d,%d,%d)\n", __FILE__, __LINE__, + ofloor, ox, oy, nfloor, nx, ny ); + return FALSE; + } + { + int newmapindex; + int newxsiz; + MAP_Objlink* top; + + if( ofloor == nfloor ){ + newmapindex = oldmapindex; + newxsiz = oldxsiz; + }else{ + newmapindex = MAP_getfloorIndex( nfloor ); + if( newmapindex == -1 ) { + print( "%s:%d:错误 地图号[%d] x:[%d] y:[%d]\n", __FILE__, __LINE__, + nfloor, nx, ny); + return FALSE; + } + newxsiz = MAP_map[newmapindex].xsiz; + } + if( 0 > nx || nx >= newxsiz + || 0 >ny || ny >= MAP_map[newmapindex].ysiz ) + { + print( "%s:%d:错误 地图号[%d] x:[%d] y:[%d]\n", __FILE__, __LINE__, + nfloor, nx, ny); + return FALSE; + } + + dataindex = ny*newxsiz+nx; + top = MAP_map[newmapindex].olink[dataindex]; + if( top == NULL ){ + top = MAP_map[newmapindex].olink[dataindex] = pointer; + top->next = NULL; + return TRUE; + } + + for( c=top ; c->next ; c = c->next ); + c->next = pointer; + c->next->next = NULL; + return TRUE; + } +#else + if( MAP_removeObj( ofloor,ox,oy,objindex) + && MAP_appendTailObj( nfloor, nx ,ny, objindex ) ) + return TRUE; +#endif + print( "%s:%d:错误\n", __FILE__, __LINE__); + return FALSE; +} + +MAP_Objlink* _MAP_getTopObj( char *file, int line,int floor, int x, int y ) +{ + int mapindex; + int xsiz; + + mapindex = MAP_getfloorIndex( floor ); + if( mapindex == -1 ) { + //print( "callfrom[%s:%d] %s:%d:err floor(%d,%d,%d)\n", file, line, __FILE__, __LINE__, + // floor, x, y ); + return NULL; + } + + xsiz = MAP_map[mapindex].xsiz; + +#if 1 + if( x >= xsiz) return NULL; + if( y >= MAP_map[mapindex].ysiz ) return NULL; + if( x < 0 ) return NULL; + if( y < 0 ) return NULL; + return MAP_map[mapindex].olink[y*xsiz+x]; +#else + if( 0 <= x && x < xsiz && 0 <= y && y < MAP_map[mapindex].ysiz ) + return MAP_map[mapindex].olink[y*xsiz+x]; + else + return NULL; +#endif +} + +BOOL MAP_addNewObj( int floor, int x, int y, int objindex ) +{ + OBJECT map; + BOOL ret; + + for( map=MAP_getTopObj(floor,x,y) ; map ; map = NEXT_OBJECT(map)) { + if( GET_OBJINDEX(map) == objindex ) { + print( "%s:%d:err\n", __FILE__, __LINE__); + return 0; + } + } + ret = MAP_appendTailObj( floor, x, y, objindex ); + if( ret )return 1; + else return -1; +} + +char *MAP_getFloorName( int floor) +{ + int floorindex; + floorindex = MAP_getfloorIndex( floor ); + if( floorindex == -1 ) { + print( "%s:%d:err\n", __FILE__, __LINE__); + return NULL; + } + return MAP_map[floorindex].string; +} + +BOOL MAP_setObjData( int ff ,int fx, int fy, int obj, int objhp ) +{ + int floorindex,xsiz; + + floorindex = MAP_getfloorIndex( ff ); + if( floorindex == -1 ) { + print( "%s:%d:err\n", __FILE__, __LINE__); + return FALSE; + } + xsiz = MAP_map[floorindex].xsiz; + if( fx < 0 || fx >= xsiz ) { + return FALSE; + } + if( fy < 0 || fy >= MAP_map[floorindex].ysiz ) { + return FALSE; + } + MAP_map[floorindex].obj[fy*xsiz+fx] = obj; + return TRUE; +} + +void MAP_sendAroundMapdata( int fl, int fromx, int fromy) +{ + char* mapdata; + RECT seek,ret; + int i,j; + seek.x = fromx; + seek.y = fromy; + seek.width = seek.height = 1; + mapdata = MAP_getdataFromRECT(fl,&seek,&ret); + if( mapdata != NULL ) { + int x = fromx; + int y = fromy; + + for( i =x-MAP_CHAR_DEFAULTSEESIZ/2 ; i <= x+MAP_CHAR_DEFAULTSEESIZ/2 ; i++ ){ + for( j = y-MAP_CHAR_DEFAULTSEESIZ/2 ; j <= y+MAP_CHAR_DEFAULTSEESIZ/2 ; + j ++ ){ + OBJECT object; + for( object = MAP_getTopObj(fl,i,j) ; + object ; + object = NEXT_OBJECT(object ) ){ + int objindex = GET_OBJINDEX(object); + if( OBJECT_getType(objindex) == OBJTYPE_NOUSE ) continue; + if( OBJECT_getType(objindex) == OBJTYPE_CHARA ) { + int index = OBJECT_getIndex( objindex); + if( CHAR_getInt( index, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER) { + int fd = getfdFromCharaIndex( index ); + if( fd != -1 ) { + lssproto_M_send( fd, fl, ret.x,ret.y, + ret.x+ret.width, ret.y+ret.height, + mapdata ); + } + } + } + } + } + } + }else { + print( "地图数据错误 %s:%d \n" , __FILE__, __LINE__); + } +} + +#ifdef _STATUS_WATERWORD //水世界状态 +int MAP_getMapFloorType( int floor) +{ + int i=0; + int WaterWord[]={8101,8015,8029,8028,8027,817,8007,8100,151,160,161,-1}; + while( WaterWord[i] != -1 ){ + if( floor == WaterWord[i] ){ + return 1; + } + i++; + } + return 0; +} +#endif + + + + diff --git a/gmsv/mclient.c b/gmsv/mclient.c new file mode 100644 index 0000000..57e7cfe --- /dev/null +++ b/gmsv/mclient.c @@ -0,0 +1,677 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "autil.h" +#include "util.h" +#include "net.h" +#include "char.h" +#include "char_base.h" +#include "mclient.h" +#include "log.h" +#include "handletime.h" +#include "chatmagic.h" + +#ifdef _RECAL_ASK_PLAYER // WON 要求人物资料 +#include "saacproto_cli.h" +#endif + +#ifdef _M_SERVER + +#define SEPARATOR ";" + +#ifdef _GSERVER_RUNTIME + BOOL gserver_runtime_starttime0_flag = TRUE; + time_t gserver_runtime_starttime0; +#endif + +//Mserver NETProc +int mproto_ClientDispatchMessage(int fd,char* data) +{ + int func,fieldcount; + char raw[65500]; + + strcpy(PersonalKey, MSPERSIONALKEY); + util_DecodeMessage(raw,data); + util_SplitMessage(raw,SEPARATOR); + if (!util_GetFunctionFromSlice(&func, &fieldcount)) { + logHack(fd,HACK_GETFUNCFAIL); + return -1; + } + + if (func==MPROTO_QUE_RECV) { + int checksum=0, checksumrecv; + int userfdid; + char ans[65500],uid[4096]; + checksum += util_destring(2,uid); + checksum += util_deint(3, &userfdid); + checksum += util_destring(4, ans); + util_deint(5, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + return -1; + } + mproto_Que_Recv(fd,uid,userfdid, ans); + util_DiscardMessage(); + return 0; + } + + if( func == MPROTO_MESSAGE_RECV ) { + int checksum=0, checksumrecv; + int userfdid; + char ans[65500],uid[4096]; + checksum += util_destring(2,uid); + checksum += util_deint(3, &userfdid); + checksum += util_destring(4, ans); + util_deint(5, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + return -1; + } + mproto_Message_Recv(fd,uid,userfdid, ans); + util_DiscardMessage(); + return 0; + } + + if (func==MPROTO_HELLO_RECV) { + util_DiscardMessage(); + return 0; + } + if (func == MPROTO_NOTALK_RECV) { + int checksum=0, checksumrecv=0; + int userfdid,ntime; + char uid[4096]; + checksum = util_destring(2,uid); + checksum += util_deint(3, &userfdid); + checksum += util_deint(4, &ntime); + util_deint(5, &checksumrecv); + print("notalk here1 sum=%d,recv=%d\n",checksum,checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + return -1; + } + print("notalk here2\n"); + mproto_NoTalk_Recv(fd,uid,userfdid, ntime); + util_DiscardMessage(); + return 0; + } + +#ifdef _GM_WARP_PLAYER // WON 传送玩家 + if (func == MPROTO_WARP_RECV) { + int checksum=0, checksumrecv=0; + int userfdid,floor,x,y; + char uid[4096]; + checksum = util_destring(2,uid); + checksum += util_deint(3, &userfdid); + checksum += util_deint(4, &floor); + checksum += util_deint(5, &x); + checksum += util_deint(6, &y); + util_deint(7, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + return -1; + } + mproto_WARP_Recv(fd, uid, userfdid, floor, x, y); + util_DiscardMessage(); + return 0; + } +#endif + +#ifdef _RECAL_ASK_PLAYER // WON 要求人物资料 + + // 线上人物资料 + if (func == MPROTO_RECALL_PLAYER_RECV) { + int checksum=0, checksumrecv=0, backup_flag=0; + int userfdid, char_num, date, GmCliId; + char uid[4096], id[20]; + + checksum = util_destring(2,uid); + checksum += util_deint(3, &userfdid); + checksum += util_deint(4, &GmCliId); + checksum += util_destring(5,id); + checksum += util_deint(6, &char_num); + checksum += util_deint(7, &date); + checksum += util_deint(8, &backup_flag); + + util_deint(9, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + return -1; + } + + mproto_RECALL_ASK_PLAYER_Recv(fd, uid, userfdid, GmCliId, id, char_num, date, backup_flag); + util_DiscardMessage(); + return 0; + } + // 备份人物资料 + if (func == MPROTO_RECALL_BACKUP_RECV) { + int checksum=0, checksumrecv=0; + int userfdid, char_num, date, GmCliId, backup_flag; + char uid[4096], id[20], char_data[1024]; + + checksum = util_destring(2, uid); + checksum += util_deint(3, &userfdid); + checksum += util_deint(4, &GmCliId); + checksum += util_destring(5,id); + checksum += util_deint(6, &char_num); + checksum += util_deint(7, &date); + checksum += util_destring(8, char_data); + checksum += util_deint(9, &backup_flag); + + util_deint(10, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + return -1; + } + + mproto_RECALL_BACKUP_PLAYER_Recv(fd, uid, userfdid, GmCliId, id, char_num, date, char_data, backup_flag); + + util_DiscardMessage(); + return 0; + } + +#endif + + if( func == MPROTO_WAEIKICK_RECV ) { + int checksum=0, checksumrecv=0, userfdid; + char uid[4096]; + checksum = util_destring(2,uid); + checksum += util_deint(3, &userfdid); + util_deint(4, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + return -1; + } + mproto_WaeiKick_Recv( fd, uid, userfdid); + util_DiscardMessage(); + return 0; + } + + if( func == MPROTO_JAIL_RECV ) { + int checksum=0, checksumrecv=0, userfdid; + char uid[4096]; + checksum = util_destring(2,uid); + checksum += util_deint(3, &userfdid); + util_deint(4, &checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + return -1; + } + mproto_Jail_Recv( fd, uid, userfdid); + util_DiscardMessage(); + return 0; + } + + if (func == MPROTO_GMTALK_RECV) { + int checksum=0,checksumrecv=0; + int ntime; + char uid[4096],data[65530]; + checksum = util_destring(2,uid); + checksum += util_deint(3,&ntime); + checksum += util_destring(4,data); + util_deint(5,&checksumrecv); + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + return -1; + } + mproto_GMTalk_Recv(fd,uid,ntime,data); + util_DiscardMessage(); + return 0; + } + +#ifdef _RECAL_SERVER_OFF // WON MSERVER 关闭 GS + if (func == MPROTO_RECALL_SERVER_OFF_RECV) { + int checksum=0,checksumrecv=0; + char msg[10]; + + struct tm *newtime; + time_t long_time; + int MIN=0, HOUR=0, SEC=0; + + time( &long_time ); + newtime = localtime( &long_time ); + + HOUR=newtime->tm_hour; + MIN=newtime->tm_min; + SEC=newtime->tm_sec; + + checksum = util_destring(2,msg); + util_deint(3,&checksumrecv); + + if (checksum!=checksumrecv) { + util_DiscardMessage(); + logHack(fd, HACK_CHECKSUMERROR); + return -1; + } + + // 关机 + if( strcmp(msg, "OFF") == 0){ + print("\n\n\n\n\n GM server shoutdown GS !! (%d:%d:%d)\n\n\n\n\n", HOUR, MIN, SEC); + system( "~/gmsvstop.sh" ); + } + + util_DiscardMessage(); + return 0; + } +#endif + + util_DiscardMessage(); + return 0; +} +//GM回覆问题 +void mproto_Que_Recv(int fd,char* uid,int userfdid,char* ans) +{ + int fd_charaindex; + char sGM[256]; + int clifd=getfdFromFdid(userfdid); + if (clifd == -1) return ; + if (ans == NULL || uid==NULL) return; + sprintf(sGM,"GM[%s]为你解答如下:",uid); + fd_charaindex = CONNECT_getCharaindex( clifd ); + if (!CHAR_CHECKINDEX(fd_charaindex)) return; + CHAR_talkToCli(fd_charaindex, -1, sGM, CHAR_COLORYELLOW); + CHAR_talkToCli(fd_charaindex, -1, ans, CHAR_COLORWHITE); + + return; +} +//GM讯息 +void mproto_Message_Recv(int fd,char* uid,int userfdid,char* ans) +{ + int fd_charaindex; + char sGM[256]; + int clifd=getfdFromFdid(userfdid); + if (clifd == -1) return ; + if (ans == NULL || uid==NULL) return; + if( !strcmp( uid, "无") ) { + sprintf( sGM, "%s", ans); + }else{ + sprintf( sGM, "GM[%s]讯息:%s", uid, ans); + } + + fd_charaindex = CONNECT_getCharaindex( clifd ); + if (!CHAR_CHECKINDEX(fd_charaindex)) return; + CHAR_talkToCli(fd_charaindex, -1, sGM, CHAR_COLORRED); + return; +} + +//GM禁言 +void mproto_NoTalk_Recv(int fd,char* uid,int userfdid,int nTime) +{ + int fd_charaindex; + int clifd=getfdFromFdid(userfdid); + print("clifd =%d\n",clifd); + if (clifd == -1) return ; + if (uid == NULL ) return ; + fd_charaindex=CONNECT_getCharaindex(clifd); + if (!CHAR_CHECKINDEX(fd_charaindex)) return; + CHAR_setInt( fd_charaindex,CHAR_SILENT, nTime ); + CHAR_setWorkInt( fd_charaindex, CHAR_WORKLOGINTIME, (int)NowTime.tv_sec ); + CHAR_talkToCli( fd_charaindex, -1, "由於捣乱,被GM禁言10到30分钟", CHAR_COLORYELLOW); + CHAR_setWorkInt(fd_charaindex, CHAR_WORKTALKCOUNT, 0 ); +} + + +#ifdef _GM_WARP_PLAYER // WON 传送玩家 +void mproto_WARP_Recv(int fd,char* uid,int userfdid,int floor, int x, int y) +{ + int fd_charaindex; + int clifd=getfdFromFdid(userfdid); + print("clifd =%d\n",clifd); + if (clifd == -1) return ; + if (uid == NULL ) return ; + fd_charaindex=CONNECT_getCharaindex(clifd); + if (!CHAR_CHECKINDEX(fd_charaindex)) return; + CHAR_warpToSpecificPoint(fd_charaindex, floor, x, y); + +} +#endif + +#ifdef _RECAL_ASK_PLAYER // WON 要求人物资料 +void mproto_RECALL_ASK_PLAYER_Recv(int fd, char *uid, int userfdid, int GmCliId, char *id, int char_num, int date, int backup_flag) +{ + extern int acfd; + saacproto_Recal_Player_send(acfd, uid, userfdid, GmCliId, id, char_num, date, backup_flag); + +} + +void mproto_RECALL_BACKUP_PLAYER_Recv(int fd, char *uid, int userfdid, int GmCliId, char *id, int char_num, int date, char *char_data, int backup_flag) +{ + extern int acfd; + saacproto_Recal_Backup_send(acfd, uid, userfdid, GmCliId, id, char_num, date, char_data, backup_flag); + +} +#endif + +//GM JAIL +void mproto_Jail_Recv(int fd,char* uid,int userfdid) +{ + int fd_charaindex; + int clifd=getfdFromFdid(userfdid); + if (clifd == -1) return; + if (uid == NULL ) return; + fd_charaindex = CONNECT_getCharaindex(clifd); + if (!CHAR_CHECKINDEX(fd_charaindex)) + return; + CHAR_talkToCli( fd_charaindex, -1, "由於捣乱,被GM关入监牢", CHAR_COLORYELLOW); + CHAR_CHAT_DEBUG_jail( -1, CHAR_getChar( fd_charaindex, CHAR_CDKEY)); +} + +//GM踢人 +void mproto_WaeiKick_Recv(int fd,char* uid,int userfdid) +{ + int fd_charaindex; + int clifd=getfdFromFdid(userfdid); + if (clifd == -1) return; + if (uid == NULL ) return; + fd_charaindex = CONNECT_getCharaindex(clifd); + if (!CHAR_CHECKINDEX(fd_charaindex)) + return; + CHAR_talkToCli( fd_charaindex, -1, "由於捣乱,被GM踢除", CHAR_COLORYELLOW); + CHAR_CHAT_DEBUG_gmkick( -1, CHAR_getChar( fd_charaindex, CHAR_CDKEY)); +} +//GM广播 +void mproto_GMTalk_Recv(int fd,char* uid,int ntime,char* data) +{ + char message[65530]; + int i; + int playernum = CHAR_getPlayerMaxNum(); + if (uid == NULL || data == NULL ) return ; + strcpy(message,""); + sprintf(message,"GM[%s]:%s",uid,data); + for( i = 0 ; i < playernum ; i++) { + if( CHAR_getCharUse(i) != FALSE ) { + CHAR_talkToCli( i, -1, message, CHAR_COLORWHITE); + } + } +} + +void mproto_Que_Send( int fd, int uid, int index, char* question) +{ + char buffer[65500], wheres[256]; + int checksum=0, floor, x, y; + + char *cdkey = CHAR_getChar( index, CHAR_CDKEY); + char *charname = CHAR_getChar( index, CHAR_NAME); + + if( strlen( question) <= 0 ){ + CHAR_talkToCli( index, -1, "字串长度不足!", CHAR_COLORYELLOW); + return; + } + memset( wheres, 0, sizeof( wheres)); + floor = CHAR_getInt( index, CHAR_FLOOR); + x = CHAR_getInt( index, CHAR_X); + y = CHAR_getInt( index, CHAR_Y); + sprintf( wheres, "%d,%d,%d", floor, x, y); + + memset( buffer, 0, sizeof( buffer)); + strcpy(PersonalKey, MSPERSIONALKEY); + checksum += util_mkint(buffer, uid); + checksum += util_mkstring(buffer, cdkey); + checksum += util_mkstring(buffer, charname); + checksum += util_mkstring(buffer, question); + checksum += util_mkstring(buffer, wheres); + util_mkint(buffer, checksum); + util_SendMesg(fd, MPROTO_QUE_SEND, buffer); +} + +#ifdef _RECAL_ASK_PLAYER // WON 要求人物资料 + +// 线上人物资料 +void saacproto_ACRecalPlayer_recv(char *uid, int userfdid, int GmCliId, char *id, int char_num, int date, char *char_data) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer, ""); + strcpy(PersonalKey, MSPERSIONALKEY); + checksum += util_mkstring(buffer, uid); + checksum += util_mkint(buffer, userfdid); + checksum += util_mkint(buffer, GmCliId); + checksum += util_mkstring(buffer, id); + checksum += util_mkint(buffer, char_num); + checksum += util_mkint(buffer, date); + checksum += util_mkstring(buffer, char_data); + + util_mkint(buffer, checksum); + util_SendMesg(mfd, MPROTO_RECALL_PLAYER_SEND, buffer); +} + +// 备份人物资料 +void saacproto_ACRecalBackupPlayer_recv(char *uid, int userfdid, int GmCliId, char *id, int char_num, int date, char *char_data) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer, ""); + strcpy(PersonalKey, MSPERSIONALKEY); + checksum += util_mkstring(buffer, uid); + checksum += util_mkint(buffer, userfdid); + checksum += util_mkint(buffer, GmCliId); + checksum += util_mkstring(buffer, id); + checksum += util_mkint(buffer, char_num); + checksum += util_mkint(buffer, date); + checksum += util_mkstring(buffer, char_data); + + util_mkint(buffer, checksum); + util_SendMesg(mfd, MPROTO_RECALL_BACKUP_SEND, buffer); +} + +// 回溯ok +void saacproto_ACRecalAllBackupOK_recv(char *uid, int userfdid, int GmCliId, char *id, int char_num, int date, char *char_data) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer, ""); + strcpy(PersonalKey, MSPERSIONALKEY); + checksum += util_mkstring(buffer, uid); + checksum += util_mkint(buffer, userfdid); + checksum += util_mkint(buffer, GmCliId); + checksum += util_mkstring(buffer, id); + checksum += util_mkint(buffer, char_num); + checksum += util_mkint(buffer, date); + checksum += util_mkstring(buffer, char_data); + util_mkint(buffer, checksum); + util_SendMesg(mfd, MPROTO_RECALL_BACKUP_OK_SEND, buffer); +} + +// 取得备份日期 +void saacproto_ACRecalBackupDate_recv(char *uid, int userfdid, int GmCliId, char *id, int char_num, int date, char *char_data) +{ + char buffer[65500]; + int checksum=0; + + strcpy(buffer, ""); + strcpy(PersonalKey, MSPERSIONALKEY); + checksum += util_mkstring(buffer, uid); + checksum += util_mkint(buffer, userfdid); + checksum += util_mkint(buffer, GmCliId); + checksum += util_mkstring(buffer, id); + checksum += util_mkint(buffer, char_num); + checksum += util_mkint(buffer, date); + checksum += util_mkstring(buffer, char_data); + + util_mkint(buffer, checksum); + util_SendMesg(mfd, MPROTO_RECALL_BACKUP_DATE_SEND, buffer); +} +#endif + + +void mproto_Type_Send( int fd, int playernum, int itemuse) +{ + char buffer[65500]; + int checksum=0; + + memset( buffer, 0, sizeof( buffer)); + strcpy(PersonalKey, MSPERSIONALKEY); + checksum += util_mkint(buffer, playernum); + checksum += util_mkint(buffer, itemuse); + util_mkint(buffer, checksum); + util_SendMesg(fd, MPROTO_TYPE_SEND, buffer); +} + +int connectmServer(char* hostname,unsigned short port) +{ + struct sockaddr_in sock; + struct hostent* hoste; + int fd,lr; + fd_set fdset,fde; + struct timeval tmv; + memset( &sock , 0 , sizeof( struct sockaddr_in ) ); + sock.sin_family = AF_INET; + sock.sin_port = htons( port ); + + sock.sin_addr.s_addr = inet_addr( hostname ); + if( sock.sin_addr.s_addr == -1 ){ + hoste = gethostbyname( hostname ); + if( hoste == NULL ){ + print( "获取主机名: %s\n", hostname); + return -1; + } + + memcpy((void*)&sock.sin_addr.s_addr , + hoste->h_addr , sizeof(struct in_addr) ); + } + + fd = socket( AF_INET, SOCK_STREAM , 0 ); + if( fd == -1 ){ + print("Cannot Create Socket( errno:%d)\n",errno ); + return -1; + } + + //set the no block + if ( fcntl(fd,F_SETFL,O_NONBLOCK) == -1 ){ + print("set noblock error!\n"); + return -1; + } + + lr = connect(fd,(struct sockaddr*)&sock,sizeof(struct sockaddr_in)); + if( lr != 0 ){ + if ( errno != EINPROGRESS ){ + print("Cannot connect. (errno:%d)\n",errno ); + close(fd); + return -1; + } + } + + FD_ZERO(&fdset); + FD_SET(fd,&fdset); + FD_SET(fd,&fde); + tmv.tv_sec =3; + tmv.tv_usec = 0; + lr=select(fd+1,NULL,&fdset,&fde,&tmv); + if (FD_ISSET(fd,&fde)){ + print("connectGmsv fde\n"); + close(fd); //add more + return -1; + } + + if ( lr > 0 && FD_ISSET(fd,&fdset)){ + + int errorcode; + int errorcodelen; + errorcode=1; + errorcodelen=sizeof(errorcode); + getsockopt(fd,SOL_SOCKET,SO_ERROR,&errorcode,&errorcodelen); + if (errorcode == 0 ){ + fcntl(fd,F_SETFL,0); + print("connectGmsv return fd=%d\n",fd); + return fd; + }else{ + print("connectGmsv errorcode error\n"); + close(fd); + return -1; + } + }else{ + close(fd); + return -1; + } + +} + +#endif + +#ifdef _RECAL_SEND_COUNT // WON 传送GS资讯 +void recal_get_count() +{ + FILE *fp; + int i, j; + char temp[3][15], c; + char buffer[256], msg[64]; + int checksum=0; + + if(mfd == -1) return; + + if( !(fp=fopen("recal_count.txt", "r")) ){ + print("\n open recal_count.txt err !!"); + } + + memset(temp, 0, sizeof(temp)); + + i=0; j=0; + do{ + c = fgetc(fp); + if(c==' '){ + i=0; j++; + continue; + } + temp[j][i]=c; + i++; + }while(c != EOF); + + temp[2][i-2]=0; + + sprintf(msg,"%5s%4d%12s", temp[0], atoi(temp[1]), temp[2]); + + strcpy(buffer, ""); + strcpy(PersonalKey, MSPERSIONALKEY); + checksum += util_mkstring(buffer, msg); + + util_mkint(buffer, checksum); + util_SendMesg(mfd, MPROTO_RECALL_COUNT_SEND, buffer); + + fclose(fp); + +} +#endif + +#ifdef _GSERVER_RUNTIME //传送GSERVER执行多少时间给MSERVER +void gserver_runtime() +{ + int checksum=0; + char buffer[1024]; + time_t starttime1; + + if(mfd == -1) return; + if( gserver_runtime_starttime0_flag ){ + gserver_runtime_starttime0_flag = FALSE; + gserver_runtime_starttime0 = time(NULL); + } + print("\nChange->传送时间给mserver\n"); + strcpy(buffer, ""); + strcpy(PersonalKey, MSPERSIONALKEY); + starttime1 = time(NULL); + checksum += util_mkint(buffer, (int)difftime(starttime1,gserver_runtime_starttime0));//传送的单位为秒 + util_mkint(buffer, checksum); + util_SendMesg(mfd, MPROTO_RECALL_GSERVER_RUNTIME, buffer); +} +#endif diff --git a/gmsv/msignal.c b/gmsv/msignal.c new file mode 100644 index 0000000..f5ee5af --- /dev/null +++ b/gmsv/msignal.c @@ -0,0 +1,118 @@ +#include "version.h" +#include +#include +#include + +#include + +#include "buf.h" +#include "net.h" +#include "char.h" +#include "item.h" +#include "object.h" +#include "configfile.h" +#include "lssproto_serv.h" +#include "saacproto_cli.h" +#include "log.h" +#include "petmail.h" + +/*------------------------------------------------------------ + * lsprotocol 及伐□平件弘 毛荸 允月楮醒毛裟少[ + * 娄醒}忒曰袄 + * 卅仄 + ------------------------------------------------------------*/ +static void endlsprotocol( void ) +{ + lssproto_CleanupServer(); + saacproto_CleanupClient(); +} + +/*------------------------------------------------------------ + * 允屯化及忡绣仄卅仃木壬卅日卅中犯□正毛母件皿允月楮醒 + * 公木冗木及乒斥亘□伙及楮醒毛裟少及心[ + * 娄醒}忒曰袄 + * 卅仄 + ------------------------------------------------------------*/ +static void allDataDump( void ) +{ + closeAllLogFile(); +#ifndef _SIMPLIFY_ITEMSTRING + storeObjects( getStoredir() ); + storePetmail(); +#endif + storeCharaData(); +} + +/*------------------------------------------------------------ + * 皿夫弘仿丞及蔽 质 及凶户卞裟太请今木月[ + * 娄醒}忒曰袄 + * 卅仄 + ------------------------------------------------------------*/ +void shutdownProgram( void ) +{ + close( acfd ); + close( bindedfd ); + endlsprotocol(); + endConnect(); + memEnd(); +} + +char *DebugFunctionName = NULL; +int DebugPoint = 0; + +void sigshutdown( int number ) +{ + + +#if USE_MTIO + { + void MTIO_join(void); + MTIO_join(); + } +#endif + print( "\n标准信息: %d\n" , number ); + if( number == 0 )print( "\nGMSV正常关闭\n" ); + print( "\n调试点数(%d)\n", DebugPoint ); + print( "\n最后函数 (%s)\n", DebugFunctionName ); + + remove( "gmsvlog.err2"); + rename( "gmsvlog.err1", "gmsvlog.err2" ); + rename( "gmsvlog.err", "gmsvlog.err1" ); + rename( "gmsvlog", "gmsvlog.err" ); + + allDataDump(); + + + signal( SIGINT , SIG_IGN ); + signal( SIGQUIT, SIG_IGN ); + signal( SIGKILL, SIG_IGN ); + signal( SIGSEGV, SIG_IGN ); + signal( SIGPIPE, SIG_IGN ); + signal( SIGTERM, SIG_IGN ); + + + shutdownProgram(); + exit(number); +} + + + +void signalset( void ) +{ + // CoolFish: Test Signal 2001/10/26 + print("\n开始获取信号..\n"); + + print("SIGINT:%d\n", SIGINT); + print("SIGQUIT:%d\n", SIGQUIT); + print("SIGKILL:%d\n", SIGKILL); + print("SIGSEGV:%d\n", SIGSEGV); + print("SIGPIPE:%d\n", SIGPIPE); + print("SIGTERM:%d\n", SIGTERM); + + signal( SIGINT , sigshutdown ); + signal( SIGQUIT, sigshutdown ); + signal( SIGKILL, sigshutdown ); + signal( SIGSEGV, sigshutdown ); + signal( SIGPIPE, SIG_IGN ); + signal( SIGTERM, sigshutdown ); +} diff --git a/gmsv/net.c b/gmsv/net.c new file mode 100644 index 0000000..2091d0a --- /dev/null +++ b/gmsv/net.c @@ -0,0 +1,3751 @@ +#define __NET_C__ +#include "version.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +//ttom+1 +#include +#include "net.h" +#include "buf.h" +#include "link.h" +#include "common.h" +#include "msignal.h" +#include "configfile.h" +#include "util.h" +#include "saacproto_cli.h" +#include "lssproto_serv.h" +#include "char.h" +#include "handletime.h" +#include "log.h" +#include "object.h" +#include "item_event.h" +#include "enemy.h" +// Arminius 7.31 cursed stone +#include "battle.h" +#include "version.h" +#include "pet_event.h" +#include "char_talk.h" +#include "petmail.h" + +#ifdef _TEST_PETCREATE +#include "chatmagic.h" +#endif + +#ifdef _M_SERVER +#include "mclient.h" +#endif + +#ifdef _NPCSERVER_NEW +#include "npcserver.h" +#endif + +#define MIN(x,y) ( ( (x) < (y) ) ? (x) : (y) ) +#define IS_2BYTEWORD( _a_ ) ( (char)(0x80) <= (_a_) && (_a_) <= (char)(0xFF) ) + +#ifdef _NEW_SERVER_ +BOOL bNewServer = TRUE; +#else +BOOL bNewServer = FALSE; +#endif + +// Nuke +1 0901: For state monitor +int StateTable[WHILESAVEWAIT+1]; + +int ITEM_getRatio(); +int CHAR_players(); +#define CONO_CHECK_LOGIN 0x001 +#define CONO_CHECK_ITEM 0x010 +#define CONO_CHECK_PET 0x100 +int cono_check=0x111; + +int AC_WBSIZE = (65536*16); +//ttom+1 for the performatce +static unsigned int MAX_item_use=0; +int i_shutdown_time=0;//ttom +BOOL b_first_shutdown=FALSE;//ttom + +int mfdfulll = 0; + +/*------------------------------------------------------------ + * 扔□田及橇谪 + ------------------------------------------------------------*/ +typedef struct tag_serverState +{ + BOOL acceptmore; /* 1分匀凶日}accept 仄凶丐午 + 切斤仁匹}close 允月 */ + unsigned int fdid; /* fd 及骚曰袄 */ + unsigned int closeallsocketnum; /* closeallsocket 及酸曰及 + 醒*/ + int shutdown; /* 扔□田毛shutdown允月乒□玉 + * 0:骚橘 公木动陆:扑乓永玄扑乓永玄乒□玉 + * 乒□玉卞卅匀凶凛棉互 匀化月[ + */ + int dsptime; /* shutdown 乒□玉及伐□弁 醒*/ + int limittime; /* 仇木手 */ +}ServerState; + +typedef struct tagCONNECT +{ + BOOL use; + +#if USE_MTIO +#define MTIO_FIXED_BUFSIZE (65536) + char rb[MTIO_FIXED_BUFSIZE]; + int rbuse; + char wb[MTIO_FIXED_BUFSIZE]; + int wbuse; + pthread_mutex_t mutex; /* Connect毛中元月午五卞勾井丹夫永弁 */ +#else + char *rb; + int rbuse; + char *wb; + int wbuse; + int check_rb_oneline_b; + int check_rb_time; +#endif + + struct sockaddr_in sin; /* 涛粮燮及失玉伊旦 */ + ConnectType ctype; /* 戊生弁扑亦件及潘 */ + + char cdkey[CDKEYLEN]; /* CDKEY */ + char passwd[PASSWDLEN]; /* 由旦伐□玉 */ + LoginType state; /* 蜇箕及夫弘奶件橇谪 */ + int nstatecount; + char charname[CHARNAMELEN]; /* 夫弘奶件 及平乓仿 */ + int charaindex; /* char 尺及奶件犯永弁旦[ + * 夫弘奶件 卞袄互涩烂今木月[-1互犯白巧伙玄 + * 卞卅中凛[ + */ + char CAbuf[2048]; /* CA() 毛做谅允月啃及田永白央 */ + int CAbufsiz; /* CAbuf 及扔奶术 */ + struct timeval lastCAsendtime; /* 卞CA毛霜匀凶凛棉 */ + + char CDbuf[2048]; /* CD() 毛做谅允月啃及田永白央 */ + int CDbufsiz; /* CDbuf 及扔奶术 */ + struct timeval lastCDsendtime; /* 卞CD毛霜匀凶凛棉 */ + + struct timeval lastCharSaveTime; /* 卞平乓仿犯□正毛本□皮仄凶凛棉 */ + + struct timeval lastprocesstime; /* 卞皿夫玄戊伙毛质 仄凶凛棉*/ + struct timeval lastreadtime; /* 卞read仄凶凛棉[晓午反切互丹*/ + + // Nuke start 08/27 : For acceleration avoidance + // WALK_TOLERANCE: Permit n W messages in a second (3: is the most restricted) + #define WALK_TOLERANCE 4 + #define WALK_SPOOL 5 + #define WALK_RESTORE 100 + unsigned int Walktime; + unsigned int lastWalktime; + unsigned int Walkcount; + int Walkspool; // For walk burst after release key F10 + int Walkrestore; + // B3_TOLERANCE: Time distance between recently 3 B message (8: is the latgest) + // BEO_TOLERANCE: Time distance between the lastmost B and EO (5: is the largest) + #define B3_TOLERANCE 5 + #define BEO_TOLERANCE 3 + #define BEO_SPOOL 10 + #define BEO_RESTORE 100 + unsigned int Btime; + unsigned int lastBtime; + unsigned int lastlastBtime; + unsigned int EOtime; + +#ifdef _BATTLE_TIMESPEED +// unsigned int DefBtime; + int BDTime; + int CBTime; +#endif + +#ifdef _TYPE_TOXICATION + int toxication; +#endif + +#ifdef _CHECK_GAMESPEED + int gamespeed; +#endif +#ifdef _ITEM_ADDEXP //vincent 经验提升 + int EDTime; +#endif + // unsigned int BEO; + int BEOspool; + int BEOrestore; + // Nuke 0219: Avoid cheating + int die; + // Nuke end + // Nuke 0310 + int credit; + int fcold; + // Nuke 0406: New Flow Control + int nu; + int nu_decrease; + int ke; + // Nuke 1213: Flow Control 2 + int packetin; + + // Nuke 0624: Avoid Null Connection + unsigned int cotime; + // Nuke 0626: For no enemy + int noenemy; + // Arminius 7.2: Ra's amulet + int eqnoenemy; +#ifdef _Item_MoonAct + int eqrandenemy; +#endif + +#ifdef _CHIKULA_STONE + int chistone; +#endif + // Arminius 7.31: cursed stone + int stayencount; + + /* close 允月屯五井升丹井及筏盛 */ +#if USE_MTIO + int closed; +#endif + int battlecharaindex[CONNECT_WINDOWBUFSIZE]; + int duelcharaindex[CONNECT_WINDOWBUFSIZE]; + int tradecardcharaindex[CONNECT_WINDOWBUFSIZE]; + int joinpartycharaindex[CONNECT_WINDOWBUFSIZE]; + + // CoolFish: Trade 2001/4/18 + int tradecharaindex[CONNECT_WINDOWBUFSIZE]; + int errornum; + int fdid; + + int close_request; //the second have this + + int appendwb_overflow_flag; /* 1荚匹手appendWb互撩 仄凶日1卞允月 */ + //ttom+1 avoidance the watch the battle be kept out + BOOL in_watch_mode; + BOOL b_shut_up;//for avoid the user wash the screen + BOOL b_pass; //for avoid the unlimited area + struct timeval Wtime; + struct timeval WLtime; + BOOL b_first_warp; + int state_trans; + + // CoolFish: Trade 2001/4/18 + char TradeTmp[256]; + +#ifdef _ITEM_PILEFORTRADE + int tradelist; +#endif + // Shan Recvdata Time + struct timeval lastrecvtime; // 'FM' Stream Control time + struct timeval lastrecvtime_d; // DENGON Talk Control time + + // Arminius: 6.22 encounter + int CEP; // Current Encounter Probability + // Arminius 7.12 login announce + int announced; + + // shan battle delay time 2001/12/26 + struct timeval battle_recvtime; +#ifdef _NO_WARP + // shan hjj add Begin + int seqno; + int selectbutton; + // shan End +#endif + BOOL confirm_key; // shan trade(DoubleCheck) + +#ifdef _BLACK_MARKET + int BMSellList[12]; +#endif +} +CONNECT; + +CONNECT *Connect; /*戊生弁扑亦件忡切迕*/ + + +/* 楮醒及燮 卞勾仃化歹井月方丹卞允月分仃及穴弁夫 */ +#define SINGLETHREAD +#define MUTLITHREAD +#define ANYTHREAD + +ServerState servstate; +#if USE_MTIO +pthread_mutex_t MTIO_servstate_m; /* servstate 及夫永弁 */ +#define SERVSTATE_LOCK() pthread_mutex_lock( &MTIO_servstate_m ); +#define SERVSTATE_UNLOCK() pthread_mutex_unlock( &MTIO_servstate_m ); + +#if 1 +#define CONNECT_LOCK_ARG2(i,j) fprintf(stderr,"LO T:%d(%d:%d) %s %d", (int)pthread_self(), i,j, __FILE__,__LINE__ );pthread_mutex_lock( &Connect[i].mutex );fprintf( stderr, "CK T:%d(%d:%d)\n" , (int)pthread_self(), i,j ); +#define CONNECT_UNLOCK_ARG2(i,j) fprintf(stderr,"UNLO T:%d(%d:%d) %s %d", (int)pthread_self(), i,j, __FILE__,__LINE__ );pthread_mutex_unlock( &Connect[i].mutex );fprintf( stderr, "CK T:%d(%d:%d)\n",(int)pthread_self(), i,j); +#define CONNECT_LOCK(i) fprintf(stderr,"LO T:%d(%d) %s %d", (int)pthread_self(), i, __FILE__,__LINE__ );pthread_mutex_lock( &Connect[i].mutex );fprintf( stderr, "CK T:%d(%d)\n" ,(int)pthread_self(), i ); +#define CONNECT_UNLOCK(i) fprintf(stderr,"UNLO T:%d(%d) %s %d", (int)pthread_self(), i, __FILE__,__LINE__ );pthread_mutex_unlock( &Connect[i].mutex );fprintf( stderr, "CK T:%d(%d)\n",(int)pthread_self(), i); +/* 晓筏及夫弘反户切扎仁切扎犯奴旦弁毛罹丹及匹旦伉□皿毛中木凶曰 */ +#define MTIO_DEBUG_LOG_REDUCE 1 +#else +#define CONNECT_LOCK_ARG2(i,j) pthread_mutex_lock( &Connect[i].mutex ); +#define CONNECT_UNLOCK_ARG2(i,j) pthread_mutex_unlock( &Connect[i].mutex ); +#define CONNECT_LOCK(i) pthread_mutex_lock( &Connect[i].mutex ); +#define CONNECT_UNLOCK(i) pthread_mutex_unlock( &Connect[i].mutex ); +#define MTIO_DEBUG_LOG_REDUCE 0 +#endif + +#else +#define SERVSTATE_LOCK() +#define SERVSTATE_UNLOCK() +#define CONNECT_LOCK_ARG2(i,j) +#define CONNECT_UNLOCK_ARG2(i,j) +#define CONNECT_LOCK(i) +#define CONNECT_UNLOCK(i) +#endif + +#ifdef _CHECK_BATTLE_IO +int InBattleLoop =FALSE; +int battle_write =0; +int other_write =0; +int battle_write_cnt =0; +int other_write_cnt =0; +#endif + + + +/*------------------------------------------------------------ + * servstate毛赓渝祭允月[ + * 娄醒}忒曰袄 + * 卅仄 + ------------------------------------------------------------*/ +ANYTHREAD static void SERVSTATE_initserverState( void ) +{ + SERVSTATE_LOCK(); + servstate.acceptmore = TRUE; + servstate.fdid = 0; + servstate.closeallsocketnum = -1; + servstate.shutdown = 0; + servstate.limittime = 0; + servstate.dsptime = 0; + SERVSTATE_UNLOCK(); +} + +ANYTHREAD int SERVSTATE_SetAcceptMore( int nvalue ) +{ + BOOL buf; + SERVSTATE_LOCK(); + buf = servstate.acceptmore; + servstate.acceptmore = nvalue; + SERVSTATE_UNLOCK(); + return buf; +} +ANYTHREAD static int SERVSTATE_incrementFdid( void ) +{ + int ret; + SERVSTATE_LOCK(); + ret = servstate.fdid++; + SERVSTATE_UNLOCK(); + return ret; +} +ANYTHREAD static void SERVSTATE_setCloseallsocketnum( int a ) +{ + SERVSTATE_LOCK(); + servstate.closeallsocketnum = a; + SERVSTATE_UNLOCK(); +} +ANYTHREAD static void SERVSTATE_incrementCloseallsocketnum(void) +{ + SERVSTATE_LOCK(); + servstate.closeallsocketnum ++; + SERVSTATE_UNLOCK(); +} +ANYTHREAD void SERVSTATE_decrementCloseallsocketnum(void) +{ + SERVSTATE_LOCK(); + servstate.closeallsocketnum --; + SERVSTATE_UNLOCK(); +} +ANYTHREAD int SERVSTATE_getCloseallsocketnum( void ) +{ + int a; + SERVSTATE_LOCK(); + a = servstate.closeallsocketnum; + SERVSTATE_UNLOCK(); + return a; +} + +ANYTHREAD static int SERVSTATE_getAcceptmore(void) +{ + int a; + SERVSTATE_LOCK(); + a = servstate.acceptmore; + SERVSTATE_UNLOCK(); + return a; +} +ANYTHREAD int SERVSTATE_getShutdown(void) +{ + int a; + SERVSTATE_LOCK(); + a = servstate.shutdown; + SERVSTATE_UNLOCK(); + return a; +} +ANYTHREAD void SERVSTATE_setShutdown(int a) +{ + SERVSTATE_LOCK(); + servstate.shutdown = a; + SERVSTATE_UNLOCK(); +} +ANYTHREAD int SERVSTATE_getLimittime(void) +{ + int a; + SERVSTATE_LOCK(); + a = servstate.limittime; + SERVSTATE_UNLOCK(); + return a; +} +ANYTHREAD void SERVSTATE_setLimittime(int a) +{ + SERVSTATE_LOCK(); + servstate.limittime = a; + SERVSTATE_UNLOCK(); +} +ANYTHREAD int SERVSTATE_getDsptime(void) +{ + int a; + SERVSTATE_LOCK(); + a = servstate.dsptime; + SERVSTATE_UNLOCK(); + return a; +} +ANYTHREAD void SERVSTATE_setDsptime(int a) +{ + SERVSTATE_LOCK(); + servstate.dsptime = a; + SERVSTATE_UNLOCK(); +} + + +#if USE_MTIO == 0 + +static int appendWB( int fd, char *buf, int size ) +{ + + if( fd != acfd ) { + if( Connect[fd].wbuse + size >= WBSIZE ) { + print( "appendWB:err buffer over[%d]:%s \n", + Connect[fd].wbuse + size, Connect[fd].cdkey ); + return -1; + } + }else { + if( Connect[fd].wbuse + size > AC_WBSIZE ) { + FILE *fp=NULL; + print( "appendWB:err buffer over[%d+%d]:(SAAC) \n", Connect[fd].wbuse, size); + if( (fp=fopen("appendWBerr.log", "a+"))==NULL) return -1; + fprintf( fp, "(SAAC) appendWB:err buffer over[%d+%d/%d]:\n", Connect[fd].wbuse, size, AC_WBSIZE); + fclose( fp); + return -1; + } + } + + + + memcpy( Connect[fd].wb + Connect[fd].wbuse , + buf, size ); + Connect[fd].wbuse += size; + return size; +} +static int appendRB( int fd, char *buf, int size ) +{ + if( fd != acfd ) { + if( Connect[fd].rbuse + size > RBSIZE ) { + if( fd == mfd ) print( "appendRB:MSERVER err buffer over \n"); + else print( "appendRB:OTHER(%d) err buffer over \n", fd); + return -1; + } + }else { + if( strlen( buf) > size ){ + print( "appendRB AC buffer len err : %d/%d=\n(%s)!!\n", strlen( buf), size, buf); + } + if( Connect[fd].rbuse + size > AC_RBSIZE ) { + print( "appendRB AC err buffer over:\n(%s)\n len:%d - rbuse:%d \n", + buf, strlen(buf), Connect[fd].rbuse); + return -1; + } + } + memcpy( Connect[fd].rb + Connect[fd].rbuse , buf, size ); + Connect[fd].rbuse += size; + return size; +} + +static int shiftWB( int fd, int len ) +{ + if( Connect[fd].wbuse < len ) { + print( "shiftWB: err\n"); + return -1; + } + memmove( Connect[fd].wb, Connect[fd].wb + len, Connect[fd].wbuse - len ); + Connect[fd].wbuse -= len; + if( Connect[fd].wbuse < 0 ) { + print( "shiftWB:wbuse err\n"); + Connect[fd].wbuse = 0; + } + return len; +} +static int shiftRB( int fd, int len ) +{ + if( Connect[fd].rbuse < len ) { + print( "shiftRB: err\n"); + return -1; + } + memmove( Connect[fd].rb, Connect[fd].rb + len, Connect[fd].rbuse - len ); + Connect[fd].rbuse -= len; + if( Connect[fd].rbuse < 0 ) { + print( "shiftRB:rbuse err\n"); + Connect[fd].rbuse = 0; + } + + return len; +} + +SINGLETHREAD int lsrpcClientWriteFunc( int fd , char* buf , int size ) +{ + int r; + if( Connect[fd].use == FALSE ){ + return FALSE; + } + if( Connect[fd].appendwb_overflow_flag ){ + print( "lsrpcClientWriteFunc: buffer overflow fd:%d\n" , fd ); + return -1; + } + r = appendWB( fd, buf , size); + + // Nuke *1 0907: Ignore acfd from WB error + if(( r < 0 ) && (fd != acfd)) { + Connect[fd].appendwb_overflow_flag = 1; + CONNECT_endOne_debug(fd); + close(fd); + // Nuke + 1 0901: Why close + // print("closed in lsrpcClientWriteFunc"); + } + return r; +} + +static int logRBuseErr = 0; +SINGLETHREAD BOOL GetOneLine_fix( int fd, char *buf, int max ) +{ + int i; + if( Connect[fd].rbuse == 0 ) return FALSE; + + if( Connect[fd].check_rb_oneline_b == 0 && + Connect[fd].check_rb_oneline_b == Connect[fd].rbuse ){ + return FALSE; + } + + + for( i = 0; i < Connect[fd].rbuse && i < ( max -1); i ++ ){ + if( Connect[fd].rb[i] == '\n' ){ + memcpy( buf, Connect[fd].rb, i+1); + buf[i+1]='\0'; + shiftRB( fd, i+1 ); + +//-------- +/* + //andy_log + if( strstr( Connect[fd].rb , "ACCharLoad") != NULL && + Connect[fd].check_rb_oneline_b != 0 )//Connect[fd].rb + LogAcMess( fd, "GetOne", Connect[fd].rb ); +*/ +//-------- + logRBuseErr = 0; + Connect[fd].check_rb_oneline_b=0; + Connect[fd].check_rb_time = 0; + return TRUE; + } + } + + //print("rbuse lens: %d!!\n", Connect[fd].rbuse); + logRBuseErr++; +//-------- + //andy_log + if( fd == acfd && strstr( Connect[fd].rb , "ACCharLoad") != NULL && + logRBuseErr >= 50 ){//Connect[fd].rb + char buf[AC_RBSIZE]; + memcpy( buf, Connect[fd].rb, Connect[fd].rbuse+1); + buf[Connect[fd].rbuse+1]=0; + LogAcMess( fd, "RBUFFER", buf ); + logRBuseErr=0; + } +//-------- + Connect[fd].check_rb_oneline_b = Connect[fd].rbuse; + + return FALSE; +} + +#endif /* if USE_MTIO == 0*/ + +ANYTHREAD BOOL initConnectOne( int sockfd, struct sockaddr_in* sin ,int len ) +{ + CONNECT_LOCK(sockfd); + + Connect[sockfd].use = TRUE; + Connect[sockfd].ctype = NOTDETECTED; +#if USE_MTIO + Connect[sockfd].closed = 0; +#else + Connect[sockfd].wbuse = Connect[sockfd].rbuse = 0; + Connect[sockfd].check_rb_oneline_b = 0; + Connect[sockfd].check_rb_time = 0; +#endif + + + + memset( Connect[sockfd].cdkey , 0 , sizeof( Connect[sockfd].cdkey ) ); + memset( Connect[sockfd].passwd, 0 , sizeof( Connect[sockfd].passwd) ); + + Connect[sockfd].state = NOTLOGIN; + Connect[sockfd].nstatecount = 0; + memset( Connect[sockfd].charname,0, sizeof(Connect[sockfd].charname)); + Connect[sockfd].charaindex = -1; + + Connect[sockfd].CAbufsiz = 0; + Connect[sockfd].CDbufsiz = 0; + Connect[sockfd].rbuse = 0; + Connect[sockfd].wbuse = 0; + Connect[sockfd].check_rb_oneline_b = 0; + Connect[sockfd].check_rb_time = 0; + + Connect[sockfd].close_request = 0; /* 濠蝇邰菲白仿弘 */ + // Nuke 08/27 For acceleration avoidance + Connect[sockfd].Walktime = 0; + Connect[sockfd].lastWalktime = 0; + Connect[sockfd].Walkcount = 0; + Connect[sockfd].Walkspool = WALK_SPOOL; + Connect[sockfd].Walkrestore = WALK_RESTORE; + Connect[sockfd].Btime = 0; + Connect[sockfd].lastBtime = 0; + Connect[sockfd].lastlastBtime = 0; + Connect[sockfd].EOtime = 0; + Connect[sockfd].nu_decrease = 0; +#ifdef _BATTLE_TIMESPEED +// Connect[sockfd].DefBtime = 0; + Connect[sockfd].BDTime = 0; + Connect[sockfd].CBTime = 0; +#endif +#ifdef _CHECK_GAMESPEED + Connect[sockfd].gamespeed = 0; +#endif +#ifdef _TYPE_TOXICATION + Connect[sockfd].toxication = 0; +#endif +#ifdef _ITEM_ADDEXP //vincent 经验提升 + Connect[sockfd].EDTime = 0; +#endif +// Connect[sockfd].BEO = 0; + Connect[sockfd].BEOspool = BEO_SPOOL; + Connect[sockfd].BEOrestore = BEO_RESTORE; + //ttom + Connect[sockfd].b_shut_up=FALSE; + Connect[sockfd].Wtime.tv_sec=0;// + Connect[sockfd].Wtime.tv_usec=0;// + Connect[sockfd].WLtime.tv_sec=0;// + Connect[sockfd].WLtime.tv_usec=0;// + Connect[sockfd].b_first_warp=FALSE; + Connect[sockfd].state_trans=0;//avoid the trans + // Nuke + Connect[sockfd].die=0; + Connect[sockfd].credit=3; + Connect[sockfd].fcold=0; + // Nuke 0406: New Flow Control + Connect[sockfd].nu=30; + Connect[sockfd].ke=10; + // Nuke 1213: Flow Control 2 + Connect[sockfd].packetin=30; // if 10x10 seconds no packet, drop the line + + // Nuke 0624: Avoid Useless Connection + Connect[sockfd].cotime=0; + // Nuke 0626: For no enemy + Connect[sockfd].noenemy=0; + // Arminius 7.2: Ra's amulet + Connect[sockfd].eqnoenemy = 0; + +#ifdef _Item_MoonAct + Connect[sockfd].eqrandenemy = 0; +#endif +#ifdef _CHIKULA_STONE + Connect[sockfd].chistone = 0; +#endif + // Arminius 7.31: cursed stone + Connect[sockfd].stayencount = 0; + + // CoolFish: Init Trade 2001/4/18 + memset(&Connect[sockfd].TradeTmp, 0, sizeof(Connect[sockfd].TradeTmp)); +#ifdef _ITEM_PILEFORTRADE + Connect[sockfd].tradelist = -1; +#endif + // Arminius 6.22 Encounter + Connect[sockfd].CEP = 0; + + // Arminius 7.12 login announce + Connect[sockfd].announced=0; +#ifdef _NO_WARP + // shan hjj add Begin + Connect[sockfd].seqno=-1; + Connect[sockfd].selectbutton=1; + // shan End +#endif + Connect[sockfd].confirm_key=FALSE; // shan trade(DoubleCheck) + + if( sin != NULL )memcpy( &Connect[sockfd].sin , sin , len ); + memset( &Connect[sockfd].lastprocesstime, 0 , + sizeof(Connect[sockfd].lastprocesstime) ); + memcpy( &Connect[sockfd].lastCAsendtime, &NowTime , + sizeof(Connect[sockfd].lastCAsendtime) ); + memcpy( &Connect[sockfd].lastCDsendtime, &NowTime , + sizeof(Connect[sockfd].lastCDsendtime) ); + memcpy( &Connect[sockfd].lastCharSaveTime, &NowTime , + sizeof(Connect[sockfd].lastCharSaveTime) ); + // Shan Add + memcpy( &Connect[sockfd].lastrecvtime, &NowTime , + sizeof(Connect[sockfd].lastrecvtime) ); + memcpy( &Connect[sockfd].lastrecvtime_d, &NowTime , + sizeof(Connect[sockfd].lastrecvtime_d) ); + memcpy( &Connect[sockfd].battle_recvtime, &NowTime , + sizeof(Connect[sockfd].battle_recvtime) ); + +#ifdef _BLACK_MARKET + { + int i; + for(i=0; i<12; i++) + Connect[sockfd].BMSellList[i] = -1; + } +#endif + + memcpy( &Connect[sockfd].lastreadtime , &NowTime, + sizeof(struct timeval)); + Connect[sockfd].lastreadtime.tv_sec -= DEBUG_ADJUSTTIME; + + Connect[sockfd].errornum = 0; + Connect[sockfd].fdid = SERVSTATE_incrementFdid(); + + CONNECT_UNLOCK(sockfd); + + Connect[sockfd].appendwb_overflow_flag = 0; + return TRUE; +} + +ANYTHREAD BOOL _CONNECT_endOne( char *file, int fromline, int sockfd , int line ) +{ + CONNECT_LOCK_ARG2(sockfd,line); + + if( Connect[sockfd].use == FALSE ){ + CONNECT_UNLOCK_ARG2(sockfd,line); + //andy_log + print("连接已关闭[%d]!!\n", sockfd ); + return TRUE; + } + Connect[sockfd].use = FALSE; + if( Connect[sockfd].ctype == CLI && Connect[sockfd].charaindex >= 0 ){ + CONNECT_UNLOCK_ARG2( sockfd,line ); + if( !CHAR_logout( sockfd,TRUE )) { + print( "err %s:%d from %s:%d \n", __FILE__, __LINE__, file, fromline); + } + CONNECT_LOCK_ARG2( sockfd ,line); + } + + unsigned long ip; + int a,b,c,d; + int i; + ip=CONNECT_get_userip(sockfd); + a=(ip % 0x100); ip=ip / 0x100; + b=(ip % 0x100); ip=ip / 0x100; + c=(ip % 0x100); ip=ip / 0x100; + d=(ip % 0x100); + + print( "账号=%s 编号=%d\n", Connect[sockfd].cdkey,sockfd ); + + for(i=0;i= sizeof( Connect[fd].CAbuf ) ){ + CONNECT_UNLOCK(fd); + return FALSE; + } + + memcpy( Connect[fd].CAbuf + Connect[fd].CAbufsiz , data , size ); + Connect[fd].CAbuf[Connect[fd].CAbufsiz+size]=','; + Connect[fd].CAbufsiz += (size + 1); + CONNECT_UNLOCK(fd); + return TRUE; +} + +ANYTHREAD static int CONNECT_getCAbuf( int fd, char *out, int outmax, + int *outlen ) +{ + + CONNECT_LOCK(fd); + if( Connect[fd].use == TRUE ){ + int cplen = MIN( outmax, Connect[fd].CAbufsiz ); + memcpy( out, Connect[fd].CAbuf , cplen ); + *outlen = cplen; + CONNECT_UNLOCK(fd); + return 0; + } else { + CONNECT_UNLOCK(fd); + return -1; + } +} +ANYTHREAD static int CONNECT_getCDbuf( int fd, char *out, int outmax, + int *outlen ) +{ + CONNECT_LOCK(fd); + if( Connect[fd].use == TRUE ){ + int cplen = MIN( outmax, Connect[fd].CDbufsiz ); + memcpy( out, Connect[fd].CDbuf, cplen ); + *outlen = cplen; + CONNECT_UNLOCK(fd); + return 0; + } else { + CONNECT_UNLOCK(fd); + return 0; + } +} + +ANYTHREAD static int CONNECT_setCAbufsiz( int fd, int len ) +{ + CONNECT_LOCK(fd); + if( Connect[fd].use == TRUE ){ + Connect[fd].CAbufsiz = len; + CONNECT_UNLOCK(fd); + return 0; + } else { + CONNECT_UNLOCK(fd); + return -1; + } +} +ANYTHREAD static int CONNECT_setCDbufsiz( int fd, int len ) +{ + CONNECT_LOCK(fd); + if( Connect[fd].use == TRUE ){ + Connect[fd].CDbufsiz = len; + CONNECT_UNLOCK(fd); + return 0; + } else { + CONNECT_UNLOCK(fd); + return -1; + } +} + +ANYTHREAD static void CONNECT_setLastCAsendtime( int fd, struct timeval *t) +{ + CONNECT_LOCK(fd); + Connect[fd].lastCAsendtime = *t; + CONNECT_UNLOCK(fd); +} +ANYTHREAD static void CONNECT_getLastCAsendtime( int fd, struct timeval *t ) +{ + CONNECT_LOCK(fd); + *t = Connect[fd].lastCAsendtime; + CONNECT_UNLOCK(fd); +} +ANYTHREAD static void CONNECT_setLastCDsendtime( int fd, struct timeval *t ) +{ + CONNECT_LOCK(fd); + Connect[fd].lastCDsendtime = *t; + CONNECT_UNLOCK(fd); +} +ANYTHREAD static void CONNECT_getLastCDsendtime( int fd, struct timeval *t ) +{ + CONNECT_LOCK(fd); + *t = Connect[fd].lastCDsendtime; + CONNECT_UNLOCK(fd); +} +ANYTHREAD int CONNECT_getUse_debug( int fd, int i ) +{ + int a; + CONNECT_LOCK_ARG2(fd,i); + a = Connect[fd].use; + CONNECT_UNLOCK_ARG2(fd,i); + return a; + +} + +ANYTHREAD int CONNECT_getUse( int fd ) +{ + int a; + CONNECT_LOCK(fd); + a = Connect[fd].use; + CONNECT_UNLOCK(fd); + return a; +} +void CONNECT_setUse( int fd , int a) +//ANYTHREAD static void CONNECT_setUse( int fd , int a) +{ + CONNECT_LOCK(fd); + Connect[fd].use = a; + CONNECT_UNLOCK(fd); +} + +ANYTHREAD void CONNECT_checkStatecount( int a ) +{ + int i; + int count=0; + for( i=0; i < ConnectLen; i++ ){ + if( Connect[i].use == FALSE || Connect[i].state != a ) continue; + if( Connect[i].nstatecount <= 0 ){ + Connect[i].nstatecount=(int)time(NULL)+60; + }else{ + if( Connect[i].nstatecount < (int)time(NULL) ){ + CONNECT_endOne_debug(i); + close( i ); + count++; + } + } + } + { + memset(StateTable, 0, sizeof(StateTable)); + for (i=0; i < ConnectLen; i++) + if (Connect[i].use == TRUE) + StateTable[Connect[i].state]++; + } +} + +ANYTHREAD int CONNECT_checkStateSomeOne( int a, int maxcount) +{ + char temp[80],buffer[1024]; + int i, ret=1; + + if( StateTable[a] >= maxcount ) ret =-1; + buffer[0]=0; + for (i=0; i <= WHILESAVEWAIT; i++){ + sprintf(temp, "%4d", StateTable[i]); + strcat(buffer, temp); + } + print("\nNOW{{%s}}", buffer); + return ret; +} + +ANYTHREAD void CONNECT_setState( int fd, int a ) +{ + CONNECT_LOCK(fd); + Connect[fd].state = a; + Connect[fd].nstatecount = 0; + + // Nuke start 0829: For debugging + { + char temp[80],buffer[1024]; + int i; + memset(StateTable, 0, sizeof(StateTable)); + for (i=0; i < ConnectLen; i++) + if (Connect[i].use == TRUE) + StateTable[Connect[i].state]++; + + buffer[0]=0; + for (i=0; i <= WHILESAVEWAIT; i++){ + sprintf(temp, "%4d", StateTable[i]); + strcat(buffer, temp); + } + print("\n{{%s}}", buffer); + } + // Nuke end + + CONNECT_UNLOCK(fd); +} + +ANYTHREAD int CONNECT_getState( int fd ) +{ + int a; + CONNECT_LOCK(fd); + a = Connect[fd].state; + CONNECT_UNLOCK(fd); + return a; +} +ANYTHREAD void CONNECT_incrementErrornum(int fd ) +{ + CONNECT_LOCK(fd); + Connect[fd].errornum ++; + CONNECT_UNLOCK(fd); +} +ANYTHREAD void CONNECT_setCharaindex( int fd, int a ) +{ + CONNECT_LOCK(fd); + Connect[fd].charaindex = a; + CONNECT_UNLOCK(fd); +} +ANYTHREAD int CONNECT_getCharaindex( int fd ) +{ + int a; + CONNECT_LOCK(fd); + a = Connect[fd].charaindex; + CONNECT_UNLOCK(fd); + return a; +} +ANYTHREAD void CONNECT_getCdkey( int fd , char *out, int outlen ) +{ + CONNECT_LOCK(fd); + strcpysafe( out, outlen, Connect[fd].cdkey ); + CONNECT_UNLOCK(fd); +} +ANYTHREAD void +CONNECT_setCdkey( int sockfd, char *cd ) +{ + CONNECT_LOCK(sockfd); + snprintf( Connect[sockfd].cdkey, sizeof( Connect[sockfd].cdkey ),"%s", + cd ); + CONNECT_UNLOCK(sockfd); +} + +ANYTHREAD void CONNECT_getPasswd( int fd , char *out, int outlen ) +{ + CONNECT_LOCK(fd); + strcpysafe( out, outlen, Connect[fd].passwd ); + CONNECT_UNLOCK(fd); +} +ANYTHREAD void CONNECT_setPasswd( int fd, char *in ) +{ + CONNECT_LOCK(fd); + strcpysafe( Connect[fd].passwd, sizeof( Connect[fd].passwd ), in ); + CONNECT_UNLOCK(fd); +} +ANYTHREAD int CONNECT_getCtype( int fd ) +{ + int a; + CONNECT_LOCK(fd); + a = Connect[fd].ctype; + CONNECT_UNLOCK(fd); + return a; +} +ANYTHREAD void CONNECT_setCtype( int fd , int a ) +{ + CONNECT_LOCK(fd); + Connect[fd].ctype = a; + CONNECT_UNLOCK(fd); +} + +ANYTHREAD void CONNECT_getCharname( int fd , char *out, int outlen ) +{ + CONNECT_LOCK(fd); + strcpysafe( out, outlen, Connect[fd].charname ); + CONNECT_UNLOCK(fd); +} +ANYTHREAD void CONNECT_setCharname( int fd, char *in ) +{ + CONNECT_LOCK(fd); + strcpysafe( Connect[fd].charname, sizeof( Connect[fd].charname ), + in ); + CONNECT_UNLOCK(fd); +} + +ANYTHREAD int CONNECT_getFdid( int fd ) +{ + int a; + CONNECT_LOCK(fd); + a = Connect[fd].fdid; + CONNECT_UNLOCK(fd); + return a; +} +ANYTHREAD void CONNECT_setDuelcharaindex( int fd, int i , int a ) +{ + CONNECT_LOCK(fd); + Connect[fd].duelcharaindex[i]=a; + CONNECT_UNLOCK(fd); +} +ANYTHREAD int CONNECT_getDuelcharaindex( int fd, int i ) +{ + int a; + CONNECT_LOCK(fd); + a = Connect[fd].duelcharaindex[i]; + CONNECT_UNLOCK(fd); + return a; +} +ANYTHREAD void CONNECT_setBattlecharaindex( int fd, int i , int a ) +{ + CONNECT_LOCK(fd); + Connect[fd].battlecharaindex[i] = a; + CONNECT_UNLOCK(fd); +} +ANYTHREAD int CONNECT_getBattlecharaindex( int fd, int i ) +{ + int a; + CONNECT_LOCK(fd); + a = Connect[fd].battlecharaindex[i]; + CONNECT_UNLOCK(fd); + return a; +} +ANYTHREAD void CONNECT_setJoinpartycharaindex( int fd, int i , int a) +{ + CONNECT_LOCK(fd); + Connect[fd].joinpartycharaindex[i]=a; + CONNECT_UNLOCK(fd); +} +ANYTHREAD int CONNECT_getJoinpartycharaindex( int fd, int i ) +{ + int a; + CONNECT_LOCK(fd); + a = Connect[fd].joinpartycharaindex[i]; + CONNECT_UNLOCK(fd); + return a; +} + +// CoolFish: Trade 2001/4/18 +ANYTHREAD void CONNECT_setTradecharaindex( int fd, int i , int a ) +{ + CONNECT_LOCK(fd); + Connect[fd].tradecharaindex[i] = a; + CONNECT_UNLOCK(fd); +} + +// Shan Begin +ANYTHREAD void CONNECT_setLastrecvtime( int fd, struct timeval *a ) +{ + CONNECT_LOCK(fd); + Connect[fd].lastrecvtime = *a; + CONNECT_UNLOCK(fd); +} +ANYTHREAD void CONNECT_getLastrecvtime( int fd, struct timeval *a ) +{ + CONNECT_LOCK(fd); + *a = Connect[fd].lastrecvtime; + CONNECT_UNLOCK(fd); +} + +ANYTHREAD void CONNECT_setLastrecvtime_D( int fd, struct timeval *a ) +{ + CONNECT_LOCK(fd); + Connect[fd].lastrecvtime_d = *a; + CONNECT_UNLOCK(fd); +} +ANYTHREAD void CONNECT_getLastrecvtime_D( int fd, struct timeval *a ) +{ + CONNECT_LOCK(fd); + *a = Connect[fd].lastrecvtime_d; + CONNECT_UNLOCK(fd); +} +// 2001/12/26 +ANYTHREAD void CONNECT_SetBattleRecvTime( int fd, struct timeval *a ) +{ + CONNECT_LOCK(fd); + Connect[fd].battle_recvtime = *a; + CONNECT_UNLOCK(fd); +} +ANYTHREAD void CONNECT_GetBattleRecvTime( int fd, struct timeval *a ) +{ + CONNECT_LOCK(fd); + *a = Connect[fd].battle_recvtime; + CONNECT_UNLOCK(fd); +} +// Shan End + + +#ifdef _ITEM_PILEFORTRADE +ANYTHREAD void CONNECT_setTradeList( int fd, int num) +{ + Connect[fd].tradelist = num; +} +ANYTHREAD int CONNECT_getTradeList(int fd) +{ + return Connect[fd].tradelist; +} +#endif + +ANYTHREAD void CONNECT_setTradeTmp(int fd, char* a) +{ + CONNECT_LOCK(fd); + strcpysafe( Connect[fd].TradeTmp, sizeof(Connect[fd].TradeTmp), a); + + CONNECT_UNLOCK(fd); +} +ANYTHREAD void CONNECT_getTradeTmp(int fd, char *trademsg, int trademsglen) +{ + CONNECT_LOCK(fd); + strcpysafe(trademsg, trademsglen, Connect[fd].TradeTmp); + CONNECT_UNLOCK(fd); +} + +ANYTHREAD void CONNECT_setTradecardcharaindex( int fd, int i , int a ) +{ + CONNECT_LOCK(fd); + Connect[fd].joinpartycharaindex[i] = a; + CONNECT_UNLOCK(fd); +} +ANYTHREAD int CONNECT_getTradecardcharaindex( int fd, int i ) +{ + int a; + CONNECT_LOCK(fd); + a = Connect[fd].joinpartycharaindex[i]; + CONNECT_UNLOCK(fd); + return a; +} +ANYTHREAD int CONNECT_getClosed( int fd ) +{ +#if USE_MTIO + int a; + CONNECT_LOCK(fd); + a = Connect[fd].closed; + CONNECT_UNLOCK(fd); + return a; +#else + return 0; +#endif +} +ANYTHREAD void CONNECT_setClosed( int fd, int a ) +{ +#if USE_MTIO + CONNECT_LOCK(fd); + if( !Connect[fd].use){ + CONNECT_UNLOCK(fd); + return; + } + Connect[fd].closed =a; + CONNECT_UNLOCK(fd); +#endif +} +ANYTHREAD void CONNECT_setCloseRequest( int fd, int count ) +{ + CONNECT_LOCK(fd); + Connect[fd].close_request = count; + // Nuke + print("关闭请求设置为 %d ",fd); + CONNECT_UNLOCK(fd); +} + + +/*------------------------------------------------------------ + * CAcheck 卅升卞银歹木月楮醒[ 端卞霜月[ + * 娄醒 + * fd int 白央奶伙犯奴旦弁伉皿正 + * 忒曰袄 + * 卅仄 + ------------------------------------------------------------*/ +ANYTHREAD void CAsend( int fd ) +{ + char buf[sizeof(Connect[0].CAbuf)]; + int bufuse=0; + + if( CONNECT_getCAbuf( fd, buf, sizeof(buf), &bufuse ) < 0 )return; + if( bufuse == 0 )return; + + //print("\nshan--->(CAsend)->%s fd->%d", buf, fd); + + /* 及犯伉立正 ',' 毛'\0' 午井尹月*/ + buf[bufuse-1] = '\0'; + lssproto_CA_send( fd , buf ); + + CONNECT_setCAbufsiz( fd, 0 ); +} + + +/*------------------------------------------------------------ + * CA毛霜月[ + * 娄醒 + * 忒曰袄 + * 卅仄 + ------------------------------------------------------------*/ +ANYTHREAD void CAcheck( void ) +{ + int i; + unsigned int interval_us = getCAsendinterval_ms()*1000; + + /* Connect及蜊醒坌分仃支月井日褐中氏分卅[ */ + for( i = 0; i < ConnectLen; i ++) { + struct timeval t; + if( !CONNECT_getUse_debug(i,1008) )continue; + CONNECT_getLastCAsendtime( i, &t ); + if( time_diff_us( NowTime, t ) > interval_us ){ + CAsend( i); + CONNECT_setLastCAsendtime( i, &NowTime ); + } + } +} +ANYTHREAD void CAflush( int charaindex ) +{ + int i; + i = getfdFromCharaIndex( charaindex); + if( i == -1 )return; + CAsend(i); +} + + +/*------------------------------------------------------------ + * CDbuf 卞馨笛允月[ + * 娄醒 + * fd int 白央奶伙犯奴旦弁伉皿正 + * data char* 犯□正 + * size int 犯□正及扔奶术 + * 忒曰袄 + * 岳 TRUE(1) + * 撩 FALSE(0) + ------------------------------------------------------------*/ +ANYTHREAD BOOL CONNECT_appendCDbuf( int fd , char* data, int size ) +{ + CONNECT_LOCK(fd); + + if( ( Connect[fd].CDbufsiz + size ) >= sizeof( Connect[fd].CDbuf )){ + CONNECT_UNLOCK(fd); + return FALSE; + } + memcpy( Connect[fd].CDbuf + Connect[fd].CDbufsiz , data, size ); + Connect[fd].CDbuf[Connect[fd].CDbufsiz+size] = ','; + Connect[fd].CDbufsiz += ( size + 1 ); + CONNECT_UNLOCK(fd); + return TRUE; +} + + +/*------------------------------------------------------------ + * CDcheck 卅升卞银歹木月楮醒[ 端卞霜月[ + * 娄醒 + * fd int 白央奶伙犯奴旦弁伉皿正 + * 忒曰袄 + * 卅仄 + ------------------------------------------------------------*/ +ANYTHREAD void CDsend( int fd ) +{ + char buf[sizeof(Connect[0].CAbuf )]; + int bufuse=0; + if( CONNECT_getCDbuf( fd, buf, sizeof(buf), &bufuse ) < 0 ) return; + if( bufuse == 0 ) return; + buf[bufuse-1] = '\0'; + lssproto_CD_send(fd, buf ); + CONNECT_setCDbufsiz(fd,0); +} + + +/*------------------------------------------------------------ + * CD毛霜月[ + * 娄醒 + * 忒曰袄 + * 卅仄 + ------------------------------------------------------------*/ +ANYTHREAD void CDcheck( void ) +{ + int i; + unsigned int interval_us = getCDsendinterval_ms()*1000; + for(i=0; i interval_us ){ + CDsend( i); + CONNECT_setLastCDsendtime( i , &NowTime ); + } + } +} + +ANYTHREAD void CDflush( int charaindex ) +{ + int i; + i = getfdFromCharaIndex( charaindex); + if( i == -1 )return; + CDsend(i); +} + +void chardatasavecheck( void ) +{ + int i; + int interval = getCharSavesendinterval(); + static struct timeval chardatasavecheck_store; + if( NowTime.tv_sec > (chardatasavecheck_store.tv_sec +10)){ + chardatasavecheck_store = NowTime; + + for( i = 0; i < ConnectLen; i ++) { + CONNECT_LOCK(i); + if( Connect[i].use == TRUE + && Connect[i].state == LOGIN + && NowTime.tv_sec - Connect[i].lastCharSaveTime.tv_sec + > interval ){ + Connect[i].lastCharSaveTime = NowTime; + CONNECT_UNLOCK(i); + CHAR_charSaveFromConnect( i, FALSE ); + } else { + CONNECT_UNLOCK(i); + } + } + } else { + ; + } +} + + +#ifdef _DEATH_FAMILY_STRUCT // WON ADD 家族战存放胜负资料 +void Init_FM_PK_STRUCT() +{ + saacproto_Init_FM_PK_STRUC_send( acfd ); +} +#endif + +#ifdef _GM_BROADCAST // WON ADD 客服公告系统 +void Init_GM_BROADCAST( int loop, int time, int wait, char *msg ) +{ + int i, count = 0; + char *temp; + + BS.loop = loop; + BS.time = time; + BS.wait = wait; + BS.next_msg = 0; + + // 清空msg + memset( BS.msg, -1, sizeof(BS.msg) ); + + // 载入公告讯息 + if( ( temp = strtok( msg, " " ) ) ){ + strcpy( BS.msg[count], temp ); + for( i=1; i<10; i++ ){ + char *temp1; + if( ( temp1 = strtok( NULL, " " ) ) ){ + strcpy( BS.msg[++count], temp1 ); + } + } + } + + // 公告讯息数 + BS.max_msg_line = count; + + return; +} + +void GM_BROADCAST() +{ + int i; + static struct timeval broadcast; + int next_msg = BS.next_msg; + static int wait_time=0; + + if( BS.loop <= 0 ) return; + + if( NowTime.tv_sec > (broadcast.tv_sec + BS.time + wait_time) ){ + broadcast = NowTime; + wait_time = 0; + + if( BS.msg[next_msg] != NULL ){ + for( i = 0; i < ConnectLen; i ++) { + if( Connect[i].use == TRUE ){ + if( Connect[i].charaindex >= 0 ) + CHAR_talkToCli( Connect[i].charaindex, -1, BS.msg[next_msg], CHAR_COLORYELLOW); + } + } + } + + if( ++BS.next_msg > BS.max_msg_line ){ + BS.next_msg = 0; + wait_time = BS.wait; + + // BS.loop = 1000 时一直公告 + if( BS.loop < 1000 ) BS.loop--; + } + } +} +#endif + +/*------------------------------------------------------------ + * fd 互 valid 卅手及井升丹井毛譬屯月 + * 娄醒 + * fd int fd + * 忒曰袄 + * valid TRUE(1) + * invalid FALSE(0) + ------------------------------------------------------------*/ +ANYTHREAD INLINE int CONNECT_checkfd( int fd ) +{ + if( 0 > fd || fd >= ConnectLen ){ + return FALSE; + } + CONNECT_LOCK(fd); + if( Connect[fd].use == FALSE ){ + CONNECT_UNLOCK(fd); + return FALSE; + } else { + CONNECT_UNLOCK(fd); + return TRUE; + } +} + + +/*------------------------------------------------------------ + * cdkey 井日 fd 毛 月[ + * 娄醒 + * cd char* cdkey + * 忒曰袄 + * 白央奶伙犯奴旦弁伉皿正 方匀化} -1 及凛反巨仿□ + ------------------------------------------------------------*/ +ANYTHREAD int getfdFromCdkey( char* cd ) +{ + int i; + for( i = 0 ;i < ConnectLen ; i ++ ){ + CONNECT_LOCK(i); + if( Connect[i].use == TRUE && + strcmp( Connect[i].cdkey , cd ) == 0 ){ + CONNECT_UNLOCK(i); + return i; + } + CONNECT_UNLOCK(i); + } + return -1; +} + + +/*------------------------------------------------------------ + * charaindex 井日 fd 毛 月[ + * 陆质 及民尼永弁毛聂仁仄凶[ + * 娄醒 + * charaindex int 平乓仿及奶件犯永弁旦 + * 忒曰袄 + * 白央奶伙犯奴旦弁伉皿正 方匀化} -1 及凛反巨仿□ + ------------------------------------------------------------*/ +ANYTHREAD int getfdFromCharaIndex( int charaindex ) +{ +#if 1 + int ret; + if( !CHAR_CHECKINDEX( charaindex)) return -1; + if( CHAR_getInt( charaindex, CHAR_WHICHTYPE) != CHAR_TYPEPLAYER) return -1; + ret = CHAR_getWorkInt( charaindex, CHAR_WORKFD); + if( ret < 0 || ret >= ConnectLen ) return -1; + return ret; +#else + int i; + for( i = 0 ;i < ConnectLen ; i ++ ){ + CONNECT_LOCK(i); + if( Connect[i].use == TRUE + && Connect[i].charaindex == charaindex ){ + CONNECT_UNLOCK(i); + return i; + } + CONNECT_UNLOCK(i); + } + return -1; +#endif +} +/*------------------------------------------------------------ + * charaindex 井日 cdkey 毛 月[ + * 娄醒 + * charaindex int 平乓仿及奶件犯永弁旦 + * 忒曰袄 + * 0卅日岳 } 卅日撩 + ------------------------------------------------------------*/ +ANYTHREAD int getcdkeyFromCharaIndex( int charaindex , char *out, int outlen ) +{ + int i; + + for( i = 0 ;i < ConnectLen ; i ++ ){ + CONNECT_LOCK(i); + if( Connect[i].use == TRUE + && Connect[i].charaindex == charaindex ){ + snprintf( out, outlen, "%s" , Connect[i].cdkey ); + CONNECT_UNLOCK(i); + return 0; + } + CONNECT_UNLOCK(i); + } + return -1; +} + + +/*------------------------------------------------------------ + * 元fdid 及蛊毛茧允 + * 娄醒 + * fdid int fd及id + * 忒曰袄 + * -1 及凛反巨仿□ + ------------------------------------------------------------*/ +ANYTHREAD int getfdFromFdid( int fdid ) +{ + int i; + + for( i=0; i= 0 ){ + int a = Connect[i].charaindex; + CONNECT_UNLOCK(i); + return a; + } + CONNECT_UNLOCK(i); + } + + return -1; +} +/*------------------------------------------------------------ + * 平乓仿index 井日 fdid 毛手午户月[ + * 娄醒 + * charind int 白央奶伙犯奴旦弁伉皿正 + * 井尹曰切 fdid 分匀凶日平乓仿ind互云井仄中 + ------------------------------------------------------------*/ +ANYTHREAD int getFdidFromCharaIndex( int charind ) +{ + int i; + + for( i=0; i 10000 ) chikulatime = 0; +#ifdef _NPCSERVER_NEW + if( npcfd != -1) + NPCS_SendProbe( npcfd); +#endif + for (i=0;i 360 ){ + CONNECT_endOne_debug(i); + close(i); + } + } + // End + }//%30 + + if( chikulatime%30 == 0 ){ // 每300秒 + +#ifdef _ITEM_ADDEXP //vincent 经验提升 + if( CHAR_getWorkInt(Connect[i].charaindex,CHAR_WORKITEM_ADDEXP)>0 && + CHAR_getInt( Connect[i].charaindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER ){ +#if 1 + int charaindex, exptime; + charaindex = Connect[i].charaindex; + exptime = CHAR_getWorkInt( charaindex, CHAR_WORKITEM_ADDEXPTIME) - 300; + if( exptime <= 0 ) { + CHAR_setWorkInt( charaindex, CHAR_WORKITEM_ADDEXP, 0); + CHAR_setWorkInt( charaindex, CHAR_WORKITEM_ADDEXPTIME, 0); + CHAR_talkToCli( charaindex,-1,"提升学习经验的能力消失了!",CHAR_COLORYELLOW); + } + else { + CHAR_setWorkInt( charaindex, CHAR_WORKITEM_ADDEXPTIME, exptime); + //print("\n 检查ADDEXPTIME %d ", exptime); + + if( (exptime % (60*60)) < 300 && exptime >= (60*60) ) + { + char msg[1024]; + sprintf( msg, "提升学习经验的能力剩大约 %d 小时。", (int)(exptime/(60*60)) ); + //sprintf( msg, "提升学习经验的能力剩大约 %d 分。", (int)(exptime/(60)) ); + CHAR_talkToCli( charaindex, -1, msg, CHAR_COLORYELLOW); + } + } +#else + if(Connect[i].EDTime < CHAR_getWorkInt(Connect[i].charaindex,CHAR_WORKITEM_ADDEXPTIME)){//功能作用有效期限 + Connect[i].EDTime=Connect[i].EDTime+300; + }else{ + Connect[i].EDTime = 0; + CHAR_setWorkInt( Connect[i].charaindex, CHAR_WORKITEM_ADDEXP, 0); + CHAR_setWorkInt( Connect[i].charaindex, CHAR_WORKITEM_ADDEXPTIME, 0); + CHAR_talkToCli(Connect[i].charaindex,-1,"提升学习经验的能力消失了!",CHAR_COLORYELLOW); + } +#endif + } +#endif +#ifdef _ITEM_METAMO + if( CHAR_getWorkInt( Connect[i].charaindex, CHAR_WORKITEMMETAMO) < NowTime.tv_sec + && CHAR_getWorkInt( Connect[i].charaindex, CHAR_WORKITEMMETAMO) != 0 ){ + CHAR_setWorkInt( Connect[i].charaindex, CHAR_WORKITEMMETAMO, 0); + CHAR_setWorkInt( Connect[i].charaindex, CHAR_WORKNPCMETAMO, 0 ); //与npc对话後的变身也要变回来 + CHAR_complianceParameter( Connect[i].charaindex ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( Connect[i].charaindex , CHAR_WORKOBJINDEX )); + CHAR_send_P_StatusString( Connect[i].charaindex , CHAR_P_STRING_BASEBASEIMAGENUMBER); + CHAR_talkToCli( Connect[i].charaindex,-1,"变身失效了。",CHAR_COLORWHITE); + } +#endif +#ifdef _ITEM_TIME_LIMIT + ITEM_TimeLimit(Connect[i].charaindex); // (可开放) shan time limit of item. code:shan +#endif + }//%30 + +#ifndef _USER_CHARLOOPS + //here 原地遇敌 + if( Connect[i].stayencount ) { + if( Connect[i].BDTime < time( NULL) ) { + if( CHAR_getWorkInt(Connect[i].charaindex, CHAR_WORKBATTLEMODE ) == BATTLE_CHARMODE_NONE){ + lssproto_EN_recv( i, CHAR_getInt(Connect[i].charaindex,CHAR_X), + CHAR_getInt(Connect[i].charaindex,CHAR_Y)); + Connect[i].BDTime = time( NULL); + } + } + } +#endif +#ifdef _CHIKULA_STONE + if( chikulatime%3 == 0 && getChiStone( i) > 0) { //自动补血 + CHAR_AutoChikulaStone( Connect[i].charaindex, getChiStone( i)); + } +#endif + + if( chikulatime%6 == 0 ) { //水世界状态 +#ifdef _STATUS_WATERWORD + CHAR_CheckWaterStatus( Connect[i].charaindex); +#endif + // Nuke 0626: No enemy + if (Connect[i].noenemy>0) { + Connect[i].noenemy--; + if (Connect[i].noenemy==0) { + CHAR_talkToCli(CONNECT_getCharaindex(i),-1,"守护消失了。",CHAR_COLORWHITE); + } + } + } + //每10秒 +#ifdef _TYPE_TOXICATION //中毒 + if( Connect[i].toxication > 0 ){ + CHAR_ComToxicationHp( Connect[i].charaindex); + } +#endif + // Nuke 0624 Avoid Useless Connection + if (Connect[i].state == NOTLOGIN) { + Connect[i].cotime++; + if (Connect[i].cotime>30) { + print( "LATE" ); + CONNECT_endOne_debug(i); + close(i); + } + }else{ + Connect[i].cotime=0; + } + + if ((Connect[i].nu <= 22)) { + int r; + if (Connect[i].nu<=0) { + Connect[i].nu_decrease++; + if( Connect[i].nu_decrease >= 30 ) + Connect[i].nu_decrease = 30; + if (Connect[i].nu_decrease>22) logSpeed(i); + }else { + Connect[i].nu_decrease-=1; + if( Connect[i].nu_decrease < 0 ) + Connect[i].nu_decrease = 0; + } + r=22-Connect[i].nu_decrease; + r=(r>=15)?r:15; + lssproto_NU_send(i,r); + Connect[i].nu+=r; + } + // Nuke 1213: Flow control 2 + Connect[i].packetin--; // Remove a counter + if (Connect[i].packetin<=0) { // Time out, drop this line + print("Drop line: sd=%d\n",i); + CONNECT_endOne_debug(i); + close(i); + } +#ifdef _PETSKILL_BECOMEPIG + /*if( CHAR_getInt( Connect[i].charaindex, CHAR_BECOMEPIG) > -1 ){ //处於乌力化状态 + if( ( CHAR_getInt( Connect[i].charaindex, CHAR_BECOMEPIG ) - 10 ) <= 0 ){ //乌力时间结束了 + CHAR_setInt( Connect[i].charaindex, CHAR_BECOMEPIG, 0 ); + if( CHAR_getWorkInt( Connect[i].charaindex, CHAR_WORKBATTLEMODE ) == BATTLE_CHARMODE_NONE ){ //不是在战斗状态下 + CHAR_setInt( Connect[i].charaindex, CHAR_BECOMEPIG, -1 );//结束乌力状态 + CHAR_complianceParameter( Connect[i].charaindex ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( Connect[i].charaindex , CHAR_WORKOBJINDEX )); + CHAR_send_P_StatusString( Connect[i].charaindex , CHAR_P_STRING_BASEBASEIMAGENUMBER); + CHAR_talkToCli( Connect[i].charaindex,-1,"乌力化失效了。",CHAR_COLORWHITE); + } + } + else{ + char temp[256]; + CHAR_setInt( Connect[i].charaindex, CHAR_BECOMEPIG, CHAR_getInt( Connect[i].charaindex, CHAR_BECOMEPIG ) - 10 ); + if( CHAR_getWorkInt( Connect[i].charaindex, CHAR_WORKBATTLEMODE ) == BATTLE_CHARMODE_NONE ){ //不是在战斗状态下 + if( chikulatime%6 == 0 ){//60秒 + sprintf(temp, "乌力时间:%d秒", CHAR_getInt( Connect[i].charaindex, CHAR_BECOMEPIG )); + CHAR_talkToCli( Connect[i].charaindex,-1,temp,CHAR_COLORWHITE); + } + } + } + }*/ + if( CHAR_getWorkInt( Connect[i].charaindex, CHAR_WORKBATTLEMODE ) == BATTLE_CHARMODE_NONE ){ //不是在战斗状态下 + if( CHAR_getInt( Connect[i].charaindex, CHAR_BECOMEPIG) > -1 ){ //处於乌力化状态 + char temp[256]; + sprintf(temp, "乌力时间:%d秒", CHAR_getInt( Connect[i].charaindex, CHAR_BECOMEPIG )); + CHAR_talkToCli( Connect[i].charaindex,-1,temp,CHAR_COLORWHITE); + } + } +#endif + //10秒 +#ifdef _MAP_TIME + if(CHAR_getWorkInt(Connect[i].charaindex,CHAR_WORK_MAP_TIME) > 0 + && CHAR_getWorkInt(Connect[i].charaindex,CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE){ + CHAR_setWorkInt(Connect[i].charaindex,CHAR_WORK_MAP_TIME,CHAR_getWorkInt(Connect[i].charaindex,CHAR_WORK_MAP_TIME) - 10); + if(CHAR_getWorkInt(Connect[i].charaindex,CHAR_WORK_MAP_TIME) <= 0){ + // 时间到了,传回入口 + CHAR_talkToCli(Connect[i].charaindex,-1,"你因为受不了高热而热死!传回裂缝入口。",CHAR_COLORRED); + CHAR_warpToSpecificPoint(Connect[i].charaindex,30008,39,38); + CHAR_setInt(Connect[i].charaindex,CHAR_HP,1); + CHAR_AddCharm(Connect[i].charaindex,-3); + CHAR_send_P_StatusString(Connect[i].charaindex,CHAR_P_STRING_HP); + CHAR_send_P_StatusString(Connect[i].charaindex,CHAR_P_STRING_CHARM); + } + else{ + char szMsg[64]; + sprintf(szMsg,"在这高热的环境下你只能再待 %d 秒。",CHAR_getWorkInt(Connect[i].charaindex,CHAR_WORK_MAP_TIME)); + CHAR_talkToCli(Connect[i].charaindex,-1,szMsg,CHAR_COLORRED); + } + } +#endif + } + } + } + +#ifdef _PETSKILL_BECOMEPIG + if( checkT2 != NowTimes && (checkT2) <= NowTimes ) { + int i; + checkT2 = time(NULL); + ++chikulatime2;//每1秒 + if( chikulatime2 > 1000 ) chikulatime2 = 0; + for (i=0;i -1 ){ //处於乌力化状态 + if( ( CHAR_getInt( Connect[i].charaindex, CHAR_BECOMEPIG ) - 1 ) <= 0 ){ //乌力时间结束了 + CHAR_setInt( Connect[i].charaindex, CHAR_BECOMEPIG, 0 ); + if( CHAR_getWorkInt( Connect[i].charaindex, CHAR_WORKBATTLEMODE ) == BATTLE_CHARMODE_NONE ){ //不是在战斗状态下 + CHAR_setInt( Connect[i].charaindex, CHAR_BECOMEPIG, -1 );//结束乌力状态 + CHAR_complianceParameter( Connect[i].charaindex ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( Connect[i].charaindex , CHAR_WORKOBJINDEX )); + CHAR_send_P_StatusString( Connect[i].charaindex , CHAR_P_STRING_BASEBASEIMAGENUMBER); + CHAR_talkToCli( Connect[i].charaindex,-1,"乌力化失效了。",CHAR_COLORWHITE); + } + } + else{ + CHAR_setInt( Connect[i].charaindex, CHAR_BECOMEPIG, CHAR_getInt( Connect[i].charaindex, CHAR_BECOMEPIG ) - 1 ); + } + } + } + } + } +#endif + +} + +// Nuke 0126: Resource protection +int isThereThisIP(unsigned long ip) +{ + int i; + unsigned long ipa; + for(i = 0; i< ConnectLen ; i++ ) + if( !Connect[i].use ) continue; + if( Connect[i].state == NOTLOGIN || Connect[i].state == WHILEDOWNLOADCHARLIST ) { + memcpy(&ipa,&Connect[i].sin.sin_addr,4); + if (ipa==ip) return 1; + } + return 0; +} + +#if USE_MTIO == 0 + +int player_online = 0; + +SINGLETHREAD BOOL netloop_faster( void ) +{ + + int ret , loop_num; + struct timeval tmv; /*timeval*/ + static int fdremember = 0; + + static unsigned int total_item_use=0; + static int petcnt=0; +// static unsigned int nu_time=0; + struct timeval st, et; + unsigned int casend_interval_us , cdsend_interval_us; + int acceptmore = SERVSTATE_getAcceptmore(); + fd_set fdset; + unsigned int looptime_us; + int allowerrornum = getAllowerrornum(); + int acwritesize = getAcwriteSize(); +#ifdef _AC_PIORITY + static int flag_ac=1; + static int fdremembercopy=0; + static int totalloop=0; + static int totalfd=0; + static int totalacfd=0; + static int counter=0; +#endif + +#if 0 +#ifdef _M_SERVER + static unsigned int m_time=0; + unsigned int mm; + static int connectnum = 0; + + if (mfd < 0){ + mm=time(NULL); + if( (mm - m_time > 120) && connectnum < 5 ){ + m_time = mm; + mfd = connectmServer(getmservername(),getmserverport()); + connectnum ++; + if (mfd != -1){ + initConnectOne(mfd,NULL,0); + print("connect to mserver successed\n"); + connectnum = 0; //重设连线次数 + }else{ + print("connect to mserver failed\n"); + } + } + }else { + connectnum = 0; + } +#endif +#endif + +/* + { + int errorcode; + int errorcodelen; + int qs; + + errorcodelen = sizeof(errorcode); + qs = getsockopt( acfd, SOL_SOCKET, SO_RCVBUF , &errorcode, &errorcodelen); + //andy_log + print("\n\n GETSOCKOPT SO_RCVBUF: [ %d, %d, %d] \n", qs, errorcode, errorcodelen); + } +*/ +#ifdef _NPCSERVER_NEW + { + static unsigned int NStime=0; + static int connectNpcnum = 0; + if( (NStime + 120) < time(NULL) && connectNpcnum < 10 ){ + NStime = time(NULL); + if (npcfd < 0){ + npcfd = connectNpcServer( getnpcserveraddr(), getnpcserverport()); + connectNpcnum ++; + if (npcfd != -1){ + initConnectOne( npcfd, NULL, 0); + print("connect to NpcServer successed\n"); + NPCS_NpcSLogin_send( npcfd); + connectNpcnum = 0; //重设连线次数 + } + }else { + connectNpcnum = 0; + } + } + } +#endif + looptime_us = getOnelooptime_ms()*1000 ; + casend_interval_us = getCAsendinterval_ms()*1000; + cdsend_interval_us = getCDsendinterval_ms()*1000; + + FD_ZERO( &fdset ); + FD_SET( bindedfd ,& fdset); + tmv.tv_sec = tmv.tv_usec = 0; + ret = select( bindedfd + 1 , &fdset,(fd_set*)NULL,(fd_set*)NULL,&tmv ); + if( ret < 0 && ( errno != EINTR )){ + print( "accept select() error:%s\n", strerror(errno)); + } + if( ret > 0 && FD_ISSET(bindedfd , &fdset ) ){ + struct sockaddr_in sin; + int addrlen=sizeof( struct sockaddr_in ); + int sockfd; + sockfd = accept( bindedfd ,(struct sockaddr*) &sin , &addrlen ); + if( sockfd == -1 && errno == EINTR ){ + ; + }else if( sockfd != -1 ){ + unsigned long sinip; + int cono=1, from_acsv = 0; + if (cono_check&CONO_CHECK_LOGIN){ + if( StateTable[WHILELOGIN]+StateTable[WHILELOGOUTSAVE] > QUEUE_LENGTH1 || + StateTable[WHILEDOWNLOADCHARLIST] > QUEUE_LENGTH2 ){ + print("err State[%d,%d,%d]!!\n", StateTable[WHILELOGIN], + StateTable[WHILELOGOUTSAVE], + StateTable[WHILEDOWNLOADCHARLIST] ); + + CONNECT_checkStatecount( WHILEDOWNLOADCHARLIST); + cono=0; + } + } + if (cono_check&CONO_CHECK_ITEM) + if (total_item_use >= MAX_item_use){ + print("err item_use full!!"); + cono=0; + } + if (cono_check&CONO_CHECK_PET) + if( petcnt >= CHAR_getPetMaxNum() ){ + print("err pet_use full!!"); + cono=0; + } + + { + char temp[80]; + sprintf(temp,"%d.%d.%d.%d", + ((unsigned char *)&sin.sin_addr)[0], + ((unsigned char *)&sin.sin_addr)[1], + ((unsigned char *)&sin.sin_addr)[2], + ((unsigned char *)&sin.sin_addr)[3]); + if (strcmp(getAccountservername(),temp)==0) { + cono=1; from_acsv=1; + print("From acsv. "); + } +#ifdef _M_SERVER + if (strcmp(getmservername(),temp) == 0){ + cono=1; + print("From mserver\n"); + } +#endif + } + //print("CO"); + + { + float fs=0.0; + if( (fs = ((float)Connect[acfd].rbuse/AC_RBSIZE) ) > 0.6 ){ + print( "andy AC rbuse: %3.2f [%4d]\n", fs, Connect[acfd].rbuse ); + if( fs > 0.78 ) cono = 0; + } + } + + memcpy( &sinip, &sin.sin_addr, 4); + // Nuke *1 0126: Resource protection + if((cono == 0) || (acceptmore <= 0) || isThereThisIP( sinip) ){ + // Nuke +2 Errormessage + char mess[1024]="E伺服器忙线中,请稍候再试。"; + if (!from_acsv) + write(sockfd,mess,strlen(mess)+1); + print( "accept but drop[cono:%d,acceptmore:%d]\n", cono, acceptmore); + close( sockfd ); + }else if( sockfd < ConnectLen ){ + char mess[1024] = "A";// Nuke +2 Errormessage + if( bNewServer ) +#ifdef _SA_VERSION_70 // WON ADD 石器时代7.0 的版本控制 + mess[0]='F'; // 7.0 +#endif + else + mess[0]='$'; + + //char mess[1024]="E伺服器忙线中,请稍候再试。"; + if (!from_acsv) + send(sockfd,mess,strlen(mess)+1,0); + initConnectOne(sockfd,&sin,addrlen); + if( getNodelay() ){ + int flag = 1; + int result = setsockopt( sockfd, IPPROTO_TCP, TCP_NODELAY, + (char*)&flag, sizeof(int)); + if( result < 0 ){ + print("setsockopt TCP_NODELAY failed:%s\n", + strerror( errno )); + } else { + print( "NO" ); + } + } + }else { + // Nuke +2 Errormessage + char mess[1024]="E伺服器人数已满,请稍候再试。"; + if (!from_acsv) write(sockfd,mess,strlen(mess)+1); + close( sockfd ); + // Nuke +1 0901: Why close + } + } + } + loop_num=0; + gettimeofday( &st, NULL ); + while(1) + { + char buf[65535*2]; + int j; + //ttom+1 for the debug + static int i_tto=0; + static int i_timeNu=0; + + gettimeofday( &et, NULL ); + if( time_diff_us( et,st) >= looptime_us ) //执行每超过0.1秒资要做的的工作 + { +#define LOOP_NUM_ADD_CREDIT 5 +#define CREDIT_SPOOL 3 + switch( acceptmore) + { + case -1: + print( "#"); +#ifdef _KILL_12_STOP_GMSV // WON ADD 下sigusr2後关闭GMSV + //andy_reEdit 2003/04/28 + //system("./stop.sh"); +#endif + break; + case 0: + print( "$"); + if(!b_first_shutdown) + { + b_first_shutdown=TRUE; + i_shutdown_time=SERVSTATE_getLimittime(); + print("\n 关闭服务器时间=%d",i_shutdown_time); + } + break; + default: + { + static int i_counter=0; + // Syu ADD 定时读取Announce + static int j_counter=0; + // Syu ADD 每小时重新更新英雄战厂排行榜资料 + static int h_counter=0; + // 不会归零的计时器 + static long total_count=0; + + int i; + int item_max; + + if(i_counter>10) + {//10秒 + player_online = 0;//looptime_us +#ifdef _AC_PIORITY + //print("\n", + // (totalfd*1.0)/(totalloop*1.0), + // totalfd,totalloop,totalacfd); + totalloop=0; totalfd=0; totalacfd=0; +#endif + i_counter=0; + item_max = ITEM_getITEM_itemnum(); + total_item_use = ITEM_getITEM_UseItemnum(); + for (i=0;i 60*10 ) + {//6000 约 600秒=10分钟 + j_counter=0; + print("\n定时读取公告"); + LoadAnnounce(); +#ifdef _CHECK_BATTLETIME + check_battle_com_show(); +#endif + } + /* + #ifdef _ALLDOMAN // Syu ADD 排行榜NPC + // Syu ADD 每小时重新更新英雄战厂排行榜资料 + if ( h_counter > 60*60 ){//36000 约 3600秒=60分钟 + h_counter=0; + print("\nSyu log LoadHerolist"); + saacproto_UpdataStele_send ( acfd , "FirstLoad", "LoadHerolist" , "华义" , 0 , 0 , 0 , 999 ) ; + } + #endif + */ + if( i_timeNu != time(NULL) ) // 每整秒执行一次 + { + i_timeNu = time(NULL); + +#ifdef _DEL_DROP_GOLD + //if( total_count % 60 == 0 ) { //每分钟执行 + // GOLD_DeleteTimeCheckLoop(); + //} +#endif + //if( total_count % 60*10 == 0 ) { //每10分钟执行 + //} + + //if( total_count % 60*60 == 0 ) { //每60分钟执行 + //} + + + i_counter++; + // Syu ADD 定时读取Announce + j_counter++; + // Syu ADD 每小时重新更新英雄战厂排行榜资料 + h_counter++; + + total_count++; + } + } + + if((i_tto%60)==0) + { + i_tto=0; + print("."); + } +#ifdef _TEST_PETCREATE + if(i_tto % 30 ==0 ) + { + TEST_CreatPet(); + } +#endif + i_tto++; + + //andy add 2003/0212------------------------------------------ + CONNECT_SysEvent_Loop( ); + //------------------------------------------------------------ + } // switch() +#ifdef _AC_PIORITY + if (flag_ac==2) fdremember=fdremembercopy; + flag_ac=1; + totalloop++; +#endif + break; // Break while + } // if(>0.1sec) + + loop_num++; + +#ifdef _AC_PIORITY + switch (flag_ac) + { + case 1: + fdremembercopy=fdremember; + fdremember=acfd; + flag_ac=2; + break; + case 2: + counter++; + if (counter>=3) + { + counter=0; + fdremember=fdremembercopy+1; + flag_ac=0; + } + break; + default: + fdremember++; + break; + } +#else + fdremember++; +#endif + if( fdremember == ConnectLen ) fdremember =0; + if( Connect[fdremember].use == FALSE )continue; + if( Connect[fdremember].state == WHILECLOSEALLSOCKETSSAVE ) continue; +#ifdef _AC_PIORITY + totalfd++; + if (fdremember==acfd) totalacfd++; +#endif + /* read select */ + FD_ZERO( &fdset ); + FD_SET( fdremember , &fdset ); + tmv.tv_sec = tmv.tv_usec = 0; + ret = select( fdremember + 1, &fdset, (fd_set*)NULL,(fd_set*)NULL,&tmv); + if( ret > 0 ){ + if( FD_ISSET( fdremember, &fdset ) ){ + errno = 0; + memset( buf, 0, sizeof( buf)); + ret = read( fdremember, buf, sizeof(buf)); + if( ret > 0 && sizeof( buf ) <= ret ){ + print( "Read(%s) buf len:%d - %d !!\n", (fdremember==acfd)?"AC":"OTHERFD", ret, sizeof(buf) ); + } + + if( ret == -1 && errno == EINTR ){ + ; + } else if( ret == -1 || ret == 0 ){ + if( fdremember == acfd ){ + print( "read return:%d %s\n",ret,strerror(errno)); + print( "netloop_faster: acsv is down! aborting...\n" ); + shutdownProgram(); + exit(1); +#ifdef _M_SERVER + }else if ( fdremember == mfd ) { + CONNECT_endOne_debug(fdremember); + close(fdremember); + mfd = -1; +#endif +#ifdef _NPCSERVER_NEW + }else if ( fdremember == npcfd ) { + CONNECT_endOne_debug(fdremember); + close(fdremember); + npcfd = -1; + +#endif + } else { + if( ret == -1 ) + print( "读取返回: %d %s \n", errno, strerror( errno)); + + print( "\n玩家" ); + CONNECT_endOne_debug(fdremember ); + close( fdremember ); + continue; + } + } else { + + if( appendRB( fdremember, buf, ret ) == -2 && getErrUserDownFlg() == 1){ + CONNECT_endOne_debug(fdremember ); + close( fdremember ); + continue; + }else{ + Connect[fdremember].lastreadtime = NowTime; + Connect[fdremember].lastreadtime.tv_sec -= + DEBUG_ADJUSTTIME; + Connect[fdremember].packetin = 30; + } + } + } else { + } + } else if( ret < 0 && errno != EINTR){ + print( "读取选择错误:%s\n", strerror( errno )); + } + + for( j = 0; j < 3; j ++ ) { + char rbmess[65535*2]; + memset( rbmess, 0, sizeof( rbmess)); + if( GetOneLine_fix( fdremember, rbmess, sizeof(rbmess)) == FALSE )continue; + if( !( (rbmess[0]== '\r' && rbmess[1] == '\n') || rbmess[0] == '\n') ){ + if( fdremember == acfd ){ + if( saacproto_ClientDispatchMessage( fdremember, rbmess)< 0){ + } +#ifdef _M_SERVER + }else if ( fdremember == mfd ) { + if ( mproto_ClientDispatchMessage( fdremember, rbmess) < 0) {} +#endif +#ifdef _NPCSERVER_NEW + }else if ( fdremember == npcfd ) { + if (NSproto_DispatchMessage(fdremember,rbmess) < 0) {} + +#endif + }else{ + if( lssproto_ServerDispatchMessage( fdremember, rbmess )< 0){ + //print(" DispatchMsg_Error!!! "); + Connect[fdremember].errornum ++; + } + } + } + if( Connect[fdremember].errornum > allowerrornum ){ + print( "Too many Errors:%s close\n", + inet_ntoa(Connect[fdremember].sin.sin_addr )); + CONNECT_endOne_debug(fdremember); + close(fdremember); + break; + } + } + if( Connect[fdremember].errornum > allowerrornum ){ + continue; + } + if( Connect[fdremember].CAbufsiz > 0 && + time_diff_us( et, Connect[fdremember].lastCAsendtime) + > casend_interval_us ){ + CAsend( fdremember); + Connect[fdremember].lastCAsendtime = et; + } + if( Connect[fdremember].CDbufsiz > 0 && + time_diff_us( et, Connect[fdremember].lastCDsendtime) + > cdsend_interval_us ){ + CDsend( fdremember); + Connect[fdremember].lastCDsendtime = et; + } + if( Connect[fdremember].wbuse >0 ){ + FD_ZERO( &fdset ); + FD_SET( fdremember, &fdset ); + tmv.tv_sec = tmv.tv_usec = 0; + ret = select( fdremember + 1, + (fd_set*)NULL, &fdset, (fd_set*)NULL,&tmv); + + if( ret > 0 ){ + if( FD_ISSET( fdremember , &fdset ) ){ + //Nuke start 0907: Protect gmsv + if (fdremember == acfd) { + ret = write( fdremember , Connect[fdremember].wb , + ( Connect[fdremember].wbuse < acwritesize) ? + Connect[fdremember].wbuse : acwritesize ); + } else { +#ifdef _BACK_VERSION + ret = write( fdremember , Connect[fdremember].wb , + ( Connect[fdremember].wbuse < acwritesize) ? + Connect[fdremember].wbuse : acwritesize ); +#else + ret = write( fdremember , Connect[fdremember].wb , + ( Connect[fdremember].wbuse < 16384) ? + Connect[fdremember].wbuse : 16384 ); +#endif + } + // Nuke end + + if( ret == -1 && errno == EINTR ){ + ; + } else if( ret == -1 ){ + CONNECT_endOne_debug(fdremember ); + close( fdremember ); +#ifdef _M_SERVER + if (fdremember == mfd ) mfd =-1; +#endif +#ifdef _NPCSERVER_NEW + if (fdremember == npcfd ) npcfd =-1; +#endif + continue; + } else if( ret > 0 ){ + shiftWB( fdremember, ret ); + } + } + } else if( ret < 0 && errno != EINTR ){ + print( "select() error:%s\n", strerror(errno)); + } + } + /* 正奶丞失它玄及质 */ + if( fdremember == acfd +#ifdef _M_SERVER + || fdremember == mfd +#endif +#ifdef _NPCSERVER_NEW + || fdremember == npcfd +#endif + ) + continue; + + //ttom start : because of the second have this + if( Connect[fdremember].close_request ){ + print( "强迫关闭:%s \n", + inet_ntoa(Connect[fdremember].sin.sin_addr )); + CONNECT_endOne_debug(fdremember); + close(fdremember); + continue; + } + //ttom end + } + return TRUE; +} +#endif /* if USE_MTIO == 0 */ + +ANYTHREAD void outputNetProcLog( int fd, int mode) +{ + int i; + int c_use=0,c_notdetect=0 ; + int c_ac=0, c_cli=0 , c_adm =0, c_max=0; + int login=0; + char buffer[4096]; + char buffer2[4096]; + + strcpysafe(buffer,sizeof(buffer), "Server Status\n"); + c_max = ConnectLen; + + + for(i=0;i= 0 ){ + login ++; + } + } + CONNECT_UNLOCK(i); + } + + snprintf( buffer2 , sizeof( buffer2 ) , + "connect_use=%d\n" + "connect_notdetect=%d\n" + "connect_ac=%d\n" + "connect_cli=%d\n" + "connect_adm=%d\n" + "connect_max=%d\n" + "login=%d\n", + c_use , c_notdetect,c_ac,c_cli,c_adm,c_max,login ); + strcatsafe( buffer , sizeof(buffer),buffer2 ); + { + int char_max = CHAR_getCharNum(); + int char_use = 0 ; + int pet_use = 0; + for(i=0;i + +/* + 邰卅 醒凶切 + */ +pthread_t main_thread , io_thread; +int mt_r1, mt_r2; + +/* + IO旦伊永玉及 匹及夫弘 + */ +MUTLITHREAD void MTIO_print( char *s ) +{ + fprintf( stderr , "%s", s ); +} + +/* + + 穴伙民旦伊永玉棕雁毛赓渝祭允月 + + */ +static void MTIO_loop( void ); +void mainloop(void); /* main.c */ +SINGLETHREAD int +MTIO_setup( void ) +{ + if( pthread_create( &main_thread , NULL , (void *)mainloop, + &mt_r1 ) ){ + print( "cannot create main thread\n" ); + return -1; + } + if( pthread_create( &io_thread , NULL, (void*)MTIO_loop, &mt_r2 ) ){ + print( "cannot create io thread\n" ); + return -1; + } + return 0; +} +SINGLETHREAD void +MTIO_join( void ) +{ + pthread_join( main_thread, NULL ); + pthread_join( io_thread, NULL ); +} + + +/* + * 引月切允木匀升 appendRB + * TRUE : 岳 + * FALSE : 撩 + * + * 签账仇及丹尹卅中卅[ + */ +MUTLITHREAD static BOOL MTIO_appendRB( int conindex, char *src, int length ) +{ + CONNECT_LOCK(conindex); + if( ( Connect[conindex].rbuse + length ) > MTIO_FIXED_BUFSIZE ){ + CONNECT_UNLOCK(conindex); + return FALSE; + } + memcpy( Connect[conindex].rb + Connect[conindex].rbuse , + src, length ); + Connect[conindex].rbuse += length; + + CONNECT_UNLOCK(conindex); + + return TRUE; +} +MUTLITHREAD static BOOL MTIO_appendWB( int conindex, char *src, int length ) +{ + CONNECT_LOCK(conindex); + if( ( Connect[conindex].wbuse + length ) > MTIO_FIXED_BUFSIZE ){ + CONNECT_UNLOCK(conindex); + return FALSE; + } + memcpy( Connect[conindex].wb + Connect[conindex].wbuse , + src, length ); + Connect[conindex].wbuse += length; + + CONNECT_UNLOCK(conindex); + return FALSE; +} + +MUTLITHREAD static void MTIO_shiftWB( int conindex, int len ) +{ + CONNECT_LOCK(conindex); + memmove( Connect[conindex].wb, Connect[conindex].wb + len, + Connect[conindex].wbuse - len ); + Connect[conindex].wbuse -= len; + CONNECT_UNLOCK(conindex); +} + +/* + 1垫午曰分允[午曰分仄凶卅互今毛井尹允 + 嫖簧祭及凶户} outlen 卞反勾友卞蜗坌卅扔奶术互反中匀化月午移烂允月冗 + */ +MUTLITHREAD int MTIO_getOneLine( int conindex, char *out, int outlen ) +{ + int i; + char *p; + CONNECT_LOCK(conindex); + + p = Connect[conindex].rb; + for(i=0 ; i < (outlen-1) && i < Connect[conindex].rbuse ; i++ ){ + out[i] = p[i]; + if( p[i] == '\n' ){ + int len = i+1; + /* 敦岳仄化中月″″*/ + memmove( Connect[conindex].rb, Connect[conindex].rb+len, + Connect[conindex].rbuse - len ); + Connect[conindex].rbuse -= len; + CONNECT_UNLOCK(conindex); + out[len]=0; + + return len; + } + } + /* 垫反卅中 */ + CONNECT_UNLOCK(conindex); + return 0; +} + + + +/* + IO 分仃毛支月捩菁伙□皿 + */ +MUTLITHREAD static void +MTIO_loop( void ) +{ + while(1){ + int ret , i; + fd_set fds; + struct timeval tmv; + char tmp[MTIO_FIXED_BUFSIZE]; + + MTIO_print("$"); +#if MTIO_DEBUG_LOG_REDUCE + usleep( 100 * 1000 ); +#endif + + /* 引内accept仄切扎丹升 */ + tmv.tv_sec = tmv.tv_usec = 0; + FD_ZERO( &fds ); + FD_SET( bindedfd, &fds ); + ret = select( bindedfd+1, &fds, (fd_set*)NULL,(fd_set*)NULL,&tmv); + if( ret > 0 && FD_ISSET( bindedfd, &fds ) ){ + struct sockaddr_in sin; + int addrlen = sizeof( struct sockaddr_in ); + int sockfd; + sockfd = accept( bindedfd, (struct sockaddr*) &sin, &addrlen ); + if( sockfd == -1 && errno == EINTR ){ + ; + } else if( sockfd != -1 ){ + int acceptmore = SERVSTATE_getAcceptmore(); + MTIO_print("CO" ); + if( acceptmore <= 0 ){ + MTIO_print( "accept but drop\n" ); + close( sockfd ); + } else if( sockfd < ConnectLen ){ + if( getNodelay() ){ + + int flag = 1, result; + result = setsockopt( sockfd, IPPROTO_TCP, TCP_NODELAY, + (char*)&flag,sizeof(int)); + if( result == 0 ) MTIO_print( "NO" ); + } + initConnectOne( sockfd,&sin, addrlen ); + } else { + MTIO_print( "CO_full" ); + close(sockfd ); + } + } + } /* FD_ISSET */ + + FD_ZERO( &fds ); + for(i = 0; i< ConnectLen ; i++ ){ + CONNECT_LOCK(i); + if( Connect[i].use ) FD_SET( i , &fds ); + CONNECT_UNLOCK(i); + } + /* 穴伙民旦伊永玉卅及匹谨匀化手方中及分[ 50ms引匀化心月*/ + tmv.tv_sec = 0; + tmv.tv_usec = 50 * 1000; + ret = select( ConnectLen+1, &fds, (fd_set*)NULL,(fd_set*)NULL,&tmv ); + if( ret > 0 ) { + for(i=0;i 0 ){ + MTIO_appendRB( i, tmp, r ); + } else { + if( i == acfd ){ + MTIO_print( "saac is down???? \n" ); + sigshutdown( -1 ); + exit(1); + } else { + MTIO_print("REr" ); + /* 穴伙民旦伊永玉匹反}白仿弘毛凶化月分仃卞允月 */ + CONNECT_setClosed(i,1); + } + } + } + } + /* 勾亢卞write */ + FD_ZERO( &fds ); + for(i=0;i 0 ) FD_SET( i ,&fds ); + CONNECT_UNLOCK_ARG2(i,2620); + } + tmv.tv_sec = tmv.tv_usec = 0; + ret = select( ConnectLen+1, (fd_set*)NULL,&fds,(fd_set*)NULL,&tmv); + if( ret > 0 ) { + for(i=0;i 0 ){ + MTIO_shiftWB( i, w ); + } else if( w == -1 ){ + MTIO_print( "WEr" ); + CONNECT_setClosed(i,1); + close(i); + continue; + } + } + } + } +} +/* + I/O匹卅中旦伊永玉井日及心裟壬木月[ + close反I/O旦伊永玉匹反域濠方壬卅中 + */ +MUTLITHREAD static void closeCheck( void ) +{ + int i; + for(i=0;i allowerrornum ){ + CONNECT_setClosed(i,1); + close(i); + continue; + } + } + } + { + static struct timeval cacd_check_store_time; + if( time_diff( NowTime , cacd_check_store_time ) > 0.1 ){ + cacd_check_store_time = NowTime; + CAcheck(); + CDcheck(); + closeCheck(); + MTIO_print("!"); + } + } + return TRUE; +} + +MUTLITHREAD int lsrpcClientWriteFunc( int fd , char* buf , int size ) +{ + int r; + + if( CONNECT_getUse_debug(fd,2573) == FALSE ){ + return FALSE; + } + r = MTIO_appendWB( fd, buf, size ); + return r; +} + + +#endif /* if USE_MTIO */ +// Nuke start 08/27: For acceleration avoidance +//ttom+1 +#define m_cktime 500 +//static float m_cktime=0; + +int checkWalkTime(int fd) +{ + int me, interval; + //ttom + float f_Wtime,f_WLtime,f_interval; + // Nuke + return 0; + + //ARM&Tom correct + //me=CONNECT_getCharaindex(fd); + me=fd; + Connect[me].Walktime = time(0); + gettimeofday( &Connect[me].Wtime, (struct timezone*)NULL);// + interval = abs(Connect[me].Walktime - Connect[me].lastWalktime); + //ttom + f_Wtime =Connect[me].Wtime.tv_sec*1000+Connect[me].Wtime.tv_usec/1000; + f_WLtime=Connect[me].WLtime.tv_sec*1000+Connect[me].WLtime.tv_usec/1000; + f_interval=abs(f_Wtime-f_WLtime); + //ttom + Connect[me].Walkrestore--; + + if (Connect[me].Walkrestore <= 0) { + //print("Walkspool restored "); + Connect[me].Walkspool = WALK_SPOOL; + Connect[me].Walkrestore = WALK_RESTORE; + } + if (f_interval > m_cktime ) { + Connect[me].WLtime = Connect[me].Wtime; + Connect[me].Walkcount = 0; + } else { + Connect[me].Walkcount++; + if (Connect[me].Walkcount > 1) { + Connect[me].Walkspool--; + if (Connect[me].Walkspool > 0) { + Connect[me].Walkcount = 0; + print("Walkspool consumed as %d", Connect[me].Walkspool); + return 0; + } + /*Connect[me].Walkspool=WALK_SPOOL; + Connect[me].Walkrestore=WALK_RESTORE; + print("Walk dropped \n"); + Connect[me].credit=-10; + return 0;*/ + return -1; + } + } + return 0; +} +int setBtime(int fd) +{ + int me, interval; + //ARM & Tom + //me=CONNECT_getCharaindex(fd); + me=fd; + Connect[me].BEOrestore--; + if (Connect[me].BEOrestore <= 0) { + Connect[me].BEOrestore = BEO_RESTORE; + Connect[me].BEOspool = BEO_SPOOL; + //print("BEOspool restored "); + } + Connect[me].lastlastBtime = Connect[me].lastBtime; + Connect[me].lastBtime = Connect[me].Btime; + Connect[me].Btime = time(0); + interval = abs(Connect[me].Btime - Connect[me].lastlastBtime); + //print("B3interval:%d ",interval); + if ( interval < B3_TOLERANCE ) { + Connect[me].BEOspool--; + //print("B3spool consumed as:%d ",Connect[me].BEOspool); + if (Connect[me].BEOspool <= 0) return -1; + else return 0; + } else return 0; +} +int checkBEOTime(int fd) +{ + int me, interval; + //ARM & Tom + //me=CONNECT_getCharaindex(fd); + me=fd; + Connect[me].EOtime = time(0); + interval = abs(Connect[me].EOtime - Connect[me].Btime); + //print("BEOinterval:%d ",interval); + + if ( interval < BEO_TOLERANCE) { + Connect[me].BEOspool--; + //print("BEOspool consumed as:%d ",Connect[me].BEOspool); + // Nuke 0626: Do not kick out + if (Connect[me].BEOspool <= 0) { Connect[me].nu_decrease++; return -1; } + else return 0; + } else return 0; +} +int ITEM_getRatio() +{ + int i, r; + int item_max = ITEM_getITEM_itemnum(); + int item_use = 0; + for(i=0;i 进入了sigusr2了\n"); + f = fopen("./gm_sigusr_command", "r"); + memset( message, 0, sizeof(message)); + memset( message2, 0, sizeof(message2)); + + if( f ){ + fscanf(f,"%s",message); + print("fev ==> 档案内容(%s)\n",message); + if( strcmp(message,"") == 0 + || strcmp(message,"Shutdown") == 0){ + if( fgets(message2, sizeof(message2), f) ){ + print("\nReceived Shutdown signal...n分钟後维护\n\n"); + lssproto_Shutdown_recv(0, "hogehoge", atoi(message2)); // n分钟後维修 + } + else{ + print("\nReceived Shutdown signal...\n\n"); + lssproto_Shutdown_recv(0, "hogehoge", 5); // 5分钟後维修 + } + } + else + { + print("fev ==> 执行GM指令\n"); + func = gm_CHAR_getChatMagicFuncPointer(message,TRUE); + if( func ){ + if( fgets(message2, sizeof(message2), f) ) + print("fev ==> 参数内容(%s)\n",message2); + + func(1000,message2); + } + } + fclose(f); + } + else{ + print("\nReceived Shutdown signal...\n\n"); + lssproto_Shutdown_recv(0, "hogehoge", 5); // 5分钟後维修 + } + signal(SIGUSR2,sigusr2); +#else + signal(SIGUSR2,sigusr2); + print("\nReceived Shutdown signal...\n\n"); + lssproto_Shutdown_recv(0, "hogehoge", 5); // 5分钟後维修 +#endif +} + +// Nuke end +//ttom start +void CONNECT_set_watchmode(int fd, BOOL B_Watch) +{ + int me; + me=CONNECT_getCharaindex(fd); + Connect[me].in_watch_mode = B_Watch; +} +BOOL CONNECT_get_watchmode(int fd) +{ + int me; + BOOL B_ret; + me=CONNECT_getCharaindex(fd); + B_ret=Connect[me].in_watch_mode; + return B_ret; +} +BOOL CONNECT_get_shutup(int fd) +{ + int me; + BOOL B_ret; + me=CONNECT_getCharaindex(fd); + B_ret=Connect[me].b_shut_up; + return B_ret; +} +void CONNECT_set_shutup(int fd,BOOL b_shut) +{ + int me; + me=CONNECT_getCharaindex(fd); + Connect[me].b_shut_up = b_shut; +} +unsigned long CONNECT_get_userip(int fd) +{ + unsigned long ip; + memcpy(&ip,&Connect[fd].sin.sin_addr, sizeof(long)); + return ip; +} +void CONNECT_set_pass(int fd,BOOL b_ps) +{ + int me; + me=CONNECT_getCharaindex(fd); + Connect[me].b_pass = b_ps; +} +BOOL CONNECT_get_pass(int fd) +{ + int me; + BOOL B_ret; + me=CONNECT_getCharaindex(fd); + B_ret=Connect[me].b_pass; + return B_ret; +} +void CONNECT_set_first_warp(int fd,BOOL b_ps) +{ + int me; + me=CONNECT_getCharaindex(fd); + Connect[me].b_first_warp = b_ps; +} +BOOL CONNECT_get_first_warp(int fd) +{ + int me; + BOOL B_ret; + me=CONNECT_getCharaindex(fd); + B_ret=Connect[me].b_first_warp; + return B_ret; +} +void CONNECT_set_state_trans(int fd,int a) +{ + int me; + me=CONNECT_getCharaindex(fd); + Connect[me].state_trans=a; +} +int CONNECT_get_state_trans(int fd) +{ + int me,i_ret; + me=CONNECT_getCharaindex(fd); + i_ret=Connect[me].state_trans; + return i_ret; +} +//ttom end + +// Arminius 6.22 encounter +int CONNECT_get_CEP(int fd) +{ + return Connect[fd].CEP; +} + +void CONNECT_set_CEP(int fd, int cep) +{ + Connect[fd].CEP=cep; +} +// Arminius end + +// Arminius 7.12 login announce +int CONNECT_get_announced(int fd) +{ + return Connect[fd].announced; +} + +void CONNECT_set_announced(int fd, int a) +{ + Connect[fd].announced=a; +} + +// shan trade(DoubleCheck) begin +int CONNECT_get_confirm(int fd) +{ + return Connect[fd].confirm_key; +} +void CONNECT_set_confirm(int fd, BOOL b) +{ + Connect[fd].confirm_key = b; +} +// end + +#ifdef _BLACK_MARKET +int CONNECT_get_BMList(int fd, int i) +{ + return Connect[fd].BMSellList[i]; +} +void CONNECT_set_BMList(int fd,int i, int b) +{ + Connect[fd].BMSellList[i] = b; +} +#endif + +#ifdef _NO_WARP +// shan hjj add Begin +int CONNECT_get_seqno(int fd) +{ + return Connect[fd].seqno; +} +void CONNECT_set_seqno(int fd, int a) +{ + if( (Connect[fd].seqno==CHAR_WINDOWTYPE_QUIZ_MAIN)&&(a==0) ) + a = CHAR_WINDOWTYPE_QUIZ_MAIN; + Connect[fd].seqno = a; +} +int CONNECT_get_selectbutton(int fd) +{ + return Connect[fd].selectbutton; +} +void CONNECT_set_selectbutton(int fd, int a) +{ + Connect[fd].selectbutton = a; +} +// shan End +#endif + +int isDie(int fd) +{ + return (Connect[fd].die); +} + +void setDie(int fd) +{ + Connect[fd].die=1; +} + +int checkNu(fd) +{ + Connect[fd].nu--; + //print("NU=%d\n",Connect[fd].nu); + if (Connect[fd].nu<0) return -1; + return 0; +} + +int checkKe(fd) +{ + Connect[fd].ke--; + //print("KE=%d\n",Connect[fd].ke); + if (Connect[fd].ke<0) return -1; + return 0; +} + +// Nuke start 0626: For no enemy function +void setNoenemy(fd) +{ + Connect[fd].noenemy=6; +} +void clearNoenemy(fd) +{ + Connect[fd].noenemy=0; +} +int getNoenemy(fd) +{ + return Connect[fd].noenemy; +} +// Nuke end + +// Arminius 7/2: Ra's amulet +void setEqNoenemy(int fd, int level) +{ + Connect[fd].eqnoenemy=level; +} + +void clearEqNoenemy(int fd) +{ + Connect[fd].eqnoenemy=0; +} + +int getEqNoenemy(int fd) +{ + return Connect[fd].eqnoenemy; +} + +#ifdef _Item_MoonAct +void setEqRandenemy(int fd, int level) +{ + Connect[fd].eqrandenemy=level; +} + +void clearEqRandenemy(int fd) +{ + Connect[fd].eqrandenemy=0; +} + +int getEqRandenemy(int fd) +{ + return Connect[fd].eqrandenemy; +} + +#endif + +#ifdef _CHIKULA_STONE +void setChiStone(int fd, int nums) +{ + Connect[fd].chistone=nums; +} +int getChiStone(int fd) +{ + return Connect[fd].chistone; +} +#endif + +// Arminius 7.31 cursed stone +void setStayEncount(int fd) +{ + Connect[fd].stayencount=1; +} + +void clearStayEncount(int fd) +{ + Connect[fd].stayencount=0; +} + +int getStayEncount(int fd) +{ + return Connect[fd].stayencount; +} + +void CONNECT_setBDTime( int fd, int nums) +{ + Connect[fd].BDTime = nums; +} + +int CONNECT_getBDTime( int fd) +{ + return Connect[fd].BDTime; +} + +#ifdef _TYPE_TOXICATION +void setToxication( int fd, int flg) +{ + Connect[fd].toxication = flg; +} +int getToxication( int fd) +{ + return Connect[fd].toxication; +} +#endif + +#ifdef _BATTLE_TIMESPEED +void RescueEntryBTime( int charaindex, int fd, unsigned int lowTime, unsigned int battletime) +{ + int NowTime = (int)time(NULL); + + Connect[fd].CBTime = NowTime; +//Connect[fd].CBTime+battletime +} + +BOOL CheckDefBTime( int charaindex, int fd, unsigned int lowTime, unsigned int battletime, unsigned int addTime)//lowTime延迟时间 +{ + int delayTime = 0; + unsigned int NowTime = (unsigned int)time(NULL); + + //print(" NowTime=%d lowTime=%d battleTime=%d CBTime=%d", NowTime, lowTime, battletime, Connect[fd].CBTime); + + lowTime += battletime; + if( (Connect[fd].CBTime+battletime) > lowTime ) lowTime = Connect[fd].CBTime+battletime; + if( NowTime < lowTime ){//lowTime应该的战斗结束时间 + int r=0; + delayTime = lowTime - NowTime; + delayTime = ( delayTime<=0 )?1:delayTime; + r = (-4)*(delayTime+2); + lssproto_NU_send( fd, r); + Connect[fd].nu += r; + } + //Connect[fd].BDTime = (NowTime+20)+delayTime; + Connect[fd].BDTime = (NowTime+rand()%5)+delayTime+addTime; // 恶宝等待时间 + //print(" BDTime=%d ", Connect[fd].BDTime); + return TRUE; +} +#endif + +#ifdef _CHECK_GAMESPEED +int getGameSpeedTime( int fd) +{ + return Connect[fd].gamespeed; +} +void setGameSpeedTime( int fd, int times) +{ + Connect[fd].gamespeed =times; +} +#endif + + +BOOL MSBUF_CHECKbuflen( int size, float defp) +{ + if( mfd == -1 ) return FALSE; + if( Connect[mfd].wbuse + size >= WBSIZE*defp) return FALSE; + + return TRUE; +} + diff --git a/gmsv/npc/11npc_action.c b/gmsv/npc/11npc_action.c new file mode 100644 index 0000000..26c85e5 --- /dev/null +++ b/gmsv/npc/11npc_action.c @@ -0,0 +1,137 @@ +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "npc_action.h" + +/* + * 皿伊奶乩□及失弁扑亦件卞 杀允月NPC[ + * 签卞韵曰忒仄凶曰允月分仃分互[ + * 汹仁]引凶反 匀化中月及失弁扑亦件卞反 杀仄卅中[ + * + * 娄醒“ + * msgcol: 丢永本□斥及缙[犯白巧伙玄反疵缙 + * normal: 骚卞韵匀化五凶凛支 躲卅失弁扑亦件卞覆仄化及忒蚕 + * attack: 猾失弁扑亦件卞覆允月忒蚕 + * damage: 母丢□斥毛熬仃凶失弁扑亦件卞覆允月忒蚕 + * down: 逦木月失弁扑亦件卞覆允月忒蚕 + * sit: 甄月失弁扑亦件卞覆仄化及忒蚕 + * hand: 澎毛蕊月失弁扑亦件卞覆仄化及忒蚕 + * pleasure: 减少失弁扑亦件卞覆仄化及忒蚕 + * angry: 变月失弁扑亦件卞覆仄化及忒蚕 + * sad: 仄戈失弁扑亦件卞覆仄化及忒蚕 + * guard: 布□玉允月失弁扑亦件卞覆仄化及忒蚕 + */ + + +#define NPC_ACTION_MSGCOLOR_DEFAULT CHAR_COLORYELLOW + +enum { + CHAR_WORK_MSGCOLOR = CHAR_NPCWORKINT1, +}; + +/********************************* +* 赓渝质 +*********************************/ +BOOL NPC_ActionInit( int meindex ) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + int tmp; + + tmp = NPC_Util_GetNumFromStrWithDelim( argstr, "msgcol"); + if( tmp == -1 ) tmp = NPC_ACTION_MSGCOLOR_DEFAULT; + CHAR_setWorkInt( meindex, CHAR_WORK_MSGCOLOR, tmp); + + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPEACTION ); + + + return TRUE; +} + + + + +/********************************* +* 仄井仃日木凶凛及质 +*********************************/ +void NPC_ActionTalked( int meindex , int talkerindex , char *szMes , + int color ) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[64]; + + /* 皿伊奶乩□卞覆仄化分仃 杀允月 */ + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) { + return; + } + /* ㄠ弘伉永玉动 及心 */ + if( !NPC_Util_charIsInFrontOfChar( talkerindex, meindex, 1 )) return; + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + + if( NPC_Util_GetStrFromStrWithDelim( argstr, + "normal", + buf, sizeof( buf)) + != NULL ) + { + CHAR_talkToCli( talkerindex, meindex ,buf , + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR )); + } + +} +/********************************* +* watch质 +*********************************/ +void NPC_ActionWatch( int meobjindex, int objindex, CHAR_ACTION act, + int x,int y,int dir, int* opt,int optlen ) +{ + int meindex; + int index; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[64]; + int i; + struct { + CHAR_ACTION act; + char *string; + }searchtbl[] = { + { CHAR_ACTATTACK, "attack"}, + { CHAR_ACTDAMAGE, "damage"}, + { CHAR_ACTDOWN, "down"}, + { CHAR_ACTSIT, "sit"}, + { CHAR_ACTHAND, "hand"}, + { CHAR_ACTPLEASURE, "pleasure"}, + { CHAR_ACTANGRY, "angry"}, + { CHAR_ACTSAD, "sad"}, + { CHAR_ACTGUARD, "guard"}, + { CHAR_ACTNOD, "nod"}, + { CHAR_ACTTHROW, "throw"}, + }; + + if( OBJECT_getType( objindex) != OBJTYPE_CHARA) return; + index = OBJECT_getIndex( objindex); + /* 皿伊奶乩□卞及心 杀允月 */ + if( CHAR_getInt( index, CHAR_WHICHTYPE) != CHAR_TYPEPLAYER) return; + + meindex = OBJECT_getIndex( meobjindex); + + /* 轾五宁匀化ㄠ弘伉永玉匹卅中午 杀仄卅中 */ + if( NPC_Util_isFaceToFace( meindex, index, 1 ) != TRUE ) return; + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + + for( i = 0; i < arraysizeof( searchtbl); i ++ ) { + if( searchtbl[i].act == act) { + if( NPC_Util_GetStrFromStrWithDelim( argstr, + searchtbl[i].string, + buf, sizeof( buf)) + != NULL ) + { + CHAR_talkToCli( index, meindex ,buf , + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR )); + break; + } + } + } +} diff --git a/gmsv/npc/makefile b/gmsv/npc/makefile new file mode 100644 index 0000000..98a515d --- /dev/null +++ b/gmsv/npc/makefile @@ -0,0 +1,3103 @@ +INCFLAGS=-I. -I../include + + +CFLAGS=-w -O3 $(INCFLAGS) + +PROG=libnpc.a + +SRC=readnpc.c npcgen.c npctemplate.c npccreate.c npcutil.c \ +npc_warp.c npc_townpeople.c \ +npc_msg.c npc_healer.c npc_oldman.c \ +npc_storyteller.c npc_dengon.c npc_doorman.c \ +npc_npcenemy.c npc_itemchange.c \ +npc_action.c npc_windowman.c npc_savepoint.c \ +npc_windowhealer.c npc_itemshop.c npc_sysinfo.c \ +npc_duelranking.c npc_petskillshop.c npc_petshop.c \ +npc_signboard.c npc_warpman.c npc_exchangeman.c \ +npc_timeman.c npc_bodylan.c npc_mic.c \ +npc_luckyman.c npc_bus.c npc_charm.c npc_quiz.c \ +npc_poolitemshop.c npc_checkman.c npc_janken.c \ +npc_transmigration.c npc_makepair.c \ +npc_familyman.c npc_fmdengon.c npc_fmwarpman.c \ +npc_fmhealer.c npc_bankman.c npc_fmpkman.c\ +npc_airplane.c npc_scheduleman.c npc_fmpkcallman.c\ +npc_manorsman.c npc_riderman.c npc_fmletter.c npc_petmaker.c \ +npc_gamblemaster.c npc_gambleroulette.c npc_petfusion.c\ +npc_stoneserviceman.c npc_newnpcman.c npc_gamblebank.c \ +npc_petracemaster.c npc_petracepet.c npc_bigsmallmaster.c \ +npc_bigsmallpet.c npc_auctioneer.c npc_freepetskillshop.c \ +npc_eventaction.c \ +npc_mtradenpcman.c npc_blackmarket.c npc_transerman.c npc_pauctionman.c npc_alldoman.c\ +npc_sellsthman.c \ +npc_welfare.c npc_verywelfare.c npc_welfare2.c \ +npc_raceman.c + +OBJ=$(SRC:.c=.o) + +ifeq (0,$(MAKELEVEL)) +CC=gcc +RM=rm -f +AR=ar cr +MV=mv +RANLIB=ranlib +SED=sed +SHELL=/bin/sh +endif + +all: $(PROG) + +$(PROG): $(OBJ) + $(RM) $(PROG) + $(AR) $(PROG) $(OBJ) + $(RANLIB) $(PROG) + +depend: + $(MV) makefile makefile.bak + $(SED) -ne '1,/^# DO NOT DELETE THIS LINE/p' makefile.bak>makefile + $(CC) $(INCFLAGS) -M $(SRC) >> makefile + +clean: + $(RM) $(PROG) + $(RM) $(OBJ) + $(RM) *~ + +distclean: + $(RM) $(PROG) + $(RM) $(OBJ) + $(RM) *~ + $(MV) makefile makefile.bak + $(SED) -ne '1,/^# DO NOT DELETE THIS LINE/p' makefile.bak>makefile + $(RM) makefile.bak + +# DO NOT DELETE THIS LINE +readnpc.o: readnpc.c /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/string.h ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h ../include/common.h /usr/include/errno.h \ + /usr/include/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/asm/errno.h ../include/npctemplate.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/char_base.h ../include/skill.h \ + ../include/title.h ../include/addressbook.h ../include/net.h \ + /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/npccreate.h +npcgen.o: npcgen.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/common.h /usr/include/stdio.h /usr/include/bits/types.h \ + /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/include/bits/wchar.h /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/npccreate.h ../include/util.h /usr/include/sys/time.h \ + /usr/include/time.h /usr/include/bits/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/npctemplate.h ../include/char_base.h \ + ../include/skill.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/buf.h ../include/object.h \ + ../include/readmap.h ../include/handletime.h ../include/map_deal.h +npctemplate.o: npctemplate.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/stdio.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/string.h ../include/common.h /usr/include/errno.h \ + /usr/include/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/asm/errno.h ../include/npctemplate.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/char_base.h ../include/skill.h \ + ../include/title.h ../include/addressbook.h ../include/net.h \ + /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/buf.h ../include/char_data.h \ + ../include/item.h ../include/char.h ../include/handletime.h \ + ../include/anim_tbl.h ../include/configfile.h +npccreate.o: npccreate.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/string.h ../include/common.h /usr/include/errno.h \ + /usr/include/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/asm/errno.h ../include/npccreate.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/npctemplate.h ../include/char_base.h \ + ../include/skill.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/buf.h ../include/readmap.h \ + ../include/char_data.h ../include/item.h ../include/char.h \ + ../include/handletime.h ../include/configfile.h +npcutil.o: npcutil.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/common.h /usr/include/stdio.h /usr/include/bits/types.h \ + /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/include/bits/wchar.h /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h ../include/char.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/configfile.h ../include/object.h ../include/map_deal.h \ + ../include/npcutil.h ../include/npc_door.h ../include/readmap.h \ + ../include/npccreate.h ../include/enemy.h ../include/family.h \ + ../include/saacproto_cli.h ../include/saacproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h +npc_warp.o: npc_warp.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/object.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/map_deal.h ../include/readmap.h \ + ../include/npccreate.h ../include/npcutil.h ../include/handletime.h \ + ../include/npc_eventaction.h +npc_townpeople.o: npc_townpeople.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h ../include/object.h \ + ../include/common.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/handletime.h ../include/anim_tbl.h \ + ../include/npc_door.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/string.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h ../include/npcutil.h +npc_msg.o: npc_msg.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h ../include/char.h ../include/common.h \ + /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/npcutil.h +npc_healer.o: npc_healer.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/string.h /usr/include/ctype.h /usr/include/endian.h \ + /usr/include/bits/endian.h ../include/object.h ../include/common.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/npcutil.h ../include/readmap.h +npc_oldman.o: npc_oldman.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h ../include/object.h ../include/common.h \ + /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/npcutil.h ../include/npc_oldman.h \ + ../include/readmap.h +npc_storyteller.o: npc_storyteller.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h ../include/char.h \ + ../include/common.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h +npc_dengon.o: npc_dengon.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/time.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/time.h /usr/include/bits/types.h \ + /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/include/bits/wchar.h /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/string.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h ../include/npcutil.h \ + ../include/handletime.h +npc_doorman.o: npc_doorman.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/object.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/handletime.h ../include/npc_doorman.h \ + ../include/npc_door.h ../include/npcutil.h ../include/configfile.h +npc_npcenemy.o: npc_npcenemy.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/npc_npcenemy.h \ + ../include/battle.h ../include/enemy.h ../include/readmap.h \ + ../include/encount.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/configfile.h ../include/anim_tbl.h \ + ../include/handletime.h ../include/npc_eventaction.h +npc_itemchange.o: npc_itemchange.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/saacproto_cli.h \ + ../include/saacproto_util.h ../include/readmap.h ../include/battle.h \ + ../include/log.h ../include/enemy.h ../include/handletime.h \ + ../include/npc_eventaction.h ../include/npc_itemchange.h +npc_action.o: npc_action.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/npc_action.h +npc_windowman.o: npc_windowman.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/configfile.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/npc_windowman.h +npc_savepoint.o: npc_savepoint.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/object.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/npcutil.h ../include/npc_oldman.h \ + ../include/readmap.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/log.h +npc_windowhealer.o: npc_windowhealer.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/npc_windowhealer.h +npc_itemshop.o: npc_itemshop.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/pet_skill.h \ + ../include/npc_eventaction.h ../include/readmap.h ../include/log.h \ + ../include/family.h +npc_sysinfo.o: npc_sysinfo.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/char_event.h ../include/object.h ../include/handletime.h \ + ../include/magic.h ../include/npcutil.h ../include/chatmagic.h \ + ../include/configfile.h ../include/npcgen.h +npc_duelranking.o: npc_duelranking.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/saacproto_cli.h \ + ../include/saacproto_util.h ../include/npc_duelranking.h \ + ../include/handletime.h +npc_petskillshop.o: npc_petskillshop.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/pet_skill.h ../include/readmap.h \ + ../include/battle.h +npc_petshop.o: npc_petshop.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/pet_skill.h ../include/readmap.h \ + ../include/battle.h ../include/log.h +npc_signboard.o: npc_signboard.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/readmap.h ../include/family.h +npc_warpman.o: npc_warpman.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/saacproto_cli.h \ + ../include/saacproto_util.h ../include/npc_warpman.h \ + ../include/map_deal.h ../include/readmap.h ../include/battle.h \ + ../include/npc_exchangeman.h ../include/log.h ../include/enemy.h \ + ../include/handletime.h ../include/npc_eventaction.h +npc_exchangeman.o: npc_exchangeman.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/npc_exchangeman.h \ + ../include/npc_eventaction.h ../include/log.h ../include/battle.h \ + ../include/handletime.h ../include/enemy.h ../include/npc_warp.h +npc_timeman.o: npc_timeman.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/object.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/npcutil.h ../include/npc_oldman.h \ + ../include/readmap.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/log.h ../include/handletime.h +npc_bodylan.o: npc_bodylan.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/npc_windowhealer.h +npc_mic.o: npc_mic.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/string.h ../include/common.h /usr/include/errno.h \ + /usr/include/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/asm/errno.h ../include/char_base.h ../include/skill.h \ + ../include/util.h /usr/include/sys/time.h /usr/include/time.h \ + /usr/include/bits/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/npcutil.h ../include/npc_mic.h \ + ../include/saacproto_cli.h ../include/saacproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h ../include/battle.h +npc_luckyman.o: npc_luckyman.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/npc_luckyman.h +npc_bus.o: npc_bus.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/npc_bus.h ../include/handletime.h +npc_charm.o: npc_charm.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/npc_charm.h +npc_quiz.o: npc_quiz.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/common.h /usr/include/stdio.h /usr/include/bits/types.h \ + /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/include/bits/wchar.h /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/npc_quiz.h ../include/npcutil.h \ + ../include/char.h ../include/char_data.h ../include/item.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/buf.h ../include/function.h \ + ../include/readmap.h ../include/object.h ../include/log.h +npc_poolitemshop.o: npc_poolitemshop.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h ../include/char.h \ + ../include/common.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/string.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/npcutil.h \ + ../include/npc_poolitemshop.h ../include/log.h ../include/handletime.h +npc_checkman.o: npc_checkman.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h +npc_janken.o: npc_janken.c ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/common.h /usr/include/stdio.h /usr/include/bits/types.h \ + /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/include/bits/wchar.h /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/npc_janken.h ../include/npcutil.h \ + ../include/char.h ../include/char_data.h ../include/item.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/buf.h ../include/function.h \ + ../include/readmap.h ../include/object.h ../include/log.h +npc_transmigration.o: npc_transmigration.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/math.h /usr/include/bits/huge_val.h \ + /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/enemy.h ../include/log.h \ + ../include/battle.h ../include/readmap.h \ + ../include/npc_transmigration.h ../include/npc_pettransman.h +npc_makepair.o: npc_makepair.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/npc_transerman.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/saacproto_cli.h \ + ../include/saacproto_util.h ../include/readmap.h ../include/battle.h \ + ../include/log.h ../include/enemy.h ../include/handletime.h \ + ../include/npc_makepair.h ../include/npc_eventaction.h +npc_familyman.o: npc_familyman.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/configfile.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/saacproto_cli.h \ + ../include/saacproto_util.h ../include/npc_familyman.h \ + ../include/family.h +npc_fmdengon.o: npc_fmdengon.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/time.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/time.h /usr/include/bits/types.h \ + /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/include/bits/wchar.h /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/string.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/saacproto_cli.h ../include/saacproto_util.h \ + ../include/npcutil.h ../include/handletime.h ../include/npc_fmdengon.h \ + ../include/family.h +npc_fmwarpman.o: npc_fmwarpman.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/time.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/time.h /usr/include/bits/types.h \ + /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/include/bits/wchar.h /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/string.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/saacproto_cli.h ../include/saacproto_util.h \ + ../include/npc_fmwarpman.h ../include/npc_scheduleman.h \ + ../include/readmap.h ../include/log.h ../include/battle.h \ + ../include/handletime.h ../include/family.h +npc_fmhealer.o: npc_fmhealer.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/stdio.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/string.h /usr/include/ctype.h /usr/include/endian.h \ + /usr/include/bits/endian.h ../include/object.h ../include/common.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/npcutil.h ../include/readmap.h +npc_bankman.o: npc_bankman.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/configfile.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/saacproto_cli.h \ + ../include/saacproto_util.h ../include/npc_bankman.h \ + ../include/family.h +npc_fmpkman.o: npc_fmpkman.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/npc_fmpkman.h \ + ../include/npc_scheduleman.h ../include/npc_fmwarpman.h \ + ../include/family.h ../include/readmap.h ../include/battle.h \ + ../include/log.h +npc_airplane.o: npc_airplane.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/npc_airplane.h ../include/handletime.h +npc_scheduleman.o: npc_scheduleman.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/time.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/time.h /usr/include/bits/types.h \ + /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/include/bits/wchar.h /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/string.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h ../include/npcutil.h \ + ../include/handletime.h ../include/npc_scheduleman.h \ + ../include/family.h +npc_fmpkcallman.o: npc_fmpkcallman.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/npc_fmpkcallman.h ../include/family.h \ + ../include/readmap.h ../include/battle.h ../include/log.h \ + ../include/npc_scheduleman.h ../include/handletime.h +npc_manorsman.o: npc_manorsman.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/time.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/time.h /usr/include/bits/types.h \ + /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/include/bits/wchar.h /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/string.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h ../include/npcutil.h \ + ../include/handletime.h ../include/npc_scheduleman.h \ + ../include/family.h ../include/npc_manorsman.h \ + ../include/saacproto_cli.h ../include/saacproto_util.h \ + ../include/configfile.h ../include/log.h +npc_riderman.o: npc_riderman.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/configfile.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/saacproto_cli.h \ + ../include/saacproto_util.h ../include/npc_riderman.h \ + ../include/family.h ../include/log.h +npc_fmletter.o: npc_fmletter.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/configfile.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/saacproto_cli.h \ + ../include/saacproto_util.h ../include/npc_fmletter.h \ + ../include/family.h ../include/log.h +npc_petmaker.o: npc_petmaker.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/stdio.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/string.h /usr/include/ctype.h /usr/include/endian.h \ + /usr/include/bits/endian.h ../include/object.h ../include/common.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/npcutil.h ../include/readmap.h \ + ../include/enemy.h ../include/chatmagic.h ../include/log.h +npc_gamblemaster.o: npc_gamblemaster.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/handletime.h ../include/readmap.h \ + ../include/log.h ../include/npc_eventaction.h \ + ../include/npc_gamblemaster.h +npc_gambleroulette.o: npc_gambleroulette.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/readmap.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/handletime.h \ + ../include/npc_gambleroulette.h +npc_petfusion.o: npc_petfusion.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/saacproto_cli.h \ + ../include/saacproto_util.h ../include/readmap.h ../include/battle.h \ + ../include/log.h ../include/enemy.h ../include/handletime.h \ + ../include/npc_eventaction.h ../include/npc_petfusion.h \ + ../include/pet.h ../include/chatmagic.h +npc_stoneserviceman.o: npc_stoneserviceman.c /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/sys/types.h /usr/include/bits/types.h \ + /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \ + /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/sys/socket.h \ + /usr/include/sys/uio.h /usr/include/bits/uio.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/wchar.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/arpa/inet.h ../include/char.h \ + ../include/common.h /usr/include/stdio.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/version.h ../include/correct_bug.h \ + ../include/version_pk.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/stdlib.h /usr/include/alloca.h \ + ../include/title.h ../include/addressbook.h ../include/net.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/npc_stoneserviceman.h \ + ../include/readmap.h ../include/battle.h ../include/log.h \ + ../include/enemy.h ../include/configfile.h +npc_newnpcman.o: npc_newnpcman.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/math.h /usr/include/bits/huge_val.h \ + /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/enemy.h ../include/log.h \ + ../include/battle.h ../include/readmap.h ../include/handletime.h \ + ../include/npc_eventaction.h ../include/npc_newnpcman.h \ + ../include/pet.h +npc_gamblebank.o: npc_gamblebank.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/math.h /usr/include/bits/huge_val.h \ + /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/enemy.h ../include/log.h \ + ../include/battle.h ../include/readmap.h ../include/handletime.h \ + ../include/configfile.h ../include/npc_gamblebank.h +npc_petracemaster.o: npc_petracemaster.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/time.h /usr/include/bits/time.h /usr/include/bits/types.h \ + /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/include/bits/wchar.h /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/handletime.h \ + ../include/npc_petracemaster.h +npc_petracepet.o: npc_petracepet.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/handletime.h \ + ../include/npc_petracepet.h +npc_bigsmallmaster.o: npc_bigsmallmaster.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/time.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/time.h /usr/include/bits/types.h \ + /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/include/bits/wchar.h /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/string.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h ../include/npcutil.h \ + ../include/handletime.h ../include/configfile.h \ + ../include/npc_bigsmallmaster.h ../include/npc_windowman.h +npc_bigsmallpet.o: npc_bigsmallpet.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/time.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/time.h /usr/include/bits/types.h \ + /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/include/bits/wchar.h /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/string.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h ../include/npcutil.h \ + ../include/handletime.h ../include/configfile.h \ + ../include/npc_bigsmallpet.h +npc_auctioneer.o: npc_auctioneer.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/time.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/time.h /usr/include/bits/types.h \ + /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \ + /usr/include/string.h ../include/char.h ../include/common.h \ + /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \ + /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/npcutil.h ../include/handletime.h \ + ../include/configfile.h ../include/npc_auctioneer.h ../include/pet.h \ + ../include/anim_tbl.h ../include/log.h ../include/saacproto_cli.h \ + ../include/saacproto_util.h +npc_freepetskillshop.o: npc_freepetskillshop.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/pet_skill.h ../include/readmap.h \ + ../include/battle.h ../include/configfile.h \ + ../include/npc_eventaction.h ../include/npc_freepetskillshop.h +npc_eventaction.o: npc_eventaction.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/saacproto_cli.h \ + ../include/saacproto_util.h ../include/map_deal.h ../include/readmap.h \ + ../include/battle.h ../include/log.h ../include/enemy.h \ + ../include/handletime.h ../include/npc_eventaction.h \ + ../include/family.h ../include/profession_skill.h \ + ../include/chatmagic.h +npc_mtradenpcman.o: npc_mtradenpcman.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/math.h /usr/include/bits/huge_val.h \ + /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/enemy.h ../include/log.h \ + ../include/battle.h ../include/readmap.h ../include/handletime.h \ + ../include/npc_eventaction.h +npc_blackmarket.o: npc_blackmarket.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/configfile.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/saacproto_cli.h \ + ../include/saacproto_util.h +npc_transerman.o: npc_transerman.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/npc_transerman.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/saacproto_cli.h \ + ../include/saacproto_util.h ../include/readmap.h ../include/battle.h \ + ../include/log.h ../include/enemy.h ../include/handletime.h \ + ../include/npc_eventaction.h +npc_pauctionman.o: npc_pauctionman.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/saacproto_cli.h \ + ../include/saacproto_util.h ../include/readmap.h ../include/battle.h \ + ../include/log.h ../include/enemy.h ../include/handletime.h \ + ../include/npc_eventaction.h ../include/npc_pauctionman.h +npc_alldoman.o: npc_alldoman.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/stdio.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/string.h /usr/include/ctype.h /usr/include/endian.h \ + /usr/include/bits/endian.h ../include/object.h ../include/common.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/npcutil.h ../include/readmap.h \ + ../include/enemy.h ../include/chatmagic.h ../include/log.h \ + ../include/npc_itemchange.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/saacproto_cli.h \ + ../include/saacproto_util.h ../include/npc_eventaction.h \ + ../include/npc_charm.h ../include/npc_alldoman.h +npc_sellsthman.o: npc_sellsthman.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/saacproto_cli.h \ + ../include/saacproto_util.h ../include/readmap.h ../include/battle.h \ + ../include/log.h ../include/enemy.h ../include/handletime.h \ + ../include/npc_eventaction.h ../include/npc_sellsthman.h \ + ../include/pet_skill.h +npc_welfare.o: npc_welfare.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/pet_skill.h ../include/readmap.h \ + ../include/battle.h ../include/profession_skill.h \ + ../include/chatmagic.h ../include/npc_welfare.h \ + ../include/npc_exchangeman.h +npc_verywelfare.o: npc_verywelfare.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/configfile.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/saacproto_cli.h \ + ../include/saacproto_util.h ../include/npc_verywelfare.h +npc_welfare2.o: npc_welfare2.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h +npc_raceman.o: npc_raceman.c ../include/version.h \ + ../include/correct_bug.h ../include/version_pk.h /usr/include/time.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/time.h /usr/include/bits/types.h \ + /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/include/bits/wchar.h /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/string.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/saacproto_cli.h ../include/saacproto_util.h \ + ../include/npcutil.h ../include/handletime.h ../include/npc_raceman.h \ + ../include/family.h ../include/log.h ../include/enemy.h diff --git a/gmsv/npc/makefile.bak b/gmsv/npc/makefile.bak new file mode 100644 index 0000000..e673f56 --- /dev/null +++ b/gmsv/npc/makefile.bak @@ -0,0 +1,2525 @@ +INCFLAGS=-I. -I../include + + +CFLAGS=-w -O3 $(INCFLAGS) + +PROG=libnpc.a + +SRC=readnpc.c npcgen.c npctemplate.c npccreate.c npcutil.c \ +npc_warp.c npc_townpeople.c \ +npc_msg.c npc_healer.c npc_oldman.c \ +npc_storyteller.c npc_dengon.c npc_doorman.c \ +npc_npcenemy.c npc_itemchange.c \ +npc_action.c npc_windowman.c npc_savepoint.c \ +npc_windowhealer.c npc_itemshop.c npc_sysinfo.c \ +npc_duelranking.c npc_petskillshop.c npc_petshop.c \ +npc_signboard.c npc_warpman.c npc_exchangeman.c \ +npc_timeman.c npc_bodylan.c npc_mic.c \ +npc_luckyman.c npc_bus.c npc_charm.c npc_quiz.c \ +npc_poolitemshop.c npc_checkman.c npc_janken.c \ +npc_transmigration.c npc_makepair.c \ +npc_familyman.c npc_fmdengon.c npc_fmwarpman.c \ +npc_fmhealer.c npc_bankman.c npc_fmpkman.c\ +npc_airplane.c npc_scheduleman.c npc_fmpkcallman.c\ +npc_manorsman.c npc_riderman.c npc_fmletter.c npc_petmaker.c \ +npc_gamblemaster.c npc_gambleroulette.c npc_petfusion.c\ +npc_stoneserviceman.c npc_newnpcman.c npc_gamblebank.c \ +npc_petracemaster.c npc_petracepet.c npc_bigsmallmaster.c \ +npc_bigsmallpet.c npc_auctioneer.c npc_freepetskillshop.c \ +npc_eventaction.c \ +npc_mtradenpcman.c npc_blackmarket.c npc_transerman.c npc_pauctionman.c npc_alldoman.c\ +npc_sellsthman.c \ +npc_welfare.c npc_verywelfare.c npc_welfare2.c \ +npc_raceman.c + +OBJ=$(SRC:.c=.o) + +ifeq (0,$(MAKELEVEL)) +CC=gcc +RM=rm -f +AR=ar cr +MV=mv +RANLIB=ranlib +SED=sed +SHELL=/bin/sh +endif + +all: $(PROG) + +$(PROG): $(OBJ) + $(RM) $(PROG) + $(AR) $(PROG) $(OBJ) + $(RANLIB) $(PROG) + +depend: + $(MV) makefile makefile.bak + $(SED) -ne '1,/^# DO NOT DELETE THIS LINE/p' makefile.bak>makefile + $(CC) $(INCFLAGS) -M $(SRC) >> makefile + +clean: + $(RM) $(PROG) + $(RM) $(OBJ) + $(RM) *~ + +distclean: + $(RM) $(PROG) + $(RM) $(OBJ) + $(RM) *~ + $(MV) makefile makefile.bak + $(SED) -ne '1,/^# DO NOT DELETE THIS LINE/p' makefile.bak>makefile + $(RM) makefile.bak + +# DO NOT DELETE THIS LINE +readnpc.o: readnpc.c ../include/version.h /usr/include/stdio.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + /usr/include/string.h ../include/common.h ../include/npctemplate.h \ + ../include/util.h /usr/include/sys/time.h /usr/include/time.h \ + /usr/include/bits/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/char_base.h ../include/skill.h \ + ../include/title.h ../include/addressbook.h ../include/net.h \ + /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/npccreate.h +npcgen.o: npcgen.c ../include/version.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/npccreate.h ../include/util.h /usr/include/sys/time.h \ + /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/npctemplate.h ../include/char_base.h \ + ../include/skill.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/buf.h ../include/object.h \ + ../include/readmap.h ../include/handletime.h ../include/map_deal.h +npctemplate.o: npctemplate.c ../include/version.h /usr/include/stdio.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + /usr/include/string.h ../include/common.h ../include/npctemplate.h \ + ../include/util.h /usr/include/sys/time.h /usr/include/time.h \ + /usr/include/bits/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/char_base.h ../include/skill.h \ + ../include/title.h ../include/addressbook.h ../include/net.h \ + /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/buf.h ../include/char_data.h \ + ../include/item.h ../include/char.h ../include/handletime.h \ + ../include/anim_tbl.h ../include/configfile.h +npccreate.o: npccreate.c ../include/version.h /usr/include/stdio.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + /usr/include/string.h ../include/common.h ../include/npccreate.h \ + ../include/util.h /usr/include/sys/time.h /usr/include/time.h \ + /usr/include/bits/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/npctemplate.h ../include/char_base.h \ + ../include/skill.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/buf.h ../include/readmap.h \ + ../include/char_data.h ../include/item.h ../include/char.h \ + ../include/handletime.h ../include/configfile.h +npcutil.o: npcutil.c ../include/version.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char.h ../include/char_base.h ../include/skill.h \ + ../include/util.h /usr/include/sys/time.h /usr/include/time.h \ + /usr/include/bits/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/configfile.h ../include/object.h ../include/map_deal.h \ + ../include/npcutil.h ../include/npc_door.h ../include/readmap.h \ + ../include/npccreate.h ../include/enemy.h ../include/family.h \ + ../include/saacproto_cli.h ../include/saacproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h +npc_warp.o: npc_warp.c ../include/version.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/object.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/map_deal.h ../include/readmap.h \ + ../include/npccreate.h ../include/npcutil.h ../include/handletime.h +npc_townpeople.o: npc_townpeople.c ../include/version.h \ + ../include/object.h ../include/common.h /usr/include/stdio.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/handletime.h ../include/anim_tbl.h \ + ../include/npc_door.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/string.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/npcutil.h +npc_msg.o: npc_msg.c ../include/version.h ../include/char.h \ + ../include/common.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/npcutil.h +npc_healer.o: npc_healer.c ../include/version.h /usr/include/stdio.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + /usr/include/string.h /usr/include/ctype.h /usr/include/endian.h \ + /usr/include/bits/endian.h ../include/object.h ../include/common.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/npcutil.h ../include/readmap.h +npc_oldman.o: npc_oldman.c ../include/version.h ../include/object.h \ + ../include/common.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/npcutil.h ../include/npc_oldman.h \ + ../include/readmap.h +npc_storyteller.o: npc_storyteller.c ../include/version.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h +npc_dengon.o: npc_dengon.c ../include/version.h ../include/char.h \ + ../include/common.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/string.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/npcutil.h ../include/handletime.h +npc_doorman.o: npc_doorman.c ../include/version.h ../include/object.h \ + ../include/common.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/handletime.h ../include/npc_doorman.h \ + ../include/npc_door.h ../include/npcutil.h ../include/configfile.h +npc_npcenemy.o: npc_npcenemy.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/npc_npcenemy.h \ + ../include/battle.h ../include/enemy.h ../include/readmap.h \ + ../include/encount.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/configfile.h ../include/anim_tbl.h ../include/handletime.h +npc_action.o: npc_action.c ../include/version.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/npc_action.h +npc_windowman.o: npc_windowman.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/configfile.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/npc_windowman.h +npc_savepoint.o: npc_savepoint.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/object.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/npcutil.h ../include/npc_oldman.h \ + ../include/readmap.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h ../include/log.h +npc_windowhealer.o: npc_windowhealer.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/npc_windowhealer.h +npc_itemshop.o: npc_itemshop.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/pet_skill.h ../include/readmap.h ../include/log.h +npc_sysinfo.o: npc_sysinfo.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/char_event.h ../include/object.h ../include/handletime.h \ + ../include/magic.h ../include/npcutil.h ../include/chatmagic.h \ + ../include/configfile.h ../include/npcgen.h +npc_duelranking.o: npc_duelranking.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/saacproto_cli.h ../include/saacproto_util.h \ + ../include/npc_duelranking.h +npc_petskillshop.o: npc_petskillshop.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/pet_skill.h ../include/readmap.h ../include/battle.h +npc_petshop.o: npc_petshop.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/pet_skill.h ../include/readmap.h ../include/battle.h \ + ../include/log.h +npc_signboard.o: npc_signboard.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/readmap.h ../include/family.h +npc_warpman.o: npc_warpman.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/saacproto_cli.h ../include/saacproto_util.h \ + ../include/npc_warpman.h ../include/map_deal.h ../include/readmap.h \ + ../include/battle.h ../include/npc_exchangeman.h ../include/log.h \ + ../include/enemy.h ../include/handletime.h +npc_exchangeman.o: npc_exchangeman.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/npc_exchangeman.h ../include/log.h ../include/battle.h \ + ../include/handletime.h ../include/enemy.h ../include/npc_warp.h +npc_timeman.o: npc_timeman.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/object.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/npcutil.h ../include/npc_oldman.h \ + ../include/readmap.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h ../include/log.h \ + ../include/handletime.h +npc_bodylan.o: npc_bodylan.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/npc_windowhealer.h +npc_mic.o: npc_mic.c ../include/version.h /usr/include/stdio.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + /usr/include/string.h ../include/common.h ../include/char_base.h \ + ../include/skill.h ../include/util.h /usr/include/sys/time.h \ + /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/npcutil.h ../include/npc_mic.h \ + ../include/saacproto_cli.h ../include/saacproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h ../include/battle.h +npc_luckyman.o: npc_luckyman.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/npc_luckyman.h +npc_bus.o: npc_bus.c ../include/version.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/npc_bus.h ../include/handletime.h +npc_charm.o: npc_charm.c ../include/version.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/npc_charm.h +npc_quiz.o: npc_quiz.c ../include/version.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/npc_quiz.h ../include/npcutil.h \ + ../include/char.h ../include/char_data.h ../include/item.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/buf.h ../include/function.h \ + ../include/readmap.h ../include/object.h ../include/log.h +npc_poolitemshop.o: npc_poolitemshop.c ../include/version.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/string.h /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/npcutil.h \ + ../include/npc_poolitemshop.h ../include/log.h +npc_checkman.o: npc_checkman.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h +npc_janken.o: npc_janken.c ../include/version.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/npc_janken.h ../include/npcutil.h \ + ../include/char.h ../include/char_data.h ../include/item.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/buf.h ../include/function.h \ + ../include/readmap.h ../include/object.h ../include/log.h +npc_transmigration.o: npc_transmigration.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/math.h /usr/include/bits/huge_val.h \ + /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/float.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h ../include/enemy.h \ + ../include/log.h ../include/battle.h ../include/readmap.h \ + ../include/npc_transmigration.h ../include/npc_pettransman.h +npc_familyman.o: npc_familyman.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/configfile.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/saacproto_cli.h \ + ../include/saacproto_util.h ../include/npc_familyman.h \ + ../include/family.h +npc_fmdengon.o: npc_fmdengon.c ../include/version.h ../include/char.h \ + ../include/common.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/string.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/saacproto_cli.h \ + ../include/saacproto_util.h ../include/npcutil.h \ + ../include/handletime.h ../include/npc_fmdengon.h ../include/family.h +npc_fmwarpman.o: npc_fmwarpman.c ../include/version.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/string.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/saacproto_cli.h \ + ../include/saacproto_util.h ../include/npc_fmwarpman.h \ + ../include/npc_scheduleman.h ../include/readmap.h ../include/battle.h \ + ../include/handletime.h ../include/family.h +npc_fmhealer.o: npc_fmhealer.c ../include/version.h +npc_alldoman.o: npc_alldoman.c ../include/version.h \ + /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + /usr/include/string.h /usr/include/ctype.h /usr/include/endian.h \ + /usr/include/bits/endian.h ../include/object.h ../include/common.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/npcutil.h ../include/readmap.h +npc_bankman.o: npc_bankman.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/configfile.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/saacproto_cli.h \ + ../include/saacproto_util.h ../include/npc_bankman.h \ + ../include/family.h +npc_fmpkman.o: npc_fmpkman.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/npc_fmpkman.h ../include/npc_scheduleman.h \ + ../include/npc_fmwarpman.h ../include/family.h ../include/readmap.h \ + ../include/battle.h ../include/log.h +npc_airplane.o: npc_airplane.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/npc_airplane.h ../include/handletime.h +npc_scheduleman.o: npc_scheduleman.c ../include/version.h \ + /usr/include/time.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/time.h /usr/include/bits/types.h ../include/char.h \ + ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/libio.h /usr/include/_G_config.h \ + /usr/include/bits/stdio_lim.h ../include/char_base.h \ + ../include/skill.h ../include/util.h /usr/include/sys/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/string.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/npcutil.h ../include/handletime.h \ + ../include/npc_scheduleman.h ../include/family.h +npc_fmpkcallman.o: npc_fmpkcallman.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/npc_fmpkcallman.h ../include/family.h ../include/readmap.h \ + ../include/battle.h ../include/log.h +npc_manorsman.o: npc_manorsman.c ../include/version.h \ + /usr/include/time.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/time.h /usr/include/bits/types.h ../include/char.h \ + ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/libio.h /usr/include/_G_config.h \ + /usr/include/bits/stdio_lim.h ../include/char_base.h \ + ../include/skill.h ../include/util.h /usr/include/sys/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/string.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/npcutil.h ../include/handletime.h \ + ../include/npc_scheduleman.h ../include/family.h \ + ../include/npc_manorsman.h ../include/saacproto_cli.h \ + ../include/saacproto_util.h ../include/configfile.h +npc_riderman.o: npc_riderman.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/configfile.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/saacproto_cli.h \ + ../include/saacproto_util.h ../include/npc_riderman.h \ + ../include/family.h ../include/log.h +npc_fmletter.o: npc_fmletter.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/configfile.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/saacproto_cli.h \ + ../include/saacproto_util.h ../include/npc_fmletter.h \ + ../include/family.h ../include/log.h +npc_petmaker.o: npc_petmaker.c ../include/version.h \ + /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + /usr/include/string.h /usr/include/ctype.h /usr/include/endian.h \ + /usr/include/bits/endian.h ../include/object.h ../include/common.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char.h ../include/char_data.h \ + ../include/item.h ../include/npcutil.h ../include/readmap.h \ + ../include/enemy.h ../include/chatmagic.h ../include/log.h +npc_gamblemaster.o: npc_gamblemaster.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/handletime.h ../include/readmap.h ../include/log.h \ + ../include/npc_gamblemaster.h +npc_gambleroulette.o: npc_gambleroulette.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/handletime.h ../include/npc_gambleroulette.h +npc_stoneserviceman.o: npc_stoneserviceman.c /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/sys/types.h /usr/include/bits/types.h \ + /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/sys/sysmacros.h \ + /usr/include/sys/socket.h /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/arpa/inet.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/libio.h /usr/include/_G_config.h \ + /usr/include/bits/stdio_lim.h ../include/char_base.h \ + ../include/version.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/bits/time.h \ + /usr/include/stdlib.h /usr/include/alloca.h ../include/title.h \ + ../include/addressbook.h ../include/net.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/npc_stoneserviceman.h ../include/readmap.h \ + ../include/battle.h ../include/log.h ../include/enemy.h \ + ../include/configfile.h +npc_newnpcman.o: npc_newnpcman.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/math.h /usr/include/bits/huge_val.h \ + /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/float.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h ../include/enemy.h \ + ../include/log.h ../include/battle.h ../include/readmap.h \ + ../include/handletime.h ../include/npc_newnpcman.h +npc_gamblebank.o: npc_gamblebank.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/math.h /usr/include/bits/huge_val.h \ + /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/float.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h ../include/enemy.h \ + ../include/log.h ../include/battle.h ../include/readmap.h \ + ../include/handletime.h ../include/npc_gamblebank.h +npc_petracemaster.o: npc_petracemaster.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/handletime.h ../include/npc_petracemaster.h +npc_petracepet.o: npc_petracepet.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/handletime.h ../include/npc_petracepet.h +npc_bigsmallmaster.o: npc_bigsmallmaster.c ../include/version.h \ + /usr/include/time.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/time.h /usr/include/bits/types.h ../include/char.h \ + ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/libio.h /usr/include/_G_config.h \ + /usr/include/bits/stdio_lim.h ../include/char_base.h \ + ../include/skill.h ../include/util.h /usr/include/sys/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/string.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/npcutil.h ../include/handletime.h \ + ../include/configfile.h ../include/npc_bigsmallmaster.h \ + ../include/npc_windowman.h +npc_bigsmallpet.o: npc_bigsmallpet.c ../include/version.h \ + /usr/include/time.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/time.h /usr/include/bits/types.h ../include/char.h \ + ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/libio.h /usr/include/_G_config.h \ + /usr/include/bits/stdio_lim.h ../include/char_base.h \ + ../include/skill.h ../include/util.h /usr/include/sys/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/string.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/npcutil.h ../include/handletime.h \ + ../include/configfile.h ../include/npc_bigsmallpet.h +npc_auctioneer.o: npc_auctioneer.c ../include/version.h \ + /usr/include/time.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/time.h /usr/include/bits/types.h ../include/char.h \ + ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/libio.h /usr/include/_G_config.h \ + /usr/include/bits/stdio_lim.h ../include/char_base.h \ + ../include/skill.h ../include/util.h /usr/include/sys/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/string.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h ../include/npcutil.h ../include/handletime.h \ + ../include/configfile.h ../include/npc_bigsmallmaster.h \ + ../include/npc_windowman.h +npc_freepetskillshop.o: npc_freepetskillshop.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/handletime.h ../include/npc_freepetskillshop.h +npc_eventaction.o: npc_eventaction.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/handletime.h ../include/npc_eventaction.h +npc_mtradenpcman.o: npc_eventaction.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/handletime.h ../include/npc_mtradenpcman.h +npc_transerman.o: npc_transerman.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h ../include/npc_transerman.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/handletime.h ../include/npc_freepetskillshop.h +npc_itemchange.o: npc_itemchange.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h ../include/npc_itemchange.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/handletime.h ../include/npc_freepetskillshop.h +npc_pauctionman.o: npc_pauctionman.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h ../include/npc_pauctionman.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/handletime.h ../include/npc_freepetskillshop.h +npc_makepair.o: npc_makepair.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h ../include/npc_makepair.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/handletime.h ../include/npc_freepetskillshop.h +npc_petfusion.o: npc_petfusion.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h ../include/npc_petfusion.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/lssproto_serv.h \ + ../include/lssproto_util.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + ../include/handletime.h ../include/npc_freepetskillshop.h +npc_welfare.o: npc_welfare.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/configfile.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + ../include/saacproto_util.h ../include/npc_welfare.h +npc_welfare2.o: npc_welfare2.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/configfile.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + ../include/saacproto_util.h ../include/npc_welfare.h +npc_verywelfare.o: npc_verywelfare.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/configfile.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + ../include/saacproto_util.h ../include/npc_verywelfare.h +npc_raceman.o: npc_raceman.c ../include/version.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + ../include/char.h ../include/common.h /usr/include/stdio.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/types.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + ../include/char_base.h ../include/skill.h ../include/util.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h ../include/title.h ../include/addressbook.h \ + ../include/net.h /usr/include/netinet/in.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/stdint.h \ + /usr/include/bits/wordsize.h /usr/include/bits/socket.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm/sockios.h /usr/include/bits/in.h \ + /usr/include/bits/byteswap.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + ../include/link.h ../include/char_data.h ../include/item.h \ + ../include/object.h ../include/npcutil.h ../include/configfile.h \ + ../include/lssproto_serv.h ../include/lssproto_util.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + ../include/saacproto_util.h ../include/npc_raceman.h + + diff --git a/gmsv/npc/npc_action.c b/gmsv/npc/npc_action.c new file mode 100644 index 0000000..bca580f --- /dev/null +++ b/gmsv/npc/npc_action.c @@ -0,0 +1,137 @@ +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "npc_action.h" + +/* + * 皿伊奶乩□及失弁扑亦件卞 杀允月NPC[ + * 签卞韵曰忒仄凶曰允月分仃分互[ + * 汹仁]引凶反 匀化中月及失弁扑亦件卞反 杀仄卅中[ + * + * 娄醒“ + * msgcol: 丢永本□斥及缙[犯白巧伙玄反疵缙 + * normal: 骚卞韵匀化五凶凛支 躲卅失弁扑亦件卞覆仄化及忒蚕 + * attack: 猾失弁扑亦件卞覆允月忒蚕 + * damage: 母丢□斥毛熬仃凶失弁扑亦件卞覆允月忒蚕 + * down: 逦木月失弁扑亦件卞覆允月忒蚕 + * sit: 甄月失弁扑亦件卞覆仄化及忒蚕 + * hand: 澎毛蕊月失弁扑亦件卞覆仄化及忒蚕 + * pleasure: 减少失弁扑亦件卞覆仄化及忒蚕 + * angry: 变月失弁扑亦件卞覆仄化及忒蚕 + * sad: 仄戈失弁扑亦件卞覆仄化及忒蚕 + * guard: 布□玉允月失弁扑亦件卞覆仄化及忒蚕 + */ + + +#define NPC_ACTION_MSGCOLOR_DEFAULT CHAR_COLORYELLOW + +enum { + CHAR_WORK_MSGCOLOR = CHAR_NPCWORKINT1, +}; + +/********************************* +* 赓渝质 +*********************************/ +BOOL NPC_ActionInit( int meindex ) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + int tmp; + + tmp = NPC_Util_GetNumFromStrWithDelim( argstr, "msgcol"); + if( tmp == -1 ) tmp = NPC_ACTION_MSGCOLOR_DEFAULT; + CHAR_setWorkInt( meindex, CHAR_WORK_MSGCOLOR, tmp); + + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPEACTION ); + + + return TRUE; +} + + + + +/********************************* +* 仄井仃日木凶凛及质 +*********************************/ +void NPC_ActionTalked( int meindex , int talkerindex , char *szMes , + int color ) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[64]; + + /* 皿伊奶乩□卞覆仄化分仃 杀允月 */ + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) { + return; + } + /* ㄠ弘伉永玉动 及心 */ + if( !NPC_Util_charIsInFrontOfChar( talkerindex, meindex, 1 )) return; + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + + if( NPC_Util_GetStrFromStrWithDelim( argstr, + "normal", + buf, sizeof( buf)) + != NULL ) + { + CHAR_talkToCli( talkerindex, meindex ,buf , + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR )); + } + +} +/********************************* +* watch质 +*********************************/ +void NPC_ActionWatch( int meobjindex, int objindex, CHAR_ACTION act, + int x,int y,int dir, int* opt,int optlen ) +{ + int meindex; + int index; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[64]; + int i; + struct { + CHAR_ACTION act; + char *string; + }searchtbl[] = { + { CHAR_ACTATTACK, "attack"}, + { CHAR_ACTDAMAGE, "damage"}, + { CHAR_ACTDOWN, "down"}, + { CHAR_ACTSIT, "sit"}, + { CHAR_ACTHAND, "hand"}, + { CHAR_ACTPLEASURE, "pleasure"}, + { CHAR_ACTANGRY, "angry"}, + { CHAR_ACTSAD, "sad"}, + { CHAR_ACTGUARD, "guard"}, + { CHAR_ACTNOD, "nod"}, + { CHAR_ACTTHROW, "throw"}, + }; + + if( OBJECT_getType( objindex) != OBJTYPE_CHARA) return; + index = OBJECT_getIndex( objindex); + /* 皿伊奶乩□卞及心 杀允月 */ + if( CHAR_getInt( index, CHAR_WHICHTYPE) != CHAR_TYPEPLAYER) return; + + meindex = OBJECT_getIndex( meobjindex); + + /* 轾五宁匀化ㄠ弘伉永玉匹卅中午 杀仄卅中 */ + if( NPC_Util_isFaceToFace( meindex, index, 1 ) != TRUE ) return; + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + + for( i = 0; i < arraysizeof( searchtbl); i ++ ) { + if( searchtbl[i].act == act) { + if( NPC_Util_GetStrFromStrWithDelim( argstr, + searchtbl[i].string, + buf, sizeof( buf)) + != NULL ) + { + CHAR_talkToCli( index, meindex ,buf , + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR )); + break; + } + } + } +} diff --git a/gmsv/npc/npc_airplane.c b/gmsv/npc/npc_airplane.c new file mode 100644 index 0000000..0aaffd6 --- /dev/null +++ b/gmsv/npc/npc_airplane.c @@ -0,0 +1,879 @@ +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "lssproto_serv.h" +#include "npc_airplane.h" +#include "handletime.h" + +/* + * 加美航空 (Made from Bus) + */ + +enum { + NPC_WORK_ROUTETOX = CHAR_NPCWORKINT1, /* 升仇尺" 甄 */ + NPC_WORK_ROUTETOY = CHAR_NPCWORKINT2, /* 升仇尺" 甄 */ + NPC_WORK_ROUTEPOINT = CHAR_NPCWORKINT3, /* 漆窒 井 */ + NPC_WORK_ROUNDTRIP = CHAR_NPCWORKINT4, /* 垫五井窖曰井 ㄟ“垫五 ㄠ“窖曰 */ + NPC_WORK_MODE = CHAR_NPCWORKINT5, + NPC_WORK_CURRENTROUTE = CHAR_NPCWORKINT6, + NPC_WORK_ROUTEMAX = CHAR_NPCWORKINT7, + NPC_WORK_WAITTIME = CHAR_NPCWORKINT8, + NPC_WORK_CURRENTTIME = CHAR_NPCWORKINT9, + NPC_WORK_SEFLG = CHAR_NPCWORKINT10, + NPC_WORK_ONEWAYFLG = CHAR_NPCWORKINT11, + NPC_WORK_RUNWAVE = CHAR_NPCWORKINT13, +}; + +/* 蛐 丢永本□斥及enum */ +enum { + NPC_AIR_MSG_GETTINGON, + NPC_AIR_MSG_NOTPARTY, + NPC_AIR_MSG_OVERPARTY, + NPC_AIR_MSG_DENIEDITEM, + NPC_AIR_MSG_ALLOWITEM, + NPC_AIR_MSG_LEVEL, + NPC_AIR_MSG_GOLD, + NPC_AIR_MSG_EVENT, + NPC_AIR_MSG_START, + NPC_AIR_MSG_END, +#ifdef _NPC_AIRDELITEM + NPC_AIR_MSG_DELITEM, +#endif +#ifdef _NPC_AIRLEVEL + NPC_AIR_MSG_MAXLEVEL, +#endif +}; +typedef struct { + char option[32]; + char defaultmsg[128]; +}NPC_AIR_MSG; +NPC_AIR_MSG airmsg[] = { + { "msg_gettingon", "PAON!(你无法於中途加入我们唷!)"}, + { "msg_notparty", "PAPAON!!无法以团队加入唷!"}, + { "msg_overparty", "PAON!!人数已满。"}, + { "msg_denieditem", "PAPAON!!我可不要这个道具!"}, + { "msg_allowitem", "哇喔~(想要那个道具啊!)"}, + { "msg_level", "PAPAON!!你的等级还不够唷!"}, + { "msg_stone", "PAPAON!!金钱不足唷!"}, + { "msg_event", "PAON!!你无法加入唷!"}, + { "msg_start", "哇喔~(出发进行)"}, + { "msg_end", "哇喔~(到罗)"} +#ifdef _NPC_AIRDELITEM + ,{ "msg_delitem", "你没有搭乘的道具"} +#endif +#ifdef _NPC_AIRLEVEL + ,{ "msg_maxlevel", "你的等级过高哦"} +#endif +}; + +static int NPC_AirSetPoint( int meindex, char *argstr); +static void NPC_AirSetDestPoint( int meindex, char *argstr); +static BOOL NPC_AirCheckDeniedItem( int meindex, int charaindex, char *argstr); +static BOOL NPC_AirCheckLevel( int meindex, int charaindex, char *argstr); +static int NPC_AirCheckStone( int meindex, int charaindex, char *argstr); +static void NPC_AirSendMsg( int meindex, int talkerindex, int tablenum); +static int NPC_AirGetRoutePointNum( int meindex, char *argstr ); +static void NPC_Air_walk( int meindex); +#ifdef _NPC_AIRLEVEL +static BOOL NPC_AirCheckMaxLevel( int meindex, int charaindex, char *argstr); +#endif + +#define NPC_AIR_LOOPTIME 100 +#define NPC_AIR_WAITTIME_DEFAULT 180 +#define NPC_AIR_WAITINGMODE_WAITTIME 5000 + +/********************************* +* 赓渝质 +*********************************/ +BOOL NPC_AirInit( int meindex ) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + int i; + char buf[256],buf1[256]; + int routenum; + int waittime; + int seflg; + int onewayflg; + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + + /* 卅仃木壬中仃卅中娄醒及民尼永弁 */ + routenum = NPC_Util_GetNumFromStrWithDelim( argstr, "routenum"); + if( routenum == -1 ) { + print( "npcair:nothing routenum \n"); + return FALSE; + } + CHAR_setWorkInt( meindex, NPC_WORK_ROUTEMAX, routenum); + + for( i = 1; i <= routenum; i ++ ) { + char routetostring[64]; + snprintf( routetostring, sizeof( routetostring), "routeto%d", i); + if( NPC_Util_GetStrFromStrWithDelim( argstr, routetostring,buf, sizeof(buf)) + == NULL ) + { + print( "npcair:nothing route to \n"); + return FALSE; + } + } + //ANDY_ADD NPC_WORK_RUNWAVE + if( NPC_Util_GetStrFromStrWithDelim( argstr, "WAVE",buf1, sizeof(buf1)) == NULL ) { + CHAR_setWorkInt( meindex, NPC_WORK_RUNWAVE, 77); + }else { + CHAR_setWorkInt( meindex, NPC_WORK_RUNWAVE, atoi( buf1) ); + } + + waittime = NPC_Util_GetNumFromStrWithDelim( argstr, "waittime"); + if( waittime == -1 ) waittime = NPC_AIR_WAITTIME_DEFAULT; + CHAR_setWorkInt( meindex, NPC_WORK_WAITTIME, waittime); + + seflg = NPC_Util_GetNumFromStrWithDelim( argstr, "seflg"); + if( seflg == -1 ) seflg = TRUE; + CHAR_setWorkInt( meindex, NPC_WORK_SEFLG, seflg); + + onewayflg = NPC_Util_GetNumFromStrWithDelim( argstr, "oneway"); + if( onewayflg == -1 ) onewayflg = FALSE; // default + CHAR_setWorkInt( meindex, NPC_WORK_ONEWAYFLG, onewayflg); + + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPEBUS ); + + CHAR_setWorkInt( meindex, NPC_WORK_MODE, 0); + CHAR_setWorkInt( meindex, NPC_WORK_ROUTEPOINT, 2); + CHAR_setWorkInt( meindex, NPC_WORK_ROUNDTRIP, 0); + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTROUTE, 0); + + CHAR_setInt( meindex, CHAR_LOOPINTERVAL, + NPC_AIR_WAITINGMODE_WAITTIME); + + /* 蜇箕及凛棉毛本永玄 */ + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTTIME, NowTime.tv_sec); + + for( i = 0; i < CHAR_PARTYMAX; i ++) { + CHAR_setWorkInt( meindex, CHAR_WORKPARTYINDEX1 + i, -1); + } + + /* 伙□玄瑁烂允月 */ +{ + int rev; + int r = CHAR_getWorkInt( meindex, NPC_WORK_ROUTEMAX); + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTROUTE, RAND( 1, r)); + //print( "route:%d\n",CHAR_getWorkInt( meindex, NPC_WORK_CURRENTROUTE)); + + /* 欠旦正□玄 */ + rev = NPC_Util_GetNumFromStrWithDelim( argstr, "reverse"); + if( rev == 1 ) { + int num = NPC_AirGetRoutePointNum( meindex, argstr); + if( num <= 0 ) { + print( "npcairplane:真奇怪!\n"); + return FALSE; + } + CHAR_setWorkInt( meindex, NPC_WORK_ROUTEPOINT, num-1); + CHAR_setWorkInt( meindex, NPC_WORK_ROUNDTRIP, 1); + } + /* 伙□玄毛本永玄允月 */ + NPC_AirSetPoint( meindex, argstr); + /* 垫五燮毛 憎允月 */ + NPC_AirSetDestPoint( meindex, argstr); +} + + return TRUE; +} + + +/********************************* +* 仄井仃日木凶凛及质 +*********************************/ +void NPC_AirTalked( int meindex , int talkerindex , char *szMes , + int color ) +{ + int i; + int partyflg = FALSE; + int npc_wave = CHAR_getWorkInt( meindex, NPC_WORK_RUNWAVE); + + /* 皿伊奶乩□卞覆仄化分仃 杀允月 */ + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) { + return; + } + /* 愤坌及由□ 奴 昙菸 井升丹井譬屯月 */ + for( i = 0; i < CHAR_PARTYMAX; i ++ ) { + int index = CHAR_getWorkInt( meindex, CHAR_WORKPARTYINDEX1+i); + if( CHAR_CHECKINDEX(index)){ + if( index == talkerindex) { + partyflg = TRUE; + } + } + } + if( !partyflg ) { + //NPC_AirCheckJoinParty( meindex, talkerindex, TRUE); + } + else { + if( CHAR_getWorkInt( meindex, NPC_WORK_MODE) == 0 ) { + int i; + // #define NPC_AIR_DEBUGROUTINTG "routingtable:" + if( strstr( szMes, "出发" ) || + strstr( szMes, "出发" ) || + strstr( szMes, "Go" ) || + strstr( szMes, "go" )) + { + CHAR_setWorkInt( meindex, NPC_WORK_MODE,1); + + /* 伙□皿楮醒及裟请仄毛汹仁簧蘸卞允月 */ + CHAR_setInt( meindex, CHAR_LOOPINTERVAL, NPC_AIR_LOOPTIME); + + /* SE 日允 穴件乒旦及陲太 */ + if( CHAR_getWorkInt( meindex, NPC_WORK_SEFLG )) { + //andy_reEdit NPC_WORK_RUNWAVE + CHAR_sendSEoArroundCharacter( + CHAR_getInt( meindex, CHAR_FLOOR), + CHAR_getInt( meindex, CHAR_X), + CHAR_getInt( meindex, CHAR_Y), + npc_wave, + TRUE); + } + /* 请 允月凛及丢永本□斥*/ + for( i = 1; i < CHAR_PARTYMAX; i ++ ) { + int partyindex = CHAR_getWorkInt( meindex, CHAR_WORKPARTYINDEX1+i); + if( CHAR_CHECKINDEX( partyindex)) { + NPC_AirSendMsg( meindex, partyindex, NPC_AIR_MSG_START); + } + } + } + } +#if 0 + else if( strstr( szMes, "停止" ) || + strstr( szMes, "停止" ) || + strstr( szMes, "stop" ) || + strstr( szMes, "Stop" )) + { + CHAR_setWorkInt( meindex, NPC_WORK_MODE,2); + + /* 伙□皿楮醒及奶件正□田伙毛聂仁允月 */ + CHAR_setInt( meindex, CHAR_LOOPINTERVAL, + NPC_AIR_WAITINGMODE_WAITTIME); + /* 蜇箕及凛棉毛本永玄 */ + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTTIME, NowTime.tv_sec); + } + else if( strstr( szMes, NPC_AIR_DEBUGROUTINTG )) { + /* 犯田永弘迕 */ + char *p = strstr( szMes,NPC_AIR_DEBUGROUTINTG); + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + if( p) { + int a = atoi( p+strlen(NPC_AIR_DEBUGROUTINTG)); + if( a <0 ) a = 1; + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTROUTE, a); + } + //print( "route:%d\n",CHAR_getWorkInt( meindex, NPC_WORK_CURRENTROUTE)); + /* 伙□玄毛本永玄允月 */ + NPC_AirSetPoint( meindex, argstr); + } +#endif + } +} +/************************************** + * 伙□皿楮醒 + **************************************/ +void NPC_AirLoop( int meindex) +{ + int i; + int npc_wave = CHAR_getWorkInt( meindex, NPC_WORK_RUNWAVE); + switch( CHAR_getWorkInt( meindex, NPC_WORK_MODE )) { + case 0: + /* 谨切乒□玉及凛]凛棉毛民尼永弁允月 */ + /* 凛棉互烦匀凶及匹]请 允月 */ + if( CHAR_getWorkInt( meindex, NPC_WORK_CURRENTTIME) + + CHAR_getWorkInt( meindex, NPC_WORK_WAITTIME) + < NowTime.tv_sec) + { + /* SE 日允 穴件乒旦及陲太 */ + if( CHAR_getWorkInt( meindex, NPC_WORK_SEFLG )) { + //ANDY_reEdit + CHAR_sendSEoArroundCharacter( + CHAR_getInt( meindex, CHAR_FLOOR), + CHAR_getInt( meindex, CHAR_X), + CHAR_getInt( meindex, CHAR_Y), + npc_wave, + TRUE); + } + /* 请 允月凛及丢永本□斥*/ + for( i = 1; i < CHAR_PARTYMAX; i ++ ) { + int partyindex = CHAR_getWorkInt( meindex, CHAR_WORKPARTYINDEX1+i); + if( CHAR_CHECKINDEX( partyindex)) { + NPC_AirSendMsg( meindex, partyindex, NPC_AIR_MSG_START); + } + } + + CHAR_setWorkInt( meindex, NPC_WORK_MODE,1); + /* 伙□皿楮醒及裟请仄毛汹仁簧蘸卞允月 */ + CHAR_setInt( meindex, CHAR_LOOPINTERVAL, NPC_AIR_LOOPTIME); + } + return; + case 1: + /* 汹仁 */ + NPC_Air_walk( meindex); + case 2: + /* 鞅引匀化中月乒□玉 */ + /* 凛棉互烦匀凶及匹]请 允月 */ + if( CHAR_getWorkInt( meindex, NPC_WORK_CURRENTTIME) + + (CHAR_getWorkInt( meindex, NPC_WORK_WAITTIME) /3) + < NowTime.tv_sec) + { + CHAR_setWorkInt( meindex, NPC_WORK_MODE,1); + /* 伙□皿楮醒及裟请仄毛汹仁簧蘸卞允月 */ + CHAR_setInt( meindex, CHAR_LOOPINTERVAL, NPC_AIR_LOOPTIME); + + } + return; + case 3: + /* 谗邋仄化手]弁仿奶失件玄及 樟谨切及啃卞] + * 剂仄仇仇匹它尼奶玄毛中木化支月 + */ + if( CHAR_getWorkInt( meindex, NPC_WORK_CURRENTTIME) + 3 < NowTime.tv_sec){ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + CHAR_setInt( meindex, CHAR_LOOPINTERVAL, NPC_AIR_WAITINGMODE_WAITTIME); + { + int r = CHAR_getWorkInt( meindex, NPC_WORK_ROUTEMAX); + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTROUTE, RAND( 1, r)); + } + CHAR_setWorkInt( meindex, NPC_WORK_ROUNDTRIP, + CHAR_getWorkInt( meindex, NPC_WORK_ROUNDTRIP)^1); + if( CHAR_getWorkInt( meindex, NPC_WORK_ROUNDTRIP) == 1) { + int num = NPC_AirGetRoutePointNum( meindex, argstr); + CHAR_setWorkInt( meindex, NPC_WORK_ROUTEPOINT, num-1); + }else { + CHAR_setWorkInt( meindex, NPC_WORK_ROUTEPOINT, + CHAR_getWorkInt( meindex, NPC_WORK_ROUTEPOINT) +1); + } + NPC_AirSetPoint( meindex, argstr); + NPC_AirSetDestPoint( meindex, argstr); + CHAR_DischargeParty( meindex, 0); + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTTIME, NowTime.tv_sec); + if ((CHAR_getWorkInt(meindex, NPC_WORK_ONEWAYFLG) == 1) && + (CHAR_getWorkInt(meindex, NPC_WORK_ROUNDTRIP) == 1) ){ + CHAR_setInt( meindex, CHAR_LOOPINTERVAL, NPC_AIR_LOOPTIME); + CHAR_setWorkInt( meindex, NPC_WORK_MODE, 1); + } else + CHAR_setWorkInt( meindex, NPC_WORK_MODE, 0); + } + return; + default: + break; + } +} +/************************************** + * 汹仁[ + **************************************/ +static void NPC_Air_walk( int meindex) +{ + POINT start, end; + int dir; + int ret; + int i; + int npc_wave = CHAR_getWorkInt( meindex, NPC_WORK_RUNWAVE ); + + /* 汹仁楮溢 */ + /* 谗邋仄凶凛及质 */ + start.x = CHAR_getInt( meindex, CHAR_X); + start.y = CHAR_getInt( meindex, CHAR_Y); + end.x = CHAR_getWorkInt( meindex, NPC_WORK_ROUTETOX); + end.y = CHAR_getWorkInt( meindex, NPC_WORK_ROUTETOY); + + /* 谗邋仄凶及匹戚及禾奶件玄卞 */ + if( start.x == end.x && start.y == end.y ) { + int add = 1; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + + if( CHAR_getWorkInt( meindex, NPC_WORK_ROUNDTRIP ) == 1 ) { + add *= -1; + } + CHAR_setWorkInt( meindex, NPC_WORK_ROUTEPOINT, + CHAR_getWorkInt( meindex, NPC_WORK_ROUTEPOINT) +add); + if( NPC_AirSetPoint( meindex, argstr) == FALSE ) { + /* 卞谗邋*/ + /* 谨切乒□玉卞允月 */ + CHAR_setWorkInt( meindex, NPC_WORK_MODE,3); + + /* SE 日允 穴件乒旦及陲太 */ + if( CHAR_getWorkInt( meindex, NPC_WORK_SEFLG )) { + //ANDY_reEdit + CHAR_sendSEoArroundCharacter( + CHAR_getInt( meindex, CHAR_FLOOR), + CHAR_getInt( meindex, CHAR_X), + CHAR_getInt( meindex, CHAR_Y), + npc_wave, + TRUE); + } + /* 邋中凶凛及丢永本□斥*/ + for( i = 1; i < CHAR_PARTYMAX; i ++ ) { + int partyindex = CHAR_getWorkInt( meindex, CHAR_WORKPARTYINDEX1+i); + if( CHAR_CHECKINDEX( partyindex)) { + NPC_AirSendMsg( meindex, partyindex, NPC_AIR_MSG_END); + } + } + /* 蜇箕及凛棉毛本永玄 */ + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTTIME, NowTime.tv_sec); + return; + } + else { + return; + } + } + /*-------------------------------------------------------*/ + /* 汹井六月质 */ + + /* 轾毛菲户月 */ + dir = NPC_Util_getDirFromTwoPoint( &start,&end ); + + /* 漆中月桦赭及谨 由□ 奴汹五匹银丹 */ + end.x = CHAR_getInt( meindex, CHAR_X); + end.y = CHAR_getInt( meindex, CHAR_Y); + +#if 0 + /* 夫匀井井匀凶凛及啃及质 */ + for( i = 0; i < 100; i ++ ) { + if( dir < 0 ) { + dir = RAND( 0,7); + } + dir = NPC_Util_SuberiWalk( meindex, dir); + if( dir >= 0 && dir <= 7) break; + } +#endif + + if( dir >= 0 && dir <= 7 ) { + /* 汹仁 */ + ret = CHAR_walk( meindex, dir, 0); + + if( ret == CHAR_WALKSUCCESSED ) { + /* 愤坌互褪卅日醮棉毛汹井六月 */ + int i; + int mefl=CHAR_getInt( meindex, CHAR_FLOOR); + for( i = 1; i < CHAR_PARTYMAX; i ++ ) { + int toindex = CHAR_getWorkInt( meindex, i + CHAR_WORKPARTYINDEX1); + int fl = CHAR_getInt( toindex, CHAR_FLOOR); + int xx = CHAR_getInt( toindex, CHAR_X); + int yy = CHAR_getInt( toindex, CHAR_Y); + if( CHAR_CHECKINDEX(toindex) && + (mefl==fl) && (abs(xx-end.x)+abs(yy-end.y)<10) ) { + int parent_dir; + /* 阂及匏 午]褪及汹五蟆及匏 井日 轾毛菲户月 */ + /* 汹仁 */ + start.x = xx; + start.y = yy; + parent_dir = NPC_Util_getDirFromTwoPoint( &start,&end ); + /* 弘仿犯奴它旦左皿扑亦件汹五毛 蜇允月啃卞] + * 戚及阂反蟆及阂及 毛馨丹方丹卞允月 + */ + end = start; + if( parent_dir != -1 ) { + CHAR_walk( toindex, parent_dir, 0); + } + } + } + } + } +} +/************************************** + * 戚及桦赭毛本永玄允月 + **************************************/ +static int NPC_AirSetPoint( int meindex, char *argstr) +{ + char buf[4096]; + char buf2[256]; + char buf3[256]; + int floor,warpx,warpy; + int ret; + char routetostring[64]; + + snprintf( routetostring, sizeof( routetostring), "routeto%d", + CHAR_getWorkInt( meindex, NPC_WORK_CURRENTROUTE)); + + if( NPC_Util_GetStrFromStrWithDelim( argstr, routetostring,buf, sizeof(buf)) + == NULL ) + { + print( "npcair:nothing route \n"); + return FALSE; + } + + ret = getStringFromIndexWithDelim( buf, ";", + CHAR_getWorkInt( meindex, NPC_WORK_ROUTEPOINT), + buf2, sizeof(buf2)); + if( ret == FALSE ) return FALSE; + + // Arminius: add floor + + ret = getStringFromIndexWithDelim( buf2, ",", 1, + buf3, sizeof(buf3)); + if( ret == FALSE) return FALSE; + floor = atoi(buf3); + + ret = getStringFromIndexWithDelim( buf2, ",", 2, + buf3, sizeof(buf3)); + if( ret == FALSE) return FALSE; + CHAR_setWorkInt( meindex, NPC_WORK_ROUTETOX, atoi( buf3)); + warpx = atoi(buf3); + + ret = getStringFromIndexWithDelim( buf2, ",", 3, + buf3, sizeof(buf3)); + if( ret == FALSE) return FALSE; + CHAR_setWorkInt( meindex, NPC_WORK_ROUTETOY, atoi( buf3)); + warpy = atoi(buf3); + + if (floor!=CHAR_getInt(meindex, CHAR_FLOOR)) { + int i; + CHAR_warpToSpecificPoint(meindex, floor, warpx, warpy); + + for( i = 1; i < CHAR_PARTYMAX; i ++ ) { + int toindex = CHAR_getWorkInt( meindex, i + CHAR_WORKPARTYINDEX1); + if( CHAR_CHECKINDEX(toindex) ) { + CHAR_warpToSpecificPoint(toindex, floor, warpx, warpy); + } + } + CHAR_setWorkInt( meindex, NPC_WORK_ROUTETOX, warpx); + CHAR_setWorkInt( meindex, NPC_WORK_ROUTETOY, warpy); + } + + return TRUE; +} +/************************************** + * route 寞井日] 蟆互丐匀凶日公木毛 + * 惫寞及午仇卞本永玄允月[ + **************************************/ +static void NPC_AirSetDestPoint( int meindex, char *argstr) +{ + char buf[256]; + char routename[256]; + + snprintf( routename, sizeof( routename), "routename%d", + CHAR_getWorkInt( meindex, NPC_WORK_CURRENTROUTE)); + + if( NPC_Util_GetStrFromStrWithDelim( argstr, routename, buf, sizeof( buf)) + != NULL ) + { + CHAR_setChar( meindex, CHAR_OWNTITLE, buf); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX)); + } +} +/************************************** + * 隙烂今木凶失奶 丞毛 匀化中月井民尼永弁允月 + * 匀化中凶日分户 + **************************************/ +static BOOL NPC_AirCheckDeniedItem( int meindex, int charaindex, char *argstr) +{ + char buf[1024]; + BOOL found = TRUE; + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "denieditem", buf, sizeof( buf)) + != NULL ) + { + int i; + int ret; + for( i = 1; ; i ++) { + int itemid; + char buf2[64]; + int j; + ret = getStringFromIndexWithDelim( buf, ",", i, buf2, sizeof(buf2)); + if( ret == FALSE ) break; + itemid = atoi( buf2); + for( j = 0; j < CHAR_MAXITEMHAVE; j ++) { + int itemindex = CHAR_getItemIndex( charaindex, j); + if( ITEM_CHECKINDEX( itemindex)) { + if( ITEM_getInt( itemindex, ITEM_ID) == itemid) { + found = FALSE; + break; + } + } + } + } + } + return found; +} +/************************************** + * 隙烂今木凶失奶 丞毛 匀化中月井民尼永弁允月 + * 匀化中卅中午分户 + **************************************/ +BOOL NPC_AirCheckAllowItem( int meindex, int charaindex, BOOL pickupmode) +{ + char buf[1024]; + BOOL found = TRUE; + BOOL pickup = FALSE; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "pickupitem", buf, sizeof( buf)) + != NULL ) + { + pickup = TRUE; + } + if( NPC_Util_GetStrFromStrWithDelim( argstr, "allowitem", buf, sizeof( buf)) + != NULL ) + { + int i; + int ret; + for( i = 1; ; i ++) { + int itemid; + char buf2[64]; + int j; + BOOL getflg; + ret = getStringFromIndexWithDelim( buf, ",", i, buf2, sizeof(buf2)); + if( ret == FALSE ) break; + itemid = atoi( buf2); + getflg = FALSE; + for( j = 0; j < CHAR_MAXITEMHAVE; j ++) { + int itemindex = CHAR_getItemIndex( charaindex, j); + if( ITEM_CHECKINDEX( itemindex)) { + if( ITEM_getInt( itemindex, ITEM_ID) == itemid) { + /* 椭瘀互缭匀化中月井日]公及失奶 丞毛潸月 */ + if( pickupmode && pickup && !getflg) { + CHAR_DelItem( charaindex, j); + getflg = TRUE; + } + break; + } + } + } + if( j == CHAR_MAXITEMHAVE) { + found = FALSE; + break; + } + } + } + return found; +} + +/************************************** + * 隙烂今木凶伊矛伙动晓井民尼永弁允月 + **************************************/ +static BOOL NPC_AirCheckLevel( int meindex, int charaindex, char *argstr) +{ + int level; + + /* 卅仃木壬中仃卅中娄醒及民尼永弁 */ + level = NPC_Util_GetNumFromStrWithDelim( argstr, "needlevel"); + if( level == -1 ) { + return TRUE; + } + if( CHAR_getInt( charaindex, CHAR_LV) >= level ) return TRUE; + + return FALSE; +} + +#ifdef _NPC_AIRLEVEL +static BOOL NPC_AirCheckMaxLevel( int meindex, int charaindex, char *argstr) +{ + int level; + + /* 卅仃木壬中仃卅中娄醒及民尼永弁 */ + level = NPC_Util_GetNumFromStrWithDelim( argstr, "maxlevel"); + if( level == -1 ) { + return TRUE; + } + if( CHAR_getInt( charaindex, CHAR_LV) < level ) return TRUE; + + return FALSE; +} +#endif + +/************************************** + * 豢嗯毛民尼永弁允月 + * -1 蛲 0动晓” ]井勾 邰Stone + **************************************/ +static int NPC_AirCheckStone( int meindex, int charaindex, char *argstr) +{ + int gold; + + /* 卅仃木壬中仃卅中娄醒及民尼永弁 */ + gold = NPC_Util_GetNumFromStrWithDelim( argstr, "needstone"); + if( gold == -1 ) { + return 0; + } + if( CHAR_getInt( charaindex, CHAR_GOLD) >= gold ) return gold; + + return -1; +} +/************************************** + * 丢永本□斥毛霜月 + * 娄醒及丢永本□斥互卅仃木壬犯白巧伙玄丢永本□斥毛霜月 + **************************************/ +static void NPC_AirSendMsg( int meindex, int talkerindex, int tablenum) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[256]; + char msg[256]; + if( tablenum < 0 || tablenum >= arraysizeof( airmsg)) return; + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + + if( NPC_Util_GetStrFromStrWithDelim( argstr, airmsg[tablenum].option, buf, sizeof( buf)) + != NULL ) + { + strcpy( msg, buf); + } + else { + snprintf( msg, sizeof(msg),airmsg[tablenum].defaultmsg); + } + CHAR_talkToCli( talkerindex, meindex, msg, CHAR_COLORYELLOW); +} +/************************************** + * 伙□玄 □皮伙及禾奶件玄及醒毛潸 允月 + **************************************/ +static int NPC_AirGetRoutePointNum( int meindex, char *argstr ) +{ + int i; + char buf[4096]; + char buf2[256]; + int ret; + char routetostring[64]; + + snprintf( routetostring, sizeof( routetostring), "routeto%d", + CHAR_getWorkInt( meindex, NPC_WORK_CURRENTROUTE)); + + if( NPC_Util_GetStrFromStrWithDelim( argstr, routetostring,buf, sizeof(buf)) + == NULL ) + { + print( "npcair:nothing route \n"); + return -1; + } + for( i = 1; ; i ++ ) { + ret = getStringFromIndexWithDelim( buf, ";", i, buf2, sizeof(buf2)); + if( ret == FALSE) break; + } + return( i -1); +} +BOOL NPC_AirCheckJoinParty( int meindex, int charaindex, BOOL msgflg) +{ + //int fd; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + int ret; + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + + /* ㄠ弘伉永玉动 及心 */ + if( !NPC_Util_charIsInFrontOfChar( charaindex, meindex, 1 )) return FALSE; + /* 昙乐反蛐 允月 */ + if( CHAR_getWorkInt( meindex, NPC_WORK_MODE) != 0 ) { + if( msgflg) NPC_AirSendMsg( meindex, charaindex, NPC_AIR_MSG_GETTINGON); + return FALSE; + } + /* 天□化不分匀凶日分户 */ + if( CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE ) != CHAR_PARTY_NONE) { + if( msgflg) NPC_AirSendMsg( meindex, charaindex, NPC_AIR_MSG_NOTPARTY); + return FALSE; + } + /* 由□ 奴及谛醒毛民尼永弁允月 */ + if( CHAR_getEmptyPartyArray( meindex) == -1 ) { + if( msgflg) NPC_AirSendMsg( meindex, charaindex, NPC_AIR_MSG_OVERPARTY); + return FALSE; + } + /* 失奶 丞及民尼永弁毛允月(嗟鞅失奶 丞) */ + if( !NPC_AirCheckDeniedItem( meindex, charaindex, argstr)) { + if( msgflg) NPC_AirSendMsg( meindex, charaindex, NPC_AIR_MSG_DENIEDITEM); + return FALSE; + } +#ifdef _ITEM_CHECKWARES + if( CHAR_CheckInItemForWares( charaindex, 0) == FALSE ) { + CHAR_talkToCli( charaindex, -1, "无法携带货物上机。", CHAR_COLORYELLOW); + return FALSE; + } +#endif + + /* 失奶 丞及民尼永弁毛允月( 邰失奶 丞) */ + if( !NPC_AirCheckAllowItem( meindex, charaindex, FALSE)) { + if( msgflg) NPC_AirSendMsg( meindex, charaindex, NPC_AIR_MSG_ALLOWITEM); + return FALSE; + } +#ifdef _NPC_AIRDELITEM + if( !NPC_AirCheckDelItem( meindex, charaindex, FALSE) ){ //若是没扣除了道具 + if( msgflg ) NPC_AirSendMsg( meindex, charaindex, NPC_AIR_MSG_DELITEM); + return FALSE; + } +#endif + /* 伊矛伙及民尼永弁毛允月 */ + if( !NPC_AirCheckLevel( meindex, charaindex, argstr)) { + if( msgflg) NPC_AirSendMsg( meindex, charaindex, NPC_AIR_MSG_LEVEL); + return FALSE; + } +#ifdef _NPC_AIRLEVEL + if( !NPC_AirCheckMaxLevel( meindex, charaindex, argstr)) { + if( msgflg) NPC_AirSendMsg( meindex, charaindex, NPC_AIR_MSG_MAXLEVEL); + return FALSE; + } +#endif + /* 奶矛件玄 井民尼永弁允月 */ +// if( CHAR_getInt( charaindex, CHAR_NOWEVENT) != 0 || +// CHAR_getInt( charaindex, CHAR_NOWEVENT2) != 0 || +// CHAR_getInt( charaindex, CHAR_NOWEVENT3) != 0 ) +// { +// if( msgflg) NPC_AirSendMsg( meindex, charaindex, NPC_AIR_MSG_EVENT); +// return FALSE; +// } + /* 豢嗯及民尼永弁毛允月 云嗯毛潸月及匹] 蔽民尼永弁卞允月仇午″ */ + ret = NPC_AirCheckStone( meindex, charaindex, argstr); + if( ret == -1 ) { + if( msgflg) NPC_AirSendMsg( meindex, charaindex, NPC_AIR_MSG_GOLD); + return FALSE; + } + if( ret != 0 ) { + char msgbuf[128]; + /* 豢嗯毛午月 */ + CHAR_setInt( charaindex, CHAR_GOLD, + CHAR_getInt( charaindex, CHAR_GOLD) - ret); + /* 霜耨 */ + CHAR_send_P_StatusString( charaindex, CHAR_P_STRING_GOLD); + snprintf( msgbuf, sizeof( msgbuf), "支付了%d Stone!", ret); + CHAR_talkToCli( charaindex, -1, msgbuf, CHAR_COLORYELLOW); + } + /* 由□ 奴卞 月 */ + //CHAR_JoinParty_Main( charaindex, meindex); + + //fd = getfdFromCharaIndex( charaindex ); + + //lssproto_PR_send( fd, 1, 1); + + return TRUE; +} + +#ifdef _NPC_AIRDELITEM //上飞机时,检查是否要扣除道具 +BOOL NPC_AirCheckDelItem( int meindex, int charaindex, BOOL pickupmode) +{ + char buf[1024]; + BOOL found = TRUE; + BOOL pickup = FALSE; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + if( NPC_Util_GetStrFromStrWithDelim( argstr, "delitem", buf, sizeof( buf)) + != NULL ) + { + int i; + int ret; + for( i = 1; ; i ++) { + int itemid; + char buf2[64]; + int j; + ret = getStringFromIndexWithDelim( buf, ",", i, buf2, sizeof(buf2)); + if( ret == FALSE ) break; + itemid = atoi( buf2); + for( j = 0; j < CHAR_MAXITEMHAVE; j ++) { + int itemindex = CHAR_getItemIndex( charaindex, j); + if( ITEM_CHECKINDEX( itemindex)) { + if( ITEM_getInt( itemindex, ITEM_ID) == itemid) { + CHAR_DelItem( charaindex, j); + break; + } + } + } + if( j == CHAR_MAXITEMHAVE) { + found = FALSE; + break; + } + } + } + return found; +} +#endif diff --git a/gmsv/npc/npc_alldoman.c b/gmsv/npc/npc_alldoman.c new file mode 100644 index 0000000..e04ff04 --- /dev/null +++ b/gmsv/npc/npc_alldoman.c @@ -0,0 +1,497 @@ +#include "version.h" +#include +#include +#include +#include "object.h" +#include "char_base.h" +#include "char.h" +#include "util.h" +#include "npcutil.h" +#include "item.h" +#include "readmap.h" +#include "enemy.h" +#include "chatmagic.h" +#include "log.h" +#include "npc_itemchange.h" +#include "lssproto_serv.h" +#include "saacproto_cli.h" +#include "npc_eventaction.h" +#include "npc_charm.h" + +#ifdef _ALLDOMAN +#include "npc_alldoman.h" + +#ifdef _FIX_ALLDOMAN +void Send_S_herolist( int ti ); +#define MAX_HERO_LIST 50 +typedef struct _tagHerolistBase +{ + char strings[3][64]; + int intdata[3]; + int use; +}HerolistBase; +HerolistBase Herolist[MAX_HERO_LIST]; +#else +#define MAX_HERO_COLUMN 7 +#define MAX_HERO_LIST 100 +char Herolist[MAX_HERO_LIST][MAX_HERO_COLUMN][72]; +#endif + + + +int sort[MAX_HERO_LIST][2]; +int countnum = -1 ; +int showpage = 1 ; +int totalpage = 1; + +static void NPC_Alldoman_selectWindow( int meindex, int talker, int seqno,char *data); + +void NPC_AlldomanWindowTalked(int meindex, int talkerindex, int seqno, int select,char *data) +{ + char buf2[256]; + char buf[256]; + int i; + int playernum = CHAR_getPlayerMaxNum(); + //andy_log + print( "seqno:%d\n", seqno); + switch(seqno) + { + case NPC_ALLDOMAN_MAIN_WND: + if ( select == WINDOW_BUTTONTYPE_NEXT ) { + showpage ++ ; + NPC_Alldoman_selectWindow(meindex , talkerindex , 4 ,""); + } + if ( select == WINDOW_BUTTONTYPE_OK ) { + //CHAR_talkToCli(talkerindex,meindex,"看清楚了!",CHAR_COLORRED); + showpage = 1 ; + NPC_Alldoman_selectWindow(meindex , talkerindex, 5 ,""); + } + break; + case NPC_ALLDOMAN_SELECT_WND: + if(atoi(data)==2) { + //CHAR_talkToCli(talkerindex,meindex,"1!",CHAR_COLORRED); + if ( CHAR_getInt( talkerindex , CHAR_FLOOR ) != 8200 ) { + CHAR_talkToCli(talkerindex,-1,"这里只能给真正的英雄刻写!",CHAR_COLORRED); + break; + } + if ( CHAR_getWorkInt( talkerindex , CHAR_WORKHEROFLOOR ) > 132 || + CHAR_getWorkInt( talkerindex , CHAR_WORKHEROFLOOR ) <= 0 ) { + CHAR_setWorkInt( talkerindex , CHAR_WORKHEROFLOOR , 0 ) ; + CHAR_talkToCli(talkerindex,-1,"这里只能给真正的英雄刻写!",CHAR_COLORRED); + break; + } + sprintf( buf2 , "你拿出了打败守灵者%3d的证明,试图将自己的姓名刻上石碑!" , CHAR_getWorkInt( talkerindex , CHAR_WORKHEROFLOOR ) ); + CHAR_talkToCli(talkerindex,-1,buf2,CHAR_COLORRED); + if ( CHAR_getWorkInt( talkerindex , CHAR_WORKHEROFLOOR ) == 132 ) { + sprintf( buf2 , "%s" , "尼斯大陆英雄" ) ; + //到达顶层对全星系广播 + sprintf( buf , "%s征服了英雄战场,由风之精灵将这个消息通知全世界,新的英雄诞生了!!" , CHAR_getChar( talkerindex, CHAR_NAME ) ); + for( i = 0 ; i < playernum ; i++) { + if( CHAR_getCharUse(i) != FALSE ) { + CHAR_talkToCli( i, -1, buf, CHAR_COLORBLUE2); + } + } + } + else if ( CHAR_getWorkInt( talkerindex , CHAR_WORKHEROFLOOR ) >= 130 ) + sprintf( buf2 , "%s" , "尼斯大陆战士" ) ; + else if ( CHAR_getWorkInt( talkerindex , CHAR_WORKHEROFLOOR ) >= 125 ) + sprintf( buf2 , "%s" , "尼斯大陆勇士" ) ; + else if ( CHAR_getWorkInt( talkerindex , CHAR_WORKHEROFLOOR ) >= 120 ) + sprintf( buf2 , "%s" , "萨伊那斯英雄" ) ; + else if ( CHAR_getWorkInt( talkerindex , CHAR_WORKHEROFLOOR ) >= 115 ) + sprintf( buf2 , "%s" , "斯巴达战士" ) ; + else if ( CHAR_getWorkInt( talkerindex , CHAR_WORKHEROFLOOR ) >= 110 ) + sprintf( buf2 , "%s" , "萨姆吉尔战士" ) ; + else if ( CHAR_getWorkInt( talkerindex , CHAR_WORKHEROFLOOR ) >= 100 ) + sprintf( buf2 , "%s" , "玛丽那丝战士" ) ; + else if ( CHAR_getWorkInt( talkerindex , CHAR_WORKHEROFLOOR ) >= 80 ) + sprintf( buf2 , "%s" , "卡坦战士" ) ; + else if ( CHAR_getWorkInt( talkerindex , CHAR_WORKHEROFLOOR ) >= 60 ) + sprintf( buf2 , "%s" , "霍特尔战士" ) ; + else if ( CHAR_getWorkInt( talkerindex , CHAR_WORKHEROFLOOR ) >= 40 ) + sprintf( buf2 , "%s" , "降魔勇士" ) ; + else if ( CHAR_getWorkInt( talkerindex , CHAR_WORKHEROFLOOR ) >= 20 ) + sprintf( buf2 , "%s" , "圣灵勇士" ) ; + else if ( CHAR_getWorkInt( talkerindex , CHAR_WORKHEROFLOOR ) >= 1 ) + sprintf( buf2 , "%s" , "初犊勇士" ) ; + else + sprintf( buf2 , " " ); + saacproto_UpdataStele_send ( + acfd , + CHAR_getChar( talkerindex , CHAR_CDKEY ), + CHAR_getChar( talkerindex , CHAR_NAME ) , + buf2 , + CHAR_getInt( talkerindex , CHAR_LV ) , + CHAR_getInt( talkerindex , CHAR_TRANSMIGRATION) , + 10 , + CHAR_getWorkInt( talkerindex , CHAR_WORKHEROFLOOR ) + ) ; + //清除WorkFloor + CHAR_setWorkInt( talkerindex , CHAR_WORKHEROFLOOR , 0 ) ; + } + if(atoi(data)==4) { + //CHAR_talkToCli(talkerindex,meindex,"2!",CHAR_COLORRED); + showpage = 1 ; + NPC_Alldoman_selectWindow(meindex , talkerindex, 6 ,""); + } + if(atoi(data)==6) { + //CHAR_talkToCli(talkerindex,meindex,"3!",CHAR_COLORRED); + } + break; + case NPC_ALLDOMAN_LIST_WND: + if( select == WINDOW_BUTTONTYPE_OK ){ + print("\nSyu log FloorWorkint => %d" , CHAR_getWorkInt( talkerindex , CHAR_WORKHEROFLOOR )); + } + if( select == WINDOW_BUTTONTYPE_PREV && showpage > 1 ) { + showpage -- ; + NPC_Alldoman_selectWindow(meindex , talkerindex, 6 ,"" ); + } + if( select == WINDOW_BUTTONTYPE_NEXT && showpage < totalpage ) { + showpage ++ ; + NPC_Alldoman_selectWindow(meindex , talkerindex, 6 ,""); + } + break; + } +} + +static void NPC_Alldoman_selectWindow( int meindex, int talker, int num, char *data) +{ + int buttontype = 0,windowtype = 0,windowno = 0 , i ; + int fd = getfdFromCharaIndex( talker); + char token[1024]; + char token2[100 * 100]; + + + //andy_log + print( "NPC_Alldoman_selectWindow( num:%d)\n", num); + switch(num) + { + case 4: + if ( showpage == 1 ) { + buttontype = WINDOW_BUTTONTYPE_NEXT; + sprintf( token, "485447圣饼时,吉鲁出现大批机暴横行,所到之处皆无一幸免,尼斯各村的长老达成共识,调集各村勇士,前往消灭这群发狂的机暴,这群勇士在海底隧道入口跟这群机暴激战,不料,实力相差悬殊,勇士们伤亡惨重,残馀的勇士,选择在霍特尔海底通路的入口做最"); + } + else if ( showpage == 2 ) { + buttontype = WINDOW_BUTTONTYPE_NEXT; + sprintf( token, "後的的抵抗,各村长老召集大批人力,封死所有通往吉鲁的海底通道,终於在大批机暴涌入前,将入口封死,此地为485550圣饼时所建造,为纪念485447圣饼时所牺牲的勇士,立此石碑,建此地洞,命名为“英雄战场”,望後世人效法先烈的行径,达到强种强"); + } + else if ( showpage == 3) { + buttontype = WINDOW_BUTTONTYPE_OK; + sprintf( token, "族为目的,让尼斯大陆的人们生生不息,上面的英雄是最近勇闯“英雄战场”所留下来的,特此诏告全尼斯英雄!\n\n 英雄战场制作委员会"); + } + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = NPC_ALLDOMAN_MAIN_WND; + lssproto_WN_send(fd, windowtype, buttontype, windowno, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), token ); + break; + case 5: + buttontype = WINDOW_BUTTONTYPE_NONE; + windowtype = WINDOW_MESSAGETYPE_SELECT; + windowno = NPC_ALLDOMAN_SELECT_WND; + sprintf(token, + "0\n\n         刻写石碑" + "\n\n        检视其他勇者" + "\n\n          取消" + ); + lssproto_WN_send( fd, windowtype, buttontype, windowno, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX),token); + break; + case 6: + if ( totalpage != 1 && showpage == 1 ) + buttontype = WINDOW_BUTTONTYPE_OK | WINDOW_BUTTONTYPE_NEXT; + else if ( totalpage == 1 ) + buttontype = WINDOW_BUTTONTYPE_OK ; + else if ( totalpage != 1 && showpage == totalpage ) + buttontype = WINDOW_BUTTONTYPE_OK | WINDOW_BUTTONTYPE_PREV; + else if ( totalpage != 1 && showpage != 1 && showpage != totalpage ) + buttontype = WINDOW_BUTTONTYPE_OK | WINDOW_BUTTONTYPE_PREV | WINDOW_BUTTONTYPE_NEXT; + windowtype = WINDOW_MESSAGETYPE_WIDEMESSAGEANDLINEINPUT; + windowno = NPC_ALLDOMAN_LIST_WND; + sprintf ( token2 , " 姓名 头衔 楼层 等级 转生\n"); + for ( i=0+(showpage-1 )*15; i= MAX_HERO_LIST || i<0 ) break; + if( Herolist[i].use == 0 ) continue; + sprintf( token , "%16s %13s %7d %7d %7d\n" , + Herolist[i].strings[1], Herolist[i].strings[2], + Herolist[i].intdata[3], Herolist[i].intdata[0], + Herolist[i].intdata[1] ); + strcat( token2, token); +#else + if( atoi ( Herolist[sort[MAX_HERO_LIST - 1 - i ][1]][6] ) == 0 || + atoi ( Herolist[sort[MAX_HERO_LIST - 1 - i ][1]][3] ) == 0 ) + continue ; + sprintf( token , "%16s %13s %7d %7d %7d\n" , + Herolist[sort[MAX_HERO_LIST - 1 - i ][1]][1] , + Herolist[sort[MAX_HERO_LIST - 1 - i ][1]][2] , + atoi ( Herolist[sort[MAX_HERO_LIST - 1 - i ][1]][6] ), + atoi ( Herolist[sort[MAX_HERO_LIST - 1 - i ][1]][3] ), + atoi ( Herolist[sort[MAX_HERO_LIST - 1 - i ][1]][4] ) + ); + strcat ( token2 , token ) ; + if ( i + 1 == countnum ) + break; +#endif + } + lssproto_WN_send( fd, windowtype, buttontype, windowno, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX),token2); + break; + } +} + +static int loadherolist = 0; +BOOL NPC_AlldomanInit( int meindex ) +{ +//andy_log +//print( "\n\nNPC_AlldomanInit( %d)\n\n", meindex); + if( loadherolist == 0){ + loadherolist = 1; + saacproto_UpdataStele_send ( acfd , "FirstLoad", "LoadHerolist" , "华义" , 0 , 0 , 0 , 999 ) ; + } + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPEALLDOMAN); + CHAR_setFlg( meindex , CHAR_ISATTACKED , 0 ); + return TRUE; +} + +void NPC_AlldomanTalked( int meindex , int talker , char *msg ,int color ) +{ + if( NPC_Util_CharDistance( talker, meindex ) > 1) return; + if( NPC_Util_isFaceToFace( talker, meindex , 1 ) == FALSE ) return; + showpage = 1 ; + NPC_Alldoman_selectWindow(meindex, talker , 4 ,""); +} +#ifdef _FIX_ALLDOMAN +void NPC_rePlaceHeroList( int fti, int tti) +{ + int i; + if( tti<0 || tti>=MAX_HERO_LIST ) return; + if( fti<0 || fti>=MAX_HERO_LIST ) return; + for( i=0; i<3; i++ ){ + sprintf( Herolist[tti].strings[i], "%s", Herolist[fti].strings[i]); + } + for( i=0; i<4; i++ ){ + Herolist[tti].intdata[i] = Herolist[fti].intdata[i]; + } + Herolist[tti].use = Herolist[fti].use; + Herolist[fti].use = 0; +} +#endif +void NPC_AlldomanWriteStele ( char *token ) +{ +/*#ifdef _FIX_ALLDOMAN + char buf1[512], buf2[256]; + int k=0, ti=-1, i; + BOOL rePlace = FALSE; + + if( token==NULL || strlen( token)<=0 ) return; + +//andy_log +print( "token:[%s]\n", token); + + if( getStringFromIndexWithDelim( token, ",", 1, buf1, sizeof( buf1) ) == FALSE ) return; +//andy_log +print( "buf1:[%s]\n", buf1); + if( !strcmp( buf1, "A|") ){ + for( i=0; i=MAX_HERO_LIST ) continue; + if( rePlace == TRUE ){ + for( i=MAX_HERO_LIST-1; i>ti; i++ ){ + NPC_rePlaceHeroList( i-1, i); + } + Herolist[ti].use = 0; + } + if( getStringFromIndexWithDelim( buf1, "|", 2, buf2, sizeof( buf2) ) == FALSE ) continue; + sprintf( Herolist[ti].strings[0], "%s", buf2 ); + if( getStringFromIndexWithDelim( buf1, "|", 3, buf2, sizeof( buf2) ) == FALSE ) continue; + sprintf( Herolist[ti].strings[1], "%s", buf2 ); + if( getStringFromIndexWithDelim( buf1, "|", 4, buf2, sizeof( buf2) ) == FALSE ) continue; + sprintf( Herolist[ti].strings[3], "%s", buf2 ); + + if( getStringFromIndexWithDelim( buf1, "|", 5, buf2, sizeof( buf2) ) == FALSE ) continue; + Herolist[ti].intdata[0] = atoi( buf2); + if( getStringFromIndexWithDelim( buf1, "|", 6, buf2, sizeof( buf2) ) == FALSE ) continue; + Herolist[ti].intdata[1] = atoi( buf2); + if( getStringFromIndexWithDelim( buf1, "|", 7, buf2, sizeof( buf2) ) == FALSE ) continue; + Herolist[ti].intdata[3] = atoi( buf2); + Herolist[ti].use = 1; +//andy_log +print( "ti:[%d]\n", ti); + } + //andy_log + for( i=0; i sort[j+1][0] ){ + flag = 1 ; + temp = sort[j][0]; + temp1 = sort[j][1]; + sort[j][0] = sort[j + 1][0]; + sort[j][1] = sort[j + 1][1]; + sort[j+1][0] = temp; + sort[j+1][1] = temp1; + } + } + if ( flag != 1 ) + break; + } + totalpage = countnum / 15 ; + if ( ( countnum % 15 ) != 0 ) + totalpage ++; +#endif + return; + } + } + linenum ++; +//#endif + + if ( (addr = strstr ( token , "\n" )) == NULL ) break; + strcpy ( token , addr + 1 ) ; + if( token == NULL || (lens = strlen( token)) <= 0 ) { +#ifdef _ALLDOMAN_DEBUG + countnum = 0 ; + for ( i = 0 ; i < MAX_HERO_LIST ; i ++ ) { + sort[i][0] = atoi ( Herolist[i][6] ) ; + sort[i][1] = i ; + if ( sort[i][0] != 0 && sort[i][0] != -1 ) + countnum ++ ; + } + for ( i = 0 ; i < MAX_HERO_LIST - 1 ; i ++ ) { + flag = 0 ; + for ( j = 0 ; j < MAX_HERO_LIST - 1 ; j ++ ) { + if ( sort[j][0] > sort[j+1][0] ){ + flag = 1 ; + temp = sort[j][0]; + temp1 = sort[j][1]; + sort[j][0] = sort[j + 1][0]; + sort[j][1] = sort[j + 1][1]; + sort[j+1][0] = temp; + sort[j+1][1] = temp1; + } + } + if ( flag != 1 ) + break; + } + totalpage = countnum / 15 ; + if ( ( countnum % 15 ) != 0 ) + totalpage ++; +#endif + return; + } + } + + countnum = 0 ; + for ( i = 0 ; i < MAX_HERO_LIST ; i ++ ) { + sort[i][0] = atoi ( Herolist[i][6] ) ; + sort[i][1] = i ; + if ( sort[i][0] != 0 && sort[i][0] != -1 ) + countnum ++ ; + } + + for ( i = 0 ; i < MAX_HERO_LIST - 1 ; i ++ ) { + flag = 0 ; + for ( j = 0 ; j < MAX_HERO_LIST - 1 ; j ++ ) { + if ( sort[j][0] > sort[j+1][0] ){ + flag = 1 ; + temp = sort[j][0]; + temp1 = sort[j][1]; + sort[j][0] = sort[j + 1][0]; + sort[j][1] = sort[j + 1][1]; + sort[j+1][0] = temp; + sort[j+1][1] = temp1; + } + } + if ( flag != 1 ) + break; + } + + + totalpage = countnum / 15 ; + if ( ( countnum % 15 ) != 0 ) + totalpage ++; +//#endif +} + +void NPC_Alldoman_S_WriteStele( char *ocdkey , char *oname , char *ncdkey , + char *nname , char *title , int level , int trns , int floor ) +{ +#ifdef _FIX_ALLDOMAN + return; +#else + int i , j , temp , temp1 , flag ; + for ( i = 0 ; i < MAX_HERO_COLUMN ; i ++ ) { + if ( ( strcmp( Herolist[i][0] , ocdkey ) == 0 ) && ( strcmp( Herolist[i][1] , oname ) == 0 ) ) { + sprintf( Herolist[i][0] , "%s" , ncdkey ) ; + sprintf( Herolist[i][1] , "%s" , nname ) ; + sprintf( Herolist[i][2] , "%s" , title ) ; + sprintf( Herolist[i][3] , "%d" , level ) ; + sprintf( Herolist[i][4] , "%d" , trns ) ; + sprintf( Herolist[i][6] , "%d" , floor ) ; + break; + } + } + countnum = 0 ; + for ( i = 0 ; i < MAX_HERO_LIST ; i ++ ) { + sort[i][0] = atoi ( Herolist[i][6] ) ; + sort[i][1] = i ; + if ( sort[i][0] != 0 && sort[i][0] != -1 ) + countnum ++ ; + } + for ( i = 0 ; i < MAX_HERO_LIST - 1 ; i ++ ) { + flag = 0 ; + for ( j = 0 ; j < MAX_HERO_LIST - 1 ; j ++ ) { + if ( sort[j][0] > sort[j+1][0] ){ + flag = 1 ; + temp = sort[j][0]; + temp1 = sort[j][1]; + sort[j][0] = sort[j + 1][0]; + sort[j][1] = sort[j + 1][1]; + sort[j+1][0] = temp; + sort[j+1][1] = temp1; + } + } + if ( flag != 1 ) + break; + } + totalpage = countnum / 15 ; + if ( ( countnum % 15 ) != 0 ) + totalpage ++ ; + +#endif +} + +#endif + diff --git a/gmsv/npc/npc_auctioneer.c b/gmsv/npc/npc_auctioneer.c new file mode 100644 index 0000000..9eb4a14 --- /dev/null +++ b/gmsv/npc/npc_auctioneer.c @@ -0,0 +1,17 @@ +#include "version.h" +#include +#include +#include "char.h" +#include "object.h" +#include "lssproto_serv.h" +#include "npcutil.h" +#include "handletime.h" +#include "char_base.h" +#include "configfile.h" +#include "npc_auctioneer.h" +#include "pet.h" +#include "item.h" +#include "util.h" +#include "anim_tbl.h" +#include "log.h" +#include "saacproto_cli.h" diff --git a/gmsv/npc/npc_bankman.c b/gmsv/npc/npc_bankman.c new file mode 100644 index 0000000..002819b --- /dev/null +++ b/gmsv/npc/npc_bankman.c @@ -0,0 +1,585 @@ +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "configfile.h" +#include "lssproto_serv.h" +#include "saacproto_cli.h" +#include "npc_bankman.h" +#include "family.h" + +extern int familyNumTotal; +extern char familyListBuf[MAXFAMILYLIST]; + +char sendbuf[1024]; +char buf[1024]; +char subbuf[128]; +int i, j; + + +struct { + int windowno; + int windowtype; + int buttontype; + int takeitem; + int giveitem; + char message[4096]; +}w; + +struct { + BOOL use; + int checkhaveitem; + int checkhaveitemgotowin; + int checkdonthaveitem; + int checkdonthaveitemgotowin; + int warp; + int battle; + int gotowin; +}buttonproc[13]; /* ok,cancel, yes,no,prev,next 及凛及质 */ + + + + + +enum { + CHAR_WORK_MSGCOLOR = CHAR_NPCWORKINT1, +}; +static void NPC_Bankman_selectWindow( int meindex, int toindex, int num); +static BOOL NPC_Bankman_readData( int meindex, int windowno, BOOL chkflg); +static int NPC_Bankman_restoreButtontype( char *data ); + +BOOL NPC_BankmanInit( int meindex ) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[1024]; + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "conff", buf, sizeof( buf))== NULL ){ + print( "familyman:没有指定设定的档案 。\n"); + return FALSE; + } + /* 赓渝凛卞涩烂犯□正毛民尼永弁仄化支月 */ + if( !NPC_Bankman_readData( meindex, -1, TRUE) ) { + return FALSE; + } + + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPEWINDOWMAN ); + + return TRUE; +} + +void NPC_BankmanTalked( int meindex , int talkerindex , char *szMes ,int color ) +{ + + NPC_Bankman_selectWindow( meindex, talkerindex, 1 ); + +} + +void NPC_BankmanLooked( int meindex , int lookedindex) +{ + + print(" Look:me:%d,looked:%d ",meindex,lookedindex); + NPC_Bankman_selectWindow( meindex, lookedindex,1 ); + +} + +static void NPC_Bankman_selectWindow( int meindex, int toindex, int num) +{ + + int fd; + char buf[256]; + + /* 皿伊奶乩□卞覆仄化分仃 杀允月 */ + if( CHAR_getInt( toindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) { + return; + } + /* ㄠ弘伉永玉动 及心 */ + if( !NPC_Util_charIsInFrontOfChar( toindex, meindex, 1 )) return; + + if( !NPC_Bankman_readData( meindex, num, FALSE) ) { + print( "familyman:readdata error\n"); + return; + } + + fd = getfdFromCharaIndex( toindex); + if( fd != -1 ) { + lssproto_WN_send( fd, w.windowtype, + w.buttontype, + w.windowno+100, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + makeEscapeString( w.message, buf, sizeof(buf))); + } +} + +void NPC_BankmanWindowTalked( int meindex, int talkerindex, + int seqno, int select, char *data) + +{ + + int button = -1; + char buf[2048], buff[256]; + + /* ㄠ弘伉永玉动 及心 */ + if( NPC_Util_CharDistance( talkerindex, meindex ) > 1) return; + + /* 仇及它奴件玉它 寞及犯□正毛 心 戈 */ + if( !NPC_Bankman_readData( meindex, seqno - 100, FALSE) ) { + print( "familyman:readdata error\n"); + return; + } + /* 瓷仄凶示正件毛譬屯月 */ + if( w.windowtype == WINDOW_MESSAGETYPE_SELECT ) { + //if( w.windowtype == WINDOW_MESSAGETYPE_MESSAGE ) { + // shan end + button = atoi( data)+5; + if( button > 12 ) { + print( "familyman:invalid button[%d]\n", button); + return; + } + } + else if( select & WINDOW_BUTTONTYPE_OK) button = 0; + else if( select & WINDOW_BUTTONTYPE_CANCEL) button = 1; + else if( select & WINDOW_BUTTONTYPE_YES) button = 2; + else if( select & WINDOW_BUTTONTYPE_NO) button = 3; + else if( select & WINDOW_BUTTONTYPE_PREV) button = 4; + else if( select & WINDOW_BUTTONTYPE_NEXT) button = 5; + else { + print( "familyman:invalid button[%d]\n", select); + return; + } + // shan begin + //if( buttonproc[button].use == TRUE ) { + //if( select > 0) { + if( button > 0 ) { + // shan end + int fd; + int newwin = -1; + + fd = getfdFromCharaIndex( talkerindex); + + /* 示正件卞方匀化质 毛孔曰歹仃月 */ + if( newwin == -1 ) { + newwin = buttonproc[button].gotowin; + } + + // Robin + // 银行 + // shan begin + if( select == WINDOW_BUTTONTYPE_YES) { + newwin = 5; + } + // shan end + if( newwin == 5 ) { + if( CHAR_getInt( talkerindex, CHAR_FMINDEX ) < 1 && + CHAR_getInt( talkerindex, CHAR_BANKGOLD) < 1 ) + lssproto_WN_send(fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, + makeEscapeString("\n您的资格不符合!" + "\n请先加入家族!", buff, sizeof(buff))); + else { + sprintf(buf, "B|G|%d", CHAR_getInt( talkerindex, CHAR_BANKGOLD) ); + lssproto_FM_send( fd, buf ); + } + return; + } + // 家族帐户 + if( newwin == 6 ) + { + if( CHAR_getInt( talkerindex, CHAR_FMINDEX ) > 0 ) + saacproto_ACGetFMData_send( acfd, CHAR_getChar( talkerindex, CHAR_FMNAME), + CHAR_getInt( talkerindex, CHAR_FMINDEX ), + CHAR_getWorkInt( talkerindex, CHAR_WORKFMINDEXI ), + 1, + CONNECT_getFdid(fd) + ); + else + lssproto_WN_send(fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, + makeEscapeString("\n您的资格不符合!" + "\n请先加入家族!", buff, sizeof(buff))); + return; + } + // 退出 + if( newwin == 7 ) + { + if( CHAR_getInt( talkerindex, CHAR_FMINDEX ) == -1 ) { + lssproto_WN_send(fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, + makeEscapeString("\n您的资格不符合!" + "\n请先加入家族!", buff, sizeof(buff))); + return; + } + + print(" WN2FM "); + FAMILY_Leave( fd, talkerindex, "E|1"); + + return; + } + + if( !NPC_Bankman_readData( meindex, newwin, FALSE) ) { + print( "familyman:readdata error\n"); + return; + } + if( fd != -1 ) { + lssproto_WN_send( fd, w.windowtype, + w.buttontype, + w.windowno+100, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + makeEscapeString( w.message, buf, sizeof(buf))); + } + + + + } +} + +static BOOL NPC_Bankman_readData( int meindex, int windowno, BOOL chkflg) +{ + + int i; + int linenum = 0; + int endflg = FALSE; + int buttonendflg; + int winno = -1; + int buttonconfmode; + int b_mode; + int selectnum ; + int messagepos; + BOOL errflg = FALSE; + BOOL readflg = TRUE; + FILE *fp; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char filename[64]; + char opfile[128]; + char line[1024]; + char firstToken[1024]; + char secondToken[1024]; + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + NPC_Util_GetStrFromStrWithDelim( argstr, "conff", filename, sizeof( filename)); + sprintf( opfile, "%s/", getNpcdir( ) ); + strcat( opfile, filename); + fp = fopen( opfile, "r"); + if( fp == NULL ) { + print( "familyman:file open error [%s]\n", opfile); + return FALSE; + } + + while( readflg == TRUE ) { + endflg = FALSE; + buttonendflg = TRUE; + buttonconfmode = FALSE; + selectnum = 0; + messagepos = 0; + winno = -1; + b_mode = -1; + errflg = FALSE; + + /* 赓渝祭 */ + w.windowno = -1; + w.windowtype = -1; + w.buttontype = -1; + w.takeitem = -1; + w.giveitem = -1; + w.message[0] = '\0'; + + for( i = 0; i < arraysizeof( buttonproc); i ++ ) { + buttonproc[i].use = FALSE; + buttonproc[i].checkhaveitem = -1; + buttonproc[i].checkhaveitemgotowin = -1; + buttonproc[i].checkdonthaveitem = -1; + buttonproc[i].checkdonthaveitemgotowin = -1; + buttonproc[i].warp = -1; + buttonproc[i].battle = -1; + buttonproc[i].gotowin = -1; + } + + while( 1) { + char buf[256]; + int ret; + if( !fgets( line, sizeof( line), fp)){ + readflg = FALSE; + break; + } + + linenum ++; + + /* 戊丢件玄反 骰 */ + if( line[0] == '#' || line[0] == '\n') continue; + /* 荼垫潸月 */ + chomp( line ); + + /* 垫毛帮溥允月 */ + /* 引内 tab 毛 " " 卞 五晶尹月 */ + replaceString( line, '\t' , ' ' ); + /* 燮 及旦矢□旦毛潸月[*/ + for( i = 0; i < strlen( line); i ++) { + if( line[i] != ' ' ) { + break; + } + strcpy( buf, &line[i]); + } + if( i != 0 ) strcpy( line, buf); + + /* delim "=" 匹 赓(1)及玄□弁件毛 月*/ + ret = getStringFromIndexWithDelim( line, "=", 1, firstToken, + sizeof( firstToken ) ); + if( ret == FALSE ){ + print( "Find error at %s in line %d. Ignore\n", + filename , linenum); + continue; + } + /* delim "=" 匹2 及玄□弁件毛 月*/ + ret = getStringFromIndexWithDelim( line, "=", 2, secondToken, + sizeof( secondToken ) ); + if( ret == FALSE ){ + print( "Find error at %s in line %d. Ignore\n", + filename , linenum); + continue; + } + + if( strcasecmp( firstToken, "winno") == 0 ) { + if( winno != -1 ) { + print( "familyman:已有winno却重新定义winno\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + errflg = TRUE; + readflg = FALSE; + break; + } + /* 它奴件玉它No毛忡绣 */ + winno = atoi( secondToken); + continue; + } + /* 它奴件玉它No 互瑁引匀化中卅中凛及垫反 骰允月 */ + if( winno == -1 ) { + print( "familyman:winno 尚未定义,资料却已设定。\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + readflg = FALSE; + errflg = FALSE; + break; + } + /* 它奴件玉它No 互域谯仄凶凛反椭瘀毛 戈[ + * 公木动陆反 骰允月 */ + if( (chkflg == FALSE && winno == windowno )|| + chkflg == TRUE) + { + if( buttonconfmode == TRUE ) { + if( strcasecmp( firstToken, "gotowin") == 0 ) { + buttonproc[b_mode].gotowin = atoi( secondToken); + } + else if( strcasecmp( firstToken, "checkhaveitem") == 0 ) { + buttonproc[b_mode].checkhaveitem = atoi( secondToken); + } + else if( strcasecmp( firstToken, "haveitemgotowin") == 0 ) { + buttonproc[b_mode].checkhaveitemgotowin = atoi( secondToken); + } + else if( strcasecmp( firstToken, "checkdonthaveitem") == 0 ) { + buttonproc[b_mode].checkdonthaveitem = atoi( secondToken); + } + else if( strcasecmp( firstToken, "donthaveitemgotowin") == 0 ) { + buttonproc[b_mode].checkdonthaveitemgotowin = atoi( secondToken); + } + else if( strcasecmp( firstToken, "endbutton") == 0 ) { + if( buttonproc[b_mode].gotowin == - 1 ) { + if( buttonproc[b_mode].checkhaveitem == -1 && + buttonproc[b_mode].checkdonthaveitem == -1) + { + errflg = TRUE; + } + else { + /* 升匀切井井凶匀吊分仃匹手涩烂今木化中木壬 */ + if( !((buttonproc[b_mode].checkhaveitem != -1 && + buttonproc[b_mode].checkhaveitemgotowin != -1) + || (buttonproc[b_mode].checkdonthaveitem != -1 && + buttonproc[b_mode].checkdonthaveitemgotowin != -1))) + { + errflg = TRUE; + } + } + } + + if( errflg == TRUE) { + print( "familyman: 找不到gotowin\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + readflg = FALSE; + errflg = TRUE; + break; + } + buttonproc[b_mode].use = TRUE; + buttonconfmode = FALSE; + buttonendflg = TRUE; + } + } + else { + + w.windowno = winno; + /* 它奴件玉它正奶皿及涩烂 */ + if( strcasecmp( firstToken, "wintype") == 0 ) { + w.windowtype = atoi( secondToken); + } + /* 示正件正奶皿及涩烂 */ + else if( strcasecmp( firstToken, "buttontype") == 0 ) { + w.buttontype = NPC_Bankman_restoreButtontype( secondToken); + } + /* getitem及涩烂 */ + else if( strcasecmp( firstToken, "takeitem") == 0 ) { + w.takeitem = atoi( secondToken); + } + /* giveitem及涩烂 */ + else if( strcasecmp( firstToken, "giveitem") == 0 ) { + w.giveitem = atoi( secondToken); + } + /* message及涩烂 */ + else if( strcasecmp( firstToken, "message") == 0 ) { + if( messagepos == 0 ) { + strcpy( w.message, secondToken); + messagepos = strlen( w.message); + } + else { + w.message[messagepos]='\n'; + messagepos++; + strcpy( &w.message[messagepos], secondToken); + messagepos+=strlen(secondToken); + } + } + /* 示正件毛瓷仄凶凛及涩烂 */ + else if( strcasecmp( firstToken, "okpressed") == 0 ) { + buttonconfmode = TRUE; + b_mode = 0; + buttonendflg = FALSE; + } + else if( strcasecmp( firstToken, "cancelpressed") == 0 ) { + buttonconfmode = TRUE; + b_mode = 1; + buttonendflg = FALSE; + } + else if( strcasecmp( firstToken, "yespressed") == 0 ) { + buttonconfmode = TRUE; + b_mode = 2; + buttonendflg = FALSE; + } + else if( strcasecmp( firstToken, "nopressed") == 0 ) { + buttonconfmode = TRUE; + b_mode = 3; + buttonendflg = FALSE; + } + else if( strcasecmp( firstToken, "prevpressed") == 0 ) { + buttonconfmode = TRUE; + b_mode = 4; + buttonendflg = FALSE; + } + else if( strcasecmp( firstToken, "nextpressed") == 0 ) { + buttonconfmode = TRUE; + b_mode = 5; + buttonendflg = FALSE; + } + else if( strcasecmp( firstToken, "selected") == 0 ) { + buttonconfmode = TRUE; + b_mode = 6 + selectnum; + buttonendflg = FALSE; + selectnum ++; + } + /* 涩烂蔽歹曰 */ + else if( strcasecmp( firstToken, "endwin") == 0 ) { + endflg = TRUE; + if( chkflg == FALSE) { + readflg = FALSE; + } + break; + } + else { + print( "familyman:设定是不可能的参数\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + } + } + } + else { + if( strcasecmp( firstToken, "endwin") == 0 ) { + winno = -1; + } + } + } + if( buttonendflg == FALSE) { + print( "familyman: 找不到endbutton\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + errflg = TRUE; + break; + } + if( winno != -1 ) { + if( w.windowtype == -1 ) { + print( "familyman: 找不到wintype\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + errflg = TRUE; + break; + } + if( w.buttontype == -1 ) { + print( "familyman: 找不到button\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + errflg = TRUE; + break; + } + if( strlen( w.message) == 0 ) { + print( "familyman: 找不到message\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + errflg = TRUE; + break; + } + } + } + fclose( fp); + + if( chkflg == FALSE && w.windowno == -1 ) { + print( "familyman: 找不到所指定的windowno\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + return FALSE; + } + if( winno != -1 && endflg == FALSE) { + print( "familyman: 找不到endwin\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + return FALSE; + } + if( errflg == TRUE) return FALSE; + + return TRUE; +} +/* + * buttontype=匹隙烂仄凶 侬 毛醒袄卞 晶允月[ + * + */ +static int NPC_Bankman_restoreButtontype( char *data ) +{ + int ret = 0; + int rc; + int i; + char buff[1024]; + + for( i = 1; ; i ++ ) { + rc = getStringFromIndexWithDelim( data, "|", i, buff, + sizeof( buff ) ); + if( rc == FALSE) break; + if( strcasecmp( buff, "ok") == 0 ) { + ret |= WINDOW_BUTTONTYPE_OK; + } + else if( strcasecmp( buff, "cancel") == 0 ) { + ret |= WINDOW_BUTTONTYPE_CANCEL; + } + else if( strcasecmp( buff, "yes") == 0 ) { + ret |= WINDOW_BUTTONTYPE_YES; + } + else if( strcasecmp( buff, "no") == 0 ) { + ret |= WINDOW_BUTTONTYPE_NO; + } + else if( strcasecmp( buff, "prev") == 0 ) { + ret |= WINDOW_BUTTONTYPE_PREV; + } + else if( strcasecmp( buff, "next") == 0 ) { + ret |= WINDOW_BUTTONTYPE_NEXT; + } + } + if( ret == 0 ) { + ret = atoi( data); + } + return ret; +} diff --git a/gmsv/npc/npc_bigsmallmaster.c b/gmsv/npc/npc_bigsmallmaster.c new file mode 100644 index 0000000..277b4e8 --- /dev/null +++ b/gmsv/npc/npc_bigsmallmaster.c @@ -0,0 +1,13 @@ +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "lssproto_serv.h" +#include "npcutil.h" +#include "handletime.h" +#include +#include "char_base.h" +#include "configfile.h" +#include "npc_bigsmallmaster.h" +#include "npc_windowman.h" + diff --git a/gmsv/npc/npc_bigsmallpet.c b/gmsv/npc/npc_bigsmallpet.c new file mode 100644 index 0000000..b2715c9 --- /dev/null +++ b/gmsv/npc/npc_bigsmallpet.c @@ -0,0 +1,11 @@ +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "lssproto_serv.h" +#include "npcutil.h" +#include "handletime.h" +#include +#include "char_base.h" +#include "configfile.h" +#include "npc_bigsmallpet.h" diff --git a/gmsv/npc/npc_blackmarket.c b/gmsv/npc/npc_blackmarket.c new file mode 100644 index 0000000..dbf09e5 --- /dev/null +++ b/gmsv/npc/npc_blackmarket.c @@ -0,0 +1,69 @@ +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "configfile.h" +#include "lssproto_serv.h" +#include "saacproto_cli.h" + +#ifdef _BLACK_MARKET +extern struct BlackMarketItem BMItem[BMIMAX]; +extern int BMINum; +extern int BMSellList[12]; + +void NPC_BlackMarketTalked( int meindex, int talker, char *msg, int color) +{ + char sBuf[512]="", tBuf[512]=""; + if(!CHAR_CHECKINDEX( talker)) return; + if(getfdFromCharaIndex( talker)==-1) return; + if(CHAR_getInt( talker, CHAR_WHICHTYPE)!=CHAR_TYPEPLAYER) return; + if(NPC_Util_isFaceToFace( talker, meindex, 1)!=TRUE) return; + + sprintf( tBuf, "嘿嘿....\n在我这边有各式各样的武器、防具及道具,你想要跟我交换吗?换好了可就不能反悔喔~"); + + lssproto_WN_send(getfdFromCharaIndex( talker), + WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + CHAR_WINDOWTYPE_BLACKMARKET, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + makeEscapeString( tBuf, sBuf, sizeof(sBuf))); + return; +} +BOOL NPC_BlackMarketInit( int meindex) +{ + CHAR_setInt( meindex, CHAR_WHICHTYPE, CHAR_TYPEWINDOWMAN); + CHAR_setFlg( meindex, CHAR_ISATTACKED , 0); + return TRUE; +} +void NPC_BlackMarketWindowTalked( int index, int talker, int seqno, int select, char *data) +{ + int i; + char sBuf[1024]="", sBuf1[256]=""; + + if(!CHAR_CHECKINDEX( talker)) return; + if(getfdFromCharaIndex( talker)==-1) return; + if(CHAR_getInt( talker, CHAR_WHICHTYPE)!=CHAR_TYPEPLAYER) return; + if(NPC_Util_isFaceToFace( talker, index, 1)!=TRUE) return; + + if( seqno == CHAR_WINDOWTYPE_BLACKMARKET){ + for(i=0; i<12; i++){ + CONNECT_set_BMList( getfdFromCharaIndex( talker), i, BMSellList[i]); + sprintf( sBuf1, "%d|%d|%s\n", BMSellList[i], BMItem[BMSellList[i]].iGraphicsNum, BMItem[BMSellList[i]].iName); + strcat( sBuf, sBuf1); + } + + lssproto_WN_send( getfdFromCharaIndex( talker), + WINDOW_MESSAGETYPE_BLACKMARKET, + WINDOW_BUTTONTYPE_NONE, + CHAR_WINDOWTYPE_BLACKMARKET, + CHAR_getWorkInt( index, CHAR_WORKOBJINDEX), + sBuf ); + } +} +#endif + + + + diff --git a/gmsv/npc/npc_bodylan.c b/gmsv/npc/npc_bodylan.c new file mode 100644 index 0000000..33dc6fd --- /dev/null +++ b/gmsv/npc/npc_bodylan.c @@ -0,0 +1,487 @@ +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "lssproto_serv.h" +#include "npc_windowhealer.h" + + + + +/* + *迭{示犯奴仿件必□斥毛银尹壬 杀允月NPC + * 引内 仄井仃日木凶日}公及皿伊奶乩□卞 + * 仇及NPC及INDEX毛忡绣允月[ + * + *迫{NPC及璃曰匹失弁扑亦件互丐匀凶日}失弁扑亦件毛粟仇仄凶皿伊奶乩□互 + *NPC及INDEX毛忡 仄化中月井民尼永弁 + *民尼永弁 卅日戚反失弁扑亦件及扑□弗件旦民尼永弁允月 + *涡侗及失弁扑亦件毛仄化中凶日皿伊奶乩□及市它件玄毛失永皿今六月[ + *市它件玄失永皿 }蝈扑□弗件旦 卅日隙烂及桦赭尺伐□皿今六月 + * + */ + +enum { + BODYLAN_E_COMMANDNUM = CHAR_NPCWORKINT1, // 戊穴件玉及赢今 +}; + + +// 它奶件玉它乒□玉 +enum{ + BODYLAN_WIN_FIRST, + BODYLAN_WIN_LAST_GOOD, + BODYLAN_WIN_LAST_NG, + BODYLAN_WIN_GOOD_NO, + BODYLAN_WIN_ALREADY, + BODYLAN_WIN_NOT_PREEVENT, + BODYLAN_WIN_END +}; + +static void NPC_BodyLan_Profit( int meindex, int playerindex ); + +static void NPC_BodyLan_Window( + int meindex, + int talkerindex, + int mode +); + + +/********************************* +* 赓渝质 +*********************************/ +BOOL NPC_BodyLanInit( int meindex ) +{ + + char szP[256], szArg[4096]; + char buf[256]; + int i, needSeq; + + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPEEVENT ); + + if( NPC_Util_GetArgStr( meindex, szArg, sizeof( szArg ) ) == NULL ){ + print( "npc_bodylan.c:没有引数(%s)\n", + CHAR_getChar(meindex,CHAR_NPCARGUMENT) ); + return FALSE; + } + + + // 扑□弗件旦毛茧允 + if( NPC_Util_GetStrFromStrWithDelim( szArg, "Act", szP, sizeof( szP ) ) == NULL ){ + print( "npc_bodylan:动作文字列尚未设定(%s)\n", szArg ); + return FALSE; + } + + for( i = 0 ; ; i ++ ){ + // 邰卅赐 + if( getStringFromIndexWithDelim( szP, ",", i, buf, sizeof( buf)) != FALSE ){ + needSeq = atoi(buf); + // 穴奶瓜旦互 凶日仇仇引匹 + if( needSeq < 0 ){ + if( i <= 0 ){ + print( "npc_bodylan:动作列尚未设定(%s)\n", szArg ); + } + // 醒毛本永玄 + CHAR_setWorkInt( meindex, BODYLAN_E_COMMANDNUM, i ); + break; + }else{ + // 伙□皿仄化醒尹月 + } + }else{ + if( i <= 0 ){ + print( "npc_bodylan:动作列尚未设定(%s)\n", szArg ); + } + // 醒毛本永玄 + CHAR_setWorkInt( meindex, BODYLAN_E_COMMANDNUM, i ); + break; + } + } + + + + return TRUE; + +} + + + + +/********************************* +* 仄井仃日木凶凛及质 +*********************************/ +void NPC_BodyLanTalked( int meindex , int talkerindex , char *szMes ,int color ) +{ + char szP[256], szArg[4096]; + int EventNo = -1,Pre_Event = -1; + + /* 皿伊奶乩□卞覆仄化分仃 杀允月 */ + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) { + return; + } + + /* ㄠ弘伉永玉动 及心 */ + if( NPC_Util_CharDistance( talkerindex, meindex ) > 2 ) + { + return; + } + + // 娄醒 侬 + if( NPC_Util_GetArgStr( meindex, szArg, sizeof( szArg ) ) == NULL ){ + print( "npc_bodylan.c:没有引数(%s)\n", + CHAR_getChar(meindex,CHAR_NPCARGUMENT) ); + return ; + }else{ + // 奶矛件玄 寞潸 + if( NPC_Util_GetStrFromStrWithDelim( szArg, "EventNo", szP, sizeof( szP ) ) != NULL ){ + EventNo = atoi(szP); + } + // 仪蟆 邰奶矛件玄 寞潸 + if( NPC_Util_GetStrFromStrWithDelim( szArg, "Pre_Event", szP, sizeof( szP ) ) != NULL ){ + Pre_Event = atoi(szP); + } + } + + // 仪蟆卞 邰奶矛件玄 寞互丐木壬 + if( Pre_Event >= 0 ){ + // 奶矛件玄卞覆仄化升丹仄化中月井民尼永弁 + if( NPC_EventCheckFlg( talkerindex, Pre_Event ) == FALSE ){ + // 邰奶矛件玄毛弁伉失仄化中卅井匀凶日仇及本伉白 + NPC_BodyLan_Window( meindex, talkerindex, BODYLAN_WIN_NOT_PREEVENT ); + return; + } + } + // 奶矛件玄 寞互丐木壬 + if( EventNo >= 0 ){ + // 奶矛件玄卞覆仄化升丹仄化中月井民尼永弁 + if( NPC_EventCheckFlg( talkerindex, EventNo ) == TRUE ){ + // 匀化中凶日仇及本伉白 + NPC_BodyLan_Window( meindex, talkerindex, BODYLAN_WIN_ALREADY ); + return; + } + } + + // 蟆荚仇及皿伊奶乩□反愤坌午韵匀化中凶井 + if( CHAR_getWorkInt( talkerindex, CHAR_WORKTRADER ) == meindex ){ + + // 今日卞戊穴件玉互蝈 岳 仄化中凶日 + if( CHAR_getWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT ) + >= CHAR_getWorkInt( meindex, BODYLAN_E_COMMANDNUM ) + ){ + // 岳 ″″仍 井" + NPC_BodyLan_Window( meindex, talkerindex, BODYLAN_WIN_LAST_GOOD ); + return; + }else{ + // 撩 + NPC_BodyLan_Window( meindex, talkerindex, BODYLAN_WIN_LAST_NG ); + return; + } + }else{ + // 赓户化卅及匹创尹月 + // 皿伊奶乩□卞愤坌及奶件犯永弁旦毛忡绣今六月 + CHAR_setWorkInt( talkerindex, CHAR_WORKTRADER, meindex ); + // 扑□弗件旦反 赓井日卞赓渝祭 + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, 1 ); + + // 公及端本伉白午井韵月屯五井卅丐’’’ + NPC_BodyLan_Window( meindex, talkerindex, BODYLAN_WIN_FIRST ); + return; + } +} + + +/*======================================= + * watch 质 + *======================================*/ +void NPC_BodyLanWatch( + int objmeindex, + int objmoveindex, + CHAR_ACTION act, + int x, + int y, + int dir, + int* opt, + int optlen +) +{ + char szP[256], szArg[4096]; + char buf[256]; + int actindex; + int meindex; + int seqNo, needSeq; + + // 平乓仿弁正动陆反伉正□件 + if( OBJECT_getType(objmoveindex) != OBJTYPE_CHARA ) return; + actindex = OBJECT_getIndex(objmoveindex); + // 皿伊奶乩□动陆反伉正□件 + if( CHAR_getInt( actindex, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) return; + + // 愤坌及奶件犯永弁旦 + meindex = OBJECT_getIndex(objmeindex); + + // 愤坌及INDEX毛忡 仄化中月井"中卅仃木壬伉正□件 + if( CHAR_getWorkInt( actindex, CHAR_WORKTRADER ) != meindex ){ + return; + } + + // 升仇引匹失弁扑亦件毛仄化中月井 + seqNo = CHAR_getWorkInt( actindex, CHAR_WORKSHOPRELEVANT ); + // 卅桦宁反 赓井日 + if( seqNo < 1 )seqNo = 1; + + // 娄醒 侬 + if( NPC_Util_GetArgStr( meindex, szArg, sizeof( szArg ) ) == NULL ){ + print( "npc_bodylan.c:没有引数(%s)\n", + CHAR_getChar(meindex,CHAR_NPCARGUMENT) ); + return ; + } + + + // 扑□弗件旦毛茧允 + if( NPC_Util_GetStrFromStrWithDelim( szArg, "Act", szP, sizeof( szP ) ) == NULL ){ + print( "npc_bodylan:动作文字列尚未设定(%s)\n", szArg ); + return; + } + + // 邰卅赐 + if(getStringFromIndexWithDelim( szP, ",", seqNo, buf, sizeof( buf)) != FALSE ){ + needSeq = atoi(buf); + }else{ + // 卅兮井卅井匀凶日 赓井日 + CHAR_setWorkInt( actindex, CHAR_WORKSHOPRELEVANT, 1 ); + +// print( "做过头了。回到最初。\n", seqNo, needSeq ); + // 窒井韵月屯五井’’’ + return; + } + + // 漆荚 邰卅失弁扑亦件互域谯仄凶 + if( needSeq == act ){ + // 域谯仄凶[仇木互 井 +// print( "成功\(%d次数是%d)\n", seqNo, needSeq ); + seqNo ++; + if( seqNo >= CHAR_getWorkInt( meindex, BODYLAN_E_COMMANDNUM ) ){ +// print( "在此结束。\n" ); + } + // 仇及匏 毛忡绣 + CHAR_setWorkInt( actindex, CHAR_WORKSHOPRELEVANT, seqNo ); + }else{ + // 撩 仄凶桦宁反 赓井日支曰 仄 + CHAR_setWorkInt( actindex, CHAR_WORKSHOPRELEVANT, 1 ); +// print( "(%d次数是%d)\n", seqNo, needSeq ); + } + +} + + + +//********* 岳 凛及仍 ********* +static void NPC_BodyLan_Profit( int meindex, int playerindex ) +{ + char szArg[4096], szP[256]; + int fl, x, y, pmode, i, subindex, parent; + + // 娄醒 侬 + if( NPC_Util_GetArgStr( meindex, szArg, sizeof( szArg ) ) == NULL ){ + print( "npc_bodylan.c:没有引数(%s)\n", + CHAR_getChar(meindex,CHAR_NPCARGUMENT) ); + return ; + } + + //********************************************* + // + // 仍 公及ㄠ[伐□皿涩烂 + // + //********************************************* + if( NPC_Util_GetStrFromStrWithDelim( szArg, "Warp", szP, sizeof( szP ) ) != NULL ){ + // 仍 卞伐□皿[甄 潸月 + if( sscanf( szP, "%d,%d,%d", &fl, &x, &y ) == 3 ){ + }else{ + print( "npc_bodylan: 无法读取空间座标(%s)\n", szP ); + return; + } + // 由□ 奴赚氏匹月桦宁阂间手伐□皿 + pmode = CHAR_getWorkInt( playerindex, CHAR_WORKPARTYMODE ); + switch( pmode ){ + case 1: // 愤坌互褪 + parent = playerindex; + break; + case 2: // 愤坌互阂间[褪毛潸 + parent = CHAR_getWorkInt( playerindex, CHAR_WORKPARTYINDEX1 ); + break; + default: + // 由□ 奴元扎卅井匀凶[愤坌分仃伐□皿 + CHAR_warpToSpecificPoint( playerindex, fl, x, y ); + return; + } + // 蝈够伐□皿 + for( i = 0; i < CHAR_PARTYMAX; i ++ ){ + subindex = CHAR_getWorkInt( parent, CHAR_WORKPARTYINDEX1+i ); + if( CHAR_CHECKINDEX( subindex ) == FALSE )continue; + // 由□ 奴蝈够伐□皿 + CHAR_warpToSpecificPoint( subindex, fl, x, y ); + } + } + + + +} + +#if 1 +static void NPC_BodyLan_Window( + int meindex, + int talkerindex, + int mode +) +{ + char token[1024]; + char escapedname[2048]; + char szArg[4096]; + char szP[256]; + int fd; + int buttontype = 0, windowtype = 0, windowno = 0; + + if( CHAR_CHECKINDEX( talkerindex ) == FALSE )return; + fd = getfdFromCharaIndex( talkerindex ); + + // 娄醒 侬 + if( NPC_Util_GetArgStr( meindex, szArg, sizeof( szArg ) ) == NULL ){ + print( "npc_bodylan.c:没有引数(%s)\n", + CHAR_getChar(meindex,CHAR_NPCARGUMENT) ); + return ; + } + + szP[0] = 0; + + switch( mode ){ + case BODYLAN_WIN_FIRST: + // 赓卞 今木凶桦宁及本伉白 + if( NPC_Util_GetStrFromStrWithDelim( szArg, "First", szP, sizeof( szP ) ) == NULL ){ + print( "npc_bodylan:一开始讲话的文字没有输入(%s)\n", szArg ); + return; + } + sprintf( token,"%s", szP ); + buttontype=WINDOW_BUTTONTYPE_YES|WINDOW_BUTTONTYPE_NO; + windowtype=WINDOW_MESSAGETYPE_MESSAGE; + windowno=mode; + break; + + case BODYLAN_WIN_LAST_GOOD: + // 匹恳荸分匀凶日 + if( NPC_Util_GetStrFromStrWithDelim( szArg, "Good", szP, sizeof( szP ) ) == NULL ){ + print( "npc_bodylan:答对时说的文字没有输入(%s)\n", szArg ); + return; + } + sprintf( token,"%s", szP ); + buttontype=WINDOW_BUTTONTYPE_YESNO;// YES|NO + windowtype=WINDOW_MESSAGETYPE_MESSAGE; + windowno=mode; + break; + + case BODYLAN_WIN_LAST_NG: + // 匹恳荸分匀凶日 + if( NPC_Util_GetStrFromStrWithDelim( szArg, "Ng", szP, sizeof( szP ) ) == NULL ){ + print( "npc_bodylan:答错时说的文字没有输入(%s)\n", szArg ); + return; + } + sprintf( token,"%s", szP ); + buttontype=WINDOW_BUTTONTYPE_OK;// OK + windowtype=WINDOW_MESSAGETYPE_MESSAGE; + windowno=mode; + break; + + case BODYLAN_WIN_GOOD_NO: + // 恳荸凛卞 毛平乓件本伙 + if( NPC_Util_GetStrFromStrWithDelim( szArg, "Good_No", szP, sizeof( szP ) ) == NULL ){ + print( "npc_bodylan:答对时取消奖品的文字没有输入(%s)\n", szArg ); + return; + } + sprintf( token,"%s", szP ); + buttontype=WINDOW_BUTTONTYPE_OK;// OK + windowtype=WINDOW_MESSAGETYPE_MESSAGE; + windowno=mode; + break; + + case BODYLAN_WIN_ALREADY: + // 允匹卞奶矛件玄毛蔽 仄化中凶桦宁 + if( NPC_Util_GetStrFromStrWithDelim( szArg, "Good_No", szP, sizeof( szP ) ) == NULL ){ + print( "npc_bodylan:事件结束时的文字没有输入(%s)\n", szArg ); + return; + } + sprintf( token,"%s", szP ); + buttontype=WINDOW_BUTTONTYPE_OK; // OK + windowtype=WINDOW_MESSAGETYPE_MESSAGE; + windowno=mode; + break; + + case BODYLAN_WIN_NOT_PREEVENT: + // 仪蟆卞 邰卅奶矛件玄毛仇卅仄化中卅中桦宁 + if( NPC_Util_GetStrFromStrWithDelim( szArg, "Pre_Not", szP, sizeof( szP ) ) == NULL ){ + print( "npc_bodylan:?事前事件结束的文字没有输入(%s)\n", szArg ); + return; + } + sprintf( token,"%s", szP ); + buttontype=WINDOW_BUTTONTYPE_OK; // OK + windowtype=WINDOW_MESSAGETYPE_MESSAGE; + windowno=mode; + break; + default: + return; + } + + makeEscapeString( token, escapedname, sizeof(escapedname)); + /*-仇仇匹霜耨允月--*/ + lssproto_WN_send( fd, windowtype, + buttontype, + windowno, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + escapedname); + + +} + + + +/*----------------------------------------- +弁仿奶失件玄井日忒匀化五凶凛卞裟太请今木月[ +-------------------------------------------*/ +void NPC_BodyLanWindowTalked( + int meindex, + int talkerindex, + int seqno, + int select, + char *data +) +{ + + + if( NPC_Util_CharDistance( talkerindex, meindex ) > 2) return; + + switch( seqno){ + case BODYLAN_WIN_LAST_GOOD: // 恳荸凛卞OK瓷今木凶日 + if(select==WINDOW_BUTTONTYPE_YES ){ + NPC_BodyLan_Profit( meindex, talkerindex ); + // 皿伊奶乩□卞愤坌及奶件犯永弁旦毛侉木今六月 + CHAR_setWorkInt( talkerindex, CHAR_WORKTRADER, -1 ); + // 扑□弗件旦反 赓井日卞赓渝祭 + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, 1 ); + }else + if( select == WINDOW_BUTTONTYPE_NO ){ + // 恳荸凛卞平乓件本伙今木凶日 + NPC_BodyLan_Window( meindex, talkerindex, BODYLAN_WIN_GOOD_NO ); + // 皿伊奶乩□卞愤坌及奶件犯永弁旦毛侉木今六月 + CHAR_setWorkInt( talkerindex, CHAR_WORKTRADER, -1 ); + // 扑□弗件旦反 赓井日卞赓渝祭 + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, 1 ); + } + break; + default: + break; + } + +} + + + +#endif + diff --git a/gmsv/npc/npc_bus.c b/gmsv/npc/npc_bus.c new file mode 100644 index 0000000..1fe73ee --- /dev/null +++ b/gmsv/npc/npc_bus.c @@ -0,0 +1,761 @@ +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "lssproto_serv.h" +#include "npc_bus.h" +#include "handletime.h" + +/* + * 田旦心凶中卅仪毛允月NPC + */ + +enum { + NPC_WORK_ROUTETOX = CHAR_NPCWORKINT1, /* 升仇尺" 甄 */ + NPC_WORK_ROUTETOY = CHAR_NPCWORKINT2, /* 升仇尺" 甄 */ + NPC_WORK_ROUTEPOINT = CHAR_NPCWORKINT3, /* 漆窒 井 */ + NPC_WORK_ROUNDTRIP = CHAR_NPCWORKINT4, /* 垫五井窖曰井 ㄟ“垫五 ㄠ“窖曰 */ + NPC_WORK_MODE = CHAR_NPCWORKINT5, + NPC_WORK_CURRENTROUTE = CHAR_NPCWORKINT6, + NPC_WORK_ROUTEMAX = CHAR_NPCWORKINT7, + NPC_WORK_WAITTIME = CHAR_NPCWORKINT8, + NPC_WORK_CURRENTTIME = CHAR_NPCWORKINT9, + NPC_WORK_SEFLG = CHAR_NPCWORKINT10, +}; + +/* 蛐 丢永本□斥及enum */ +enum { + NPC_BUS_MSG_GETTINGON, + NPC_BUS_MSG_NOTPARTY, + NPC_BUS_MSG_OVERPARTY, + NPC_BUS_MSG_DENIEDITEM, + NPC_BUS_MSG_ALLOWITEM, + NPC_BUS_MSG_LEVEL, + NPC_BUS_MSG_GOLD, + NPC_BUS_MSG_EVENT, + NPC_BUS_MSG_START, + NPC_BUS_MSG_END, +}; +typedef struct { + char option[32]; + char defaultmsg[128]; +}NPC_BUS_MSG; +NPC_BUS_MSG busmsg[] = { + { "msg_gettingon", "PAON!(你无法於中途加入我们唷!)"}, + { "msg_notparty", "PAPAON!!无法以团队加入唷!"}, + { "msg_overparty", "PAON!!人数已满。"}, + { "msg_denieditem", "PAPAON!!我可不要这个道具!"}, + { "msg_allowitem", "哇喔~(想要那个道具啊!)"}, + { "msglevel", "PAPAON!!你的等级还不够唷!"}, + { "msg_stone", "PAPAON!!金钱不足唷!"}, + { "msg_event", "PAON!!你无法加入唷!"}, + { "msg_start", "哇喔~(出发进行)"}, + { "msg_end", "哇喔~(到罗)"} + +}; + +static int NPC_BusSetPoint( int meindex, char *argstr); +static void NPC_BusSetDestPoint( int meindex, char *argstr); +static BOOL NPC_BusCheckDeniedItem( int meindex, int charaindex, char *argstr); +static BOOL NPC_BusCheckLevel( int meindex, int charaindex, char *argstr); +static int NPC_BusCheckStone( int meindex, int charaindex, char *argstr); +static void NPC_BusSendMsg( int meindex, int talkerindex, int tablenum); +static int NPC_BusGetRoutePointNum( int meindex, char *argstr ); +static void NPC_Bus_walk( int meindex); + +#define NPC_BUS_LOOPTIME 200 + +/* 谨切凛棉犯白巧伙玄 */ +#define NPC_BUS_WAITTIME_DEFAULT 180 + +#define NPC_BUS_WAITINGMODE_WAITTIME 5000 + +/********************************* +* 赓渝质 +*********************************/ +BOOL NPC_BusInit( int meindex ) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + int i; + char buf[256]; + int routenum; + int waittime; + int seflg; + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + + /* 卅仃木壬中仃卅中娄醒及民尼永弁 */ + routenum = NPC_Util_GetNumFromStrWithDelim( argstr, "routenum");//行驶路线数量 + + if( routenum == -1 ) { + print( "npcbus:nothing routenum \n"); + return FALSE; + } + CHAR_setWorkInt( meindex, NPC_WORK_ROUTEMAX, routenum); + + for( i = 1; i <= routenum; i ++ ) { + char routetostring[64]; + snprintf( routetostring, sizeof( routetostring), "routeto%d", i); + if( NPC_Util_GetStrFromStrWithDelim( argstr, routetostring,buf, sizeof(buf)) + == NULL ) + { + print( "npcbus:nothing route to \n"); + return FALSE; + } + + } + waittime = NPC_Util_GetNumFromStrWithDelim( argstr, "waittime"); + + if( waittime == -1 ) waittime = NPC_BUS_WAITTIME_DEFAULT; + CHAR_setWorkInt( meindex, NPC_WORK_WAITTIME, waittime); + + seflg = NPC_Util_GetNumFromStrWithDelim( argstr, "seflg"); + + if( seflg == -1 ) seflg = TRUE; + CHAR_setWorkInt( meindex, NPC_WORK_SEFLG, seflg); + + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPEBUS ); + + CHAR_setWorkInt( meindex, NPC_WORK_MODE, 0); + CHAR_setWorkInt( meindex, NPC_WORK_ROUTEPOINT, 2); + CHAR_setWorkInt( meindex, NPC_WORK_ROUNDTRIP, 0); + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTROUTE, 0); + + CHAR_setInt( meindex, CHAR_LOOPINTERVAL, + NPC_BUS_WAITINGMODE_WAITTIME); + + /* 蜇箕及凛棉毛本永玄 */ + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTTIME, NowTime.tv_sec); + + for( i = 0; i < CHAR_PARTYMAX; i ++) { + CHAR_setWorkInt( meindex, CHAR_WORKPARTYINDEX1 + i, -1); + } + + /* 伙□玄瑁烂允月 */ +{ + int rev; + int r = CHAR_getWorkInt( meindex, NPC_WORK_ROUTEMAX); + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTROUTE, RAND( 1, r)); + //print( "route:%d\n",CHAR_getWorkInt( meindex, NPC_WORK_CURRENTROUTE)); + + /* 欠旦正□玄 */ + rev = NPC_Util_GetNumFromStrWithDelim( argstr, "reverse"); + + if( rev == 1 ) { + int num = NPC_BusGetRoutePointNum( meindex, argstr); + + if( num <= 0 ) { + print( "npcbus:真奇怪!\n"); + return FALSE; + } + CHAR_setWorkInt( meindex, NPC_WORK_ROUTEPOINT, num-1); + CHAR_setWorkInt( meindex, NPC_WORK_ROUNDTRIP, 1); + } + /* 伙□玄毛本永玄允月 */ + NPC_BusSetPoint( meindex, argstr); + /* 垫五燮毛 憎允月 */ + NPC_BusSetDestPoint( meindex, argstr); +} + + return TRUE; +} + + +/********************************* +* 仄井仃日木凶凛及质 +*********************************/ +void NPC_BusTalked( int meindex , int talkerindex , char *szMes , + int color ) +{ + int i; + int partyflg = FALSE; + + /* 皿伊奶乩□卞覆仄化分仃 杀允月 */ + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) { + return; + } + /* 愤坌及由□ 奴 昙菸 井升丹井譬屯月 */ + for( i = 0; i < CHAR_PARTYMAX; i ++ ) { + int index = CHAR_getWorkInt( meindex, CHAR_WORKPARTYINDEX1+i); + if( CHAR_CHECKINDEX(index)){ + if( index == talkerindex) { + partyflg = TRUE; + } + } + } + if( !partyflg ) { + //NPC_BusCheckJoinParty( meindex, talkerindex, TRUE); + } + else { + if( CHAR_getWorkInt( meindex, NPC_WORK_MODE) == 0 ) { + int i; + // #define NPC_BUS_DEBUGROUTINTG "routingtable:" + if( strstr( szMes, "出发" ) || + strstr( szMes, "出发" ) || + strstr( szMes, "Go" ) || + strstr( szMes, "go" )) + { + CHAR_setWorkInt( meindex, NPC_WORK_MODE,1); + + /* 伙□皿楮醒及裟请仄毛汹仁簧蘸卞允月 */ + CHAR_setInt( meindex, CHAR_LOOPINTERVAL, NPC_BUS_LOOPTIME); + /* SE 日允 穴件乒旦及陲太 */ + if( CHAR_getWorkInt( meindex, NPC_WORK_SEFLG )) { + CHAR_sendSEoArroundCharacter( + CHAR_getInt( meindex, CHAR_FLOOR), + CHAR_getInt( meindex, CHAR_X), + CHAR_getInt( meindex, CHAR_Y), + 60, + TRUE); + } + /* 请 允月凛及丢永本□斥*/ + for( i = 1; i < CHAR_PARTYMAX; i ++ ) { + int partyindex = CHAR_getWorkInt( meindex, CHAR_WORKPARTYINDEX1+i); + if( CHAR_CHECKINDEX( partyindex)) { + NPC_BusSendMsg( meindex, partyindex, NPC_BUS_MSG_START); + } + } + } + } +#if 0 + else if( strstr( szMes, "停止" ) || + strstr( szMes, "停止" ) || + strstr( szMes, "stop" ) || + strstr( szMes, "Stop" )) + { + CHAR_setWorkInt( meindex, NPC_WORK_MODE,2); + + /* 伙□皿楮醒及奶件正□田伙毛聂仁允月 */ + CHAR_setInt( meindex, CHAR_LOOPINTERVAL, + NPC_BUS_WAITINGMODE_WAITTIME); + /* 蜇箕及凛棉毛本永玄 */ + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTTIME, NowTime.tv_sec); + } + else if( strstr( szMes, NPC_BUS_DEBUGROUTINTG )) { + /* 犯田永弘迕 */ + char *p = strstr( szMes,NPC_BUS_DEBUGROUTINTG); + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + if( p) { + int a = atoi( p+strlen(NPC_BUS_DEBUGROUTINTG)); + if( a <0 ) a = 1; + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTROUTE, a); + } + //print( "route:%d\n",CHAR_getWorkInt( meindex, NPC_WORK_CURRENTROUTE)); + /* 伙□玄毛本永玄允月 */ + NPC_BusSetPoint( meindex, argstr); + } +#endif + } +} +/************************************** + * 伙□皿楮醒 + **************************************/ +void NPC_BusLoop( int meindex) +{ + int i; + switch( CHAR_getWorkInt( meindex, NPC_WORK_MODE )) { + case 0: + /* 谨切乒□玉及凛]凛棉毛民尼永弁允月 */ + /* 凛棉互烦匀凶及匹]请 允月 */ + if( CHAR_getWorkInt( meindex, NPC_WORK_CURRENTTIME) + + CHAR_getWorkInt( meindex, NPC_WORK_WAITTIME) + < NowTime.tv_sec) + { + /* SE 日允 穴件乒旦及陲太 */ + if( CHAR_getWorkInt( meindex, NPC_WORK_SEFLG )) { + CHAR_sendSEoArroundCharacter( + CHAR_getInt( meindex, CHAR_FLOOR), + CHAR_getInt( meindex, CHAR_X), + CHAR_getInt( meindex, CHAR_Y), + 60, + TRUE); + } + /* 请 允月凛及丢永本□斥*/ + for( i = 1; i < CHAR_PARTYMAX; i ++ ) { + int partyindex = CHAR_getWorkInt( meindex, CHAR_WORKPARTYINDEX1+i); + if( CHAR_CHECKINDEX( partyindex)) { + NPC_BusSendMsg( meindex, partyindex, NPC_BUS_MSG_START); + } + } + + CHAR_setWorkInt( meindex, NPC_WORK_MODE,1); + /* 伙□皿楮醒及裟请仄毛汹仁簧蘸卞允月 */ + CHAR_setInt( meindex, CHAR_LOOPINTERVAL, NPC_BUS_LOOPTIME); + } + return; + case 1: + /* 汹仁 */ + NPC_Bus_walk( meindex); + case 2: + /* 鞅引匀化中月乒□玉 */ + /* 凛棉互烦匀凶及匹]请 允月 */ + if( CHAR_getWorkInt( meindex, NPC_WORK_CURRENTTIME) + + (CHAR_getWorkInt( meindex, NPC_WORK_WAITTIME) /3) + < NowTime.tv_sec) + { + CHAR_setWorkInt( meindex, NPC_WORK_MODE,1); + /* 伙□皿楮醒及裟请仄毛汹仁簧蘸卞允月 */ + CHAR_setInt( meindex, CHAR_LOOPINTERVAL, NPC_BUS_LOOPTIME); + + } + return; + case 3: + /* 谗邋仄化手]弁仿奶失件玄及 樟谨切及啃卞] + * 剂仄仇仇匹它尼奶玄毛中木化支月 + */ + if( CHAR_getWorkInt( meindex, NPC_WORK_CURRENTTIME) + 3 + < NowTime.tv_sec) + { + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + /* 伙□皿楮醒及裟请仄毛赞仁允月 */ + CHAR_setInt( meindex, CHAR_LOOPINTERVAL, + NPC_BUS_WAITINGMODE_WAITTIME); + + /* 伙□玄瑁烂允月 */ + { + int r = CHAR_getWorkInt( meindex, NPC_WORK_ROUTEMAX); + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTROUTE, RAND( 1, r)); + //print( "route:%d\n",CHAR_getWorkInt( meindex, NPC_WORK_CURRENTROUTE)); + } + /* 垫五窖曰白仿弘 凳 */ + CHAR_setWorkInt( meindex, NPC_WORK_ROUNDTRIP, + CHAR_getWorkInt( meindex, NPC_WORK_ROUNDTRIP)^1); + + /* 戚禾奶件玄及譬濡 */ + /* 窖曰反 溃质 */ + if( CHAR_getWorkInt( meindex, NPC_WORK_ROUNDTRIP) == 1) { + /* 公及伙□玄及 嫖禾奶件玄醒毛 月 */ + int num = NPC_BusGetRoutePointNum( meindex, argstr); + CHAR_setWorkInt( meindex, NPC_WORK_ROUTEPOINT, num-1); + } + else { + CHAR_setWorkInt( meindex, NPC_WORK_ROUTEPOINT, + CHAR_getWorkInt( meindex, NPC_WORK_ROUTEPOINT) +1); + } + /* 戚及禾奶件玄及甄 毛本永玄允月 */ + NPC_BusSetPoint( meindex, argstr); + /* 垫五燮毛 憎允月 */ + NPC_BusSetDestPoint( meindex, argstr); + /* 由□ 奴 仃月质 毛允月 */ + CHAR_DischargeParty( meindex, 0); + /* 蜇箕及凛棉毛本永玄 */ + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTTIME, NowTime.tv_sec); + /* 乒□玉弁伉失 */ + CHAR_setWorkInt( meindex, NPC_WORK_MODE, 0); + } + return; + default: + break; + } +} +/************************************** + * 汹仁[ + **************************************/ +static void NPC_Bus_walk( int meindex) +{ + POINT start, end; + int dir; + int ret; + int i; + + /* 汹仁楮溢 */ + /* 谗邋仄凶凛及质 */ + start.x = CHAR_getInt( meindex, CHAR_X); + start.y = CHAR_getInt( meindex, CHAR_Y); + end.x = CHAR_getWorkInt( meindex, NPC_WORK_ROUTETOX); + end.y = CHAR_getWorkInt( meindex, NPC_WORK_ROUTETOY); + + /* 谗邋仄凶及匹戚及禾奶件玄卞 */ + if( start.x == end.x && start.y == end.y ) { + int add = 1; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + + if( CHAR_getWorkInt( meindex, NPC_WORK_ROUNDTRIP ) == 1 ) { + add *= -1; + } + CHAR_setWorkInt( meindex, NPC_WORK_ROUTEPOINT, + CHAR_getWorkInt( meindex, NPC_WORK_ROUTEPOINT) +add); + if( NPC_BusSetPoint( meindex, argstr) == FALSE ) { + /* 卞谗邋*/ + /* 谨切乒□玉卞允月 */ + CHAR_setWorkInt( meindex, NPC_WORK_MODE,3); + + /* SE 日允 穴件乒旦及陲太 */ + if( CHAR_getWorkInt( meindex, NPC_WORK_SEFLG )) { + CHAR_sendSEoArroundCharacter( + CHAR_getInt( meindex, CHAR_FLOOR), + CHAR_getInt( meindex, CHAR_X), + CHAR_getInt( meindex, CHAR_Y), + 60, + TRUE); + } + /* 邋中凶凛及丢永本□斥*/ + for( i = 1; i < CHAR_PARTYMAX; i ++ ) { + int partyindex = CHAR_getWorkInt( meindex, CHAR_WORKPARTYINDEX1+i); + if( CHAR_CHECKINDEX( partyindex)) { + NPC_BusSendMsg( meindex, partyindex, NPC_BUS_MSG_END); + } + } + /* 蜇箕及凛棉毛本永玄 */ + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTTIME, NowTime.tv_sec); + return; + } + else { + return; + } + } + /*-------------------------------------------------------*/ + /* 汹井六月质 */ + + /* 轾毛菲户月 */ + dir = NPC_Util_getDirFromTwoPoint( &start,&end ); + + /* 漆中月桦赭及谨 由□ 奴汹五匹银丹 */ + end.x = CHAR_getInt( meindex, CHAR_X); + end.y = CHAR_getInt( meindex, CHAR_Y); + + /* 夫匀井井匀凶凛及啃及质 */ + for( i = 0; i < 100; i ++ ) { + if( dir < 0 ) { + dir = RAND( 0,7); + } + dir = NPC_Util_SuberiWalk( meindex, dir); + if( dir >= 0 && dir <= 7) break; + } + + if( dir >= 0 && dir <= 7 ) { + /* 汹仁 */ + ret = CHAR_walk( meindex, dir, 0); + + if( ret == CHAR_WALKSUCCESSED ) { + /* 愤坌互褪卅日醮棉毛汹井六月 */ + int i; + for( i = 1; i < CHAR_PARTYMAX; i ++ ) { + int toindex = CHAR_getWorkInt( meindex, i + CHAR_WORKPARTYINDEX1); + if( CHAR_CHECKINDEX(toindex) ) { + int parent_dir; + /* 阂及匏 午]褪及汹五蟆及匏 井日 轾毛菲户月 */ + /* 汹仁 */ + start.x = CHAR_getInt( toindex, CHAR_X); + start.y = CHAR_getInt( toindex, CHAR_Y); + parent_dir = NPC_Util_getDirFromTwoPoint( &start,&end ); + /* 弘仿犯奴它旦左皿扑亦件汹五毛 蜇允月啃卞] + * 戚及阂反蟆及阂及 毛馨丹方丹卞允月 + */ + end = start; + if( parent_dir != -1 ) { + CHAR_walk( toindex, parent_dir, 0); + } + } + } + } + } +} +/************************************** + * 戚及桦赭毛本永玄允月 + **************************************/ +static int NPC_BusSetPoint( int meindex, char *argstr) +{ + char buf[4096]; + char buf2[256]; + char buf3[256]; + int ret; + char routetostring[64]; + + snprintf( routetostring, sizeof( routetostring), "routeto%d", + CHAR_getWorkInt( meindex, NPC_WORK_CURRENTROUTE)); + + if( NPC_Util_GetStrFromStrWithDelim( argstr, routetostring,buf, sizeof(buf)) + == NULL ) + { + print( "npcbus:nothing route \n"); + return FALSE; + } + ret = getStringFromIndexWithDelim( buf, ";", + CHAR_getWorkInt( meindex, NPC_WORK_ROUTEPOINT), + buf2, sizeof(buf2)); + + if( ret == FALSE ) return FALSE; + + ret = getStringFromIndexWithDelim( buf2, ",", 1, + buf3, sizeof(buf3)); + if( ret == FALSE) return FALSE; + CHAR_setWorkInt( meindex, NPC_WORK_ROUTETOX, atoi( buf3)); + + ret = getStringFromIndexWithDelim( buf2, ",", 2, + buf3, sizeof(buf3)); + if( ret == FALSE) return FALSE; + CHAR_setWorkInt( meindex, NPC_WORK_ROUTETOY, atoi( buf3)); + return TRUE; +} +/************************************** + * route 寞井日] 蟆互丐匀凶日公木毛 + * 惫寞及午仇卞本永玄允月[ + **************************************/ +static void NPC_BusSetDestPoint( int meindex, char *argstr) +{ + char buf[256]; + char routename[256]; + + snprintf( routename, sizeof( routename), "routename%d", + CHAR_getWorkInt( meindex, NPC_WORK_CURRENTROUTE)); + + if( NPC_Util_GetStrFromStrWithDelim( argstr, routename, buf, sizeof( buf)) + != NULL ) + { + CHAR_setChar( meindex, CHAR_OWNTITLE, buf); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX)); + } +} +/************************************** + * 隙烂今木凶失奶 丞毛 匀化中月井民尼永弁允月 + * 匀化中凶日分户 + **************************************/ +static BOOL NPC_BusCheckDeniedItem( int meindex, int charaindex, char *argstr) +{ + char buf[1024]; + BOOL found = TRUE; + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "denieditem", buf, sizeof( buf)) + != NULL ) + { + int i; + int ret; + for( i = 1; ; i ++) { + int itemid; + char buf2[64]; + int j; + ret = getStringFromIndexWithDelim( buf, ",", i, buf2, sizeof(buf2)); + if( ret == FALSE ) break; + itemid = atoi( buf2); + for( j = 0; j < CHAR_MAXITEMHAVE; j ++) { + int itemindex = CHAR_getItemIndex( charaindex, j); + if( ITEM_CHECKINDEX( itemindex)) { + if( ITEM_getInt( itemindex, ITEM_ID) == itemid) { + found = FALSE; + break; + } + } + } + } + } + return found; +} +/************************************** + * 隙烂今木凶失奶 丞毛 匀化中月井民尼永弁允月 + * 匀化中卅中午分户 + **************************************/ +BOOL NPC_BusCheckAllowItem( int meindex, int charaindex, BOOL pickupmode) +{ + char buf[1024]; + BOOL found = TRUE; + BOOL pickup = FALSE; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "pickupitem", buf, sizeof( buf))!= NULL ){ + pickup = TRUE; + } + if( NPC_Util_GetStrFromStrWithDelim( argstr, "allowitem", buf, sizeof( buf))!= NULL ){ + int i; + int ret; + for( i = 1; ; i ++) { + int itemid; + char buf2[64]; + int j; + BOOL getflg; + ret = getStringFromIndexWithDelim( buf, ",", i, buf2, sizeof(buf2)); + if( ret == FALSE ) break; + itemid = atoi( buf2); + getflg = FALSE; + for( j = 0; j < CHAR_MAXITEMHAVE; j ++) { + int itemindex = CHAR_getItemIndex( charaindex, j); + if( ITEM_CHECKINDEX( itemindex)) { + if( ITEM_getInt( itemindex, ITEM_ID) == itemid) { + if( pickupmode && pickup && !getflg) { + CHAR_DelItem( charaindex, j); + getflg = TRUE; + } + break; + } + } + } + if( j == CHAR_MAXITEMHAVE) { + found = FALSE; + break; + } + } + } + return found; +} + +/************************************** + * 隙烂今木凶伊矛伙动晓井民尼永弁允月 + **************************************/ +static BOOL NPC_BusCheckLevel( int meindex, int charaindex, char *argstr) +{ + int level; + + /* 卅仃木壬中仃卅中娄醒及民尼永弁 */ + level = NPC_Util_GetNumFromStrWithDelim( argstr, "needlevel"); + if( level == -1 ) { + return TRUE; + } + if( CHAR_getInt( charaindex, CHAR_LV) >= level ) return TRUE; + + return FALSE; +} +/************************************** + * 豢嗯毛民尼永弁允月 + * -1 蛲 0动晓” ]井勾 邰Stone + **************************************/ +static int NPC_BusCheckStone( int meindex, int charaindex, char *argstr) +{ + int gold; + + /* 卅仃木壬中仃卅中娄醒及民尼永弁 */ + gold = NPC_Util_GetNumFromStrWithDelim( argstr, "needstone"); + if( gold == -1 ) { + return 0; + } + if( CHAR_getInt( charaindex, CHAR_GOLD) >= gold ) return gold; + + return -1; +} +/************************************** + * 丢永本□斥毛霜月 + * 娄醒及丢永本□斥互卅仃木壬犯白巧伙玄丢永本□斥毛霜月 + **************************************/ +static void NPC_BusSendMsg( int meindex, int talkerindex, int tablenum) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[256]; + char msg[256]; + if( tablenum < 0 || tablenum >= arraysizeof( busmsg)) return; + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + + if( NPC_Util_GetStrFromStrWithDelim( argstr, busmsg[tablenum].option, buf, sizeof( buf)) + != NULL ) + { + strcpy( msg, buf); + } + else { + snprintf( msg, sizeof(msg),busmsg[tablenum].defaultmsg); + } + CHAR_talkToCli( talkerindex, meindex, msg, CHAR_COLORYELLOW); +} +/************************************** + * 伙□玄 □皮伙及禾奶件玄及醒毛潸 允月 + **************************************/ +static int NPC_BusGetRoutePointNum( int meindex, char *argstr ) +{ + int i; + char buf[4096]; + char buf2[256]; + int ret; + char routetostring[64]; + + snprintf( routetostring, sizeof( routetostring), "routeto%d", + CHAR_getWorkInt( meindex, NPC_WORK_CURRENTROUTE)); + + if( NPC_Util_GetStrFromStrWithDelim( argstr, routetostring,buf, sizeof(buf)) + == NULL ) + { + print( "npcbus:nothing route \n"); + return -1; + } + for( i = 1; ; i ++ ) { + ret = getStringFromIndexWithDelim( buf, ";", i, buf2, sizeof(buf2)); + if( ret == FALSE) break; + } + return( i -1); +} +BOOL NPC_BusCheckJoinParty( int meindex, int charaindex, BOOL msgflg) +{ + //int fd; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + int ret; + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + + /* ㄠ弘伉永玉动 及心 */ + if( !NPC_Util_charIsInFrontOfChar( charaindex, meindex, 1 )) return FALSE; + /* 昙乐反蛐 允月 */ + if( CHAR_getWorkInt( meindex, NPC_WORK_MODE) != 0 ) { + if( msgflg) NPC_BusSendMsg( meindex, charaindex, NPC_BUS_MSG_GETTINGON); + return FALSE; + } + /* 天□化不分匀凶日分户 */ + if( CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE ) != CHAR_PARTY_NONE) { + if( msgflg) NPC_BusSendMsg( meindex, charaindex, NPC_BUS_MSG_NOTPARTY); + return FALSE; + } + /* 由□ 奴及谛醒毛民尼永弁允月 */ + if( CHAR_getEmptyPartyArray( meindex) == -1 ) { + if( msgflg) NPC_BusSendMsg( meindex, charaindex, NPC_BUS_MSG_OVERPARTY); + return FALSE; + } + /* 失奶 丞及民尼永弁毛允月(嗟鞅失奶 丞) */ + if( !NPC_BusCheckDeniedItem( meindex, charaindex, argstr)) { + if( msgflg) NPC_BusSendMsg( meindex, charaindex, NPC_BUS_MSG_DENIEDITEM); + return FALSE; + } +#ifdef _ITEM_CHECKWARES + if( CHAR_CheckInItemForWares( charaindex, 0) == FALSE ) { + CHAR_talkToCli( charaindex, -1, "无法携带货物上车。", CHAR_COLORYELLOW); + return FALSE; + } +#endif + /* 失奶 丞及民尼永弁毛允月( 邰失奶 丞) */ + if( !NPC_BusCheckAllowItem( meindex, charaindex, FALSE)) { + if( msgflg) NPC_BusSendMsg( meindex, charaindex, NPC_BUS_MSG_ALLOWITEM); + return FALSE; + } + /* 伊矛伙及民尼永弁毛允月 */ + if( !NPC_BusCheckLevel( meindex, charaindex, argstr)) { + if( msgflg) NPC_BusSendMsg( meindex, charaindex, NPC_BUS_MSG_LEVEL); + return FALSE; + } + /* 奶矛件玄 井民尼永弁允月 */ +// if( CHAR_getInt( charaindex, CHAR_NOWEVENT) != 0 || +// CHAR_getInt( charaindex, CHAR_NOWEVENT2) != 0 || +// CHAR_getInt( charaindex, CHAR_NOWEVENT3) != 0 ) +// { +// if( msgflg) NPC_BusSendMsg( meindex, charaindex, NPC_BUS_MSG_EVENT); +// return FALSE; +// } + /* 豢嗯及民尼永弁毛允月 云嗯毛潸月及匹] 蔽民尼永弁卞允月仇午″ */ + ret = NPC_BusCheckStone( meindex, charaindex, argstr); + if( ret == -1 ) { + if( msgflg) NPC_BusSendMsg( meindex, charaindex, NPC_BUS_MSG_GOLD); + return FALSE; + } + if( ret != 0 ) { + char msgbuf[128]; + /* 豢嗯毛午月 */ + CHAR_setInt( charaindex, CHAR_GOLD, + CHAR_getInt( charaindex, CHAR_GOLD) - ret); + /* 霜耨 */ + CHAR_send_P_StatusString( charaindex, CHAR_P_STRING_GOLD); + snprintf( msgbuf, sizeof( msgbuf), "支付了%d Stone!", ret); + CHAR_talkToCli( charaindex, -1, msgbuf, CHAR_COLORYELLOW); + } + /* 由□ 奴卞 月 */ + //CHAR_JoinParty_Main( charaindex, meindex); + + //fd = getfdFromCharaIndex( charaindex ); + + //lssproto_PR_send( fd, 1, 1); + + + return TRUE; +} diff --git a/gmsv/npc/npc_charm.c b/gmsv/npc/npc_charm.c new file mode 100644 index 0000000..f6ddd82 --- /dev/null +++ b/gmsv/npc/npc_charm.c @@ -0,0 +1,285 @@ +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "lssproto_serv.h" +#include "npc_charm.h" + +// 医毛 仁煌遥挚反 + +//伊矛伙← ← 蜇箕及 / + +//荚汊汹反{ㄤ匹允[ +/* +#define RATE 4 //伊□玄" +#define CHARMHEAL 5 // 及荚汊汹 +#define WARU 3 // 毛喃月袄 + +*/ + +#define RATE 10 //伊□玄" +#define CHARMHEAL 5 // 及荚汊汹 +#define WARU 3 // 毛喃月袄 + + +static void NPC_Charm_selectWindow( int meindex, int toindex, int num); +int NPC_CharmCost(int meindex,int talker); +void NPC_CharmUp(int meindex,int talker); + + +/********************************* +* 赓渝质 +*********************************/ +BOOL NPC_CharmInit( int meindex ) +{ + /*--平乓仿及正奶皿毛涩烂--*/ + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPECHARM ); + return TRUE; + +} + + +/********************************* +* 仄井仃日木凶凛及质 +*********************************/ +void NPC_CharmTalked( int meindex , int talkerindex , char *szMes ,int color ) +{ + + /* 皿伊奶乩□卞覆仄化分仃 杀允月 */ + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) + { + return; + } + + /*-- 及蟆卞中月井升丹井"--*/ + if(NPC_Util_isFaceToFace( meindex ,talkerindex , 2) == FALSE) { + /* ㄠ弘伉永玉动 及心 */ + if(NPC_Util_isFaceToChara( talkerindex, meindex, 1) == FALSE) return; + } + + NPC_Charm_selectWindow( meindex, talkerindex, 0); +} + + +/* + * 备质 卞坌仃月 + */ +static void NPC_Charm_selectWindow( int meindex, int toindex, int num) +{ + + char token[1024]; + char escapedname[1024]; + int fd = getfdFromCharaIndex( toindex); + int buttontype = 0; + int windowtype = 0; + int windowno = 0; + int cost = 0; + int chartype; + + /*--它奶件玉它正奶皿丢永本□斥互云云中及匹燮卞涩烂--*/ + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + + switch( num) { + case 0: + /*--蓟 --*/ + sprintf(token,"4\n     = = 美容师 = = " + "\n\n  欢迎光临,今天要做什麽呢?" + "\n " + "\n\n    《 给我魅力 》 " + "\n\n    《 什麽也不做 》 " + ); + + buttontype = WINDOW_BUTTONTYPE_NONE; + windowtype = WINDOW_MESSAGETYPE_SELECT; + windowno = CHAR_WINDOWTYPE_CHARM_START; + break; + + case 1: + cost = NPC_CharmCost( meindex, toindex); + if(cost == -1){ + sprintf(token,"     = = 美容师 = = " + "\n\n    你的魅力真是完美" + "\n\n   请永远保持你的魅力唷。" + ); + buttontype = WINDOW_BUTTONTYPE_OK; + }else{ + sprintf(token,"     = = 美容师 = = " + "\n 佮齵在,千禧特惠价实施中�" + "\n\n 要将你的魅力上升五点的话" + "\n    需要%6d的stone唷!" + "\n\n   即使这样也可以吗?",cost + ); + buttontype = WINDOW_BUTTONTYPE_YESNO; + + } + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_CHARM_END; + + break; + + case 2: + cost = NPC_CharmCost( meindex, toindex); + chartype = CHAR_getInt( toindex, CHAR_IMAGETYPE); + + if(cost > CHAR_getInt( toindex, CHAR_GOLD)) { + sprintf(token,"     = = 美容师 = = " + "\n\n   哎呀!你的钱不够唷!" + "\n   先去存好钱下次再来吧!" + ); + + }else{ + NPC_CharmUp( meindex, toindex); + + /*--平乓仿及正奶皿卞方匀化丢永本□斥毛 尹化心凶--*/ + switch( chartype) { + case CHAR_IMAGETYPE_GIRL: + sprintf(token,"     = = 美容师 = = " + "\n\n  嗯,这样你的魅力就上升罗!" + "\n\n   愈来愈可爱了呢!" + ); + + break; + case CHAR_IMAGETYPE_BOY: + sprintf(token,"     = = 美容师 = = " + "\n\n  嗯,这样你的魅力就上升罗!" + "\n\n  是不是比刚才要帅多了呢?" + ); + break; + + case CHAR_IMAGETYPE_CHILDBOY: + case CHAR_IMAGETYPE_CHILDGIRL: + sprintf(token,"     = = 美容师 = = " + "\n\n  嗯,这样你的魅力就上升罗!" + "\n\n   真的变得好可爱唷!" + ); + break; + + case CHAR_IMAGETYPE_MAN: + sprintf(token,"     = = 美容师 = = " + "\n\n  嗯,这样你的魅力就上升罗!" + "\n\n    变得更酷了呢!" + ); + break; + + case CHAR_IMAGETYPE_WOMAN: + sprintf(token,"     = = 美容师 = = " + "\n\n  嗯,这样你的魅力就上升罗!" + "\n\n 可真是变得愈来愈美了呢!" + ); + break; + + } + } + + buttontype = WINDOW_BUTTONTYPE_OK; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_CHARM_END; + break; + } + + makeEscapeString( token, escapedname, sizeof( escapedname)); + /*-仇仇匹霜耨允月--*/ + lssproto_WN_send( fd, windowtype, + buttontype, + windowno, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + escapedname); + +} + + +/*----------------------------------------- +弁仿奶失件玄井日忒匀化五凶凛卞裟太请今木月[ +-------------------------------------------*/ +void NPC_CharmWindowTalked( int meindex, int talkerindex, + int seqno, int select, char *data) +{ + if( NPC_Util_CharDistance( talkerindex, meindex ) > 2) return; + + switch( seqno){ + case CHAR_WINDOWTYPE_CHARM_START: + if(atoi( data) == 2) { + NPC_Charm_selectWindow( meindex, talkerindex, 1 ); + } + break; + + case CHAR_WINDOWTYPE_CHARM_END: + if(select == WINDOW_BUTTONTYPE_YES) { + NPC_Charm_selectWindow( meindex, talkerindex, 2 ); + } + break; + } + +} + + + +/*-- --*/ +void NPC_CharmUp(int meindex,int talker) +{ + int cost; + int i; + int petindex; + char petsend[64]; + + /*--云嗯毛蛹日仄引仄斤丹--*/ + cost = NPC_CharmCost( meindex, talker); + CHAR_setInt( talker, CHAR_GOLD, + CHAR_getInt( talker, CHAR_GOLD) - cost); + CHAR_send_P_StatusString( talker, CHAR_P_STRING_GOLD); + + /*-- 互ㄠㄟㄟ动晓卞卅月桦宁反雄娄卞ㄠㄟㄟ卞允月--*/ + if(CHAR_getInt( talker, CHAR_CHARM) + CHARMHEAL >= 100) { + CHAR_setInt( talker, CHAR_CHARM, 100); + }else{ + /*-- 毛本永玄--*/ + CHAR_setInt(talker, CHAR_CHARM, + (CHAR_getInt( talker, CHAR_CHARM) + CHARMHEAL)); + } + + /*--旦 □正旦及凳蕙--*/ + CHAR_complianceParameter( talker ); + CHAR_send_P_StatusString( talker, CHAR_P_STRING_CHARM); + + + /*--矢永玄及由仿丢□正毛凳蕙--*/ + for( i = 0 ; i < CHAR_MAXPETHAVE ; i++){ + petindex = CHAR_getCharPet( talker, i); + + if( petindex == -1 ) continue; + + /* 平乓仿及 民尼永弁 */ + if( !CHAR_CHECKINDEX( talker ) ) continue; + + /*--由仿丢□正譬帮--*/ + CHAR_complianceParameter( petindex ); + sprintf( petsend, "K%d", i ); + CHAR_sendStatusString( talker , petsend ); + } +} + + +/*--云嗯及煌遥--*/ +int NPC_CharmCost(int meindex,int talker) +{ + int cost; + int level; + int charm; + int trans; + + level = CHAR_getInt( talker, CHAR_LV); + charm = CHAR_getInt( talker, CHAR_CHARM); + trans = CHAR_getInt( talker, CHAR_TRANSMIGRATION); + + if(charm >= 100) return -1; + + if(charm <= 1) charm = WARU; + + /*-- 煌遥挚 --*/ + cost = level * RATE * (charm / WARU) * (trans+1); + + return cost; + +} diff --git a/gmsv/npc/npc_checkman.c b/gmsv/npc/npc_checkman.c new file mode 100644 index 0000000..5a7bccd --- /dev/null +++ b/gmsv/npc/npc_checkman.c @@ -0,0 +1,472 @@ +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "lssproto_serv.h" + + +//蜇箕及银迕匹五月白仿弘及醒 +#define MAXEVENTFLG 96 + +/* + * 奶矛件玄及白仿弘毛民尼永弁允月 + * + */ + +static void NPC_CheckMan_selectWindow( int meindex, int toindex, int num); +int NPC_NowFlgCheck(int meindex,int talker,int now[MAXEVENTFLG]); +int NPC_EndFlgCheck(int meindex,int talker ,int nowflg[MAXEVENTFLG]); +BOOL NPC_FlgCheckMain( int meindex,int talker,int nowindex,int now[MAXEVENTFLG],char *work2); + +/********************************* +* 赓渝质 +*********************************/ +BOOL NPC_CheckManInit( int meindex ) +{ + /*--平乓仿及正奶皿毛涩烂--*/ + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPECHECKMAN); + + return TRUE; +} + + +/********************************* +* 仄井仃日木凶凛及质 +*********************************/ +void NPC_CheckManTalked( int meindex , int talkerindex , char *szMes ,int color ) +{ + + /* 皿伊奶乩□卞覆仄化分仃 杀允月 */ + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) + { + return; + } + + /*-- 及蟆卞中月井升丹井"--*/ + if(NPC_Util_isFaceToFace( meindex ,talkerindex , 2) == FALSE) { + /* ㄠ弘伉永玉动 及心 */ + if(NPC_Util_isFaceToChara( talkerindex, meindex, 1) == FALSE) return; + } + + // 赓及它奶件玉它卞 + NPC_CheckMan_selectWindow( meindex, talkerindex, 0); + +} + + +/* + * 备质 卞坌仃月 + */ +static void NPC_CheckMan_selectWindow( int meindex, int talker, int num) +{ + + char token[1024]; + char work[256]; + char work2[512]; + + char escapedname[1024]; + int fd = getfdFromCharaIndex( talker); + int buttontype = 0; + int windowtype = 0; + int windowno = 0; + int now[MAXEVENTFLG]; + int nowindex; + int i; + int page; + + work[0] = 0; + work2[0] = 0; + token[0] = 0; + + now[0] =0; + + /*--它奶件玉它正奶皿丢永本□斥互云云中及匹燮卞涩烂--*/ + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + + switch( num) { + + case 0: + CHAR_setWorkInt(talker,CHAR_WORKSHOPRELEVANT,0); + CHAR_setWorkInt(talker,CHAR_WORKSHOPRELEVANTSEC,0); + + /*--蓟 --*/ + sprintf(token,"3\n {{{{>>{民尼永弁穴件{>> " + "\n{{{蜇箕及白仿弘民尼永弁毛仄引□允" + "\n" + "\n{{{{ U{NOW白仿弘民尼永弁{V " + "\n{{{{ U{END白仿弘民尼永弁{V " + "\n\n{{ U{NOW白仿弘民尼永弁 择称 V " + "\n{{ U{END白仿弘民尼永弁 择称 V " + ); + + buttontype = WINDOW_BUTTONTYPE_CANCEL; + windowtype = WINDOW_MESSAGETYPE_SELECT; + windowno = CHAR_WINDOWTYPE_CHECKMAN_START; + break; + + //NOW白仿弘及棵签 憎 + case 1: + + //NOW白仿弘及民尼永弁 + nowindex = NPC_NowFlgCheck( meindex, talker, now); + + //窒矢□斥 井 + page = CHAR_getWorkInt(talker,CHAR_WORKSHOPRELEVANTSEC) ; + + if(page == 0 || page == 1){ + i = 0; + }else{ + i = 83; + } + + //矢□斥 + for(; i < nowindex ; i++) + { + sprintf(work,"%d,",now[ i]); + strcat(work2,work); + } + + sprintf(token,"{{{{{>>{民尼永弁穴件{>> " + "\n{{蜇箕及筑 及 匀化中月 NOW奶矛件玄" + "\n%s" + ,work2); + + if(page != 2 && nowindex > 83) + { + //乒□玉 + CHAR_setWorkInt(talker,CHAR_WORKSHOPRELEVANT,1); + //矢□斥 + CHAR_setWorkInt(talker,CHAR_WORKSHOPRELEVANTSEC,2); + + buttontype = WINDOW_BUTTONTYPE_NEXT; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_CHECKMAN_MAIN; + + }else{ + buttontype = WINDOW_BUTTONTYPE_OK; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + } + + break; + + + //END白仿弘及棵签 憎 + case 2: + //蔽 白仿弘及民尼永弁 + nowindex = NPC_EndFlgCheck( meindex, talker, now); + + //窒矢□斥 井 + page = CHAR_getWorkInt(talker,CHAR_WORKSHOPRELEVANTSEC) ; + + if(page == 0 || page == 1){ + i = 0; + }else{ + i = 83; + } + work2[0]=0; + + //矢□斥 + for(; i < nowindex ; i++) + { + sprintf(work,"%d,",now[ i]); + strcat(work2,work); + } + sprintf(token,"{{{{{>>{民尼永弁穴件{>> " + "\n{{蜇箕及筑 及 匀化中月 END奶矛件玄" + "\n%s" + ,work2); + + if(page != 2 && nowindex > 83) + { + //乒□玉 + CHAR_setWorkInt(talker,CHAR_WORKSHOPRELEVANT,2); + //矢□斥 + CHAR_setWorkInt(talker,CHAR_WORKSHOPRELEVANTSEC,2); + + buttontype = WINDOW_BUTTONTYPE_NEXT; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_CHECKMAN_MAIN; + + }else{ + buttontype = WINDOW_BUTTONTYPE_OK; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + } + + break; + + + // NOW白仿弘及择称 憎 + case 4: + { + + //NOW白仿弘民尼永弁 + nowindex = NPC_NowFlgCheck( meindex, talker, now); + + if(NPC_FlgCheckMain( meindex, talker, nowindex,now,work2) + == FALSE) + { + return; + } + + + sprintf(token,"{{{{{>>{民尼永弁穴件{>> " + "\n{{蜇箕及筑 及 匀化中月 NOW奶矛件玄" + "\n%s" + ,work2); + + page = CHAR_getWorkInt(talker,CHAR_WORKSHOPRELEVANTSEC) ; + nowindex = (nowindex / ((6*page)+1)); + + if(page != 16 && nowindex != 0) + { + //乒□玉 + CHAR_setWorkInt(talker,CHAR_WORKSHOPRELEVANT,4); + //矢□斥 + page = CHAR_getWorkInt(talker,CHAR_WORKSHOPRELEVANTSEC); + page++; + CHAR_setWorkInt(talker,CHAR_WORKSHOPRELEVANTSEC,page); + + buttontype = WINDOW_BUTTONTYPE_NEXT; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_CHECKMAN_MAIN; + }else{ + buttontype = WINDOW_BUTTONTYPE_OK; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + } + + } + break; + + // END白仿弘及择称 憎 + case 5: + { + //END白仿弘及民尼永弁 + nowindex = NPC_EndFlgCheck( meindex, talker, now); + + + if(NPC_FlgCheckMain( meindex, talker, nowindex, now, work2) + == FALSE) + { + return; + } + + sprintf(token,"{{{{{>>{民尼永弁穴件{>> " + "\n{{蜇箕及筑 及 匀化中月 END奶矛件玄" + "\n%s" + ,work2); + + page = CHAR_getWorkInt(talker,CHAR_WORKSHOPRELEVANTSEC) ; + + nowindex = (nowindex / ((6*page)+1)); + + if(page != 16 && nowindex != 0) + { + //乒□玉 + CHAR_setWorkInt(talker, CHAR_WORKSHOPRELEVANT, 5); + //矢□斥 + page = CHAR_getWorkInt( talker, CHAR_WORKSHOPRELEVANTSEC); + page++; + CHAR_setWorkInt( talker, CHAR_WORKSHOPRELEVANTSEC, page); + + buttontype = WINDOW_BUTTONTYPE_NEXT; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_CHECKMAN_MAIN; + }else{ + buttontype = WINDOW_BUTTONTYPE_OK; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + } + + } + } + + makeEscapeString( token, escapedname, sizeof( escapedname)); + /*-仇仇匹霜耨允月--*/ + lssproto_WN_send( fd, windowtype, + buttontype, + windowno, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + escapedname); + +} + + +/*----------------------------------------- +弁仿奶失件玄井日忒匀化五凶凛卞裟太请今木月[ +-------------------------------------------*/ +void NPC_CheckManWindowTalked( int meindex, int talkerindex, + int seqno, int select, char *data) +{ + int datano; + + if( NPC_Util_CharDistance( talkerindex, meindex ) > 2) return; + + datano = atoi(data); + + if(select == WINDOW_BUTTONTYPE_OK) + { + NPC_CheckMan_selectWindow( meindex, talkerindex, 0 ); + }else if(select == WINDOW_BUTTONTYPE_CANCEL) { + return; + } + + + + + switch(CHAR_getWorkInt(talkerindex,CHAR_WORKSHOPRELEVANT)){ + case 1: + if(CHAR_getWorkInt(talkerindex,CHAR_WORKSHOPRELEVANTSEC) == 2){ + NPC_CheckMan_selectWindow( meindex, talkerindex, 1 ); + } + break; + + case 2: + if(CHAR_getWorkInt(talkerindex,CHAR_WORKSHOPRELEVANTSEC) == 2){ + NPC_CheckMan_selectWindow( meindex, talkerindex, 2 ); + } + break; + + case 4: + if(CHAR_getWorkInt(talkerindex,CHAR_WORKSHOPRELEVANTSEC) >= 2){ + NPC_CheckMan_selectWindow( meindex, talkerindex, 4 ); + } + + case 5: + if(CHAR_getWorkInt(talkerindex,CHAR_WORKSHOPRELEVANTSEC) >= 2){ + NPC_CheckMan_selectWindow( meindex, talkerindex, 5 ); + } + + break; + } + + switch( datano ){ + case 1: + NPC_CheckMan_selectWindow( meindex, talkerindex, 1 ); + break; + + case 2: + NPC_CheckMan_selectWindow( meindex, talkerindex, 2 ); + break; + + case 4: + NPC_CheckMan_selectWindow( meindex, talkerindex, 4 ); + break; + + case 5: + NPC_CheckMan_selectWindow( meindex, talkerindex, 5 ); + break; + } + +} + +/* + *{奶矛件玄 白仿弘毛民尼永弁允月 + */ +int NPC_NowFlgCheck(int meindex,int talker ,int nowflg[MAXEVENTFLG]) +{ + int i = 0; + int j = 0; + + for(i= 0; i < MAXEVENTFLG ; i++){ + if(NPC_NowEventCheckFlg( talker, i) == TRUE) + { + nowflg[j] = i; + j++; + } + } + + return j; +} + +/* + *{奶矛件玄蔽 白仿弘毛民尼永弁允月 + */ +int NPC_EndFlgCheck(int meindex,int talker ,int nowflg[MAXEVENTFLG]) +{ + int i = 0; + int j = 0; + + for(i= 0; i < MAXEVENTFLG ; i++){ + + if(NPC_EventCheckFlg( talker, i) == TRUE) + { + nowflg[j] = i; + j++; + } + } + + return j; +} + +/* + * 择称 + * + */ +BOOL NPC_FlgCheckMain( int meindex,int talker,int nowindex,int now[MAXEVENTFLG],char *work2) +{ + int page; + int max; + int i; + int shou; + int j=1; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char work[512]; + char buf[40]; + char buf2[42]; + + //窒矢□斥 井 + page = CHAR_getWorkInt(talker,CHAR_WORKSHOPRELEVANTSEC) ; + + if(page == 0) { + page =1; + CHAR_setWorkInt(talker,CHAR_WORKSHOPRELEVANTSEC,1) ; + } + + if(page == 1){ + i = 0; + if( nowindex >6 ){ + max =7; + }else{ + max =nowindex; + } + }else{ + max = (page * 6) +1; + i = max - 7; + shou = nowindex / max; + + if(shou == 0){ + max = nowindex; + }else{ + i = max - 7; + } + } + + //奶矛件玄及择称互踏井木化中月白央奶伙毛 心仇戈 + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { + print("NPC_CheckMan:GetArgStrErr"); + return FALSE; + } + + work[0] = 0; + work2[0] = 0; + + //矢□斥 + for(; i < max ; i++) + { + sprintf(work,"#%d:",now[ i]); + j = 1; + while( getStringFromIndexWithDelim(argstr, "|", j, buf,sizeof( buf)) + !=FALSE ) + { + j++; + if(strstr(buf,work) != NULL){ + sprintf(buf2,"%s\n",buf); + strcat(work2,buf2); + break; + } + } + } + + return TRUE; +} diff --git a/gmsv/npc/npc_dengon.c b/gmsv/npc/npc_dengon.c new file mode 100644 index 0000000..0b2e220 --- /dev/null +++ b/gmsv/npc/npc_dengon.c @@ -0,0 +1,248 @@ +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "lssproto_serv.h" +#include "npcutil.h" +#include "handletime.h" + +static BOOL NPC_DengonReadString( int meindex, int id, char *str ); +static void NPC_DengonWriteString( int meindex, int talkerindex, int id, char *str ); + +#define DENGONFILEDIR "./Dengon/" +#define DENGONFILELINENUM 1000 +#define DENGONFILESTRINGSIZE 256 +#define DENGONFILECOUNTERSIZE 11 +#define DENGONFILEENTRYSIZE (DENGONFILECOUNTERSIZE+DENGONFILESTRINGSIZE+1) +#define MESSAGEINONEWINDOW 7 + +char NPC_sendbuf[DENGONFILEENTRYSIZE*MESSAGEINONEWINDOW]; + +BOOL NPC_DengonInit( int meindex ) +{ + char filename[256], tmp[256]; + FILE *f; + int i,j; + int id, maxid; + + CHAR_setInt( meindex, CHAR_WHICHTYPE, CHAR_TYPEDENGON ); + + snprintf( filename,sizeof(filename), "%s%d_%d_%d", + DENGONFILEDIR, CHAR_getInt( meindex, CHAR_FLOOR ), + CHAR_getInt( meindex, CHAR_X ), + CHAR_getInt( meindex, CHAR_Y ) ); + + if( ! (f=fopen( filename, "r" )) ){ + f = fopen( filename, "w" ); + if( f ){ + }else{ + print( "ERROR:Can't create Dengonfile %s!\n",filename ); + return FALSE; + } + for( j = 0; j < DENGONFILELINENUM; j++ ){ + fwrite( "0000000000:", sizeof(char), + DENGONFILECOUNTERSIZE, f); + for( i=0;i maxid ) { + maxid = id; + } + } + + CHAR_setWorkInt( meindex, CHAR_WORKDENGONMAXID, maxid ); + + fclose(f); + return TRUE; +} + + +void NPC_DengonWindowTalked( int index, int talker, + int seqno, int select, char *data) +{ + char buf[DENGONFILEENTRYSIZE*MESSAGEINONEWINDOW*2]; + + int id; + +#define DENGONDISTANCE 3 + + if(NPC_Util_CharDistance(index,talker) > DENGONDISTANCE ) return; + if( seqno == CHAR_WINDOWTYPE_DENGON) { + int buttontype = 0; + int maxid; + switch( select ){ + case WINDOW_BUTTONTYPE_NEXT: + case WINDOW_BUTTONTYPE_PREV: + id = CHAR_getWorkInt( talker, CHAR_WORKSHOPRELEVANT) + + MESSAGEINONEWINDOW + * (( select == WINDOW_BUTTONTYPE_NEXT) ? 1 : -1); + + maxid = CHAR_getWorkInt( index, CHAR_WORKDENGONMAXID ); + + if( id > maxid) id = maxid; + else if( id < 2 ) id = 1; + + buttontype = WINDOW_BUTTONTYPE_OKCANCEL; + if( id == maxid ) buttontype |= WINDOW_BUTTONTYPE_PREV; + else if( id == 1 ) buttontype |= WINDOW_BUTTONTYPE_NEXT; + else { + buttontype |= WINDOW_BUTTONTYPE_PREV; + buttontype |= WINDOW_BUTTONTYPE_NEXT; + } + CHAR_setWorkInt( talker, CHAR_WORKSHOPRELEVANT, id); + if( NPC_DengonReadString( index, id, NPC_sendbuf ) ){ + int fd; + fd = getfdFromCharaIndex( talker ); + if( fd == -1 )return; + lssproto_WN_send(fd, WINDOW_MESSAGETYPE_WIDEMESSAGEANDLINEINPUT, + buttontype, + CHAR_WINDOWTYPE_DENGON, + CHAR_getWorkInt( index, CHAR_WORKOBJINDEX), + makeEscapeString( NPC_sendbuf, buf, sizeof(buf))); + } + break; + case WINDOW_BUTTONTYPE_OK: + if( strlen( data) == 0 ) break; + id = CHAR_getWorkInt(index, CHAR_WORKDENGONMAXID ); + id++; + NPC_DengonWriteString( index, talker, id, data ); + CHAR_setWorkInt(index, CHAR_WORKDENGONMAXID, id ); + CHAR_setWorkInt( talker, CHAR_WORKSHOPRELEVANT, id); + if( NPC_DengonReadString( index, id, NPC_sendbuf ) ){ + int fd; + fd = getfdFromCharaIndex( talker ); + if( fd == -1 )return; + lssproto_WN_send(fd, WINDOW_MESSAGETYPE_WIDEMESSAGEANDLINEINPUT, + WINDOW_BUTTONTYPE_OKCANCEL| + WINDOW_BUTTONTYPE_PREV, + CHAR_WINDOWTYPE_DENGON, + CHAR_getWorkInt( index, CHAR_WORKOBJINDEX), + makeEscapeString( NPC_sendbuf, buf, sizeof(buf))); + } + break; + default: + break; + } + } +} + + + + +void NPC_DengonLooked( int meindex, int lookedindex ) +{ + int maxid; + char buf[DENGONFILEENTRYSIZE*MESSAGEINONEWINDOW*2]; + if( NPC_Util_CharDistance( lookedindex, meindex ) > 1) return; + maxid = CHAR_getWorkInt( meindex, CHAR_WORKDENGONMAXID ); + if( NPC_DengonReadString( meindex, maxid, NPC_sendbuf ) ){ + int fd; + fd = getfdFromCharaIndex( lookedindex ); + if( fd == -1 )return; + lssproto_WN_send(fd, WINDOW_MESSAGETYPE_WIDEMESSAGEANDLINEINPUT, + WINDOW_BUTTONTYPE_OKCANCEL| + WINDOW_BUTTONTYPE_PREV, + CHAR_WINDOWTYPE_DENGON, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + makeEscapeString( NPC_sendbuf, buf, sizeof(buf))); + + CHAR_setWorkInt( lookedindex, CHAR_WORKSHOPRELEVANT, maxid); + + } + +} + +static BOOL NPC_DengonReadString( int meindex, int id, char *str ) +{ + char filename[256]; + char readbuf[DENGONFILEENTRYSIZE*MESSAGEINONEWINDOW]; + + FILE *f; + int maxid, i, sendid, len; + char *writeptr, *readptr; + + + maxid = CHAR_getWorkInt( meindex, CHAR_WORKDENGONMAXID ); + if( id > maxid ) id = maxid; + sendid = id - MESSAGEINONEWINDOW + 1; + + if( sendid < maxid - DENGONFILELINENUM + 1 ){ + sendid = maxid - DENGONFILELINENUM + 1; + } + + if( sendid < 1 ) sendid = 1; + + snprintf( filename,sizeof(filename), "%s%d_%d_%d", + DENGONFILEDIR, CHAR_getInt( meindex, CHAR_FLOOR ), + CHAR_getInt( meindex, CHAR_X ), + CHAR_getInt( meindex, CHAR_Y ) ); + + writeptr = str; + strcpy( writeptr, " 传言板\n"); + len = strlen(writeptr); + writeptr += len; + + f = fopen( filename, "r" ); + if( !f ) return FALSE; +{ + char buf[DENGONFILEENTRYSIZE]; + int wptr = 0; + readbuf[0] = '\0'; + for( i = 0; i < MESSAGEINONEWINDOW; i ++ ) { + fseek( f, ((sendid+i)%DENGONFILELINENUM)*DENGONFILEENTRYSIZE, SEEK_SET ); + fread( buf, sizeof(char), + DENGONFILEENTRYSIZE , f ); + memcpy( &readbuf[wptr], buf,sizeof( buf)); + wptr += DENGONFILEENTRYSIZE; + } +} + fclose(f); + readptr = readbuf + DENGONFILECOUNTERSIZE; + for( i=0;i +#include + + +static int NPC_Door_isOpen( int meindex ); + +/* + * 玉失毛 蜇允月凶户及NPC卞 邰卅楮醒及烂聒[ + * 正奶皿 “ Door + * + * NPCARGUMENT及袄反} + * + * og|cg|idname|swcount|closetime_sec|soonflg0/1|passflg0/1/2 + * + * passflg 反}1分匀凶日天允歹□升勾五匹丐月啦 卞卅月[2分匀凶日 + * 濮覆夫日井卅中[ 0分匀凶日由旦伐□玉匹卅中[ + * + * 毛隙烂允月[ 引月引匹及凛棉反犯白巧伙玄匹反1凛棉[ + * 涩烂毛踏仁午五卞反 飓 寞互褐邰卅躲绊毛手勾井日镗啦互 邰匹丐月[ + * + * 愤坌及引歹曰卞C毛霜耨允月楮醒互丐月井日}1垫info, 飓 寞 + * 毛 凳仄化井日公及楮醒毛方屯壬弁仿奶失件玄及 卞 憎今木化中月 + * 橇谪互 蕙卞卅月[ + */ + +#define NPC_DOOR_OPENMSG "玉失互}夫日中凶!" +#define NPC_DOOR_CLOSEMSG "玉失毛}仄户凶!" +#define NPC_DOOR_CANTOPENMSG "井亢互丐歹卅中及匹}玉失毛夫日仁仇午互\ +匹五卅中!" + +#define ROPEGRAPHIC 9259 /* 蔷 卞丐月骚木卅中夫□皿 */ + +enum{ + NPC_DOOR_FLG_SOONCLOSE = 1, + NPC_DOOR_FLG_WATCHCLOSE = 2 +}; + + +/* + * 玉失日仄中涩烂毛允月卞反}仇仇匹 + * maxhp , maxmp , level , str , tough 毛0卞允月午方中[ + * + */ +BOOL NPC_DoorInit( int meindex ) +{ + char arg[NPC_UTIL_GETARGSTR_BUFSIZE]; + char settingdir[1024]; + char buf[256]; + + NPC_Util_GetArgStr( meindex, arg, sizeof( arg)); + CHAR_setWorkInt( meindex, CHAR_WORKEVENTTYPE,CHAR_EVENT_NPC); + + getStringFromIndexWithDelim(arg, "|" , 1 , buf,sizeof(buf) ); + CHAR_setWorkInt( meindex , CHAR_WORKDOOROPENG , atoi( buf )); + getStringFromIndexWithDelim(arg, "|" , 2 , buf,sizeof(buf) ); + CHAR_setWorkInt( meindex , CHAR_WORKDOORCLOSEG , atoi( buf )); + getStringFromIndexWithDelim(arg, "|" , 3 , buf,sizeof(buf) ); + CHAR_setWorkChar( meindex , CHAR_WORKDOORNAME , buf ); + strcpysafe( settingdir,sizeof( settingdir) , buf ); + getStringFromIndexWithDelim(arg, "|" , 4 , buf,sizeof(buf) ); + CHAR_setWorkInt( meindex , CHAR_WORKDOORSWITCHCOUNT , atoi( buf )); + getStringFromIndexWithDelim(arg, "|" , 5 , buf,sizeof(buf) ); + CHAR_setWorkInt( meindex , CHAR_WORKDOORCLOSETIME , atoi( buf )); + + CHAR_setInt( meindex , CHAR_MERCHANTLEVEL , atoi( buf )); + getStringFromIndexWithDelim(arg, "|" , 6 , buf,sizeof(buf) ); + CHAR_setWorkInt( meindex , CHAR_WORKDOORSOONFLG , atoi( buf )); + + getStringFromIndexWithDelim(arg, "|" , 7 , buf,sizeof(buf) ); + CHAR_setWorkInt( meindex , CHAR_WORKDOORPASSFLG , atoi( buf )); + CHAR_setWorkInt( meindex , CHAR_WORKDOORORIGINALGRAPHIC, + CHAR_getInt( meindex,CHAR_BASEIMAGENUMBER )); + CHAR_setInt( meindex, CHAR_LV, 0 ); + if( getStringFromIndexWithDelim( arg , "|" , 8 , buf ,sizeof( buf ))){ + if( strncmp( buf , "title" ,5 ) == 0 ){ + print( "This is a title door:'%s'\n" , buf ); + CHAR_setWorkInt( meindex , CHAR_WORKDOORPASSFLG ,0 ); + CHAR_setWorkChar( meindex , CHAR_WORKDOORTITLE , buf ); + CHAR_setInt( meindex, CHAR_LV, 1 ); + } else if( isdigit( buf[0] )){ + if( getStringFromIndexWithDelim(arg, "|" , 8 , buf,sizeof(buf) )) + CHAR_setWorkChar( meindex, CHAR_WORKDOORGOLDLIMIT, buf); + if( getStringFromIndexWithDelim(arg, "|" , 10 , buf,sizeof(buf) )) + CHAR_setWorkChar( meindex, CHAR_WORKDOORWEEK, buf); + if( getStringFromIndexWithDelim(arg, "|" , 11 , buf,sizeof(buf) )) + CHAR_setWorkChar( meindex, CHAR_WORKDOORHOUR, buf); + if( getStringFromIndexWithDelim(arg, "|" , 12 , buf,sizeof(buf) )) + CHAR_setWorkChar( meindex, CHAR_WORKDOORMINUTE, buf); + } + } + + CHAR_setInt( meindex , CHAR_HP , 0 ); + CHAR_setInt( meindex , CHAR_MP , 0 ); + CHAR_setInt( meindex , CHAR_MAXMP , 0 ); + CHAR_setInt( meindex , CHAR_STR , 0 ); + CHAR_setInt( meindex , CHAR_TOUGH, 0 ); + { + int g = CHAR_getWorkInt( meindex , CHAR_WORKDOOROPENG ); + if( g >= 11900 && g <= 11915 ){ + CHAR_setWorkInt( meindex , CHAR_WORKDOORKEYITEMID , 15 ); + } else if( g >= 11916 && g <= 11931 ){ + + CHAR_setWorkInt( meindex , CHAR_WORKDOORKEYITEMID , 16 ); + } else { + CHAR_setWorkInt( meindex , CHAR_WORKDOORKEYITEMID , -1 ); + } + if(CHAR_getWorkInt( meindex , CHAR_WORKDOORPASSFLG )==2){ + CHAR_setWorkInt( meindex , CHAR_WORKDOORKEYITEMID , -2 ); + } + if( CHAR_getInt( meindex , CHAR_BASEIMAGENUMBER ) == + ROPEGRAPHIC ){ + CHAR_setWorkInt( meindex , CHAR_WORKDOORKEYITEMID,-2 ); + } + } + + { + int closeg = CHAR_getWorkInt( meindex , CHAR_WORKDOORCLOSEG ); + int dir = -1; + switch( closeg ){ + case 11900: dir = 6; break; /* 霁及玉失 夫分曰仄凶 */ + case 11902: dir = 0; break; /* 夫分曰丹尹 */ + case 11904: dir = 2; break; /* 心亢丹尹 */ + case 11906: dir = 4; break; /* 心亢仄凶 */ + + case 11908: dir = 6; break; /* 赢中霁及玉失 夫分曰仄凶 */ + case 11910: dir = 0; break; /* 夫分曰丹尹 */ + case 11912: dir = 2; break; /* 心亢丹尹 */ + case 11914: dir = 4; break; /* 心亢仄凶 */ + + case 11916: dir = 6; break; /* 嗡及玉失 夫分曰仄凶 */ + case 11918: dir = 0; break; /* 夫分曰丹尹 */ + case 11920: dir = 2; break; /* 心亢丹尹 */ + case 11922: dir = 4; break; /* 心亢仄凶 */ + + case 11924: dir = 6; break; /* 赢中嗡及玉失 夫分曰仄凶 */ + case 11926: dir = 0; break; /* 夫分曰丹尹 */ + case 11928: dir = 2; break; /* 心亢丹尹 */ + case 11930: dir = 4; break; /* 心亢仄凶 */ + + case 11958: dir = 2; break; /* 赢中 及玉失 心亢丹尹 */ + case 11960: dir = 4; break; /* 心亢仄凶 */ + case 11962: dir = 6; break; /* 夫分曰仄凶 */ + case 11964: dir = 0; break; /* 夫分曰丹尹 */ + + case 11966: dir = 2; break; /* 及玉失 心亢丹尹 */ + case 11968: dir = 4; break; /* 心亢仄凶 */ + case 11970: dir = 6; break; /* 夫分曰仄凶 */ + case 11972: dir = 0; break; /* 夫分曰丹尹 */ + + case 11978: dir = 2; break; /* 赢中嗯及玉失 心亢丹尹 */ + case 11980: dir = 4; break; /* 心亢仄凶 */ + case 11982: dir = 6; break; /* 夫分曰仄凶 */ + case 11984: dir = 0; break; /* 夫分曰丹尹 */ + + case 11986: dir = 2; break; /* 嗯及玉失 心亢丹尹 */ + case 11988: dir = 4; break; /* 心亢仄凶 */ + case 11990: dir = 6; break; /* 夫分曰仄凶 */ + case 11992: dir = 0; break; /* 夫分曰丹尹 */ + + default: break; + } + if( dir >= 0 )CHAR_setInt(meindex,CHAR_DIR,dir); + } + + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPEDOOR ); + CHAR_setFlg( meindex , CHAR_ISATTACKED , 0 ); + CHAR_setInt( meindex , CHAR_WORKDOORSWITCHCURRENT , 0 ); + CHAR_setWorkInt( meindex, CHAR_WORKDOOREXPIRETIME, 0xffffffff); + if( CHAR_getWorkInt( meindex , CHAR_WORKDOORPASSFLG ) == 1){ + NPC_ROOMINFO roominfo; + if( NPC_RoomAdminNew_ReadFile( CHAR_getWorkChar( meindex, CHAR_WORKDOORNAME), &roominfo) == TRUE ){ + NPC_DoorSetPasswd( meindex, roominfo.passwd); + CHAR_setWorkInt( meindex, CHAR_WORKDOOREXPIRETIME, roominfo.expire); + }else { + NPC_DoorSetPasswd( meindex, "8hda8iauia90494jasd9asodfasdf89" ); + if( getStringFromIndexWithDelim(arg, "|" , 13 , buf,sizeof(buf) )) + if( strlen( buf) != 0 ) + NPC_DoorSetPasswd( meindex, buf ); + } + } + + CHAR_setInt( meindex, CHAR_BASEIMAGENUMBER , CHAR_getWorkInt(meindex, CHAR_WORKDOORCLOSEG)); + NPC_DoorRefreshOverFlg( meindex ); + CHAR_setWorkInt( meindex, CHAR_WORKEVENTTYPE, CHAR_EVENT_NPC); + return TRUE; +} +void NPC_DoorAddSwitchCounter( int meindex , int i , int doindex ) +{ + if( i != 0 && CHAR_getWorkInt( meindex, CHAR_WORKDOORSWITCHCOUNT) + != 0 ){ + CHAR_setWorkInt( meindex, CHAR_WORKDOORSWITCHCURRENT , + CHAR_getWorkInt(meindex, + CHAR_WORKDOORSWITCHCURRENT) + + i ); + if( CHAR_getWorkInt( meindex, CHAR_WORKDOORSWITCHCURRENT ) == + CHAR_getWorkInt( meindex, CHAR_WORKDOORSWITCHCOUNT) ){ + NPC_DoorOpen( meindex , doindex ); + } else { + NPC_DoorClose( meindex , doindex ); + } + } +} + +void NPC_DoorSetSwitchCounter( int meindex, int i , int doindex ) +{ + if( !CHAR_CHECKINDEX(meindex))return; + CHAR_setWorkInt( meindex , CHAR_WORKDOORSWITCHCURRENT , i ); + NPC_DoorAddSwitchCounter( meindex, 0 , doindex ); +} + +static int NPC_DoorSamePos( int meindex ){ + int iWork; + OBJECT object; + int floor = CHAR_getInt( meindex, CHAR_FLOOR ); + int x = CHAR_getInt( meindex, CHAR_X ); + int y = CHAR_getInt( meindex, CHAR_Y ); + + for( object=MAP_getTopObj( floor, x,y ); object ; object = NEXT_OBJECT(object) ){ + int objindex = GET_OBJINDEX(object); + if( OBJECT_getType(objindex) != OBJTYPE_CHARA )continue; + iWork = OBJECT_getIndex(objindex); + if( CHAR_getInt(iWork,CHAR_HP) < 0 )continue; + if( CHAR_getInt( iWork,CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ){ + return iWork; + } + } + return -1; +} + +void NPC_DoorWatch( int myobjindex, int moveobjindex, CHAR_ACTION act, + int x, int y, int dir, int* opt, int optlen ) +{ + unsigned long closetime; + int meindex, moveindex; + + if( OBJECT_getType( moveobjindex) != OBJTYPE_CHARA ) { + return; + } + meindex = OBJECT_getIndex(myobjindex); + moveindex = OBJECT_getIndex(moveobjindex); + if( NPC_Door_isOpen( meindex ) == 0 )return; + if( CHAR_getInt( moveindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ){ + return; + } + if( CHAR_getWorkInt( meindex , CHAR_WORKDOORSOONFLG )){ + if( CHAR_getInt( meindex , CHAR_TALKCOUNT ) > 0 ){ + if( NPC_DoorSamePos( meindex ) == -1 ){ + NPC_DoorClose(meindex , -1 ); + CHAR_setInt( meindex , CHAR_TALKCOUNT, 0 ); + } + } + }else + if( CHAR_getInt( meindex, CHAR_MERCHANTLEVEL ) >= 0 ){ + closetime = (unsigned long )CHAR_getWorkInt( meindex , CHAR_WORKDOORCLOSETIME ); + if( (unsigned long) NowTime.tv_sec > (unsigned long) closetime ){ + NPC_DoorClose(meindex , -1 ); + } + } +} + + +#if 1 +void NPC_DoorOff( int meindex , int movedindex ) +{ + if( CHAR_getWorkInt( meindex , CHAR_WORKDOORSOONFLG )){ + NPC_DoorClose(meindex , -1 ); + } else { + } +} +#endif + +void NPC_DoorPostOver( int meindex , int movedindex ) +{ + if( CHAR_getWorkInt( meindex , CHAR_WORKDOORSOONFLG )){ + CHAR_setInt( meindex , CHAR_TALKCOUNT, 1 ); + CHAR_setFlg( meindex , CHAR_ISOVERED , 0 ); /* 骚木卅仁允月 */ + } +} + +void NPC_DoorLooked( int meindex , int lookedindex ) +{ + int needkey; + + if( CHAR_getInt( meindex , CHAR_LV )){ + char token[32]; + char *p = CHAR_getWorkChar( meindex , CHAR_WORKDOORTITLE ); + int i,j,ok=FALSE; + for(i = 0 ; ; i++ ){ + int r; + r = getStringFromIndexWithDelim( p,":",2+i,token ,sizeof(token)); + if(r){ + int titleind = atoi( token ); + for(j=0;j=1 ){ + if( NPC_Door_isOpen( meindex ) ){ + NPC_DoorFlip( meindex , lookedindex ); + return; + } +#define NPC_DOOR_EXPIRE_MSG "%s 的房间有效期限至 %d/%d %d:%d" + else { + if( CHAR_getWorkInt( meindex, CHAR_WORKDOOREXPIRETIME) + != 0xffffffff ){ + struct tm tmwk; + time_t expire = CHAR_getWorkInt( meindex, CHAR_WORKDOOREXPIRETIME); + char msgbuf[128]; + + NPC_ROOMINFO roominfo; + /* 由旦午 躲渝蜃毛本永玄允月 */ + NPC_RoomAdminNew_ReadFile( + CHAR_getWorkChar( meindex, CHAR_WORKDOORNAME), + &roominfo); + memcpy( &tmwk, localtime( &expire), sizeof( tmwk)); + snprintf( msgbuf, sizeof( msgbuf), NPC_DOOR_EXPIRE_MSG, + roominfo.charaname, + tmwk.tm_mon+1, tmwk.tm_mday, + tmwk.tm_hour, tmwk.tm_min); + CHAR_talkToCli( lookedindex, meindex, msgbuf, CHAR_COLORWHITE); + } + } + #undef NPC_DOOR_EXPIRE_MSG + return; + } + needkey = CHAR_getWorkInt( meindex , CHAR_WORKDOORKEYITEMID ); + if( needkey >= 0 ){ + if( NPC_Util_countHaveItem( lookedindex , needkey ) > 0 ){ + NPC_DoorFlip( meindex , lookedindex); + } else { + CHAR_talkToCli( lookedindex , -1 , NPC_DOOR_CANTOPENMSG , CHAR_COLORWHITE ); + } + } else if( needkey == -1 ){ + NPC_DoorFlip(meindex , lookedindex ); + } else { + CHAR_talkToCli( lookedindex , -1 , "这扇门似乎怎麽也打不开!" , CHAR_COLORWHITE); + } +} +void NPC_DoorTalked( int meindex , int talkerindex , char *msg , int color ) +{ + char *m = CHAR_getWorkChar( meindex , CHAR_WORKDOORPASSWD ); + if(NPC_Util_CharDistance( talkerindex, meindex ) > 1)return; + if( CHAR_getWorkInt( meindex , CHAR_WORKDOORPASSFLG ) != 1 ){ + return; + } + if( CHAR_getWorkInt( meindex , CHAR_WORKDOORPASSFLG ) >= 1 && + ((unsigned long)NowTime.tv_sec) > (unsigned long) + CHAR_getWorkInt( meindex , CHAR_WORKDOOREXPIRETIME )){ + print( "RINGO: passdoor expired ( talked )\n" ); + return; + } + if( m[0] == '\0' )return; + cutDotsTail( msg ); + if( strcmp( m , msg ) == 0 ){ + NPC_DoorFlip( meindex , talkerindex ); + }else { + CHAR_talkToCli( talkerindex , -1 , "密码不正确啦!", CHAR_COLORWHITE ); + } +} + +int NPC_DoorSearchByName( char *name ) +{ + int i; + int charnum = CHAR_getCharNum(); + + for(i= CHAR_getPlayerMaxNum() + CHAR_getPetMaxNum(); + i= 0 ) CHAR_talkToCli( doindex , -1 , NPC_DOOR_CLOSEMSG, CHAR_COLORWHITE ); + CHAR_setInt( meindex , CHAR_TALKCOUNT, 0 ); +} +void NPC_DoorOpen(int meindex , int doindex ) +{ + CHAR_setWorkInt( meindex , CHAR_WORKDOORCLOSETIME, + NowTime.tv_sec + + CHAR_getInt( meindex , CHAR_MERCHANTLEVEL)); + CHAR_setInt( meindex , CHAR_BASEIMAGENUMBER , + CHAR_getWorkInt( meindex,CHAR_WORKDOOROPENG )); + NPC_DoorRefreshOverFlg( meindex ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( meindex, + CHAR_WORKOBJINDEX )); + if( doindex >= 0 ) + CHAR_talkToCli( doindex , -1, NPC_DOOR_OPENMSG ,CHAR_COLORWHITE); +} + +static int NPC_Door_isOpen( int meindex ) +{ + int now_g = CHAR_getInt( meindex , CHAR_BASEIMAGENUMBER ); + int open_g = CHAR_getWorkInt( meindex ,CHAR_WORKDOOROPENG ); + if( now_g == open_g ) return 1; else return 0; +} + +BOOL NPC_DoorRefreshOverFlg( int meind ) +{ + if( !CHAR_CHECKINDEX(meind))return FALSE; + if( NPC_Door_isOpen( meind ) ==1 ){ + CHAR_setFlg( meind , CHAR_ISOVERED , 1 ); + } else { + CHAR_setFlg( meind , CHAR_ISOVERED , 0 ); + } + return TRUE; +} + +BOOL NPC_DoorSetRopeFlag(int fl,int x,int y, int flag ) +{ + int ind = NPC_DoorSearchByPosition( fl,x,y ); + if( ind < 0 ) return FALSE; + if( flag ){ + CHAR_setInt( ind , CHAR_BASEIMAGENUMBER , ROPEGRAPHIC ); + } else { + CHAR_setInt(ind , CHAR_BASEIMAGENUMBER , 0 ); + } + NPC_DoorRefreshOverFlg( ind ); + CHAR_sendCToArroundCharacter( + CHAR_getWorkInt( ind , CHAR_WORKOBJINDEX )); + + return TRUE; +} + diff --git a/gmsv/npc/npc_doorman.c b/gmsv/npc/npc_doorman.c new file mode 100644 index 0000000..c02433a --- /dev/null +++ b/gmsv/npc/npc_doorman.c @@ -0,0 +1,215 @@ +#include "version.h" +#include +#include "object.h" +#include "char_base.h" +#include "char.h" +#include "item.h" +#include "util.h" +#include "handletime.h" +#include "npc_doorman.h" +#include "npc_door.h" +#include "npcutil.h" +#include "configfile.h" +/* + * + * 曰卞玉失互丐月午五卞公及玉失毛窒日井及椭瘀卞方匀化钒仁NPC. + * 玉失及午卅曰卞create允月分仃匹}公及玉失毛丑综今六月仇午互匹五月[ + * 反卅仄井仃日木凶午五卞蝈平乓仿毛腹绸仄化}引歹曰8穴旦卞玉失互中月 + * 桦宁反公及允屯化卞覆仄化排黍允月[孔凶勾及玉失互 凛卞钒仁仇午卞卅月[ + * + * 奶件正□白尼奶旦反Talk匹 + * + * 玉失毛钒仁凶户卞 + * + * 1 云嗯毛蔼璋允月[蔼璋匹五凶日夫日仁 gold|100 + * 2 失奶 丞毛1蜊蔼璋允月 [蔼璋匹五凶日夫日仁 item|45 + * 3 失奶 丞毛 匀化中月井升丹井譬屯月[ 匀化中凶日钒仁[itemhave|44 + * 4 失奶 丞毛 匀化中卅中井升丹井譬屯月[ 匀化中卅井匀凶日钒仁[ + * itemnothave|333 + * 5 惫寞毛手匀化中月井升丹井譬屯月[ 匀化中凶日钒仁[ titlehave|string + * 6 惫寞毛手匀化中卅中井升丹井譬屯月[ 匀化中卅井匀凶日钒仁[ + * titlenothave|string + * + * 井卅日内撙 卞蚕尹月午钒仁[嗯及桦宁反} + *>100打□伙玉中凶分五引允互中中匹允井"=匹>反中=午中丹午100打□伙玉 + * 午日木月[中五卅曰>反中=分仃蜕匀化手午日木月[匹}>100打□伙玉 + * 中凶分五引仄凶[=午蜕歹木月[ + * + * 失奶 丞蔼璋及桦宁反}>窒★毛域蜊中凶分五引允互中中匹允井"=午五仁[ + * 3井日6及桦宁反}窒井反卅仄井仃化椭瘀互公欠匀化凶日钒仁[ + * + * + * + * 旦玄及 芊 + * + *1 玉失毛化五午丹卞 仁 + *2 仇及NPC毛赝癫卞玉失及午卅曰卞 仁[娄醒毛 gold|100 卞允月 + *3 仇及NPC卞覆仄化}100打□伙玉动晓手匀化中月橇谪匹>反中=午蜕丹 + *4 玉失互夫日中化嗯互蛹匀凶日岳 [ + * + */ + +static void NPC_DoormanOpenDoor( char *nm ); + +BOOL NPC_DoormanInit( int meindex ) +{ + char arg[NPC_UTIL_GETARGSTR_BUFSIZE]; + char dname[1024]; + + /* 奶矛件玄及正奶皿涩烂 */ + CHAR_setWorkInt( meindex, CHAR_WORKEVENTTYPE,CHAR_EVENT_NPC); + + CHAR_setInt( meindex , CHAR_HP , 0 ); + CHAR_setInt( meindex , CHAR_MP , 0 ); + CHAR_setInt( meindex , CHAR_MAXMP , 0 ); + CHAR_setInt( meindex , CHAR_STR , 0 ); + CHAR_setInt( meindex , CHAR_TOUGH, 0 ); + CHAR_setInt( meindex , CHAR_LV , 0 ); + + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPETOWNPEOPLE ); + CHAR_setFlg( meindex , CHAR_ISOVERED , 0 ); + CHAR_setFlg( meindex , CHAR_ISATTACKED , 0 ); /* 猾今木卅中方氏 */ + + NPC_Util_GetArgStr( meindex, arg, sizeof( arg)); + + if(!getStringFromIndexWithDelim( arg, "|", 3, dname, sizeof(dname ))){ + print("RINGO: 设定看门者时需要门的名字唷!:%s:\n", + arg ); + return FALSE; + } + print( "RINGO: Doorman create: arg: %s dname: %s\n",arg,dname); + CHAR_setWorkChar( meindex , CHAR_WORKDOORMANDOORNAME , dname ); + + return TRUE; +} + +void NPC_DoormanTalked( int meindex , int talkerindex , char *msg , + int color ) +{ + char mode[128]; + char opt[256]; + char arg[NPC_UTIL_GETARGSTR_BUFSIZE]; + + /* 皿伊奶乩□互玉失穴件及1弘伉永玉动 卅日反氏及丹 */ + if(NPC_Util_CharDistance( talkerindex, meindex ) > 1)return; + + NPC_Util_GetArgStr( meindex, arg, sizeof( arg)); + + if( !getStringFromIndexWithDelim( arg, "|", 1, mode, sizeof( mode ))) + return; + + if( !getStringFromIndexWithDelim( arg, "|", 2, opt, sizeof( opt ) )) + return; + + if( strcmp( mode , "gold" ) == 0 ){ + int g = atoi( opt ); + int yn = NPC_Util_YN( msg ); + /*char *nm = CHAR_getChar( meindex , CHAR_NAME );*/ + char msg[256]; + + if( g > 0 && yn < 0 ){ + snprintf( msg ,sizeof( msg ) , + "打开门需要给我%d的金子这样可以吗?", g ); + CHAR_talkToCli( talkerindex, meindex , msg, CHAR_COLORWHITE ); + } else if( g > 0 && yn == 0 ){ + snprintf( msg , sizeof( msg ), + "打开门 %d的金子是必要的。", g ); + } else if( g > 0 && yn == 1 ){ + int now_g = CHAR_getInt( talkerindex, CHAR_GOLD ); + if( now_g < g ){ + snprintf( msg , sizeof( msg ) , + "打开门 %d的金子是必要的。", g ); + CHAR_talkToCli( talkerindex, meindex , msg, CHAR_COLORWHITE ); + } else { + snprintf( msg , sizeof( msg ), + "%d 收到金子了。现在就来开门。", g ); + CHAR_talkToCli( talkerindex, meindex , msg, CHAR_COLORWHITE ); + + /* 云嗯毛必永玄 */ + now_g -= g; + CHAR_setInt( talkerindex , CHAR_GOLD , now_g ); + /* 丐凶日仄中旦 □正旦毛霜耨 */ + CHAR_send_P_StatusString(talkerindex, CHAR_P_STRING_GOLD); + + /* 玉失夫日仁 */ + NPC_DoormanOpenDoor( + CHAR_getWorkChar( meindex, CHAR_WORKDOORMANDOORNAME)); + } + } + } else if( strcmp( mode , "item" ) == 0 ){ + CHAR_talkToCli( talkerindex, meindex , + "尚在未支援模式。", + CHAR_COLORWHITE); + } else if( strcmp( mode , "itemhave" ) == 0 ){ + CHAR_talkToCli( talkerindex, meindex , + "尚在未支援模式。", + CHAR_COLORWHITE); + } else if( strcmp( mode , "itemnothave" ) == 0 ){ + CHAR_talkToCli( talkerindex, meindex , + "尚在未支援模式。", + CHAR_COLORWHITE); + } else if( strcmp( mode , "titlehave" ) == 0 ){ + CHAR_talkToCli( talkerindex, meindex , + "尚在未支援模式。", + CHAR_COLORWHITE); + + } else if( strcmp( mode , "roomlimit" ) == 0 ){ + + /* 盒及谛醒孺蜃互丐月桦宁 */ + char szOk[256], szNg[256], szBuf[32]; + int checkfloor; + int maxnum, i, iNum; + + if( !getStringFromIndexWithDelim( arg, "|", 2, szBuf, sizeof( szBuf ) )) + return; + + /* 譬屯月白夫失午 谛醒 */ + if( sscanf( szBuf, "%d:%d", &checkfloor, &maxnum ) != 2 ){ + return; + } + + for( iNum = 0,i = 0; i < getFdnum(); i ++ ){ + /* 皿伊奶乩□动陆卞反饬 互 中 */ + if( CHAR_getCharUse( i ) == FALSE )continue; + if( CHAR_getInt( i, CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER )continue; + /* 隙烂及白夫失动陆卞饬 互 中 */ + if( CHAR_getInt( i, CHAR_FLOOR ) != checkfloor )continue; + iNum++; + } + if( !getStringFromIndexWithDelim( arg, "|", 5, szNg, sizeof( szNg ))){ + strcpy( szNg, "。。。。" ); /* 凤伞卅仄及本伉白 */ + } + if( !getStringFromIndexWithDelim( arg, "|", 4, szOk, sizeof( szOk ))){ + strcpy( szOk, "开门吧。。。" ); /* 凤伞丐曰及本伉白 */ + } + + if( iNum >= maxnum ){ + /* 毛译尹化中月桦宁 */ + CHAR_talkToCli( talkerindex, meindex ,szNg, CHAR_COLORWHITE); + }else{ + /* 卞 凶卅中桦宁 */ + CHAR_talkToCli( talkerindex, meindex ,szOk, CHAR_COLORWHITE); + NPC_DoormanOpenDoor( + CHAR_getWorkChar( meindex, CHAR_WORKDOORMANDOORNAME)); + } + + } else if( strcmp( mode , "titlenothave" ) == 0 ){ + CHAR_talkToCli( talkerindex, meindex , + "尚在未支援模式。", + CHAR_COLORWHITE); + } +} + +/* + * 蟆匹腹绸仄化甲永玄仄凶及毛允屯化钒仁[ + * + */ +static void NPC_DoormanOpenDoor( char *nm) +{ + int doori = NPC_DoorSearchByName( nm ); + print( "RINGO: Doorman's Door: index: %d\n", doori ); + + NPC_DoorOpen( doori , -1 ); + +} + diff --git a/gmsv/npc/npc_duelranking.c b/gmsv/npc/npc_duelranking.c new file mode 100644 index 0000000..31d0ae2 --- /dev/null +++ b/gmsv/npc/npc_duelranking.c @@ -0,0 +1,895 @@ +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "net.h" +#include "lssproto_serv.h" +#include "saacproto_cli.h" +#include "npc_duelranking.h" +#include "handletime.h" + +#ifdef _DEATH_CONTEND +#include "deathcontend.h" +#endif + +#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令 +#include "family.h" +#endif + +static void NPC_Duelranking_selectWindow( int meindex, int toindex, int num, int select ); +#define NPC_DUELRANKING_WINDOWLINENUM 10 + +#ifdef _DEATH_FAMILYCONTEND +BOOL NPC_ReadFamilyPK_List( void); +BOOL NPC_BackupFamilyPK_List( void); +BOOL NPC_getFamilyPK_List( int ti, char *buf, int sizes); +BOOL NPC_CheckJoin_FamilyPK_List( int meindex, int toindex); +#endif + +enum{ + WINDOWTYPE_PKLIST_START=10, + WINDOWTYPE_PKLIST_SELECT, + WINDOWTYPE_PKLIST_SELECT1, + WINDOWTYPE_PKLIST_SELECT2, + + WINDOWTYPE_FAMILYCONTENDSTART, + WINDOWTYPE_FAMILYCONTENDSELECT, + WINDOWTYPE_FAMILYCONTENDLIST, + WINDOWTYPE_FAMILYCONTENDJOIN, + + NPC_WORK_CURRENTTIME = CHAR_NPCWORKINT1, + NPC_WORK_BATTLELOOP = CHAR_NPCWORKINT2, +}; + +BOOL NPC_DuelrankingInit( int meindex ) +{ +#ifdef _DEATH_CONTEND + char buf1[256]; + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + + CHAR_setWorkInt( meindex, NPC_WORK_BATTLELOOP, 0); + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTTIME, NowTime.tv_sec); + + if( NPC_Util_GetArgStr( meindex, npcarg, sizeof( npcarg) ) != NULL && + NPC_Util_GetStrFromStrWithDelim( npcarg, "PKLoop", buf1, sizeof( buf1)) != NULL ){ + CHAR_setInt( meindex, CHAR_LOOPINTERVAL, atoi(buf1)); + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "PKLType", buf1, sizeof( buf1)) != NULL ){ + CHAR_setWorkInt( meindex, NPC_WORK_BATTLELOOP, atoi( buf1)); + } + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "PKLDelay", buf1, sizeof( buf1)) != NULL ){ + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTTIME, NowTime.tv_sec + (atoi( buf1)*60) ); + } + } +#endif + +#ifdef _DEATH_FAMILYCONTEND + { + char buf1[256]; + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + CHAR_setWorkInt( meindex, NPC_WORK_BATTLELOOP, 0); + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTTIME, NowTime.tv_sec); + if( NPC_Util_GetArgStr( meindex, npcarg, sizeof( npcarg) ) != NULL && + NPC_Util_GetStrFromStrWithDelim( npcarg, "LoadFMList", buf1, sizeof( buf1)) != NULL ){ + if( strstr( buf1, "ON") != NULL ) + NPC_ReadFamilyPK_List(); + } + } +#endif + + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPEDUELRANKING ); + return TRUE; +} + +void NPC_DuelrankingLooked( int meindex , int lookedindex) +{ + +#ifdef _DEATH_FAMILYCONTEND + char buf1[256]; + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + + if( NPC_Util_GetArgStr( meindex, npcarg, sizeof( npcarg) ) != NULL && + NPC_Util_GetStrFromStrWithDelim( npcarg, "FmPkJoin", buf1, sizeof( buf1)) != NULL ){ + + if( strstr( buf1, "ON") !=NULL ){ + CHAR_setWorkInt( lookedindex, CHAR_WORKSHOPRELEVANT, 0); + NPC_Duelranking_selectWindow( meindex, lookedindex, 2, -1); + return; + }else{ + return; + } + } +#endif + +#ifdef _DEATH_CONTEND + char buf1[256]; + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + //static int first = 1; + if( NPC_Util_GetArgStr( meindex, npcarg, sizeof( npcarg) ) != NULL && + NPC_Util_GetStrFromStrWithDelim( npcarg, "PKCharts", buf1, sizeof( buf1)) != NULL ){ + if( strstr( buf1, "ON") !=NULL ){ + CHAR_setWorkInt( lookedindex, CHAR_WORKSHOPRELEVANT, 0); + NPC_Duelranking_selectWindow( meindex, lookedindex, 2, -1); + //if( first == 1 ) saacproto_PKLISTCHARTS_send( acfd, 2, 1); + //first = 0; + return; + }else{ + return; + } + } +#endif + +#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令 + NPC_Duelranking_selectWindow( meindex, lookedindex, 2, -1); +#endif + + NPC_Duelranking_selectWindow( meindex, lookedindex, 1, -1); +} + +static void NPC_Duelranking_selectWindow( int meindex, int toindex, int num, int select) +{ + + int fd; + int button; + if( CHAR_getInt( toindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) { + return; + } + if( NPC_Util_CharDistance( toindex, meindex ) > 1) return; + if( (fd = getfdFromCharaIndex( toindex)) == -1 ) return; + + switch( num){ + case 1: + { + char message[1024]; + char buf[2048]; + strcpy( message, + "1\n" + " 要看哪一个? \n\n\n" + " <强者们> \n\n" + " < 自己 > \n\n" + " <都不看> \n\n" ); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_SELECT, + WINDOW_BUTTONTYPE_NONE, + CHAR_WINDOWTYPE_DUELRANKING_START, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + makeEscapeString( message, buf, sizeof(buf))); + } + break; +#ifdef _DEATH_CONTEND + case 2: + { + char message[1024]; + char buf[2048]; + strcpy( message, + "1\n" + " 要看哪一个? \n\n" +// " <资格赛排行> \n" + " < 正式赛程表 > \n" + " < 队伍资料 > \n" +// " < 参加赛程 > \n" + " < 赛程纪录 > \n" ); + + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_SELECT, + WINDOW_BUTTONTYPE_CANCEL, + WINDOWTYPE_PKLIST_START, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + makeEscapeString( message, buf, sizeof(buf))); + } + break; +/* case 3: + { + char token[4096], buf[256], buf1[256],buf2[256]; + char teamname[256]; + int win, lose, battle, score; + int page, i, pagecount=10; + page = CHAR_getWorkInt( toindex, CHAR_WORKSHOPRELEVANT); + button = WINDOW_BUTTONTYPE_OK | WINDOW_BUTTONTYPE_PREV | WINDOW_BUTTONTYPE_NEXT; + + if( select == WINDOW_BUTTONTYPE_PREV || select == WINDOW_BUTTONTYPE_NEXT) { + if( select == WINDOW_BUTTONTYPE_NEXT ){ + if( page < 40 ) page++; + }else if( select == WINDOW_BUTTONTYPE_PREV ){ + if( page > 0 ) page--; + } + }else if( select == WINDOW_BUTTONTYPE_OK ){ + CHAR_setWorkInt( toindex, CHAR_WORKSHOPRELEVANT, 0); + return; + } + if( page < 0 || page >= 40 ) page = 0; + if( page == 0 ) button = WINDOW_BUTTONTYPE_OK | WINDOW_BUTTONTYPE_NEXT; + if( page == 39 ) button = WINDOW_BUTTONTYPE_OK | WINDOW_BUTTONTYPE_PREV; + CHAR_setWorkInt( toindex, CHAR_WORKSHOPRELEVANT, page); + snprintf( token, sizeof( token), + " 资格赛排行榜\n\n" + "排名 队伍 胜 负 场 积分\n\n" ); + + for( i=0; i= 30 && score > 0 ) strcpy( buf2, "★"); + sprintf( buf1, "%4dth %-18s %3d %3d %3d %3d %s\n", (page*pagecount)+1+i, + teamname, win, lose, battle, score, buf2); + + strcat( token, buf1); + } + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_WIDEMESSAGEANDLINEINPUT, + button, WINDOWTYPE_PKLIST_SELECT, CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token ); + } + break; +*/ + case 5://晋级队伍 + case 3://正式赛程 + { + char token[4096], buf1[256]; + char teamname1[256], teamname2[256], typestring[256]; + int tindex, dtimes, stimes=0; + int page, i, pagecount=10; + int winno = WINDOWTYPE_PKLIST_SELECT; + + page = CHAR_getWorkInt( toindex, CHAR_WORKSHOPRELEVANT); + button = WINDOW_BUTTONTYPE_OK | WINDOW_BUTTONTYPE_PREV | WINDOW_BUTTONTYPE_NEXT; + + if( select == WINDOW_BUTTONTYPE_PREV || select == WINDOW_BUTTONTYPE_NEXT) { + if( select == WINDOW_BUTTONTYPE_NEXT ){ + if( page < 11 ) page++; + }else if( select == WINDOW_BUTTONTYPE_PREV ){ + if( page > 0 ) page--; + } + }else if( select == WINDOW_BUTTONTYPE_OK ){ + CHAR_setWorkInt( toindex, CHAR_WORKSHOPRELEVANT, 0); + return; + } + if( page < 0 || page >= 11 ) page = 0; + if( page == 0 ) button = WINDOW_BUTTONTYPE_OK | WINDOW_BUTTONTYPE_NEXT; + if( page == 10 ) button = WINDOW_BUTTONTYPE_OK | WINDOW_BUTTONTYPE_PREV; + CHAR_setWorkInt( toindex, CHAR_WORKSHOPRELEVANT, page); + + switch( num){ + case 3: + snprintf( token, sizeof( token), + " 赛程表\n\n" + "场次 队伍 剩馀时间 状态\n\n" ); + break; + case 5: + snprintf( token, sizeof( token), " 队伍名单&赛程纪录\n\n" + "纪录 \n\n" ); + winno = WINDOWTYPE_PKLIST_SELECT2; + break; + } + + for( i=0; i 0 ) page--; + } + }else if( select == WINDOW_BUTTONTYPE_OK ){ + CHAR_setWorkInt( toindex, CHAR_WORKSHOPRELEVANT, 0); + return; + } + if( page < 0 || page >= 4 ) page = 0; + if( page == 0 ) button = WINDOW_BUTTONTYPE_OK | WINDOW_BUTTONTYPE_NEXT; + if( page == 3 ) button = WINDOW_BUTTONTYPE_OK | WINDOW_BUTTONTYPE_PREV; + + CHAR_setWorkInt( toindex, CHAR_WORKSHOPRELEVANT, page); + snprintf( token, sizeof( token), + " 跨星系家族赛资格排行榜\n\n" + "排名 家族名称 家族族长名称\n\n" ); + for( i=0; i 0 ) page--; + } + }else if( select == WINDOW_BUTTONTYPE_OK ){ + CHAR_setWorkInt( toindex, CHAR_WORKSHOPRELEVANT, 0); + return; + } + if( page < 0 || page >= 40 ) page = 0; + if( page == 0 ) button = WINDOW_BUTTONTYPE_OK | WINDOW_BUTTONTYPE_NEXT; + if( page == 39 ) button = WINDOW_BUTTONTYPE_OK | WINDOW_BUTTONTYPE_PREV; + CHAR_setWorkInt( toindex, CHAR_WORKSHOPRELEVANT, page); + snprintf( token, sizeof( token), + " 跨星系家族战排行榜\n\n" ); + + + for( i=0; i<40*10; i++){ + memset( all_msg[i] , 0, sizeof( all_msg[i])); + } + + if( (fp = fopen( "d_fm_pk_log.txt", "r" )) != NULL ){ + i=0; + //andy_log + print( "read d_fm_pk_log.txt !!\n"); + while( fgets( buf1, sizeof( buf1)-1, fp) ){ + //andy_log + print( "read buf1:%s !!\n", buf1); + if( buf1[0] == 0 || buf1[0] == '#' ||strlen(buf1) <= 0 ) continue; + buf1[ strlen(buf1) -1] = 0; + snprintf( all_msg[i], sizeof( all_msg[i]), "%s", buf1); + i++; + } + fclose( fp ); + }else{ + //andy_log + print( "Can't read d_fm_pk_log.txt !!\n"); + } + + for( i=0; i 1) return; + switch( seqno){ + case CHAR_WINDOWTYPE_DUELRANKING_START: + if( atoi( data) == 3 ) { + saacproto_DBGetEntryByCount_send( acfd, + DB_DUELPOINT, 0, + NPC_DUELRANKING_WINDOWLINENUM, fdid, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX)); + } + if( atoi( data) == 5 ) { + char dbkey[256]; + CHAR_makeDBKey( talkerindex, dbkey, sizeof( dbkey)); + saacproto_DBGetEntryRank_send( acfd, DB_DUELPOINT, dbkey, fdid, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX)); + } + break; + case CHAR_WINDOWTYPE_DUELRANKING_TOPRANKING: + if( select == WINDOW_BUTTONTYPE_PREV || select == WINDOW_BUTTONTYPE_NEXT) { + int count = CHAR_getWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT); + if( select == WINDOW_BUTTONTYPE_NEXT ) { + count += NPC_DUELRANKING_WINDOWLINENUM; + }else { + count -= NPC_DUELRANKING_WINDOWLINENUM; + } + + if( count < 0) count = 0; + saacproto_DBGetEntryByCount_send( acfd, + DB_DUELPOINT, + count, + NPC_DUELRANKING_WINDOWLINENUM, fdid, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX)); + }else if( select == WINDOW_BUTTONTYPE_OK ) { + if( strlen( data) != 0 ) { + int count; + count = atoi( data); + if( count < 1 ) count = 1; + saacproto_DBGetEntryByCount_send( acfd, + DB_DUELPOINT, + count-1, + NPC_DUELRANKING_WINDOWLINENUM, fdid, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX)); + } + } + break; +#ifdef _DEATH_CONTEND + case WINDOWTYPE_PKLIST_START: + { + switch( atoi( data)){ + case 2://资格赛排行 + NPC_Duelranking_selectWindow( meindex, talkerindex, 3, select); + break; + case 3://正式赛程 + NPC_Duelranking_selectWindow( meindex, talkerindex, 4, select); + break; + case 4://队伍资料 + NPC_Duelranking_selectWindow( meindex, talkerindex, 5, select); + break; + case 5://加入赛程 + NPC_Duelranking_selectWindow( meindex, talkerindex, 6, -1); + break; + case 6://晋级队伍 + NPC_Duelranking_selectWindow( meindex, talkerindex, 7, select); + break; + } + } + break; + case WINDOWTYPE_PKLIST_SELECT: + NPC_Duelranking_selectWindow( meindex, talkerindex, 3, select); + break; + case WINDOWTYPE_PKLIST_SELECT1: + NPC_Duelranking_selectWindow( meindex, talkerindex, 4, select); + break; + case WINDOWTYPE_PKLIST_SELECT2: + NPC_Duelranking_selectWindow( meindex, talkerindex, 5, select); + break; +#endif +#ifdef _DEATH_FAMILYCONTEND + case WINDOWTYPE_FAMILYCONTENDSTART: + { + switch( atoi( data)){ + case 2://资格排行 + NPC_Duelranking_selectWindow( meindex, talkerindex, 3, select); + break; + case 3://报名 + NPC_Duelranking_selectWindow( meindex, talkerindex, 4, select); + break; + } + } + break; + case WINDOWTYPE_FAMILYCONTENDSELECT: + NPC_Duelranking_selectWindow( meindex, talkerindex, 3, select); + break; +#endif + +#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令 + case WINDOWTYPE_PKLIST_START: + { + switch( atoi( data ) ){ + case 2: + NPC_Duelranking_selectWindow( meindex, talkerindex, 3, select); + break; + } + } + break; + case WINDOWTYPE_PKLIST_SELECT1: + NPC_Duelranking_selectWindow( meindex, talkerindex, 3, select); + break; +#endif + + + } +} + +void NPC_Duelranking_PrintRanking( char *data, int count_start, int fdid, int msgid2) +{ + char message[1024]; + char buf[2048]; + int i; + int cnt = 0; + int button = 0; + int fd = getfdFromFdid( fdid); + if( fd == -1 ) return; + message[0] = '\0'; + snprintf( message, sizeof( message), + " 世界的强者们\n\n" + " Rank DuelPoint Lv Name\n\n" ); + for( i = 1; ; i ++ ) { + char rankdata[256]; + char cdandname[64]; + char charaname[32]; + char rank[16]; + char score[64]; + char msgbuf[512]; + char cdkey[32]; + char lv[16]; + char hosi[6]; + + if( !getStringFromIndexWithDelim( data, "|", i, rankdata, sizeof( rankdata))) { + break; + } + if( !getStringFromIndexWithDelim( rankdata, ",", 2, rank, sizeof( rank)) ){ + continue; + } + if( !getStringFromIndexWithDelim( rankdata, ",", 3, cdandname, sizeof( cdandname)) ){ continue; + } + makeStringFromEscaped( cdandname); + if( !getStringFromIndexWithDelim( cdandname, "_", 1, cdkey, sizeof( cdkey)) ){ + continue; + } + if( !getStringFromIndexWithDelim( cdandname, "_", 2, charaname, sizeof( charaname)) ){ + continue; + } + if( !getStringFromIndexWithDelim( rankdata, ",", 4, score, sizeof( score)) ){ + continue; + } + if( !getStringFromIndexWithDelim( rankdata, ",", 5, lv, sizeof( lv)) ){ + lv[0] = '\0'; + } + { + char *mycdkey = CHAR_getChar( CONNECT_getCharaindex(fd), CHAR_CDKEY); + char *myname = CHAR_getChar( CONNECT_getCharaindex(fd), CHAR_NAME); + char engnum[4][3] = { "st","nd","rd","th"}; + int dsprank = atoi(rank); + if( dsprank > 3) dsprank = 3; + if( mycdkey != NULL && myname != NULL && strcmp( cdkey, mycdkey) == 0 && + strcmp( charaname, myname) == 0 ) { + strcpy( hosi, "★"); + }else { + strcpy( hosi, " "); + } + snprintf( msgbuf, sizeof( msgbuf), "%s %5d%s %10s %3s %s\n", + hosi, + atoi(rank)+1, engnum[dsprank], + score, lv, + charaname ); + } + strcatsafe( message, sizeof( message), msgbuf); + cnt ++; + } + if( cnt == 0 ) { + strcpy( message, "\n 没有其他的资料了。"); + button = WINDOW_BUTTONTYPE_PREV|WINDOW_BUTTONTYPE_OK; + }else if( cnt < NPC_DUELRANKING_WINDOWLINENUM ) { + if( count_start >= NPC_DUELRANKING_WINDOWLINENUM) { + button = WINDOW_BUTTONTYPE_OK | WINDOW_BUTTONTYPE_PREV; + }else { + button = WINDOW_BUTTONTYPE_OK; + } + }else if( count_start == 0 ) { + button = WINDOW_BUTTONTYPE_NEXT|WINDOW_BUTTONTYPE_OK; + }else { + button = WINDOW_BUTTONTYPE_NEXT|WINDOW_BUTTONTYPE_PREV|WINDOW_BUTTONTYPE_OK; + } + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_WIDEMESSAGEANDLINEINPUT, + button, + CHAR_WINDOWTYPE_DUELRANKING_TOPRANKING, + msgid2, + makeEscapeString( message, buf, sizeof(buf))); + + if( cnt == 0 ) { + CHAR_setWorkInt( CONNECT_getCharaindex(fd), CHAR_WORKSHOPRELEVANT, -1); + }else { + CHAR_setWorkInt( CONNECT_getCharaindex(fd), CHAR_WORKSHOPRELEVANT, count_start); + } +} + +void NPC_Duelranking_CallMyRanking( int count, int msgid, int msgid2) +{ + count -= 5; + if( count < 0 ) count = 0; + saacproto_DBGetEntryByCount_send( acfd, DB_DUELPOINT, + count, NPC_DUELRANKING_WINDOWLINENUM, + msgid, msgid2 ); +} + +#ifdef _DEATH_CONTEND +void NPC_Duelrankingloop( int meindex) +{ + static int side = 0; + int i; + + if( CHAR_getWorkInt( meindex, NPC_WORK_CURRENTTIME) < NowTime.tv_sec ){ + char buf1[256]; + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTTIME, NowTime.tv_sec); + + if( NPC_Util_GetArgStr( meindex, npcarg, sizeof( npcarg) ) != NULL && + NPC_Util_GetStrFromStrWithDelim( npcarg, "PKLoop", buf1, sizeof( buf1)) != NULL ){ + CHAR_setInt( meindex, CHAR_LOOPINTERVAL, atoi(buf1)); + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "PKLType", buf1, sizeof( buf1)) != NULL ){ + CHAR_setWorkInt( meindex, NPC_WORK_BATTLELOOP, atoi( buf1)); + } + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "PKLDelay", buf1, sizeof( buf1)) != NULL ){ + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTTIME, NowTime.tv_sec + (atoi( buf1)*60) ); + } + } + } + if( CHAR_getWorkInt( meindex, NPC_WORK_BATTLELOOP) == 0 ) return; + + for( i=0; i= MAXJOINFM ) break; + } + fclose( fp); + return TRUE; +} + +BOOL NPC_BackupFamilyPK_List( void) +{ + FILE *fp=NULL; + int i; + + if( (fp=fopen("fmlist.txt", "w+")) == NULL ) return FALSE; + for( i=0; i MAXJOINFM ) return FALSE; + if( JoinFamilyList[ti].use == 0 ) return FALSE; + + snprintf( buf, sizes, "%d|%s|%s|%s|%d|", + JoinFamilyList[ti].fmindex, JoinFamilyList[ti].fmname, + JoinFamilyList[ti].ucdkey, JoinFamilyList[ti].uname, JoinFamilyList[ti].join ); + + return TRUE; +} + +BOOL NPC_CheckJoin_FamilyPK_List( int meindex, int toindex) +{ + int i; + + //andy_log + print( " *check: [%d,%s,%s]\n", CHAR_getInt( toindex, CHAR_FMINDEX), + CHAR_getChar( toindex, CHAR_CDKEY), CHAR_getChar( toindex, CHAR_NAME) ); + + for( i=0; i +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "lssproto_serv.h" +#include "saacproto_cli.h" +#include "map_deal.h" +#include "readmap.h" +#include "battle.h" +#include "log.h" +#include "enemy.h" +#include "handletime.h" +#include "npc_eventaction.h" +#include "family.h" + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 +#include "profession_skill.h" +#include "chatmagic.h" +#endif + +enum{ + NPC_EVENTMODE_NONE, + NPC_EVENTMODE_OPEN, + NPC_EVENTMODE_EVENT, +}; + +typedef struct { + char arg[32]; + int born; + int dead; +}NPC_TimeMan; + +#define YOAKE 700 +#define NICHIBOTU 300 +#define SHOUGO 125 +#define YONAKA 500 + +static NPC_TimeMan TimeTble[] = { + {"ALLNIGHT", NICHIBOTU+1, YOAKE}, + {"ALLNOON", YOAKE+1, NICHIBOTU}, + {"AM", YONAKA+1, SHOUGO}, + {"PM", SHOUGO+1, YONAKA}, + {"FORE", YOAKE+1, SHOUGO}, + {"AFTER", SHOUGO+1, NICHIBOTU}, + {"EVNING", NICHIBOTU+1, YONAKA}, + {"MORNING", YONAKA+1, YOAKE}, + {"FREE", 0, 1024}, +}; + +extern void BATTLE_changeRideImage( int index ); + + +#define MAXNPCPOINT 10 + +BOOL ActionNpc_WarpPoint(int meindex,int talker,char *npcarg) +{ + char data[1024], buf1[256], buf2[256]; + int i=1, j=0; + BOOL EvFlg=FALSE; + + struct { + int FLOOR; + int X; + int Y; + }Points[MAXNPCPOINT]; + + for( i=0;i= MAXNPCPOINT ) + break; + } + where = RAND( 0, j-1); + if( MAP_IsValidCoordinate( Points[where].FLOOR, Points[where].X, Points[where].Y ) == TRUE ){ + CHAR_warpToSpecificPoint( meindex, Points[where].FLOOR, Points[where].X, Points[where].Y); + EvFlg = TRUE; + }else { + for( i=0; i<10; i++) { + print("%d.[%d,%d,%d]\n", i, Points[i].FLOOR, Points[i].X, Points[i].Y); + } + } + } + + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "WARPPOINT", data, sizeof( data)) != NULL ) { + int where=0; + i=1; + j=0; + while( getStringFromIndexWithDelim( data, ";", i, buf1, sizeof( buf1)) != FALSE ) { + i++; + getStringFromIndexWithDelim( buf1, ",", 1, buf2, sizeof( buf2)); + Points[j].FLOOR = atoi( buf2); + getStringFromIndexWithDelim( buf1, ",", 2, buf2, sizeof( buf2)); + Points[j].X = atoi( buf2); + getStringFromIndexWithDelim( buf1, ",", 3, buf2, sizeof( buf2)); + Points[j].Y = atoi( buf2); + j++; + if( j >= MAXNPCPOINT ) + break; + } + where = RAND( 0, j-1); + if( MAP_IsValidCoordinate( Points[where].FLOOR, Points[where].X, Points[where].Y ) == TRUE ){ + CHAR_warpToSpecificPoint( talker, Points[where].FLOOR, Points[where].X, Points[where].Y); + EvFlg = TRUE; + }else { + for( i=0; i<10; i++) { + print("%d.[%d,%d,%d]\n", i, Points[i].FLOOR, Points[i].X, Points[i].Y); + } + } + + } + + return EvFlg; +} + +BOOL ActionNpc_CheckMenuFree( int meindex, int toindex, char *npcarg, int nums) +{ + char buf1[1024], buf2[256]; + if( nums < 1 ) return FALSE; + + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "CHECKPARTY", buf1, sizeof( buf1) ) != NULL){ + if( strstr( buf1, "TRUE") != 0 ) { + if( Action_PartyCheck( meindex, toindex) == FALSE) { + CHAR_talkToCli( toindex, meindex, "请一个一个来!", CHAR_COLORYELLOW); + return FALSE; + } + } + } + if( getStringFromIndexWithDelim( npcarg,"}", nums, buf1, sizeof( buf1)) == FALSE ) + return FALSE; + + if( NPC_Util_GetStrFromStrWithDelim( buf1, "FREE", buf2, sizeof( buf2) ) == NULL) + return FALSE; + + if( NPC_ActionPassCheck( meindex, toindex, buf2) == FALSE ) { + CHAR_talkToCli( toindex, meindex, "条件不足!", CHAR_COLORYELLOW); + return FALSE; + } + return Action_RunDoEventAction( meindex, toindex, buf1); +} + +BOOL ActionNpc_CheckFree( int meindex, int toindex, char *npcarg) +{ + char buf1[1024], buf2[256]; + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "CHECKPARTY", buf1, sizeof( buf1) ) != NULL){ + if( strstr( buf1, "TRUE") != 0 ) { + if( Action_PartyCheck( meindex, toindex) == FALSE) { + CHAR_talkToCli( toindex, meindex, "请一个一个来!", CHAR_COLORYELLOW); + return FALSE; + } + } + } + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "FREE", buf2, sizeof( buf2) ) == NULL) + return FALSE; + + if( NPC_ActionPassCheck( meindex, toindex, buf2) == FALSE ) { + CHAR_talkToCli( toindex, meindex, "条件不足!", CHAR_COLORYELLOW); + return FALSE; + } + return Action_RunDoEventAction( meindex, toindex, buf1); +} + +#ifdef _CHANNEL_MODIFY +extern int *piOccChannelMember; +#endif + +BOOL Action_RunDoEventAction( int meindex, int toindex, char *buf1) +{ + char buf2[1256]; + +#if 1 // Robin NPC执行动作前再一次检查FREE条件 + if( NPC_Util_GetStrFromStrWithDelim( buf1, "FREE", buf2, sizeof( buf2)) != NULL ) { + if( NPC_ActionPassCheck( meindex, toindex, buf2 ) == FALSE && buf2[0] != NULL ) { + print("\n 改封包!?跳过NPC的FREE检查!!:%s:%d,%d,%d ", + CHAR_getChar(toindex, CHAR_CDKEY), + CHAR_getInt(toindex, CHAR_FLOOR), + CHAR_getInt(toindex, CHAR_X), + CHAR_getInt(toindex, CHAR_Y) ); + CHAR_warpToSpecificPoint(toindex,117,225,13); + return FALSE; + } + } +#endif + + + if( NPC_Util_GetStrFromStrWithDelim( buf1, "AddGold", buf2, sizeof( buf2)) != NULL ) { + if( NPC_ActionAddGold2( toindex, buf2) == FALSE ) + return FALSE; + } + + if( NPC_Util_GetStrFromStrWithDelim( buf1, "DelGold", buf2, sizeof( buf2)) != NULL ) { + if( NPC_ActionDelGold( toindex, buf2) == FALSE ) + return FALSE; + } + if( NPC_Util_GetStrFromStrWithDelim( buf1, "DelItem", buf2, sizeof( buf2)) != NULL ) { + //print("\n DelItem:%s:%d ", __FILE__, __LINE__); + if( NPC_ActionDelItem( toindex, buf2) == FALSE ) { + //print("\n 改封包??NPC_ActionDelItem:%s:%s ", CHAR_getChar(toindex, CHAR_CDKEY), buf2); + //CHAR_warpToSpecificPoint(toindex,117,225,13); + return FALSE; + } + } + + //条件成立後npc所给的道具 + if( NPC_Util_GetStrFromStrWithDelim( buf1, "AddItem", buf2, sizeof( buf2)) != NULL ) { + if( NPC_ActionAddItem( toindex, buf2) == FALSE ) + return FALSE; + } + + if( NPC_Util_GetStrFromStrWithDelim( buf1, "DelPet", buf2, sizeof( buf2)) != NULL ) { + if( NPC_ActionDelPet( toindex, buf2) == FALSE ) + return FALSE; + } + +#ifdef _NPC_NewDelPet + if( NPC_Util_GetStrFromStrWithDelim( buf1, "NewDelPet", buf2, sizeof( buf2)) != NULL ) { + if( NPC_ActionNewDelPet( toindex, buf2) == FALSE ) + return FALSE; + } +#endif + + if( NPC_Util_GetStrFromStrWithDelim( buf1, "AddPet", buf2, sizeof( buf2)) != NULL ) { + if( NPC_ActionAddPet( toindex, buf2) == FALSE ) + return FALSE; + } + if( NPC_Util_GetStrFromStrWithDelim( buf1, "EvEnd", buf2, sizeof( buf2)) != NULL ) { + if( NPC_ActionSetEend( toindex, buf2) == FALSE ) + return FALSE; + } + if( NPC_Util_GetStrFromStrWithDelim( buf1, "EvNow", buf2, sizeof( buf2)) != NULL ) { + if( NPC_ActionSetNow( toindex, buf2) == FALSE ) + return FALSE; + } + + if( NPC_Util_GetStrFromStrWithDelim( buf1, "Event_End", buf2, sizeof( buf2) ) != NULL) { + if( NPC_ActionSetEend( toindex, buf2) == FALSE ) { + return FALSE; + } + } + + if( NPC_Util_GetStrFromStrWithDelim( buf1, "Event_Now", buf2, sizeof( buf2) ) != NULL) { + if( NPC_ActionSetNow( toindex, buf2) == FALSE ) + return FALSE; + } + + + if( NPC_Util_GetStrFromStrWithDelim( buf1, "EvClr", buf2, sizeof( buf2) ) != NULL) { + if( NPC_ActionClearEvent( toindex, buf2) == FALSE ) + return FALSE; + } + +#ifdef _NPCCHANGE_PLAYERIMG + if( NPC_Util_GetStrFromStrWithDelim( buf1, "CHANGEBBI", buf2, sizeof( buf2) ) != NULL) { + if( NPC_ActionChangePlayerBBI( meindex, toindex, buf2) == FALSE ) + return FALSE; + } +#endif + + if( NPC_Util_GetStrFromStrWithDelim( buf1, "SetLastTalkelder", buf2, sizeof( buf2) ) != NULL) { + CHAR_setInt( toindex, CHAR_LASTTALKELDER, atoi( buf2)); + } + +#ifdef _TYPE_TOXICATION + if( NPC_Util_GetStrFromStrWithDelim( buf1, "TOXICATION", buf2, sizeof( buf2) ) != NULL) { + int fd = getfdFromCharaIndex( toindex ); + if( strstr( buf2, "TRUE") != 0 ){ + setToxication( fd, 1); + CHAR_setWorkInt( toindex, CHAR_WORKTOXICATION, 0 ); + if( NPC_Util_GetStrFromStrWithDelim( buf1, "TOXICATIONMSG", buf2, sizeof( buf2) ) != NULL) { + CHAR_talkToCli( toindex, -1, buf1, CHAR_COLORYELLOW); + } + }else { + CHAR_setWorkInt( toindex, CHAR_WORKTOXICATION, 0 ); + setToxication( fd, 0); + if( NPC_Util_GetStrFromStrWithDelim( buf1, "DETOXIFYMSG", buf2, sizeof( buf2) ) != NULL) { + CHAR_talkToCli( toindex, -1, buf2, CHAR_COLORYELLOW); + } + } + } +#endif + +#ifdef _ACTION_GMQUE + if( NPC_Util_GetStrFromStrWithDelim( buf1, "GMACTION", buf2, sizeof( buf2) ) != NULL) { + if( strstr( buf2, "TRUE") != 0 ){ + if( GMQUE_getQueStr( meindex, toindex) == FALSE ){ + return FALSE; + } + } + } + if( NPC_Util_GetStrFromStrWithDelim( buf1, "ShowGmque", buf2, sizeof( buf2) ) != NULL) { + if( strstr( buf2, "TRUE") != 0 ) + GMQUE_showQueStr( meindex, toindex); + } + if( NPC_Util_GetStrFromStrWithDelim( buf1, "DelGmquePet", buf2, sizeof( buf2) ) != NULL) { + int count = atoi( buf2); + if( GMQUE_DelQueStrPet( meindex, toindex, count) == FALSE ){ + return FALSE; + } + } + if( NPC_Util_GetStrFromStrWithDelim( buf1, "GetGmPrize", buf2, sizeof( buf2) ) != NULL) { + if( GMQUE_AddQueStrTrophy( meindex, toindex) == FALSE ){ + return FALSE; + } + } + if( NPC_Util_GetStrFromStrWithDelim( buf1, "CleanGmque", buf2, sizeof( buf2) ) != NULL) { + if( strstr( buf2, "TRUE") != 0 ) + GMQUE_cleanQueStr( toindex); + } +#endif + +#ifdef _NEW_PLAYERGOLD + if( NPC_Util_GetStrFromStrWithDelim( buf1, "CHECKNEWPLAYER", buf2, sizeof( buf2) ) != NULL) { + if( strstr( buf2, "TRUE") != 0 ){ + char *CdKey; + char *UserName; + CdKey = CHAR_getChar( toindex, CHAR_CDKEY); + UserName = CHAR_getChar( toindex, CHAR_NAME); + saacproto_ACNEWPlayerList_send( acfd, CdKey, UserName, toindex, 1); + } + } +#endif + + if(NPC_Util_GetStrFromStrWithDelim( buf1, "GetRandItem", buf2, sizeof( buf2) ) != NULL ){ + int j=1, rand_cnt=1; + char buf3[256]; + while( getStringFromIndexWithDelim( buf2 , "," , j, buf3, sizeof( buf3)) != FALSE ){ + j++; + rand_cnt++; + } + NPC_ActionTreasureRandItemGet( meindex, toindex, rand_cnt, buf2); + } + +#ifdef _ACTION_BULLSCR + if( NPC_Util_GetStrFromStrWithDelim( buf1, "ABULLSCORE", buf2, sizeof( buf2) ) != NULL) { + if( strstr( buf2, "TRUE") != NULL ){ + if( CHAR_getInt( toindex, CHAR_ABULLSTART) != 20 ){ + CHAR_setInt( toindex, CHAR_ABULLSTART, 10); + CHAR_setInt( toindex, CHAR_ABULLSCORE, 0); + CHAR_setInt( toindex, CHAR_ABULLTIME, 0); + CHAR_setInt( toindex, CHAR_ABULLSTARTTIME, (int)time( NULL)); + CHAR_talkToCli( toindex, -1, "你开始参予与此活动。", CHAR_COLORYELLOW); + }else { + return FALSE; + } + }else { + CHAR_setInt( toindex, CHAR_ABULLSTART, 20); + CHAR_setInt( toindex, CHAR_ABULLSCORE, 0); + CHAR_setInt( toindex, CHAR_ABULLTIME, 0); + CHAR_setInt( toindex, CHAR_ABULLSTARTTIME, 0); + } + } + if( NPC_Util_GetStrFromStrWithDelim( buf1, "CHECKSCORE", buf2, sizeof( buf2) ) != NULL) { + if( strstr( buf2, "TRUE") != 0 ){ + if( CHAR_getInt( toindex, CHAR_ABULLSTART) != 20 && + CHAR_getInt( toindex, CHAR_ABULLSTART) == 10 ){ + int jointime, joindata, joinhr, ntime; + ntime = CHAR_getInt( toindex, CHAR_ABULLTIME); + jointime = CHAR_getInt( toindex, CHAR_ABULLSTARTTIME); + jointime = (int)time( NULL) - jointime; + + joindata = jointime/(24*60*60); + joinhr = (jointime%(24*60*60))/(60*60); + + + if( ntime < 0 ) ntime = 0; + sprintf( buf1, "战斗时间已累积%d分%d秒,活动累积积分:%d, 参与%d天%d小时。", + ntime/60, ntime%60, CHAR_getInt( toindex, CHAR_ABULLSCORE), + joindata, joinhr); + CHAR_talkToCli( toindex, -1, buf1, CHAR_COLORYELLOW); + } + } + } +#endif + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + //andy_add 2003/07/17 + if( NPC_Util_GetStrFromStrWithDelim( buf1, "AddPFSkillPoint", buf2, sizeof( buf2) ) != NULL) { + if( NPC_ActionAddProfessionSkillPoint( toindex, buf2 ) == FALSE ){ + return FALSE; + } + } + //andy_add 2003/07/17 + if( NPC_Util_GetStrFromStrWithDelim( buf1, "CleanProfession", buf2, sizeof( buf2) ) != NULL) { + if( NPC_ActionCleanProfession( toindex, buf2 ) == FALSE ){ + sprintf( buf2, "处理职业参数失败!!" ); + CHAR_talkToCli( toindex, -1, buf2, CHAR_COLORYELLOW); + return FALSE; + } + } + + if( NPC_Util_GetStrFromStrWithDelim( buf1, "PROFESSION", buf2, sizeof( buf2) ) != NULL) { + int p_class = atoi(buf2); + // 判断职业 + if( CHAR_getInt( toindex, PROFESSION_CLASS ) != PROFESSION_CLASS_NONE && (p_class != 0) ){ + sprintf( buf2, "你已经有职业了!!" ); + CHAR_talkToCli( toindex, -1, buf2, CHAR_COLORYELLOW); + return FALSE; + } + + if( p_class > PROFESSION_CLASS_NONE && p_class < PROFESSION_CLASS_NUM ) // 1:战士 2:巫师 3:猎人 + { + int i, value = 0; + int skill_id = -1; + + // 还原点数 + if( PROFESSION_RESTORE_POINT( toindex ) != 1 ) return FALSE; + + // 设定职业 + CHAR_setInt( toindex, PROFESSION_CLASS, p_class ); +#ifdef _CHANNEL_MODIFY + if(CHAR_getInt(toindex,PROFESSION_CLASS) > 0){ + int i,pclass = CHAR_getInt(toindex,PROFESSION_CLASS) - 1; + for(i=0;i 0){ + int i,pclass = CHAR_getInt(toindex,PROFESSION_CLASS) - 1; + for(i=0;i") != NULL ){ + strcat( Head, ">"); + flg = 1; + }else if( strstr( buf2, "<") != NULL ){ + strcat( Head, "<"); + flg = 2; + }else if( strstr( buf2, "!") != NULL ) { + strcat( Head, "!"); + flg = 5; + } + }else if(strstr( buf2, "<") != NULL){ + strcpy( Head, "<"); + flg = 4; + }else if(strstr( buf2, ">") != NULL){ + strcpy( Head, ">"); + flg = 3; + } + Head[ strlen( Head)+1] = 0; + if( NPC_Util_GetStrFromStrWithDelim( buf2, Head, buf3, sizeof( buf3) ) != NULL) { + if( flg == 0 ) + if( atoi(buf3) != partys ) return FALSE; + else if( flg == 1 ) + if( atoi(buf3) < partys ) return FALSE; + else if( flg == 2 ) + if( atoi(buf3) > partys ) return FALSE; + else if( flg == 3 ) + if( atoi(buf3) <= partys ) return FALSE; + else if( flg == 4 ) + if( atoi(buf3) >= partys ) return FALSE; + else if( flg == 5 ) + if( atoi(buf3) == partys ) return FALSE; + } + }*/ +#endif + + ActionNpc_WarpPoint( meindex, toindex, buf1); + return TRUE; +} +BOOL Action_PartyCheck( int meindex, int talker) +{ + if(CHAR_getWorkInt(talker,CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE){ + return FALSE; + } + return TRUE; +} + +BOOL NPC_ActionAddGold( int talker, int Golds) +{ + CHAR_AddGold( talker, Golds); + return TRUE; +} + +BOOL NPC_ActionDelGold( int talker,char *buf) +{ + int Golds=0; + int PGold=0; + if( buf == NULL ) return FALSE; + Golds = atoi( buf); + PGold = CHAR_getInt( talker, CHAR_GOLD); + if( PGold < Golds ) { + CHAR_talkToCli( talker, -1, "你身上的钱不够喔!", CHAR_COLORYELLOW); + return FALSE; + }else { + char buf1[256]; + sprintf( buf1, "交出%d石币", Golds); + CHAR_talkToCli( talker, -1, buf1, CHAR_COLORYELLOW); + } + CHAR_setInt( talker, CHAR_GOLD, PGold-Golds); + CHAR_send_P_StatusString( talker , CHAR_P_STRING_GOLD); + return TRUE; +} + +// WON ADD +BOOL NPC_ActionAddGold2( int talker,char *buf) +{ + int Golds=0; + int PGold=0; + int MaxGold = 0; + int total_gold = 0; + if( buf == NULL ) return FALSE; + Golds = atoi( buf); + PGold = CHAR_getInt( talker, CHAR_GOLD); + MaxGold = CHAR_getMaxHaveGold( talker ); + + total_gold = PGold + Golds; + if( total_gold > MaxGold ) total_gold = MaxGold; + + CHAR_setInt( talker, CHAR_GOLD, total_gold ); + CHAR_send_P_StatusString( talker , CHAR_P_STRING_GOLD); + return TRUE; +} + +BOOL NPC_ActionDelPet( int talker, char *buf) +{ + int petsel; + int petindex=0, k=1; + int fd = getfdFromCharaIndex( talker ); + char msgbuf[64], szPet[128],buff2[256],buff3[256]; + char buf2[256],buff1[256]; + int defpet; + int petno,kNum,find=0,petLv=0,flg=-1; + + while( getStringFromIndexWithDelim(buf , "," , k, buff1, sizeof( buff1)) !=FALSE ) { + k++; + if( strstr( buff1,"-") != NULL ) { + getStringFromIndexWithDelim(buff1,"-",2,buff3,sizeof(buff3)); + getStringFromIndexWithDelim(buff1,"-",1,buf2,sizeof(buf2)); + + if( strstr( buf2,"!") != NULL ) { + flg = 0; + getStringFromIndexWithDelim(buf2,"!=",2,buff2,sizeof(buff2)); + }else if( strstr( buf,"<") != NULL ) { + flg = 1; + getStringFromIndexWithDelim(buf2,"<",2,buff2,sizeof(buff2)); + }else if( strstr( buf,">") != NULL ) { + flg = 2; + getStringFromIndexWithDelim(buf2,">",2,buff2,sizeof(buff2)); + }else if( strstr( buf,"=") != NULL) { + flg = 3; + getStringFromIndexWithDelim(buf2,"=",2,buff2,sizeof(buff2)); + }else + return FALSE; + petLv = atoi( buff2); + } + continue; + + if(strstr(buff3,"*")!=NULL){ + getStringFromIndexWithDelim(buff3,"*",1,buf2,sizeof(buf2)); + petno = atoi(buf2); + getStringFromIndexWithDelim(buff3,"*",2,buf2,sizeof(buf2)); + kNum = atoi(buf2); + }else { + petno = atoi( buff3); + kNum = 30; + } + //andy_log + print("petno:%d kNum:%d \n ", petno, kNum); + + find =0; + + for(petsel=0 ; petsel < CHAR_MAXPETHAVE ; petsel++) { + petindex = CHAR_getCharPet( talker, petsel); + if( !CHAR_CHECKINDEX(petindex)) continue; + if(CHAR_getInt( petindex, CHAR_PETID) != petno )continue; + + switch( flg) { + case 0: + if( CHAR_getInt( petindex, CHAR_LV ) != petLv ) { + }else { + continue; + } + break; + case 1: + if( CHAR_getInt( petindex, CHAR_LV ) < petLv ) { + }else { + continue; + } + break; + case 2: + if( CHAR_getInt( petindex, CHAR_LV ) > petLv ) { + }else { + continue; + } + break; + case 3: + if( CHAR_getInt( petindex, CHAR_LV ) != petLv )continue; + break; + } + + petindex = CHAR_getCharPet( talker, petsel); + if( !CHAR_CHECKINDEX(petindex) ) + continue; + if( CHAR_getWorkInt( CONNECT_getCharaindex( fd), CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE ) + continue; + defpet = CHAR_getInt( talker, CHAR_DEFAULTPET); + + if(defpet == petsel) { + CHAR_setInt( talker, CHAR_DEFAULTPET, -1); + lssproto_KS_send( fd, -1, TRUE); + } + + snprintf( msgbuf,sizeof( msgbuf), "交出%s。", CHAR_getChar( petindex, CHAR_NAME)); + CHAR_talkToCli( talker, -1, msgbuf, CHAR_COLORYELLOW); + LogPet( + CHAR_getChar( talker, CHAR_NAME ), + CHAR_getChar( talker, CHAR_CDKEY ), + CHAR_getChar( petindex, CHAR_NAME), + CHAR_getInt( petindex, CHAR_LV), + "TenseiDel", + CHAR_getInt( talker,CHAR_FLOOR), + CHAR_getInt( talker,CHAR_X ), + CHAR_getInt( talker,CHAR_Y ), + CHAR_getChar( petindex, CHAR_UNIQUECODE) // shan 2001/12/14 + ); + CHAR_setCharPet( talker, petsel, -1); + CHAR_endCharOneArray( petindex ); + snprintf( szPet, sizeof( szPet ), "K%d", petsel); + CHAR_sendStatusString( talker, szPet ); + + find++; + if( find >= kNum ) + break; //条件数目皆删除完 + } + } + + return TRUE; +} + +#ifdef _NPC_NewDelPet +BOOL NPC_ActionNewDelPet( int toindex, char *msg) +{ + int i,petindex=0,petlev,petnum,petcount,mypetlevel,petid; + char buf[32],buf2[32]; + int flg=0,count=0; + + //比较方式 + if ( strstr( msg, "=" ) ) + flg = 0; + else if( strstr( msg, "<" ) ) + flg = 1; + else + flg = 2; + + //等级 + if ( getStringFromIndexWithDelim( msg, "-", 1, buf, sizeof( buf )) ){ + char cmp[12]; + if( flg == 0 ) + strcpy(cmp,"="); + else if( flg == 1 ) + strcpy(cmp,"<"); + else + strcpy(cmp,">"); + if ( getStringFromIndexWithDelim( buf, cmp, 2, buf2, sizeof( buf2 )) ){ + petlev = atoi(buf2); + } + else + return FALSE; + } + else + return FALSE; + + //宠物编号 + if ( getStringFromIndexWithDelim( msg, "-", 2, buf, sizeof( buf )) ){ + if ( getStringFromIndexWithDelim( buf, "*", 1, buf2, sizeof( buf2 )) ){ + petnum = atoi( buf2 ); + } + else + return FALSE; + } + else + return FALSE; + + //数量 + if ( getStringFromIndexWithDelim( msg, "-", 2, buf, sizeof( buf )) ){ + if ( getStringFromIndexWithDelim( buf, "*", 2, buf2, sizeof( buf2 )) ){ + petcount = atoi( buf2 ); + } + else + return FALSE; + } + else + return FALSE; + + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ){ + BOOL cmp=FALSE; + petindex = CHAR_getCharPet( toindex, i); + petid = CHAR_getInt( petindex, CHAR_PETID); + mypetlevel = CHAR_getInt( petindex, CHAR_LV); + + if( flg == 0 ) + if( mypetlevel == petlev ) cmp = TRUE; + if( flg == 1 ) + if( mypetlevel < petlev ) cmp = TRUE; + if( flg == 2 ) + if( mypetlevel > petlev ) cmp = TRUE; + + if( petnum == petid && cmp ){//删除宠物 + char szPet[128]; + int defpet; + char msgbuf[64]; + int fd = getfdFromCharaIndex( toindex ); + + if( !CHAR_CHECKINDEX(petindex) ) return FALSE; + + if( CHAR_getInt( toindex, CHAR_RIDEPET) == i ) { + + //CHAR_talkToCli( talker, -1, "骑乘中的宠物无法交出!", CHAR_COLORYELLOW ); + //return FALSE; + + CHAR_setInt( toindex, CHAR_RIDEPET, -1); + CHAR_send_P_StatusString( toindex, CHAR_P_STRING_RIDEPET ); + CHAR_complianceParameter( toindex ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( toindex , CHAR_WORKOBJINDEX )); + } + + //公及平乓仿互爵 卅日}矢永玄毛丹日内蔽 + if( CHAR_getWorkInt( CONNECT_getCharaindex( fd ), CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE) + return FALSE; + //及矢永玄互田玄伙井升丹井及民尼永弁 + defpet = CHAR_getInt( toindex, CHAR_DEFAULTPET); + if(defpet == i){ + CHAR_setInt( toindex, CHAR_DEFAULTPET, -1); + lssproto_KS_send( fd, -1, TRUE); + } + + snprintf( msgbuf,sizeof( msgbuf), "交出%s。", + CHAR_getChar( petindex, CHAR_NAME)); + CHAR_talkToCli( toindex, -1, msgbuf, CHAR_COLORWHITE); + + // 矢永玄毛澎 仄凶夫弘 + LogPet( CHAR_getChar( toindex, CHAR_NAME ), // 平乓仿 + CHAR_getChar( toindex, CHAR_CDKEY ), + CHAR_getChar( petindex, CHAR_NAME), + CHAR_getInt( petindex, CHAR_LV), + "EvnetDell(任务删除)", + CHAR_getInt( toindex,CHAR_FLOOR), + CHAR_getInt( toindex,CHAR_X ), + CHAR_getInt( toindex,CHAR_Y ), + CHAR_getChar( petindex, CHAR_UNIQUECODE) // shan 2001/12/14 + ); + + + // 切 井日壅允 + CHAR_setCharPet( toindex, i, -1); + + CHAR_endCharOneArray( petindex ); + + snprintf( szPet, sizeof( szPet ), "K%d", i); + // 蕙仄中矢永玄旦 □正旦霜曰勾仃月 + CHAR_sendStatusString( toindex, szPet ); + + ++count; + if( count >= petcount ) + break; + } + } + + return TRUE; +} +#endif + +BOOL NPC_ActionAddPet( int talker, char *buf) +{ + int ret; + char msgbuf[64], buff3[256]; + int enemynum; + int i,j,k=1; + int petindex, petindex2, petid; + + k=1; + while( getStringFromIndexWithDelim(buf , "," , k, buff3, sizeof(buff3)) !=FALSE ){ + k++; + //检查宠物栏是否有空位 + for( i = 0 ;i < CHAR_MAXPETHAVE ; i++) { + petindex = CHAR_getCharPet( talker, i); + if( petindex == -1 ) + break; + } + + if( i == CHAR_MAXPETHAVE ) { + snprintf( msgbuf,sizeof( msgbuf), "宠物已满!!"); + CHAR_talkToCli( talker, -1, msgbuf, CHAR_COLORYELLOW); + return FALSE; + } + + petid = atoi( buff3); + enemynum = ENEMY_getEnemyNum(); + for( i = 0; i < enemynum; i ++ ) { + if( ENEMY_getInt( i, ENEMY_ID ) == petid ) + //if( ENEMY_getInt( i, ENEMY_TEMPNO ) == petid ) + break; + } + + if( i == enemynum ) + continue; + + ret = ENEMY_createPetFromEnemyIndex( talker, i); + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ) { + if( CHAR_getCharPet( talker, i ) == ret ) + break; + } + if( i == CHAR_MAXPETHAVE ) + i = 0; + if( CHAR_CHECKINDEX( ret ) == TRUE ){ + CHAR_setMaxExpFromLevel( ret, CHAR_getInt( ret, CHAR_LV )); + } + + petindex2 = CHAR_getCharPet(talker, i); + if( !CHAR_CHECKINDEX( petindex2) ) + continue; + snprintf( msgbuf,sizeof( msgbuf), "拿到%s。", CHAR_getChar(petindex2,CHAR_NAME)); + CHAR_talkToCli( talker, -1, msgbuf, CHAR_COLORYELLOW); + for(j = 0; j < CHAR_MAXPETHAVE; j++){ + petindex = CHAR_getCharPet(talker, j); + if( !CHAR_CHECKINDEX( petindex) ) + continue; + CHAR_complianceParameter( petindex ); + snprintf( msgbuf, sizeof( msgbuf ), "K%d", j ); + CHAR_sendStatusString( talker, msgbuf ); + snprintf( msgbuf, sizeof( msgbuf ), "W%d", j ); + CHAR_sendStatusString( talker, msgbuf ); + } + + LogPet( + CHAR_getChar( talker, CHAR_NAME ), + CHAR_getChar( talker, CHAR_CDKEY ), + CHAR_getChar( petindex2, CHAR_NAME), + CHAR_getInt( petindex2, CHAR_LV), + "TenseiGet", + CHAR_getInt( talker,CHAR_FLOOR), + CHAR_getInt( talker,CHAR_X ), + CHAR_getInt( talker,CHAR_Y ), + CHAR_getChar( petindex2, CHAR_UNIQUECODE) // shan 2001/12/14 + ); + } + return TRUE; +} + +#ifdef _ITEM_PILENUMS +BOOL NPC_DelItem( int toindex, int ti, int num) +{ + int itemindex, pilenum; + + itemindex = CHAR_getItemIndex( toindex , ti); + if( !ITEM_CHECKINDEX(itemindex) ) return FALSE; + pilenum = ITEM_getInt( itemindex, ITEM_USEPILENUMS); + if( pilenum < num ) return FALSE; + + pilenum = pilenum - num; + if( pilenum <= 0 ){ + { + LogItem( + CHAR_getChar( toindex, CHAR_NAME ), + CHAR_getChar( toindex, CHAR_CDKEY ), +#ifdef _add_item_log_name + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), +#endif + "Sell(卖道具)", + CHAR_getInt( toindex,CHAR_FLOOR), + CHAR_getInt( toindex,CHAR_X ), + CHAR_getInt( toindex,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + + ); + } + CHAR_setItemIndex( toindex, ti, -1); + ITEM_endExistItemsOne( itemindex); + }else{ + ITEM_setInt( itemindex, ITEM_USEPILENUMS, pilenum); + } + CHAR_sendItemDataOne( toindex, ti); + return TRUE; +} + + +void NPC_ActionDoPileClearItem( int toindex, int itemID) +{ + int i, itemindex; + char token[256]; + + for( i = CHAR_STARTITEMARRAY ; i < CHAR_MAXITEMHAVE ; i++ ){ + itemindex = CHAR_getItemIndex( toindex , i ); + if( !ITEM_CHECKINDEX(itemindex) ) continue; + if( ITEM_getInt(itemindex, ITEM_ID) != itemID ) continue; + sprintf( token, "交出道具%s",ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( toindex, -1, token, CHAR_COLORYELLOW); + + LogItem( + CHAR_getChar( toindex, CHAR_NAME ), + CHAR_getChar( toindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID), +#endif + "任务收取", + CHAR_getInt( toindex,CHAR_FLOOR), + CHAR_getInt( toindex,CHAR_X ), + CHAR_getInt( toindex,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + + ); + CHAR_setItemIndex( toindex, i, -1); + ITEM_endExistItemsOne( itemindex); + CHAR_sendItemDataOne( toindex, i); + } +} + +BOOL NPC_ActionDoPileDelItem( int toindex, int itemID, int num) +{ + int i, itemindex, finditem=0, pilenum=0, onenum=0; + char token[256]; + + for( i = CHAR_STARTITEMARRAY ; i < CHAR_MAXITEMHAVE && (finditem= (num-finditem) ){ + pilenum -= (num-finditem); + onenum += (num-finditem); + }else { + onenum = pilenum; + pilenum=0; + } + finditem += onenum; + + ITEM_setInt( itemindex, ITEM_USEPILENUMS, pilenum); + sprintf( token, "交出%d个%s", onenum, ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( toindex, -1, token, CHAR_COLORYELLOW); + if( pilenum <= 0 ){ + LogItem( + CHAR_getChar( toindex, CHAR_NAME ), + CHAR_getChar( toindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID), +#endif + "任务收取", + CHAR_getInt( toindex,CHAR_FLOOR), + CHAR_getInt( toindex,CHAR_X ), + CHAR_getInt( toindex,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + + ); + + + CHAR_setItemIndex( toindex, i, -1); + ITEM_endExistItemsOne( itemindex); + } + CHAR_sendItemDataOne( toindex, i); + } + + if( finditem != num && num != -1 ) return FALSE; + return TRUE; +} + +BOOL NPC_ActionDelItem( int talker, char *buf) +{ + char buff3[128], buf2[32]; + int k=1, itemid, neednum; + if( !CHAR_CHECKINDEX( talker) ) return FALSE; + while( getStringFromIndexWithDelim(buf , "," , k++, buff3, sizeof(buff3)) !=FALSE ) { + neednum = 1; + if( getStringFromIndexWithDelim( buff3, "*", 1, buf2, sizeof(buf2)) == FALSE ) continue; + itemid = atoi( buf2); + if( getStringFromIndexWithDelim( buff3, "*", 2, buf2, sizeof(buf2)) == TRUE ){ + neednum = atoi( buf2); + if( NPC_ActionDoPileDelItem( talker, itemid, neednum) == FALSE ) return FALSE; + }else{ + NPC_ActionDoPileClearItem( talker, itemid); + } + } + return TRUE; +} +#else +BOOL NPC_ActionDelItem( int talker, char *buf) +{ + int i = 1, j = 1,k = 1; + char buff3[128]; + char buf2[32]; + int itemindex; + char token[256]; + + if( !CHAR_CHECKINDEX( talker) ) return FALSE; + while( getStringFromIndexWithDelim(buf , "," , k, buff3, sizeof(buff3)) !=FALSE ) { + k++; + if(strstr(buff3,"*")!=NULL){ + int itemno, kosuu=0, id, cnt=0; + struct _tagItemArray { + int index; + int itemindex; + }; + struct _tagItemArray ItemArray[20]; + for( i=0; i<20 ; i++){ + ItemArray[i].itemindex = -1; + ItemArray[i].index = -1; + } + //取得字串 + getStringFromIndexWithDelim(buff3,"*",1,buf2,sizeof(buf2)); + itemno = atoi(buf2); + getStringFromIndexWithDelim(buff3,"*",2,buf2,sizeof(buf2)); + kosuu = atoi(buf2); + //取得 item index + for( i = CHAR_STARTITEMARRAY ; i < CHAR_MAXITEMHAVE ; i++ ){ + itemindex=CHAR_getItemIndex( talker , i ); + if( ITEM_CHECKINDEX(itemindex) ){ + id=ITEM_getInt(itemindex ,ITEM_ID ); + if(itemno==id){ + ItemArray[cnt].itemindex = itemindex; + ItemArray[cnt].index = i; + cnt++; + } + } + if(cnt == kosuu) + break; + } + if(cnt != kosuu){ + CHAR_talkToCli( talker, -1,"条件不足", CHAR_COLORYELLOW); + return FALSE; + } + //收取物品 + for( i=0; i<20; i++) { + itemindex = ItemArray[i].itemindex; + if( !ITEM_CHECKINDEX(itemindex) ) break; + sprintf(token,"交出%s",ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( talker, -1, token, CHAR_COLORYELLOW); + CHAR_setItemIndex( talker, ItemArray[i].index ,-1); + ITEM_endExistItemsOne( itemindex); + CHAR_sendItemDataOne( talker, ItemArray[i].index); + LogItem( + CHAR_getChar( talker, CHAR_NAME ), CHAR_getChar( talker, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID), +#endif + "WarpManDelItem", + CHAR_getInt( talker, CHAR_FLOOR), CHAR_getInt( talker, CHAR_X ), + CHAR_getInt( talker, CHAR_Y ), ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + } + }else{ + for( j = CHAR_STARTITEMARRAY ; j < CHAR_MAXITEMHAVE ; j++){ + itemindex = CHAR_getItemIndex( talker ,j); + if( ITEM_CHECKINDEX(itemindex) ){ + if( atoi( buff3) == ITEM_getInt(itemindex,ITEM_ID)){ + LogItem( + CHAR_getChar( talker, CHAR_NAME ), + CHAR_getChar( talker, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID), +#endif + "WarpManDelItem", + CHAR_getInt( talker,CHAR_FLOOR), + CHAR_getInt( talker,CHAR_X ), + CHAR_getInt( talker,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + + ); + sprintf( token, "交出%s。", + ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( talker, -1, token, CHAR_COLORYELLOW); + CHAR_DelItem( talker, j); + } + } + } + } + } + return TRUE; +} +#endif + + + +BOOL NPC_ActionAddItem( int talker, char *buf) +{ + int itemID,k=0,itemindex=-1; + int spaceNum=5,i; + char buff3[256], msgbuf[64], token[256]; + int ret; + + k=1; + while( getStringFromIndexWithDelim(buf , "," , k, buff3, sizeof(buff3)) !=FALSE ){ + k++; + for( i = spaceNum ; i < CHAR_MAXITEMHAVE ; i++ ){ + itemindex=CHAR_getItemIndex( talker , i ); + if( itemindex == -1 ) { + spaceNum = i+1; + break; + } + } + if( i == CHAR_MAXITEMHAVE ) { + snprintf( msgbuf,sizeof( msgbuf), "物品栏空间不足!!"); + CHAR_talkToCli( talker, -1, msgbuf, CHAR_COLORYELLOW); + return FALSE; + } + } + k=1; + while( getStringFromIndexWithDelim(buf , "," , k, buff3, sizeof(buff3)) !=FALSE ){ + k++; + itemID = atoi( buff3); + if( itemID ) + itemindex = ITEM_makeItemAndRegist( itemID); + if(itemindex == -1) + continue; + ret = CHAR_addItemSpecificItemIndex( talker, itemindex); + if( ret < 0 || ret >= CHAR_MAXITEMHAVE ) { + ITEM_endExistItemsOne( itemindex); + print ("\n ret error!!"); + return FALSE; + } + + sprintf( token,"拿到%s",ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( talker, -1, token, CHAR_COLORYELLOW ); + CHAR_sendItemDataOne( talker, ret); + } + + return TRUE; +} + +BOOL NPC_ActionSetEend( int talkerindex, char * buf) +{ + int eveno; + int talkNo=1, iflg=0; + char buf1[256]; + + while( getStringFromIndexWithDelim( buf,",",talkNo,buf1,sizeof( buf1)) != FALSE) { + talkNo++; + eveno = atoi( buf); + NPC_EventSetFlg( talkerindex, eveno); + if( ++iflg > 20 ) break; + } + return TRUE; +} + +BOOL NPC_ActionClearEvent( int toindex, char * buf) +{ + int eveno; + int talkNo=1, iflg=0; + char buf1[256]; + + while( getStringFromIndexWithDelim( buf,",",talkNo,buf1,sizeof( buf1)) != FALSE) { + talkNo++; + eveno = atoi( buf); + NPC_NowEndEventSetFlgCls( toindex, eveno); + if( ++iflg > 20 ) break; + } + return TRUE; +} + +BOOL NPC_ActionSetNow( int toindex, char * buf) +{ + int eveno; + int talkNo=1, iflg=0; + char buf1[256]; + + while( getStringFromIndexWithDelim( buf,",",talkNo,buf1,sizeof( buf1)) != FALSE) { + talkNo++; + eveno = atoi( buf); + NPC_NowEventSetFlg( toindex, eveno); + if( ++iflg > 20 ) break; + } + return TRUE; +} + + +BOOL NPC_ActionPassCheck( int meindex, int talker, char *buf) +{ + + char buff2[256]; + char buff3[128]; + int i=1,j=1; + int loop=0; + while( getStringFromIndexWithDelim(buf,",",i,buff2,sizeof(buff2)) !=FALSE ) { + i++; + if(strstr(buff2,"&")!=NULL){ + j=1; + loop=0; + while( getStringFromIndexWithDelim(buff2,"&",j,buff3,sizeof(buff3)) !=FALSE ) { + j++; + if(NPC_ActionBigSmallCheck( meindex, talker, buff3)==FALSE) { + loop=1; + break; + } + } + if(loop==0) { + CHAR_setWorkInt( talker, CHAR_WORKWARPCHECK, TRUE ); + return TRUE; + } + }else{ + if( NPC_ActionBigSmallCheck( meindex, talker, buff2) == TRUE){ + CHAR_setWorkInt( talker, CHAR_WORKWARPCHECK, TRUE ); + return TRUE; + + } + } + } + CHAR_setWorkInt( talker, CHAR_WORKWARPCHECK, FALSE ); + return FALSE; + +} + +BOOL NPC_ActionBigSmallCheck(int meindex,int talker,char* buf) +{ + + char buff2[128], buff3[128]; + int kosuu,temp=-1,flg=0; + +#ifdef _NEW_WARPMAN + char buff1[128]; + if(strstr( buf, "-") != NULL) { + getStringFromIndexWithDelim( buf, "-", 2, buff3, sizeof(buff3)); + temp = atoi( buff3); + getStringFromIndexWithDelim( buf, "-", 1, buff1, sizeof(buff1)); + strcpy( buf, buff1); + } +#endif + + if( strstr( buf, "<") != NULL ){ + getStringFromIndexWithDelim( buf, "<", 2, buff3, sizeof(buff2)); + kosuu = atoi( buff3); + getStringFromIndexWithDelim( buf, "<", 1, buff2, sizeof(buff2)); + + if( NPC_ActionFreeIfCheck( meindex, talker, buff2, buff3, kosuu, 1, temp)==TRUE){ + return TRUE; + } + }else if(strstr( buf, ">") != NULL){ + getStringFromIndexWithDelim( buf, ">", 2, buff3, sizeof(buff2)); + kosuu = atoi(buff3); + getStringFromIndexWithDelim( buf, ">" ,1, buff2, sizeof(buff2)); + + if( NPC_ActionFreeIfCheck( meindex, talker, buff2, buff3, kosuu, 2, temp) == TRUE ){ + return TRUE; + } + + }else if( strstr( buf, "!" ) != NULL){ + getStringFromIndexWithDelim( buf, "!=", 2, buff3, sizeof(buff2)); + kosuu = atoi( buff3); + getStringFromIndexWithDelim( buf, "!=", 1, buff2, sizeof(buff2)); + if( NPC_ActionFreeIfCheck( meindex, talker, buff2, buff3, kosuu, 0, temp) == TRUE ){ + return FALSE; + }else{ + return TRUE; + } + }else if( strstr( buf, "=") != NULL){ + getStringFromIndexWithDelim( buf, "=", 2, buff3, sizeof(buff2)); + kosuu = atoi( buff3); + getStringFromIndexWithDelim( buf, "=", 1, buff2, sizeof(buff2)); + flg = 0; + if( strstr( buf, "*") != NULL){ + if( NPC_ActionWarpManReduce( meindex, talker, buf)==TRUE){ + return TRUE; + } + } +#ifdef _NPC_ActionFreeCmp + else if( strstr( buf, "^") != NULL){ + if( NPC_ActionWarpManReduce2( meindex, talker, buf)==TRUE){ + return TRUE; + } + } +#endif + else if( NPC_ActionFreeIfCheck( meindex, talker, buff2, buff3, kosuu, flg, temp) == TRUE ) { + return TRUE; + } + } + return FALSE; +} + +#ifdef _NPC_ActionFreeCmp +//其实功能和原本的NPC_ActionWarpManReduce差不多,但为了不影响以前的设定,所以不去修改原本的 +BOOL NPC_ActionWarpManReduce2(int meindex,int talker,char *buf) +{ + char buf2[512]; + char buf3[256]; + int i, itemindex, itemno, kosuu; + int id=0; + int nums = 0; + + getStringFromIndexWithDelim(buf,"=",2,buf2,sizeof(buf2)); + getStringFromIndexWithDelim(buf2,"^",1,buf3,sizeof(buf3)); + itemno = atoi(buf3); + getStringFromIndexWithDelim(buf2,"^",2,buf3,sizeof(buf3)); + kosuu = atoi(buf3); + + for( i=CHAR_STARTITEMARRAY ; i < CHAR_MAXITEMHAVE;i++ ){ + itemindex=CHAR_getItemIndex( talker , i ); + if( ITEM_CHECKINDEX(itemindex) ){ + id=ITEM_getInt(itemindex ,ITEM_ID ); + if( itemno == id ){ + nums += ITEM_getInt( itemindex, ITEM_USEPILENUMS);//数量 + } + } + } + + if( nums == kosuu ) return TRUE; + + return FALSE; +} +#endif + +#ifdef _NEW_MANOR_LAW +extern struct FM_POINTLIST fmpointlist; +#endif + +BOOL NPC_ActionFreeIfCheck(int meindex,int talker, char* buf, char *opt, int kosuu,int flg, int temp) +{ + if(strcmp(buf,"LV")==0){ + if(NPC_ActionLevelCheck(meindex,talker,kosuu,flg)==TRUE) + return TRUE; + } + if(strcmp(buf,"GOLD")==0){ + print("\n GOLD"); + if(NPC_ActionGoldCheck(meindex,talker,kosuu,flg)==TRUE) + return TRUE; + } + if( strcmp(buf,"TRANS") == 0 ) { + if( NPC_ActionCheckTrans( meindex, talker, kosuu, flg) == TRUE ) + return TRUE; + } + + if( !strcmp( buf, "GTIME") ){ + if( NPC_CheckTimeDefine( opt) == TRUE ) + return TRUE; + } + + if(strcmp( buf, "TIME") == 0) { + if(NPC_TiemCheck( meindex, talker, kosuu, flg) == TRUE) + return TRUE; + } + + if( strcmp( buf, "PET") == 0 ) { + if( temp > 0 ) { + if( ActionCheckMyPet( meindex, talker, kosuu, flg, temp) == TRUE ) + return TRUE; + }else + return FALSE; + } + if(strcmp(buf,"ITEM")==0){ + if(NPC_ActionItemCheck(meindex,talker,kosuu, flg)==TRUE) + return TRUE; + } + + if(strcmp(buf,"EQUIT")==0){ + if(NPC_ActioneEquitCheck(meindex,talker,kosuu, flg)==TRUE) + return TRUE; + } + + if( !strcmp(buf,"ENDEV") || !strcmp(buf,"EVEND") ){ + if(NPC_EventCheckFlg( talker, kosuu)==TRUE) + return TRUE; + } + if( !strcmp(buf,"NOWEV") || !strcmp(buf,"EVNOW") ){ + if(NPC_NowEventCheckFlg( talker, kosuu)==TRUE) + return TRUE; + } + + if(strcmp(buf,"PARTY")==0){ + if(NPC_ActionPartyCheck( talker, kosuu, flg)==TRUE) + return TRUE; + } + if(strcmp(buf,"reITEM")==0){ + if( NPC_ActionReItemCheck( talker, kosuu, flg)==TRUE) + return TRUE; + } + if(strcmp(buf,"rePET")==0){ + if( NPC_ActionRePetCheck( talker, kosuu, flg)==TRUE) + return TRUE; + } +#ifdef _ACTION_GMQUE + if( strcmp( buf, "GMFLG") == 0 ) { + if( CheckGmQueflg( talker, kosuu, flg) == TRUE ) + return TRUE; + } + if( strcmp( buf, "GMCHECK") == 0 ){ + if( GMQUE_CheckQueStr( meindex, talker, kosuu) == TRUE ){ + return TRUE; + } + } +#endif +#ifdef _NPCCHANGE_PLAYERIMG + if(strcmp( buf, "BBI")==0) { + if( NPC_CheckPlayerBBI( meindex, talker, kosuu, flg)== TRUE) { + return TRUE; + } + } +#endif + if( strcmp( buf, "FM") == 0 ){ + if( CHAR_getInt( talker, CHAR_FMLEADERFLAG ) > 0 && + CHAR_getInt( talker, CHAR_FMLEADERFLAG ) != FMMEMBER_APPLY) + if( CHAR_getWorkInt( talker, CHAR_WORKFMFLOOR) == kosuu ){ + return TRUE; + } + } + if(strcmp(buf,"DR")==0){ + if(NPC_ActionDuelRankCheck(meindex,talker,kosuu,flg)==TRUE){ + return TRUE; + } + } + if(strcmp(buf,"DP")==0){ + if(NPC_ActionDuelPointCheck(meindex,talker,kosuu,flg)==TRUE){ + return TRUE; + } + } + +#ifdef _ACTION_BULLSCR + if( strcmp( buf, "ABSCO") == 0 ) { + if( NPC_ActionCheckABullscore( meindex, talker, kosuu, flg) == TRUE ) + return TRUE; + } + if( strcmp( buf, "ABSTART") == 0 ) { + if( NPC_ActionCheckABullstart( meindex, talker, kosuu, flg) == TRUE ) + return TRUE; + } + if( strcmp( buf, "ABTIME") == 0 ) { + if( NPC_ActionCheckABulltime( meindex, talker, kosuu, flg) == TRUE ) + return TRUE; + } + if( strcmp( buf, "ABEVENT") == 0 ) { + if( NPC_ActionCheckABullEvent( meindex, talker) == TRUE ) + return TRUE; + } +#endif + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + if( strcmp( buf, "CLASS") == 0 ){ + if(NPC_ActionClassCheck(meindex,talker,kosuu,flg)==TRUE) + return TRUE; + } + if( strcmp( buf, "Skill") == 0 ){ + if( NPC_ActionSkillCheck( meindex, talker, kosuu, flg)==TRUE) + return TRUE; + } + if( strcmp( buf, "SkNum") == 0 ){ + if( NPC_ActionSkillNumCheck( meindex, talker, kosuu, flg)==TRUE) + return TRUE; + } + if( strcmp( buf, "SKCP") == 0 ){ + if( NPC_ActionSkillPointAndSkillCheck( meindex, talker, kosuu, flg)==TRUE) + return TRUE; + } +#endif + + +#ifdef _TREASURE_BOX + if( strcmp( buf, "BOX") == 0 ){ + if( NPC_ActionTreasureTypeCheck( meindex, kosuu, + //NPC_TIME_EVENTMODE = CHAR_NPCWORKINT6,// 1 + CHAR_getWorkInt( meindex, CHAR_NPCWORKINT6) ,flg)==TRUE) + return TRUE; + } +#endif + +#ifdef _NPC_ADDWARPMAN1 + if( strcmp( buf, "PARTYCOUNT") == 0){ + if(NPC_ActionPartyCountCheck( talker, kosuu, flg)==TRUE) + return TRUE; + } + if( strcmp( buf, "MANCOUNT" ) == 0 ){ + if(NPC_ActionManCountCheck( talker, kosuu, flg ) == TRUE ) + return TRUE; + } + if( strcmp( buf, "WOMANCOUNT" ) == 0 ){ + if(NPC_ActionWomanCountCheck( talker, kosuu, flg ) == TRUE ) + return TRUE; + } +#endif + +#ifdef _ANGEL_SUMMON + if(strcmp(buf,"ANGEL_NOW")==0){ + if( NPC_ActionMissionAngelCheck(meindex,talker,kosuu, MISSION_DOING, 0)==TRUE) + return TRUE; + } + if(strcmp(buf,"HERO_NOW")==0){ + if( NPC_ActionMissionHeroCheck(meindex,talker,kosuu, MISSION_DOING, 0)==TRUE) + return TRUE; + } + if(strcmp(buf,"ANGEL_OVER")==0){ + if( NPC_ActionMissionAngelCheck(meindex,talker,kosuu, MISSION_HERO_COMPLETE, 0)==TRUE) + return TRUE; + } + if(strcmp(buf,"HERO_OVER")==0){ + if( NPC_ActionMissionHeroCheck(meindex,talker,kosuu, MISSION_HERO_COMPLETE, 0)==TRUE) + return TRUE; + } + if(strcmp(buf,"ANGEL_OUT")==0){ + if( NPC_ActionMissionAngelCheck(meindex,talker,kosuu, MISSION_TIMEOVER, 0)==TRUE) + return TRUE; + } + if(strcmp(buf,"HERO_OUT")==0){ + if( NPC_ActionMissionHeroCheck(meindex,talker,kosuu, MISSION_TIMEOVER, 0)==TRUE) + return TRUE; + } + + if(strcmp(buf,"ANGEL_I_NOW")==0){ + if( NPC_ActionMissionAngelCheck(meindex,talker,kosuu, MISSION_DOING, TRUE)==TRUE) + return TRUE; + } + if(strcmp(buf,"HERO_I_NOW")==0){ + if( NPC_ActionMissionHeroCheck(meindex,talker,kosuu, MISSION_DOING, TRUE)==TRUE) + return TRUE; + } + if(strcmp(buf,"ANGEL_I_OVER")==0){ + if( NPC_ActionMissionAngelCheck(meindex,talker,kosuu, MISSION_HERO_COMPLETE, TRUE)==TRUE) + return TRUE; + } + if(strcmp(buf,"HERO_I_OVER")==0){ + if( NPC_ActionMissionHeroCheck(meindex,talker,kosuu, MISSION_HERO_COMPLETE, TRUE)==TRUE) + return TRUE; + } + if(strcmp(buf,"ANGEL_I_OUT")==0){ + if( NPC_ActionMissionAngelCheck(meindex,talker,kosuu, MISSION_TIMEOVER, TRUE)==TRUE) + return TRUE; + } + if(strcmp(buf,"HERO_I_OUT")==0){ + if( NPC_ActionMissionHeroCheck(meindex,talker,kosuu, MISSION_TIMEOVER, TRUE)==TRUE) + return TRUE; + } + if(strcmp( buf, "HEROCNT") == 0) { + //if(NPC_EventLevelCheck( meindex, talker, kosuu, flg) == TRUE) { + if(NPC_HeroCompleteCountCheck( meindex, talker, kosuu, flg) == TRUE) + return TRUE; + } + +#endif +#ifdef _NEW_MANOR_LAW + if(strcmp(buf,"MANOR") == 0){ + // 大於-1表示要检查是否为庄园家族成员才能warp + if(kosuu > -1){ + int iFmIndex = -1,iHadFmindex = -1; + char token[256]; + + iFmIndex = CHAR_getInt(talker,CHAR_FMINDEX); + getStringFromIndexWithDelim(fmpointlist.pointlistarray[kosuu],"|",5,token,sizeof(token)); + iHadFmindex = atoi(token); + if(iFmIndex > -1){ + // 是庄园拥有家族的成员 + if(iFmIndex == iHadFmindex){ + // 必须有家族且是正式族员 + if(CHAR_getInt(talker,CHAR_FMLEADERFLAG) != FMMEMBER_NONE && + CHAR_getInt(talker,CHAR_FMLEADERFLAG) != FMMEMBER_APPLY) return TRUE; + } + } + } + } +#endif + + return FALSE; +} + +BOOL NPC_ActioneEquitCheck(int meindex,int talker,int itemNo, int flg) +{ + int i; + int itemindex=-1; + int id; + for( i=0;i point1) + return TRUE; + } + + return FALSE; +} + +BOOL ActionCheckMyPet( int meindex, int talker, int petLv, int flg, int petid) +{ + int petsel,petindex=-1; + int lv=-1; + for(petsel=0 ; petsel < CHAR_MAXPETHAVE ; petsel++) { + petindex = CHAR_getCharPet( talker, petsel); + if( petindex == -1 ) + continue; + if(CHAR_getInt( petindex, CHAR_PETID) != petid ) + continue; + break; + } + if( petsel == CHAR_MAXPETHAVE ) { + return FALSE; + }else { //找到条件宠 + lv = CHAR_getInt( petindex, CHAR_LV); + if( NPC_ActionBigSmallLastCheck( petLv, lv, flg) == TRUE) { + return TRUE; + }else { + return FALSE; + } + } + return FALSE; +} + + +BOOL NPC_ActionCheckTrans(int meindex,int talker,int trans,int flg) +{ + int myTrans; + myTrans=CHAR_getInt(talker, CHAR_TRANSMIGRATION); + if( NPC_ActionBigSmallLastCheck( trans, myTrans, flg ) == TRUE ) { + return TRUE; + } + return FALSE; +} + +BOOL NPC_ActionLevelCheck(int meindex,int talker,int level,int flg) +{ + int mylevel; + mylevel=CHAR_getInt(talker,CHAR_LV); + if(NPC_ActionBigSmallLastCheck( level, mylevel, flg) == TRUE){ + return TRUE; + } + return FALSE; +} + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 +BOOL NPC_ActionClassCheck(int meindex,int talker,int p_class,int flg) +{ + int myclass; + myclass= CHAR_getInt( talker, PROFESSION_CLASS ); + + if(NPC_ActionBigSmallLastCheck( p_class, myclass, flg) == TRUE){ + return TRUE; + } + return FALSE; +} + +BOOL NPC_ActionSkillPointAndSkillCheck( int meindex,int talker,int sknum,int flg) +{ + int myskillpoint, myskillnum=0, myskilllevel; + int mysknum=0, j; + myskillpoint= CHAR_getInt( talker, PROFESSION_SKILL_POINT ); + myskilllevel= CHAR_getInt( talker, PROFESSION_LEVEL ); + + for( j=0; jskill, 0, 0 ); + pSkil->use = 0; + } + }else if( !strcmp( buf2, "CLASS") ){ + if( getStringFromIndexWithDelim( buf1 , "=" , 2, buf2, sizeof( buf2)) ==FALSE ) continue; + if( strstr( buf2, "ALL") != NULL ){ + CHAR_setInt( toindex , PROFESSION_CLASS, 0); +#ifdef _CHANNEL_MODIFY + if(CHAR_getInt(toindex,PROFESSION_CLASS) > 0){ + int i,pclass = CHAR_getInt(toindex,PROFESSION_CLASS) - 1; + for(i=0;i= kosuu ) return TRUE; +#endif + + return FALSE; + +} + +#ifdef _NPCCHANGE_PLAYERIMG //andy +BOOL NPC_ActionChangePlayerBBI( int meindex, int charindex, char *Img) +{ + int cBBI; + char buf1[256]; + memset( buf1, 0, sizeof( buf1)); + if( !CHAR_CHECKINDEX( charindex) ) + return FALSE; + if( !CHAR_CHECKINDEX( meindex) ) + return FALSE; +#ifdef _FIXBUG_ATTACKBOW + { + int armtype; + int itemindex = CHAR_getItemIndex( charindex, CHAR_ARM); + if( ITEM_CHECKINDEX(itemindex) ){ + armtype = ITEM_getInt( itemindex, ITEM_TYPE ); + if( armtype == ITEM_BOW || armtype == ITEM_BOUNDTHROW || + armtype == ITEM_BREAKTHROW || armtype == ITEM_BOOMERANG) { + CHAR_talkToCli( charindex, -1, "使用远距离武器无法变身!", CHAR_COLORYELLOW ); + return FALSE; + } + } + + } +#endif +#ifdef _PETSKILL_BECOMEPIG + if( CHAR_getInt( charindex, CHAR_BECOMEPIG) > -1 ){//变成乌力了 + CHAR_talkToCli( charindex, -1, "无法变身,乌力化中不能变身!", CHAR_COLORYELLOW ); + return; + } +#endif + if( CHAR_getInt( charindex, CHAR_RIDEPET) != -1 ) {//骑宠不换图 + CHAR_setInt( charindex, CHAR_RIDEPET, -1 ); + BATTLE_changeRideImage( charindex ); + CHAR_talkToCli( charindex, -1, "取消骑宠状态。", CHAR_COLORYELLOW); + + //change -----> 修改bug(落马後,宠物选项的状态依然为"骑乘",这里修正过来 + CHAR_complianceParameter( charindex ); + CHAR_send_P_StatusString( charindex, CHAR_P_STRING_RIDEPET); + + //return FALSE; + } +#ifdef _ITEM_METAMO + CHAR_setWorkInt( charindex, CHAR_WORKITEMMETAMO, 0); +#endif + + if( Img == NULL || !strcmp( Img, "\0")) + return FALSE; +//======================= + CHAR_setWorkInt( charindex, CHAR_WORKNPCMETAMO, meindex); + if( strstr( Img, "NPCBBI") != NULL ) { + cBBI = CHAR_getInt( meindex, CHAR_BASEBASEIMAGENUMBER); + sprintf( buf1, "你化身成了%s的样子。", CHAR_getChar( meindex, CHAR_NAME)); + }else if( strstr( Img, "MYBBI") != NULL ) { + cBBI = CHAR_getInt( charindex, CHAR_BASEBASEIMAGENUMBER); + CHAR_setWorkInt( charindex, CHAR_WORKNPCMETAMO, 0); + sprintf( buf1, "变回了原来的样子。"); + }else if( strstr( Img, ",") != NULL ) { + int imgindex=1, maxImg=0; + while( getStringFromIndexWithDelim( Img, ",", imgindex, buf1, sizeof( buf1)) != FALSE ) { + imgindex++; + maxImg++; + } + if( (imgindex = (rand()%maxImg)) > maxImg) imgindex = 1; + if( imgindex < 1 ) imgindex = 1; + + if( getStringFromIndexWithDelim( Img, ",", imgindex, buf1, sizeof( buf1)) == FALSE ) + return FALSE; + cBBI = atoi( buf1); + sprintf( buf1, "你样子改变了。"); + }else { + cBBI = atoi( Img); + sprintf( buf1, "你样子改变了。"); + } +//======================= + if( cBBI < 0 ) { + return FALSE; + } + CHAR_talkToCli( charindex, -1, buf1, CHAR_COLORYELLOW); + //CHAR_BASEBASEIMAGENUMBER CHAR_BASEIMAGENUMBER + CHAR_setInt( charindex, CHAR_BASEIMAGENUMBER, cBBI); + CHAR_complianceParameter( charindex ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( charindex , CHAR_WORKOBJINDEX )); + CHAR_send_P_StatusString( charindex , CHAR_P_STRING_BASEBASEIMAGENUMBER); + //CHAR_K_STRING_BASEIMAGENUMBER + //CHAR_P_STRING_BASEBASEIMAGENUMBER + return TRUE; +} +#endif + +#ifdef _NPCCHANGE_PLAYERIMG +BOOL NPC_CheckPlayerBBI( int meindex, int charindex, int BBI, int flg) +{ + int MyBBI; + if( !CHAR_CHECKINDEX( charindex)) + return FALSE; + if( BBI < 0 ) + return FALSE; + MyBBI = CHAR_getInt( charindex, CHAR_BASEIMAGENUMBER); + return NPC_ActionBigSmallLastCheck( BBI, MyBBI,flg); +} +#endif + +BOOL showString( int meindex, char *showstr,int flg) +{ //广播 + char buf1[256]; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + int toindex = -1; + int floor; + int i; + if( NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)) == NULL ) { + print("\n not found argstr "); + return FALSE; + } + if( NPC_Util_GetStrFromStrWithDelim( argstr, showstr,buf1, sizeof(buf1)) == NULL ) { + strcpy( buf1, showstr); + } + toindex = -1; + floor = CHAR_getInt( meindex , CHAR_FLOOR); + while( toindex < 1000) { + toindex ++; + if( !CHAR_CHECKINDEX( toindex) ) + continue; + if( CHAR_getInt( toindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) + continue; + if( CHAR_getInt( toindex , CHAR_FLOOR) != floor ) + continue; + CHAR_talkToCli( toindex, meindex, buf1, CHAR_COLORYELLOW); + if( flg == 1 ) { + CHAR_setWorkInt( toindex, CHAR_WORKSTAKEFLAG, FALSE ); + for( i=0; i<5; i++) { + CHAR_setWorkInt( toindex, i+CHAR_WORKSTAKETYPE1, 0); + } + } + } + return TRUE; +} + +BOOL NPC_getTimeXYPoint( int meindex, int Mode) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[256], buf1[256], buf2[256]; + int fl=-1, x, y; + int GraNo = -1; + int points = 1; //条件成立为1 + if( Mode <= 0 ) { + points = 2; + } + memset( npcarg, 0, sizeof( npcarg)); + if( !CHAR_CHECKINDEX( meindex) ) return FALSE; + if( NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg)) == NULL ){ + print("WarpMan:GetArgStrErr"); + return FALSE; + } + memset( buf, 0, sizeof( buf)); + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "TimeXYPoint", buf, sizeof( buf)) != NULL ){ + if( getStringFromIndexWithDelim(buf , "&" , points, buf1, sizeof( buf1)) != FALSE ){ + memset( buf2, 0, sizeof( buf2)); + if( getStringFromIndexWithDelim(buf1 , "," , 1, buf2, sizeof( buf2)) == FALSE ){ + return FALSE; + } + fl = atoi( buf2); + if( getStringFromIndexWithDelim(buf1 , "," , 2, buf2, sizeof( buf2)) == FALSE ){ + return FALSE; + } + x = atoi( buf2); + if( getStringFromIndexWithDelim(buf1 , "," , 3, buf2, sizeof( buf2)) == FALSE ){ + return FALSE; + } + y = atoi( buf2); + if( MAP_IsValidCoordinate( fl, x, y ) == FALSE ){ + char filename[256]; + NPC_Util_CheckAssignArgFile( meindex, filename); + return FALSE; + } + if( CHAR_getInt( meindex, CHAR_FLOOR) != fl || + CHAR_getInt( meindex, CHAR_X) != x || + CHAR_getInt( meindex, CHAR_Y) != y ){ + CHAR_warpToSpecificPoint( meindex, fl , x , y); + } + } + } + + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "GraNo", buf, sizeof( buf)) != NULL ){ + if( getStringFromIndexWithDelim(buf , "&" , points, buf1, sizeof( buf1)) != FALSE ){ + GraNo = atoi( buf1); + CHAR_setInt( meindex, CHAR_BASEIMAGENUMBER, GraNo); + } + } + return TRUE; +} + +BOOL NPC_getTimeData( int meindex, char *npcarg, int *born, int *dead, int loopspeed) +{ + int i; + char buf[256]; + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "NEWTIME", buf, sizeof( buf)) != NULL ){ + for(i=0 ; i<9 ; i++){ + if( strstr( buf, TimeTble[i].arg ) != NULL){ + *born = TimeTble[i].born; + *dead = TimeTble[i].dead; + return TRUE; + } + } + } + return FALSE; +} + +BOOL NPC_CheckTimeDefine( char *timetype) +{ + LSTIME nowlstime; + int born=-1, dead=-1, finds=0, i; + + RealTimeToLSTime( NowTime.tv_sec, &nowlstime); + + for(i=0 ; i<9 ; i++){ + if( strstr( timetype, TimeTble[i].arg ) != NULL){ + born = TimeTble[i].born; + dead = TimeTble[i].dead; + finds = 1; + break; + } + } + if( finds == 0 ) return FALSE; + + if( born < dead ){ + if( (born < nowlstime.hour) && (dead > nowlstime.hour) ){ + return TRUE; + } + }else{ + if( (born < nowlstime.hour && 1024 > nowlstime.hour) || + ( 0 < nowlstime.hour && dead > nowlstime.hour)){ + return TRUE; + } + } + + return FALSE; +} + +void NPC_TimeDefineDo( int meindex, int born, int dead, int typeMode) +{ + LSTIME nowlstime; + RealTimeToLSTime( NowTime.tv_sec, &nowlstime); + if(born < dead){ + if( (born < nowlstime.hour) && (dead > nowlstime.hour) ){ + CHAR_setWorkInt(meindex,typeMode,0); + }else{ + CHAR_setWorkInt(meindex,typeMode,1); + } + }else{ + if( (born < nowlstime.hour && 1024 > nowlstime.hour) || ( 0 < nowlstime.hour && dead > nowlstime.hour)){ + CHAR_setWorkInt(meindex,typeMode,0); + }else{ + CHAR_setWorkInt(meindex,typeMode,1); + } + } + if( NPC_getTimeXYPoint( meindex, CHAR_getWorkInt( meindex, typeMode)) == FALSE ) + return; +} + + +void GetRand_WarpPoint( char *buf, int *fl, int *x, int *y ) +{ + char buff1[256],buff2[256]; + int i=0,point=1; + struct { + int m_fl; + int m_x; + int m_y; + } RandPoint[]={ + {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, + {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, + {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, + {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, + }; + while( getStringFromIndexWithDelim( buf,";",point,buff1,sizeof( buff1)) != FALSE) { + point++; + getStringFromIndexWithDelim(buff1,",",1,buff2,sizeof(buff2)); + RandPoint[i].m_fl = atoi(buff2); + getStringFromIndexWithDelim(buff1,",",2,buff2,sizeof(buff2)); + RandPoint[i].m_x = atoi(buff2); + getStringFromIndexWithDelim(buff1,",",3,buff2,sizeof(buff2)); + RandPoint[i].m_y = atoi(buff2); + i++; + if( i >= arraysizeof( RandPoint) ) + break; + } + + point = RAND( 0, i); + if( RandPoint[point].m_fl <= 0 || point > arraysizeof( RandPoint) -1) { + point = 0; + } + *fl = RandPoint[point].m_fl; + *x = RandPoint[point].m_x; + *y = RandPoint[point].m_y; + + return; +} + +#ifdef _EMENY_CHANCEMAN +int NPC_EmenyChanceCheck( int meindex, int charaindex, char *arg) +{ + char buf1[256]; + int sex=2, fl=-1,x=-1,y=-1; + memset( buf1, 0, sizeof( buf1)); + + if( NPC_Util_GetStrFromStrWithDelim( arg, "CHECKSEX", buf1, sizeof( buf1)) == NULL ) { + return charaindex; + } + if( strstr( buf1, "male") != 0 ){ + sex = 1; + } + if( NPC_Util_GetStrFromStrWithDelim( arg, "NOBATTLEWARP", buf1, sizeof( buf1)) != NULL ) { + char data[256]; + if( getStringFromIndexWithDelim( buf1,",", 1, data, sizeof(data)) == FALSE ) return charaindex; + fl = atoi( data); + if( getStringFromIndexWithDelim( buf1,",", 2, data, sizeof(data)) == FALSE ) return charaindex; + x = atoi( data); + if( getStringFromIndexWithDelim( buf1,",", 3, data, sizeof(data)) == FALSE ) return charaindex; + y = atoi( data); + } + return NPC_DischargePartyForSex( meindex, charaindex, fl, x, y, sex); +} + +int NPC_DischargePartyForSex( int meindex, int charaindex, int fl, int x, int y, int fsex) +{ + int Party[CHAR_PARTYMAX] = {-1,-1,-1,-1,-1}; + int masterindex =-1, i, j, playerNo; + if( CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE) != CHAR_PARTY_LEADER ){ + playerNo = CHAR_getInt( charaindex, CHAR_BASEBASEIMAGENUMBER); + if( CHAR_getSexInt( playerNo ) == fsex ) { + if( MAP_IsValidCoordinate( fl, x, y) != FALSE ){ + CHAR_warpToSpecificPoint( charaindex, fl, x, y); + return -1; + } + }else { + return charaindex; + } + } + CHAR_talkToCli( charaindex, -1, "团队重组!", CHAR_COLORYELLOW); + + for( i = 0; i < CHAR_PARTYMAX; i ++ ) { + int index = CHAR_getWorkInt( charaindex, CHAR_WORKPARTYINDEX1+i); + if( !CHAR_CHECKINDEX( index)) continue; + Party[i] = index;//纪录所有人 + } + CHAR_DischargePartyNoMsg( charaindex);//解散团队 + + for( i = 0; i < CHAR_PARTYMAX; i ++ ) { + int index = Party[i]; + playerNo = CHAR_getInt( index, CHAR_BASEBASEIMAGENUMBER); + if( CHAR_getSexInt( playerNo ) == fsex ) { + if( MAP_IsValidCoordinate( fl, x, y) != FALSE ){ + CHAR_warpToSpecificPoint( index, fl, x, y); + } + Party[i] = -1; + } + } + j = CHAR_WORKPARTYINDEX1; + for( i = 0; i < CHAR_PARTYMAX; i ++ ) { + int index = Party[i]; + if( !CHAR_CHECKINDEX( index ))continue; + if( !CHAR_CHECKINDEX( masterindex )){ + masterindex = index; + CHAR_setWorkInt( masterindex, CHAR_WORKPARTYMODE, CHAR_PARTY_LEADER); + CHAR_setWorkInt( masterindex, j++, masterindex); + }else { + CHAR_setWorkInt( masterindex, j++, index); + CHAR_setWorkInt( index, CHAR_WORKPARTYMODE, CHAR_PARTY_CLIENT); + CHAR_setWorkInt( index, CHAR_WORKPARTYINDEX1, masterindex); + } + } + return masterindex; +} +#endif + +#ifdef _ACTION_GMQUE +BOOL GMQUE_InSertQue( int meindex, int charaindex) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + int maxque, i, j, event; + char buf1[256],buf2[256],page[512], token[256]; +#define RAND(x,y) ((x-1)+1+ (int)( (double)(y-(x-1))*rand()/(RAND_MAX+1.0)) ) + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("GetArgStrErr"); + return FALSE; + } + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "RANDGMQUE", buf1, sizeof( buf1) ) == NULL) + return FALSE; + maxque = atoi( buf1); + + memset( token, 0, sizeof( token)); + for( i=0; i= CHAR_MAXPETHAVE ){ + snprintf( buf1,sizeof( buf1), "人物身上并没有%s LV:%d。", ENEMYTEMP_getChar( array, E_T_NAME), lvarr); + CHAR_talkToCli( charaindex, -1, buf1, CHAR_COLORYELLOW); + return FALSE; + } + } + if( CHAR_getInt( charaindex, CHAR_GMQUENUMS) <= 0 ){ + int GMQUEACTION = rand()%100; + GMQUEACTION = (GMQUEACTION<1)?1:GMQUEACTION; + CHAR_setInt( charaindex, CHAR_GMQUENUMS, GMQUEACTION); + } + + if( CHAR_getInt( charaindex, CHAR_GMQUENUMS) > 97 ){//pet + }else if( CHAR_getInt( charaindex, CHAR_GMQUENUMS) > 40 ){//item + if( CHAR_findEmptyItemBox( charaindex ) == -1 ){ + CHAR_talkToCli( charaindex, -1, "身上物品栏位已满,无法领奖。", CHAR_COLORYELLOW); + return FALSE; + } + }else {//gold + if( CHAR_getInt( charaindex, CHAR_GOLD) >= 800000 ){ + CHAR_talkToCli( charaindex, -1, "身上石币大於等於80万,无法领奖。", CHAR_COLORYELLOW); + return FALSE; + } + } + + if( count != petset ){ + sprintf( buf1,"找到%d只符合条件的宠,但需要%d只。", petset, count); + CHAR_talkToCli( charaindex, -1, buf1, CHAR_COLORYELLOW); + return FALSE; + } + return TRUE; +} + +BOOL GMQUE_DelQueStrPet( int meindex, int charaindex, int count) +{ + int i, j, k=0, petset=0; + char buf1[256], buf2[256]; + int array; + int petarray[5]={-1,-1,-1,-1,-1}; + char *bufarg = NULL; + + bufarg = CHAR_getChar( charaindex, CHAR_GMQUESTR1); + if( bufarg == NULL ) return FALSE; + for( i=0; i<4; i++) { + int petTempNo, lvarr; + if( getStringFromIndexWithDelim( bufarg, "&", i+1, buf1, sizeof(buf1)) == FALSE ) + continue; + if( getStringFromIndexWithDelim( buf1, "-", 1, buf2, sizeof(buf2)) == FALSE ) + return FALSE; +// petTempNo = ENEMY_getEnemyTempNoFromId( atoi( buf2)); + petTempNo = atoi( buf2); + array = ENEMYTEMP_getEnemyTempArrayFromTempNo( petTempNo); + if( getStringFromIndexWithDelim( buf1, "-", 2, buf2, sizeof(buf2)) == FALSE ) + return FALSE; + lvarr = atoi( buf2); + for( j=0; j= CHAR_MAXPETHAVE ){ + snprintf( buf1,sizeof( buf1), "找不到%s LV:%d。", ENEMYTEMP_getChar( array, ENEMY_NAME), lvarr); + CHAR_talkToCli( charaindex, -1, buf1, CHAR_COLORYELLOW); + return FALSE; + } + } + for( i=0; i<5; i++) { //杀宠 + char szPet[256]; + int pindex = -1; + if( petarray[i] == -1 ) break; + pindex = CHAR_getCharPet( charaindex, petarray[i]); + if( !CHAR_CHECKINDEX( pindex) ) continue; + if( CHAR_getInt( charaindex, CHAR_DEFAULTPET) == petarray[i] ) { + CHAR_setInt( charaindex, CHAR_DEFAULTPET, -1); + lssproto_KS_send( getfdFromCharaIndex( charaindex), -1, TRUE); + } + snprintf( szPet,sizeof( szPet), "交出%s。", CHAR_getChar( pindex, CHAR_NAME)); + CHAR_talkToCli( charaindex, -1, szPet, CHAR_COLORYELLOW); + CHAR_setCharPet( charaindex, petarray[i], -1); + CHAR_endCharOneArray( pindex ); + snprintf( szPet, sizeof( szPet ), "K%d", petarray[i]); + CHAR_sendStatusString( charaindex, szPet ); + petset++; + } + if( count != petset ) return FALSE; + return TRUE; +} + +BOOL GMQUE_AddQueStrTrophy( int meindex, int charaindex) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + int array, rands=0; + int petID[4]={1642,1636,475}; + + int itemID1[9]={ 20131, 20594, 20171, 17005, 20210, 20211, 20212, 20213, 2435};//道具 + int itemID2[6]={ 17759, 17259, 14752, 15053, 14154, 16556}; + int itemID3[2]={ 20282, 20273}; + int itemID4[8]={ 14693, 15233, 17053, 17056, 14364, 15023, 15562, 17603}; + int itemID5[8]={ 3843, 14902, 6214, 15235, 4474, 17005, 17554, 17558}; + + int Gold[5]={ 20000, 50000, 100000, 150000, 200000}; + char token[256]; +#define RAND(x,y) ((x-1)+1+ (int)( (double)(y-(x-1))*rand()/(RAND_MAX+1.0)) ) + + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("GetArgStrErr"); + return FALSE; + } + rands = CHAR_getInt( charaindex, CHAR_GMQUENUMS); + if( rands > 97 ){//pet + int ret, i; + rands = RAND(0,3); + array = ENEMY_getEnemyArrayFromId( petID[rands]); + ret = ENEMY_createPetFromEnemyIndex( charaindex, array); + if( !CHAR_CHECKINDEX( ret )) return FALSE; + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ) { + if( CHAR_getCharPet( charaindex, i ) == ret ) + break; + } + if( i == CHAR_MAXPETHAVE ) return FALSE; + if( CHAR_CHECKINDEX( ret ) == TRUE ){ + CHAR_setMaxExpFromLevel( ret, CHAR_getInt( ret, CHAR_LV )); + } + snprintf( token,sizeof( token), "拿到%s。", CHAR_getChar( ret, CHAR_NAME)); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW); + CHAR_complianceParameter( ret ); + snprintf( token, sizeof( token ), "K%d", i ); + CHAR_sendStatusString( charaindex, token ); + snprintf( token, sizeof( token ), "W%d", i ); + CHAR_sendStatusString( charaindex, token ); + }else if( rands > 40 ){//item + int itemindex=-1, ret; + rands = RAND(0,100); + if( rands == 0 ){ + itemindex = ITEM_makeItemAndRegist( itemID3[ RAND(0,1)]); + }else if( rands >= 97 ){ + itemindex = ITEM_makeItemAndRegist( itemID2[ RAND(0,5)]); + }else if( rands >= 70){ + itemindex = ITEM_makeItemAndRegist( itemID4[ RAND(0,7)]); + }else if( rands >= 40){ + itemindex = ITEM_makeItemAndRegist( itemID5[ RAND(0,7)]); + }else { + itemindex = ITEM_makeItemAndRegist( itemID1[ RAND(0,8)]); + } + if(itemindex == -1) return FALSE; + ret = CHAR_addItemSpecificItemIndex( charaindex, itemindex); + if( ret < 0 || ret >= CHAR_MAXITEMHAVE ) { + ITEM_endExistItemsOne( itemindex); + return FALSE; + } + sprintf( token,"拿到%s",ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW ); + CHAR_sendItemDataOne( charaindex, ret); + }else {//石币 + int Golds=0; + rands = RAND(0,30); + if( rands >= 15 ){ + Golds = Gold[0]; + }else if( rands >= 10 ){ + Golds = Gold[1]; + }else{ + rands = RAND(2,4); + Golds = Gold[rands]; + } + CHAR_AddGold( charaindex, Golds); + } + GMQUE_cleanQueStr( charaindex); + return TRUE; +} + +BOOL CheckGmQueflg( int talker,int nCount,int flg) +{ + int myGmflg; + myGmflg = CHAR_getInt(talker, CHAR_GMQUEFLG); + if( NPC_ActionBigSmallLastCheck( nCount, myGmflg, flg ) == TRUE ) { + return TRUE; + } + return FALSE; +} +#endif + +BOOL NPC_ActionDuelRankCheck(int meindex,int talker,int rank,int flg) +{ + int myrank; + myrank=CHAR_getWorkInt(talker,CHAR_WORKSHOPRELEVANTSEC); + if( NPC_ActionBigSmallLastCheck( rank, myrank, flg)==TRUE){ + return TRUE; + } + + return FALSE; +} + +BOOL NPC_ActionDuelPointCheck(int meindex,int talker,int rank,int flg) +{ + int myduel; + myduel = CHAR_getInt( talker, CHAR_DUELPOINT); + if( NPC_ActionBigSmallLastCheck( rank, myduel, flg)==TRUE){ + return TRUE; + } + + return FALSE; +} + +#ifdef _ACTION_BULLSCR//CheckABulltime +BOOL NPC_ActionCheckABulltime( int meindex,int talker,int nCount,int flg) +{ + int ntime, nowtime, dntime; + ntime = CHAR_getInt(talker, CHAR_ABULLSTARTTIME); + nowtime = (int)time( NULL); + dntime = (nowtime - ntime); + + nCount = (nCount*24)*(60*60);//换算成秒数 + if( NPC_ActionBigSmallLastCheck( nCount, dntime, flg ) == TRUE ) { + return TRUE; + } + return FALSE; +} + +BOOL NPC_ActionCheckABullstart( int meindex,int talker,int start,int flg) +{ + int myStart; + myStart = CHAR_getInt(talker, CHAR_ABULLSTART); + if( NPC_ActionBigSmallLastCheck( start, myStart, flg ) == TRUE ) { + return TRUE; + } + return FALSE; +} +BOOL NPC_ActionCheckABullscore( int meindex,int talker,int score,int flg) +{ + int myScore; + myScore = CHAR_getInt(talker, CHAR_ABULLSCORE); + if( NPC_ActionBigSmallLastCheck( score, myScore, flg ) == TRUE ) { + return TRUE; + } + return FALSE; +} + +BOOL NPC_ActionCheckABullEvent( int meindex, int talker) +{ + int i; + int Event[12]={12, 38, 22, 17, 32, 33, 34, 30, 31, 64, 81, 111}; + //NPC_NowEventCheckFlg + char Eventarg[12][256]={ + "梦德洞窟任务", "马祖任务", "强恩一族", "龙穴任务", "梦幻洞窟", "梦幻洞窟", "梦幻洞窟", + "黄金羚羊", "五兄弟之谜", "四圣石任务", "金飞任务", "火灵勇士任务" }; + + for( i=0; i<12; i++){ + if( NPC_EventCheckFlg( talker, Event[i]) == FALSE ){ + char token[256]; + sprintf( token, "你尚未完成[%s]。", Eventarg[i] ); + CHAR_talkToCli( talker, -1, token, CHAR_COLORYELLOW); + return FALSE; + } + } + + return TRUE; +} +#endif + +BOOL NPC_ActionTreasureTypeCheck(int meindex,int level, int type, int flg) +{ + int mylevel; + +// if( CHAR_getWorkInt( meindex, NPC_TIME_EVENTMODE) == NPC_EVENTMODE_EVENT ){ + mylevel = (type == NPC_EVENTMODE_EVENT)?1:0; + if( NPC_ActionBigSmallLastCheck( level, mylevel, flg)==TRUE) + return TRUE; + return FALSE; +} + +BOOL NPC_ActionTreasureRandItemGet(int meidex,int talker,int rand_j,char *buf) +{ + char buff2[64]; + int randitem; + int ret; + int itemindex; + char token[128]; + + if(rand_j == 0) { + print("Event:由於0的介入,出现错误。"); + return FALSE; + } + + randitem = rand()%rand_j; + if(randitem == 0) randitem = rand_j; + + getStringFromIndexWithDelim(buf , "," , randitem, buff2, sizeof(buff2)) ; + + itemindex = ITEM_makeItemAndRegist( atoi( buff2)); + + if(itemindex == -1) return FALSE; + + /*失奶 丞及馨笛( 涛失奶 丞 卞中木化仄引丹 */ + ret = CHAR_addItemSpecificItemIndex( talker, itemindex); + if( ret < 0 || ret >= CHAR_MAXITEMHAVE ) { + print( "npc_exchangeman.c: additem error itemindex[%d]\n", itemindex); + ITEM_endExistItemsOne( itemindex); + return FALSE; + } + + if(itemindex != -1) { + LogItem( + CHAR_getChar( talker, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( talker, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID), /* 失奶 丞 寞 */ +#endif + "EventAddItem(任务需求所得到的道具)", + CHAR_getInt( talker,CHAR_FLOOR), + CHAR_getInt( talker,CHAR_X ), + CHAR_getInt( talker,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + } + + sprintf(token,"收下了%s",ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( talker, -1, token, CHAR_COLORWHITE); + + CHAR_sendItemDataOne( talker, ret); + return TRUE; + +} + +#ifdef _NPC_ADDLEVELUP // (不可开) ANDY 外部测试机用来增加玩家等级 +extern tagRidePetTable ridePetTable[296]; +void NPC_ActionLevelAndTransUp( int meindex, int charindex, int level, int skillpoint, int exp, int ridepet) +{ + char szBuffer[256]=""; + if( !CHAR_CHECKINDEX( charindex) ) + return; +//int CHAR_LevelUpCheck( int charaindex , int toindex) + if( exp > 0 ){ + int LevelUp=0; + int myexp = CHAR_getInt( charindex, CHAR_EXP); + myexp += exp; + if( myexp > 300000000 ) myexp = 300000000; + CHAR_setInt( charindex, CHAR_EXP, myexp); + snprintf( szBuffer, sizeof(szBuffer), + "(%s) 得到 EXP %d", CHAR_getUseName( charindex ), exp); + CHAR_talkToCli( charindex, -1, szBuffer, CHAR_COLORYELLOW); + LevelUp = CHAR_LevelUpCheck( charindex , -1); + if( LevelUp > 0 ){ + snprintf( szBuffer, sizeof(szBuffer), + "(%s) 升级至 %d", + CHAR_getUseName( charindex ), + CHAR_getInt( charindex, CHAR_LV ) + ); + CHAR_talkToCli( charindex, -1, szBuffer, CHAR_COLORYELLOW); + CHAR_setInt( charindex, CHAR_SKILLUPPOINT, + CHAR_getInt( charindex, CHAR_SKILLUPPOINT) + LevelUp*3 ); + CHAR_complianceParameter( charindex ); + } + } + + if( level > 0 ){ + CHAR_setInt( charindex, CHAR_LV, level); + snprintf( szBuffer, sizeof(szBuffer), + "(%s) 等级设定为 %d", + CHAR_getUseName( charindex ), CHAR_getInt( charindex, CHAR_LV ) + ); + CHAR_talkToCli( charindex, -1, szBuffer, CHAR_COLORYELLOW); + } + + if( skillpoint > 0 ){ + int MySp = CHAR_getInt( charindex, CHAR_SKILLUPPOINT); + MySp += skillpoint; + CHAR_setInt( charindex, CHAR_SKILLUPPOINT, MySp); + } + if( ridepet >= 0 ){ + int basepet[2][4]={ {2066,2067,2068,2069}, + {2072,2073,2074,2075}}; + int petTemp[]={-1,-1,-1,-1,-1}; + char msgbuf[256]; + int petNum=0; + int i,j=0; + int k=0, petindex,enemyarray; + petTemp[j++] = basepet[0][rand()%4]; + petTemp[j++] = basepet[1][rand()%4]; + + for( i=0; i< arraysizeof(ridePetTable) ; i++ ){ + if( CHAR_getInt( charindex, CHAR_BASEBASEIMAGENUMBER) == ridePetTable[i].charNo ){ + petTemp[j]= ridePetTable[i].petId; + j++; + if( j >= arraysizeof( petTemp) ) + break; + } + } + j=0; + for( petNum=0; petNum= CHAR_MAXITEMHAVE ) + return FALSE; + } + return TRUE; +} + +BOOL NPC_ActionMissionHeroCheck(int meindex,int talker,int mission,int flg,int checkitem) +{ + int mindex; + char nameinfo[64]; + int i, itemindex, itemid; + + mindex = checkIfAngel( talker); + if( mindex <= -1 ) return FALSE; + if( missiontable[mindex].mission != mission) return FALSE; + getMissionNameInfo( talker, nameinfo); + if( strcmp( nameinfo, missiontable[mindex].heroinfo )) return FALSE; + if( missiontable[mindex].flag != flg ) return FALSE; + + if( checkitem ) { // 有无信物 + for( i=CHAR_STARTITEMARRAY;i= CHAR_MAXITEMHAVE ) + return FALSE; + } + + return TRUE; +} + + +BOOL NPC_HeroCompleteCountCheck(int meindex,int talker,int count,int flg) +{ + + int herocnt; + herocnt = CHAR_getInt(talker,CHAR_HEROCNT); + + if(NPC_EventBigSmallLastCheck( count, herocnt, flg) == TRUE) + { + if(flg == 3) return FALSE; + return TRUE; + } + + if(flg == 3) return TRUE; + return FALSE; + +} + + + +#endif diff --git a/gmsv/npc/npc_exchangeman.c b/gmsv/npc/npc_exchangeman.c new file mode 100644 index 0000000..5fe99eb --- /dev/null +++ b/gmsv/npc/npc_exchangeman.c @@ -0,0 +1,4348 @@ +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "net.h" +#include "char_base.h" +#include "npcutil.h" +#include "lssproto_serv.h" +#include "npc_exchangeman.h" +#include "npc_eventaction.h" +#include "log.h" +#include "battle.h" +#include "handletime.h" +#include "enemy.h" +#include "npc_warp.h" + +static void NPC_ExChangeMan_selectWindow( int meindex, int talker,int num); +BOOL NPC_TypeCheck(int meindex,int talker,char *szMes); +int NPC_ExChangeManEventCheck( int meindex, int talker, char *buff1); +BOOL NPC_EventItemCheck(int meindex,int talker,int itemNo,int flg); +BOOL NPC_EventLevelCheck(int meindex,int talker,int level,int flg); +// Arminius 8.14 move to .h (for pet talk) +//BOOL NPC_EventBigSmallCheck(int meindex,int talker,char* buf); +BOOL NPC_EventFreeIfCheck(int meindex,int talker,char* buf,int kosuu,int flg); +BOOL NPC_EventBigSmallLastCheck(int point1,int mypoint,int flg); +BOOL NPC_ENDEventNoCheck(int meindex,int talker,int shiftbit,int flg); +BOOL NPC_NOWEventNoCheck(int meindex,int talker,int shiftbit,int flg); +BOOL NPC_TiemCheck(int meindex,int talker,int time,int flg); +BOOL NPC_EventAddPet(int meindex, int talker, char *buff2,int mode); +BOOL NPC_RandItemGet(int meindex, int talker,int rand_j,char *buf); + +BOOL NPC_PetLvCheckType2(int petindex,int meindex,int talker,char *buf,int mode); +BOOL NPC_PetLvCheck(int meindex,int talker,char *buf,int mode); +void NPC_RequestMain(int meindex,int talker,char *buf); +void NPC_AcceptMain(int meindex,int talker ,char*buf); +void NPC_MsgDisp(int meindex,int talker,int num); +BOOL NPC_EventAdd(int meindex,int talker,int mode); +BOOL NPC_AcceptDel(int meindex,int talker,int mode); +BOOL NPC_SavePointCheck(int meindex,int talker,int shiftbit,int flg); + +BOOL NPC_EventReduce(int meindex,int talker,char *buf); +BOOL NPC_EventDelItem(int meindex,int talker,char *buf,int breakflg); +BOOL NPC_EventDelItemEVDEL(int meindex,int talker,char *buf,char *nbuf,int breakflg); +BOOL NPC_EventAddItem(int meindex,int talker,char *buf); +int NPC_EventFile(int meindex,int talker,char *buf); +BOOL NPC_EventDelPet(int meindex,int talker, int petsel); +void NPC_PetSkillMakeStr(int meindex,int toindex,int select); +void NPC_CleanMain(int meindex,int talker,char *buf); +void NPC_EventPetSkill( int meindex, int talker, char *data); +BOOL NPC_ItemFullCheck(int meindex,int talker,char *buf,int mode,int evcnt); +void NPC_CharmStatus(int meindex,int talker); +BOOL NPC_ImageCheck(int meindex,int talker,int kosuu,int flg); +int NPC_EventGetCost(int meindex,int talker,char *arg); + +BOOL NPC_EventWarpNpc(int meindex,char *buf); + + +enum { + CHAR_WORK_EVENTWARP = CHAR_NPCWORKINT4, + +}; + +/********************************* +* 赓渝质 +*********************************/ +BOOL NPC_ExChangeManInit( int meindex ) +{ + + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[1024*2]; + int i = 1; + char buf4[256]; + + CHAR_setWorkInt(meindex,CHAR_WORK_EVENTWARP,1); + +#if 0 + char buf2[512]; + char buf3[256]; + int j=1; + int nameflg=0; + int itemno; + char *ret; + char sendbuf[2][10]={"无法传送。","可以传送。"}; + char droplogbuf[2][10]={"没消失。","消失了。"}; + int flg=0; +#endif + + + /*--NPC及正奶皿毛本永玄允月--*/ + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPEEVENT ); + + + /*--涩烂白央奶伙毛 心 心--*/ + if(NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)) == NULL) { + print("NPC_ExChange.c TypeCheck: GetArgStrErr\n"); + print("NPCName=%s\n", CHAR_getChar( meindex ,CHAR_NAME)); + return FALSE; + } + + i = 1; + /*--奶矛件玄NPC互健丹失奶 丞毛民尼永弁允月--*/ + /*--民尼永弁嫩 } 午仄化壅尹月井"}矢永玄丢□伙匹霜木月井"--*/ + while(getStringFromIndexWithDelim( argstr ,"EventEnd" ,i ,buf ,sizeof(buf)) + != FALSE) + { + i++; + /*--仇仇匹踏井木化中月及反}伐□瓦件弘毛请允-*/ + if(strstr( buf,"GetItem") != NULL) { + if(strstr( buf,"ItemFullMsg") == NULL) { + NPC_Util_GetStrFromStrWithDelim(buf,"EventNo",buf4,sizeof(buf4)); + print("\n### EventNo=%d %s:ItemFullMsg 脱离###", + atoi( buf4), + CHAR_getChar( meindex, CHAR_NAME)); + } + } + + if(strstr( buf,"GetPet") != NULL) { + if(strstr( buf,"PetFullMsg") == NULL) { + NPC_Util_GetStrFromStrWithDelim(buf,"EventNo",buf4,sizeof(buf4)); + print("\n### ventNo=%d %s:PetFullMsg 脱离 ###", + atoi(buf4), + CHAR_getChar(meindex,CHAR_NAME)); + } + } + + if(strstr( buf,"GetEgg") != NULL) { + if(strstr( buf,"PetFullMsg") == NULL) { + NPC_Util_GetStrFromStrWithDelim(buf,"EventNo",buf4,sizeof(buf4)); + print("\n### ventNo=%d %s:PetFullMsg 脱离 ###", + atoi(buf4), + CHAR_getChar(meindex,CHAR_NAME)); + } + } + + if(strstr( buf,"GetStone") != NULL){ + if(strstr( buf,"StoneFullMsg") == NULL){ + NPC_Util_GetStrFromStrWithDelim(buf,"EventNo",buf4,sizeof(buf4)); + print("\n### EventNo=%d %s:StonFullMsg 脱离 ###", + atoi( buf4), + CHAR_getChar( meindex, CHAR_NAME)); + } + } + + if(strstr( buf,"DelStone") != NULL) { + if(strstr( buf,"StoneLessMsg") == NULL) { + NPC_Util_GetStrFromStrWithDelim(buf,"EventNo",buf4,sizeof(buf4)); + print("\n### EventNo=%d %s:StoneLessMsg 脱离 ###", + atoi(buf4), + CHAR_getChar(meindex,CHAR_NAME)); + } + } + } + + + i = 1; + +#if 0 + /*--奶矛件玄NPC互健丹失奶 丞毛民尼永弁允月--*/ + /*--民尼永弁嫩 } 午仄化壅尹月井"}矢永玄丢□伙匹霜木月井"--*/ + while(getStringFromIndexWithDelim( argstr ,"EventEnd" ,i ,buf ,sizeof(buf)) + !=FALSE) + { + i++; + /*--仇仇匹踏井木化中月及反}伐□瓦件弘毛请允-*/ + if(NPC_Util_GetStrFromStrWithDelim( buf,"GetItem", buf2,sizeof( buf2)) + !=NULL) + { + j=1; + flg=0; + while(getStringFromIndexWithDelim( buf2,",", j, buf3, sizeof(buf3)) + !=FALSE) + { + j++; + if(strstr( buf2, "*")!=NULL){ + getStringFromIndexWithDelim( buf3 ,"*" ,1, buf4 ,sizeof(buf4)); + itemno = atoi(buf4); + }else{ + /*--失奶 丞瓜件田□必永玄--*/ + itemno = atoi(buf3); + } + + ret=NPC_Util_GetStrFromStrWithDelim( buf,"NoWarning", buf4,sizeof(buf4)); + if(ret != NULL){ + char buff[8]; + int k=1; + + while(getStringFromIndexWithDelim( buf4,"," ,k ,buff, sizeof(buff)) + !=FALSE){ + k++; + if(itemno == atoi(buff)) + { + flg=1; + break; + } + } + } + + if(flg == 0){ + if( (itemno >=2400 && itemno < 3000) &&( + (ITEM_getdropatlogoutFromITEMtabl(itemno) == 1) + || (ITEM_getvanishatdropFromITEMtabl(itemno) == 1) + || (ITEM_getcanpetmailFromITEMtabl(itemno) == 0)) + ){ + if(nameflg==0){ + print("\n%s",CHAR_getChar( meindex ,CHAR_NAME)); + nameflg=1; + } + print("\nID:%-5d,Logout:%-8s,DropCls:%-8s,SendMail:%-8s,%-16s", + itemno, + droplogbuf[ITEM_getdropatlogoutFromITEMtabl(itemno)], + droplogbuf[ITEM_getvanishatdropFromITEMtabl(itemno)], + sendbuf[ITEM_getcanpetmailFromITEMtabl(itemno)], + ITEM_getNameFromNumber(itemno) + ); + } + } + + } + } + + } +#endif + return TRUE; + +} + +/*-- 及啖 --*/ +BOOL NPC_EventWarpNpc(int meindex,char *buf) +{ + char token[32]; + char buf2[32]; + int floor,x,y; + int ret; + int cnt; + int dcnt = 1; + + /*--蜇箕及伐□皿及赐 --*/ + cnt = CHAR_getWorkInt(meindex,CHAR_WORK_EVENTWARP); + while(getStringFromIndexWithDelim(buf,",", dcnt,buf2,sizeof(buf2) ) + !=FALSE ){ + dcnt++; + } + + if(dcnt <= cnt) cnt=1; + + + while(getStringFromIndexWithDelim(buf,",", cnt,buf2,sizeof(buf2)) !=FALSE ) + { + cnt++; + ret=getStringFromIndexWithDelim(buf2,".", 1,token,sizeof(token)); + if( ret == FALSE ) { + continue; + } + floor = atoi( token ); + + ret=getStringFromIndexWithDelim(buf2,".", 2,token,sizeof(token)); + if( ret == FALSE ){ + continue; + } + x = atoi( token ); + + ret=getStringFromIndexWithDelim(buf2,".", 3,token,sizeof(token)); + if( ret == FALSE ) { + continue; + } + y = atoi( token ); + + CHAR_setWorkInt(meindex,CHAR_WORK_EVENTWARP, cnt); + CHAR_warpToSpecificPoint(meindex, floor, x, y); + return TRUE; + } + + return FALSE; + +} + + +/********************************* +* 仄井仃日木凶凛及质 +*********************************/ +void NPC_ExChangeManTalked( int meindex , int talkerindex , char *szMes ,int color ) +{ + /* 皿伊奶乩□卞覆仄化分仃 杀允月 */ + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) { + return; + } + + /*-- 及蟆卞中月井升丹井"--*/ + if(NPC_Util_isFaceToFace( meindex ,talkerindex ,2) == FALSE) { + /* ㄠ弘伉永玉动 及心 */ + if(NPC_Util_isFaceToChara(talkerindex,meindex,1 ) == FALSE) return; + } + + /*--皿伊奶乩□及伐□弁 毛赓渝祭--*/ + CHAR_setWorkInt( talkerindex ,CHAR_WORKSHOPRELEVANT, 0); + CHAR_setWorkInt( talkerindex ,CHAR_WORKSHOPRELEVANTSEC, 0); + CHAR_setWorkInt( talkerindex ,CHAR_WORKSHOPRELEVANTTRD, 0); + + /*--正奶皿 卞坌仃月--*/ + NPC_TypeCheck( meindex, talkerindex, szMes); + +} + +/*------------------------------------------------------------ + *涩烂白央奶伙毛 心 心}椭瘀互丐匀凶正奶皿及质 毛允月 + *-------------------------------------------------------------*/ +BOOL NPC_TypeCheck(int meindex,int talker,char *szMes) +{ + + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[1024*2]; + char buf2[512]; + int i = 1; + int EvNo; + int evch; + + /*--涩烂白央奶伙毛 心 心--*/ + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { + print("NPC_ExChange.c TypeCheck: GetArgStrErr\n"); + print("NPCName=%s\n", CHAR_getChar(meindex,CHAR_NAME)); + return FALSE; + } + + /*-- 涩烂白央奶伙毛坌喃允月 --*/ + while(getStringFromIndexWithDelim( argstr,"EventEnd",i,buf,sizeof( buf)) + != FALSE){ + i++; + CHAR_setWorkInt( talker, CHAR_WORKSHOPRELEVANT, 0); + CHAR_setWorkInt( talker, CHAR_WORKSHOPRELEVANTSEC, 0); + + /*-- 奶矛件玄瓜件田□毛必永玄 --*/ + if(NPC_Util_GetStrFromStrWithDelim(buf,"EventNo", + buf2, sizeof( buf2) ) == NULL) continue; + + if(strstr( buf2, "-") != 0) { + EvNo = -1; + }else{ + EvNo = atoi( buf2); + } + + /*-- 白仿弘民尼永弁毛垫丹[允匹卞奶矛件玄互蔽 仄化中月桦宁反戚尺 --*/ + if(NPC_EventCheckFlg( talker, EvNo) == TRUE) continue; + + /*--平□伐□玉及民尼永弁毛垫丹--*/ + if(NPC_Util_GetStrFromStrWithDelim( buf,"KeyWord", buf2,sizeof( buf2) ) + != NULL){ + if(strcmp( szMes, buf2) != 0) continue; + CHAR_setWorkInt( talker, CHAR_WORKSHOPRELEVANT, i); + } + + /*--矢永玄及 蟆及民尼永弁互 匀化月井毛民尼永弁--*/ + if(NPC_Util_GetStrFromStrWithDelim( buf,"Pet_Name", buf2,sizeof( buf2)) != NULL){ + CHAR_setWorkInt( talker, CHAR_WORKSHOPRELEVANTSEC, 1); + } + evch = NPC_ExChangeManEventCheck( meindex, talker, buf); + if(evch != -1) { + if(NPC_Util_GetStrFromStrWithDelim( buf,"TYPE", buf2, sizeof( buf2)) != NULL){ + + if( strstr( buf2, "REQUEST") != NULL) { + NPC_RequestMain( meindex, talker, buf); + return TRUE; + }else if( strstr( buf2, "ACCEPT") != NULL) { + /*-匙 毛熬仃午月 --*/ + NPC_AcceptMain( meindex, talker, buf); + return TRUE; + + }else if(strstr( buf2, "MESSAGE") != NULL) { + char token[14*100]; + char token2[14*50]; + if(NPC_Util_GetStrFromStrWithDelim( buf,"NomalMsg", token,sizeof( token) ) + != NULL ) { + if(NPC_AcceptDel( meindex, talker, 0) == FALSE) return FALSE; + if(EvNo != -1) + NPC_NowEventSetFlg( talker, EvNo); + CHAR_talkToCli( talker, meindex, token, CHAR_COLORWHITE); + if(NPC_Util_GetStrFromStrWithDelim( buf,"NpcWarp", token2,sizeof( token2) ) + != NULL){ + NPC_EventWarpNpc(meindex,token2); + } + if(NPC_Util_GetStrFromStrWithDelim( buf, "EndSetFlg", buf2, sizeof( buf2) ) + !=NULL){ + char buf3[16]; + int k = 1; + if(EvNo != -1) NPC_NowEventSetFlgCls( talker, EvNo); + while(getStringFromIndexWithDelim(buf2 , "," ,k, buf3, sizeof(buf3)) + !=FALSE ){ + k++; + NPC_EventSetFlg( talker, atoi( buf3)); + } + } + if( NPC_Util_GetStrFromStrWithDelim( buf, "CleanFlg", + buf2, sizeof( buf2)) != NULL) { + char buf3[16]; + int k = 1; + k= 1 ; + while(getStringFromIndexWithDelim(buf2 , "," , k, + buf3, sizeof(buf3)) + != FALSE ){ + NPC_NowEndEventSetFlgCls( talker, atoi(buf3)); + k++; + } + } +#ifdef _ANGEL_SUMMON + // 完成召唤任务 + if( NPC_Util_GetStrFromStrWithDelim( buf, "MISSIONOVER", + buf2, sizeof( buf2)) != NULL) + { + int mindex; + int mission; + char nameinfo[64]; + + mission = atoi( buf2); + mindex = checkIfAngel( talker); + + if( mission == missiontable[mindex].mission ) + { + char msg[1024]; + + print(" ====完成召唤任务==== "); + + CHAR_setInt( talker, CHAR_HEROCNT, + CHAR_getInt( talker, CHAR_HEROCNT)+1 ); + getMissionNameInfo( talker, nameinfo); + saacproto_ACMissionTable_send( acfd, MISSION_HERO_COMPLETE, 4, nameinfo, ""); + sprintf( msg, " 完成任务 i:%d m:%d %s ", mindex, mission, nameinfo); + print( msg); + LogAngel( msg ); + } + + } + + // 清除召唤任务 + if( NPC_Util_GetStrFromStrWithDelim( buf, "MISSIONCLEAN", + buf2, sizeof( buf2)) != NULL) + { + int mindex; + int mission; + char nameinfo[64]; + + mission = atoi( buf2); + mindex = checkIfAngel( talker); + + if( mission == missiontable[mindex].mission ) + { + char msg[1024]; + + getMissionNameInfo( talker, nameinfo); + saacproto_ACMissionTable_send( acfd, mindex, 3, nameinfo, ""); + + sprintf( msg, " 放弃任务 i:%d m:%d %s ", mindex, mission, nameinfo); + print( msg); + LogAngel( msg ); + } + + } +#endif + + }else if(NPC_Util_GetStrFromStrWithDelim(buf, "NomalWindowMsg", + token, sizeof( token) ) + !=NULL) { + /*--它奶件玉它匹丢永本□斥毛忒允--*/ + int fd = getfdFromCharaIndex( talker); +#ifdef _NEWEVENT + if(NPC_Util_GetStrFromStrWithDelim(buf, "NomalWindowMsg1", + buf2, sizeof(buf2)) != NULL){ + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_NEXT, + CHAR_WINDOWTYPE_WINDOWEVENT_STARTMSG, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + }else { +#endif + char token2[14*50]; + if(NPC_AcceptDel( meindex, talker,0) == FALSE) return FALSE; + if( EvNo != -1) NPC_NowEventSetFlg( talker, EvNo); + + if(NPC_Util_GetStrFromStrWithDelim( buf,"NpcWarp", + token2,sizeof( token2) ) != NULL){ + NPC_EventWarpNpc(meindex,token2); + } + if(NPC_Util_GetStrFromStrWithDelim( buf, "EndSetFlg", + buf2, sizeof( buf2) ) !=NULL){ + char buf3[16]; + int k = 1; + if(EvNo != -1) NPC_NowEventSetFlgCls( talker, EvNo); + while(getStringFromIndexWithDelim(buf2 , "," ,k, + buf3, sizeof(buf3)) !=FALSE ){ + k++; + NPC_EventSetFlg( talker, atoi( buf3)); + } + } + //奶矛件玄白仿弘毛壅允 + if( NPC_Util_GetStrFromStrWithDelim( buf, "CleanFlg", + buf2, sizeof( buf2)) != NULL) { + char buf3[16]; + int k = 1; + + k= 1 ; + while(getStringFromIndexWithDelim(buf2 , "," , k, + buf3, sizeof(buf3)) != FALSE ){ + NPC_NowEndEventSetFlgCls( talker, atoi(buf3)); + k++; + } + } +#ifdef _ANGEL_SUMMON + // 完成召唤任务 + if( NPC_Util_GetStrFromStrWithDelim( buf, "MISSIONOVER", + buf2, sizeof( buf2)) != NULL) + { + int mindex; + int mission; + char nameinfo[64]; + + mission = atoi( buf2); + mindex = checkIfAngel( talker); + + if( mission == missiontable[mindex].mission ) + { + char msg[1024]; + + print(" ====完成召唤任务==== "); + + CHAR_setInt( talker, CHAR_HEROCNT, + CHAR_getInt( talker, CHAR_HEROCNT)+1 ); + getMissionNameInfo( talker, nameinfo); + saacproto_ACMissionTable_send( acfd, MISSION_HERO_COMPLETE, 4, nameinfo, ""); + sprintf( msg, " 完成任务 i:%d m:%d %s ", mindex, mission, nameinfo); + print( msg); + LogAngel( msg ); + } + + } + + // 清除召唤任务 + if( NPC_Util_GetStrFromStrWithDelim( buf, "MISSIONCLEAN", + buf2, sizeof( buf2)) != NULL) + { + int mindex; + int mission; + char nameinfo[64]; + + mission = atoi( buf2); + mindex = checkIfAngel( talker); + + if( mission == missiontable[mindex].mission ) + { + print(" ====清除召唤任务==== "); + + getMissionNameInfo( talker, nameinfo); + saacproto_ACMissionTable_send( acfd, mindex, 3, nameinfo, ""); + } + + } +#endif + + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_YES, + CHAR_WINDOWTYPE_WINDOWEVENT_STARTMSG, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); +#ifdef _NEWEVENT + } +#endif + } + + return TRUE; + + }else if(strstr( buf2, "CLEAN") != NULL) { + NPC_CleanMain( meindex, talker, buf); + return TRUE; + } + } + } + } + + strcpy( buf, "\0"); + if( NPC_Util_GetStrFromStrWithDelim( argstr, "NomalMainMsg", buf, sizeof( buf)) == NULL ) { + print("\n err:NOT FIND NomalMainMsg"); + return FALSE; + } + i = 1; + while(getStringFromIndexWithDelim( buf, ",", i, buf2, sizeof( buf2))!= FALSE){ + i++; + } + i--; + i = rand()%i + 1; + getStringFromIndexWithDelim( buf,",", i, buf2, sizeof( buf2)); + CHAR_talkToCli( talker, meindex, buf2, CHAR_COLORWHITE); + return TRUE; +} + + +/*----------------------------------- + *正奶皿 卞质 毛坌仃月 + ------------------------------------*/ +static void NPC_ExChangeMan_selectWindow( int meindex, int talker,int num) +{ + + switch( num) { + /*--伉弁巨旦玄滇--*/ + case 0: + /*-奶矛件玄 卅及匹}奶矛件玄毛鞅户月井升丹井毛 丹--*/ + NPC_MsgDisp( meindex, talker, 0); + break; + + case 1: + /*--蕙筋卞奶矛件玄垫丹--*/ + NPC_MsgDisp( meindex, talker, 5); + break; + + /*--失弁本皿玄滇--*/ + case 2: + /*--熬仃潸曰--*/ + NPC_MsgDisp( meindex, talker, 6); + break; + + case 3: + /*--熬仃潸曰--*/ + NPC_MsgDisp( meindex, talker, 11); + break; + } + +} + +/*------------------------------------- + *奶矛件玄毛匙 允月质 及丢奶件 + --------------------------------------*/ +void NPC_RequestMain(int meindex,int talker,char *buf) +{ + int shiftbit; + char buf2[128]; + + /*--奶矛件玄瓜件田□毛必永玄--*/ + NPC_Util_GetStrFromStrWithDelim( buf,"EventNo", buf2,sizeof( buf2) ); + shiftbit = atoi( buf2); + + if(NPC_NowEventCheckFlg( talker, shiftbit) == TRUE) { + NPC_ExChangeMan_selectWindow( meindex, talker, 0); + }else{ + NPC_ExChangeMan_selectWindow( meindex, talker, 1); + } +} + +/*--------------------------------------- + * 奶矛件玄蔽 及丢奶件 + ----------------------------------------*/ +void NPC_AcceptMain(int meindex,int talker ,char *buf) +{ + + NPC_ExChangeMan_selectWindow( meindex, talker, 2); +} + +/*---------------------------------------- + * 白仿弘毛弁伉失允月啃及丢奶件 + ----------------------------------------*/ +void NPC_CleanMain(int meindex,int talker,char *buf) +{ + NPC_ExChangeMan_selectWindow( meindex, talker, 3); +} + +/*----------------------------------------- +弁仿奶失件玄井日忒匀化五凶凛卞裟太请今木月[ +-------------------------------------------*/ +void NPC_ExChangeManWindowTalked( int meindex, int talkerindex, + int seqno, int select, char *data) +{ + /*-- 及引歹曰卞中卅中午五反蔽 --*/ + if( NPC_Util_CharDistance( talkerindex, meindex ) > 2) { + return; + } + + + switch( seqno) { + + /*--白仿弘毛壅允凛及它奶件玉它--*/ + case CHAR_WINDOWTYPE_WINDOWEVENT_CLEANMSG: + if( select == WINDOW_BUTTONTYPE_YES) { + NPC_MsgDisp( meindex, talkerindex, 12); + }else if(select == WINDOW_BUTTONTYPE_NO) { + } + break; + +#ifdef _NEWEVENT + case CHAR_WINDOWTYPE_WINDOWEVENT_STARTMSG: + if(select == WINDOW_BUTTONTYPE_NEXT) { + CHAR_setWorkInt(talkerindex,CHAR_WORKSHOPRELEVANTTRD, + CHAR_getWorkInt(talkerindex,CHAR_WORKSHOPRELEVANTTRD) + 1); + NPC_MsgDisp( meindex, talkerindex, 99); + }else if(select == WINDOW_BUTTONTYPE_PREV) { + CHAR_setWorkInt(talkerindex,CHAR_WORKSHOPRELEVANTTRD, + CHAR_getWorkInt(talkerindex,CHAR_WORKSHOPRELEVANTTRD) - 1); + NPC_MsgDisp( meindex, talkerindex, 99); + } + break; +#else + case CHAR_WINDOWTYPE_WINDOWEVENT_STARTMSG: + break; +#endif + /*--伉弁巨旦玄及丐曰互午丹丢永本□斥--*/ + case CHAR_WINDOWTYPE_WINDOWEVENT_REQTHANK: + if(select == WINDOW_BUTTONTYPE_NEXT) { + CHAR_setWorkInt(talkerindex,CHAR_WORKSHOPRELEVANTTRD, + CHAR_getWorkInt(talkerindex,CHAR_WORKSHOPRELEVANTTRD)+1); + NPC_MsgDisp( meindex, talkerindex, 22); + }else if(select == WINDOW_BUTTONTYPE_PREV) { + CHAR_setWorkInt(talkerindex,CHAR_WORKSHOPRELEVANTTRD, + CHAR_getWorkInt(talkerindex,CHAR_WORKSHOPRELEVANTTRD)-1); + NPC_MsgDisp( meindex, talkerindex, 22); + } + break; + + /*--失弁本皿玄及丐曰互午丹丢永本□斥--*/ + case CHAR_WINDOWTYPE_WINDOWEVENT_ACCTHANK: + if(select == WINDOW_BUTTONTYPE_NEXT) { + CHAR_setWorkInt(talkerindex,CHAR_WORKSHOPRELEVANTTRD, + CHAR_getWorkInt(talkerindex,CHAR_WORKSHOPRELEVANTTRD)+1); + NPC_MsgDisp( meindex, talkerindex, 82); + }else if(select == WINDOW_BUTTONTYPE_PREV) { + CHAR_setWorkInt(talkerindex,CHAR_WORKSHOPRELEVANTTRD, + CHAR_getWorkInt(talkerindex,CHAR_WORKSHOPRELEVANTTRD)-1); + NPC_MsgDisp( meindex, talkerindex, 82); + } + break; + + /*--蜇箕及奶矛件玄毛鞅户月井--*/ + case CHAR_WINDOWTYPE_WINDOWEVENT_NOWEVENT: + if(select == WINDOW_BUTTONTYPE_YES) { + NPC_MsgDisp( meindex, talkerindex, 7); + }else if(select == WINDOW_BUTTONTYPE_NO){ + NPC_MsgDisp( meindex, talkerindex, 1); + } + break; + + /*--伉弁巨旦玄及丢奶件它奶件玉它--*/ + case CHAR_WINDOWTYPE_WINDOWEVENT_REQMAINMSG: + if(select == WINDOW_BUTTONTYPE_YES) { + CHAR_setWorkInt(talkerindex,CHAR_WORKSHOPRELEVANTTRD,0); + NPC_MsgDisp( meindex, talkerindex, 2); + }else if(select == WINDOW_BUTTONTYPE_NO) { + + }else if(select == WINDOW_BUTTONTYPE_NEXT) { + CHAR_setWorkInt(talkerindex,CHAR_WORKSHOPRELEVANTTRD, + CHAR_getWorkInt(talkerindex,CHAR_WORKSHOPRELEVANTTRD)+1); + NPC_MsgDisp( meindex, talkerindex, 55); + }else if(select == WINDOW_BUTTONTYPE_PREV) { + CHAR_setWorkInt(talkerindex,CHAR_WORKSHOPRELEVANTTRD, + CHAR_getWorkInt(talkerindex,CHAR_WORKSHOPRELEVANTTRD)-1); + NPC_MsgDisp( meindex, talkerindex, 55); + } + break; + + /*--熬仃潸曰及丢奶件及它奶件玉它--*/ + case CHAR_WINDOWTYPE_WINDOWEVENT_ACCMAINMSG: + if(select == WINDOW_BUTTONTYPE_YES) { + CHAR_setWorkInt(talkerindex,CHAR_WORKSHOPRELEVANTTRD,0); +#ifdef _NEWEVENT + NPC_MsgDisp( meindex, talkerindex, 81); +#else + NPC_MsgDisp( meindex, talkerindex, 8); +#endif + }else if(select == WINDOW_BUTTONTYPE_NO) { + }else if(select == WINDOW_BUTTONTYPE_NEXT) { + CHAR_setWorkInt(talkerindex,CHAR_WORKSHOPRELEVANTTRD, + CHAR_getWorkInt(talkerindex,CHAR_WORKSHOPRELEVANTTRD)+1); + NPC_MsgDisp( meindex, talkerindex, 66); + }else if(select == WINDOW_BUTTONTYPE_PREV) { + CHAR_setWorkInt(talkerindex,CHAR_WORKSHOPRELEVANTTRD, + CHAR_getWorkInt(talkerindex,CHAR_WORKSHOPRELEVANTTRD)-1); + NPC_MsgDisp( meindex, talkerindex, 66); + } + break; + +#ifdef _NEWEVENT + case CHAR_WINDOWTYPE_WINDOWEVENT_ACCTHANKNEW: + if(select == WINDOW_BUTTONTYPE_OK){ + CHAR_setWorkInt(talkerindex,CHAR_WORKSHOPRELEVANTTRD,0); + NPC_MsgDisp( meindex, talkerindex, 8); + }else if(select == WINDOW_BUTTONTYPE_NEXT) { + CHAR_setWorkInt(talkerindex,CHAR_WORKSHOPRELEVANTTRD, + CHAR_getWorkInt(talkerindex,CHAR_WORKSHOPRELEVANTTRD)+1); + NPC_MsgDisp( meindex, talkerindex, 81); + }else if(select == WINDOW_BUTTONTYPE_PREV) { + CHAR_setWorkInt(talkerindex,CHAR_WORKSHOPRELEVANTTRD, + CHAR_getWorkInt(talkerindex,CHAR_WORKSHOPRELEVANTTRD)-1); + NPC_MsgDisp( meindex, talkerindex, 81); + } + break; +#endif + /*--矢永玄及 毛芨尹月它奶件玉它--*/ + case CHAR_WINDOWTYPE_WINDOWPETSKILLSHOP: + if(CHAR_getWorkInt( talkerindex ,CHAR_WORKSHOPRELEVANTTRD) ==0) { + NPC_EventPetSkill( meindex, talkerindex, data); + NPC_MsgDisp( meindex, talkerindex, 25); + }else{ + NPC_EventPetSkill( meindex, talkerindex, data); + NPC_MsgDisp( meindex, talkerindex, 88); + } + break; + } +} + + +/*------------------------- + * 椭瘀毛心凶仄化中月井 + --------------------------*/ +int NPC_ExChangeManEventCheck( int meindex, int talker, char *buff1) +{ + char buff2[512]; + char buff3[128]; + char buf[512]; + int i = 1,j = 1; + int loop = 0; + + NPC_Util_GetStrFromStrWithDelim( buff1, "EVENT", buf, sizeof( buf)); + + /*-- EVENt及椭瘀毛赐 卞苇化中仁 --*/ + while( getStringFromIndexWithDelim(buf, ",", i, buff2,sizeof( buff2)) + !=FALSE ) + { + i++; + /*-- "&"互丐月及匹 醒椭瘀 --*/ + if(strstr( buff2, "&")!=NULL){ + j = 1; + loop = 0; + while(getStringFromIndexWithDelim(buff2, "&", j, buff3, sizeof( buff3)) + != FALSE ) + { + j++; + if(NPC_EventBigSmallCheck( meindex, talker, buff3) == FALSE) + { + loop = 1; + break; + } + } + + if(loop == 0){ + i--; + return i; + } + /*--椭瘀互夫午勾--*/ + }else{ + if(NPC_EventBigSmallCheck( meindex, talker, buff2) == TRUE) { + i--; + return i; + } + } + + } + + return -1; + +} + +/*--------------------------------- + * 凝筏寞民尼永弁 + --------------------------------*/ +BOOL NPC_EventBigSmallCheck(int meindex,int talker, char* buf) +{ + + char buff2[128]; + int kosuu; + + /*--矢永玄及民尼永弁互反中匀化中月桦宁反域绎PET椭瘀毛民尼永弁允月 --*/ + if(strstr( buf, "PET") != NULL) { + if(strstr( buf, "EV") != NULL) { + if(NPC_PetLvCheck( meindex, talker, buf, 1) != FALSE) return TRUE; + }else{ + if(NPC_PetLvCheck( meindex, talker, buf, 0) != FALSE) return TRUE; + } + return FALSE; + } + + /*--动票反} 骚及筏寞民尼永弁 --*/ + if(strstr( buf, "<") != NULL) { + getStringFromIndexWithDelim( buf, "<", 2, buff2, sizeof( buff2)); + kosuu = atoi( buff2); + getStringFromIndexWithDelim( buf, "<", 1, buff2, sizeof( buff2)); + + if(NPC_EventFreeIfCheck( meindex, talker, buff2, kosuu, 1) == TRUE) { + return TRUE; + } + + }else if(strstr( buf, ">") != NULL) { + getStringFromIndexWithDelim( buf, ">", 2, buff2, sizeof(buff2)); + kosuu = atoi(buff2); + getStringFromIndexWithDelim( buf, ">" ,1, buff2, sizeof(buff2)); + + if(NPC_EventFreeIfCheck( meindex, talker, buff2, kosuu, 2)==TRUE) { + return TRUE; + } + + }else if(strstr( buf, "!=" ) != NULL) { + getStringFromIndexWithDelim( buf, "!=", 2, buff2, sizeof( buff2)); + kosuu = atoi( buff2); + getStringFromIndexWithDelim( buf, "!=", 1, buff2, sizeof( buff2)); + if(NPC_EventFreeIfCheck( meindex, talker, buff2, kosuu, 3) == TRUE) { + return TRUE; + } + + }else if(strstr( buf, "=") != NULL) { + getStringFromIndexWithDelim( buf, "=", 2, buff2, sizeof( buff2)); + kosuu = atoi( buff2); + getStringFromIndexWithDelim( buf, "=", 1, buff2, sizeof( buff2)); + + if(strstr( buf, "*") != NULL) { + if(NPC_EventReduce( meindex, talker, buf) == TRUE){ + return TRUE; + } + }else if(NPC_EventFreeIfCheck( meindex, talker, buff2, kosuu, 0) + == TRUE) + { + return TRUE; + } + } + + return FALSE; + +} + + +/*----------------------------------- + * 嫩 毛 凶仄化中月井及民尼永弁 + *-----------------------------------*/ +BOOL NPC_EventFreeIfCheck(int meindex,int talker,char* buf,int kosuu,int flg) +{ + + /*--伊矛伙民尼永弁--*/ + if(strcmp( buf, "LV") == 0) { + if(NPC_EventLevelCheck( meindex, talker, kosuu, flg) == TRUE) { + return TRUE; + } + } + + /*--失奶 丞民尼永弁--*/ + if(strcmp( buf, "ITEM") == 0) { + if(NPC_EventItemCheck( meindex, talker, kosuu, flg) == TRUE) { + return TRUE; + } + } + + /*--蔽 奶矛件玄民尼永弁--*/ + if(strcmp( buf, "ENDEV") == 0) { + if(NPC_ENDEventNoCheck( meindex, talker, kosuu, flg) == TRUE) { + return TRUE; + } + } + + if(strcmp( buf, "NOWEV") == 0) { + if(NPC_NOWEventNoCheck( meindex, talker, kosuu, flg) == TRUE) { + return TRUE; + } + } + + if(strcmp( buf, "SP" ) == 0) { + if(NPC_SavePointCheck( meindex, talker, kosuu, flg) == TRUE) { + return TRUE; + } + } + + if(strcmp( buf, "TIME") == 0) { + if(NPC_TiemCheck( meindex, talker, kosuu, flg) == TRUE) { + return TRUE; + } + } + +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + if(strcmp(buf,"CLASS")==0){ + if(NPC_ActionClassCheck(meindex,talker,kosuu,flg)==TRUE) + return TRUE; + } +#endif + + if(strcmp( buf, "IMAGE") == 0) { + if(NPC_ImageCheck( meindex, talker, kosuu, flg) == TRUE) { + return TRUE; + } + } + +#ifdef _ANGEL_SUMMON + if(strcmp(buf,"ANGEL_NOW")==0){ + if( NPC_ActionMissionAngelCheck(meindex,talker,kosuu, MISSION_DOING, 0)==TRUE) + return TRUE; + } + if(strcmp(buf,"HERO_NOW")==0){ + if( NPC_ActionMissionHeroCheck(meindex,talker,kosuu, MISSION_DOING, 0)==TRUE) + return TRUE; + } + if(strcmp(buf,"ANGEL_OVER")==0){ + if( NPC_ActionMissionAngelCheck(meindex,talker,kosuu, MISSION_HERO_COMPLETE, 0)==TRUE) + return TRUE; + } + if(strcmp(buf,"HERO_OVER")==0){ + if( NPC_ActionMissionHeroCheck(meindex,talker,kosuu, MISSION_HERO_COMPLETE, 0)==TRUE) + return TRUE; + } + if(strcmp(buf,"ANGEL_OUT")==0){ + if( NPC_ActionMissionAngelCheck(meindex,talker,kosuu, MISSION_TIMEOVER, 0)==TRUE) + return TRUE; + } + if(strcmp(buf,"HERO_OUT")==0){ + if( NPC_ActionMissionHeroCheck(meindex,talker,kosuu, MISSION_TIMEOVER, 0)==TRUE) + return TRUE; + } + + if(strcmp(buf,"ANGEL_I_NOW")==0){ + if( NPC_ActionMissionAngelCheck(meindex,talker,kosuu, MISSION_DOING, TRUE)==TRUE) + return TRUE; + } + if(strcmp(buf,"HERO_I_NOW")==0){ + if( NPC_ActionMissionHeroCheck(meindex,talker,kosuu, MISSION_DOING, TRUE)==TRUE) + return TRUE; + } + if(strcmp(buf,"ANGEL_I_OVER")==0){ + if( NPC_ActionMissionAngelCheck(meindex,talker,kosuu, MISSION_HERO_COMPLETE, TRUE)==TRUE) + return TRUE; + } + if(strcmp(buf,"HERO_I_OVER")==0){ + if( NPC_ActionMissionHeroCheck(meindex,talker,kosuu, MISSION_HERO_COMPLETE, TRUE)==TRUE) + return TRUE; + } + if(strcmp(buf,"ANGEL_I_OUT")==0){ + if( NPC_ActionMissionAngelCheck(meindex,talker,kosuu, MISSION_TIMEOVER, TRUE)==TRUE) + return TRUE; + } + if(strcmp(buf,"HERO_I_OUT")==0){ + if( NPC_ActionMissionHeroCheck(meindex,talker,kosuu, MISSION_TIMEOVER, TRUE)==TRUE) + return TRUE; + } + if(strcmp( buf, "HEROCNT") == 0) { + //if(NPC_EventLevelCheck( meindex, talker, kosuu, flg) == TRUE) { + if(NPC_HeroCompleteCountCheck( meindex, talker, kosuu, flg) == TRUE) + return TRUE; + } + +#endif +#ifdef _NPC_EXCHANGEMANTRANS + //判断转生 + { + //print("\n判断转生"); + if(strcmp(buf,"TRANS")==0){ + int mytrans; + mytrans = CHAR_getInt(talker,CHAR_TRANSMIGRATION); + if(NPC_EventBigSmallLastCheck( kosuu, mytrans, flg) == TRUE) + return TRUE; + } + } +#endif +#ifdef _PROSK99 + if(strstr( buf, "PROSK" ) != NULL) {//PROSK99>16 职技等级大於等於99%的数量要超过16个 + char *p=NULL; + int i,level=0,count=0; + CHAR_HaveSkill *pSkil; + if( p = strstr( buf, "PROSK" ) ) + level = atoi(p+5); + else + level = 100; + for( i = 0; i < CHAR_SKILLMAXHAVE; i ++ ){ + if( pSkil = CHAR_getCharHaveSkill( talker, i ) ) + if( SKILL_getInt( &pSkil->skill, SKILL_LEVEL) >= level ) + ++count; + } + if(NPC_EventBigSmallLastCheck( kosuu, count, flg) == TRUE) + return TRUE; + } +#endif + +#ifdef _ADD_reITEM + if(strstr( buf, "reITEM" ) != NULL) { + int i,count=0,itemindex=-1; + for( i = CHAR_STARTITEMARRAY ; i < CHAR_MAXITEMHAVE ; i++ ){ + itemindex = CHAR_getItemIndex( talker , i ); + if( !ITEM_CHECKINDEX( itemindex) ) + ++count; + } + if(NPC_EventBigSmallLastCheck( kosuu, count, flg) == TRUE) + return TRUE; + } +#endif + + return FALSE; + +} + +/*-------------------------------- + * 矢永玄及伊矛伙毛民尼永弁允月 + ---------------------------------*/ +BOOL NPC_PetLvCheck(int meindex,int talker,char *buf,int mode) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buff2[16]; + char buf3[8]; + int petno; + int baseno; + int petlevel = 0; + int flg=0; + int mypetlevel = 0; + int i = 0; + int petindex; + char name[512]; + int cnt = 0; + int loop; + + + /*--隙烂今木凶矢永玄及瓜件田□ ID)毛潸 --*/ + getStringFromIndexWithDelim( buf, "-", 2, buff2, sizeof( buff2)); + if(strstr(buff2,"*") != NULL) { + getStringFromIndexWithDelim( buff2, "*", 1, buf3, sizeof( buf3)); + petno = atoi( buf3); + getStringFromIndexWithDelim( buff2, "*", 2, buf3, sizeof( buf3)); + loop = atoi( buf3); + + }else{ + petno = atoi( buff2); + loop = 1; + + } + + /*--矢永玄 互钒中化中月井及民尼永弁--*/ + for(i=0; i < CHAR_MAXPETHAVE ; i++) { + if(loop == cnt) return TRUE; + + petindex = CHAR_getCharPet( talker, i); + if( petindex == -1 ) continue; + + /*--矢永玄及ID毛潸 仄化中仁--*/ + baseno = CHAR_getInt( petindex, CHAR_PETID); + + /* 矢永玄及ID午}蜇箕及乒□玉毛譬屯月 */ + if( (baseno == petno) && (CHAR_getInt( petindex, CHAR_ENDEVENT) + == mode)) + { + /*--伊矛伙毛民尼永弁允月--*/ + mypetlevel = CHAR_getInt( petindex, CHAR_LV); + getStringFromIndexWithDelim( buf, "-", 1, buff2, sizeof( buff2)); + + if(strstr( buf, "<") != NULL) { + flg = 1; + getStringFromIndexWithDelim( buff2, "<", 2, buf3, sizeof(buf3)); + }else if(strstr( buf, ">") != NULL) { + getStringFromIndexWithDelim( buff2, ">", 2, buf3, sizeof(buf3)); + flg = 2; + }else if(strstr( buf, "=") != NULL) { + getStringFromIndexWithDelim( buff2, "=", 2, buf3, sizeof(buf3)); + flg = 0; + } + + petlevel = atoi( buf3); + + if(NPC_EventBigSmallLastCheck( petlevel, mypetlevel, flg) == TRUE) { + /*--矢永玄及 蟆互涩烂今木化中凶日 蟆及民尼永弁 月--*/ + if(CHAR_getWorkInt(talker,CHAR_WORKSHOPRELEVANTSEC)==1) { + char *usename; + + /*--涩烂白央奶伙及 心 心--*/ + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { + print("PetLevel:GetArgStrErr"); + return FALSE; + } + + usename = CHAR_getUseName( petindex); + NPC_Util_GetStrFromStrWithDelim( argstr, "Pet_Name", + name,sizeof( name)); + + if(strcmp( name, usename) == 0) + { + cnt++; + continue; + } + }else { + CHAR_setWorkInt( talker, CHAR_WORKSHOPRELEVANTSEC, 0); + cnt++; + continue; + } + } + } + } + + if(loop == cnt) return TRUE; + if(i == CHAR_MAXPETHAVE) return FALSE; + + return FALSE; +} + + +/*-------------------------------- + * 矢永玄及伊矛伙毛民尼永弁允月 + ---------------------------------*/ +int NPC_PetLvCheckType2(int petindex,int meindex,int talker,char *buf,int mode) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buff2[16]; + char buf3[8]; + int petno; + int baseno; + int petlevel = 0; + int flg = 0; + int mypetlevel = 0; + char name[512]; + + /*--隙烂今木凶矢永玄及瓜件田□ ID)毛潸 --*/ + getStringFromIndexWithDelim( buf, "-", 2, buff2, sizeof( buff2)); + if(strstr(buff2,"*") != NULL) { + getStringFromIndexWithDelim( buff2, "*", 1, buf3, sizeof( buf3)); + petno = atoi( buf3); + }else{ + petno = atoi( buff2); + } + + + /*--矢永玄及ID毛潸 仄化中仁--*/ + baseno = CHAR_getInt( petindex, CHAR_PETID); + + /*--矢永玄及ID午}蜇箕及乒□玉毛譬屯月--*/ + if( (baseno == petno) && (CHAR_getInt( petindex, CHAR_ENDEVENT) + == mode)) + { + /*--伊矛伙毛民尼永弁允月--*/ + mypetlevel=CHAR_getInt( petindex, CHAR_LV); + getStringFromIndexWithDelim( buf, "-", 1,buff2,sizeof(buff2)); + + if(strstr( buf, "<") != NULL) { + flg = 1; + getStringFromIndexWithDelim( buff2, "<", 2, + buf3, sizeof(buf3)); + }else if(strstr( buf, ">") != NULL) { + getStringFromIndexWithDelim( buff2, ">", 2, buf3, sizeof(buf3)); + flg = 2; + }else if(strstr( buf, "=") != NULL) { + getStringFromIndexWithDelim( buff2, "=", 2, buf3, sizeof(buf3)); + flg = 0; + } + + petlevel = atoi(buf3); + + if(NPC_EventBigSmallLastCheck( petlevel, mypetlevel, flg) + == TRUE) + { + /*--矢永玄及 蟆互涩烂今木化中凶日 蟆及民尼永弁 月--*/ + if(CHAR_getWorkInt(talker,CHAR_WORKSHOPRELEVANTSEC) == 1) { + char *usename; + + /*--涩烂白央奶伙及 心 心--*/ + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { + print("PetLevel:GetArgStrErr"); + return FALSE; + } + + usename = CHAR_getUseName( petindex); + NPC_Util_GetStrFromStrWithDelim(argstr,"Pet_Name", + name, sizeof( name)); + + if(strcmp( name, usename) == 0) + { + return TRUE; + } + }else { + CHAR_setWorkInt( talker, CHAR_WORKSHOPRELEVANTSEC, 0); + return TRUE; + } + } + } + + return FALSE; + +} + +/*------------------------ + *请 鳔及民尼永弁 + --------------------------*/ +BOOL NPC_SavePointCheck(int meindex,int talker,int shiftbit,int flg) +{ + int point; + + point = CHAR_getInt( talker, CHAR_SAVEPOINT); + + if( (point & ( 1<< shiftbit)) == ( 1<< shiftbit)) { + if(flg == 3) return FALSE; + return TRUE; + } + + if(flg == 3) return TRUE; + return FALSE; +} + +/*------------------------ + *奶丢□斥及民尼永弁 + --------------------------*/ +BOOL NPC_ImageCheck(int meindex,int talker,int kosuu,int flg) +{ + int image; + + image = CHAR_getInt( talker, CHAR_IMAGETYPE); + + if(NPC_EventBigSmallLastCheck( image, kosuu, flg) == TRUE) { + return TRUE; + } + return FALSE; + +} + + +/*----------------------------------------- + * 凛棉及民尼永弁毛垫丹(丐中引中凛棉) + ------------------------------------------*/ +BOOL NPC_TiemCheck(int meindex,int talker,int time,int flg) +{ + LSTIME nowlstime; + int now; + + RealTimeToLSTime( NowTime.tv_sec, &nowlstime); + now = getLSTime( &nowlstime); + + if(NPC_EventBigSmallLastCheck( time, now, flg) == TRUE) { + return TRUE; + } + return FALSE; + +} + +/*------------------------------ + *--Item毛民尼永弁 + -------------------------------*/ +BOOL NPC_EventItemCheck(int meindex,int talker,int itemNo,int flg) +{ + int i; + int itemindex = -1; + int id; + + //Change fix 不检查穿戴在身上的道具 + for( i = CHAR_STARTITEMARRAY ; i < CHAR_MAXITEMHAVE ; i++ ) { + + itemindex=CHAR_getItemIndex( talker , i ); + if( ITEM_CHECKINDEX( itemindex) ) { + id=ITEM_getInt( itemindex ,ITEM_ID ); + + if(NPC_EventBigSmallLastCheck( itemNo, id, flg) == TRUE) { + if(flg == 0) return TRUE; + continue; + }else{ + if(flg == 0) continue; + return FALSE; + } + } + } + + if(flg == 3) return TRUE; + + return FALSE; + +} + + +/*------------------------------ + * level毛民尼永弁 + -------------------------------*/ +BOOL NPC_EventLevelCheck(int meindex,int talker,int level,int flg) +{ + + int mylevel; + mylevel = CHAR_getInt(talker,CHAR_LV); + + if(NPC_EventBigSmallLastCheck( level, mylevel, flg) == TRUE) + { + if(flg == 3) return FALSE; + return TRUE; + } + + if(flg == 3) return TRUE; + return FALSE; + +} + + + +/*------------------------------ + * ENDEventNo毛民尼永弁 + -------------------------------*/ +BOOL NPC_ENDEventNoCheck(int meindex,int talker,int shiftbit,int flg) +{ + + if(NPC_EventCheckFlg( talker, shiftbit) == TRUE) { + if(flg == 3) return FALSE; + return TRUE; + } + + if(flg == 3) return TRUE; + return FALSE; +} + + +/*------------------------------ + * NOWEventNo毛民尼永弁 + -------------------------------*/ +BOOL NPC_NOWEventNoCheck(int meindex,int talker,int shiftbit,int flg) +{ + if(NPC_NowEventCheckFlg( talker, shiftbit) == TRUE) { + if(flg == 3) return TRUE; + return TRUE; + } + + if(flg == 3) return TRUE; + return FALSE; +} + +/*--------------------------------------- + * 蔽民尼永弁 + --------------------------------------*/ +BOOL NPC_EventBigSmallLastCheck(int point1,int mypoint,int flg) +{ + + if(flg == 0) { + if(point1 == mypoint) { + return TRUE; + } + }else if(flg == 1) { + if(mypoint < point1) { + return TRUE; + } + }else if(flg == 2) { + if(mypoint > point1) { + return TRUE; + } + }else if(flg == 3) { + if(point1 != mypoint) { + return TRUE; + } + } + return FALSE; +} + + +/*--------------------------------- + *丢永本□斥毛请 允月 + *----------------------------------*/ +#ifdef _CHANNEL_MODIFY +extern int *piOccChannelMember; +#endif +void NPC_MsgDisp(int meindex,int talker,int num) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; +#ifdef _NEWEVENT + char buf[4096]; + char token2[4096]; + char buf2[4096]; + char token[4096]; + char tmp[4096]; +#else + char buf[1024*2]; + char token2[50*14]; + char buf2[512]; + char token[512]; + char tmp[32]; +#endif + int i = 1; + int work = 0; + int EvNo = 0; + int fd = getfdFromCharaIndex( talker); + int buttontype = WINDOW_BUTTONTYPE_OK; + int windowtype = CHAR_WINDOWTYPE_WINDOWEVENT_STARTMSG; + int evch; + + + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { + print("MsgDisp:GetArgStrErr"); + print("NPCName=%s\n", CHAR_getChar( meindex, CHAR_NAME)); + return ; + } + if(num == 22 || num == 82 || num == 55 || num == 66) { + int pwork; + + pwork = CHAR_getWorkInt( talker, CHAR_WORKSHOPRELEVANTTRD); + pwork = (pwork / 100) -1 ; + + getStringFromIndexWithDelim( argstr, "EventEnd", pwork, buf,sizeof( buf)); + + }else{ + /*涩烂白央奶伙毛坌喃允月*/ + while(getStringFromIndexWithDelim( argstr, "EventEnd", i, buf, sizeof(buf)) + != FALSE) + { + i++; + CHAR_setWorkInt( talker, CHAR_WORKSHOPRELEVANTSEC, 0); + + /*--奶矛件玄瓜件田□毛必永玄--*/ + NPC_Util_GetStrFromStrWithDelim( buf, "EventNo", buf2, sizeof( buf2)); + if(strstr( buf2, "-1") != 0) { + EvNo = -1; + }else{ + EvNo = atoi( buf2); + } + EvNo = atoi( buf2); + + /*--白仿弘民尼永弁毛垫丹[允匹卞}仇及奶矛件玄互蔽 仄化中月桦宁反戚尺--*/ + if(NPC_EventCheckFlg( talker, EvNo) == TRUE) continue; + + /*--平□伐□玉及民尼永弁毛垫丹--*/ + if(NPC_Util_GetStrFromStrWithDelim( buf,"Pet_Name", buf2,sizeof( buf2)) + != NULL ) + { + CHAR_setWorkInt( talker, CHAR_WORKSHOPRELEVANTSEC, 1); + } + + /*--平□伐□玉及民尼永弁毛垫丹--*/ + if(NPC_Util_GetStrFromStrWithDelim( buf,"KeyWord", buf2,sizeof( buf2) ) + != NULL) + { + if(CHAR_getWorkInt( talker ,CHAR_WORKSHOPRELEVANT) != i) continue; + } + + evch = NPC_ExChangeManEventCheck( meindex, talker, buf); + + if(evch != -1) { + + /*--奶矛件玄椭瘀及民尼永弁--*/ + // if(NPC_ExChangeManEventCheck( meindex, talker, buf) == TRUE) { + break; + } + } + } + + //print(" NPC_MsgDisp:%d ", num); + + switch( num) { + case 0: + /*蜇箕及奶矛件玄毛鞅户月井升丹井毛 仁丢永本□斥--*/ + if( NPC_Util_GetStrFromStrWithDelim( buf, "StopMsg", + buf2, sizeof( buf2) ) + != NULL) + { + strcpysafe( token,sizeof( buf2), buf2); + buttontype = WINDOW_BUTTONTYPE_YESNO; + windowtype = CHAR_WINDOWTYPE_WINDOWEVENT_NOWEVENT; + } + break; + + case 1: + /*--支户月井升丹井毛 中凶今中及NO毛蚕尹凶桦宁及丢永本□斥--*/ + if( NPC_Util_GetStrFromStrWithDelim( buf, "NoStopMsg", + buf2, sizeof( buf2)) + != NULL) + { + strcpysafe( token, sizeof(buf2), buf2); + + } + break; + + case 7: + /*--蜇箕及奶矛件玄毛鞅户凶午五及丢永本□斥--*/ + if( NPC_Util_GetStrFromStrWithDelim( buf, "EndStopMsg", + buf2, sizeof( buf2)) + != NULL) + { + strcpysafe( token, sizeof( buf2), buf2); + + /*--奶矛件玄 毛 匀化中凶桦宁反壅蛔--*/ + NPC_EventAdd( meindex, talker, 1); + + /*--白仿弘毛壅允--*/ + NPC_NowEventSetFlgCls( talker, EvNo); + + /*--蝇匀凶及匹} 毛今仆凶--*/ + if(CHAR_getInt( talker, CHAR_CHARM) > 0) { + CHAR_setInt( talker, CHAR_CHARM, CHAR_getInt(talker,CHAR_CHARM) -1); + CHAR_complianceParameter( talker ); + CHAR_send_P_StatusString( talker, CHAR_P_STRING_CHARM); + NPC_CharmStatus( meindex, talker); + } + } + break; + + case 2: + /*--丐曰互午丹丢永本□斥--*/ + if( NPC_Util_GetStrFromStrWithDelim( buf, "ThanksMsg", + buf2, sizeof( buf2) ) + != NULL) + { + strcpysafe( token,sizeof( buf2), buf2); + /*--奶矛件玄 白仿弘毛本永玄--*/ + if(NPC_EventAdd(meindex, talker, 0) != FALSE) { + NPC_NowEventSetFlg( talker, EvNo); + } + else { + return; + } + + + if(NPC_Util_GetStrFromStrWithDelim( buf, "EndSetFlg", + buf2, sizeof( buf2) ) + !=NULL) + { + char buf3[16]; + int k = 1; + if(EvNo != -1) NPC_NowEventSetFlgCls( talker, EvNo); + + while(getStringFromIndexWithDelim(buf2 , "," ,k, + buf3, sizeof(buf3)) + !=FALSE ) + { + k++; + NPC_EventSetFlg( talker, atoi( buf3)); + } + } + + if( NPC_Util_GetStrFromStrWithDelim( buf, "CleanFlg", + buf2, sizeof( buf2)) + != NULL) { + char buf3[16]; + int k = 1; + + k= 1 ; + while(getStringFromIndexWithDelim(buf2 , "," , k, + buf3, sizeof(buf3)) + != FALSE ) + { + NPC_NowEndEventSetFlgCls( talker, atoi(buf3)); + k++; + } + } + + + + } + CHAR_setWorkInt( talker, CHAR_WORKSHOPRELEVANTTRD, 1); + work = CHAR_getWorkInt( talker, CHAR_WORKSHOPRELEVANTTRD); + work = work + ( i * 100); + CHAR_setWorkInt( talker, CHAR_WORKSHOPRELEVANTTRD, work); + + if(NPC_Util_GetStrFromStrWithDelim( buf,"NpcWarp", + token2,sizeof( token2) ) + != NULL){ + NPC_EventWarpNpc(meindex,token2); + } + + /*--戚矢□斥互丐月桦宁反示正件方它奶件玉它及正奶皿毛井尹月--*/ + if(strstr( buf, "ThanksMsg2") != NULL) { + /*仇仇匹霜耨允月*/ + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_NEXT, + CHAR_WINDOWTYPE_WINDOWEVENT_REQTHANK, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + return; + } + + break; + + case 22: + + work = CHAR_getWorkInt( talker, CHAR_WORKSHOPRELEVANTTRD); + work = work % 100; + + if(work == 1){ + if( NPC_Util_GetStrFromStrWithDelim( buf, "ThanksMsg", + buf2, sizeof( buf2) ) + != NULL) + { + strcpysafe( token,sizeof( buf2), buf2); + } + + /*--戚矢□斥互丐月桦宁反示正件方它奶件玉它及正奶皿毛井尹月--*/ + if(strstr( buf, "ThanksMsg2") != NULL) { + + /*仇仇匹霜耨允月*/ + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_NEXT, + CHAR_WINDOWTYPE_WINDOWEVENT_REQTHANK, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + return; + } + + }else{ + + sprintf( tmp, "ThanksMsg%d", work); + if( NPC_Util_GetStrFromStrWithDelim( buf, tmp, + buf2, sizeof( buf2) ) + != NULL) { + strcpysafe( token,sizeof( buf2), buf2); + } + + work++; + sprintf( tmp, "ThanksMsg%d", work); + + + /*--戚矢□斥互丐月桦宁反示正件方它奶件玉它及正奶皿毛井尹月--*/ + if(strstr( buf, tmp) != NULL) { + + /*仇仇匹霜耨允月*/ + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_NEXT, + CHAR_WINDOWTYPE_WINDOWEVENT_REQTHANK, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + return; + }else{ + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + CHAR_WINDOWTYPE_WINDOWEVENT_REQTHANK, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + return; + } + } + break; + + case 25: + /*--丐曰互午丹丢永本□斥--*/ + if( NPC_Util_GetStrFromStrWithDelim( buf, "ThanksMsg", + buf2, sizeof( buf2) ) + != NULL) + { + strcpysafe( token,sizeof( buf2), buf2); + /*--奶矛件玄 白仿弘毛本永玄--*/ + if(NPC_EventAdd(meindex, talker, 2) != FALSE) { + NPC_NowEventSetFlg( talker, EvNo); + } + } + break; + + + case 3: + /*-- 骚及丢永本□斥--*/ + if( NPC_Util_GetStrFromStrWithDelim( buf, "NomalMsg", + buf2, sizeof( buf2) ) + != NULL) + { + strcpysafe(token, sizeof( buf2), buf2); + } + break; + + case 4: + /*--失奶 丞互中匀天中及凛及丢永本□斥--*/ + if( NPC_Util_GetStrFromStrWithDelim( buf, "ItemFullMsg", + buf2, sizeof( buf2) ) + != NULL) + { + strcpysafe(token, sizeof( buf2), buf2); + } + break; + + case 5: + /*--匙 毛允月端及丢奶件及丢永本□斥--*/ + if( NPC_Util_GetStrFromStrWithDelim( buf, "RequestMsg", + buf2, sizeof( buf2) ) + != NULL) + { + + if(strstr(buf2,"%8d") != NULL) { + char buf3[64]; + int cost; + + NPC_Util_GetStrFromStrWithDelim( buf, "DelStone", + buf3, sizeof( buf3) ); + cost = NPC_EventGetCost( meindex, talker, buf3); + + sprintf(token,buf2,cost); + + }else{ + strcpysafe( token,sizeof( buf2), buf2); + } + buttontype = WINDOW_BUTTONTYPE_YESNO; + windowtype = CHAR_WINDOWTYPE_WINDOWEVENT_REQMAINMSG; + } + + CHAR_setWorkInt( talker, CHAR_WORKSHOPRELEVANTTRD, 1); + work = CHAR_getWorkInt( talker, CHAR_WORKSHOPRELEVANTTRD); + work = work + ( i * 100); + CHAR_setWorkInt( talker, CHAR_WORKSHOPRELEVANTTRD, work); + + /*--戚矢□斥互丐月桦宁反示正件它奶件玉它及正奶皿毛井尹月--*/ + if(strstr( buf, "RequestMsg2") != NULL) { + /*仇仇匹霜耨允月*/ + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_NEXT, + CHAR_WINDOWTYPE_WINDOWEVENT_REQMAINMSG, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + return; + } + break; + + case 55: + + work = CHAR_getWorkInt( talker, CHAR_WORKSHOPRELEVANTTRD); + work = work % 100; + + if(work == 1){ + if( NPC_Util_GetStrFromStrWithDelim( buf, "RequestMsg", + buf2, sizeof( buf2) ) + != NULL) + { + strcpysafe( token, sizeof( buf2), buf2); + } + + /*--戚矢□斥互丐月桦宁反示正件方它奶件玉它及正奶皿毛井尹月--*/ + if(strstr( buf, "RequestMsg2") != NULL){ + /*仇仇匹霜耨允月*/ + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_NEXT, + CHAR_WINDOWTYPE_WINDOWEVENT_REQMAINMSG, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + return; + } + }else{ + + sprintf( tmp, "RequestMsg%d", work); + if( NPC_Util_GetStrFromStrWithDelim( buf, tmp, + buf2, sizeof( buf2) ) + != NULL){ + strcpysafe( token,sizeof( buf2), buf2); + + } + work++; + sprintf( tmp, "RequestMsg%d", work); + /*--戚矢□斥互丐月桦宁反示正件方它奶件玉它及正奶皿毛井尹月--*/ + if(strstr( buf, tmp) != NULL) { + + /*仇仇匹霜耨允月*/ + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_NEXT, + CHAR_WINDOWTYPE_WINDOWEVENT_REQMAINMSG, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + return; + }else{ + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_YESNO, + CHAR_WINDOWTYPE_WINDOWEVENT_REQMAINMSG, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + return; + } + } + break; + + + case 6: + //print(" 6_答应? "); + /*--熬仃潸曰及端及丢奶件及丢永本□斥--*/ + if( NPC_Util_GetStrFromStrWithDelim( buf, "AcceptMsg", + buf2, sizeof( buf2) ) + != NULL) + { + if(strstr(buf2,"%8d") != NULL) { + char buf3[64]; + int cost; + + NPC_Util_GetStrFromStrWithDelim( buf, "DelStone", + buf3, sizeof( buf3) ); + cost = NPC_EventGetCost( meindex, talker, buf3); + + sprintf( token, buf2, cost); + }else{ + strcpysafe( token, sizeof( buf2), buf2); + } + buttontype = WINDOW_BUTTONTYPE_YESNO; + windowtype = CHAR_WINDOWTYPE_WINDOWEVENT_ACCMAINMSG; + } + + CHAR_setWorkInt( talker, CHAR_WORKSHOPRELEVANTTRD, 1); + work = CHAR_getWorkInt( talker, CHAR_WORKSHOPRELEVANTTRD); + work = work + ( i * 100); + CHAR_setWorkInt( talker, CHAR_WORKSHOPRELEVANTTRD, work); + + /*--戚矢□斥互丐月桦宁反示正件它奶件玉它及正奶皿毛井尹月--*/ + if(strstr( buf, "AcceptMsg2") != NULL) { + /*仇仇匹霜耨允月*/ + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_NEXT, + CHAR_WINDOWTYPE_WINDOWEVENT_ACCMAINMSG, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + return; + } + break; + + + case 66: + //print(" 66_答应? "); + work = CHAR_getWorkInt( talker, CHAR_WORKSHOPRELEVANTTRD); + work = work % 100; + + if(work == 1){ + if( NPC_Util_GetStrFromStrWithDelim( buf, "AcceptMsg", + buf2, sizeof( buf2) ) + != NULL) + { + strcpysafe( token,sizeof( buf2), buf2); + } + + /*--戚矢□斥互丐月桦宁反示正件方它奶件玉它及正奶皿毛井尹月--*/ + if(strstr( buf, "AcceptMsg2") != NULL) { + /*仇仇匹霜耨允月*/ + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_NEXT, + CHAR_WINDOWTYPE_WINDOWEVENT_ACCMAINMSG, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + return; + } + }else{ + + sprintf( tmp, "AcceptMsg%d", work); + if( NPC_Util_GetStrFromStrWithDelim( buf, tmp, + buf2, sizeof( buf2) ) + != NULL){ + strcpysafe( token,sizeof( buf2), buf2); + } + work++; + sprintf( tmp, "AcceptMsg%d", work); + /*--戚矢□斥互丐月桦宁反示正件方它奶件玉它及正奶皿毛井尹月--*/ + if(strstr( buf, tmp) != NULL) { + + /*仇仇匹霜耨允月*/ + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_NEXT, + CHAR_WINDOWTYPE_WINDOWEVENT_ACCMAINMSG, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + return; + }else{ + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_YESNO, + CHAR_WINDOWTYPE_WINDOWEVENT_ACCMAINMSG, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + return; + } + } + break; + + case 8: + //print(" 8_答应? "); + + if( NPC_Util_GetStrFromStrWithDelim( buf, "ThanksMsg", + buf2, sizeof( buf2) ) + != NULL) + { + strcpysafe( token, sizeof( buf2), buf2); + /*--奶矛件玄 白仿弘毛本永玄--*/ + if(NPC_AcceptDel( meindex, talker,0) == FALSE){ + return ; + } + + if(NPC_Util_GetStrFromStrWithDelim( buf, "EndSetFlg", + buf2, sizeof( buf2) ) + !=NULL) + { + char buf3[16]; + int k = 1; + if(EvNo != -1) NPC_NowEventSetFlgCls( talker, EvNo); + + while(getStringFromIndexWithDelim(buf2 , "," ,k, + buf3, sizeof(buf3)) + !=FALSE ) + { + k++; + NPC_EventSetFlg( talker, atoi( buf3)); + } + } + + if( NPC_Util_GetStrFromStrWithDelim( buf, "Charm", + buf2, sizeof( buf2)) + !=NULL) + { + /*--仇仇引匹 凶日} 毛晓仆月---*/ + if( CHAR_getInt( talker, CHAR_CHARM) < 100 && EvNo > 0 ){ + if(CHAR_getInt( talker, CHAR_CHARM) + atoi(buf2) > 100){ + CHAR_setInt( talker, CHAR_CHARM,100); + + }else{ + CHAR_setInt( talker, CHAR_CHARM, + CHAR_getInt(talker,CHAR_CHARM) + atoi(buf2)); + + } + + CHAR_complianceParameter( talker ); + CHAR_send_P_StatusString( talker, CHAR_P_STRING_CHARM); + NPC_CharmStatus( meindex, talker); + } + } + + if( NPC_Util_GetStrFromStrWithDelim( buf, "CleanFlg", + buf2, sizeof( buf2)) + != NULL) { + char buf3[16]; + int k = 1; + + k= 1 ; + while(getStringFromIndexWithDelim(buf2 , "," , k, + buf3, sizeof(buf3)) + != FALSE ) + { + NPC_NowEndEventSetFlgCls( talker, atoi(buf3)); + k++; + } + } + + + // Robin add 清除职业 + if( NPC_Util_GetStrFromStrWithDelim( buf, "PROFESSION", + buf2, sizeof( buf2)) != NULL) + { + int p_class = atoi( buf2); + //Change fix 2004/07/05 + for( i=0; i 0 ){ + p_class = 1; + CHAR_talkToCli( talker, -1, "请先把职业装备通通卸下!", CHAR_COLORWHITE); + break; + } + } + } + if( p_class == 0) + { + print(" ====清除职业==== "); + + // 还原点数 + //if( PROFESSION_RESTORE_POINT( talker ) != 1 ) return FALSE; + + // 设定职业归零 + CHAR_setInt( talker, PROFESSION_CLASS, p_class ); +#ifdef _CHANNEL_MODIFY + if(CHAR_getInt(talker,PROFESSION_CLASS) > 0){ + int i,pclass = CHAR_getInt(talker,PROFESSION_CLASS) - 1; + for(i=0;i 0 ){ + if(CHAR_getInt( talker, CHAR_CHARM) + atoi(buf2) > 100){ + CHAR_setInt( talker, CHAR_CHARM,100); + }else{ + CHAR_setInt( talker, CHAR_CHARM, + CHAR_getInt(talker,CHAR_CHARM) + atoi( buf2)); + } + CHAR_complianceParameter( talker ); + CHAR_send_P_StatusString( talker, CHAR_P_STRING_CHARM); + NPC_CharmStatus( meindex, talker); + } + } + } + + break; + + + case 9: + + if( NPC_Util_GetStrFromStrWithDelim( buf, "NomalWindowMsg", + buf2, sizeof( buf2) ) + != NULL) + { + strcpysafe( token, sizeof( buf2), buf2); + if(EvNo != -1) NPC_NowEventSetFlg( talker, EvNo); + } +#ifdef _NEWEVENT + CHAR_setWorkInt( talker, CHAR_WORKSHOPRELEVANTTRD, 1); + work = CHAR_getWorkInt( talker, CHAR_WORKSHOPRELEVANTTRD); + work = work + ( i * 100); + CHAR_setWorkInt( talker, CHAR_WORKSHOPRELEVANTTRD, work); + + /*--戚矢□斥互丐月桦宁反示正件它奶件玉它及正奶皿毛井尹月--*/ + if(strstr( buf, "NomalWindowMsg2") != NULL) { + /*仇仇匹霜耨允月*/ + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_NEXT, + CHAR_WINDOWTYPE_WINDOWEVENT_STARTMSG, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + return; + } +#endif + break; + +#ifdef _NEWEVENT + case 99: + work = CHAR_getWorkInt( talker, CHAR_WORKSHOPRELEVANTTRD); + work = work % 100; + + if(work == 1) + { + if( NPC_Util_GetStrFromStrWithDelim( buf, "NomalWindowMsg1", + buf2, sizeof( buf2) ) != NULL) + strcpysafe( token,sizeof( buf2), buf2); + + /*--戚矢□斥互丐月桦宁反示正件方它奶件玉它及正奶皿毛井尹月--*/ + if(strstr( buf, "NomalWindowMsg2") != NULL) { + /*仇仇匹霜耨允月*/ + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_NEXT, + CHAR_WINDOWTYPE_WINDOWEVENT_STARTMSG, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + return; + } + }else{ + + sprintf( tmp, "NomalWindowMsg%d", work); + if( NPC_Util_GetStrFromStrWithDelim( buf, tmp, + buf2, sizeof( buf2) ) + != NULL){ + strcpysafe( token,sizeof( buf2), buf2); + } + work++; + sprintf( tmp, "NomalWindowMsg%d", work); + /*--戚矢□斥互丐月桦宁反示正件方它奶件玉它及正奶皿毛井尹月--*/ + if(strstr( buf, tmp) != NULL) { + + /*仇仇匹霜耨允月*/ + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_NEXT, + CHAR_WINDOWTYPE_WINDOWEVENT_STARTMSG, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + return; + }else{ + int fd = getfdFromCharaIndex( talker); + char token2[14*50]; + /*--仇仇匹}失奶 丞卅升及馨笛毛垫丹--*/ + if(NPC_AcceptDel( meindex, talker,0) == FALSE) return; + + /*白仿弘毛本永玄仄化中木壬}本永玄允月--*/ + if( EvNo != -1) NPC_NowEventSetFlg( talker, EvNo); + + if(NPC_Util_GetStrFromStrWithDelim( buf,"NpcWarp", + token2,sizeof( token2) )!= NULL){ + NPC_EventWarpNpc(meindex,token2); + } + + //白仿弘毛 化月 + if(NPC_Util_GetStrFromStrWithDelim( buf, "EndSetFlg", + buf2, sizeof( buf2) )!=NULL) + { + char buf3[16]; + int k = 1; + + if(EvNo != -1) NPC_NowEventSetFlgCls( talker, EvNo); + + while(getStringFromIndexWithDelim(buf2 , "," ,k, + buf3, sizeof(buf3)) !=FALSE ) + { + k++; + NPC_EventSetFlg( talker, atoi( buf3)); + } + } + //奶矛件玄白仿弘毛壅允 + if( NPC_Util_GetStrFromStrWithDelim( buf, "CleanFlg", + buf2, sizeof( buf2)) != NULL) { + char buf3[16]; + int k = 1; + + k= 1 ; + while(getStringFromIndexWithDelim(buf2 , "," , k, + buf3, sizeof(buf3)) + != FALSE ) + { + NPC_NowEndEventSetFlgCls( talker, atoi(buf3)); + k++; + } + } + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_YES, + CHAR_WINDOWTYPE_WINDOWEVENT_STARTMSG, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + return; + } + } + break; +#endif + case 10: + + /*--矢永玄互中匀天中及凛及丢永本□斥--*/ + if( NPC_Util_GetStrFromStrWithDelim( buf, "PetFullMsg", + buf2, sizeof( buf2) ) + != NULL) + { + strcpysafe( token, sizeof( buf2), buf2); + print(" PetFullMsg:%s ", token); + } + else + { + print(" PetFullMsg_Error:%d ", __LINE__); + } + break; + + case 11: + /*--白仿弘毛壅允午五及丢永本□斥--*/ + if( NPC_Util_GetStrFromStrWithDelim( buf, "CleanMainMsg", + buf2, sizeof( buf2) ) + != NULL) + { + strcpysafe( token, sizeof( buf2), buf2); + buttontype = WINDOW_BUTTONTYPE_YESNO; + windowtype = CHAR_WINDOWTYPE_WINDOWEVENT_CLEANMSG; + } + break; + case 12: + /*--白仿弘毛壅仄凶 及永本□斥--*/ + if( NPC_Util_GetStrFromStrWithDelim( buf, "CleanFlgMsg", + buf2, sizeof( buf2) ) + != NULL) + { + char buf3[64]; + int loop=1; + + strcpysafe( token, sizeof( buf2), buf2); + NPC_Util_GetStrFromStrWithDelim( buf, "CleanFlg", + buf2, sizeof( buf2) ); + while(getStringFromIndexWithDelim(buf2 , "," , loop, buf3, sizeof(buf3)) + != FALSE ) + { + NPC_NowEndEventSetFlgCls( talker, atoi(buf3)); + loop++; + } + } + break; + + case 13: + /*--云嗯互中匀天中及丢永本□斥--*/ + if( NPC_Util_GetStrFromStrWithDelim( buf, "StoneFullMsg", + buf2, sizeof( buf2) ) + != NULL) + { + strcpysafe( token, sizeof( buf2), buf2); + } + break; + + case 14: + /*--云嗯互凶曰卅中丢永本□斥--*/ + if( NPC_Util_GetStrFromStrWithDelim( buf, "StoneLessMsg", + buf2, sizeof( buf2) ) + != NULL) + { + strcpysafe( token, sizeof( buf2), buf2); + } + break; + } + + /*仇仇匹霜耨允月*/ +#ifdef _NEWEVENT + if(num != 8) +#endif + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + buttontype, + windowtype, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + +} + +/*-------------------------------------- + *奶矛件玄迕及失奶 丞毛馨笛允月 + ---------------------------------------*/ +BOOL NPC_EventAdd(int meindex,int talker,int mode) +{ + + char buf[64]; + char buff2[128]; + int j = 1,i = 0; + int kosuucnt = 0; + int itemindex; + char buff[1024*2]; + int rand_j = 0; + int rand_flg = 0; + int rand_cnt = 0; + int evcnt; + int b_flg = 0; + + /*--涩烂白央奶伙 卞踏中化丐月椭瘀毛 凶仄化中月手及毛 五请允--*/ + evcnt = NPC_EventFile( meindex, talker, buff); + + if(evcnt == -1) return FALSE; + +// if(NPC_EventFile( meindex, talker, buff) == FALSE) return FALSE; + + /*--失奶 丞及醒毛民尼永弁--*/ + if(NPC_ItemFullCheck( meindex, talker, buff, mode, evcnt) == FALSE){ + NPC_MsgDisp( meindex, talker, 4); + return FALSE; + } + + /*--云嗯民尼永弁卞 月--*/ + if(NPC_Util_GetStrFromStrWithDelim( buff, "DelStone", buff2, sizeof( buff2) ) + !=NULL) + { + int stone; + + stone = NPC_EventGetCost( meindex, talker, buff2); + + if( (CHAR_getInt( talker, CHAR_GOLD) - stone) < 0 ){ + NPC_MsgDisp( meindex, talker, 14); + return FALSE; + } + } + + + /*--矢永玄及 毛馨笛允月--*/ + if((NPC_Util_GetStrFromStrWithDelim( buff, "pet_skill", buff2, sizeof( buff2) ) + !=NULL) && mode == 0 ){ + if(mode == 0) { + NPC_PetSkillMakeStr( meindex, talker, 1); + return TRUE; + } + } + + + if(mode == 2) mode = 0; + + /*--矢永玄毛馨笛允月---*/ + if(NPC_Util_GetStrFromStrWithDelim( buff, "GetPet", buff2, sizeof( buff2) ) + !=NULL) + { + if(mode == 0){ + if(NPC_EventAddPet( meindex, talker, buff2,0) == FALSE) { + NPC_MsgDisp( meindex, talker, 10); + return FALSE; + } + }else if(mode == 1){ + + } + } + + // Robin add 从NPC取宠物蛋 + if(NPC_Util_GetStrFromStrWithDelim( buff, "GetEgg", buff2, sizeof( buff2) ) + !=NULL) + { + if(mode == 0){ + if(NPC_EventAddEgg( meindex, talker, buff2,0) == FALSE) { + print(" AddEgg_Error:%d ", __LINE__); + NPC_MsgDisp( meindex, talker, 10); + return FALSE; + } + }else if(mode == 1){ + + } + } + + if(NPC_Util_GetStrFromStrWithDelim( buff, "DelItem", buff2, sizeof( buff2) ) !=NULL){ + if(strstr(buff2,"EVDEL") != NULL){ + char work[256]; + char nbuf[256]; + + NPC_Util_GetStrFromStrWithDelim(buf, "EVENT", buff2, sizeof( buff2)); + getStringFromIndexWithDelim( buff2, ",", evcnt, work, sizeof( work)); + + if(strstr(buff,"Break")!=NULL){ + b_flg=1; + }else{ + b_flg=0; + } + + if(NPC_Util_GetStrFromStrWithDelim( buff, "NotDel", nbuf, sizeof( nbuf)) != NULL) { + NPC_EventDelItemEVDEL( meindex, talker, work, nbuf,b_flg); + }else{ + NPC_EventDelItemEVDEL( meindex, talker, work, "-1",b_flg); + } + + }else{ + if(strstr(buff,"Break")!=NULL){ + b_flg=1; + }else{ + b_flg=0; + } + + NPC_EventDelItem( meindex, talker, buff2, b_flg); + } + } + + /*--云嗯毛潸月---*/ + if(NPC_Util_GetStrFromStrWithDelim( buff, "DelStone", buff2, sizeof( buff2) ) + !=NULL) + { + int stone; + char token[128]; + + stone = NPC_EventGetCost( meindex, talker, buff2); + + CHAR_setInt(talker,CHAR_GOLD,CHAR_getInt( talker, CHAR_GOLD) - stone); + + /*--由仿丢□正霜曰--*/ + CHAR_send_P_StatusString( talker, CHAR_P_STRING_GOLD); + sprintf(token, "付出%d的stone。", stone); + CHAR_talkToCli( talker, -1, token, CHAR_COLORWHITE); + } + + + /*--仿件母丞失奶 丞---*/ + if(NPC_Util_GetStrFromStrWithDelim( buff, "GetRandItem", buf, sizeof( buf) ) != NULL ){ + j=1; + while( getStringFromIndexWithDelim( buf , "," , j, buff2, sizeof( buff2)) != FALSE ){ + j++; + rand_j++; + } + rand_cnt = 1; + } + + + /*-- 骚及失奶 丞必永玄--*/ + if(NPC_Util_GetStrFromStrWithDelim( buff, "GetItem", buf, sizeof( buf)) != NULL ){ + if(mode == 0) { + j = 1; + /*--窒蜊及失奶 丞毛 允井"--*/ + while(getStringFromIndexWithDelim( buf, "," , j, buff2, sizeof(buff2)) !=FALSE ){ + j++; + } + + j--; + for( i = CHAR_STARTITEMARRAY ; i < CHAR_MAXITEMHAVE ; i++ ){ + itemindex=CHAR_getItemIndex( talker , i ); + if( !ITEM_CHECKINDEX( itemindex) ){ + kosuucnt++; + } + } + j= j + rand_cnt; + if( kosuucnt < j ){ + NPC_MsgDisp( meindex, talker, 4); + return FALSE; + + }else{ + if(NPC_Util_GetStrFromStrWithDelim( buff, "GetRandItem", buff2, sizeof( buff2)) !=NULL) { + rand_flg = 1; + NPC_RandItemGet( meindex, talker, rand_j, buff2); + } + if(NPC_EventAddItem( meindex, talker, buf) == FALSE) return FALSE; + } + }else if(mode == 1){ + if(strstr(buff,"Break")!=NULL){ + b_flg=1; + }else{ + b_flg=0; + } + NPC_EventDelItem( meindex, talker, buf,b_flg); + } + } + + if( (NPC_Util_GetStrFromStrWithDelim( buff, "GetRandItem", buf, sizeof( buf) ) + !=NULL) && (rand_flg == 0) && mode == 0 ) + { + /*--民尼永弁 癫卞蝈 月井"-*/ + for( i = CHAR_STARTITEMARRAY ; i < CHAR_MAXITEMHAVE ; i++ ){ + itemindex=CHAR_getItemIndex( talker , i ); + if( !ITEM_CHECKINDEX( itemindex) ){ + kosuucnt++; + } + } + /*--坞五互丐月井升丹井--*/ + if( kosuucnt == 0 ){ + NPC_MsgDisp( meindex, talker, 4); + return FALSE; + } + + + NPC_RandItemGet( meindex, talker, rand_j,buf); + } + +#ifdef _EXCHANGEMAN_REQUEST_DELPET + if( NPC_Util_GetStrFromStrWithDelim( buff, "DelPet", buff2, sizeof( buff2) ) != NULL && mode == 0 ) { + char buf4[32]; + char buf5[256]; + int i=1; + char work[256]; + int j=1; + + if(strstr(buff2,"EVDEL") != NULL){ + NPC_Util_GetStrFromStrWithDelim( buf, "EVENT", buf5, sizeof( buf5)); + getStringFromIndexWithDelim( buf5, ",",evcnt , buff2, sizeof( buff2)); + while(getStringFromIndexWithDelim( buff2, "&", j, work, sizeof( work))!=FALSE){ + j++; + if(strstr( work, "PET") != NULL) { + if(strstr( work, "EV") != NULL) { + if(NPC_PetLvCheck( meindex, talker, work, 1) == FALSE) return FALSE; + }else{ + if(NPC_PetLvCheck( meindex, talker, work, 0) == FALSE) return FALSE; + } + } + } + j = 1; + while(getStringFromIndexWithDelim( buff2, "&", j, work, sizeof( work)) != FALSE){ + j++; + if(strstr( work, "PET") == NULL ) continue; + + if(strstr(work,"*") != NULL){ + int cnt=0; + int petcnt=0; + int petindex; + + getStringFromIndexWithDelim( work, "*", 2, buf4, sizeof( buf4)); + cnt = atoi(buf4); + + for(i=0 ; i < CHAR_MAXPETHAVE ; i++){ + petindex = CHAR_getCharPet( talker, i); + + if( petindex == -1 ) continue; + + if(strstr( work, "EV") != NULL) { + if(NPC_PetLvCheckType2(petindex, meindex, talker, work, 1) + == FALSE) { + continue; + } + }else{ + if(NPC_PetLvCheckType2(petindex, meindex, talker, work, 0) == FALSE) { + continue; + } + } + + if(NPC_EventDelPet( meindex, talker,i) == FALSE) return FALSE; + + petcnt++; + /*--隙烂蜊醒坌及矢永玄毛壅仄凶井升丹井"--*/ + if(cnt == petcnt) break; + + } + }else{ + /*--矢永玄毛绰轮允月醒毛隙烂仄化卅中及匹竟癫矢永玄毛蝈化壅允--*/ + + int petindex; + + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ) { + petindex = CHAR_getCharPet( talker, i); + + if( !CHAR_CHECKINDEX( petindex) ) continue; + + if(strstr( buff2, "EV") != NULL){ + if(NPC_PetLvCheckType2( petindex, meindex, talker, work, 1) == FALSE){ + continue; + } + }else{ + if(NPC_PetLvCheckType2( petindex, meindex, talker, work, 0) == FALSE) { + continue; + } + } + + if(NPC_EventDelPet( meindex, talker, i) == FALSE) return FALSE; + } + } + } + + }else{ + /*--手丹1蘸}矢永玄毛 匀化中月井及民尼永弁毛垫丹--*/ + while(getStringFromIndexWithDelim( buff2, ",", j, work, sizeof( work)) + !=FALSE) + { + j++; + /*--矢永玄及民尼永弁互反中匀化中月桦宁反域绎PET椭瘀毛民尼永弁允月 --*/ + if(strstr( work, "PET") != NULL) { + if(strstr( work, "EV") != NULL) { + if(NPC_PetLvCheck( meindex, talker, work, 1) == FALSE) return FALSE; + }else{ + if(NPC_PetLvCheck( meindex, talker, work, 0) == FALSE) return FALSE; + } + } + } + j = 1; + + while(getStringFromIndexWithDelim( buff2, ",", j, work, sizeof( work)) != FALSE) + { + j++; + if(strstr(work,"*") != NULL) + { + int cnt=0; + int petcnt=0; + int petindex; + + getStringFromIndexWithDelim( work, "*", 2, buf4, sizeof( buf4)); + cnt = atoi(buf4); + + for(i=0 ; i < CHAR_MAXPETHAVE ; i++){ + petindex = CHAR_getCharPet( talker, i); + + if( petindex == -1 ) continue; + + if(strstr( work, "EV") != NULL) { + if(NPC_PetLvCheckType2(petindex, meindex, talker, work, 1) == FALSE) { + continue; + } + }else{ + if(NPC_PetLvCheckType2(petindex, meindex, talker, work, 0) == FALSE) { + continue; + } + } + + if(NPC_EventDelPet( meindex, talker,i) == FALSE) return FALSE; + + petcnt++; + /*--隙烂蜊醒坌及矢永玄毛壅仄凶井升丹井"--*/ + if(cnt == petcnt) break; + } + }else{ + /*--矢永玄毛绰轮允月醒毛隙烂仄化卅中及匹竟癫矢永玄毛蝈化壅允--*/ + + int petindex; + + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ) { + petindex = CHAR_getCharPet( talker, i); + + if( !CHAR_CHECKINDEX( petindex) ) continue; + + if(strstr( buff2, "EV") != NULL){ + if(NPC_PetLvCheckType2( petindex, meindex, talker, work, 1) == FALSE){ + continue; + } + }else{ + if(NPC_PetLvCheckType2( petindex, meindex, talker, work, 0) == FALSE) { + continue; + } + } + if(NPC_EventDelPet( meindex, talker, i) == FALSE) return FALSE; + } + } + } + } + } +#endif + return TRUE; + +} + + +/*-------------------------------------- + *仿件母丞匹失奶 丞毛必永玄今六月 + ------------------------------------ */ +BOOL NPC_RandItemGet(int meidex,int talker,int rand_j,char *buf) +{ + char buff2[64]; + int randitem; + int ret; + int itemindex; + char token[128]; + + if(rand_j == 0) { + print("Event:由於0的介入,出现错误。"); + return FALSE; + } + + randitem = rand()%rand_j; + if(randitem == 0) randitem = rand_j; + + getStringFromIndexWithDelim(buf , "," , randitem, buff2, sizeof(buff2)) ; + + itemindex = ITEM_makeItemAndRegist( atoi( buff2)); + + if(itemindex == -1) return FALSE; + + /*失奶 丞及馨笛( 涛失奶 丞 卞中木化仄引丹 */ + ret = CHAR_addItemSpecificItemIndex( talker, itemindex); + if( ret < 0 || ret >= CHAR_MAXITEMHAVE ) { + print( "npc_exchangeman.c: additem error itemindex[%d]\n", itemindex); + ITEM_endExistItemsOne( itemindex); + return FALSE; + } + + if(itemindex != -1) { + LogItem( + CHAR_getChar( talker, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( talker, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID), /* 失奶 丞 寞 */ +#endif + "EventAddItem(任务需求所得到的道具)", + CHAR_getInt( talker,CHAR_FLOOR), + CHAR_getInt( talker,CHAR_X ), + CHAR_getInt( talker,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + } + + sprintf(token,"收下了%s",ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( talker, -1, token, CHAR_COLORWHITE); + + CHAR_sendItemDataOne( talker, ret); + return TRUE; + +} + + +/*---------------------------------------------------- + * 奶矛件玄 + ----------------------------------------------------*/ +BOOL NPC_AcceptDel(int meindex,int talker,int mode ) +{ + + char buf[1024*2]; + char buff2[256]; + int rand_j = 0; + int j = 0; + int evcnt; + int b_flg = 0; + evcnt = NPC_EventFile( meindex, talker, buf); + if(evcnt == -1) return FALSE; + + /*--涩烂白央奶伙 卞井井木化中月椭瘀毛 凶仄化中月手及毛 五请允--*/ +// if(NPC_EventFile(meindex,talker,buf)==FALSE) return FALSE; + + /*--失奶 丞及醒毛民尼永弁--*/ + if(NPC_ItemFullCheck( meindex, talker, buf, mode, evcnt) == FALSE){ + NPC_MsgDisp( meindex, talker, 4); + return FALSE; + } + + /*--云嗯民尼永弁卞 月--*/ + if(NPC_Util_GetStrFromStrWithDelim( buf, "DelStone", buff2, sizeof( buff2) ) + !=NULL) + { + int stone; + stone = NPC_EventGetCost( meindex, talker, buff2); + + if( (CHAR_getInt( talker, CHAR_GOLD) - stone) < 0 ) { + NPC_MsgDisp( meindex, talker, 14); + return FALSE; + } + } + + + /*--云嗯民尼永弁卞 月--*/ + if(NPC_Util_GetStrFromStrWithDelim( buf, "GetStone", buff2, sizeof( buff2) )!=NULL){ + int stone; + stone = atoi(buff2); + + if( (CHAR_getInt( talker, CHAR_GOLD) + stone) >= CHAR_getMaxHaveGold( talker) ) { + NPC_MsgDisp( meindex, talker, 13); + return FALSE; + } + } + + + /*--矢永玄及 毛馨笛允月--*/ + if((NPC_Util_GetStrFromStrWithDelim( buf, "pet_skill", buff2, sizeof( buff2) ) + !=NULL) && mode == 0 ){ + if(mode == 0){ + CHAR_setWorkInt( talker, CHAR_WORKSHOPRELEVANTTRD, 1); + NPC_PetSkillMakeStr( meindex, talker, 1); + return TRUE; + } + } + + /*--矢永玄毛壅允---*/ + if(NPC_Util_GetStrFromStrWithDelim( buf, "DelPet", buff2, sizeof( buff2) ) != NULL) { + char buf4[32]; + char buf5[256]; + int i=1; + char work[256]; + int j=1; + + if(strstr(buff2,"EVDEL") != NULL){ + NPC_Util_GetStrFromStrWithDelim( buf, "EVENT", buf5, sizeof( buf5)); + getStringFromIndexWithDelim( buf5, ",",evcnt , buff2, sizeof( buff2)); + + + /*--手丹1蘸}矢永玄毛 匀化中月井及民尼永弁毛垫丹--*/ + while(getStringFromIndexWithDelim( buff2, "&", j, work, sizeof( work)) + !=FALSE) + { + j++; + + /*--矢永玄及民尼永弁互反中匀化中月桦宁反域绎PET椭瘀毛民尼永弁允月 --*/ + if(strstr( work, "PET") != NULL) { + if(strstr( work, "EV") != NULL) { + if(NPC_PetLvCheck( meindex, talker, work, 1) == FALSE) return FALSE; + }else{ + if(NPC_PetLvCheck( meindex, talker, work, 0) == FALSE) return FALSE; + } + } + } + j = 1; + + + while(getStringFromIndexWithDelim( buff2, "&", j, work, sizeof( work)) + != FALSE) + { + j++; + if(strstr( work, "PET") == NULL ) continue; + + if(strstr(work,"*") != NULL) + { + int cnt=0; + int petcnt=0; + int petindex; + + getStringFromIndexWithDelim( work, "*", 2, buf4, sizeof( buf4)); + cnt = atoi(buf4); + + for(i=0 ; i < CHAR_MAXPETHAVE ; i++){ + petindex = CHAR_getCharPet( talker, i); + + if( petindex == -1 ) continue; + + if(strstr( work, "EV") != NULL) { + if(NPC_PetLvCheckType2(petindex, meindex, talker, work, 1) + == FALSE) { + continue; + } + }else{ + if(NPC_PetLvCheckType2(petindex, meindex, talker, work, 0) + == FALSE) { + continue; + } + } + + if(NPC_EventDelPet( meindex, talker,i) == FALSE) return FALSE; + + petcnt++; + /*--隙烂蜊醒坌及矢永玄毛壅仄凶井升丹井"--*/ + if(cnt == petcnt) break; + + } + }else{ + /*--矢永玄毛绰轮允月醒毛隙烂仄化卅中及匹竟癫矢永玄毛蝈化壅允--*/ + + int petindex; + + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ) { + petindex = CHAR_getCharPet( talker, i); + + if( !CHAR_CHECKINDEX( petindex) ) continue; + + if(strstr( buff2, "EV") != NULL){ + if(NPC_PetLvCheckType2( petindex, meindex, talker, work, 1) + == FALSE){ + continue; + } + }else{ + if(NPC_PetLvCheckType2( petindex, meindex, talker, work, 0) + == FALSE) { + continue; + } + } + + if(NPC_EventDelPet( meindex, talker, i) == FALSE) return FALSE; + } + } + } + + }else{ + + /*--手丹1蘸}矢永玄毛 匀化中月井及民尼永弁毛垫丹--*/ + while(getStringFromIndexWithDelim( buff2, ",", j, work, sizeof( work)) + !=FALSE) + { + j++; + /*--矢永玄及民尼永弁互反中匀化中月桦宁反域绎PET椭瘀毛民尼永弁允月 --*/ + if(strstr( work, "PET") != NULL) { + if(strstr( work, "EV") != NULL) { + if(NPC_PetLvCheck( meindex, talker, work, 1) == FALSE) return FALSE; + }else{ + if(NPC_PetLvCheck( meindex, talker, work, 0) == FALSE) return FALSE; + } + } + } + j = 1; + + + while(getStringFromIndexWithDelim( buff2, ",", j, work, sizeof( work)) + != FALSE) + { + j++; + if(strstr(work,"*") != NULL) + { + int cnt=0; + int petcnt=0; + int petindex; + + getStringFromIndexWithDelim( work, "*", 2, buf4, sizeof( buf4)); + cnt = atoi(buf4); + + for(i=0 ; i < CHAR_MAXPETHAVE ; i++){ + petindex = CHAR_getCharPet( talker, i); + + if( petindex == -1 ) continue; + + if(strstr( work, "EV") != NULL) { + if(NPC_PetLvCheckType2(petindex, meindex, talker, work, 1) + == FALSE) { + continue; + } + }else{ + if(NPC_PetLvCheckType2(petindex, meindex, talker, work, 0) + == FALSE) { + continue; + } + } + + if(NPC_EventDelPet( meindex, talker,i) == FALSE) return FALSE; + + petcnt++; + /*--隙烂蜊醒坌及矢永玄毛壅仄凶井升丹井"--*/ + if(cnt == petcnt) break; + + } + }else{ + /*--矢永玄毛绰轮允月醒毛隙烂仄化卅中及匹竟癫矢永玄毛蝈化壅允--*/ + + int petindex; + + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ) { + petindex = CHAR_getCharPet( talker, i); + + if( !CHAR_CHECKINDEX( petindex) ) continue; + + if(strstr( buff2, "EV") != NULL){ + if(NPC_PetLvCheckType2( petindex, meindex, talker, work, 1) + == FALSE){ + continue; + } + }else{ + if(NPC_PetLvCheckType2( petindex, meindex, talker, work, 0) + == FALSE) { + continue; + } + } + + if(NPC_EventDelPet( meindex, talker, i) == FALSE) return FALSE; + } + } + } + } + } + + + + /*--云嗯毛丐仆月---*/ + if(NPC_Util_GetStrFromStrWithDelim( buf, "GetStone", buff2, sizeof( buff2) ) + !=NULL) + { + int stone; + char token[128]; + + stone = atoi(buff2); + CHAR_setInt(talker,CHAR_GOLD,CHAR_getInt( talker, CHAR_GOLD) + stone); + /*--由仿丢□正霜曰--*/ + CHAR_send_P_StatusString( talker, CHAR_P_STRING_GOLD); + + sprintf( token,"得到%d的stone", stone); + CHAR_talkToCli( talker, -1, token, CHAR_COLORWHITE); + } + + + /*--矢永玄毛馨笛允月---*/ + if(NPC_Util_GetStrFromStrWithDelim( buf, "GetPet", buff2, sizeof( buff2) ) + !=NULL) + { + if(NPC_EventAddPet( meindex, talker, buff2,1) == FALSE) { + NPC_MsgDisp( meindex, talker, 10); + return FALSE; + } + } + + // Robin add 从NPC取宠物蛋 + if(NPC_Util_GetStrFromStrWithDelim( buf, "GetEgg", buff2, sizeof( buff2) ) + !=NULL) + { + if(NPC_EventAddEgg( meindex, talker, buff2,1) == FALSE) { + print(" AddEgg_Error:%d ", __LINE__); + NPC_MsgDisp( meindex, talker, 10); + return FALSE; + } + } + + /*--失奶 丞毛壅允--*/ + if(NPC_Util_GetStrFromStrWithDelim( buf, "DelItem", buff2, sizeof( buff2) ) != NULL){ + if(strstr(buff2,"EVDEL") != NULL){ + char work[256]; + char nbuf[256]; + + NPC_Util_GetStrFromStrWithDelim(buf, "EVENT", buff2, sizeof( buff2)); + getStringFromIndexWithDelim( buff2, ",", evcnt, work, sizeof( work)); + + if(strstr(buf,"Break")!=NULL){ + b_flg=1; + }else{ + b_flg=0; + } + + if(NPC_Util_GetStrFromStrWithDelim( buf, "NotDel", nbuf, sizeof( nbuf)) != NULL ){ + NPC_EventDelItemEVDEL( meindex, talker, work, nbuf,b_flg); + }else{ + NPC_EventDelItemEVDEL( meindex, talker, work, "-1",b_flg); + } + }else{ + if(strstr(buf,"Break")!=NULL){ + b_flg=1; + }else{ + b_flg=0; + } + NPC_EventDelItem( meindex, talker, buff2,b_flg); + } + } + + + /*--云嗯毛潸月---*/ + if(NPC_Util_GetStrFromStrWithDelim( buf, "DelStone", buff2, sizeof( buff2) ) + !=NULL) + { + int stone; + char token[128]; + + stone = NPC_EventGetCost( meindex, talker, buff2); + + CHAR_setInt(talker,CHAR_GOLD,CHAR_getInt( talker, CHAR_GOLD) - stone); + /*--由仿丢□正霜曰--*/ + CHAR_send_P_StatusString( talker, CHAR_P_STRING_GOLD); + sprintf( token, "付出%d的stone。", stone); + CHAR_talkToCli( talker, -1, token, CHAR_COLORWHITE); + } + + + /*--仿件母丞失奶 丞毛馨笛允月---*/ + if(NPC_Util_GetStrFromStrWithDelim( buf, "GetRandItem", buff2, sizeof( buff2) ) + !=NULL) + { + char buf3[32]; + j = 1; + while(getStringFromIndexWithDelim(buff2 , "," , j, buf3, sizeof( buf3)) + != FALSE ) + { + j++; + rand_j++; + } + NPC_RandItemGet( meindex, talker, rand_j, buff2); + } + + + /*--失奶 丞毛馨笛允月---*/ + if(NPC_Util_GetStrFromStrWithDelim( buf, "GetItem", buff2, sizeof( buff2) ) + !=NULL) + { + NPC_EventAddItem( meindex, talker, buff2); + } + + /*--由仿丢□正及霜耨--*/ + CHAR_complianceParameter( talker ); + CHAR_send_P_StatusString( talker , + CHAR_P_STRING_ATK|CHAR_P_STRING_DEF| + CHAR_P_STRING_CHARM|CHAR_P_STRING_QUICK| + CHAR_P_STRING_WATER|CHAR_P_STRING_FIRE| + CHAR_P_STRING_WIND|CHAR_P_STRING_EARTH + ); + + return TRUE; + +} + + +/*-------------------------- + * 奶矛件玄矢永玄毛绰轮 + ---------------------------*/ +BOOL NPC_EventDelPet(int meindex,int talker, int petsel) +{ + + int petindex; + char szPet[128]; + int defpet; + char msgbuf[64]; + + int fd = getfdFromCharaIndex( talker ); + + petindex = CHAR_getCharPet( talker, petsel); + + if( !CHAR_CHECKINDEX(petindex) ) return FALSE; + + if( CHAR_getInt( talker, CHAR_RIDEPET) == petsel ) { + + //CHAR_talkToCli( talker, -1, "骑乘中的宠物无法交出!", CHAR_COLORYELLOW ); + //return FALSE; + + CHAR_setInt( talker, CHAR_RIDEPET, -1); + CHAR_send_P_StatusString( talker, CHAR_P_STRING_RIDEPET ); + CHAR_complianceParameter( talker ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( talker , CHAR_WORKOBJINDEX )); + print(" DelRidePet "); + } + print(" EventDelPet "); + + /*--公及平乓仿互爵 卅日}矢永玄毛丹日内蔽 --*/ + if( CHAR_getWorkInt( CONNECT_getCharaindex( fd), + CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE) return FALSE; + /*--公及矢永玄互田玄伙井升丹井及民尼永弁--*/ + defpet = CHAR_getInt( talker, CHAR_DEFAULTPET); + if(defpet == petsel){ + CHAR_setInt( talker, CHAR_DEFAULTPET, -1); + lssproto_KS_send( fd, -1, TRUE); + } + + snprintf( msgbuf,sizeof( msgbuf), "交出%s。", + CHAR_getChar( petindex, CHAR_NAME)); + CHAR_talkToCli( talker, -1, msgbuf, CHAR_COLORWHITE); + + // 矢永玄毛澎 仄凶夫弘 + LogPet( + CHAR_getChar( talker, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( talker, CHAR_CDKEY ), + CHAR_getChar( petindex, CHAR_NAME), + CHAR_getInt( petindex, CHAR_LV), + "EvnetDell(任务删除)", + CHAR_getInt( talker,CHAR_FLOOR), + CHAR_getInt( talker,CHAR_X ), + CHAR_getInt( talker,CHAR_Y ), + CHAR_getChar( petindex, CHAR_UNIQUECODE) // shan 2001/12/14 + ); + + + /* 切 井日壅允 */ + CHAR_setCharPet( talker, petsel, -1); + + CHAR_endCharOneArray( petindex ); + + snprintf( szPet, sizeof( szPet ), "K%d", petsel); + // 蕙仄中矢永玄旦 □正旦霜曰勾仃月 + CHAR_sendStatusString( talker, szPet ); + + return TRUE; + +} + + +/*---------------------------- + * 矢永玄毛馨笛允月 + ------------------------------*/ +BOOL NPC_EventAddPet(int meindex, int talker, char *buff2,int mode) +{ + int ret; + char msgbuf[64]; + int enemynum; + int enemyid; + int i; + int petindex; + + /*--矢永玄 互钒中化中月井及民尼永弁--*/ + for( i = 0 ;i < CHAR_MAXPETHAVE ; i++) { + petindex = CHAR_getCharPet( talker, i); + if( petindex == -1 ) break; + } + + if(i == CHAR_MAXPETHAVE) return FALSE; + + + /* 娄醒及ID井日index毛潸 */ + if(strstr(buff2,",") != NULL){ + char buf2[16]; + while(getStringFromIndexWithDelim( buff2, ",", i, buf2, sizeof( buf2)) + != FALSE) { + i++; + } + i--; + i = rand()%i + 1; + getStringFromIndexWithDelim( buff2, ",", i, buf2, sizeof( buf2)); + enemyid = atoi( buf2); + }else{ + enemyid = atoi( buff2); + } + + enemynum = ENEMY_getEnemyNum(); + for( i = 0; i < enemynum; i ++ ) { + if( ENEMY_getInt( i, ENEMY_ID) == enemyid) { + break; + } + } + + if( i == enemynum ) return FALSE; + + ret = ENEMY_createPetFromEnemyIndex( talker, i); + + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ){ + if( CHAR_getCharPet( talker, i ) == ret )break; + } + if( i == CHAR_MAXPETHAVE ) i = 0; + if( CHAR_CHECKINDEX( ret ) == TRUE ){ + CHAR_setMaxExpFromLevel( ret, CHAR_getInt( ret, CHAR_LV )); + } + + petindex = CHAR_getCharPet(talker,i); + + if( !CHAR_CHECKINDEX( petindex) )return FALSE; + CHAR_complianceParameter( petindex ); + snprintf( msgbuf, sizeof( msgbuf ), "K%d", i ); + CHAR_sendStatusString( talker, msgbuf ); + + snprintf( msgbuf, sizeof( msgbuf ), "W%d", i ); + CHAR_sendStatusString( talker, msgbuf ); + snprintf( msgbuf,sizeof( msgbuf), "拿到%s。", + CHAR_getChar(petindex,CHAR_NAME)); + CHAR_talkToCli( talker, -1, msgbuf, CHAR_COLORWHITE); + + // 矢永玄毛澎卞 木凶夫弘 + LogPet( + CHAR_getChar( talker, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( talker, CHAR_CDKEY ), + CHAR_getChar( petindex, CHAR_NAME), + CHAR_getInt( petindex, CHAR_LV), + "EventGet(任务得到)", + CHAR_getInt( talker,CHAR_FLOOR), + CHAR_getInt( talker,CHAR_X ), + CHAR_getInt( talker,CHAR_Y ), + CHAR_getChar( petindex, CHAR_UNIQUECODE) // shan 2001/12/14 + ); + + + + if(mode == 0) { + /*--奶矛件玄迕及矢永玄--*/ + CHAR_setInt( petindex, CHAR_ENDEVENT, 1); + } + + return TRUE; + +} + +// Robin add NPC给宠物蛋 +BOOL NPC_EventAddEgg(int meindex, int talker, char *buff2,int mode) +{ + int ret; + char msgbuf[64]; + int enemynum; + int enemyid; + int petid; + int raise; + int i; + int petindex; + char buf2[32]; + char buf3[32]; + + print("\n 给蛋啦!!:%s ", buff2); + + /*--矢永玄 互钒中化中月井及民尼永弁--*/ + for( i = 0 ;i < CHAR_MAXPETHAVE ; i++) { + petindex = CHAR_getCharPet( talker, i); + if( petindex == -1 ) break; + } + + if(i == CHAR_MAXPETHAVE) { + print(" AddEgg_Error:%d ", __LINE__); + return FALSE; + } + + + /* 娄醒及ID井日index毛潸 */ + if(strstr(buff2,",") != NULL){ // 是否为随机给与 + while(getStringFromIndexWithDelim( buff2, ",", i, buf2, sizeof( buf2)) + != FALSE) { + i++; + } + i--; + i = rand()%i + 1; + getStringFromIndexWithDelim( buff2, ",", i, buf2, sizeof( buf2)); + + }else{ + strcpy( buf2, buff2); + } + + getStringFromIndexWithDelim( buf2, ";", 1, buf3, sizeof( buf3)); + enemyid = atoi( buf3); // 宠物蛋ID + getStringFromIndexWithDelim( buf2, ";", 2, buf3, sizeof( buf3)); + petid = atoi( buf3); // 孵出的宠物ID + getStringFromIndexWithDelim( buf2, ";", 3, buf3, sizeof( buf3)); + raise = atoi( buf3); // 养次数 + + + // 将enemyid转成enemybaseid + enemynum = ENEMY_getEnemyNum(); + for( i = 0; i < enemynum; i ++ ) { + if( ENEMY_getInt( i, ENEMY_ID) == petid) { + break; + } + } + if( i == enemynum ) { + print(" AddEgg_Error:%d ", __LINE__); + return FALSE; + } + petid = ENEMY_getInt( i, ENEMY_TEMPNO); + + + enemynum = ENEMY_getEnemyNum(); + for( i = 0; i < enemynum; i ++ ) { + if( ENEMY_getInt( i, ENEMY_ID) == enemyid) { + break; + } + } + if( i == enemynum ) { + print(" AddEgg_Error:%d ", __LINE__); + return FALSE; + } + + ret = ENEMY_createPetFromEnemyIndex( talker, i); + + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ){ + if( CHAR_getCharPet( talker, i ) == ret )break; + } + if( i == CHAR_MAXPETHAVE ) i = 0; + if( CHAR_CHECKINDEX( ret ) == TRUE ){ + CHAR_setMaxExpFromLevel( ret, CHAR_getInt( ret, CHAR_LV )); + } + + petindex = CHAR_getCharPet(talker,i); + + if( !CHAR_CHECKINDEX( petindex) ) { + print(" AddEgg_Error:%d ", __LINE__); + return FALSE; + } + + // 设为宠物蛋 + CHAR_setInt( petindex, CHAR_FUSIONBEIT, 1); + CHAR_setInt( petindex, CHAR_FUSIONCODE, -1); + CHAR_setInt( petindex, CHAR_FUSIONRAISE, raise); + CHAR_setInt( petindex, CHAR_FUSIONINDEX, petid); + CHAR_setInt( petindex, CHAR_FUSIONTIMELIMIT, (int)time( NULL)); + + CHAR_complianceParameter( petindex ); + snprintf( msgbuf, sizeof( msgbuf ), "K%d", i ); + CHAR_sendStatusString( talker, msgbuf ); + + snprintf( msgbuf, sizeof( msgbuf ), "W%d", i ); + CHAR_sendStatusString( talker, msgbuf ); + snprintf( msgbuf,sizeof( msgbuf), "拿到%s。", + CHAR_getChar(petindex,CHAR_NAME)); + CHAR_talkToCli( talker, -1, msgbuf, CHAR_COLORWHITE); + + // 矢永玄毛澎卞 木凶夫弘 + LogPet( + CHAR_getChar( talker, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( talker, CHAR_CDKEY ), + CHAR_getChar( petindex, CHAR_NAME), + CHAR_getInt( petindex, CHAR_LV), + "EventGetEgg(任务得到)", + CHAR_getInt( talker,CHAR_FLOOR), + CHAR_getInt( talker,CHAR_X ), + CHAR_getInt( talker,CHAR_Y ), + CHAR_getChar( petindex, CHAR_UNIQUECODE) // shan 2001/12/14 + ); + + + + if(mode == 0) { + /*--奶矛件玄迕及矢永玄--*/ + CHAR_setInt( petindex, CHAR_ENDEVENT, 1); + } + + return TRUE; + +} + + +/*--------------------------- + * 奶矛件玄 毛绰轮允月 + -----------------------------**/ +BOOL NPC_EventDelItem(int meindex,int talker,char *buf,int breakflg) +{ + + int i = 1, j = 1, k = 1 ; + char buff3[128]; + char buf2[32]; + int itemindex; + char token[256]; + + while(getStringFromIndexWithDelim(buf , "," , k, buff3, sizeof(buff3)) + !=FALSE ) + { + k++; + if(strstr(buff3,"*") != NULL) { + int itemno; + int kosuu; + int id; + int cnt=0; + + getStringFromIndexWithDelim( buff3, "*", 1, buf2, sizeof( buf2)); + itemno = atoi( buf2); + getStringFromIndexWithDelim( buff3, "*", 2, buf2, sizeof( buf2)); + kosuu = atoi( buf2); + + if( breakflg != 1 ) + NPC_ActionDoPileDelItem( talker, itemno, kosuu);//有堆叠的处理 + else{ + for( i =0 ; i < CHAR_MAXITEMHAVE ; i++ ){ + itemindex = CHAR_getItemIndex( talker , i ); + if( ITEM_CHECKINDEX( itemindex) ) { + id = ITEM_getInt( itemindex , ITEM_ID ); + if(itemno == id) { + cnt++; + LogItem( + CHAR_getChar( talker, CHAR_NAME ), // 平乓仿 + CHAR_getChar( talker, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID), // 失奶 丞 寞 +#endif + "EventDelItem(任务需求所收回的道具)", + CHAR_getInt( talker, CHAR_FLOOR), + CHAR_getInt( talker, CHAR_X ), + CHAR_getInt( talker, CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + + if(breakflg == 1){ + sprintf(token,"%s 坏了",ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( talker, -1, token, CHAR_COLORWHITE); + }else{ + sprintf(token,"交出%s",ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( talker, -1, token, CHAR_COLORWHITE); + } + //--失奶 丞毛坫诮-- + CHAR_setItemIndex( talker, i ,-1); + ITEM_endExistItemsOne(itemindex); + CHAR_sendItemDataOne( talker, i); + + if(cnt == kosuu){ + break; + } + } + } + } + } + } + else{ + /*--蓟氏分 寞及失奶 丞毛蓟请---*/ + for( j = 0 ; j < CHAR_MAXITEMHAVE ; j++){ + itemindex = CHAR_getItemIndex( talker ,j); + + if( ITEM_CHECKINDEX( itemindex)){ + if( atoi( buff3) == ITEM_getInt( itemindex, ITEM_ID)) { + LogItem( + CHAR_getChar( talker, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( talker, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID), /* 失奶 丞 寞 */ +#endif + "EventDelItem(任务需求所收回的道具)", + CHAR_getInt( talker,CHAR_FLOOR), + CHAR_getInt( talker,CHAR_X ), + CHAR_getInt( talker,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + if(breakflg == 1){ + sprintf(token,"%s 坏了",ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( talker, -1, token, CHAR_COLORWHITE); + }else{ + sprintf( token, "交出%s。", + ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( talker, -1, token, CHAR_COLORWHITE); + } + /*--失奶 丞毛坫诮--*/ + CHAR_setItemIndex( talker, j ,-1); + ITEM_endExistItemsOne( itemindex); + /*--由仿丢□正霜耨--*/ + CHAR_sendItemDataOne( talker, j); + } + } + } + } + } + + return TRUE; +} + +BOOL NPC_EventDelItemEVDEL(int meindex,int talker,char *buf,char *nbuf,int breakflg) +{ + + int k = 1, l = 1; + char buff3[128]; + char buf2[32]; + char buf4[32]; + + + + while(getStringFromIndexWithDelim(buf , "&" , k, buf4, sizeof(buf4)) !=FALSE ){ + int itemno; + k++; + if(strstr(buf4,"ITEM") == NULL) continue; + getStringFromIndexWithDelim(buf4 , "=" , 2, buff3, sizeof(buff3)); + + if(strstr(buff3,"*") != NULL) { + int kosuu; +#ifndef _ITEM_PILENUMS + char token[256]; + int i, itemindex, id, cnt; +#endif + getStringFromIndexWithDelim( buff3, "*", 1, buf2, sizeof( buf2)); + itemno = atoi( buf2); + getStringFromIndexWithDelim( buff3, "*", 2, buf2, sizeof( buf2)); + kosuu = atoi( buf2); + if(strstr(nbuf,"-1") == NULL){ + l = 1; + while(getStringFromIndexWithDelim(nbuf , "," , l, buf2, sizeof(buf2))){ + l++; + if(itemno == atoi( buf2)){ + l = -1; + break; + } + } + if(l == -1) continue; + } +#ifdef _ITEM_PILENUMS + NPC_ActionDoPileDelItem( talker, itemno, kosuu); +#else + cnt = 0; + for( i =0 ; i < CHAR_MAXITEMHAVE ; i++ ){ + itemindex = CHAR_getItemIndex( talker , i ); + if( ITEM_CHECKINDEX( itemindex) ) { + id = ITEM_getInt( itemindex , ITEM_ID ); + if(itemno == id) { + cnt++; + LogItem( + CHAR_getChar( talker, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( talker, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID), /* 失奶 丞 寞 */ +#endif + "EventDelItem(任务需求所收回的道具)", + CHAR_getInt( talker, CHAR_FLOOR), + CHAR_getInt( talker, CHAR_X ), + CHAR_getInt( talker, CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + if(breakflg == 1){ + sprintf(token,"%s 坏了",ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( talker, -1, token, CHAR_COLORWHITE); + }else{ + sprintf(token,"交出%s",ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( talker, -1, token, CHAR_COLORWHITE); + } + CHAR_setItemIndex( talker, i ,-1); + ITEM_endExistItemsOne(itemindex); + CHAR_sendItemDataOne( talker, i); + if(cnt == kosuu){ + break; + } + } + } + } +#endif + }else{ +#ifndef _ITEM_PILENUMS + int j, itemindex; + char token[256]; +#endif + if(strstr(nbuf,"-1") == NULL){ + l = 1; + while(getStringFromIndexWithDelim(nbuf , "," , l, buf2, sizeof(buf2))){ + l++; + if(atoi(buff3) == atoi( buf2)){ + l = -1; + break; + } + } + if(l == -1) continue; + } + itemno = -1; +#ifdef _ITEM_PILENUMS + NPC_ActionDoPileDelItem( talker, itemno, itemno); +#else + for( j = 0 ; j < CHAR_MAXITEMHAVE ; j++){ + itemindex = CHAR_getItemIndex( talker ,j); + if( ITEM_CHECKINDEX( itemindex)){ + if( atoi( buff3) == ITEM_getInt( itemindex, ITEM_ID)) { + LogItem( + CHAR_getChar( talker, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( talker, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID), /* 失奶 丞 寞 */ +#endif + "EventDelItem(任务需求所收回的道具)", + CHAR_getInt( talker,CHAR_FLOOR), + CHAR_getInt( talker,CHAR_X ), + CHAR_getInt( talker,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + if(breakflg == 1){ + sprintf(token,"%s 坏了",ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( talker, -1, token, CHAR_COLORWHITE); + }else{ + sprintf( token, "交出%s。", + ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( talker, -1, token, CHAR_COLORWHITE); + } + CHAR_setItemIndex( talker, j ,-1); + ITEM_endExistItemsOne( itemindex); + CHAR_sendItemDataOne( talker, j); + } + } + } +#endif + } + } + + return TRUE; +} + + +/*---------------------- + * 奶矛件玄 毛馨笛] + -----------------------*/ +BOOL NPC_EventAddItem(int meindex,int talker,char *buf) +{ + + char buff3[128]; + int i = 1; + int itemindex; + char buf3[32]; + int ret; + char token[256]; + + while(getStringFromIndexWithDelim(buf , "," , i, buff3, sizeof( buff3)) + != FALSE ) + { + i++; + if(strstr( buff3, "*") != NULL) { + + int itemno; + int kosuu; + int loop = 0; + + getStringFromIndexWithDelim( buff3, "*", 1, buf3,sizeof( buf3)); + itemno = atoi( buf3); + getStringFromIndexWithDelim( buff3, "*", 2, buf3,sizeof( buf3)); + kosuu = atoi( buf3); + + for(loop = 0 ; loop < kosuu ; loop++) { + itemindex = ITEM_makeItemAndRegist( itemno); + + if(itemindex == -1) return FALSE; + + /*失奶 丞及馨笛( 涛失奶 丞 卞中木化仄引丹 */ + ret = CHAR_addItemSpecificItemIndex( talker, itemindex); + if( ret < 0 || ret >= CHAR_MAXITEMHAVE ) { + print("npc_exchange:ACCEPTadditem error itemindex[%d]\n",itemindex); + ITEM_endExistItemsOne( itemindex); + return FALSE; + } + + if(itemindex != -1) { + LogItem( + CHAR_getChar( talker, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( talker, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID), /* 失奶 丞 寞 */ +#endif + "EventAddItem(任务需求所得到的道具)", + CHAR_getInt( talker, CHAR_FLOOR), + CHAR_getInt( talker, CHAR_X ), + CHAR_getInt( talker, CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + } + sprintf( token, "拿到%s。", ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( talker, -1, token, CHAR_COLORWHITE); + + CHAR_sendItemDataOne( talker, ret); + } + }else{ + itemindex = ITEM_makeItemAndRegist( atoi( buff3)); + + if(itemindex == -1) return FALSE; + + /*失奶 丞及馨笛( 涛失奶 丞 卞中木化仄引丹 */ + ret = CHAR_addItemSpecificItemIndex( talker, itemindex); + if( ret < 0 || ret >= CHAR_MAXITEMHAVE ) { + print( "npc_exchange.c: ACCEPTadditem error itemindex[%d]\n", itemindex); + ITEM_endExistItemsOne( itemindex); + return FALSE; + } + + if(itemindex != -1) { + LogItem( + CHAR_getChar( talker, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( talker, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID), /* 失奶 丞 寞 */ +#endif + "EventAddItem(任务需求所得到的道具)", + CHAR_getInt( talker, CHAR_FLOOR), + CHAR_getInt( talker, CHAR_X ), + CHAR_getInt( talker, CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + } + sprintf(token,"拿到%s。", ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( talker, -1, token, CHAR_COLORWHITE); + + CHAR_sendItemDataOne( talker, ret); + } + } + + return TRUE; +} + + +/*--------------------------------- + *椭瘀毛 凶仄化中月及毛 五请允 + ------------- ---------------------*/ +int NPC_EventFile(int meindex,int talker,char *arg) +{ + + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buff2[256]; + char buf[1024*2]; + int i=1; + int EvNo=0; + int evch; + + /*--涩烂白央奶伙毛 心 戈--*/ + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { + + print("GetArgStrErr"); + return -1; + } + + /*涩烂白央奶伙毛坌喃允月*/ + while(getStringFromIndexWithDelim( argstr, "EventEnd", i, buf,sizeof( buf)) + != FALSE) + { + CHAR_setWorkInt( talker, CHAR_WORKSHOPRELEVANTSEC, 0); + i++; + /*--奶矛件玄瓜件田□毛必永玄--*/ + NPC_Util_GetStrFromStrWithDelim( buf, "EventNo", buff2,sizeof( buff2) ); + EvNo = atoi( buff2); + + /*--白仿弘民尼永弁毛垫丹[允匹卞}仇及奶矛件玄互蔽 仄化中月桦宁反戚尺--*/ + if(NPC_EventCheckFlg( talker, EvNo) == TRUE) continue; + + /*--平□伐□玉及民尼永弁毛垫丹--*/ + if(NPC_Util_GetStrFromStrWithDelim( buf,"Pet_Name", buff2,sizeof( buff2) ) + != NULL) + { + CHAR_setWorkInt( talker, CHAR_WORKSHOPRELEVANTSEC, 1); + } + /*--平□伐□玉及民尼永弁毛垫丹--*/ + if(NPC_Util_GetStrFromStrWithDelim( buf,"KeyWord", buff2,sizeof( buff2) ) + != NULL) + { + if(CHAR_getWorkInt( talker, CHAR_WORKSHOPRELEVANT) != i ) continue; + } + + evch = NPC_ExChangeManEventCheck( meindex, talker, buf); + + if(evch != -1) { + /*--奶矛件玄椭瘀及民尼永弁--*/ +// if(NPC_ExChangeManEventCheck( meindex, talker, buf) == TRUE) { + strcpysafe(arg, sizeof( buf) ,buf); + return evch; + } + } + + return -1; + +} + + +/*--------------------------------- + * 失奶 丞及民尼永弁分仃毛垫丹 + -----------------------------------*/ +BOOL NPC_EventReduce(int meindex,int talker,char *buf) +{ + + char buf2[512]; + char buf3[256]; + int id = 0; + int i; + int itemindex; + int itemno; + int kosuu; + int cnt = 0; + + getStringFromIndexWithDelim( buf, "=", 2, buf2, sizeof( buf2)); + getStringFromIndexWithDelim( buf2, "*", 1, buf3, sizeof( buf3)); + itemno = atoi( buf3); + getStringFromIndexWithDelim( buf2, "*", 2, buf3, sizeof( buf3)); + kosuu = atoi( buf3); + + for( i = 0 ; i < CHAR_MAXITEMHAVE ; i++ ){ + itemindex = CHAR_getItemIndex( talker , i ); + if( ITEM_CHECKINDEX( itemindex) ){ + id = ITEM_getInt( itemindex ,ITEM_ID); + if(itemno == id){ + //change add 增加对堆叠的判断 + int pilenum = ITEM_getInt( itemindex, ITEM_USEPILENUMS); + if( pilenum ) + cnt+=pilenum; + else + cnt++; + + if(cnt >= kosuu){ + return TRUE; + } + } + } + } + + return FALSE; + +} + +/*---------------------------------- + *矢永玄卞旦平伙毛创尹今六月 + ----------------------------------*/ +void NPC_EventPetSkill( int meindex, int talker, char *data) +{ + + int skill; + int pet; + int slot; + int cost; + int skillID = 0; + char buf[64]; + char argstr[1024]; + char msg[512]; + int petindex; + char msgbuf[128]; + int fd = getfdFromCharaIndex( talker ); + int evcnt; + + if( NPC_Util_CharDistance( talker, meindex ) > 2) { + return; + } + + evcnt = NPC_EventFile( meindex, talker, argstr); + + if(evcnt == -1) return; + + /*--涩烂白央奶伙 卞妪井k伊 中月椭瘀毛 凶仄化中月手及毛 五请允--*/ +// if(NPC_EventFile( meindex, talker, argstr) == FALSE) return ; + + /*弁仿奶失件玄井日忒匀化仁月犯□正--*/ + /*升及 毛尹日氏分井"(蓟 寞) 升及矢永玄井"(蓟 寞) + 升及旦夫永玄井"(蓟 寞) 袄蟾*/ + makeStringFromEscaped( data); + + /*--犯□正及蕊曰坌仃--*/ + getStringFromIndexWithDelim( data, "|", 1, buf, sizeof( buf)); + skill = atoi( buf); + getStringFromIndexWithDelim( data, "|", 2, buf, sizeof( buf)); + pet = atoi( buf); + getStringFromIndexWithDelim( data, "|", 3, buf ,sizeof( buf)); + slot = atoi(buf); + getStringFromIndexWithDelim( data, "|", 4, buf, sizeof( buf)); + cost = atoi( buf); + + /*--旦平伙 毛必永玄允月--*/ + if( NPC_Util_GetStrFromStrWithDelim( argstr, "pet_skill", + msg, sizeof( msg)) != NULL) + { + getStringFromIndexWithDelim( msg, ",", skill, buf ,sizeof( buf)); + skillID = atoi( buf); + } + slot--; + + + petindex = CHAR_getCharPet( talker, pet-1); + + if(petindex == -1){ + print("PetindexErr"); + return; + } + + /*--公及平乓仿互爵 卅日}矢永玄毛丹日内蔽 --*/ + if( CHAR_getWorkInt( CONNECT_getCharaindex( fd), + CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE) return ; + + /*--矢永玄卞 毛创尹今六月--*/ + CHAR_setPetSkill( petindex, slot, skillID); + + /*--云嗯毛蛹日允--*/ + CHAR_setInt( talker, CHAR_GOLD, (CHAR_getInt( talker, CHAR_GOLD) - cost)); + + snprintf( msgbuf, sizeof( msgbuf ), "W%d",pet-1); + + // 蕙仄中矢永玄及 犯□正毛霜曰勾仃月 + CHAR_sendStatusString( talker, msgbuf ); + + CHAR_sendStatusString( talker, "P"); + +} + + +/*---------------------------------------- + * 失奶 丞互中匀天中井升丹井及民尼永弁 +----------- ------------------------------*/ +BOOL NPC_ItemFullCheck(int meindex,int talker,char *buf,int mode,int evcnt) +{ + + char buff2[256]; + int i = 1,j = 1; + int maxitem = 0; + int kosuucnt = 0; + int itemindex; + char buf3[256]; + int rand_j = 0; + int rand_cnt = 0; + char nbuf[256]; + char buff6[16]; + int l = 1; + + if(NPC_Util_GetStrFromStrWithDelim( buf, "DelItem", buff2, sizeof( buff2) ) != NULL ){ + if(strstr(buff2,"EVDEL") != NULL){ + char buff4[64]; + char buff5[32]; + + i = 1; + NPC_Util_GetStrFromStrWithDelim( buf, "EVENT", buff2, sizeof( buff2)); + getStringFromIndexWithDelim(buff2, "," , evcnt, buf3, sizeof(buf3)); + + while(getStringFromIndexWithDelim(buf3, "&" , j, buff4, sizeof(buff4))){ + j++; + if(strstr(buff4,"ITEM") != NULL) { + if(strstr(buff4,"*") != NULL) { + int itemno; + + l = 1; + getStringFromIndexWithDelim(buff4, "=" , 2, buff5, sizeof(buff5)); + getStringFromIndexWithDelim(buff5, "*" , 1, buff6, sizeof(buff6)); + itemno = atoi(buff6); + + if(NPC_Util_GetStrFromStrWithDelim( buf, "NotDel", nbuf, sizeof( nbuf)) !=NULL){ + while(getStringFromIndexWithDelim(nbuf , "," , l,buff6, sizeof(buff6))) + { + l++; + if(itemno == atoi( buff6)) + { + l = -1; + break; + } + } + } + if(l == -1) continue; + getStringFromIndexWithDelim(buff5, "*" , 2, buff6, sizeof(buff6)); + maxitem -= atoi( buff6); + }else{ + getStringFromIndexWithDelim(buff4, "=" , 2, buff5, sizeof(buff5)); + l = 1; + + if(NPC_Util_GetStrFromStrWithDelim( buf, "NotDel", nbuf, sizeof( nbuf)) + !=NULL){ + while(getStringFromIndexWithDelim(nbuf , "," , l,buff6, sizeof(buff6))) { + l++; + if(atoi(buff5) == atoi( buff6)){ + l = -1; + break; + } + } + } + if(l == -1) continue; + for( i = CHAR_STARTITEMARRAY ; i < CHAR_MAXITEMHAVE ; i++ ) { + itemindex = CHAR_getItemIndex( talker , i ); + if( ITEM_CHECKINDEX( itemindex)) { + if(atoi( buff5) == ITEM_getInt( itemindex, ITEM_ID)) { + maxitem--; + } + } + } + } + } + } + }else{ + char buff3[128]; + i = 1; + while(getStringFromIndexWithDelim(buff2, "," , i, buff3, sizeof(buff3)) !=FALSE ){ + i++; + if(strstr( buff3, "*") != NULL){ + getStringFromIndexWithDelim( buff3, "*", 2, buf3, sizeof( buf3)); + maxitem -= atoi( buf3); + }else{ + for( i = CHAR_STARTITEMARRAY ; i < CHAR_MAXITEMHAVE ; i++ ) { + itemindex=CHAR_getItemIndex( talker , i ); + if( ITEM_CHECKINDEX( itemindex)) { + if(atoi( buff3) == ITEM_getInt( itemindex, ITEM_ID)) { + maxitem--; + } + } + } + } + } + + } + } + + if(NPC_Util_GetStrFromStrWithDelim( buf, "GetRandItem", buff2, sizeof( buff2) ) !=NULL && mode == 0){ + j = 1; + while(getStringFromIndexWithDelim(buff2 , "," , j, buf3, sizeof( buf3)) !=FALSE ){ + j++; + rand_j++; + } + rand_cnt = 1; + for( i = CHAR_STARTITEMARRAY ; i +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "configfile.h" +#include "lssproto_serv.h" +#include "saacproto_cli.h" +#include "npc_familyman.h" +#include "family.h" + +extern int familyNumTotal; +extern char familyListBuf[MAXFAMILYLIST]; + +char sendbuf[1024]; +char buf[1024]; +char subbuf[128]; +int i, j; + +/* + * 涩烂今木凶它奴件玉它毛请允NPC + * 棵哑 平旦玄失玉矛件民乓□仁日中卅日综木月井手[ + * + */ + +struct { + int windowno; + int windowtype; + int buttontype; + int takeitem; + int giveitem; + char message[4096]; +}w; + +struct { + BOOL use; + int checkhaveitem; + int checkhaveitemgotowin; + int checkdonthaveitem; + int checkdonthaveitemgotowin; + int warp; + int battle; + int gotowin; +}buttonproc[13]; /* ok,cancel, yes,no,prev,next 及凛及质 */ + + + + + +enum { + CHAR_WORK_MSGCOLOR = CHAR_NPCWORKINT1, +}; +static void NPC_Familyman_selectWindow( int meindex, int toindex, int num); +static BOOL NPC_Familyman_readData( int meindex, int windowno, BOOL chkflg); +static int NPC_Familyman_restoreButtontype( char *data ); + +/********************************* +* 赓渝质 +*********************************/ +BOOL NPC_FamilymanInit( int meindex ) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[1024]; + //int i; + //char secondToken[1024]; + + // Robin test + // print(" familyman_Init "); + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "conff", buf, sizeof( buf)) + == NULL ) + { + print( "familyman:没有指定设定的档案 。\n"); + return FALSE; + } + /* 赓渝凛卞涩烂犯□正毛民尼永弁仄化支月 */ + if( !NPC_Familyman_readData( meindex, -1, TRUE) ) { + return FALSE; + } + + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPEWINDOWMAN ); + + return TRUE; +} + + + + +/********************************* +* 仄井仃日木凶凛及质 +*********************************/ +void NPC_FamilymanTalked( int meindex , int talkerindex , char *szMes ,int color ) +{ + + NPC_Familyman_selectWindow( meindex, talkerindex, 1 ); + +} +/********************************* +* 苇日木凶凛及质 +*********************************/ +void NPC_FamilymanLooked( int meindex , int lookedindex) +{ + + print(" Look:me:%d,looked:%d ",meindex,lookedindex); + NPC_Familyman_selectWindow( meindex, lookedindex,1 ); + +} + +static void NPC_Familyman_selectWindow( int meindex, int toindex, int num) +{ + + int fd; + char buf[256]; + + /* 皿伊奶乩□卞覆仄化分仃 杀允月 */ + if( CHAR_getInt( toindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) { + return; + } + /* ㄠ弘伉永玉动 及心 */ + if( !NPC_Util_charIsInFrontOfChar( toindex, meindex, 1 )) return; + + if( !NPC_Familyman_readData( meindex, num, FALSE) ) { + print( "familyman:readdata error\n"); + return; + } + + fd = getfdFromCharaIndex( toindex); + if( fd != -1 ) { + lssproto_WN_send( fd, w.windowtype, + w.buttontype, + w.windowno+100, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + makeEscapeString( w.message, buf, sizeof(buf))); + + } +} + +void NPC_FamilymanWindowTalked( int meindex, int talkerindex, + int seqno, int select, char *data) + +{ + + int button = -1; + char buf[256]; + + /* ㄠ弘伉永玉动 及心 */ + if( NPC_Util_CharDistance( talkerindex, meindex ) > 1) return; + + // CoolFish Add For Check Old Leader Del Family + if(seqno == CHAR_WINDOWTYPE_FAMILYMAN_OUT) + { + int fd = getfdFromCharaIndex( talkerindex); + if(select == WINDOW_BUTTONTYPE_YES) + FAMILY_Leave( fd, talkerindex, "E|1"); + return; + } + // CoolFish End + + /* 仇及它奴件玉它 寞及犯□正毛 心 戈 */ + if( !NPC_Familyman_readData( meindex, seqno - 100, FALSE) ) { + print( "familyman:readdata error\n"); + return; + } + /* 瓷仄凶示正件毛譬屯月 */ + if( w.windowtype == WINDOW_MESSAGETYPE_SELECT ) { + button = atoi( data)+5; + if( button > 12 ) { + print( "familyman:invalid button[%d]\n", button); + return; + } + } + else if( select & WINDOW_BUTTONTYPE_OK) button = 0; + else if( select & WINDOW_BUTTONTYPE_CANCEL) button = 1; + else if( select & WINDOW_BUTTONTYPE_YES) button = 2; + else if( select & WINDOW_BUTTONTYPE_NO) button = 3; + else if( select & WINDOW_BUTTONTYPE_PREV) button = 4; + else if( select & WINDOW_BUTTONTYPE_NEXT) button = 5; + else { + print( "familyman:invalid button[%d]\n", select); + return; + } + if( buttonproc[button].use == TRUE ) { + int fd; + int newwin = -1; + + fd = getfdFromCharaIndex( talkerindex); + + /* 示正件卞方匀化质 毛孔曰歹仃月 */ + if( newwin == -1 ) { + newwin = buttonproc[button].gotowin; + } + + // Robin + // 成立 + if( newwin == 5 ) { + if( CHAR_getInt( talkerindex, CHAR_FMINDEX ) > 0 ) + { + //CHAR_talkToCli( talkerindex, -1, "资格不符!已经加入家族。", CHAR_COLORWHITE ); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, + makeEscapeString( "\n很抱歉喔!你已经加入家族了!", buf, sizeof(buf))); + return; + } + if( (CHAR_getInt( talkerindex, CHAR_TRANSMIGRATION ) == 0) + && (CHAR_getInt( talkerindex, CHAR_LV) < 30) ) + { + //CHAR_talkToCli( talkerindex, -1, "很抱歉!等级不足。", CHAR_COLORWHITE ); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, + makeEscapeString( "\n很抱歉喔!你的等级不足!", buf, sizeof(buf))); + return; + } + + if( !NPC_EventCheckFlg( talkerindex, 4 ) ) + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, + makeEscapeString( "\n很抱歉喔!你必须先完成成人礼才行!", buf, sizeof(buf))); + return; + } + + if( CHAR_getInt( talkerindex, CHAR_GOLD ) < 10000 ) + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, + makeEscapeString( "\n很抱歉喔!你的申请手续费不足!", buf, sizeof(buf))); + return; + } + + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_FAMILYADD, WINDOW_BUTTONTYPE_NONE, CHAR_WINDOWTYPE_FAMILYMAN_ADD, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), "Hello!!" ); + + return; + } + // 列表 , 加入 + if( newwin == 6 ) + { + /* + strcpy( buf, ""); + j = 0; + for( i=1 ; i<=8 ; i++ ) { + if( i > familyNumTotal ) break; + if( getStringFromIndexWithDelim( familyListBuf, "|", i, subbuf, + sizeof(subbuf) ) == FALSE) break; + strcat( buf, "|" ); + strcat( buf, subbuf ); + j++; + } + + sprintf( sendbuf, "S|F|%d|%d|%d%s", familyNumTotal, 1, j, buf ); + //print(" FL:%s ", sendbuf ); + lssproto_FM_send( fd, sendbuf ); + */ + + //saacproto_ACShowFMList_send( acfd ); + + FAMILY_Detail( fd, talkerindex, "S|F|1|0" ); + return; + + } + // 退出 + if( newwin == 7 ) + { + if( CHAR_getInt( talkerindex, CHAR_FMINDEX ) == -1 ) { + // CHAR_talkToCli( talkerindex, -1, "你还未加入任何家族呀。", CHAR_COLORWHITE ); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, + makeEscapeString( "\n很抱歉喔!你还没有加入任何家族呀!", buf, sizeof(buf))); + return; + } + + //if (CHAR_getInt(talkerindex, CHAR_FMLEADERFLAG) == FMMEMBER_LEADER) { + // CHAR_talkToCli( talkerindex, -1, "族长....", CHAR_COLORWHITE ); + // return; + //} + + print(" WN2FM "); + + // CoolFish Change for old leader del family check + if(CHAR_getInt(talkerindex, CHAR_FMLEADERFLAG) == FMMEMBER_LEADER) + { + lssproto_WN_send(fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_YESNO, CHAR_WINDOWTYPE_FAMILYMAN_OUT, + CHAR_getWorkInt(meindex, CHAR_WORKOBJINDEX), + makeEscapeString("\n您现在是这个家族的族长喔...\n\n家族解散了就无法再救回唷!~\n\n确定要解散家族吗?",buf, sizeof(buf))); + return; + } + else + FAMILY_Leave( fd, talkerindex, "E|1"); + // CoolFish Change End + + return; + } + + if( !NPC_Familyman_readData( meindex, newwin, FALSE) ) { + print( "familyman:readdata error\n"); + return; + } +#if 0 + +#endif + + //fd = getfdFromCharaIndex( talkerindex); + if( fd != -1 ) { + lssproto_WN_send( fd, w.windowtype, + w.buttontype, + w.windowno+100, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + makeEscapeString( w.message, buf, sizeof(buf))); + } + + + + } +} +/* + * 涩烂白央奶伙毛 氏匹隙烂今木凶windowno及犯□正毛本永玄允月 + * + * 娄醒“ + * meindex int 仇及NPC及charaindex + * windowno int 它奴件玉它 寞 + * + */ +static BOOL NPC_Familyman_readData( int meindex, int windowno, BOOL chkflg) +{ + + int i; + int linenum = 0; + int endflg = FALSE; + int buttonendflg; + int winno = -1; + int buttonconfmode; + int b_mode; + int selectnum ; + int messagepos; + BOOL errflg = FALSE; + BOOL readflg = TRUE; + FILE *fp; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char filename[64]; + char opfile[128]; + char line[1024]; + char firstToken[1024]; + char secondToken[1024]; + + /* 它奴件玉它及涩烂毛 曰 戈厌瞻 */ + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + /* 涩烂白央奶伙 潸 */ + NPC_Util_GetStrFromStrWithDelim( argstr, "conff", filename, sizeof( filename)); + + sprintf( opfile, "%s/", getNpcdir( ) ); + strcat( opfile, filename); + + fp = fopen( opfile, "r"); + if( fp == NULL ) { + print( "familyman:file open error [%s]\n", opfile); + return FALSE; + } + + while( readflg == TRUE ) { + endflg = FALSE; + buttonendflg = TRUE; + buttonconfmode = FALSE; + selectnum = 0; + messagepos = 0; + winno = -1; + b_mode = -1; + errflg = FALSE; + + /* 赓渝祭 */ + w.windowno = -1; + w.windowtype = -1; + w.buttontype = -1; + w.takeitem = -1; + w.giveitem = -1; + w.message[0] = '\0'; + + for( i = 0; i < arraysizeof( buttonproc); i ++ ) { + buttonproc[i].use = FALSE; + buttonproc[i].checkhaveitem = -1; + buttonproc[i].checkhaveitemgotowin = -1; + buttonproc[i].checkdonthaveitem = -1; + buttonproc[i].checkdonthaveitemgotowin = -1; + buttonproc[i].warp = -1; + buttonproc[i].battle = -1; + buttonproc[i].gotowin = -1; + } + + while( 1) { + char buf[256]; + int ret; + if( !fgets( line, sizeof( line), fp)){ + readflg = FALSE; + break; + } + + linenum ++; + + /* 戊丢件玄反 骰 */ + if( line[0] == '#' || line[0] == '\n') continue; + /* 荼垫潸月 */ + chomp( line ); + + /* 垫毛帮溥允月 */ + /* 引内 tab 毛 " " 卞 五晶尹月 */ + replaceString( line, '\t' , ' ' ); + /* 燮 及旦矢□旦毛潸月[*/ + for( i = 0; i < strlen( line); i ++) { + if( line[i] != ' ' ) { + break; + } + strcpy( buf, &line[i]); + } + if( i != 0 ) strcpy( line, buf); + + /* delim "=" 匹 赓(1)及玄□弁件毛 月*/ + ret = getStringFromIndexWithDelim( line, "=", 1, firstToken, + sizeof( firstToken ) ); + if( ret == FALSE ){ + print( "Find error at %s in line %d. Ignore\n", + filename , linenum); + continue; + } + /* delim "=" 匹2 及玄□弁件毛 月*/ + ret = getStringFromIndexWithDelim( line, "=", 2, secondToken, + sizeof( secondToken ) ); + if( ret == FALSE ){ + print( "Find error at %s in line %d. Ignore\n", + filename , linenum); + continue; + } + + if( strcasecmp( firstToken, "winno") == 0 ) { + if( winno != -1 ) { + print( "familyman:已有winno却重新定义winno\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + errflg = TRUE; + readflg = FALSE; + break; + } + /* 它奴件玉它No毛忡绣 */ + winno = atoi( secondToken); + continue; + } + /* 它奴件玉它No 互瑁引匀化中卅中凛及垫反 骰允月 */ + if( winno == -1 ) { + print( "familyman:winno 尚未定义,资料却已设定。\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + readflg = FALSE; + errflg = FALSE; + break; + } + /* 它奴件玉它No 互域谯仄凶凛反椭瘀毛 戈[ + * 公木动陆反 骰允月 */ + if( (chkflg == FALSE && winno == windowno )|| + chkflg == TRUE) + { + if( buttonconfmode == TRUE ) { + if( strcasecmp( firstToken, "gotowin") == 0 ) { + buttonproc[b_mode].gotowin = atoi( secondToken); + } + else if( strcasecmp( firstToken, "checkhaveitem") == 0 ) { + buttonproc[b_mode].checkhaveitem = atoi( secondToken); + } + else if( strcasecmp( firstToken, "haveitemgotowin") == 0 ) { + buttonproc[b_mode].checkhaveitemgotowin = atoi( secondToken); + } + else if( strcasecmp( firstToken, "checkdonthaveitem") == 0 ) { + buttonproc[b_mode].checkdonthaveitem = atoi( secondToken); + } + else if( strcasecmp( firstToken, "donthaveitemgotowin") == 0 ) { + buttonproc[b_mode].checkdonthaveitemgotowin = atoi( secondToken); + } + else if( strcasecmp( firstToken, "endbutton") == 0 ) { + if( buttonproc[b_mode].gotowin == - 1 ) { + if( buttonproc[b_mode].checkhaveitem == -1 && + buttonproc[b_mode].checkdonthaveitem == -1) + { + errflg = TRUE; + } + else { + /* 升匀切井井凶匀吊分仃匹手涩烂今木化中木壬 */ + if( !((buttonproc[b_mode].checkhaveitem != -1 && + buttonproc[b_mode].checkhaveitemgotowin != -1) + || (buttonproc[b_mode].checkdonthaveitem != -1 && + buttonproc[b_mode].checkdonthaveitemgotowin != -1))) + { + errflg = TRUE; + } + } + } + + if( errflg == TRUE) { + print( "familyman: 找不到gotowin\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + readflg = FALSE; + errflg = TRUE; + break; + } + buttonproc[b_mode].use = TRUE; + buttonconfmode = FALSE; + buttonendflg = TRUE; + } + } + else { + + w.windowno = winno; + /* 它奴件玉它正奶皿及涩烂 */ + if( strcasecmp( firstToken, "wintype") == 0 ) { + w.windowtype = atoi( secondToken); + } + /* 示正件正奶皿及涩烂 */ + else if( strcasecmp( firstToken, "buttontype") == 0 ) { + w.buttontype = NPC_Familyman_restoreButtontype( secondToken); + } + /* getitem及涩烂 */ + else if( strcasecmp( firstToken, "takeitem") == 0 ) { + w.takeitem = atoi( secondToken); + } + /* giveitem及涩烂 */ + else if( strcasecmp( firstToken, "giveitem") == 0 ) { + w.giveitem = atoi( secondToken); + } + /* message及涩烂 */ + else if( strcasecmp( firstToken, "message") == 0 ) { + if( messagepos == 0 ) { + strcpy( w.message, secondToken); + messagepos = strlen( w.message); + } + else { + w.message[messagepos]='\n'; + messagepos++; + strcpy( &w.message[messagepos], secondToken); + messagepos+=strlen(secondToken); + } + } + /* 示正件毛瓷仄凶凛及涩烂 */ + else if( strcasecmp( firstToken, "okpressed") == 0 ) { + buttonconfmode = TRUE; + b_mode = 0; + buttonendflg = FALSE; + } + else if( strcasecmp( firstToken, "cancelpressed") == 0 ) { + buttonconfmode = TRUE; + b_mode = 1; + buttonendflg = FALSE; + } + else if( strcasecmp( firstToken, "yespressed") == 0 ) { + buttonconfmode = TRUE; + b_mode = 2; + buttonendflg = FALSE; + } + else if( strcasecmp( firstToken, "nopressed") == 0 ) { + buttonconfmode = TRUE; + b_mode = 3; + buttonendflg = FALSE; + } + else if( strcasecmp( firstToken, "prevpressed") == 0 ) { + buttonconfmode = TRUE; + b_mode = 4; + buttonendflg = FALSE; + } + else if( strcasecmp( firstToken, "nextpressed") == 0 ) { + buttonconfmode = TRUE; + b_mode = 5; + buttonendflg = FALSE; + } + else if( strcasecmp( firstToken, "selected") == 0 ) { + buttonconfmode = TRUE; + b_mode = 6 + selectnum; + buttonendflg = FALSE; + selectnum ++; + } + /* 涩烂蔽歹曰 */ + else if( strcasecmp( firstToken, "endwin") == 0 ) { + endflg = TRUE; + if( chkflg == FALSE) { + readflg = FALSE; + } + break; + } + else { + print( "familyman:设定是不可能的参数\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + } + } + } + else { + if( strcasecmp( firstToken, "endwin") == 0 ) { + winno = -1; + } + } + } + if( buttonendflg == FALSE) { + print( "familyman: 找不到endbutton\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + errflg = TRUE; + break; + } + if( winno != -1 ) { + if( w.windowtype == -1 ) { + print( "familyman: 找不到wintype\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + errflg = TRUE; + break; + } + if( w.buttontype == -1 ) { + print( "familyman: 找不到button\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + errflg = TRUE; + break; + } + if( strlen( w.message) == 0 ) { + print( "familyman: 找不到message\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + errflg = TRUE; + break; + } + } + } + fclose( fp); + + if( chkflg == FALSE && w.windowno == -1 ) { + print( "familyman: 找不到所指定的windowno\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + return FALSE; + } + if( winno != -1 && endflg == FALSE) { + print( "familyman: 找不到endwin\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + return FALSE; + } + if( errflg == TRUE) return FALSE; + + return TRUE; +} +/* + * buttontype=匹隙烂仄凶 侬 毛醒袄卞 晶允月[ + * + */ +static int NPC_Familyman_restoreButtontype( char *data ) +{ + int ret = 0; + int rc; + int i; + char buff[1024]; + + for( i = 1; ; i ++ ) { + rc = getStringFromIndexWithDelim( data, "|", i, buff, + sizeof( buff ) ); + if( rc == FALSE) break; + if( strcasecmp( buff, "ok") == 0 ) { + ret |= WINDOW_BUTTONTYPE_OK; + } + else if( strcasecmp( buff, "cancel") == 0 ) { + ret |= WINDOW_BUTTONTYPE_CANCEL; + } + else if( strcasecmp( buff, "yes") == 0 ) { + ret |= WINDOW_BUTTONTYPE_YES; + } + else if( strcasecmp( buff, "no") == 0 ) { + ret |= WINDOW_BUTTONTYPE_NO; + } + else if( strcasecmp( buff, "prev") == 0 ) { + ret |= WINDOW_BUTTONTYPE_PREV; + } + else if( strcasecmp( buff, "next") == 0 ) { + ret |= WINDOW_BUTTONTYPE_NEXT; + } + } + if( ret == 0 ) { + ret = atoi( data); + } + return ret; +} + + diff --git a/gmsv/npc/npc_fmchallenge.c b/gmsv/npc/npc_fmchallenge.c new file mode 100644 index 0000000..b45e914 --- /dev/null +++ b/gmsv/npc/npc_fmchallenge.c @@ -0,0 +1,776 @@ +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "lssproto_serv.h" +#include "npcutil.h" +#include "handletime.h" +#include "npc_fmchallenge.h" +#include "family.h" + +// 全部的家族 pk 赛程 +enum { + NPC_WORK_ID = CHAR_NPCWORKINT1, // 登记员 ID, 从 0 开始 +}; + +enum { + CHAR_WORK_PAGE = CHAR_WORKSHOPRELEVANT, // 换页用 + CHAR_WORK_DUELTIME = CHAR_WORKSHOPRELEVANTSEC, // 所选择的 pk 时间 +}; + +#define SCHEDULEFILEDIR "./Schedule/" + +void NPC_LoadPKSchedule(int meindex); // Load schedule from disk +void NPC_SavePKSchedule(int meindex); // save schedule to disk +// 产生排程表的 data +void NPC_LIST_gendata(int meindex, int talkerindex, int page, char *buf, int size); +// 产生选择家族的 data +void NPC_SELECT_gendata(int meindex, int page, char *buf, int size); +// 产生排程详细的 data +void NPC_DETAIL_gendata(int meindex, char *buf, int size, int dueltime); + +BOOL NPC_SchedulemanInit( int meindex ) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + int meid; + int interval; + + CHAR_setInt( meindex, CHAR_WHICHTYPE, CHAR_TYPEFMSCHEDULEMAN ); + CHAR_setWorkInt ( meindex, NPC_WORK_PREVIOUSCHECKTIME, -1); + + // 参数 + NPC_Util_GetArgStr(meindex, argstr, sizeof(argstr)); + meid = NPC_Util_GetNumFromStrWithDelim(argstr, "id" ); + if ((meid<0) || (meid>=MAX_SCHEDULEMAN)) { + print("SCHEDULEMAN init error: invalid ID(%d)\n",meid); + meid=0; + } + CHAR_setWorkInt(meindex, NPC_WORK_ID, meid); + + interval = NPC_Util_GetNumFromStrWithDelim(argstr, "loopinterval" ); + if ((interval<100) || (interval>10000)) interval=1000; + CHAR_setInt(meindex, CHAR_LOOPINTERVAL, interval); + + interval = NPC_Util_GetNumFromStrWithDelim(argstr, "challengetimeout"); + if ((interval<60) || (interval>60*60)) interval=20*60; + CHAR_setWorkInt(meindex, NPC_WORK_CHALLENGETIMEOUT, interval); + + interval = NPC_Util_GetNumFromStrWithDelim(argstr, "settingtimeout"); + if ((interval<10) || (interval>60*60)) interval=60; + CHAR_setWorkInt(meindex, NPC_WORK_SETTINGTIMEOUT, interval); + + interval = NPC_Util_GetNumFromStrWithDelim(argstr, "fightinterval"); + if ((interval<5) || (interval>60)) interval = 50; + CHAR_setWorkInt(meindex, NPC_WORK_FIGHTINTERVAL, interval); + + NPC_LoadPKSchedule(meindex); + + return TRUE; +} + +void NPC_SchedulemanTalked(int meindex, int talkerindex, char *msg, int color) +{ +// CHAR_talkToCli(talkerindex, meindex, "你好,我是家族PK登记员。", color); + +#if 0 + char buf[4096]; + int page; + + if (NPC_Util_CharDistance(meindex,talkerindex) > 2) return; + + if (strncmp(msg,"list",4)==0) { + CHAR_talkToCli(talkerindex, meindex, "显示将送出的 WN PKSCHEDULELIST data。", color); + page=atoi(&msg[4]); + + NPC_RemoveExpiredBattle(meindex); + NPC_LIST_gendata(meindex, talkerindex, page, buf, sizeof(buf)); + + CHAR_talkToCli(talkerindex, -1, buf, CHAR_COLORWHITE); + } else if (strncmp(msg,"select",6)==0) { + CHAR_talkToCli(talkerindex, meindex, "显示将送出的 WN PKSCHEDULESELECTFAMILY data。", color); + page=atoi(&msg[6]); + + NPC_SELECT_gendata(meindex, page, buf, sizeof(buf)); + + CHAR_talkToCli(talkerindex, -1, buf, CHAR_COLORWHITE); + } else if (strncmp(msg,"detail",6)==0) { + page=atoi(&msg[6]); + + CHAR_talkToCli(talkerindex, meindex, "显示将送出的 WN PKSCHEDULEDETAIL data。", color); + + NPC_DETAIL_gendata(meindex, buf, sizeof(buf), page); + + CHAR_talkToCli(talkerindex, -1, buf, CHAR_COLORWHITE); + } else { + CHAR_talkToCli(talkerindex, meindex, "你好,我是家族PK登记员。", color); + sprintf(buf, "我的 ID 是 %d (最大 %d)。", + CHAR_getWorkInt(meindex, NPC_WORK_ID), MAX_SCHEDULEMAN-1); + CHAR_talkToCli(talkerindex, meindex, buf, color); + CHAR_talkToCli(talkerindex, meindex, "目前测试中,测试指令:list,select,detail", color); + CHAR_talkToCli(talkerindex, meindex, "请下令。", color); + } +#endif + + char buf[4096]; + int fd; + + if (NPC_Util_CharDistance(meindex, talkerindex) > 2) return; + if (!NPC_Util_isFaceToFace(meindex, talkerindex, 2)) return; + fd = getfdFromCharaIndex(talkerindex); + if (fd == -1) return; + + CHAR_setWorkInt(talkerindex, CHAR_WORK_PAGE, 0); + NPC_LIST_gendata(meindex, talkerindex, 0, buf, sizeof(buf)); + lssproto_WN_send(fd, WINDOW_MESSAGETYPE_PKSCHEDULELIST, + WINDOW_BUTTONTYPE_NEXT | WINDOW_BUTTONTYPE_CANCEL, + CHAR_WINDOWTYPE_SCHEDULEMAN_START, + CHAR_getWorkInt(meindex, CHAR_WORKOBJINDEX), + buf); +} + +void NPC_SchedulemanWindowTalked(int meindex, int talkerindex, + int seqno, int select, char *data) +{ + int page; + int buttontype; + char buf[4096],token[256]; + int fd,i,dt,a; + int fmpks_pos; + + if (NPC_Util_CharDistance(meindex,talkerindex) > 2) return; + if (!NPC_Util_isFaceToFace(meindex, talkerindex, 2)) return; + fd = getfdFromCharaIndex(talkerindex); + if (fd == -1) return; + fmpks_pos = CHAR_getWorkInt(meindex, NPC_WORK_ID)*MAX_SCHEDULE; + +// print("seqno=%d select=%d data=%s\n", seqno,select,data); + + switch (seqno) { + case CHAR_WINDOWTYPE_SCHEDULEMAN_START: + switch (select) { + case WINDOW_BUTTONTYPE_NEXT: + case WINDOW_BUTTONTYPE_PREV: + page=CHAR_getWorkInt(talkerindex, CHAR_WORK_PAGE) + + MAXSCHEDULEINONEWINDOW + * (( select == WINDOW_BUTTONTYPE_NEXT) ? 1 : -1); + buttontype=WINDOW_BUTTONTYPE_NEXT | WINDOW_BUTTONTYPE_PREV | WINDOW_BUTTONTYPE_CANCEL; + if (page<0) { + page=0; + buttontype=WINDOW_BUTTONTYPE_NEXT | WINDOW_BUTTONTYPE_CANCEL; + } + if (page>MAX_SCHEDULE-MAXSCHEDULEINONEWINDOW) { + page=MAX_SCHEDULE-MAXSCHEDULEINONEWINDOW; + buttontype=WINDOW_BUTTONTYPE_PREV | WINDOW_BUTTONTYPE_CANCEL; + } + CHAR_setWorkInt(talkerindex, CHAR_WORK_PAGE, page); + // Send WN + NPC_LIST_gendata(meindex, talkerindex, page, buf, sizeof(buf)); + lssproto_WN_send(fd, WINDOW_MESSAGETYPE_PKSCHEDULELIST, + buttontype, + CHAR_WINDOWTYPE_SCHEDULEMAN_START, + CHAR_getWorkInt(meindex, CHAR_WORKOBJINDEX), + buf); + break; + case WINDOW_BUTTONTYPE_OK: + +#ifdef _DEATH_FAMILY_CANT_SCHEDULE // WON ADD 家族战玩家不能自行约战 + CHAR_talkToCli(talkerindex, meindex, "此星球无法约战", CHAR_COLORWHITE); + break; +#endif + + if ((CHAR_getInt(talkerindex,CHAR_FMLEADERFLAG)==FMMEMBER_LEADER) && + (CHAR_getWorkInt(talkerindex, CHAR_WORKFMSETUPFLAG)==1)) { + // 只有已成立家族的族长可以使用进一步的功能 (设定、更改、同意) + + // decide: send family list or detail or accept + dt=atoi(data); + for (i=0; iMAXFAMILYINONEWINDOW) + buttontype |= WINDOW_BUTTONTYPE_NEXT; + lssproto_WN_send(fd, WINDOW_MESSAGETYPE_PKSCHEDULESELECTFAMILY, + buttontype, + CHAR_WINDOWTYPE_SCHEDULEMAN_SELECT, + CHAR_getWorkInt(meindex, CHAR_WORKOBJINDEX), + buf); + } + break; + case FMPKS_FLAG_CHALLENGE: + { // 主队族长可以重设条件,客队则是同意 pk,其他人滚蛋 + int tkfmindex=CHAR_getInt(talkerindex, CHAR_FMINDEX); + if (tkfmindex==fmpks[fmpks_pos+i].host_index) { + fmpks[fmpks_pos+i].flag=FMPKS_FLAG_SETTING; + fmpks[fmpks_pos+i].setting_timeout= + CHAR_getWorkInt(meindex, NPC_WORK_SETTINGTIMEOUT); + // 送出细部调整的列表 + CHAR_setWorkInt(talkerindex, CHAR_WORK_DUELTIME, dt); + NPC_DETAIL_gendata(meindex, buf, sizeof(buf), dt); + lssproto_WN_send(fd, WINDOW_MESSAGETYPE_PKSCHEDULEDETAIL, + WINDOW_BUTTONTYPE_OK | WINDOW_BUTTONTYPE_CANCEL, + CHAR_WINDOWTYPE_SCHEDULEMAN_DETAIL, + CHAR_getWorkInt(meindex, CHAR_WORKOBJINDEX), + buf); + } else if (tkfmindex==fmpks[fmpks_pos+i].guest_index) { + fmpks[fmpks_pos+i].flag=FMPKS_FLAG_SCHEDULED; + page=CHAR_getWorkInt(talkerindex, CHAR_WORK_PAGE); + buttontype=WINDOW_BUTTONTYPE_NEXT | WINDOW_BUTTONTYPE_PREV | WINDOW_BUTTONTYPE_OK; + if (page<0) { + page=0; + buttontype=WINDOW_BUTTONTYPE_NEXT | WINDOW_BUTTONTYPE_OK; + } + if (page>MAX_SCHEDULE-MAXSCHEDULEINONEWINDOW) { + page=MAX_SCHEDULE-MAXSCHEDULEINONEWINDOW; + buttontype=WINDOW_BUTTONTYPE_PREV | WINDOW_BUTTONTYPE_OK; + } + CHAR_talkToCli(talkerindex, meindex, + "你的家族已经接受挑战。", CHAR_COLORWHITE); + // 重新送出 list + NPC_LIST_gendata(meindex, talkerindex, page, buf, sizeof(buf)); + lssproto_WN_send(fd, WINDOW_MESSAGETYPE_PKSCHEDULELIST, + buttontype, + CHAR_WINDOWTYPE_SCHEDULEMAN_START, + CHAR_getWorkInt(meindex, CHAR_WORKOBJINDEX), + buf); + } + } + break; + case FMPKS_FLAG_SETTING: + { // 主队族长可以重设条件 + int tkfmindex=CHAR_getInt(talkerindex, CHAR_FMINDEX); + if (tkfmindex==fmpks[fmpks_pos+i].host_index) { + fmpks[fmpks_pos+i].flag=FMPKS_FLAG_SETTING; + fmpks[fmpks_pos+i].setting_timeout= + CHAR_getWorkInt(meindex, NPC_WORK_SETTINGTIMEOUT); + // 送出细部调整的列表 + CHAR_setWorkInt(talkerindex, CHAR_WORK_DUELTIME, dt); + NPC_DETAIL_gendata(meindex, buf, sizeof(buf), dt); + lssproto_WN_send(fd, WINDOW_MESSAGETYPE_PKSCHEDULEDETAIL, + WINDOW_BUTTONTYPE_OK | WINDOW_BUTTONTYPE_CANCEL, + CHAR_WINDOWTYPE_SCHEDULEMAN_DETAIL, + CHAR_getWorkInt(meindex, CHAR_WORKOBJINDEX), + buf); + } + } + } + break; + } + } + NPC_SavePKSchedule(meindex); + } else { + + if (CHAR_getInt(talkerindex,CHAR_FMLEADERFLAG)!=FMMEMBER_LEADER) { + CHAR_talkToCli(talkerindex, meindex, + "只有族长才能预约家族PK喔。", CHAR_COLORWHITE); + } else if (CHAR_getWorkInt(talkerindex, CHAR_WORKFMSETUPFLAG)!=1) { + CHAR_talkToCli(talkerindex, meindex, + "你的家族还没有正式成立喔。", CHAR_COLORWHITE); + } + } + + break; + } + break; + case CHAR_WINDOWTYPE_SCHEDULEMAN_SELECT: + switch (select) { + case WINDOW_BUTTONTYPE_PREV: + case WINDOW_BUTTONTYPE_NEXT: + page=CHAR_getWorkInt(talkerindex, CHAR_WORK_PAGE) + + MAXFAMILYINONEWINDOW + * (( select == WINDOW_BUTTONTYPE_NEXT) ? 1 : -1); + buttontype=WINDOW_BUTTONTYPE_NEXT | WINDOW_BUTTONTYPE_PREV; + if (page<1) { + page=1; + buttontype=WINDOW_BUTTONTYPE_NEXT; + } + if (page>familyNumTotal-MAXFAMILYINONEWINDOW+1) { + page=familyNumTotal-MAXFAMILYINONEWINDOW+1; + buttontype=WINDOW_BUTTONTYPE_PREV; + } + CHAR_setWorkInt(talkerindex, CHAR_WORK_PAGE, page); + // Send WN + NPC_SELECT_gendata(meindex, page, buf, sizeof(buf)); + lssproto_WN_send(fd, WINDOW_MESSAGETYPE_PKSCHEDULESELECTFAMILY, + buttontype, + CHAR_WINDOWTYPE_SCHEDULEMAN_SELECT, + CHAR_getWorkInt(meindex, CHAR_WORKOBJINDEX), + buf); + break; + case WINDOW_BUTTONTYPE_OK: +#ifdef _FMVER21 + if ((CHAR_getInt(talkerindex,CHAR_FMLEADERFLAG)==FMMEMBER_LEADER) && +#else + if ((CHAR_getInt(talkerindex,CHAR_FMLEADERFLAG)==1) && +#endif + (CHAR_getWorkInt(talkerindex, CHAR_WORKFMSETUPFLAG)==1)) { + dt=CHAR_getWorkInt(talkerindex, CHAR_WORK_DUELTIME); + for (i=0; i0) && (a<=40)) fmpks[fmpks_pos+i].prepare_time=a; + } + // 最大人数 + if (getStringFromIndexWithDelim(data,"|",5,token,sizeof(token))) { + a=atoi(token); + if ((a>0) && (a<=50)) fmpks[fmpks_pos+i].max_player=a; + } + fmpks[fmpks_pos+i].flag=FMPKS_FLAG_CHALLENGE; + fmpks[fmpks_pos+i].challenge_timeout= + CHAR_getWorkInt(meindex, NPC_WORK_CHALLENGETIMEOUT); + CHAR_talkToCli(talkerindex, meindex, + "家族挑战设定完成。", CHAR_COLORWHITE); + } + break; + case WINDOW_BUTTONTYPE_CANCEL: + fmpks[fmpks_pos+i].flag=FMPKS_FLAG_NONE; + CHAR_talkToCli(talkerindex, meindex, + "清除家族挑战。", CHAR_COLORWHITE); + break; + } + NPC_SavePKSchedule(meindex); + } + } + } + } + break; + } +} + +void NPC_SchedulemanLoop(int meindex) +{ +// int fmpks_pos = CHAR_getWorkInt(meindex, NPC_WORK_ID)*MAX_SCHEDULE; + +/* + print("Scheduleman: fmpks_pos=%d dueltime=%d host=%s guest=%s\n", + fmpks_pos, fmpks[fmpks_pos].dueltime, fmpks[fmpks_pos].host_name, fmpks[fmpks_pos].guest_name); +*/ + + NPC_RemoveExpiredBattle(meindex); + NPC_ProcessTimeout(meindex); +} + +// 移除过期的战斗 +void NPC_RemoveExpiredBattle(int meindex) +{ + struct tm tm1; + int keeptime; + int i,expired=-1; + int fmpks_pos = CHAR_getWorkInt(meindex, NPC_WORK_ID)*MAX_SCHEDULE; + int prevckt = CHAR_getWorkInt(meindex, NPC_WORK_PREVIOUSCHECKTIME); + int fin = CHAR_getWorkInt(meindex, NPC_WORK_FIGHTINTERVAL); + int h,d; + + // 以目前的时刻当标准去移除过期的排程 + memcpy( &tm1, localtime( (time_t *)&NowTime.tv_sec), sizeof( tm1)); +/* + if (tm1.tm_hour==0) + keeptime=0; + else + keeptime=(tm1.tm_hour-1)*100 + tm1.tm_min; +*/ + if (tm1.tm_min=0) { + // 移动後面的排程来取代已经失效的排程 + for (i=expired+1; i=60 ) h=h+100-60; + if (h>=2400) { + h = h-2400; + d = 10000; + } + fmpks[fmpks_pos+i].dueltime=d+h; + } + } +} + +// 处理 timeout +void NPC_ProcessTimeout(int meindex) +{ + int i; + int fmpks_pos = CHAR_getWorkInt(meindex, NPC_WORK_ID)*MAX_SCHEDULE; + + for (i=0; i=0) { + fmpks[fmpks_pos+i].challenge_timeout--; + if (fmpks[fmpks_pos+i].challenge_timeout<0) { + fmpks[fmpks_pos+i].host_index = -1; + strcpy(fmpks[fmpks_pos+i].host_name, "-1"); + fmpks[fmpks_pos+i].guest_index = -1; + strcpy(fmpks[fmpks_pos+i].guest_name, "-1"); + fmpks[fmpks_pos+i].prepare_time = -1; + fmpks[fmpks_pos+i].max_player = -1; + fmpks[fmpks_pos+i].flag=-1; + } + } + } + if (fmpks[fmpks_pos+i].flag==FMPKS_FLAG_SETTING) { + if (fmpks[fmpks_pos+i].setting_timeout>=0) { + fmpks[fmpks_pos+i].setting_timeout--; + if (fmpks[fmpks_pos+i].setting_timeout<0) { + fmpks[fmpks_pos+i].host_index = -1; + strcpy(fmpks[fmpks_pos+i].host_name, "-1"); + fmpks[fmpks_pos+i].guest_index = -1; + strcpy(fmpks[fmpks_pos+i].guest_name, "-1"); + fmpks[fmpks_pos+i].prepare_time = -1; + fmpks[fmpks_pos+i].max_player = -1; + fmpks[fmpks_pos+i].flag=-1; + } + } + } + } +} + +// 检查, 一个家族只能安排一场战斗 +BOOL NPC_AlreadyScheduled(int meindex, int talkerindex) +{ + int i; + int fmpks_pos = CHAR_getWorkInt(meindex, NPC_WORK_ID)*MAX_SCHEDULE; + int tkfmindex = CHAR_getInt(talkerindex, CHAR_FMINDEX); + int flag=1; + + for (i=0; i=FMPKS_FLAG_SCHEDULED) { + if (fmpks[fmpks_pos+i].host_index==tkfmindex) return TRUE; + } else if (fmpks[fmpks_pos+i].flag!=FMPKS_FLAG_NONE) { + if (flag==1) flag=0; else return TRUE; + } + } + return FALSE; +} + +// 读取 schedule 档案 +void NPC_LoadPKSchedule(int meindex) +{ + char filename[256],tmp[4096],token[256]; + FILE *f; + int i; + int fmpks_pos = CHAR_getWorkInt(meindex, NPC_WORK_ID)*MAX_SCHEDULE; + + snprintf(filename,sizeof(filename), "%s%d_%d_%d", + SCHEDULEFILEDIR, CHAR_getInt(meindex, CHAR_FLOOR), + CHAR_getInt(meindex, CHAR_X), + CHAR_getInt(meindex, CHAR_Y) ); + + if( ! (f=fopen( filename, "r" )) ){ // create new schedule file + f = fopen( filename, "w" ); + if( !f ){ + print( "ERROR:Can't create Schedule file %s!\n",filename ); + return; + } + for (i=0; i=MAX_SCHEDULE)) return; + + // 记录目前的时间 + memcpy( &tm1, localtime( (time_t *)&NowTime.tv_sec), sizeof( tm1)); + sprintf(buf, "%d|", tm1.tm_hour*100 + tm1.tm_min); + + for (i=page; i +#include "char.h" +#include "object.h" +#include "lssproto_serv.h" +#include "saacproto_cli.h" +#include "npcutil.h" +#include "handletime.h" +#include "npc_fmdengon.h" +#include "family.h" + +#define DENGONFILELINENUM 35 // 整个公布栏的资料笔数 +#define FMSDENGONFILELINENUM 140 // 家族间的留言板资料笔数 +#define DENGONFILEENTRYSIZE 128 // 本文大小 +#ifdef _NEW_MANOR_LAW +#define MESSAGEINONEWINDOW 10 // 每页所显示的笔数 +#else +#define MESSAGEINONEWINDOW 7 // 每页所显示的笔数 +#endif +#define FMMAXNUM 1000 // 家族数量的最大值 +#define FM_MEMBERLIST 2 // 家族成员列表 (主功能表的按键) +#define FM_MEMBERMEMO 3 // 家族留言 (主功能表的按键) +#ifdef _UN_FMMEMO +#define FM_FMPOINT 4 // 申请家族据点 (主功能表的按键) +#define FM_FMDPTOP 5 // 家族间强者表 (主功能表的按键) +#else +#define FM_FMMEMO 4 // 家族之间留言板 (主功能表的按键) +#ifdef _UN_FMPOINT +#define FM_FMDPTOP 5 // 家族间强者表 (主功能表的按键) +#else +#define FM_FMPOINT 5 // 申请家族据点 (主功能表的按键) +#define FM_FMDPTOP 6 // 家族间强者表 (主功能表的按键) +#endif//_UN_FMPOINT +#endif//_UN_FMMEMO +#define FM_WAITTIME (3*60) +#define FMSDENGON_SN 10000 // 家族之间的留言板的识别码 + +extern struct FMMEMBER_LIST memberlist[FMMAXNUM]; // 接收 AC 成员列表资料的 ARRAY +extern struct FMS_MEMO fmsmemo; // 家族之间的留言板 +extern struct FM_POINTLIST fmpointlist; // 家族据点 +extern struct FMS_DPTOP fmdptop; // 家族强者表 +extern int leaderdengonindex; // 777 家族公布栏 index +char NPC_sendbuf[DENGONFILEENTRYSIZE*MESSAGEINONEWINDOW]; // 一整页的大小 +char enlistbuf[4096]; // 家族成员召募 BUF(显示用的) + +unsigned long READTIME1 = 0, + READTIME2 = 0, + READTIME3 = 0, + READTIME4 = 0; + +// 公布栏的初始化(when gmsv start) +BOOL NPC_FmDengonInit( int meindex) +{ + int i; + + CHAR_setInt( meindex, CHAR_WHICHTYPE, CHAR_TYPEDENGON); + + if( CHAR_getInt(meindex, CHAR_FLOOR) == 777 ){ + leaderdengonindex = meindex; + } + + if( READTIME1 == 0 || READTIME2 == 0 || READTIME3 == 0 || READTIME4 == 0 ){ + READTIME1 = NowTime.tv_sec+FM_WAITTIME, + READTIME2 = NowTime.tv_sec+FM_WAITTIME, + READTIME3 = NowTime.tv_sec+FM_WAITTIME, + READTIME4 = NowTime.tv_sec+FM_WAITTIME; + + // 取得家族的成员列表(memberlist struct),以及家族的留言板 + for( i=0; i DENGONDISTANCE) return; +#endif + + // 家族留言板 + if( seqno == CHAR_WINDOWTYPE_FM_DENGON) + { + int dengonindex; + int fmindex_wk; + char tmp_buffer[4096],tmp[4096]; + + getStringFromIndexWithDelim(data,"|",1,tmp_buffer,sizeof(tmp_buffer)); + dengonindex = atoi(tmp_buffer); + + fmindex_wk = CHAR_getWorkInt( talker, CHAR_WORKFMINDEXI); + + if( fmindex_wk < 0 || fmindex_wk >= FMMAXNUM) return; + + switch( select){ + case WINDOW_BUTTONTYPE_NEXT: + case WINDOW_BUTTONTYPE_PREV: + { + int fd,i; + fd = getfdFromCharaIndex( talker); + if( fd == -1) return; + + dengonindex += 7 * (( select == WINDOW_BUTTONTYPE_NEXT) ? 1 : -1); + if( dengonindex > memberlist[fmindex_wk].memoindex && memberlist[fmindex_wk].memonum < DENGONFILELINENUM) + dengonindex = memberlist[fmindex_wk].memoindex; + else if( dengonindex < 6 && memberlist[fmindex_wk].memonum < DENGONFILELINENUM) + dengonindex = 6; + else if( dengonindex < 1 && memberlist[fmindex_wk].memonum >= DENGONFILELINENUM) + dengonindex = memberlist[fmindex_wk].memonum+dengonindex; + else if( dengonindex > memberlist[fmindex_wk].memonum && memberlist[fmindex_wk].memonum >= DENGONFILELINENUM) + dengonindex -= memberlist[fmindex_wk].memonum; + + buttontype = WINDOW_BUTTONTYPE_OKCANCEL; + if( dengonindex==memberlist[fmindex_wk].memoindex && memberlist[fmindex_wk].memonum >= DENGONFILELINENUM) + buttontype |= WINDOW_BUTTONTYPE_PREV; + else if( (dengonindex - 7)<=memberlist[fmindex_wk].memoindex && (dengonindex - 7)>=(memberlist[fmindex_wk].memoindex - 7) && + memberlist[fmindex_wk].memonum >= DENGONFILELINENUM) + buttontype |= WINDOW_BUTTONTYPE_NEXT; + else if( dengonindex==memberlist[fmindex_wk].memoindex) + buttontype |= WINDOW_BUTTONTYPE_PREV; + else if( dengonindex == 6) buttontype |= WINDOW_BUTTONTYPE_NEXT; + else{ + buttontype |= WINDOW_BUTTONTYPE_PREV; + buttontype |= WINDOW_BUTTONTYPE_NEXT; + } + if(dengonindex >= 6){ + strcpy( NPC_sendbuf, memberlist[fmindex_wk].memo[dengonindex - 6]); + strcat( NPC_sendbuf, "\n"); + for( i=(dengonindex - 5); i<=dengonindex; i++){ + strcat( NPC_sendbuf, memberlist[fmindex_wk].memo[i]); + strcat( NPC_sendbuf, "\n"); + } + sprintf(tmp, "%d\n", dengonindex); + strcat( NPC_sendbuf, tmp); + } + if(dengonindex < 6){ + strcpy( NPC_sendbuf, memberlist[fmindex_wk].memo[memberlist[fmindex_wk].memonum+(dengonindex - 6)]); + strcat( NPC_sendbuf, "\n"); + for( i=memberlist[fmindex_wk].memonum+(dengonindex - 5); i DENGONFILELINENUM) + memberlist[fmindex_wk].memonum = DENGONFILELINENUM; + + memberlist[fmindex_wk].memoindex++; + if( memberlist[fmindex_wk].memoindex >= DENGONFILELINENUM) + memberlist[fmindex_wk].memoindex=0; + + dengonindex = memberlist[fmindex_wk].memoindex; + + if( dengonindex < 6 && memberlist[fmindex_wk].memonum= 6){ + strcpy( NPC_sendbuf, memberlist[fmindex_wk].memo[dengonindex - 6]); + strcat( NPC_sendbuf, "\n"); + for( i=(dengonindex-5); i<=dengonindex; i++){ + strcat( NPC_sendbuf, memberlist[fmindex_wk].memo[i]); + strcat( NPC_sendbuf, "\n"); + } + sprintf(tmp, "%d\n", dengonindex); + strcat( NPC_sendbuf, tmp); + } + if( dengonindex < 6){ + strcpy( NPC_sendbuf, memberlist[fmindex_wk].memo[memberlist[fmindex_wk].memonum+(dengonindex - 6)]); + strcat( NPC_sendbuf, "\n"); + for( i=memberlist[fmindex_wk].memonum+(dengonindex - 5); i fmsmemo.memoindex && fmsmemo.memonum < FMSDENGONFILELINENUM) + dengonindex = fmsmemo.memoindex; + else if( dengonindex < 6 && fmsmemo.memonum < FMSDENGONFILELINENUM) + dengonindex = 6; + else if( dengonindex < 1 && fmsmemo.memonum >= FMSDENGONFILELINENUM) + dengonindex = fmsmemo.memonum+dengonindex; + else if( dengonindex > fmsmemo.memonum && fmsmemo.memonum >= FMSDENGONFILELINENUM) + dengonindex -= fmsmemo.memonum; + + buttontype = WINDOW_BUTTONTYPE_OKCANCEL; + if( dengonindex==fmsmemo.memoindex && fmsmemo.memonum >= FMSDENGONFILELINENUM) + buttontype |= WINDOW_BUTTONTYPE_PREV; + else if( (dengonindex-7)<=fmsmemo.memoindex && (dengonindex - 7)>=(fmsmemo.memoindex - 7) && + fmsmemo.memonum >= FMSDENGONFILELINENUM) + buttontype |= WINDOW_BUTTONTYPE_NEXT; + else if( dengonindex == fmsmemo.memoindex) + buttontype |= WINDOW_BUTTONTYPE_PREV; + else if( dengonindex == 6 ) + buttontype |= WINDOW_BUTTONTYPE_NEXT; + else{ + buttontype |= WINDOW_BUTTONTYPE_PREV; + buttontype |= WINDOW_BUTTONTYPE_NEXT; + } + + if( dengonindex >= 6 ){ + if( (dengonindex - 6) >= 140 ) return; + strcpy( NPC_sendbuf, fmsmemo.memo[dengonindex - 6]); + strcat( NPC_sendbuf, "\n"); + for( i=(dengonindex - 5); i<=dengonindex; i++){ + strcat( NPC_sendbuf, fmsmemo.memo[i]); + strcat( NPC_sendbuf, "\n"); + } + sprintf(tmp, "%d\n", dengonindex); + strcat( NPC_sendbuf, tmp); + } + if(dengonindex < 6){ + if( (fmsmemo.memonum+(dengonindex - 6)) >= 140 || + (fmsmemo.memonum+(dengonindex - 6)) < 0 ) return; + + strcpy( NPC_sendbuf, fmsmemo.memo[fmsmemo.memonum+(dengonindex - 6)]); + + strcat( NPC_sendbuf, "\n"); + for( i=fmsmemo.memonum+(dengonindex - 5); i FMSDENGONFILELINENUM) + fmsmemo.memonum = FMSDENGONFILELINENUM; + + fmsmemo.memoindex++; + if( fmsmemo.memoindex >= FMSDENGONFILELINENUM) + fmsmemo.memoindex = 0; + + dengonindex = fmsmemo.memoindex; + if( dengonindex < 6 && fmsmemo.memonum= 6){ + strcpy( NPC_sendbuf, fmsmemo.memo[dengonindex - 6]); + strcat( NPC_sendbuf, "\n"); + for( i=(dengonindex - 5); i<=dengonindex; i++){ + strcat( NPC_sendbuf, fmsmemo.memo[i]); + strcat( NPC_sendbuf, "\n"); + } + sprintf(tmp, "%d\n", dengonindex); + strcat( NPC_sendbuf, tmp); + } + if(dengonindex < 6){ + strcpy( NPC_sendbuf, fmsmemo.memo[fmsmemo.memonum+(dengonindex - 6)]); + strcat( NPC_sendbuf, "\n"); + for( i=fmsmemo.memonum+(dengonindex - 5); i= FMMAXNUM) return; + + fd = getfdFromCharaIndex( talker ); + if( fd == -1 ) return; + + switch( select ){ + case WINDOW_BUTTONTYPE_OK: + { + strcpy( numberlistbuf, memberlist[fmindex_wk].numberlistarray[0]); + strcat( numberlistbuf, "\n"); + for( i=1; i<10; i++){ + strcat( numberlistbuf, memberlist[fmindex_wk].numberlistarray[i]); + strcat( numberlistbuf, "\n"); + } + // 增加程式码(向AC要召募人员的值) + sprintf(enlistbuf, "是否继续召募家族人员|0|%d",memberlist[fmindex_wk].accept); + strcat( numberlistbuf, enlistbuf); + strcat( numberlistbuf, "\n"); + lssproto_WN_send( fd, WINDOW_FMMESSAGETYPE_SELECT, + WINDOW_BUTTONTYPE_OK| + WINDOW_BUTTONTYPE_NEXT, + CHAR_WINDOWTYPE_FM_MEMBERLIST, +#ifndef _FM_MODIFY + CHAR_getWorkInt( index, CHAR_WORKOBJINDEX), +#else + -1, +#endif + makeEscapeString( numberlistbuf, buf, sizeof(buf))); + } + break; + default: + break; + } + } + + // 强者表的选项视窗 + else if( seqno == CHAR_WINDOWTYPE_FM_DPSELECT) + { + int fmindex_wk; + fmindex_wk = CHAR_getWorkInt( talker, CHAR_WORKFMINDEXI); + + if( CHAR_getInt(talker, CHAR_FMINDEX) > 0 ){ + if( fmindex_wk < 0 || fmindex_wk >= FMMAXNUM){ + print("FamilyNumber Data Error!!"); + return; + } + } + + buttonevent = atoi(data); + switch( buttonevent ){ + case 1: // 前叁十大家族综合声望列表 + { + int fd,i; + char listbuf[4096]; + fd = getfdFromCharaIndex( talker ); + if( fd == -1 ) return; + + strcpy( listbuf, fmdptop.topmemo[0]); + strcat( listbuf, "\n"); + for( i=1; i<10; i++){ + strcat( listbuf, fmdptop.topmemo[i]); + strcat( listbuf, "\n"); + } + strcat( listbuf, "0\n"); +#ifdef _FMVER21 + lssproto_WN_send( fd, WINDOW_FMMESSAGETYPE_TOP30DP, +#else + lssproto_WN_send( fd, WINDOW_FMMESSAGETYPE_DP, +#endif + WINDOW_BUTTONTYPE_OK| + WINDOW_BUTTONTYPE_NEXT, + CHAR_WINDOWTYPE_FM_DPTOP, +#ifndef _FM_MODIFY + CHAR_getWorkInt( index, CHAR_WORKOBJINDEX), +#else + -1, +#endif + makeEscapeString( listbuf, buf, sizeof(buf))); + } + break; + case 2: // 前十大家族冒险列表 + { + int fd,i; + char listbuf[4096]; + fd = getfdFromCharaIndex( talker ); + if( fd == -1 ) return; + + strcpy( listbuf, fmdptop.adv_topmemo[0]); + strcat( listbuf, "\n"); + for( i=1; i<10; i++){ + strcat( listbuf, fmdptop.adv_topmemo[i]); + strcat( listbuf, "\n"); + } + + lssproto_WN_send( fd, WINDOW_FMMESSAGETYPE_DP, + WINDOW_BUTTONTYPE_OK| + WINDOW_BUTTONTYPE_PREV, + CHAR_WINDOWTYPE_FM_DPME, +#ifndef _FM_MODIFY + CHAR_getWorkInt( index, CHAR_WORKOBJINDEX), +#else + -1, +#endif + makeEscapeString( listbuf, buf, sizeof(buf))); + } + break; + case 3: // 前十大家族伺育列表 + { + int fd,i; + char listbuf[4096]; + fd = getfdFromCharaIndex( talker ); + if( fd == -1 ) return; + + strcpy( listbuf, fmdptop.feed_topmemo[0]); + strcat( listbuf, "\n"); + for( i=1; i<10; i++){ + strcat( listbuf, fmdptop.feed_topmemo[i]); + strcat( listbuf, "\n"); + } + + lssproto_WN_send( fd, WINDOW_FMMESSAGETYPE_DP, + WINDOW_BUTTONTYPE_OK| + WINDOW_BUTTONTYPE_PREV, + CHAR_WINDOWTYPE_FM_DPME, +#ifndef _FM_MODIFY + CHAR_getWorkInt( index, CHAR_WORKOBJINDEX), +#else + -1, +#endif + makeEscapeString( listbuf, buf, sizeof(buf))); + } + break; +#ifndef _NEW_MANOR_LAW + case 4: // 前十大家族合成列表 + { + int fd,i; + char listbuf[4096]; + fd = getfdFromCharaIndex( talker ); + if( fd == -1 ) return; + + strcpy( listbuf, fmdptop.syn_topmemo[0]); + strcat( listbuf, "\n"); + for( i=1; i<10; i++){ + strcat( listbuf, fmdptop.syn_topmemo[i]); + strcat( listbuf, "\n"); + } + + lssproto_WN_send( fd, WINDOW_FMMESSAGETYPE_DP, + WINDOW_BUTTONTYPE_OK| + WINDOW_BUTTONTYPE_PREV, + CHAR_WINDOWTYPE_FM_DPME, +#ifndef _FM_MODIFY + CHAR_getWorkInt( index, CHAR_WORKOBJINDEX), +#else + -1, +#endif + makeEscapeString( listbuf, buf, sizeof(buf))); + } + break; + case 5: // 前十大家族料理列表 + { + int fd,i; + char listbuf[4096]; + fd = getfdFromCharaIndex( talker ); + if( fd == -1 ) return; + + strcpy( listbuf, fmdptop.food_topmemo[0]); + strcat( listbuf, "\n"); + for( i=1; i<10; i++){ + strcat( listbuf, fmdptop.food_topmemo[i]); + strcat( listbuf, "\n"); + } + + lssproto_WN_send( fd, WINDOW_FMMESSAGETYPE_DP, + WINDOW_BUTTONTYPE_OK| + WINDOW_BUTTONTYPE_PREV, + CHAR_WINDOWTYPE_FM_DPME, +#ifndef _FM_MODIFY + CHAR_getWorkInt( index, CHAR_WORKOBJINDEX), +#else + -1, +#endif + makeEscapeString( listbuf, buf, sizeof(buf))); + } + break; +#endif +#ifdef _NEW_MANOR_LAW + case 4: // 前十大家族PK列表 +#else + case 6: // 前十大家族PK列表 +#endif + { + int fd,i; + char listbuf[4096]; + fd = getfdFromCharaIndex( talker ); + if( fd == -1 ) return; + + strcpy( listbuf, fmdptop.pk_topmemo[0]); + strcat( listbuf, "\n"); + for( i=1; i<10; i++){ + strcat( listbuf, fmdptop.pk_topmemo[i]); + strcat( listbuf, "\n"); + } + + lssproto_WN_send( fd, WINDOW_FMMESSAGETYPE_DP, + WINDOW_BUTTONTYPE_OK| + WINDOW_BUTTONTYPE_PREV, + CHAR_WINDOWTYPE_FM_DPME, +#ifndef _FM_MODIFY + CHAR_getWorkInt( index, CHAR_WORKOBJINDEX), +#else + -1, +#endif + makeEscapeString( listbuf, buf, sizeof(buf))); + } + break; +#ifdef _NEW_MANOR_LAW + case 5: // 十大气势家族 + { + int fd,i; + char listbuf[4096]; + fd = getfdFromCharaIndex( talker ); + if( fd == -1 ) return; + + strcpy( listbuf, fmdptop.momentum_topmemo[0]); + strcat( listbuf, "\n"); + for( i=1; i<10; i++){ + strcat( listbuf, fmdptop.momentum_topmemo[i]); + strcat( listbuf, "\n"); + } + + lssproto_WN_send( fd, WINDOW_FMMESSAGETYPE_10_MEMONTUM, + WINDOW_BUTTONTYPE_OK| + WINDOW_BUTTONTYPE_PREV, + CHAR_WINDOWTYPE_FM_DPME, +#ifndef _FM_MODIFY + CHAR_getWorkInt( index, CHAR_WORKOBJINDEX), +#else + -1, +#endif + makeEscapeString( listbuf, buf, sizeof(buf))); + } + break; +#endif +#ifndef _NEW_MANOR_LAW + case 7: // 自己家族声望排行榜 +#else + case 6: +#endif + { + int fd,i,h,k,fmid; + char listbuf[4096]; + + fd = getfdFromCharaIndex( talker ); + if( fd == -1 ) return; + + fmid = CHAR_getWorkInt(talker, CHAR_WORKFMINDEXI); + if( fmid < 0 ){ + sprintf( NPC_sendbuf, " 『警 告』\n 抱歉!你不是家族人员,无法查看。"); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, WINDOW_BUTTONTYPE_OK, + -1, + -1, + makeEscapeString( NPC_sendbuf, buf, sizeof(buf))); + return; + } + + for( h=0; h= 994 ) h = 990; + else h -= 4; + + strcpy( listbuf, fmdptop.topmemo[h]); + if( k == h ) strcat( listbuf, "|1"); + strcat( listbuf, "\n"); + for( i = h + 1; i < h + 10; i++){ + strcat( listbuf, fmdptop.topmemo[i]); + if(i == k) strcat( listbuf, "|1"); + strcat( listbuf, "\n"); + } +#ifdef _FMVER21 + lssproto_WN_send( fd, WINDOW_FMMESSAGETYPE_TOP30DP, +#else + lssproto_WN_send( fd, WINDOW_FMMESSAGETYPE_DP, +#endif + WINDOW_BUTTONTYPE_OK| + WINDOW_BUTTONTYPE_PREV, + CHAR_WINDOWTYPE_FM_DPME, +#ifndef _FM_MODIFY + CHAR_getWorkInt( index, CHAR_WORKOBJINDEX), +#else + -1, +#endif + makeEscapeString( listbuf, buf, sizeof(buf))); + } + break; +#ifdef _NEW_MANOR_LAW + case 7: // 自己家族气势排名 + { + int fd,h,fmid; + char listbuf[4096]; + char szTempbuf[12]; + + fd = getfdFromCharaIndex( talker ); + if( fd == -1 ) return; + + fmid = CHAR_getWorkInt(talker, CHAR_WORKFMINDEXI); + if( fmid < 0 ){ + sprintf( NPC_sendbuf, " 『警 告』\n 抱歉!你不是家族人员,无法查看。"); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, WINDOW_BUTTONTYPE_OK, + -1, + -1, + makeEscapeString( NPC_sendbuf, buf, sizeof(buf))); + return; + } + + for( h=0; h 0 ){ + if( fmindex_wk < 0 || fmindex_wk >= FMMAXNUM){ + print("FamilyNumber Data Error!!"); + return; + } + } + + buttonevent = atoi(data); + + switch( buttonevent ){ + case FM_MEMBERLIST: + { + int fd; + + fd = getfdFromCharaIndex( talker ); + if( fd == -1 ) return; + + if( CHAR_getInt(talker, CHAR_FMINDEX) <= 0){ + sprintf( NPC_sendbuf, " 『警 告』\n 抱歉!你不是家族人员,不得使用公布栏。"); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, WINDOW_BUTTONTYPE_OK, + -1, -1, makeEscapeString( NPC_sendbuf, buf, sizeof(buf))); + return; + } + /* + #ifdef _FMVER21 + if( CHAR_getInt( talker, CHAR_FMLEADERFLAG ) == FMMEMBER_LEADER || + CHAR_getInt( talker, CHAR_FMLEADERFLAG ) == FMMEMBER_ELDER ){ + #else + if( CHAR_getInt( talker, CHAR_FMLEADERFLAG) == 1){ + #endif + saacproto_ACShowMemberList_send( acfd, fmindex_wk); + READTIME1 = NowTime.tv_sec+FM_WAITTIME; + }else + */ + if( NowTime.tv_sec > READTIME1 ){ + saacproto_ACShowMemberList_send( acfd, fmindex_wk); + READTIME1 = NowTime.tv_sec+FM_WAITTIME; + } + +#ifdef _FMVER21 + // if( CHAR_getInt( talker, CHAR_FMLEADERFLAG ) == FMMEMBER_LEADER || + // CHAR_getInt( talker, CHAR_FMLEADERFLAG ) == FMMEMBER_ELDER || + // CHAR_getInt( talker, CHAR_FMLEADERFLAG ) == FMMEMBER_VICELEADER ){ + if( CHAR_getInt( talker, CHAR_FMLEADERFLAG ) == FMMEMBER_LEADER || + CHAR_getInt( talker, CHAR_FMLEADERFLAG ) == FMMEMBER_ELDER ){ +#else + if( CHAR_getInt( talker, CHAR_FMLEADERFLAG) == 1 ){ +#endif + sprintf( NPC_sendbuf, " 『族 长 需 知』\n请小心处理族员的资料,一经修改後就无法回复原态,敬请小心。"); + }else{ + sprintf( NPC_sendbuf, " 『列 表 需 知』\n 此表族长可作修改,族员仅能查看。"); + } + + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + CHAR_WINDOWTYPE_FM_MESSAGE2, +#ifndef _FM_MODIFY + CHAR_getWorkInt( index, CHAR_WORKOBJINDEX), +#else + -1, +#endif + makeEscapeString( NPC_sendbuf, buf, sizeof(buf))); + } + break; +#ifdef _UN_FMPOINT +#else + case FM_FMPOINT: + { + int fd; + + fd = getfdFromCharaIndex( talker ); + if( fd == -1 ) return; + +#ifdef _FMVER21 + if( CHAR_getInt( talker, CHAR_FMLEADERFLAG) == FMMEMBER_LEADER ){ +#else + if( CHAR_getInt( talker, CHAR_FMLEADERFLAG) == 1 ){ +#endif + saacproto_ACFMPointList_send(acfd); + sprintf( NPC_sendbuf, " 『族 长 需 知』\n请小心慎选所申请的据点,一但选取据点後就无法回复原态,敬请小心。"); + READTIME4 = NowTime.tv_sec+FM_WAITTIME; + } + else{ + sprintf( NPC_sendbuf, " 『列 表 需 知』\n此表族长可以申请,其馀仅能查看。"); + } + + if( NowTime.tv_sec > READTIME4 ){ + saacproto_ACFMPointList_send(acfd); + READTIME4 = NowTime.tv_sec+FM_WAITTIME; + } + + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + CHAR_WINDOWTYPE_FM_MESSAGE1, +#ifndef _FM_MODIFY + CHAR_getWorkInt( index, CHAR_WORKOBJINDEX), +#else + -1, +#endif + makeEscapeString( NPC_sendbuf, buf, sizeof(buf))); + } + break; +#endif //_UN_FMPOINT + case FM_FMDPTOP: + { + int fd; + + fd = getfdFromCharaIndex( talker ); + if( fd == -1 ) return; + + if( NowTime.tv_sec > READTIME3 ){ + saacproto_ACShowTopFMList_send( acfd, FM_TOP_INTEGRATE ); + saacproto_ACShowTopFMList_send( acfd, FM_TOP_ADV ); + saacproto_ACShowTopFMList_send( acfd, FM_TOP_FEED ); + saacproto_ACShowTopFMList_send( acfd, FM_TOP_SYNTHESIZE ); + saacproto_ACShowTopFMList_send( acfd, FM_TOP_DEALFOOD ); + saacproto_ACShowTopFMList_send( acfd, FM_TOP_PK ); +#ifdef _NEW_MANOR_LAW + saacproto_ACShowTopFMList_send(acfd, FM_TOP_MOMENTUM); +#endif + READTIME3 = NowTime.tv_sec+FM_WAITTIME; + } + memset(NPC_sendbuf,0,sizeof(NPC_sendbuf)); + strcpy( NPC_sendbuf, "\n 叁十大家族声望列表\n"); + strcat( NPC_sendbuf, " 十大冒险家族\n"); + strcat( NPC_sendbuf, " 十大饲育家族\n"); +#ifndef _NEW_MANOR_LAW + strcat( NPC_sendbuf, " 十大合成家族\n"); + strcat( NPC_sendbuf, " 十大料理家族\n"); +#endif + strcat( NPC_sendbuf, " 十大战斗家族\n"); +#ifdef _NEW_MANOR_LAW + strcat( NPC_sendbuf, " 十大气势家族\n"); +#endif + strcat( NPC_sendbuf, " 自己家族声望列表\n"); +#ifdef _NEW_MANOR_LAW + strcat( NPC_sendbuf, " 自己家族气势排名\n"); +#endif + + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_SELECT, + WINDOW_BUTTONTYPE_NONE, + CHAR_WINDOWTYPE_FM_DPSELECT, +#ifndef _FM_MODIFY + CHAR_getWorkInt( index, CHAR_WORKOBJINDEX), +#else + -1, +#endif + makeEscapeString( NPC_sendbuf, buf, sizeof(buf))); + + } + break; + case FM_MEMBERMEMO: + { + int fd,i,dengonindex; + char tmp[4096]; + fd = getfdFromCharaIndex( talker ); + + if( fd == -1 ) return; + + if( CHAR_getInt(talker, CHAR_FMINDEX) <= 0){ + sprintf( NPC_sendbuf, " 『警 告』\n 抱歉!你不是家族人员,不得使用公布栏。"); + + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, + -1, + makeEscapeString( NPC_sendbuf, buf, sizeof(buf))); + return; + } + + if( NowTime.tv_sec > READTIME2 ){ + saacproto_ACFMReadMemo_send( acfd, fmindex_wk); + READTIME2 = NowTime.tv_sec+FM_WAITTIME; + } + + dengonindex = memberlist[fmindex_wk].memoindex; + if( memberlist[fmindex_wk].memoindex < 6 && memberlist[fmindex_wk].memonum < DENGONFILELINENUM ){ + dengonindex = 6; + } + + if( dengonindex >= 6 ){ + strcpy( NPC_sendbuf, memberlist[fmindex_wk].memo[dengonindex - 6]); + strcat( NPC_sendbuf, "\n"); + for( i=(dengonindex - 5); i<=dengonindex; i++){ + strcat( NPC_sendbuf, memberlist[fmindex_wk].memo[i]); + strcat( NPC_sendbuf, "\n"); + } + sprintf(tmp, "%d\n", dengonindex); + strcat( NPC_sendbuf, tmp); + } + if( dengonindex < 6 ){ + strcpy( NPC_sendbuf, + memberlist[fmindex_wk].memo[memberlist[fmindex_wk].memonum + (dengonindex - 6)]); + strcat( NPC_sendbuf, "\n"); + for( i=memberlist[fmindex_wk].memonum + (dengonindex - 5); i READTIME3 ){ + saacproto_ACFMReadMemo_send( acfd, FMSDENGON_SN); + READTIME3 = NowTime.tv_sec+FM_WAITTIME; + } + dengonindex = fmsmemo.memoindex; + if( fmsmemo.memoindex<6 || fmsmemo.memonum>FMSDENGONFILELINENUM ){ + dengonindex = 6; + } + if( dengonindex >= 6 ){ + strcpy( NPC_sendbuf, fmsmemo.memo[dengonindex - 6]); + strcat( NPC_sendbuf, "\n"); + for( i=(dengonindex - 5); i<=dengonindex; i++){ + strcat( NPC_sendbuf, fmsmemo.memo[i]); + strcat( NPC_sendbuf, "\n"); + } + sprintf(tmp, "%d\n", dengonindex); + strcat( NPC_sendbuf, tmp); + } + if( dengonindex < 6 ){ + if( (fmsmemo.memonum + (dengonindex - 6)) < 0 || (fmsmemo.memonum + (dengonindex - 6)) >= 140 ) + return; + strcpy( NPC_sendbuf, fmsmemo.memo[fmsmemo.memonum + (dengonindex - 6)]); + strcat( NPC_sendbuf, "\n"); + for( i=fmsmemo.memonum + (dengonindex - 5); i= FMMAXNUM) return; + + getStringFromIndexWithDelim(data,"|",1,tmp_buffer,sizeof(tmp_buffer)); + numberlistindex = atoi(tmp_buffer); + getStringFromIndexWithDelim(data,"|",2,tmp_buffer,sizeof(tmp_buffer)); + buttonevent = atoi(tmp_buffer); + getStringFromIndexWithDelim(data,"|",3,dutybuf,sizeof(dutybuf)); + +#ifdef _FMVER21 + // if( buttonevent>=1 && buttonevent<=11 && + // ( CHAR_getInt( talker, CHAR_FMLEADERFLAG ) == FMMEMBER_LEADER || + // CHAR_getInt( talker, CHAR_FMLEADERFLAG ) == FMMEMBER_ELDER || + // CHAR_getInt( talker, CHAR_FMLEADERFLAG ) == FMMEMBER_VICELEADER )) + if( buttonevent>=1 && buttonevent<=11 && + ( CHAR_getInt( talker, CHAR_FMLEADERFLAG ) == FMMEMBER_LEADER || + CHAR_getInt( talker, CHAR_FMLEADERFLAG ) == FMMEMBER_ELDER )) +#else + if( buttonevent>=1 && buttonevent<=11 && CHAR_getInt( talker, CHAR_FMLEADERFLAG) == 1 ) +#endif + { + int fd,i; + int int_status; + char getstatus[4096]; + + fd = getfdFromCharaIndex( talker ); + if( fd == -1 ) return; + + strcpy( getstatus, memberlist[fmindex_wk].numberlistarray[numberlistindex+buttonevent - 1] + + (strlen( memberlist[fmindex_wk].numberlistarray[numberlistindex+buttonevent - 1]) - 1)); + + int_status = atoi(getstatus); + + // 家族的加入、退出、申请等选项 + if( buttonevent!=11 ) +#ifdef _FMVER21 + strcpy( memberlist[fmindex_wk].numberlistarray[numberlistindex+buttonevent - 1] + + (strlen(memberlist[fmindex_wk].numberlistarray[numberlistindex+buttonevent - 1]) - 1), dutybuf); +#else + switch( int_status ){ + case 1: + case 3: + strcpy( memberlist[fmindex_wk].numberlistarray[numberlistindex+buttonevent - 1] + + (strlen(memberlist[fmindex_wk].numberlistarray[numberlistindex+buttonevent - 1]) - 1), "4"); + break; + case 2: + strcpy( memberlist[fmindex_wk].numberlistarray[numberlistindex+buttonevent - 1] + + (strlen(memberlist[fmindex_wk].numberlistarray[numberlistindex+buttonevent - 1]) - 1), "1"); + break; + default: + break; + } +#endif + // 家族的召募选项 + if( buttonevent == 11 ) + { + strcpy( getstatus, enlistbuf + (strlen(enlistbuf) - 1)); + int_status = atoi(getstatus); + + switch( int_status ){ + case 1: + memberlist[fmindex_wk].accept = 0; + sprintf(enlistbuf, "是否继续召募家族人员|%d|%d",numberlistindex,memberlist[fmindex_wk].accept); + break; + case 0: + memberlist[fmindex_wk].accept = 1; + sprintf(enlistbuf, "是否继续召募家族人员|%d|%d",numberlistindex,memberlist[fmindex_wk].accept); + break; + default: + break; + } + } + + strcpy( numberlistbuf, memberlist[fmindex_wk].numberlistarray[numberlistindex]); + strcat( numberlistbuf, "\n"); + for( i=(numberlistindex + 1); i memberlist[fmindex_wk].fmnum) + buttontype |= WINDOW_BUTTONTYPE_PREV; + else if( numberlistindex == 0 ) + buttontype |= WINDOW_BUTTONTYPE_NEXT; + else{ + buttontype |= WINDOW_BUTTONTYPE_PREV; + buttontype |= WINDOW_BUTTONTYPE_NEXT; + } + + lssproto_WN_send( fd, WINDOW_FMMESSAGETYPE_SELECT, + buttontype, + CHAR_WINDOWTYPE_FM_MEMBERLIST, +#ifndef _FM_MODIFY + CHAR_getWorkInt( index, CHAR_WORKOBJINDEX), +#else + -1, +#endif + makeEscapeString( numberlistbuf, buf, sizeof(buf))); + } // end if + switch( select ){ + case WINDOW_BUTTONTYPE_NEXT: + case WINDOW_BUTTONTYPE_PREV: + { + int fd,i; + + fd = getfdFromCharaIndex( talker ); + if( fd == -1 ) return; + + numberlistindex += 10 * (( select == WINDOW_BUTTONTYPE_NEXT) ? 1 : -1); + + if( numberlistindex >= memberlist[fmindex_wk].fmnum) + numberlistindex -= 10; + else if( numberlistindex < 1 ) + numberlistindex = 0; + + buttontype = WINDOW_BUTTONTYPE_OK; + if( (numberlistindex + 10) >= memberlist[fmindex_wk].fmnum) + buttontype |= WINDOW_BUTTONTYPE_PREV; + else if( numberlistindex==0 ) + buttontype |= WINDOW_BUTTONTYPE_NEXT; + else{ + buttontype |= WINDOW_BUTTONTYPE_PREV; + buttontype |= WINDOW_BUTTONTYPE_NEXT; + } + + strcpy( numberlistbuf, memberlist[fmindex_wk].numberlistarray[numberlistindex]); + strcat( numberlistbuf, "\n"); + for( i=(numberlistindex+1); i= 30) + return; + //listindex = 20; + //listindex -= 10; + //else if( listindex < 1 ) + // listindex = 0; + if (listindex < 0) return; + + buttontype = WINDOW_BUTTONTYPE_OK; + if( (listindex + 10) >= 30) + buttontype |= WINDOW_BUTTONTYPE_PREV; + else if( listindex==0 ) + buttontype |= WINDOW_BUTTONTYPE_NEXT; + else{ + buttontype |= WINDOW_BUTTONTYPE_PREV; + buttontype |= WINDOW_BUTTONTYPE_NEXT; + } + + strcpy( listbuf, fmdptop.topmemo[listindex]); + strcat( listbuf, "\n"); + for( i=(listindex+1); i FMPOINTNUM) + pointlistindex -= 10; + else if( pointlistindex < 1 ) + pointlistindex = 0; + + buttontype = WINDOW_BUTTONTYPE_OK; + if( (pointlistindex + 10) > FMPOINTNUM) + buttontype |= WINDOW_BUTTONTYPE_PREV; + else if( pointlistindex==0 ) + buttontype |= WINDOW_BUTTONTYPE_NEXT; + else{ + buttontype |= WINDOW_BUTTONTYPE_PREV; + buttontype |= WINDOW_BUTTONTYPE_NEXT; + } + + strcpy( pointlistbuf, fmpointlist.pointlistarray[pointlistindex]); + strcat( pointlistbuf, "\n"); + for( i=(pointlistindex+1); i READTIME3 ){ + saacproto_ACShowTopFMList_send(acfd, FM_TOP_INTEGRATE); + saacproto_ACShowTopFMList_send(acfd, FM_TOP_ADV); + saacproto_ACShowTopFMList_send(acfd, FM_TOP_FEED); + saacproto_ACShowTopFMList_send(acfd, FM_TOP_SYNTHESIZE); + saacproto_ACShowTopFMList_send(acfd, FM_TOP_DEALFOOD); + saacproto_ACShowTopFMList_send(acfd, FM_TOP_PK); +#ifdef _NEW_MANOR_LAW + saacproto_ACShowTopFMList_send(acfd, FM_TOP_MOMENTUM); +#endif + READTIME3 = NowTime.tv_sec+FM_WAITTIME; + } + + strcpy( NPC_sendbuf, "\n 叁十大家族声望列表\n"); + strcat( NPC_sendbuf, " 十大冒险家族\n"); + strcat( NPC_sendbuf, " 十大饲育家族\n"); +#ifndef _NEW_MANOR_LAW + strcat( NPC_sendbuf, " 十大合成家族\n"); + strcat( NPC_sendbuf, " 十大料理家族\n"); +#endif + strcat( NPC_sendbuf, " 十大战斗家族\n"); +#ifdef _NEW_MANOR_LAW + strcat( NPC_sendbuf, " 十大气势家族\n"); +#endif + strcat( NPC_sendbuf, " 自己家族声望列表\n"); +#ifdef _NEW_MANOR_LAW + strcat( NPC_sendbuf, " 自己家族气势排名\n"); +#endif + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_SELECT, + WINDOW_BUTTONTYPE_NONE, + CHAR_WINDOWTYPE_FM_DPSELECT, +#ifndef _FM_MODIFY + CHAR_getWorkInt( index, CHAR_WORKOBJINDEX), +#else + -1, +#endif + makeEscapeString( NPC_sendbuf, buf, sizeof(buf))); + } + break; + case WINDOW_BUTTONTYPE_OK: + break; + default: + break; + } + + } +} + +// call FmDengon NPC event +#ifndef _FM_MODIFY +void NPC_FmDengonLooked( int meindex, int lookedindex ) +{ + char buf[DENGONFILEENTRYSIZE*MESSAGEINONEWINDOW*2]; + char menubuf[4096]; + int fd; + + if (!CHAR_CHECKINDEX(lookedindex)) return; + + fd = getfdFromCharaIndex( lookedindex ); + if( fd == -1 ) return; + + // 必须站在布告栏的前面一格 + if( NPC_Util_CharDistance( lookedindex, meindex ) > 1) return; + // 空白处请勿更动 + strcpy( menubuf, " 『家族布告栏』\n\n"); + strcat( menubuf, " 家族成员列表\n"); + strcat( menubuf, " 家族留言\n"); +#ifdef _UN_FMMEMO +#else + strcat( menubuf, " 家族之间留言板\n"); +#endif +#ifdef _UN_FMPOINT +#else + strcat( menubuf, " 申请家族据点\n"); +#endif + strcat( menubuf, " 家族之间强者表"); + + lssproto_WN_send(fd, WINDOW_MESSAGETYPE_SELECT, + WINDOW_BUTTONTYPE_CANCEL, + CHAR_WINDOWTYPE_FM_SELECT, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + makeEscapeString( menubuf, buf, sizeof(buf))); +} +#else +void NPC_FmDengonLooked( int meindex, int lookedindex ) +{ + char buf[DENGONFILEENTRYSIZE*MESSAGEINONEWINDOW*2]; + char menubuf[4096]; + int fd; + + if (!CHAR_CHECKINDEX(lookedindex)) return; + + fd = getfdFromCharaIndex( lookedindex ); + if( fd == -1 ) return; + + // 空白处请勿更动 + strcpy( menubuf, " 『家族布告栏』\n\n"); + strcat( menubuf, " 家族成员列表\n"); + strcat( menubuf, " 家族留言\n"); +#ifdef _UN_FMMEMO +#else + strcat( menubuf, " 家族之间留言板\n"); +#endif +#ifdef _UN_FMPOINT +#else + strcat( menubuf, " 申请家族据点\n"); +#endif + strcat( menubuf, " 家族之间强者表"); + + lssproto_WN_send(fd, + WINDOW_MESSAGETYPE_SELECT, + WINDOW_BUTTONTYPE_CANCEL, + CHAR_WINDOWTYPE_FM_SELECT, + -1, + makeEscapeString( menubuf, buf, sizeof(buf))); +} +#endif diff --git a/gmsv/npc/npc_fmhealer.c b/gmsv/npc/npc_fmhealer.c new file mode 100644 index 0000000..7968f72 --- /dev/null +++ b/gmsv/npc/npc_fmhealer.c @@ -0,0 +1,144 @@ +#include "version.h" +/*---------- Shan (BEGIN) ----------*/ +/*--------- AD 2001/05/28 ---------*/ +// +// 家族医疗 +// +/*---------- Shan(END) ----------*/ +#include +#include +#include + +#include "object.h" +#include "char_base.h" +#include "char.h" +#include "util.h" +#include "npcutil.h" +#include "item.h" +#include "readmap.h" + +#define RANGE 2 +void NPC_FmHealerSpeak( int index, int talker); +void NPC_FmHealerAllHeal( int talker ); +BOOL NPC_FmMoneyCheck(int meindex,int talker); +int NPC_FmCostCheck(int talker); +void NPC_FmCharCheckPoint(int meindex,int talker); +int NPC_FmWorkInput(int meindex,int talker); + +BOOL NPC_FmHealerInit( int meindex ) +{ + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPEHEALER ); + CHAR_setFlg( meindex , CHAR_ISATTACKED , 0 ); + return TRUE; +} + +void NPC_FmHealerTalked( int meindex , int talker , char *msg ,int color ) +{ + char* npcarg; + char token[32]; + int msgNo; + + npcarg = CHAR_getChar(meindex,CHAR_NPCARGUMENT); + + getStringFromIndexWithDelim( npcarg, "|", 1, token,sizeof( token)); + msgNo = atoi( token ); + + if( CHAR_getInt( talker , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) + return; + + if( NPC_Util_isFaceToFace( talker, meindex , 2 ) == FALSE ) + { + if( NPC_Util_isFaceToFace( talker, meindex , 1 ) == FALSE ) + return; + } + + //if( CHAR_getInt(meindex, CHAR_FLOOR) != CHAR_getWorkInt(talker, CHAR_WORKFMFLOOR)){ + //print("\n npc floor->%d player floor->%d",CHAR_getInt(meindex, CHAR_FLOOR), + // CHAR_getWorkInt(talker, CHAR_WORKFMFLOOR)); + // CHAR_talkToCli(talker, meindex, + // "抱歉!你不是本家族人员,无法帮你回复。",CHAR_COLORWHITE); + // return; + //} + + if( (CHAR_getWorkInt( talker, CHAR_WORKPARTYMODE) == 0) + || (CHAR_getWorkInt( talker, CHAR_WORKPARTYMODE) == 2)){ + NPC_FmHealerAllHeal( talker); + if(msgNo == 1) { + CHAR_talkToCli( talker, meindex, + "已经全部回复。请小心自己的身体唷!",CHAR_COLORWHITE); + }else if(msgNo == 2){ + CHAR_talkToCli( talker, meindex, + "由於你是本家族人员,请让我帮你回复吧!",CHAR_COLORWHITE); + } + }else{ + int i = 0; + int otherindex; + for( i=0 ; i < CHAR_PARTYMAX ; i++){ + otherindex = CHAR_getWorkInt( talker, CHAR_WORKPARTYINDEX1 + i); + if(otherindex != -1){ + NPC_FmHealerAllHeal( otherindex); + if(msgNo == 1){ + CHAR_talkToCli( otherindex, meindex, + "已经全部回复。请小心自己的身体唷!",CHAR_COLORWHITE); + }else if(msgNo == 2){ + CHAR_talkToCli( otherindex, meindex, + "由於你是本家族人员,请让我帮你回复吧!",CHAR_COLORWHITE); + } + } + } + } +} + +void NPC_FmHealerAllHeal( int talker ) +{ + int i; + int petindex; + char petsend[3]; + char msgbuf[5]; + + CHAR_setInt( talker , CHAR_HP ,CHAR_getWorkInt( talker, CHAR_WORKMAXHP ) ); + CHAR_setInt( talker , CHAR_MP ,CHAR_getWorkInt( talker, CHAR_WORKMAXMP ) ); + + for(i = 0 ; i < CHAR_MAXPETHAVE; i ++){ + petindex = CHAR_getCharPet( talker, i); + if( petindex == -1 ) continue; + + if( !CHAR_CHECKINDEX( talker ) ) continue; + if( CHAR_CHECKINDEX( petindex) == FALSE ) continue; + CHAR_setFlg( petindex, CHAR_ISDIE, 0); + CHAR_setInt( petindex , CHAR_HP ,CHAR_getWorkInt( petindex, CHAR_WORKMAXHP ) ); + CHAR_setInt( petindex , CHAR_MP ,CHAR_getWorkInt( petindex, CHAR_WORKMAXMP ) ); + CHAR_complianceParameter( petindex ); + sprintf( petsend, "K%d", i ); + CHAR_sendStatusString( talker , petsend ); + } + + if(CHAR_getWorkInt( talker, CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE ){ + int topartyarray = -1; + int oyaindex = CHAR_getWorkInt( talker, CHAR_WORKPARTYINDEX1); + if( CHAR_CHECKINDEX( oyaindex )){ + int i; + for( i = 0; i < CHAR_PARTYMAX; i ++ ){ + int workindex = CHAR_getWorkInt( oyaindex, CHAR_WORKPARTYINDEX1 + i); + if( CHAR_CHECKINDEX( workindex) ){ + if( workindex == talker ){ + topartyarray = i; + break; + } + } + } + for( i = 0; i < CHAR_PARTYMAX; i ++ ) { + int otherindex = CHAR_getPartyIndex( talker, i); + if( CHAR_CHECKINDEX( otherindex) ){ + snprintf( msgbuf, sizeof( msgbuf), "N%d", topartyarray); + if( otherindex != talker){ + CHAR_sendStatusString( otherindex, msgbuf); + } + } + } + } + } + CHAR_send_P_StatusString( talker, CHAR_P_STRING_HP); + CHAR_send_P_StatusString( talker, CHAR_P_STRING_MP); +} + diff --git a/gmsv/npc/npc_fmletter.c b/gmsv/npc/npc_fmletter.c new file mode 100644 index 0000000..0625c37 --- /dev/null +++ b/gmsv/npc/npc_fmletter.c @@ -0,0 +1,679 @@ +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "configfile.h" +#include "lssproto_serv.h" +#include "saacproto_cli.h" +#include "npc_fmletter.h" +#include "family.h" +#include "log.h" + +extern struct FM_POINTLIST fmpointlist; + +char sendbuf[1024]; +char buf[1024]; +char subbuf[128]; +int i, j; + +/* + * 涩烂今木凶它奴件玉它毛请允NPC + * 棵哑 平旦玄失玉矛件民乓□仁日中卅日综木月井手[ + * + */ + +struct { + int windowno; + int windowtype; + int buttontype; + int takeitem; + int giveitem; + char message[4096]; + int letter; +}w; + +struct { + BOOL use; + int checkhaveitem; + int checkhaveitemgotowin; + int checkdonthaveitem; + int checkdonthaveitemgotowin; + int warp; + int battle; + int gotowin; +}buttonproc[13]; /* ok,cancel, yes,no,prev,next 及凛及质 */ + + + + + +enum { + CHAR_WORK_MSGCOLOR = CHAR_NPCWORKINT1, +}; + +static void NPC_FmLetter_selectWindow( int meindex, int toindex, int num); +static BOOL NPC_FmLetter_readData( int meindex, int windowno, BOOL chkflg); +static int NPC_FmLetter_restoreButtontype( char *data ); + +/********************************* +* 赓渝质 +*********************************/ +BOOL NPC_FmLetterInit( int meindex ) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[1024]; + //int i; + //char secondToken[1024]; + + // Robin test + // print(" fmleter_Init "); + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "conff", buf, sizeof( buf)) + == NULL ) + { + print( "fmletter:没有指定设定的档案 。\n"); + return FALSE; + } + /* 赓渝凛卞涩烂犯□正毛民尼永弁仄化支月 */ + if( !NPC_FmLetter_readData( meindex, -1, TRUE) ) { + return FALSE; + } + + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPEWINDOWMAN ); + + return TRUE; +} + + + + +/********************************* +* 仄井仃日木凶凛及质 +*********************************/ +void NPC_FmLetterTalked( int meindex , int talkerindex , char *szMes ,int color ) +{ + //print(" FmLetter_fmindex:%d ", CHAR_getInt( meindex, CHAR_FMINDEX) ); + + + int fmindex = 0, village, i; + char token[256]; + char buf[256]; + for( i=0 ; i 1) return; + + /* 仇及它奴件玉它 寞及犯□正毛 心 戈 */ + if( !NPC_FmLetter_readData( meindex, seqno - 100, FALSE) ) { + print( "fmletter:readdata error\n"); + return; + } + /* 瓷仄凶示正件毛譬屯月 */ + if( w.windowtype == WINDOW_MESSAGETYPE_SELECT ) { + button = atoi( data)+5; + if( button > 12 ) { + print( "fmletter:invalid button[%d]\n", button); + return; + } + } + else if( select & WINDOW_BUTTONTYPE_OK) button = 0; + else if( select & WINDOW_BUTTONTYPE_CANCEL) button = 1; + else if( select & WINDOW_BUTTONTYPE_YES) button = 2; + else if( select & WINDOW_BUTTONTYPE_NO) button = 3; + else if( select & WINDOW_BUTTONTYPE_PREV) button = 4; + else if( select & WINDOW_BUTTONTYPE_NEXT) button = 5; + else { + print( "fmletter:invalid button[%d]\n", select); + return; + } + if( buttonproc[button].use == TRUE ) { + int fd; + int newwin = -1; + + fd = getfdFromCharaIndex( talkerindex); + + /* 示正件卞方匀化质 毛孔曰歹仃月 */ + if( newwin == -1 ) { + newwin = buttonproc[button].gotowin; + } + + + // Robin + if( newwin == 5 ) { + int emptyitemindexinchara = CHAR_findEmptyItemBox( talkerindex ); + int itemindex = ITEM_makeItemAndRegist( w.letter ); + + if( emptyitemindexinchara < 0 ) return; + + if( itemindex != -1 ){ + char msgbuf[128]; + CHAR_setItemIndex( talkerindex, emptyitemindexinchara, itemindex ); + /* Work犯□正毛涩烂 */ + ITEM_setWorkInt(itemindex, ITEM_WORKOBJINDEX,-1); + ITEM_setWorkInt(itemindex, ITEM_WORKCHARAINDEX, talkerindex); + CHAR_sendItemDataOne( talkerindex, emptyitemindexinchara); + LogItem( + CHAR_getChar( talkerindex, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( talkerindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), /* 失奶 丞 寞 */ +#endif + "AddLetter(制作邀请函)", + CHAR_getInt( talkerindex,CHAR_FLOOR), + CHAR_getInt( talkerindex,CHAR_X ), + CHAR_getInt( talkerindex,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + snprintf( msgbuf, sizeof( msgbuf), "制作%s成功\。", + ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( talkerindex, -1,msgbuf, CHAR_COLORWHITE); + } + } + + // Robin + if( newwin == 6 ) { + int emptyitemindexinchara = CHAR_findEmptyItemBox( talkerindex ); + int itemindex = ITEM_makeItemAndRegist( w.letter ); + + if( emptyitemindexinchara < 0 ) return; + + if( itemindex != -1 ){ + char msgbuf[128]; + CHAR_setItemIndex( talkerindex, emptyitemindexinchara, itemindex ); + /* Work犯□正毛涩烂 */ + ITEM_setWorkInt(itemindex, ITEM_WORKOBJINDEX,-1); + ITEM_setWorkInt(itemindex, ITEM_WORKCHARAINDEX, talkerindex); + CHAR_sendItemDataOne( talkerindex, emptyitemindexinchara); + LogItem( + CHAR_getChar( talkerindex, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( talkerindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), /* 失奶 丞 寞 */ +#endif + "AddLetter(制作邀请函)", + CHAR_getInt( talkerindex,CHAR_FLOOR), + CHAR_getInt( talkerindex,CHAR_X ), + CHAR_getInt( talkerindex,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + snprintf( msgbuf, sizeof( msgbuf), "制作%s成功\。", + ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( talkerindex, -1,msgbuf, CHAR_COLORWHITE); + } + } + + + if( !NPC_FmLetter_readData( meindex, newwin, FALSE) ) { + print( "fmletter:readdata error\n"); + return; + } + + //fd = getfdFromCharaIndex( talkerindex); + if( fd != -1 ) { + lssproto_WN_send( fd, w.windowtype, + w.buttontype, + w.windowno+100, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + makeEscapeString( w.message, buf, sizeof(buf))); + } + + + + } +} +/* + * 涩烂白央奶伙毛 氏匹隙烂今木凶windowno及犯□正毛本永玄允月 + * + * 娄醒“ + * meindex int 仇及NPC及charaindex + * windowno int 它奴件玉它 寞 + * + */ +static BOOL NPC_FmLetter_readData( int meindex, int windowno, BOOL chkflg) +{ + + int i; + int linenum = 0; + int endflg = FALSE; + int buttonendflg; + int winno = -1; + int buttonconfmode; + int b_mode; + int selectnum ; + int messagepos; + BOOL errflg = FALSE; + BOOL readflg = TRUE; + FILE *fp; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char filename[64]; + char opfile[128]; + char line[1024]; + char firstToken[1024]; + char secondToken[1024]; + + /* 它奴件玉它及涩烂毛 曰 戈厌瞻 */ + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + /* 涩烂白央奶伙 潸 */ + NPC_Util_GetStrFromStrWithDelim( argstr, "conff", filename, sizeof( filename)); + + sprintf( opfile, "%s/", getNpcdir( ) ); + strcat( opfile, filename); + + fp = fopen( opfile, "r"); + if( fp == NULL ) { + print( "fmletter:file open error [%s]\n", opfile); + return FALSE; + } + + while( readflg == TRUE ) { + endflg = FALSE; + buttonendflg = TRUE; + buttonconfmode = FALSE; + selectnum = 0; + messagepos = 0; + winno = -1; + b_mode = -1; + errflg = FALSE; + + /* 赓渝祭 */ + w.windowno = -1; + w.windowtype = -1; + w.buttontype = -1; + w.takeitem = -1; + w.giveitem = -1; + w.message[0] = '\0'; + + for( i = 0; i < arraysizeof( buttonproc); i ++ ) { + buttonproc[i].use = FALSE; + buttonproc[i].checkhaveitem = -1; + buttonproc[i].checkhaveitemgotowin = -1; + buttonproc[i].checkdonthaveitem = -1; + buttonproc[i].checkdonthaveitemgotowin = -1; + buttonproc[i].warp = -1; + buttonproc[i].battle = -1; + buttonproc[i].gotowin = -1; + } + + while( 1) { + char buf[256]; + int ret; + if( !fgets( line, sizeof( line), fp)){ + readflg = FALSE; + break; + } + + linenum ++; + + /* 戊丢件玄反 骰 */ + if( line[0] == '#' || line[0] == '\n') continue; + /* 荼垫潸月 */ + chomp( line ); + + /* 垫毛帮溥允月 */ + /* 引内 tab 毛 " " 卞 五晶尹月 */ + replaceString( line, '\t' , ' ' ); + /* 燮 及旦矢□旦毛潸月[*/ + for( i = 0; i < strlen( line); i ++) { + if( line[i] != ' ' ) { + break; + } + strcpy( buf, &line[i]); + } + if( i != 0 ) strcpy( line, buf); + + /* delim "=" 匹 赓(1)及玄□弁件毛 月*/ + ret = getStringFromIndexWithDelim( line, "=", 1, firstToken, + sizeof( firstToken ) ); + if( ret == FALSE ){ + print( "Find error at %s in line %d. Ignore\n", + filename , linenum); + continue; + } + /* delim "=" 匹2 及玄□弁件毛 月*/ + ret = getStringFromIndexWithDelim( line, "=", 2, secondToken, + sizeof( secondToken ) ); + if( ret == FALSE ){ + print( "Find error at %s in line %d. Ignore\n", + filename , linenum); + continue; + } + + if( strcasecmp( firstToken, "winno") == 0 ) { + if( winno != -1 ) { + print( "fmletter:已有winno却重新定义winno\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + errflg = TRUE; + readflg = FALSE; + break; + } + /* 它奴件玉它No毛忡绣 */ + winno = atoi( secondToken); + continue; + } + + /* 它奴件玉它No 互瑁引匀化中卅中凛及垫反 骰允月 */ + if( winno == -1 ) { + print( "fmletter:winno 尚未定义,资料却已设定。\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + readflg = FALSE; + errflg = FALSE; + break; + } + /* 它奴件玉它No 互域谯仄凶凛反椭瘀毛 戈[ + * 公木动陆反 骰允月 */ + if( (chkflg == FALSE && winno == windowno )|| + chkflg == TRUE) + { + if( buttonconfmode == TRUE ) { + if( strcasecmp( firstToken, "gotowin") == 0 ) { + buttonproc[b_mode].gotowin = atoi( secondToken); + } + else if( strcasecmp( firstToken, "checkhaveitem") == 0 ) { + buttonproc[b_mode].checkhaveitem = atoi( secondToken); + } + else if( strcasecmp( firstToken, "haveitemgotowin") == 0 ) { + buttonproc[b_mode].checkhaveitemgotowin = atoi( secondToken); + } + else if( strcasecmp( firstToken, "checkdonthaveitem") == 0 ) { + buttonproc[b_mode].checkdonthaveitem = atoi( secondToken); + } + else if( strcasecmp( firstToken, "donthaveitemgotowin") == 0 ) { + buttonproc[b_mode].checkdonthaveitemgotowin = atoi( secondToken); + } + else if( strcasecmp( firstToken, "endbutton") == 0 ) { + if( buttonproc[b_mode].gotowin == - 1 ) { + if( buttonproc[b_mode].checkhaveitem == -1 && + buttonproc[b_mode].checkdonthaveitem == -1) + { + errflg = TRUE; + } + else { + /* 升匀切井井凶匀吊分仃匹手涩烂今木化中木壬 */ + if( !((buttonproc[b_mode].checkhaveitem != -1 && + buttonproc[b_mode].checkhaveitemgotowin != -1) + || (buttonproc[b_mode].checkdonthaveitem != -1 && + buttonproc[b_mode].checkdonthaveitemgotowin != -1))) + { + errflg = TRUE; + } + } + } + + if( errflg == TRUE) { + print( "fmletter: 找不到gotowin\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + readflg = FALSE; + errflg = TRUE; + break; + } + buttonproc[b_mode].use = TRUE; + buttonconfmode = FALSE; + buttonendflg = TRUE; + } + } + else { + + w.windowno = winno; + + sprintf( buf, "letter%d", CHAR_getInt( meindex, CHAR_FMINDEX) ); + + /* 它奴件玉它正奶皿及涩烂 */ + if( strcasecmp( firstToken, "wintype") == 0 ) { + w.windowtype = atoi( secondToken); + } + /* 示正件正奶皿及涩烂 */ + else if( strcasecmp( firstToken, "buttontype") == 0 ) { + w.buttontype = NPC_FmLetter_restoreButtontype( secondToken); + } + /* getitem及涩烂 */ + else if( strcasecmp( firstToken, "takeitem") == 0 ) { + w.takeitem = atoi( secondToken); + } + /* giveitem及涩烂 */ + else if( strcasecmp( firstToken, "giveitem") == 0 ) { + w.giveitem = atoi( secondToken); + } + else if( strcasecmp( firstToken, buf) == 0 ) { + w.letter = atoi( secondToken); + } + + /* message及涩烂 */ + else if( strcasecmp( firstToken, "message") == 0 ) { + if( messagepos == 0 ) { + strcpy( w.message, secondToken); + messagepos = strlen( w.message); + } + else { + w.message[messagepos]='\n'; + messagepos++; + strcpy( &w.message[messagepos], secondToken); + messagepos+=strlen(secondToken); + } + } + /* 示正件毛瓷仄凶凛及涩烂 */ + else if( strcasecmp( firstToken, "okpressed") == 0 ) { + buttonconfmode = TRUE; + b_mode = 0; + buttonendflg = FALSE; + } + else if( strcasecmp( firstToken, "cancelpressed") == 0 ) { + buttonconfmode = TRUE; + b_mode = 1; + buttonendflg = FALSE; + } + else if( strcasecmp( firstToken, "yespressed") == 0 ) { + buttonconfmode = TRUE; + b_mode = 2; + buttonendflg = FALSE; + } + else if( strcasecmp( firstToken, "nopressed") == 0 ) { + buttonconfmode = TRUE; + b_mode = 3; + buttonendflg = FALSE; + } + else if( strcasecmp( firstToken, "prevpressed") == 0 ) { + buttonconfmode = TRUE; + b_mode = 4; + buttonendflg = FALSE; + } + else if( strcasecmp( firstToken, "nextpressed") == 0 ) { + buttonconfmode = TRUE; + b_mode = 5; + buttonendflg = FALSE; + } + else if( strcasecmp( firstToken, "selected") == 0 ) { + buttonconfmode = TRUE; + b_mode = 6 + selectnum; + buttonendflg = FALSE; + selectnum ++; + } + /* 涩烂蔽歹曰 */ + else if( strcasecmp( firstToken, "endwin") == 0 ) { + endflg = TRUE; + if( chkflg == FALSE) { + readflg = FALSE; + } + break; + } + else { + //print( "fmletter:设定是不可能的参数\n"); + //print( "filename:[%s] line[%d]\n", filename, linenum); + } + } + } + else { + if( strcasecmp( firstToken, "endwin") == 0 ) { + winno = -1; + } + } + } + if( buttonendflg == FALSE) { + print( "fmletter: 找不到endbutton\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + errflg = TRUE; + break; + } + if( winno != -1 ) { + if( w.windowtype == -1 ) { + print( "fmletter: 找不到wintype\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + errflg = TRUE; + break; + } + if( w.buttontype == -1 ) { + print( "fmletter: 找不到button\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + errflg = TRUE; + break; + } + if( strlen( w.message) == 0 ) { + print( "fmletter: 找不到message\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + errflg = TRUE; + break; + } + } + } + fclose( fp); + + if( chkflg == FALSE && w.windowno == -1 ) { + print( "fmletter: 找不到所指定的windowno\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + return FALSE; + } + if( winno != -1 && endflg == FALSE) { + print( "fmletter: 找不到endwin\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + return FALSE; + } + if( errflg == TRUE) return FALSE; + + return TRUE; +} +/* + * buttontype=匹隙烂仄凶 侬 毛醒袄卞 晶允月[ + * + */ +static int NPC_FmLetter_restoreButtontype( char *data ) +{ + int ret = 0; + int rc; + int i; + char buff[1024]; + + for( i = 1; ; i ++ ) { + rc = getStringFromIndexWithDelim( data, "|", i, buff, + sizeof( buff ) ); + if( rc == FALSE) break; + if( strcasecmp( buff, "ok") == 0 ) { + ret |= WINDOW_BUTTONTYPE_OK; + } + else if( strcasecmp( buff, "cancel") == 0 ) { + ret |= WINDOW_BUTTONTYPE_CANCEL; + } + else if( strcasecmp( buff, "yes") == 0 ) { + ret |= WINDOW_BUTTONTYPE_YES; + } + else if( strcasecmp( buff, "no") == 0 ) { + ret |= WINDOW_BUTTONTYPE_NO; + } + else if( strcasecmp( buff, "prev") == 0 ) { + ret |= WINDOW_BUTTONTYPE_PREV; + } + else if( strcasecmp( buff, "next") == 0 ) { + ret |= WINDOW_BUTTONTYPE_NEXT; + } + } + if( ret == 0 ) { + ret = atoi( data); + } + return ret; +} + + + + diff --git a/gmsv/npc/npc_fmpkcallman.c b/gmsv/npc/npc_fmpkcallman.c new file mode 100644 index 0000000..1549722 --- /dev/null +++ b/gmsv/npc/npc_fmpkcallman.c @@ -0,0 +1,392 @@ +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "lssproto_serv.h" +#include "npc_fmpkcallman.h" +#include "family.h" +#include "readmap.h" +#include "battle.h" +#include "log.h" + +// WON ADD 增加族长召唤的限制 +#include "npc_scheduleman.h" +#include "handletime.h" + + +static void NPC_FMPKCallMan_selectWindow(int meindex, int toindex, int num, int select); +void NPC_CallFMMember(int meindex, int floor, int fmindex, char *fmname, int index); + +/********************************* +* 赓渝质 +*********************************/ +BOOL NPC_FMPKCallManInit( int meindex ) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[1024]; + char buff2[256]; + int fl, x, y; + + if( NPC_Util_GetArgStr( meindex, npcarg, sizeof( npcarg)) == NULL){ + print("FMPKCallMan:GetArgStrErr"); + return FALSE; + } + + /*--伐□皿互涩烂今木化中月井----*/ + /*--伐□皿互涩烂今木化卅仃木壬NPC毛综日卅中仇午卞允月--*/ + if(NPC_Util_GetStrFromStrWithDelim( npcarg, "WARP", buf, sizeof( buf))==NULL){ + print("FMPKCallMan Err is %s",npcarg); + print("FMPKCallMan Err"); + return FALSE; + } + + /*--伐□皿互涩烂今木化中化手伐□皿燮互卅仃木壬手切欠氏NPC毛综日卅中--*/ + getStringFromIndexWithDelim(buf,",",1,buff2,sizeof(buff2)); + fl=atoi(buff2); + getStringFromIndexWithDelim(buf,",",2,buff2,sizeof(buff2)); + x=atoi(buff2); + getStringFromIndexWithDelim(buf,",",3,buff2,sizeof(buff2)); + y=atoi(buff2); + + if( MAP_IsValidCoordinate( fl,x,y )== FALSE ){ + print( "FMWarp NPC:Invalid warpman ERR" ); + return FALSE; + } + + /*--正奶皿涩烂--*/ + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPEWARPMAN ); + + return TRUE; +} + +/********************************* +* 仄井仃日木凶凛及质 +*********************************/ +void NPC_FMPKCallManTalked( int meindex , int talkerindex , char *szMes ,int color ) +{ + /* 皿伊奶乩□卞覆仄化分仃 杀允月 */ + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) { + return; + } + + /*-- 及蟆卞中月井升丹井"--*/ + if(NPC_Util_isFaceToFace(talkerindex,meindex,2 )==FALSE){ + /* ㄠ弘伉永玉动 及心 */ + if( NPC_Util_isFaceToChara( talkerindex, meindex, 1) == FALSE) return; + } + + /*--伐□弁及赓渝祭--*/ + CHAR_setWorkInt(talkerindex, CHAR_WORKSHOPRELEVANT, 0); + + /*-反元户及蓟 --*/ + NPC_FMPKCallMan_selectWindow( meindex, talkerindex, 0, -1); +} + +static void NPC_FMPKCallMan_selectWindow( int meindex, int toindex, + int num,int select) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + char token[1024], buf[256], buf2[256]; + int fd = getfdFromCharaIndex(toindex); + + if( fd == -1 ) { + fprint( "getfd err\n"); + return; + } + + // print("meindex:%d toindex:%d num:%d select:%d", meindex, toindex, num, select); + + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("GetArgStrErr"); + return ; + } + /*--涩烂白央奶伙及 卞白夫失谛醒互隙烂今木化中月井今木化中木壬白夫失谛醒及喃曰请仄*/ + if(strstr(npcarg,"%4d")!=NULL){ + int work; + NPC_Util_GetStrFromStrWithDelim( npcarg, "WARP", buf, sizeof( buf)); + getStringFromIndexWithDelim(buf,",",1,buf2,sizeof(buf2)); + work = atoi( buf2); + } + + token[0] = '\0'; + + switch(num) { + + case 0: + if (NPC_Util_GetStrFromStrWithDelim(npcarg, "MainMsg", buf, + sizeof(buf)) == NULL) + return; + sprintf(token, "3\n ★家族PK场★\n" + "%s" + "\n 《召唤家族成员》" + "\n 《返回记录点》" + "\n 《取消》", + buf); + lssproto_WN_send(fd, WINDOW_MESSAGETYPE_SELECT, + WINDOW_BUTTONTYPE_NONE, + CHAR_WINDOWTYPE_FMPKCALLMAN_START, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), token); + break; + case 1: +#ifdef _FMVER21 + if( CHAR_getInt( toindex, CHAR_FMLEADERFLAG) == FMMEMBER_LEADER) +#else + if( CHAR_getInt( toindex, CHAR_FMLEADERFLAG) == 1) +#endif + { + if (CHAR_getWorkInt(toindex, CHAR_WORKFMSETUPFLAG) != 1) + { + if (NPC_Util_GetStrFromStrWithDelim(npcarg, "NoSetupMsg", buf, + sizeof(buf)) == NULL) + return; + if (strstr(buf, "%s") != NULL) + sprintf(token, buf, CHAR_getChar(toindex, CHAR_FMNAME)); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, token); + } + else + { + if (NPC_Util_GetStrFromStrWithDelim(npcarg, "CallMsg", buf, + sizeof(buf)) == NULL) + return; + if (strstr(buf, "%s") != NULL) + sprintf(token, buf, CHAR_getChar(toindex, CHAR_FMNAME)); + +// WON ADD 增加族长召唤的限制 + { + int fmindex, fmpk_pos=-1, j; + int now_time; + struct tm tm1; +// Terry add for 索引值为 0 的家族会有问题,所以多加判断家族名称 + char szFMName[32]; +// end + + memcpy(&tm1,localtime((time_t *)&NowTime.tv_sec),sizeof(tm1)); + + fmindex = CHAR_getWorkInt(toindex, CHAR_WORKFMINDEXI); +// Terry add for 索引值为 0 的家族会有问题,所以多加判断家族名称 + strncpy(szFMName,CHAR_getChar(toindex,CHAR_FMNAME),sizeof(szFMName)); +// end + + for( j=0; j <= MAX_SCHEDULEMAN*MAX_SCHEDULE; j++ ){ +// Terry fix for 索引值为 0 的家族会有问题,所以多加判断家族名称 +// if( (fmindex == fmpks[j].host_index ) || (fmindex == fmpks[j].guest_index ) ){ + if((fmindex == fmpks[j].host_index && strcmp(szFMName,fmpks[j].host_name) == 0) || + (fmindex == fmpks[j].guest_index && strcmp(szFMName,fmpks[j].guest_name) == 0)){ +//end + fmpk_pos=j; + break; + } + } + + if(fmpk_pos != -1){ + + if(fmpk_pos <= MANORNUM*MAX_SCHEDULE+1){ + now_time=NowTime.tv_sec+(60*60); + }else{ + if(tm1.tm_hour+1==24) now_time=10000; + else now_time=(tm1.tm_hour+1) * 100; + } + + if( (fmpks[fmpk_pos].flag != FMPKS_FLAG_SCHEDULED) && + (fmpks[fmpk_pos].flag != FMPKS_FLAG_MANOR_PREPARE) ) + { + sprintf(token,"你没有家族约战,请先约战吧。"); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, token); + + }else if( now_time < fmpks[fmpk_pos].dueltime ){ + + sprintf(token,"请在对战前一小时再来召唤族员吧!"); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, token); + + }else{ + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_YESNO, + CHAR_WINDOWTYPE_FMPKCALLMAN_CALL, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), token); + } + }else{ + sprintf(token,"你没有家族约战,请先约战吧。"); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, token); + } + } + + } + } else { + if (NPC_Util_GetStrFromStrWithDelim(npcarg, "NoLeaderMsg", buf, + sizeof(buf)) == NULL) + return; + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, buf); + } + break; + case 2: + if (NPC_Util_GetStrFromStrWithDelim(npcarg, "LeavepkMsg", buf, + sizeof(buf)) == NULL) + return; + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_YESNO, + CHAR_WINDOWTYPE_FMPKCALLMAN_LEAVE, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), buf); + break; + } +} + +/*----------------------------------------- + * 弁仿奶失件玄井日忒匀化五凶凛卞裟太请今木月[ + * +-------------------------------------------*/ +void NPC_FMPKCallManWindowTalked( int meindex, int talkerindex, + int seqno, int select, char *data) +{ + int datanum = -1, fl, x, y; + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[1024], buff2[256]; + + int fd = getfdFromCharaIndex(talkerindex); + if (fd == -1) return; + if (NPC_Util_GetArgStr(meindex, npcarg, sizeof(npcarg)) == NULL) + { + print("GetArgStrErr"); + return; + } + NPC_Util_GetStrFromStrWithDelim(npcarg, "WARP", buf, sizeof(buf)); + getStringFromIndexWithDelim(buf, ",", 1, buff2, sizeof(buff2)); + fl = atoi(buff2); + getStringFromIndexWithDelim(buf, ",", 2, buff2, sizeof(buff2)); + x = atoi(buff2); + getStringFromIndexWithDelim(buf, ",", 3, buff2, sizeof(buff2)); + y = atoi(buff2); + + makeStringFromEscaped( data); + + print("meindex:%d seqno:%d select:%d data:%s\n", meindex, seqno, select, data); + + datanum = atoi( data); + switch( seqno){ + + /*--反元引曰及 --*/ + case CHAR_WINDOWTYPE_FMPKCALLMAN_START: + if (datanum == 1) + NPC_FMPKCallMan_selectWindow(meindex, talkerindex, 1, -1); + else if (datanum == 2) + NPC_FMPKCallMan_selectWindow(meindex, talkerindex, 2, -1); + break; + case CHAR_WINDOWTYPE_FMPKCALLMAN_CALL: + if (select == WINDOW_BUTTONTYPE_YES) + { + lssproto_WN_send(fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, + makeEscapeString("\n召唤中···请稍候!\n@#$%↑&*···", buf, sizeof(buf))); + NPC_CallFMMember(meindex, + CHAR_getInt(talkerindex, CHAR_FLOOR), + CHAR_getInt(talkerindex, CHAR_FMINDEX), + CHAR_getChar(talkerindex, CHAR_FMNAME), + CHAR_getWorkInt(talkerindex, CHAR_WORKFMINDEXI)); + } + break; + case CHAR_WINDOWTYPE_FMPKCALLMAN_COME: + if (select == WINDOW_BUTTONTYPE_YES) + { + print("CHAR_WINDOWTYPE_FMPKCALLMAN_COME\n"); + if (CHAR_getWorkInt(talkerindex, CHAR_WORKBATTLEMODE) + != BATTLE_CHARMODE_NONE) + return; + if (CHAR_getWorkInt(talkerindex, CHAR_WORKPARTYMODE) + != CHAR_PARTY_NONE) + CHAR_DischargeParty(talkerindex, 0); + + CHAR_setWorkInt(talkerindex, CHAR_WORKWARPCHECK, FALSE); + CHAR_setWorkInt(talkerindex, CHAR_WORKFMPKFLAG, 1); + CHAR_warpToSpecificPoint(talkerindex, fl, x, y); + } + break; + case CHAR_WINDOWTYPE_FMPKCALLMAN_LEAVE: + if (select == WINDOW_BUTTONTYPE_YES) + { + int spfl = 0, spx = 0, spy = 0, i = 0, itemindex = 0; + if (CHAR_getWorkInt(talkerindex, CHAR_WORKBATTLEMODE) + != BATTLE_CHARMODE_NONE) + return; + if (CHAR_getWorkInt(talkerindex, CHAR_WORKPARTYMODE) + != CHAR_PARTY_NONE) + { + lssproto_WN_send(fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, + makeEscapeString("\n无法以团队方式离开唷!\n请先解散团队!", buf, sizeof(buf))); + return; + } + for (i = 0; i < CHAR_MAXITEMHAVE; i++) + { + itemindex = CHAR_getItemIndex(talkerindex, i); + if (ITEM_CHECKINDEX(itemindex) == FALSE) continue; + + if (ITEM_getInt(itemindex, ITEM_DROPATLOGOUT) == TRUE) + { + lssproto_WN_send(fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, + makeEscapeString("\n您身上有贵重物品喔!\n为了避免在传送途中不小心损坏,\n请先将这类物品卸下,\n谢谢您的合作!", buf, sizeof(buf))); + return; + } + + } + CHAR_setWorkInt(talkerindex, CHAR_WORKWARPCHECK, FALSE); + CHAR_getElderPosition(CHAR_getInt(talkerindex, CHAR_LASTTALKELDER), + &spfl, &spx, &spy); + CHAR_warpToSpecificPoint(talkerindex, spfl, spx, spy); + } + break; + default: + break; + } +} + +extern struct FM_PKFLOOR fmpkflnum[FAMILY_FMPKFLOOR]; +void NPC_CallFMMember(int meindex, int floor, int fmindex, char *fmname, int index) +{ + int i, charindex; + char buf[256]; + extern int familyMemberIndex[FAMILY_MAXNUM][FAMILY_MAXMEMBER]; + print("CallFMMember_NPC_meindex:%d\n", meindex); + for( i = 0; i < FAMILY_MAXMEMBER; i++) + { + charindex = familyMemberIndex[index][i]; + if( charindex >= 0 ) { + if( CHAR_getCharUse(charindex) ) + { + print("charindex:%d name:%s\n", charindex, CHAR_getChar(charindex, CHAR_NAME)); + if (CHAR_getInt(charindex, CHAR_FLOOR) == floor) continue; + if (CHAR_getWorkInt(charindex, CHAR_WORKBATTLEMODE) == BATTLE_CHARMODE_NONE) + { + int fd = getfdFromCharaIndex(charindex); + int charfloor = CHAR_getInt(charindex, CHAR_FLOOR); + int j = 0, checkflag = 0; + if (fd == -1) continue; +#ifdef _FMVER21 + if (CHAR_getInt(charindex, CHAR_FMLEADERFLAG) < 0 || + CHAR_getInt(charindex, CHAR_FMLEADERFLAG) == FMMEMBER_APPLY) continue; +#else + if (CHAR_getInt(charindex, CHAR_FMLEADERFLAG) <= 0 ) continue; +#endif + for (j = 0; j < FAMILY_FMPKFLOOR; j++) + { + if (charfloor == fmpkflnum[j].fl) + checkflag = 1; + } + if (checkflag != 1) + lssproto_WN_send(fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_YESNO, CHAR_WINDOWTYPE_FMPKCALLMAN_COME, + CHAR_getWorkInt(meindex, CHAR_WORKOBJINDEX), + makeEscapeString("\n家族已经在PK罗~要不要加入呢?\n不过若是在组队状态中,将会脱离团队唷!", buf, sizeof(buf))); + } + } + else + familyMemberIndex[index][i] = -1; + } + } +} diff --git a/gmsv/npc/npc_fmpkman.c b/gmsv/npc/npc_fmpkman.c new file mode 100644 index 0000000..ea28a8d --- /dev/null +++ b/gmsv/npc/npc_fmpkman.c @@ -0,0 +1,301 @@ +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "lssproto_serv.h" +#include "npc_fmpkman.h" +#include "npc_scheduleman.h" +#include "npc_fmwarpman.h" +#include "family.h" +#include "readmap.h" +#include "battle.h" +#include "log.h" + +enum { + NPC_WORK_ID = CHAR_NPCWORKINT1, +}; + +static void NPC_FMPKMan_selectWindow(int meindex, int toindex, int num, int select); +// shan add +BOOL NPC_PARTY_CHAECK1(int meindex,int talker); +void NPC_ERR_DiSP1(int meindex,int talker,int errNO); + +/********************************* +* 赓渝质 +*********************************/ +BOOL NPC_FMPKManInit( int meindex ) +{ + + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[1024]; + char buff2[256]; + int fl, x, y, meid; + + if( NPC_Util_GetArgStr( meindex, npcarg, sizeof( npcarg)) == NULL){ + print("FMPKMan:GetArgStrErr"); + return FALSE; + } + + /*--伐□皿互涩烂今木化中月井----*/ + /*--伐□皿互涩烂今木化卅仃木壬NPC毛综日卅中仇午卞允月--*/ + if(NPC_Util_GetStrFromStrWithDelim( npcarg, "WARP", buf, sizeof( buf))==NULL){ + print("FMPKMan Err is %s",npcarg); + print("FMPKMan Err"); + return FALSE; + } + + /*--伐□皿互涩烂今木化中化手伐□皿燮互卅仃木壬手切欠氏NPC毛综日卅中--*/ + getStringFromIndexWithDelim(buf,",",1,buff2,sizeof(buff2)); + fl=atoi(buff2); + getStringFromIndexWithDelim(buf,",",2,buff2,sizeof(buff2)); + x=atoi(buff2); + getStringFromIndexWithDelim(buf,",",3,buff2,sizeof(buff2)); + y=atoi(buff2); + + if( MAP_IsValidCoordinate( fl,x,y )== FALSE ){ + print( "FMWarp NPC:Invalid warpman ERR" ); + return FALSE; + } + + meid = NPC_Util_GetNumFromStrWithDelim(npcarg, "ID"); + if ((meid < 0) || (meid >= MAX_SCHEDULEMAN)) + { + print("FMPKMAN NPC: Init error Invalid ID:%d", meid); + return FALSE; + } + CHAR_setWorkInt(meindex, NPC_WORK_ID, meid); + + /*--正奶皿涩烂--*/ + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPEWARPMAN ); + + return TRUE; + +} + +/********************************* +* 仄井仃日木凶凛及质 +*********************************/ +void NPC_FMPKManTalked( int meindex , int talkerindex , char *szMes ,int color ) +{ + /* 皿伊奶乩□卞覆仄化分仃 杀允月 */ + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) { + return; + } + + /*-- 及蟆卞中月井升丹井"--*/ + if(NPC_Util_isFaceToFace(talkerindex,meindex,2 )==FALSE){ + /* ㄠ弘伉永玉动 及心 */ + if( NPC_Util_CharDistance( talkerindex, meindex ) > 1) return; + } + + /*--伐□弁及赓渝祭--*/ + CHAR_setWorkInt(talkerindex, CHAR_WORKSHOPRELEVANT, 0); + + /*-反元户及蓟 --*/ + NPC_FMPKMan_selectWindow( meindex, talkerindex, 0, -1); +} + +static void NPC_FMPKMan_selectWindow( int meindex, int toindex, int num,int select) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + char token[1024], buf[256], buf2[256]; + int buttontype = 0, windowtype = 0, windowno = 0; + int fd = getfdFromCharaIndex(toindex); + int num1 = 0, num2 = 0; + int fmpks_pos = CHAR_getWorkInt(meindex, NPC_WORK_ID) * MAX_SCHEDULE; + + if( fd == -1 ) { + print( "getfd err\n"); + return; + } + + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("GetArgStrErr"); + return ; + } + /*--涩烂白央奶伙及 卞白夫失谛醒互隙烂今木化中月井今木化中木壬白夫失谛醒及喃曰请仄*/ + if(strstr(npcarg,"%4d")!=NULL){ + int work; + NPC_Util_GetStrFromStrWithDelim( npcarg, "WARP", buf, sizeof( buf)); + getStringFromIndexWithDelim(buf,",",1,buf2,sizeof(buf2)); + work = atoi( buf2); + } + + token[0] = '\0'; + + switch(num){ + // 赓及它奴件玉它 + case 0: + if(NPC_Util_GetStrFromStrWithDelim( npcarg, "MainMsg", buf, + sizeof( buf)) == NULL) + return; + sprintf(token, "3\n     ★家族PK场★\n" + "%s" + "\n 《 察看双方人数 》" + "\n 《 离开PK场 》", + buf); + buttontype = WINDOW_BUTTONTYPE_NONE; + windowtype = WINDOW_MESSAGETYPE_SELECT; + windowno = CHAR_WINDOWTYPE_FMPKMAN_START; + break; + case 1: + if(NPC_Util_GetStrFromStrWithDelim(npcarg, "ViewMsg", buf, + sizeof(token)) == NULL) + return; + NPC_GetPKFMNum(CHAR_getInt(toindex, CHAR_FLOOR), + fmpks[fmpks_pos].host_index, + fmpks[fmpks_pos].guest_index, + &num1, &num2); +/* + print("host:%s guest:%s hostindex:%d guestindex:%d\n", + fmpks[fmpks_pos].host_name, + fmpks[fmpks_pos].guest_name, + fmpks[fmpks_pos].host_index, + fmpks[fmpks_pos].guest_index); +*/ + sprintf(token, "\n%s\n\n%s:%4d人\n\n%s:%4d人", buf, + fmpks[fmpks_pos].host_name, num1, + fmpks[fmpks_pos].guest_name, num2); + buttontype = WINDOW_BUTTONTYPE_OK; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_FMPKMAN_VIEW; + break; + case 2: + if(NPC_Util_GetStrFromStrWithDelim(npcarg, "LeavepkMsg", token, + sizeof(token)) == NULL) + return; + + buttontype = WINDOW_BUTTONTYPE_YESNO; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_FMPKMAN_LEAVEPK; + break; + default: + break; + } + + /*--巨旦弗□皿--*/ + //makeEscapeString( token, escapedname, sizeof(escapedname)); + + + /*--霜耨--*/ + lssproto_WN_send( fd, windowtype, + buttontype, + windowno, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + +} + +/*----------------------------------------- + * 弁仿奶失件玄井日忒匀化五凶凛卞裟太请今木月[ + * +-------------------------------------------*/ +void NPC_FMPKManWindowTalked( int meindex, int talkerindex, + int seqno, int select, char *data) +{ + int datanum = -1, fl, x, y; + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[1024], buff2[256]; + + if (NPC_Util_GetArgStr(meindex, npcarg, sizeof(npcarg)) == NULL) + { + print("GetArgStrErr"); + return; + } + NPC_Util_GetStrFromStrWithDelim(npcarg, "WARP", buf, sizeof(buf)); + getStringFromIndexWithDelim(buf, ",", 1, buff2, sizeof(buff2)); + fl = atoi(buff2); + getStringFromIndexWithDelim(buf, ",", 2, buff2, sizeof(buff2)); + x = atoi(buff2); + getStringFromIndexWithDelim(buf, ",", 3, buff2, sizeof(buff2)); + y = atoi(buff2); + + makeStringFromEscaped( data); + +// print("meindex:%d seqno:%d select:%d data:%s\n", meindex, seqno, select, data); + + datanum = atoi( data); + switch( seqno){ + + /*--反元引曰及 --*/ + case CHAR_WINDOWTYPE_FMPKMAN_START: + if (datanum == 1) + NPC_FMPKMan_selectWindow(meindex, talkerindex, 1, -1); + else if (datanum == 2) + NPC_FMPKMan_selectWindow(meindex, talkerindex, 2, -1); + break; + case CHAR_WINDOWTYPE_FMPKMAN_VIEW: + break; + case CHAR_WINDOWTYPE_FMPKMAN_LEAVEPK: + if (select == WINDOW_BUTTONTYPE_YES) + { + if (CHAR_getWorkInt(talkerindex, CHAR_WORKBATTLEMODE) + != BATTLE_CHARMODE_NONE) + return; + + // shan add + if(NPC_PARTY_CHAECK1( meindex, talkerindex)==FALSE){ + NPC_ERR_DiSP1( meindex, talkerindex, 1); + return; + } + + CHAR_setWorkInt(talkerindex, CHAR_WORKWARPCHECK, FALSE); + CHAR_warpToSpecificPoint(talkerindex, fl, x, y); + } + break; + default: + break; + } +} + +// shan add +BOOL NPC_PARTY_CHAECK1(int meindex,int talker) +{ + if(CHAR_getWorkInt(talker,CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE){ + return FALSE; + } + return TRUE; +} + +// shan add errNO=1(组队) +void NPC_ERR_DiSP1(int meindex,int talker,int errNO) +{ + char token[1024]; + int i=0; + int otherindex; + int fd = getfdFromCharaIndex( talker); + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("GetArgStrErr"); + return ; + } + + if(errNO==1){ + if(NPC_Util_GetStrFromStrWithDelim( npcarg, "PartyMsg",token, sizeof( token))==NULL){ + sprintf(token, "无法以团队离场。\n\n请把团队解散之後再个别\n离场。"); + } + + if(CHAR_getWorkInt(talker,CHAR_WORKPARTYMODE)==CHAR_PARTY_CLIENT){ + + }else{ + for( i=0 ; i < CHAR_PARTYMAX ;i++){ + otherindex=CHAR_getWorkInt(talker,CHAR_WORKPARTYINDEX1+i); + if(otherindex != -1){ + fd = getfdFromCharaIndex( otherindex); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + CHAR_WINDOWTYPE_WINDOWWARPMAN_ERR, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + } + } + return ; + } + } +} + + + diff --git a/gmsv/npc/npc_fmwarpman.c b/gmsv/npc/npc_fmwarpman.c new file mode 100644 index 0000000..9e18978 --- /dev/null +++ b/gmsv/npc/npc_fmwarpman.c @@ -0,0 +1,1272 @@ +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "lssproto_serv.h" +#include "saacproto_cli.h" +#include "npc_fmwarpman.h" +#include "npc_scheduleman.h" +#include "readmap.h" +#include "log.h" +#include "battle.h" +#include "handletime.h" +#include "family.h" +#include "errno.h" + +#define FMWARPMAN_INIT_LOOPTIME 600 // 0.1秒 +#define FMWARPMAN_FREE_LOOPTIME 9000 // 1.5秒 +#define FMWARPMAN_BUSY_LOOPTIME 3000 // 0.5秒 +#define FMWARPMAN_WAIT_LOOPTIME 18000 // 3秒 +#define FMWARPMAN_CLEANPLACE 59 +//#define FMWARPMAN_CLEANPLACE 9 +#define TRUE 1 +#define FALSE 0 +// CoolFish Rem 2002/2/25 +// #define MANOR 4 + +enum { + NPC_WORK_MODEFLAG = CHAR_NPCWORKINT1, + NPC_WORK_CURRENTTIME = CHAR_NPCWORKINT2, + NPC_WORK_WARPFLOOR = CHAR_NPCWORKINT3, + NPC_WORK_FMNUMI = CHAR_NPCWORKINT4, + NPC_WORK_FMNUMII = CHAR_NPCWORKINT5, + NPC_WORK_ID = CHAR_NPCWORKINT6, + NPC_WORK_TIMEFLAG = CHAR_NPCWORKINT9, + NPC_WORK_TALKFLAG = CHAR_NPCWORKINT10, + NPC_WORK_CleanTime = CHAR_NPCWORKINT11, +}; + +enum { + NPC_STATEINIT, + NPC_STATEFREE, + NPC_STATEBUSY, + NPC_STATEWAIT, +}; + +enum { + NPC_WORK_WINFMNAME = CHAR_NPCWORKCHAR1, +}; + +void NPC_ERR_FMDiSP(int meindex, int talker, int errNO); +static void NPC_FMWarpMan_selectWindow(int meindex, int toindex, int num, int select); +void NPC_FMBATTLESET(int floor, int index1, int index2, int flag); +void NPC_WarpFamily(int floor, int index1, int index2, int fl, int x, int y); +void NPC_BattleOut(int fmindex, int fmindex1); +void NPC_CleanPK(int floor, int meindex); +int NPC_FMFloorUse(int floor); +void NPC_talkToFloor(int floor, int index1, int index2, char *data); +void CheckLeavePK(int npcindex, int floor, int index1, int index2); + +void CHECK_FMPknumInFloor( int meindex) +{ + int fmnum1 = 0, fmnum2 = 0; + int fmpks_pos; + + fmpks_pos = CHAR_getWorkInt(meindex, NPC_WORK_ID) * MAX_SCHEDULE; + // Nuke 20040920: Bug fix 庄园人数满时要检查总人数 + //print("<<%d %d>>",fmpks_pos,MAX_SCHEDULEMAN); + //if( fmpks_pos < 0 || fmpks_pos >= MAX_SCHEDULEMAN ) return; + if( fmpks_pos < 0 || fmpks_pos >= MAX_SCHEDULEMAN * MAX_SCHEDULE ) return; + NPC_GetPKFMNum(CHAR_getWorkInt(meindex, NPC_WORK_WARPFLOOR), + fmpks[fmpks_pos].host_index, + fmpks[fmpks_pos].guest_index, + &fmnum1, &fmnum2 ); + + CHAR_setWorkInt( meindex, NPC_WORK_FMNUMI , fmnum1); + CHAR_setWorkInt( meindex, NPC_WORK_FMNUMII, fmnum2); +} + +extern int familyMemberIndex[FAMILY_MAXNUM][FAMILY_MAXMEMBER]; + +BOOL NPC_FMWarpManInit( int meindex ) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buff2[256]; + char buf[1024]; + int fl, x, y, meid; + // shan + int fl1, x1, y1; + + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("FMWarpMan:GetArgStrErr"); + return FALSE; + } + + if(NPC_Util_GetStrFromStrWithDelim( npcarg, "WARP1", buf, sizeof( buf))==NULL){ + print("FMWarpman Err is %s",npcarg); + print("FMWarpman Err"); + return FALSE; + } + + getStringFromIndexWithDelim(buf,",",1,buff2,sizeof(buff2)); + fl=atoi(buff2); + CHAR_setWorkInt(meindex, NPC_WORK_WARPFLOOR, fl); + getStringFromIndexWithDelim(buf,",",2,buff2,sizeof(buff2)); + x=atoi(buff2); + getStringFromIndexWithDelim(buf,",",3,buff2,sizeof(buff2)); + y=atoi(buff2); + + if( MAP_IsValidCoordinate( fl,x,y )== FALSE ){ + print( "FMWarp NPC:Invalid warpman ERR" ); + return FALSE; + } + + // shan begin + if(NPC_Util_GetStrFromStrWithDelim( npcarg, "WARP2", buf, sizeof( buf))==NULL){ + print("FMWarpman Err is %s",npcarg); + print("FMWarpman Err"); + return FALSE; + } + getStringFromIndexWithDelim(buf,",",1,buff2,sizeof(buff2)); + fl1=atoi(buff2); + CHAR_setWorkInt(meindex, NPC_WORK_WARPFLOOR, fl); + getStringFromIndexWithDelim(buf,",",2,buff2,sizeof(buff2)); + x1=atoi(buff2); + getStringFromIndexWithDelim(buf,",",3,buff2,sizeof(buff2)); + y1=atoi(buff2); + if( MAP_IsValidCoordinate( fl1,x1,y1 )== FALSE ){ + print( "FMWarp NPC:Invalid warpman ERR" ); + return FALSE; + } + // shan end + + meid = NPC_Util_GetNumFromStrWithDelim(npcarg, "ID"); + if ((meid < 0) || (meid >= MAX_SCHEDULEMAN)) + { + print("FMWARP NPC: Init error invalid ID:%d\n", meid); + return FALSE; + } + + /*--正奶皿涩烂--*/ + CHAR_setInt(meindex, CHAR_LOOPINTERVAL, FMWARPMAN_INIT_LOOPTIME); + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPEWARPMAN ); + CHAR_setWorkInt(meindex, NPC_WORK_MODEFLAG, NPC_STATEINIT); + CHAR_setWorkInt(meindex, NPC_WORK_CURRENTTIME, NowTime.tv_sec); + CHAR_setWorkInt(meindex, NPC_WORK_TIMEFLAG, 0); + CHAR_setWorkInt(meindex, NPC_WORK_TALKFLAG, -1); + CHAR_setWorkInt(meindex, NPC_WORK_ID, meid); + CHAR_setWorkInt(meindex, NPC_WORK_FMNUMI, 0); + CHAR_setWorkInt(meindex, NPC_WORK_FMNUMII, 0); + + CHAR_setWorkInt( meindex, NPC_WORK_CleanTime, 6*10); + + return TRUE; +} + +void NPC_FMWarpManTalked(int meindex, int talkerindex, char *szMes, int color) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + + CHAR_setWorkInt( talkerindex, CHAR_WORKWARPCHECK, FALSE ); + + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) { + return; + } + + if(NPC_Util_isFaceToFace( meindex ,talkerindex ,2)==FALSE){ + if(NPC_Util_isFaceToChara(talkerindex,meindex,1 )==FALSE) return; + } + + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("GetArgStrErr"); + return ; + } + + if(CHAR_getWorkInt(talkerindex, CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE){ + NPC_ERR_FMDiSP( meindex, talkerindex, 1); + } + + CHAR_setWorkInt( talkerindex , CHAR_WORKSHOPRELEVANTTRD , 0 ); + NPC_FMWarpMan_selectWindow( meindex, talkerindex, 0, -1); +} + +void NPC_FMWarpManLoop(int meindex) +{ + struct tm tm1; + struct tm *tm2; + int fmpks_pos = CHAR_getWorkInt(meindex, NPC_WORK_ID) * MAX_SCHEDULE; + int floor = CHAR_getWorkInt(meindex, NPC_WORK_WARPFLOOR); +#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令 + int i; + int playernum = CHAR_getPlayerMaxNum(); +#endif + + // WON ADD 修正snprintf会导致当机的bug + if( (tm2=localtime((time_t *)&NowTime.tv_sec) ) == NULL ){ + print("\n won ==> time err !! "); + return; + } + memcpy(&tm1, localtime((time_t *)&NowTime.tv_sec), sizeof(tm1)); + +#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令 + { + static int next_time[5] = {10,20,30,40,50}, flag[5] = {0}; + int now_time = time(NULL); + int j, ID = 0; + + ID = CHAR_getWorkInt(meindex, NPC_WORK_ID) - MANORNUM ; + + if( flag[ ID - 1 ] == 0 ){ + next_time[ ID - 1 ] += now_time; + flag[ ID -1 ] = 1; + } + + if( now_time > next_time[ID - 1] ){ + next_time[ID -1] = now_time + (60 * 5); + + for( i=0; i= 准备时间则设定BUSY状态 + + if (tm1.tm_min > CHAR_getWorkInt(meindex, NPC_WORK_TALKFLAG) + && tm1.tm_min == 0) + { + // 通知成员进场 + if (fmpks[fmpks_pos].flag == FMPKS_FLAG_SCHEDULED) + NPC_talkToFloor(CHAR_getInt(meindex, CHAR_FLOOR), + fmpks[fmpks_pos].host_index, + fmpks[fmpks_pos].guest_index, "可以准备进场了!"); + CHAR_setWorkInt(meindex, NPC_WORK_TALKFLAG, tm1.tm_min); + } + if ((fmpks[fmpks_pos].prepare_time > 0) && (fmpks[fmpks_pos].flag == FMPKS_FLAG_SCHEDULED)) + { + int clock = 0; + + NPC_FMBATTLESET(floor, fmpks[fmpks_pos].host_index, + fmpks[fmpks_pos].guest_index, -1); + if (tm1.tm_hour - (fmpks[fmpks_pos].dueltime / 100) < 0) + clock = (fmpks[fmpks_pos].dueltime % 100) + fmpks[fmpks_pos].prepare_time - 60; + else + clock = fmpks[fmpks_pos].dueltime - (tm1.tm_hour * 100) + fmpks[fmpks_pos].prepare_time; + + if ((tm1.tm_min >= clock) && (fmpks[fmpks_pos].prepare_time > 0)) + { + + NPC_talkToFloor(floor, fmpks[fmpks_pos].host_index, + fmpks[fmpks_pos].guest_index, "开战罗~!!"); + CHAR_setWorkInt(meindex, NPC_WORK_MODEFLAG, NPC_STATEBUSY); + CHAR_setInt(meindex, CHAR_LOOPINTERVAL, FMWARPMAN_BUSY_LOOPTIME); + NPC_FMBATTLESET(floor, fmpks[fmpks_pos].host_index, + fmpks[fmpks_pos].guest_index, 1); + + print("\n won ==> set fmwaperman state busy !!"); + + +#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令 + { + int num1 = 0, num2 = 0; + int winflag = 0; + int floor = CHAR_getWorkInt(meindex, NPC_WORK_WARPFLOOR); + + NPC_GetPKFMNum(floor, fmpks[fmpks_pos].host_index, + fmpks[fmpks_pos].guest_index, &num1, &num2); + + if( num2 < 20 ){ + NPC_WarpFamily(floor, -1, + fmpks[fmpks_pos].guest_index, + CHAR_getInt(meindex, CHAR_FLOOR), + CHAR_getInt(meindex, CHAR_X), + CHAR_getInt(meindex, CHAR_Y)); + NPC_talkToFloor( floor, -1, fmpks[fmpks_pos].guest_index, "因未满二十人而离场" ); +#ifdef _DEATH_FAMILY_STRUCT // WON ADD 家族战存放胜负资料 + { + char out[256]; + sprintf( out, "[%s](%d) 因未满二十人弃权", fmpks[fmpks_pos].guest_name, num2 ); + saacproto_FM_PK_STRUCT_send( acfd, out ); + } +#endif + } + + if( num1 < 20 ){ + NPC_WarpFamily(floor, fmpks[fmpks_pos].host_index, + -1, + CHAR_getInt(meindex, CHAR_FLOOR), + CHAR_getInt(meindex, CHAR_X), + CHAR_getInt(meindex, CHAR_Y)); + NPC_talkToFloor( floor, fmpks[fmpks_pos].host_index, -1, "因未满二十人而离场" ); +#ifdef _DEATH_FAMILY_STRUCT // WON ADD 家族战存放胜负资料 + { + char out[256]; + sprintf( out, "[%s](%d) 因未满二十人弃权", fmpks[fmpks_pos].host_name/* .host_index*/, num1 ); + saacproto_FM_PK_STRUCT_send( acfd, out ); + } +#endif + } + } +#endif + } + else if (tm1.tm_min > CHAR_getWorkInt(meindex, NPC_WORK_TIMEFLAG)) + { + char buf[256]; + int clock = 0; + CHAR_setWorkInt(meindex, NPC_WORK_TIMEFLAG, tm1.tm_min); + clock = ((fmpks[fmpks_pos].dueltime % 100) + fmpks[fmpks_pos].prepare_time) - tm1.tm_min; + if (clock >= 60) clock = clock - 60; + sprintf(buf, "距离对战时间还剩下:%4d分钟", clock); + NPC_talkToFloor(floor, fmpks[fmpks_pos].host_index, + fmpks[fmpks_pos].guest_index, buf); + } + } + }else if (CHAR_getWorkInt(meindex, NPC_WORK_MODEFLAG) == NPC_STATEBUSY){ + // 检查场内人数、判断胜负 + int num1 = 0, num2 = 0; + int winflag = 0; + int floor = CHAR_getWorkInt(meindex, NPC_WORK_WARPFLOOR); + int meid = CHAR_getWorkInt(meindex, NPC_WORK_ID); + + print("\n won ==> check_winner : npc_meid(%d)", meid ); + + NPC_GetPKFMNum(floor, fmpks[fmpks_pos].host_index, + fmpks[fmpks_pos].guest_index, &num1, &num2); + NPC_FMBATTLESET(floor, fmpks[fmpks_pos].host_index, + fmpks[fmpks_pos].guest_index, 1); + CheckLeavePK(meindex, floor, fmpks[fmpks_pos].host_index, + fmpks[fmpks_pos].guest_index); + + if (meid > MANORNUM){ + if (tm1.tm_min == FMWARPMAN_CLEANPLACE){ + // 判断胜负、WARP离场、设定NPC状态 + NPC_BattleOut(fmpks[fmpks_pos].host_index, fmpks[fmpks_pos].guest_index); + NPC_FMBATTLESET(floor, fmpks[fmpks_pos].host_index, + fmpks[fmpks_pos].guest_index, -1); + if (fmpks[fmpks_pos].win == 0){// 生存战 + if (num1 > num2) + winflag = 1; + else if(num1 < num2) + winflag = 2; + else + winflag = 3; + }else if (fmpks[fmpks_pos].win == 1){ // 打飞战 + if ((CHAR_getWorkInt(meindex, NPC_WORK_FMNUMI) - num1) < (CHAR_getWorkInt(meindex, NPC_WORK_FMNUMII) - num2)) + winflag = 1; + else if ((CHAR_getWorkInt(meindex, NPC_WORK_FMNUMI) - num1) > (CHAR_getWorkInt(meindex, NPC_WORK_FMNUMII) - num2)) + winflag = 2; + else + winflag = 3; + } + } + } + if ((num1 == 0) && (num2 != 0)){ + winflag = 2; + }else if ((num2 == 0) && (num1 != 0)){ + winflag = 1; + }else if ((num1 == 0) && (num2 == 0)){ + winflag = 3; + } + if (winflag > 0 && winflag < 3){ +#ifdef _MANOR_PKRULE + if(meid > MANORNUM){ +#endif +#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令 + { + int i, win_index = -1, loser_index = -1; + char *win_name, *loser_name, msg[256] = {0}, token[256] = {0}; + struct tm tm1; + int n1 = 0, n2 = 0; + // FILE *f; + + if(winflag == 1){ + win_index = fmpks[fmpks_pos].host_index; + win_name = fmpks[fmpks_pos].host_name; + n1 = num1; + loser_index = fmpks[fmpks_pos].guest_index; + loser_name = fmpks[fmpks_pos].guest_name; + n2 = num2; + }else if(winflag == 2){ + win_index = fmpks[fmpks_pos].guest_index; + win_name = fmpks[fmpks_pos].guest_name; + n1 = num2; + loser_index = fmpks[fmpks_pos].host_index; + loser_name = fmpks[fmpks_pos].host_name; + n2 = num1; + }else{ + win_index = fmpks[fmpks_pos].host_index; + win_name = fmpks[fmpks_pos].host_name; + loser_index = fmpks[fmpks_pos].guest_index; + loser_name = fmpks[fmpks_pos].guest_name; + } + + memcpy( &tm1, localtime( (time_t *)&NowTime.tv_sec), sizeof( tm1)); + + if(winflag == 1 || winflag == 2){ + sprintf( msg, "[%s](%d)人 胜 [%s](%d)人", win_name, n1, loser_name, n2 ); + sprintf( token, "战况播报: %s", msg ); + }else if( winflag == 3 ){ + sprintf( msg, "[%s] 平手 [%s]", win_name, loser_name ); + sprintf( token, "战况播报: %s", msg ); + } + +#ifdef _DEATH_FAMILY_STRUCT // WON ADD 家族战存放胜负资料 + { + char out[256] = {0}; + sprintf( out, "%d/%d/%d:%d %s", tm1.tm_mon+1, tm1.tm_mday, tm1.tm_hour, tm1.tm_min, msg ); + saacproto_FM_PK_STRUCT_send( acfd, out ); + } +#endif + + for( i=0 ; i< playernum ; i++ ){ + if( CHAR_CHECKINDEX( i ) == FALSE ) continue; + CHAR_talkToCli( i, -1, token, CHAR_COLORYELLOW); + } + /* + if( (f = fopen( "d_fm_pk_log.txt", "a+" ) ) ){ + fprintf( f, "%d/%d/%d:%d %s\n", tm1.tm_mon+1, tm1.tm_mday, tm1.tm_hour, tm1.tm_min, msg ); + fclose( f ); + }else{ + print("\n open file (d_fm_pk_log.txt) Err !!"); + } + */ + } +#else + // 流浪家族pk 过声望 + if (winflag == 1){ + saacproto_ACFixFMPK_send(acfd, + fmpks[fmpks_pos].host_name, + fmpks[fmpks_pos].host_index + 1, + fmpks[fmpks_pos].host_index, + fmpks[fmpks_pos].guest_name, + fmpks[fmpks_pos].guest_index + 1, + fmpks[fmpks_pos].guest_index); + } else { + saacproto_ACFixFMPK_send(acfd, + fmpks[fmpks_pos].guest_name, + fmpks[fmpks_pos].guest_index + 1, + fmpks[fmpks_pos].guest_index, + fmpks[fmpks_pos].host_name, + fmpks[fmpks_pos].host_index + 1, + fmpks[fmpks_pos].host_index); + } +#endif + +#ifdef _MANOR_PKRULE + } +#endif + + { + if (meid > 0 && meid <= MANORNUM){// CoolFish 2002/2/25 Change MANOR -> MANORNUM +#ifdef _NEW_MANOR_LAW + int i,iFmIndex1,iFmIndex2,iCharindex; +#endif + fmpks[fmpks_pos + 1].flag = FMPKS_FLAG_MANOR_BATTLEEND; + if (winflag == 1){ + char token[256]; + sprintf( token, " (%d:%d) %d/%d/%d", + tm1.tm_hour, tm1.tm_min, + tm1.tm_year+1900, tm1.tm_mon+1, tm1.tm_mday); + saacproto_ACFixFMPoint_send(acfd, + fmpks[fmpks_pos].host_name, + fmpks[fmpks_pos].host_index + 1, + fmpks[fmpks_pos].host_index, + fmpks[fmpks_pos].guest_name, + fmpks[fmpks_pos].guest_index + 1, + fmpks[fmpks_pos].guest_index, meid); + //Syu 增加庄园战胜负Log + Logfmpk( + fmpks[fmpks_pos].host_name, + fmpks[fmpks_pos].host_index, + num1, + fmpks[fmpks_pos].guest_name, + fmpks[fmpks_pos].guest_index, + num2, token, "", "", 2); +#ifdef _NEW_MANOR_LAW + // 原家族守住了庄园,家族成员可得到石币 + iFmIndex1 = fmpks[fmpks_pos].host_index; + for(i=0;i= 0 && CHAR_getCharUse(iCharindex)){ + // 获得金钱 = 个人气势 * 5000 + int iAddGold = ((float)CHAR_getInt(iCharindex,CHAR_MOMENTUM)/100.0f) * 5000.0f; + int iGold = CHAR_getInt(iCharindex,CHAR_BANKGOLD),iMaxGold; + // 先放入个人银行 + if(iGold + iAddGold > CHAR_MAXBANKGOLDHAVE){ + CHAR_setInt(iCharindex,CHAR_BANKGOLD,CHAR_MAXBANKGOLDHAVE); + // 个人银行放不下了,放到个人身上 + iAddGold = iGold + iAddGold - CHAR_MAXBANKGOLDHAVE; + iGold = CHAR_getInt(iCharindex,CHAR_GOLD); + iMaxGold = CHAR_getMaxHaveGold(iCharindex); + if(iGold + iAddGold > iMaxGold) CHAR_setInt(iCharindex,CHAR_GOLD,iMaxGold); + else CHAR_setInt(iCharindex,CHAR_GOLD,iGold + iAddGold); + LogFMPKGetMomey(CHAR_getChar(iCharindex,CHAR_FMNAME), + CHAR_getChar(iCharindex,CHAR_CDKEY), + CHAR_getChar(iCharindex,CHAR_NAME), + CHAR_getInt(iCharindex,CHAR_MOMENTUM),iAddGold,0); + } + else{ + CHAR_setInt(iCharindex,CHAR_BANKGOLD,iGold + iAddGold); + LogFMPKGetMomey(CHAR_getChar(iCharindex,CHAR_FMNAME), + CHAR_getChar(iCharindex,CHAR_CDKEY), + CHAR_getChar(iCharindex,CHAR_NAME), + CHAR_getInt(iCharindex,CHAR_MOMENTUM),iAddGold,1); + } + CHAR_talkToCli(iCharindex,-1,"辛苦了!守护住庄园的奖金已汇入你的个人银行",CHAR_COLORRED); + } + } +#endif + } + else if (winflag == 2){ + char token[256]; + sprintf( token, " (%d:%d) %d/%d/%d", + tm1.tm_hour, tm1.tm_min, + tm1.tm_year+1900, tm1.tm_mon+1, tm1.tm_mday); + saacproto_ACFixFMPoint_send(acfd, + fmpks[fmpks_pos].guest_name, + fmpks[fmpks_pos].guest_index + 1, + fmpks[fmpks_pos].guest_index, + fmpks[fmpks_pos].host_name, + fmpks[fmpks_pos].host_index + 1, + fmpks[fmpks_pos].host_index, meid); + //Syu 增加庄园战胜负Log + Logfmpk( + fmpks[fmpks_pos].guest_name, + fmpks[fmpks_pos].guest_index, + num2, + fmpks[fmpks_pos].host_name, + fmpks[fmpks_pos].host_index, + num1, token, "", "", 2); + } + CHAR_setWorkInt(meindex, NPC_WORK_MODEFLAG, NPC_STATEFREE); + CHAR_setInt(meindex, CHAR_LOOPINTERVAL, FMWARPMAN_FREE_LOOPTIME); + print("FMWarpMan State:%d\n", CHAR_getWorkInt(meindex, NPC_WORK_MODEFLAG)); +#ifdef _NEW_MANOR_LAW + // 双方的个人及家族气势都要归零 + iFmIndex1 = fmpks[fmpks_pos].host_index; + iFmIndex2 = fmpks[fmpks_pos].guest_index; + for(i=0;i= 0 && CHAR_getCharUse(iCharindex)){ + CHAR_setInt(iCharindex,CHAR_MOMENTUM,0); + CHAR_talkToCli(iCharindex,-1,"庄园战後个人及家族气势归零",CHAR_COLORRED); + } + iCharindex = familyMemberIndex[iFmIndex2][i]; + if(iCharindex >= 0 && CHAR_getCharUse(iCharindex)){ + CHAR_setInt(iCharindex,CHAR_MOMENTUM,0); + CHAR_talkToCli(iCharindex,-1,"庄园战後个人及家族气势归零",CHAR_COLORRED); + } + } +#endif + } + } + if (winflag == 1) + { + CHAR_setWorkChar(meindex, NPC_WORK_WINFMNAME, fmpks[fmpks_pos].host_name); + } + else if (winflag == 2) + { + CHAR_setWorkChar(meindex, NPC_WORK_WINFMNAME, fmpks[fmpks_pos].guest_name); + + } + NPC_WarpFamily(floor, fmpks[fmpks_pos].host_index, + fmpks[fmpks_pos].guest_index, + CHAR_getInt(meindex, CHAR_FLOOR), + CHAR_getInt(meindex, CHAR_X), + CHAR_getInt(meindex, CHAR_Y)); + if (meid > MANORNUM){// CoolFish 2002/2/25 Change MANOR -> MANORNUM + CHAR_setWorkInt(meindex, NPC_WORK_MODEFLAG, NPC_STATEWAIT); + CHAR_setInt(meindex, CHAR_LOOPINTERVAL, FMWARPMAN_WAIT_LOOPTIME); + } + }else if( winflag == 3 ){ + if (meid > 0 && meid <= MANORNUM) // CoolFish 2002/2/25 Change MANOR -> MANORNUM + + fmpks[fmpks_pos + 1].flag = FMPKS_FLAG_MANOR_BATTLEEND; + NPC_talkToFloor(floor, fmpks[fmpks_pos].host_index, + fmpks[fmpks_pos].guest_index, "双方平手,不分胜负!!"); + NPC_WarpFamily(floor, fmpks[fmpks_pos].host_index, + fmpks[fmpks_pos].guest_index, + CHAR_getInt(meindex, CHAR_FLOOR), + CHAR_getInt(meindex, CHAR_X), + CHAR_getInt(meindex, CHAR_Y)); + CHAR_setWorkInt(meindex, NPC_WORK_MODEFLAG, NPC_STATEWAIT); + CHAR_setInt(meindex, CHAR_LOOPINTERVAL, FMWARPMAN_WAIT_LOOPTIME); + } + }else if (CHAR_getWorkInt(meindex, NPC_WORK_MODEFLAG) == NPC_STATEWAIT){ + + // andy_edit 2002/07/29 + if (tm1.tm_min == FMWARPMAN_CLEANPLACE) + CHAR_setInt(meindex, CHAR_LOOPINTERVAL, FMWARPMAN_FREE_LOOPTIME); + + NPC_CleanPK(floor, meindex); + + if (tm1.tm_min == 0){ + CHAR_setWorkInt(meindex, NPC_WORK_MODEFLAG, NPC_STATEFREE); + // shan add + NPC_FMBATTLESET(floor, fmpks[fmpks_pos].host_index, fmpks[fmpks_pos].guest_index, -1); + CHAR_setInt(meindex, CHAR_LOOPINTERVAL, FMWARPMAN_FREE_LOOPTIME); + // 将 fmwarpman 初始化 + CHAR_setWorkInt(meindex, NPC_WORK_FMNUMI, 0); + CHAR_setWorkInt(meindex, NPC_WORK_FMNUMII, 0); + CHAR_setWorkInt(meindex, NPC_WORK_TIMEFLAG, 0); + CHAR_setWorkInt(meindex, NPC_WORK_TALKFLAG, -1); + CHAR_setWorkChar(meindex, NPC_WORK_WINFMNAME, ""); + } + } +} + +void NPC_FMWarpManWindowTalked( int meindex, int talkerindex, + int seqno, int select, char *data) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[1024], buff2[256], tmpbuf[256]; + int fl, x, y, fmpks_pos, fd; + + if( !CHAR_CHECKINDEX( talkerindex) )return; + fd = getfdFromCharaIndex(talkerindex); + if (fd == -1) return; + + if( NPC_Util_CharDistance( talkerindex, meindex ) > 2) { + return; + } + if(select==WINDOW_BUTTONTYPE_OK){ + return; + } + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("GetArgStrErr"); + return ; + } + // shan add + fmpks_pos = CHAR_getWorkInt(meindex, NPC_WORK_ID) * MAX_SCHEDULE; + + if (CHAR_getWorkInt(talkerindex, CHAR_WORKFMINDEXI) == fmpks[fmpks_pos].host_index){ + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "WARP1", buf, sizeof( buf)) == NULL ){ + print("FM WARPMAN Can't Read WARP1!\n"); + return; + } + }else if (CHAR_getWorkInt(talkerindex, CHAR_WORKFMINDEXI) == fmpks[fmpks_pos].guest_index){ + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "WARP2", buf, sizeof( buf)) == NULL ){ + print("FM WARPMAN Can't Read WARP2!\n"); + return; + } + }else{ + CHAR_talkToCli( talkerindex, meindex, "你并非对战双方所属任一家族成员!", CHAR_COLORYELLOW); + return; + } + getStringFromIndexWithDelim(buf,",",1,buff2,sizeof(buff2)); + fl=atoi(buff2); + getStringFromIndexWithDelim(buf,",",2,buff2,sizeof(buff2)); + x=atoi(buff2); + getStringFromIndexWithDelim(buf,",",3,buff2,sizeof(buff2)); + y=atoi(buff2); + + + switch (seqno){ + case CHAR_WINDOWTYPE_WINDOWWARPMAN_MAIN: + if(select==WINDOW_BUTTONTYPE_YES){ + if( CHAR_getWorkInt( talkerindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE) return; + if(CHAR_getWorkInt(talkerindex, CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE){ + CHAR_talkToCli( talkerindex, meindex, "请解散团队!", CHAR_COLORYELLOW); + return; + } + + if(CHAR_getWorkInt( talkerindex , CHAR_WORKSHOPRELEVANTTRD) <= 0){ + if( CHAR_getWorkInt( talkerindex, CHAR_WORKWARPCHECK ) == TRUE ) { + if (CHAR_getWorkInt(meindex, NPC_WORK_MODEFLAG) == NPC_STATEFREE){ + if (CHAR_getWorkInt(talkerindex, CHAR_WORKFMINDEXI) == fmpks[fmpks_pos].host_index){ + int tmpnum1 = CHAR_getWorkInt(meindex, NPC_WORK_FMNUMI) + 1; + CHAR_setWorkInt(meindex, NPC_WORK_FMNUMI, tmpnum1); + }else if (CHAR_getWorkInt(talkerindex, CHAR_WORKFMINDEXI) == fmpks[fmpks_pos].guest_index){ + int tmpnum2 = CHAR_getWorkInt(meindex, NPC_WORK_FMNUMII) + 1; + CHAR_setWorkInt(meindex, NPC_WORK_FMNUMII, tmpnum2); + }else{ + CHAR_talkToCli( talkerindex, meindex, "你并非对战双方所属任一家族成员!", CHAR_COLORYELLOW); + } + CHAR_setWorkInt(talkerindex, CHAR_WORKFMPKFLAG, 1); + CHAR_setWorkInt(talkerindex, CHAR_WORKFMMANINDEX, meindex); + CHAR_setWorkInt( talkerindex, CHAR_WORKWARPCHECK, FALSE ); + CHAR_warpToSpecificPoint(talkerindex, fl, x,y); +/* { + FILE *fp; + struct tm tm1; + char szFileName[128]; + + memcpy(&tm1, localtime((time_t *)&NowTime.tv_sec), sizeof(tm1)); + memset(szFileName,0,sizeof(szFileName)); + sprintf(szFileName,"FMPkWarp.%d%d%d.log",tm1.tm_mon,tm1.tm_hour,tm1.tm_min); + fp = fopen(szFileName,"a+"); + if(fp != NULL){ + fprintf(fp,"FMName:%s\tName:%s\tWarpHost:%d\tWarpGuest:%d\tFloor:%d,%d,%d\tMaxPlayer:%d\n", + CHAR_getChar(talkerindex,CHAR_FMNAME),CHAR_getChar(talkerindex,CHAR_NAME), + CHAR_getWorkInt(meindex,NPC_WORK_FMNUMI), + CHAR_getWorkInt(meindex,NPC_WORK_FMNUMII), + fl,x,y, + fmpks[fmpks_pos].max_player); + fclose(fp); + } + else printf("%s(errno:%x)\n",sys_errlist[errno],errno); + } +*/ + } + else return; + { + struct tm tm1; + int clock = 0; + int fmpks_pos = CHAR_getWorkInt(meindex, NPC_WORK_ID) * MAX_SCHEDULE; + memcpy(&tm1, localtime((time_t *)&NowTime.tv_sec), sizeof(tm1)); + clock = ((fmpks[fmpks_pos].dueltime % 100) + fmpks[fmpks_pos].prepare_time) - tm1.tm_min; + if (clock >= 60) clock = clock - 60; + sprintf(tmpbuf, "\n请等候双方准备完毕後再开战!" + "\n战斗时请不要随意登出或离开。" + "\n赢得胜利的家族也请先稍後一下," + "\n等待裁判的宣布後再离场!" + "\n谢谢您的合作!" + "\n距离对战时间还剩下:%4d分钟", + clock); + lssproto_WN_send(fd, + WINDOW_MESSAGETYPE_MESSAGE, WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString(tmpbuf, buff2, sizeof(buff2))); + } + } + } + else{ + if(CHAR_getInt(talkerindex,CHAR_GOLD) < CHAR_getWorkInt(talkerindex,CHAR_WORKSHOPRELEVANTTRD)){ + NPC_ERR_FMDiSP( meindex, talkerindex, 2); + return ; + } + CHAR_DelGold( talkerindex, CHAR_getWorkInt(talkerindex,CHAR_WORKSHOPRELEVANTTRD )); + CHAR_setWorkInt( talkerindex, CHAR_WORKWARPCHECK, FALSE ); + CHAR_warpToSpecificPoint(talkerindex, fl, x,y); + } + } + break; + } +} + +void NPC_ERR_FMDiSP(int meindex,int talker,int errNO) +{ + + char token[1024]; + int i=0; + int otherindex; + int fd = getfdFromCharaIndex( talker); + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("GetArgStrErr"); + return ; + } + + if(errNO==1){ + /*--由□ 奴□匹 仄井仃凶--*/ + if(NPC_Util_GetStrFromStrWithDelim( npcarg, "PartyMsg",token, sizeof( token))==NULL) { + /*--涩烂今木化卅仃木壬}票及丢永本□斥毛银丹--*/ + sprintf(token, "\n\n无法加入团队,请先解散团队!"); + } + + if(CHAR_getWorkInt(talker,CHAR_WORKPARTYMODE)==CHAR_PARTY_CLIENT){ + + }else{ + + /*--伉□母□互 仄井仃凶桦宁及心--*/ + /*--由□ 奴□蝈够卞丢永本□斥毛请允--*/ + for( i=0 ; i < CHAR_PARTYMAX ;i++) + { + otherindex=CHAR_getWorkInt(talker,CHAR_WORKPARTYINDEX1+i); + + if(otherindex != -1){ + fd = getfdFromCharaIndex( otherindex); + + /*-仇仇匹霜耨允月--*/ + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + CHAR_WINDOWTYPE_WINDOWWARPMAN_ERR, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + } + } + return ; + } + + }else if (errNO==2){ + /*--嗯互凶曰卅中匹允[--*/ + if(NPC_Util_GetStrFromStrWithDelim( npcarg, "MoneyMsg", token, sizeof( token))==NULL){ + /*--云嗯互箫曰卅中及卞}涩烂今木化卅井匀凶日}票及丢永本□斥毛 歹曰卞请允--*/ + sprintf(token,"\n\n金钱似乎不足唷,请存好钱後再过来。"); + } + } + + /*-仇仇匹霜耨允月--*/ + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + CHAR_WINDOWTYPE_WINDOWWARPMAN_ERR, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); +} + +static void NPC_FMWarpMan_selectWindow( int meindex, int toindex, int num,int select) +{ + struct tm tm1; + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + char token[1024]; + char buf[256]; + char buf2[1024]; + char buf3[256]; + int fl = 0, num1 = 0, num2 = 0; + int fmpks_pos = CHAR_getWorkInt(meindex, NPC_WORK_ID) * MAX_SCHEDULE; + int floor = CHAR_getWorkInt(meindex, NPC_WORK_WARPFLOOR); + int fd = getfdFromCharaIndex( toindex); + if( fd == -1 ) { + fprint( "getfd err\n"); + return; + } + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("GetArgStrErr"); + return ; + } + /*--涩烂白央奶伙及 卞白夫失谛醒互隙烂今木化中月井今木化中木壬白夫失谛醒及喃曰请仄*/ + if(strstr(npcarg,"%4d")!=NULL){ + NPC_Util_GetStrFromStrWithDelim( npcarg, "WARP1", buf, sizeof( buf)); + getStringFromIndexWithDelim(buf,",",1,buf3,sizeof(buf3)); + fl = NPC_FMFloorUse(atoi(buf3)); + } + CHAR_setWorkInt(toindex, CHAR_WORKWARPCHECK, TRUE); + CHAR_setWorkInt(toindex, NPC_WORK_WARPFLOOR, fl); + memcpy(&tm1, localtime((time_t *)&NowTime.tv_sec), sizeof(tm1)); + + if (CHAR_getWorkInt(meindex, NPC_WORK_MODEFLAG) == NPC_STATEFREE) + { + if (((CHAR_getWorkInt(toindex, CHAR_WORKFMINDEXI) == fmpks[fmpks_pos].host_index) + && (strcmp(CHAR_getChar(toindex, CHAR_FMNAME), fmpks[fmpks_pos].host_name) == 0)) + || ((CHAR_getWorkInt(toindex, CHAR_WORKFMINDEXI) == fmpks[fmpks_pos].guest_index) + && (strcmp(CHAR_getChar(toindex, CHAR_FMNAME), fmpks[fmpks_pos].guest_name) == 0))) + { + if ((fmpks[fmpks_pos].host_index != -1) + && (CHAR_getWorkInt(toindex, CHAR_WORKFMINDEXI) == fmpks[fmpks_pos].host_index)) + { + // WON ADD 修正家族pk场的约战问题 + + if(fmpks[fmpks_pos].flag == -1) return; + + if (fmpks[fmpks_pos].flag != FMPKS_FLAG_SCHEDULED) + + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, + makeEscapeString("\n这场战斗对方好像还没同意呢!\n下次请记得先邀约对方後再来登记吧~", token, sizeof(token))); + return; + } +#ifdef _FMVER21 + if (CHAR_getInt(toindex, CHAR_FMLEADERFLAG) == FMMEMBER_APPLY) +#else + if (CHAR_getInt(toindex, CHAR_FMLEADERFLAG) == 0) +#endif + { + char tmpbuf[256]; + sprintf(tmpbuf, "\n你还没有正式加入%s家族,所以不能进场!", fmpks[fmpks_pos].host_name); + lssproto_WN_send(fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, + makeEscapeString(tmpbuf, token, sizeof(token))); + return; + } + //andy_add 2003/06/17 + CHECK_FMPknumInFloor( meindex); + if (CHAR_getWorkInt(meindex, NPC_WORK_FMNUMI) > (fmpks[fmpks_pos].max_player - 1)){ + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, makeEscapeString("\n已经不能再进去罗~!\n家族进场人数已经到达设定上限了!", token, sizeof(token))); + return; + } + } + else if ((fmpks[fmpks_pos].guest_index != -1) + && (CHAR_getWorkInt(toindex, CHAR_WORKFMINDEXI) == fmpks[fmpks_pos].guest_index)) + { + // WON ADD 修正家族pk场的约战问题 + + if(fmpks[fmpks_pos].flag == -1) return; + + if (fmpks[fmpks_pos].flag != FMPKS_FLAG_SCHEDULED) + + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, + makeEscapeString("\n这场战斗你好像还没同意呢!\n下次请记得提早来跟我确认~", token, sizeof(token))); + return; + } +#ifdef _FMVER21 + if (CHAR_getInt(toindex, CHAR_FMLEADERFLAG) == FMMEMBER_APPLY) +#else + if (CHAR_getInt(toindex, CHAR_FMLEADERFLAG) == 0) +#endif + { + char tmpbuf[256]; + sprintf(tmpbuf, "\n你还没有正式加入%s家族,所以不能进场!", fmpks[fmpks_pos].guest_name); + lssproto_WN_send(fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, + makeEscapeString(tmpbuf, token, sizeof(token))); + return; + } + //andy_add 2003/06/17 + CHECK_FMPknumInFloor( meindex); + if( CHAR_getWorkInt( meindex, NPC_WORK_FMNUMII) > (fmpks[fmpks_pos].max_player - 1)){ + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, + makeEscapeString("已经不能再进去罗~!\n家族进场人数已经到达设定上限了!", token, sizeof(token))); + return; + } + } + if(NPC_Util_GetStrFromStrWithDelim( npcarg, "FreeMsg", buf2, sizeof( buf2)) == NULL) return; + CONNECT_set_pass(fd, TRUE); + CONNECT_set_first_warp(fd, TRUE); + sprintf(token, buf2, fmpks[fmpks_pos].guest_name, fmpks[fmpks_pos].host_name, + tm1.tm_hour, tm1.tm_min); + CHAR_setWorkInt( toindex , CHAR_WORKFMMANINDEX, meindex ); + CHAR_setWorkInt( toindex , CHAR_WORKSHOPRELEVANTTRD , -1 ); + } else if ((((CHAR_getWorkInt(toindex, CHAR_WORKFMINDEXI) == fmpks[fmpks_pos + 1].host_index) + && (strcmp(CHAR_getChar(toindex, CHAR_FMNAME), fmpks[fmpks_pos + 1].host_name) == 0)) + || ((CHAR_getWorkInt(toindex, CHAR_WORKFMINDEXI) == fmpks[fmpks_pos + 1].guest_index) + && (strcmp(CHAR_getChar(toindex, CHAR_FMNAME), fmpks[fmpks_pos + 1].guest_name) == 0))) + && (((fmpks[fmpks_pos + 1].flag == FMPKS_FLAG_SCHEDULED) + || (fmpks[fmpks_pos + 1].flag == FMPKS_FLAG_MANOR_PREPARE))) + ) + { + if(NPC_Util_GetStrFromStrWithDelim( npcarg, "NextMsg", buf2, sizeof( buf2)) == NULL) return; + sprintf(token, buf2, fl, tm1.tm_hour, tm1.tm_min); + CONNECT_set_pass(fd, FALSE); + CONNECT_set_first_warp(fd, FALSE); + } + else if ((strcmp(fmpks[fmpks_pos].host_name, "") == 0) || (strcmp(fmpks[fmpks_pos].guest_name, "") == 0)) + { + if(NPC_Util_GetStrFromStrWithDelim( npcarg, "TalkMsg", buf2, sizeof( buf2)) == NULL) return; + sprintf(token, buf2); + CONNECT_set_pass(fd, FALSE); + CONNECT_set_first_warp(fd, FALSE); + } + else + { + if(NPC_Util_GetStrFromStrWithDelim( npcarg, "AskMsg", buf2, sizeof( buf2)) == NULL) return; + CONNECT_set_pass(fd, FALSE); + CONNECT_set_first_warp(fd, FALSE); + sprintf(token, buf2, fmpks[fmpks_pos].guest_name, fmpks[fmpks_pos].host_name); + } + } + else if (CHAR_getWorkInt(meindex, NPC_WORK_MODEFLAG) == NPC_STATEBUSY) // 两家族战斗中 + { + if (((CHAR_getWorkInt(toindex, CHAR_WORKFMINDEXI) == fmpks[fmpks_pos].host_index) + && (strcmp(CHAR_getChar(toindex, CHAR_FMNAME), fmpks[fmpks_pos].host_name) == 0)) + || ((CHAR_getWorkInt(toindex, CHAR_WORKFMINDEXI) == fmpks[fmpks_pos].guest_index) + && (strcmp(CHAR_getChar(toindex, CHAR_FMNAME), fmpks[fmpks_pos].guest_name) == 0))) + { + if(NPC_Util_GetStrFromStrWithDelim( npcarg, "BusyMsg", buf2, sizeof( buf2)) == NULL){ + print("\nGet BusyMsg Message Error"); + return; + } + NPC_GetPKFMNum(floor, + fmpks[fmpks_pos].host_index, + fmpks[fmpks_pos].guest_index, + &num1, &num2); + sprintf(token, buf2, + fmpks[fmpks_pos].host_name, num1, + fmpks[fmpks_pos].guest_name, num2, + tm1.tm_hour, tm1.tm_min); + } else if ((((CHAR_getWorkInt(toindex, CHAR_WORKFMINDEXI) == fmpks[fmpks_pos + 1].host_index) + && (strcmp(CHAR_getChar(toindex, CHAR_FMNAME), fmpks[fmpks_pos + 1].host_name) == 0)) + || ((CHAR_getWorkInt(toindex, CHAR_WORKFMINDEXI) == fmpks[fmpks_pos + 1].guest_index) + && (strcmp(CHAR_getChar(toindex, CHAR_FMNAME), fmpks[fmpks_pos + 1].guest_name) == 0))) + && (((fmpks[fmpks_pos + 1].flag == FMPKS_FLAG_SCHEDULED) + || (fmpks[fmpks_pos + 1].flag == FMPKS_FLAG_MANOR_PREPARE))) + ) + { + if(NPC_Util_GetStrFromStrWithDelim( npcarg, "NextMsg", buf2, sizeof( buf2)) == NULL) return; + sprintf(token, buf2, fl, tm1.tm_hour, tm1.tm_min); + } else { + if(NPC_Util_GetStrFromStrWithDelim( npcarg, "AskMsg", buf2, sizeof( buf2)) == NULL) return; + sprintf(token, buf2, fmpks[fmpks_pos].guest_name, fmpks[fmpks_pos].host_name); + } + CONNECT_set_pass(fd, FALSE); + CONNECT_set_first_warp(fd, FALSE); + } + else if (CHAR_getWorkInt(meindex, NPC_WORK_MODEFLAG) == NPC_STATEWAIT) // 两家族战斗结束 + { + if (((CHAR_getWorkInt(toindex, CHAR_WORKFMINDEXI) == fmpks[fmpks_pos].host_index) + && (strcmp(CHAR_getChar(toindex, CHAR_FMNAME), fmpks[fmpks_pos].host_name) == 0)) + || ((CHAR_getWorkInt(toindex, CHAR_WORKFMINDEXI) == fmpks[fmpks_pos].guest_index) + && (strcmp(CHAR_getChar(toindex, CHAR_FMNAME), fmpks[fmpks_pos].guest_name) == 0))) + { + char tmpbuf[256]; + if(NPC_Util_GetStrFromStrWithDelim( npcarg, "EndMsg", buf2, sizeof( buf2)) == NULL){ + print("\nGet EndMsg Message Error"); + return; + } + NPC_GetPKFMNum(floor, + fmpks[fmpks_pos].host_index, + fmpks[fmpks_pos].guest_index, + &num1, &num2); + if (strcmp(CHAR_getWorkChar(meindex, NPC_WORK_WINFMNAME), "") == 0) + sprintf(tmpbuf, "双方平手!"); + else sprintf(tmpbuf, "%s获胜了!!", CHAR_getWorkChar(meindex, NPC_WORK_WINFMNAME)); + sprintf(token, buf2, fmpks[fmpks_pos].guest_name, + fmpks[fmpks_pos].host_name, tmpbuf); + } else if ((((CHAR_getWorkInt(toindex, CHAR_WORKFMINDEXI) == fmpks[fmpks_pos + 1].host_index) + && (strcmp(CHAR_getChar(toindex, CHAR_FMNAME), fmpks[fmpks_pos + 1].host_name) == 0)) + || ((CHAR_getWorkInt(toindex, CHAR_WORKFMINDEXI) == fmpks[fmpks_pos + 1].guest_index) + && (strcmp(CHAR_getChar(toindex, CHAR_FMNAME), fmpks[fmpks_pos + 1].guest_name) == 0))) + && (((fmpks[fmpks_pos + 1].flag == FMPKS_FLAG_SCHEDULED) + || (fmpks[fmpks_pos + 1].flag == FMPKS_FLAG_MANOR_PREPARE))) + ) + { + if(NPC_Util_GetStrFromStrWithDelim( npcarg, "NextMsg", buf2, sizeof( buf2)) == NULL) return; + sprintf(token, buf2, fl, tm1.tm_hour, tm1.tm_min); + } else { + if(NPC_Util_GetStrFromStrWithDelim( npcarg, "AskMsg", buf2, sizeof( buf2)) == NULL) return; + sprintf(token, buf2, fmpks[fmpks_pos].guest_name, fmpks[fmpks_pos].host_name); + } + CONNECT_set_pass(fd, FALSE); + CONNECT_set_first_warp(fd, FALSE); + } + /*-仇仇匹霜耨允月--*/ + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_YESNO, + CHAR_WINDOWTYPE_WINDOWWARPMAN_MAIN, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + +} + +int NPC_FMFloorUse(int floor) +{ + int i; + int players = 0; + int playernum = CHAR_getPlayerMaxNum(); + + /* 皿伊奶乩□民尼永弁 */ + for( i=0 ; i< playernum ; i++ ){ + if( CHAR_getCharUse(i) == FALSE )continue; + if(CHAR_getInt(i,CHAR_FLOOR)==floor){ + players++; + } + } + return players; +} + +void NPC_GetPKFMNum(int floor, int index1, int index2, int *num1, int *num2) +{ + int i = 0, charindex; + + *num1 = 0; *num2 = 0; + + /* 皿伊奶乩□民尼永弁 */ + for (i = 0 ; i < FAMILY_MAXMEMBER; i++ ){ + charindex = familyMemberIndex[ index1][i]; + if( CHAR_getCharUse( charindex) ){ + if (CHAR_getInt(charindex, CHAR_FLOOR) == floor) + *num1 = *num1 + 1; + }else + familyMemberIndex[ index1][i] = -1; + + charindex = familyMemberIndex[index2][i]; + if (CHAR_getCharUse(charindex)){ + if (CHAR_getInt(charindex, CHAR_FLOOR) == floor) + *num2 = *num2 + 1; + }else + familyMemberIndex[ index2][i] = -1; + } + +} + +void NPC_FMBATTLESET(int floor, int index1, int index2, int flag) +{ + int i = 0, charindex; + + for (i = 0; i < FAMILY_MAXMEMBER; i++) + { + charindex = familyMemberIndex[index1][i]; + if (CHAR_getCharUse(charindex)) + { + if (CHAR_getInt(charindex ,CHAR_FLOOR) == floor) + { + CHAR_setWorkInt( charindex, CHAR_WORKBATTLEFLAG, flag); + if(flag==1) + CHAR_setFlg(charindex, CHAR_ISDUEL, 1); + } + } + else + familyMemberIndex[index1][i] = -1; + charindex = familyMemberIndex[index2][i]; + if (CHAR_getCharUse(charindex)) + { + if (CHAR_getInt(charindex ,CHAR_FLOOR) == floor) + { + CHAR_setWorkInt( charindex, CHAR_WORKBATTLEFLAG, flag); + if(flag==1) + CHAR_setFlg(charindex, CHAR_ISDUEL, 1); + } + } + else + familyMemberIndex[index2][i] = -1; + } +} + +void NPC_CleanPK(int floor, int meindex) +{ + int i; + int playernum = CHAR_getPlayerMaxNum(); + int fl = CHAR_getInt(meindex, CHAR_FLOOR); + int x = CHAR_getInt(meindex, CHAR_X); + int y = CHAR_getInt(meindex, CHAR_Y); + + for( i=0 ; i< playernum ; i++ ) + { + if( CHAR_getCharUse(i) == FALSE )continue; + if(CHAR_getInt(i,CHAR_FLOOR)==floor) + CHAR_warpToSpecificPoint(i, fl, x, y); + } +} + +void NPC_talkToFloor(int floor, int index1, int index2, char *data) +{ + int i = 0, charindex; + + for (i = 0; i < FAMILY_MAXMEMBER; i++) + { + charindex = familyMemberIndex[index1][i]; + if (CHAR_getCharUse(charindex)) + { + print("charname:%s fmname:%s\n", + CHAR_getChar(charindex, CHAR_NAME), + CHAR_getChar(charindex, CHAR_FMNAME)); + if (CHAR_getInt(charindex, CHAR_FLOOR) == floor) + CHAR_talkToCli(charindex, -1, data, CHAR_COLORYELLOW); + } + else + familyMemberIndex[index1][i] = -1; + charindex = familyMemberIndex[index2][i]; + if (CHAR_getCharUse(charindex)) + { + print("charname:%s fmname:%s\n", + CHAR_getChar(i, CHAR_NAME), + CHAR_getChar(i, CHAR_FMNAME)); + if (CHAR_getInt(charindex, CHAR_FLOOR) == floor) + CHAR_talkToCli(charindex, -1, data, CHAR_COLORRED); + } + else + familyMemberIndex[index2][i] = -1; + } +} + +void NPC_WarpFamily(int floor, int index1, int index2, int fl, int x, int y) +{ + int i, charindex1, charindex2; + + for (i = 0; i < FAMILY_MAXMEMBER; i++){ + charindex1 = familyMemberIndex[index1][i]; + charindex2 = familyMemberIndex[index2][i]; + if (CHAR_getCharUse(charindex1)) + { + if (CHAR_getInt(charindex1, CHAR_FLOOR) == floor) + { + CHAR_setWorkInt(charindex1, CHAR_WORKBATTLEFLAG, FALSE); + CHAR_warpToSpecificPoint(charindex1, fl, x, y); + } + } + else + familyMemberIndex[index1][i] = -1; + if (CHAR_getCharUse(charindex2)) + { + if (CHAR_getInt(charindex2, CHAR_FLOOR) == floor) + { + CHAR_setWorkInt(charindex2, CHAR_WORKBATTLEFLAG, FALSE); + CHAR_warpToSpecificPoint(charindex2, fl, x, y); + } + } + else + familyMemberIndex[index1][i] = -1; + } +} + +void NPC_BattleOut(int index1, int index2) +{ + int i, charindex1, charindex2; + + for (i = 0; i < FAMILY_MAXMEMBER; i++) + { + charindex1 = familyMemberIndex[index1][i]; + charindex2 = familyMemberIndex[index2][i]; + if(CHAR_getCharUse(charindex1)){ + if(CHAR_getWorkInt( charindex1, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE) + BATTLE_WatchStop(charindex1); + } + else + familyMemberIndex[index1][i] = -1; + + if(CHAR_getCharUse(charindex2)){ + if(CHAR_getWorkInt( charindex2, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE) + BATTLE_WatchStop(charindex2); + } + else + familyMemberIndex[index2][i] = -1; + } +} + +void CheckLeavePK(int npcindex, int floor, int index1, int index2) +{ + int i = 0, charindex, fl = 0, x = 0, y = 0; + fl = CHAR_getInt(npcindex, CHAR_FLOOR); + x = CHAR_getInt(npcindex, CHAR_X); + y = CHAR_getInt(npcindex, CHAR_Y); + + for (i = 0; i < FAMILY_MAXMEMBER; i++) + { + charindex = familyMemberIndex[index1][i]; + if (CHAR_getCharUse(charindex)){ + if (CHAR_getInt(charindex, CHAR_FLOOR) == floor){ + if (CHAR_getWorkInt(charindex, CHAR_WORKFMPKFLAG) < 0){ + if (CHAR_getWorkInt(charindex, CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE) + CHAR_DischargeParty( charindex, 0); + CHAR_setWorkInt(charindex, CHAR_WORKWARPCHECK, FALSE); + CHAR_setWorkInt(charindex, CHAR_WORKBATTLEFLAG, FALSE); + CHAR_warpToSpecificPoint(charindex, fl, x, y); + CHAR_talkToCli(charindex, -1, "战败离场", CHAR_COLORRED); + } + } + }else + familyMemberIndex[index1][i] = -1; + charindex = familyMemberIndex[index2][i]; + if (CHAR_getCharUse(charindex)){ + if (CHAR_getInt(charindex, CHAR_FLOOR) == floor){ + if (CHAR_getWorkInt(charindex, CHAR_WORKFMPKFLAG) < 0){ + if (CHAR_getWorkInt(charindex, CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE) + CHAR_DischargeParty(charindex, 0); + CHAR_setWorkInt(charindex, CHAR_WORKWARPCHECK, FALSE); + CHAR_setWorkInt(charindex, CHAR_WORKBATTLEFLAG, FALSE); + CHAR_warpToSpecificPoint(charindex, fl, x, y); + CHAR_talkToCli(charindex, -1, "战败离场", CHAR_COLORRED); + } + } + }else + familyMemberIndex[index2][i] = -1; + } +} diff --git a/gmsv/npc/npc_freepetskillshop.c b/gmsv/npc/npc_freepetskillshop.c new file mode 100644 index 0000000..1e1cfd4 --- /dev/null +++ b/gmsv/npc/npc_freepetskillshop.c @@ -0,0 +1,561 @@ +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "lssproto_serv.h" +#include "pet_skill.h" +#include "readmap.h" +#include "battle.h" +#include "configfile.h" +#include "util.h" +#include "npc_eventaction.h" +#include "npc_freepetskillshop.h" + +#ifdef _CFREE_petskill + +enum { + CHAR_WORK_SKILLSELECT = CHAR_NPCWORKINT1, +}; + +enum { + SELECTSKILL_START=10, + SELECTSKILL_TEACH=23, + SELECTSKILL_END=30, +}; + +enum { + START_WINDOW=0, + SKILL_WINDOW, + MEEND_WINDOW, +}; + +static void NPC_FreePetSkillShop_selectWindow( int meindex, int toindex, int num,int select); +BOOL NPC_FreePetSkillMakeStr(int meindex,int toindex, int select); +//BOOL NPC_CHECKFREEPETSKILL( int toindex, int petindex, int skillID); +BOOL NPC_SkillShopItemCheck(int meindex,int talker,int itemNo, int cou); +BOOL NPC_SkillShopDelItems(int meindex,int talker, char *buf); +BOOL NPC_SkillShopPetCheck( int toindex, int petindex, int skillID ); +BOOL NPC_SkillShopWarp( int meindex, int talkindex); + +#define MAXNPCPOINT 10 + +BOOL NPC_FreePetSkillShopInit( int meindex ) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + char msg[256]; + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_FREESKILLSHOP ); + CHAR_setWorkInt( meindex, CHAR_WORK_SKILLSELECT, 0); + + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("GetArgStrErr NO arg !!"); + return FALSE; + } + + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "pet_skill", msg, sizeof( msg)) != NULL){ + char buf[256], filename[256]; + int k=1, skillID, skillarray; + while( getStringFromIndexWithDelim( msg, ",", k, buf, sizeof( buf) ) ){ + k++; + skillID=atoi(buf); + skillarray = PETSKILL_getPetskillArray( skillID); + if( PETSKILL_CHECKINDEX( skillarray) == FALSE ) continue; + if( PETSKILL_getInt( skillarray, PETSKILL_ILLEGAL) == 1){ + if( NPC_Util_CheckAssignArgFile( meindex, filename) != NULL ){ + print("\n宠物技能不规范:[%d-%s] ->文件:%s\n", + skillID, + PETSKILL_getChar( skillarray, PETSKILL_NAME), + filename ); + } + } + } + }else{ + return FALSE; + } + + return TRUE; +} +void NPC_FreePetSkillShopTalked( int meindex , int talkerindex , char *szMes ,int color ) +{ + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) { + return; + } + if(NPC_Util_isFaceToFace(talkerindex,meindex,2 )==FALSE){ + if( NPC_Util_CharDistance( talkerindex, meindex ) > 1) return; + } + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, 1 ); + + NPC_FreePetSkillShop_selectWindow( meindex, talkerindex, START_WINDOW,-1); +} + +static void NPC_FreePetSkillShop_selectWindow( int meindex, int toindex, int num,int select) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + char token[1024]; + int fd = getfdFromCharaIndex( toindex); + int buttontype = 0, windowtype = 0, windowno = 0; + char buf1[256]; + + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("GetArgStrErr"); + return ; + } + + switch(num) { + case START_WINDOW: + { + BOOL Evflg = TRUE; + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "start_msg", token, sizeof( token)) == NULL) { + CHAR_setWorkInt( toindex, CHAR_WORKSHOPRELEVANT, 0); + return; + } + if( CHAR_getWorkInt( toindex, CHAR_WORKSHOPRELEVANT) != 1 ) { + CHAR_setWorkInt( toindex, CHAR_WORKSHOPRELEVANT, 0); + return; + } + //玩家条件判断 + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "FREE", buf1, sizeof( buf1)) != NULL ) { + if( NPC_ActionPassCheck( meindex, toindex, buf1) == FALSE ) { + Evflg = FALSE; + } + } + if( Evflg == FALSE) { + CHAR_talkToCli( toindex, -1, "你想让宠物学特殊技能?可你的条件还不够喔!", CHAR_COLORYELLOW); + CHAR_setWorkInt( toindex, CHAR_WORKSHOPRELEVANT, 0); + return; + }else { + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + buttontype = WINDOW_BUTTONTYPE_NEXT; + windowno = SELECTSKILL_START; + CHAR_setWorkInt( toindex, CHAR_WORKSHOPRELEVANT, 2); + lssproto_WN_send( fd, windowtype, buttontype, windowno, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), token ); + } + } + break; + case SKILL_WINDOW: + if( NPC_FreePetSkillMakeStr( meindex, toindex, select) == FALSE ) { + print("\n npc_freepetskillshop.c 错误"); + } + break; + case MEEND_WINDOW: + break; + } +} + +void NPC_FreePetSkillShopWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data) +{ + int skill; + int pet; + int slot; + int cost; + int skillID=0; + int petskillindex; + char buf[64]; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char msg[512]; + int petindex; + char msgbuf[128]; + double rate= 1.0; + + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr))==NULL){ + print("GetArgStrErr"); + return; + } + + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) { + return; + } + if(NPC_Util_isFaceToFace(talkerindex,meindex,2 )==FALSE){ + if( NPC_Util_CharDistance( talkerindex, meindex ) > 1) return; + } + if( CHAR_getWorkInt( talkerindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE) + return ; + + + switch( seqno) { + case SELECTSKILL_START: + if( CHAR_getWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT) != 2 ) { + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, 0); + return; + } + NPC_FreePetSkillShop_selectWindow( meindex, talkerindex, SKILL_WINDOW, -1); + break; + case SELECTSKILL_TEACH: + if( CHAR_getWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT) != 3 ) { + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, 0); + return; + } + makeStringFromEscaped( data); + getStringFromIndexWithDelim(data,"|",1,buf,sizeof(buf)); + skill=atoi(buf); + getStringFromIndexWithDelim(data,"|",2,buf,sizeof(buf)); + pet=atoi(buf); + getStringFromIndexWithDelim(data,"|",3,buf,sizeof(buf)); + slot=atoi(buf); + getStringFromIndexWithDelim(data,"|",4,buf,sizeof(buf)); + cost=atoi(buf); + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "pet_skill", msg, sizeof( msg)) != NULL){ + getStringFromIndexWithDelim(msg,",",skill,buf,sizeof(buf)); + skillID=atoi(buf); + } + slot--; + if( slot < 0 ) return; + + petindex = CHAR_getCharPet( talkerindex, pet-1); + if( !CHAR_CHECKINDEX(petindex) ){ + CHAR_send_P_StatusString( talkerindex, CHAR_P_STRING_GOLD); + return ; + } + if( NPC_Util_GetStrFromStrWithDelim( argstr, "skill_rate", msg, sizeof( msg)) != NULL){ + rate = atof( msg); + } + petskillindex = PETSKILL_getPetskillArray( skillID ); + if( !PETSKILL_CHECKINDEX( petskillindex)){ + CHAR_send_P_StatusString( talkerindex, CHAR_P_STRING_GOLD); + return ; + } + + cost = PETSKILL_getInt( petskillindex, PETSKILL_COST ); + cost = cost * rate; + + //条件判断 + if(CHAR_getInt(talkerindex,CHAR_GOLD) < cost){ + CHAR_send_P_StatusString( talkerindex, CHAR_P_STRING_GOLD); + return; + } + + if( NPC_CHECKFREEPETSKILL( talkerindex, petindex, skillID ) == TRUE ){ + + if( Action_RunDoEventAction( meindex, talkerindex, argstr) == FALSE ){ + CHAR_talkToCli( talkerindex, -1, "所需物品不足!!", CHAR_COLORYELLOW); + CHAR_send_P_StatusString( talkerindex, CHAR_P_STRING_GOLD); + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, 0); + return; + } + + CHAR_setPetSkill( petindex, slot, skillID); + CHAR_setInt( talkerindex, CHAR_GOLD, ( CHAR_getInt( talkerindex, CHAR_GOLD) - cost) ); + snprintf( msgbuf, sizeof( msgbuf ), "W%d",pet-1); + CHAR_sendStatusString( talkerindex, msgbuf ); + CHAR_sendStatusString( talkerindex, "P"); + CHAR_send_P_StatusString( talkerindex, CHAR_P_STRING_GOLD); + //WARP + if( NPC_SkillShopWarp( meindex, talkerindex) == TRUE ) + return; + }else { + CHAR_send_P_StatusString( talkerindex, CHAR_P_STRING_GOLD); + CHAR_talkToCli( talkerindex, -1, "条件不足!!", CHAR_COLORYELLOW); + } + //ADD + NPC_FreePetSkillShop_selectWindow( meindex, talkerindex, SKILL_WINDOW, -1); + break; + case SELECTSKILL_END: + break; + } + + return; +} + +BOOL NPC_CHECKFREEPETSKILL( int toindex, int petindex, int skillID) +{ + int skillindex=-1; + char SCode[256]; + char Free[256]; + int i, petID; + skillindex = PETSKILL_getPetskillArray( skillID ); + memset( Free, 0, sizeof( Free)); + if( !PETSKILL_CHECKINDEX( skillindex) ) { + return FALSE; + } + + petID = CHAR_getInt( petindex, CHAR_PETID); + sprintf( SCode, "%s", PETSKILL_getChar( skillindex, PETSKILL_KINDCODE)); + sprintf( Free, "%s", PETSKILL_getChar( skillindex, PETSKILL_FREE)); + + //CHECK CODE + if( !strcmp( SCode, "\0")) { + return TRUE; + } + + for( i=0; i= cou ) + return TRUE; + } + return FALSE; + +} + +BOOL NPC_SkillShopDelItems(int meindex,int talker, char *buf) +{ + char buf1[256]; + char item[256], cout[256]; + int i=1; + BOOL Evflg=TRUE; + while( getStringFromIndexWithDelim( buf, ",", i,buf1, sizeof( buf1)) != FALSE ) { + i++; + if( strstr( buf1, "*") != NULL ) { + getStringFromIndexWithDelim( buf1, "*", 1, item, sizeof( item)); + getStringFromIndexWithDelim( buf1, "*", 2, cout, sizeof( cout)); + }else { + strcpy( item, buf1); + strcpy( cout, "1"); + } + if( NPC_SkillShopItemCheck( meindex, talker, atoi( item), atoi( cout)) == FALSE ) { + Evflg=FALSE; + break; + } + if( Evflg == FALSE ) + break; + } + if( Evflg == FALSE ) + return FALSE; + if( NPC_ActionDelItem( talker, buf) == TRUE ) { + return TRUE; + } + return FALSE; +} + +BOOL NPC_SkillShopPetCheck( int toindex, int petindex, int skillID ) +{ + char Free[256]; + int i; + char data[256], msg[256]; + int skillindex = PETSKILL_getPetskillArray( skillID ); + + memset( Free, 0, sizeof( Free)); + sprintf( Free, "%s", PETSKILL_getChar( skillindex, PETSKILL_FREE)); + + if( NPC_Util_GetStrFromStrWithDelim( Free, "FREE", data, sizeof( data)) != NULL ) { + BOOL EvFlg = TRUE; + i=1; + while( getStringFromIndexWithDelim( data, "|", i, msg, sizeof( msg)) != FALSE ) { + i++; + if( strstr( msg, "LV") != NULL ) { + char LvStr[256]; + int LV=0; + if( strstr( msg, ">" ) != NULL ) { + if( getStringFromIndexWithDelim( msg, ">", 2, LvStr, sizeof( LvStr)) != FALSE ) { + LV = atoi( LvStr); + if( CHAR_getInt( petindex, CHAR_LV) <= LV ) + EvFlg = FALSE; + } + }else if( strstr( msg, "<")) { + if( getStringFromIndexWithDelim( msg, "<", 2, LvStr, sizeof( LvStr)) != FALSE ) { + LV = atoi( LvStr); + if( CHAR_getInt( petindex, CHAR_LV) >= LV ) + EvFlg = FALSE; + } + } + }else if( strstr( msg, "SK") != NULL ) { + int j=0, PskId=-1, ID; + char strSK[256]; + int petskillindex; + + getStringFromIndexWithDelim( msg, "=", 2, strSK, sizeof( strSK) ); + ID = atoi( strSK); + for( j=0; j < CHAR_MAXPETSKILLHAVE; j++) { + PskId = CHAR_getPetSkill( petindex, j); + petskillindex = PETSKILL_getPetskillArray( PskId ); + if( !PETSKILL_CHECKINDEX( petskillindex)) + continue; + if( ID == PskId ) { + if( strstr( msg, "!=") !=NULL ) + EvFlg = FALSE; + break; + } + } + if( j == CHAR_MAXPETSKILLHAVE ) { + EvFlg = FALSE; + break; + } + } + if( EvFlg == FALSE ) + break; + } + if( EvFlg == FALSE ) { + return FALSE; + }else { + return TRUE; + } + } + return TRUE; +} + +BOOL NPC_SkillShopWarp( int meindex, int talkindex) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + char data[1024], buf1[256], buf2[256]; + int i=1, j=1; + BOOL EvFlg=FALSE; + struct { + int FLOOR; + int X; + int Y; + }Points[MAXNPCPOINT]; + + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("GetArgStrErr"); + return FALSE; + } + + for( i=0;i= MAXNPCPOINT ) + break; + } + where = RAND( 0, i-1); + CHAR_warpToSpecificPoint( meindex, Points[where].FLOOR, Points[where].X, Points[where].Y); + EvFlg = TRUE; + } + + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "WARP", data, sizeof( data)) != NULL ) { + int P_Floor,P_X,P_Y; + getStringFromIndexWithDelim( data, ",", 1, buf2, sizeof( buf2)); + P_Floor = atoi( buf2); + getStringFromIndexWithDelim( data, ",", 2, buf2, sizeof( buf2)); + P_X = atoi( buf2); + getStringFromIndexWithDelim( data, ",", 3, buf2, sizeof( buf2)); + P_Y = atoi( buf2); + CHAR_warpToSpecificPoint( talkindex, P_Floor, P_X, P_Y); + EvFlg = TRUE; + } + + return EvFlg; +} + +#endif + + + + + diff --git a/gmsv/npc/npc_gamblebank.c b/gmsv/npc/npc_gamblebank.c new file mode 100644 index 0000000..9cfb70f --- /dev/null +++ b/gmsv/npc/npc_gamblebank.c @@ -0,0 +1,519 @@ +#include "version.h" +#include +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "lssproto_serv.h" +#include "enemy.h" +#include "log.h" +#include "battle.h" +#include "readmap.h" +#include "handletime.h" +#include "configfile.h" +#ifdef _GAMBLE_BANK +#include "npc_gamblebank.h" + +static void NPC_GambleBank_selectWindow( int meindex, int toindex, int num, int flg); +int NPC_GambleBank_DoGold( int meindex, int toindex, int Gold, int flg); +BOOL NPC_GambleBank_AddItem( int meindex, int toindex, int itemId, int count); + +enum { + GAMBLE_START = 0, + GAMBLE_SELET, + GAMBLE_MAN_BANK, + GAMBLE_MAN_CHANG1, + GAMBLE_MAN_CHANG2, + GAMBLE_END, +}; + +enum { + NPC_WORK_INDEX = CHAR_NPCWORKINT1, + NPC_WORK_WORKTYPE = CHAR_NPCWORKINT2, // 0,-1 = NULL 2 = 银行 3 = 换币 4 = BOTH + NPC_WORK_CURRENTTIME = CHAR_NPCWORKINT3, + NPC_WORK_PAGE = CHAR_NPCWORKINT4, +/* + NPC_WORK_ROUTETOY = CHAR_NPCWORKINT2, + NPC_WORK_ROUTEPOINT = CHAR_NPCWORKINT3, + NPC_WORK_ROUNDTRIP = CHAR_NPCWORKINT4, + NPC_WORK_MODE = CHAR_NPCWORKINT5, + NPC_WORK_CURRENTROUTE = CHAR_NPCWORKINT6, + NPC_WORK_ROUTEMAX = CHAR_NPCWORKINT7, + NPC_WORK_WAITTIME = CHAR_NPCWORKINT8, + NPC_WORK_CURRENTTIME = CHAR_NPCWORKINT9, + NPC_WORK_SEFLG = CHAR_NPCWORKINT10, +*/ +}; +#define _GAMBLEBANK_U_NOLOCK //同时对多人 + +#define GAMBLEBANK_LOOPTIME 80 +#define GAMBLEBANK_STANDBY 5000 +#define GAMBLEBANK_DEF 3 //手续费 / 100 +#define GAMBLEBANK_GETMAX 1000000 +#define GAMBLEBANK_GETMIN 100 +#define LIST_PAGE 7 +BOOL NPC_GambleBankInit( int meindex ) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf1[256]; + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_GAMBLEBANK ); + +#ifdef _GAMBLEBANK_U_NOLOCK + CHAR_setInt( meindex, CHAR_LOOPINTERVAL, GAMBLEBANK_STANDBY); + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTTIME, NowTime.tv_sec); +#endif + CHAR_setWorkInt( meindex , NPC_WORK_INDEX, -1); + + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg)) == NULL) { + print("GambleBank:GetArgStrErr"); + return FALSE; + } + + if(NPC_Util_GetStrFromStrWithDelim( npcarg,"GAMBLE_TYPE", buf1,sizeof( buf1) ) == NULL) { + print("GAMBLE_TYPE err !"); + return FALSE; + } + CHAR_setWorkInt( meindex, NPC_WORK_WORKTYPE, atoi( buf1) ); + + return TRUE; +} +//CHAR_send_P_StatusString( charaindex, CHAR_P_STRING_GOLD); +void NPC_GambleBankLoop( int meindex) +{ +#ifdef _GAMBLEBANK_U_NOLOCK + + int fulltime = GAMBLEBANK_LOOPTIME; + if( ( CHAR_getWorkInt( meindex, NPC_WORK_CURRENTTIME) + fulltime) >= NowTime.tv_sec ) + return; + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTTIME, NowTime.tv_sec); + CHAR_setWorkInt( meindex , NPC_WORK_INDEX, -1); +#endif + return; +} + +void NPC_GambleBankTalked( int meindex , int talkerindex , char *szMes ,int color ) +{ + char buf1[256]; + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + int work_type; + + if( !CHAR_CHECKINDEX( talkerindex) || !CHAR_CHECKINDEX( meindex) ) + return; + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) { + return; + } + if(NPC_Util_isFaceToFace( meindex ,talkerindex , 2) == FALSE) { + if(NPC_Util_isFaceToChara( talkerindex, meindex, 1) == FALSE) { + return; + } + } + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg)) == NULL) { + print("GambleBank:GetArgStrErr"); + return; + } +#ifdef _FIX_GAMBLENUM + if( CHAR_getInt( talkerindex, CHAR_GAMBLENUM) < 0 ) { + CHAR_setInt( talkerindex, CHAR_GAMBLENUM, 0); + } +#endif + if(NPC_Util_GetStrFromStrWithDelim( npcarg,"GAMBLE_TYPE", buf1,sizeof( buf1) ) == NULL) { + print("GAMBLE_TYPE err !"); + return; + } + + CHAR_setWorkInt( meindex, NPC_WORK_WORKTYPE, atoi( buf1) ); + work_type = CHAR_getWorkInt( meindex, NPC_WORK_WORKTYPE); + + + if( work_type < 1 || work_type > 4 ) { // 0 or -1 + strcpy( buf1,"暂时停止服务。"); + CHAR_talkToCli( talkerindex, meindex, buf1, CHAR_COLORYELLOW); + CHAR_setWorkInt( meindex , NPC_WORK_INDEX, -1); + return; + } +#ifdef _GAMBLEBANK_U_NOLOCK + +#else + if( CHAR_getWorkInt( meindex , NPC_WORK_INDEX) >= 0 ) { + strcpy( buf1,"我正忙着!"); + CHAR_talkToCli( talkerindex, meindex, buf1, CHAR_COLORYELLOW); + return; + }else { + CHAR_setWorkInt( meindex , NPC_WORK_INDEX, talkerindex); + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTTIME, NowTime.tv_sec); + } +#endif + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, 1); + NPC_GambleBank_selectWindow( meindex, talkerindex, GAMBLE_START, 1); +} + +static void NPC_GambleBank_selectWindow( int meindex, int toindex, int num, int flg) +{ + char token[256]; + char buf1[256],buf2[256]; + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + int buttontype = 0, windowtype = 0, windowno = 0; + int fd = getfdFromCharaIndex( toindex); + int i; + int page=-1; + //flg <= 0 错误 1 正常 flg = 2 钱不够 3 = 个人存款将满 + // 4 = 个人银行将满 5 = 提领上限 6 = 提领下限 + char Gamble_End[][56] = { + "error_msg", "end_msg", "money_msg", "full_msg1", + "full_msg2","getmax_msg","getmin_msg", + }; + + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("GambleBank:GetArgStrErr"); + return; + } + + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + switch( num) { + case GAMBLE_START: + if( NPC_Util_GetStrFromStrWithDelim( npcarg,"gamble_start", token, sizeof( token) ) == NULL) { + print("gamble_start msg err !"); + return; + } + buttontype = WINDOW_BUTTONTYPE_YESNO; + windowno = NPC_GambleBank_START; + break; + + case GAMBLE_SELET: + i = 1; + strcpy( token, "\0"); + sprintf( buf2,"%s%d", "gamble_msg0", i); + while( NPC_Util_GetStrFromStrWithDelim( npcarg, buf2, buf1, sizeof( buf1) ) != NULL ) { + if( strstr( buf1, "NULL" ) == NULL ) { + strcat( token , buf1); + strcat( token, "\n"); + }else { + strcat( token, "\n"); + } + i++; + sprintf( buf2,"%s%d", "gamble_msg0", i); + } + windowtype=WINDOW_MESSAGETYPE_SELECT; + windowno = NPC_GambleBank_SELECT; + break; + + case GAMBLE_MAN_BANK: //银行 + sprintf( token,"%d", CHAR_getInt( toindex, CHAR_PERSONAGOLD ) ); + windowtype = WINDOW_MESSAGETYPE_BANK; + windowno = NPC_GambleBank_BANK; + break; + + case GAMBLE_MAN_CHANG1: //换物 + { + char snum[256]; + page = CHAR_getWorkInt( toindex, CHAR_WORKSHOPRELEVANT); + strcpy( token, "换物"); + sprintf( token, "你有%d积分,想换哪一个奖品呢?\n", CHAR_getInt( toindex, CHAR_GAMBLENUM)); + for( i=(page*LIST_PAGE);i<(page*LIST_PAGE+LIST_PAGE);i++) { + if( i>=arraysizeof( GB_ITEMS)) { + break; + } + if( !strcmp( GB_ITEMS[i].name,"NEXT") ) { + strcat( token, " 下一页"); + break; + } + if( !strcmp( GB_ITEMS[i].name,"END") ) { + strcat( token, " 取消\n"); + break; + } + + sprintf( snum,"%s%d\t%s", + "积分:", GB_ITEMS[i].Gnum, + GB_ITEMS[i].name); + snum[36] = 0; + strcat( token, snum); + strcat( token,"\n"); + strcpy( snum, "\0"); + } + + windowtype = WINDOW_MESSAGETYPE_SELECT; + buttontype = WINDOW_BUTTONTYPE_NONE; + windowno = NPC_GambleBank_CHANG1; + } + break; + case GAMBLE_END: + CHAR_send_P_StatusString( toindex, CHAR_P_STRING_GOLD); + if( flg < 0 || flg > 6) { + flg = 0; + } + if( NPC_Util_GetStrFromStrWithDelim( npcarg, Gamble_End[flg], token, sizeof( token) ) == NULL) { + print("Gamble_End[%d] noe found !", flg); + return; + } + CHAR_setWorkInt( toindex, CHAR_WORKSHOPRELEVANT, -1); +#ifdef _GAMBLEBANK_U_NOLOCK +#else + CHAR_setWorkInt( meindex , NPC_WORK_INDEX, -1); +#endif + windowno = NPC_GambleBank_END; + buttontype = WINDOW_BUTTONTYPE_OK; + break; + } + + lssproto_WN_send( fd, windowtype, + buttontype, + windowno, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); +} + +void NPC_GambleBankWindowTalked ( int meindex, int talkerindex, int seqno, int select, char *data) +{ + int stone_gold = 0; + int flg=1; + int work_type=-1; + int type; + type = atoi( data); + + if( !CHAR_CHECKINDEX( talkerindex) || !CHAR_CHECKINDEX( meindex) ) + return; + + work_type = CHAR_getWorkInt( meindex, NPC_WORK_WORKTYPE ); + if( work_type < 1 || work_type > 4 ) { + return; + } + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) { + return; + } +#ifdef _GAMBLEBANK_U_NOLOCK +#else + { + char buf1[256]; + if( CHAR_getWorkInt( meindex , NPC_WORK_INDEX) != talkerindex ) { + strcpy( buf1,"我正忙着呢!"); + CHAR_talkToCli( talkerindex, meindex, buf1, CHAR_COLORYELLOW); + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, -1); + return; + } + } +#endif + + if(NPC_Util_isFaceToFace( meindex ,talkerindex , 2) == FALSE) { + if(NPC_Util_isFaceToChara( talkerindex, meindex, 1) == FALSE) return; + } + if( NPC_Util_CharDistance( talkerindex, meindex ) > 2) { + return; + } + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTTIME, NowTime.tv_sec); + switch( seqno) { + case NPC_GambleBank_START: + if( select == WINDOW_BUTTONTYPE_YES ) { + NPC_GambleBank_selectWindow( meindex, talkerindex, GAMBLE_SELET, flg); + }else { + NPC_GambleBank_selectWindow( meindex, talkerindex, GAMBLE_END, flg); + } + break; + case NPC_GambleBank_SELECT: + if( type == 1 ) { //银行 + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, 2); + NPC_GambleBank_selectWindow( meindex, talkerindex, GAMBLE_MAN_BANK, flg); + }else if( type == 2 ) { //换物 + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, 0); + NPC_GambleBank_selectWindow( meindex, talkerindex, GAMBLE_MAN_CHANG1, flg); + }else { + NPC_GambleBank_selectWindow( meindex, talkerindex, GAMBLE_END, flg); + } + break; + case NPC_GambleBank_BANK: //2 + if( CHAR_getWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT) != 2 ) //错误程序 + return; + if( work_type != 2 && work_type != 4 ) { + CHAR_setWorkInt( meindex , NPC_WORK_INDEX, -1); + return; + } + if( select == 4 && atoi( data) != 0 ) { + stone_gold = atoi( data); + flg = NPC_GambleBank_DoGold( meindex, talkerindex, stone_gold, select); + //flg = 1 正常 flg = 2 钱不够 flg <= 0 错误 + if( flg == 1 ) { + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, -1); + CHAR_setWorkInt( meindex , NPC_WORK_INDEX, -1); + return; + } + } + NPC_GambleBank_selectWindow( meindex, talkerindex, GAMBLE_END, flg); + break; + case NPC_GambleBank_CHANG1: //换物 + { + int page,ItemID; + int count; + type -=1; + page = CHAR_getWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT)*LIST_PAGE; + if( work_type != 3 && work_type != 4 ) { + CHAR_setWorkInt( meindex , NPC_WORK_INDEX, -1); + return; + } + + if( page < 0 ) //错误对话程序 + return; + if( (page+type) < 0 || (page+type) >= arraysizeof( GB_ITEMS) ) { + NPC_GambleBank_selectWindow( meindex, talkerindex, GAMBLE_END, flg); + }else if( !strcmp( GB_ITEMS[page+type].name,"NEXT") ){ + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, + CHAR_getWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT) + 1); + NPC_GambleBank_selectWindow( meindex, talkerindex, GAMBLE_MAN_CHANG1, flg); + }else if( !strcmp( GB_ITEMS[page+type].name,"END") ){ + CHAR_setWorkInt( meindex , NPC_WORK_INDEX, -1); + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, -1); + return; + }else { + if( type < 7 && type >= 0 ) { + if( GB_ITEMS[page+type].name == NULL || + !strcmp( GB_ITEMS[page+type].name, "\0") ) { + }else { + ItemID = GB_ITEMS[page+type].ItemId; //ID + count = GB_ITEMS[page+type].Gnum; //积分 + NPC_GambleBank_AddItem( meindex, talkerindex, ItemID, count); + } + CHAR_setWorkInt( meindex , NPC_WORK_INDEX, -1); + } + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, -1); + } + } + break; + case NPC_GambleBank_END: + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, -1); + break; + } +} + + +int NPC_GambleBank_DoGold( int meindex, int toindex, int Gold, int flg) +{ + //flg = 1 正常 flg = 2 钱不够 flg <= 0 错误 3 = 个人存款将满 4 = 个人银行将满 5 = 单次最高金额 + char buf1[256]; + int player_gold = CHAR_getInt( toindex, CHAR_GOLD ); + int stone_def = 0; //手续费 +// int def = GAMBLEBANK_DEF; + //不作无意义的存取款 + if( flg != 4 ) + return 0; + if( Gold == 0 ) { + return 0; + } + + if( Gold < 0 ) { //取款 + Gold *=-1; + //stone_def = (Gold * def) /100; + stone_def = 300; + if( Gold > GAMBLEBANK_GETMAX ) { + return 5; + }else if( Gold < GAMBLEBANK_GETMIN ) { + return 6; + } + if( ( player_gold + Gold ) > CHAR_getMaxHaveGold(toindex) ) { + return 3; //取款後将超过个人金额 + }else if( (Gold + stone_def)> CHAR_getInt( toindex, CHAR_PERSONAGOLD ) ) { //银行存款不够 + return 2; + } + + CHAR_setInt( toindex, CHAR_PERSONAGOLD, (CHAR_getInt( toindex, CHAR_PERSONAGOLD )-(Gold+stone_def))); + + CHAR_AddGold( toindex, Gold); + + sprintf( buf1,"取款:%d ,手续费:%d,银行剩馀:%d 。", Gold, stone_def, CHAR_getInt( toindex, CHAR_PERSONAGOLD )); + CHAR_talkToCli( toindex, meindex, buf1, CHAR_COLORYELLOW); + LogBankStone( CHAR_getChar( toindex, CHAR_NAME ), CHAR_getChar( toindex, CHAR_CDKEY ), + toindex, Gold, + "GB_Bank_Get(银行取款)", + CHAR_getInt( toindex, CHAR_FLOOR), + CHAR_getInt( toindex, CHAR_X ), CHAR_getInt( toindex, CHAR_Y ) , + CHAR_getInt( toindex, CHAR_GOLD ), + CHAR_getInt( toindex, CHAR_PERSONAGOLD ) + ); + return 1; + }else if( Gold > 0 ) { //存款 + if( Gold > player_gold ) { + return 2; + }else if( (Gold + CHAR_getInt( toindex, CHAR_PERSONAGOLD ) ) > CHAR_MAXPERSONAGOLD ) { + return 4; + } + + CHAR_DelGold( toindex, Gold ); + + CHAR_setInt( toindex, CHAR_PERSONAGOLD, (CHAR_getInt( toindex, CHAR_PERSONAGOLD ) + Gold ) ); + sprintf( buf1,"存款:%d ,银行剩馀:%d 。", Gold, CHAR_getInt( toindex, CHAR_PERSONAGOLD )); + CHAR_talkToCli( toindex, meindex, buf1, CHAR_COLORYELLOW); + LogBankStone( CHAR_getChar( toindex, CHAR_NAME ), CHAR_getChar( toindex, CHAR_CDKEY ), + toindex, Gold, + "GB_Bank_save(银行存款)", + CHAR_getInt( toindex, CHAR_FLOOR), + CHAR_getInt( toindex, CHAR_X ), CHAR_getInt( toindex, CHAR_Y ), + CHAR_getInt( toindex, CHAR_GOLD ), + CHAR_getInt( toindex, CHAR_PERSONAGOLD ) + ); + return 1; + } + return 0; +} + +BOOL NPC_GambleBank_AddItem( int meindex, int toindex, int itemId, int count) +{ + int i=-1,itemindex=-1; + int ret=-1; + char token[256]; + strcpy( token,"\0"); + if( count < 0 || itemId < 0 ) + return FALSE; + + if( CHAR_getInt( toindex, CHAR_GAMBLENUM) < count ) { + sprintf( token,"游乐场积分不足!"); + CHAR_talkToCli( toindex, -1,token,CHAR_COLORWHITE); + return FALSE; + } + for( i = 0 ; i < CHAR_MAXITEMHAVE ; i++ ){ + itemindex=CHAR_getItemIndex( toindex , i ); + if( itemindex == -1 ) { + break; + } + } + if( i == CHAR_MAXITEMHAVE ) { + snprintf( token,sizeof( token), "物品栏空间不足!!"); + CHAR_talkToCli( toindex, -1, token, CHAR_COLORWHITE); + return FALSE; + } + itemindex = ITEM_makeItemAndRegist( itemId); + if(itemindex == -1) + return FALSE; + ret = CHAR_addItemSpecificItemIndex( toindex, itemindex); + if( ret < 0 || ret >= CHAR_MAXITEMHAVE ) { + ITEM_endExistItemsOne( itemindex); + return FALSE; + } + LogItem( + CHAR_getChar( toindex, CHAR_NAME ), + CHAR_getChar( toindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), +#endif + "G_BANK(游乐场积分兑换道具)", + CHAR_getInt( toindex,CHAR_FLOOR), + CHAR_getInt( toindex,CHAR_X ), + CHAR_getInt( toindex,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + sprintf( token,"拿到%s",ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( toindex, -1,token,CHAR_COLORWHITE); + CHAR_sendItemDataOne( toindex, ret); + CHAR_setInt( toindex, CHAR_GAMBLENUM, CHAR_getInt( toindex, CHAR_GAMBLENUM) - count); + sprintf( token,"游乐场积分剩馀: %d", CHAR_getInt( toindex, CHAR_GAMBLENUM)); + CHAR_talkToCli( toindex, -1,token,CHAR_COLORWHITE); + return TRUE; +} + +#endif + + + + + diff --git a/gmsv/npc/npc_gamblemaster.c b/gmsv/npc/npc_gamblemaster.c new file mode 100644 index 0000000..fb709dc --- /dev/null +++ b/gmsv/npc/npc_gamblemaster.c @@ -0,0 +1,600 @@ +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "lssproto_serv.h" +#include "handletime.h" +#include "readmap.h" +#include "log.h" +#include "npc_eventaction.h" + +#ifdef _GAMBLE_ROULETTE + +#include "npc_gamblemaster.h" +void defPlayerGold( int meindex, int flg); +void NPC_GAMBLEMASTER_RESET( int meindex); +void Codef_Gold( int meindex, int toindex, int stone, int flg, char *token); +void NPC_GambleRoulette_selectWindow(int meindex,int toindex,int num,int select); + +enum +{ + ROULETTE_START=0, + ROULETTE_SELECT, + ROULETTE_LOOK, + ROULETTE_END, +}; + +enum +{ + roulette1 = 11, roulette2, roulette3, roulette4, roulette5, roulette6, roulette7, + roulette8, roulette9, roulette10, roulette11, roulette12, roulette13, roulette14, + roulette15, roulette16, roulette17, roulette18, roulette19, roulette20, + + roulette21 = 41, roulette22, roulette23, roulette24, roulette25, roulette26, + roulette27, roulette28, roulette29, roulette30, roulette31, roulette32, + roulette33, roulette34, roulette35, roulette36, roulette37, roulette38, + roulette39, roulette40, + roulette41 = 71, roulette42, roulette43, roulette44, roulette45, + + roulette51 = 101, roulette52=102, roulette53=103, + roulette61 = 111, roulette62=112, +}; + +typedef struct tagGambleMaster +{ + int m_fx; + int m_fy; + int m_type; //号码 + int m_RG; //红绿1 2 + int m_EO; //单双1 2 + int m_SI; + int m_IN; + char str_type[56]; + int m_nums; +}GambleEndType; +GambleEndType EndTypedef[60]={ +{22, 8 , roulette1 , roulette41, roulette43, roulette51, roulette61, "号码红1", 0}, +{7 , 8 , roulette1 , roulette41, roulette43, roulette51, roulette61, "号码红1", 0}, +{22, 10, roulette3 , roulette41, roulette43, roulette51, roulette61, "号码红3", 0}, +{7 , 6 , roulette3 , roulette41, roulette43, roulette51, roulette61, "号码红3", 0}, +{20, 11, roulette5 , roulette41, roulette43, roulette51, roulette61, "号码红5", 0}, +{9 , 5 , roulette5 , roulette41, roulette43, roulette51, roulette61, "号码红5", 0}, +{19, 5 , roulette6 , roulette41, roulette44, roulette53, roulette61, "号码红6", 0}, +{10, 11, roulette6 , roulette41, roulette44, roulette53, roulette61, "号码红6", 0}, +{17, 5 , roulette8 , roulette41, roulette44, roulette53, roulette61, "号码红8", 0}, +{12, 11, roulette8 , roulette41, roulette44, roulette53, roulette61, "号码红8", 0}, +{16, 5 , roulette9 , roulette41, roulette43, roulette53, roulette61, "号码红9", 0}, +{13, 11, roulette9 , roulette41, roulette43, roulette53, roulette61, "号码红9", 0}, +{15, 5 , roulette10, roulette41, roulette44, roulette53, roulette61, "号码红10", 0}, +{14, 11, roulette10, roulette41, roulette44, roulette53, roulette61, "号码红10", 0}, +{12, 5 , roulette13, roulette41, roulette43, roulette52, roulette62, "号码红13", 0}, +{17, 11, roulette13, roulette41, roulette43, roulette52, roulette62, "号码红13", 0}, +{22, 6 , roulette17, roulette41, roulette43, roulette53, roulette62, "号码红17", 0}, +{7 , 10, roulette17, roulette41, roulette43, roulette53, roulette62, "号码红17", 0}, +{22, 5 , roulette18, roulette41, roulette44, roulette52, roulette62, "号码红18", 0}, +{7 , 11, roulette18, roulette41, roulette44, roulette52, roulette62, "号码红18", 0}, + +{22, 9 , roulette22, roulette42, roulette44, roulette51, roulette61, "号码绿2", 0}, +{7 , 7 , roulette22, roulette42, roulette44, roulette51, roulette61, "号码绿2", 0}, +{21, 11, roulette24, roulette42, roulette44, roulette51, roulette61, "号码绿4", 0}, +{8 , 5 , roulette24, roulette42, roulette44, roulette51, roulette61, "号码绿4", 0}, +{18, 5 , roulette27, roulette42, roulette43, roulette53, roulette61, "号码绿7", 0}, +{11, 11, roulette27, roulette42, roulette43, roulette53, roulette61, "号码绿7", 0}, +{19, 11, roulette31, roulette42, roulette43, roulette51, roulette62, "号码绿11", 0}, +{10, 5 , roulette31, roulette42, roulette43, roulette51, roulette62, "号码绿11", 0}, +{18, 11, roulette32, roulette42, roulette44, roulette51, roulette62, "号码绿12", 0}, +{11, 5 , roulette32, roulette42, roulette44, roulette51, roulette62, "号码绿12", 0}, +{16, 11, roulette34, roulette42, roulette44, roulette52, roulette62, "号码绿14", 0}, +{14, 5 , roulette34, roulette42, roulette44, roulette52, roulette62, "号码绿14", 0}, +{15, 11, roulette35, roulette42, roulette43, roulette52, roulette62, "号码绿15", 0}, +{13, 5 , roulette35, roulette42, roulette43, roulette52, roulette62, "号码绿15", 0}, +{22, 7 , roulette36, roulette42, roulette44, roulette53, roulette62, "号码绿16", 0}, +{7 , 9 , roulette36, roulette42, roulette44, roulette53, roulette62, "号码绿16", 0}, +{21, 5 , roulette39, roulette42, roulette43, roulette52, roulette62, "号码绿19", 0}, +{8 , 11, roulette39, roulette42, roulette43, roulette52, roulette62, "号码绿19", 0}, +{20, 5 , roulette40, roulette42, roulette44, roulette52, roulette62, "号码绿20", 0}, +{9 , 11, roulette40, roulette42, roulette44, roulette52, roulette62, "号码绿20", 0}, +{22,11, roulette45, 0, 0, roulette52, 0, "号码00"}, + +{ 7, 5, -1, -1, -1, -1, -1, "号码X", 0}, +{ -1, -1, -1, -1, -1, -1, -1, "无", 0}, +}; + +enum { + /* + NPC_WORK_ROUTETOX = CHAR_NPCWORKINT1, + NPC_WORK_ROUTETOY = CHAR_NPCWORKINT2, + NPC_WORK_ROUTEPOINT = CHAR_NPCWORKINT3, +*/ + NPC_WORK_NPCAI = CHAR_NPCWORKINT3, + NPC_WORK_NPCACTION = CHAR_NPCWORKINT3, + NPC_WORK_MASTERSTONE = CHAR_NPCWORKINT4, + NPC_WORK_MODE = CHAR_NPCWORKINT5, + NPC_WORK_SYSTIME = CHAR_NPCWORKINT6, + NPC_WORK_GAMEFLG = CHAR_NPCWORKINT7, + NPC_WORK_GAMBLECODE = CHAR_NPCWORKINT8, + NPC_WORK_MASTERFLG = CHAR_NPCWORKINT9, + NPC_WORK_ENDPOINT = CHAR_NPCWORKINT10, +}; + +#define ROULETTE_ERRTIME 500 +#define ROULETTE_STANDBY1 40 +#define ROULETTE_LOOPTIME 3000 + +BOOL NPC_Gamble_MasterInit( int meindex ) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf1[256]; + + if( NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)) == NULL ) { + print("\n not found argstr "); + return FALSE; + } + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "gamble_code",buf1, sizeof(buf1)) == NULL ) { + print("\n gamble_code error: not found !!"); + return FALSE; + } + CHAR_setWorkInt( meindex, NPC_WORK_GAMBLECODE, atoi( buf1)); + //游戏阶段 + CHAR_setWorkInt( meindex, NPC_WORK_GAMEFLG, 0); + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_GAMBLEMASTER ); + // NPC_WORK_MODE 主持人状态 0: 等待 1:GAME START 2:GAME END + CHAR_setWorkInt( meindex, NPC_WORK_MODE, 0); + CHAR_setWorkInt( meindex, NPC_WORK_MASTERFLG, 30); + CHAR_setWorkInt( meindex, NPC_WORK_MASTERSTONE, 0); + CHAR_setWorkInt( meindex, NPC_WORK_NPCAI, 0); + //设定LOOP TIMER + CHAR_setInt( meindex, CHAR_LOOPINTERVAL, ROULETTE_LOOPTIME); + //用来记录时间点 + CHAR_setWorkInt( meindex, NPC_WORK_SYSTIME, NowTime.tv_sec); + return TRUE; +} + +void NPC_Gamble_MasterTalked( int meindex , int talkerindex , char *szMes , int color ) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ){ + return; + } + if(NPC_Util_isFaceToFace( meindex ,talkerindex , 2) == FALSE) { + if(NPC_Util_isFaceToChara( talkerindex, meindex, 1) == FALSE) return; + } + + if( NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)) == NULL ) { + print("\n not found argstr "); + return; + } + // 0 选单 11 - 19 规则 21 - 29 积分 + CHAR_setWorkInt(talkerindex , CHAR_WORKSHOPRELEVANT,0); + NPC_GambleRoulette_selectWindow( meindex, talkerindex, ROULETTE_START, -1 ); +} + +void NPC_GambleRoulette_selectWindow(int meindex,int toindex,int num,int select) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf1[256],buf2[256]; + char token[256]; + int buttontype = 0, windowtype = 0, windowno = 0; + int fd = getfdFromCharaIndex( toindex); + int pagenum=0, i; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + + if( NPC_Util_GetArgStr( meindex, npcarg, sizeof( npcarg)) == NULL ) { + print("\n not found npcarg "); + CHAR_setWorkInt( toindex, CHAR_WORKSHOPRELEVANT,0); + return; + } + switch( num) { + case ROULETTE_START: + i = 1; + strcpy( token, "\0"); + sprintf( buf2,"%s%d", "gamble_msg0", i); + while( NPC_Util_GetStrFromStrWithDelim( npcarg, buf2, buf1, sizeof( buf1) ) != NULL ) { + if( strstr( buf1, "NULL" ) == NULL ) { + strcat( token , buf1); + strcat( token, "\n"); + }else { + strcat( token, "\n"); + } + i++; + sprintf( buf2,"%s%d", "gamble_msg0", i); + } + windowtype=WINDOW_MESSAGETYPE_SELECT; + windowno = WINDOWTYPE_GAMBLEROULETTE_START; + break; + break; + case ROULETTE_SELECT: + //页 select + pagenum = CHAR_getWorkInt( toindex , CHAR_WORKSHOPRELEVANT); + strcpy( token, "\0"); + if( select >= 0 ) { + sprintf( buf2,"%s%2d", "page_num", select); + CHAR_setWorkInt( toindex , CHAR_WORKSHOPRELEVANT, select+1); + }else { + sprintf( buf2,"%s%2d", "page_num", pagenum ); + pagenum+=1; + CHAR_setWorkInt( toindex , CHAR_WORKSHOPRELEVANT, pagenum); + } + + if( NPC_Util_GetStrFromStrWithDelim( npcarg, buf2, token, sizeof( token) ) == NULL ) { + print("\n error: not found token:%s", token); + CHAR_setWorkInt( toindex , CHAR_WORKSHOPRELEVANT,0); + return; + } + + sprintf( buf2,"%s%2d", "page_num", CHAR_getWorkInt( toindex , CHAR_WORKSHOPRELEVANT)); + if( NPC_Util_GetStrFromStrWithDelim( npcarg, buf2, buf1, sizeof( buf1) ) == NULL ) { + windowno = WINDOWTYPE_GAMBLEROULETTE_END; + buttontype = WINDOW_BUTTONTYPE_OK; + }else { + windowno = WINDOWTYPE_GAMBLEROULETTE_SELECT; + buttontype = WINDOW_BUTTONTYPE_NEXT; + } + break; + case ROULETTE_LOOK: + { //显示时补回积分 + int G_num = CHAR_getInt( toindex, CHAR_GAMBLENUM ); + + if( CHAR_getWorkInt( toindex, CHAR_WORKSTAKEFLAG) != FALSE) { + for( i=0; i<5; i++) { + if( CHAR_getWorkInt( toindex, i+CHAR_WORKSTAKETYPE1) > 0 ) + G_num++; + } + } + if( G_num < 0 ) G_num = 0; + sprintf( token,"你的游乐场积分为%d。", G_num ); + windowno = WINDOWTYPE_GAMBLEROULETTE_END; + buttontype = WINDOW_BUTTONTYPE_OK; + } + break; + case ROULETTE_END: + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "page_endmsg", token, sizeof( token) ) == NULL ) { + print("\n error: not found end_msg"); + CHAR_setWorkInt( toindex , CHAR_WORKSHOPRELEVANT,0); + return; + } + + windowno = WINDOWTYPE_GAMBLEROULETTE_END; + buttontype = WINDOW_BUTTONTYPE_OK; + break; + } + + lssproto_WN_send( fd, windowtype, buttontype, windowno, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), token); +} + +void NPC_Gamble_MasterWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data) +{ + int pagenum=0; + + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ){ + return; + } + if(NPC_Util_isFaceToFace( meindex ,talkerindex , 2) == FALSE) { + if(NPC_Util_isFaceToChara( talkerindex, meindex, 1) == FALSE) return; + } + + switch( seqno ) { + case WINDOWTYPE_GAMBLEROULETTE_START: + pagenum = atoi( data); + if( pagenum == 4 ) { + NPC_GambleRoulette_selectWindow( meindex, talkerindex, ROULETTE_END, -1 ); + }else { + if( pagenum == 3 ) { //ROULETTE_LOOK + NPC_GambleRoulette_selectWindow( meindex, talkerindex, ROULETTE_LOOK, -1 ); + }else { + pagenum = (pagenum*10)+1; + NPC_GambleRoulette_selectWindow( meindex, talkerindex, ROULETTE_SELECT, pagenum ); + } + } + break; + case WINDOWTYPE_GAMBLEROULETTE_SELECT: + NPC_GambleRoulette_selectWindow( meindex, talkerindex, ROULETTE_SELECT, -1 ); + break; + case WINDOWTYPE_GAMBLEROULETTE_END: + CHAR_setWorkInt(talkerindex , CHAR_WORKSHOPRELEVANT, 0); + break; + } + return; +} + +void NPC_Gamble_MasterLoop( int meindex) +{ + int objmeindex = -1; + int full_time; + //int Master_Stone = 0; + int timeNum = 0; + //int time_run=0; + //int act; + objmeindex = CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX); + switch( CHAR_getWorkInt( meindex, NPC_WORK_MODE )) { + case 0: // 等待 + full_time = ROULETTE_STANDBY1; + timeNum = CHAR_getWorkInt( meindex, NPC_WORK_MASTERFLG ); + if( ( CHAR_getWorkInt( meindex, NPC_WORK_SYSTIME) + full_time) < NowTime.tv_sec ) { + if( timeNum == 30 ) { //倒数20秒 + //0 null 1 准备 2 跑 3 停 + CHAR_setWorkInt( meindex, NPC_WORK_GAMEFLG, 1); + showString( meindex, "下注时间剩下20秒。", 0); + }else if( timeNum == 10 ) { + showString( meindex, "standby_msg", 0); //广播 + SetCasinoMap( meindex, 0, 0); //设定地图不可下注 + }else if( timeNum <= 6 ) { //开始 + //0 null 1 准备 2 跑 3 停 + CHAR_setWorkInt( meindex, NPC_WORK_GAMEFLG, 2); + CHAR_setWorkInt( meindex, NPC_WORK_MODE, 1); + showString( meindex, "start_msg", 0); //广播 + } + CHAR_setWorkInt( meindex, NPC_WORK_MASTERFLG, timeNum - 2 ); + } + break; + case 1: // GAME START + if( CHAR_getWorkInt( meindex, NPC_WORK_GAMEFLG) == 3 ) { + CHAR_setWorkInt( meindex, NPC_WORK_MODE, 2); + } + break; + case 2: // GAME END + CHAR_setWorkInt( meindex, NPC_WORK_MODE, 3); + defPlayerGold( meindex , TRUE); //计算输赢 + CHAR_setWorkInt( meindex, NPC_WORK_ENDPOINT, 0); + NPC_MAPCLEANGOLD( meindex , CHAR_getInt( meindex, CHAR_FLOOR )); + + LogGamble( + CHAR_getChar( meindex, CHAR_NAME ), "master", + "ROULETTE", CHAR_getInt( meindex, CHAR_FLOOR), + CHAR_getInt( meindex, CHAR_X ), + CHAR_getInt( meindex, CHAR_Y ) , + CHAR_getWorkInt( meindex, NPC_WORK_MASTERSTONE), 0, 0, 0, 2 + ); + break; + case 3: + CHAR_setWorkInt( meindex, NPC_WORK_MODE, 0); + CHAR_setWorkInt( meindex, NPC_WORK_GAMEFLG, 0); + showString( meindex, "end_msg", 0); //广播 + SetCasinoMap( meindex, 0, 1); //设定地图可下注 + CHAR_setWorkInt( meindex, NPC_WORK_MASTERFLG, 30 ); + CHAR_setWorkInt( meindex, NPC_WORK_SYSTIME, NowTime.tv_sec); + break; + default: + NPC_GAMBLEMASTER_RESET( meindex); + break; + } +} + +void defPlayerGold( int meindex , int flg) +{ + int X,Y; + int endpoint; + int End_type = 0; + int toindex=0, i, master_floor; + int player_type; + int gamble_num; + //float def; + char token[256], buff[256]; + char buf1[56],buf2[56]; + BOOL GAMBLE_YES = FALSE; + endpoint = CHAR_getWorkInt( meindex, NPC_WORK_ENDPOINT); + + X = (endpoint >> 16 ); + Y = (endpoint & 0xffff); + + for( End_type = 0; End_type < arraysizeof(EndTypedef) ; End_type++ ) { + if( (X == EndTypedef[ End_type].m_fx) && (Y == EndTypedef[ End_type].m_fy )) { + break; + } + } + + if( End_type == arraysizeof(EndTypedef) ) { + print("\n\n **********GAMBLE MASTER ERROR !! **************"); + print("\n NOT FOUND : X=%d Y=%d EndTypedef[I] !!", X, Y); + return; + } +/*Log===================================== + { //记录用 + FILE *fp; + int kp=0,pn=0;; + fp = fopen("./data/npc/roulette/lookgamble.txt","w+"); + if( fp != NULL ) { + if( EndTypedef[ End_type].m_nums < 10000 ) + EndTypedef[ End_type].m_nums = EndTypedef[ End_type].m_nums+1; + for( kp=0; kp 0 && EndTypedef[ kp].m_type > 0 ) { + fprintf( fp," %s 中奖次数 [%d] ", EndTypedef[ kp].str_type, EndTypedef[ kp].m_nums ); + if( (pn+1)%2 == 0 ) { + fprintf( fp," \n"); + } + pn ++; + } + } + fclose( fp); + } + } +//========================================*/ + + if( EndTypedef[ End_type].m_type <= 0 ) { + showString( meindex, "号码X,通杀!", 0); + }else { + sprintf( token ,"中奖号码 : %s ", EndTypedef[End_type].str_type ); + showString( meindex, token, 0 ); + } + if( EndTypedef[ End_type].m_EO == roulette43 ) { + sprintf( buf1,"单"); + }else { + sprintf( buf1,"双"); + } + if( EndTypedef[ End_type].m_RG == roulette41 ) { + sprintf( buf2,"红"); + }else { + sprintf( buf2,"绿"); + } + //找在场的人 + toindex = -1; + master_floor = CHAR_getInt( meindex , CHAR_FLOOR); + while( toindex < 10000 ) { + toindex++; + if( !CHAR_CHECKINDEX( toindex) ) + continue; + if( CHAR_getInt( toindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) + continue; + if( master_floor != CHAR_getInt( toindex, CHAR_FLOOR ) ) //是否在赌场 + continue; + if( CHAR_getWorkInt( toindex, CHAR_WORKSTAKEFLAG) == FALSE ) //是否有下注 + continue; + //是否赌中 + GAMBLE_YES = FALSE; + CHAR_setWorkInt( toindex, CHAR_WORKSTAKEFLAG, FALSE); + for( i=0; i<5; i++) { + player_type = CHAR_getWorkInt( toindex, i+CHAR_WORKSTAKETYPE1); + gamble_num = 0; + if( player_type > 0 ) { + if( player_type == EndTypedef[End_type].m_type ) { //中了号码 + if( EndTypedef[End_type].m_type == roulette45 ) { + gamble_num += 40; + }else { + gamble_num += 20; + } + GAMBLE_YES = TRUE; + //算钱 + Codef_Gold( meindex, toindex, gamble_num, 0, EndTypedef[End_type].str_type ); + }else if( player_type == EndTypedef[End_type].m_RG ) { //中了红绿 + gamble_num += 1; + GAMBLE_YES = TRUE; + Codef_Gold( meindex, toindex, gamble_num, 0, buf2 ); + }else if( player_type == EndTypedef[End_type].m_EO ) { //中了单双 + gamble_num += 1; + GAMBLE_YES = TRUE; + Codef_Gold( meindex, toindex, gamble_num, 0, buf1 ); + }else if( player_type == EndTypedef[End_type].m_SI ) { //横列 + gamble_num += 2; + GAMBLE_YES = TRUE; + sprintf( token,"%s%d", "横列", EndTypedef[End_type].m_SI-100 ); + Codef_Gold( meindex, toindex, gamble_num, 0, token ); + }else if( player_type == EndTypedef[End_type].m_IN ) { //1-10 11-20 + gamble_num += 1; + GAMBLE_YES = TRUE; + if( (EndTypedef[End_type].m_IN - 100 ) == 11 ) { + snprintf( buff, sizeof( buff),"1-10"); + }else if( (EndTypedef[End_type].m_IN - 100 ) == 12 ) { + snprintf( buff, sizeof( buff),"11-20"); + } + sprintf( token,"%s%s", " 围", buff ); + Codef_Gold( meindex, toindex, gamble_num, 0, token ); + }else { //没中 扣积分 + if( (player_type>>16) == EndTypedef[End_type].m_type || + (player_type&0xffff) == EndTypedef[End_type].m_type + ) { //中双号 + gamble_num += 10; + GAMBLE_YES = TRUE; + sprintf( token,"%s%s", "双号-", EndTypedef[End_type].str_type ); + Codef_Gold( meindex, toindex, gamble_num, 0, token ); + }else if( player_type > 0 ) { //72 73 74 75 没中 扣积分 + strcpy( token, "\0"); + if( player_type >= roulette41 && player_type <= roulette44 ) { //红绿单双 + sprintf( token,"%s", "押注 红绿单双 没中"); + }else if( player_type == roulette45 ) { //数字00 + sprintf( token,"%s", "押注 数字00 没中"); + }else if( player_type >= roulette51 && player_type <= roulette53 ) { //横列 + sprintf( token,"%s", "押注 横列 没中"); + }else if( player_type >= roulette61 && player_type <= roulette62 ) { // 围 + sprintf( token,"%s", "押注 围 没中"); + }else if( player_type > (1<<16) ) { //双号 + sprintf( token,"%s", "押注 双号 没中"); + }else { //数字 + sprintf( token,"%s", "押注 数字 没中"); + } + gamble_num -= 1; + Codef_Gold( meindex, toindex, gamble_num, 1, token ); + } + } + } + //清空 + CHAR_setWorkInt( toindex, i+CHAR_WORKSTAKETYPE1, 0); + } + if( CHAR_getInt( toindex, CHAR_GAMBLENUM) < 0 ) { + CHAR_setInt( toindex, CHAR_GAMBLENUM, 0 ); + }else if( CHAR_getInt( toindex, CHAR_GAMBLENUM) > 10000 ) { + CHAR_setInt( toindex, CHAR_GAMBLENUM, 10000 ); + } + sprintf( token, "你的游乐场积分累计为%d分。", CHAR_getInt( toindex, CHAR_GAMBLENUM)); + CHAR_talkToCli( toindex, meindex, token, CHAR_COLORYELLOW); + + if( GAMBLE_YES == FALSE ) { + sprintf( token, "你所有押注都没中奖!"); + CHAR_talkToCli( toindex, meindex, token, CHAR_COLORYELLOW); + continue; + } + + } + return; +} + +void Codef_Gold( int meindex, int toindex, int stone,int flg, char *token) +{ + char buf1[256]; + int dnum=-1; + int Master_gnum=0; + Master_gnum = CHAR_getWorkInt( meindex, NPC_WORK_MASTERSTONE); + Master_gnum += stone; + if( !flg ) { + sprintf( buf1,"恭喜你中了:%s,可拿得 %d 点积分", token, stone); + CHAR_talkToCli( toindex, meindex, buf1, CHAR_COLORYELLOW); +#ifdef _FIX_GAMBLENUM + stone += 1; //加上一开始下注扣的积分 +#endif + CHAR_setInt( toindex, CHAR_GAMBLENUM, CHAR_getInt( toindex, CHAR_GAMBLENUM) + stone); + + }else { + dnum = stone; + if( stone < 0 ) { + dnum = (dnum*(-1)); + } + + sprintf( buf1,"%s,扣 %d 点积分", token, dnum); + CHAR_talkToCli( toindex, meindex, buf1, CHAR_COLORYELLOW); +#ifdef _FIX_GAMBLENUM +#else + CHAR_setInt( toindex, CHAR_GAMBLENUM, CHAR_getInt( toindex, CHAR_GAMBLENUM) + stone); +#endif + } + + LogGamble( + CHAR_getChar( toindex, CHAR_NAME ), + CHAR_getChar( toindex, CHAR_CDKEY ), + "ROULETTE", + CHAR_getInt( toindex, CHAR_FLOOR), + CHAR_getInt( toindex, CHAR_X ), + CHAR_getInt( toindex, CHAR_Y ), + CHAR_getInt( toindex, CHAR_GOLD), + stone, + 0, + CHAR_getInt( toindex, CHAR_GAMBLENUM ), + 1 + ); + + //纪录盈亏 + if( Master_gnum > 5000000 ) Master_gnum = 5000000; + if( Master_gnum < 0 ) Master_gnum = 0; + CHAR_setWorkInt( meindex, NPC_WORK_MASTERSTONE, Master_gnum); + return; +} +//重置 错误处理 +void NPC_GAMBLEMASTER_RESET( int meindex) +{ + //错误处理 + print("\n 错误处理"); + CHAR_setWorkInt( meindex, NPC_WORK_GAMEFLG, 0);//0 null 1 准备 2 跑 + CHAR_setWorkInt( meindex, NPC_WORK_MODE, 0); + showString( meindex, "本回合不算!等5分钟後重新开始!!", 1); + NPC_MAPCLEANGOLD( meindex , CHAR_getInt( meindex, CHAR_FLOOR )); + //defPlayerGold( meindex , FALSE); + CHAR_setWorkInt( meindex, NPC_WORK_SYSTIME, NowTime.tv_sec + ROULETTE_ERRTIME); +} + +#endif + + + diff --git a/gmsv/npc/npc_gambleroulette.c b/gmsv/npc/npc_gambleroulette.c new file mode 100644 index 0000000..a2c9953 --- /dev/null +++ b/gmsv/npc/npc_gambleroulette.c @@ -0,0 +1,474 @@ +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "readmap.h" +#include "lssproto_serv.h" +#include "handletime.h" + +#ifdef _GAMBLE_ROULETTE +#include "npc_gambleroulette.h" + +#define _OTHER_ROUND //另一种跑法 + +static void Gamble_Roulette_walk( int meindex); +static int Gamble_RouletteSetPoint( int meindex ); +static void Find_Master( int meindex); +int RunRand( int meindex, int flg ); +BOOL SetEndPoint( int meindex ); +void Gamble_Roulette_Reset( int meindex, int flg); +void ResetDataStart( int meindex); +BOOL ReadPointData( int meindex ); +enum { + NPC_WORK_ROUTETOX = CHAR_NPCWORKINT1, + NPC_WORK_ROUTETOY = CHAR_NPCWORKINT2, + NPC_WORK_ROUTEPOINT = CHAR_NPCWORKINT3, + NPC_WORK_ROUNDTRIP = CHAR_NPCWORKINT4, + NPC_WORK_MODE = CHAR_NPCWORKINT5, + NPC_WORK_CURRENTROUTE = CHAR_NPCWORKINT6, + NPC_WORK_ROUTEMAX = CHAR_NPCWORKINT7, + NPC_WORK_WAITTIME = CHAR_NPCWORKINT8, + NPC_WORK_CURRENTTIME = CHAR_NPCWORKINT9, + NPC_WORK_SEFLG = CHAR_NPCWORKINT10, //记录主持人index +}; + +typedef struct tagRoulettePoint { + int x; + int y; + int flg; +}RoulettePoint; +RoulettePoint PointData[]={ + {-1,-1,-1},{-1,-1,-1},{-1,-1,-1},{-1,-1,-1}, +}; + +RoulettePoint TestPointData[4*8]; + +#define ROULETTE_STANDBY 1500 +#define ROULETTE_LOOPTIME 1000 + +#define ROULETTE_RUNTIME1 50 + +BOOL NPC_Gamble_RouletteInit( int meindex ) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_GAMBLEROULETTE ); + //CHAR_setWorkInt( meindex, NPC_WORK_ROUTEMAX, routenum); + //小猪要走几格才停 + CHAR_setWorkInt( meindex, NPC_WORK_ROUTEMAX, 0); + CHAR_setWorkInt( meindex, NPC_WORK_SEFLG, -1); + // NPC_WORK_MODE 小猪的状态 0:等待 1:走(顺) + CHAR_setWorkInt( meindex, NPC_WORK_MODE, 0); + //第几个地图点 + CHAR_setWorkInt( meindex, NPC_WORK_ROUTEPOINT, 0); + //顺向 1 逆向 0 + CHAR_setWorkInt( meindex, NPC_WORK_ROUNDTRIP, 1); + //第几个路线 + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTROUTE, 0); + //设定LOOP TIMER + CHAR_setInt( meindex, CHAR_LOOPINTERVAL, ROULETTE_STANDBY); + //用来记录时间点 + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTTIME, NowTime.tv_sec); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX)); + if( ReadPointData( meindex) == FALSE ) + return FALSE; + return TRUE; +} + +void NPC_Gamble_RouletteTalked( int meindex , int talkerindex , char *szMes , int color ) +{ + return; +} + +void NPC_Gamble_RouletteWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data) +{ + return; +} + +void NPC_Gamble_RouletteLoop( int meindex) +{ + int objmeindex = -1, index = 0, act = 0; + objmeindex = CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX); + switch( CHAR_getWorkInt( meindex, NPC_WORK_MODE )) { + case 0: //停止时等待 为等待主持人下命令 + + //抓主持人index 检查主持人 是否喊开始 + if( CHAR_getWorkInt( meindex, NPC_WORK_SEFLG) < 0 ) { + CHAR_setWorkInt( meindex, NPC_WORK_MODE,5); + }else { + index = CHAR_getWorkInt( meindex, NPC_WORK_SEFLG); + //CHAR_NPCWORKINT7 0 null 1 准备 2 跑 3 停 + if( CHAR_getWorkInt( index, CHAR_NPCWORKINT7 ) == 2 ) { + CHAR_sendCToArroundCharacter( objmeindex); + CHAR_setWorkInt( meindex, NPC_WORK_MODE,1); + CHAR_setInt( meindex, CHAR_LOOPINTERVAL, ROULETTE_RUNTIME1); + //决定小猪走几格 + CHAR_setWorkInt( meindex, NPC_WORK_ROUTEMAX, RunRand( meindex, 0 ) ); + ResetDataStart( meindex);//决定进点 + if( CHAR_getInt( meindex, CHAR_X) == 14 && + CHAR_getInt( meindex, CHAR_Y) == 8 ) { + }else { + print("\n\n####################\n 小猪不在原点!![%d,%d]", + CHAR_getInt( meindex, CHAR_X), + CHAR_getInt( meindex, CHAR_Y) + ); + + } + }else if( CHAR_getWorkInt( index, CHAR_NPCWORKINT7 ) == 1 || + ( CHAR_getWorkInt( index, CHAR_NPCWORKINT9) < 30 && + CHAR_getWorkInt( index, CHAR_NPCWORKINT9) > 24 ) + ) { //准备 + if( CHAR_getInt( meindex, CHAR_X) == 14 && CHAR_getInt( meindex, CHAR_Y) == 8 ) { + }else { + CHAR_warpToSpecificPoint( meindex, CHAR_getInt( meindex, CHAR_FLOOR), + 14, 8); + CHAR_setInt( meindex, CHAR_X, 14); + CHAR_setInt( meindex, CHAR_Y, 8); + CHAR_sendCToArroundCharacter( objmeindex); + } + } + } + break; + case 1: + Gamble_Roulette_walk( meindex); + break; + case 2: + break; + case 3: + //点归零 + CHAR_setWorkInt( meindex, NPC_WORK_MODE, 0); + //动作 + act = CHAR_ACTATTACK; + CHAR_sendWatchEvent( objmeindex, act, NULL,0, FALSE); + CHAR_setWorkInt( meindex, CHAR_WORKACTION, act); + CHAR_setWorkInt( meindex, NPC_WORK_ROUTEMAX, 0); + CHAR_setInt( meindex, CHAR_LOOPINTERVAL, ROULETTE_STANDBY); + + //送人物资料给视觉 围内的人 + CHAR_sendCToArroundCharacter( objmeindex); + if( SetEndPoint( meindex ) == FALSE ) { + print("\n not Set EndPoint !!"); + } +#ifdef _OTHER_ROUND +#else + ReadPointData( meindex); //load round data +#endif + //还原主持人 + index = CHAR_getWorkInt( meindex, NPC_WORK_SEFLG); + CHAR_setWorkInt( index, CHAR_NPCWORKINT7, 3); + break; + case 5: //寻找主持人 + Find_Master( meindex); + if( CHAR_getWorkInt( meindex, NPC_WORK_SEFLG) < 0 ) { + CHAR_setInt( meindex, CHAR_LOOPINTERVAL, 0); + CHAR_setWorkInt( meindex, NPC_WORK_MODE,-1); + }else { + CHAR_setWorkInt( meindex, NPC_WORK_MODE, 0); + } + break; + default: + //重置 错误处理 + Gamble_Roulette_Reset( meindex, 0); + break; + } +} + +static void Gamble_Roulette_walk( int meindex) +{ + POINT start, end; + int dir; + int ret; + int i,run_num = 0; + int objmeindex = -1; + objmeindex = CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX); + + start.x = CHAR_getInt( meindex, CHAR_X); + start.y = CHAR_getInt( meindex, CHAR_Y); + end.x = CHAR_getWorkInt( meindex, NPC_WORK_ROUTETOX); + end.y = CHAR_getWorkInt( meindex, NPC_WORK_ROUTETOY); + // loop timer分为两部分 1. 处理下一点 2. 走到下一点 + + if( start.x == end.x && start.y == end.y ) { +#ifdef _OTHER_ROUND +#else + int add = 1; + //如果为 NPC_WORK_ROUNDTRIP != 1 逆向 + if( CHAR_getWorkInt( meindex, NPC_WORK_ROUNDTRIP ) != 1 ) { + add *= -1; + } + CHAR_setWorkInt( meindex, NPC_WORK_ROUTEPOINT, + CHAR_getWorkInt( meindex, NPC_WORK_ROUTEPOINT) +add); +#endif + if( Gamble_RouletteSetPoint( meindex ) == FALSE ) { +#ifdef _OTHER_ROUND + CHAR_setWorkInt( meindex, NPC_WORK_MODE,3); + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTTIME, NowTime.tv_sec); + return; +#else + if( CHAR_getWorkInt( meindex, NPC_WORK_ROUNDTRIP ) != 1 ) { + CHAR_setWorkInt( meindex, NPC_WORK_ROUTEPOINT, arraysizeof( PointData) ); //逆向 + }else { + CHAR_setWorkInt( meindex, NPC_WORK_ROUTEPOINT, -1); //顺向 + } + return; +#endif + }else { + return; + } + } +//-------------------------------------------------------------------- + run_num = CHAR_getWorkInt( meindex, NPC_WORK_ROUTEMAX); + if( run_num > 0 ){ + CHAR_setWorkInt( meindex, NPC_WORK_ROUTEMAX, (run_num - 1) ); + }else { +#ifdef _OTHER_ROUND + CHAR_setWorkInt( meindex, NPC_WORK_MODE,3); + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTTIME, NowTime.tv_sec); + return; +#else + int npc_ai=0; + int masterindex; + masterindex = CHAR_getWorkInt( meindex, NPC_WORK_SEFLG); + npc_ai = CHAR_getWorkInt( masterindex, CHAR_NPCWORKINT3); + if( npc_ai > 10 ) { + if( start.x == 7 && start.y == 5 ) { // 7,5 + CHAR_setWorkInt( masterindex, CHAR_NPCWORKINT3, 0); + }else { + CHAR_setWorkInt( meindex, NPC_WORK_ROUTEMAX, 1); + return; + } + } + CHAR_setWorkInt( meindex, NPC_WORK_MODE,3); + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTTIME, NowTime.tv_sec); + return; +#endif + } +//-------------------------------------------------------------------- + dir = NPC_Util_getDirFromTwoPoint( &start,&end ); + for( i = 0; i < 100; i ++ ) { + if( dir < 0 ) { + dir = RAND( 0,7); + } + dir = NPC_Util_SuberiWalk( meindex, dir); + if( dir >= 0 && dir <= 7) break; + } + if( dir >= 0 && dir <= 7 ) { + ret = CHAR_walk( meindex, dir, 0); + } +} + +static void Find_Master( int meindex) +{ + int floor, x=14, y=3; + OBJECT object; + floor = CHAR_getInt( meindex , CHAR_FLOOR); + for( object = MAP_getTopObj( floor, x, y) ; object ; object = NEXT_OBJECT(object ) ){ + int findex; + int objindex = GET_OBJINDEX(object); + if( !CHECKOBJECTUSE( objindex)) continue; + findex = OBJECT_getIndex( objindex); + if( !CHAR_CHECKINDEX( findex)) continue; + if( CHAR_getInt( findex , CHAR_WHICHTYPE ) != CHAR_GAMBLEMASTER ) continue; + if( CHAR_getWorkInt( findex, CHAR_NPCWORKINT8) != 10001 ) continue; + CHAR_setWorkInt( meindex, NPC_WORK_SEFLG, findex) ; + return; + } +} + +int RunRand( int meindex, int flg ) +{ +#define RAND(x,y) ((x-1)+1+ (int)( (double)(y-(x-1))*rand()/(RAND_MAX+1.0)) ) + int run_num1=0; + int i; + + run_num1 = RAND( 90, 150); + for( i=0; i<6; i++ ) { + run_num1 += RAND( 0, 20); + } + return run_num1; +} + +BOOL SetEndPoint( int meindex ) +{ + int x,y; + int master; + int endpoint; + + master = CHAR_getWorkInt( meindex, NPC_WORK_SEFLG); + if( !CHAR_CHECKINDEX( master) ) + return FALSE; + + if( CHAR_getWorkInt( master, CHAR_NPCWORKINT7) != 2 ) { + print("\n error( master,CHAR_NPCWORKINT7) != 2 "); + return FALSE; + } + + x = CHAR_getInt( meindex, CHAR_X); + y = CHAR_getInt( meindex, CHAR_Y); + endpoint = (x<<16)+(y<<0); + CHAR_setWorkInt( master, CHAR_NPCWORKINT10, endpoint); + return TRUE; +} + +void Gamble_Roulette_Reset( int meindex, int flg) +{ + //错误处理 + int index; + CHAR_setWorkInt( meindex, NPC_WORK_ROUTEMAX, 0); + CHAR_setWorkInt( meindex, NPC_WORK_MODE, 0); + CHAR_setInt( meindex, CHAR_LOOPINTERVAL, ROULETTE_STANDBY); + + index = CHAR_getWorkInt( meindex, NPC_WORK_SEFLG); + if( !CHAR_CHECKINDEX( index) ) { + print("\n Gamble_Roulette error: no master !!"); + return; + } + CHAR_setWorkInt( index, CHAR_NPCWORKINT7, 3); + CHAR_setWorkInt( index, CHAR_NPCWORKINT10, 0); +} + +void ResetDataStart( int meindex ) +{ +#define RAND(x,y) ((x-1)+1+ (int)( (double)(y-(x-1))*rand()/(RAND_MAX+1.0)) ) + int Start=1; + struct tagWalkStartPoint{ + int x; + int y; + int rip; + }WalkStart[]={ + {7,5,1}, {7,11,0}, {22,11,1}, {22,5,0}, + }; + Start = RAND( 0, 3); + + CHAR_setWorkInt( meindex, NPC_WORK_ROUNDTRIP, WalkStart[Start].rip ); + CHAR_setWorkInt( meindex, NPC_WORK_ROUTEPOINT, Start); + CHAR_setWorkInt( meindex, NPC_WORK_ROUTETOX, WalkStart[Start].x ); + CHAR_setWorkInt( meindex, NPC_WORK_ROUTETOY, WalkStart[Start].y ); + + { + int i=0,k; + int RIP = CHAR_getWorkInt( meindex, NPC_WORK_ROUNDTRIP); + k = CHAR_getWorkInt( meindex, NPC_WORK_ROUTEPOINT); + if( RIP ) { + while( i < (arraysizeof( TestPointData))) { + k++; + if( k > 3 ) k = 0; + TestPointData[i].x = PointData[k].x; + TestPointData[i].y = PointData[k].y; + i++; + } + }else { + while( i < (arraysizeof( TestPointData))) { + k--; + if( k < 0 ) k = 3; + TestPointData[i].x = PointData[k].x; + TestPointData[i].y = PointData[k].y; + i++; + } + } + } +#ifdef _OTHER_ROUND + CHAR_setWorkInt( meindex, NPC_WORK_ROUTEPOINT, 0); +#endif +} + +BOOL ReadPointData( int meindex ) +{ + + char buf1[256], buf2[32], buf3[16]; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + int k=1,i=0; + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "roulette",buf1, sizeof(buf1)) == NULL ) { + print("\n roulette error: not found !!"); + return FALSE; + } + k=1; + while( getStringFromIndexWithDelim( buf1, ";", k, buf2, sizeof(buf2) ) != FALSE ) { + k++; + if( strstr( buf2,",") == NULL ) + continue; + + if( getStringFromIndexWithDelim( buf2, ",", 1, buf3, sizeof(buf3)) == FALSE) { + return FALSE; + } + PointData[i].x = atoi( buf3); + if( getStringFromIndexWithDelim( buf2, ",", 2, buf3, sizeof(buf3)) == FALSE) { + return FALSE; + } + PointData[i].y = atoi( buf3); + if( i > 9 ) { + break; + } + i++; + } +#ifdef _OTHER_ROUND +#else + Gamble_RouletteSetPoint( meindex); +#endif + return TRUE;//arraysizeof( PointData) +} + +static int Gamble_RouletteSetPoint( int meindex ) +{ +#ifdef _OTHER_ROUND + int i; + i = CHAR_getWorkInt( meindex, NPC_WORK_ROUTEPOINT); + CHAR_setWorkInt( meindex, NPC_WORK_ROUTETOX, TestPointData[i].x ); + CHAR_setWorkInt( meindex, NPC_WORK_ROUTETOY, TestPointData[i].y ); + i++; + CHAR_setWorkInt( meindex, NPC_WORK_ROUTEPOINT, i); + if( i >= arraysizeof( TestPointData) ) { + return FALSE; + } +#else + int i; + i = CHAR_getWorkInt( meindex, NPC_WORK_ROUTEPOINT); + if( i<0 || i>arraysizeof( PointData) -1) { + return FALSE; + } + CHAR_setWorkInt( meindex, NPC_WORK_ROUTETOX, PointData[i].x ); + CHAR_setWorkInt( meindex, NPC_WORK_ROUTETOY, PointData[i].y ); +#endif + {//检查路线 + struct tagWalkStartPoint{ + int x; + int y; + }WalkStart[]={ + {22,5}, {7,5}, {7,11}, {22,11}, {22,5}, {7,5} + }; + int ch_x,ch_y; + int next_x,next_y; + int h; + ch_x = CHAR_getInt( meindex, CHAR_X); + ch_y = CHAR_getInt( meindex, CHAR_Y); + for( h=1; h<5; h++) { + if( ch_x == WalkStart[h].x && + ch_y == WalkStart[h].y) { + next_x = CHAR_getWorkInt( meindex, NPC_WORK_ROUTETOX); + next_y = CHAR_getWorkInt( meindex, NPC_WORK_ROUTETOY); + if( next_x == WalkStart[h+1].x && + next_y == WalkStart[h+1].y) { + + }else if( next_x == WalkStart[h-1].x && + next_y == WalkStart[h-1].y) { + }else { + print("\n ##############################"); + print("\n ERR : [%d,%d] -> [%d,%d]",ch_x,ch_y,next_x,next_y); + } + break; + } + } + } + return TRUE; +} + +#endif + + + diff --git a/gmsv/npc/npc_healer.c b/gmsv/npc/npc_healer.c new file mode 100644 index 0000000..91ecc8e --- /dev/null +++ b/gmsv/npc/npc_healer.c @@ -0,0 +1,181 @@ +#include "version.h" +#include +#include +#include + +#include "object.h" +#include "char_base.h" +#include "char.h" +#include "util.h" +#include "npcutil.h" +#include "item.h" +#include "readmap.h" + + +#define RANGE 2 +void NPC_HealerSpeak( int index, int talker); +void NPC_HealerAllHeal( int talker ); +BOOL NPC_MoneyCheck(int meindex,int talker); +int NPC_CostCheck(int talker); +void NPC_CharCheckPoint(int meindex,int talker); +int NPC_WorkInput(int meindex,int talker); + + +/********************************** +赓渝祭 +************************************/ +BOOL NPC_HealerInit( int meindex ) +{ + //正奶皿毛甲□仿□卞涩烂 + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPEHEALER ); + // 猾匹五卅中 邰卅中井手 + CHAR_setFlg( meindex , CHAR_ISATTACKED , 0 ); + //晓卞昙木卅中 +// CHAR_setFlg( meindex , CHAR_ISOVERED , 0 ); + + return TRUE; + +} + + + + +/*------------------------------------------- + * + * 今木}HP,MP毛蝈钒卞允月 + * + --------------------------------------------*/ +void NPC_HealerTalked( int meindex , int talker , char *msg ,int color ) +{ + + char* npcarg; + char token[32]; + int msgNo; + + + npcarg = CHAR_getChar(meindex,CHAR_NPCARGUMENT); + + getStringFromIndexWithDelim( npcarg, "|", 1, token,sizeof( token)); + msgNo = atoi( token ); + + /*---皿伊奶乩□卞覆仄化分仃 杀允月---*/ + if( CHAR_getInt( talker , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) return; + + /*--- 区动 井" 区反1引凶反}仄氏匹中月井"---*/ + /* ㄠ弘伉永玉动 及心 */ + if( NPC_Util_CharDistance( talker, meindex ) > 2) return; + + if( (CHAR_getWorkInt( talker, CHAR_WORKPARTYMODE) == 0) + || (CHAR_getWorkInt( talker, CHAR_WORKPARTYMODE) == 2) ) + { + /*--荚汊今六引仄斤丹--*/ + NPC_HealerAllHeal( talker); + if(msgNo == 1) { + CHAR_talkToCli( talker, meindex, + "已经全部回复。请在下次的比赛中加油唷!",CHAR_COLORWHITE); + + }else if(msgNo == 2) { + CHAR_talkToCli( talker, meindex, + "由於你很诚实,让我帮你回复吧!",CHAR_COLORWHITE); + } + + }else{ + int i = 0; + int otherindex; + + for( i=0 ; i < CHAR_PARTYMAX ; i++) + { + otherindex = CHAR_getWorkInt( talker, CHAR_WORKPARTYINDEX1 + i); + if(otherindex != -1){ + + NPC_HealerAllHeal( otherindex); + if(msgNo == 1) { + CHAR_talkToCli( otherindex, meindex, + "已经全部回复。请在下次的比赛中加油唷!",CHAR_COLORWHITE); + + }else if(msgNo == 2) { + CHAR_talkToCli( otherindex, meindex, + "由於你很诚实,让我帮你回复吧!",CHAR_COLORWHITE); + } + } + } + } +} + + +/*----------------------*/ +/* 荚汊 */ +/*-----------------------*/ +void NPC_HealerAllHeal( int talker ) +{ + int i; + int petindex; + char petsend[3]; + char msgbuf[5]; + + CHAR_setInt( talker , CHAR_HP ,CHAR_getWorkInt( talker, CHAR_WORKMAXHP ) ); + CHAR_setInt( talker , CHAR_MP ,CHAR_getWorkInt( talker, CHAR_WORKMAXMP ) ); + + + + for(i = 0 ; i < CHAR_MAXPETHAVE; i ++) { + petindex = CHAR_getCharPet( talker, i); + + if( petindex == -1 ) continue; + + /* 平乓仿及 民尼永弁 */ + if( !CHAR_CHECKINDEX( talker ) ) continue; + + /* 矢永玄及index民尼永弁毛允月 */ + if( CHAR_CHECKINDEX( petindex) == FALSE ) continue; + + /*--荚汊--*/ + CHAR_setFlg( petindex, CHAR_ISDIE, 0); + CHAR_setInt( petindex , CHAR_HP ,CHAR_getWorkInt( petindex, CHAR_WORKMAXHP ) ); + CHAR_setInt( petindex , CHAR_MP ,CHAR_getWorkInt( petindex, CHAR_WORKMAXMP ) ); + + /*--由仿丢□正譬帮--*/ + CHAR_complianceParameter( petindex ); + sprintf( petsend, "K%d", i ); + CHAR_sendStatusString( talker , petsend ); + } + + /*---醮棉互中木壬醮棉卞手霜耨--*/ + if(CHAR_getWorkInt( talker, CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE ) + { + int topartyarray = -1; + int oyaindex = CHAR_getWorkInt( talker , CHAR_WORKPARTYINDEX1); + + if( CHAR_CHECKINDEX( oyaindex )) { + int i; + + /* 愤坌午怂仄凶支勾及醮棉及 及桦赭毛潸 */ + for( i = 0; i < CHAR_PARTYMAX; i ++ ) { + int workindex = CHAR_getWorkInt( oyaindex, CHAR_WORKPARTYINDEX1 + i); + if( CHAR_CHECKINDEX( workindex) ) { + if( workindex == talker ) { + topartyarray = i; + break; + } + } + } + + for( i = 0; i < CHAR_PARTYMAX; i ++ ) { + int otherindex = CHAR_getPartyIndex( talker, i); + /* 醮棉由仿丢□正毛霜月 */ + if( CHAR_CHECKINDEX( otherindex) ) { + snprintf( msgbuf, sizeof( msgbuf), "N%d", topartyarray); + if( otherindex != talker) { + CHAR_sendStatusString( otherindex, msgbuf); + } + } + } + } + } + + /*--由仿丢□正霜曰--*/ + CHAR_send_P_StatusString( talker, CHAR_P_STRING_HP); + CHAR_send_P_StatusString( talker, CHAR_P_STRING_MP); + +} + diff --git a/gmsv/npc/npc_itemchange.c b/gmsv/npc/npc_itemchange.c new file mode 100644 index 0000000..fa44c19 --- /dev/null +++ b/gmsv/npc/npc_itemchange.c @@ -0,0 +1,259 @@ +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "lssproto_serv.h" +#include "saacproto_cli.h" +#include "readmap.h" +#include "battle.h" +#include "log.h" +#include "enemy.h" +#include "handletime.h" +#include "npc_eventaction.h" +#include "npc_itemchange.h" + +#ifdef _ITEM_NPCCHANGE +enum { + ITEMCHANGE_START=1, + ITEMCHANGE_SELECT, + ITEMCHANGE_MESSAGE, + ITEMCHANGE_END, + ITEMCHANGE_ERROR, + +}; +enum { + NPC_WORK_CURRENTTIME = CHAR_NPCWORKINT1, +/* + NPC_WORK_ROUTETOY = CHAR_NPCWORKINT2, + NPC_WORK_ROUTEPOINT = CHAR_NPCWORKINT3, + NPC_WORK_ROUNDTRIP = CHAR_NPCWORKINT4, + NPC_WORK_MODE = CHAR_NPCWORKINT5, + NPC_WORK_CURRENTROUTE = CHAR_NPCWORKINT6, + NPC_WORK_ROUTEMAX = CHAR_NPCWORKINT7, + NPC_WORK_WAITTIME = CHAR_NPCWORKINT8, + NPC_WORK_CURRENTTIME = CHAR_NPCWORKINT9, + NPC_WORK_SEFLG = CHAR_NPCWORKINT10, +*/ +}; + +static void NPC_ItemchangeMan_selectWindow( int meindex, int toindex, int num,int select); +BOOL ItemchangeMan_GetNeedStr( int meindex, int toindex, char *npcarg, char *token, int num ); +BOOL ItemchangeMan_GetMenuStr( int meindex, int toindex, char *npcarg, char *token); + +BOOL NPC_ItemchangeManInit( int meindex ) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("TRANSER_MAN: GetArgStrErr!!"); + return FALSE; + } + + CHAR_setInt( meindex, CHAR_WHICHTYPE, CHAR_ITEMCHANGENPC); + + //CHAR_setInt( meindex, CHAR_LOOPINTERVAL, NEWNPCMAN_STANDBY); + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTTIME, NowTime.tv_sec); + + return TRUE; +} +//CHAR_setWorkInt(talkerindex,CHAR_WORKSHOPRELEVANT,1); +void NPC_ItemchangeManTalked( int meindex, int talkerindex, char *msg, int color ) +{ + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) + return; + if( NPC_Util_isFaceToFace( meindex ,talkerindex , 2) == FALSE) { + if( NPC_Util_isFaceToChara( talkerindex, meindex, 1) == FALSE) + return; + } + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, 0); + NPC_ItemchangeMan_selectWindow( meindex, talkerindex, ITEMCHANGE_START, -1); + +} + +void NPC_ItemchangeManWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data) +{ + int flg=-1; + if( select == WINDOW_BUTTONTYPE_NO || select == WINDOW_BUTTONTYPE_CANCEL) + return; + switch( seqno) { + case NPC_ITEMCHANGE_START: + break; + case NPC_ITEMCHANGE_SELECT: + NPC_ItemchangeMan_selectWindow( meindex, talkerindex, ITEMCHANGE_SELECT, flg); + break; + case NPC_ITEMCHANGE_MESSAGE: + flg = atoi( data); + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, flg); + NPC_ItemchangeMan_selectWindow( meindex, talkerindex, ITEMCHANGE_MESSAGE, flg); + break; + case NPC_ITEMCHANGE_END: + flg = CHAR_getWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT); + NPC_ItemchangeMan_selectWindow( meindex, talkerindex, ITEMCHANGE_END , flg); + break; + } + +} + +static void NPC_ItemchangeMan_selectWindow( int meindex, int toindex, int num,int select) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + char token[256]; + int buttontype = 0, windowtype = 0, windowno = 0; + int fd = getfdFromCharaIndex( toindex); + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + if(NPC_Util_isFaceToFace( meindex ,toindex , 2) == FALSE) { + if(NPC_Util_isFaceToChara( toindex, meindex, 1) == FALSE) + return; + } + memset( npcarg, 0, sizeof( npcarg)); + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("TRANSER_MAN: GetArgStrErr!!"); + return; + } + memset( token, 0, sizeof( token)); + + switch( num) { + case ITEMCHANGE_START: + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "START_MSG", token, sizeof( token) ) == NULL) { + print("TranserMan Get START_MSG ERROR !"); + return; + } + CHAR_setWorkInt( toindex, CHAR_WORKSHOPRELEVANT, ITEMCHANGE_START); + buttontype = WINDOW_BUTTONTYPE_YESNO; + windowno = NPC_ITEMCHANGE_SELECT; + break; + case ITEMCHANGE_SELECT: + if( ItemchangeMan_GetMenuStr( meindex, toindex, npcarg, token) == FALSE ) + return; + CHAR_setWorkInt( toindex, CHAR_WORKSHOPRELEVANT, ITEMCHANGE_SELECT); + windowtype = WINDOW_MESSAGETYPE_SELECT; + buttontype = WINDOW_BUTTONTYPE_CANCEL; + windowno = NPC_ITEMCHANGE_MESSAGE; + break; + case ITEMCHANGE_MESSAGE: + if( ItemchangeMan_GetNeedStr( meindex, toindex, npcarg, token, select ) == FALSE ) + return; + buttontype = WINDOW_BUTTONTYPE_YESNO; + windowno = NPC_ITEMCHANGE_END; + break; + case ITEMCHANGE_END: + if( ActionNpc_CheckMenuFree( meindex, toindex, npcarg, select ) == FALSE ){ + memset( token, 0, sizeof( token)); + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "FAIL_MSG", token, sizeof( token) ) != NULL) { + CHAR_talkToCli( toindex, meindex, token, CHAR_COLORYELLOW); + } + } + return; + break; + case ITEMCHANGE_ERROR: + break; + } + + lssproto_WN_send( fd, windowtype, buttontype, windowno, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), token); +} + +void NPC_ItemchangeManLoop( int meindex) +{ + +} + +BOOL ItemchangeMan_GetMenuStr( int meindex, int toindex, char *npcarg, char *token) +{ + char buf1[1024], buf2[256], buf3[256]; + char NullName[256] = {"未知的物品"}; + BOOL FINDS=FALSE; + int talkNo=1; + int addID; + if( npcarg == NULL ) return FALSE; + + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "MenuHead", buf1, sizeof( buf1) ) == NULL){ + print("ItemchangeMan Get MenuHead ERROR!"); + return FALSE; + } + + sprintf( token, "%s\n", buf1); + + while( getStringFromIndexWithDelim( npcarg,"}", talkNo, buf1, sizeof( buf1)) != FALSE ) { + char *ItemName; + talkNo++; + + if( NPC_Util_GetStrFromStrWithDelim( buf1, "CHANGEITEM", buf2, sizeof( buf2)) != NULL ){ + addID = atoi( buf2); + if( (ItemName = ITEM_getNameFromNumber( addID)) == NULL ){ + sprintf( buf3, " %s\n", NullName); + }else{ + sprintf( buf3, " %s\n", ItemName); + } + // continue; + }else { + memset( buf3, 0, sizeof( buf3)); + if( NPC_Util_GetStrFromStrWithDelim( buf1, "CHANGEMSG", buf3, sizeof( buf3)) == NULL ) + continue; + strcat( buf3, "\n"); + } + FINDS = TRUE; + strcat( token, buf3); + } + + return FINDS; +} + +BOOL ItemchangeMan_GetNeedStr( int meindex, int toindex, char *npcarg, char *token, int num ) +{ + char buf1[1024], buf2[256], buf3[256]; + char NullName[256] = {"未知的物品"}; + int talkNo=1, addID, i=0; + BOOL FINDS = FALSE; + if( npcarg == NULL ) return FALSE; + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "NeedHead", buf1, sizeof( buf1) ) == NULL){ + print("ItemchangeMan Get NeedHead ERROR!\n%s", npcarg); + return FALSE; + } + sprintf( token, "%s\n", buf1); + if( getStringFromIndexWithDelim( npcarg,"}", num, buf1, sizeof( buf1)) == FALSE ) { + printf("Get NeedMess error !!\n"); + return FALSE; + } + + if( NPC_Util_GetStrFromStrWithDelim( buf1, "NeedItem", buf2, sizeof( buf2) ) != NULL){ + while( getStringFromIndexWithDelim( buf2, ",", talkNo, buf1, sizeof( buf1)) != FALSE ) { + char *ItemName=NULL; + talkNo++; + + addID = atoi( buf1); + FINDS = TRUE; + if( (ItemName = ITEM_getNameFromNumber( addID)) == NULL ){ + sprintf( buf3, "%s ", NullName); + }else{ + sprintf( buf3, "%s ", ItemName); + } + strcat( token, buf3); + if( i%3 == 0 ) + strcat( token, "\n"); + i++; + } + }else { + if( NPC_Util_GetStrFromStrWithDelim( buf1, "NeedMsg", buf2, sizeof( buf2) ) == NULL) + return FALSE; + sprintf( token, "%s ", buf2); + FINDS = TRUE; + } + + if( NPC_Util_GetStrFromStrWithDelim( buf2, "DelGold", buf1, sizeof( buf1)) != NULL ) { + char goldmess[256]; + int gold = atoi( buf1); + if( gold > 0 ) { + sprintf( goldmess, "石币:%d \n", gold); + strcat( token, goldmess); + } + } + + return FINDS; +} +//void ItemchangeMan_CheckMenuFree( int meindex, int toindex, char *npcarg, int nums) +#endif + + diff --git a/gmsv/npc/npc_itemshop.c b/gmsv/npc/npc_itemshop.c new file mode 100644 index 0000000..86b11b8 --- /dev/null +++ b/gmsv/npc/npc_itemshop.c @@ -0,0 +1,1385 @@ +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "lssproto_serv.h" +#include "pet_skill.h" +#include "npc_eventaction.h" +#include "readmap.h" +#include "log.h" +#include "family.h" + +#define MAXSHOPITEM 33 +static void NPC_ItemShop_selectWindow( int meindex, int talker, int num,int select); +void NPC_ItemShop_BuyMain(int meindex,int talker,int before ); + +#ifdef _ADD_FAMILY_TAX // WON ADD 增加庄园税收 + +#else +void NPC_GetItemList(char *argstr,char * argtoken2); + #ifdef _NEW_MANOR_LAW + void NPC_ItemStrStr(int itemID,double rate,char *name,char *token2,int iCostFame,int iChangeItemCost); + #else + void NPC_ItemStrStr(int itemID,double rate,char *name,char *token2); + #endif +#endif + +BOOL NPC_SetNewItem(int meindex,int talker,char *data); +BOOL NPC_SellNewItem(int meindex,int talker,char *data); + +void NPC_ItemShop_Menu(int meindex,int talker); + +#ifdef _NPC_SHOPALTER01 +int NPC_GetLimtItemList(int talker,char *argstr,char *token2,int sell, char* sLimt); //sLimt存放玩家的物品可否卖出,以及价钱,格式为 0|100|10|0|1|50|10|0|1|80|10|0| ,0:可卖,1:不可卖,再来数值为价钱,10为table,0为堆叠 +#else +int NPC_GetLimtItemList(int talker,char *argstr,char *token2,int sell); +#endif + +void NPC_ItemShop_SellMain(int meindex,int talker,int select); +int NPC_GetSellItemList(int itemindex,int flg,char *argstr,char *argtoken,int select,int sell); +#ifdef _NEW_MANOR_LAW +BOOL NPC_AddItemBuy(int meindex, int talker,int itemID,int kosuu,double rate,int iCostFame,int iChangeItemCost); +#else +BOOL NPC_AddItemBuy(int meindex, int talker,int itemID,int kosuu,double rate); +#endif +int NPC_SellItemstrsStr(int itemindex,int flg,double rate,char *argtoken,int select,int sell); +void NPC_LimitItemShop(int meindex,int talker,int select); +void NPC_ExpressmanCheck(int meindex,int talker); + +enum{ + NPC_SHOP_WORK_NO = CHAR_NPCWORKINT1, + NPC_SHOP_WORK_EV = CHAR_NPCWORKINT2, + NPC_SHOP_WORK_EXPRESS = CHAR_NPCWORKINT3, +}; + + + +typedef struct { + char arg[32]; + int type; +}NPC_Shop; + + +static NPC_Shop TypeTable[] = { + { "FIST", 0 }, //拳 + { "AXE", 1 }, //斧 + { "CLUB", 2 }, //棍棒 + { "SPEAR", 3}, //矛 + { "BOW", 4}, //弓 + { "SHIELD", 5}, //盾 + { "HELM", 6 }, //头盔 + { "ARMOUR", 7 }, //盔甲 + { "BRACELET", 8}, //手镯 + { "ANCLET", 9 }, //踝饰 + { "NECKLACE", 10}, //项 + { "RING", 11}, //戒指 + { "BELT", 12}, //腰带 + { "EARRING", 13}, //耳环 + { "NOSERING", 14}, //鼻环 + { "AMULET", 15}, //护身符 + { "OTHER", 16}, + { "BOOMERANG", 17}, //回力标 + { "BOUNDTHROW", 18}, + { "BREAKTHROW", 19}, //投掷物 +#ifdef _ITEM_TYPETABLE + { "DISH", 20}, + { "METAL", 21}, + { "JEWEL", 22}, + { "WARES", 23}, + { "WBELT", 24}, + { "WSHIELD", 25}, + { "WSHOES", 26}, + { "WGLOVE", 27}, + { "ANGELTOKEN", 28}, + { "HEROTOKEN", 29}, +#endif + { "ACCESSORY", 30}, //配件 + { "OFFENCE", 40}, //攻击 + { "DEFENCE", 50}, //防御 + +}; + +BOOL NPC_ItemShopInit( int meindex ) +{ + + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPEITEMSHOP ); + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { + print("GetArgStrErr"); + return FALSE; + } + if(strstr(argstr,"LIMITSHOP") != NULL) { + CHAR_setWorkInt( meindex, NPC_SHOP_WORK_NO, 1); + }else{ + CHAR_setWorkInt( meindex, NPC_SHOP_WORK_NO, 0); + } + if(strstr( argstr, "EVENT") != NULL) { + CHAR_setWorkInt( meindex, NPC_SHOP_WORK_EV, 1); + }else{ + CHAR_setWorkInt( meindex, NPC_SHOP_WORK_EV, 0); + } + if(strstr( argstr, "EXPRESS") != NULL) { + CHAR_setWorkInt( meindex, NPC_SHOP_WORK_EXPRESS, 1); + }else{ + CHAR_setWorkInt( meindex, NPC_SHOP_WORK_EXPRESS, 0); + } + + return TRUE; +} + +void NPC_ItemShopTalked( int meindex , int talker , char *szMes ,int color ) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buff[1024]; + char buf2[256]; + char token[1024]; + int i = 1; + BOOL sellonlyflg = FALSE; + char sellmsg[1024]; + + if( CHAR_getInt( talker , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) { + return; + } + + if(NPC_Util_isFaceToFace( meindex, talker, 2) == FALSE) {//交谈时检查是否面对面 + if( NPC_Util_CharDistance( talker, meindex ) > 1) return; //若距离大於1跳出 + } + + //取得npc买卖设定档内的内容,若为NULL,则错误 + if(NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)) == NULL){ + print("itemshopGetArgStrErr"); + return; + } + + //取得NPC只能卖的讯息 + if( NPC_Util_GetStrFromStrWithDelim( argstr, "sellonly_msg", token, sizeof( token)) != NULL){ + sellonlyflg = TRUE; //NPC不能买玩家的东西 + strcpysafe(sellmsg, sizeof( sellmsg), token);//例如:sellmsg的值可能是->并不是专门收买东西的店。 + } + + //取得玩家买东西的指令. buff为一串买东西指令的字串,例如:买,购买,感谢您,kau,buy,menu,谢谢,买东西,当玩家打出这些字句时,就可以买东西了 + if( NPC_Util_GetStrFromStrWithDelim( argstr, "buy_msg", buff, sizeof( buff)) != NULL ){ + while(getStringFromIndexWithDelim(buff,",",i,buf2,sizeof(buf2)) != FALSE ){ + i++; //若买东西的指令有8个,i就会加到8 + if( strstr( szMes, buf2) != NULL) { + if( CHAR_getWorkInt( meindex, NPC_SHOP_WORK_EV) == 0) { + if( CHAR_getWorkInt( meindex, NPC_SHOP_WORK_NO) == 1) { + if( sellonlyflg ) { + NPC_ItemShop_selectWindow( meindex, talker, 3, -1); + return; + } + }else{ + NPC_ItemShop_selectWindow( meindex, talker, 1, -1); + return; + } + }else{ + if(CHAR_getWorkInt( meindex, NPC_SHOP_WORK_NO) == 1) { + if( sellonlyflg) { + NPC_ItemShop_selectWindow( meindex, talker, 3, -1); + return; + } + }else{ + NPC_ItemShop_selectWindow( meindex, talker, 1, -1); + return; + } + return; + } + } + } + } + i=1; + + //取得玩家卖东西的指令. buff为一串卖东西指令的字串,例如:卖东西,卖,sell,uru 当玩家打出这些字句时,就可以卖东西了 + if( NPC_Util_GetStrFromStrWithDelim( argstr, "sell_msg", buff, sizeof( buff)) != NULL ){ + while( getStringFromIndexWithDelim(buff,",", i,buf2,sizeof(buf2)) != FALSE ){ + i++; + if(strstr(szMes,buf2) != NULL) { + NPC_ItemShop_selectWindow( meindex, talker, 2, -1); + return; + } + } + } + i = 1; + + //其它讯息 + if( NPC_Util_GetStrFromStrWithDelim( argstr, "other_msg", buff, sizeof( buff)) != NULL ){ + while(getStringFromIndexWithDelim( buff, ",", i, buf2, sizeof( buf2)) != FALSE ){ + i++; + if(strstr(szMes,buf2) != NULL) { + if(NPC_Util_GetStrFromStrWithDelim( argstr, "hint_msg", + token, sizeof( token)) != NULL) + { + CHAR_talkToCli( talker, meindex, token, CHAR_COLORWHITE); + return; + } + } + } + } + + if(CHAR_getWorkInt( meindex, NPC_SHOP_WORK_NO) == 1) { + if(CHAR_getWorkInt( meindex, NPC_SHOP_WORK_EV) == 1) { + if( sellonlyflg) { + CHAR_talkToCli( talker, meindex, sellmsg, CHAR_COLORWHITE); + return; + } + }else{ + if( sellonlyflg) { + NPC_ItemShop_selectWindow( meindex, talker, 3, -1); + return; + } + } + }else{ + if(CHAR_getWorkInt( meindex, NPC_SHOP_WORK_EV) == 1) { + if( sellonlyflg) { + CHAR_talkToCli( talker, meindex, sellmsg, CHAR_COLORWHITE); + return; + } + }else{ + if(CHAR_getWorkInt( meindex, NPC_SHOP_WORK_EXPRESS) == 1) { + NPC_ExpressmanCheck( meindex, talker); + }else{ + NPC_ItemShop_selectWindow( meindex, talker, 0, -1); + } + } + } + +} + +static void NPC_ItemShop_selectWindow( int meindex, int talker, int num,int select) +{ + switch( num) { + case 0: + CHAR_send_P_StatusString( talker, CHAR_P_STRING_GOLD);//传送金钱,若100元 送出去的资料格式可能为 P8Nz2|100| + + if(CHAR_getWorkInt( meindex, NPC_SHOP_WORK_EXPRESS) == 1 ) { + if(CHAR_getWorkInt( meindex, NPC_SHOP_WORK_NO) ==0 ) { + NPC_ExpressmanCheck( meindex, talker);//长毛象快递 + } + }else if(CHAR_getWorkInt( meindex, NPC_SHOP_WORK_NO) == 1) { + + }else{ + NPC_ItemShop_Menu( meindex, talker);//选择(买,卖,离开)的小视窗 + } + break; + + case 1://进入买视窗 + CHAR_sendStatusString( talker,"I");//传送玩家身上所有的道具给Client + NPC_ItemShop_BuyMain( meindex, talker, select); + break; + + case 2://进入卖视窗 + CHAR_sendStatusString( talker,"I"); + NPC_ItemShop_SellMain( meindex, talker, select); + break; + + case 3: + NPC_LimitItemShop( meindex, talker, select); + break; + + } +} + +void NPC_ItemShopWindowTalked( int meindex, int talkerindex, + int seqno, int select, char *data) +{ + if( NPC_Util_CharDistance( talkerindex, meindex ) > 3) { + CHAR_send_P_StatusString( talkerindex, CHAR_P_STRING_GOLD); + return; + } + + makeStringFromEscaped( data); + + switch( seqno){ + + case CHAR_WINDOWTYPE_WINDOWITEMSHOP_STARTMSG: + if(atoi( data) == 1 ) NPC_ItemShop_selectWindow(meindex, talkerindex, 1, -1); + if(atoi( data) == 2) NPC_ItemShop_selectWindow(meindex, talkerindex, 2, -1); + if(atoi( data) == 3) return;/*--窒手仄卅中--*/ + break; + case CHAR_WINDOWTYPE_WINDOWITEMSHOP_BUY_MSG: + if(NPC_SetNewItem(meindex , talkerindex, data) == TRUE) { + NPC_ItemShop_selectWindow( meindex, talkerindex, 1, 0); + }else{ + NPC_ItemShop_selectWindow( meindex, talkerindex ,0, -1); + } + + break; + case CHAR_WINDOWTYPE_WINDOWITEMSHOP_SELL_MSG: + if(NPC_SellNewItem(meindex , talkerindex, data) == TRUE) { + NPC_ItemShop_selectWindow( meindex, talkerindex, 2, 0); + + }else{ + NPC_ItemShop_selectWindow( meindex, talkerindex, 0, -1); + } + + break; + + case CHAR_WINDOWTYPE_WINDOWITEMSHOP_LIMIT: + if(select == WINDOW_BUTTONTYPE_YES) { + NPC_ItemShop_selectWindow( meindex, talkerindex ,2, -1); + + }else if(select == WINDOW_BUTTONTYPE_NO) { + return; + }else if(select == WINDOW_BUTTONTYPE_OK) { + NPC_ItemShop_selectWindow( meindex, talkerindex, 2, -1); + } + break; + + case CHAR_WINDOWTYPE_WINDOWITEMSHOP_EXPRESS: + if(atoi(data) == 2) { + NPC_ItemShop_selectWindow( meindex, talkerindex, 1, -1); + }else if(atoi( data) == 4) { + NPC_ItemShop_selectWindow( meindex, talkerindex, 2, -1); + } + } +} + +void NPC_ItemShop_BuyMain(int meindex,int talker,int before ) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char token[NPC_UTIL_GETARGSTR_BUFSIZE]; + int fd = getfdFromCharaIndex( talker); + + char token2[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buff2[256]; + char buff[256]; + +#ifdef _NPC_SHOPALTER01 + char sLimt[1024]; //存放玩家物品可否卖出及价钱 + char tokentemp[NPC_UTIL_GETARGSTR_BUFSIZE]; //与token功能相同 + float fdata; //转换sell_rate为数值 +#endif + + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { + print("itemshop_GetArgStr_Err"); + return; + } +#ifdef _ADD_STATUS_2 + sprintf(token,"FAME|%d",CHAR_getInt(talker,CHAR_FAME)/100); + lssproto_S2_send(fd,token); +#endif + if(before != -1) { + sprintf(token,"0|0"); + + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_ITEMSHOPMAIN, + WINDOW_BUTTONTYPE_NONE, + CHAR_WINDOWTYPE_WINDOWITEMSHOP_BUY_MSG, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + }else{ + + NPC_Util_GetStrFromStrWithDelim( argstr, "main_msg", buff, sizeof( buff)); + NPC_Util_GetStrFromStrWithDelim( argstr, "buy_main", buff2, sizeof( buff2)); + + sprintf(token,"0|1|%d|%s|%s|%s|", CHAR_WINDOWTYPE_WINDOWITEMSHOP_STARTMSG, + CHAR_getChar( meindex, CHAR_NAME), buff, buff2); + + NPC_Util_GetStrFromStrWithDelim( argstr, "what_msg", buff, sizeof( buff)); + NPC_Util_GetStrFromStrWithDelim( argstr, "level_msg", buff2, sizeof( buff)); + + snprintf( token2, sizeof( token2), "%s|%s", buff, buff2); + + strncat( token, token2, sizeof( token)); + + NPC_Util_GetStrFromStrWithDelim( argstr, "realy_msg", buff, sizeof( buff)); + NPC_Util_GetStrFromStrWithDelim( argstr, "itemfull_msg", buff2, sizeof( buff2)); + + sprintf( token2, "|%s|%s", buff, buff2); + strncat(token , token2,sizeof(token)); + strcpy(token2, "|"); + +#ifdef _ADD_FAMILY_TAX // WON ADD 增加庄园税收 + +#else + NPC_GetItemList( argstr, token2); +#endif + strncat( token, token2, sizeof( token)); + } + +#ifdef _NPC_SHOPALTER01 + sprintf(tokentemp,"%s",""); + sprintf(sLimt,"%s",""); + NPC_GetLimtItemList( talker, argstr, tokentemp, -1, sLimt);//详细玩家要卖出的道具资料 + fdata = atof(NPC_Util_GetStrFromStrWithDelim( argstr, "sell_rate", buff, sizeof( buff))); + fdata *= 100; //原本资料为小数,Client端处理的为整数,所以乘以100 + sprintf(token,"%suseritem|%d%s", token, (int)fdata, sLimt);//原本的字串後再加上sell_rate,与sLimt资料 +#endif + + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_ITEMSHOPMAIN, + WINDOW_BUTTONTYPE_NONE, + CHAR_WINDOWTYPE_WINDOWITEMSHOP_BUY_MSG, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + +} + +#ifdef _ADD_FAMILY_TAX // WON ADD 增加庄园税收 + +#else +void NPC_GetItemList(char *argstr,char *argtoken) +#endif +{ + int i = 1; + int tmp; + char *name ; + char buff2[256]; +#ifdef _NEW_MANOR_LAW + char buff3[NPC_UTIL_GETARGSTR_LINEMAX]; + char buff4[256]; + char buff5[NPC_UTIL_GETARGSTR_LINEMAX]; + char buff6[256]; + int iCostFame = 0; + int iChangeItemCost = 0; +#endif + char buff[NPC_UTIL_GETARGSTR_LINEMAX]; + char token2[NPC_UTIL_GETARGSTR_BUFSIZE]; + double rate = 1.0; + int loopcnt = 0; + + if(NPC_Util_GetStrFromStrWithDelim( argstr, "buy_rate", buff2, sizeof( buff2)) + != NULL){ + rate = atof( buff2); + } +#ifdef _NEW_MANOR_LAW + memset(buff3,0,sizeof(buff3)); + memset(buff5,0,sizeof(buff5)); + if(NPC_Util_GetStrFromStrWithDelim(argstr,"CostFame",buff3,sizeof(buff3)) == NULL) iCostFame = -1; + if(NPC_Util_GetStrFromStrWithDelim(argstr,"ChangeItemCost",buff5,sizeof(buff5)) == NULL) iChangeItemCost = -1; +#endif + if( NPC_Util_GetStrFromStrWithDelim( argstr, "ItemList", buff, sizeof( buff)) != NULL ){ + while( getStringFromIndexWithDelim(buff,",",i,buff2,sizeof(buff2)) !=FALSE ) { +#ifdef _NEW_MANOR_LAW + if(iCostFame > -1){ + if(getStringFromIndexWithDelim(buff3,",",i,buff4,sizeof(buff4)) != FALSE) iCostFame = atoi(buff4); + } + if(iChangeItemCost > -1){ + if(getStringFromIndexWithDelim(buff5,",",i,buff6,sizeof(buff6)) != FALSE) iChangeItemCost = atoi(buff6); + } +#endif + i++; + if(strstr( buff2, "-") == NULL) { + name = ITEM_getNameFromNumber( atoi(buff2)); + if(name == NULL) continue; + loopcnt++; + if(loopcnt == MAXSHOPITEM) break; + +#ifdef _ADD_FAMILY_TAX // WON ADD 增加庄园税收 + +#else + #ifdef _NEW_MANOR_LAW + NPC_ItemStrStr( atoi( buff2), rate, name, token2,iCostFame,iChangeItemCost); + #else + NPC_ItemStrStr( atoi( buff2), rate, name, token2); + #endif +#endif + strncat( argtoken, token2, sizeof(token2)); + }else{ + int start; + int end; + getStringFromIndexWithDelim( buff2, "-", 1, token2, sizeof(token2)); + start = atoi( token2); + getStringFromIndexWithDelim( buff2, "-", 2 ,token2, sizeof(token2)); + end = atoi( token2); + if(start > end){ + tmp = start; + start = end; + end = tmp; + } + end++; + for(; start < end ; start++ ) { + /*--引内 蟆 --*/ + + name = ITEM_getNameFromNumber( start ); + if(name == NULL) continue; + loopcnt++; + if(loopcnt == MAXSHOPITEM) break; + +#ifdef _ADD_FAMILY_TAX // WON ADD 增加庄园税收 + +#else + #ifdef _NEW_MANOR_LAW + NPC_ItemStrStr( start, rate, name, token2,iCostFame,iChangeItemCost); + #else + NPC_ItemStrStr( start, rate, name, token2); + #endif +#endif + strncat( argtoken, token2, sizeof(token2)); + } + } + } + } +} + +#ifdef _ADD_FAMILY_TAX // WON ADD 增加庄园税收 + +#else + #ifdef _NEW_MANOR_LAW + void NPC_ItemStrStr(int itemID,double rate,char *name,char *token2,int iCostFame,int iChangeItemCost) + #else + void NPC_ItemStrStr(int itemID,double rate,char *name,char *token2) + #endif +#endif +{ + + int gold; + int level; + int graNo; + char info[1024]; + char escape[256]; + +#ifdef _ADD_FAMILY_TAX // WON ADD 增加庄园税收(改九大庄园时要修改) + +#else + #ifdef _NEW_MANOR_LAW + if(iChangeItemCost > -1) gold = iChangeItemCost; + else + #endif + gold = ITEM_getcostFromITEMtabl( itemID); +#endif + level = ITEM_getlevelFromITEMtabl( itemID); + graNo = ITEM_getgraNoFromITEMtabl( itemID); + strcpy(escape,ITEM_getItemInfoFromNumber( itemID)); + gold=(int)(gold * rate); + + makeEscapeString( escape, info, sizeof( info)); + makeEscapeString( name, escape, sizeof( escape)); +#ifdef _NEW_MANOR_LAW + sprintf(token2,"%s|0|%d|%d|%d|%s|%d|",escape,level,gold,graNo,info,iCostFame < 0 ? -1:iCostFame/100); +#else + sprintf( token2, "%s|0|%d|%d|%d|%s|", escape, level, gold, graNo, info); +#endif +} + +BOOL NPC_SetNewItem(int meindex,int talker,char *data) +{ + + char buf[1024]; + char buff2[128]; +#ifdef _NEW_MANOR_LAW + char buff3[1024]; + char buff4[128]; + char buff5[1024]; + char buff6[128]; + int iCostFame = 0; + int iChangeItemCost = 0; +#endif + int i = 1, j = 1; + int select; + int kosuu = 0; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + double rate = 1.0; + int gold = 0; + int kosuucnt = 0; + int itemindex; + + /*--忒匀化五凶犯□正毛本伊弁玄午蜊醒卞坌荸--*/ + getStringFromIndexWithDelim( data, "|", 1, buf, sizeof( buf)); + select = atoi(buf); + if(select == 0) return FALSE; + getStringFromIndexWithDelim( data, "|", 2, buf, sizeof( buf)); + kosuu = atoi(buf); + if( kosuu <= 0 ) return FALSE; + + /*--蜊醒及民尼永弁 癫卞蝈 月井"-*/ + for( i = CHAR_STARTITEMARRAY ; i < CHAR_MAXITEMHAVE ; i++ ) { + itemindex = CHAR_getItemIndex( talker , i ); + if( !ITEM_CHECKINDEX( itemindex) ) { + kosuucnt++; + } + } + + /*--忒匀化 凶蜊醒及 互 端及蜊醒 扔□田础 方曰聂中午云井仄中及匹--*/ + /*--扔□田□础及 毛 木月--*/ + if( kosuucnt < kosuu) kosuu = kosuucnt; + + /*--未夫及桦宁反巨仿□--*/ + if(kosuucnt == 0 ) return FALSE; + + i = 1; + + /*--云饕及白央奶伙 中坭反白央奶伙互钒仃卅井匀凶午五反蔽 --*/ + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { + print("shop_GetArgStr_Err"); + return FALSE; + } + + /*---伊□玄毛潸 卅仃木壬1.0)-*/ + if(NPC_Util_GetStrFromStrWithDelim( argstr, "buy_rate", buf, sizeof( buf)) != NULL) { + rate= atof( buf); + } + +#ifdef _NEW_MANOR_LAW + memset(buff3,0,sizeof(buff3)); + memset(buff5,0,sizeof(buff5)); + if(NPC_Util_GetStrFromStrWithDelim(argstr,"CostFame",buff3,sizeof(buff3)) == NULL) iCostFame = -1; + if(NPC_Util_GetStrFromStrWithDelim(argstr,"ChangeItemCost",buff5,sizeof(buff5)) == NULL) iChangeItemCost = -1; +#endif + + /*--失奶 丞及馨笛毛垫丹午仇欠-*/ + if( NPC_Util_GetStrFromStrWithDelim( argstr, "ItemList", buf, sizeof( buf)) != NULL ){ + while(getStringFromIndexWithDelim(buf , "," , j, buff2, sizeof(buff2)) != FALSE ){ +#ifdef _NEW_MANOR_LAW + if(iCostFame > -1){ + if(getStringFromIndexWithDelim(buff3,",",j,buff4,sizeof(buff4)) != FALSE) iCostFame = atoi(buff4); + } + if(iChangeItemCost > -1){ + if(getStringFromIndexWithDelim(buff5,",",j,buff6,sizeof(buff6)) != FALSE) iChangeItemCost = atoi(buff6); + } +#endif + j++; + /*-- "-"互殖引木化中月井升丹井--*/ + if(strstr( buff2, "-") == NULL) { + if( ITEM_getcostFromITEMtabl(atoi(buff2)) !=-1) { + if ( i == select) { + /*---失奶 丞及综岳---*/ + /*--蜊醒坌综岳--*/ +#ifdef _NEW_MANOR_LAW + if(NPC_AddItemBuy(meindex, talker,atoi(buff2),kosuu,rate,iCostFame,iChangeItemCost) != TRUE) +#else + if(NPC_AddItemBuy(meindex, talker,atoi(buff2),kosuu,rate) != TRUE) +#endif + { + return FALSE; + } + return TRUE; + } + i++; + } + }else{ + /*--失奶 丞互 15-25 及溥匹霜日木凶桦宁--*/ + int start; + int end; + + /* "-"匹嗉濠日木凶铵户及醒袄午 及醒袄毛潸 --*/ + getStringFromIndexWithDelim( buff2, "-", 1, argstr, sizeof(argstr)); + start = atoi( argstr); + getStringFromIndexWithDelim( buff2, "-", 2 ,argstr, sizeof(argstr)); + end = atoi( argstr); + end++; + + /*-- 寞互菅卞卅匀化中凶日} 木赘尹月**/ + if(start > end){ + gold = start; + start = end; + end = gold; + } + + /*--"-"匹嗉濠日木凶坌及失奶 丞毛树 毛 月--*/ + for(; start < end ; start++ ) { + if( ITEM_getcostFromITEMtabl( start) != -1) { + if ( i == select) { + /*---失奶 丞及综岳---*/ + /*--蜊醒坌综岳--*/ +#ifdef _NEW_MANOR_LAW + if(NPC_AddItemBuy(meindex, talker, start, kosuu, rate,iCostFame,iChangeItemCost) != TRUE) +#else + if(NPC_AddItemBuy(meindex, talker, start, kosuu, rate) != TRUE) +#endif + { + return FALSE; + } + return TRUE; + } + i++; + } + } + } + } + } + + return FALSE; + +} + +/*--------------------------------------------- + *失奶 丞及馨笛毛垫丹 + *--------------------------------------------*/ +#ifdef _NEW_MANOR_LAW +BOOL NPC_AddItemBuy(int meindex, int talker,int itemID,int kosuu,double rate,int iCostFame,int iChangeItemCost) +#else +BOOL NPC_AddItemBuy(int meindex, int talker,int itemID,int kosuu,double rate) +#endif +{ + + int itemindex; + int i; + int gold; + int ret; + int maxgold; +#ifdef _NEW_MANOR_LAW + int iTotalCostFame = -1; +#endif +#ifdef _ADD_FAMILY_TAX // WON ADD 增加庄园税收(改九大庄园时要修改) + +#else + #ifdef _NEW_MANOR_LAW + if(iChangeItemCost > -1) gold = iChangeItemCost; + else + #endif + gold = ITEM_getcostFromITEMtabl( itemID); + gold = (int)(gold * rate); +#endif + + maxgold = gold * kosuu; + if(CHAR_getInt( talker, CHAR_GOLD) < maxgold ) return FALSE; +#ifdef _NEW_MANOR_LAW + if(iCostFame > 0){ + iTotalCostFame= iCostFame * kosuu; + if(CHAR_getInt(talker,CHAR_FAME) < iTotalCostFame) return FALSE; + } +#endif + + + for(i = 0 ; i < kosuu ; i++){ + itemindex = ITEM_makeItemAndRegist( itemID); + + if(itemindex == -1) return FALSE; + ret = CHAR_addItemSpecificItemIndex( talker, itemindex); + if( ret < 0 || ret >= CHAR_MAXITEMHAVE ) { + print( "npc_itemshop.c: additem error itemindex[%d]\n", itemindex); + ITEM_endExistItemsOne( itemindex); + return FALSE; + } + CHAR_sendItemDataOne( talker, ret); + } + CHAR_DelGold( talker, maxgold); +#ifdef _NEW_MANOR_LAW + if(iTotalCostFame > 0){ + CHAR_setInt(talker,CHAR_FAME,CHAR_getInt(talker,CHAR_FAME) - iTotalCostFame); + if(CHAR_getInt(talker,CHAR_FMINDEX) != -1 && (strcmp(CHAR_getChar(talker,CHAR_FMNAME),""))){ + int fd = getfdFromCharaIndex(talker); + char buf[256]; + sprintf(buf,"%d",CHAR_getInt(talker,CHAR_FAME)); + saacproto_ACFixFMData_send(acfd, + CHAR_getChar(talker,CHAR_FMNAME), + CHAR_getInt(talker,CHAR_FMINDEX), + CHAR_getWorkInt(talker,CHAR_WORKFMINDEXI), + FM_FIX_FAME,buf,"", + CHAR_getWorkInt(talker,CHAR_WORKFMCHARINDEX), + CONNECT_getFdid(fd)); + LogFMFameShop(CHAR_getChar(talker,CHAR_FMNAME), + CHAR_getChar(talker,CHAR_CDKEY), + CHAR_getChar(talker,CHAR_NAME), + CHAR_getInt(talker,CHAR_FAME), + iTotalCostFame); + } + } +#endif + //CHAR_send_P_StatusString( talker, CHAR_P_STRING_GOLD); + return TRUE; + +} + +//选择 (买,卖,出去) 的小视窗 +void NPC_ItemShop_Menu(int meindex,int talker) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char token[NPC_UTIL_GETARGSTR_LINEMAX]; + char buff[256]; + int fd = getfdFromCharaIndex( talker); + +#ifdef _NPC_SHOPALTER01 + char sLimt[1024]; //存放玩家物品可否卖出及价钱 + char tokentemp[NPC_UTIL_GETARGSTR_BUFSIZE]; //与token功能相同 + float fdata; //转换sell_rate为数值 +#endif + + //argstr取得整个设定档的讯息: 例如->buy_rate:1.0|sell_rate:0.2|buy_msg:买,购买,感谢您,kau,buy............. (中间的分格号是读入时加入的) + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { + print("shop_GetArgStr_Err"); + return; + } + + //token为视窗上面的title文字 例如: 萨姆吉尔的防具店|欢迎光临 + NPC_Util_GetStrFromStrWithDelim( argstr, "main_msg", buff, sizeof( buff)); +#ifdef _NEW_MANOR_LAW + snprintf(token, sizeof(token),"%s|%s|%d",CHAR_getChar(meindex,CHAR_NAME),buff,CHAR_getInt(talker,CHAR_FAME)/100); +#else + snprintf(token, sizeof(token),"%s|%s",CHAR_getChar( meindex, CHAR_NAME), buff); +#endif + +#ifdef _NPC_SHOPALTER01 + sprintf(tokentemp,"%s",""); + sprintf(sLimt,"%s",""); + NPC_GetLimtItemList( talker, argstr, tokentemp, -1, sLimt);//详细玩家要卖出的道具资料 + fdata = atof(NPC_Util_GetStrFromStrWithDelim( argstr, "sell_rate", buff, sizeof( buff))); + fdata *= 100; //原本资料为小数,Client端处理的为整数,所以乘以100 + sprintf(token,"%suseritem|%d%s", token, (int)fdata, sLimt);//原本的字串後再加上sell_rate,与sLimt资料 +#endif + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_ITEMSHOPMENU, + WINDOW_BUTTONTYPE_NONE, + CHAR_WINDOWTYPE_WINDOWITEMSHOP_STARTMSG, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + +} + +void NPC_ItemShop_SellMain(int meindex,int talker,int before) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char token[NPC_UTIL_GETARGSTR_BUFSIZE]; + int fd = getfdFromCharaIndex( talker); + + //取得npc设定资料 + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { + print("shop_GetArgStr_Err"); + return; + } + +#ifdef _ADD_STATUS_2 + sprintf(token,"FAME|%d",CHAR_getInt(talker,CHAR_FAME)/100); + lssproto_S2_send(fd,token); +#endif + + if(before != -1) { + sprintf(token,"1|0"); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_ITEMSHOPMAIN + +CHAR_getWorkInt(meindex,NPC_SHOP_WORK_NO), + WINDOW_BUTTONTYPE_NONE, + CHAR_WINDOWTYPE_WINDOWITEMSHOP_SELL_MSG, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + + }else{ + + char token2[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buff2[256]; + char buff[256]; + + NPC_Util_GetStrFromStrWithDelim( argstr, "main_msg", buff, sizeof( buff)); + NPC_Util_GetStrFromStrWithDelim( argstr, "sell_main", buff2, sizeof( buff)); + sprintf( token, "1|1|%d|%s|%s|%s|", CHAR_WINDOWTYPE_WINDOWITEMSHOP_STARTMSG, + CHAR_getChar( meindex, CHAR_NAME), buff, buff2); + + NPC_Util_GetStrFromStrWithDelim( argstr, "stone_msg", buff, sizeof( buff)); + + if(CHAR_getWorkInt(meindex,NPC_SHOP_WORK_EXPRESS) == 1 ) { + NPC_Util_GetStrFromStrWithDelim( argstr, "exrealy_msg", buff2, sizeof(buff2)); + }else{ + NPC_Util_GetStrFromStrWithDelim( argstr, "realy_msg", buff2, sizeof( buff2)); + } + sprintf( token2,"%s|%s|", buff, buff2); +#ifdef _NPC_SHOPALTER01 + NPC_GetLimtItemList( talker,argstr, token2, -1, NULL);//详细玩家要卖出的道具资料 +#else + NPC_GetLimtItemList( talker,argstr, token2, -1);//详细玩家要卖出的道具资料 +#endif + strncat( token, token2, sizeof( token)); + + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_ITEMSHOPMAIN+ + CHAR_getWorkInt(meindex,NPC_SHOP_WORK_NO), + WINDOW_BUTTONTYPE_NONE, + CHAR_WINDOWTYPE_WINDOWITEMSHOP_SELL_MSG, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + + } +} +#ifdef _NPC_SHOPALTER01 +int NPC_GetLimtItemList(int talker, char *argstr, char* token2,int sell, char* sLimt)//sLimt:玩家可卖物品的字串 +#else +int NPC_GetLimtItemList(int talker, char *argstr, char* token2,int sell) +#endif +{ + + char token[NPC_UTIL_GETARGSTR_LINEMAX]; + char buff[NPC_UTIL_GETARGSTR_LINEMAX]; + char token3[NPC_UTIL_GETARGSTR_LINEMAX]; + int k = 0 , i = 1 , j = 0; + int imax; + int itemtype = 0; + int itemindex; + int okflg = 0; + char buf[256]; + int flg=0; + int cost; + +#ifdef _NPC_SHOPALTER01 + char sbuf[256]; //取得sLimt前,用sbuf取得每一项资料,再存入sLimt +#endif + + + if(sell == -1 ){ + i = CHAR_STARTITEMARRAY; + imax = CHAR_MAXITEMHAVE; + flg = -1; + }else{ + i= sell; + imax= sell + 1; + flg = 1; + } + + for( ; i < imax ; i++ ){ + okflg=0; + itemindex = CHAR_getItemIndex( talker , i ); + + if( ITEM_CHECKINDEX( itemindex) ){ + if( NPC_Util_GetStrFromStrWithDelim( argstr,"LimitItemType", buff, sizeof( buff)) != NULL ){ + k = 1; + while(getStringFromIndexWithDelim(buff , "," , k, token, sizeof(token)) != FALSE ){ +#ifdef _ITEM_TYPETABLE + int cmpmaxitem = sizeof(TypeTable)/sizeof(TypeTable[0]); +#endif + k++; +#ifdef _ITEM_TYPETABLE + for(j = 0 ; j < cmpmaxitem ; j++){ +#else + for(j = 0 ; j < ITEM_CATEGORYNUM+3 ; j++){ +#endif + if(strcmp( TypeTable[ j].arg , token) == 0 ) { + itemtype = TypeTable[ j].type; + if(ITEM_getInt(itemindex,ITEM_TYPE) == itemtype) { + cost = NPC_GetSellItemList(itemindex,0,argstr,token3,i,sell); + if(cost != -1) return cost; + strncat( token2, token3, sizeof( token3)); +#ifdef _NPC_SHOPALTER01 + print("Change->itemtype = %d",itemtype); + print("Change->token2:%s\n",token2); + print("Change->token3:%s\n",token3); + if( sLimt ) + { + if( getStringFromIndexWithDelim(token3 , "|" , 2, sbuf, sizeof( sbuf)) ){ + sprintf(sLimt,"%s|%s",sLimt,sbuf); + if( getStringFromIndexWithDelim(token3 , "|" , 3, sbuf, sizeof( sbuf)) ){ + sprintf(sLimt,"%s|%s",sLimt,sbuf); + if( getStringFromIndexWithDelim(token3 , "|" , 6, sbuf, sizeof( sbuf)) ){ + sprintf(sLimt,"%s|%s",sLimt,sbuf); + if( getStringFromIndexWithDelim(token3 , "|" , 7, sbuf, sizeof( sbuf)) ){ + sprintf(sLimt,"%s|%s",sLimt,sbuf); + } + } + } + } + } +#endif + okflg = 1; + }else if(itemtype == 30){ + if( 8 <= ITEM_getInt(itemindex,ITEM_TYPE) + && (ITEM_getInt(itemindex,ITEM_TYPE) <= 15) ){ + cost = NPC_GetSellItemList(itemindex,0,argstr,token3,i,sell); + if(cost != -1) return cost; + strncat(token2,token3,sizeof(token3)); +#ifdef _NPC_SHOPALTER01 + print("Change->itemtype = 30"); + print("Change->token2:%s\n",token2); + print("Change->token3:%s\n",token3); + if( sLimt ) + { + if( getStringFromIndexWithDelim(token3 , "|" , 2, sbuf, sizeof( sbuf)) ){ + sprintf(sLimt,"%s|%s",sLimt,sbuf); + if( getStringFromIndexWithDelim(token3 , "|" , 3, sbuf, sizeof( sbuf)) ){ + sprintf(sLimt,"%s|%s",sLimt,sbuf); + if( getStringFromIndexWithDelim(token3 , "|" , 6, sbuf, sizeof( sbuf)) ){ + sprintf(sLimt,"%s|%s",sLimt,sbuf); + if( getStringFromIndexWithDelim(token3 , "|" , 7, sbuf, sizeof( sbuf)) ){ + sprintf(sLimt,"%s|%s",sLimt,sbuf); + } + } + } + } + } +#endif + okflg = 1; + } + }else if(itemtype == 40){ + if(( 0 <= ITEM_getInt(itemindex,ITEM_TYPE) + && (ITEM_getInt(itemindex,ITEM_TYPE) <= 4)) + || (17 <= ITEM_getInt(itemindex,ITEM_TYPE) + && (ITEM_getInt(itemindex,ITEM_TYPE) <= 19))) { + cost = NPC_GetSellItemList(itemindex,0,argstr,token3,i,sell); + if(cost != -1) return cost; + strncat(token2,token3,sizeof(token3)); +#ifdef _NPC_SHOPALTER01 + print("Change->itemtype = 40"); + print("Change->token2:%s\n",token2); + print("Change->token3:%s\n",token3); + if( sLimt ) + { + if( getStringFromIndexWithDelim(token3 , "|" , 2, sbuf, sizeof( sbuf)) ){ + sprintf(sLimt,"%s|%s",sLimt,sbuf); + if( getStringFromIndexWithDelim(token3 , "|" , 3, sbuf, sizeof( sbuf)) ){ + sprintf(sLimt,"%s|%s",sLimt,sbuf); + if( getStringFromIndexWithDelim(token3 , "|" , 6, sbuf, sizeof( sbuf)) ){ + sprintf(sLimt,"%s|%s",sLimt,sbuf); + if( getStringFromIndexWithDelim(token3 , "|" , 7, sbuf, sizeof( sbuf)) ){ + sprintf(sLimt,"%s|%s",sLimt,sbuf); + } + } + } + } + } +#endif + okflg = 1; + } + }else if(itemtype == 50){ + if( 5 <= ITEM_getInt(itemindex,ITEM_TYPE) + && (ITEM_getInt(itemindex,ITEM_TYPE) <= 7) ){ + cost = NPC_GetSellItemList(itemindex,0,argstr,token3,i,sell); + if(cost != -1) return cost; + strncat(token2,token3,sizeof(token3)); +#ifdef _NPC_SHOPALTER01 + print("Change->itemtype = 50"); + print("Change->token2:%s\n",token2); + print("Change->token3:%s\n",token3); + if( sLimt ) + { + if( getStringFromIndexWithDelim(token3 , "|" , 2, sbuf, sizeof( sbuf)) ){ + sprintf(sLimt,"%s|%s",sLimt,sbuf); + if( getStringFromIndexWithDelim(token3 , "|" , 3, sbuf, sizeof( sbuf)) ){ + sprintf(sLimt,"%s|%s",sLimt,sbuf); + if( getStringFromIndexWithDelim(token3 , "|" , 6, sbuf, sizeof( sbuf)) ){ + sprintf(sLimt,"%s|%s",sLimt,sbuf); + if( getStringFromIndexWithDelim(token3 , "|" , 7, sbuf, sizeof( sbuf)) ){ + sprintf(sLimt,"%s|%s",sLimt,sbuf); + } + } + } + } + } +#endif + okflg = 1; + } + } + break; + } + } + + if(okflg == 1) break; + } + } + if( (NPC_Util_GetStrFromStrWithDelim( argstr, "LimitItemNo", buff,sizeof( buff))!= NULL) && okflg == 0 ){ + k = 1; + while(getStringFromIndexWithDelim(buff , "," , k, token, sizeof(token)) != FALSE ){ + k++; + if(strstr( token, "-")==NULL && strcmp(token,"") != 0) { + if(ITEM_getInt(itemindex,ITEM_ID) == atoi(token)) { + cost = NPC_GetSellItemList(itemindex,0,argstr,token3,i,sell); + if(cost != -1) return cost; + strncat(token2,token3,sizeof(token3)); +#ifdef _NPC_SHOPALTER01 + print("Change->1\n"); + print("Change->token2:%s\n",token2); + print("Change->token3:%s\n",token3); + if( sLimt ) + { + if( getStringFromIndexWithDelim(token3 , "|" , 2, sbuf, sizeof( sbuf)) ){ + sprintf(sLimt,"%s|%s",sLimt,sbuf); + if( getStringFromIndexWithDelim(token3 , "|" , 3, sbuf, sizeof( sbuf)) ){ + sprintf(sLimt,"%s|%s",sLimt,sbuf); + if( getStringFromIndexWithDelim(token3 , "|" , 6, sbuf, sizeof( sbuf)) ){ + sprintf(sLimt,"%s|%s",sLimt,sbuf); + if( getStringFromIndexWithDelim(token3 , "|" , 7, sbuf, sizeof( sbuf)) ){ + sprintf(sLimt,"%s|%s",sLimt,sbuf); + } + } + } + } + } +#endif + okflg=1; + } + }else if (strstr( token, "-") != NULL){ + int start, end; + int work; + + if( getStringFromIndexWithDelim( token, "-", 1, buf, sizeof(buf)) == FALSE ) + return -1; + start = atoi( buf); + if( getStringFromIndexWithDelim( token, "-", 2 ,buf, sizeof(buf)) == FALSE ) + return -1; + end = atoi( buf); + + if(start > end){ + work = start; + start = end; + end = work; + } + + end++; + if( (start <= ITEM_getInt(itemindex,ITEM_ID)) && (ITEM_getInt(itemindex,ITEM_ID) < end) ){ + cost = NPC_GetSellItemList(itemindex,0,argstr,token3,i,sell); + if(cost != -1) return cost; + strncat(token2,token3,sizeof(token3)); +#ifdef _NPC_SHOPALTER01 + print("Change->2\n"); + print("Change->token2:%s\n",token2); + print("Change->token3:%s\n",token3); + if( sLimt ) + { + if( getStringFromIndexWithDelim(token3 , "|" , 2, sbuf, sizeof( sbuf)) ){ + sprintf(sLimt,"%s|%s",sLimt,sbuf); + if( getStringFromIndexWithDelim(token3 , "|" , 3, sbuf, sizeof( sbuf)) ){ + sprintf(sLimt,"%s|%s",sLimt,sbuf); + if( getStringFromIndexWithDelim(token3 , "|" , 6, sbuf, sizeof( sbuf)) ){ + sprintf(sLimt,"%s|%s",sLimt,sbuf); + if( getStringFromIndexWithDelim(token3 , "|" , 7, sbuf, sizeof( sbuf)) ){ + sprintf(sLimt,"%s|%s",sLimt,sbuf); + } + } + } + } + } +#endif + okflg = 1; + } + } + } + } + + if(okflg == 0) { + cost = NPC_GetSellItemList(itemindex, 1, argstr, token3, i, sell); + if(sell != -1) return -1; + strncat( token2, token3, sizeof( token3)); +#ifdef _NPC_SHOPALTER01 + print("Change->4\n"); + print("Change->token2:%s\n",token2); + print("Change->token3:%s\n",token3); + if( sLimt ) + { + if( getStringFromIndexWithDelim(token3 , "|" , 2, sbuf, sizeof( sbuf)) ){ + sprintf(sLimt,"%s|%s",sLimt,sbuf); + if( getStringFromIndexWithDelim(token3 , "|" , 3, sbuf, sizeof( sbuf)) ){ + sprintf(sLimt,"%s|%s",sLimt,sbuf); + if( getStringFromIndexWithDelim(token3 , "|" , 6, sbuf, sizeof( sbuf)) ){ + sprintf(sLimt,"%s|%s",sLimt,sbuf); + if( getStringFromIndexWithDelim(token3 , "|" , 7, sbuf, sizeof( sbuf)) ){ + sprintf(sLimt,"%s|%s",sLimt,sbuf); + } + } + } + } + } +#endif + } + + } + } + return -1; +} + + + +/*---------------------------------------------------------- + + 弁仿奶失件玄卞霜耨允月皿夫玄戊伙及综岳 + + *----------------------------------------------------------*/ +int NPC_GetSellItemList(int itemindex,int flg, char *argstr,char *argtoken,int select,int sell) +{ + char buff[256]; + double rate = 0.2; + char buff2[256]; + char buff3[64]; + int k = 1; + int cost = -1; + + if(NPC_Util_GetStrFromStrWithDelim( argstr,"special_item",buff, sizeof( buff)) != NULL){ + if(NPC_Util_GetStrFromStrWithDelim( argstr,"special_rate",buff2, sizeof( buff2)) != NULL ){ + rate = atof(buff2); + }else{ + rate = 1.2; + } + + while(getStringFromIndexWithDelim(buff , "," , k, buff2, sizeof(buff2)) !=FALSE ){ + k++; + if(strstr( buff2, "-") == NULL && strcmp(buff2,"") != 0) { + if(ITEM_getInt(itemindex,ITEM_ID) == atoi(buff2)){ + cost = NPC_SellItemstrsStr( itemindex,0, rate, argtoken,select,sell); + return cost; + } + }else if (strstr( buff2, "-") != NULL){ + int start; + int end; + int work; + getStringFromIndexWithDelim( buff2, "-", 1, buff3, sizeof(buff3)); + start = atoi( buff3); + getStringFromIndexWithDelim( buff2, "-", 2 ,buff3, sizeof(buff3)); + end = atoi( buff3); + + if(start > end){ + work = start; + start = end; + end = work; + } + end++; + if( (start <= ITEM_getInt(itemindex,ITEM_ID)) && (ITEM_getInt(itemindex,ITEM_ID) < end) ){ + cost = NPC_SellItemstrsStr( itemindex,0, rate, argtoken,select,sell); + return cost; + } + } + } + } + if( NPC_Util_GetStrFromStrWithDelim( argstr,"sell_rate",buff, sizeof( buff)) != NULL ){ + rate = atof(buff); + cost = NPC_SellItemstrsStr( itemindex, flg ,rate, argtoken,select,sell); + return cost; + } + + return cost; +} + +int NPC_SellItemstrsStr(int itemindex,int flg,double rate,char *argtoken,int select,int sell) +{ + int cost; + char escapedname[256]; + char name[256]; + char *eff; + + + cost = ITEM_getInt( itemindex, ITEM_COST); + cost = (int)(cost * rate); + + if(sell != -1) return cost; + + strcpy( escapedname, ITEM_getChar( itemindex, ITEM_SECRETNAME)); + makeEscapeString( escapedname, name, sizeof( name)); + eff=ITEM_getChar(itemindex, ITEM_EFFECTSTRING); + makeEscapeString( eff, escapedname, sizeof(escapedname)); + + + + sprintf( argtoken, +#ifdef _ITEM_PILENUMS + "%s|%d|%d|%d|%s|%d|%d|", +#else + "%s|%d|%d|%d|%s|%d|", +#endif + name, flg, cost, + ITEM_getInt( itemindex, ITEM_BASEIMAGENUMBER), + escapedname, select +#ifdef _ITEM_PILENUMS + ,ITEM_getInt( itemindex, ITEM_USEPILENUMS) +#endif + ); + + return -1; + +} + +BOOL NPC_SellNewItem(int meindex,int talker,char *data) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char token[256], token2[256]; + int cost, k, select, itemindex; + int MyGold, MaxGold, sellnum=1; + + MaxGold = CHAR_getMaxHaveGold( talker); + MyGold = CHAR_getInt( talker, CHAR_GOLD); + + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { + print("GetArgStrErr"); + return FALSE; + } + getStringFromIndexWithDelim(data , "|" ,1, token, sizeof( token)); + select = atoi(token); +#ifdef _ITEM_PILENUMS + getStringFromIndexWithDelim(data , "|" ,2, token, sizeof( token)); + sellnum = atoi(token); +#endif + + if( select < CHAR_STARTITEMARRAY || select >= CHAR_MAXITEMHAVE ) return FALSE; + k = select; + itemindex = CHAR_getItemIndex( talker , k); +#ifdef _NPC_SHOPALTER01 + cost = NPC_GetLimtItemList( talker,argstr, token2,select, NULL); +#else + cost = NPC_GetLimtItemList( talker,argstr, token2,select); +#endif + if( cost == -1 || (cost*sellnum)+MyGold >= MaxGold || !ITEM_CHECKINDEX( itemindex) ){ + int fd = getfdFromCharaIndex( talker); + sprintf(token,"\n\n哎呀!对不起" "\n\n对不起啊 ! 可不可以再选一次呢?" ); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + CHAR_WINDOWTYPE_WINDOWITEMSHOP_LIMIT, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + return FALSE; + } +#ifdef _ITEM_PILENUMS + if( NPC_DelItem( talker, k, sellnum) == FALSE ) return FALSE; +#else + { + LogItem( + CHAR_getChar( talker, CHAR_NAME ), + CHAR_getChar( talker, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), +#endif + "Sell(卖道具)", + CHAR_getInt( talker,CHAR_FLOOR), + CHAR_getInt( talker,CHAR_X ), + CHAR_getInt( talker,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + + ); + } + CHAR_DelItem( talker, k); +#endif + CHAR_AddGold( talker, cost*sellnum); + CHAR_send_P_StatusString( talker, CHAR_P_STRING_GOLD); + return TRUE; +} + + + +void NPC_LimitItemShop(int meindex,int talker,int select) +{ + + int fd = getfdFromCharaIndex( talker); + char token[NPC_UTIL_GETARGSTR_LINEMAX]; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[1024]; + + if( NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { + print("shop_GetArgStr_Err"); + return; + } + + if(NPC_Util_GetStrFromStrWithDelim( argstr, "sellonly_msg", buf, sizeof( buf))!=NULL){ + sprintf(token,"\n\n%s", buf); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_YESNO, + CHAR_WINDOWTYPE_WINDOWITEMSHOP_LIMIT, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + + }else{ + CHAR_talkToCli( talker, meindex, "这是买卖专门店。",CHAR_COLORWHITE); + } + return; +} + +void NPC_ExpressmanCheck(int meindex,int talker) +{ + int fd = getfdFromCharaIndex( talker); + char token[1024]; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[1024]; + + if( NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { + print("shop_GetArgStr_Err"); + return; + } + NPC_Util_GetStrFromStrWithDelim( argstr, "main_msg", buf, sizeof( buf)); + sprintf(token,"4\n       %s\n\n%s" + "\n\n     < 打工 >   " + "\n\n     <交付行李>" + ,CHAR_getChar(meindex,CHAR_NAME),buf); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_SELECT, + WINDOW_BUTTONTYPE_CANCEL, + CHAR_WINDOWTYPE_WINDOWITEMSHOP_EXPRESS, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + + return; + + +} + diff --git a/gmsv/npc/npc_janken.c b/gmsv/npc/npc_janken.c new file mode 100644 index 0000000..93ebc7a --- /dev/null +++ b/gmsv/npc/npc_janken.c @@ -0,0 +1,517 @@ +#include "version.h" +#include +#include "common.h" +#include "char_base.h" +#include "npc_janken.h" +#include "npcutil.h" +#include "char.h" +#include "lssproto_serv.h" +#include "buf.h" +#include "function.h" +#include "readmap.h" +#include "object.h" +#include "log.h" + +/* + *元扎氏仃氏 + */ +static void NPC_Janken_selectWindow( int meindex, int talker, int num); +void NPC_JnakenJudge(int meindex,int talker,int sel); +BOOL NPC_JankenEntryItemCheck(int talker,char *buf); +BOOL NPC_JankenEntryItemDel(int talker,char *buf); +void NPC_WarpPointGet(int meindex,int talker,int *fl,int *x,int *y,int judge); + + +/********************************* +* 赓渝质 +*********************************/ +BOOL NPC_JankenInit( int meindex ) +{ + + //正奶皿毛本永玄 + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPEJANKEN ); + + return TRUE; + +} + + +/********************************* +* 仄井仃日木凶凛及质 +*********************************/ +void NPC_JankenTalked( int meindex , int talkerindex , char *szMes , + int color ) +{ + /* 皿伊奶乩□卞覆仄化分仃 杀允月 */ + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) { + return; + } + + /* ㄠ弘伉永玉动 及心 */ + if( NPC_Util_CharDistance( talkerindex, meindex ) > 1) return; + + NPC_Janken_selectWindow(meindex, talkerindex, 0); + + + + +} + + + +/****************************** + * 公木冗木及质 卞坌仃月 + ******************************/ +static void NPC_Janken_selectWindow( int meindex, int talker, int num) +{ + + char token[1024]; + char buf[32]; + int fd = getfdFromCharaIndex( talker); + int buttontype=0; + int windowtype=0; + int windowno=0; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + + + /*--它奶件玉它正奶皿丢永本□斥互云云中及匹燮卞涩烂--*/ + windowtype=WINDOW_MESSAGETYPE_MESSAGE; + + /*--涩烂白央奶伙毛 心 心--*/ + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr))==NULL){ + print("NPC_janken Init: GetArgStrErr"); + return ; + } + + + switch( num) + { + case 0: + + /*-- 旦正□玄及丢永本□斥互 仃木壬巨仿□ 憎 --*/ + if(NPC_Util_GetStrFromStrWithDelim( argstr, "MainMsg", token, sizeof( token)) + == NULL) + { + print("Janken:MainMsg:%s", CHAR_getChar( meindex, CHAR_NAME)); + return ; + } + + /*--蓟 --*/ + buttontype = WINDOW_BUTTONTYPE_YESNO; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_JANKEN_START; + break; + + + case 1: + + //失奶 丞及民尼永弁 + if(NPC_Util_GetStrFromStrWithDelim( argstr, "EntryItem", + buf, sizeof( buf)) + != NULL) { + + if(NPC_JankenEntryItemCheck(talker,buf) == FALSE) + { + NPC_Janken_selectWindow(meindex, talker, 3); + } + + //巨件玄伉迕及失奶 丞毛绰轮 + if(NPC_JankenEntryItemDel(talker,buf) == FALSE){ + print("元扎氏仃氏ERR:失奶 丞壅仄卞仄匀天中"); + } + } + + + /*--蓟 --*/ + sprintf(token," 剪刀石头布!!\n" + "\n\n 《 石头 》" + "\n\n 《 剪刀 》" + "\n\n 《 布 》" + ); + + buttontype=WINDOW_BUTTONTYPE_NONE; + windowtype=WINDOW_MESSAGETYPE_SELECT; + windowno=CHAR_WINDOWTYPE_JANKEN_MAIN; + break; + + case 2: + /*--丐中仇蓟 --*/ + //sprintf(token," 丐中仇匹″″\n" + sprintf(token," 平手再来!!\n" + "\n\n 《 石头 》" + "\n\n 《 剪刀 》" + "\n\n 《 布 》" + ); + + buttontype=WINDOW_BUTTONTYPE_NONE; + windowtype=WINDOW_MESSAGETYPE_SELECT; + windowno=CHAR_WINDOWTYPE_JANKEN_MAIN; + break; + + case 3: + /*-- 旦正□玄及丢永本□斥互 仃木壬巨仿□ 憎 --*/ + NPC_Util_GetStrFromStrWithDelim( argstr, "NoItem", token, sizeof( token)); + + buttontype=WINDOW_BUTTONTYPE_OK; + windowtype=WINDOW_MESSAGETYPE_MESSAGE; + windowno=CHAR_WINDOWTYPE_JANKEN_END; + + break; + + } + + +// makeEscapeString( token, escapedname, sizeof(escapedname)); + /*-仇仇匹霜耨允月--*/ + lssproto_WN_send( fd, windowtype, + buttontype, + windowno, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + + + +} + + + +/********************************* +* 它奴件玉它丢永本□斥卞覆允月质 +*********************************/ +void NPC_JankenWindowTalked( int meindex, int talkerindex, + int seqno, int select, char *data) +{ + /* ㄠ弘伉永玉动 及心 */ + if( NPC_Util_CharDistance( talkerindex, meindex ) > 1) return; + + switch( seqno){ + case CHAR_WINDOWTYPE_JANKEN_START: + + if(select==WINDOW_BUTTONTYPE_YES){ + NPC_Janken_selectWindow(meindex, talkerindex, 1); + } + break; + + case CHAR_WINDOWTYPE_JANKEN_MAIN: + if (atoi(data) >= 3){ + NPC_JnakenJudge(meindex,talkerindex,atoi(data) ); + } + break; + } +} + + +/* + *斥乓件弗件及 烂 + */ +void NPC_JnakenJudge(int meindex,int talker,int sel) +{ + int player=-1; + int jankenman; + char j_char[3][8]={" 石头 "," 剪刀 "," 布 "}; + char token[1024]; + int shouhai = 0; + int fd = getfdFromCharaIndex( talker); + int fl=0,x=0,y=0; + + + if(sel == 3) player = 0; //弘□ + if(sel == 5) player = 1; //民亦平 + if(sel == 7) player = 2; //由□ + + jankenman = rand()%3; + + switch(jankenman){ + case 0: + if(player == 2){ + shouhai = 1; + }else if(player == 1){ + shouhai = 2; + } + break; + + case 1: + if(player == 0){ + shouhai = 1; + }else if(player == 2){ + shouhai = 2; + } + break; + + case 2: + if(player == 1){ + shouhai = 1; + }else if(player == 0){ + shouhai = 2; + } + break; + } + + if(shouhai == 1){ + //Change add 玩家猜胜了给的道具 + NPC_JankenItemGet( meindex, talker, "WinItem" ); + + NPC_WarpPointGet(meindex, talker, &fl, &x, &y, 0); + + snprintf( token, sizeof( token ) , + " ~ 结 果 ~ \n\n" + " %16s %-16s\n" + " [%s] VS [%s]\n\n\n" + " %-16s 胜利", + CHAR_getChar(meindex,CHAR_NAME),CHAR_getChar(talker,CHAR_NAME), + j_char[jankenman],j_char[player], + CHAR_getChar(talker,CHAR_NAME) + ); + +// CHAR_talkToCli( talker , -1 ,token , CHAR_COLORCYAN ); + + //伐□皿 + CHAR_warpToSpecificPoint(talker, fl, x, y); + + // 匀凶午五反>减少=及失弁扑亦件毛允月[ + CHAR_sendWatchEvent( CHAR_getWorkInt( talker, CHAR_WORKOBJINDEX), + CHAR_ACTPLEASURE,NULL,0,TRUE); + CHAR_setWorkInt( talker, CHAR_WORKACTION, CHAR_ACTPLEASURE); + + }else if(shouhai == 2){ + + //Change add 玩家猜输了给的道具 + NPC_JankenItemGet( meindex, talker, "LoseItem" ); + + NPC_WarpPointGet(meindex, talker, &fl, &x, &y, 1); + snprintf( token, sizeof( token ) , + " ~ 结 果 ~ \n\n" + " %16s %-16s\n" + " [%s] VS [%s]\n\n\n" + " %-16s 输了", + CHAR_getChar(meindex,CHAR_NAME),CHAR_getChar(talker,CHAR_NAME), + j_char[jankenman],j_char[player], + CHAR_getChar(talker,CHAR_NAME) + ); +// CHAR_talkToCli( talker , -1 ,token , CHAR_COLORCYAN ); + + //伐□皿 + CHAR_warpToSpecificPoint(talker, fl, x, y); + + // 仃凶午五反> 仄中=失弁扑亦件毛允月 + CHAR_sendWatchEvent( CHAR_getWorkInt( talker, CHAR_WORKOBJINDEX), + CHAR_ACTSAD,NULL,0,TRUE); + CHAR_setWorkInt( talker, CHAR_WORKACTION, CHAR_ACTSAD); + + + }else{ + //仇仇卞仁月午丐中仇 + NPC_Janken_selectWindow( meindex, talker, 2); + return; + } + + //霜耨 + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + CHAR_WINDOWTYPE_JANKEN_END, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + + + +} + + +/* + *伐□皿燮毛GET允月[ + */ +void NPC_WarpPointGet(int meindex,int talker,int *fl,int *x,int *y,int judge) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char *strbuf[2] = {"WinWarp","LoseWarp"}; + char buf[64]; + char buf2[32]; + + /*--涩烂白央奶伙毛 心 心--*/ + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr))==NULL){ + print("NPC_janken Init: GetArgStrErr"); + return ; + } + + + /*--伐□皿燮毛潸 --*/ + NPC_Util_GetStrFromStrWithDelim( argstr, strbuf[judge], buf, sizeof( buf)); + getStringFromIndexWithDelim(buf,",",1,buf2,sizeof(buf2)); + *fl=atoi(buf2); + getStringFromIndexWithDelim(buf,",",2,buf2,sizeof(buf2)); + *x=atoi(buf2); + getStringFromIndexWithDelim(buf,",",3,buf2,sizeof(buf2)); + *y=atoi(buf2); + + +} + +/* + *--失奶 丞及民尼永弁分仃毛垫丹 + */ +BOOL NPC_JankenEntryItemCheck(int talker,char *buf) +{ + + char buf2[512]; + char buf3[256]; + int id=0; + BOOL flg = FALSE; + int i; + int itemindex; + int itemno; + int kosuu; + int cnt=0; + int k=1; + + while(getStringFromIndexWithDelim(buf , "," , k, buf2, sizeof(buf2)) + !=FALSE ) + { + flg = FALSE; + k++; + + if(strstr(buf2,"*") != NULL){ + cnt = 0; + getStringFromIndexWithDelim(buf2,"*",1,buf3,sizeof(buf3)); + itemno = atoi(buf3); + getStringFromIndexWithDelim(buf2,"*",2,buf3,sizeof(buf3)); + kosuu = atoi(buf3); + + for( i=0 ; i < CHAR_MAXITEMHAVE;i++ ){ + itemindex = CHAR_getItemIndex( talker , i ); + if( ITEM_CHECKINDEX(itemindex) ){ + id = ITEM_getInt(itemindex ,ITEM_ID ); + if(itemno == id){ + cnt++; + if(cnt == kosuu){ + flg = TRUE; + break; + } + } + } + } + if(flg == FALSE) + { + return FALSE; + } + }else{ + itemno = atoi(buf2); + + for( i=0 ; i < CHAR_MAXITEMHAVE;i++ ){ + itemindex = CHAR_getItemIndex( talker , i ); + if( ITEM_CHECKINDEX(itemindex) ){ + id = ITEM_getInt(itemindex ,ITEM_ID ); + if(itemno == id){ + flg = TRUE; + break; + } + } + } + + if(flg == FALSE) + { + return FALSE; + } + } + } + + return TRUE; + +} + +BOOL NPC_JankenEntryItemDel(int talker,char *buf) +{ + + int i = 1, j = 1,k = 1; + char buff3[128]; + char buf2[32]; + int itemindex; + + while(getStringFromIndexWithDelim(buf , "," , k, buff3, sizeof(buff3)) !=FALSE ){ + k++; + if(strstr(buff3, "*") !=NULL){ + int itemno; + int kosuu; + int id; + int cnt=0; + getStringFromIndexWithDelim(buff3,"*",1,buf2,sizeof(buf2)); + itemno = atoi(buf2); + getStringFromIndexWithDelim(buff3,"*",2,buf2,sizeof(buf2)); + kosuu = atoi(buf2); + for( i =0 ; i < CHAR_MAXITEMHAVE ; i++ ){ + itemindex = CHAR_getItemIndex( talker , i ); + if( ITEM_CHECKINDEX(itemindex) ){ + id=ITEM_getInt(itemindex ,ITEM_ID ); + if(itemno==id){ + cnt++; + LogItem( + CHAR_getChar( talker, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( talker, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID), /* 失奶 丞 寞 */ +#endif + "QuizDelItem(猜谜->交出道具)", + CHAR_getInt( talker, CHAR_FLOOR), + CHAR_getInt( talker, CHAR_X ), + CHAR_getInt( talker, CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + CHAR_DelItem( talker, i); + if(cnt == kosuu){ + break; + } + } + } + } + }else{ + /*--蓟氏分 寞及失奶 丞毛蓟请---*/ + for( j = 0 ; j < CHAR_MAXITEMHAVE ; j++){ + itemindex = CHAR_getItemIndex( talker ,j); + + if( ITEM_CHECKINDEX(itemindex) ){ + if( atoi( buff3) == ITEM_getInt(itemindex,ITEM_ID)){ + LogItem( + CHAR_getChar( talker, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( talker, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID), /* 失奶 丞 寞 */ +#endif + "QuizDelItem(猜谜->交出道具)", + CHAR_getInt( talker,CHAR_FLOOR), + CHAR_getInt( talker,CHAR_X ), + CHAR_getInt( talker,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + CHAR_DelItem( talker, j); + } + } + } + } + } + + return TRUE; +} + +BOOL NPC_JankenItemGet(int meindex,int talker, char *wl) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[64]; + + /*--涩烂白央奶伙毛 心 心--*/ + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr))==NULL){ + print("NPC_janken ItemGet: GetArgStrErr"); + return ; + } + + if(NPC_Util_GetStrFromStrWithDelim( argstr, wl, buf, sizeof( buf) ) !=NULL){ + NPC_EventAddItem( meindex, talker, buf); + } +} + diff --git a/gmsv/npc/npc_luckyman.c b/gmsv/npc/npc_luckyman.c new file mode 100644 index 0000000..5d2e3bf --- /dev/null +++ b/gmsv/npc/npc_luckyman.c @@ -0,0 +1,239 @@ +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "lssproto_serv.h" +#include "npc_luckyman.h" + + +static void NPC_LuckyMan_selectWindow( int meindex, int toindex, int num,char *msg); +void NPC_LuckyManAllHeal( int talker,int mode ); +BOOL NPC_LuckyManLevelCheck(int meindex,int talker); +void NPC_LuckyDisp(int meindex,int talker); +BOOL NPC_LuckyCostCheck(int meindex,int talker,int cost); +int NPC_GetMoney(int meindex,int talker,char *buf); + + + +/********************************* +* 赓渝质 +*********************************/ +BOOL NPC_LuckyManInit( int meindex ) +{ + + /*--平乓仿及正奶皿毛涩烂--**/ + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPELUCKYMAN ); + + return TRUE; +} + + + + +/********************************* +* 仄井仃日木凶凛及质 +*********************************/ +void NPC_LuckyManTalked( int meindex , int talkerindex , char *szMes ,int color ) +{ + + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[256]; + char token[512]; + int cost; + + + + /*-- 及蟆卞中月井升丹井"--*/ + if(NPC_Util_isFaceToFace( meindex ,talkerindex ,2) == FALSE) { + /* ㄠ弘伉永玉动 及心 */ + if(NPC_Util_isFaceToChara( talkerindex, meindex, 1) == FALSE) return; + } + + /*--涩烂白央奶伙毛 心 心--*/ + if(NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)) == NULL) { + print("NPC_ExChange.c TypeCheck: GetArgStrErr\n"); + print("NPCName=%s\n", CHAR_getChar( meindex, CHAR_NAME)); + return; + } + + + NPC_Util_GetStrFromStrWithDelim( argstr,"Stone", buf, sizeof( buf)); + cost = NPC_GetMoney( meindex, talkerindex, buf); + + NPC_Util_GetStrFromStrWithDelim( argstr,"main_msg", buf, sizeof( buf)); + sprintf( token, buf, cost); + + NPC_LuckyMan_selectWindow( meindex, talkerindex, 2, token); + +} + + +static void NPC_LuckyMan_selectWindow( int meindex, int toindex, int num,char *msg) +{ + + int fd = getfdFromCharaIndex( toindex); + char token[1024]; + int buttontype = 0,windowtype = 0,windowno = 0; + + + switch( num){ + case 1: + sprintf(token ,"       ☆今日的运势☆ " + "\n\n%s",msg + ); + buttontype = WINDOW_BUTTONTYPE_OK; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_WINDOWPETSHOP_START; + break; + + case 2: + sprintf(token, "        ☆占卜师☆ " + "\n\n%s",msg + ); + buttontype = WINDOW_BUTTONTYPE_YESNO; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_WINDOWPETSHOP_START; + break; + + case 3: + sprintf(token, "        ☆占卜师☆ " + "\n\n%s",msg + ); + buttontype = WINDOW_BUTTONTYPE_OK; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_WINDOWPETSHOP_START; + break; + } + + + /*--霜耨--*/ + lssproto_WN_send( fd, windowtype, + buttontype, + windowno, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + + +} + + +/*----------------------------------------- +弁仿奶失件玄井日忒匀化五凶凛卞裟太请今木月[ +-------------------------------------------*/ +void NPC_LuckyManWindowTalked( int meindex, int talkerindex, + int seqno, int select, char *data) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[256]; + int money; + int level; + + /*--涩烂白央奶伙毛 心 心--*/ + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { + print("NPC_ExChange.c TypeCheck: GetArgStrErr\n"); + print("NPCName=%s\n", CHAR_getChar(meindex,CHAR_NAME)); + return; + } + + switch( seqno){ + case CHAR_WINDOWTYPE_WINDOWPETSHOP_START: + if(select == WINDOW_BUTTONTYPE_YES) { + NPC_Util_GetStrFromStrWithDelim( argstr, "Stone", buf,sizeof(buf)); + + if(strstr(buf,"LV") != NULL) { + char buff2[32]; + level = CHAR_getInt( talkerindex, CHAR_LV); + getStringFromIndexWithDelim( buf, "*", 2, buff2,sizeof( buff2)); + money = level * atoi( buff2); + + if(NPC_LuckyCostCheck(meindex,talkerindex,money) == FALSE) { + NPC_Util_GetStrFromStrWithDelim( argstr,"NoMoney", buf, sizeof( buf)); + NPC_LuckyMan_selectWindow( meindex, talkerindex, 3, buf); + return; + } + }else{ + money = atoi( buf); + if(NPC_LuckyCostCheck(meindex,talkerindex ,money) == FALSE) { + NPC_Util_GetStrFromStrWithDelim( argstr,"NoMoney", buf,sizeof( buf)); + NPC_LuckyMan_selectWindow( meindex, talkerindex, 3, buf); + return; + } + } + + CHAR_DelGold( talkerindex, money ); + + CHAR_send_P_StatusString( talkerindex, CHAR_P_STRING_GOLD); + NPC_LuckyDisp( meindex, talkerindex); + + }else if(select == WINDOW_BUTTONTYPE_OK) { + + } + break; + } +} + + + +void NPC_LuckyDisp(int meindex,int talker) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[16]; + char token[1024]; + char buf2[512]; + int i = 1; + + /*--涩烂白央奶伙毛 心 心--*/ + if(NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)) == NULL) { + print("NPC_Savepoint.c Init: GetArgStrErr"); + return; + } + + /*--扪毛苇月--*/ + sprintf( buf, "luck%d", CHAR_getInt( talker, CHAR_LUCK)); + NPC_Util_GetStrFromStrWithDelim( argstr, buf, buf2, sizeof( buf2)); + + while(getStringFromIndexWithDelim( buf2, ",", i, token, sizeof( token)) + != FALSE) + { + i++; + } + i--; + i = rand()%i + 1; + + /*--仿件母丞匹丢永本□斥毛 憎今六月--*/ + getStringFromIndexWithDelim( buf2,",", i, token, sizeof( token)); + NPC_LuckyMan_selectWindow( meindex, talker, 1, token); +} + + +/*---云嗯及民尼永弁-**/ +BOOL NPC_LuckyCostCheck(int meindex,int talker,int cost) +{ + /*--蜇箕反移涩烂---*/ + /*---云嗯互箫曰月井升丹井及民尼永弁---*/ + if(CHAR_getInt( talker, CHAR_GOLD) < cost) { + return FALSE; + } + return TRUE; + +} + + +int NPC_GetMoney(int meindex,int talker,char *buf) +{ + int level; + int money; + + if(strstr(buf,"LV") != NULL) { + char buff2[32]; + level = CHAR_getInt(talker,CHAR_LV); + getStringFromIndexWithDelim( buf, "*" ,2, buff2,sizeof( buff2)); + money = level * atoi( buff2); + }else{ + money = atoi( buf); + } + return money; + +} diff --git a/gmsv/npc/npc_makepair.c b/gmsv/npc/npc_makepair.c new file mode 100644 index 0000000..7a8b3fd --- /dev/null +++ b/gmsv/npc/npc_makepair.c @@ -0,0 +1,542 @@ +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "npc_transerman.h" +#include "lssproto_serv.h" +#include "saacproto_cli.h" +#include "readmap.h" +#include "battle.h" +#include "log.h" +#include "enemy.h" +#include "handletime.h" +#include "npc_makepair.h" +#include "npc_eventaction.h" + +#ifdef _NPC_MAKEPAIR +#define MAXPAIRNUMS 30 +PairMenu PairList[2][MAXPAIRNUMS]; + +enum { + WINDOW_START=10, + WINDOW_USER, + WINDOW_SELECT, //心理测验 + WINDOW_PAIR, //配对找对象 + WINDOW_PAIROK, + WINDOW_PAIRNO, + WINDOW_WARP, //跳跃 + WINDOW_END, //结束 + WINDOW_TALKSTART=20, + WINDOW_TALKSELECT, + WINDOW_TALKPAIR, + WINDOW_RETURN, + WINDOW_TALKEND, +}; +enum { + NPC_WORK_CURRENTTIME = CHAR_NPCWORKINT1, + NPC_WORK_PAIRTEAMS = CHAR_NPCWORKINT2, +/* + NPC_WORK_ROUTEPOINT = CHAR_NPCWORKINT3, + NPC_WORK_ROUNDTRIP = CHAR_NPCWORKINT4, + NPC_WORK_MODE = CHAR_NPCWORKINT5, + NPC_WORK_CURRENTROUTE = CHAR_NPCWORKINT6, + NPC_WORK_ROUTEMAX = CHAR_NPCWORKINT7, + NPC_WORK_WAITTIME = CHAR_NPCWORKINT8, + NPC_WORK_CURRENTTIME = CHAR_NPCWORKINT9, + NPC_WORK_SEFLG = CHAR_NPCWORKINT10, +*/ +}; +#define MAKEPAIR_STANDBY 100*60 +static void NPC_MakePair_selectWindow( int meindex, int toindex, int num,int select); +BOOL MakePairMan_GetMenuStr( int meindex, int toindex, char *npcarg, char *token); +void CheckPairUsers( int *male, int *female); +BOOL NPC_PairForage( int meindex, int toindex, char *arg, char *token); +BOOL NPC_PairRegister( int toindex); +void NPC_PairUserAndWarp( int meindex, int toindex, int forindex, char *arg); +int NPC_getPairCode( int toindex); +int NPC_getTitleMsg( int meindex, int toindex, char *arg, char *token, int title); +int NPC_getNextTitle( int meindex, int toindex, char *arg, int title, int select); + + +BOOL NPC_MakePairManInit( int meindex ) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + int i; + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("err NPC_MakePairMan: GetArgStrErr!!"); + return FALSE; + } + CHAR_setInt( meindex, CHAR_WHICHTYPE, CHAR_MAKEPAIR); + CHAR_setInt( meindex, CHAR_LOOPINTERVAL, MAKEPAIR_STANDBY); + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTTIME, NowTime.tv_sec); + CHAR_setWorkInt( meindex, NPC_WORK_PAIRTEAMS, 0); + + for( i=0; i 0){ + CHAR_setWorkInt( toindex, CHAR_MYPAIRINDEX, -1); + sprintf( token, "取消前一次的邀请。"); + }else { + char buf1[256]; + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "FREE", buf1, sizeof( buf1) ) != NULL) { + if( NPC_ActionPassCheck( meindex, toindex, buf1) == FALSE ){ + CHAR_talkToCli( toindex, meindex, "条件不足!", CHAR_COLORYELLOW); + return; + } + } + NPC_PairForage( meindex, toindex, npcarg, token); + } + buttontype = WINDOW_BUTTONTYPE_OK; + windowno = WINDOW_TALKEND; + } + break; + case WINDOW_PAIROK: //同意 + if( CHAR_getWorkInt( toindex, CHAR_MYPAIRFLG) > 0){ + int forindex = CHAR_getWorkInt( toindex, CHAR_MYPAIRINDEX); + NPC_PairUserAndWarp( meindex, toindex, forindex, npcarg); + } + return; + case WINDOW_PAIRNO://不同意 + { + int forindex = CHAR_getWorkInt( toindex, CHAR_MYPAIRINDEX); + if( CHAR_CHECKINDEX( forindex) ){ + if( CHAR_getWorkInt( forindex, CHAR_MYPAIRFLG) > 0 ){ + CHAR_talkToCli( forindex, meindex, "对方拒绝邀请。", CHAR_COLORYELLOW); + CHAR_setWorkInt( forindex, CHAR_MYPAIRINDEX, -1); + CHAR_setWorkInt( forindex, CHAR_MYPAIRFLG, -1); + } + } + CHAR_setWorkInt( toindex, CHAR_MYPAIRINDEX, -1); + CHAR_setWorkInt( toindex, CHAR_MYPAIRFLG, -1); + CHAR_talkToCli( toindex, meindex, "拒绝对方邀请。", CHAR_COLORYELLOW); + return; + } + break; + case WINDOW_WARP: + break; + case WINDOW_END: + break; + } + lssproto_WN_send( fd, windowtype, buttontype, windowno, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), token); +} + +void NPC_MakePairManWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) + return; + memset( npcarg, 0, sizeof( npcarg)); + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("err NPC_MakePairMan: GetArgStrErr!!"); + return; + } + switch( seqno) { + case WINDOW_TALKSTART: + { + int choose=atoi( data); + if( select == WINDOW_BUTTONTYPE_CANCEL || select == WINDOW_BUTTONTYPE_NO) + return; + switch( choose){ + case 1://查人数 + NPC_MakePair_selectWindow( meindex, talkerindex, WINDOW_USER, 0); + break; + case 2://配对 + NPC_MakePair_selectWindow( meindex, talkerindex, WINDOW_PAIR, 0); + break; + case 3://心理测验 + NPC_MakePair_selectWindow( meindex, talkerindex, WINDOW_SELECT, 0); + break; + } + } + + break; + case WINDOW_TALKSELECT: + { + int title = CHAR_getWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT); + title = NPC_getNextTitle( meindex, talkerindex, npcarg, title, select); + if( title < 0 ) return ; + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, title); + NPC_MakePair_selectWindow( meindex, talkerindex, WINDOW_SELECT, select); + } + break; + case WINDOW_TALKPAIR://配对邀请回覆 + if( select == WINDOW_BUTTONTYPE_CANCEL || select == WINDOW_BUTTONTYPE_NO){ + NPC_MakePair_selectWindow( meindex, talkerindex, WINDOW_PAIRNO, 0); + }else { + NPC_MakePair_selectWindow( meindex, talkerindex, WINDOW_PAIROK, 0); + } + break; + case WINDOW_RETURN: + NPC_MakePair_selectWindow( meindex, talkerindex, WINDOW_START, 0); + break; + case WINDOW_TALKEND: + break; + } +} +void NPC_MakePairManLoop( int meindex) +{ + int i; + for( i=0; i 0 ){ + if( !CHAR_CHECKINDEX( PairList[0][i].pindex) ){ + PairList[0][i].pindex = -1; + PairList[0][i].use = -1; + } + } + if( PairList[1][i].use > 0 ){ + if( !CHAR_CHECKINDEX( PairList[1][i].pindex) ){ + PairList[1][i].pindex = -1; + PairList[1][i].use = -1; + } + } + } +} + +BOOL MakePairMan_GetMenuStr( int meindex, int toindex, char *npcarg, char *token) +{ + char buf1[1024], buf2[256], buf3[256]; + BOOL FINDS=FALSE; + int talkNo=1; + if( npcarg == NULL ) return FALSE; + + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "MenuHead", buf1, sizeof( buf1) ) == NULL){ + return FALSE; + } + sprintf( token, "%s\n", buf1); + + sprintf( buf1, "MEMU%d", talkNo); + while( NPC_Util_GetStrFromStrWithDelim( npcarg, buf1, buf2, sizeof( buf2)) != NULL ) { + talkNo++; + sprintf( buf1, "MEMU%d", talkNo); + FINDS = TRUE; + sprintf( buf3, " %s\n", buf2); + strcat( token, buf3); + } + return FINDS; +} + +void CheckPairUsers( int *male, int *female) +{ + int i; + *male = 0; + *female = 0; + for( i=0; i 0 ) *male+=1; + if( PairList[1][i].use > 0 ) *female+=1; + } +} + +BOOL NPC_PairForage( int meindex, int toindex, char *arg, char *token) +{ + char buf1[256]; + int i; + int codes = CHAR_getWorkInt( toindex, CHAR_MYPAIRCODE); + int Psex = CHAR_getSexInt( CHAR_getInt( toindex, CHAR_BASEBASEIMAGENUMBER) ); + Psex = (Psex==1)?1:0; + + + for( i=0; i 0 ) continue; + name = CHAR_getChar( PairList[Psex][i].pindex, CHAR_NAME); + cdKey = CHAR_getChar( PairList[Psex][i].pindex, CHAR_CDKEY); + if( strcmp( PairList[Psex][i].name, name) || strcmp( PairList[Psex][i].cdKey, cdKey) ){ + PairList[Psex][i].use = -1; + PairList[Psex][i].forindex = -1; + continue; + } + sprintf( token, "你的配对对象为: %s\n已送出邀请,请等候对方回应。", name); + if( NPC_Util_GetStrFromStrWithDelim( arg, "InviteMsg", buf1, sizeof( buf1) ) == NULL){ + break; + } + PairList[Psex][i].forindex = toindex; + fd = getfdFromCharaIndex( PairList[Psex][i].pindex); + + CHAR_setWorkInt( toindex, CHAR_MYPAIRFLG, 1); + CHAR_setWorkInt( toindex, CHAR_MYPAIRINDEX, PairList[Psex][i].pindex); + CHAR_setWorkInt( PairList[Psex][i].pindex, CHAR_MYPAIRFLG, 2); + CHAR_setWorkInt( PairList[Psex][i].pindex, CHAR_MYPAIRINDEX, toindex); + + name = CHAR_getChar( toindex, CHAR_NAME); + sprintf( buf, "%s:\n玩家%s\n%s", CHAR_getChar( meindex, CHAR_NAME),name, buf1); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, WINDOW_BUTTONTYPE_OKCANCEL, WINDOW_TALKPAIR, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), buf); + break; + } + if( i>= MAXPAIRNUMS ) { + if( NPC_Util_GetStrFromStrWithDelim( arg, "NoPairMsg", buf1, sizeof( buf1) ) != NULL){ + sprintf( token, "%s",buf1); + }else { + sprintf( token, "没有找到对象。"); + } + if( CHAR_getWorkInt( toindex, CHAR_MYPAIRFLG) <= 0 ) { + NPC_PairRegister( toindex); + } + return FALSE; + } + return TRUE; +} + +BOOL NPC_PairRegister( int toindex) +{ + char *cdKey = CHAR_getChar( toindex, CHAR_CDKEY); + char *name = CHAR_getChar( toindex, CHAR_NAME); + int space=-1,i; + int Psex = CHAR_getSexInt( CHAR_getInt( toindex, CHAR_BASEBASEIMAGENUMBER) ); + Psex = (Psex==1)?0:1; + for( i=0; i=MAXPAIRNUMS){ + if( space != -1 && CHAR_getWorkInt( toindex, CHAR_MYPAIRCODE) > 0 ){ + PairList[Psex][space].use = 1; + PairList[Psex][space].forindex = -1; + sprintf( PairList[Psex][space].cdKey, "%s", cdKey); + sprintf( PairList[Psex][space].name, "%s", name); + PairList[Psex][space].pindex = toindex; + PairList[Psex][space].code = CHAR_getWorkInt( toindex, CHAR_MYPAIRCODE); + + CHAR_talkToCli( toindex, -1, "新增至配对名单。", CHAR_COLORYELLOW); + return TRUE; + } + } + return FALSE; +} + +void NPC_PairUserAndWarp( int meindex, int toindex, int forindex, char *arg) +{ + char buf1[256]; + int fl=-1, x=-1, y=-1; + + if( !CHAR_CHECKINDEX( toindex)) return; + CHAR_setWorkInt( toindex, CHAR_MYPAIRINDEX, -1); + CHAR_setWorkInt( toindex, CHAR_MYPAIRFLG, -1); + if( !CHAR_CHECKINDEX( forindex)) return; + CHAR_setWorkInt( forindex, CHAR_MYPAIRINDEX, -1); + CHAR_setWorkInt( forindex, CHAR_MYPAIRFLG, -1); + + if( CHAR_getWorkInt( toindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE ) return; + if( CHAR_getWorkInt( forindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE ) return; + + if( NPC_Util_GetStrFromStrWithDelim( arg, "PAIRTOPOINT", buf1, sizeof( buf1) ) != NULL){ + char buf2[256]; + if( getStringFromIndexWithDelim( buf1,",",1,buf2,sizeof( buf2)) != FALSE ) + fl = atoi( buf2); + if( getStringFromIndexWithDelim( buf1,",",2,buf2,sizeof( buf2)) != FALSE ) + x = atoi( buf2); + if( getStringFromIndexWithDelim( buf1,",",3,buf2,sizeof( buf2)) != FALSE ) + y = atoi( buf2); + } + CHAR_DischargePartyNoMsg( toindex);//解散团队 + CHAR_DischargePartyNoMsg( forindex);//解散团队 + if( MAP_IsValidCoordinate( fl, x, y) != FALSE ){ + CHAR_warpToSpecificPoint( toindex, fl, x, y); + CHAR_warpToSpecificPoint( forindex, fl, x, y); + } + + CHAR_JoinParty_Main( toindex, forindex); + //lssproto_PR_send( fd, 0, 1); + { + int i; + for( i=0; i 0 ){ + if( PairList[0][i].pindex == toindex || + PairList[0][i].pindex == forindex ){ + PairList[0][i].pindex = -1; + PairList[0][i].use = -1; + } + } + if( PairList[1][i].use > 0 ){ + if( PairList[1][i].pindex == toindex || + PairList[1][i].pindex == forindex ){ + PairList[1][i].pindex = -1; + PairList[1][i].use = -1; + } + } + } + } +} + +int NPC_getPairCode( int toindex) +{ + char *arg=NULL; + int code=-1, i; + if( !CHAR_CHECKINDEX( toindex)) return-1; + for( i=0; i<15; i++) { + char buf1[256]; + int itemindex = CHAR_getItemIndex( toindex, i); + if( !ITEM_CHECKINDEX( itemindex) ) continue; + arg = ITEM_getChar(itemindex, ITEM_ARGUMENT );// 性别|个性编号|FLG + if( arg == NULL )continue; + if( NPC_Util_GetStrFromStrWithDelim( arg, "PAIRCODE", buf1, sizeof( buf1) ) == NULL) continue; + code = atoi( buf1); + break; + } + return code; +} + +int NPC_getNextTitle( int meindex, int toindex, char *arg, int title, int select) +{ + char buf[NPC_UTIL_GETARGSTR_BUFSIZE], buf1[1024], buf2[256]; + int toID=0; + memset( buf, 0, sizeof( buf)); + if( getStringFromIndexWithDelim( arg, "PSYCHOMETRICS", 2, buf, sizeof( buf)) == FALSE ) + return -1; + if( getStringFromIndexWithDelim( buf , "}", title, buf1, sizeof( buf1)) == FALSE ) + return -1; + if( select == WINDOW_BUTTONTYPE_YES ) { + if( NPC_Util_GetStrFromStrWithDelim( buf1, "YESFOR", buf2, sizeof( buf2 )) == NULL) + return -1; + }else { + if( NPC_Util_GetStrFromStrWithDelim( buf1, "NOFOR", buf2, sizeof( buf2) ) == NULL) + return -1; + } + toID = atoi( buf2); + return toID; +} + +int NPC_getTitleMsg( int meindex, int toindex, char *arg, char *token, int title) +{ + char buf[NPC_UTIL_GETARGSTR_BUFSIZE], buf1[1024], buf2[256]; + memset( buf, 0, sizeof( buf)); + + if( getStringFromIndexWithDelim( arg, "PSYCHOMETRICS", 2, buf, sizeof( buf)) == FALSE ) + return -1; + //取得下一题 + if( getStringFromIndexWithDelim( buf , "}", title, buf1, sizeof( buf1)) == FALSE ) + return FALSE; + if( NPC_Util_GetStrFromStrWithDelim( buf1, "TITLEMSG", buf2, sizeof( buf2 )) == NULL){ + if( NPC_Util_GetStrFromStrWithDelim( buf1, "FREE", buf2, sizeof( buf2 )) == NULL){ + return -1; + } + if( NPC_ActionPassCheck( meindex, toindex, buf2) == FALSE ) { + CHAR_talkToCli( toindex, meindex, "条件不足", CHAR_COLORYELLOW); + return -1; + } + if( Action_RunDoEventAction( meindex, toindex, buf1) == FALSE ){ + CHAR_talkToCli( toindex, meindex, "条件不足", CHAR_COLORYELLOW); + return -1; + } + if( NPC_Util_GetStrFromStrWithDelim( buf1, "ENDMSG", buf2, sizeof( buf2 )) == NULL){ + return -1; + } + sprintf( token, "%s", buf2); + return 2; + } + + sprintf( token, "%s", buf2); + return 1; +} +#endif diff --git a/gmsv/npc/npc_manorsman.c b/gmsv/npc/npc_manorsman.c new file mode 100644 index 0000000..eb72c7c --- /dev/null +++ b/gmsv/npc/npc_manorsman.c @@ -0,0 +1,1244 @@ +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "lssproto_serv.h" +#include "npcutil.h" +#include "handletime.h" +#include "npc_scheduleman.h" +#include "family.h" +#include "npc_manorsman.h" +#include "saacproto_cli.h" +#include "net.h" +#include "configfile.h" +#include "log.h" + +/* + * 庄园 PK 登记员 + * + */ +#define MAX_MANORSMAN 22 +static int FMPK_ManorsmanList[MAX_MANORSMAN]={ +-1,-1,-1,-1,-1, +-1,-1,-1,-1,-1, +-1,-1,-1,-1,-1, +-1,-1,-1,-1,-1, +-1,-1 }; + +enum { + NPC_WORK_ID = CHAR_NPCWORKINT1, // 登记员 ID, 从 0 开始 + NPC_WORK_MANORID = CHAR_NPCWORKINT2, // 庄园编号 + NPC_WORK_CHALLENGEWAIT = CHAR_NPCWORKINT3, // 挑战等待时间 + NPC_WORK_PEACEWAIT = CHAR_NPCWORKINT4, // 休战时间 + NPC_WORK_PREVLOOPTIME = CHAR_NPCWORKINT5, // 前一次处理 Loop 的时间 +#ifdef _NEW_MANOR_LAW + NPC_WORK_BETTLETIME = CHAR_NPCWORKINT6 // 记录开打时的日期 +#endif +}; + +#define SCHEDULEFILEDIR "./Schedule/" + +#ifdef _FIX_FAMILY_PK_LIMIT // WON ADD 将可挑战庄园的由前十大改为前二十大 +#define PK_LIMIT 20 +#endif + + +extern struct FM_POINTLIST fmpointlist; +extern void NPC_talkToFloor(int floor, int index1, int index2, char *data); +#ifdef _MANOR_PKRULE +extern struct FMS_DPTOP fmdptop; +#endif + +void NPC_ManorLoadPKSchedule(int meindex); // Load schedule from disk +#ifdef _NEW_MANOR_LAW +void SortManorSchedule(); +int SortManorScheduleMomentum(const void *indexa, const void *indexb); +extern int familyMemberIndex[FAMILY_MAXNUM][FAMILY_MAXMEMBER]; +int g_iSortManor; +#endif + +int NPC_getManorsmanListIndex( int ID) +{ + + if( ID < 0 || ID >= MAX_MANORSMAN ){ + return FMPK_ManorsmanList[ ID]; + } + return -1; +} +BOOL NPC_ManorSmanInit( int meindex ) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + int meid; + int a; + + CHAR_setInt( meindex, CHAR_WHICHTYPE, CHAR_TYPEMANORSCHEDULEMAN ); + + // 参数 + NPC_Util_GetArgStr(meindex, argstr, sizeof(argstr)); + meid = NPC_Util_GetNumFromStrWithDelim(argstr, "id" ); + if ((meid<0) || (meid>=MAX_SCHEDULEMAN)) { + print("MANORSMAN init error: invalid ID(%d)\n",meid); + meid=0; + } + CHAR_setWorkInt(meindex, NPC_WORK_ID, meid); + + a = NPC_Util_GetNumFromStrWithDelim(argstr, "loop" ); + if ((a<100) || (a>10000)) a=1000; + CHAR_setInt(meindex, CHAR_LOOPINTERVAL, a); + + a = NPC_Util_GetNumFromStrWithDelim(argstr, "manorid" ); + if ((a<1) || (a>/*4*/MANORNUM)) {// CoolFish 2002/2/25 + print("MANORSMAN init error: invalid manor id(%d).", a); + a=1; + } + CHAR_setWorkInt(meindex, NPC_WORK_MANORID, a); + + a = NPC_Util_GetNumFromStrWithDelim(argstr, "challengewait"); + if ((a<1) || (a>259200)) { + print("MANORSMAN init error: invalid challengewait(%d).",a); + a=259200; + } + CHAR_setWorkInt(meindex, NPC_WORK_CHALLENGEWAIT, a); + + a = NPC_Util_GetNumFromStrWithDelim(argstr, "peacewait"); + if ((a<1) || (a>432000)) { + print("MANORSMAN init error: invalid peacewait(%d).",a); + a=604800; + } + CHAR_setWorkInt(meindex, NPC_WORK_PEACEWAIT, a); + + NPC_ManorLoadPKSchedule(meindex); + + CHAR_setWorkInt(meindex, NPC_WORK_PREVLOOPTIME, NowTime.tv_sec); +#ifdef _NEW_MANOR_LAW + CHAR_setWorkInt(meindex,NPC_WORK_BETTLETIME,0); +#endif + + if( CHAR_getWorkInt( meindex, NPC_WORK_ID) >= 0 && + CHAR_getWorkInt( meindex, NPC_WORK_ID) 2) return; + if (!NPC_Util_isFaceToFace(meindex, talkerindex, 2)) return; + fd = getfdFromCharaIndex(talkerindex); + if (fd == -1) return; + + switch (fmpks[fmpks_pos+1].flag) { + case FMPKS_FLAG_NONE: + // 没有约定战斗,此时可以下战书 + saacproto_ACFMPointList_send(acfd); +#ifdef _MANOR_PKRULE + sprintf(buf, "庄园所有权争夺战的挑战资格\n\n" + "一、没有拥有庄园的家族\n" + #ifdef _FIX_FAMILY_PK_LIMIT // WON ADD 将可挑战庄园的由前十大改为前二十大 + "二、家族排行必需为前二十大家族\n" + #else + "二、家族排行必需为前十大家族\n" + #endif + "叁、踢馆时间:下午六点至凌晨叁点\n\n" + "请稍待,我将确认你的资格。"); +#else + sprintf(buf, "庄园所有权争夺战的挑战资格\n\n" + "一、没有拥有庄园的家族\n" + "二、家族的声望高於庄园家族的声望\n\n" + "请稍待,我将确认你的资格。"); +#endif + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_YESNO, + CHAR_WINDOWTYPE_CHECKMAN_START, + CHAR_getWorkInt(meindex, CHAR_WORKOBJINDEX), + buf); + break; + case FMPKS_FLAG_MANOR_PREPARE: + // 目前已经定好战斗,准备中 + { + int timeleft=fmpks[fmpks_pos+1].dueltime-NowTime.tv_sec; + int dd,hh,mm; + char buf2[4096]; + dd = /*fmpks[fmpks_pos+1].dueltime*/ timeleft / 86400; + hh = /*fmpks[fmpks_pos+1].dueltime*/ timeleft / 3600 - dd*24; + mm = /*fmpks[fmpks_pos+1].dueltime*/ timeleft / 60 - dd*24*60 - hh*60; + memset(buf2,0,sizeof(buf2)); + if (dd>0) sprintf(buf, " %d 天", dd); else strcpy(buf, ""); + strcat(buf2, buf); + if (hh>0) sprintf(buf, " %d 小时", hh); else strcpy(buf, ""); + strcat(buf2, buf); + if (mm>0) sprintf(buf, " %d 分锺", mm); else strcpy(buf, ""); + strcat(buf2, buf); + if (strlen(buf2)==0) + sprintf(buf, "庄园所有权争夺战\n『%s VS %s』\n\n" + "即将开始,请准备入场。", + fmpks[fmpks_pos+1].guest_name, + fmpks[fmpks_pos+1].host_name); + else + sprintf(buf, "庄园所有权争夺战\n『%s VS %s』\n\n" + "预定将在%s後开始。", + fmpks[fmpks_pos+1].guest_name, + fmpks[fmpks_pos+1].host_name, + buf2); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + CHAR_WINDOWTYPE_CHECKMAN_END, + CHAR_getWorkInt(meindex, CHAR_WORKOBJINDEX), + buf); + } + break; + case FMPKS_FLAG_MANOR_PEACE: + // 战斗已经结束的和平时期 + { + int timeleft=fmpks[fmpks_pos+1].dueltime-NowTime.tv_sec; + int dd,hh,mm; + char buf2[4096]; + dd = /*fmpks[fmpks_pos+1].dueltime*/ timeleft / 86400; + hh = /*fmpks[fmpks_pos+1].dueltime*/ timeleft / 3600 - dd*24; + mm = /*fmpks[fmpks_pos+1].dueltime*/ timeleft / 60 - dd*24*60 - hh*60; + strcpy(buf2,""); + if (dd>0) sprintf(buf, " %d 天", dd); else strcpy(buf, ""); + strcat(buf2, buf); + if (hh>0) sprintf(buf, " %d 小时", hh); else strcpy(buf, ""); + strcat(buf2, buf); + if (mm>0) sprintf(buf, " %d 分锺", mm); else strcpy(buf, ""); + strcat(buf2, buf); + + if (strlen(buf2)==0) + strcpy(buf, "请稍等,让我准备一下申请踢馆的表格。"); + else + sprintf(buf, "现在是休战时期,要踢馆的话\n请%s後再来申请。",buf2); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + CHAR_WINDOWTYPE_CHECKMAN_END, + CHAR_getWorkInt(meindex, CHAR_WORKOBJINDEX), buf); + } + break; + case FMPKS_FLAG_MANOR_BATTLEBEGIN: + // 目前正在进行踢馆 + sprintf(buf, "庄园所有权争夺战\n『%s VS %s』\n\n" + "开~打~罗~\n还没进场的人赶快进场吧。", + fmpks[fmpks_pos+1].guest_name, + fmpks[fmpks_pos+1].host_name); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + CHAR_WINDOWTYPE_CHECKMAN_END, + CHAR_getWorkInt(meindex, CHAR_WORKOBJINDEX), + buf); + break; + case FMPKS_FLAG_MANOR_OTHERPLANET: + // 在别的星球进行战斗 + sprintf(buf, "庄园所有权争夺战\n『%s VS %s』\n\n" + "决斗地点在 %s 。", + fmpks[fmpks_pos+1].guest_name, + fmpks[fmpks_pos+1].host_name, + fmpks[fmpks_pos+2].host_name); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + CHAR_WINDOWTYPE_CHECKMAN_END, + CHAR_getWorkInt(meindex, CHAR_WORKOBJINDEX), + buf); + break; + } +} +#else +void NPC_ManorSmanTalked(int meindex, int talkerindex, char *msg, int color) +{ + char buf[4096]; + int fd; + int fmpks_pos = CHAR_getWorkInt(meindex,NPC_WORK_ID)*MAX_SCHEDULE; + int manorid = CHAR_getWorkInt(meindex,NPC_WORK_MANORID); + + if(CHAR_CHECKINDEX(meindex) == FALSE){ + printf("\nNPC_ManorSmanTalked error!(meindex:%d)",meindex); + return; + } + if(NPC_Util_CharDistance(meindex,talkerindex) > 2) return; + if(!NPC_Util_isFaceToFace(meindex,talkerindex,2)) return; + fd = getfdFromCharaIndex(talkerindex); + if(fd == -1) return; + + if(fmpks[fmpks_pos+1].flag == FMPKS_FLAG_CHALLENGE) fmpks[fmpks_pos+1].flag = FMPKS_FLAG_NONE; + + switch(fmpks[fmpks_pos+1].flag){ + // 挑战期 1800~2200 + case FMPKS_FLAG_NONE: + case FMPKS_FLAG_WAIT: + saacproto_ACFMPointList_send(acfd); + sprintf(buf,"庄园所有权争夺战的挑战资格\n\n" + "一、没有庄园的家族\n" + "二、家族的气势高於庄园家族的气势\n" + "叁、约战时间终止时,气势排名第一者获得挑战资格\n" + "四、气势相同者以最先报名者获得资格\n" + "按 OK 我将确认你的资格,按 NO 观看挑战排名"); + lssproto_WN_send(fd,WINDOW_MESSAGETYPE_MESSAGE,WINDOW_BUTTONTYPE_YESNO,CHAR_WINDOWTYPE_CHECKMAN_START, + CHAR_getWorkInt(meindex, CHAR_WORKOBJINDEX),buf); + if(fmpointlist.fm_momentum[manorid-1] <= -1){ + int hadfmindex,index; + char token[256]; + + getStringFromIndexWithDelim(fmpointlist.pointlistarray[manorid-1],"|",5,token,sizeof(token)); + hadfmindex = atoi(token); + if(hadfmindex != -1){ + for(index=0;index= FAMILY_MAXNUM){ + getStringFromIndexWithDelim(fmpointlist.pointlistarray[manorid-1],"|",6,token,sizeof(token)); + printf("\nNPC_ManorSmanTalked():save fm_momentum error(%d:%s)",hadfmindex,token); + break; + } + // 记录这个时刻守庄家族的气势 + else fmpointlist.fm_momentum[manorid-1] = fmdptop.fmMomentum[index]; + } + } + SortManorSchedule(); + break; + // 挑战准备期 2200~取得挑战资格的家族当时挑战的时间(隔天的 1800~2200 之间) + case FMPKS_FLAG_MANOR_PREPARE: + // 目前已经定好战斗,准备中 + { + int timeleft = fmpks[fmpks_pos+1].dueltime - NowTime.tv_sec; + int mm,hh,dd; + char buf2[4096]; + + dd = timeleft / 86400; + hh = timeleft / 3600 - dd * 24; + mm = timeleft / 60 - dd * 24 * 60 - hh * 60; + memset(buf2,0,sizeof(buf2)); + if(dd > 0) sprintf(buf," %d 天",dd); else strcpy(buf,""); + strcat(buf2,buf); + if(hh > 0) sprintf(buf," %d 小时",hh); else strcpy(buf,""); + strcat(buf2,buf); + if(mm > 0) sprintf(buf," %d 分锺",mm); else strcpy(buf,""); + strcat(buf2,buf); + if(strlen(buf2) == 0) + sprintf(buf,"庄园所有权争夺战\n『%s VS %s』\n\n即将开始,请准备入场。", + fmpks[fmpks_pos+1].guest_name,fmpks[fmpks_pos+1].host_name); + else + sprintf(buf,"庄园所有权争夺战\n『%s VS %s』\n\n预定将在%s後开始。", + fmpks[fmpks_pos+1].guest_name,fmpks[fmpks_pos+1].host_name,buf2); + lssproto_WN_send(fd,WINDOW_MESSAGETYPE_MESSAGE,WINDOW_BUTTONTYPE_OK,CHAR_WINDOWTYPE_CHECKMAN_END, + CHAR_getWorkInt(meindex,CHAR_WORKOBJINDEX),buf); + } + break; + // 休战期及准备期,五天 + case FMPKS_FLAG_MANOR_PEACE: + case FMPKS_FLAG_MANOR_PEACE_SAVE: + { + int timeleft = fmpks[fmpks_pos+1].dueltime-NowTime.tv_sec; + int dd,hh,mm; + char buf2[4096]; + dd = timeleft / 86400; + hh = timeleft / 3600 - dd*24; + mm = timeleft / 60 - dd*24*60 - hh*60; + memset(buf2,0,sizeof(buf2)); + if(dd > 0) sprintf(buf," %d 天",dd); else strcpy(buf,""); + strcat(buf2,buf); + if(hh > 0) sprintf(buf," %d 小时",hh); else strcpy(buf,""); + strcat(buf2,buf); + if(mm > 0) sprintf(buf," %d 分锺",mm); else strcpy(buf,""); + strcat(buf2,buf); + + if(strlen(buf2) == 0) strcpy(buf, "请稍等,让我准备一下申请踢馆的表格。"); + else sprintf(buf, "现在非挑战时期,要挑战的话\n请%s後再来申请。",buf2); + lssproto_WN_send(fd,WINDOW_MESSAGETYPE_MESSAGE,WINDOW_BUTTONTYPE_OK,CHAR_WINDOWTYPE_CHECKMAN_END, + CHAR_getWorkInt(meindex, CHAR_WORKOBJINDEX),buf); + } + break; + // 挑战中 + case FMPKS_FLAG_MANOR_BATTLEBEGIN: + sprintf(buf,"庄园所有权争夺战\n『%s VS %s』\n\n开~打~罗~\n还没进场的人赶快进场吧。", + fmpks[fmpks_pos+1].guest_name,fmpks[fmpks_pos+1].host_name); + lssproto_WN_send(fd,WINDOW_MESSAGETYPE_MESSAGE,WINDOW_BUTTONTYPE_OK,CHAR_WINDOWTYPE_CHECKMAN_END, + CHAR_getWorkInt(meindex, CHAR_WORKOBJINDEX),buf); + break; + case FMPKS_FLAG_MANOR_OTHERPLANET: + // 在别的星球进行战斗 + sprintf(buf,"庄园所有权争夺战\n『%s VS %s』\n\n决斗地点在 %s 。", + fmpks[fmpks_pos+1].guest_name,fmpks[fmpks_pos+1].host_name,fmpks[fmpks_pos+2].host_name); + lssproto_WN_send(fd,WINDOW_MESSAGETYPE_MESSAGE,WINDOW_BUTTONTYPE_OK,CHAR_WINDOWTYPE_CHECKMAN_END, + CHAR_getWorkInt(meindex,CHAR_WORKOBJINDEX),buf); + break; + } +} +#endif + +void NPC_ManorSmanWindowTalked(int meindex, int talkerindex, + int seqno, int select, char *data) +{ + int fd, fmpks_pos, manorid, tkfmindex, tkfmdp; + char buf[4096],token[256]; + int hadfmindex; +#ifndef _ACFMPK_LIST + char hadfmname[256]; +#endif + int hadfmpopular; + + if (NPC_Util_CharDistance(meindex,talkerindex) > 2) return; + if (!NPC_Util_isFaceToFace(meindex, talkerindex, 2)) return; + fd = getfdFromCharaIndex(talkerindex); + if (fd == -1) return; + fmpks_pos = CHAR_getWorkInt(meindex, NPC_WORK_ID)*MAX_SCHEDULE; + manorid = CHAR_getWorkInt(meindex, NPC_WORK_MANORID); + tkfmindex = CHAR_getWorkInt(talkerindex, CHAR_WORKFMINDEXI); + tkfmdp = CHAR_getWorkInt(talkerindex, CHAR_WORKFMDP); + getStringFromIndexWithDelim(fmpointlist.pointlistarray[manorid-1], "|", 5, token, sizeof(token)); + hadfmindex = atoi(token); + getStringFromIndexWithDelim(fmpointlist.pointlistarray[manorid-1], "|", 7, token, sizeof(token)); + hadfmpopular = atoi(token); + + switch (seqno){ + case CHAR_WINDOWTYPE_CHECKMAN_START: + if (select==WINDOW_BUTTONTYPE_YES){ +#ifdef _ACFMPK_NOFREE + sprintf(buf, "庄园挑战会有一天的准备期\n" + "你可以随时询问我以得知剩下的时间\n" + "挑战结束後不论胜负将会有二天的休战期\n" + "休战期间不能挑战\n\n" + "你确定要挑战这个庄园吗?"); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_YESNO, + CHAR_WINDOWTYPE_CHECKMAN_MAIN, + CHAR_getWorkInt(meindex, CHAR_WORKOBJINDEX), buf); + return; +#endif + +#ifdef _FMVER21 + if ((CHAR_getInt(talkerindex,CHAR_FMLEADERFLAG)==FMMEMBER_LEADER) && +#else + if ((CHAR_getInt(talkerindex,CHAR_FMLEADERFLAG)==1) && +#endif + (CHAR_getWorkInt(talkerindex, CHAR_WORKFMSETUPFLAG)==1)){ + if (hadfmindex != -1) { + if (hadfmindex-1 != tkfmindex){ + int check=0,i; + // Arminius 2.25 fix: fmpks 中第 1~"MANORNUM" 组一定要给 manorsman + for (i=0; i<=/*3*/MANORNUM-1; i++) { // 9个庄园 + getStringFromIndexWithDelim(fmpointlist.pointlistarray[i], "|", 5, token, sizeof(token)); + if (tkfmindex==atoi(token)-1) check=1; + } + for (i=1; i<=/*4*/MANORNUM; i++) { // 是否已经挑战其他庄园 + if ((fmpks[i*MAX_SCHEDULE+1].guest_index==tkfmindex) && + (strcmp(fmpks[i*MAX_SCHEDULE+1].guest_name, + CHAR_getChar(talkerindex, CHAR_FMNAME))==0) + ) { + check=2; + } + } + if (check==0){ + int won1; +#ifdef _MANOR_PKRULE // WON ADD 2002/01/22 + #ifdef _NEW_MANOR_LAW + //----------------------------------------- + int index; + won1 = 1; + + for(index=0;index= FAMILY_MAXNUM){ + printf("\nNPC_ManorSmanWindowTalked():find tkfmIndex error (%d)",tkfmindex); + } + else + // 如果挑战家族气势不足守庄家族气势的九成,不能挑战 + if(fmdptop.fmMomentum[index] < fmpointlist.fm_momentum[manorid-1]*0.9) won1 = 0; + //----------------------------------------- + #else + //----------------------------------------- + int i; + char won2[256]; + won1 = 0; + #ifdef _FIX_FAMILY_PK_LIMIT // WON ADD 将可挑战庄园的由前十大改为前二十大 + for(i=0; i< PK_LIMIT; i++){ + #else + for(i=0; i<10; i++){ + #endif + if( getStringFromIndexWithDelim( fmdptop.topmemo[i], "|", 3, won2, sizeof(won2)) == FALSE ) { + print("err Get fmdptop.topmemo[%d] if FALSE !!\n", i); + break; + } + if( strcmp(CHAR_getChar(talkerindex, CHAR_FMNAME) ,won2) == 0 ){ + won1= 1; + break; + } + //----------------------------------------- + } + #endif + + if(won1 == 1){ + // WON END + #ifdef _NEW_MANOR_LAW + sprintf(buf,"确定庄园挑战资格後会有一天的准备时间\n" + "你可以随时询问我以得知剩下的时间\n" + "挑战结束後至下次挑战期将会有一天的休战期\n" + "和四天的准备期,在这五天期间内不能挑战\n\n" + "你确定要挑战这个庄园吗?"); + #else + sprintf(buf,"庄园挑战会有一天的准备期\n" + "你可以随时询问我以得知剩下的时间\n" + "挑战结束後不论胜负将会有二天的休战期\n" + "休战期间不能挑战\n\n" + "你确定要挑战这个庄园吗?"); + #endif +#else + if(tkfmdp >= hadfmpopular){ + sprintf(buf,"庄园挑战会有一天的准备期\n" + "你可以随时询问我以得知剩下的时间\n" + "挑战结束後不论胜负将会有五天的休战期\n" + "休战期间不能挑战\n\n" + "你确定要挑战这个庄园吗?"); +#endif + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_YESNO, + CHAR_WINDOWTYPE_CHECKMAN_MAIN, + CHAR_getWorkInt(meindex, CHAR_WORKOBJINDEX), + buf); + } + else{ +#ifdef _NEW_MANOR_LAW + sprintf(buf, "你的家族气势尚未到达庄园家族气势的九成,请再加油。"); +#else + #ifdef _MANOR_PKRULE + #ifdef _FIX_FAMILY_PK_LIMIT // WON ADD 将可挑战庄园的由前十大改为前二十大 + sprintf(buf, "你的家族声望尚未进入前二十大家族,请再加油。"); + #else + sprintf(buf, "你的家族声望尚未进入前十大家族,请再加油。"); + #endif + #else + sprintf(buf, "你的家族声望尚不足以挑战\n" + "拥有这个庄园的家族,请再加油。"); + #endif +#endif + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + CHAR_WINDOWTYPE_CHECKMAN_END, + CHAR_getWorkInt(meindex, CHAR_WORKOBJINDEX), + buf); + } + } + else if(check == 2){ + sprintf(buf, "你的家族正在挑战其他庄园,\n" + "请把机会留给其他家族吧!"); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + CHAR_WINDOWTYPE_CHECKMAN_END, + CHAR_getWorkInt(meindex, CHAR_WORKOBJINDEX), + buf); + } + else{ + sprintf(buf, "一个家族只能拥有一个庄园,\n" + "如果庄园家族之间需要切磋\n" + "请到家族PK场。"); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + CHAR_WINDOWTYPE_CHECKMAN_END, + CHAR_getWorkInt(meindex, CHAR_WORKOBJINDEX), + buf); + } + } + else{ + sprintf(buf, "这个庄园已经是你的家族的喔。"); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + CHAR_WINDOWTYPE_CHECKMAN_END, + CHAR_getWorkInt(meindex, CHAR_WORKOBJINDEX), + buf); + } + } + else{ + sprintf(buf, "现在并没有庄园家族,\n" + "直接去申请迁入就可以了哟。"); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + CHAR_WINDOWTYPE_CHECKMAN_END, + CHAR_getWorkInt(meindex, CHAR_WORKOBJINDEX), + buf); + } + } + else{ + sprintf(buf, "只有族长可以下战书喔。"); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + CHAR_WINDOWTYPE_CHECKMAN_END, + CHAR_getWorkInt(meindex, CHAR_WORKOBJINDEX), + buf); + } + } +#ifdef _NEW_MANOR_LAW + else if(select == WINDOW_BUTTONTYPE_NO){ + int i,index,manorindex; + char szMsg[3072]; + + sprintf(buf," 庄园挑战排名表\n名次 家族名称 时间 气势\n"); + manorindex = CHAR_getWorkInt(meindex,NPC_WORK_MANORID) - 1; + // 送出挑战排名 + for(i=0;i<10;i++){ + index = ManorSchedule[manorindex].iSort[i]; + if(ManorSchedule[manorindex].iFmIndex[index] != -1){ + sprintf(szMsg,"%2d %s\n",i+1,ManorSchedule[manorindex].szMemo[index]); + strcat(buf,szMsg); + } + } + lssproto_WN_send(fd,WINDOW_FMMESSAGETYPE_MANOR_SCHEDULE,WINDOW_BUTTONTYPE_OK,CHAR_WINDOWTYPE_CHECKMAN_END, + CHAR_getWorkInt(meindex,CHAR_WORKOBJINDEX),buf); + } +#endif + break; + case CHAR_WINDOWTYPE_CHECKMAN_MAIN: + if (select==WINDOW_BUTTONTYPE_YES) { + +#ifdef _ACFMPK_NOFREE + #ifndef _NEW_MANOR_LAW + NPC_ManorSavePKSchedule(meindex, talkerindex, 0); + sprintf( buf, "庄园挑战登陆确认中,请稍後。"); + CHAR_talkToCli( talkerindex, meindex, buf, CHAR_COLORYELLOW); + #else + NPC_ManorAddToSchedule(meindex,talkerindex); + #endif + return; +#endif + +#ifdef _FMVER21 + if ((CHAR_getInt(talkerindex,CHAR_FMLEADERFLAG)==FMMEMBER_LEADER) && +#else + if ((CHAR_getInt(talkerindex,CHAR_FMLEADERFLAG)==1) && +#endif + (CHAR_getWorkInt(talkerindex, CHAR_WORKFMSETUPFLAG)==1) && + (hadfmindex != -1) && + (hadfmindex - 1 != tkfmindex) +#ifndef _MANOR_PKRULE + && (tkfmdp >= hadfmpopular) +#endif + ){ +#ifndef _ACFMPK_LIST + struct tm tm1; +#endif + +#ifndef _NEW_MANOR_LAW + #ifdef _MANOR_PKRULE + time_t timep; + struct tm *p; + time(&timep); + p = gmtime(&timep); + if( p->tm_hour+8 > 24) + p->tm_hour = p->tm_hour-16; + else + p->tm_hour = p->tm_hour+8; + if(p->tm_hour<18 && p->tm_hour>2){ + sprintf(buf, "请於下午6:00至凌晨3:00再来约战吧!"); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + CHAR_WINDOWTYPE_CHECKMAN_END, + CHAR_getWorkInt(meindex, CHAR_WORKOBJINDEX), + buf); + break; + } + #endif + // WON ADD 修正家族pk场的约战问题 + if( fmpks[fmpks_pos+1].flag != FMPKS_FLAG_NONE ){ + sprintf(buf, "这个庄园已经有人约战了喔。"); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + CHAR_WINDOWTYPE_CHECKMAN_END, + CHAR_getWorkInt(meindex, CHAR_WORKOBJINDEX), + buf); + return; + } +#endif +#ifdef _ACFMPK_LIST + #ifndef _NEW_MANOR_LAW + NPC_ManorSavePKSchedule(meindex, talkerindex, 0); + sprintf( buf, "庄园挑战登陆确认中,请稍後。"); + CHAR_talkToCli( talkerindex, meindex, buf, CHAR_COLORYELLOW); + #else + NPC_ManorAddToSchedule(meindex,talkerindex); + #endif +#else + memcpy( &tm1, localtime( (time_t *)&NowTime.tv_sec), sizeof( tm1)); + getStringFromIndexWithDelim(fmpointlist.pointlistarray[manorid-1], "|", 6, token, sizeof(token)); + strcpy(hadfmname, token); + + fmpks[fmpks_pos+1].dueltime = CHAR_getWorkInt(meindex, NPC_WORK_CHALLENGEWAIT) + NowTime.tv_sec + - tm1.tm_min*60 + 1800; // Arminius 11.1 改成一律 xx:30 开打 + fmpks[fmpks_pos+1].host_index = hadfmindex-1; + strcpy(fmpks[fmpks_pos+1].host_name, hadfmname); + fmpks[fmpks_pos+1].guest_index = tkfmindex; + strcpy(fmpks[fmpks_pos+1].guest_name, CHAR_getChar(talkerindex, CHAR_FMNAME)); + fmpks[fmpks_pos+1].prepare_time = 15; + fmpks[fmpks_pos+1].max_player = 50; + fmpks[fmpks_pos+1].win = -1; + fmpks[fmpks_pos+1].flag = FMPKS_FLAG_MANOR_OTHERPLANET; + strcpy(fmpks[fmpks_pos+2].host_name, getGameserverID()); + + #ifndef _NEW_MANOR_LAW + NPC_ManorSavePKSchedule(meindex, talkerindex, 0); + sprintf(buf, "庄园挑战已经设定完成,请好好准备。"); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + CHAR_WINDOWTYPE_CHECKMAN_END, + CHAR_getWorkInt(meindex, CHAR_WORKOBJINDEX), + buf); + #else + NPC_ManorAddToSchedule(meindex,talkerindex); + #endif + fmpks[fmpks_pos+1].flag = FMPKS_FLAG_MANOR_PREPARE; +#endif + + } + } + break; + } +} + +void NPC_CleanPkList( int ti) +{ +// Terry fix 要清为-1不能清为0 +/* fmpks[ ti+1 ].host_index = 0; + fmpks[ ti+1].guest_index=0; + fmpks[ ti].host_index=0; + fmpks[ ti].guest_index=0;*/ + fmpks[ ti+1 ].host_index = -1; + fmpks[ ti+1].guest_index=-1; + fmpks[ ti].host_index=-1; + fmpks[ ti].guest_index=-1; + + strcpy(fmpks[ ti+1].host_name,""); + strcpy(fmpks[ ti+1].guest_name,""); + strcpy(fmpks[ ti].host_name,""); + strcpy(fmpks[ ti].guest_name,""); + strcpy(fmpks[ ti+2].host_name,""); +} + +void NPC_ManorSmanLoop(int meindex) +{ + struct tm tm1; + int fmpks_pos; +#ifdef _NEW_MANOR_LAW + int iOffsetTime; +#endif + + if(CHAR_CHECKINDEX(meindex) == FALSE){ + printf("\nNPC_ManorSmanLoop error!(meindex:%d)",meindex); + return; + } + + fmpks_pos = CHAR_getWorkInt(meindex, NPC_WORK_ID)*MAX_SCHEDULE; + memcpy( &tm1, localtime( (time_t *)&NowTime.tv_sec), sizeof( tm1)); + + switch (fmpks[fmpks_pos+1].flag) { + case FMPKS_FLAG_NONE: +#ifdef _NEW_MANOR_LAW + { + int hadfmindex,index,manorid; + char token[256]; + //此时可以开始挑战 + manorid = CHAR_getWorkInt(meindex,NPC_WORK_MANORID); + getStringFromIndexWithDelim(fmpointlist.pointlistarray[manorid-1],"|",5,token,sizeof(token)); + hadfmindex = atoi(token); + if(hadfmindex != -1){ + for(index=0;index= FAMILY_MAXNUM){ + getStringFromIndexWithDelim(fmpointlist.pointlistarray[manorid-1],"|",6,token,sizeof(token)); + printf("\nNPC_ManorSmanLoop():save fm_momentum error(%d:%s)",hadfmindex,token); + break; + } + // 记录这个时刻守庄家族的气势 + else fmpointlist.fm_momentum[manorid-1] = fmdptop.fmMomentum[index]; + // 进入下一个状态 + fmpks[fmpks_pos+1].flag = FMPKS_FLAG_WAIT; + // 挑战期共4小时(1800~2200) + fmpks[fmpks_pos+1].dueltime = NowTime.tv_sec + 3600 * 4; + NPC_ManorSavePKSchedule(meindex, -1, FMPKS_FLAG_WAIT,fmpks[fmpks_pos+1].dueltime,tm1); + } + SortManorSchedule(); + } +#endif + break; +#ifdef _NEW_MANOR_LAW + // 进入挑战期,已记录家族气势,等待挑战排程 + case FMPKS_FLAG_WAIT: + { + int manorid,i,iPlayerNum = CHAR_getPlayerMaxNum(); + char szMsg[256]; + + manorid = CHAR_getWorkInt(meindex,NPC_WORK_MANORID); + // 还没开打,气势改变要去向AC要即时资料 + fmpointlist.fm_inwar[manorid-1] = TRUE; + if(fmpks[fmpks_pos+1].dueltime <= NowTime.tv_sec){ + // 挑战家族中气势最高的获得挑战权 + int manorindex = CHAR_getWorkInt(meindex,NPC_WORK_MANORID) - 1; + int iNo1FmIndexSort = ManorSchedule[manorindex].iSort[0]; + int index = ManorSchedule[manorindex].iFmIndex[iNo1FmIndexSort],iFmIndex1,iCharindex; + char token[256],fmname[256]; + // 没人挑战 + if(index < 0){ + // 直接进入到挑战结束 + fmpks[fmpks_pos+1].flag = FMPKS_FLAG_MANOR_BATTLEEND; + CHAR_setWorkInt(meindex,NPC_WORK_BETTLETIME,tm1.tm_mday); + // 通知所有人 + for(i=0;i= 0 && CHAR_getCharUse(iCharindex)){ + // 获得金钱 = 个人气势 * 5000 + int iAddGold = ((float)CHAR_getInt(iCharindex,CHAR_MOMENTUM)/100.0f) * 5000.0f; + int iGold = CHAR_getInt(iCharindex,CHAR_BANKGOLD),iMaxGold; + // 先放入个人银行 + if(iGold + iAddGold > CHAR_MAXBANKGOLDHAVE){ + CHAR_setInt(iCharindex,CHAR_BANKGOLD,CHAR_MAXBANKGOLDHAVE); + // 个人银行放不下了,放到个人身上 + iAddGold = iGold + iAddGold - CHAR_MAXBANKGOLDHAVE; + iGold = CHAR_getInt(iCharindex,CHAR_GOLD); + iMaxGold = CHAR_getMaxHaveGold(iCharindex); + if(iGold + iAddGold > iMaxGold) CHAR_setInt(iCharindex,CHAR_GOLD,iMaxGold); + else CHAR_setInt(iCharindex,CHAR_GOLD,iGold + iAddGold); + LogFMPKGetMomey(CHAR_getChar(iCharindex,CHAR_FMNAME), + CHAR_getChar(iCharindex,CHAR_CDKEY), + CHAR_getChar(iCharindex,CHAR_NAME), + CHAR_getInt(iCharindex,CHAR_MOMENTUM),iAddGold,0); + } + else{ + CHAR_setInt(iCharindex,CHAR_BANKGOLD,iGold + iAddGold); + LogFMPKGetMomey(CHAR_getChar(iCharindex,CHAR_FMNAME), + CHAR_getChar(iCharindex,CHAR_CDKEY), + CHAR_getChar(iCharindex,CHAR_NAME), + CHAR_getInt(iCharindex,CHAR_MOMENTUM),iAddGold,1); + } + CHAR_talkToCli(iCharindex,-1,"辛苦了!守护住庄园的奖金已汇入你的个人银行",CHAR_COLORRED); + // 家族的个人及家族气势都要归零 + CHAR_setInt(iCharindex,CHAR_MOMENTUM,0); + CHAR_talkToCli(iCharindex,-1,"庄园战後个人及家族气势归零",CHAR_COLORRED); + } + } + } + } + else{ + // 挑战时间已过,选出的挑战家族和守庄家族有约一天的时间可以准备 + NPC_ManorSavePKSchedule(meindex,index,0,-1,ManorSchedule[manorindex].tm1[iNo1FmIndexSort]); + // 开打了,气势改变也不用去向AC要即时资料了 + fmpointlist.fm_inwar[manorid-1] = FALSE; + // 通知所有人 + sprintf(szMsg,"%s 家族获得挑战庄园资格",ManorSchedule[manorindex].szFmName[iNo1FmIndexSort]); + + for(i=0;i= FAMILY_MAXNUM){ + lssproto_WN_send(getfdFromCharaIndex(charaindex),WINDOW_MESSAGETYPE_MESSAGE,WINDOW_BUTTONTYPE_OK,CHAR_WINDOWTYPE_CHECKMAN_END, + CHAR_getWorkInt(meindex, CHAR_WORKOBJINDEX),"抱歉,找不到你的家族气势资料"); + return; + } + // 比较气势 + if(ManorSchedule[manorindex].iFmMomentum[index] < fmdptop.fmMomentum[i]){ + int fmpks_pos,iPlayerNum = CHAR_getPlayerMaxNum(); + char szMsg[256]; + + // 通知所有人 + fmpks_pos = CHAR_getWorkInt(meindex,NPC_WORK_ID) * MAX_SCHEDULE; + sprintf(szMsg,"%s 家族被 %s 家族挤下挑战排程",ManorSchedule[manorindex].szFmName[index],CHAR_getChar(charaindex,CHAR_FMNAME)); + for(i=0;i momentumB) ? -1:1; +} +#endif diff --git a/gmsv/npc/npc_mic.c b/gmsv/npc/npc_mic.c new file mode 100644 index 0000000..8086249 --- /dev/null +++ b/gmsv/npc/npc_mic.c @@ -0,0 +1,163 @@ +#include "version.h" +#include +#include + +#include "common.h" +#include "char_base.h" +#include "char.h" +#include "npcutil.h" +#include "npc_mic.h" +#include "saacproto_cli.h" +#include "lssproto_serv.h" +#include "battle.h" + +enum { + CHAR_WORK_FLOOR = CHAR_NPCWORKINT1, + CHAR_WORK_LX = CHAR_NPCWORKINT2, + CHAR_WORK_LY = CHAR_NPCWORKINT3, + CHAR_WORK_RX = CHAR_NPCWORKINT4, + CHAR_WORK_RY = CHAR_NPCWORKINT5, + CHAR_WORK_MODE = CHAR_NPCWORKINT6, + CHAR_WORK_TYPE = CHAR_NPCWORKINT7, + CHAR_WORK_WIND = CHAR_NPCWORKINT8, + CHAR_WORK_FMFL = CHAR_NPCWORKINT9, +}; + + +BOOL NPC_MicInit( int meindex ) +{ + int i; + int arg_param[8]; + char argstr[256]; + char buf[64]; + + + NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)); + + + if( strstr(argstr, "FREE")!=NULL){ + CHAR_setWorkInt(meindex,CHAR_WORK_TYPE,1); + } + if( strstr(argstr, "WIND")!=NULL){ + CHAR_setWorkInt(meindex,CHAR_WORK_WIND,1); + } + + + if( strstr( argstr , "|" ) != NULL){ + for( i = 1; i < 9; i ++ ) { + if( getStringFromIndexWithDelim(argstr, "|" , i , buf,sizeof(buf) ) + == FALSE ) + { + printf( "NPC_MIC:省略参数\n"); + arg_param[i-1] = 0; + continue; + } + arg_param[i-1] = atoi(buf); + } + CHAR_setWorkInt( meindex, CHAR_WORK_FLOOR, arg_param[0]); + CHAR_setWorkInt( meindex, CHAR_WORK_LX, min( arg_param[1],arg_param[3])); + CHAR_setWorkInt( meindex, CHAR_WORK_LY, min( arg_param[2],arg_param[4])); + CHAR_setWorkInt( meindex, CHAR_WORK_RX, max( arg_param[1],arg_param[3])); + CHAR_setWorkInt( meindex, CHAR_WORK_RY, max( arg_param[2],arg_param[4])); + CHAR_setInt( meindex, CHAR_WHICHTYPE, CHAR_TYPEMIC); + + CHAR_setWorkInt( meindex, CHAR_WORK_FMFL, arg_param[7]); + return TRUE; + + }else{ + CHAR_setInt( meindex, CHAR_WHICHTYPE, CHAR_TYPEMIC); + CHAR_setWorkInt( meindex, CHAR_WORK_MODE, 1); + return TRUE; + } + + return FALSE; +} + +void NPC_MicTalked( int meindex , int talkerindex , char *msg ,int color ) +{ + + int i; + int playernum; + int x,y; + char message[4096]; + char buf[2048]; + + if( CHAR_getInt(talkerindex,CHAR_WHICHTYPE) != CHAR_TYPEPLAYER) return; + if(CHAR_getWorkInt(meindex,CHAR_WORK_TYPE) == 0){ + if(NPC_Util_isFaceToChara(talkerindex,meindex,1 ) ==FALSE) return; + } + + snprintf( buf, sizeof( buf), "%s\n%s", + CHAR_getChar( talkerindex, CHAR_NAME), + msg); + + // Robin 0621 族长广播 + print(" MIC_FL:%d ", CHAR_getWorkInt( meindex, CHAR_WORK_FMFL )); + if( CHAR_getWorkInt( meindex, CHAR_WORK_FMFL ) != 0 ) + { +#ifdef _FMVER21 + if( CHAR_getInt( talkerindex, CHAR_FMLEADERFLAG ) == FMMEMBER_LEADER) +#else + if( CHAR_getInt( talkerindex, CHAR_FMLEADERFLAG ) == 1) +#endif + // && ( CHAR_getWorkInt( talkerindex, CHAR_WORKFMFLOOR) == CHAR_getWorkInt( meindex, CHAR_WORK_FLOOR ) ) ) + { + print(" FMLeaderTalk_send:%s,%d,%d,%s ", + CHAR_getChar( talkerindex, CHAR_FMNAME), CHAR_getInt( talkerindex, CHAR_FMINDEX), + CHAR_getWorkInt( talkerindex, CHAR_WORKFMINDEXI), buf); + + sprintf(message, "[族长广播]%s", buf); + saacproto_ACFMAnnounce_send( acfd, + CHAR_getChar( talkerindex, CHAR_FMNAME), + CHAR_getInt( talkerindex, CHAR_FMINDEX), + CHAR_getWorkInt( talkerindex, CHAR_WORKFMINDEXI), + message, + color + ); + return; + } + + } + + makeEscapeString( buf, message, sizeof(buf)); + + playernum = CHAR_getPlayerMaxNum(); + + for( i = 0; i < playernum; i ++ ) { + BOOL flg = FALSE; + if( CHAR_getCharUse(i) == FALSE ) continue; + if( CHAR_getInt( i, CHAR_WHICHTYPE) != CHAR_TYPEPLAYER ) continue; + if( CHAR_getInt( i, CHAR_FLOOR) != CHAR_getWorkInt( meindex, CHAR_WORK_FLOOR) ){ + continue; + } + if( CHAR_getWorkInt( meindex, CHAR_WORK_MODE) == 0 ) { + x = CHAR_getInt( i, CHAR_X); + y = CHAR_getInt( i, CHAR_Y); + if( x >= CHAR_getWorkInt( meindex, CHAR_WORK_LX) && + x <= CHAR_getWorkInt( meindex, CHAR_WORK_RX) && + y >= CHAR_getWorkInt( meindex, CHAR_WORK_LY) && + y <= CHAR_getWorkInt( meindex, CHAR_WORK_RY)){ + flg = TRUE; + } + }else { + flg = TRUE; + } + if( flg) { + CHAR_talkToCli( i, talkerindex, msg, CHAR_COLORYELLOW); + if( CHAR_getWorkInt( meindex, CHAR_WORK_WIND) == 1 ) { + if( CHAR_getWorkInt( i, CHAR_WORKBATTLEMODE) + == BATTLE_CHARMODE_NONE) + { + int fd = getfdFromCharaIndex( i); + if( fd != -1 ) { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + CHAR_WINDOWTYPE_MICMESSAGE, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + message); + } + } + } + } + } +} diff --git a/gmsv/npc/npc_msg.c b/gmsv/npc/npc_msg.c new file mode 100644 index 0000000..99df502 --- /dev/null +++ b/gmsv/npc/npc_msg.c @@ -0,0 +1,46 @@ +#include "version.h" +#define _NPC_MSG_C_ + +#include "char.h" +#include "char_base.h" +#include "npcutil.h" + + +/* + 霾滇读卅枣 [ 飓反窒匹手方仁[ + 午曰丐尹内升及 轾井日匹手苇尹月方丹卞允月[ + + init , looked 及心卞 杀 + + */ +BOOL NPC_MsgInit( int meindex ) +{ + //CHAR_setInt( meindex , CHAR_HP , 0 ); + + //CHAR_setInt( meindex , CHAR_MP , 0 ); + //CHAR_setInt( meindex , CHAR_MAXMP , 0 ); + + //CHAR_setInt( meindex , CHAR_STR , 0 ); + //CHAR_setInt( meindex , CHAR_TOUGH, 0 ); + + //CHAR_setInt( meindex , CHAR_LV , 0 ); + + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPETOWNPEOPLE ); + //CHAR_setFlg( meindex , CHAR_ISOVERED , 0 ); + //CHAR_setFlg( meindex , CHAR_ISATTACKED , 0 ); /* 猾今木卅中方氏 */ + + return TRUE; +} + + +/* + * 苇日木凶[反卅允分仃[ + */ +void NPC_MsgLooked( int meindex , int lookedindex ) +{ + char arg[NPC_UTIL_GETARGSTR_BUFSIZE]; + + NPC_Util_GetArgStr( meindex, arg, sizeof( arg)); + CHAR_talkToCli( lookedindex , -1 , arg , CHAR_COLORWHITE ); + +} diff --git a/gmsv/npc/npc_mtradenpcman.c b/gmsv/npc/npc_mtradenpcman.c new file mode 100644 index 0000000..28ffd2c --- /dev/null +++ b/gmsv/npc/npc_mtradenpcman.c @@ -0,0 +1,238 @@ +#include "version.h" +#include +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "lssproto_serv.h" +#include "enemy.h" +#include "log.h" +#include "battle.h" +#include "readmap.h" +#include "handletime.h" +#include "npc_eventaction.h" + +#ifdef _MARKET_TRADE +#include "npc_mtradenpcman.h" +#include "item_trade.h" + +#define MAPTRADE_CHECK 3000 +#define MAPTRADE_CHECKMASTER 100 +#define MAPTRADE_CHECKSELL 200 + +enum { + MAPTRADE_START = 1, + MAPTRADE_MAN, + MAPTRADE_END, +}; +enum { + NPC_WORK_INDEX = CHAR_NPCWORKINT1, + NPC_WORK_WORKTYPE = CHAR_NPCWORKINT2, + NPC_WORK_CURRENTTIME = CHAR_NPCWORKINT3, + NPC_WORK_SELLINDEX = CHAR_NPCWORKINT4, +/* + NPC_WORK_ROUTETOY = CHAR_NPCWORKINT2, + NPC_WORK_ROUTEPOINT = CHAR_NPCWORKINT3, + NPC_WORK_ROUNDTRIP = CHAR_NPCWORKINT4, + NPC_WORK_MODE = CHAR_NPCWORKINT5, + NPC_WORK_CURRENTROUTE = CHAR_NPCWORKINT6, + NPC_WORK_ROUTEMAX = CHAR_NPCWORKINT7, + NPC_WORK_WAITTIME = CHAR_NPCWORKINT8, + NPC_WORK_CURRENTTIME = CHAR_NPCWORKINT9, + NPC_WORK_SEFLG = CHAR_NPCWORKINT10, +*/ +}; + +static void NPC_MapTrade_selectWindow( int meindex, int toindex, int num,int select); + +BOOL MapTradeManInit( int meindex ) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg)) == NULL) { + print("MapTradeManInit: GetArgStrErr"); + return FALSE; + } + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_MAPTRADEMAN ); + CHAR_setInt( meindex, CHAR_LOOPINTERVAL, MAPTRADE_CHECK); + + CHAR_setWorkInt( meindex, NPC_WORK_SELLINDEX, 0 ); + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTTIME, NowTime.tv_sec); + CHAR_setWorkInt( meindex, NPC_WORK_INDEX, TRADE_getMaxNumInt()); + InitMapTradeData( -1, 0); //初始摊位资料 + return TRUE; +} + +void MapTradeManLoop( int meindex) +{ + int masterindex=-1, i; + int maxNum = TRADE_getMaxNumInt(); + int nums=0; + + if( CHAR_getWorkInt( meindex, NPC_WORK_CURRENTTIME) > NowTime.tv_sec) + return; + else + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTTIME, NowTime.tv_sec+MAPTRADE_CHECKMASTER); + + for( i=0; i 0 ) { + sprintf(token , "你已经承租了%d号摊位了呀!", + CHAR_getWorkInt( toindex, CHAR_MAPTRADETYPE)); + }else if( (num = TRADE_AddMasrerTrade( toindex)) != -1 ) { + CHAR_setWorkInt( toindex, CHAR_MAPTRADETYPE, num); + sprintf(token , "好了,%d号摊位暂时就租给你了。\n一旦下线离开後这摊位就必须归还了。", num); + //CHAR_talkToCli( i, -1, buff, CHAR_COLORYELLOW); + Msg_Type = 1; + } + } + CHAR_setWorkInt( toindex, CHAR_WORKSHOPRELEVANT, MAPTRADE_END); + buttontype = WINDOW_BUTTONTYPE_YES; + windowno = MAPTRADE_END; + break; + case MAPTRADE_END: + Msg_Type = 3; + buttontype = WINDOW_BUTTONTYPE_YES; + windowno = MAPTRADE_END; + break; + } + if( !strcmp( token, "\0")) { + if( NPC_Util_GetStrFromStrWithDelim( npcarg, message[Msg_Type], token, sizeof( token)) == NULL ) + return; + } + //送讯息给 CLI + lssproto_WN_send( fd, windowtype, buttontype, windowno, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), token ); +} + +void MapTradeManWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data) +{ + + if(NPC_Util_isFaceToFace( meindex ,talkerindex , 2) == FALSE) { + if(NPC_Util_isFaceToChara( talkerindex, meindex, 1) == FALSE) return; + } + + if( select != WINDOW_BUTTONTYPE_YES ) { + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, 0); + return; + } + + switch( seqno) { + case MAPTRADE_MAN: + if( CHAR_getWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT) != MAPTRADE_MAN ) { + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, 0); + return; + } + if( CHAR_getInt( talkerindex, CHAR_MAPTRADETYPE) > 0 ) { + char buf1[256]; + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, 0); + + sprintf( buf1, "你已经是%d号摊位的主人了呀!", CHAR_getInt( talkerindex, CHAR_MAPTRADETYPE)); + CHAR_talkToCli( talkerindex, -1, buf1, CHAR_COLORYELLOW); + return; + } + NPC_MapTrade_selectWindow( meindex, talkerindex, MAPTRADE_MAN, select); + break; + case MAPTRADE_END: + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, 0); + return; + break; + } + return; +} +/* + while( getStringFromIndexWithDelim(buf1, ",", k, buf2, sizeof(buf2)) != FALSE ) { + Re_Pet[k-1] = atoi( buf2); + if( Re_Pet[k-1] < 0 ) + return FALSE; + k++; + if( (k-1) >= arraysizeof( Re_Pet) ) + break; + } +*/ +#endif diff --git a/gmsv/npc/npc_newnpcman.c b/gmsv/npc/npc_newnpcman.c new file mode 100644 index 0000000..0fa0145 --- /dev/null +++ b/gmsv/npc/npc_newnpcman.c @@ -0,0 +1,1182 @@ +#include "version.h" +#include +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "lssproto_serv.h" +#include "enemy.h" +#include "log.h" +#include "battle.h" +#include "readmap.h" +#include "handletime.h" +#include "npc_eventaction.h" +#include "npc_newnpcman.h" +#include "pet.h" +#define NEWNPCMAN_STANDBY 5000 +#define NEWNPCMAN_WAITTIME 150 +enum { + WINDOW_START=1, + WINDOW_SELECT1, + WINDOW_SELECT2, + WINDOW_SELECT3, + WINDOW_SELECTLOSTPET, + WINDOW_DEFIND, + WINDOW_WARP, + WINDOW_END, + + NPC_PROGRAMEGINEER_START=1, + NPC_PROGRAMEGINEER_SELECT1, + NPC_PROGRAMEGINEER_SELECT2, + NPC_PROGRAMEGINEER_SELECT3, + NPC_PROGRAMEGINEER_SELECTLOSTPET, + NPC_PROGRAMEGINEER_DEFIND, + NPC_PROGRAMEGINEER_END, +}; +enum { + NPC_WORK_CURRENTTIME = CHAR_NPCWORKINT1, +/* + NPC_WORK_ROUTETOY = CHAR_NPCWORKINT2, + NPC_WORK_ROUTEPOINT = CHAR_NPCWORKINT3, + NPC_WORK_ROUNDTRIP = CHAR_NPCWORKINT4, + NPC_WORK_MODE = CHAR_NPCWORKINT5, + NPC_WORK_CURRENTROUTE = CHAR_NPCWORKINT6, + NPC_WORK_ROUTEMAX = CHAR_NPCWORKINT7, + NPC_WORK_WAITTIME = CHAR_NPCWORKINT8, + NPC_WORK_CURRENTTIME = CHAR_NPCWORKINT9, + NPC_WORK_SEFLG = CHAR_NPCWORKINT10, +*/ +}; +/* +char UserBBIs[12][256]={ + "小矮子", "赛亚人", "辫子男孩", "酷哥", "熊皮男", "大个", + "小矮妹", "熊皮妹", "帽子妹", "短法发夹妹", "手套女", "辣妹" }; +char PetBBIs[4][256]={//格鲁西斯 贝鲁卡 金格萨贝鲁 贝鲁伊卡 + "格鲁西斯-红虎", "贝鲁卡-绿虎", "金格萨贝鲁-金虎", "贝鲁伊卡-黄虎" }; + +int PlayerBBI[6*2][4]={ + { 100000, 100005, 100010, 100015 }, //小矮子 + { 100025, 100030, 100035, 100020 }, //赛亚人 + { 100055, 100050, 100045, 100040 }, //辫子男孩 + { 100060, 100065, 100070, 100075 }, //酷哥 + { 100095, 100085, 100090, 100080 }, //熊皮男 + { 100100, 100115, 100110, 100115 }, //大个 + + { 100135, 100120, 100125, 100130 }, //小矮妹 + { 100145, 100140, 100150, 100155 }, //熊皮妹 + { 100165, 100170, 100160, 100175 }, //帽子妹 + { 100190, 100195, 100185, 100180 }, //短发发夹妹 + { 100200, 100210, 100215, 100205 }, //手套女 + { 100230, 100225, 100220, 100235 } //辣妹 + }; +*/ + +static int checkPc[48][3]; + +static void NPC_NewNpcMan_selectWindow( int meindex, int toindex, int num, int flg); + +void NPC_reCheckMyPetUnusual( int meindex, int toindex);//检查宠物异常 + +BOOL CHECK_ReplacePET( int toindex); //更换宠物 +void NPC_reCheckItemPilenum( int meindex, int toindex);//还原铁枪叁堆叠 +BOOL CHECK_ITEMEQUIT( int toindex);//更换灵力铠 +BOOL CHECK_PETBBI( int toindex);//修正宠物图号 + +#ifdef _PET_LOSTPET +BOOL NPC_reFindMyLostPet( int meindex, int toindex, char *buf); +BOOL NPC_getLostPetString( int meindex, int toindex); +BOOL NPC_backupLostPetString( int toindex); +static char petstring[7][2048]={"","","","","","",""}; +#endif + +BOOL NPC_NewNpcManInit( int meindex ) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("TRANSER_MAN: GetArgStrErr!!"); + return FALSE; + } + + { + int i; + for( i=0; i<48; i++){ + if( i == 0 ){ + checkPc[i][0]=30000; + checkPc[i][1]=30024; + checkPc[i][2]=100000; + }else{ + checkPc[i][0] = checkPc[i-1][0] + 25; + checkPc[i][1] = checkPc[i-1][1] + 25; + checkPc[i][2] = checkPc[i-1][2] + 5; + } +// print("ANDY checkPc:%d[%d,%d,%d]\n", i, checkPc[i][0], checkPc[i][1], checkPc[i][2]); + } + } + CHAR_setInt( meindex, CHAR_WHICHTYPE, CHAR_NEWNPCMAN); + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTTIME, NowTime.tv_sec); + return TRUE; +} + +void NPC_NewNpcManLoop( int meindex) +{ + +} + +void NPC_NewNpcManTalked( int meindex , int talkerindex , char *msg , int color ) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) + return; + if(NPC_Util_isFaceToFace( meindex ,talkerindex , 2) == FALSE) { + if(NPC_Util_isFaceToChara( talkerindex, meindex, 1) == FALSE) + return; + } + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("TRANSER_MAN: GetArgStrErr!!"); + return; + } + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, 0); + if( CHAR_getInt( talkerindex, CHAR_BASEBASEIMAGENUMBER) != 101578 ){ + NPC_NewNpcMan_selectWindow( meindex, talkerindex, WINDOW_SELECT1, 0); + return; + } + NPC_NewNpcMan_selectWindow( meindex, talkerindex, WINDOW_START, 0); +} + +static void NPC_NewNpcMan_selectWindow( int meindex, int toindex, int num, int flg) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + char token[256]; + + int buttontype = 0, windowtype = 0, windowno = 0; + int fd = getfdFromCharaIndex( toindex); + + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + + if(NPC_Util_isFaceToFace( meindex ,toindex , 2) == FALSE) { + if(NPC_Util_isFaceToChara( toindex, meindex, 1) == FALSE) + return; + } + + memset( npcarg, 0, sizeof( npcarg)); + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + return; + } + + memset( token, 0, sizeof( token)); + switch( num) { + case WINDOW_START: + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "START_MSG", token, sizeof( token) ) == NULL) { + return; + } + buttontype = WINDOW_BUTTONTYPE_YESNO; + windowno = NPC_PROGRAMEGINEER_DEFIND; + break; + case WINDOW_SELECT1: + sprintf(token," 请选择" + "\n 《修正宠物异常》" + "\n 《修正宠物图号》" + "\n 《更换灵力铠》" +#ifdef _PET_LOSTPET + "\n 《领回遗失宠物》" +#endif +// "\n 《还原铁枪叁堆叠》" + + ); + windowtype = WINDOW_MESSAGETYPE_SELECT; + buttontype = WINDOW_BUTTONTYPE_CANCEL; + windowno = NPC_PROGRAMEGINEER_SELECT2; + break; + case WINDOW_SELECT2: + switch( flg){ + case 1://修正宠物异常 + NPC_reCheckMyPetUnusual( meindex, toindex); + CHAR_talkToCli( toindex, -1, "身上宠物检查完毕!", CHAR_COLORYELLOW); + return; + break; + case 2://修正宠物图号 + CHECK_PETBBI( toindex); + return; + break; + case 3://更换灵力铠 + if( CHECK_ITEMEQUIT( toindex) == TRUE ){ + CHAR_talkToCli( toindex, -1, "检查完毕!", CHAR_COLORYELLOW); + } + return; + break; + + case 4: +#ifdef _PET_LOSTPET + if( NPC_reFindMyLostPet( meindex, toindex, token) == FALSE ){ + CHAR_talkToCli( toindex, -1, "查无资料!", CHAR_COLORYELLOW); + return; + } + windowtype = WINDOW_MESSAGETYPE_SELECT; + buttontype = WINDOW_BUTTONTYPE_CANCEL; + windowno = NPC_PROGRAMEGINEER_SELECTLOSTPET; +#endif + break; + case 5: //还原铁枪叁堆叠 +// NPC_reCheckItemPilenum( meindex, toindex); + return; + break; + } + break; +/* + case WINDOW_SELECT3: + { + int petnum, petindex; + petnum = atoi( data)-1; + if( petnum >= CHAR_MAXPETHAVE || petnum < 0 ) return; + petindex = CHAR_getCharPet( talker, petsel); + if( !CHAR_CHECKINDEX(petindex) ) return; + break; + } +*/ + case WINDOW_SELECTLOSTPET: +#ifdef _PET_LOSTPET + { + int ret, i, ti, ltime, cost; + Char ch; + char msgbuf[256]; + char petstring1[2048]; + + int havepetelement = CHAR_getCharPetElement( toindex); + ti = flg; + if( havepetelement < 0 ){ + CHAR_talkToCli( toindex, -1, "宠物栏位已满!", CHAR_COLORYELLOW); + return; + } + if( NPC_getLostPetString( meindex, toindex) == FALSE ) { + CHAR_talkToCli( toindex, -1, "领取宠物失败!", CHAR_COLORYELLOW); + return; + } + + if( getStringFromIndexWithDelim( petstring[ti-1], "#", 2, petstring1, sizeof( petstring1)) == FALSE ){ + CHAR_talkToCli( toindex, -1, "领取宠物失败!", CHAR_COLORYELLOW); + return; + }else{ + char buf1[256]; + if( getStringFromIndexWithDelim( petstring[ti-1], "|", 6, buf1, sizeof( buf1)) == FALSE ) return; + ltime = atoi(buf1); + ltime = time( NULL) - ltime; + ltime = ltime/(60*60*24); + if( getStringFromIndexWithDelim( petstring[ti-1], "|", 4, buf1, sizeof( buf1)) == FALSE ) return; + cost = atoi( buf1); +#if 0 // 修正保释金 + cost = cost + (ltime*100); + cost = (cost>10000)?10000:cost; +#else + cost = cost + (ltime*10000); +#endif + if( CHAR_getInt( toindex, CHAR_GOLD) < cost ) { + sprintf( buf1, "宠物已寄放%d天,共需%d石币才可领回。", ltime, cost); + CHAR_talkToCli( toindex, meindex, buf1, CHAR_COLORYELLOW); + return; + } + } + + + ret = CHAR_makePetFromStringToArg( petstring1, &ch, -2); + strcpy( petstring[ti-1], ""); + if( ret ) { + char buf1[256]; + int petindex = PET_initCharOneArray( &ch ); + if( !CHAR_CHECKINDEX( petindex) ){ + CHAR_talkToCli( toindex, -1, "领取宠物失败!", CHAR_COLORYELLOW); + return; + } + print("ANDY petindex:%d[%s]\n", petindex, CHAR_getChar( petindex, CHAR_NAME) ); + + CHAR_complianceParameter( petindex ); + CHAR_setInt( petindex, CHAR_HP, CHAR_getWorkInt( petindex, CHAR_WORKMAXHP)); + CHAR_setWorkInt( petindex, CHAR_WORKPLAYERINDEX, toindex); + CHAR_setCharPet( toindex, havepetelement, petindex); + CHAR_setChar( petindex, CHAR_OWNERCDKEY, + CHAR_getChar( toindex, CHAR_CDKEY)); + CHAR_setChar( petindex, CHAR_OWNERCHARANAME, + CHAR_getChar( toindex, CHAR_NAME)); + + if( NPC_backupLostPetString( toindex) == FALSE ){ + print("ANDY err backup petstring !!\n"); + return; + } + + sprintf( buf1, "LostPGet:%d", cost); + LogPet( + CHAR_getChar( toindex, CHAR_NAME ), + CHAR_getChar( toindex, CHAR_CDKEY ), + CHAR_getChar( petindex, CHAR_NAME), + CHAR_getInt( petindex, CHAR_LV), + buf1, + CHAR_getInt( toindex,CHAR_FLOOR), + CHAR_getInt( toindex,CHAR_X ), + CHAR_getInt( toindex,CHAR_Y ), + CHAR_getChar( petindex, CHAR_UNIQUECODE) // shan 2001/12/14 + ); + sprintf( buf1, "领取宠物%s。", CHAR_getUseName( petindex)); + CHAR_talkToCli( toindex, meindex, buf1, CHAR_COLORYELLOW); + for( i = 0; i < CHAR_MAXPETHAVE; i++){ + int petindex = CHAR_getCharPet( toindex, i); + if( !CHAR_CHECKINDEX( petindex) ) + continue; + CHAR_complianceParameter( petindex ); + snprintf( msgbuf, sizeof( msgbuf ), "K%d", i ); + CHAR_sendStatusString( toindex, msgbuf ); + snprintf( msgbuf, sizeof( msgbuf ), "W%d", i ); + CHAR_sendStatusString( toindex, msgbuf ); + } + CHAR_DelGold( toindex, cost); + }else{ + CHAR_talkToCli( toindex, -1, "领取宠物失败!", CHAR_COLORYELLOW); + return; + } + return; + } +#endif + return; + break; + case WINDOW_DEFIND: + { + int i; + int face = CHAR_getInt( toindex, CHAR_FACEIMAGENUMBER); + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "CHECK_MSG", token, sizeof( token) ) == NULL) { + return; + } + for( i=0; i<48; i++){ + if( face >= checkPc[i][0] && face < checkPc[i][1] ) + break; + } + if( i >= 48 )return; + CHAR_setWorkInt( toindex, CHAR_WORKNPCMETAMO, meindex); + CHAR_setInt( toindex, CHAR_BASEIMAGENUMBER, checkPc[i][2]); + CHAR_complianceParameter( toindex ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( toindex , CHAR_WORKOBJINDEX )); + CHAR_send_P_StatusString( toindex , CHAR_P_STRING_BASEBASEIMAGENUMBER); + + buttontype = WINDOW_BUTTONTYPE_YESNO; + windowno = NPC_PROGRAMEGINEER_END; + } + break; + case WINDOW_END: + { + CHAR_setWorkInt( toindex, CHAR_WORKNPCMETAMO, -1); + CHAR_setInt( toindex, CHAR_BASEBASEIMAGENUMBER, + CHAR_getInt( toindex, CHAR_BASEIMAGENUMBER) ); + + CHAR_complianceParameter( toindex ); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( toindex , CHAR_WORKOBJINDEX )); + CHAR_send_P_StatusString( toindex , CHAR_P_STRING_BASEBASEIMAGENUMBER); + return; + } + break; + } + + lssproto_WN_send( fd, windowtype, buttontype, windowno, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), token); +} + +void NPC_NewNpcManWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data) +{ + if(NPC_Util_isFaceToFace( meindex ,talkerindex , 2) == FALSE) { + if(NPC_Util_isFaceToChara( talkerindex, meindex, 1) == FALSE) + return; + } + + if( select == WINDOW_BUTTONTYPE_CANCEL || select == WINDOW_BUTTONTYPE_NO){ + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, 0); + CHAR_setWorkInt( talkerindex, CHAR_WORKNPCMETAMO, -1); + return; + } + switch( seqno) { + case NPC_TRANSERMAN_START: + break; + case NPC_PROGRAMEGINEER_SELECT1: + NPC_NewNpcMan_selectWindow( meindex, talkerindex, WINDOW_SELECT1, atoi( data)); + break; + case NPC_PROGRAMEGINEER_SELECT2: + NPC_NewNpcMan_selectWindow( meindex, talkerindex, WINDOW_SELECT2, atoi( data)); + break; + case NPC_PROGRAMEGINEER_SELECT3: + NPC_NewNpcMan_selectWindow( meindex, talkerindex, WINDOW_SELECT3, atoi( data)); + break; + case NPC_PROGRAMEGINEER_SELECTLOSTPET: + NPC_NewNpcMan_selectWindow( meindex, talkerindex, WINDOW_SELECTLOSTPET, atoi( data)); + break; + case NPC_PROGRAMEGINEER_DEFIND: + NPC_NewNpcMan_selectWindow( meindex, talkerindex, WINDOW_DEFIND, atoi( data)); + break; + case NPC_PROGRAMEGINEER_END: + NPC_NewNpcMan_selectWindow( meindex, talkerindex, WINDOW_END, atoi( data)); + break; + } +} + +BOOL CHECK_ITEMEQUIT( int toindex) +{ + int i, itemindex; + char token[256]; + + for (i = CHAR_STARTITEMARRAY; i < CHAR_MAXITEMHAVE; i ++) { + itemindex = CHAR_getItemIndex( toindex, i); + if( ITEM_getInt( itemindex, ITEM_ID) == 19646 ){ + CHAR_DelItem( toindex, i); + itemindex = -1; + itemindex = ITEM_makeItemAndRegist( 1292); + if( !ITEM_CHECKINDEX( itemindex) ){ + }else{ + int ret = CHAR_addItemSpecificItemIndex( toindex, itemindex); + if( ret < 0 || ret >= CHAR_MAXITEMHAVE ) { + ITEM_endExistItemsOne( itemindex); + continue; + } + sprintf( token,"拿到%s", ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( toindex, -1, token, CHAR_COLORYELLOW ); + CHAR_sendItemDataOne( toindex, ret); + continue; + } + } + if( ITEM_getInt( itemindex, ITEM_ID) == 1292 && + ITEM_getInt( itemindex, ITEM_MAXDAMAGECRUSHE) > 0 ){ + + ITEM_setInt( itemindex, ITEM_MAXDAMAGECRUSHE, 0); + ITEM_setInt( itemindex, ITEM_DAMAGECRUSHE, 0); + sprintf(token,"修正%s损坏度", ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_sendItemDataOne( toindex, i); + CHAR_talkToCli( toindex, -1, token, CHAR_COLORYELLOW); + } + } + + // 寄放店 + for (i = 0; i < CHAR_MAXPOOLITEMHAVE; i++) { + if( ITEM_getInt( itemindex, ITEM_ID) == 1292 && + ITEM_getInt( itemindex, ITEM_MAXDAMAGECRUSHE) > 0 ){ + + ITEM_setInt( itemindex, ITEM_MAXDAMAGECRUSHE, 0); + ITEM_setInt( itemindex, ITEM_DAMAGECRUSHE, 0); + sprintf(token,"修正寄放店中%s损坏度", ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( toindex, -1, token, CHAR_COLORYELLOW); + } + } + + return TRUE; +} + + +BOOL CHECK_PETBBI( int toindex) +{ + int i, petindex, PetID; + BOOL Finds = FALSE; + char token[256]; + for( i=0; i < CHAR_MAXPETHAVE; i++) { + int parry, array, PetBBI; + petindex = CHAR_getCharPet( toindex, i); + if( !CHAR_CHECKINDEX( petindex) ) continue; + PetID = CHAR_getInt( petindex, CHAR_PETID); + array = ENEMY_getEnemyArrayFromTempNo( PetID); + if( !ENEMY_CHECKINDEX( array)) continue; + parry = ENEMYTEMP_getEnemyTempArray( array); + PetBBI = ENEMYTEMP_getInt( parry, E_T_IMGNUMBER); + + if( CHAR_getInt( petindex, CHAR_BASEBASEIMAGENUMBER) != PetBBI || + CHAR_getInt( petindex, CHAR_BASEIMAGENUMBER) != PetBBI ){ + CHAR_setInt( petindex, CHAR_BASEBASEIMAGENUMBER, PetBBI); + CHAR_setInt( petindex, CHAR_BASEIMAGENUMBER, PetBBI); + sprintf( token, "修正%s图号", CHAR_getUseName( petindex)); + CHAR_talkToCli( toindex, -1, token, CHAR_COLORYELLOW); + Finds = TRUE; + } + CHAR_setInt( petindex, CHAR_EARTHAT, ENEMYTEMP_getInt( parry, E_T_EARTHAT) ); + CHAR_setInt( petindex, CHAR_WATERAT, ENEMYTEMP_getInt( parry, E_T_WATERAT) ); + CHAR_setInt( petindex, CHAR_FIREAT, ENEMYTEMP_getInt( parry, E_T_FIREAT) ); + CHAR_setInt( petindex, CHAR_WINDAT, ENEMYTEMP_getInt( parry, E_T_WINDAT) ); + } + for( i=0; i %s (%s:%s)(file:%s %d) !! \n", + petID, PetNAME, CHAR_getUseName( toindex), + CHAR_getChar( toindex, CHAR_CDKEY), __FILE__, __LINE__ ); + } + } + + for( i=0; i 0 )continue; + + if( i == CHAR_getInt( toindex, CHAR_DEFAULTPET) ) { + int fd = getfdFromCharaIndex( toindex); + CHAR_setInt( toindex, CHAR_DEFAULTPET, -1); + lssproto_KS_send( fd, -1, TRUE); + } + + snprintf( szPet,sizeof( szPet), "交出%s。", CHAR_getUseName( petindex) ); + CHAR_talkToCli( toindex, -1, szPet, CHAR_COLORYELLOW); + LogPet( + CHAR_getChar( toindex, CHAR_NAME ), + CHAR_getChar( toindex, CHAR_CDKEY ), + CHAR_getChar( petindex, CHAR_NAME), + CHAR_getInt( petindex, CHAR_LV), + "TenseiDel", + CHAR_getInt( toindex,CHAR_FLOOR), + CHAR_getInt( toindex,CHAR_X ), + CHAR_getInt( toindex,CHAR_Y ), + CHAR_getChar( petindex, CHAR_UNIQUECODE) + ); + + Finds = TRUE; + CHAR_setCharPet( toindex, i, -1); + CHAR_endCharOneArray( petindex ); + + array = ENEMY_getEnemyArrayFromTempNo( 1133); + if( !ENEMY_CHECKINDEX( array)) continue; + ret = ENEMY_createPetFromEnemyIndex( toindex, array); + if( !CHAR_CHECKINDEX( ret ) ) continue; + + snprintf( szPet, sizeof( szPet), "拿到%s。", CHAR_getUseName( ret) ); + CHAR_talkToCli( toindex, -1, szPet, CHAR_COLORWHITE); + + LogPet( + CHAR_getChar( toindex, CHAR_NAME ), + CHAR_getChar( toindex, CHAR_CDKEY ), + CHAR_getChar( ret, CHAR_NAME), + CHAR_getInt( ret, CHAR_LV), + "TenseiGet", + CHAR_getInt( toindex,CHAR_FLOOR), + CHAR_getInt( toindex,CHAR_X ), + CHAR_getInt( toindex,CHAR_Y ), + CHAR_getChar( ret, CHAR_UNIQUECODE) + ); + + } + + for( i=0; i 1 ){ + int itemID, pilenum=1, newindex; + itemID = ITEM_getInt( itemindex, ITEM_ID); + if( !ITEM_CHECKITEMTABLE( itemID) ) continue; + pilenum = ITEM_getInt( itemindex, ITEM_USEPILENUMS); + while( pilenum > 1 ){ + int ti = CHAR_findEmptyItemBox( toindex); + if( ti == -1 ){ + CHAR_sendItemDataOne( toindex, i); + CHAR_talkToCli( toindex, -1, "道具栏位已满。", CHAR_COLORYELLOW); + return; + } + newindex = ITEM_makeItemAndRegist( itemID); + if( !ITEM_CHECKINDEX( newindex) ) break; + CHAR_setItemIndex( toindex , ti, newindex); + CHAR_sendItemDataOne( toindex, ti); + pilenum--; + ITEM_setInt( itemindex, ITEM_USEPILENUMS, pilenum); + } + if( ITEM_getInt( itemindex, ITEM_CANBEPILE) != ITEMTBL_getInt( itemID, ITEM_CANBEPILE) ) + ITEM_setInt( itemindex, ITEM_CANBEPILE, ITEMTBL_getInt( itemID, ITEM_CANBEPILE) ); + CHAR_sendItemDataOne( toindex, i); + } + } + CHAR_talkToCli( toindex, -1, "铁枪叁处理完毕。", CHAR_COLORYELLOW); +} + +#ifdef _PET_LOSTPET +BOOL NPC_reFindMyLostPet( int meindex, int toindex, char *buf) +{ + //地上0 溜宠 1 宠邮 2 + FILE *fp = NULL; + char *CdKey=NULL; + int lv=0, cost, ltime, count=0, i, type; + char filename[256], line[2048], buf1[256]; + char petname[256], typebuf[256]; + char buf2[10][256]={"\n","\n","\n","\n","\n", + "\n","\n","\n","\n","\n" }; + CdKey = CHAR_getChar( toindex, CHAR_CDKEY ); + if( CdKey == NULL ) return FALSE; + sprintf( filename, "lostpet/%s.txt", CdKey); + strcpy( buf, "==宠物遗失纪录==\n"); + if( (fp=fopen( filename, "r")) == NULL ) return FALSE; + + while( fgets( line , sizeof( line ) , fp ) && count < 7){ + if( line == NULL ) continue; + if( getStringFromIndexWithDelim( line, "|", 1, buf1, sizeof( buf1)) == FALSE ) continue; + if( strcmp( CHAR_getChar( toindex, CHAR_CDKEY ), buf1 )) continue; + if( getStringFromIndexWithDelim( line, "|", 6, buf1, sizeof( buf1)) == FALSE ) continue; + ltime = atoi(buf1); + ltime = time( NULL) - ltime; + ltime = ltime/(60*60*24); + if( ltime > 14 ) continue;//续放14天 + + if( getStringFromIndexWithDelim( line, "|", 2, petname, sizeof( petname)) == FALSE ) continue; + if( getStringFromIndexWithDelim( line, "|", 3, buf1, sizeof( buf1)) == FALSE ) continue; + lv = atoi( buf1); + if( getStringFromIndexWithDelim( line, "|", 4, buf1, sizeof( buf1)) == FALSE ) continue; + cost = atoi( buf1); + + if( getStringFromIndexWithDelim( line, "#", 3, buf1, sizeof( buf1)) == FALSE ) continue; + type = atoi( buf1); + if( type == 1 ){ + strcpy( typebuf, "溜宠"); + }else if( type == 2 ){ + strcpy( typebuf, "宠邮"); + }else{ + strcpy( typebuf, "地上"); + } + + sprintf( buf2[count++], "%s LV:%d石币:%d(%d天%s)\n", petname, lv, cost, ltime, typebuf); + } + fclose( fp); + for( i=0; i<7; i++){ + strcat( buf, buf2[i]); + } + if( count == 0 ) return FALSE; + return TRUE; +} + +BOOL NPC_getLostPetString( int meindex, int toindex) +{ + FILE *fp = NULL; + char *CdKey=NULL; + int count=0, i, ltime; + char filename[256], line[2048], buf1[256]; + + for( i=0; i<7; i++) + strcpy( petstring[i], ""); + + CdKey = CHAR_getChar( toindex, CHAR_CDKEY ); + if( CdKey == NULL ) return FALSE; + sprintf( filename, "lostpet/%s.txt", CdKey); + if( (fp=fopen( filename, "r")) == NULL ) return FALSE; + + while( fgets( line , sizeof( line ) , fp ) && count < 7){ + if(strlen( line) <= 0 ) continue; +// if( getStringFromIndexWithDelim( line, "#", 2, buf1, sizeof( buf1)) == FALSE ) return FALSE; +// Terry fix 读取时没有判断时间 2004/09/22 + if(getStringFromIndexWithDelim(line,"|",6,buf1,sizeof(buf1)) == FALSE) continue; + ltime = atoi(buf1); + ltime = time( NULL) - ltime; + ltime = ltime/(60*60*24); + if(ltime > 14) continue;//续放14天 +// Terry end + strcpy( petstring[count++], line); + } + + fclose( fp); + return TRUE; +} + +BOOL NPC_backupLostPetString( int toindex) +{ + FILE *fp = NULL; + char *CdKey=NULL; + int i, count=0; + char filename[256]; + + CdKey = CHAR_getChar( toindex, CHAR_CDKEY ); + if( CdKey == NULL ) return FALSE; + sprintf( filename, "lostpet/%s.txt", CdKey); + if( (fp=fopen( filename, "w")) == NULL ) return FALSE; + + for( i=0; i<7; i++){ + if( strlen( petstring[i]) <= 0 ) continue; + fprintf( fp, "%s", petstring[i]); + count++; + } + fclose( fp); + + if( count == 0 ) + remove( filename); + + return TRUE; +} + +/* + + +#ifdef _NEW_WARPMAN +#include "npc_newnpcman.h" +#define NEWNPCMAN_STANDBY 5000 +#define NEWNPCMAN_WAITTIME 150 + +enum{ +NPC_NEWNPCMAN_START=21, +NPC_NEWNPCMAN_MAN, +NPC_NEWNPCMAN_END, +}; + +enum { + NEWNPC_START = 1, + NEWNPC_MAN, + NEWNPC_END, +}; + +enum { + NPC_WORK_INDEX = CHAR_NPCWORKINT1, + NPC_WORK_WORKTYPE = CHAR_NPCWORKINT2, + NPC_WORK_CURRENTTIME = CHAR_NPCWORKINT3, +}; + +BOOL CHECK_YEARPET( int toindex); +static void NPC_NewNpcMan_selectWindow( int meindex, int toindex, int num, int flg); +int NPC_NewNpcManDelPet(int meindex,int talker, int petsel); +BOOL NPC_NewNpcManAddPet(int meindex, int talker, int petid); + +//可换四种宠 +static int Re_Pet[4]; +// shan +char uStr[128]=""; + +BOOL NPC_NewNpcManInit( int meindex ) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf1[256],buf2[256]; + int k=1; + + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg)) == NULL) { + print("GambleBank:GetArgStrErr"); + return FALSE; + } + + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "REPET", buf1, sizeof( buf1)) == NULL ) { + return FALSE; + } + + while( getStringFromIndexWithDelim(buf1, ",", k, buf2, sizeof(buf2)) != FALSE ) { + Re_Pet[k-1] = atoi( buf2); + if( Re_Pet[k-1] < 0 ) + return FALSE; + k++; + if( (k-1) >= arraysizeof( Re_Pet) ) + break; + } + + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_NEWNPCMAN ); + CHAR_setInt( meindex, CHAR_LOOPINTERVAL, NEWNPCMAN_STANDBY); + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTTIME, NowTime.tv_sec); + CHAR_setWorkInt( meindex , NPC_WORK_INDEX, -1); + return TRUE; +} + +void NPC_NewNpcManLoop( int meindex) +{ + //test + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf1[256],buf2[256]; + int k=1; + + int fulltime = NEWNPCMAN_WAITTIME; + if( (CHAR_getWorkInt( meindex, NPC_WORK_CURRENTTIME) + fulltime) > NowTime.tv_sec ) + return; + CHAR_setWorkInt( meindex , NPC_WORK_INDEX, -1); + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTTIME, NowTime.tv_sec); + + //test + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg)) == NULL) { + print("GambleBank:GetArgStrErr"); + return; + } + + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "REPET", buf1, sizeof( buf1)) == NULL ) { + return; + } + + while( getStringFromIndexWithDelim(buf1, ",", k, buf2, sizeof(buf2)) != FALSE ) { + Re_Pet[k-1] = atoi( buf2); + if( Re_Pet[k-1] < 0 ) + return; + k++; + if( (k-1) >= arraysizeof( Re_Pet) ) + break; + } + //test end +} + +void NPC_NewNpcManTalked( int meindex , int talkerindex , char *msg , int color ) +{ + char buf1[256]; + + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) { + return; + } + + if(NPC_Util_isFaceToFace( meindex ,talkerindex , 2) == FALSE) { + if(NPC_Util_isFaceToChara( talkerindex, meindex, 1) == FALSE) return; + } + + if( CHAR_getWorkInt( meindex , NPC_WORK_INDEX) >= 0 ) { + sprintf( buf1,"%s","我正忙着呢!"); + print("\n NPC_WORK_INDEX = %d ", CHAR_getWorkInt( meindex , NPC_WORK_INDEX)); + CHAR_talkToCli( talkerindex, meindex, buf1, CHAR_COLORYELLOW); + return; + }else { + CHAR_setWorkInt( meindex , NPC_WORK_INDEX, talkerindex); + print("\n start : NPC_WORK_INDEX = talkerindex"); + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTTIME, NowTime.tv_sec); + NPC_NewNpcMan_selectWindow( meindex, talkerindex, NEWNPC_START, 0); + } +} + +static void NPC_NewNpcMan_selectWindow( int meindex, int toindex, int num, int flg) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + char token[256]; + char token_str[][56]={"ERROR_MSG","START_MSG","END_MSG","ERROR_ALL"}; + int buttontype = 0, windowtype = 0, windowno = 0; + int fd = getfdFromCharaIndex( toindex); + int petno = 718, petid =1479; + int type_str = 0; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg)) == NULL) { + print("GambleBank:GetArgStrErr"); + CHAR_setWorkInt( meindex , NPC_WORK_INDEX, -1); + return ; + } + + if( CHAR_getWorkInt( meindex , NPC_WORK_INDEX) != toindex ) { + sprintf( token,"%s","我正忙着呢!"); + CHAR_talkToCli( toindex, meindex, token, CHAR_COLORYELLOW); + return; + } + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTTIME, NowTime.tv_sec); + print("\n switch( num=%d)", num); + switch( num) { + case NEWNPC_START: + type_str = 1; + buttontype = WINDOW_BUTTONTYPE_OKCANCEL; + windowno = NPC_NEWNPCMAN_START; + break; + + case NEWNPC_MAN: + { + if( CHECK_YEARPET( toindex) == TRUE ) { + type_str = 1; + windowtype = WINDOW_MESSAGETYPE_PETSELECT; + buttontype = WINDOW_BUTTONTYPE_CANCEL; + windowno = NPC_NEWNPCMAN_MAN; + }else { + type_str = 3; + buttontype = WINDOW_BUTTONTYPE_OK; + windowno = NPC_NEWNPCMAN_END; + CHAR_setWorkInt( meindex , NPC_WORK_INDEX, -1); + } + } + break; + + case NEWNPC_END: + type_str = 0; + if( flg <= CHAR_MAXPETHAVE && flg >= 0 ) { + petno = flg; + + if( ( petid = NPC_NewNpcManDelPet( meindex, toindex, petno)) >= 0 ) { + if( NPC_NewNpcManAddPet( meindex, toindex, petid) == TRUE ) { + type_str = 2; + } + } + } + CHAR_setWorkInt( meindex , NPC_WORK_INDEX, -1); + buttontype = WINDOW_BUTTONTYPE_OK; + windowno = NPC_NEWNPCMAN_END; + + break; + } + + if(NPC_Util_GetStrFromStrWithDelim( npcarg, token_str[ type_str], token,sizeof( token) ) == NULL) { + print("token_str[%d] err !", type_str); + CHAR_setWorkInt( meindex , NPC_WORK_INDEX, -1); + return; + } + + lssproto_WN_send( fd, windowtype, buttontype, windowno, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), token); +} + +void NPC_NewNpcManWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data) +{ + + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) { + return; + } + if(NPC_Util_isFaceToFace( meindex ,talkerindex , 2) == FALSE) { + if(NPC_Util_isFaceToChara( talkerindex, meindex, 1) == FALSE) return; + } + + print("\n seqno=%d, select=%d", seqno, select); + switch( seqno) { + case NPC_NEWNPCMAN_START: + if( select != WINDOW_BUTTONTYPE_YES && select != WINDOW_BUTTONTYPE_OK ) { + CHAR_setWorkInt( meindex , NPC_WORK_INDEX, -1); + return; + } + if(select==WINDOW_BUTTONTYPE_CANCEL) { + CHAR_setWorkInt( meindex , NPC_WORK_INDEX, -1); + }else { + NPC_NewNpcMan_selectWindow( meindex, talkerindex, NEWNPC_MAN, -1); + } + break; + + case NPC_NEWNPCMAN_MAN: + { + int petnum; + petnum = atoi( data)-1; + + print("\n petnum=%d", petnum); + if(select==WINDOW_BUTTONTYPE_CANCEL) { + CHAR_setWorkInt( meindex , NPC_WORK_INDEX, -1); + }else { + NPC_NewNpcMan_selectWindow( meindex, talkerindex, NEWNPC_END, petnum); + } + } + break; + + case NPC_NEWNPCMAN_END: + break; + } +} + +int NPC_NewNpcManDelPet(int meindex,int talker, int petsel) +{ + int defpet; + int fd = getfdFromCharaIndex( talker ); + char msgbuf[64], szPet[128]; + int k=0; + int petindex=-1; + + petindex = CHAR_getCharPet( talker, petsel); + if( !CHAR_CHECKINDEX(petindex) ) + return -1; + + for( k=0;k +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "npc_npcenemy.h" +#include "battle.h" +#include "enemy.h" +#include "readmap.h" +#include "encount.h" +#include "lssproto_serv.h" +#include "configfile.h" +#include "anim_tbl.h" +#include "handletime.h" +#include "npc_eventaction.h" + +enum { + CHAR_WORK_ENCOUNTTYPE = CHAR_NPCWORKINT1, /* 巨件市它件玄及酷 */ + CHAR_WORK_DIEACT = CHAR_NPCWORKINT2, /* 韶氏分凛升丹允月井 */ + CHAR_WORK_WARP_FLOOR = CHAR_NPCWORKINT3, /* 伐□皿允月白夫失*/ + CHAR_WORK_WARP_X = CHAR_NPCWORKINT4, /* 伐□皿允月X */ + CHAR_WORK_WARP_Y = CHAR_NPCWORKINT5, /* 伐□皿允月Y */ + CHAR_WORK_ONEBATTLE = CHAR_NPCWORKINT6, /* 域勾仄井爵 仄卅中 */ + NPC_TIME_MODE = CHAR_NPCWORKINT7, + CHAR_WORK_BASEIMGBAK = CHAR_NPCWORKINT8, /* 手午及 飓 寞 */ + CHAR_WORK_DIETIME = CHAR_NPCWORKINT9, /* 韶氏分凛棉 */ + CHAR_WORK_REVIVALTIME = CHAR_NPCWORKINT10, /* 戏五忒月凛棉 */ + CHAR_WORK_BATTLETYPE = CHAR_NPCWORKINT11, +}; + +#define NPC_ENEMY_REVIVALTIMA_DEFAULT 120 + +static int gymbody[] = { + SPR_001em,SPR_011em,SPR_021em,SPR_031em,SPR_041em,SPR_051em, + SPR_061em,SPR_071em,SPR_081em,SPR_091em,SPR_101em,SPR_111em, + + SPR_002em,SPR_012em,SPR_022em,SPR_032em,SPR_042em,SPR_052em, + SPR_062em,SPR_072em,SPR_082em,SPR_092em,SPR_102em,SPR_112em, + + SPR_003em,SPR_013em,SPR_023em,SPR_033em,SPR_043em,SPR_053em, + SPR_063em,SPR_073em,SPR_083em,SPR_093em,SPR_103em,SPR_113em, + + SPR_004em,SPR_014em,SPR_024em,SPR_034em,SPR_044em,SPR_054em, + SPR_064em,SPR_074em,SPR_084em,SPR_094em,SPR_104em,SPR_114em, +}; + +#ifdef _NEW_WARPMAN +static BOOL NPC_NPCEnemy_CheckFree( int meindex, int toindex, BOOL *Party); +BOOL NPC_WarpAllMsg(int meindex,int toindex ); +BOOL NPCEnemy_CheckFree( int meindex, int talker, char *buf); +BOOL NPCEnemy_BSCheck(int meindex,int talker,char* buf); +BOOL NPCEnemy_FreeIfCheck(int meindex,int talker,char* buf,int kosuu,int flg, int temp); +BOOL NPCEnemy_WarpManReduce(int meindex,int talker,char *buf); +BOOL NPCEnemy_BigSmallLastCheck(int point1,int mypoint,int flg); +BOOL NPCEnemy_CheckTrans(int meindex,int talker,int trans,int flg); +BOOL NPCEnemy_LevelCheck(int meindex,int talker,int level,int flg); +BOOL NPCEnemy_CheckMyPet( int meindex, int talker, int petLv, int flg, int petid); +BOOL NPCEnemy_ItemCheck(int meindex,int talker,int itemNo,int flg); +#endif +#ifdef _NPC_REPLACEMENT +void Check_EnemyWarpMe( int meindex, char *args ); +#endif +static int NPC_NPCEnemy_StealItem( char *argstr, int meindex, int charaindex); + +BOOL NPC_NPCEnemyInit( int meindex ) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[64]; + int tmp, gym; + + + if( NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)) == NULL ) { + print("Can't GetArgStr !!"); + return FALSE; + } + if( NPC_Util_GetStrFromStrWithDelim( argstr, "sktype", buf, sizeof( buf)) != NULL ){ + CHAR_setWorkInt( meindex, CHAR_WORK_BATTLETYPE, atoi( buf)); + }else{ + CHAR_setWorkInt( meindex, CHAR_WORK_BATTLETYPE, 0); + } + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "enemyno", buf, sizeof( buf)) == NULL ){ + char filename[256]; + NPC_Util_CheckAssignArgFile( meindex, filename); + print( "NPCEnemy: nothing parameter [enemyno]:\n%s\n", filename); + return FALSE; + }else { + int i; + for( i = 0; i < NPC_ENEMY_ENEMYNUMBER; i ++ ) { + int curEnemy; + char data[128]; + int ret; + ret = getStringFromIndexWithDelim( buf,",", i + 1, data, sizeof(data)); + if( ret == FALSE) + break; + curEnemy = ENEMY_getEnemyArrayFromId( atoi( data)); + if( !ENEMY_CHECKINDEX( curEnemy) ) { + char filename[256]; + NPC_Util_CheckAssignArgFile( meindex, filename); + print( "NPCEnemy: invalid param [enemyno:%d data:%s curEnemy:%d]\nfile:%s\n",i+1, data, curEnemy, filename ); + return FALSE; + } + } + } + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "steal", buf, sizeof( buf)) != NULL ) { + if( NPC_Util_GetStrFromStrWithDelim( argstr, "item", buf, sizeof( buf)) == NULL ) { + print( "NPCEnemy:有指定steal而没有指定item,很奇怪\n"); + return FALSE; + } + } + + gym = NPC_Util_GetNumFromStrWithDelim( argstr, "gym"); + + if( gym > 0 ){ + CHAR_setInt( meindex, CHAR_BASEBASEIMAGENUMBER, + gymbody[RAND( 0, arraysizeof( gymbody ) - 1)] ); + CHAR_setInt( meindex, CHAR_BASEIMAGENUMBER, + CHAR_getInt( meindex, CHAR_BASEBASEIMAGENUMBER ) ); + CHAR_setInt( meindex, CHAR_LV, gym ); + } + tmp = NPC_Util_GetNumFromStrWithDelim( argstr, "dieact"); + if( tmp != 1 ) + tmp = 0; + CHAR_setWorkInt( meindex, CHAR_WORK_DIEACT, tmp); + if( strstr( argstr, "NEWNPCENEMY") != 0 ) { + CHAR_setWorkInt( meindex, CHAR_WORK_WARP_FLOOR, 0 ); + CHAR_setWorkInt( meindex, CHAR_WORK_WARP_Y, 0 ); + CHAR_setWorkInt( meindex, CHAR_WORK_WARP_X, 0 ); + }else { + if( CHAR_getWorkInt( meindex, CHAR_WORK_DIEACT) == 1 ) { + char buff1[256]; + if( NPC_Util_GetStrFromStrWithDelim( argstr, "warpfl", buff1, sizeof( buff1) ) == NULL) { + print( "NPCENEMY: nothing warp_floor %s\n", buff1); + return FALSE; + } + tmp = atoi( buff1); + CHAR_setWorkInt( meindex, CHAR_WORK_WARP_FLOOR, tmp); + if( NPC_Util_GetStrFromStrWithDelim( argstr, "warpx", buff1, sizeof( buff1) ) == NULL) { + print( "NPCENEMY: nothing warp_x\n"); + return FALSE; + } + tmp = atoi( buff1); + CHAR_setWorkInt( meindex, CHAR_WORK_WARP_X, tmp); + if( NPC_Util_GetStrFromStrWithDelim( argstr, "warpy", buff1, sizeof( buff1) ) == NULL) { + print( "NPCENEMY: nothing warp_y\n"); + return FALSE; + } + tmp = atoi( buff1); + CHAR_setWorkInt( meindex, CHAR_WORK_WARP_Y, tmp); + if( MAP_IsValidCoordinate( CHAR_getWorkInt( meindex, CHAR_WORK_WARP_FLOOR), + CHAR_getWorkInt( meindex, CHAR_WORK_WARP_X), + CHAR_getWorkInt( meindex, CHAR_WORK_WARP_Y) ) == FALSE ){ + char filename[256]; + NPC_Util_CheckAssignArgFile( meindex, filename); + print( "NPCENEMY: %s: .\n %s.\nInvalid fl=%d,x=%d,y=%d\n", filename, argstr, + CHAR_getWorkInt( meindex, CHAR_WORK_WARP_FLOOR), + CHAR_getWorkInt( meindex, CHAR_WORK_WARP_X), + CHAR_getWorkInt( meindex, CHAR_WORK_WARP_Y) ); + return FALSE; + } + } + } + //andy_end + tmp = NPC_Util_GetNumFromStrWithDelim( argstr, "entype"); + if( tmp != 1 && tmp != 2) + tmp = 0; + CHAR_setWorkInt( meindex, CHAR_WORK_ENCOUNTTYPE, tmp); + + tmp = NPC_Util_GetNumFromStrWithDelim( argstr, "onebattle"); + if( tmp != 1 ) + tmp = 0; + CHAR_setWorkInt( meindex, CHAR_WORK_ONEBATTLE, tmp); + + tmp = NPC_Util_GetNumFromStrWithDelim( argstr, "time"); + if( tmp == -1 ) + tmp = NPC_ENEMY_REVIVALTIMA_DEFAULT; + CHAR_setWorkInt( meindex, CHAR_WORK_REVIVALTIME, tmp); + + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPENPCENEMY ); + CHAR_setWorkInt( meindex, CHAR_WORKEVENTTYPE, CHAR_EVENT_ENEMY); + CHAR_setWorkInt( meindex, CHAR_WORK_BASEIMGBAK, + CHAR_getInt( meindex, CHAR_BASEIMAGENUMBER)); + return TRUE; +} + +void NPC_NPCEnemyTalked( int meindex , int talkerindex , char *szMes , + int color ) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[256]; + + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) { + return; + } + if( NPC_Util_GetArgStr( meindex, npcarg, sizeof( npcarg)) == NULL ) { + print("Can't GetArgStr !!"); + return; + } + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "NEWTIME", buf, sizeof( buf)) != NULL ){ + if( CHAR_getWorkInt( meindex, NPC_TIME_MODE) <= 0 ) { + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "Time_Msg", buf, sizeof( buf) ) != NULL) { + CHAR_talkToCli( talkerindex, meindex, buf, CHAR_COLORYELLOW); + } + return; + } + } + if( !NPC_Util_charIsInFrontOfChar( talkerindex, meindex, 1 )) + return; + if( CHAR_getWorkInt( meindex, CHAR_WORK_ENCOUNTTYPE) >= 1 ) { + NPC_NPCEnemy_Encount( meindex, talkerindex, 1); + } +} + +int NPC_NPCEnemy_Encount( int meindex, int charaindex, int mode) +{ + + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[512]; + BOOL flg = TRUE; + int battlemax = getBattlenum(); + int i; + if( CHAR_getInt( meindex, CHAR_BASEIMAGENUMBER) == 0 ) { + return FALSE; + } + if( mode == 0 ) { + if( CHAR_getWorkInt( meindex, CHAR_WORK_ENCOUNTTYPE) == 1 ) { + flg = FALSE; + } + }else if( mode == 1 ) { + if( CHAR_getWorkInt( meindex, CHAR_WORK_ENCOUNTTYPE) == 0 ) { + flg = FALSE; + } + } + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + + if( !flg) { + if( NPC_Util_GetStrFromStrWithDelim( argstr, "deniedmsg", buf, sizeof( buf)) != NULL ) { + CHAR_talkToCliAndParty( charaindex, meindex ,buf , CHAR_COLORYELLOW ); + } + return FALSE; + } + flg = FALSE; + while( 1 ) { + char buf[1024]; + if( NPC_Util_GetStrFromStrWithDelim( argstr, "item", buf, sizeof( buf)) != NULL ) { + char data[128]; + BOOL found = FALSE; + + for( i = 0; i < CHAR_MAXITEMHAVE; i ++ ) { + int j; + int itemid; + int ret = getStringFromIndexWithDelim( buf,",", i + 1,data, sizeof(data)); + if( ret == FALSE) + break; + found = FALSE; + itemid = atoi( data); + for( j = 0; j < CHAR_MAXITEMHAVE; j ++ ) { + int itemindex = CHAR_getItemIndex( charaindex, j); + if( ITEM_CHECKINDEX( itemindex)) { + if( ITEM_getInt( itemindex, ITEM_ID) == itemid ) { + found = TRUE; + break; + } + } + } + if( !found ) + break; + } + if( !found ) + break; + } +#ifdef _ADD_NOITEM_BATTLE + if(NPC_Util_GetStrFromStrWithDelim(argstr,"noitem",buf,sizeof(buf)) != NULL){ + char data[128]; + BOOL found = FALSE; + + for(i=0;i= sizeof( buf) ) { + print( "buffer over\n"); + return FALSE; + } + } + else { + strcpysafe( &buf[len], sizeof( buf)-len, "\n" ); + len++; + if( len >= sizeof( buf) ) { + print( "buffer over\n"); + return FALSE; + } + } + } + + if( fd != -1 ) { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_YESNO, + CHAR_WINDOWTYPE_NPCENEMY_START, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + makeEscapeString( buf, escapebuf,sizeof(escapebuf))); + } + /* 仇仇分仃 卞伉正□件 */ + return FALSE; + }else { + /* 爵 卞 日六月 */ + flg = NPC_NPCEnemy_BattleIn( meindex, charaindex); + } + } + } + if( !flg) { + if( NPC_Util_GetStrFromStrWithDelim( argstr, "deniedmsg", buf, sizeof( buf)) + != NULL ) + { + CHAR_talkToCliAndParty( charaindex, meindex ,buf , CHAR_COLORYELLOW ); + } + } + return flg; +} + +int NPC_NPCEnemy_Dying( int battleindex, int meindex ) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[64]; + int i,toindex=-1; + int tmp=-1; + + if( !CHAR_CHECKINDEX( meindex)) { + return FALSE; + } + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + +#ifdef _NEW_WARPMAN + if( strstr( argstr, "NEWNPCENEMY") ) { + }else { +#endif + /* 蝇 及陲太 */ + if( NPC_Util_GetStrFromStrWithDelim( argstr, "endmsg", buf, sizeof( buf)) != NULL ) { + for( i = 0; i < 5; i ++ ) { + /* 爵 卞辅笛仄化中月蝈够卞丢永本□斥 */ + int toindex = BattleArray[battleindex].Side[0].Entry[i].charaindex; + if( CHAR_CHECKINDEX( toindex) ) { + CHAR_talkToCli( toindex, meindex ,buf , CHAR_COLORYELLOW ); + } + } + + } +#ifdef _NEW_WARPMAN + } +#endif + if( NPC_Util_GetStrFromStrWithDelim( argstr, "steal", buf, sizeof( buf)) != NULL ) { + print("\n steal TRUE !!"); + if( atoi( buf) == 1 ) { + int charaindex = BattleArray[battleindex].Side[0].Entry[0].charaindex; + NPC_NPCEnemy_StealItem( argstr, meindex, charaindex); + } + + } +#ifdef _ALLDOMAN // (不可开) Syu ADD 排行榜NPC + if( NPC_Util_GetStrFromStrWithDelim( argstr, "herobattlefield", buf, sizeof( buf)) != NULL ) { + int charaindex = BattleArray[battleindex].Side[0].Entry[0].charaindex; + CHAR_setWorkInt ( charaindex , CHAR_WORKHEROFLOOR , atoi ( buf ) ) ; + // Syu ADD + if ( atoi ( buf ) > CHAR_getInt ( charaindex , CHAR_HEROFLOOR ) ) + CHAR_setInt ( charaindex , CHAR_HEROFLOOR , atoi( buf ) ) ; + } + +#endif + tmp = NPC_Util_GetNumFromStrWithDelim( argstr, "dieact"); + if( tmp != 1 ) + tmp = 0; + CHAR_setWorkInt( meindex, CHAR_WORK_DIEACT, tmp); + if( CHAR_getWorkInt( meindex, CHAR_WORK_DIEACT) == 0 ) { + Char *ch; + CHAR_setInt( meindex, CHAR_BASEIMAGENUMBER, 0); + print("bbi---->bi10"); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX)); + + CHAR_setWorkInt( meindex, CHAR_WORKEVENTTYPE, CHAR_EVENT_ALTERRATIVE); + MAP_sendAroundMapdata( CHAR_getInt( meindex, CHAR_FLOOR), + CHAR_getInt( meindex, CHAR_X), + CHAR_getInt( meindex, CHAR_Y)); + ch = CHAR_getCharPointer( meindex); + if( ch != NULL ) { + strcpysafe( ch->charfunctable[CHAR_LOOPFUNC].string, + sizeof( ch->charfunctable[CHAR_LOOPFUNC]), + "NPCEnemyLoop"); + CHAR_constructFunctable( meindex); + CHAR_setInt( meindex, CHAR_LOOPINTERVAL, 5000); + CHAR_setWorkInt( meindex, CHAR_WORK_DIETIME, NowTime.tv_sec); + }else { + print( "NPCENEMY:err\n"); + } + }else { + for( i = 0; i < 5; i ++ ) { + toindex = BattleArray[battleindex].Side[0].Entry[i].charaindex; + if( CHAR_CHECKINDEX( toindex) ) { +#ifdef _NEW_WARPMAN + if( strstr( argstr, "NEWNPCENEMY") ) { + BOOL Party=TRUE; + if( NPC_NPCEnemy_CheckFree( meindex, toindex , &Party) == FALSE ) { + continue; + } + if( Party == TRUE ) { + }else { + if( CHAR_getWorkInt( toindex, CHAR_WORKPARTYMODE ) == CHAR_PARTY_LEADER ) { + if( NPC_WarpAllMsg( meindex, toindex ) == TRUE ) { + return TRUE; + } + } + continue; + } + } + CHAR_DischargeParty( toindex, 0); // 拆队 + CHAR_warpToSpecificPoint( toindex, + CHAR_getWorkInt( meindex, CHAR_WORK_WARP_FLOOR), + CHAR_getWorkInt( meindex, CHAR_WORK_WARP_X), + CHAR_getWorkInt( meindex, CHAR_WORK_WARP_Y) + ); + +#else + CHAR_warpToSpecificPoint( toindex, + CHAR_getWorkInt( meindex, CHAR_WORK_WARP_FLOOR), + CHAR_getWorkInt( meindex, CHAR_WORK_WARP_X), + CHAR_getWorkInt( meindex, CHAR_WORK_WARP_Y) + ); +#endif +#ifdef _NPC_REPLACEMENT + Check_EnemyWarpMe( meindex, argstr); +#endif + } + } + } + return TRUE; +} + +void NPC_NPCEnemyLoop( int meindex ) +{ + + if( NowTime.tv_sec > CHAR_getWorkInt( meindex, CHAR_WORK_DIETIME) + + CHAR_getWorkInt( meindex, CHAR_WORK_REVIVALTIME)){ + Char *ch; + CHAR_setInt( meindex, CHAR_BASEIMAGENUMBER, CHAR_getWorkInt( meindex, CHAR_WORK_BASEIMGBAK)); + print("bbi---->bi11"); + + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX)); + CHAR_setWorkInt( meindex, CHAR_WORKEVENTTYPE, CHAR_EVENT_ENEMY); + MAP_sendAroundMapdata( CHAR_getInt( meindex, CHAR_FLOOR), + CHAR_getInt( meindex, CHAR_X), + CHAR_getInt( meindex, CHAR_Y)); + ch = CHAR_getCharPointer( meindex); + if( ch != NULL ) { + strcpysafe( ch->charfunctable[CHAR_LOOPFUNC].string, + sizeof( ch->charfunctable[CHAR_LOOPFUNC]), ""); + CHAR_constructFunctable( meindex); +// CHAR_setInt( meindex, CHAR_LOOPINTERVAL, 0); + } + } +} + + +BOOL NPC_NPCEnemy_BattleIn( int meindex, int charaindex) +{ + int gym; + int ret; + char buf[256]; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + + memset( argstr, 0, sizeof( argstr)); + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + gym = NPC_Util_GetNumFromStrWithDelim( argstr, "gym"); + +#ifdef _EMENY_CHANCEMAN + { + int masterindex=-1; + masterindex = NPC_EmenyChanceCheck( meindex, charaindex, argstr); + if( CHAR_CHECKINDEX( masterindex)){ + charaindex = masterindex; + }else { + return TRUE; + } + } +#endif + if( gym > 0 ){ + ret = BATTLE_CreateVsEnemy( charaindex, 2, meindex); + }else{ + ret = BATTLE_CreateVsEnemy( charaindex, 1, meindex); + } + if( ret == 0 ) { + BattleArray[CHAR_getWorkInt( charaindex, CHAR_WORKBATTLEINDEX)].WinFunc = NPC_NPCEnemy_Dying; + if( NPC_Util_GetStrFromStrWithDelim( argstr, "startmsg", buf, sizeof( buf)) != NULL ){ + CHAR_talkToCliAndParty( charaindex, meindex ,buf , CHAR_COLORYELLOW ); + } + if( NPC_Util_GetStrFromStrWithDelim( argstr, "steal", buf, sizeof( buf))!= NULL ){ + if( atoi( buf) == 0 ) { + NPC_NPCEnemy_StealItem( argstr, meindex, charaindex); + } + } + } + return ( ret == 0 ) ?TRUE:FALSE ; +} + +void NPC_NPCEnemyWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data) +{ + if( seqno == CHAR_WINDOWTYPE_NPCENEMY_START) { + if( select == WINDOW_BUTTONTYPE_YES) { +#if 0 + print(" NPC_NPCEnemyWindowTalked "); + if( CHAR_getWorkInt( meindex, CHAR_WORKEVENTTYPE) != CHAR_EVENT_ENEMY ) { + print(" NPCEnemyError!! "); + return; + } +#endif + NPC_NPCEnemy_BattleIn( meindex, talkerindex); + } + } +} + +static int NPC_NPCEnemy_StealItem( char *argstr, int meindex, int charaindex) +{ + char itembuf[1024]; + if( NPC_Util_GetStrFromStrWithDelim( argstr, "item", itembuf, sizeof( itembuf)) + != NULL ) + { + char data[128]; + int delitemgroup[CHAR_MAXITEMHAVE]; + int found = 0; + int i; + for( i = 0; i < CHAR_MAXITEMHAVE; i ++ ) { + int j; + int itemid; + int ret = getStringFromIndexWithDelim( itembuf,",", i + 1,data, sizeof(data)); + if( ret == FALSE) { + break; + } + itemid = atoi( data); + for( j = 0; j < CHAR_MAXITEMHAVE; j ++ ) { + int itemindex = CHAR_getItemIndex( charaindex, j); + if( ITEM_CHECKINDEX( itemindex)){ + if( ITEM_getInt( itemindex, ITEM_ID) == itemid ){ + CHAR_setItemIndex( charaindex, j, -1); + ITEM_endExistItemsOne( itemindex); + delitemgroup[found] = j; + found ++; + break; + } + } + } + if( !found ) break; + } + CHAR_sendItemData( charaindex, delitemgroup, found); + } + else { + print( "NPCENEMY:奇怪\n"); + return FALSE; + } + return TRUE; +} + +#ifdef _NEW_WARPMAN +static BOOL NPC_NPCEnemy_CheckFree( int meindex, int toindex, BOOL *Party) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf1[1024],buf2[256],buf3[256],buf4[256]; + char token[256]; + char temp1[16]; + int talkNo = 1; + int point=1; + + int i=0,type=0; + + struct tagWarpPoint { + int floor; + int x; + int y; + }AllWarPoint[]={ + {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, + {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, + {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, + }; + + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL) { + print("GetArgStrErr"); + return FALSE; + } + if( (strstr( npcarg,"NEWNPCENEMY") == NULL) && (strstr( npcarg,"OVER") == NULL) ) { + return FALSE; + }else { + } + + while( getStringFromIndexWithDelim( npcarg,"OVER",talkNo,buf1,sizeof( buf1)) != FALSE ) { + + talkNo++; + sprintf(temp1,"NEWEVENT"); + if( strstr( buf1, temp1) != NULL) { + if( NPC_Util_GetStrFromStrWithDelim( buf1, "FREE", buf2, sizeof( buf2) ) == FALSE ) { + continue; + } + if( NPC_ActionPassCheck( meindex, toindex, buf2) == FALSE ) { + continue; + } + + if( NPC_Util_GetStrFromStrWithDelim( buf1, "endmsg", token, sizeof( token)) != NULL ) { + CHAR_talkToCli( toindex, meindex ,token , CHAR_COLORYELLOW ); + } +#ifdef _ALLDOMAN // (不可开) Syu ADD 排行榜NPC + if( NPC_Util_GetStrFromStrWithDelim( buf1, "herobattlefield", token, sizeof( token)) != NULL ) { + CHAR_setWorkInt ( toindex , CHAR_WORKHEROFLOOR , atoi ( token ) ) ; + if ( atoi ( token ) > CHAR_getInt ( toindex , CHAR_HEROFLOOR ) ) + CHAR_setInt ( toindex , CHAR_HEROFLOOR , atoi( token ) ) ; + + } +#endif + + if( NPC_Util_GetStrFromStrWithDelim( buf1, "WARP", buf2, sizeof( buf2) ) == FALSE ){ + continue; + }else {//RAND arraysizeof AllWarPoint + while( getStringFromIndexWithDelim( buf2, ";", point, buf3,sizeof( buf3)) != FALSE ) { + point++; + getStringFromIndexWithDelim( buf3, ",", 1, buf4, sizeof( buf4)); + AllWarPoint[i].floor = atoi( buf4); + getStringFromIndexWithDelim( buf3, ",", 2, buf4, sizeof( buf4)); + AllWarPoint[i].x = atoi( buf4); + getStringFromIndexWithDelim( buf3, ",", 3, buf4, sizeof( buf4)); + AllWarPoint[i].y = atoi( buf4); + i++; + if( i >= arraysizeof( AllWarPoint) ) + break; + } + type = RAND( 0, i-1); + if( AllWarPoint[type].floor <= 0 || type > arraysizeof( AllWarPoint)-1) { + type = 0; + } + CHAR_setWorkInt( meindex, CHAR_WORK_WARP_FLOOR, AllWarPoint[type].floor ); + CHAR_setWorkInt( meindex, CHAR_WORK_WARP_X, AllWarPoint[type].x ); + CHAR_setWorkInt( meindex, CHAR_WORK_WARP_Y, AllWarPoint[type].y ); + + } + if( NPC_Util_GetStrFromStrWithDelim( buf1, "CHECKPARTY", buf4, sizeof( buf4)) != NULL ) { + if( strstr( buf4, "FALSE") != NULL ) { + *Party = FALSE; + } + } + if( *Party == TRUE ) { + Action_RunDoEventAction( meindex, toindex, buf1); + } + return TRUE; + } + } + return FALSE; +} + + +BOOL NPCEnemy_CheckFree( int meindex, int talker, char *buf) +{ + char buff2[256]; + char buff3[128]; + int i=1,j=1; + int loop=0; + while( getStringFromIndexWithDelim(buf,",",i,buff2,sizeof(buff2)) !=FALSE ) { + i++; + if(strstr(buff2,"&")!=NULL){ + j=1; + loop=0; + while( getStringFromIndexWithDelim(buff2,"&",j,buff3,sizeof(buff3)) !=FALSE ) { + j++; + if(NPCEnemy_BSCheck(meindex,talker,buff3)==FALSE) { + loop=1; + break; + } + } + if(loop==0) { + CHAR_setWorkInt( talker, CHAR_WORKWARPCHECK, TRUE ); + return TRUE; + } + }else{ + if( NPCEnemy_BSCheck( meindex, talker, buff2) == TRUE ){ + CHAR_setWorkInt( talker, CHAR_WORKWARPCHECK, TRUE ); + return TRUE; + } + } + } + CHAR_setWorkInt( talker, CHAR_WORKWARPCHECK, FALSE ); + return FALSE; +} + +BOOL NPCEnemy_BSCheck(int meindex,int talker,char* buf) +{ + char buff2[128]; + int kosuu,temp=-1,flg=0; + char buff1[128],buff3[128]; + if(strstr( buf, "-") != NULL) { + //buff3为抓宠物ID + getStringFromIndexWithDelim( buf, "-", 2, buff3, sizeof(buff3)); + temp = atoi( buff3); + getStringFromIndexWithDelim( buf, "-", 1, buff1, sizeof(buff1)); + strcpy( buf, buff1); + } + + if(strstr( buf, "<") != NULL){ + getStringFromIndexWithDelim( buf, "<", 2, buff2, sizeof(buff2)); + kosuu = atoi( buff2); + getStringFromIndexWithDelim( buf, "<", 1, buff2, sizeof(buff2)); + + if(NPCEnemy_FreeIfCheck( meindex, talker, buff2, kosuu, 1, temp)==TRUE){ + return TRUE; + } + }else if(strstr( buf, ">") != NULL){ + getStringFromIndexWithDelim( buf, ">", 2, buff2, sizeof(buff2)); + kosuu = atoi(buff2); + getStringFromIndexWithDelim( buf, ">" ,1, buff2, sizeof(buff2)); + + if(NPCEnemy_FreeIfCheck( meindex, talker, buff2, kosuu, 2, temp)==TRUE){ + return TRUE; + } + + }else if(strstr( buf, "!" ) != NULL){ + getStringFromIndexWithDelim( buf, "!=", 2, buff2, sizeof(buff2)); + kosuu = atoi( buff2); + getStringFromIndexWithDelim( buf, "!=", 1, buff2, sizeof(buff2)); + if(NPCEnemy_FreeIfCheck( meindex, talker, buff2, kosuu, 0, temp) == TRUE){ + return FALSE; + }else{ + return TRUE; + } + + }else if(strstr( buf, "=") != NULL){ + + getStringFromIndexWithDelim( buf, "=", 2, buff2, sizeof(buff2)); + kosuu = atoi( buff2); + getStringFromIndexWithDelim( buf, "=", 1, buff2, sizeof(buff2)); + + if( strstr( buf, "PET")) { + flg = 3; + } + if(strstr( buf, "*") != NULL){ + if( NPCEnemy_WarpManReduce( meindex, talker, buf)==TRUE){ + return TRUE; + } + }else if(NPCEnemy_FreeIfCheck( meindex, talker, buff2, kosuu, flg, temp)==TRUE){ + return TRUE; + } + } + return FALSE; +} + +BOOL NPCEnemy_FreeIfCheck(int meindex,int talker,char* buf,int kosuu,int flg, int temp) +{ + if(strcmp(buf,"LV")==0){ + if(NPCEnemy_LevelCheck(meindex,talker,kosuu,flg)==TRUE){ + return TRUE; + } + } + + if( strcmp(buf,"TRANS") == 0 ) { + if( NPCEnemy_CheckTrans( meindex, talker, kosuu, flg) == TRUE ) + return TRUE; + } + if( strcmp( buf, "PET") == 0 ) { + if( temp > 0 ) { + if( NPCEnemy_CheckMyPet( meindex, talker, kosuu, flg, temp) == TRUE ) + return TRUE; + }else + return FALSE; + } + + if(strcmp(buf,"ITEM")==0){ + if(NPCEnemy_ItemCheck(meindex,talker,kosuu,flg)==TRUE){ + return TRUE; + } + } + if(strcmp(buf,"ENDEV")==0){ + if(NPC_EventCheckFlg( talker, kosuu)==TRUE){ + return TRUE; + } + } + if(strcmp(buf,"NOWEV")==0){ + if(NPC_NowEventCheckFlg( talker, kosuu)==TRUE){ + return TRUE; + } + } + return FALSE; + +} + +BOOL NPCEnemy_WarpManReduce(int meindex,int talker,char *buf) +{ + + char buf2[512]; + char buf3[256]; + int id=0; + int i; + int itemindex; + int itemno; + int kosuu; + int cnt=0; + + getStringFromIndexWithDelim(buf,"=",2,buf2,sizeof(buf2)); + getStringFromIndexWithDelim(buf2,"*",1,buf3,sizeof(buf3)); + itemno = atoi(buf3); + getStringFromIndexWithDelim(buf2,"*",2,buf3,sizeof(buf3)); + kosuu = atoi(buf3); + + for( i=0 ; i < CHAR_MAXITEMHAVE;i++ ){ + itemindex=CHAR_getItemIndex( talker , i ); + if( ITEM_CHECKINDEX(itemindex) ){ + id=ITEM_getInt(itemindex ,ITEM_ID ); + if(itemno==id){ + cnt++; + if(cnt==kosuu){ + return TRUE; + } + } + } + } + + return FALSE; + +} + +BOOL NPCEnemy_BigSmallLastCheck(int point1,int mypoint,int flg) +{ + + if(flg==0){ + if(point1==mypoint) { + return TRUE; + } + + }else if(flg==1){ + if(mypoint < point1) { + return TRUE; + } + + }else if(flg==2){ + if(mypoint > point1) { + return TRUE; + } + } + + return FALSE; + +} + +BOOL NPCEnemy_LevelCheck(int meindex,int talker,int level,int flg) +{ + int mylevel; + mylevel=CHAR_getInt(talker,CHAR_LV); + if(NPCEnemy_BigSmallLastCheck(level,mylevel,flg)==TRUE) { + return TRUE; + } + return FALSE; +} + +BOOL NPCEnemy_CheckTrans(int meindex,int talker,int trans,int flg) +{ + int myTrans; + myTrans=CHAR_getInt(talker, CHAR_TRANSMIGRATION); + if( NPCEnemy_BigSmallLastCheck( trans, myTrans, flg ) == TRUE ) { + return TRUE; + } + return FALSE; +} + +BOOL NPCEnemy_CheckMyPet( int meindex, int talker, int petLv, int flg, int petid) +{ + int petsel,petindex=-1; + for(petsel=0 ; petsel < CHAR_MAXPETHAVE ; petsel++) { + petindex = CHAR_getCharPet( talker, petsel); + if( petindex == -1 ) + continue; + if(CHAR_getInt( petindex, CHAR_PETID) != petid ) + continue; + break; + } + if( petsel == CHAR_MAXPETHAVE ) { + return FALSE; + }else { //找到条件宠 + switch( flg) { + case 0: + if( CHAR_getInt( petindex, CHAR_LV) != petLv ) + return TRUE; + break; + case 1: + if( CHAR_getInt( petindex, CHAR_LV) < petLv ) + return TRUE; + break; + case 2: + if( CHAR_getInt( petindex, CHAR_LV) > petLv ) + return TRUE; + break; + case 3: + if( CHAR_getInt( petindex, CHAR_LV) == petLv ) + return TRUE; + break; + } + return FALSE; + } + return FALSE; +} + +BOOL NPCEnemy_ItemCheck(int meindex,int talker,int itemNo,int flg) +{ + int i; + int itemindex=-1; + int id; + + for( i=0;i 0 && addcnt > 0 ) { + snprintf( message, sizeof( message ) , + "你丧失了%d%s 称号的资格。" + "不是得到了%d%s 的称号资格吗?" + , delcnt, + delcnt < 10 ? NPC_OLDMAN_TITLE_UNIT1:NPC_OLDMAN_TITLE_UNIT2, + addcnt, + addcnt < 10 ? NPC_OLDMAN_TITLE_UNIT1:NPC_OLDMAN_TITLE_UNIT2 + ); + CHAR_talkToCli( talkerindex , meindex , message , CHAR_COLORWHITE ); + } + else if( delcnt > 0 ) { + snprintf( message, sizeof( message ) , + "你已丧失得到%d%s称号的资格。", delcnt, + delcnt < 10 ? NPC_OLDMAN_TITLE_UNIT1:NPC_OLDMAN_TITLE_UNIT2); + CHAR_talkToCli( talkerindex , meindex , message , CHAR_COLORWHITE ); + } + else if( addcnt > 0 ) { + snprintf( message, sizeof( message ) , + "给你%d%s的称号吧!", addcnt, // CoolFish: d%s -> %d%s 2001/4/18 + addcnt < 10 ? NPC_OLDMAN_TITLE_UNIT1:NPC_OLDMAN_TITLE_UNIT2); + CHAR_talkToCli( talkerindex , meindex , message , CHAR_COLORWHITE ); + } + if( delcnt > 0 ) { + snprintf( message, sizeof( message), + "失去%d%s 称号!", delcnt, + delcnt < 10 ? NPC_OLDMAN_TITLE_UNIT1:NPC_OLDMAN_TITLE_UNIT2); + CHAR_talkToCli( talkerindex, -1, message, CHAR_COLORYELLOW); + } + if( addcnt > 0 ) { + snprintf( message, sizeof( message), + "获得%d%s 称号!", addcnt, + addcnt < 10 ? NPC_OLDMAN_TITLE_UNIT1:NPC_OLDMAN_TITLE_UNIT2); + CHAR_talkToCli( talkerindex, -1, message, CHAR_COLORYELLOW); + } + } +} + if( title_change ) CHAR_sendStatusString( talkerindex , "T" ); + +} diff --git a/gmsv/npc/npc_pauctionman.c b/gmsv/npc/npc_pauctionman.c new file mode 100644 index 0000000..b8b0567 --- /dev/null +++ b/gmsv/npc/npc_pauctionman.c @@ -0,0 +1,530 @@ +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "lssproto_serv.h" +#include "saacproto_cli.h" +#include "readmap.h" +#include "battle.h" +#include "log.h" +#include "enemy.h" +#include "handletime.h" +#include "npc_eventaction.h" +#include "npc_pauctionman.h" +#include "saacproto_cli.h" + +//拍卖王 andy +#ifdef _PAUCTION_MAN +enum { + WINDOW_START=5, + WINDOW_SELECT, + WINDOW_BUY, + WINDOW_SELL, + WINDOW_BUYDO, + WINDOW_SELLDO, + WINDOW_WARP, + WINDOW_END, +}; +enum { + NPC_WORK_CURRENTTIME = CHAR_NPCWORKINT1, + NPC_WORK_MULTIPLE = CHAR_NPCWORKINT2, +/* + NPC_WORK_ROUTEPOINT = CHAR_NPCWORKINT3, + NPC_WORK_ROUNDTRIP = CHAR_NPCWORKINT4, + NPC_WORK_MODE = CHAR_NPCWORKINT5, + NPC_WORK_CURRENTROUTE = CHAR_NPCWORKINT6, + NPC_WORK_ROUTEMAX = CHAR_NPCWORKINT7, + NPC_WORK_WAITTIME = CHAR_NPCWORKINT8, + NPC_WORK_CURRENTTIME = CHAR_NPCWORKINT9, + NPC_WORK_SEFLG = CHAR_NPCWORKINT10, +*/ +}; +typedef struct _tagAUCTIONITEM{ + int index; + int ti; + long Stime; + char Name[256]; + int level; + int use; + struct _tagAUCTIONITEM *next; +}AUCTIONITEMs; +#define AUCTION_ADD 1 +#define AUCTION_DEL 2 +#define MAXAUCTIONs 20 +AUCTIONITEMs *pAuctionItem; +#define STANDBYTIME 50 + +static void NPC_Pauctionman_selectWindow( int meindex, int toindex, int num,int select); +BOOL NPC_PAItemShop_Main(int meindex,int talker, char *argstr,char *token, int sizes); +BOOL NPC_PAItemShop_BuyMain(int meindex, int talker, char *argstr,char *token, int sizes); +BOOL NPC_PAItemShop_SellMain(int meindex,int talker, char *argstr,char *token, int sizes); +int NPC_PAGetMyLimtItem(int talker, char *argstr, char* token, int sizes); +BOOL NPC_PAItemShop_BuyDo( int meindex, int toindex, char *npcarg, int select); +BOOL NPC_PAItemShop_SellDo( int meindex, int toindex, char *npcarg, int select); + +AUCTIONITEMs *LIST_getNew(); +int NPC_PAItemShop_GetItem( int ti, int *ret); + +void NPC_PAGetItemList( char *argstr, char *token, int sizes); +void NPC_AUCTIONITEMs_Init(); + +BOOL NPC_PauctionManInit( int meindex ) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("TRANSER_MAN: GetArgStrErr!!"); + return FALSE; + } + + CHAR_setInt( meindex, CHAR_WHICHTYPE, CHAR_PAUCTIONMAN); + + //CHAR_setInt( meindex, CHAR_LOOPINTERVAL, NEWNPCMAN_STANDBY); + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTTIME, NowTime.tv_sec); + NPC_AUCTIONITEMs_Init(); + return TRUE; +} + +void NPC_PauctionManTalked( int meindex, int talkerindex, char *msg, int color ) +{ + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) + return; + if(NPC_Util_isFaceToFace( meindex ,talkerindex , 2) == FALSE) { + if(NPC_Util_isFaceToChara( talkerindex, meindex, 1) == FALSE) + return; + } + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, 0); + NPC_Pauctionman_selectWindow( meindex, talkerindex, WINDOW_START, 0); +} + +void NPC_PauctionManWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data) +{ + if( select == WINDOW_BUTTONTYPE_CANCEL || select == WINDOW_BUTTONTYPE_NO) + return; + switch( seqno) { + case NPC_PAUCTION_START: + break; + case NPC_PAUCTION_SELECT: + { + int index=0; + index = atoi( data); + switch( index) { + case 1: + NPC_Pauctionman_selectWindow( meindex, talkerindex, WINDOW_BUY, atoi( data)); + break; + case 2: + NPC_Pauctionman_selectWindow( meindex, talkerindex, WINDOW_SELL, atoi( data)); + break; + } + } + break; + case NPC_PAUCTION_BUY: + NPC_Pauctionman_selectWindow( meindex, talkerindex, WINDOW_BUYDO, atoi( data)); + break; + case NPC_PAUCTION_SELL: + NPC_Pauctionman_selectWindow( meindex, talkerindex, WINDOW_SELLDO, atoi( data)); + break; + case NPC_PAUCTION_WARP: + if( select == WINDOW_BUTTONTYPE_CANCEL ) + return; + NPC_Pauctionman_selectWindow( meindex, talkerindex, WINDOW_WARP, atoi( data)); + break; + case NPC_PAUCTION_END: + break; + } + +} +//while( getStringFromIndexWithDelim( npcarg,"}",talkNo, buf1, sizeof( buf1)) != FALSE ) { +static void NPC_Pauctionman_selectWindow( int meindex, int toindex, int num, int select) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + char token[NPC_UTIL_GETARGSTR_BUFSIZE]; + + int buttontype = 0, windowtype = 0, windowno = 0; + int fd = getfdFromCharaIndex( toindex); + + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + + if(NPC_Util_isFaceToFace( meindex ,toindex , 2) == FALSE) { + if(NPC_Util_isFaceToChara( toindex, meindex, 1) == FALSE) + return; + } + + if( Action_PartyCheck( meindex, toindex) == FALSE) { + CHAR_talkToCli( toindex, meindex, "请一个一个来!", CHAR_COLORYELLOW); + return; + } + + memset( npcarg, 0, sizeof( npcarg)); + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("TRANSER_MAN: GetArgStrErr!!"); + return; + } + memset( token, 0, sizeof( token)); + + switch( num) { + case WINDOW_START: + if( NPC_PAItemShop_Main( meindex, toindex, npcarg, token, sizeof( token)) == FALSE ) { + return; + } + + CHAR_setWorkInt( toindex, CHAR_WORKSHOPRELEVANT, WINDOW_START); + buttontype = WINDOW_BUTTONTYPE_NONE; + windowtype = WINDOW_MESSAGETYPE_ITEMSHOPMENU; + windowno = NPC_PAUCTION_SELECT; + break; + case WINDOW_SELECT: + windowtype = WINDOW_MESSAGETYPE_SELECT; + buttontype = WINDOW_BUTTONTYPE_CANCEL; + windowno = NPC_PAUCTION_WARP; + break; +// ================ Sell + case WINDOW_SELLDO: + if( select != 0 ){ + if( NPC_PAItemShop_SellDo( meindex, toindex, npcarg, select) == FALSE ){ + return; + } + } + if( NPC_PAItemShop_Main( meindex, toindex, npcarg, token, sizeof( token)) == FALSE ) { + return; + } + + CHAR_setWorkInt( toindex, CHAR_WORKSHOPRELEVANT, WINDOW_START); + buttontype = WINDOW_BUTTONTYPE_NONE; + windowtype = WINDOW_MESSAGETYPE_ITEMSHOPMENU; + windowno = NPC_PAUCTION_SELECT; + break; + case WINDOW_SELL: + if( NPC_PAItemShop_SellMain( meindex, toindex, npcarg, token, sizeof( token)) == FALSE ){ + return; + } + buttontype = WINDOW_BUTTONTYPE_NONE; + windowtype = WINDOW_MESSAGETYPE_ITEMSHOPMAIN; + windowno = NPC_PAUCTION_SELL; + break; +// ================ BUY + case WINDOW_BUYDO: + if( select != 0 ){ + if( NPC_PAItemShop_BuyDo( meindex, toindex, npcarg, select-1) == FALSE ){ + return; + } + } + if( NPC_PAItemShop_Main( meindex, toindex, npcarg, token, sizeof( token)) == FALSE ) { + return; + } + + CHAR_setWorkInt( toindex, CHAR_WORKSHOPRELEVANT, WINDOW_START); + buttontype = WINDOW_BUTTONTYPE_NONE; + windowtype = WINDOW_MESSAGETYPE_ITEMSHOPMENU; + windowno = NPC_PAUCTION_SELECT; + break; + case WINDOW_BUY: + if( NPC_PAItemShop_BuyMain( meindex, toindex, npcarg, token, sizeof( token)) == FALSE ){ + return; + } + buttontype = WINDOW_BUTTONTYPE_NONE; + windowtype = WINDOW_MESSAGETYPE_ITEMSHOPMAIN; + windowno = NPC_PAUCTION_BUY; + break; +// ================ + case WINDOW_WARP: + ActionNpc_CheckMenuFree( meindex, toindex, npcarg, select); + return; + + case WINDOW_END: + break; + } + + lssproto_WN_send( fd, windowtype, buttontype, windowno, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), token); +} +void NPC_PauctionManLoop( int meindex) +{ + +} + +BOOL NPC_PAItemShop_Main(int meindex,int talker, char *argstr,char *token, int sizes) +{ + char buff[256]; + //int fd = getfdFromCharaIndex( talker); + memset( buff, 0, sizeof( buff)); + if( NPC_Util_GetStrFromStrWithDelim( argstr, "MAIN_MESS", buff, sizeof( buff)) == NULL ) + return FALSE; + snprintf(token, sizes,"%s|%s", CHAR_getChar( meindex, CHAR_NAME), buff); + return TRUE; +} + +BOOL NPC_PAItemShop_BuyMain(int meindex, int talker, char *argstr,char *token, int sizes) +{ + //int fd = getfdFromCharaIndex( talker); + char token2[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buff2[256]; + char buff[256]; + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "MAIN_MESS", buff, sizeof( buff)) == NULL ) + return FALSE; + if( NPC_Util_GetStrFromStrWithDelim( argstr, "BUY_MESS", buff2, sizeof( buff2)) == NULL ) + return FALSE; + memset( token2, 0, sizeof( token2)); + sprintf(token,"0|1|%d|%s|%s|%s|", CHAR_WINDOWTYPE_WINDOWITEMSHOP_STARTMSG, + CHAR_getChar( meindex, CHAR_NAME), buff, buff2); + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "WHAT_MESS", buff, sizeof( buff)) == NULL ) + return FALSE; + if( NPC_Util_GetStrFromStrWithDelim( argstr, "LEVEL_MESS", buff2, sizeof( buff2)) == NULL ) + return FALSE; + + snprintf( token2, sizeof( token2), "%s|%s", buff, buff2); + strncat( token, token2, sizes); + if( NPC_Util_GetStrFromStrWithDelim( argstr, "REALY_MESS", buff, sizeof( buff)) == NULL ) + return FALSE; + if( NPC_Util_GetStrFromStrWithDelim( argstr, "ITEMFULL_MESS", buff2, sizeof( buff2)) == NULL ) + return FALSE; + memset( token2, 0, sizeof( token2)); + sprintf( token2, "|%s|%s", buff, buff2); + strncat(token , token2, sizeof( token2)); + strcpy(token2, "|"); + NPC_PAGetItemList( argstr, token2, sizeof( token2)); + strncat( token, token2, sizes); + + return TRUE; +} + + +void NPC_PAGetItemList( char *argstr, char *token, int sizes) +{ + int i=1, ret=-1; + char token2[NPC_UTIL_GETARGSTR_BUFSIZE]; + for( i=0; iindex = itemindex; + works->use = 1; + works->ti = ret; + works->next = NULL; + if( heads == NULL ) { + pAuctionItem = works; + }else { + heads->next = works; + } + works = pAuctionItem; + return itemindex; + } + i++; + heads = works; + works = works->next; + if( i >= MAXAUCTIONs ) + break; + } + return -1; +} + +BOOL NPC_PAItemShop_DelItem( int ti, int index) +{ + AUCTIONITEMs *works = NULL; + AUCTIONITEMs *heads = NULL; + works = pAuctionItem; + //heads = pAuctionItem; + + while( works != NULL ) { + if( works->ti == ti ) { + if( heads == NULL ){ + pAuctionItem = works->next; + }else { + heads->next = works->next; + } + free( works); + return TRUE; + } + heads = works; + works = works->next; + } + return FALSE; +} + +int NPC_PAItemShop_GetItem( int ti, int *ret) +{ + AUCTIONITEMs *works = NULL; + //heads + int i; + works = pAuctionItem; + + for( i=0; inext; + } + + if( works == NULL ) return -1; + if( works->use > 0 ){ + *ret = works->ti; + return works->index; + } + return -1; +} + +BOOL NPC_PAItemShop_reItem( int itemindex, char *Data) +{ + if( !ITEM_CHECKINDEX( itemindex) ) + return FALSE; + + return TRUE; +} + +AUCTIONITEMs *LIST_getNew() +{ + AUCTIONITEMs *MBUF=NULL; + MBUF = (AUCTIONITEMs *) calloc( 1, sizeof( struct _tagAUCTIONITEM) ); + if( MBUF == NULL ) + return NULL; + MBUF->use = -1; + MBUF->ti = -1; + MBUF->next = NULL; + return MBUF; +} +#endif + diff --git a/gmsv/npc/npc_petfusion.c b/gmsv/npc/npc_petfusion.c new file mode 100644 index 0000000..fd2d05e --- /dev/null +++ b/gmsv/npc/npc_petfusion.c @@ -0,0 +1,253 @@ +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "char_data.h" +#include "npcutil.h" +#include "lssproto_serv.h" +#include "saacproto_cli.h" +#include "readmap.h" +#include "battle.h" +#include "log.h" +#include "enemy.h" +#include "handletime.h" +#include "npc_eventaction.h" +#include "npc_petfusion.h" +#include "pet.h" +#include "chatmagic.h" + + +#ifdef _NPC_FUSION + +enum { + WINDOW_START=10, + WINDOW_SELECT, + WINDOW_FUSION, + WINDOW_WARP, //跳跃 + WINDOW_END, //结束 + + WINDOW_TALKSTART=20, + WINDOW_TALKSELECT, + WINDOW_RETURN, + WINDOW_TALKEND, +}; +enum { + NPC_WORK_CURRENTTIME = CHAR_NPCWORKINT1, +/* + NPC_WORK_ROUTEPOINT = CHAR_NPCWORKINT3, + NPC_WORK_ROUNDTRIP = CHAR_NPCWORKINT4, + NPC_WORK_MODE = CHAR_NPCWORKINT5, + NPC_WORK_CURRENTROUTE = CHAR_NPCWORKINT6, + NPC_WORK_ROUTEMAX = CHAR_NPCWORKINT7, + NPC_WORK_WAITTIME = CHAR_NPCWORKINT8, + NPC_WORK_CURRENTTIME = CHAR_NPCWORKINT9, + NPC_WORK_SEFLG = CHAR_NPCWORKINT10, +*/ +}; + +static void NPC_PetFusion_selectWindow( int meindex, int toindex, int num,int select); +BOOL NPC_DoPetFusion( int meindex, int toindex, char *data, int sizes); + + +BOOL NPC_PetFusionManInit( int meindex ) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("err NPC_PetFusionManInit: GetArgStrErr!!"); + return FALSE; + } + CHAR_setInt( meindex, CHAR_WHICHTYPE, CHAR_PETFUSIONMAN); + //CHAR_setInt( meindex, CHAR_LOOPINTERVAL, MAKEPAIR_STANDBY); + //CHAR_setWorkInt( meindex, NPC_WORK_CURRENTTIME, NowTime.tv_sec); + //CHAR_setWorkInt( meindex, NPC_WORK_PAIRTEAMS, 0); + return TRUE; +} +void NPC_PetFusionManTalked( int meindex, int talkerindex, char *msg, int color ) +{ + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) + return; + if(NPC_Util_isFaceToFace( meindex ,talkerindex , 2) == FALSE) { + if(NPC_Util_isFaceToChara( talkerindex, meindex, 1) == FALSE) + return; + } +#ifdef _ITEM_CHECKWARES + if( CHAR_CheckInItemForWares( talkerindex, 0) == FALSE ){ + CHAR_talkToCli( talkerindex, meindex, "无法服务携带货物的人!", CHAR_COLORYELLOW); + return; + } +#endif + + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, WINDOW_START); + NPC_PetFusion_selectWindow( meindex, talkerindex, WINDOW_START, 0); +} + +static void NPC_PetFusion_selectWindow( int meindex, int toindex, int num,int select) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + char token[256]; + int buttontype = 0, windowtype = 0, windowno = 0; + int fd = getfdFromCharaIndex( toindex); + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + if( Action_PartyCheck( meindex, toindex) == FALSE) { + CHAR_talkToCli( toindex, meindex, "请一个一个来!", CHAR_COLORYELLOW); + return; + } + memset( npcarg, 0, sizeof( npcarg)); + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("err NPC_MakePairMan: GetArgStrErr!!"); + return; + } + memset( token, 0, sizeof( token)); + + switch( num){ + case WINDOW_START: + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "StartMsg", token, sizeof( token) ) == NULL){ + return; + } + buttontype = WINDOW_BUTTONTYPE_YESNO; + windowno = WINDOW_TALKSTART; + break; + case WINDOW_SELECT: + if( ActionNpc_CheckFree( meindex, toindex, npcarg) == FALSE ) { + buttontype = WINDOW_BUTTONTYPE_OK; + windowno = WINDOW_TALKEND; + }else { + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "SelectMsg", token, sizeof( token) ) == NULL){ + return; + } + windowtype = WINDOWS_MESSAGETYPE_PETFUSION; + buttontype = WINDOW_BUTTONTYPE_YESNO; + windowno = WINDOW_TALKSELECT; + } + break; + case WINDOW_FUSION: + //融合处理 + break; + case WINDOW_WARP: + break; + case WINDOW_END: + break; + } + CHAR_setWorkInt( toindex, CHAR_WORKSHOPRELEVANT, windowno); + lssproto_WN_send( fd, windowtype, buttontype, windowno, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), token); +} +void NPC_PetFusionManWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) + return; + if( select == WINDOW_BUTTONTYPE_NO || select == WINDOW_BUTTONTYPE_CANCEL ){ + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, 0); + return; + } + if( CHAR_getWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT) != seqno ) + return; + memset( npcarg, 0, sizeof( npcarg)); + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("err NPC_MakePairMan: GetArgStrErr!!"); + return; + } + if( CHAR_getWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT) != seqno ) + return; + + switch( seqno) { + case WINDOW_TALKSTART: + NPC_PetFusion_selectWindow( meindex, talkerindex, WINDOW_SELECT, 0); + break; + case WINDOW_TALKSELECT: + { + if( NPC_DoPetFusion( meindex, talkerindex, data, sizeof( data)) == FALSE ) + return; + return; + NPC_PetFusion_selectWindow( meindex, talkerindex, WINDOW_FUSION, 0); + } + break; + case WINDOW_RETURN: + break; + case WINDOW_TALKEND: + break; + } +} + +void NPC_PetFusionManLoop( int meindex) +{ +} + +BOOL NPC_DoPetFusion( int meindex, int toindex, char *data, int sizes) +{ + char buf[256]; + int i, flg, MainIndex=-1, Subindex1=-1, Subindex2=-1; + int work[4], skill1[7], skill2[7]; + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + + memset( buf, 0, sizeof( buf)); + sprintf( buf, "%s", data); + if( !CHAR_CHECKINDEX( meindex) ) return FALSE; + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("err NPC_MakePairMan: GetArgStrErr!!"); + return FALSE; + } + for( i=0; i +#include +#include + +#include "object.h" +#include "char_base.h" +#include "char.h" +#include "util.h" +#include "npcutil.h" +#include "item.h" +#include "readmap.h" +#include "enemy.h" +#include "chatmagic.h" +#include "log.h" + +#define EVFLG 118 // 58->白虎 118->青龙 + +void pet_make( int charaindex, char* message ); + +BOOL NPC_PetMakerInit( int meindex ) +{ + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPEPETMAKER ); + CHAR_setFlg( meindex , CHAR_ISATTACKED , 0 ); + return TRUE; +} + +void NPC_PetMakerTalked( int meindex , int talker , char *msg ,int color ) +{ + char* npcarg; + char token[32],tmpbuf[256]; + int msgNo/*,translv*/; + int point,ckpoint,array,shift; + int i,num=0; + + array = EVFLG / 32; + shift = EVFLG % 32; + point = CHAR_getInt( talker, CHAR_ENDEVENT + array); + ckpoint = point; + + npcarg = CHAR_getChar(meindex,CHAR_NPCARGUMENT); + + getStringFromIndexWithDelim( npcarg, "|", 1, token,sizeof( token)); + msgNo = atoi( token ); + + if( CHAR_getInt( talker , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) + return; + + if( NPC_Util_isFaceToFace( talker, meindex , 2 ) == FALSE ) + { + if( NPC_Util_isFaceToFace( talker, meindex , 1 ) == FALSE ) + return; + } + + //translv = CHAR_getInt( talker, CHAR_TRANSMIGRATION); // 白虎 + + for(i=0; i=CHAR_MAXPETHAVE ){ + sprintf(tmpbuf, "抱歉~没多馀的空间可放置宠物。"); + CHAR_talkToCli( talker, meindex, + tmpbuf,CHAR_COLORWHITE); + return; + } + + pet_make( talker, "1845" ); + + point = point | (1 << shift); + CHAR_setInt( talker, CHAR_ENDEVENT + array, point); +} + +void pet_make( int charaindex, char* message ) +{ + int ret; + char msgbuf[64]; + int enemynum; + int enemyid; + int i; + + enemyid = atoi(message); + enemynum = ENEMY_getEnemyNum(); + + for( i=0; i +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "lssproto_serv.h" +#include "handletime.h" + +#ifdef _PETRACE +#include "npc_petracemaster.h" + +#define PETRACEPETNUM 3 +#define PETRACEMASTER_INITPET_LOOPTIME 3000 // 3秒 +#define PETRACEMASTER_WAITDROPI_LOOPTIME 30000 // 30秒 +#define PETRACEMASTER_WAITDROPII_LOOPTIME 10000 // 10秒 +#define PETRACEMASTER_WAITDROPIII_LOOPTIME 5000 // 5秒 +#define PETRACEMASTER_WAITDROPIV_LOOPTIME 1000 // 1秒 +#define PETRACEMASTER_PETRACING_LOOPTIME 3000 // 3秒 +#define PETRACEMASTER_SHOWWINPET_LOOPTIME 10000 // 10秒 +#define PETRACEDROPSTAKETIME 120 // 2分钟 120 +#define PETRACESHOWWINPET 30 // 30秒 +#define PETRACESTDPAYRATE 6 +#define PETRACESTDGOLD 1 // 计算赔率时基本金额 1000 + +static void NPC_PetRaceMaster_selectWindow(int meindex, int toindex, int num, int select); +void NPC_findRacePetIndex(int meindex, int floor); +void NPC_givePriceToPlayer(int meindex, int floor, int winpetindex); + +enum +{ + NPC_WORK_STATE = CHAR_NPCWORKINT1, + NPC_WORK_PET1 = CHAR_NPCWORKINT2, + NPC_WORK_PET2 = CHAR_NPCWORKINT3, + NPC_WORK_PET3 = CHAR_NPCWORKINT4, + NPC_WORK_PETGROUP = CHAR_NPCWORKINT5, + NPC_WORK_STATECHANGE = CHAR_NPCWORKINT6, + NPC_WORK_FINDPETFLAG = CHAR_NPCWORKINT7, + NPC_WORK_WINPET = CHAR_NPCWORKINT8, + NPC_WORK_PETGOAL = CHAR_NPCWORKINT9, +}; +enum +{ + NPC_State_Init, + NPC_State_WaitDropStake, + NPC_State_PetRacing, + NPC_State_ShowWinPet, +}; +enum +{ + NPC_State_Wait, + NPC_State_Run, + NPC_State_ShowWin, +}; +typedef struct tagPetRaceGraTable +{ + int pet1gra; + int pet2gra; + int pet3gra; + char pet1name[64]; + char pet2name[64]; + char pet3name[64]; + int pet1win; + int pet2win; + int pet3win; +#ifdef _DROPSTAKENEW +#else + float payrate1; + float payrate2; + float payrate3; +#endif + char state1[64]; + char state2[64]; + char state3[64]; +}PetRaceGraTable; +#ifdef _DROPSTAKENEW +PetRaceGraTable petracegra[27] = +{ + {100820, 100821, 100822, "扑满乌力", "乌力莱德", "乌力固力", 0, 0, 0, "良好", "良好", "良好"}, + {100823, 100824, 100825, "布依布鲁", "布依布依", "布依胖", 0, 0, 0, "良好", "良好", "良好"}, + {100842, 100843, 100844, "尼加斯", "尼基斯", "特洛可斯", 0, 0, 0, "良好", "良好", "良好"}, + {100852, 100853, 100855, "克拉尔", "拉斯基", "克达达", 0, 0, 0, "良好", "良好", "良好"}, + {100859, 100856, 100857, "可卡特", "卡卡特", "昆依特", 0, 0, 0, "良好", "良好", "良好"}, + {100864, 100865, 100866, "蓝宝", "瑞德宝", "毛宝", 0, 0, 0, "良好", "良好", "良好"}, + {100829, 100826, 100827, "比比加", "加加", "加斯奥", 0, 0, 0, "良好", "良好", "良好"}, + {100830, 100832, 100833, "乌宝依", "威比", "乌拉拉", 0, 0, 0, "良好", "良好", "良好"}, + {100883, 100884, 100885, "尤里蛙", "裘里蛙", "艾尔蛙", 0, 0, 0, "良好", "良好", "良好"}, + {100898, 100900, 100901, "可可恩", "布兰恩", "迪布恩", 0, 0, 0, "良好", "良好", "良好"}, + {100834, 100836, 100837, "贝洛金", "贝洛贝", "贝洛波波", 0, 0, 0, "良好", "良好", "良好"}, + {100838, 100840, 100841, "蓝龟", "龟之钢", "卡拉龟", 0, 0, 0, "良好", "良好", "良好"}, + {100879, 100881, 100880, "迪加", "波波顿", "砂鲨", 0, 0, 0, "良好", "良好", "良好"}, + {100888, 100887, 100889, "莫拉司", "欧瑟菲", "玛斯特", 0, 0, 0, "良好", "良好", "良好"}, + {100913, 100914, 100915, "莱姆洛斯", "朱利洛斯", "辛普洛斯", 0, 0, 0, "良好", "良好", "良好"}, + {100845, 100846, 100847, "呼波波", "呼鲁鲁", "鲁拉其斯", 0, 0, 0, "良好", "良好", "良好"}, + {100849, 100850, 100851, "邦诺斯娜", "杨格斯", "迪基格斯", 0, 0, 0, "良好", "良好", "良好"}, + {100878, 100876, 100877, "玻洛布斯", "加耶布斯", "迪米布斯", 0, 0, 0, "良好", "良好", "良好"}, + {100908, 100909, 100906, "阿米朵", "邦司凉朵", "朵巴奈特", 0, 0, 0, "良好", "良好", "良好"}, + {100916, 100918, 100919, "立杜鲁斯", "巴克亚司", "雷德力克斯", 0, 0, 0, "良好", "良好", "良好"}, + {100860, 100862, 100861, "司尔顿", "梅尔顿", "格尔希洛", 0, 0, 0, "良好", "良好", "良好"}, + {100867, 100870, 100868, "欧林吉鲁", "芭拉芭", "史凯鲁", 0, 0, 0, "良好", "良好", "良好"}, + {100871, 100873, 100874, "普鲁夏", "萨格鲁", "玛斯贝卡", 0, 0, 0, "良好", "良好", "良好"}, + {100894, 100895, 100896, "固力摩", "摩吉摩吉", "摩米索拉", 0, 0, 0, "良好", "良好", "良好"}, + {100902, 100903, 100905, "格里兰", "摩里", "塔斯夫", 0, 0, 0, "良好", "良好", "良好"}, + {100912, 100911, 100910, "伊夫霍恩", "布依伦斯", "布莱兹", 0, 0, 0, "良好", "良好", "良好"}, + {100891, 100892, 100893, "嘎吱拉", "哥斯哥斯", "蒙哥拉斯", 0, 0, 0, "良好", "良好", "良好"}, +}; +#else +PetRaceGraTable petracegra[27] = +{ + {100820, 100821, 100822, "扑满乌力", "乌力莱德", "乌力固力", 0, 0, 0, 2, 2, 2, "良好", "良好", "良好"}, + {100823, 100824, 100825, "布依布鲁", "布依布依", "布依胖", 0, 0, 0, 2, 2, 2, "良好", "良好", "良好"}, + {100842, 100843, 100844, "尼加斯", "尼基斯", "特洛可斯", 0, 0, 0, 2, 2, 2, "良好", "良好", "良好"}, + {100852, 100853, 100855, "克拉尔", "拉斯基", "克达达", 0, 0, 0, 2, 2, 2, "良好", "良好", "良好"}, + {100859, 100856, 100857, "可卡特", "卡卡特", "昆依特", 0, 0, 0, 2, 2, 2, "良好", "良好", "良好"}, + {100864, 100865, 100866, "蓝宝", "瑞德宝", "毛宝", 0, 0, 0, 2, 2, 2, "良好", "良好", "良好"}, + {100829, 100826, 100827, "比比加", "加加", "加斯奥", 0, 0, 0, 2, 2, 2, "良好", "良好", "良好"}, + {100830, 100832, 100833, "乌宝依", "威比", "乌拉拉", 0, 0, 0, 2, 2, 2, "良好", "良好", "良好"}, + {100883, 100884, 100885, "尤里蛙", "裘里蛙", "艾尔蛙", 0, 0, 0, 2, 2, 2, "良好", "良好", "良好"}, + {100898, 100900, 100901, "可可恩", "布兰恩", "迪布恩", 0, 0, 0, 2, 2, 2, "良好", "良好", "良好"}, + {100834, 100836, 100837, "贝洛金", "贝洛贝", "贝洛波波", 0, 0, 0, 2, 2, 2, "良好", "良好", "良好"}, + {100838, 100840, 100841, "蓝龟", "龟之钢", "卡拉龟", 0, 0, 0, 2, 2, 2, "良好", "良好", "良好"}, + {100879, 100881, 100880, "迪加", "波波顿", "砂鲨", 0, 0, 0, 2, 2, 2, "良好", "良好", "良好"}, + {100888, 100887, 100889, "莫拉司", "欧瑟菲", "玛斯特", 0, 0, 0, 2, 2, 2, "良好", "良好", "良好"}, + {100913, 100914, 100915, "莱姆洛斯", "朱利洛斯", "辛普洛斯", 0, 0, 0, 2, 2, 2, "良好", "良好", "良好"}, + {100845, 100846, 100847, "呼波波", "呼鲁鲁", "鲁拉其斯", 0, 0, 0, 2, 2, 2, "良好", "良好", "良好"}, + {100849, 100850, 100851, "邦诺斯娜", "杨格斯", "迪基格斯", 0, 0, 0, 2, 2, 2, "良好", "良好", "良好"}, + {100878, 100876, 100877, "玻洛布斯", "加耶布斯", "迪米布斯", 0, 0, 0, 2, 2, 2, "良好", "良好", "良好"}, + {100908, 100909, 100906, "阿米朵", "邦司凉朵", "朵巴奈特", 0, 0, 0, 2, 2, 2, "良好", "良好", "良好"}, + {100916, 100918, 100919, "立杜鲁斯", "巴克亚司", "雷德力克斯", 0, 0, 0, 2, 2, 2, "良好", "良好", "良好"}, + {100860, 100862, 100861, "司尔顿", "梅尔顿", "格尔希洛", 0, 0, 0, 2, 2, 2, "良好", "良好", "良好"}, + {100867, 100870, 100868, "欧林吉鲁", "芭拉芭", "史凯鲁", 0, 0, 0, 2, 2, 2, "良好", "良好", "良好"}, + {100871, 100873, 100874, "普鲁夏", "萨格鲁", "玛斯贝卡", 0, 0, 0, 2, 2, 2, "良好", "良好", "良好"}, + {100894, 100895, 100896, "固力摩", "摩吉摩吉", "摩米索拉", 0, 0, 0, 2, 2, 2, "良好", "良好", "良好"}, + {100902, 100903, 100905, "格里兰", "摩里", "塔斯夫", 0, 0, 0, 2, 2, 2, "良好", "良好", "良好"}, + {100912, 100911, 100910, "伊夫霍恩", "布依伦斯", "布莱兹", 0, 0, 0, 2, 2, 2, "良好", "良好", "良好"}, + {100891, 100892, 100893, "嘎吱拉", "哥斯哥斯", "蒙哥拉斯", 0, 0, 0, 2, 2, 2, "良好", "良好", "良好"}, +}; +#endif +BOOL NPC_PetRaceMasterInit( int meindex ) +{ + CHAR_setInt(meindex, CHAR_LOOPINTERVAL, PETRACEMASTER_INITPET_LOOPTIME); + CHAR_setInt(meindex, CHAR_WHICHTYPE, CHAR_PETRACEMASTER); + CHAR_setWorkInt(meindex, NPC_WORK_STATE, NPC_State_Init); + CHAR_setWorkInt(meindex, NPC_WORK_PETGROUP, 0); +#ifdef _DROPSTAKENEW +#else + petracegra[0].payrate1 = 0; + petracegra[0].payrate2 = 0; + petracegra[0].payrate3 = 0; +#endif + return TRUE; +} + +void NPC_PetRaceMasterTalked( int meindex , int talkerindex , char *szMes , int color ) +{ + // 尚须新增说明以及宠物状况 + if (CHAR_getInt(talkerindex, CHAR_WHICHTYPE) != CHAR_TYPEPLAYER) + return; + if (NPC_Util_isFaceToFace(talkerindex, meindex, 2) == FALSE) + if (NPC_Util_CharDistance(talkerindex, meindex) > 1) + return; + NPC_PetRaceMaster_selectWindow(meindex, talkerindex, 0, -1); +} + +static void NPC_PetRaceMaster_selectWindow(int meindex, int toindex, int num, int select) +{ + char token[1024]; + int buttontype = 0, windowtype = 0, windowno = 0; + int fd = getfdFromCharaIndex(toindex); + if (fd == -1) return; + token[0] = '\0'; + switch(num) + { + case 0: + sprintf(token, "4\n\n ★宠物竞速场★\n" + "你好,想要知道什麽情报吗?\n" + "\n 《察看游戏规则》" + "\n 《宠物状况》" + "\n 《离开》"); + buttontype = WINDOW_BUTTONTYPE_NONE; + windowtype = WINDOW_MESSAGETYPE_SELECT; + windowno = CHAR_WINDOWTYPE_PETRACEMASTER_START; + break; + case 1: +#ifdef _DROPSTAKENEW + sprintf(token, + "\n竞速场规则:" + "\n参加竞速的宠物总共有叁只,您可以依照宠物" + "\n的状况或个人喜好下注,请将兑换得到的彩券" + "\n放置於欲下注的号码前方。当竞速结束时,主" + "\n持人将会自动帮您计算积分。" + "\n请注意:当您离开此房间或登出时,下注的彩" + "\n卷及积分将无法取回唷!"); +#else + sprintf(token, + "\n竞速场规则:参加竞速的宠物共有叁只,您可" + "\n以依照宠物状况或个人喜好下注,每个宠物有" + "\n自己的赔率。请将石币丢置於欲下注的号码前" + "\n方。当竞速结束时,主持人会自动地将金额放" + "\n回你的身上或存入个人银行。" + "\n请注意:银行金额请勿超过一千万!当您离开" + "\n此房间或登出时,下注的金额将无法取回唷!"); +#endif + buttontype = WINDOW_BUTTONTYPE_OK; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_PETRACEMASTER_RULE; + break; + case 2: + { + int petgroup = CHAR_getWorkInt(meindex, NPC_WORK_PETGROUP); + int petindex1 = CHAR_getWorkInt(meindex, NPC_WORK_PET1); + int petindex2 = CHAR_getWorkInt(meindex, NPC_WORK_PET2); + int petindex3 = CHAR_getWorkInt(meindex, NPC_WORK_PET3); + int pet1win = petracegra[petgroup].pet1win; + int pet2win = petracegra[petgroup].pet2win; + int pet3win = petracegra[petgroup].pet3win; + int total = pet1win + pet2win + pet3win; + float winrate1 = 0, winrate2 = 0, winrate3 = 0; +#ifdef _DROPSTAKENEW +#else + char cpayrate1[64], cpayrate2[64], cpayrate3[64]; + if (petracegra[petgroup].payrate1 == 0) + snprintf(cpayrate1, sizeof(cpayrate1), "???"); + else + snprintf(cpayrate1, sizeof(cpayrate1), "%6.2f", petracegra[petgroup].payrate1); + if (petracegra[petgroup].payrate2 == 0) + snprintf(cpayrate2, sizeof(cpayrate2), "???"); + else + snprintf(cpayrate2, sizeof(cpayrate2), "%6.2f", petracegra[petgroup].payrate2); + if (petracegra[petgroup].payrate3 == 0) + snprintf(cpayrate3, sizeof(cpayrate3), "???"); + else + snprintf(cpayrate3, sizeof(cpayrate3), "%6.2f", petracegra[petgroup].payrate3); +#endif + if (total == 0) + { + winrate1 = 0; winrate2 = 0; winrate3 = 0; + } + else + { + winrate1 = (float)pet1win / (float)total; + winrate2 = (float)pet2win / (float)total; + winrate3 = (float)pet3win / (float)total; + } +#ifdef _DROPSTAKENEW + sprintf(token, "宠物状况\n\n 宠物 胜场 败场 状况 胜场率\n" + "========================================" + "%-10s%-6d%-6d%-8s%-6.2f\n" + "%-10s%-6d%-6d%-8s%-6.2f\n" + "%-10s%-6d%-6d%-8s%-6.2f\n", + CHAR_getChar(petindex1, CHAR_NAME), pet1win, total - pet1win, + petracegra[petgroup].state1, winrate1, + CHAR_getChar(petindex2, CHAR_NAME), pet2win, total - pet2win, + petracegra[petgroup].state2, winrate2, + CHAR_getChar(petindex3, CHAR_NAME), pet3win, total - pet3win, + petracegra[petgroup].state3, winrate3); +#else + sprintf(token, "宠物状况\n\n 宠物 胜场 败场 状况 胜场率 赔率\n" + "========================================" + "%-10s%-6d%-6d%-6s%-6.2f%-4s\n" + "%-10s%-6d%-6d%-6s%-6.2f%-4s\n" + "%-10s%-6d%-6d%-6s%-6.2f%-4s\n", + CHAR_getChar(petindex1, CHAR_NAME), pet1win, total - pet1win, + petracegra[petgroup].state1, winrate1, cpayrate1, + CHAR_getChar(petindex2, CHAR_NAME), pet2win, total - pet2win, + petracegra[petgroup].state2, winrate2, cpayrate2, + CHAR_getChar(petindex3, CHAR_NAME), pet3win, total - pet3win, + petracegra[petgroup].state3, winrate3, cpayrate3); +#endif + buttontype = WINDOW_BUTTONTYPE_OK; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_PETRACEMASTER_PET; + } + break; + case 3: + default: + break; + } + lssproto_WN_send(fd, windowtype, buttontype, windowno, + CHAR_getWorkInt(meindex, CHAR_WORKOBJINDEX), token); +} + +void NPC_PetRaceMasterWindowTalked(int meindex, int talkerindex, int seqno, int select, char *data) +{ + int datanum = 0; + makeStringFromEscaped(data); + datanum = atoi(data); + switch(seqno) + { + case CHAR_WINDOWTYPE_PETRACEMASTER_START: + if (datanum == 1) + NPC_PetRaceMaster_selectWindow(meindex, talkerindex, 1, -1); + else if (datanum == 2) + NPC_PetRaceMaster_selectWindow(meindex, talkerindex, 2, -1); + break; + case CHAR_WINDOWTYPE_PETRACEMASTER_RULE: + if (datanum == 3) + NPC_PetRaceMaster_selectWindow(meindex, talkerindex, 1, -1); + case CHAR_WINDOWTYPE_PETRACEMASTER_PET: + case CHAR_WINDOWTYPE_PETRACEMASTER_LEAVE: + default: + break; + } +} + +void NPC_PetRaceMasterLoop( int meindex) +{ + int floor = CHAR_getInt(meindex, CHAR_FLOOR); + time_t t1; + time(&t1); + switch(CHAR_getWorkInt(meindex, NPC_WORK_STATE)) + { + case NPC_State_Init: + // 寻找宠物index + NPC_findRacePetIndex(meindex, floor); + break; + case NPC_State_WaitDropStake: + { + char tmpbuf[256]; + int statechangetime = CHAR_getWorkInt(meindex, NPC_WORK_STATECHANGE); + if (t1 < statechangetime) + { + if (statechangetime - t1 <= 5) + { + CHAR_setInt(meindex, CHAR_LOOPINTERVAL, PETRACEMASTER_WAITDROPIV_LOOPTIME); + snprintf(tmpbuf, sizeof(tmpbuf), "还有%2d秒就要开跑了,请大家踊跃下注!", + (int)(statechangetime - t1) % 60); + } + else if (statechangetime - t1 <= 10) + { + CHAR_setInt(meindex, CHAR_LOOPINTERVAL, PETRACEMASTER_WAITDROPIII_LOOPTIME); + snprintf(tmpbuf, sizeof(tmpbuf), "还有%2d秒就要开跑了,请大家踊跃下注!", + (int)(statechangetime - t1) % 60); + } + else if (statechangetime - t1 <= 30) + { + CHAR_setInt(meindex, CHAR_LOOPINTERVAL, PETRACEMASTER_WAITDROPII_LOOPTIME); + snprintf(tmpbuf, sizeof(tmpbuf), "还有%2d秒就要开跑了,请大家踊跃下注!", + (int)(statechangetime - t1) % 60); + } + else + snprintf(tmpbuf, sizeof(tmpbuf), "还有%2d分钟%2d秒就要开跑了,请大家踊跃下注!", + (int)(statechangetime - t1) / 60, (int)(statechangetime - t1) % 60); + } + if (t1 >= statechangetime) + { +#ifdef _DROPSTAKENEW +#else + float payrate1 = 0, payrate2 = 0, payrate3 = 0; + int pet1gold = 0, pet2gold = 0, pet3gold = 0, totalgold = 0; + int petindex1 = CHAR_getWorkInt(meindex, NPC_WORK_PET1); + int petindex2 = CHAR_getWorkInt(meindex, NPC_WORK_PET2); + int petindex3 = CHAR_getWorkInt(meindex, NPC_WORK_PET3); + int randpet = CHAR_getWorkInt(meindex, NPC_WORK_PETGROUP); + float droprate1 = 0, droprate2 = 0, droprate3 = 0, totaldroprate, Npayrate = PETRACESTDPAYRATE; +#endif + int i = 0; + CHAR_setWorkInt(meindex, NPC_WORK_STATE, NPC_State_PetRacing); + // 设定地面不可下注 + SetCasinoMap(meindex, 0, FALSE); +#ifdef _DROPSTAKENEW + snprintf(tmpbuf, sizeof(tmpbuf), "请大家停止下注,宠物赛跑开始罗!"); +#else + // 告知大家赔率(取得宠物下注金额计算赔率) + GetCasinoMapGold(meindex, PET_RACE1, &pet1gold); + GetCasinoMapGold(meindex, PET_RACE2, &pet2gold); + GetCasinoMapGold(meindex, PET_RACE3, &pet3gold); + totalgold = pet1gold + pet2gold + pet3gold; + if (totalgold <= 0) + { + payrate1 = 2; payrate2 = 2; payrate3 = 2; + } + else + { + if (pet1gold <= PETRACESTDGOLD) + pet1gold = PETRACESTDGOLD; + if (pet2gold <= PETRACESTDGOLD) + pet2gold = PETRACESTDGOLD; + if (pet3gold <= PETRACESTDGOLD) + pet3gold = PETRACESTDGOLD; + totalgold = pet1gold + pet2gold + pet3gold; + droprate1 = totalgold / pet1gold; + droprate2 = totalgold / pet2gold; + droprate3 = totalgold / pet3gold; + totaldroprate = droprate1 + droprate2 + droprate3; + if (totaldroprate / droprate1 > PETRACESTDPAYRATE) + { + payrate1 = 1; Npayrate -= 1; + } + if (totaldroprate / droprate2 > PETRACESTDPAYRATE) + { + payrate2 = 1; Npayrate -= 1; + } + if (totaldroprate / droprate3 > PETRACESTDPAYRATE) + { + payrate3 = 1; Npayrate -= 1; + } + if (payrate1 != 1) + payrate1 = droprate1 / totaldroprate * Npayrate; + if (payrate2 != 1) + payrate2 = droprate2 / totaldroprate * Npayrate; + if (payrate3 != 1) + payrate3 = droprate3 / totaldroprate * Npayrate; + } + petracegra[randpet].payrate1 = payrate1; + petracegra[randpet].payrate3 = payrate2; + petracegra[randpet].payrate2 = payrate3; + SetCasinoPayRate(meindex, PET_RACE1, payrate1); + SetCasinoPayRate(meindex, PET_RACE2, payrate2); + SetCasinoPayRate(meindex, PET_RACE3, payrate3); + snprintf(tmpbuf, sizeof(tmpbuf), "请大家停止下注,宠物赛跑开始罗!%s的赔率为%5.2f;%s的赔率为%5.2f;%s的赔率为%5.2f", + CHAR_getChar(petindex1, CHAR_NAME), payrate1, + CHAR_getChar(petindex2, CHAR_NAME), payrate2, + CHAR_getChar(petindex3, CHAR_NAME), payrate3); +#endif + CHAR_setInt(meindex, CHAR_LOOPINTERVAL, PETRACEMASTER_PETRACING_LOOPTIME); + // 设定宠物状态 + for (i = 0; i < PETRACEPETNUM; i++) + { + CHAR_setWorkInt(CHAR_getWorkInt(meindex, NPC_WORK_PET1 + i), NPC_WORK_STATE, NPC_State_Run); + CHAR_setInt(CHAR_getWorkInt(meindex, NPC_WORK_PET1 + i), CHAR_LOOPINTERVAL, 1000); + } + } + CHAR_talkToFloor(floor, meindex, tmpbuf, CHAR_COLORWHITE); + } + break; + case NPC_State_PetRacing: + if (CHAR_getWorkInt(meindex, NPC_WORK_PETGOAL) == PETRACEPETNUM) + { + char tmpbuf[256]; + int winpetindex = CHAR_getWorkInt(meindex, NPC_WORK_WINPET); + int petgroup = CHAR_getWorkInt(meindex, NPC_WORK_PETGROUP); + snprintf(tmpbuf, sizeof(tmpbuf), "竞赛结束,胜利的宠物是:%s\n", + CHAR_getChar(winpetindex, CHAR_NAME)); + CHAR_talkToFloor(floor, meindex, tmpbuf, CHAR_COLORYELLOW); + // 设定输赢,以计算赔率 + if (CHAR_getWorkInt(meindex, NPC_WORK_PET1) == winpetindex) + petracegra[petgroup].pet1win = petracegra[petgroup].pet1win + 1; + else if (CHAR_getWorkInt(meindex, NPC_WORK_PET2) == winpetindex) + petracegra[petgroup].pet2win = petracegra[petgroup].pet2win + 1; + else if (CHAR_getWorkInt(meindex, NPC_WORK_PET3) == winpetindex) + petracegra[petgroup].pet3win = petracegra[petgroup].pet3win + 1; + CHAR_setWorkInt(meindex, NPC_WORK_STATE, NPC_State_ShowWinPet); + CHAR_setInt(meindex, CHAR_LOOPINTERVAL, PETRACEMASTER_SHOWWINPET_LOOPTIME); + CHAR_setWorkInt(meindex, NPC_WORK_STATECHANGE, t1 + PETRACESHOWWINPET); + // 发奖金 + NPC_givePriceToPlayer(meindex, floor, winpetindex); + } + break; + case NPC_State_ShowWinPet: + { + int statechangetime = CHAR_getWorkInt(meindex, NPC_WORK_STATECHANGE); + if (t1 >= statechangetime) + { + int randpet = RAND(0, arraysizeof(petracegra) - 1); + int petindex1 = CHAR_getWorkInt(meindex, NPC_WORK_PET1); + int petindex2 = CHAR_getWorkInt(meindex, NPC_WORK_PET2); + int petindex3 = CHAR_getWorkInt(meindex, NPC_WORK_PET3); + char tmpbuf[256]; + CHAR_setWorkInt(meindex, NPC_WORK_PETGROUP, randpet); + CHAR_setWorkInt(meindex, NPC_WORK_STATE, NPC_State_WaitDropStake); + CHAR_setWorkInt(meindex, NPC_WORK_WINPET, 0); + CHAR_setWorkInt(meindex, NPC_WORK_PETGOAL, 0); + CHAR_setWorkInt(meindex, NPC_WORK_STATECHANGE, t1 + PETRACEDROPSTAKETIME); + CHAR_setInt(meindex, CHAR_LOOPINTERVAL, PETRACEMASTER_WAITDROPI_LOOPTIME); + // 设定地面可下注 + SetCasinoMap(meindex, 0, TRUE); + // 设定宠物 + CHAR_setWorkInt(petindex1, NPC_WORK_STATE, NPC_State_Wait); + CHAR_setInt(petindex1, CHAR_LOOPINTERVAL, 1000); + CHAR_setInt(petindex1, CHAR_BASEIMAGENUMBER, petracegra[randpet].pet1gra); + CHAR_setChar(petindex1, CHAR_NAME, petracegra[randpet].pet1name); + + CHAR_setWorkInt(petindex2, NPC_WORK_STATE, NPC_State_Wait); + CHAR_setInt(petindex2, CHAR_LOOPINTERVAL, 1000); + CHAR_setInt(petindex2, CHAR_BASEIMAGENUMBER, petracegra[randpet].pet2gra); + CHAR_setChar(petindex2, CHAR_NAME, petracegra[randpet].pet2name); + + CHAR_setWorkInt(petindex3, NPC_WORK_STATE, NPC_State_Wait); + CHAR_setInt(petindex3, CHAR_LOOPINTERVAL, 1000); + CHAR_setInt(petindex3, CHAR_BASEIMAGENUMBER, petracegra[randpet].pet3gra); + CHAR_setChar(petindex3, CHAR_NAME, petracegra[randpet].pet3name); + // 设定宠物状况 +#ifdef _DROPSTAKENEW +#else + petracegra[randpet].payrate1 = 0; + petracegra[randpet].payrate3 = 0; + petracegra[randpet].payrate2 = 0; +#endif + { + int state1 = RAND(0, 3); + int state2 = RAND(0, 3); + int state3 = RAND(0, 3); + if (state1 == 0) + sprintf(petracegra[randpet].state1, "良好"); + else if (state1 == 1) + sprintf(petracegra[randpet].state1, "普通"); + else if (state1 == 2) + sprintf(petracegra[randpet].state1, "不佳"); + else if (state1 == 3) + sprintf(petracegra[randpet].state1, "未知"); + if (state2 == 0) + sprintf(petracegra[randpet].state2, "良好"); + else if (state2 == 1) + sprintf(petracegra[randpet].state2, "普通"); + else if (state2 == 2) + sprintf(petracegra[randpet].state2, "不佳"); + else if (state2 == 3) + sprintf(petracegra[randpet].state2, "未知"); + if (state3 == 0) + sprintf(petracegra[randpet].state3, "良好"); + else if (state3 == 1) + sprintf(petracegra[randpet].state3, "普通"); + else if (state3 == 2) + sprintf(petracegra[randpet].state3, "不佳"); + else if (state3 == 3) + sprintf(petracegra[randpet].state3, "未知"); + } + snprintf(tmpbuf, sizeof(tmpbuf), "宠物竞速准备中,请大家踊跃下注!"); + CHAR_talkToFloor(floor, meindex, tmpbuf, CHAR_COLORYELLOW); + } + } + break; + default: + break; + } +} + +void NPC_findRacePetIndex(int meindex, int floor) +{ + int i = 0, j = 0; + time_t t1; + time(&t1); + + if (CHAR_getWorkInt(meindex, NPC_WORK_FINDPETFLAG) == 0) + { + for (i = 0; i < CHAR_getCharNum(); i++) + { + if (CHAR_getInt(i, CHAR_FLOOR) == floor) + { + if (CHAR_getInt(i, CHAR_WHICHTYPE) == CHAR_PETRACEPET) + { + for (j = 0; j < PETRACEPETNUM; j++) + { + if (CHAR_getWorkInt(meindex, NPC_WORK_PET1 + j) == 0) + { + CHAR_setWorkInt(meindex, NPC_WORK_PET1 + j, i); + CHAR_setWorkInt(i, CHAR_NPCWORKINT2, meindex); + break; + } + } + } + } + } + if (CHAR_getWorkInt(meindex, NPC_WORK_PET1) > 0 + && CHAR_getWorkInt(meindex, NPC_WORK_PET2) > 0 + && CHAR_getWorkInt(meindex, NPC_WORK_PET3) > 0) + { + CHAR_setWorkInt(meindex, NPC_WORK_FINDPETFLAG, 1); + CHAR_setWorkInt(meindex, NPC_WORK_STATE, NPC_State_WaitDropStake); + CHAR_setInt(meindex, CHAR_LOOPINTERVAL, PETRACEMASTER_WAITDROPI_LOOPTIME); + CHAR_setWorkInt(meindex, NPC_WORK_STATECHANGE, t1 + PETRACEDROPSTAKETIME); + } + else CHAR_setWorkInt(meindex, NPC_WORK_FINDPETFLAG, 0); + } +} + +void NPC_givePriceToPlayer(int meindex, int floor, int winpetindex) +{ + int wincasinotype = 0; + if (CHAR_getWorkInt(meindex, NPC_WORK_PET1) == winpetindex) + wincasinotype = PET_RACE1; + else if (CHAR_getWorkInt(meindex, NPC_WORK_PET2) == winpetindex) + wincasinotype = PET_RACE2; + else if (CHAR_getWorkInt(meindex, NPC_WORK_PET3) == winpetindex) + wincasinotype = PET_RACE3; + if (wincasinotype == 0) return; + else + CasinoPay(meindex, wincasinotype); +} +#endif diff --git a/gmsv/npc/npc_petracepet.c b/gmsv/npc/npc_petracepet.c new file mode 100644 index 0000000..4779ad5 --- /dev/null +++ b/gmsv/npc/npc_petracepet.c @@ -0,0 +1,274 @@ +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "lssproto_serv.h" +#include "handletime.h" + +#ifdef _PETRACE +#include "npc_petracepet.h" + +#define PETRACEPET_WAIT_LOOPTIME 30000 // 30秒 +#define PETRACEPET_SHOWWIN_LOOPTIME 10000 // 10秒 + +static void NPC_PetRacePet_Walk(int meindex); +static int NPC_PetRacePetSetPoint(int meindex, char *argstr); + +enum +{ + NPC_WORK_STATE = CHAR_NPCWORKINT1, + NPC_WORK_MASTER = CHAR_NPCWORKINT2, + NPC_WORK_ROUTEPOINT = CHAR_NPCWORKINT3, + NPC_WORK_ROUTETOX = CHAR_NPCWORKINT4, + NPC_WORK_ROUTETOY = CHAR_NPCWORKINT5, + NPC_WORK_WAITFLAG = CHAR_NPCWORKINT6, + NPC_WORK_FLOOR = CHAR_NPCWORKINT7, + NPC_WORK_X = CHAR_NPCWORKINT8, + NPC_WORK_Y = CHAR_NPCWORKINT9, + NPC_WORK_DIR = CHAR_NPCWORKINT10, + NPC_WORK_STOPX = CHAR_NPCWORKINT11, + NPC_WORK_STOPY = CHAR_NPCWORKINT12, +}; +enum +{ + NPC_State_Wait, + NPC_State_Run, + NPC_State_ShowWin, +}; + +BOOL NPC_PetRacePetInit( int meindex ) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[256]; + int showstopx, showstopy; + int routenum = 0, i = 0; + + NPC_Util_GetArgStr(meindex, argstr, sizeof(argstr)); + for (i = 1; i <= routenum; i++) + { + char routetostring[64]; + snprintf(routetostring, sizeof(routetostring), "routeto"); + if (NPC_Util_GetStrFromStrWithDelim(argstr, routetostring, buf, sizeof(buf)) == NULL) + { + print("Init_npcracepet: Didn't set route\n"); + return FALSE; + } + } + showstopx = NPC_Util_GetNumFromStrWithDelim(argstr, "showstopx"); + showstopy = NPC_Util_GetNumFromStrWithDelim(argstr, "showstopy"); + if (showstopx < 0 || showstopx > 100 || showstopy < 0 || showstopy > 100) + return FALSE; + CHAR_setInt(meindex, CHAR_WHICHTYPE, CHAR_PETRACEPET); + CHAR_setWorkInt(meindex, NPC_WORK_STATE, NPC_State_Wait); + CHAR_setWorkInt(meindex, NPC_WORK_ROUTEPOINT, 2); + CHAR_setWorkInt(meindex, NPC_WORK_WAITFLAG, 1); + CHAR_setWorkInt(meindex, NPC_WORK_FLOOR, CHAR_getInt(meindex, CHAR_FLOOR)); + CHAR_setWorkInt(meindex, NPC_WORK_X, CHAR_getInt(meindex, CHAR_X)); + CHAR_setWorkInt(meindex, NPC_WORK_Y, CHAR_getInt(meindex, CHAR_Y)); + CHAR_setWorkInt(meindex, NPC_WORK_DIR, CHAR_getInt(meindex, CHAR_DIR)); + CHAR_setWorkInt(meindex, NPC_WORK_STOPX, showstopx); + CHAR_setWorkInt(meindex, NPC_WORK_STOPY, showstopy); + CHAR_setInt(meindex, CHAR_LOOPINTERVAL, PETRACEPET_WAIT_LOOPTIME); + NPC_PetRacePetSetPoint(meindex, argstr); + + return TRUE; +} + +void NPC_PetRacePetTalked( int meindex , int talkerindex , char *szMes , int color ) +{ +} + +void NPC_PetRacePetLoop( int meindex) +{ + switch(CHAR_getWorkInt(meindex, NPC_WORK_STATE)) + { + case NPC_State_Wait: + { + if (CHAR_getWorkInt(meindex, NPC_WORK_WAITFLAG) == 0) + { + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + NPC_Util_GetArgStr(meindex, argstr, sizeof(argstr)); + CHAR_setWorkInt(meindex, NPC_WORK_ROUTEPOINT, 2); + NPC_PetRacePetSetPoint(meindex, argstr); + CHAR_setInt(meindex, CHAR_LOOPINTERVAL, PETRACEPET_WAIT_LOOPTIME); + CHAR_setInt(meindex, CHAR_DIR, CHAR_getWorkInt(meindex, NPC_WORK_DIR)); + CHAR_warpToSpecificPoint(meindex, + CHAR_getWorkInt(meindex, NPC_WORK_FLOOR), + CHAR_getWorkInt(meindex, NPC_WORK_X), + CHAR_getWorkInt(meindex, NPC_WORK_Y)); + CHAR_setWorkInt(meindex, NPC_WORK_WAITFLAG, 1); + } + } + break; + case NPC_State_Run: + { + int interval = 50; + int random = 0; + if (CHAR_getWorkInt(meindex, NPC_WORK_ROUTETOX) <= CHAR_getWorkInt(meindex, NPC_WORK_STOPX) + && CHAR_getWorkInt(meindex, NPC_WORK_ROUTETOY) >= CHAR_getWorkInt(meindex, NPC_WORK_STOPY)) + random = 3; + else + random = RAND(0, 8); + if (random == 0) // 攻击 + { + int rands = RAND(0, 3); + interval = 1500; + CHAR_sendAction(meindex, 0, FALSE); + if (rands == TRUE) + { + char tmpbuf[256]; + int floor = CHAR_getInt(meindex, CHAR_FLOOR); + int master = CHAR_getWorkInt(meindex, NPC_WORK_MASTER); + int randomi = RAND(1, 9); + if (randomi == 1) + snprintf(tmpbuf, sizeof(tmpbuf), "哦~看来%s好像发威了唷!", + CHAR_getChar(meindex, CHAR_NAME)); + else if (randomi == 2) + snprintf(tmpbuf, sizeof(tmpbuf), "%s使出了奋力的一击~", + CHAR_getChar(meindex, CHAR_NAME)); + else if (randomi == 3) + snprintf(tmpbuf, sizeof(tmpbuf), "咦...%s发怒了?", + CHAR_getChar(meindex, CHAR_NAME)); + if (randomi > 0 && randomi < 4) + CHAR_talkToFloor(floor, master, tmpbuf, CHAR_COLORWHITE); + } + } + else if (random == 1) // 晕倒 + { + int rands = RAND(0, 3); + interval = 2500; + CHAR_sendAction(meindex, 2, FALSE); + if (rands == TRUE) + { + char tmpbuf[256]; + int floor = CHAR_getInt(meindex, CHAR_FLOOR); + int master = CHAR_getWorkInt(meindex, NPC_WORK_MASTER); + int randomi = RAND(1, 9); + if (randomi == 1) + snprintf(tmpbuf, sizeof(tmpbuf), "%s好像晕倒了呢...", + CHAR_getChar(meindex, CHAR_NAME)); + else if (randomi == 2) + snprintf(tmpbuf, sizeof(tmpbuf), "%s受伤了吗?", + CHAR_getChar(meindex, CHAR_NAME)); + else if (randomi == 3) + snprintf(tmpbuf, sizeof(tmpbuf), "嘿...%s晕倒後又勇敢的爬起来了!", + CHAR_getChar(meindex, CHAR_NAME)); + if (randomi > 0 && randomi < 4) + CHAR_talkToFloor(floor, master, tmpbuf, CHAR_COLORWHITE); + } + } + else if (random == 2) // 站立 + { + interval = 500; + CHAR_sendAction(meindex, 3, FALSE); + } + else // 一般 + interval = RAND(20, 100); + NPC_PetRacePet_Walk(meindex); + CHAR_setInt(meindex, CHAR_LOOPINTERVAL, interval); + } + break; + case NPC_State_ShowWin: + { + int action = RAND(0, 11); + CHAR_sendAction(meindex, action, FALSE); + CHAR_setInt(meindex, CHAR_LOOPINTERVAL, PETRACEPET_SHOWWIN_LOOPTIME); + } + break; + default: + break; + } +} + +static void NPC_PetRacePet_Walk(int meindex) +{ + POINT start, end; + int dir, i; + + start.x = CHAR_getInt(meindex, CHAR_X); + start.y = CHAR_getInt(meindex, CHAR_Y); + end.x = CHAR_getWorkInt(meindex, NPC_WORK_ROUTETOX); + end.y = CHAR_getWorkInt(meindex, NPC_WORK_ROUTETOY); + if (start.x == end.x && start.y == end.y) + { + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + NPC_Util_GetArgStr(meindex, argstr, sizeof( argstr)); + CHAR_setWorkInt(meindex, NPC_WORK_ROUTEPOINT, + CHAR_getWorkInt(meindex, NPC_WORK_ROUTEPOINT) + 1); + + if (NPC_PetRacePetSetPoint(meindex, argstr) == FALSE) + { + // 到达目的地後,初始状态 + char tmpbuf[256]; + int masterindex = CHAR_getWorkInt(meindex, NPC_WORK_MASTER); + int petgoal = CHAR_getWorkInt(masterindex, CHAR_NPCWORKINT9); + int floor = CHAR_getInt(masterindex, CHAR_FLOOR); + if (CHAR_getWorkInt(masterindex, CHAR_NPCWORKINT8) == 0) + { + CHAR_setWorkInt(masterindex, CHAR_NPCWORKINT8, meindex); + CHAR_sendAction(meindex, 3, FALSE); + snprintf(tmpbuf, sizeof(tmpbuf), "首先到达目的地的是...%s", + CHAR_getChar(meindex, CHAR_NAME)); + } + else + { + CHAR_warpToSpecificPoint(meindex, 888, 7, 7); + snprintf(tmpbuf, sizeof(tmpbuf), "接着到达目的地的是...%s", + CHAR_getChar(meindex, CHAR_NAME)); + } + CHAR_setWorkInt(meindex, NPC_WORK_STATE, NPC_State_ShowWin); + CHAR_setInt(meindex, CHAR_LOOPINTERVAL, 500); + CHAR_setWorkInt(meindex, NPC_WORK_WAITFLAG, 0); + CHAR_setWorkInt(masterindex, CHAR_NPCWORKINT9, petgoal + 1); + CHAR_talkToFloor(floor, masterindex, tmpbuf, CHAR_COLORWHITE); + return; + } + else + return; + } + dir = NPC_Util_getDirFromTwoPoint(&start, &end); + end.x = CHAR_getInt(meindex, CHAR_X); + end.y = CHAR_getInt(meindex, CHAR_Y); + for(i = 0; i < 100; i++) + { + if (dir < 0) + dir = RAND(0, 7); + dir = NPC_Util_SuberiWalk(meindex, dir); + if (dir >= 0 && dir <= 7) break; + } + if (dir >= 0 && dir <= 7) + { + int result = 0; + result = CHAR_walk(meindex, dir, 0); + } +} + +static int NPC_PetRacePetSetPoint(int meindex, char *argstr) +{ + // 寻找下一步 x , y + char buf[4096], buf2[256], buf3[256]; + int ret; + char routetostring[64]; + snprintf(routetostring, sizeof(routetostring), "routeto"); + if (NPC_Util_GetStrFromStrWithDelim(argstr, routetostring, buf, sizeof(buf)) == NULL) + { + print("SetPoint_npcracepet: Didn't set route %s\n", routetostring); + return FALSE; + } + ret = getStringFromIndexWithDelim(buf, ";", + CHAR_getWorkInt(meindex, NPC_WORK_ROUTEPOINT), buf2, sizeof(buf2)); + if (ret == FALSE) return FALSE; + ret = getStringFromIndexWithDelim(buf2, ",", 1, buf3, sizeof(buf3)); + if (ret == FALSE) return FALSE; + CHAR_setWorkInt(meindex, NPC_WORK_ROUTETOX, atoi(buf3)); + ret = getStringFromIndexWithDelim(buf2, ",", 2, buf3, sizeof(buf3)); + if (ret == FALSE) return FALSE; + CHAR_setWorkInt(meindex, NPC_WORK_ROUTETOY, atoi(buf3)); + return TRUE; +} + +#endif + + diff --git a/gmsv/npc/npc_petshop.c b/gmsv/npc/npc_petshop.c new file mode 100644 index 0000000..8f5f4a3 --- /dev/null +++ b/gmsv/npc/npc_petshop.c @@ -0,0 +1,1481 @@ +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "lssproto_serv.h" +#include "pet_skill.h" +#include "readmap.h" +#include "battle.h" +#include "log.h" +#ifdef _CHECK_ENEMY_PET +#include "enemy.h" +#endif +/* 丢永本□斥及enum */ +enum { + NPC_PETSHOP_MSG_OVER, + NPC_PETSHOP_MSG_MAIN, + NPC_PETSHOP_MSG_REALY, + NPC_PETSHOP_MSG_THANKS, + NPC_PETSHOP_MSG_COST, + NPC_PETSHOP_MSG_POOLTHANKS, + NPC_PETSHOP_MSG_POOLFULL, + NPC_PETSHOP_MSG_GETFULL, +}; +typedef struct { + char option[32]; + char defaultmsg[128]; +}NPC_PETSHOP_MSG; + +NPC_PETSHOP_MSG shopmsg[] = { + { "over_msg", "钱用完罗!没问题吗?"}, + { "main_msg", "欢迎"}, + { "realy_msg", "真的可以吗?"}, + { "thanks_msg", "谢谢!"}, + { "cost_msg", "钱不够喔!"}, + { "pooltanks_msg", "谢谢!"}, + { "poolfull_msg", "超过的无法处理喔"}, + { "getfull_msg", "你不是有很多宠物吗"} + +}; + +#define PETCOST 10 + +void NPC_PetDate(int meindex,int toindex,int select,char *token); +void NPC_PetDate2(int meindex,int talker,int select,char *token); +void NPC_PetDate3(int meindex,int talker,int select,char *token); +void NPC_PetDel2( int meindex, int talker, int select, char *token); +void NPC_PetDel3( int meindex, int talker, int select, char *token); +void NPC_getDrawPet( int meindex, int toindex, char *token, int *buttontype, int select); + +static void NPC_PetShop_selectWindow( int meindex, int toindex, int num,int select); +int NPC_GetCost(int meindex,int talker,int petindex); +void NPC_PetDel(int meindex, int toindex,int select,char* token); +void NPC_MaxGoldOver(int meindex,int toindex,int select,char *token); + +#ifdef _NPC_DEPOTPET +void NPC_PoolPetShop_DepotPet_Menu( int meindex, int talkerindex); +void NPC_DepotPet_List( int meindex, int toindex, char *token, int *buttontype, int select); +void NPC_DepotPet_Add( int meindex, int talker, int select, char *token); +void NPC_DepotPet_Get( int meindex, int talker, int select, char *token); +void NPC_DepotPet_AskGet(int meindex,int talker,int select,char *token); +//void NPC_DepotPet_Pet_printWindow( int meindex, int talkerindex); +//void NPC_DepotPet_Depot_printWindow( int meindex, int talkerindex); +//BOOL NPC_DepotPet_InsertPet( int meindex, int talkerindex, int num); +//BOOL NPC_DepotPet_getPet( int meindex, int talkerindex, int num); +#endif + + +// 仃 木嗯喊煌遥挚 +#define NPC_GETPOOLCOST( talker) ( 50 + CHAR_getInt( talker, CHAR_LV)*4) + +// 仃 木嗯犯白巧伙玄 +#define NPC_PETSHOP_POOLCOST_DEFAULT 200 + +/*--伐□弁 及割忡--*/ +enum { + CHAR_WORK_NOMALRATE = CHAR_NPCWORKINT1, + CHAR_WORK_SPECIALRATE = CHAR_NPCWORKINT2, + CHAR_WORK_POOLCOST = CHAR_NPCWORKINT3, + CHAR_WORK_POOLFLG = CHAR_NPCWORKINT4, +}; + + +/********************************* +* 赓渝质 +*********************************/ +BOOL NPC_PetShopInit( int meindex ) +{ + + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[256]; + double rate; + int intrate; +// int cost; + int tmp; + + /*--正奶皿涩烂--*/ + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPESTONESHOP ); + + + if( NPC_Util_GetArgStr( meindex, npcarg, sizeof( npcarg)) == NULL){ + print("GetArgStrErr"); + return FALSE; + } + + /*--伊□玄毛铵户卞筏盛今六化云仁*/ + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "nomal_rate", buf, sizeof( buf)) != NULL){ + rate = atof( buf); + intrate = ( int)( rate *1000); + CHAR_setWorkInt( meindex , CHAR_WORK_NOMALRATE ,intrate ); + }else{ + CHAR_setWorkInt( meindex , CHAR_WORK_NOMALRATE ,1000 ); + } + + + /*--旦矢扑乓伙伊□玄手筏盛今六化云仁--*/ + if(NPC_Util_GetStrFromStrWithDelim( npcarg, "special_rate", buf, sizeof( buf)) + !=NULL) + { + rate = atof( buf); + intrate = ( int)( rate *1000); + CHAR_setWorkInt( meindex , CHAR_WORK_SPECIALRATE ,intrate ); + }else{ + CHAR_setWorkInt( meindex , CHAR_WORK_SPECIALRATE ,1200 ); + } + + // 仃 木嗯筏盛 + //cost = NPC_Util_GetNumFromStrWithDelim( npcarg, "pool_cost"); + //if( cost == -1 ) cost = NPC_PETSHOP_POOLCOST_DEFAULT; + //CHAR_setWorkInt( meindex, CHAR_WORK_POOLCOST, cost); + + + // 仃 木互请 月井升丹井毛筏盛 + tmp = NPC_Util_GetNumFromStrWithDelim( npcarg, "pool_flg"); + if( tmp != 1 ) tmp = 0; + CHAR_setWorkInt( meindex, CHAR_WORK_POOLFLG, tmp); + + return TRUE; + +} + + + + +/********************************* +* 仄井仃日木凶凛及质 +*********************************/ +void NPC_PetShopTalked( int meindex , int talkerindex , char *szMes ,int color ) +{ + + /* 皿伊奶乩□卞覆仄化分仃 杀允月 */ + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) { + return; + } + + + /*-- 及蟆卞中月井升丹井"--*/ + if(NPC_Util_isFaceToFace(talkerindex,meindex,2 )==FALSE){ + /* ㄠ弘伉永玉动 及心 */ + if( NPC_Util_CharDistance( talkerindex, meindex ) > 1) return; + } + + /*--伐□弁及赓渝祭--*/ + CHAR_setWorkInt(talkerindex,CHAR_WORKSHOPRELEVANT,0); + + /*-反元户及蓟 --*/ + NPC_PetShop_selectWindow( meindex, talkerindex,0,-1); + +} + +/********************************* +* 苇日木凶凛及质 +*********************************/ +void NPC_PetShopLooked( int meindex , int lookedindex) +{ + /* 皿伊奶乩□卞覆仄化分仃 杀允月 */ + if( CHAR_getInt( lookedindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) { + return; + } + + /* ㄠ弘伉永玉动 及心 */ + if( NPC_Util_CharDistance( lookedindex, meindex ) > 2) return; + + /*--伐□弁及赓渝祭--*/ +// CHAR_setWorkInt(lookedindex,CHAR_WORKSHOPRELEVANT,0); + + +// NPC_PetShop_selectWindow( meindex, lookedindex,0,-1); + +} + +static void NPC_PetShop_selectWindow( int meindex, int toindex, int num,int select) +{ + + char token[1024]; + int buttontype=0,windowtype=0,windowno=0; + char buf[1024]; + int fd = getfdFromCharaIndex( toindex); + + //print("\n NPC_PetShop_selectWindow num:%d select:%d ", num, select); + + if( fd == -1 ) { + fprint( "getfd err\n"); + return; + } + + token[0] = '\0'; + + switch(num){ + // 赓及它奴件玉它 + case 0: + NPC_MaxGoldOver( meindex, toindex, NPC_PETSHOP_MSG_MAIN, buf); +#ifdef _NPC_DEPOTPET + if( !CHAR_getWorkInt( meindex, CHAR_WORK_POOLFLG)) { + sprintf(token, "4\n      ☆宠物商店☆" + "%s" + "\n" + "\n       《 卖宠物 》" + "\n" + "\n" + "\n 《 离开 》", + buf); + }else { + sprintf(token, "4\n      ☆宠物商店☆" + "%s" + "\n 《 寄放宠物 》" + "\n 《 领取宠物 》" + "\n       《 卖宠物 》" + "\n 《 使用仓库 》" + "\n 《 离开 》", + buf); + } +#else + if( !CHAR_getWorkInt( meindex, CHAR_WORK_POOLFLG)) { + sprintf(token, "4\n      ☆宠物商店☆" + "%s" + "\n" + "\n       《 卖宠物 》" + "\n" + "\n 《 离开 》", + buf); + }else { + sprintf(token, "4\n      ☆宠物商店☆" + "%s" + "\n 《 寄放宠物 》" + "\n 《 领取宠物 》" + "\n       《 卖宠物 》" + "\n 《 离开 》", + buf); + } +#endif + + buttontype=WINDOW_BUTTONTYPE_NONE; + windowtype=WINDOW_MESSAGETYPE_SELECT; + windowno=CHAR_WINDOWTYPE_WINDOWPETSHOP_START; + break; + case 1: + buttontype=WINDOW_BUTTONTYPE_CANCEL; + windowtype=WINDOW_MESSAGETYPE_PETSELECT; + windowno=CHAR_WINDOWTYPE_WINDOWPETSHOP_PETSELECT; + break; + case 2: + NPC_PetDate(meindex,toindex,select,token); + buttontype=WINDOW_BUTTONTYPE_YESNO; + windowtype=WINDOW_MESSAGETYPE_MESSAGE; + windowno=CHAR_WINDOWTYPE_WINDOWPETSHOP_MAIN; + break; + case 3: + if( (CHAR_getInt(toindex,CHAR_GOLD)+CHAR_getWorkInt(toindex,CHAR_WORKSHOPRELEVANTSEC)) + > CHAR_getMaxHaveGold( toindex) ){ + + NPC_MaxGoldOver( meindex, toindex, NPC_PETSHOP_MSG_OVER, token); + windowno=CHAR_WINDOWTYPE_WINDOWPETSHOP_GOLDOVER; + buttontype=WINDOW_BUTTONTYPE_YESNO; + }else{ + NPC_PetDel(meindex,toindex,select,token); + buttontype=WINDOW_BUTTONTYPE_OK; + windowno=CHAR_WINDOWTYPE_WINDOWPETSHOP_END; + } + + windowtype=WINDOW_MESSAGETYPE_MESSAGE; + break; + case 4: + NPC_PetDel(meindex,toindex,select,token); + buttontype=WINDOW_BUTTONTYPE_OK; + windowno=CHAR_WINDOWTYPE_WINDOWPETSHOP_END; + windowtype=WINDOW_MESSAGETYPE_MESSAGE; + break; + case 5: // 领取寄放宠列表 + if( CHAR_getWorkInt( meindex, CHAR_WORK_POOLFLG ) != 1 ) + return; + buttontype=WINDOW_BUTTONTYPE_CANCEL; + windowtype=WINDOW_MESSAGETYPE_PETSELECT; + windowno=CHAR_WINDOWTYPE_WINDOWPETSHOP_PETSELECT2; + break; + case 6: + if( CHAR_getInt( toindex, CHAR_GOLD) + < NPC_GETPOOLCOST( toindex)) + { + NPC_MaxGoldOver(meindex, toindex, NPC_PETSHOP_MSG_COST, token); + buttontype = WINDOW_BUTTONTYPE_OK; + } + else { + NPC_PetDate2( meindex, toindex, select, token); + buttontype = WINDOW_BUTTONTYPE_YESNO; + } + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_WINDOWPETSHOP_MAIN2; + break; + + case 7: + if( CHAR_getWorkInt( meindex, CHAR_WORK_POOLFLG ) != 1 ) + return; + if( CHAR_getInt( toindex, CHAR_GOLD) < NPC_GETPOOLCOST( toindex)){ + NPC_MaxGoldOver(meindex, toindex, NPC_PETSHOP_MSG_COST, token); + }else { + NPC_PetDel2( meindex, toindex, select, token); + } + buttontype = WINDOW_BUTTONTYPE_OK; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_WINDOWPETSHOP_END; + break; + // 仃 木 互域 + case 8: + NPC_MaxGoldOver( meindex, toindex, NPC_PETSHOP_MSG_POOLFULL, token); + buttontype = WINDOW_BUTTONTYPE_OK; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_WINDOWPETSHOP_END; + break; + // 娄五潸曰矢永玄域 它奴件玉它 + case 9: // 取出寄放宠列表 + if( CHAR_getWorkInt( meindex, CHAR_WORK_POOLFLG) != 1 ) + return; + NPC_getDrawPet( meindex, toindex, token, &buttontype, select); + windowtype = WINDOW_MESSAGETYPE_SELECT; + windowno = CHAR_WINDOWTYPE_WINDOWPETSHOP_DRAWSELECT; + break; + // 娄五潸曰 " + case 10: + NPC_PetDate3( meindex, toindex, select, token); + buttontype = WINDOW_BUTTONTYPE_YESNO; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_WINDOWPETSHOP_ASKDRAW; + break; + // 忒允 + case 11: + if( CHAR_getWorkInt( meindex, CHAR_WORK_POOLFLG ) != 1 ) + return; + NPC_PetDel3( meindex, toindex, select, token); + buttontype = WINDOW_BUTTONTYPE_OK; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_WINDOWPETSHOP_END; + break; + // 矢永玄 互域 + case 12: + NPC_MaxGoldOver( meindex, toindex, NPC_PETSHOP_MSG_GETFULL, token); + buttontype = WINDOW_BUTTONTYPE_OK; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_WINDOWPETSHOP_END; + break; +#ifdef _NPC_DEPOTPET + case 13: // 存入仓库列表 + if( !CHAR_CheckDepotPet( toindex) ) + return; + buttontype=WINDOW_BUTTONTYPE_CANCEL; + windowtype=WINDOW_MESSAGETYPE_PETSELECT; + windowno=CHAR_WINDOWTYPE_DEPOTPETSHOP_ADD; + break; + case 14: // 取出仓库列表 + if( !CHAR_CheckDepotPet( toindex) ) + return; + NPC_DepotPet_List( meindex, toindex, token, &buttontype, select); + //buttontype=WINDOW_BUTTONTYPE_CANCEL; + windowtype = WINDOW_MESSAGETYPE_SELECT; + windowno = CHAR_WINDOWTYPE_DEPOTPETSHOP_GET; + break; + + case 15: // 询问确认存入仓库 + if( CHAR_getInt( toindex, CHAR_GOLD) + < NPC_GETPOOLCOST( toindex)) + { + NPC_MaxGoldOver(meindex, toindex, NPC_PETSHOP_MSG_COST, token); + buttontype = WINDOW_BUTTONTYPE_OK; + } + else { + NPC_PetDate2( meindex, toindex, select, token); + buttontype = WINDOW_BUTTONTYPE_YESNO; + } + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_DEPOTPETSHOP_ASKADD; + break; + + case 16: // 询问确认取出仓库 + NPC_DepotPet_AskGet( meindex, toindex, select, token); + buttontype = WINDOW_BUTTONTYPE_YESNO; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_DEPOTPETSHOP_ASKGET; + break; + + case 17: // 确认存入仓库 + if( !CHAR_CheckDepotPet(toindex) ) + return; + if( CHAR_getInt( toindex, CHAR_GOLD) < NPC_GETPOOLCOST( toindex)){ + NPC_MaxGoldOver(meindex, toindex, NPC_PETSHOP_MSG_COST, token); + }else { + NPC_DepotPet_Add( meindex, toindex, select, token); + } + buttontype = WINDOW_BUTTONTYPE_OK; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_WINDOWPETSHOP_END; + break; + + case 18: // 确认取出仓库 + if( CHAR_getWorkInt( meindex, CHAR_WORK_POOLFLG ) != 1 ) + return; + if( NPC_DepotPet_CheckLevel( meindex, toindex, select, token) == TRUE) { + NPC_DepotPet_Get( meindex, toindex, select, token); + buttontype = WINDOW_BUTTONTYPE_OK; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_WINDOWPETSHOP_END; + } + else { + sprintf( token, "\n你无法照顾这只宠物。"); + buttontype = WINDOW_BUTTONTYPE_OK; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_WINDOWPETSHOP_END; + } + break; +#endif + // CoolFish: Add 2001/7/4 + default: + break; + + } + + /*--巨旦弗□皿--*/ + //makeEscapeString( token, escapedname, sizeof(escapedname)); + + + /*--霜耨--*/ + lssproto_WN_send( fd, windowtype, + buttontype, + windowno, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + +} + +void NPC_PetShopWindowTalked( int meindex, int talkerindex, + int seqno, int select, char *data) +{ + int datanum = -1; + if( NPC_Util_CharDistance( talkerindex, meindex ) > 2) { + return; + } + + //print("\n NPC_PetShopWindowTalked: data:%s seq:%d sel:%d ", data, seqno, select); + + makeStringFromEscaped( data); + + datanum = atoi( data); + + switch( seqno){ + case CHAR_WINDOWTYPE_WINDOWPETSHOP_START: + { + int poolflg = CHAR_getWorkInt( meindex, CHAR_WORK_POOLFLG); + + if( ( datanum == 3 && poolflg) || // 卖宠物 + ( datanum == 2 && !poolflg ) ){ // 领取宠物 + NPC_PetShop_selectWindow( meindex, talkerindex, 1, -1 ); + }else if( datanum == 1 && poolflg) { // 寄放宠物 + if( CHAR_getCharPoolPetElement( talkerindex) != -1 ) { + NPC_PetShop_selectWindow( meindex, talkerindex, 5, -1 ); + } + else { + NPC_PetShop_selectWindow( meindex, talkerindex, 8, -1 ); + } + }else if( datanum == 2 && poolflg ) { // 领取宠物 + if( CHAR_getCharPetElement( talkerindex) != -1 ) { + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, 0); + NPC_PetShop_selectWindow( meindex, talkerindex, 9, 0); + }else { + NPC_PetShop_selectWindow( meindex, talkerindex, 12, -1 ); + } + } +#ifdef _NPC_DEPOTPET + else if( datanum == 4 ) { // 使用宠物仓库 + print(" 使用宠物仓库 "); + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, 0); + if( !CHAR_CheckDepotPet( talkerindex) ){ + CHAR_GetDepotPet( meindex, talkerindex); + CHAR_talkToCli( talkerindex, -1, "取得宠物,请稍後!", CHAR_COLORYELLOW); + }else{ + NPC_PoolPetShop_DepotPet_Menu( meindex, talkerindex); + } + } +#endif + } + break; + case CHAR_WINDOWTYPE_WINDOWPETSHOP_PETSELECT: + if(select==WINDOW_BUTTONTYPE_CANCEL){ + NPC_PetShop_selectWindow( meindex, talkerindex, 0,-1 ); + + }else{ + NPC_PetShop_selectWindow( meindex, talkerindex, 2, datanum ); + } + break; + case CHAR_WINDOWTYPE_WINDOWPETSHOP_PETSELECT2: + if(select==WINDOW_BUTTONTYPE_CANCEL){ + NPC_PetShop_selectWindow( meindex, talkerindex, 0,-1 ); + }else{ + NPC_PetShop_selectWindow( meindex, talkerindex, 6, datanum ); + } + break; + case CHAR_WINDOWTYPE_WINDOWPETSHOP_MAIN: + if(select==WINDOW_BUTTONTYPE_YES){ + NPC_PetShop_selectWindow( meindex, talkerindex, 3,-1 ); + }else{ + NPC_PetShop_selectWindow( meindex, talkerindex,1,-1); + } + break; + case CHAR_WINDOWTYPE_WINDOWPETSHOP_MAIN2: + if(select==WINDOW_BUTTONTYPE_YES){ + NPC_PetShop_selectWindow( meindex, talkerindex, 7,-1 ); + }else { + NPC_PetShop_selectWindow( meindex, talkerindex,5,-1); + } + break; + case CHAR_WINDOWTYPE_WINDOWPETSHOP_ASKDRAW: + if( select == WINDOW_BUTTONTYPE_YES){ + if( CHAR_getCharPetElement( talkerindex) != -1 ) { + NPC_PetShop_selectWindow( meindex, talkerindex, 11,-1 ); + }else { + NPC_PetShop_selectWindow( meindex, talkerindex, 12, -1 ); + } + }else { + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, 0); + NPC_PetShop_selectWindow( meindex, talkerindex, 9, 0); + } + break; + case CHAR_WINDOWTYPE_WINDOWPETSHOP_GOLDOVER: + if( select == WINDOW_BUTTONTYPE_YES){ + NPC_PetShop_selectWindow( meindex, talkerindex, 4,-1 ); + }else{ + NPC_PetShop_selectWindow( meindex, talkerindex, 0,-1 ); + } + break; + case CHAR_WINDOWTYPE_WINDOWPETSHOP_DRAWSELECT: + if( select == WINDOW_BUTTONTYPE_PREV){ + NPC_PetShop_selectWindow( meindex, talkerindex, 9, -1); + }else if( select == WINDOW_BUTTONTYPE_NEXT) { + NPC_PetShop_selectWindow( meindex, talkerindex, 9, 1); + }else if( select != WINDOW_BUTTONTYPE_CANCEL) { + if( CHAR_getCharPetElement( talkerindex) != -1 ) { + NPC_PetShop_selectWindow( meindex, talkerindex, 10, datanum); + }else { + NPC_PetShop_selectWindow( meindex, talkerindex, 12, -1 ); + } + }else { + NPC_PetShop_selectWindow( meindex, talkerindex, 0,-1 ); + } + break; + +#ifdef _NPC_DEPOTPET + case CHAR_WINDOWTYPE_DEPOTPETSHOP_HANDLE: + if( !CHAR_CheckDepotPet( talkerindex) ) return ; + switch( datanum ) { + case 1://放入 + if( CHAR_findEmptyDepotPet( talkerindex) == -1 ){ + CHAR_talkToCli( talkerindex, -1, "宠物仓库已满!", CHAR_COLORYELLOW); + return; + } + //NPC_DepotPet_Pet_printWindow( meindex, talkerindex); + NPC_PetShop_selectWindow( meindex, talkerindex, 13, -1 ); + break; + case 2://取出 + if( CHAR_getCharPetElement( talkerindex) < 0 ) { + CHAR_talkToCli( talkerindex, -1, "身上宠物栏位已满!", CHAR_COLORYELLOW); + return; + } + NPC_PetShop_selectWindow( meindex, talkerindex, 14, 0); + break; + case 0: + NPC_PetShop_selectWindow( meindex, talkerindex, 0, -1); + break; + } + break; + + case CHAR_WINDOWTYPE_DEPOTPETSHOP_ADD: + if(select==WINDOW_BUTTONTYPE_CANCEL){ + NPC_PetShop_selectWindow( meindex, talkerindex, 0,-1 ); + }else{ + NPC_PetShop_selectWindow( meindex, talkerindex, 15, datanum ); + } + break; + + case CHAR_WINDOWTYPE_DEPOTPETSHOP_GET: + if( select == WINDOW_BUTTONTYPE_PREV){ + NPC_PetShop_selectWindow( meindex, talkerindex, 14, -1); + }else if( select == WINDOW_BUTTONTYPE_NEXT) { + NPC_PetShop_selectWindow( meindex, talkerindex, 14, 1); + }else if( select != WINDOW_BUTTONTYPE_CANCEL) { + if( CHAR_getCharPetElement( talkerindex) != -1 ) { + NPC_PetShop_selectWindow( meindex, talkerindex, 16, datanum); + }else { + NPC_PetShop_selectWindow( meindex, talkerindex, 12, -1 ); + } + }else { + NPC_PetShop_selectWindow( meindex, talkerindex, 0,-1 ); + } + + break; + case CHAR_WINDOWTYPE_DEPOTPETSHOP_ASKADD: // 确认存入仓库 + if(select==WINDOW_BUTTONTYPE_YES){ + NPC_PetShop_selectWindow( meindex, talkerindex, 17,-1 ); + }else { + NPC_PetShop_selectWindow( meindex, talkerindex,13,-1); + } + break; + + case CHAR_WINDOWTYPE_DEPOTPETSHOP_ASKGET: // 确认取出仓库 + if( select == WINDOW_BUTTONTYPE_YES){ + if( CHAR_getCharPetElement( talkerindex) != -1 ) { + NPC_PetShop_selectWindow( meindex, talkerindex, 18,-1 ); + }else { + NPC_PetShop_selectWindow( meindex, talkerindex, 12, -1 ); + } + }else { + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, 0); + NPC_PetShop_selectWindow( meindex, talkerindex, 14, 0); + } + break; +#endif + + case CHAR_WINDOWTYPE_WINDOWPETSHOP_END: + if( select == WINDOW_BUTTONTYPE_OK){ + NPC_PetShop_selectWindow( meindex, talkerindex, 0,-1 ); + } + break; + + // CoolFish: Add 2001/7/4 + default: + break; + + } +} + +void NPC_PetDate(int meindex,int talker,int select,char *token) +{ + + int petindex; + int cost; + char *petname; + char buf[1024]; + + /*--伐□弁及赓渝祭--*/ + CHAR_setWorkInt(talker,CHAR_WORKSHOPRELEVANT,select); + + petindex = CHAR_getCharPet( talker, select-1); + + + if( !CHAR_CHECKINDEX(petindex) ) return; + + NPC_MaxGoldOver( meindex, talker, NPC_PETSHOP_MSG_REALY, buf); + + cost=NPC_GetCost(meindex,talker,petindex); + + petname = CHAR_getUseName( petindex); + + sprintf(token,"\n是[%s]没错吧?""%s" + "\n\n 买卖价格 %d STONE\n" + ,petname,buf,cost); + +} + +void NPC_PetDate2(int meindex,int talker,int select,char *token) +{ + + int petindex; + char *petname; + CHAR_setWorkInt(talker,CHAR_WORKSHOPRELEVANT,select); + + petindex = CHAR_getCharPet( talker, select-1); + if( !CHAR_CHECKINDEX(petindex) ) return; + petname = CHAR_getUseName( petindex); + sprintf(token,"\n寄放[%s]" + "\n\n 寄放价格 %d stone\n" + ,petname, NPC_GETPOOLCOST( talker) + ); +} + +void NPC_PetDate3(int meindex,int talker,int select,char *token) +{ + int poolindex; + int petindex; + char *petname; + poolindex = CHAR_getWorkInt( talker, CHAR_WORKSHOPRELEVANT) * 5 + select - 1; + CHAR_setWorkInt(talker,CHAR_WORKSHOPRELEVANT,poolindex ); + petindex = CHAR_getCharPoolPet( talker, poolindex); + if( !CHAR_CHECKINDEX(petindex) ) return; + petname = CHAR_getUseName( petindex); + sprintf(token,"\n领回[%s]", petname); +} + +int NPC_GetCost(int meindex,int talker,int petindex) +{ + int cost; + int levelcost; + int level; + int getlevel; + int graNo; + int rare; + int charm=50; + int petai; + int i=1; + double rate=1.0; + int intrate; + char buf[1024]; + char buff2[128]; + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("GetArgStrErr"); + return FALSE; + } + + + getlevel=CHAR_getInt(petindex,CHAR_PETGETLV); + level=CHAR_getInt(petindex,CHAR_LV); + graNo=CHAR_getInt(petindex,CHAR_BASEBASEIMAGENUMBER); + rare=CHAR_getInt(petindex,CHAR_RARE); + + if(getlevel==0) getlevel=1 ; + + /*--袄蟾毛菲户月--*/ + levelcost=(level*level)*10; + getlevel=(getlevel*getlevel)*10; +// Syu ADD 修改卖转生宠金钱会变负的bug +#ifdef _PET_2TRANS + if( CHAR_getInt(petindex , CHAR_TRANSMIGRATION)>0) +#else + if( CHAR_getInt(petindex , CHAR_TRANSMIGRATION)==1) +#endif + getlevel=10; + + + if(rare==0){ rare=1; + }else if(rare==1){ rare=5; + }else if(rare==2){ rare=8;} + + cost = ((levelcost-getlevel)+(level*PETCOST))*rare; + intrate = CHAR_getWorkInt( meindex , CHAR_WORK_NOMALRATE); + rate=(double) intrate / 1000; + + + NPC_Util_GetStrFromStrWithDelim( npcarg, "special_pet", buf, sizeof( buf)); + + i=1; + /*--旦矢扑乓伙伊□玄匹煌遥今木月矢永玄毛喃曰请允 矢永玄及隙烂反 飓 寞)--*/ + while( getStringFromIndexWithDelim(buf,",",i,buff2,sizeof(buff2)) !=FALSE ) + { + if(strstr( buff2, "-")==NULL){ + if(graNo == atoi(buff2)){ + intrate=CHAR_getWorkInt( meindex , CHAR_WORK_SPECIALRATE); + rate=(double) intrate / 1000; + break; + } + }else{ + /*--失奶 丞互 15-25 及溥匹嗉濠日木化中月桦宁--*/ + int start; + int end; + int tmp; + int graflg=0; + char token2[128]; + + /*-"-"匹嗉濠日木凶铵户及醒袄午 及醒袄毛潸 --*/ + getStringFromIndexWithDelim( buff2, "-", 1, token2, sizeof(token2)); + start = atoi( token2); + getStringFromIndexWithDelim( buff2, "-", 2 ,token2, sizeof(token2)); + end = atoi( token2); + + /*-- 寞互菅卞卅匀化中凶日} 木赘尹月**/ + if(start > end){ + tmp=start; + start=end; + end=tmp; + } + + end++; + /*--"-"匹嗉濠日木凶坌及失奶 丞树 毛 月--*/ + if(start <= graNo && graNo < end){ + intrate=CHAR_getWorkInt( meindex , CHAR_WORK_SPECIALRATE); + rate=(double) intrate / 1000; + graflg=1; + break; + } + + if(graflg ==1) break; + } + i++; + } + + /*--矢永玄及镝擦蘸毛 ---*/ + petai=CHAR_getWorkInt(petindex,CHAR_WORKFIXAI); + + /*-- 毛必永玄--*/ + charm = CHAR_getWorkInt(talker,CHAR_WORKFIXCHARM); + + /*-- ≈镝擦蘸 / ㄡ */ + charm = charm + petai; + + if(charm < 20){ + charm = 20; + } + + charm = charm / 2; + + cost = (int)cost*rate; + + rate=(double)charm/100; + + /*-- 镝擦喘仃--*/ + cost = cost * rate; + + /*--云嗯毛筏盛--*/ + CHAR_setWorkInt(talker,CHAR_WORKSHOPRELEVANTSEC,cost); + + return cost; +} + + +#if 1 + +void NPC_PetDel(int meindex, int talker,int select,char* token) +{ + int petindex; + int petsel; + char szPet[128]; + int cost; + int defpet; + int fd = getfdFromCharaIndex( talker ); + + NPC_MaxGoldOver( meindex, talker, NPC_PETSHOP_MSG_THANKS, token); + petsel=(CHAR_getWorkInt(talker,CHAR_WORKSHOPRELEVANT)-1); + petindex = CHAR_getCharPet( talker, petsel); + + if( !CHAR_CHECKINDEX(petindex) ) return; + + // CoolFish: Family 2001/6/14 + if (CHAR_getInt(petindex, CHAR_PETFAMILY) == 1){ +/* char buf[1024]; + lssproto_WN_send(fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString("\n\n很抱歉~守护兽无法贩卖喔!\n请自己好好照顾!", buf, sizeof(buf))); +*/ + sprintf(token,"\n\n很抱歉~守护兽无法贩卖喔!\n请自己好好照顾!"); + return; + } + + // Robin 0725 + if (CHAR_getInt( talker, CHAR_RIDEPET ) == petsel ){ +/* char buf[1024]; + lssproto_WN_send(fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString("\n\n骑乘中的宠物无法贩卖喔!", buf, sizeof(buf))); +*/ + sprintf(token,"\n\n骑乘中的宠物无法贩卖喔!"); + return; + } + + if( CHAR_getWorkInt( CONNECT_getCharaindex(fd), + CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE) return ; + defpet=CHAR_getInt(talker,CHAR_DEFAULTPET); + if(defpet==petsel){ + CHAR_setInt(talker,CHAR_DEFAULTPET,-1); + lssproto_KS_send( fd, -1, TRUE); + } + CHAR_setCharPet( talker, petsel, -1); + LogPet( + CHAR_getChar( talker, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( talker, CHAR_CDKEY ), + CHAR_getChar( petindex, CHAR_NAME), + CHAR_getInt( petindex, CHAR_LV), + "sell(卖宠)", + CHAR_getInt( talker,CHAR_FLOOR), + CHAR_getInt( talker,CHAR_X ), + CHAR_getInt( talker,CHAR_Y ), + CHAR_getChar( petindex, CHAR_UNIQUECODE) // shan 2001/12/14 + ); + CHAR_endCharOneArray( petindex ); + + snprintf( szPet, sizeof( szPet ), "K%d", petsel); + CHAR_sendStatusString( talker, szPet ); + cost=NPC_GetCost(meindex,talker,petindex); + CHAR_AddGold( talker, cost); + +} +#endif +void NPC_PetDel2( int meindex, int talker, int select, char *token) +{ + + int petindex; + int selectpet; + int emptyindex; + char szPet[128]; + int fd = getfdFromCharaIndex( talker ); + + if( fd == -1 ) { + fprint( "err\n"); + return; + } + // 矢永玄犯□正 凳[矢永玄 仃 木 + selectpet = CHAR_getWorkInt( talker, CHAR_WORKSHOPRELEVANT) -1; + petindex = CHAR_getCharPet( talker, selectpet); + if( !CHAR_CHECKINDEX( petindex) ) return; + + // Robin 0725 + if (CHAR_getInt( talker, CHAR_RIDEPET ) == selectpet ) + { +/* char buf[1024]; + lssproto_WN_send(fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + -1, -1, + makeEscapeString("\n\n骑乘中的宠物无法寄放喔!", buf, sizeof(buf))); +*/ + sprintf(token,"\n\n骑乘中的宠物无法寄放喔!"); + return; + } + + // 坞五毛茧允[蟆卞茧仄化民尼永弁仄化中月及匹]仇仇匹坞中化中卅中及反云井仄中 + emptyindex = CHAR_getCharPoolPetElement( talker); + if( emptyindex == -1 ) { + fprint( "err\n"); + return; + } + // 爵 赏 迕矢永玄卅日]公木及瓒 毛壅允[ + if( CHAR_getInt( talker, CHAR_DEFAULTPET) == selectpet) { + CHAR_setInt( talker, CHAR_DEFAULTPET, -1); + lssproto_KS_send( fd, -1, TRUE); + } + // 仃 木 卞]矢永玄及奶件犯永弁旦毛戊疋□ + CHAR_setCharPoolPet( talker, emptyindex, petindex); + // 矢永玄 井日壅允 + CHAR_setCharPet( talker, selectpet, -1); + + // 丢永本□斥潸 + NPC_MaxGoldOver( meindex, talker, NPC_PETSHOP_MSG_POOLTHANKS, token); + // 云嗯蛹日允 + + CHAR_DelGold( talker, NPC_GETPOOLCOST( talker) ); + + // 云嗯犯□正霜月 + CHAR_send_P_StatusString(talker,CHAR_P_STRING_GOLD); + + snprintf( szPet, sizeof( szPet ), "K%d", selectpet); + // 蕙仄中矢永玄旦 □正旦霜曰勾仃月 + CHAR_sendStatusString( talker, szPet ); + // 矢永玄毛 仃凶夫弘 + LogPet( + CHAR_getChar( talker, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( talker, CHAR_CDKEY ), + CHAR_getChar( petindex, CHAR_NAME), + CHAR_getInt( petindex, CHAR_LV), + "pool(寄放宠物店)", + CHAR_getInt( talker,CHAR_FLOOR), + CHAR_getInt( talker,CHAR_X ), + CHAR_getInt( talker,CHAR_Y ), + CHAR_getChar( petindex, CHAR_UNIQUECODE) // shan 2001/12/14 + ); + +} + +void NPC_PetDel3( int meindex, int talker, int select, char *token) +{ + + int petindex; + int selectpet; + int emptyindex; + char szPet[128]; + int workindex[CHAR_MAXPOOLPETHAVE]; + int i; + int cnt; + + selectpet = CHAR_getWorkInt( talker, CHAR_WORKSHOPRELEVANT) ; + petindex = CHAR_getCharPoolPet( talker, selectpet); + if( !CHAR_CHECKINDEX( petindex) ) return; + emptyindex = CHAR_getCharPetElement( talker); + if( emptyindex == -1 ) { + fprint( "err\n"); + return; + } + + // 如果是守护兽改为普通兽 + if( CHAR_getInt( petindex, CHAR_PETFAMILY) == 1 + && CHAR_getInt( talker, CHAR_FMLEADERFLAG) != 3 ) { + CHAR_setInt( petindex, CHAR_PETFAMILY, 0); + CHAR_talkToCli( talker, -1, "守护兽改为普通兽", CHAR_COLORYELLOW); + } + + CHAR_setCharPet( talker, emptyindex, petindex); + CHAR_setCharPoolPet( talker, selectpet, -1); + NPC_MaxGoldOver( meindex, talker, NPC_PETSHOP_MSG_POOLTHANKS, token); + snprintf( szPet, sizeof( szPet ), "K%d", emptyindex); + CHAR_sendStatusString( talker, szPet ); + snprintf( szPet, sizeof( szPet), "W%d",emptyindex); + CHAR_sendStatusString( talker, szPet ); + for( i = 0; i < CHAR_MAXPOOLPETHAVE; i ++ ) { + workindex[i] = -1; + } + cnt = 0; + for( i = 0; i < CHAR_MAXPOOLPETHAVE; i ++ ) { + int petindex = CHAR_getCharPoolPet( talker, i); + if( CHAR_CHECKINDEX( petindex) ) { + workindex[cnt++] = petindex; + } + } + for( i = 0; i < CHAR_MAXPOOLPETHAVE; i ++ ) { + CHAR_setCharPoolPet( talker, i, workindex[i]); + } + LogPet( + CHAR_getChar( talker, CHAR_NAME ), + CHAR_getChar( talker, CHAR_CDKEY ), + CHAR_getChar( petindex, CHAR_NAME), + CHAR_getInt( petindex, CHAR_LV), + "draw(领取宠物店)", + CHAR_getInt( talker,CHAR_FLOOR), + CHAR_getInt( talker,CHAR_X ), + CHAR_getInt( talker,CHAR_Y ), + CHAR_getChar( petindex, CHAR_UNIQUECODE) // shan 2001/12/14 + ); +#ifdef _PET_EVOLUTION + if( CHAR_getInt( petindex, CHAR_FUSIONBEIT) == 1 && + CHAR_getInt( petindex, CHAR_FUSIONRAISE) > 0 ){//检查是否为融合宠 + CHAR_setInt( petindex, CHAR_FUSIONTIMELIMIT, (int)time( NULL)); + } +#endif +} + +void NPC_getDrawPet( int meindex, int toindex, char *token, int *buttontype, int select) +{ + // ㄠ矢□斥丐凶曰及垫醒 + #define LINENUM 5 + char buf[1024]; + int i; + int startnum, endnum; + int petindex = -1; + // 蜇箕及矢□斥 + int page = CHAR_getWorkInt( toindex, CHAR_WORKSHOPRELEVANT); + int limit; + //andy_reEdit 2003/09/18 + limit = (CHAR_getInt(toindex,CHAR_TRANSMIGRATION)*2)+5; + + endnum = (page + select+1)*LINENUM ; + startnum = endnum - LINENUM; + *buttontype = WINDOW_BUTTONTYPE_CANCEL; + // 羹矢□斥譬帮[ + if( endnum >= limit ) { + endnum = limit; + if( page +select!= 0 ) *buttontype |= WINDOW_BUTTONTYPE_PREV; + } + else if( endnum <= LINENUM ) { + endnum = LINENUM; + *buttontype |= WINDOW_BUTTONTYPE_NEXT; + } + else { + *buttontype |= WINDOW_BUTTONTYPE_PREV | WINDOW_BUTTONTYPE_NEXT; + } + CHAR_setWorkInt( toindex, CHAR_WORKSHOPRELEVANT, page +select); + + strcpy( token, "2\n亖亖亖 请选择宠物 亖亖亖\n\n"); + for( i = startnum; i < endnum; i ++ ) { + petindex = CHAR_getCharPoolPet( toindex, i); + if( CHAR_CHECKINDEX( petindex) ) { + snprintf( buf, sizeof( buf), "LV.%3d MaxHP %3d %s\n", + CHAR_getInt( petindex, CHAR_LV), + CHAR_getWorkInt( petindex, CHAR_WORKMAXHP), + CHAR_getUseName( petindex) + ); + } + else { + strcpy( buf, "\n"); + } + strcat( token, buf); + } + // 戚及域蜊毛譬屯化] 井匀凶日戚尺示正件毛潸月 + if( i != limit ) { + petindex = CHAR_getCharPoolPet( toindex, i); + if( !CHAR_CHECKINDEX( petindex)) { + *buttontype &= ~WINDOW_BUTTONTYPE_NEXT; + } + } +} + +/* + *云嗯互左□田□公及职中欠中欠 + */ +void NPC_MaxGoldOver(int meindex,int toindex,int select,char *token) +{ + + char buf[1024]; + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + + NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg)); + + if( select < 0 || select >= arraysizeof( shopmsg)) return; + + if( NPC_Util_GetStrFromStrWithDelim( npcarg, shopmsg[select].option, buf, sizeof( buf)) + == NULL ) + { + strcpy( buf, shopmsg[select].defaultmsg); + } + + snprintf(token,sizeof(buf),"\n\n%s",buf); + +} + +#ifdef _NPC_DEPOTPET +void NPC_PoolPetShop_DepotPet_Menu( int meindex, int talkerindex) +{ + int fd; + + //print(" NPC_PoolPetShop_DepotPet_Menu "); + + fd = getfdFromCharaIndex( talkerindex); + if( fd != -1 ) { + char message[1024]; + char buf[2048]; + + strcpy( message, + "3\n\n" + " 使用宠物仓库\n\n" + " <存放宠物>\n" + " <取回宠物>\n" + ); + + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_SELECT, + WINDOW_BUTTONTYPE_CANCEL, + CHAR_WINDOWTYPE_DEPOTPETSHOP_HANDLE, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + makeEscapeString( message, buf, sizeof(buf))); + } +} + +void NPC_DepotPet_List( int meindex, int toindex, char *token, int *buttontype, int select) +{ + // ㄠ矢□斥丐凶曰及垫醒 + #define LINENUM 5 + char buf[1024]; + int i; + int startnum, endnum; + int petindex = -1; + // 蜇箕及矢□斥 + int page = CHAR_getWorkInt( toindex, CHAR_WORKSHOPRELEVANT); + int limit; + + limit = CHAR_MAXDEPOTPETHAVE; + + endnum = (page + select+1)*LINENUM ; + startnum = endnum - LINENUM; + *buttontype = WINDOW_BUTTONTYPE_CANCEL; + // 羹矢□斥譬帮[ + if( endnum >= limit ) { + endnum = limit; + if( page +select!= 0 ) *buttontype |= WINDOW_BUTTONTYPE_PREV; + } + else if( endnum <= LINENUM ) { + endnum = LINENUM; + *buttontype |= WINDOW_BUTTONTYPE_NEXT; + } + else { + *buttontype |= WINDOW_BUTTONTYPE_PREV | WINDOW_BUTTONTYPE_NEXT; + } + CHAR_setWorkInt( toindex, CHAR_WORKSHOPRELEVANT, page +select); + + strcpy( token, "2\n亖亖亖 请选择要从仓库取出的宠物 亖亖亖\n\n"); + for( i = startnum; i < endnum; i ++ ) { + petindex = CHAR_getDepotPetIndex( toindex, i); + if( CHAR_CHECKINDEX( petindex) ) { + snprintf( buf, sizeof( buf), "LV.%3d MaxHP %3d %s\n", + CHAR_getInt( petindex, CHAR_LV), + CHAR_getWorkInt( petindex, CHAR_WORKMAXHP), + CHAR_getUseName( petindex) + ); + } + else { + strcpy( buf, "\n"); + } + strcat( token, buf); + } + // 戚及域蜊毛譬屯化] 井匀凶日戚尺示正件毛潸月 + if( i != limit ) { + petindex = CHAR_getDepotPetIndex( toindex, i); + if( !CHAR_CHECKINDEX( petindex)) { + *buttontype &= ~WINDOW_BUTTONTYPE_NEXT; + } + } + //print("\n DepotPet_List:%s ", token); +} + + +void NPC_DepotPet_Add( int meindex, int talker, int select, char *token) +{ + + int petindex; + int selectpet; + int emptyindex; + char szPet[128]; + int fd = getfdFromCharaIndex( talker ); + + if( fd == -1 ) { + fprint( "err\n"); + return; + } + // 矢永玄犯□正 凳[矢永玄 仃 木 + selectpet = CHAR_getWorkInt( talker, CHAR_WORKSHOPRELEVANT) -1; + //print("\n selectpet:%d ", selectpet); + petindex = CHAR_getCharPet( talker, selectpet); + if( !CHAR_CHECKINDEX( petindex) ) return; + + // Robin 0725 + if (CHAR_getInt( talker, CHAR_RIDEPET ) == selectpet ) + { + sprintf(token,"\n\n骑乘中的宠物无法存入仓库喔!"); + return; + } + + if( CHAR_getInt( petindex, CHAR_PETFAMILY) == 1 ) + { + sprintf(token,"\n\n家族守护兽无法存入仓库喔!"); + return; + } + +#ifdef _CHECK_ENEMY_PET + { + int j; + for( j=0;j 0 ){//检查是否为融合宠 + CHAR_setInt( petindex, CHAR_FUSIONTIMELIMIT, (int)time( NULL)); + } +#endif +} + +void NPC_DepotPet_AskGet(int meindex,int talker,int select,char *token) +{ + int depotindex; + int petindex; + char *petname; + depotindex = CHAR_getWorkInt( talker, CHAR_WORKSHOPRELEVANT) * 5 + select - 1; + CHAR_setWorkInt(talker,CHAR_WORKSHOPRELEVANT,depotindex ); + petindex = CHAR_getDepotPetIndex( talker, depotindex); + if( !CHAR_CHECKINDEX(petindex) ) return; + petname = CHAR_getUseName( petindex); + sprintf(token,"\n领回[%s]", petname); +} + +int NPC_DepotPet_CheckRepeat( int charaindex) +{ + int petindex1, petindex2; + int i, j, find, ret = FALSE; + int workindex[CHAR_MAXDEPOTPETHAVE], cnt =0; + + for( i =0; i <(CHAR_MAXDEPOTPETHAVE-1); i++) + { + petindex1 = CHAR_getDepotPetIndex( charaindex, i); + if( !CHAR_CHECKINDEX( petindex1)) continue; + find = 0; + for( j =(i+1); j 0) + { + CHAR_setDepotPetIndex( charaindex, i, -1); + NPC_DepotPet_CheckRepeat_del( charaindex, petindex1); + } + } + + for( i = 0; i < CHAR_MAXDEPOTPETHAVE; i ++ ) { + workindex[i] = -1; + } + for( i = 0; i < CHAR_MAXDEPOTPETHAVE; i ++ ) { + int pindex = CHAR_getDepotPetIndex( charaindex, i); + if( CHAR_CHECKINDEX( pindex) ) { + workindex[cnt++] = pindex; + } + } + for( i = 0; i < CHAR_MAXDEPOTPETHAVE; i ++ ) { + CHAR_setDepotPetIndex( charaindex, i, workindex[i]); + } + + return ret; +} + +int NPC_DepotPet_CheckRepeat_del( int charaindex, int petindex) +{ + int i; + + LogPet( + CHAR_getChar( charaindex, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( charaindex, CHAR_CDKEY ), + CHAR_getChar( petindex, CHAR_NAME), + CHAR_getInt( petindex, CHAR_LV), + "del(清除仓库洗宠)", + CHAR_getInt( charaindex,CHAR_FLOOR), + CHAR_getInt( charaindex,CHAR_X ), + CHAR_getInt( charaindex,CHAR_Y ), + CHAR_getChar( petindex, CHAR_UNIQUECODE) // shan 2001/12/14 + ); + + CHAR_endCharOneArray( petindex ); + +} + +// 检查等级是否足够 +int NPC_DepotPet_CheckLevel(int meindex,int talker,int select,char *token) +{ + int petindex; + int selectpet; + + if( !CHAR_CheckDepotPet( talker) ) + return FALSE; + + selectpet = CHAR_getWorkInt( talker, CHAR_WORKSHOPRELEVANT) ; + petindex = CHAR_getDepotPetIndex( talker, selectpet); + if( !CHAR_CHECKINDEX(petindex) ) return FALSE; + + //print("\n trans:%d char_lv:%d pet_lv:%d ", + // CHAR_getInt( talker, CHAR_TRANSMIGRATION), + // CHAR_getInt( talker, CHAR_LV), + // CHAR_getInt( petindex, CHAR_LV) ); + + // 如果是守护兽改为普通兽 + if( CHAR_getInt( petindex, CHAR_PETFAMILY) == 1 + && CHAR_getInt( talker, CHAR_FMLEADERFLAG) != 3 ) { + CHAR_setInt( petindex, CHAR_PETFAMILY, 0); + } + + if( CHAR_getWorkInt( talker, CHAR_PickAllPet) == TRUE ) { // 装备驯兽戒指的话... + return TRUE; + } + + if( CHAR_getInt( talker, CHAR_TRANSMIGRATION) > 0 + || CHAR_getInt( talker, CHAR_LV)+5 >= CHAR_getInt( petindex, CHAR_LV) ) { + return TRUE; + } + + return FALSE; + +} + +#endif + diff --git a/gmsv/npc/npc_petskillshop.c b/gmsv/npc/npc_petskillshop.c new file mode 100644 index 0000000..8cd0401 --- /dev/null +++ b/gmsv/npc/npc_petskillshop.c @@ -0,0 +1,243 @@ +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "lssproto_serv.h" +#include "pet_skill.h" +#include "readmap.h" +#include "battle.h" + +enum { + CHAR_WORK_STONESELECT = CHAR_NPCWORKINT1, +}; + +static void NPC_PetSkillShop_selectWindow( int meindex, int toindex, int num,int select); +BOOL NPC_PetSkillMakeStr(int meindex,int toindex,int select); + +BOOL NPC_PetSkillShopInit( int meindex ) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char msg[256]; + + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPESTONESHOP ); + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr))==NULL){ + print("GetArgStrErr"); + return FALSE; + } + if( NPC_Util_GetStrFromStrWithDelim( argstr, "pet_skill", msg, sizeof( msg)) != NULL){ + char buf[256], filename[256]; + int k=1, skillID, skillarray; + while( getStringFromIndexWithDelim( msg, ",", k, buf, sizeof( buf) ) ){ + k++; + skillID=atoi(buf); + skillarray = PETSKILL_getPetskillArray( skillID); + if( PETSKILL_CHECKINDEX( skillarray) == FALSE ) continue; + if( PETSKILL_getInt( skillarray, PETSKILL_ILLEGAL) == 1){ + if( NPC_Util_CheckAssignArgFile( meindex, filename) != NULL ){ + print("PetSkillShop illegal skill:[%d-%s] ->file:%s", + skillID, + PETSKILL_getChar( skillarray, PETSKILL_NAME), + filename ); + } + } + } + }else{ + return FALSE; + } + + return TRUE; +} + +void NPC_PetSkillShopTalked( int meindex , int talkerindex , char *szMes ,int color ) +{ + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) { + return; + } + if(NPC_Util_isFaceToFace(talkerindex,meindex,2 )==FALSE){ + if( NPC_Util_CharDistance( talkerindex, meindex ) > 1) return; + } + NPC_PetSkillShop_selectWindow( meindex, talkerindex,0,-1); +} + +void NPC_PetSkillShopLooked( int meindex , int lookedindex) +{ + if( CHAR_getInt( lookedindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) { + return; + } + if( NPC_Util_CharDistance( lookedindex, meindex ) > 2) return; +} + +static void NPC_PetSkillShop_selectWindow( int meindex, int toindex, int num,int select) +{ + switch(num){ + case 0: + NPC_PetSkillMakeStr(meindex,toindex,select); + break; + case 1: + break; + } +} + +void NPC_PetSkillShopWindowTalked( int meindex, int talkerindex, + int seqno, int select, char *data) +{ + int skill; + int pet; + int slot; + int cost; + int skillID=0; + int petskillindex; + char buf[64]; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char msg[512]; + int petindex; + char msgbuf[128]; + int fd = getfdFromCharaIndex( talkerindex ); + double rate= 1.0; + + if( NPC_Util_CharDistance( talkerindex, meindex ) > 2) { + return; + } + + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr))==NULL){ + print("GetArgStrErr"); + return; + } + makeStringFromEscaped( data); + getStringFromIndexWithDelim(data,"|",1,buf,sizeof(buf)); + skill=atoi(buf); + getStringFromIndexWithDelim(data,"|",2,buf,sizeof(buf)); + pet=atoi(buf); + getStringFromIndexWithDelim(data,"|",3,buf,sizeof(buf)); + slot=atoi(buf); + getStringFromIndexWithDelim(data,"|",4,buf,sizeof(buf)); + cost=atoi(buf); + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "pet_skill", + msg, sizeof( msg)) != NULL){ + getStringFromIndexWithDelim(msg,",",skill,buf,sizeof(buf)); + skillID=atoi(buf); + } + + slot--; + if( !CHAR_CHECKPETSKILLINDEX( slot)){ + CHAR_send_P_StatusString( talkerindex, CHAR_P_STRING_GOLD); + return ; + } + petindex = CHAR_getCharPet( talkerindex, pet-1); + if( !CHAR_CHECKINDEX(petindex) ){ + CHAR_send_P_StatusString( talkerindex, CHAR_P_STRING_GOLD); + return ; + } + if(skillID < 0) return ; + + if(petindex == -1){ + print("petskillshop.c:170 PetindexError"); + return; + } + + if( CHAR_getWorkInt( CONNECT_getCharaindex(fd), + CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE) return ; + if( NPC_Util_GetStrFromStrWithDelim( argstr, "skill_rate", msg, sizeof( msg)) != NULL){ + rate = atof( msg); + } + + petskillindex = PETSKILL_getPetskillArray( skillID ); + if(petskillindex == -1){ + CHAR_send_P_StatusString( talkerindex, CHAR_P_STRING_GOLD); + return ; + } + + cost = PETSKILL_getInt( petskillindex, PETSKILL_COST ); + cost = cost * rate; + + if(CHAR_getInt(talkerindex,CHAR_GOLD) < cost){ + CHAR_send_P_StatusString( talkerindex, CHAR_P_STRING_GOLD); + return; + } + CHAR_setPetSkill( petindex, slot, skillID); + + CHAR_DelGold( talkerindex, cost ); + + snprintf( msgbuf, sizeof( msgbuf ), "W%d",pet-1); + CHAR_sendStatusString( talkerindex, msgbuf ); + CHAR_sendStatusString( talkerindex, "P"); + NPC_PetSkillShop_selectWindow( meindex, talkerindex,0,-1); +} + +BOOL NPC_PetSkillMakeStr(int meindex,int toindex,int select) +{ + + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char msg[256]; + double rate=1.0; + int i=0; + char token[NPC_UTIL_GETARGSTR_LINEMAX]; + int fd = getfdFromCharaIndex( toindex); + + if(select==0){ + sprintf(token,"0|0"); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_PETSKILLSHOP, + WINDOW_BUTTONTYPE_NONE, + CHAR_WINDOWTYPE_WINDOWPETSKILLSHOP, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + + } + + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr))==NULL){ + print("GetArgStrErr"); + return FALSE; + } + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "main_msg", + msg, sizeof( msg)) == NULL){ + print("mainERR"); + return FALSE; + } + + sprintf(token,"1|%s|%s", + CHAR_getChar(meindex,CHAR_NAME),msg); + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "skill_rate", msg, sizeof( msg)) != NULL){ + rate=atof(msg); + } + + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "pet_skill", + msg, sizeof( msg) ) != NULL){ + int skillarray; + int skillID; + int cost; + char token2[265]; + char buf[64]; + + i=1; + while( getStringFromIndexWithDelim(msg,",",i,buf,sizeof(buf)) !=FALSE ){ + i++; + skillID=atoi(buf); + skillarray = PETSKILL_getPetskillArray( skillID); + + if( PETSKILL_CHECKINDEX( skillarray) == FALSE ) + continue; + if( PETSKILL_getInt( skillarray, PETSKILL_ILLEGAL) == 1) continue; + cost = PETSKILL_getInt(skillarray,PETSKILL_COST); + cost = (int)cost*rate; + sprintf(token2,"|%s|%d|%s", + PETSKILL_getChar(skillarray, PETSKILL_NAME), + cost, + PETSKILL_getChar(skillarray, PETSKILL_COMMENT) + ); + strcat(token,token2); + } + } + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_PETSKILLSHOP, + WINDOW_BUTTONTYPE_NONE, + CHAR_WINDOWTYPE_WINDOWPETSKILLSHOP, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + return TRUE; +} + diff --git a/gmsv/npc/npc_pkpetshop.c b/gmsv/npc/npc_pkpetshop.c new file mode 100644 index 0000000..3e22dab --- /dev/null +++ b/gmsv/npc/npc_pkpetshop.c @@ -0,0 +1,1533 @@ +//krynn 2001/12/6 +//PKPetShop + +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "lssproto_serv.h" +#include "pet_skill.h" +#include "readmap.h" +#include "log.h" +#include "enemy.h" +#include "npc_pkpetshop.h" +#include "battle.h" + +#ifdef _PKPETSHOP +#define MAXSHOPPET 33 + +static void NPC_PKPetShop_selectWindow( int meindex, int talker, int num,int select); +void NPC_PKPetShop_BuyMain(int meindex,int talker,int before ); +void NPC_PKPetShop_GetPetList(char *argstr,char * argtoken2); +BOOL NPC_PKPetShop_SetNewPet(int meindex,int talker,char *data); +BOOL NPC_PKPetShop_SellNewPet(int meindex,int talker,char *data); + +void NPC_PKPetShop_Menu(int meindex,int talker); +int NPC_PKPetShop_GetLimtPetList(int talker,char *argstr,char *token2,int sell); +void NPC_PKPetShop_SellMain(int meindex,int talker,int select); +int NPC_GetSellPetList(int itemindex,int flg,char *argstr,char *argtoken,int select,int sell); +BOOL NPC_AddPetBuy(int meindex, int talker,int petID,int kosuu,double rate); +void NPC_PetStrStr(int petID,double rate,char *name,char *token2, int index); +int NPC_SellPetstrsStr(int itemindex,int flg,double rate,char *argtoken,int select,int sell); +void NPC_LimitPetShop(int meindex,int talker,int select); +void NPC_PKPetShop_ExpressmanCheck(int meindex,int talker); + + +/*--伐□弁 烂聒--*/ +enum{ + NPC_PKPETSHOP_WORK_NO = CHAR_NPCWORKINT1, + NPC_PKPETSHOP_WORK_EV = CHAR_NPCWORKINT2, + NPC_PKPETSHOP_WORK_EXPRESS = CHAR_NPCWORKINT3, +}; + + +typedef struct { + char arg[32]; + int type; +}PKPETSHOP_NPC_Shop; + + +static PKPETSHOP_NPC_Shop TypeTable[] = { + { "FIST", 0 }, + { "AXE", 1 }, + { "CLUB", 2 }, + { "SPEAR", 3}, + { "BOW", 4}, + { "SHIELD", 5}, + { "HELM", 6 }, + { "ARMOUR", 7 }, + { "BRACELET", 8}, + { "ANCLET", 9 }, + { "NECKLACE", 10}, + { "RING", 11}, + { "BELT", 12}, + { "EARRING", 13}, + { "NOSERING", 14}, + { "AMULET", 15}, + { "OTHER", 16}, + { "BOOMERANG", 17}, + { "BOUNDTHROW", 18}, + { "BREAKTHROW", 19}, +#ifdef _ITEM_TYPETABLE + { "DISH", 20}, + { "METAL", 21}, + { "JEWEL", 22}, + { "WARES", 23}, + { "WBELT", 24}, + { "WSHIELD", 25}, + { "WSHOES", 26}, + { "WGLOVE", 27}, + { "ANGELTOKEN", 28}, + { "HEROTOKEN", 29}, +#endif + { "ACCESSORY", 30}, + { "OFFENCE", 40}, + { "DEFENCE", 50}, + +}; + + +/********************************* +* 初始 +*********************************/ +BOOL NPC_PKPetShopInit( int meindex ) +{ + + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + + /*--正奶皿涩烂--*/ + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPEPKPetShop ); + + if( NPC_Util_GetArgStr(meindex, argstr, sizeof(argstr)) == NULL ) + { + print("NPC_PKPetShopInit_GetArgStrErr"); + return FALSE; + } + if(strstr(argstr,"LIMITSHOP") != NULL) + { /*- 中潸曰毁迕白仿弘--*/ + CHAR_setWorkInt( meindex, NPC_PKPETSHOP_WORK_NO, 1); + } + else + { + CHAR_setWorkInt( meindex, NPC_PKPETSHOP_WORK_NO, 0); + } + + if(strstr( argstr, "EVENT") != NULL) + { /*- 中潸曰毁迕白仿弘--*/ + CHAR_setWorkInt( meindex, NPC_PKPETSHOP_WORK_EV, 1); + } + else + { + CHAR_setWorkInt( meindex, NPC_PKPETSHOP_WORK_EV, 0); + } + + if(strstr( argstr, "EXPRESS") != NULL) + { /*-扪霜盒白仿弘--*/ + CHAR_setWorkInt( meindex, NPC_PKPETSHOP_WORK_EXPRESS, 1); + } + else + { + CHAR_setWorkInt( meindex, NPC_PKPETSHOP_WORK_EXPRESS, 0); + } + return TRUE; +} + + +/********************************* +* 仄井仃日木凶凛及质 +*********************************/ +void NPC_PKPetShopTalked( int meindex , int talker , char *szMes ,int color ) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buff[1024]; + char buf2[256]; + char token[1024]; + int i = 1; + BOOL sellonlyflg = FALSE; + char sellmsg[1024]; + + /* 皿伊奶乩□卞覆仄化分仃 杀允月 */ + if( CHAR_getInt( talker , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) + { + return; + } + + /*-- 及蟆卞中月井升丹井"--*/ + if(NPC_Util_isFaceToFace( meindex, talker, 2) == FALSE) + { /* ㄠ弘伉永玉动 及心 */ + if( NPC_Util_CharDistance( talker, meindex ) > 1) return; + } + + if(NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)) == NULL) + { + print("NPC_PKPetShopInit_GetArgStrErr"); + return; + } + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "sellonly_msg", + token, sizeof( token)) + != NULL) + { + sellonlyflg = TRUE; + strcpysafe(sellmsg, sizeof( sellmsg), token); + } + + /*-- 涛 丹它奶件玉它卞中仃月井升丹井--*/ + if( NPC_Util_GetStrFromStrWithDelim( argstr, "buy_msg", + buff, sizeof( buff)) != NULL ) + { + while(getStringFromIndexWithDelim(buff,",",i,buf2,sizeof(buf2)) != FALSE) + { + i++; + if( strstr( szMes, buf2) != NULL) { + if( CHAR_getWorkInt( meindex, NPC_PKPETSHOP_WORK_EV) == 0) { + /*- 中潸曰毁 井升丹井及民尼永弁--*/ + if( CHAR_getWorkInt( meindex, NPC_PKPETSHOP_WORK_NO) == 1) { + if( sellonlyflg ) { + NPC_PKPetShop_selectWindow( meindex, talker, 3, -1); + return; + } + } + else{ + NPC_PKPetShop_selectWindow( meindex, talker, 1, -1); + return; + } + }else{ + if(CHAR_getWorkInt( meindex, NPC_PKPETSHOP_WORK_NO) == 1) { + if( sellonlyflg) { + NPC_PKPetShop_selectWindow( meindex, talker, 3, -1); + return; + } + }else{ + NPC_PKPetShop_selectWindow( meindex, talker, 1, -1); + return; + } + return; + } + } + } + } + i=1; + + /*-- 涛 月它奶件玉它卞中仃月井升丹井--*/ + if( NPC_Util_GetStrFromStrWithDelim( argstr, "sell_msg", + buff, sizeof( buff)) != NULL ) + { + while( getStringFromIndexWithDelim(buff,",", i,buf2,sizeof(buf2)) + != FALSE ) + { + i++; + if(strstr(szMes,buf2) != NULL) { + NPC_PKPetShop_selectWindow( meindex, talker, 2, -1); + return; + } + } + } + i = 1; + + + /*--公及职及甲件玄毛仁木月蜕邯匹 仄井仃月--*/ + if( NPC_Util_GetStrFromStrWithDelim( argstr, "other_msg", + buff, sizeof( buff)) != NULL ) + { + while(getStringFromIndexWithDelim( buff, ",", i, buf2, sizeof( buf2)) + !=FALSE) + { + i++; + if(strstr(szMes,buf2) != NULL) { + /*--甲件玄丢永本□斥--*/ + if(NPC_Util_GetStrFromStrWithDelim( argstr, "hint_msg", + token, sizeof( token)) != NULL) + { + CHAR_talkToCli( talker, meindex, token, CHAR_COLORWHITE); + return; + } + } + } + } + + /*- 中潸曰毁 井升丹井及民尼永弁--*/ + if(CHAR_getWorkInt( meindex, NPC_PKPETSHOP_WORK_NO) == 1) + { + if(CHAR_getWorkInt( meindex, NPC_PKPETSHOP_WORK_EV) == 1) + { + if( sellonlyflg) + { + CHAR_talkToCli( talker, meindex, sellmsg, CHAR_COLORWHITE); + return; + } + } + else + { /*-- 中潸曰毁 及丢永本□斥--*/ + if( sellonlyflg) + { + NPC_PKPetShop_selectWindow( meindex, talker, 3, -1); + return; + } + } + } + else + { + if(CHAR_getWorkInt( meindex, NPC_PKPETSHOP_WORK_EV) == 1) { + if( sellonlyflg) { + CHAR_talkToCli( talker, meindex, sellmsg, CHAR_COLORWHITE); + return; + } + }else{ + + if(CHAR_getWorkInt( meindex, NPC_PKPETSHOP_WORK_EXPRESS) == 1) { + NPC_PKPetShop_ExpressmanCheck( meindex, talker); + }else{ + /*--仇仇引匹 凶日隋骚它奶件玉它(丢瓦亘□) 憎--*/ + /*-- 中潸曰毁 匹卅仁化 骚及饕卅日丢瓦亘□ 憎--*/ + NPC_PKPetShop_selectWindow( meindex, talker, 0, -1); + } + } + } + +} + +static void NPC_PKPetShop_selectWindow( int meindex, int talker, int num,int select) +{ + + print("\n NPC_PKPetShop_selectWindow()"); + print("\n num = %d ", num); + switch( num) { + case 0: + /*--丢瓦亘□ --*/ + /*--由仿丢□正霜曰--*/ + CHAR_send_P_StatusString( talker, CHAR_P_STRING_GOLD); + + if(CHAR_getWorkInt( meindex, NPC_PKPETSHOP_WORK_EXPRESS) == 1 ) + { + if(CHAR_getWorkInt( meindex, NPC_PKPETSHOP_WORK_NO) ==0 ) + { + NPC_PKPetShop_ExpressmanCheck( meindex, talker); + } + } + else if(CHAR_getWorkInt( meindex, NPC_PKPETSHOP_WORK_NO) == 1) + { + } + else + { + NPC_PKPetShop_Menu( meindex, talker); + } + break; + + case 1: + /*-- 丹 --*/ + NPC_PKPetShop_BuyMain( meindex, talker, select); + break; + + case 2: + /*-- 月 --*/ + NPC_PKPetShop_SellMain( meindex, talker, select); + break; + + case 3: + /*-- 中潸曰毁 匹允方 --*/ + NPC_LimitPetShop( meindex, talker, select); + break; + + } +} + + + +/*----------------------------------------- + * 弁仿奶失件玄井日忒匀化五凶凛卞裟太请今木月[ + * +-------------------------------------------*/ +void NPC_PKPetShopWindowTalked( int meindex, int talkerindex, + int seqno, int select, char *data) +{ + /*-- 及引歹曰卞中卅中午五反蔽 --*/ + if( NPC_Util_CharDistance( talkerindex, meindex ) > 3) { + /*--由仿丢□正霜曰--*/ + CHAR_send_P_StatusString( talkerindex, CHAR_P_STRING_GOLD); + return; + } + + makeStringFromEscaped( data); + switch( seqno){ + + case CHAR_WINDOWTYPE_WINDOWITEMSHOP_STARTMSG: + /*--备丢瓦亘□卞 壬允--*/ + /*-- 丹--*/ + if(atoi( data) == 1 ) NPC_PKPetShop_selectWindow(meindex, talkerindex, 1, -1); + + /*-- 月--*/ + if(atoi( data) == 2) NPC_PKPetShop_selectWindow(meindex, talkerindex, 2, -1); + + /*--请月--*/ + if(atoi( data) == 3) return;/*--窒手仄卅中--*/ + + break; + + + case CHAR_WINDOWTYPE_WINDOWITEMSHOP_BUY_MSG: + /*--失奶 丞及馨笛--*/ + if(NPC_PKPetShop_SetNewPet(meindex , talkerindex, data) == TRUE) { + + NPC_PKPetShop_selectWindow( meindex, talkerindex, 1, 0); + + }else{ + NPC_PKPetShop_selectWindow( meindex, talkerindex ,0, -1); + } + + break; + + + case CHAR_WINDOWTYPE_WINDOWITEMSHOP_SELL_MSG: + /*--失奶 丞及绰轮--*/ + if(NPC_PKPetShop_SellNewPet(meindex , talkerindex, data) == TRUE) { + NPC_PKPetShop_selectWindow( meindex, talkerindex, 2, 0); + + }else{ + NPC_PKPetShop_selectWindow( meindex, talkerindex, 0, -1); + } + + break; + + case CHAR_WINDOWTYPE_WINDOWITEMSHOP_LIMIT: + if(select == WINDOW_BUTTONTYPE_YES) { + NPC_PKPetShop_selectWindow( meindex, talkerindex ,2, -1); + + }else if(select == WINDOW_BUTTONTYPE_NO) { + return; + }else if(select == WINDOW_BUTTONTYPE_OK) { + NPC_PKPetShop_selectWindow( meindex, talkerindex, 2, -1); + } + break; + + case CHAR_WINDOWTYPE_WINDOWITEMSHOP_EXPRESS: + if(atoi(data) == 2) { + NPC_PKPetShop_selectWindow( meindex, talkerindex, 1, -1); + }else if(atoi( data) == 4) { + NPC_PKPetShop_selectWindow( meindex, talkerindex, 2, -1); + } + } +} + + +/*----------------------------------------- + * + * 丹质 丢奶件(弁仿奶失件玄霜耨树 综岳 + * + *krynn 2001/12/9 加的注释 + *before == -1 + *before <> -1 + *krynn end + *-----------------------------------------*/ +void NPC_PKPetShop_BuyMain(int meindex,int talker,int before ) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char token[NPC_UTIL_GETARGSTR_BUFSIZE]; + int fd = getfdFromCharaIndex( talker); + + /* + 曰 中白仿弘 蟆及犯□正银丹井白仿弘 饕及 蟆 丢永本□斥| 丹丢永本□斥 + 蜊醒蓟 丢永本□斥 伊矛伙箫曰卅中丢永本□斥 割 丢永本□斥 + 蟆 尹月 尹卅中白仿弘 失奶 丞伊矛伙 袄蟾 飓 寞 域垫奶件白巧 + 蟆 尹月 尹卅中白仿弘 失奶 丞伊矛伙 袄蟾 飓 寞 域垫奶件白巧 + */ + + /*--云饕及白央奶伙 中坭反白央奶伙互钒仃卅井匀凶午五反蔽 --*/ + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { + print("itemshop_GetArgStr_Err"); + return; + } + + /*--蟆荚及犯□正银丹井---*/ + if(before != -1) + { /*--蟆荚及犯□正互酸匀化中月及匹职及树 反霜日卅仁 --*/ + sprintf(token,"0|0"); + + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_ITEMSHOPMAIN, + WINDOW_BUTTONTYPE_NONE, + CHAR_WINDOWTYPE_WINDOWITEMSHOP_BUY_MSG, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + }else{ + + char token2[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buff2[256]; + char buff[256]; + + /*--备丢永本□斥毛潸 仄化弁仿奶失件玄卞霜月犯□正毛综月-*/ + /*--仇及支曰 反五凶卅中井手--*/ + NPC_Util_GetStrFromStrWithDelim( argstr, "main_msg", buff, sizeof( buff)); + NPC_Util_GetStrFromStrWithDelim( argstr, "buy_main", buff2, sizeof( buff2)); + sprintf(token,"0|1|%d|%s|%s|%s|", CHAR_WINDOWTYPE_WINDOWITEMSHOP_STARTMSG, + CHAR_getChar( meindex, CHAR_NAME), buff, buff2); + + NPC_Util_GetStrFromStrWithDelim( argstr, "what_msg", buff, sizeof( buff)); + NPC_Util_GetStrFromStrWithDelim( argstr, "level_msg", buff2, sizeof( buff)); + snprintf( token2, sizeof( token2), "%s|%s", buff, buff2); + + /*-- 侬 宁 --*/ + strncat( token, token2, sizeof( token)); + + NPC_Util_GetStrFromStrWithDelim( argstr, "realy_msg", buff, sizeof( buff)); + NPC_Util_GetStrFromStrWithDelim( argstr, "itemfull_msg", buff2, sizeof( buff2)); + sprintf( token2, "|%s|%s", buff, buff2); + + /*-- 侬 瑛--*/ + strncat(token , token2,sizeof(token)); + strcpy(token2, "|"); + + /*--失奶 丞树 及 --*/ + NPC_PKPetShop_GetPetList( argstr, token2 ); + // krynn 2001/12/12 bebug 用 + print("%s",token2); + // end krynn + + /*--丢永本□斥午失奶 丞树 及宁 --*/ + strncat( token, token2, sizeof( token)); + } + + /*-- 侬 毛巨旦弗□皿今六月--*/ +// makeEscapeString( token, escapedname, sizeof(escapedname)); + + /*--仇仇匹霜耨--*/ + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_ITEMSHOPMAIN, + WINDOW_BUTTONTYPE_NONE, + CHAR_WINDOWTYPE_WINDOWITEMSHOP_BUY_MSG, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + +} + +/*------------------------------------------------------ + *失奶 丞楮溢及 侬 毛综月( 丹 + *------------------------------------------------------*/ +void NPC_PKPetShop_GetPetList(char *argstr,char *argtoken) +{ + + int i = 1; + int tmp; + int EnemyCnt; + char *name ; + char buff2[256]; + char buff[NPC_UTIL_GETARGSTR_LINEMAX]; + char token2[NPC_UTIL_GETARGSTR_BUFSIZE]; + double rate = 1.0; + int loopcnt = 0; + + /*-伊□玄毛 月[ 仃木壬ㄠ匹裔烂--*/ + if(NPC_Util_GetStrFromStrWithDelim( argstr, "buy_rate", buff2, sizeof( buff2)) + != NULL){ + rate = atof( buff2); + } + + /*- 健丹齿 毛潸 --*/ + if( NPC_Util_GetStrFromStrWithDelim( argstr, "PetList", buff, sizeof( buff)) + != NULL ) + { + while( getStringFromIndexWithDelim(buff,",",i,buff2,sizeof(buff2)) + !=FALSE ) + { + i++; + /*--涩烂白央奶伙及失奶 丞互 "-"匹嗉濠日木化中月井及民尼永弁--*/ + if(strstr( buff2, "-") == NULL) { + /*--引内 蟆 --*/ + // krynn 2001/12/10 + EnemyCnt = ENEMY_getEnemyNum(); + for( tmp=0 ; tmp < EnemyCnt ; tmp++ ) + { + if( ENEMY_getInt( tmp , ENEMY_ID ) == atoi( buff2 ) ) + { + print("\nNPC_PKPetShop_GetPetList: tmp = %d", tmp); + break; + } + } + if( tmp == EnemyCnt ) + { + return; + } + name = ENEMY_getChar( tmp , ENEMY_NAME ); + // krynn end + /*-- 蟆互 卅日}失奶 丞互绣箕仄卅中及匹公及 寞反 骰--*/ + if(name == NULL) continue; + + loopcnt++; + if(loopcnt == MAXSHOPPET) break; + + /*-- 端及皿夫玄戊伙勾仁曰--*/ + NPC_PetStrStr( atoi( buff2), rate, name, token2, tmp); + + /*--丢永本□斥 侬 午 瑛--*/ + strncat( argtoken, token2, sizeof(token2)); + } + else + { + return; + /*krynn 2001/12/13 这段应该用不到了,先 mark,改为直接 return + --失奶 丞互 15-25 及溥匹嗉濠日木化中月桦宁-- + int start; + int end; + + //-"-"匹嗉濠日木凶铵户及醒袄午 及醒袄毛潸 -- + getStringFromIndexWithDelim( buff2, "-", 1, token2, sizeof(token2)); + start = atoi( token2); + getStringFromIndexWithDelim( buff2, "-", 2 ,token2, sizeof(token2)); + end = atoi( token2); + + //-- 寞互菅卞卅匀化中凶日} 木赘尹月 + if(start > end) + { + tmp = start; + start = end; + end = tmp; + } + + end++; + + //--"-"匹嗉濠日木凶坌及失奶 丞树 毛 月-- + for(; start < end ; start++ ) + { + //--引内 蟆 -- + + name = ITEM_getNameFromNumber( start ); + //-- 蟆互 卅日}失奶 丞互绣箕仄卅中及匹公及 寞反 骰-- + if(name == NULL) continue; + + loopcnt++; + if(loopcnt == MAXSHOPPET) break; + + //-- 端及皿夫玄戊伙勾仁曰-- + NPC_PetStrStr( start, rate, name, token2, tmp); + + //--丢永本□斥 侬 午 瑛-- + strncat( argtoken, token2, sizeof(token2)); + }*/ + } + } + } +} + + +/*----------------------------------------------------------------- + 皿夫玄戊伙综岳 +-------------------------------------------------------------------*/ +void NPC_PetStrStr(int petID,double rate,char *name,char *token2,int index) +{ + int i; + int gold; + int level; + int graNo; + int TempNo; + int EnemyTempNum; + char info[1024]; + //char tryItem[256]; // krynn 2001/12/12 只是要看 getItemInfoFromNumber 读出来的字串长什麽样的 + char escape[256] = {"PK Server 宠"}; + + //krynn 2001/12/10 try + //gold = ITEM_getcostFromITEMtabl( itemID); + //level = ITEM_getlevelFromITEMtabl( itemID); + //graNo = ITEM_getgraNoFromITEMtabl( itemID); + TempNo = ENEMY_getInt( index , ENEMY_TEMPNO ); + EnemyTempNum = ENEMYTEMP_getEnemyNum(); + for( i=0 ; i < EnemyTempNum ; i++ ) + { + if( ENEMYTEMP_getInt( i , E_T_TEMPNO ) == TempNo ) + { + break; + } + } + if( i == EnemyTempNum ) + { + return; + } + gold = RAND(0,20); + level = 0; + graNo = ENEMYTEMP_getInt( i , E_T_IMGNUMBER ); + //print("\nPKPetShop::NPC_PetStrStr(): TempNo = %d ; graNo = %d",TempNo,graNo); + /*--伊□玄毛井仃月--*/ + gold=(int)(gold * rate); + + //strcpy( tryItem,ITEM_getItemInfoFromNumber( 10 ) ); + //print("PKPetShop::NPC_PetStrStr(): try = %s\n",tryItem); + //krynn end + + makeEscapeString( escape, info, sizeof( info)); + + makeEscapeString( name, escape, sizeof( escape)); + + sprintf( token2, "%s|0|%d|%d|%d|%s|", escape, level, gold, graNo, info); +} + + +/*------------------------------------------- + *( 丹) + *弁仿奶失件玄井日忒匀凶 凶瑛绊毛 掏今六月 + * + *------------------------------------------*/ +BOOL NPC_PKPetShop_SetNewPet(int meindex,int talker,char *data) +{ + + char buf[1024]; + char buff2[128]; + int i = 1, j = 1; + int select; + int kosuu = 0; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + double rate = 1.0; + int gold = 0; + int EmptyPetCnt=0; + + /*--忒匀化五凶犯□正毛本伊弁玄午蜊醒卞坌荸--*/ + print("\nNPC_PKPetShop_SetNewPet: data = %s",data); + getStringFromIndexWithDelim( data, "|", 1, buf, sizeof( buf)); + select=atoi(buf); // krynn 2001/12/10 select 是玩家传回要买的第几样 + print("\nNPC_PKPetShop_SetNewPet: select = %d",select); + if(select == 0) return FALSE; + getStringFromIndexWithDelim( data, "|", 2, buf, sizeof( buf)); + kosuu=atoi(buf); + print("\nNPC_PKPetShop_SetNewPet: kosuu(玩家要买的数量) = %d",kosuu); + + if( kosuu <= 0 ) return FALSE; + + /* 仍潜谛 及矢永玄及坞五毛茧允 */ + if( !CHAR_CHECKINDEX(talker) ) + { + return FALSE; + } + for( i=0 ; i < CHAR_MAXPETHAVE ; i++ ) + { + if( CHAR_getCharPet( talker,i) == -1 ) + { + EmptyPetCnt++; + } + } + // 有 EmptyPetCnt 个宠物空位 + /* 坞五互 中 */ + print("\nNPC_PKPetShop_SetNewPet:EmptyPetCnt(玩家有的空位) = %d",EmptyPetCnt); + if( EmptyPetCnt <= 0 ) return FALSE; + if( EmptyPetCnt > CHAR_MAXPETHAVE ) + { + EmptyPetCnt = CHAR_MAXPETHAVE; + } + if( kosuu > EmptyPetCnt ) + { + kosuu = EmptyPetCnt; + } + + // krynn 2001/12/10 + // 应该用不到,所以 mark 起来 + /*--蜊醒及民尼永弁 癫卞蝈 月井" + for( i = CHAR_STARTITEMARRAY ; i < CHAR_MAXITEMHAVE ; i++ ) { + itemindex = CHAR_getItemIndex( talker , i ); + + if( !ITEM_CHECKINDEX( itemindex) ) { + kosuucnt++; + } + } + + --忒匀化 凶蜊醒及 互 端及蜊醒 扔□田础 方曰聂中午云井仄中及匹 + --扔□田□础及 毛 木月 + if( kosuucnt < kosuu){ + kosuu = kosuucnt; + } + --未夫及桦宁反巨仿□ + if(kosuucnt == 0 ){ + return FALSE; + } + krynn end */ + + i = 1; + + /*--云饕及白央奶伙 中坭反白央奶伙互钒仃卅井匀凶午五反蔽 --*/ + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { + print("shop_GetArgStr_Err"); + return FALSE; + } + + /*---伊□玄毛潸 卅仃木壬1.0)-*/ + if(NPC_Util_GetStrFromStrWithDelim( argstr, "buy_rate", buf, sizeof( buf)) + != NULL) { + rate= atof( buf); + } + + /*--失奶 丞及馨笛毛垫丹午仇欠-*/ + if( NPC_Util_GetStrFromStrWithDelim( argstr, "PetList", + buf, sizeof( buf)) != NULL ) + { + while(getStringFromIndexWithDelim(buf , "," , j, buff2, sizeof(buff2)) + != FALSE ) + { + j++; + /*-- "-"互殖引木化中月井升丹井--*/ + if(strstr( buff2, "-") == NULL) + { // krynn 2001/12/10 try + //if( ITEM_getcostFromITEMtabl(atoi(buff2)) !=-1) { + // + if ( i == select) + { + /*---失奶 丞及综岳---*/ + /*--蜊醒坌综岳--*/ + if(NPC_AddPetBuy(meindex, talker,atoi(buff2),kosuu,rate) != TRUE) + { + return FALSE; + } + return TRUE; + } + i++; + // krynn end} + }else{ + /*--失奶 丞互 15-25 及溥匹霜日木凶桦宁--*/ + int start; + int end; + + /* "-"匹嗉濠日木凶铵户及醒袄午 及醒袄毛潸 --*/ + getStringFromIndexWithDelim( buff2, "-", 1, argstr, sizeof(argstr)); + start = atoi( argstr); + getStringFromIndexWithDelim( buff2, "-", 2 ,argstr, sizeof(argstr)); + end = atoi( argstr); + end++; + + /*-- 寞互菅卞卅匀化中凶日} 木赘尹月**/ + if(start > end){ + gold = start; + start = end; + end = gold; + } + + /*--"-"匹嗉濠日木凶坌及失奶 丞毛树 毛 月--*/ + for(; start < end ; start++ ) { + if( ITEM_getcostFromITEMtabl( start) != -1) { + if ( i == select) { + /*---失奶 丞及综岳---*/ + /*--蜊醒坌综岳--*/ + if(NPC_AddPetBuy(meindex, talker, start, kosuu, rate) != TRUE) + { + return FALSE; + } + return TRUE; + } + i++; + } + } + } + } + } + + return FALSE; + +} + + +/*--------------------------------------------- + *失奶 丞及馨笛毛垫丹 + *--------------------------------------------*/ +BOOL NPC_AddPetBuy(int meindex, int talker,int petID,int kosuu,double rate) +{ + int i,j,k,index,EnemyCnt,UpLevel; + int gold; + int ret; + int maxgold; + int Grade=0; + char buf[1024]; + char msgbuf[64]; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + + // krynn 2001/12/15 get get's grade of this PKPetShop + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { + print("shop_GetArgStr_Err"); + return FALSE; + } + if(NPC_Util_GetStrFromStrWithDelim( argstr, "Grade", buf, sizeof( buf)) + != NULL) + { + Grade = atoi( buf ); + } + // end krynn + + /*--伊□玄毛井仃月--*/ + // krynn 2001/12/11 mark and change + //gold = ITEM_getcostFromITEMtabl( itemID); + gold = 4; + // krynn end + gold = (int)(gold * rate); + maxgold = gold * kosuu; + + if(CHAR_getInt( talker, CHAR_GOLD) < maxgold ) return FALSE; + + /*--云嗯毛蛹日允--*/ + CHAR_setInt( talker, CHAR_GOLD,CHAR_getInt( talker, CHAR_GOLD) - maxgold); + + EnemyCnt = ENEMY_getEnemyNum(); + for( index=0 ; index < EnemyCnt ; index++ ) + { + if( ENEMY_getInt( index , ENEMY_ID ) == petID ) + { + print("\nNPC_AddPetBuy: index = %d", index); + break; + } + } + if( index == EnemyCnt ) + { + return FALSE; + } + + /*--蜊醒坌综岳--*/ + for(i = 0 ; i < kosuu ; i++) + { + if( (ret = ENEMY_createPetFromEnemyIndex( talker , index )) == -1 ) + { + return FALSE; + }; + /******************/ + /* 矢永玄树 霜月 */ + /******************/ + // 升仇卞反中匀凶井卅 + for( j = 0 ; j < CHAR_MAXPETHAVE ; j++ ) + { + if( CHAR_getCharPet( talker , j ) == ret ) + { + break; + } + } + if( j == CHAR_MAXPETHAVE ){ + return FALSE; + } + if( CHAR_CHECKINDEX( ret ) == TRUE ){ + CHAR_setMaxExpFromLevel( ret, Grade); + UpLevel = CHAR_LevelUpCheck( ret , talker); + for( k = 0; k < UpLevel; k ++ ){ + CHAR_PetLevelUp( ret ); + CHAR_PetAddVariableAi( ret, AI_FIX_PETLEVELUP ); + } + CHAR_complianceParameter( ret ); + CHAR_setInt( ret , CHAR_HP , CHAR_getWorkInt( ret , CHAR_WORKMAXHP ) ); + + snprintf( msgbuf, sizeof( msgbuf ), "K%d", j ); + CHAR_sendStatusString( talker, msgbuf ); + + snprintf( msgbuf, sizeof( msgbuf ), "W%d", j ); + CHAR_sendStatusString( talker, msgbuf ); + } + } + CHAR_send_P_StatusString( talker, CHAR_P_STRING_GOLD); + return TRUE; +} + + + +/*---------------------------------------- + *丢瓦亘□ + *----------------------------------------*/ +void NPC_PKPetShop_Menu(int meindex,int talker) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char token[NPC_UTIL_GETARGSTR_LINEMAX]; + char buff[256]; + int fd = getfdFromCharaIndex( talker); + + /* 饕及 蟆 丢永本□斥| */ + /*--云饕及白央奶伙 中坭反白央奶伙互钒仃卅井匀凶午五反蔽 --*/ + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { + print("shop_GetArgStr_Err"); + return; + } + + NPC_Util_GetStrFromStrWithDelim( argstr, "main_msg", buff, sizeof( buff)); + snprintf(token, sizeof(token),"%s|%s",CHAR_getChar( meindex, CHAR_NAME), buff); + + // print("%s",escapedname); + /*--仇仇匹霜耨--*/ + //krynn 2001/12/10 这里的参数似乎可以延用 ItemShop 的 code,先用用看 + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_ITEMSHOPMENU, + WINDOW_BUTTONTYPE_NONE, + CHAR_WINDOWTYPE_WINDOWITEMSHOP_STARTMSG, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + //krynn end +} + + +/*------------------------------------------- + * 月质 (皿夫玄戊伙毛综岳 + * + *-------------------------------------------*/ +void NPC_PKPetShop_SellMain(int meindex,int talker,int before) +{ + + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char token[NPC_UTIL_GETARGSTR_BUFSIZE]; + int fd = getfdFromCharaIndex( talker); + + + /* + 曰 中白仿弘 蟆及犯□正银丹井白仿弘 饕及 蟆 丢永本□斥| 月丢永本□斥 + 云嗯互中匀天中卞卅月方丢永本□斥 割 丢永本□斥 + 蟆 木月 木卅中白仿弘 袄蟾 飓 寞 域垫奶件白巧 失奶 丞 寞 ㄠ井日 + 蟆 木月 木卅中白仿弘 袄蟾 飓 寞 域垫奶件白巧 失奶 丞 寞 ㄠ井日 + */ + + /*--云饕及白央奶伙 中坭反白央奶伙互钒仃卅井匀凶午五反蔽 --*/ + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { + print("shop_GetArgStr_Err"); + return; + } + + /*--蟆荚及犯□正银丹井---*/ + if(before != -1) { + + /*--蟆荚及犯□正互酸匀化中月及匹职及树 反霜日卅仁 --*/ + sprintf(token,"1|0"); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_ITEMSHOPMAIN + +CHAR_getWorkInt(meindex,NPC_PKPETSHOP_WORK_NO), + WINDOW_BUTTONTYPE_NONE, + CHAR_WINDOWTYPE_WINDOWITEMSHOP_SELL_MSG, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + + }else{ + + char token2[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buff2[256]; + char buff[256]; + + /*--备丢永本□斥毛潸 仄化弁仿奶失件玄卞霜月犯□正毛综月-*/ + /*--仇及支曰 反五凶卅中井手--*/ + NPC_Util_GetStrFromStrWithDelim( argstr, "main_msg", buff, sizeof( buff)); + NPC_Util_GetStrFromStrWithDelim( argstr, "sell_main", buff2, sizeof( buff)); + sprintf( token, "1|1|%d|%s|%s|%s|", CHAR_WINDOWTYPE_WINDOWITEMSHOP_STARTMSG, + CHAR_getChar( meindex, CHAR_NAME), buff, buff2); + + NPC_Util_GetStrFromStrWithDelim( argstr, "stone_msg", buff, sizeof( buff)); + + if(CHAR_getWorkInt(meindex,NPC_PKPETSHOP_WORK_EXPRESS) == 1 ) { + NPC_Util_GetStrFromStrWithDelim( argstr, "exrealy_msg", buff2, sizeof(buff2)); + }else{ + NPC_Util_GetStrFromStrWithDelim( argstr, "realy_msg", buff2, sizeof( buff2)); + } + sprintf( token2,"%s|%s|", buff, buff2); + + /*--失奶 丞树 及 --*/ + NPC_PKPetShop_GetLimtPetList( talker,argstr, token2, -1); + + /*--丢永本□斥午失奶 丞树 及宁 --*/ + strncat( token, token2, sizeof( token)); + + /*--仇仇匹霜耨--*/ + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_ITEMSHOPMAIN+ + CHAR_getWorkInt(meindex,NPC_PKPETSHOP_WORK_NO), + WINDOW_BUTTONTYPE_NONE, + CHAR_WINDOWTYPE_WINDOWITEMSHOP_SELL_MSG, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + } +} + + + + + +/*-------------------------------- + +愤坌互云饕卞 月失奶 丞及 侬 毛及赏 + + *-------------------------------*/ +int NPC_PKPetShop_GetLimtPetList(int talker, char *argstr, char* token2,int sell) +{ + + char token[NPC_UTIL_GETARGSTR_LINEMAX]; + char buff[NPC_UTIL_GETARGSTR_LINEMAX]; + char token3[NPC_UTIL_GETARGSTR_LINEMAX]; + int k = 0 , i = 1 , j = 0; + int imax; + int itemtype = 0; + int itemindex; + int okflg = 0; + char buf[256]; + int flg=0; + int cost; + + + if(sell == -1 ){ + i = CHAR_STARTITEMARRAY; + imax = CHAR_MAXITEMHAVE; + flg = -1; + }else{ + i= sell; + imax= sell + 1; + flg = 1; + } + + /*--- 木月失奶 丞毛潸 允月[--*/ + /** 旦矢扑乓伙失奶 丞毛手匀化中凶日 伊□玄匹煌遥--*/ + /*-- 旦矢扑乓伙质 匹皿夫弘仿丞互 --*/ + + for( ; i < imax ; i++ ){ + okflg=0; + itemindex = CHAR_getItemIndex( talker , i ); + + if( ITEM_CHECKINDEX( itemindex) ){ + + /*--失奶 丞及正奶皿互域谯仄凶日} 木月--*/ + if( NPC_Util_GetStrFromStrWithDelim( argstr,"LimitItemType", + buff, sizeof( buff)) + != NULL ) + { + k = 1; + while(getStringFromIndexWithDelim(buff , "," , k, token, sizeof(token)) + != FALSE ) + { +#ifdef _ITEM_TYPETABLE + int cmpmaxitem = sizeof(TypeTable)/sizeof(TypeTable[0]); +#endif + k++; +#ifdef _ITEM_TYPETABLE + for(j = 0 ; j < cmpmaxitem ; j++){ +#else + for(j = 0 ; j < ITEM_CATEGORYNUM+3 ; j++){ +#endif + if(strcmp( TypeTable[ j].arg , token) == 0 ) { + itemtype = TypeTable[ j].type; + if(ITEM_getInt(itemindex,ITEM_TYPE) == itemtype) { + + /*-- 侬 综岳--*/ + cost = NPC_GetSellPetList(itemindex,0,argstr,token3,i,sell); + if(cost != -1) return cost; + strncat( token2, token3, sizeof( token3)); + okflg = 1; + }else if(itemtype == 30){ + if( 8 <= ITEM_getInt(itemindex,ITEM_TYPE) + && (ITEM_getInt(itemindex,ITEM_TYPE) <= 15) ){ + /*-- 侬 综岳--*/ + cost = NPC_GetSellPetList(itemindex,0,argstr,token3,i,sell); + if(cost != -1) return cost; + strncat(token2,token3,sizeof(token3)); + okflg = 1; + } + }else if(itemtype == 40){ + if(( 0 <= ITEM_getInt(itemindex,ITEM_TYPE) + && (ITEM_getInt(itemindex,ITEM_TYPE) <= 4)) + || (17 <= ITEM_getInt(itemindex,ITEM_TYPE) + && (ITEM_getInt(itemindex,ITEM_TYPE) <= 19)) + ) { + /*-- 侬 综岳--*/ + cost = NPC_GetSellPetList(itemindex,0,argstr,token3,i,sell); + if(cost != -1) return cost; + strncat(token2,token3,sizeof(token3)); + okflg = 1; + } + }else if(itemtype == 50){ + if( 5 <= ITEM_getInt(itemindex,ITEM_TYPE) + && (ITEM_getInt(itemindex,ITEM_TYPE) <= 7) ){ + /*-- 侬 综岳--*/ + cost = NPC_GetSellPetList(itemindex,0,argstr,token3,i,sell); + if(cost != -1) return cost; + strncat(token2,token3,sizeof(token3)); + okflg = 1; + } + } + break; + } + } + + if(okflg == 1) break; + } + } + /*--正奶皿卞卅仁化 涛 寞仄化 木月失奶 丞井民尼永弁--*/ + if( (NPC_Util_GetStrFromStrWithDelim( argstr, "LimitItemNo", + buff,sizeof( buff)) + != NULL) + && okflg == 0 ) + { + k = 1; + while(getStringFromIndexWithDelim(buff , "," , k, token, sizeof(token)) + != FALSE ) + { + k++; + /*--窒手涩烂今木化卅井匀凶日} 骰允月-*/ + if(strstr( token, "-")==NULL && strcmp(token,"") != 0) { + if(ITEM_getInt(itemindex,ITEM_ID) == atoi(token)) { + /*-- 侬 综岳--*/ + cost = NPC_GetSellPetList(itemindex,0,argstr,token3,i,sell); + if(cost != -1) return cost; + strncat(token2,token3,sizeof(token3)); + okflg=1; + } + }else if (strstr( token, "-") != NULL){ + int start; + int end; + int work; + + /*-- 侬 综岳--*/ + /* "-"匹嗉濠日木凶铵户及醒袄午 及醒袄毛潸 --*/ + getStringFromIndexWithDelim( token, "-", 1, buf, sizeof(buf)); + start = atoi( buf); + getStringFromIndexWithDelim( token, "-", 2 ,buf, sizeof(buf)); + end = atoi( buf); + + /*-- 寞互菅卞卅匀化中凶日} 木赘尹月**/ + if(start > end){ + work = start; + start = end; + end = work; + } + + end++; + /*--"-"匹嗉濠日木凶坌及失奶 丞毛树 毛 月--*/ + if( (start <= ITEM_getInt(itemindex,ITEM_ID)) + && (ITEM_getInt(itemindex,ITEM_ID) < end) ) + { + /*-- 侬 综岳--*/ + cost = NPC_GetSellPetList(itemindex,0,argstr,token3,i,sell); + if(cost != -1) return cost; + strncat(token2,token3,sizeof(token3)); + okflg = 1; + } + } + } + } + + /*-- 月仇午互匹五卅中--*/ + if(okflg == 0) { + cost = NPC_GetSellPetList(itemindex, 1, argstr, token3, i, sell); + if(sell != -1) return -1; + strncat( token2, token3, sizeof( token3)); + } + + } + } + return -1; +} + + + +/*---------------------------------------------------------- + + 弁仿奶失件玄卞霜耨允月皿夫玄戊伙及综岳 + + *----------------------------------------------------------*/ +int NPC_GetSellPetList(int itemindex,int flg, char *argstr,char *argtoken,int select,int sell) +{ + + char buff[256]; + double rate = 0.2; + char buff2[256]; + char buff3[64]; + int k = 1; + int cost = -1; + + /*--旦矢扑乓伙伊□玄--**/ + if(NPC_Util_GetStrFromStrWithDelim( argstr,"special_item",buff, sizeof( buff)) + != NULL) + { + if(NPC_Util_GetStrFromStrWithDelim( argstr,"special_rate",buff2, sizeof( buff2)) + != NULL ) + { + rate = atof(buff2); + }else{ + rate = 1.2; + } + + while(getStringFromIndexWithDelim(buff , "," , k, buff2, sizeof(buff2)) !=FALSE ) + { + k++; + + if(strstr( buff2, "-") == NULL && strcmp(buff2,"") != 0) { + if(ITEM_getInt(itemindex,ITEM_ID) == atoi(buff2)){ + cost = NPC_SellPetstrsStr( itemindex,0, rate, argtoken,select,sell); + return cost; + } + }else if (strstr( buff2, "-") != NULL){ + int start; + int end; + int work; + + /*-- 侬 综岳--*/ + /* "-"匹嗉濠日木凶铵户及醒袄午 及醒袄毛潸 --*/ + getStringFromIndexWithDelim( buff2, "-", 1, buff3, sizeof(buff3)); + start = atoi( buff3); + getStringFromIndexWithDelim( buff2, "-", 2 ,buff3, sizeof(buff3)); + end = atoi( buff3); + + /*-- 寞互菅卞卅匀化中凶日} 木赘尹月**/ + if(start > end){ + work = start; + start = end; + end = work; + } + end++; + + /*--"-"匹嗉濠日木凶坌及失奶 丞毛树 毛 月--*/ + if( (start <= ITEM_getInt(itemindex,ITEM_ID)) + && (ITEM_getInt(itemindex,ITEM_ID) < end) + ){ + + cost = NPC_SellPetstrsStr( itemindex,0, rate, argtoken,select,sell); + return cost; + } + } + } + } + + /*--用□穴伙伊□玄--*/ + if( NPC_Util_GetStrFromStrWithDelim( argstr,"sell_rate",buff, sizeof( buff)) + != NULL ) + { + rate = atof(buff); + cost = NPC_SellPetstrsStr( itemindex, flg ,rate, argtoken,select,sell); + return cost; + } + + return cost; +} + + +/*------------------------------------------ + + 侬 毛综月(丹曰迕) + +*------------------------------------------*/ +int NPC_SellPetstrsStr(int itemindex,int flg,double rate,char *argtoken,int select,int sell) +{ + int cost; + char escapedname[256]; + char name[256]; + char *eff; + + + cost = ITEM_getInt( itemindex, ITEM_COST); + cost = (int)(cost * rate); + + if(sell != -1) return cost; + + + //strcpy( escapedname, ITEM_getChar( itemindex, ITEM_NAME)); + strcpy( escapedname, ITEM_getChar( itemindex, ITEM_SECRETNAME)); + makeEscapeString( escapedname, name, sizeof( name)); + eff=ITEM_getChar(itemindex, ITEM_EFFECTSTRING); + makeEscapeString( eff, escapedname, sizeof(escapedname)); + + + + sprintf(argtoken,"%s|%d|%d|%d|%s|%d|", + name, + flg, + cost, + ITEM_getInt( itemindex, ITEM_BASEIMAGENUMBER), + escapedname, + select + ); + + return -1; + +} + +/*-------------------------------------------- + * + *弁仿奶失件玄井日瑛绊互忒匀化五凶午五 月 + * + *-------------------------------------------*/ +BOOL NPC_PKPetShop_SellNewPet(int meindex,int talker,char *data) +{ + int select; + int cost; + int oldcost; + char token[32]; + int k; + int itemindex; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char token2[256]; + + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { + print("GetArgStrErr"); + return FALSE; + } + + + /*--忒匀化 凶犯□正及坌荸--*/ + getStringFromIndexWithDelim(data , "|" ,1, token, sizeof( token)); + select = atoi(token); + getStringFromIndexWithDelim(data , "|" ,2, token, sizeof( token)); + oldcost = atoi(token); + + if(select == 0) return FALSE; + + cost = NPC_PKPetShop_GetLimtPetList( talker,argstr, token2,select); + + + /*--啜丹手及毛丹欠丹午仄凶午五及巨仿□--*/ + if(oldcost != cost || cost == -1) + { + int fd = getfdFromCharaIndex( talker); + char token[256]; + + sprintf(token,"\n\n哎呀!对不起" + "\n\n对不起啊 ! 可不可以再选一次呢?" + ); + + k = select; + itemindex = CHAR_getItemIndex( talker ,k); + + + /*--夫弘及请 --*/ + if(itemindex != -1) { + print("\n%s(%d,%d,%d):和选择的东西不同error([%s(%d)]要消失了)", + CHAR_getChar(talker, CHAR_NAME), + CHAR_getInt( talker, CHAR_FLOOR), + CHAR_getInt( talker, CHAR_X ), + CHAR_getInt( talker, CHAR_Y ), + ITEM_getChar(itemindex, CHAR_NAME), + ITEM_getInt( itemindex, ITEM_ID ) + ); + LogItem( + CHAR_getChar( talker, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( talker, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), /* 失奶 丞 寞 */ +#endif + "SellErr", + CHAR_getInt( talker, CHAR_FLOOR), + CHAR_getInt( talker, CHAR_X ), + CHAR_getInt( talker, CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + }else{ + print("\n%s(%d,%d,%d):和选择的东西不同error(没有任何item存在)", + CHAR_getChar(talker, CHAR_NAME), + CHAR_getInt( talker, CHAR_FLOOR), + CHAR_getInt( talker, CHAR_X ), + CHAR_getInt( talker, CHAR_Y ) + ); + LogItem( + CHAR_getChar( talker, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( talker, CHAR_CDKEY ), + -1, /* 失奶 丞 寞 */ + "SellErr", + CHAR_getInt( talker, CHAR_FLOOR), + CHAR_getInt( talker, CHAR_X ), + CHAR_getInt( talker, CHAR_Y ), + "-1", "NULL", -1 ); + } + /*--仇仇匹霜耨--*/ + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + CHAR_WINDOWTYPE_WINDOWITEMSHOP_LIMIT, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + + + return FALSE; + } + + k = select; + itemindex=CHAR_getItemIndex( talker ,k); + + if(itemindex != -1) { + { + LogItem( + CHAR_getChar( talker, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( talker, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), /* 失奶 丞 寞 */ +#endif + "Sell", + CHAR_getInt( talker,CHAR_FLOOR), + CHAR_getInt( talker,CHAR_X ), + CHAR_getInt( talker,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + + ); + } + + } + + CHAR_DelItem( talker, k); + CHAR_AddGold( talker, cost); + CHAR_send_P_StatusString( talker, CHAR_P_STRING_GOLD); + + return TRUE; +} + + + +void NPC_LimitPetShop(int meindex,int talker,int select) +{ + + int fd = getfdFromCharaIndex( talker); + char token[NPC_UTIL_GETARGSTR_LINEMAX]; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[1024]; + + /*--云饕及白央奶伙 中坭反白央奶伙互钒仃卅井匀凶午五反蔽 --*/ + if( NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { + print("shop_GetArgStr_Err"); + return; + } + + /*-- 中潸曰毁 饕匹允丢永本□斥-*/ + if(NPC_Util_GetStrFromStrWithDelim( argstr, "sellonly_msg", buf, sizeof( buf)) + !=NULL) + { + sprintf(token,"\n\n%s", buf); + + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_YESNO, + CHAR_WINDOWTYPE_WINDOWITEMSHOP_LIMIT, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + + }else{ + CHAR_talkToCli( talker, meindex, "这是买卖专门店。",CHAR_COLORWHITE); + } + return; +} + + +/*--扪霜盒今氏--*/ +void NPC_PKPetShop_ExpressmanCheck(int meindex,int talker) +{ + int fd = getfdFromCharaIndex( talker); + char token[1024]; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[1024]; + + /*--云饕及白央奶伙 中坭反白央奶伙互钒仃卅井匀凶午五反蔽 --*/ + if( NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { + print("shop_GetArgStr_Err"); + return; + } + + + /*-- 中潸曰毁 饕匹允丢永本□斥-*/ + NPC_Util_GetStrFromStrWithDelim( argstr, "main_msg", buf, sizeof( buf)); + sprintf(token,"4\n       %s\n\n%s" + "\n\n     < 打工 >   " + "\n\n     <交付行李>" + ,CHAR_getChar(meindex,CHAR_NAME),buf); + + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_SELECT, + WINDOW_BUTTONTYPE_CANCEL, + CHAR_WINDOWTYPE_WINDOWITEMSHOP_EXPRESS, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + + return; + + +} + + +#endif + // _PKPETSHOP + + + + diff --git a/gmsv/npc/npc_pkpetshop.c.bak b/gmsv/npc/npc_pkpetshop.c.bak new file mode 100644 index 0000000..85eb862 --- /dev/null +++ b/gmsv/npc/npc_pkpetshop.c.bak @@ -0,0 +1,1539 @@ +//krynn 2001/12/6 +//PKPetShop + +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "lssproto_serv.h" +#include "pet_skill.h" +#include "readmap.h" +#include "log.h" +#include "enemy.h" +#include "npc_pkpetshop.h" +#include "battle.h" + +#ifdef _PKPETSHOP +#define MAXSHOPPET 33 + +static void NPC_PKPetShop_selectWindow( int meindex, int talker, int num,int select); +void NPC_PKPetShop_BuyMain(int meindex,int talker,int before ); +void NPC_PKPetShop_GetPetList(char *argstr,char * argtoken2); +BOOL NPC_PKPetShop_SetNewPet(int meindex,int talker,char *data); +BOOL NPC_PKPetShop_SellNewPet(int meindex,int talker,char *data); + +void NPC_PKPetShop_Menu(int meindex,int talker); +int NPC_PKPetShop_GetLimtPetList(int talker,char *argstr,char *token2,int sell); +void NPC_PKPetShop_SellMain(int meindex,int talker,int select); +int NPC_GetSellPetList(int itemindex,int flg,char *argstr,char *argtoken,int select,int sell); +BOOL NPC_AddPetBuy(int meindex, int talker,int petID,int kosuu,double rate); +void NPC_PetStrStr(int petID,double rate,char *name,char *token2, int index); +int NPC_SellPetstrsStr(int itemindex,int flg,double rate,char *argtoken,int select,int sell); +void NPC_LimitPetShop(int meindex,int talker,int select); +void NPC_PKPetShop_ExpressmanCheck(int meindex,int talker); + + +/*--伐□弁 烂聒--*/ +enum{ + NPC_PKPETSHOP_WORK_NO = CHAR_NPCWORKINT1, + NPC_PKPETSHOP_WORK_EV = CHAR_NPCWORKINT2, + NPC_PKPETSHOP_WORK_EXPRESS = CHAR_NPCWORKINT3, +}; + + +typedef struct { + char arg[32]; + int type; +}PKPETSHOP_NPC_Shop; + + +static PKPETSHOP_NPC_Shop TypeTable[] = { + { "FIST", 0 }, + { "AXE", 1 }, + { "CLUB", 2 }, + { "SPEAR", 3}, + { "BOW", 4}, + { "SHIELD", 5}, + { "HELM", 6 }, + { "ARMOUR", 7 }, + { "BRACELET", 8}, + { "ANCLET", 9 }, + { "NECKLACE", 10}, + { "RING", 11}, + { "BELT", 12}, + { "EARRING", 13}, + { "NOSERING", 14}, + { "AMULET", 15}, + { "OTHER", 16}, + { "BOOMERANG", 17}, + { "BOUNDTHROW", 18}, + { "BREAKTHROW", 19}, +#ifdef _ITEM_TYPETABLE + { "DISH", 20}, + { "METAL", 21}, + { "JEWEL", 22}, + { "WARES", 23}, + { "WBELT", 24}, + { "WSHIELD", 25}, + { "WSHOES", 26}, + { "WGLOVE", 27}, + { "ANGELTOKEN", 28}, + { "HEROTOKEN", 29}, +#endif + { "ACCESSORY", 30}, + { "OFFENCE", 40}, + { "DEFENCE", 50}, + +}; + + +/********************************* +* 初始 +*********************************/ +BOOL NPC_PKPetShopInit( int meindex ) +{ + + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + + /*--正奶皿涩烂--*/ + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPEPKPetShop ); + + if( NPC_Util_GetArgStr(meindex, argstr, sizeof(argstr)) == NULL ) + { + print("NPC_PKPetShopInit_GetArgStrErr"); + return FALSE; + } + if(strstr(argstr,"LIMITSHOP") != NULL) + { /*- 中潸曰毁迕白仿弘--*/ + CHAR_setWorkInt( meindex, NPC_PKPETSHOP_WORK_NO, 1); + } + else + { + CHAR_setWorkInt( meindex, NPC_PKPETSHOP_WORK_NO, 0); + } + + if(strstr( argstr, "EVENT") != NULL) + { /*- 中潸曰毁迕白仿弘--*/ + CHAR_setWorkInt( meindex, NPC_PKPETSHOP_WORK_EV, 1); + } + else + { + CHAR_setWorkInt( meindex, NPC_PKPETSHOP_WORK_EV, 0); + } + + if(strstr( argstr, "EXPRESS") != NULL) + { /*-扪霜盒白仿弘--*/ + CHAR_setWorkInt( meindex, NPC_PKPETSHOP_WORK_EXPRESS, 1); + } + else + { + CHAR_setWorkInt( meindex, NPC_PKPETSHOP_WORK_EXPRESS, 0); + } + return TRUE; +} + + +/********************************* +* 仄井仃日木凶凛及质 +*********************************/ +void NPC_PKPetShopTalked( int meindex , int talker , char *szMes ,int color ) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buff[1024]; + char buf2[256]; + char token[1024]; + int i = 1; + BOOL sellonlyflg = FALSE; + char sellmsg[1024]; + + /* 皿伊奶乩□卞覆仄化分仃 杀允月 */ + if( CHAR_getInt( talker , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) + { + return; + } + + /*-- 及蟆卞中月井升丹井"--*/ + if(NPC_Util_isFaceToFace( meindex, talker, 2) == FALSE) + { /* ㄠ弘伉永玉动 及心 */ + if( NPC_Util_CharDistance( talker, meindex ) > 1) return; + } + + if(NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)) == NULL) + { + print("NPC_PKPetShopInit_GetArgStrErr"); + return; + } + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "sellonly_msg", + token, sizeof( token)) + != NULL) + { + sellonlyflg = TRUE; + strcpysafe(sellmsg, sizeof( sellmsg), token); + } + + /*-- 涛 丹它奶件玉它卞中仃月井升丹井--*/ + if( NPC_Util_GetStrFromStrWithDelim( argstr, "buy_msg", + buff, sizeof( buff)) != NULL ) + { + while(getStringFromIndexWithDelim(buff,",",i,buf2,sizeof(buf2)) != FALSE) + { + i++; + if( strstr( szMes, buf2) != NULL) { + if( CHAR_getWorkInt( meindex, NPC_PKPETSHOP_WORK_EV) == 0) { + /*- 中潸曰毁 井升丹井及民尼永弁--*/ + if( CHAR_getWorkInt( meindex, NPC_PKPETSHOP_WORK_NO) == 1) { + if( sellonlyflg ) { + NPC_PKPetShop_selectWindow( meindex, talker, 3, -1); + return; + } + } + else{ + NPC_PKPetShop_selectWindow( meindex, talker, 1, -1); + return; + } + }else{ + if(CHAR_getWorkInt( meindex, NPC_PKPETSHOP_WORK_NO) == 1) { + if( sellonlyflg) { + NPC_PKPetShop_selectWindow( meindex, talker, 3, -1); + return; + } + }else{ + NPC_PKPetShop_selectWindow( meindex, talker, 1, -1); + return; + } + return; + } + } + } + } + i=1; + + /*-- 涛 月它奶件玉它卞中仃月井升丹井--*/ + if( NPC_Util_GetStrFromStrWithDelim( argstr, "sell_msg", + buff, sizeof( buff)) != NULL ) + { + while( getStringFromIndexWithDelim(buff,",", i,buf2,sizeof(buf2)) + != FALSE ) + { + i++; + if(strstr(szMes,buf2) != NULL) { + NPC_PKPetShop_selectWindow( meindex, talker, 2, -1); + return; + } + } + } + i = 1; + + + /*--公及职及甲件玄毛仁木月蜕邯匹 仄井仃月--*/ + if( NPC_Util_GetStrFromStrWithDelim( argstr, "other_msg", + buff, sizeof( buff)) != NULL ) + { + while(getStringFromIndexWithDelim( buff, ",", i, buf2, sizeof( buf2)) + !=FALSE) + { + i++; + if(strstr(szMes,buf2) != NULL) { + /*--甲件玄丢永本□斥--*/ + if(NPC_Util_GetStrFromStrWithDelim( argstr, "hint_msg", + token, sizeof( token)) != NULL) + { + CHAR_talkToCli( talker, meindex, token, CHAR_COLORWHITE); + return; + } + } + } + } + + /*- 中潸曰毁 井升丹井及民尼永弁--*/ + if(CHAR_getWorkInt( meindex, NPC_PKPETSHOP_WORK_NO) == 1) + { + if(CHAR_getWorkInt( meindex, NPC_PKPETSHOP_WORK_EV) == 1) + { + if( sellonlyflg) + { + CHAR_talkToCli( talker, meindex, sellmsg, CHAR_COLORWHITE); + return; + } + } + else + { /*-- 中潸曰毁 及丢永本□斥--*/ + if( sellonlyflg) + { + NPC_PKPetShop_selectWindow( meindex, talker, 3, -1); + return; + } + } + } + else + { + if(CHAR_getWorkInt( meindex, NPC_PKPETSHOP_WORK_EV) == 1) { + if( sellonlyflg) { + CHAR_talkToCli( talker, meindex, sellmsg, CHAR_COLORWHITE); + return; + } + }else{ + + if(CHAR_getWorkInt( meindex, NPC_PKPETSHOP_WORK_EXPRESS) == 1) { + NPC_PKPetShop_ExpressmanCheck( meindex, talker); + }else{ + /*--仇仇引匹 凶日隋骚它奶件玉它(丢瓦亘□) 憎--*/ + /*-- 中潸曰毁 匹卅仁化 骚及饕卅日丢瓦亘□ 憎--*/ + NPC_PKPetShop_selectWindow( meindex, talker, 0, -1); + } + } + } + +} + +static void NPC_PKPetShop_selectWindow( int meindex, int talker, int num,int select) +{ + + print("\n NPC_PKPetShop_selectWindow()"); + print("\n num = %d ", num); + switch( num) { + case 0: + /*--丢瓦亘□ --*/ + /*--由仿丢□正霜曰--*/ + CHAR_send_P_StatusString( talker, CHAR_P_STRING_GOLD); + + if(CHAR_getWorkInt( meindex, NPC_PKPETSHOP_WORK_EXPRESS) == 1 ) + { + if(CHAR_getWorkInt( meindex, NPC_PKPETSHOP_WORK_NO) ==0 ) + { + NPC_PKPetShop_ExpressmanCheck( meindex, talker); + } + } + else if(CHAR_getWorkInt( meindex, NPC_PKPETSHOP_WORK_NO) == 1) + { + } + else + { + NPC_PKPetShop_Menu( meindex, talker); + } + break; + + case 1: + /*-- 丹 --*/ + NPC_PKPetShop_BuyMain( meindex, talker, select); + break; + + case 2: + /*-- 月 --*/ + NPC_PKPetShop_SellMain( meindex, talker, select); + break; + + case 3: + /*-- 中潸曰毁 匹允方 --*/ + NPC_LimitPetShop( meindex, talker, select); + break; + + } +} + + + +/*----------------------------------------- + * 弁仿奶失件玄井日忒匀化五凶凛卞裟太请今木月[ + * +-------------------------------------------*/ +void NPC_PKPetShopWindowTalked( int meindex, int talkerindex, + int seqno, int select, char *data) +{ + /*-- 及引歹曰卞中卅中午五反蔽 --*/ + if( NPC_Util_CharDistance( talkerindex, meindex ) > 3) { + /*--由仿丢□正霜曰--*/ + CHAR_send_P_StatusString( talkerindex, CHAR_P_STRING_GOLD); + return; + } + + makeStringFromEscaped( data); + switch( seqno){ + + case CHAR_WINDOWTYPE_WINDOWITEMSHOP_STARTMSG: + /*--备丢瓦亘□卞 壬允--*/ + /*-- 丹--*/ + if(atoi( data) == 1 ) NPC_PKPetShop_selectWindow(meindex, talkerindex, 1, -1); + + /*-- 月--*/ + if(atoi( data) == 2) NPC_PKPetShop_selectWindow(meindex, talkerindex, 2, -1); + + /*--请月--*/ + if(atoi( data) == 3) return;/*--窒手仄卅中--*/ + + break; + + + case CHAR_WINDOWTYPE_WINDOWITEMSHOP_BUY_MSG: + /*--失奶 丞及馨笛--*/ + if(NPC_PKPetShop_SetNewPet(meindex , talkerindex, data) == TRUE) { + + NPC_PKPetShop_selectWindow( meindex, talkerindex, 1, 0); + + }else{ + NPC_PKPetShop_selectWindow( meindex, talkerindex ,0, -1); + } + + break; + + + case CHAR_WINDOWTYPE_WINDOWITEMSHOP_SELL_MSG: + /*--失奶 丞及绰轮--*/ + if(NPC_PKPetShop_SellNewPet(meindex , talkerindex, data) == TRUE) { + NPC_PKPetShop_selectWindow( meindex, talkerindex, 2, 0); + + }else{ + NPC_PKPetShop_selectWindow( meindex, talkerindex, 0, -1); + } + + break; + + case CHAR_WINDOWTYPE_WINDOWITEMSHOP_LIMIT: + if(select == WINDOW_BUTTONTYPE_YES) { + NPC_PKPetShop_selectWindow( meindex, talkerindex ,2, -1); + + }else if(select == WINDOW_BUTTONTYPE_NO) { + return; + }else if(select == WINDOW_BUTTONTYPE_OK) { + NPC_PKPetShop_selectWindow( meindex, talkerindex, 2, -1); + } + break; + + case CHAR_WINDOWTYPE_WINDOWITEMSHOP_EXPRESS: + if(atoi(data) == 2) { + NPC_PKPetShop_selectWindow( meindex, talkerindex, 1, -1); + }else if(atoi( data) == 4) { + NPC_PKPetShop_selectWindow( meindex, talkerindex, 2, -1); + } + } +} + + +/*----------------------------------------- + * + * 丹质 丢奶件(弁仿奶失件玄霜耨树 综岳 + * + *krynn 2001/12/9 加的注释 + *before == -1 + *before <> -1 + *krynn end + *-----------------------------------------*/ +void NPC_PKPetShop_BuyMain(int meindex,int talker,int before ) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char token[NPC_UTIL_GETARGSTR_BUFSIZE]; + int fd = getfdFromCharaIndex( talker); + + /* + 曰 中白仿弘 蟆及犯□正银丹井白仿弘 饕及 蟆 丢永本□斥| 丹丢永本□斥 + 蜊醒蓟 丢永本□斥 伊矛伙箫曰卅中丢永本□斥 割 丢永本□斥 + 蟆 尹月 尹卅中白仿弘 失奶 丞伊矛伙 袄蟾 飓 寞 域垫奶件白巧 + 蟆 尹月 尹卅中白仿弘 失奶 丞伊矛伙 袄蟾 飓 寞 域垫奶件白巧 + */ + + /*--云饕及白央奶伙 中坭反白央奶伙互钒仃卅井匀凶午五反蔽 --*/ + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { + print("itemshop_GetArgStr_Err"); + return; + } + + /*--蟆荚及犯□正银丹井---*/ + if(before != -1) + { /*--蟆荚及犯□正互酸匀化中月及匹职及树 反霜日卅仁 --*/ + sprintf(token,"0|0"); + + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_ITEMSHOPMAIN, + WINDOW_BUTTONTYPE_NONE, + CHAR_WINDOWTYPE_WINDOWITEMSHOP_BUY_MSG, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + }else{ + + char token2[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buff2[256]; + char buff[256]; + + /*--备丢永本□斥毛潸 仄化弁仿奶失件玄卞霜月犯□正毛综月-*/ + /*--仇及支曰 反五凶卅中井手--*/ + NPC_Util_GetStrFromStrWithDelim( argstr, "main_msg", buff, sizeof( buff)); + NPC_Util_GetStrFromStrWithDelim( argstr, "buy_main", buff2, sizeof( buff2)); + sprintf(token,"0|1|%d|%s|%s|%s|", CHAR_WINDOWTYPE_WINDOWITEMSHOP_STARTMSG, + CHAR_getChar( meindex, CHAR_NAME), buff, buff2); + + NPC_Util_GetStrFromStrWithDelim( argstr, "what_msg", buff, sizeof( buff)); + NPC_Util_GetStrFromStrWithDelim( argstr, "level_msg", buff2, sizeof( buff)); + snprintf( token2, sizeof( token2), "%s|%s", buff, buff2); + + /*-- 侬 宁 --*/ + strncat( token, token2, sizeof( token)); + + NPC_Util_GetStrFromStrWithDelim( argstr, "realy_msg", buff, sizeof( buff)); + NPC_Util_GetStrFromStrWithDelim( argstr, "itemfull_msg", buff2, sizeof( buff2)); + sprintf( token2, "|%s|%s", buff, buff2); + + /*-- 侬 瑛--*/ + strncat(token , token2,sizeof(token)); + strcpy(token2, "|"); + + /*--失奶 丞树 及 --*/ + NPC_PKPetShop_GetPetList( argstr, token2 ); + // krynn 2001/12/12 bebug 用 + print("%s",token2); + // end krynn + + /*--丢永本□斥午失奶 丞树 及宁 --*/ + strncat( token, token2, sizeof( token)); + } + + /*-- 侬 毛巨旦弗□皿今六月--*/ +// makeEscapeString( token, escapedname, sizeof(escapedname)); + + /*--仇仇匹霜耨--*/ + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_ITEMSHOPMAIN, + WINDOW_BUTTONTYPE_NONE, + CHAR_WINDOWTYPE_WINDOWITEMSHOP_BUY_MSG, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + +} + +/*------------------------------------------------------ + *失奶 丞楮溢及 侬 毛综月( 丹 + *------------------------------------------------------*/ +void NPC_PKPetShop_GetPetList(char *argstr,char *argtoken) +{ + + int i = 1; + int tmp; + int EnemyCnt; + char *name ; + char buff2[256]; + char buff[NPC_UTIL_GETARGSTR_LINEMAX]; + char token2[NPC_UTIL_GETARGSTR_BUFSIZE]; + double rate = 1.0; + int loopcnt = 0; + + /*-伊□玄毛 月[ 仃木壬ㄠ匹裔烂--*/ + if(NPC_Util_GetStrFromStrWithDelim( argstr, "buy_rate", buff2, sizeof( buff2)) + != NULL){ + rate = atof( buff2); + } + + /*- 健丹齿 毛潸 --*/ + if( NPC_Util_GetStrFromStrWithDelim( argstr, "PetList", buff, sizeof( buff)) + != NULL ) + { + while( getStringFromIndexWithDelim(buff,",",i,buff2,sizeof(buff2)) + !=FALSE ) + { + i++; + /*--涩烂白央奶伙及失奶 丞互 "-"匹嗉濠日木化中月井及民尼永弁--*/ + if(strstr( buff2, "-") == NULL) { + /*--引内 蟆 --*/ + // krynn 2001/12/10 + EnemyCnt = ENEMY_getEnemyNum(); + for( tmp=0 ; tmp < EnemyCnt ; tmp++ ) + { + if( ENEMY_getInt( tmp , ENEMY_ID ) == atoi( buff2 ) ) + { + print("\nNPC_PKPetShop_GetPetList: tmp = %d", tmp); + break; + } + } + if( tmp == EnemyCnt ) + { + return; + } + name = ENEMY_getChar( tmp , ENEMY_NAME ); + // krynn end + /*-- 蟆互 卅日}失奶 丞互绣箕仄卅中及匹公及 寞反 骰--*/ + if(name == NULL) continue; + + loopcnt++; + if(loopcnt == MAXSHOPPET) break; + + /*-- 端及皿夫玄戊伙勾仁曰--*/ + NPC_PetStrStr( atoi( buff2), rate, name, token2, tmp); + + /*--丢永本□斥 侬 午 瑛--*/ + strncat( argtoken, token2, sizeof(token2)); + } + else + { + return; + /*krynn 2001/12/13 这段应该用不到了,先 mark,改为直接 return + --失奶 丞互 15-25 及溥匹嗉濠日木化中月桦宁-- + int start; + int end; + + //-"-"匹嗉濠日木凶铵户及醒袄午 及醒袄毛潸 -- + getStringFromIndexWithDelim( buff2, "-", 1, token2, sizeof(token2)); + start = atoi( token2); + getStringFromIndexWithDelim( buff2, "-", 2 ,token2, sizeof(token2)); + end = atoi( token2); + + //-- 寞互菅卞卅匀化中凶日} 木赘尹月 + if(start > end) + { + tmp = start; + start = end; + end = tmp; + } + + end++; + + //--"-"匹嗉濠日木凶坌及失奶 丞树 毛 月-- + for(; start < end ; start++ ) + { + //--引内 蟆 -- + + name = ITEM_getNameFromNumber( start ); + //-- 蟆互 卅日}失奶 丞互绣箕仄卅中及匹公及 寞反 骰-- + if(name == NULL) continue; + + loopcnt++; + if(loopcnt == MAXSHOPPET) break; + + //-- 端及皿夫玄戊伙勾仁曰-- + NPC_PetStrStr( start, rate, name, token2, tmp); + + //--丢永本□斥 侬 午 瑛-- + strncat( argtoken, token2, sizeof(token2)); + }*/ + } + } + } +} + + +/*----------------------------------------------------------------- + 皿夫玄戊伙综岳 +-------------------------------------------------------------------*/ +void NPC_PetStrStr(int petID,double rate,char *name,char *token2,int index) +{ + int i; + int gold; + int level; + int graNo; + int TempNo; + int EnemyTempNum; + char info[1024]; + //char tryItem[256]; // krynn 2001/12/12 只是要看 getItemInfoFromNumber 读出来的字串长什麽样的 + char escape[256] = {"PK Server 宠"}; + + //krynn 2001/12/10 try + //gold = ITEM_getcostFromITEMtabl( itemID); + //level = ITEM_getlevelFromITEMtabl( itemID); + //graNo = ITEM_getgraNoFromITEMtabl( itemID); + TempNo = ENEMY_getInt( index , ENEMY_TEMPNO ); + EnemyTempNum = ENEMYTEMP_getEnemyNum(); + for( i=0 ; i < EnemyTempNum ; i++ ) + { + if( ENEMYTEMP_getInt( i , E_T_TEMPNO ) == TempNo ) + { + break; + } + } + if( i == EnemyTempNum ) + { + return; + } + gold = RAND(0,20); + level = 0; + graNo = ENEMYTEMP_getInt( i , E_T_IMGNUMBER ); + //print("\nPKPetShop::NPC_PetStrStr(): TempNo = %d ; graNo = %d",TempNo,graNo); + /*--伊□玄毛井仃月--*/ + gold=(int)(gold * rate); + + //strcpy( tryItem,ITEM_getItemInfoFromNumber( 10 ) ); + //print("PKPetShop::NPC_PetStrStr(): try = %s\n",tryItem); + //krynn end + + makeEscapeString( escape, info, sizeof( info)); + + makeEscapeString( name, escape, sizeof( escape)); + + sprintf( token2, "%s|0|%d|%d|%d|%s|", escape, level, gold, graNo, info); +} + + +/*------------------------------------------- + *( 丹) + *弁仿奶失件玄井日忒匀凶 凶瑛绊毛 掏今六月 + * + *------------------------------------------*/ +BOOL NPC_PKPetShop_SetNewPet(int meindex,int talker,char *data) +{ + + char buf[1024]; + char buff2[128]; + int i = 1, j = 1; + int select; + int kosuu = 0; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + double rate = 1.0; + int gold = 0; + int EmptyPetCnt=0; + + /*--忒匀化五凶犯□正毛本伊弁玄午蜊醒卞坌荸--*/ + print("\nNPC_PKPetShop_SetNewPet: data = %s",data); + getStringFromIndexWithDelim( data, "|", 1, buf, sizeof( buf)); + select=atoi(buf); // krynn 2001/12/10 select 是玩家传回要买的第几样 + print("\nNPC_PKPetShop_SetNewPet: select = %d",select); + if(select == 0) return FALSE; + getStringFromIndexWithDelim( data, "|", 2, buf, sizeof( buf)); + kosuu=atoi(buf); + print("\nNPC_PKPetShop_SetNewPet: kosuu(玩家要买的数量) = %d",kosuu); + + if( kosuu <= 0 ) return FALSE; + + /* 仍潜谛 及矢永玄及坞五毛茧允 */ + if( !CHAR_CHECKINDEX(talker) ) + { + return FALSE; + } + for( i=0 ; i < CHAR_MAXPETHAVE ; i++ ) + { + if( CHAR_getCharPet( talker,i) == -1 ) + { + EmptyPetCnt++; + } + } + // 有 EmptyPetCnt 个宠物空位 + /* 坞五互 中 */ + print("\nNPC_PKPetShop_SetNewPet:EmptyPetCnt(玩家有的空位) = %d",EmptyPetCnt); + if( EmptyPetCnt <= 0 ) return FALSE; + if( EmptyPetCnt > CHAR_MAXPETHAVE ) + { + EmptyPetCnt = CHAR_MAXPETHAVE; + } + if( kosuu > EmptyPetCnt ) + { + kosuu = EmptyPetCnt; + } + + // krynn 2001/12/10 + // 应该用不到,所以 mark 起来 + /*--蜊醒及民尼永弁 癫卞蝈 月井" + for( i = CHAR_STARTITEMARRAY ; i < CHAR_MAXITEMHAVE ; i++ ) { + itemindex = CHAR_getItemIndex( talker , i ); + + if( !ITEM_CHECKINDEX( itemindex) ) { + kosuucnt++; + } + } + + --忒匀化 凶蜊醒及 互 端及蜊醒 扔□田础 方曰聂中午云井仄中及匹 + --扔□田□础及 毛 木月 + if( kosuucnt < kosuu){ + kosuu = kosuucnt; + } + --未夫及桦宁反巨仿□ + if(kosuucnt == 0 ){ + return FALSE; + } + krynn end */ + + i = 1; + + /*--云饕及白央奶伙 中坭反白央奶伙互钒仃卅井匀凶午五反蔽 --*/ + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { + print("shop_GetArgStr_Err"); + return FALSE; + } + + /*---伊□玄毛潸 卅仃木壬1.0)-*/ + if(NPC_Util_GetStrFromStrWithDelim( argstr, "buy_rate", buf, sizeof( buf)) + != NULL) { + rate= atof( buf); + } + + /*--失奶 丞及馨笛毛垫丹午仇欠-*/ + if( NPC_Util_GetStrFromStrWithDelim( argstr, "PetList", + buf, sizeof( buf)) != NULL ) + { + while(getStringFromIndexWithDelim(buf , "," , j, buff2, sizeof(buff2)) + != FALSE ) + { + j++; + /*-- "-"互殖引木化中月井升丹井--*/ + if(strstr( buff2, "-") == NULL) + { // krynn 2001/12/10 try + //if( ITEM_getcostFromITEMtabl(atoi(buff2)) !=-1) { + // + if ( i == select) + { + /*---失奶 丞及综岳---*/ + /*--蜊醒坌综岳--*/ + if(NPC_AddPetBuy(meindex, talker,atoi(buff2),kosuu,rate) != TRUE) + { + return FALSE; + } + return TRUE; + } + i++; + // krynn end} + }else{ + /*--失奶 丞互 15-25 及溥匹霜日木凶桦宁--*/ + int start; + int end; + + /* "-"匹嗉濠日木凶铵户及醒袄午 及醒袄毛潸 --*/ + getStringFromIndexWithDelim( buff2, "-", 1, argstr, sizeof(argstr)); + start = atoi( argstr); + getStringFromIndexWithDelim( buff2, "-", 2 ,argstr, sizeof(argstr)); + end = atoi( argstr); + end++; + + /*-- 寞互菅卞卅匀化中凶日} 木赘尹月**/ + if(start > end){ + gold = start; + start = end; + end = gold; + } + + /*--"-"匹嗉濠日木凶坌及失奶 丞毛树 毛 月--*/ + for(; start < end ; start++ ) { + if( ITEM_getcostFromITEMtabl( start) != -1) { + if ( i == select) { + /*---失奶 丞及综岳---*/ + /*--蜊醒坌综岳--*/ + if(NPC_AddPetBuy(meindex, talker, start, kosuu, rate) != TRUE) + { + return FALSE; + } + return TRUE; + } + i++; + } + } + } + } + } + + return FALSE; + +} + + +/*--------------------------------------------- + *失奶 丞及馨笛毛垫丹 + *--------------------------------------------*/ +BOOL NPC_AddPetBuy(int meindex, int talker,int petID,int kosuu,double rate) +{ + int i,j,k,index,EnemyCnt,UpLevel; + int gold; + int ret; + int maxgold; + int Grade=0; + char buf[1024]; + char msgbuf[64]; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + + // krynn 2001/12/15 get get's grade of this PKPetShop + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { + print("shop_GetArgStr_Err"); + return FALSE; + } + if(NPC_Util_GetStrFromStrWithDelim( argstr, "Grade", buf, sizeof( buf)) + != NULL) + { + Grade = atoi( buf ); + } + // end krynn + + /*--伊□玄毛井仃月--*/ + // krynn 2001/12/11 mark and change + //gold = ITEM_getcostFromITEMtabl( itemID); + gold = 4; + // krynn end + gold = (int)(gold * rate); + maxgold = gold * kosuu; + + if(CHAR_getInt( talker, CHAR_GOLD) < maxgold ) return FALSE; + + /*--云嗯毛蛹日允--*/ + CHAR_setInt( talker, CHAR_GOLD,CHAR_getInt( talker, CHAR_GOLD) - maxgold); + + /* krynn 2001/12/11 PKServer 应该用不到家族,所以先 mark 起来 + if( addNpcFamilyTax( meindex, talker, maxgold*0.4 ) ) + print(" FamilyTaxDone! "); + else + print(" FamilyTaxError!"); + // end krynn*/ + EnemyCnt = ENEMY_getEnemyNum(); + for( index=0 ; index < EnemyCnt ; index++ ) + { + if( ENEMY_getInt( index , ENEMY_ID ) == petID ) + { + print("\nNPC_AddPetBuy: index = %d", index); + break; + } + } + if( index == EnemyCnt ) + { + return FALSE; + } + + /*--蜊醒坌综岳--*/ + for(i = 0 ; i < kosuu ; i++) + { + if( (ret = ENEMY_createPetFromEnemyIndex( talker , index )) == -1 ) + { + return FALSE; + }; + /******************/ + /* 矢永玄树 霜月 */ + /******************/ + // 升仇卞反中匀凶井卅 + for( j = 0 ; j < CHAR_MAXPETHAVE ; j++ ) + { + if( CHAR_getCharPet( talker , j ) == ret ) + { + break; + } + } + if( j == CHAR_MAXPETHAVE ){ + return FALSE; + } + if( CHAR_CHECKINDEX( ret ) == TRUE ){ + CHAR_setMaxExpFromLevel( ret, Grade); + UpLevel = CHAR_LevelUpCheck( ret , talker); + for( k = 0; k < UpLevel; k ++ ){ + CHAR_PetLevelUp( ret ); + CHAR_PetAddVariableAi( ret, AI_FIX_PETLEVELUP ); + } + CHAR_complianceParameter( ret ); + CHAR_setInt( ret , CHAR_HP , CHAR_getWorkInt( ret , CHAR_WORKMAXHP ) ); + + snprintf( msgbuf, sizeof( msgbuf ), "K%d", j ); + CHAR_sendStatusString( talker, msgbuf ); + + snprintf( msgbuf, sizeof( msgbuf ), "W%d", j ); + CHAR_sendStatusString( talker, msgbuf ); + } + } + CHAR_send_P_StatusString( talker, CHAR_P_STRING_GOLD); + return TRUE; +} + + + +/*---------------------------------------- + *丢瓦亘□ + *----------------------------------------*/ +void NPC_PKPetShop_Menu(int meindex,int talker) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char token[NPC_UTIL_GETARGSTR_LINEMAX]; + char buff[256]; + int fd = getfdFromCharaIndex( talker); + + /* 饕及 蟆 丢永本□斥| */ + /*--云饕及白央奶伙 中坭反白央奶伙互钒仃卅井匀凶午五反蔽 --*/ + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { + print("shop_GetArgStr_Err"); + return; + } + + NPC_Util_GetStrFromStrWithDelim( argstr, "main_msg", buff, sizeof( buff)); + snprintf(token, sizeof(token),"%s|%s",CHAR_getChar( meindex, CHAR_NAME), buff); + + // print("%s",escapedname); + /*--仇仇匹霜耨--*/ + //krynn 2001/12/10 这里的参数似乎可以延用 ItemShop 的 code,先用用看 + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_ITEMSHOPMENU, + WINDOW_BUTTONTYPE_NONE, + CHAR_WINDOWTYPE_WINDOWITEMSHOP_STARTMSG, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + //krynn end +} + + +/*------------------------------------------- + * 月质 (皿夫玄戊伙毛综岳 + * + *-------------------------------------------*/ +void NPC_PKPetShop_SellMain(int meindex,int talker,int before) +{ + + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char token[NPC_UTIL_GETARGSTR_BUFSIZE]; + int fd = getfdFromCharaIndex( talker); + + + /* + 曰 中白仿弘 蟆及犯□正银丹井白仿弘 饕及 蟆 丢永本□斥| 月丢永本□斥 + 云嗯互中匀天中卞卅月方丢永本□斥 割 丢永本□斥 + 蟆 木月 木卅中白仿弘 袄蟾 飓 寞 域垫奶件白巧 失奶 丞 寞 ㄠ井日 + 蟆 木月 木卅中白仿弘 袄蟾 飓 寞 域垫奶件白巧 失奶 丞 寞 ㄠ井日 + */ + + /*--云饕及白央奶伙 中坭反白央奶伙互钒仃卅井匀凶午五反蔽 --*/ + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { + print("shop_GetArgStr_Err"); + return; + } + + /*--蟆荚及犯□正银丹井---*/ + if(before != -1) { + + /*--蟆荚及犯□正互酸匀化中月及匹职及树 反霜日卅仁 --*/ + sprintf(token,"1|0"); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_ITEMSHOPMAIN + +CHAR_getWorkInt(meindex,NPC_PKPETSHOP_WORK_NO), + WINDOW_BUTTONTYPE_NONE, + CHAR_WINDOWTYPE_WINDOWITEMSHOP_SELL_MSG, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + + }else{ + + char token2[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buff2[256]; + char buff[256]; + + /*--备丢永本□斥毛潸 仄化弁仿奶失件玄卞霜月犯□正毛综月-*/ + /*--仇及支曰 反五凶卅中井手--*/ + NPC_Util_GetStrFromStrWithDelim( argstr, "main_msg", buff, sizeof( buff)); + NPC_Util_GetStrFromStrWithDelim( argstr, "sell_main", buff2, sizeof( buff)); + sprintf( token, "1|1|%d|%s|%s|%s|", CHAR_WINDOWTYPE_WINDOWITEMSHOP_STARTMSG, + CHAR_getChar( meindex, CHAR_NAME), buff, buff2); + + NPC_Util_GetStrFromStrWithDelim( argstr, "stone_msg", buff, sizeof( buff)); + + if(CHAR_getWorkInt(meindex,NPC_PKPETSHOP_WORK_EXPRESS) == 1 ) { + NPC_Util_GetStrFromStrWithDelim( argstr, "exrealy_msg", buff2, sizeof(buff2)); + }else{ + NPC_Util_GetStrFromStrWithDelim( argstr, "realy_msg", buff2, sizeof( buff2)); + } + sprintf( token2,"%s|%s|", buff, buff2); + + /*--失奶 丞树 及 --*/ + NPC_PKPetShop_GetLimtPetList( talker,argstr, token2, -1); + + /*--丢永本□斥午失奶 丞树 及宁 --*/ + strncat( token, token2, sizeof( token)); + + /*--仇仇匹霜耨--*/ + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_ITEMSHOPMAIN+ + CHAR_getWorkInt(meindex,NPC_PKPETSHOP_WORK_NO), + WINDOW_BUTTONTYPE_NONE, + CHAR_WINDOWTYPE_WINDOWITEMSHOP_SELL_MSG, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + } +} + + + + + +/*-------------------------------- + +愤坌互云饕卞 月失奶 丞及 侬 毛及赏 + + *-------------------------------*/ +int NPC_PKPetShop_GetLimtPetList(int talker, char *argstr, char* token2,int sell) +{ + + char token[NPC_UTIL_GETARGSTR_LINEMAX]; + char buff[NPC_UTIL_GETARGSTR_LINEMAX]; + char token3[NPC_UTIL_GETARGSTR_LINEMAX]; + int k = 0 , i = 1 , j = 0; + int imax; + int itemtype = 0; + int itemindex; + int okflg = 0; + char buf[256]; + int flg=0; + int cost; + + + if(sell == -1 ){ + i = CHAR_STARTITEMARRAY; + imax = CHAR_MAXITEMHAVE; + flg = -1; + }else{ + i= sell; + imax= sell + 1; + flg = 1; + } + + /*--- 木月失奶 丞毛潸 允月[--*/ + /** 旦矢扑乓伙失奶 丞毛手匀化中凶日 伊□玄匹煌遥--*/ + /*-- 旦矢扑乓伙质 匹皿夫弘仿丞互 --*/ + + for( ; i < imax ; i++ ){ + okflg=0; + itemindex = CHAR_getItemIndex( talker , i ); + + if( ITEM_CHECKINDEX( itemindex) ){ + + /*--失奶 丞及正奶皿互域谯仄凶日} 木月--*/ + if( NPC_Util_GetStrFromStrWithDelim( argstr,"LimitItemType", + buff, sizeof( buff)) + != NULL ) + { + k = 1; + while(getStringFromIndexWithDelim(buff , "," , k, token, sizeof(token)) + != FALSE ) + { +#ifdef _ITEM_TYPETABLE + int cmpmaxitem = sizeof(TypeTable)/sizeof(TypeTable[0]); +#endif + k++; +#ifdef _ITEM_TYPETABLE + for(j = 0 ; j < cmpmaxitem ; j++){ +#else + for(j = 0 ; j < ITEM_CATEGORYNUM+3 ; j++){ +#endif + if(strcmp( TypeTable[ j].arg , token) == 0 ) { + itemtype = TypeTable[ j].type; + if(ITEM_getInt(itemindex,ITEM_TYPE) == itemtype) { + + /*-- 侬 综岳--*/ + cost = NPC_GetSellPetList(itemindex,0,argstr,token3,i,sell); + if(cost != -1) return cost; + strncat( token2, token3, sizeof( token3)); + okflg = 1; + }else if(itemtype == 30){ + if( 8 <= ITEM_getInt(itemindex,ITEM_TYPE) + && (ITEM_getInt(itemindex,ITEM_TYPE) <= 15) ){ + /*-- 侬 综岳--*/ + cost = NPC_GetSellPetList(itemindex,0,argstr,token3,i,sell); + if(cost != -1) return cost; + strncat(token2,token3,sizeof(token3)); + okflg = 1; + } + }else if(itemtype == 40){ + if(( 0 <= ITEM_getInt(itemindex,ITEM_TYPE) + && (ITEM_getInt(itemindex,ITEM_TYPE) <= 4)) + || (17 <= ITEM_getInt(itemindex,ITEM_TYPE) + && (ITEM_getInt(itemindex,ITEM_TYPE) <= 19)) + ) { + /*-- 侬 综岳--*/ + cost = NPC_GetSellPetList(itemindex,0,argstr,token3,i,sell); + if(cost != -1) return cost; + strncat(token2,token3,sizeof(token3)); + okflg = 1; + } + }else if(itemtype == 50){ + if( 5 <= ITEM_getInt(itemindex,ITEM_TYPE) + && (ITEM_getInt(itemindex,ITEM_TYPE) <= 7) ){ + /*-- 侬 综岳--*/ + cost = NPC_GetSellPetList(itemindex,0,argstr,token3,i,sell); + if(cost != -1) return cost; + strncat(token2,token3,sizeof(token3)); + okflg = 1; + } + } + break; + } + } + + if(okflg == 1) break; + } + } + /*--正奶皿卞卅仁化 涛 寞仄化 木月失奶 丞井民尼永弁--*/ + if( (NPC_Util_GetStrFromStrWithDelim( argstr, "LimitItemNo", + buff,sizeof( buff)) + != NULL) + && okflg == 0 ) + { + k = 1; + while(getStringFromIndexWithDelim(buff , "," , k, token, sizeof(token)) + != FALSE ) + { + k++; + /*--窒手涩烂今木化卅井匀凶日} 骰允月-*/ + if(strstr( token, "-")==NULL && strcmp(token,"") != 0) { + if(ITEM_getInt(itemindex,ITEM_ID) == atoi(token)) { + /*-- 侬 综岳--*/ + cost = NPC_GetSellPetList(itemindex,0,argstr,token3,i,sell); + if(cost != -1) return cost; + strncat(token2,token3,sizeof(token3)); + okflg=1; + } + }else if (strstr( token, "-") != NULL){ + int start; + int end; + int work; + + /*-- 侬 综岳--*/ + /* "-"匹嗉濠日木凶铵户及醒袄午 及醒袄毛潸 --*/ + getStringFromIndexWithDelim( token, "-", 1, buf, sizeof(buf)); + start = atoi( buf); + getStringFromIndexWithDelim( token, "-", 2 ,buf, sizeof(buf)); + end = atoi( buf); + + /*-- 寞互菅卞卅匀化中凶日} 木赘尹月**/ + if(start > end){ + work = start; + start = end; + end = work; + } + + end++; + /*--"-"匹嗉濠日木凶坌及失奶 丞毛树 毛 月--*/ + if( (start <= ITEM_getInt(itemindex,ITEM_ID)) + && (ITEM_getInt(itemindex,ITEM_ID) < end) ) + { + /*-- 侬 综岳--*/ + cost = NPC_GetSellPetList(itemindex,0,argstr,token3,i,sell); + if(cost != -1) return cost; + strncat(token2,token3,sizeof(token3)); + okflg = 1; + } + } + } + } + + /*-- 月仇午互匹五卅中--*/ + if(okflg == 0) { + cost = NPC_GetSellPetList(itemindex, 1, argstr, token3, i, sell); + if(sell != -1) return -1; + strncat( token2, token3, sizeof( token3)); + } + + } + } + return -1; +} + + + +/*---------------------------------------------------------- + + 弁仿奶失件玄卞霜耨允月皿夫玄戊伙及综岳 + + *----------------------------------------------------------*/ +int NPC_GetSellPetList(int itemindex,int flg, char *argstr,char *argtoken,int select,int sell) +{ + + char buff[256]; + double rate = 0.2; + char buff2[256]; + char buff3[64]; + int k = 1; + int cost = -1; + + /*--旦矢扑乓伙伊□玄--**/ + if(NPC_Util_GetStrFromStrWithDelim( argstr,"special_item",buff, sizeof( buff)) + != NULL) + { + if(NPC_Util_GetStrFromStrWithDelim( argstr,"special_rate",buff2, sizeof( buff2)) + != NULL ) + { + rate = atof(buff2); + }else{ + rate = 1.2; + } + + while(getStringFromIndexWithDelim(buff , "," , k, buff2, sizeof(buff2)) !=FALSE ) + { + k++; + + if(strstr( buff2, "-") == NULL && strcmp(buff2,"") != 0) { + if(ITEM_getInt(itemindex,ITEM_ID) == atoi(buff2)){ + cost = NPC_SellPetstrsStr( itemindex,0, rate, argtoken,select,sell); + return cost; + } + }else if (strstr( buff2, "-") != NULL){ + int start; + int end; + int work; + + /*-- 侬 综岳--*/ + /* "-"匹嗉濠日木凶铵户及醒袄午 及醒袄毛潸 --*/ + getStringFromIndexWithDelim( buff2, "-", 1, buff3, sizeof(buff3)); + start = atoi( buff3); + getStringFromIndexWithDelim( buff2, "-", 2 ,buff3, sizeof(buff3)); + end = atoi( buff3); + + /*-- 寞互菅卞卅匀化中凶日} 木赘尹月**/ + if(start > end){ + work = start; + start = end; + end = work; + } + end++; + + /*--"-"匹嗉濠日木凶坌及失奶 丞毛树 毛 月--*/ + if( (start <= ITEM_getInt(itemindex,ITEM_ID)) + && (ITEM_getInt(itemindex,ITEM_ID) < end) + ){ + + cost = NPC_SellPetstrsStr( itemindex,0, rate, argtoken,select,sell); + return cost; + } + } + } + } + + /*--用□穴伙伊□玄--*/ + if( NPC_Util_GetStrFromStrWithDelim( argstr,"sell_rate",buff, sizeof( buff)) + != NULL ) + { + rate = atof(buff); + cost = NPC_SellPetstrsStr( itemindex, flg ,rate, argtoken,select,sell); + return cost; + } + + return cost; +} + + +/*------------------------------------------ + + 侬 毛综月(丹曰迕) + +*------------------------------------------*/ +int NPC_SellPetstrsStr(int itemindex,int flg,double rate,char *argtoken,int select,int sell) +{ + int cost; + char escapedname[256]; + char name[256]; + char *eff; + + + cost = ITEM_getInt( itemindex, ITEM_COST); + cost = (int)(cost * rate); + + if(sell != -1) return cost; + + + //strcpy( escapedname, ITEM_getChar( itemindex, ITEM_NAME)); + strcpy( escapedname, ITEM_getChar( itemindex, ITEM_SECRETNAME)); + makeEscapeString( escapedname, name, sizeof( name)); + eff=ITEM_getChar(itemindex, ITEM_EFFECTSTRING); + makeEscapeString( eff, escapedname, sizeof(escapedname)); + + + + sprintf(argtoken,"%s|%d|%d|%d|%s|%d|", + name, + flg, + cost, + ITEM_getInt( itemindex, ITEM_BASEIMAGENUMBER), + escapedname, + select + ); + + return -1; + +} + +/*-------------------------------------------- + * + *弁仿奶失件玄井日瑛绊互忒匀化五凶午五 月 + * + *-------------------------------------------*/ +BOOL NPC_PKPetShop_SellNewPet(int meindex,int talker,char *data) +{ + int select; + int cost; + int oldcost; + char token[32]; + int k; + int itemindex; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char token2[256]; + + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { + print("GetArgStrErr"); + return FALSE; + } + + + /*--忒匀化 凶犯□正及坌荸--*/ + getStringFromIndexWithDelim(data , "|" ,1, token, sizeof( token)); + select = atoi(token); + getStringFromIndexWithDelim(data , "|" ,2, token, sizeof( token)); + oldcost = atoi(token); + + if(select == 0) return FALSE; + + cost = NPC_PKPetShop_GetLimtPetList( talker,argstr, token2,select); + + + /*--啜丹手及毛丹欠丹午仄凶午五及巨仿□--*/ + if(oldcost != cost || cost == -1) + { + int fd = getfdFromCharaIndex( talker); + char token[256]; + + sprintf(token,"\n\n哎呀!对不起" + "\n\n对不起啊 ! 可不可以再选一次呢?" + ); + + k = select; + itemindex = CHAR_getItemIndex( talker ,k); + + + /*--夫弘及请 --*/ + if(itemindex != -1) { + print("\n%s(%d,%d,%d):和选择的东西不同error([%s(%d)]要消失了)", + CHAR_getChar(talker, CHAR_NAME), + CHAR_getInt( talker, CHAR_FLOOR), + CHAR_getInt( talker, CHAR_X ), + CHAR_getInt( talker, CHAR_Y ), + ITEM_getChar(itemindex, CHAR_NAME), + ITEM_getInt( itemindex, ITEM_ID ) + ); + LogItem( + CHAR_getChar( talker, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( talker, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), /* 失奶 丞 寞 */ +#endif + "SellErr", + CHAR_getInt( talker, CHAR_FLOOR), + CHAR_getInt( talker, CHAR_X ), + CHAR_getInt( talker, CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + }else{ + print("\n%s(%d,%d,%d):和选择的东西不同error(没有任何item存在)", + CHAR_getChar(talker, CHAR_NAME), + CHAR_getInt( talker, CHAR_FLOOR), + CHAR_getInt( talker, CHAR_X ), + CHAR_getInt( talker, CHAR_Y ) + ); + LogItem( + CHAR_getChar( talker, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( talker, CHAR_CDKEY ), + -1, /* 失奶 丞 寞 */ + "SellErr", + CHAR_getInt( talker, CHAR_FLOOR), + CHAR_getInt( talker, CHAR_X ), + CHAR_getInt( talker, CHAR_Y ), + "-1", "NULL", -1 ); + } + /*--仇仇匹霜耨--*/ + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + CHAR_WINDOWTYPE_WINDOWITEMSHOP_LIMIT, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + + + return FALSE; + } + + k = select; + itemindex=CHAR_getItemIndex( talker ,k); + + if(itemindex != -1) { + { + LogItem( + CHAR_getChar( talker, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( talker, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID ), /* 失奶 丞 寞 */ +#endif + "Sell", + CHAR_getInt( talker,CHAR_FLOOR), + CHAR_getInt( talker,CHAR_X ), + CHAR_getInt( talker,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + + ); + } + + } + + CHAR_DelItem( talker, k); + CHAR_AddGold( talker, cost); + CHAR_send_P_StatusString( talker, CHAR_P_STRING_GOLD); + + return TRUE; +} + + + +void NPC_LimitPetShop(int meindex,int talker,int select) +{ + + int fd = getfdFromCharaIndex( talker); + char token[NPC_UTIL_GETARGSTR_LINEMAX]; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[1024]; + + /*--云饕及白央奶伙 中坭反白央奶伙互钒仃卅井匀凶午五反蔽 --*/ + if( NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { + print("shop_GetArgStr_Err"); + return; + } + + /*-- 中潸曰毁 饕匹允丢永本□斥-*/ + if(NPC_Util_GetStrFromStrWithDelim( argstr, "sellonly_msg", buf, sizeof( buf)) + !=NULL) + { + sprintf(token,"\n\n%s", buf); + + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_YESNO, + CHAR_WINDOWTYPE_WINDOWITEMSHOP_LIMIT, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + + }else{ + CHAR_talkToCli( talker, meindex, "这是买卖专门店。",CHAR_COLORWHITE); + } + return; +} + + +/*--扪霜盒今氏--*/ +void NPC_PKPetShop_ExpressmanCheck(int meindex,int talker) +{ + int fd = getfdFromCharaIndex( talker); + char token[1024]; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[1024]; + + /*--云饕及白央奶伙 中坭反白央奶伙互钒仃卅井匀凶午五反蔽 --*/ + if( NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { + print("shop_GetArgStr_Err"); + return; + } + + + /*-- 中潸曰毁 饕匹允丢永本□斥-*/ + NPC_Util_GetStrFromStrWithDelim( argstr, "main_msg", buf, sizeof( buf)); + sprintf(token,"4\n丂丂丂丂丂丂丂%s\n\n%s" + "\n\n丂丂丂丂丂< 打工 >丂丂丂" + "\n\n丂丂丂丂 <交付行李>" + ,CHAR_getChar(meindex,CHAR_NAME),buf); + + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_SELECT, + WINDOW_BUTTONTYPE_CANCEL, + CHAR_WINDOWTYPE_WINDOWITEMSHOP_EXPRESS, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + + return; + + +} + + +#endif + // _PKPETSHOP + + + + diff --git a/gmsv/npc/npc_poolitemshop.c b/gmsv/npc/npc_poolitemshop.c new file mode 100644 index 0000000..6b4925a --- /dev/null +++ b/gmsv/npc/npc_poolitemshop.c @@ -0,0 +1,882 @@ +#include "version.h" + +#include "char.h" +#include "lssproto_serv.h" +#include "npcutil.h" +#include "npc_poolitemshop.h" +#include "log.h" +#include "handletime.h" + +#define NPC_POOLITEMSHOP_DEFAULT_COST 200 + +enum { + NPC_WORK_COST = CHAR_NPCWORKINT1, + NPC_WORK_CURRENTTIME = CHAR_NPCWORKINT9, +}; + +enum { + NPC_POOLITEMSHOP_MSG_MAIN=0, + NPC_POOLITEMSHOP_MSG_POOL, + NPC_POOLITEMSHOP_MSG_DRAW, + NPC_POOLITEMSHOP_MSG_REALY, + NPC_POOLITEMSHOP_MSG_STONE, + NPC_POOLITEMSHOP_MSG_POOLFULL, + NPC_POOLITEMSHOP_MSG_ITEMFULL, + + CHAR_WINDOWTYPE_POOLITEMSHOP_START = 290, + CHAR_WINDOWTYPE_POOLITEMSHOP_POOL_MSG, + CHAR_WINDOWTYPE_POOLITEMSHOP_DRAW_MSG, + CHAR_WINDOWTYPE_POOLITEMSHOP_FULL_MSG, + CHAR_WINDOWTYPE_POOLITEMSHOP_HAVEITEMFULL_MSG, + CHAR_WINDOWTYPE_POOLITEMSHOP_END, + +#ifdef _NPC_DEPOTITEM + CHAR_WINDOWTYPE_DEPOTITEMSHOP_MENU = 310, + CHAR_WINDOWTYPE_DEPOTITEMSHOP_HANDLE, + CHAR_WINDOWTYPE_DEPOTITEMSHOP_ADD, + CHAR_WINDOWTYPE_DEPOTITEMSHOP_GET, +#endif +}; + +typedef struct { + char option[32]; + char defaultmsg[128]; +}NPC_POOLITEMSHOP_MSG; + +NPC_POOLITEMSHOP_MSG poolshopmsg[] = { + { "main_msg", "欢迎"}, + { "pool_main", "要寄放什麽呢"}, + { "draw_main", "要领养什麽呢"}, + { "realy_msg", "真的要那个吗"}, + { "stone_msg", "钱不够喔!"}, + { "poolfull_msg", "超过的无法处理喔"}, + { "itemfull_msg", "项目有很多"} +}; + +static BOOL NPC_PoolItemShop_DrawItem( int meindex, int talkerindex, int num); +static BOOL NPC_PoolItemShop_PoolItem( int meindex, int talkerindex, int num); +static void NPC_PoolItemShop_MakeItemString_Draw( int meindex, int talkerindex, + char *retstring,int retstringlen); +static void NPC_PoolItemShop_MakeItemString_Pool( int meindex, int talkerindex, + char *retstring,int retstringlen); +static char *NPC_PoolItemShop_getMsg_noarg( int tablenum, + char *argstr, char *retstring, int retstringlen); +static void NPC_PoolItemShop_printWindow_Draw( int meindex, int talkerindex); +static void NPC_PoolItemShop_printWindow_Pool( int meindex, int talkerindex); +static void NPC_PoolItemShop_printWindow_Full( int meindex, int talkerindex); +void NPC_PoolItemShop_printWindow_Start( int meindex, int talkerindex); +static void NPC_PoolItemShop_printWindow_HaveItemFull( int meindex, int talkerindex); + +#ifdef _NPC_DEPOTITEM +void NPC_PoolItemShop_DepotItem_Menu( int meindex, int talkerindex); +void NPC_DepotItem_Item_printWindow( int meindex, int talkerindex); +void NPC_DepotItem_Depot_printWindow( int meindex, int talkerindex); +BOOL NPC_DepotItem_InsertItem( int meindex, int talkerindex, int num); +BOOL NPC_DepotItem_gettItem( int meindex, int talkerindex, int num); +#endif + +#define NPCPOOLITEMLOOP 1000*20 +int othertime=0; +BOOL NPC_PoolItemShopInit( int meindex) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + int cost; + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + cost = NPC_Util_GetNumFromStrWithDelim( argstr, "cost"); + if( cost == -1 ) cost = NPC_POOLITEMSHOP_DEFAULT_COST; + CHAR_setWorkInt( meindex, NPC_WORK_COST, cost); + + return TRUE; +} + +void NPC_PoolItemShopLoop( int meindex) +{ +} + +void NPC_PoolItemShopTalked( int meindex , int talkerindex , + char *szMes ,int color ) +{ + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) { + return; + } + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, 0); + if( !NPC_Util_isFaceToFace( meindex, talkerindex, 2)) { + if( NPC_Util_CharDistance( talkerindex, meindex ) > 1) return; + } + NPC_PoolItemShop_printWindow_Start( meindex, talkerindex); +} + +void NPC_PoolItemShopWindowTalked( int meindex, int talkerindex, + int seqno, int select, char *data) +{ + if( NPC_Util_CharDistance( talkerindex, meindex ) > 2) return; + + //print("\n NPC_PoolItemShopWindowTalked: seq:%d sel:%d data:%s", seqno, select, data); + + switch( seqno ) { + case CHAR_WINDOWTYPE_POOLITEMSHOP_START: + switch( atoi( data)) { + case 1: + if( CHAR_getCharPoolItemIndexElement( talkerindex) != -1 ) { + NPC_PoolItemShop_printWindow_Pool( meindex, talkerindex); + }else { + NPC_PoolItemShop_printWindow_Full( meindex, talkerindex); + } + break; + case 2: + if( CHAR_findEmptyItemBox( talkerindex) != -1 ) { + NPC_PoolItemShop_printWindow_Draw( meindex, talkerindex); + }else { + NPC_PoolItemShop_printWindow_HaveItemFull( meindex, talkerindex); + } + break; +#ifdef _NPC_DEPOTITEM + case 3: + if( !CHAR_CheckDepotItem( talkerindex) ){ + CHAR_GetDepotItem( meindex, talkerindex); + CHAR_talkToCli( talkerindex, -1, "取得道具,请稍後!", CHAR_COLORYELLOW); + }else{ + NPC_PoolItemShop_DepotItem_Menu( meindex, talkerindex); + } + break; +#endif + + } + break; + case CHAR_WINDOWTYPE_POOLITEMSHOP_POOL_MSG: + if( atoi( data) == 0){ + NPC_PoolItemShop_printWindow_Start( meindex, talkerindex); + }else { + NPC_PoolItemShop_PoolItem( meindex, talkerindex, atoi(data)-1); + } + break; + case CHAR_WINDOWTYPE_POOLITEMSHOP_DRAW_MSG: + if( atoi( data) == 0){ + NPC_PoolItemShop_printWindow_Start( meindex, talkerindex); + }else { + NPC_PoolItemShop_DrawItem( meindex, talkerindex, atoi(data)-1); + } + break; + case CHAR_WINDOWTYPE_POOLITEMSHOP_FULL_MSG: + NPC_PoolItemShop_printWindow_Start( meindex, talkerindex); + break; + case CHAR_WINDOWTYPE_POOLITEMSHOP_HAVEITEMFULL_MSG: + NPC_PoolItemShop_printWindow_Start( meindex, talkerindex); + break; + +#ifdef _NPC_DEPOTITEM + case CHAR_WINDOWTYPE_DEPOTITEMSHOP_MENU: + if( !CHAR_CheckDepotItem( talkerindex) ){ + CHAR_GetDepotItem( meindex, talkerindex); + return; + }else{ + NPC_PoolItemShop_DepotItem_Menu( meindex, talkerindex); + } + break; + case CHAR_WINDOWTYPE_DEPOTITEMSHOP_HANDLE: + if( !CHAR_CheckDepotItem( talkerindex) ) return ; + switch( atoi( data)) { + case 1://放入 + if( CHAR_findEmptyDepotItem( talkerindex) == -1 ){ + CHAR_talkToCli( talkerindex, -1, "仓库已满!", CHAR_COLORYELLOW); + return; + } + NPC_DepotItem_Item_printWindow( meindex, talkerindex); + break; + case 2: + if( CHAR_findEmptyItemBox( talkerindex) == -1 ) { + CHAR_talkToCli( talkerindex, -1, "身上道具栏位已满!", CHAR_COLORYELLOW); + return; + } + NPC_DepotItem_Depot_printWindow( meindex, talkerindex); + break; + } + break; + case CHAR_WINDOWTYPE_DEPOTITEMSHOP_ADD://放入 + if( !CHAR_CheckDepotItem( talkerindex) ) return ; + if( atoi( data) == 0){ + NPC_PoolItemShop_DepotItem_Menu( meindex, talkerindex); + }else { + if( NPC_DepotItem_InsertItem( meindex, talkerindex, atoi( data)-1) == FALSE ){ + NPC_PoolItemShop_DepotItem_Menu( meindex, talkerindex); + CHAR_talkToCli( talkerindex, -1, "存放道具失败,请稍後再试!", CHAR_COLORYELLOW); + } + } + break; + case CHAR_WINDOWTYPE_DEPOTITEMSHOP_GET: + if( !CHAR_CheckDepotItem( talkerindex) ) return ; + if( atoi( data) == 0){ + NPC_PoolItemShop_DepotItem_Menu( meindex, talkerindex); + }else { + if( NPC_DepotItem_gettItem( meindex, talkerindex, atoi( data)-1) == FALSE ){ + NPC_PoolItemShop_DepotItem_Menu( meindex, talkerindex); + CHAR_talkToCli( talkerindex, -1, "取出道具失败,请稍後再试!", CHAR_COLORYELLOW); + } + } + break; +#endif + + default: + break; + } +} + +void NPC_PoolItemShop_printWindow_Start( int meindex, int talkerindex) +{ + int fd; + + fd = getfdFromCharaIndex( talkerindex); + if( fd != -1 ) { + char message[1024]; + char buf[2048]; + +#ifdef _NPC_DEPOTITEM + strcpy( message, + "3\n\n" + " 欢迎光临\n\n" + " <寄放道具>\n" + " <取回道具>\n" + " <使用仓库>\n\n" + " < 离开 >" + ); +#else + strcpy( message, + "3\n\n" + " 欢迎光临\n\n" + " <寄放道具>\n" + " <取回道具>\n\n\n" + " < 离开 >" + ); +#endif + + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_SELECT, + WINDOW_BUTTONTYPE_NONE, + CHAR_WINDOWTYPE_POOLITEMSHOP_START, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + makeEscapeString( message, buf, sizeof(buf))); + } +} + +#ifdef _NPC_DEPOTITEM +void NPC_PoolItemShop_DepotItem_Menu( int meindex, int talkerindex) +{ + int fd; + + fd = getfdFromCharaIndex( talkerindex); + if( fd != -1 ) { + char message[1024]; + char buf[2048]; + + strcpy( message, + "3\n\n" + " 使用道具仓库\n\n" + " <存放道具>\n" + " <取回道具>\n" + ); + + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_SELECT, + WINDOW_BUTTONTYPE_CANCEL, + CHAR_WINDOWTYPE_DEPOTITEMSHOP_HANDLE, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + makeEscapeString( message, buf, sizeof(buf))); + } +} + +void NPC_DepotItem_MakeItemString( int meindex, int talkerindex, char *retstring,int retstringlen) +{ + int i; + int itemindex; + int pos = 0; + char buff[1024]; + + retstring[0] = '\0'; + for( i = CHAR_STARTITEMARRAY; i < CHAR_MAXITEMHAVE; i ++ ) { + int poolflg = FALSE; + itemindex = CHAR_getItemIndex( talkerindex, i); + if( !ITEM_CHECKINDEX( itemindex) ) continue; + + if( ITEM_getInt( itemindex, ITEM_DROPATLOGOUT) || ITEM_getInt( itemindex, ITEM_VANISHATDROP) || + !ITEM_getInt( itemindex, ITEM_CANPETMAIL) ) { + poolflg = TRUE; + } + snprintf( buff, sizeof( buff), +#ifdef _ITEM_PILENUMS + "%s|%d|%d|%d|%s|%d|%d|", +#else + "%s|%d|%d|%d|%s|%d|", +#endif + ITEM_getChar( itemindex, ITEM_SECRETNAME), + poolflg,CHAR_getWorkInt( meindex, NPC_WORK_COST), + ITEM_getInt( itemindex, ITEM_BASEIMAGENUMBER), + ITEM_getChar( itemindex, ITEM_EFFECTSTRING), +#ifdef _ITEM_PILENUMS + ITEM_getInt( itemindex, ITEM_USEPILENUMS), +#endif + i + 1 ); + + if( pos +strlen( buff)>= retstringlen) { + fprint( "buffer over err\n"); + break; + } + strcpy( &retstring[pos], buff); + pos += strlen( buff); + } +} + +void NPC_DepotItem_Item_printWindow( int meindex, int talkerindex) +{ + char itemstring[65536-1024]; + char sendstring[65536]; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buff2[1024]; + char buff3[1024]; + char buff4[1024]; + int fd; + + if( (fd = getfdFromCharaIndex( talkerindex)) == -1 ){ + fprint( "err\n"); + return; + } + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + snprintf( sendstring, sizeof( sendstring), "0|%d|%s|%s|%s|%s|", + CHAR_getfindEmptyDepotItem( talkerindex), + CHAR_getChar( meindex, CHAR_NAME), + NPC_PoolItemShop_getMsg_noarg( NPC_POOLITEMSHOP_MSG_POOL, argstr, buff2, sizeof( buff2)), + NPC_PoolItemShop_getMsg_noarg( NPC_POOLITEMSHOP_MSG_POOLFULL, argstr, buff3, sizeof( buff3)), + NPC_PoolItemShop_getMsg_noarg( NPC_POOLITEMSHOP_MSG_REALY, argstr, buff4, sizeof( buff4)) + ); + + NPC_DepotItem_MakeItemString( meindex, talkerindex, itemstring, sizeof( itemstring)); + strcat( sendstring, itemstring); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_POOLITEMSHOPMAIN, + WINDOW_BUTTONTYPE_NONE, + CHAR_WINDOWTYPE_DEPOTITEMSHOP_ADD, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), sendstring); + +} + +void NPC_DepotItem_MakeDepotString( int meindex, int talkerindex, char *retstring,int retstringlen) +{ + int i; + int itemindex; + int pos = 0; + char buff[1024]; + + retstring[0] = '\0'; + for( i = 0; i < /*60*/CHAR_MAXDEPOTITEMHAVE; i ++ ) { + int poolflg = FALSE; + itemindex = CHAR_getDepotItemIndex( talkerindex, i); + if( !ITEM_CHECKINDEX( itemindex)) continue; + snprintf( buff, sizeof( buff), +#ifdef _ITEM_PILENUMS + "%s|%d|%d|%d|%d|%s|%d|", +#else + "%s|%d|%d|%d|%d|%s|", +#endif + ITEM_getChar( itemindex, ITEM_SECRETNAME), + poolflg, + ITEM_getInt( itemindex, ITEM_LEVEL), + ITEM_getInt( itemindex, ITEM_COST), + ITEM_getInt( itemindex, ITEM_BASEIMAGENUMBER), + ITEM_getChar( itemindex, ITEM_EFFECTSTRING) +#ifdef _ITEM_PILENUMS + ,ITEM_getInt( itemindex, ITEM_USEPILENUMS) +#endif + ); + if( pos +strlen( buff)>= retstringlen) { + fprint( "buffer over err\n"); + break; + } + strcpy( &retstring[pos], buff); + pos += strlen( buff); + } + +} + +void NPC_DepotItem_Depot_printWindow( int meindex, int talkerindex) +{ + char itemstring[65536-1024]; + char sendstring[65536]; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buff[1024]; + char buff2[1024]; + char buff3[1024]; + int fd; + + if( (fd = getfdFromCharaIndex( talkerindex)) == -1 )return; + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + snprintf( sendstring, sizeof( sendstring), "1|%s|%s|%s|%s|", + CHAR_getChar( meindex, CHAR_NAME), + NPC_PoolItemShop_getMsg_noarg( NPC_POOLITEMSHOP_MSG_DRAW, argstr, buff2, sizeof( buff2)), + NPC_PoolItemShop_getMsg_noarg( NPC_POOLITEMSHOP_MSG_ITEMFULL, argstr, buff, sizeof( buff)), + NPC_PoolItemShop_getMsg_noarg( NPC_POOLITEMSHOP_MSG_REALY, argstr, buff3, sizeof( buff3)) + ); + NPC_DepotItem_MakeDepotString( meindex, talkerindex, itemstring, sizeof( itemstring)); + strcat( sendstring, itemstring); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_POOLITEMSHOPMAIN, + WINDOW_BUTTONTYPE_NONE, + CHAR_WINDOWTYPE_DEPOTITEMSHOP_GET, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + sendstring); + + //print("\n NPC_DepotItem_Depot_printWindow:%s size:%d ", sendstring, strlen(sendstring)); +} + +void NPC_DepotItem_CheckRepeat_Del( int charaindex, int ti, int itemindex) +{ + char token[256]; + sprintf( token, "仓库道具%s,编码重复!(系统清除)", + ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( charaindex, -1, token, CHAR_COLORYELLOW); + LogItem( + CHAR_getChar( charaindex, CHAR_NAME ), + CHAR_getChar( charaindex, CHAR_CDKEY ), +#ifdef _add_item_log_name + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID), +#endif + "repeat(仓库道具重复)", + 0, 0, 0, + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) ); + + CHAR_setDepotItemIndex( charaindex, ti, -1); + ITEM_endExistItemsOne( itemindex); +} + +void NPC_DepotItem_CheckRepeat( int talkerindex) +{ + int i, j, cnt=0, itemindex, itemindex1; + + for( i=0; i<(CHAR_MAXDEPOTITEMHAVE-1); i++){ + itemindex = CHAR_getDepotItemIndex( talkerindex, i); + if( !ITEM_CHECKINDEX( itemindex)) continue; + cnt=0; + for( j=(i+1); j= arraysizeof( poolshopmsg)) return NULL; + + if( NPC_Util_GetStrFromStrWithDelim( argstr, poolshopmsg[tablenum].option, buf, sizeof( buf)) != NULL ) { + strcpysafe( retstring, retstringlen, buf); + }else { + strcpysafe( retstring, retstringlen, poolshopmsg[tablenum].defaultmsg); + } + return retstring; +} + +static void NPC_PoolItemShop_MakeItemString_Pool( int meindex, int talkerindex, + char *retstring,int retstringlen) +{ + int i; + int itemindex; + int pos = 0; + char buff[1024]; + + retstring[0] = '\0'; + for( i = CHAR_STARTITEMARRAY; i < CHAR_MAXITEMHAVE; i ++ ) { + itemindex = CHAR_getItemIndex( talkerindex, i); + if( ITEM_CHECKINDEX( itemindex)) { + int poolflg = FALSE; + if( ITEM_getInt( itemindex, ITEM_DROPATLOGOUT) || + ITEM_getInt( itemindex, ITEM_VANISHATDROP) || + !ITEM_getInt( itemindex, ITEM_CANPETMAIL)){ + poolflg = TRUE; + } + snprintf( buff, sizeof( buff), +#ifdef _ITEM_PILENUMS + "%s|%d|%d|%d|%s|%d|%d|", +#else + "%s|%d|%d|%d|%s|%d|", +#endif + ITEM_getChar( itemindex, ITEM_SECRETNAME), + poolflg,CHAR_getWorkInt( meindex, NPC_WORK_COST), + ITEM_getInt( itemindex, ITEM_BASEIMAGENUMBER), + ITEM_getChar( itemindex, ITEM_EFFECTSTRING), +#ifdef _ITEM_PILENUMS + ITEM_getInt( itemindex, ITEM_USEPILENUMS), +#endif + i + 1 ); + if( pos +strlen( buff)>= retstringlen) { + fprint( "buffer over err\n"); + break; + } + strcpy( &retstring[pos], buff); + pos += strlen( buff); + } + } +} + +static void NPC_PoolItemShop_MakeItemString_Draw( int meindex, int talkerindex, + char *retstring,int retstringlen) +{ + int i; + int itemindex; + int pos = 0; + char buff[1024]; + + retstring[0] = '\0'; + for( i = 0; i < CHAR_MAXPOOLITEMHAVE; i ++ ) { + itemindex = CHAR_getPoolItemIndex( talkerindex, i); + if( ITEM_CHECKINDEX( itemindex)) { + int poolflg = FALSE; + snprintf( buff, sizeof( buff), +#ifdef _ITEM_PILENUMS + "%s|%d|%d|%d|%d|%s|%d|", + +#else + "%s|%d|%d|%d|%d|%s|", +#endif + ITEM_getChar( itemindex, ITEM_SECRETNAME), + poolflg, + ITEM_getInt( itemindex, ITEM_LEVEL), + ITEM_getInt( itemindex, ITEM_COST), + ITEM_getInt( itemindex, ITEM_BASEIMAGENUMBER), + ITEM_getChar( itemindex, ITEM_EFFECTSTRING) +#ifdef _ITEM_PILENUMS + ,ITEM_getInt( itemindex, ITEM_USEPILENUMS) +#endif + ); + if( pos +strlen( buff)>= retstringlen) { + fprint( "buffer over err\n"); + break; + } + strcpy( &retstring[pos], buff); + pos += strlen( buff); + } + } +} + +static BOOL NPC_PoolItemShop_PoolItem( int meindex, int talkerindex, int num) +{ + int emptyindex; + int itemindex; + int cost = CHAR_getWorkInt( meindex, NPC_WORK_COST); + + emptyindex = CHAR_getCharPoolItemIndexElement( talkerindex); + if( emptyindex == -1 ) { + return FALSE; + } + + itemindex = CHAR_getItemIndex( talkerindex, num); + if( !ITEM_CHECKINDEX( itemindex)) { + fprint( "err"); + return FALSE; + } + CHAR_DelGold( talkerindex, cost ); + + CHAR_setPoolItemIndex( talkerindex, emptyindex, itemindex); + + CHAR_setItemIndex( talkerindex, num, -1); + CHAR_sendItemDataOne( talkerindex, num); + + CHAR_send_P_StatusString( talkerindex, CHAR_P_STRING_GOLD); + LogItem( + CHAR_getChar( talkerindex, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( talkerindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID), /* 失奶 丞 寞 */ +#endif + "pool(寄放道具)", + CHAR_getInt( talkerindex,CHAR_FLOOR), + CHAR_getInt( talkerindex,CHAR_X ), + CHAR_getInt( talkerindex,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + + ); + return TRUE; +} + +static BOOL NPC_PoolItemShop_DrawItem( int meindex, int talkerindex, int num) +{ + int emptyindex; + int itemindex; + int i; + int cnt; + int work[CHAR_MAXPOOLITEMHAVE]; + + emptyindex = CHAR_findEmptyItemBox( talkerindex); + if( emptyindex == -1 ) return FALSE; + + itemindex = CHAR_getPoolItemIndex( talkerindex, num); + if( !ITEM_CHECKINDEX( itemindex)) { + fprint( "err\n"); + return FALSE; + } + CHAR_setItemIndex( talkerindex, emptyindex, itemindex); + CHAR_setPoolItemIndex( talkerindex, num, -1); + CHAR_sendItemDataOne( talkerindex, emptyindex); + for( i = 0; i < CHAR_MAXPOOLITEMHAVE; i ++ ) { + work[i] = -1; + } + cnt = 0; + for( i = 0; i < CHAR_MAXPOOLITEMHAVE; i ++ ) { + itemindex = CHAR_getPoolItemIndex( talkerindex, i); + if( ITEM_CHECKINDEX( itemindex)) { + work[ cnt++] = itemindex; + } + } + for( i = 0; i < CHAR_MAXPOOLITEMHAVE; i ++ ) { + CHAR_setPoolItemIndex( talkerindex, i, work[i]); + } + LogItem( + CHAR_getChar( talkerindex, CHAR_NAME ), + CHAR_getChar( talkerindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID), +#endif + "draw(领取道具)", + CHAR_getInt( talkerindex,CHAR_FLOOR), + CHAR_getInt( talkerindex,CHAR_X ), + CHAR_getInt( talkerindex,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + return TRUE; +} diff --git a/gmsv/npc/npc_quiz.c b/gmsv/npc/npc_quiz.c new file mode 100644 index 0000000..e84cfbc --- /dev/null +++ b/gmsv/npc/npc_quiz.c @@ -0,0 +1,1426 @@ +#include "version.h" +#include +#include "common.h" +#include "char_base.h" +#include "npc_quiz.h" +#include "npcutil.h" +#include "char.h" +#include "lssproto_serv.h" +#include "buf.h" +#include "function.h" +#include "readmap.h" +#include "object.h" +#include "log.h" + +#define MEPLAYER 8 +#define OLDNO 100 + +enum { + CHAR_WORK_PLAYER1 = CHAR_NPCWORKINT1, + CHAR_WORK_PLAYER2 = CHAR_NPCWORKINT2, + CHAR_WORK_PLAYER3 = CHAR_NPCWORKINT3, + CHAR_WORK_PLAYER4 = CHAR_NPCWORKINT4, + CHAR_WORK_PLAYER5 = CHAR_NPCWORKINT5, + CHAR_WORK_PLAYER6 = CHAR_NPCWORKINT6, + CHAR_WORK_PLAYER7 = CHAR_NPCWORKINT7, + CHAR_WORK_PLAYER8 = CHAR_NPCWORKINT8, + CHAR_WORK_QUIZNUM = CHAR_NPCWORKINT9, +}; + +NPC_QUIZ* Quiz; + +struct pl{ + int talkerindex; + int quizno; + int answer; + int ansno; + int oldno[OLDNO]; + int *ptr; +}; + + +static int quizcnt = 0; + + +static void NPC_Quiz_selectWindow( int meindex, int talker, int num); +int *NPC_GetQuestion(int meindex); +BOOL NPC_QuizItemFullCheck(int meindex, int talker); +BOOL NPC_PlayerCheck(int meindex,int talker); +int NPC_RealyCheack(int meindex,int talker); +int NPC_QuizRandAnswer(int p_no,int q_no, int mode, + char *work1,char *work2,char *work3); +int NPC_QuizBorderLine(int ans, char *buf); +int NPC_QuizWarpBorderLine(int ans, char *buf); + +BOOL NPC_QuizAddItem(int talker,char *buf); + +BOOL NPC_EntryItemDel(int talker,char *buf); +BOOL NPC_EntryItemCheck(int talker,char *buf); +BOOL NPC_EntryStoneDel(int talker,char *buf); +BOOL NPC_EntryStoneCheck(int talker,char *buf); +BOOL NPC_QUIZPARTY_CHAECK(int meindex,int talker); + +BOOL NPC_QuizInit( int meindex ) +{ + + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[1024]; + int *tbl; + int i; + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + + if(NPC_Util_GetStrFromStrWithDelim( argstr, "StartMsg", buf, sizeof( buf)) == NULL){ + print("Quiz_StartMsgErr:%s", CHAR_getChar( meindex, CHAR_NAME)); + return FALSE; + } + + if(NPC_Util_GetStrFromStrWithDelim( argstr, "Quiznum", buf, sizeof( buf)) == NULL){ + print("QuizNumErrErr:%s", CHAR_getChar( meindex, CHAR_NAME)); + return FALSE; + } + + CHAR_setWorkInt( meindex, CHAR_WORK_QUIZNUM, atoi( buf)); + + for(i =0 ; i < 8 ; i++){ + CHAR_setWorkInt( meindex, CHAR_WORK_PLAYER1 + i, -1); + } + tbl = NPC_GetQuestion( meindex); + + if( CHAR_getWorkInt( meindex, CHAR_WORK_QUIZNUM) > ( tbl[0] - 1)){ + print( + "%s丗符合条件,圆圈quiz的问题数(%d 比出题数(%d题)不足", + CHAR_getChar( meindex, CHAR_NAME), + (tbl[0]-1), + CHAR_getWorkInt( meindex, CHAR_WORK_QUIZNUM) + ); + return FALSE; + } + + return TRUE; + +} + +void NPC_QuizTalked( int meindex , int talkerindex , char *szMes , + int color ) +{ + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) { + return; + } + if( NPC_Util_CharDistance( talkerindex, meindex ) > 1) return; + + if(NPC_QUIZPARTY_CHAECK(meindex,talkerindex)==FALSE){ + NPC_Quiz_selectWindow( meindex, talkerindex, 4); + + } + if(NPC_QuizItemFullCheck(meindex, talkerindex) == FALSE){ + NPC_Quiz_selectWindow( meindex, talkerindex, 3); + }else{ + NPC_Quiz_selectWindow( meindex, talkerindex, 0); + } +} + +static void NPC_Quiz_selectWindow( int meindex, int talker, int num) +{ + + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char token[1024]; + char buf[256]; + char buf2[256]; + char buf3[256]; + + int i = 0,k; + int questionno = 0; + int fd = getfdFromCharaIndex( talker); + int buttontype = 0; + int messagetype = 0; + int windowno = 0; + int len = 4; + int p_no; + int p_old; + int loop=0; + int ans; + BOOL entryflg = TRUE; + switch( num) { + case 0: + if(NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)) == NULL){ + print("GetArgstrErr:Quiz %s",CHAR_getChar( meindex, CHAR_NAME)); + } + if(NPC_Util_GetStrFromStrWithDelim( argstr,"StartMsg", + token, sizeof( token)) == NULL){ + print("%s的StartMsg不存在", CHAR_getChar(meindex,CHAR_NAME)); + return; + } + buttontype = WINDOW_BUTTONTYPE_YESNO; + messagetype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_QUIZ_START; + break; + + case 1: + if(NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)) == NULL){ + print("GetArgstrErr:Quiz %s",CHAR_getChar( meindex, CHAR_NAME)); + } + if(NPC_Util_GetStrFromStrWithDelim( argstr,"EntryItem", + buf2, sizeof( buf2)) != NULL){ + if(NPC_EntryItemCheck( talker, buf2) == FALSE){ + entryflg = FALSE; + } + } + if(NPC_Util_GetStrFromStrWithDelim( argstr,"EntryStone", + buf3, sizeof( buf3)) != NULL){ + if(NPC_EntryStoneCheck( talker, buf3) == FALSE){ + entryflg = FALSE; + } + } + if(entryflg == FALSE){ + if(NPC_Util_GetStrFromStrWithDelim( argstr,"NoEntryMsg", + token, sizeof( token)) != NULL) { + buttontype = WINDOW_BUTTONTYPE_OK; + messagetype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_QUIZ_START; + + } + + }else if(NPC_PlayerCheck( meindex, talker) == FALSE) { + /*--谛醒左□田□---*/ + sprintf(token,"\n\n\n 请,稍等一下" + "\n{{ ㄠ蘸卞公氏卅卞锹澎匹五卅中井日" + ); + buttontype = WINDOW_BUTTONTYPE_OK; + messagetype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_QUIZ_START; + + }else{ + if(NPC_Util_GetStrFromStrWithDelim( argstr,"EntryItem", + buf2, sizeof( buf2)) != NULL){ + if(NPC_EntryItemDel( talker, buf2) ==FALSE){ + print("道具没有消失(%s)",CHAR_getChar(meindex,CHAR_NAME)); + return; + } + } + if(NPC_Util_GetStrFromStrWithDelim( argstr,"EntryStone", + buf3, sizeof( buf3)) != NULL){ + if(NPC_EntryStoneDel( talker, buf3) ==FALSE){ + print("金钱没有消失(%s)",CHAR_getChar(meindex,CHAR_NAME)); + return; + } + } + NPC_Quiz_selectWindow(meindex, talker, 2); + return; + } + break; + + case 3: + if(NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)) == NULL){ + print("GetArgstrErr:Quiz %s",CHAR_getChar( meindex, CHAR_NAME)); + } + + /*-- 旦正□玄丢永本□斥 --*/ + if(NPC_Util_GetStrFromStrWithDelim( argstr,"ItemFullMsg", + token, sizeof( token)) == NULL) + { + print("%s的ItemFullMsg不存在", CHAR_getChar(meindex,CHAR_NAME)); + return; + } + + buttontype = WINDOW_BUTTONTYPE_OK; + messagetype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_QUIZ_START; + + break; + case 2: + /*--丢奶件--*/ + { + int *tbl; + int point; + int *pl_ptr; + int warp_flg = -1; + int floor=0,x=0,y=0; + + struct pl PLAYER; + + + /*--由□ 奴□卞卅匀化卅中井--*/ + if(NPC_QUIZPARTY_CHAECK(meindex,talker)==FALSE){ + NPC_Quiz_selectWindow( meindex, talker, 4); + } + + + + /*--荸蚕樊 寞毛 月--*/ + p_no = CHAR_getWorkInt( talker, CHAR_WORKSHOPRELEVANT); + point = CHAR_getWorkInt( meindex, CHAR_WORK_PLAYER1 + p_no); + pl_ptr = (int *)point; + + /*-- 丢乒伉及 毛厌瞻 卞戊疋□ --*/ + memcpy(&PLAYER, pl_ptr, sizeof(struct pl)); + + /*--蝈化及 锁互蔽歹匀凶及匹瑛绊毛 屡--*/ + if(PLAYER.quizno + == CHAR_getWorkInt( meindex, CHAR_WORK_QUIZNUM)) + { + double avg; + int okflg; + char buf2[512]; + + /*-- arg白央奶伙及 心 心 --*/ + if(NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)) == NULL) + { + print("GetArgstrErr:Quiz %s",CHAR_getChar( meindex, CHAR_NAME)); + } + + /*--恳荸醒卞杀元化失奶 丞毛馨笛允月---*/ + if(NPC_Util_GetStrFromStrWithDelim( argstr, "GetItem", buf, sizeof( buf) ) + !=NULL) + { + okflg = NPC_QuizBorderLine(PLAYER.answer,buf); + if(okflg == -1) + { + + }else{ + + getStringFromIndexWithDelim(buf , "," , okflg+1, buf3, sizeof(buf3)); + if(NPC_QuizAddItem( talker, buf3) == FALSE) return ; + + } + } + + /*--恳荸醒卞杀元化失奶 丞毛馨笛允月---*/ + if(NPC_Util_GetStrFromStrWithDelim( argstr, "Border", buf, sizeof( buf) ) + !=NULL) + { + okflg = NPC_QuizBorderLine(PLAYER.answer,buf); + if(okflg == -1) + { + NPC_Util_GetStrFromStrWithDelim( argstr, "FailureMsg", + buf2,sizeof(buf2)); + + CHAR_talkToCli( talker, meindex, buf2, CHAR_COLORWHITE); + + }else{ + + getStringFromIndexWithDelim(buf , "," , okflg+1, buf2, sizeof(buf2)); + CHAR_talkToCli( talker, meindex, buf2, CHAR_COLORWHITE); + } + } + + + /*--恳荸醒卞杀元化伐□皿今六月---*/ + if(NPC_Util_GetStrFromStrWithDelim( argstr, "Warp", buf, sizeof( buf) ) + !=NULL) + { + warp_flg = NPC_QuizWarpBorderLine(PLAYER.answer,buf); + if(warp_flg != -1) { + char warpbuf[32]; + + getStringFromIndexWithDelim(buf , "," , warp_flg+1, buf2, sizeof(buf2)); + getStringFromIndexWithDelim(buf2 , "." , 1, warpbuf, sizeof(warpbuf)); + floor = atoi(warpbuf); + getStringFromIndexWithDelim(buf2 , "." , 2, warpbuf, sizeof(warpbuf)); + x = atoi(warpbuf); + getStringFromIndexWithDelim(buf2 , "." , 3, warpbuf, sizeof(warpbuf)); + y = atoi(warpbuf); + } + } + + + + /*-- 失矛伊□斥( 剽)毛菲户月 -*/ + avg = (double)PLAYER.answer / + CHAR_getWorkInt( meindex, CHAR_WORK_QUIZNUM) * 100; +#if 0 + sprintf(token,"{{{{{{{" + "\n\n你的正确解答率是 %d题中 %d 题 " + "\n正确比率 %d 亾" + "\n\n%s", + CHAR_getWorkInt( meindex, CHAR_WORK_QUIZNUM), + PLAYER.answer, + (int)avg, + buf2 + ); +#endif + + /*--皿伊奶乩□及伐□弁 毛赓渝祭 -*/ + CHAR_setWorkInt( meindex, CHAR_WORK_PLAYER1 + + CHAR_getWorkInt( talker, CHAR_WORKSHOPRELEVANT) ,-1); + +// print("\n %s %d开放",CHAR_getChar(talker,CHAR_NAME),(int)PLAYER.ptr); + + /*--丢乒伉 钒 --*/ + free(PLAYER.ptr); + +#if 0 + /*-仇仇匹霜耨允月--*/ + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + CHAR_WINDOWTYPE_QUIZ_START, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); +#endif + + //蝈化及蔽 质 互蔽歹匀化井日伐□皿今六月[ + if(warp_flg != -1){ + CHAR_warpToSpecificPoint(talker, floor, x, y); + } + return; + + } + + /*--仇及 卞涩烂今木化中月椭瘀及 锁 寞毛 五请允--*/ + tbl = NPC_GetQuestion( meindex); + + + /*-- 锁醒及民尼永弁 tbl[0]卞反椭瘀毛 凶仄凶 锁醒互反中匀化中月 --*/ + if( CHAR_getWorkInt( meindex, CHAR_WORK_QUIZNUM) > ( tbl[0] - 1)) + { + /*-- 锁互箫曰卅中--*/ + /*--丢乒伉 钒 --*/ + free(PLAYER.ptr); + return ; + } + + /*-- 锁毛 --*/ + while(1){ + loop++; + i = rand()%( tbl[0]); + if(i == 0) continue; + questionno = tbl[i]; + + /*--褐 民尼永弁--*/ + for( k = 0 ; k < OLDNO ; k++){ + if(PLAYER.oldno[k] == questionno) { + loop = 0; + break; + } + } + if(k == OLDNO) break; + + /*-- 蜃伙□皿 鞅--*/ + if(loop == 5000) { + print("问题不足i全部重覆了j"); + break; + } + } + + p_no = CHAR_getWorkInt( talker, CHAR_WORKSHOPRELEVANT); + p_old = CHAR_getWorkInt( talker, CHAR_WORKSHOPRELEVANTSEC); + + PLAYER.quizno++; + + /*-- 漆引匹及 锁 寞毛筏盛仄化云仁--*/ + PLAYER.oldno[p_old] = questionno; + p_old++; + CHAR_setWorkInt( talker, CHAR_WORKSHOPRELEVANTSEC, p_old); + + strncpy( buf, Quiz[questionno].question, + sizeof( Quiz[questionno].question)); + + /*--弁奶术及 锁及赢今卞方匀化}蓟 及 憎匏 毛 尹月--*/ + if(strlen( buf) < 40) { + strcat( buf, "\n"); + }else if(strlen( buf) > 79) { + len = 5; + } + + /*--签贿穴永民--*/ + if( Quiz[questionno].answertype == 4) { + + if(strlen( buf) < 40) { + strcat( buf,"\n\n"); + }else if( strlen( buf) < 80) { + strcat( buf,"\n\n"); + }else{ + strcat( buf,"\n"); + } + + /*--踏五 锁--*/ + sprintf( token," quiz 第 %d 题" + "\n%s " + "\n↓写在这里\n" + " (写完请按OK)", + PLAYER.quizno, + buf); + + buttontype = WINDOW_BUTTONTYPE_OK; + messagetype = WINDOW_MESSAGETYPE_MESSAGEANDLINEINPUT; + windowno = CHAR_WINDOWTYPE_QUIZ_MAIN; + + /*--蜇箕及橇须毛丢乒伉卞筏盛今六化云仁--*/ + memcpy(pl_ptr,&PLAYER,sizeof(struct pl)); + + break; + + /*--{ㄢ 锁{--*/ + }else if( Quiz[questionno].answertype == 2) { + char work1[128]; + char work2[128]; + char work3[128]; + + ans = (rand() % 3) + 1; + + ans = NPC_QuizRandAnswer(p_no,questionno,3, work1,work2,work3); + PLAYER.ansno = ans; + + /*-- 弁奶术 (ㄢ --*/ + sprintf(token,"%d\n quiz 第 %d 题" + "\n%s " + "\n\n1. %s" + "\n2. %s" + "\n3. %s", + len, + PLAYER.quizno, + buf, + work1, + work2, + work3 + ); + + /*-- ㄡ 锁 --*/ + }else if( Quiz[questionno].answertype == 1){ + char work1[128]; + char work2[128]; + char work3[128]; + + strcpy(work3,"-1"); + ans = NPC_QuizRandAnswer(p_no,questionno,2, work1,work2,work3); + PLAYER.ansno = ans; + + /*-- 弁奶术 (ㄡ --*/ + sprintf(token,"%d\n quiz 第 %d 题" + "\n%s " + "\n\n1. %s" + "\n2. %s", + len, + PLAYER.quizno, + buf, + work1, + work2 + ); + } + buttontype = WINDOW_BUTTONTYPE_CANCEL; + messagetype = WINDOW_MESSAGETYPE_SELECT; + windowno = CHAR_WINDOWTYPE_QUIZ_MAIN; + + memcpy(pl_ptr,&PLAYER,sizeof(struct pl)); + + } + break; + + case 4: + /*-- arg白央奶伙及 心 心 --*/ + if(NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)) == NULL) + { + print("GetArgstrErr:Quiz %s",CHAR_getChar( meindex, CHAR_NAME)); + } + + if(NPC_Util_GetStrFromStrWithDelim( argstr,"Party", + token, sizeof( token)) != NULL) + { + buttontype = WINDOW_BUTTONTYPE_OK; + messagetype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_QUIZ_START; + } + + break; + + } + + /*-仇仇匹霜耨允月--*/ + lssproto_WN_send( fd, messagetype, + buttontype, + windowno, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); +} + +void NPC_QuizWindowTalked( int meindex, int talkerindex, + int seqno, int select, char *data) +{ + int i=0; + int old_no; + + if( NPC_Util_CharDistance( talkerindex, meindex ) > 1) { + return; + } + switch( seqno){ + case CHAR_WINDOWTYPE_QUIZ_START: + if( select == WINDOW_BUTTONTYPE_YES) { + NPC_Quiz_selectWindow(meindex, talkerindex, 1); + } + + if(select == WINDOW_BUTTONTYPE_OK){ + } + + break; + + case CHAR_WINDOWTYPE_QUIZ_MAIN: + { + int point; + int *pl_ptr; + int p_no; + struct pl PLAYER; + + p_no = CHAR_getWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT); + point = CHAR_getWorkInt( meindex, CHAR_WORK_PLAYER1 + p_no); + pl_ptr = (int *)point; + + + memcpy(&PLAYER,pl_ptr,sizeof(struct pl)); + + p_no = CHAR_getWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT); + old_no = CHAR_getWorkInt( talkerindex, CHAR_WORKSHOPRELEVANTSEC)-1; + i= PLAYER.oldno[old_no]; + + if(select == WINDOW_BUTTONTYPE_OK){ + if( i >= quizcnt || i < 0 ) return; + if( Quiz == NULL || strlen( Quiz[i].select1) >= 128 ) return; + + if( strstr( data, Quiz[i].select1) != NULL) { + PLAYER.answer++; + } + memcpy(pl_ptr,&PLAYER,sizeof(struct pl)); + NPC_Quiz_selectWindow(meindex, talkerindex, 2); + }else if(select == WINDOW_BUTTONTYPE_CANCEL){ + CHAR_setWorkInt( meindex, CHAR_WORK_PLAYER1 + + CHAR_getWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT) ,-1); + free(PLAYER.ptr); + }else if( atoi( data) == 0){ + }else{ + if(atoi(data) == PLAYER.ansno){ + PLAYER.answer++; + } + memcpy(pl_ptr,&PLAYER,sizeof(struct pl)); + NPC_Quiz_selectWindow(meindex, talkerindex, 2); + } + } + break; + + } + + +} + +/* + *示□母□仿奶件及民尼永弁 + */ +int NPC_QuizBorderLine(int ans ,char *buf) +{ + char buf2[32]; + int j = 1; + int border; + + + while(getStringFromIndexWithDelim(buf , "," , j, buf2, sizeof( buf2)) + !=FALSE ) + { + border = atoi(buf2); + + if(ans >= border) { + return j; + } + + j += 2; + + } + return -1; +} +/* + *示□母□仿奶件及民尼永弁 + */ +int NPC_QuizWarpBorderLine(int ans ,char *buf) +{ + char buf2[32]; + int j = 1; + int border; + + + while(getStringFromIndexWithDelim(buf , "," , j, buf2, sizeof( buf2)) + != FALSE ) + { + border = atoi(buf2); + + if(ans >= border) { + return j; + } + + j += 2; + + } + return -1; +} + + +/* + *--失奶 丞毛馨笛今六月 + */ +BOOL NPC_QuizAddItem(int talker,char *buf) +{ + int i=1; + int ret; + char buf2[16]; + int itemindex; + char token[512]; + + /*-- 醒操 午仄化失奶 丞互涩烂今木化中月桦宁反仿件母丞匹蓟少--*/ + while(getStringFromIndexWithDelim(buf , "." , i, buf2, sizeof(buf2)) + != FALSE ) + { + i++; + } + i--; + if(i == 1){ + getStringFromIndexWithDelim(buf , "." , i, buf2, sizeof(buf2)); + }else{ + /*--仿件母丞--*/ + i = (rand() % i)+1; + getStringFromIndexWithDelim(buf , "." , i, buf2, sizeof(buf2)); + } + + itemindex = ITEM_makeItemAndRegist(atoi(buf2)); + + if(itemindex == -1) return FALSE; + + /*失奶 丞及馨笛( 涛失奶 丞 卞中木化仄引丹 */ + ret = CHAR_addItemSpecificItemIndex( talker, itemindex); + if( !CHAR_CHECKITEMINDEX( talker, ret) ){ + print( "npc_quiz.c: additem error itemindex[%d]\n", itemindex); + ITEM_endExistItemsOne( itemindex); + + CHAR_talkToCli( talker, -1, "道具栏已满", CHAR_COLORWHITE); + + return FALSE; + } + + if(itemindex != -1) { + LogItem( + CHAR_getChar( talker, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( talker, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID), /* 失奶 丞 寞 */ +#endif + "QuizAddItem(猜谜->领到的道具)", + CHAR_getInt( talker, CHAR_FLOOR), + CHAR_getInt( talker, CHAR_X ), + CHAR_getInt( talker, CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + } + + sprintf(token,"拿到%s。", ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( talker, -1, token, CHAR_COLORWHITE); + + + CHAR_sendItemDataOne( talker, ret); + return TRUE; + +} + +int NPC_QuizRandAnswer(int p_no,int q_no, int mode, + char *work1,char *work2,char *work3) +{ + int ans; + int ra; + + ans = (rand() % mode) + 1; + if(ans == 1) { + if( Quiz[q_no].answerNo == 1) { + strcpy( work1, Quiz[q_no].select1); + if(mode == 2) { + strcpy( work2, Quiz[q_no].select2); + return ans; + } + ra = rand()%2; + + if(ra == 0) { + strcpy( work2, Quiz[q_no].select2); + strcpy( work3, Quiz[q_no].select3); + }else{ + strcpy( work2, Quiz[q_no].select3); + strcpy( work3, Quiz[q_no].select2); + } + }else if( Quiz[q_no].answerNo == 2) { + strcpy( work1, Quiz[q_no].select2); + if(mode == 2) { + strcpy( work2, Quiz[q_no].select1); + return ans; + } + + ra = rand()%2; + if(ra == 0) { + strcpy( work2, Quiz[q_no].select1); + strcpy( work3, Quiz[q_no].select3); + }else{ + strcpy( work2, Quiz[q_no].select3); + strcpy( work3, Quiz[q_no].select1); + } + }else{ + strcpy( work1, Quiz[q_no].select3); + ra = rand()%2; + if(ra == 0) { + strcpy( work2, Quiz[q_no].select1); + strcpy( work3, Quiz[q_no].select2); + }else{ + strcpy( work2, Quiz[q_no].select1); + strcpy( work3, Quiz[q_no].select2); + } + } + }else if(ans == 2) { + if(Quiz[q_no].answerNo == 1) { + strcpy( work2, Quiz[q_no].select1); + if(mode == 2) { + strcpy( work1, Quiz[q_no].select2); + return ans; + } + ra=rand()%2; + if(ra == 0) { + strcpy( work1, Quiz[q_no].select2); + strcpy( work3, Quiz[q_no].select3); + }else { + strcpy( work1, Quiz[q_no].select3); + strcpy( work3, Quiz[q_no].select2); + } + }else if( Quiz[q_no].answerNo == 2) { + strcpy( work2, Quiz[q_no].select2); + if(mode == 2){ + strcpy( work1, Quiz[q_no].select1); + return ans; + } + ra = rand()%2; + if(ra == 0) { + strcpy( work1, Quiz[q_no].select1); + strcpy( work3, Quiz[q_no].select3); + }else { + strcpy( work1, Quiz[q_no].select3); + strcpy( work3, Quiz[q_no].select1); + } + }else { + strcpy( work2, Quiz[q_no].select3); + ra = rand()%2; + if(ra == 0) { + strcpy( work1, Quiz[q_no].select1); + strcpy( work3, Quiz[q_no].select2); + }else { + strcpy( work1, Quiz[q_no].select2); + strcpy( work3, Quiz[q_no].select1); + } + } + }else if(ans == 3) { + if( Quiz[q_no].answerNo == 1) { + strcpy( work3, Quiz[q_no].select1); + ra = rand()%2; + if(ra == 0) { + strcpy( work1, Quiz[q_no].select2); + strcpy( work2, Quiz[q_no].select3); + }else { + strcpy( work1, Quiz[q_no].select3); + strcpy( work2, Quiz[q_no].select2); + } + }else if( Quiz[q_no].answerNo == 2) { + strcpy( work3, Quiz[q_no].select2); + ra = rand()%2; + if(ra == 0) { + strcpy( work1, Quiz[q_no].select1); + strcpy( work2, Quiz[q_no].select3); + }else { + strcpy( work1, Quiz[q_no].select3); + strcpy( work2, Quiz[q_no].select1); + } + }else{ + strcpy( work3, Quiz[q_no].select3); + ra = rand()%2; + if(ra == 0) { + strcpy( work1, Quiz[q_no].select1); + strcpy( work2, Quiz[q_no].select2); + }else { + strcpy( work1, Quiz[q_no].select2); + strcpy( work2, Quiz[q_no].select1); + } + } + } + return ans; + +} + + +/*--皿伊奶乩□及民尼永弁 ㄧ谛引匹 --*/ +BOOL NPC_PlayerCheck(int meindex,int talker) + { + int i; + int k=0; + int *ptr; + struct pl Player; + + + NPC_RealyCheack( meindex, talker); + + /*-- 坞五互丐月井" --*/ + for(i = 0 ; i < MEPLAYER ; i++){ + if( (CHAR_getWorkInt( meindex, CHAR_WORK_PLAYER1 +i ) == -1)) + { + break; + } + } + + if(i == MEPLAYER) return FALSE; + + + /*-- 丢乒伉割忡 --*/ + if((ptr =(int *) calloc( 1,sizeof(struct pl))) == NULL){ + print("记忆体无法确保%s",CHAR_getChar(meindex,CHAR_NAME)); + return FALSE; + } + + /*-- 禾奶件正及桦赭毛创尹化云仁??-*/ + Player.ptr = ptr; + Player.talkerindex = talker; //npc及奶件犯永弁旦??? + Player.quizno = 0; //蜇箕及 锁醒 + Player.answer = 0; //恳荸醒 + Player.ansno = 0; //蚕尹及 寞毛创尹化云仁 蚕尹毛田仿田仿卞请仄凶端卞银迕) + + /*--请锁碧心 锁 及赓渝祭--*/ + for(k=0 ; k < OLDNO; k++) { + Player.oldno[k] = -1; + } + + /*--丢乒伉毛戊疋□--*/ + memcpy(ptr,&Player,sizeof(struct pl)); + + + CHAR_setWorkInt( talker, CHAR_WORKSHOPRELEVANTSEC,0); + CHAR_setWorkInt( talker, CHAR_WORKSHOPRELEVANT,0); + CHAR_setWorkInt( talker, CHAR_WORKSHOPRELEVANTTRD,0); + + + /*--愤坌及荸蚕樊 寞毛创尹化云仁--*/ + CHAR_setWorkInt( talker, CHAR_WORKSHOPRELEVANT, i); + + k= (int)ptr; + CHAR_setWorkInt( meindex, CHAR_WORK_PLAYER1 + i, k ); + return TRUE; + +} + +int NPC_RealyCheack(int meindex,int talker) +{ + int fl, x, y; + int i, j; + int px[10] = {0, 1, 0,-1, 1,-1, 1, 0,-1}; + int py[10] = {0,-1,-1,-1, 0, 0, 1, 1, 1}; + int objindex; + + OBJECT object; + int talkerindex; + BOOL okflg = FALSE; + struct pl PLAYER; + int *pl_ptr; + int point; + + fl = CHAR_getInt( meindex, CHAR_FLOOR); + + for(j = 0 ; j < MEPLAYER ; j++) { + point = CHAR_getWorkInt( meindex, CHAR_WORK_PLAYER1 + j); + okflg = FALSE; + if(point == -1) continue; + + /*--荸蚕樊 寞毛 月--*/ + pl_ptr = (int *)point; + + memcpy(&PLAYER, pl_ptr, sizeof(struct pl)); + talkerindex = PLAYER.talkerindex; + + for(i=0 ; i < 10 ; i++) { + x = px[i] + CHAR_getInt( meindex, CHAR_X); + y = py[i] + CHAR_getInt( meindex, CHAR_Y); + + for(object = MAP_getTopObj(fl,x,y) ; object; + object = NEXT_OBJECT( object)) + { + objindex = GET_OBJINDEX( object); + + if( OBJECT_getType( objindex) == OBJTYPE_CHARA ){ + if( OBJECT_getIndex( objindex) == talkerindex) { + if(talkerindex == talker) { + okflg = TRUE; +// print("\n %s %d开放",CHAR_getChar(talker,CHAR_NAME),(int)PLAYER.ptr); + free(PLAYER.ptr); + CHAR_setWorkInt( meindex, CHAR_WORK_PLAYER1 + j,-1); + }else{ + okflg = TRUE; + } + break; + } + } + } + if(okflg == TRUE) break; + } + + if(okflg ==FALSE){ +// print("\n %s %d开放",CHAR_getChar(talker,CHAR_NAME),(int)PLAYER.ptr); + free(PLAYER.ptr); + CHAR_setWorkInt( meindex, CHAR_WORK_PLAYER1 + j,-1); + } + + } + + return -1; +} + +BOOL QUIZ_initQuiz( char *filename) +{ + + FILE* f; + char line[512]; + char buf2[512], buf3[128]; + char buf[512]; + int i, linenum=0; + f = fopen(filename,"r"); + if( f == NULL ){ + print( "file open error\n"); + return FALSE; + } + while( fgets( line, sizeof( line ), f ) ){ + if( line[0] == '#' )continue; + if( line[0] == '\n' )continue; + chomp( line ); + linenum ++; + quizcnt++; + } + + if( fseek( f, 0, SEEK_SET ) == -1 ){ + fprint( "Seek Error\n" ); + fclose(f); + return FALSE; + } + + Quiz = allocateMemory( sizeof(NPC_QUIZ) * (quizcnt+1) ); + if( Quiz == NULL ){ + fprint( "Can't allocate Memory %d\n", sizeof(Quiz) * (quizcnt+1)); + fclose( f ); + return FALSE; + } + linenum = 0; + memset( buf3, 0, sizeof(buf3)); + while( fgets( line, sizeof( line ), f ) ){ + if( line[0] == '#' )continue; + if( line[0] == '\n' )continue; + chomp( line ); + replaceString( line, '\t' , ' ' ); + for( i = 0; i < strlen( line); i ++) { + if( line[i] != ' ' ) { + break; + } + strcpy( buf, &line[i]); + } + if( i != 0 ) { + strcpy( line, buf); + } + + if( getStringFromIndexWithDelim( line, ",", 1, buf2, sizeof(buf2)) == FALSE ) continue; + Quiz[linenum].no = atoi(buf2); + + if( getStringFromIndexWithDelim( line, ",", 2, buf2, sizeof(buf2)) == FALSE ) continue; + Quiz[linenum].type = atoi(buf2); + + if( getStringFromIndexWithDelim( line, ",", 3, buf2, sizeof(buf2)) == FALSE ) continue; + Quiz[linenum].level = atoi(buf2); + + if( getStringFromIndexWithDelim( line, ",", 4, buf2, sizeof(buf2)) == FALSE ) continue; + Quiz[linenum].answertype = atoi(buf2); + + if( getStringFromIndexWithDelim( line, ",", 5, buf2, sizeof(buf2)) == FALSE ) continue; + Quiz[linenum].answerNo = atoi(buf2); + + if( getStringFromIndexWithDelim( line, ",", 6, buf2, sizeof(buf2)) == FALSE ) continue; + memcpy( Quiz[linenum].question, buf2, sizeof( Quiz[linenum].question)); + + + if( getStringFromIndexWithDelim( line, ",", 7, buf3, sizeof(buf3)) == FALSE ) continue; + memcpy( Quiz[linenum].select1, buf3, sizeof( Quiz[linenum].select1)); + if( getStringFromIndexWithDelim( line, ",", 8, buf3, sizeof(buf3)) == FALSE ) continue; + memcpy( Quiz[linenum].select2, buf3, sizeof( Quiz[linenum].select2)); + if( getStringFromIndexWithDelim( line, ",", 9, buf3, sizeof(buf3)) == FALSE ) continue; + memcpy( Quiz[linenum].select3, buf3, sizeof( Quiz[linenum].select3)); + + if(Quiz[linenum].answertype == 1){ + if(Quiz[linenum].answerNo == 3){ + return FALSE; + } + } + + if(Quiz[linenum].answertype == 4){ + if(Quiz[linenum].answerNo != 1){ + return FALSE; + } + } + linenum ++; +// quizcnt++; + } + if( quizcnt < linenum ){ + print("ERR linenum:%d >= quizcnt:%d\n", linenum, quizcnt); + return FALSE; + } + + quizcnt = linenum; + fclose( f); + return TRUE; + +} + +int *NPC_GetQuestion(int meindex) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + int i,j; + int type=0; + int answer=0; + int level=0; + int *tbl; + char buf[16]; +#ifdef _NPC_QUIZSCOPE + int scope0,scope1; + char buf3[32]; +#endif + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + + if(NPC_Util_GetStrFromStrWithDelim(argstr,"Type",buf, sizeof( buf)) != NULL ){ + type = atoi(buf); + } + if( type <= 0){ + type = 0xffff; + } + + if(NPC_Util_GetStrFromStrWithDelim( argstr, "Answer", buf, sizeof( buf)) != NULL){ + answer = atoi(buf); + } + if(answer <= 0){ + answer = 0xffff; + } + + if(NPC_Util_GetStrFromStrWithDelim( argstr, "Level", buf, sizeof( buf)) != NULL ){ + level = atoi(buf); + } + if(level <= 0){ + level = 0xffff; + } + +#ifdef _NPC_QUIZSCOPE + scope0 = 0; + scope1 = quizcnt; + if(NPC_Util_GetStrFromStrWithDelim( argstr, "Scope", buf, sizeof( buf)) != NULL ){ + getStringFromIndexWithDelim( buf, "-", 1, buf3, sizeof(buf3)); + scope0 = atoi( buf3 ); + getStringFromIndexWithDelim( buf, "-", 2, buf3, sizeof(buf3)); + scope1 = atoi( buf3 ); + } +#endif + + for(j=0,i=0; i < quizcnt ;i++){ + if( (type & (1 << (Quiz[i].type-1))) != (1 << (Quiz[i].type-1))){ + continue; + } + if((answer & (Quiz[i].answertype)) != Quiz[i].answertype){ + continue; + } + if((level & (Quiz[i].level)) != Quiz[i].level){ + continue; + } +#ifdef _NPC_QUIZSCOPE + if( i < scope0 + || i > scope1 ) + continue; +#endif + j++; + } + + { + int tmp_tbl[j+1]; + tmp_tbl[0] = j+1; + for(j=1,i=0; i < quizcnt ;i++){ + if( (type & (1 << (Quiz[i].type-1))) != (1 << (Quiz[i].type-1))){ + continue; + } + + if((answer & (Quiz[i].answertype)) != Quiz[i].answertype){ + continue; + } + + if((level & (Quiz[i].level)) != Quiz[i].level){ + continue; + } +#ifdef _NPC_QUIZSCOPE + if( i < scope0 + || i > scope1 ) + continue; +#endif + tmp_tbl[j] = i; + + j++; + } + + tbl = tmp_tbl; + return tbl; + } +} + +/*--失奶 丞 及坞五及民尼永弁--*/ +BOOL NPC_QuizItemFullCheck(int meindex,int talker) +{ + int i; + int itemindex; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf2[32]; + + + /*--民尼永弁 癫卞蝈 月井"-*/ + for( i = CHAR_STARTITEMARRAY ; i < CHAR_MAXITEMHAVE ; i++ ) { + itemindex = CHAR_getItemIndex( talker , i ); + if( !ITEM_CHECKINDEX( itemindex) ) { + return TRUE; + } + } + + /*-- arg白央奶伙及 心 心 --*/ + if(NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)) == NULL) + { + print("GetArgstrErr:Quiz %s",CHAR_getChar( meindex, CHAR_NAME)); + } + + /*-- 失奶 丞及民尼永弁 --*/ + if(NPC_Util_GetStrFromStrWithDelim( argstr,"EntryItem", + buf2, sizeof( buf2)) != NULL) + { + if(NPC_EntryItemCheck( talker, buf2) == FALSE){ + NPC_Quiz_selectWindow( meindex, talker, 3); + return FALSE; + + }else{ + return TRUE; + } + } + + + return FALSE; + +} + + +/* + *云嗯及民尼永弁 + */ +BOOL NPC_EntryStoneCheck(int talker,char *buf) +{ + int stone; + int cost; + + cost= atoi( buf); + stone = CHAR_getInt( talker, CHAR_GOLD); + + if(cost > stone){ + return FALSE; + } + + return TRUE; +} + +/* + *云嗯及绰轮 + */ +BOOL NPC_EntryStoneDel(int talker,char *buf) +{ + int stone; + int cost; + char token[256]; + + cost= atoi( buf); + stone = CHAR_getInt( talker, CHAR_GOLD); + + if((stone-cost) < 0){ + CHAR_setInt( talker, CHAR_GOLD, 0); + }else{ + CHAR_DelGold( talker, cost ); + } + + sprintf( token, "%d 交出stone。", cost); + CHAR_talkToCli( talker, -1, token, CHAR_COLORWHITE); + + CHAR_send_P_StatusString( talker, CHAR_P_STRING_GOLD); + return TRUE; +} + + +/* + *失奶 丞毛绰轮允月 + */ +BOOL NPC_EntryItemDel(int talker,char *buf) +{ + + int i = 1, j = 1,k = 1; + char buff3[128]; + char buf2[32]; + int itemindex; + + + while(getStringFromIndexWithDelim(buf , "," , k, buff3, sizeof(buff3)) !=FALSE ){ + k++; + if(strstr(buff3, "*") !=NULL){ + int itemno; + int kosuu; + int id; + int cnt=0; + getStringFromIndexWithDelim(buff3,"*",1,buf2,sizeof(buf2)); + itemno = atoi(buf2); + getStringFromIndexWithDelim(buff3,"*",2,buf2,sizeof(buf2)); + kosuu = atoi(buf2); + for( i =0 ; i < CHAR_MAXITEMHAVE ; i++ ){ + itemindex = CHAR_getItemIndex( talker , i ); + if( ITEM_CHECKINDEX(itemindex) ){ + id=ITEM_getInt(itemindex ,ITEM_ID ); + if(itemno==id){ + cnt++; + LogItem( + CHAR_getChar( talker, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( talker, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID), /* 失奶 丞 寞 */ +#endif + "QuizDelItem(猜谜->交出的道具)", + CHAR_getInt( talker, CHAR_FLOOR), + CHAR_getInt( talker, CHAR_X ), + CHAR_getInt( talker, CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + + CHAR_DelItem( talker, i); + if(cnt == kosuu){ + break; + } + } + } + } + }else{ + /*--蓟氏分 寞及失奶 丞毛蓟请---*/ + for( j = 0 ; j < CHAR_MAXITEMHAVE ; j++){ + itemindex = CHAR_getItemIndex( talker ,j); + + if( ITEM_CHECKINDEX(itemindex) ){ + if( atoi( buff3) == ITEM_getInt(itemindex,ITEM_ID)){ + LogItem( + CHAR_getChar( talker, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( talker, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID), /* 失奶 丞 寞 */ +#endif + "QuizDelItem(猜谜->领到的道具)", + CHAR_getInt( talker,CHAR_FLOOR), + CHAR_getInt( talker,CHAR_X ), + CHAR_getInt( talker,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + CHAR_DelItem( talker, j); + } + } + } + } + } + + return TRUE; +} + +/* + *--失奶 丞及民尼永弁分仃毛垫丹 + */ +BOOL NPC_EntryItemCheck(int talker,char *buf) +{ + + char buf2[512]; + char buf3[256]; + int id=0; + BOOL flg = FALSE; + int i; + int itemindex; + int itemno; + int kosuu; + int cnt=0; + int k=1; + + while(getStringFromIndexWithDelim(buf , "," , k, buf2, sizeof(buf2)) + !=FALSE ) + { + flg = FALSE; + k++; + + if(strstr(buf2,"*") != NULL){ + cnt = 0; + getStringFromIndexWithDelim(buf2,"*",1,buf3,sizeof(buf3)); + itemno = atoi(buf3); + getStringFromIndexWithDelim(buf2,"*",2,buf3,sizeof(buf3)); + kosuu = atoi(buf3); + + for( i=0 ; i < CHAR_MAXITEMHAVE;i++ ){ + itemindex = CHAR_getItemIndex( talker , i ); + if( ITEM_CHECKINDEX(itemindex) ){ + id = ITEM_getInt(itemindex ,ITEM_ID ); + if(itemno == id){ + cnt++; + if(cnt == kosuu){ + flg = TRUE; + break; + } + } + } + } + if(flg == FALSE) + { + return FALSE; + } + }else{ + itemno = atoi(buf2); + + for( i=0 ; i < CHAR_MAXITEMHAVE;i++ ){ + itemindex = CHAR_getItemIndex( talker , i ); + if( ITEM_CHECKINDEX(itemindex) ){ + id = ITEM_getInt(itemindex ,ITEM_ID ); + if(itemno == id){ + flg = TRUE; + break; + } + } + } + + if(flg == FALSE) + { + return FALSE; + } + } + } + + return TRUE; + +} + +/* + * 由□ 奴井升丹井及民尼永弁 + */ +BOOL NPC_QUIZPARTY_CHAECK(int meindex,int talker) +{ + + if(CHAR_getWorkInt(talker,CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE){ + return FALSE; + } + + return TRUE; + +} + diff --git a/gmsv/npc/npc_raceman.c b/gmsv/npc/npc_raceman.c new file mode 100644 index 0000000..86f021f --- /dev/null +++ b/gmsv/npc/npc_raceman.c @@ -0,0 +1,2255 @@ +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "lssproto_serv.h" +#include "saacproto_cli.h" +#include "npcutil.h" +#include "handletime.h" +#include "npc_raceman.h" +#include "family.h" +#include "log.h" +#include "enemy.h" + +#ifdef _RACEMAN + +void Raceman_SelectWindow( int meindex, int talker, int num,int select); +void Raceman_MsgDisp(int meindex,int talker,int num,int select); +BOOL Raceman_EventAddItem( int meindex,int talker ); +BOOL Raceman_CheckItem(int meindex,int talker); +BOOL Raceman_ItemFullCheck(int meindex, int talker); +BOOL Raceman_checkpet( int meindex, int talker , int select , char *token ); +BOOL Raceman_petcheckin ( int meindex , int talker ); //限定种类 +BOOL Raceman_checkprize( int meindex , int talker ,char *token); +void Raceman_awardprize( int meindex , int talker ); +int Raceman_CheckGameType(int meindex , int talker ); +int Raceman_readmode( int meindex , int talkerindex ); +void Raceman_countrank( int meindex, int talker ); // 目前没用到 +void Raceman_renewrank( int meindex , int talker , int select ); +int Raceman_CheckSelectRank( int meindex , int talkerindex , int datanum); +void Raceman_GetQuestion( int meindex ,int talker , char *token); +BOOL Raceman_CheckAnswer( int meindex , int talker , char *data ); + + + +enum { + CHAR_WORK_PETSELECT = CHAR_NPCWORKINT1, + CHAR_WORK_RACEQUIZ = CHAR_NPCWORKINT2, +}; + +//int PetSelect; +int Pageindex; +int asktotal; + +struct RANKTABLE ranktable1[DEFMAXRANK]; +struct RANKTABLE ranktable2[DEFMAXRANK]; +struct RANKTABLE ranktable3[DEFMAXRANK]; +struct RANKTABLE ranktable4[DEFMAXRANK]; +struct RANKTABLE ranktable5[DEFMAXRANK]; +struct RANKTABLE history1[DEFMAXRANK]; +struct RANKTABLE history2[DEFMAXRANK]; +struct RANKTABLE history3[DEFMAXRANK]; +struct RANKTABLE history4[DEFMAXRANK]; +struct RANKTABLE history5[DEFMAXRANK]; + +struct ASKTABLE asktable[400]; + +int petflgtable[640]; //可抓宠的table + +char rankname[5][64] = { + "『新手赛--惊为天人排行榜』", + "『高手赛--惊为天人排行榜』", + "『家族赛--惊为天人排行榜』", + "『高手赛--无奇不有排行榜』", + "『家族赛--无奇不有排行榜』" +}; + +char historyrank[5][64] = { + "『新手历史惊为天人排行榜』", + "『高手历史惊为天人排行榜』", + "『家族历史惊为天人排行榜』", + "『高手历史无奇不有排行榜』", + "『家族历史无奇不有排行榜』" +}; + + +#define DEF_READ_WAITTIME (10) +unsigned long RTIME1 = 0, + RTIME2 = 0, + RTIME3 = 0, + RTIME4 = 0, + RTIME5 = 0; + +BOOL NPC_RacemanInit( int meindex) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf1[128]; + int ranknum,i; + char file[10][20] = { + "Mode1", + "Mode2", + "Mode3", + "Mode4", + "Mode5", + "History1", + "History2", + "History3", + "History4", + "History5" + }; + + //PetSelect = 0; + Pageindex = 0; + + if( NPC_Util_GetArgStr( meindex, npcarg, sizeof( npcarg)) == NULL) return FALSE; + + NPC_Util_GetStrFromStrWithDelim( npcarg , "RankNum", buf1, sizeof( buf1)); + ranknum = atoi(buf1); + + CHAR_setInt( meindex, CHAR_WHICHTYPE, CHAR_RACEMAN); //制作一只npc + + if( RTIME1 == 0 || RTIME2 == 0 || RTIME3 == 0 || RTIME4 == 0 || RTIME5 == 0){ + RTIME1 = NowTime.tv_sec+DEF_READ_WAITTIME, + RTIME2 = NowTime.tv_sec+DEF_READ_WAITTIME, + RTIME3 = NowTime.tv_sec+DEF_READ_WAITTIME, + RTIME4 = NowTime.tv_sec+DEF_READ_WAITTIME; + RTIME5 = NowTime.tv_sec+DEF_READ_WAITTIME; + + //把5种比赛记录读取进来 + for( i = 0 ; i < 10 ; i++){ + NPC_Util_GetStrFromStrWithDelim( npcarg , file[i] , buf1, sizeof( buf1)); + if(strlen(buf1) == 0) continue; + if(i < 5) + saacproto_ACRaceRecordandSort_send( acfd,meindex,buf1,"","",i+1,0,ranknum ); + else + saacproto_ACRaceRecordandSort_send( acfd,meindex,buf1,"","",i+6,0,ranknum ); + } + + } + return TRUE; + +} + +void NPC_RacemanTalked( int meindex , int talkerindex , char *szMes ,int color ) +{ + + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) { + return; + } + + if(NPC_Util_isFaceToFace(talkerindex,meindex,1 )==FALSE){ + if( NPC_Util_CharDistance( talkerindex, meindex ) > 1) return; + } + + Raceman_SelectWindow( meindex, talkerindex,0,-1); +} + + +void Raceman_SelectWindow( int meindex, int talker, int num,int select) +{ + char token[1024]; + int fd , ret; + + fd = getfdFromCharaIndex( talker ); + if( fd == -1 ) return; + + token[0] = '\0'; + + switch( num) { + + case 0: //选单 + + Raceman_MsgDisp( meindex, talker, 0 , -1 ); + break; + + case 1: //比赛题目 + + Raceman_MsgDisp( meindex, talker, 1 , -1 ); + break; + + case 2: //领猎宠证 + + ret = Raceman_CheckGameType(meindex,talker); + if(ret == 0) + Raceman_MsgDisp( meindex, talker, 2 , -1 ); + else if(ret == 1) + Raceman_MsgDisp( meindex, talker, 9 , -1 ); + else if(ret == 2) + Raceman_MsgDisp( meindex, talker, 90 , -1 ); + else if(ret == 3) + Raceman_MsgDisp( meindex, talker, 91 , -1 ); + else if(ret == 4) + Raceman_MsgDisp( meindex, talker, 92 , -1 ); + break; + + case 3: //猎宠登记 + + ret = Raceman_CheckGameType(meindex,talker); + if(ret == 1) + Raceman_MsgDisp( meindex, talker, 9 , -1 ); //族长身分不合 + else if(ret == 4) + Raceman_MsgDisp( meindex, talker, 92 , -1 ); //家族没有正式成立 + else + Raceman_MsgDisp( meindex, talker, 3 , -1 ); + break; + + case 4: //猎宠排行榜 + + Raceman_MsgDisp( meindex, talker, 4 , -1 ); + break; + + case 5: //猎宠战利品 + + ret = Raceman_CheckGameType(meindex,talker); + if(ret == 1) + Raceman_MsgDisp( meindex, talker, 9 , -1 ); //族长身分不合 + else if(ret == 4) + Raceman_MsgDisp( meindex, talker, 92 , -1 ); //家族没有正式成立 + else + Raceman_MsgDisp( meindex, talker, 5 , -1 ); + break; + + case 6: //通关密语 + + ret = Raceman_CheckGameType(meindex,talker); + if(ret == 1) + Raceman_MsgDisp( meindex, talker, 9 , -1 ); //族长身分不合 + else if(ret == 4) + Raceman_MsgDisp( meindex, talker, 92 , -1 ); //家族没有正式成立 + else + Raceman_MsgDisp( meindex, talker, 6 , -1 ); + break; + + } +} + +void NPC_RacemanWindowTalked( int meindex , int talkerindex , int seqno, int select, char *data) +{ + int datanum = -1; + int buttontype; + int i,open,ret ; + char listbuf[4096],tmp_buffer[4096]; + + listbuf[0] = '\0'; + tmp_buffer[0] = '\0'; + + if( NPC_Util_CharDistance( talkerindex, meindex ) > 2) { + return; + } + print("\n NPC_RacemanWindowTalked: data:%s seq:%d sel:%d ", data, seqno, select); + + makeStringFromEscaped( data); + + datanum = atoi( data); + switch( seqno){ + case CHAR_WINDOWTYPE_RACE_START: + if(datanum == 2){ // 比赛题目 + Raceman_SelectWindow( meindex, talkerindex,1,-1); + }else if(datanum == 3){ // 领取猎宠证 + Raceman_SelectWindow( meindex, talkerindex,2,-1); + }else if(datanum == 4){ // 猎宠登记处 + //Raceman_SelectWindow( meindex, talkerindex,3,-1);修改 加入通关密语才能登记 + Raceman_SelectWindow( meindex, talkerindex,6,-1); + }else if(datanum == 5){ // 猎宠排行榜 + Raceman_SelectWindow( meindex, talkerindex,4,-1); + }else if(datanum == 6){ // 猎宠战利品 + Raceman_SelectWindow( meindex, talkerindex,5,-1); + } + break; + case CHAR_WINDOWTYPE_RACE_SUBJECT: + if(select == WINDOW_BUTTONTYPE_OK){ + Raceman_SelectWindow( meindex, talkerindex,0,-1); + } + break; + case CHAR_WINDOWTYPE_RACE_TICKET: + if(select == WINDOW_BUTTONTYPE_OK) + { + if(Raceman_CheckItem(meindex,talkerindex)==TRUE){ //TRUE:有证了 + Raceman_MsgDisp( meindex, talkerindex,22,-1); + }else{ + if(Raceman_EventAddItem(meindex, talkerindex)==TRUE){ + Raceman_SelectWindow( meindex, talkerindex,0,-1); + } + } + } + break; + case CHAR_WINDOWTYPE_RACE_PETSELECT: + if(Raceman_CheckItem(meindex,talkerindex)==FALSE){ //FALSE:没有证 + Raceman_MsgDisp( meindex, talkerindex,32,-1); + }else{ + if(select == WINDOW_BUTTONTYPE_CANCEL){ + Raceman_SelectWindow( meindex, talkerindex,0,-1); + }else{ + Raceman_MsgDisp( meindex, talkerindex,31,datanum); + } + } + break; + case CHAR_WINDOWTYPE_RACE_CHECKIN: + if(select == WINDOW_BUTTONTYPE_YES){ + ret = Raceman_petcheckin( meindex, talkerindex ); //登记 + if(ret == TRUE) + Raceman_SelectWindow( meindex, talkerindex,0,-1); + else + Raceman_MsgDisp( meindex, talkerindex,93,-1); + }else if(select == WINDOW_BUTTONTYPE_NO){ + Raceman_SelectWindow( meindex, talkerindex,0,-1); + } + break; + case CHAR_WINDOWTYPE_RACE_RANK: + open = Raceman_CheckSelectRank(meindex,talkerindex,datanum); + switch(open) + { + case 1: + if( NowTime.tv_sec > RTIME1 ){ + Raceman_renewrank( meindex , talkerindex , datanum-1 ); //更新 + RTIME1 = NowTime.tv_sec+DEF_READ_WAITTIME; + } + if(ranktable1[0].rank == 0) Raceman_MsgDisp( meindex, talkerindex,46,-1); + else Raceman_MsgDisp( meindex, talkerindex,41,-1); + break; + case 2: + if( NowTime.tv_sec > RTIME2 ){ + Raceman_renewrank( meindex , talkerindex , datanum-1 ); //更新 + RTIME2 = NowTime.tv_sec+DEF_READ_WAITTIME; + } + if(ranktable2[0].rank == 0) Raceman_MsgDisp( meindex, talkerindex,46,-1); + else Raceman_MsgDisp( meindex, talkerindex,42,-1); + break; + case 3: + if( NowTime.tv_sec > RTIME3 ){ + Raceman_renewrank( meindex , talkerindex , datanum-1 ); //更新 + RTIME3 = NowTime.tv_sec+DEF_READ_WAITTIME; + } + if(ranktable3[0].rank == 0) Raceman_MsgDisp( meindex, talkerindex,46,-1); + else Raceman_MsgDisp( meindex, talkerindex,43,-1); + break; + case 4: + if( NowTime.tv_sec > RTIME4 ){ + Raceman_renewrank( meindex , talkerindex , datanum-1 ); //更新 + RTIME4 = NowTime.tv_sec+DEF_READ_WAITTIME; + } + if(ranktable4[0].rank == 0) Raceman_MsgDisp( meindex, talkerindex,46,-1); + else Raceman_MsgDisp( meindex, talkerindex,44,-1); + break; + case 5: + if( NowTime.tv_sec > RTIME5 ){ + Raceman_renewrank( meindex , talkerindex , datanum-1 ); //更新 + RTIME5 = NowTime.tv_sec+DEF_READ_WAITTIME; + } + if(ranktable5[0].rank == 0) Raceman_MsgDisp( meindex, talkerindex,46,-1); + else Raceman_MsgDisp( meindex, talkerindex,45,-1); + break; + case 11: + if(history1[0].rank == 0) Raceman_MsgDisp( meindex, talkerindex,46,-1); + else Raceman_MsgDisp( meindex, talkerindex,411,-1); + break; + case 12: + if(history2[0].rank == 0) Raceman_MsgDisp( meindex, talkerindex,46,-1); + else Raceman_MsgDisp( meindex, talkerindex,412,-1); + break; + case 13: + if(history3[0].rank == 0) Raceman_MsgDisp( meindex, talkerindex,46,-1); + else Raceman_MsgDisp( meindex, talkerindex,413,-1); + break; + case 14: + if(history4[0].rank == 0) Raceman_MsgDisp( meindex, talkerindex,46,-1); + else Raceman_MsgDisp( meindex, talkerindex,414,-1); + break; + case 15: + if(history5[0].rank == 0) Raceman_MsgDisp( meindex, talkerindex,46,-1); + else Raceman_MsgDisp( meindex, talkerindex,415,-1); + break; + default: + Raceman_SelectWindow( meindex, talkerindex,0,-1); + break; + } + break; + case CHAR_WINDOWTYPE_RACE_PRIZE: + if(select == WINDOW_BUTTONTYPE_OK){ + Raceman_awardprize( meindex, talkerindex ); + Raceman_SelectWindow( meindex, talkerindex,0,-1); + } + break; + case CHAR_WINDOWTYPE_RACE_NORMAL: + if(select == WINDOW_BUTTONTYPE_OK){ + Raceman_SelectWindow( meindex, talkerindex,0,-1); + } + break; + case CHAR_WINDOWTYPE_RACE_SHOWRANK1: + switch(select){ + case WINDOW_BUTTONTYPE_NEXT: + case WINDOW_BUTTONTYPE_PREV: + { + int fd; + fd = getfdFromCharaIndex( talkerindex ); + if( fd == -1 ) return; + + Pageindex += 10 * (( select == WINDOW_BUTTONTYPE_NEXT) ? 1 : -1); + + if(ranktable1[Pageindex].catchcnt==0) { + Raceman_SelectWindow( meindex, talkerindex,0,-1); + return; + } + if( Pageindex < 0 ) return; + + buttontype = WINDOW_BUTTONTYPE_OK; + if( ranktable1[Pageindex+10].catchcnt==0) + buttontype |= WINDOW_BUTTONTYPE_PREV; + else if( Pageindex == 0) + buttontype |= WINDOW_BUTTONTYPE_NEXT; + else{ + buttontype |= WINDOW_BUTTONTYPE_PREV; + buttontype |= WINDOW_BUTTONTYPE_NEXT; + } + //收集资料 + strcpy(listbuf,"『新手惊为天人排行榜』 "); + for (i=Pageindex;i atoi(buf) ) + return 2; + + NPC_Util_GetStrFromStrWithDelim( argstr, "FornewTran", buf, sizeof( buf) ); + //sprintf(buuf,"fornewTran:%s talkerLV:%d", buf , CHAR_getInt( talker , CHAR_TRANSMIGRATION) ); + //CHAR_talkToCli( talker, -1,buuf, CHAR_COLORYELLOW); + if(CHAR_getInt( talker , CHAR_TRANSMIGRATION) > atoi(buf) ) + return 3; + } + return 0; +} +//检查有无猎宠证 +BOOL Raceman_CheckItem(int meindex,int talker) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + int item,i,itemindex,id; + char buf[128]; + + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { //读参数 + print("MsgDisp:GetArgStrErr"); + print("NPCName=%s\n", CHAR_getChar( meindex, CHAR_NAME)); + return FALSE; + } + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "CheckItem", + buf, sizeof( buf) ) != NULL) + { + item = atoi(buf); + for( i = 0 ; i < CHAR_MAXITEMHAVE ; i++ ) { + + itemindex=CHAR_getItemIndex( talker , i ); + if( ITEM_CHECKINDEX( itemindex) ) { + id=ITEM_getInt( itemindex ,ITEM_ID ); + if(id==item) return TRUE; + } + } + } + return FALSE; +} + +BOOL Raceman_ItemFullCheck(int meindex, int talker) +{ + int emptyitemindexinchara; + + emptyitemindexinchara = CHAR_findEmptyItemBox( talker ); + + if( emptyitemindexinchara < 0 ){ + return FALSE; + } + + return TRUE; +} + +//发放猎宠证 +BOOL Raceman_EventAddItem( int meindex,int talker ) +{ + int itemindex,ret,i,fd; + char token[256],buf[128],buf1[256]; + char id[16],name[64]; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + int gmode; + unsigned int askno,asklv,temp=0; + + if(Raceman_ItemFullCheck( meindex, talker) == FALSE){ + Raceman_MsgDisp( meindex, talker, 21,-1); + return FALSE; + } + + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { //读参数 + print("MsgDisp:GetArgStrErr"); + print("NPCName=%s\n", CHAR_getChar( meindex, CHAR_NAME)); + return FALSE; + } + + if( NPC_Util_GetStrFromStrWithDelim( argstr , "GetItem", buf, sizeof( buf)) == NULL ){ + print("raceman: GetItem Err"); + return FALSE; + } + + itemindex = ITEM_makeItemAndRegist( atoi( buf )); + if(itemindex == -1){ + print("raceman: itemindex Err"); + return FALSE; + } + + ret = CHAR_addItemSpecificItemIndex( talker, itemindex); + if( ret < 0 || ret >= CHAR_MAXITEMHAVE ) { + print( "npc_raceman.c: ACCEPTadditem error itemindex[%d]\n", itemindex); + ITEM_endExistItemsOne( itemindex); + return FALSE; + } + + NPC_Util_GetStrFromStrWithDelim( argstr , "GameMode", buf1, sizeof( buf1)); + gmode = atoi(buf1); + + if( CHAR_getInt( talker, CHAR_CATCHCNT1+gmode-1 )!=0){ + + for(i=0;i<10;i++) CHAR_setInt( talker, CHAR_KINDCNT1 + i , 0 ); + CHAR_setInt( talker,CHAR_CATCHCNT1+gmode-1, 0 ); //清除记录 + + if(gmode==3||gmode==5){ //家族赛 + strcpy(name,CHAR_getChar(talker,CHAR_FMNAME)); //家族名称 + sprintf(id,"%d",CHAR_getWorkInt(talker, CHAR_WORKFMINDEXI)); //家族id + }else{ //个人赛 + fd = getfdFromCharaIndex(talker); + CONNECT_getCharname( fd, name, sizeof( name ) ); //人物名称 + CONNECT_getCdkey( fd, id , sizeof( id ) ); //帐号 + } + + switch(gmode) + { + case 1:NPC_Util_GetStrFromStrWithDelim( argstr , "Mode1", buf1, sizeof( buf1)); break; + case 2:NPC_Util_GetStrFromStrWithDelim( argstr , "Mode2", buf1, sizeof( buf1)); break; + case 3:NPC_Util_GetStrFromStrWithDelim( argstr , "Mode3", buf1, sizeof( buf1)); break; + case 4:NPC_Util_GetStrFromStrWithDelim( argstr , "Mode4", buf1, sizeof( buf1)); break; + case 5:NPC_Util_GetStrFromStrWithDelim( argstr , "Mode5", buf1, sizeof( buf1)); break; + } + saacproto_ACRaceRecordandSort_send( acfd , talker , buf1 , id , name,9,0,0); + } + if(gmode < 4 ) //限定种类 + sprintf( buf1, "目前猎宠记录%d只。", CHAR_getInt( talker,CHAR_CATCHCNT1+gmode-1 ) ); + else{ + //random一各题目给他 + askno = rand() % asktotal; + asklv = asktable[askno].lowlv + rand()%((asktable[askno].highlv+1)-asktable[askno].lowlv); + temp = (askno << 22) & 0x7FC00000; + temp = temp | ((asklv << 14) & 0x7FFFC000); + temp = temp | ((asktable[askno].bbi - 100000) & 0x00003FFF); + CHAR_setInt( talker , CHAR_CHECKIN , temp ); + + //sprintf(buf1,"checkin:%d askno:%d askname:%s asklv%d askbbi%d", + // CHAR_getInt( talker ,CHAR_CHECKIN),askno,asktable[askno].petname,asklv,asktable[askno].bbi); + //CHAR_talkToCli( talker, -1,buf1, CHAR_COLORYELLOW); + if( asktable[askno].highlv == 0 ) + sprintf( buf1,"请抓给我等级%d『以上』的%s好吗。您目前记录%d种", asktable[askno].lowlv , asktable[askno].petname, CHAR_getInt( talker,CHAR_CATCHCNT1+gmode-1 ) ); + else + sprintf( buf1,"请抓给我『只能』等级%d的%s好吗。您目前记录%d种", asklv , asktable[askno].petname, CHAR_getInt( talker,CHAR_CATCHCNT1+gmode-1 ) ); + } + ITEM_setChar( itemindex, ITEM_EFFECTSTRING, buf1); + if(itemindex != -1) { + LogItem( + CHAR_getChar( talker, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( talker, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID), /* 失奶 丞 寞 */ +#endif + "EventAddItem(任务需求所得到的道具)", + CHAR_getInt( talker, CHAR_FLOOR), + CHAR_getInt( talker, CHAR_X ), + CHAR_getInt( talker, CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + } + sprintf(token,"拿到%s。", ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( talker, -1, token, CHAR_COLORWHITE); + CHAR_sendItemDataOne( talker, ret); + + return TRUE; +} + +// 检查是否为比赛的宠物和是否登记过 +BOOL Raceman_checkpet( int meindex, int talker , int select , char *token ) +{ + int petindex,checkpetID,petimgnum; + char *petname; + char buf[256]; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + int index,gmode; + unsigned int askno,asklv,askbbi; + + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { //读参数 + print("MsgDisp:GetArgStrErr"); + print("NPCName=%s\n", CHAR_getChar( meindex, CHAR_NAME)); + return FALSE; + } + + NPC_Util_GetStrFromStrWithDelim( argstr , "EndFlag", buf, sizeof( buf)); + if( strcmp(buf,"on")==0){ + NPC_Util_GetStrFromStrWithDelim( argstr , "ending_msg", buf, sizeof( buf)); + sprintf( token , "\n %s",buf); + return FALSE; + } + + if(CHAR_getInt( talker,CHAR_CATCHCNT5 ) >= asktotal ){ + strcpy( token ,"恭喜你已经达到猎宠大赛终极目标,感谢您的参与并祝您抽中大奖"); + return FALSE; + } + + petindex = CHAR_getCharPet( talker, select-1); + petname = CHAR_getUseName( petindex); + if( !CHAR_CHECKINDEX(petindex) ) return FALSE; + + if (CHAR_getInt(petindex, CHAR_PETFAMILY) == 1){ + strcpy(token,"\n 家族守护兽无法登记!"); + return FALSE; + } + + if (CHAR_getInt( talker , CHAR_RIDEPET) == select-1 ){ + strcpy(token,"\n 骑乘中的宠物无法登记!"); + return FALSE; + } + + NPC_Util_GetStrFromStrWithDelim( argstr , "GameCode", buf, sizeof( buf)); + if( CHAR_getInt(petindex,CHAR_CHECKIN) == atoi(buf) ){ //这次比赛已登记过了 + strcpy(token,"\n 这只宠物已经在本届比赛登记过了哦!"); + return FALSE; + } + + NPC_Util_GetStrFromStrWithDelim( argstr , "GameMode", buf, sizeof( buf)); + gmode = atoi(buf); + if(gmode==4||gmode==5) //不限种类 + { + petimgnum = CHAR_getInt( petindex , CHAR_BASEBASEIMAGENUMBER); + askbbi = CHAR_getInt( talker ,CHAR_CHECKIN) & 0x00003FFF; + asklv = ( CHAR_getInt( talker ,CHAR_CHECKIN ) & 0x003FC000 ) >> 14 ; + askno = ( CHAR_getInt( talker ,CHAR_CHECKIN ) & 0x7FC00000 ) >> 22 ; + + //sprintf(buf,"checkin:%d petimgnum:%d askbbi:%d petname:%s askname:%s petlv%d asklv%d", + // CHAR_getInt( talker ,CHAR_CHECKIN),petimgnum,askbbi,petname,asktable[askno].petname, + // CHAR_getInt(petindex , CHAR_LV),asklv); + //CHAR_talkToCli( talker, -1,buf, CHAR_COLORYELLOW); + + if( petimgnum != askbbi+100000 ){ + strcpy(token,"\n 请确认宠物,这只不是我要的哦!"); + return FALSE; + } + if( strcmp(petname,asktable[askno].petname)!=0) { + strcpy(token,"\n 请确认宠物,这只不是我要的哦!"); + return FALSE; + } + if( asktable[askno].highlv == 0 ){ + if( CHAR_getInt(petindex , CHAR_LV) < asktable[askno].lowlv ){ + strcpy(token,"\n 这只宠物等级不够哦!"); + return FALSE; + } + }else{ + if( CHAR_getInt(petindex , CHAR_LV) != asklv ){ + strcpy(token,"\n 请确认宠物等级,等级不对唷哦!"); + return FALSE; + } + } + + sprintf(token," === 宠物登记 ===" + "\n\n\n 您选择登记的宠物是 %s Lv:%d" + ,petname,CHAR_getInt( petindex, CHAR_LV)); + + /* + NPC_Util_GetStrFromStrWithDelim( argstr , "PetLevel", buf, sizeof( buf)); + if (CHAR_getInt(petindex , CHAR_LV) < atoi(buf)){ + strcpy(token,"\n 这只宠物等级不够!"); + return FALSE; + } + + petimgnum = CHAR_getInt( petindex , CHAR_BASEBASEIMAGENUMBER); + for(petNo=0;petNo<640;petNo++){ + if( petimgnum == petflgtable[petNo] ) // 应该要一定在table内 + break; + } + if( petNo >= 640 ){ + //sprintf(buuf2,"petimgnum:%d pftable:%d petNo:%d", petimgnum , petflgtable[2] , petNo); + //CHAR_talkToCli( talker, -1,buuf2, CHAR_COLORYELLOW); + strcpy(token,"\n 这只宠物怪怪的唷!"); + //log + LogPet( CHAR_getChar( talker, CHAR_NAME ), + CHAR_getChar( talker, CHAR_CDKEY ), + CHAR_getChar( petindex, CHAR_NAME), + CHAR_getInt( petindex, CHAR_LV), + "raceman(猎宠大会非法宠记录)", + CHAR_getInt( talker,CHAR_FLOOR), + CHAR_getInt( talker,CHAR_X ), + CHAR_getInt( talker,CHAR_Y ), + CHAR_getChar( petindex, CHAR_UNIQUECODE) + ); + + return FALSE;// 出问题罗,玩家拿不能拥有的宠物来登记 + } + + //sprintf(buuf2,"petimgnum:%d pftable:%d petNo:%d", petimgnum , petflgtable[petNo] , petNo); + //CHAR_talkToCli( talker, -1,buuf2, CHAR_COLORYELLOW); + + base = 1; + intNo = petNo / 32 ; + shift = petNo % 32 ; + base = base << shift; + + //sprintf(buuf2,"intNo:%d shift:%d base:%d data:%d", intNo , shift , base , CHAR_getInt( talker , CHAR_KINDCNT1 + intNo )); + //CHAR_talkToCli( talker, -1,buuf2, CHAR_COLORYELLOW); + + if( CHAR_getInt( talker , CHAR_KINDCNT1 + intNo ) & base ){ + NPC_Util_GetStrFromStrWithDelim( argstr , "repeat_msg", buf, sizeof( buf)); + sprintf(token,"\n %s",buf); + return FALSE; + }else{ + sprintf(token," === 宠物登记 ===" + "\n\n\n 您选择登记的宠物是 %s Lv:%d" + ,petname,CHAR_getInt( petindex, CHAR_LV) + ); + } + */ + } + else + { + if(NPC_Util_GetStrFromStrWithDelim( argstr , "CheckPet", buf, sizeof( buf)) != NULL ){ + checkpetID = atoi(buf); + if( !ENEMY_CHECKINDEX( checkpetID )) return FALSE; + + // sprintf(buuf2,"petindex:%d checkpetID:%d index:%d",petindex,checkpetID,index); + // CHAR_talkToCli( talker, -1,buuf2, CHAR_COLORYELLOW); + + /*保留gm指令dropmypet做法 结果同下段 + petarray = ENEMY_getEnemyArrayFromId( checkpetID ); + petindex2 = ENEMY_TEST_createPetIndex( petarray ); + test5 = CHAR_getInt( petindex2 , CHAR_BASEBASEIMAGENUMBER); + */ + + index = ENEMYTEMP_getEnemyTempArray(ENEMY_getEnemyArrayFromId(checkpetID)); + if( !ENEMYTEMP_CHECKINDEX( index )) return FALSE; + petimgnum = ENEMYTEMP_getInt(index,E_T_IMGNUMBER); //GET ENEMYTEMP_enemy[index].intdata[E_T_IMGNUMBER]; + + //sprintf(buuf,"check:%d be_check:%d",petimgnum, CHAR_getInt( petindex , CHAR_BASEBASEIMAGENUMBER)); //petarry:%d petindex2:%d test5:%d",test1,test2,petarray,petindex2,test5); + //CHAR_talkToCli( talker, -1,buuf, CHAR_COLORYELLOW); + + if( CHAR_getInt( petindex , CHAR_BASEBASEIMAGENUMBER) == petimgnum ){ + + NPC_Util_GetStrFromStrWithDelim( argstr , "PetLevel", buf, sizeof( buf)); + if (CHAR_getInt(petindex , CHAR_LV) < atoi(buf)){ + strcpy(token,"\n 这只宠物等级不够!"); + return FALSE; + } + + sprintf(token," === 宠物登记 ===" + "\n\n\n 您选择登记的宠物是 %s Lv:%d" + ,petname,CHAR_getInt( petindex, CHAR_LV) + ); + }else{ + strcpy(token,"\n 比赛的题目没有这只宠物哦!"); + return FALSE; + } + } + } + return TRUE; +} + +int Raceman_getokask( int talker, int random ) +{ + int base,i,shift; + + base = random / 32 ; + shift = random % 32 ; + i = 1 << shift ; + if( CHAR_getInt( talker , CHAR_KINDCNT1 + base ) & i ){ //为真表示解过了 + random ++; + if( random >= asktotal ) random = 0; + return Raceman_getokask( talker , random ); + }else + return random; +} + +BOOL Raceman_petcheckin( int meindex , int talker ) +{ + int petindex,fd,item,i,itemindex,itemid,gmode; + char *petname; + char id[16],name[64]; + char buf[64],buf1[64]; //buuf[128]; + char category[12]; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + int base,intNo,shift,petNo,j; + unsigned int askno,asklv,temp; + + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { //读参数 + print("MsgDisp:GetArgStrErr"); + print("NPCName=%s\n", CHAR_getChar( meindex, CHAR_NAME)); + return FALSE; + } + + //保险检查 + for( i = 0 ; i < 5 ; i ++ ){ + j = CHAR_getInt( talker,CHAR_CATCHCNT1 + i ) ; + if( j++ >= 0xFFFFFF ) { + CHAR_talkToCli( talker, -1, "很抱歉,您已经达到系统上限,无法再登记了", CHAR_COLORYELLOW); + return FALSE; + } + } + + petindex = CHAR_getCharPet( talker, CHAR_getWorkInt( talker , CHAR_WORK_PETSELECT ) ); + if( !CHAR_CHECKINDEX(petindex) ) return FALSE; + petname = CHAR_getUseName( petindex); + + //写入宠物栏位 + NPC_Util_GetStrFromStrWithDelim( argstr , "GameCode", buf, sizeof( buf)); + CHAR_setInt( petindex, CHAR_CHECKIN , atoi(buf) ); + LogPet( CHAR_getChar( talker, CHAR_NAME ), + CHAR_getChar( talker, CHAR_CDKEY ), + CHAR_getChar( petindex, CHAR_NAME), + CHAR_getInt( petindex, CHAR_LV), + "raceman(猎宠大会收宠时记录)", + CHAR_getInt( talker,CHAR_FLOOR), + CHAR_getInt( talker,CHAR_X ), + CHAR_getInt( talker,CHAR_Y ), + CHAR_getChar( petindex, CHAR_UNIQUECODE) + ); + + //收宠 + if( NPC_Util_GetStrFromStrWithDelim( argstr, "DelFlag",buf, sizeof( buf) ) != NULL){ + if( strcmp(buf,"on")==0){ + CHAR_endCharOneArray( petindex ); + CHAR_setCharPet( talker , CHAR_getWorkInt( talker , CHAR_WORK_PETSELECT ) , -1); + snprintf( category, sizeof( category), "K%d", CHAR_getWorkInt( talker , CHAR_WORK_PETSELECT )); + CHAR_sendStatusString( talker , category ); + snprintf( category, sizeof( category), "W%d",CHAR_getWorkInt( talker , CHAR_WORK_PETSELECT )); + CHAR_sendStatusString( talker , category ); + //log + LogPet( CHAR_getChar( talker, CHAR_NAME ), + CHAR_getChar( talker, CHAR_CDKEY ), + CHAR_getChar( petindex, CHAR_NAME), + CHAR_getInt( petindex, CHAR_LV), + "raceman(猎宠大会收宠时记录)", + CHAR_getInt( talker,CHAR_FLOOR), + CHAR_getInt( talker,CHAR_X ), + CHAR_getInt( talker,CHAR_Y ), + CHAR_getChar( petindex, CHAR_UNIQUECODE) + ); + } + } + + //分限定种类还是不同种类 + NPC_Util_GetStrFromStrWithDelim( argstr , "GameMode", buf, sizeof( buf)); + gmode = atoi(buf); + if(gmode==4||gmode==5) //不同种类 + { + petNo = ( CHAR_getInt( talker ,CHAR_CHECKIN ) & 0x7FC00000 ) >> 22 ; + //petNo -= 1; + intNo = petNo / 32 ; + shift = petNo % 32 ; + base = 1 << shift; + CHAR_setInt( talker , CHAR_KINDCNT1 + intNo , CHAR_getInt( talker , CHAR_KINDCNT1 + intNo ) | base ); + //sprintf(buuf,"chkin data:%d", CHAR_getInt( talker , CHAR_KINDCNT1 + intNo ) ); + //CHAR_talkToCli( talker, -1,buuf, CHAR_COLORYELLOW); + + //分成个人还是家族赛 + if(gmode == 5) //设定为家族赛 + { + CHAR_setInt( talker,CHAR_CATCHCNT5,CHAR_getInt( talker,CHAR_CATCHCNT5 ) +1 ); + strcpy(name,CHAR_getChar(talker,CHAR_FMNAME)); //家族名称 + sprintf(id,"%d",CHAR_getWorkInt(talker, CHAR_WORKFMINDEXI)); //家族id + } + else // 4 + { + //玩家抓宠次数加1 + fd = getfdFromCharaIndex(talker); + CHAR_setInt( talker,CHAR_CATCHCNT4,CHAR_getInt( talker,CHAR_CATCHCNT4 ) +1 ); + CONNECT_getCharname( fd, name, sizeof( name ) ); //人物名称 + CONNECT_getCdkey( fd, id , sizeof( id ) ); //帐号 + } + } + else // 1 2 3 + { + //分成个人还是家族赛 + if(gmode == 3) //设定为家族赛 + { + //族长次数加1 + CHAR_setInt( talker,CHAR_CATCHCNT3,CHAR_getInt( talker,CHAR_CATCHCNT3 ) +1 ); + strcpy(name,CHAR_getChar(talker,CHAR_FMNAME)); //家族名称 + sprintf(id,"%d",CHAR_getWorkInt(talker, CHAR_WORKFMINDEXI)); //家族id + } + else + { + //玩家抓宠次数加1 + fd = getfdFromCharaIndex(talker); + CONNECT_getCharname( fd, name, sizeof( name ) ); //人物名称 + CONNECT_getCdkey( fd, id , sizeof( id ) ); //帐号 + if(gmode == 1 ) + CHAR_setInt( talker,CHAR_CATCHCNT1,CHAR_getInt( talker,CHAR_CATCHCNT1 ) +1 ); + else + CHAR_setInt( talker,CHAR_CATCHCNT2,CHAR_getInt( talker,CHAR_CATCHCNT2 ) +1 ); + } + } + + //判断现在是比什麽 + switch(gmode) + { + case 1:NPC_Util_GetStrFromStrWithDelim( argstr , "Mode1", buf, sizeof( buf)); break; + case 2:NPC_Util_GetStrFromStrWithDelim( argstr , "Mode2", buf, sizeof( buf)); break; + case 3:NPC_Util_GetStrFromStrWithDelim( argstr , "Mode3", buf, sizeof( buf)); break; + case 4:NPC_Util_GetStrFromStrWithDelim( argstr , "Mode4", buf, sizeof( buf)); break; + case 5:NPC_Util_GetStrFromStrWithDelim( argstr , "Mode5", buf, sizeof( buf)); break; + } + //ac做一次记录跟排名 (fd,charaindex,id,name,limittime,racetype,catchcnt,ranknum) + //sprintf(buuf,"acfd:%d talker:%d mode:%s id:%s name:%s catchcnt:%d",acfd,talker,buf,id,name,CHAR_getInt( talker,CHAR_CATCHCNT ) ); + //CHAR_talkToCli( talker, -1, buuf, CHAR_COLORYELLOW); + if(gmode == 3 || gmode == 5){ + saacproto_ACRaceRecordfmdo_send( acfd , talker , CHAR_getInt( talker, CHAR_FMINDEX ) + , CHAR_getInt( petindex, CHAR_BASEBASEIMAGENUMBER) , CHAR_getChar( petindex, CHAR_UNIQUECODE ) , CHAR_getChar( petindex, CHAR_NAME) ); + + //sprintf(buuf,"acfd:%d talker:%d fmid:%d bbi:%d unicode:%s petn:%s",acfd,talker,CHAR_getInt( talker, CHAR_FMINDEX ) + // ,CHAR_getInt( petindex, CHAR_BASEBASEIMAGENUMBER),CHAR_getChar( petindex, CHAR_UNIQUECODE ),CHAR_getChar( petindex, CHAR_NAME)); + //CHAR_talkToCli( talker, -1, buuf, CHAR_COLORYELLOW); + } + saacproto_ACRaceRecordandSort_send( acfd , talker , buf , id , name , + 0 , CHAR_getInt( talker,CHAR_CATCHCNT1+gmode-1 ) , 0 ) ; + + + //猎宠证次数加1 或 决定下一个题目 + if( NPC_Util_GetStrFromStrWithDelim( argstr, "CheckItem", + buf, sizeof( buf) ) != NULL) + { + item = atoi(buf); + for( i = 0 ; i < CHAR_MAXITEMHAVE ; i++ ) { + itemindex=CHAR_getItemIndex( talker , i ); + if( ITEM_CHECKINDEX( itemindex) ) { + itemid=ITEM_getInt( itemindex ,ITEM_ID ); + //print("itemindex:%d itemid:%d item:%d\n",itemindex,itemid,item); + if(itemid==item){ //找到猎宠证 + if(gmode < 4) + sprintf( buf1, "目前猎宠记录%d只。", CHAR_getInt( talker,CHAR_CATCHCNT1+gmode-1 ) ); + else{ + if(CHAR_getInt( talker,CHAR_CATCHCNT5 ) >= asktotal ){ + sprintf( buf1,"恭喜你达到猎宠大赛终极目标,祝您抽中大奖"); + }else{ + askno = Raceman_getokask( talker , rand() % asktotal ); + asklv = asktable[askno].lowlv + rand()%((asktable[askno].highlv+1)-asktable[askno].lowlv); + temp = (askno << 22) & 0x7FC00000; + temp = temp | ((asklv << 14) & 0x003FC000); + temp = temp | ((asktable[askno].bbi - 100000) & 0x00003FFF); + CHAR_setInt( talker , CHAR_CHECKIN , temp ); + if( asktable[askno].highlv == 0 ) + sprintf( buf1,"请抓给我等级%d『以上』的%s好吗。您目前记录%d种", asktable[askno].lowlv , asktable[askno].petname, CHAR_getInt( talker,CHAR_CATCHCNT1+gmode-1 ) ); + else + sprintf( buf1,"请抓给我『只能』等级%d的%s好吗。您目前记录%d种", asklv , asktable[askno].petname, CHAR_getInt( talker,CHAR_CATCHCNT1+gmode-1 ) ); + } + } + ITEM_setChar( itemindex, ITEM_EFFECTSTRING, buf1); + CHAR_sendItemDataOne( talker , i ); + break; + } + } + } + } + + sprintf( buf,"%sLv:%d登记完成了,加油加油。",petname,CHAR_getInt( petindex, CHAR_LV )); + CHAR_talkToCli( talker, -1, buf , CHAR_COLORWHITE); + + return TRUE; +} + +//读放在saac的排名资料,而且要是目前比赛的项目 +void Raceman_countrank( int meindex, int talker ) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + int ranknum = 0,gmode; + char buf[64],buf1[64]; + + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { //读参数 + print("MsgDisp:GetArgStrErr"); + print("NPCName=%s\n", CHAR_getChar( meindex, CHAR_NAME)); + return; + } + + if(NPC_Util_GetStrFromStrWithDelim( argstr , "RankNum", buf1, sizeof( buf1)) != NULL ){ + ranknum = atoi(buf1); + } + + NPC_Util_GetStrFromStrWithDelim( argstr , "GameMode", buf, sizeof( buf)); + gmode = atoi(buf); + + switch(gmode) + { + case 1:NPC_Util_GetStrFromStrWithDelim( argstr , "Mode1", buf, sizeof( buf)); break; + case 2:NPC_Util_GetStrFromStrWithDelim( argstr , "Mode2", buf, sizeof( buf)); break; + case 3:NPC_Util_GetStrFromStrWithDelim( argstr , "Mode3", buf, sizeof( buf)); break; + case 4:NPC_Util_GetStrFromStrWithDelim( argstr , "Mode4", buf, sizeof( buf)); break; + case 5:NPC_Util_GetStrFromStrWithDelim( argstr , "Mode5", buf, sizeof( buf)); break; + } + + saacproto_ACRaceRecordandSort_send( acfd,talker,buf,"","",gmode,0,ranknum ); + +} + +void Raceman_renewrank( int meindex , int talker , int select ) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + int ranknum = 0; + char buf[64],buf1[64]; + + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { //读参数 + print("MsgDisp:GetArgStrErr"); + print("NPCName=%s\n", CHAR_getChar( meindex, CHAR_NAME)); + return; + } + + if(NPC_Util_GetStrFromStrWithDelim( argstr , "RankNum", buf1, sizeof( buf1)) != NULL ){ + ranknum = atoi(buf1); + } + + if(NPC_Util_GetStrFromStrWithDelim( argstr , "HasGame", buf, sizeof( buf)) != NULL ){ + getStringFromIndexWithDelim( buf , "," , select , buf1 , sizeof(buf1) ); + select = atoi(buf1); + switch(select) + { + case 1:NPC_Util_GetStrFromStrWithDelim( argstr , "Mode1", buf, sizeof( buf)); break; + case 2:NPC_Util_GetStrFromStrWithDelim( argstr , "Mode2", buf, sizeof( buf)); break; + case 3:NPC_Util_GetStrFromStrWithDelim( argstr , "Mode3", buf, sizeof( buf)); break; + case 4:NPC_Util_GetStrFromStrWithDelim( argstr , "Mode4", buf, sizeof( buf)); break; + case 5:NPC_Util_GetStrFromStrWithDelim( argstr , "Mode5", buf, sizeof( buf)); break; + default: return; + } + saacproto_ACRaceRecordandSort_send( acfd,talker,buf,"","",select,0,ranknum ); + } +} + +//检查是否有资格领奖 +BOOL Raceman_checkprize( int meindex , int talker ,char *token) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[256],buf1[64]; + int lowlevel;//最低标准 下限 + int gmode; + + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { //读参数 + print("MsgDisp:GetArgStrErr"); + print("NPCName=%s\n", CHAR_getChar( meindex, CHAR_NAME)); + return FALSE; + } + + NPC_Util_GetStrFromStrWithDelim( argstr , "EndFlag", buf1, sizeof( buf1)); + if( strcmp(buf1,"off")==0){ // 比赛没结束 所以不能领 + NPC_Util_GetStrFromStrWithDelim( argstr , "notend_msg", buf, sizeof( buf)); + strcpy( token, " ☆猎宠战利品颁发☆\n\n"); + strcat( token , buf ); + //strcat( token, " 比赛还在进行中唷...\n"); + return FALSE; + } + + if(Raceman_CheckItem( meindex , talker ) == FALSE){ + NPC_Util_GetStrFromStrWithDelim( argstr , "nonitem_msg", buf, sizeof( buf)); + strcpy( token, " ☆猎宠战利品颁发☆\n\n"); + strcat( token , buf ); + //strcat( token, " 很抱歉,您没有猎宠证无法领奖...\n"); + return FALSE; + } + + NPC_Util_GetStrFromStrWithDelim( argstr , "LowLevel", buf1, sizeof( buf1)); + lowlevel = atoi(buf1); + NPC_Util_GetStrFromStrWithDelim( argstr , "GameMode", buf1, sizeof( buf1)); + gmode = atoi(buf1); + + if( CHAR_getInt( talker,CHAR_CATCHCNT1+gmode-1 ) < lowlevel ){ + NPC_Util_GetStrFromStrWithDelim( argstr , "low_msg", buf, sizeof( buf)); + strcpy( token, " ☆猎宠战利品颁发☆\n\n"); + //strcat( token, " 很抱歉,您没有达到最低标准...\n"); + strcat( token , buf ); + return TRUE; + } + + //检查有无栏位 + if(Raceman_ItemFullCheck( meindex , talker) == FALSE){ + NPC_Util_GetStrFromStrWithDelim( argstr, "itemfull_msg",buf, sizeof( buf) ); + strcpy( token, " ☆猎宠战利品颁发☆\n\n "); + strcat( token, buf ); + return FALSE; + } + + strcpy( token, " ☆猎宠战利品颁发☆\n\n"); + strcat( token, " 猎宠勇士,这是你应得的战利品...\n"); + return TRUE; +} + +void Raceman_awardprize( int meindex , int talker ) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + int fd,itemindex,ret,gmode,rank,lowlevel; + char id[20],name[64],buf[128],buf2[20],buf3[256]; //buuf[256]; + int i,item,itemid,random,prize; + char prizebuf[20][20]; + + memset(prizebuf,0,sizeof(prizebuf)); + + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { //读参数 + print("MsgDisp:GetArgStrErr"); + print("NPCName=%s\n", CHAR_getChar( meindex, CHAR_NAME)); + return; + } + + NPC_Util_GetStrFromStrWithDelim( argstr , "LowLevel", buf2, sizeof( buf2)); + lowlevel = atoi(buf2); + + NPC_Util_GetStrFromStrWithDelim( argstr, "GameMode", buf, sizeof( buf) ); + gmode = atoi( buf ); + + if( CHAR_getInt( talker,CHAR_CATCHCNT1+gmode-1 ) < lowlevel ){ + goto DELITEM; + } + + if(gmode == 3 || gmode == 5) + { + strcpy(name,CHAR_getChar(talker,CHAR_FMNAME)); //家族名称 + sprintf(id,"%d",CHAR_getWorkInt(talker, CHAR_WORKFMINDEXI)); //家族id + } + else // 1 2 4 个人 + { + fd = getfdFromCharaIndex(talker); + CONNECT_getCharname( fd, name, sizeof( name ) ); + CONNECT_getCdkey( fd, id , sizeof( id ) ); //帐号 + } + + rank = 0; + /* 取消 决定一二叁名 + switch(gmode) + { + case 1: + for(i=0;i<3;i++){ + if(strcmp(history1[i].id,id)==0 && strcmp(history1[i].name,name)==0 + && history1[i].catchcnt == CHAR_getInt( talker,CHAR_CATCHCNT1 )){ + rank = i+1; + break; + } + }break; + case 2: + for(i=0;i<3;i++){ + if(strcmp(history2[i].id,id)==0 && strcmp(history2[i].name,name)==0 + && history2[i].catchcnt == CHAR_getInt( talker,CHAR_CATCHCNT2 )){ + rank = i+1; + break; + } + }break; + case 3: + for(i=0;i<3;i++){ + if(strcmp(history3[i].id,id)==0 && strcmp(history3[i].name,name)==0 + && history3[i].catchcnt == CHAR_getInt( talker,CHAR_CATCHCNT3 )){ + rank = i+1; + break; + } + }break; + case 4: + for(i=0;i<3;i++){ + if(strcmp(history4[i].id,id)==0 && strcmp(history4[i].name,name)==0 + && history4[i].catchcnt == CHAR_getInt( talker,CHAR_CATCHCNT4 )){ + rank = i+1; + break; + } + }break; + case 5: + for(i=0;i<3;i++){ + if(strcmp(history5[i].id,id)==0 && strcmp(history5[i].name,name)==0 + && history5[i].catchcnt == CHAR_getInt( talker,CHAR_CATCHCNT5 )){ + rank = i+1; + break; + } + }break; + } + */ + buf[0]='\0'; + if(rank == 1){ + NPC_Util_GetStrFromStrWithDelim( argstr , "thanks1_msg", buf, sizeof( buf)); + NPC_Util_GetStrFromStrWithDelim( argstr , "First", buf2, sizeof( buf2)); + }else if(rank == 2){ + NPC_Util_GetStrFromStrWithDelim( argstr , "thanks2_msg", buf, sizeof( buf)); + NPC_Util_GetStrFromStrWithDelim( argstr , "Second", buf2, sizeof( buf2)); + }else if(rank == 3){ + NPC_Util_GetStrFromStrWithDelim( argstr , "thanks3_msg", buf, sizeof( buf)); + NPC_Util_GetStrFromStrWithDelim( argstr , "Third", buf2, sizeof( buf2)); + }else{ + NPC_Util_GetStrFromStrWithDelim( argstr , "thanks_msg", buf, sizeof( buf)); + NPC_Util_GetStrFromStrWithDelim( argstr , "Normal", buf3, sizeof( buf3)); + //参加奖随机决定 + i = 0; + while( getStringFromIndexWithDelim( buf3 , "," , i+1 , buf2 , sizeof(buf2) )) + { + sprintf( prizebuf[i],"%s",buf2); + i++ ; + } + random = rand() % i; + sprintf( buf2 , "%s" , prizebuf[random]); + //sprintf(buuf,"random:%d item:%s",random,buf2); + //CHAR_talkToCli( talker , -1, buuf , CHAR_COLORYELLOW); + } + CHAR_talkToCli( talker, -1, buf, CHAR_COLORYELLOW); + prize = atoi(buf2); + + //给奖品 + itemindex = ITEM_makeItemAndRegist( prize ); + if(itemindex == -1) return; + + ret = CHAR_addItemSpecificItemIndex( talker, itemindex); + if( ret < 0 || ret >= CHAR_MAXITEMHAVE ) { + print( "npc_raceman.c: ACCEPTadditem error itemindex[%d]\n", itemindex); + ITEM_endExistItemsOne( itemindex); + return ; + } + CHAR_sendItemDataOne( talker, ret); + +DELITEM: + //删除猎宠证 + if( NPC_Util_GetStrFromStrWithDelim( argstr, "CheckItem", buf , sizeof( buf ) ) != NULL ) + { + item = atoi(buf); + for( i = 0 ; i < CHAR_MAXITEMHAVE ; i++ ) { + itemindex=CHAR_getItemIndex( talker , i ); + if( ITEM_CHECKINDEX( itemindex) ) { + itemid=ITEM_getInt( itemindex ,ITEM_ID ); + if(itemid==item){ //找到猎宠证 + LogItem( + CHAR_getChar( talker, CHAR_NAME ), + CHAR_getChar( talker, CHAR_CDKEY ), + #ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, + #else + ITEM_getInt( itemindex, ITEM_ID ), + #endif + "因领奖而消失", + CHAR_getInt( talker,CHAR_FLOOR), + CHAR_getInt( talker,CHAR_X ), + CHAR_getInt( talker,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + + CHAR_DelItem( talker , i ); + CHAR_talkToCli( talker, -1, "猎宠证消失了", CHAR_COLORYELLOW); + break; + } + } + } + } + + + +} + +int Raceman_readmode( int meindex , int talkerindex ) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + int gmode; // 1:新手限 2:个人限 3:团体限 4:个人不限 5:团体不限 + char buf[10]; + + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { //读参数 + print("MsgDisp:GetArgStrErr"); + print("NPCName=%s\n", CHAR_getChar( meindex, CHAR_NAME)); + } + + if(NPC_Util_GetStrFromStrWithDelim( argstr , "GameMode", buf, sizeof( buf)) != NULL ){ + gmode = atoi(buf); + return gmode; + } + + return 0; +} + +int Raceman_CheckSelectRank(meindex,talkerindex,datanum) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[64],buf2[64]; + int select = 0; + + + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr)) == NULL) { //读参数 + print("MsgDisp:GetArgStrErr"); + print("NPCName=%s\n", CHAR_getChar( meindex, CHAR_NAME)); + } + + NPC_Util_GetStrFromStrWithDelim( argstr, "EndFlag",buf, sizeof( buf) ); + if(strcmp(buf,"off")==0){ + if(NPC_Util_GetStrFromStrWithDelim( argstr , "HasGame", buf, sizeof( buf)) != NULL ){ + getStringFromIndexWithDelim( buf , "," , datanum-1 , buf2 , sizeof(buf2) ); + select = atoi(buf2); + } + }else{ + if(NPC_Util_GetStrFromStrWithDelim( argstr , "GameMode", buf, sizeof( buf)) != NULL ){ + select = atoi(buf) + 10 ; + } + + } + + return select; +} + +void Raceman_GetQuestion( int meindex ,int talker , char *token) +{ + char line[2000]; + char buf[512];//buuf[128]; + int i,j ,quiztotal = 0, quiz = 0 ; + FILE* fp; + + fp = fopen(".//data//racequiz.txt", "r"); + if (fp == NULL) + { + print("racequiz File Open Error\n"); + strcpy( token,"系统发生错误!"); + return ; + } + while(1){ + if (fgets(line, sizeof(line), fp) == NULL) break; + quiztotal++; + } + fclose(fp); + + fp = fopen(".//data//racequiz.txt", "r"); + if (fp == NULL) + { + print("racequiz File Open Error\n"); + strcpy( token,"系统发生错误!"); + return ; + } + + quiz = rand() % (quiztotal) ; //乱数决定问题 + + j = 0 ; + while(1){ + + line[0]='\0'; + if (fgets(line, sizeof(line), fp) == NULL){ + break; + } + chop(line); + + // #为注解 + if( line[0] == '#' ) + continue; + for( i=0; i +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "configfile.h" +#include "lssproto_serv.h" +#include "saacproto_cli.h" +#include "npc_riderman.h" +#include "family.h" +#include "log.h" + +extern int familyNumTotal; +extern char familyListBuf[MAXFAMILYLIST]; +extern tagRidePetTable ridePetTable[296]; +extern struct FM_POINTLIST fmpointlist; + +char sendbuf[1024]; +char buf[1024]; +char subbuf[128]; +int i, j; + +/* + * 涩烂今木凶它奴件玉它毛请允NPC + * 棵哑 平旦玄失玉矛件民乓□仁日中卅日综木月井手[ + * + */ + +struct { + int windowno; + int windowtype; + int buttontype; + int takeitem; + int giveitem; + int takegold; + char message[4096]; + int letter[4]; +}w; + +struct { + BOOL use; + int checkhaveitem; + int checkhaveitemgotowin; + int checkdonthaveitem; + int checkdonthaveitemgotowin; + int warp; + int battle; + int gotowin; +}buttonproc[13]; /* ok,cancel, yes,no,prev,next 及凛及质 */ + + + + + +enum { + CHAR_WORK_MSGCOLOR = CHAR_NPCWORKINT1, +}; + +static void NPC_Riderman_selectWindow( int meindex, int toindex, int num); +static BOOL NPC_Riderman_readData( int meindex, int windowno, BOOL chkflg); +static int NPC_Riderman_restoreButtontype( char *data ); +// static BOOL getLetter(int meindex,int talker ); +// static BOOL checkLetter(int meindex,int talker ); + +/********************************* +* 赓渝质 +*********************************/ +BOOL NPC_RidermanInit( int meindex ) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[1024]; + //int i; + //char secondToken[1024]; + + // Robin test + // print(" riderman_Init "); + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "conff", buf, sizeof( buf)) + == NULL ) + { + print( "riderman:没有指定设定的档案 。\n"); + return FALSE; + } + /* 赓渝凛卞涩烂犯□正毛民尼永弁仄化支月 */ + if( !NPC_Riderman_readData( meindex, -1, TRUE) ) { + return FALSE; + } + + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPEWINDOWMAN ); + + return TRUE; +} + + + + +/********************************* +* 仄井仃日木凶凛及质 +*********************************/ +void NPC_RidermanTalked( int meindex , int talkerindex , char *szMes ,int color ) +{ + //print(" Rideman_fmindex:%d ", CHAR_getInt( meindex, CHAR_FMINDEX) ); + + NPC_Riderman_selectWindow( meindex, talkerindex, 1 ); + +} +/********************************* +* 苇日木凶凛及质 +*********************************/ +void NPC_RidermanLooked( int meindex , int lookedindex) +{ + + //print(" Look:me:%d,looked:%d ",meindex,lookedindex); + NPC_Riderman_selectWindow( meindex, lookedindex,1 ); + +} + +static void NPC_Riderman_selectWindow( int meindex, int toindex, int num) +{ + + int fd; + char buf[256]; + + /* 皿伊奶乩□卞覆仄化分仃 杀允月 */ + if( CHAR_getInt( toindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) { + return; + } + /* ㄠ弘伉永玉动 及心 */ + if( !NPC_Util_charIsInFrontOfChar( toindex, meindex, 1 )) return; + + if( !NPC_Riderman_readData( meindex, num, FALSE) ) { + print( "riderman:readdata error\n"); + return; + } + + fd = getfdFromCharaIndex( toindex); + if( fd != -1 ) { + lssproto_WN_send( fd, w.windowtype, + w.buttontype, + w.windowno+100, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + makeEscapeString( w.message, buf, sizeof(buf))); + } +} + +void NPC_RidermanWindowTalked( int meindex, int talkerindex, + int seqno, int select, char *data) + +{ + + + int button = -1; + char buf[512]; + + /* ㄠ弘伉永玉动 及心 */ + if( NPC_Util_CharDistance( talkerindex, meindex ) > 1) return; + + /* 仇及它奴件玉它 寞及犯□正毛 心 戈 */ + if( !NPC_Riderman_readData( meindex, seqno - 100, FALSE) ) { + print( "riderman:readdata error\n"); + return; + } + /* 瓷仄凶示正件毛譬屯月 */ + if( w.windowtype == WINDOW_MESSAGETYPE_SELECT ) { + button = atoi( data)+5; + if( button > 12 ) { + print( "riderman:invalid button[%d]\n", button); + return; + } + } + else if( select & WINDOW_BUTTONTYPE_OK) button = 0; + else if( select & WINDOW_BUTTONTYPE_CANCEL) button = 1; + else if( select & WINDOW_BUTTONTYPE_YES) button = 2; + else if( select & WINDOW_BUTTONTYPE_NO) button = 3; + else if( select & WINDOW_BUTTONTYPE_PREV) button = 4; + else if( select & WINDOW_BUTTONTYPE_NEXT) button = 5; + else { + print( "riderman:invalid button[%d]\n", select); + return; + } + if( buttonproc[button].use == TRUE ) { + int fd; + int newwin = -1; + + fd = getfdFromCharaIndex( talkerindex); + + /* 示正件卞方匀化质 毛孔曰歹仃月 */ + if( newwin == -1 ) { + newwin = buttonproc[button].gotowin; + } + + + //print(" takegold:%d ", w.takegold ); + + // Robin + // 学习 Lv 40 + if( newwin == 6 ) { + + int charImg; + // int i, petindex, bFind = 0; + + charImg = CHAR_getInt( talkerindex, CHAR_BASEBASEIMAGENUMBER); + if( CHAR_getInt( talkerindex, CHAR_LEARNRIDE ) >= 40 ) + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, + makeEscapeString( "\n\n你已经学会初级班了呀。\n不需要再学了。", + buf, sizeof(buf))); + return; + } + +#if 0 + if( !checkLetter( meindex, talkerindex) ) + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, + makeEscapeString( "\n\n很抱歉喔!\n学习骑乘宠物需要本庄园族长的同意书。", + buf, sizeof(buf))); + return; + } + + for( i=0; i= 80 ) + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, + makeEscapeString( "\n\n你已经学会中级班了呀。\n不需要再学了。", + buf, sizeof(buf))); + return; + } + else if( CHAR_getInt( talkerindex, CHAR_LEARNRIDE ) < 40 ) + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, + makeEscapeString( "\n\n你必须先学过初级班才能来中级班唷。", + buf, sizeof(buf))); + return; + } + +#if 0 + if( !checkLetter( meindex, talkerindex) ) + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, + makeEscapeString( "\n\n很抱歉喔!\n学习骑乘宠物需要本庄园族长的同意书。", + buf, sizeof(buf))); + return; + } + + for( i=0; i= 120 ) + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, + makeEscapeString( "\n\n你已经学会高级班了呀。\n不需要再学了。", + buf, sizeof(buf))); + return; + } + else if( CHAR_getInt( talkerindex, CHAR_LEARNRIDE ) < 80 ) + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, + makeEscapeString( "\n\n你必须先学过中级班才能来高级班唷。", + buf, sizeof(buf))); + return; + } + +#if 0 + if( !checkLetter( meindex, talkerindex) ) + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, + makeEscapeString( "\n\n很抱歉喔!\n学习骑乘宠物需要本庄园族长的同意书。", + buf, sizeof(buf))); + return; + } + + for( i=0; i 120 ) + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, + makeEscapeString( "\n\n你已经学会特级班了呀。\n不需要再学了。", + buf, sizeof(buf))); + return; + } + else if( CHAR_getInt( talkerindex, CHAR_LEARNRIDE ) < 120 ) + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, + makeEscapeString( "\n\n你必须先学过高级班才能来特级班唷。", + buf, sizeof(buf))); + return; + } + +#if 0 + if( !checkLetter( meindex, talkerindex) ) + { + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, -1, -1, + makeEscapeString( "\n\n很抱歉喔!\n学习骑乘宠物需要本庄园族长的同意书。", + buf, sizeof(buf))); + return; + } + + for( i=0; i +#include +#include +#include +#include + +#include "object.h" +#include "char.h" +#include "char_base.h" +#include "char_data.h" +#include "net.h" +#include "npcutil.h" +#include "handletime.h" +#include "readmap.h" +#include "npc_roomadminnew.h" +#include "npc_door.h" + + +/* + * 尕 遣支今氏 By Kawata + * + * 酷 汔卞 凳及啃踏五 仄凶 互镀中午 丹及匹踏五卅云仄 + */ + + +enum{ + /* 左□弁扑亦件 区 */ + CHAR_WORKINT_RANGE = CHAR_NPCWORKINT1, + /* 戚及蠡濠凛棉 */ + CHAR_WORKINT_NEXTTIME = CHAR_NPCWORKINT2, + /* 憎迕>蠡濠"坌蟆= */ + CHAR_WORKINT_PRINTCLOSETIME = CHAR_NPCWORKINT3, + /* 盒腹绸仄凶 尥 */ + CHAR_WORKINT_SEARCHROOMTIME = CHAR_NPCWORKINT4, + +}; +enum { + /* 愤坌及 蟆 */ + CHAR_WORKCHAR_MYNAME = CHAR_NPCWORKCHAR1, + /* 戚及 瘀 */ + CHAR_WORKCHAR_NEXTROOM = CHAR_NPCWORKCHAR2, + +}; + +/* 仿件平件弘 憎 迕伐□弁*/ +enum { + /* 栋 谛及 蟆 */ + CHAR_WORKCHAR_ADMNAME = CHAR_NPCWORKCHAR1, +}; + + +/* 犯□正白央奶伙毛伞 允月犯奴伊弁玄伉[ls2/src/lss 井日及锹覆隙烂 */ +#define NPC_ROOMADMINNEW_DATADIR "roomadmin/" +/* 犯□正白央奶伙及傀舰阂 */ +#define NPC_ROOMADMINNEW_EXTENSION ".room" +/* 仿件平件弘犯□正白央奶伙及傀舰阂 件禾仿伉 */ +#define NPC_ROOMADMINNEW_RANKING_EXTENSION ".score" +#define NPC_ROOMADMINNEW_RANKING_EXTENSION_TMP ".score.tmp" +/* 嫖 诳樊仿件平件弘白央奶伙 */ +#define NPC_ROOMADMINNEW_SCOREFILE ".score" +/* 蠡户濠曰"坌蟆井日丢永本□斥 */ +#define NPC_ROOMADMINNEW_PRINTCLOSETIME_DEFAULT 5 + +#define NPC_ROOMADMINNEW_MSG_CLOSE_BEFORE \ +"%s %s %s的活动,截止日%d分前。" +#define NPC_ROOMADMINNEW_MSG_CLOSE \ +"。。。已截止。" +#define NPC_ROOMADMINNEW_MSG_NONE \ +"很可惜本次没有人获得房间的拥有权。" +#define NPC_ROOMADMINNEW_MSG_CONGRATULATION \ +"恭喜您!%s获得房间的所有权!%s的金钱全部被徵收了。%s请向管理员询问房间暗号。" +#define NPC_ROOMADMINNEW_MSG_PRINTPASSWD_NONE \ +"由於你未持有房间因此没有暗号。" +#define NPC_ROOMADMINNEW_MSG_DSPPASSWD1 \ +"你的房间是 %s %s %s。" +#define NPC_ROOMADMINNEW_MSG_DSPPASSWD2 \ +"房间的暗号是 「%s 」。只要在对着门说话时在与尾加上「...」,别人就看不见了唷!" +#define NPC_ROOMADMINNEW_MSG_DSPNEXTAUCTION_NONE \ +"本日的活动结束。" +#define NPC_ROOMADMINNEW_MSG_DSPNEXTAUCTION1 \ +"接下来的房间是 %s %s %s。" +#define NPC_ROOMADMINNEW_MSG_DSPNEXTAUCTION2 \ +"截止日是 %d:%d 。到截止日为止还有%2d小时%02d分。" +#define NPC_ROOMADMINNEW_MSG_DSPNEXTAUCTION3 \ +"最低得标金额是 %s 。" + +#define NPC_ROOMADMINNEW_MSG_RANKING_INFO \ +"这是高额得标者排行榜。" +#define NPC_ROOMADMINNEW_MSG_RANKING \ +"Rank %2d:%4d/%02d/%02d %8d GOLD %s%s " + +/* 仇及NPC及丢永本□斥缙 */ +#define NPC_ROOMADMINNEW_MSGCOLOR CHAR_COLORWHITE +#define NPC_RANKING_MSGCOLOR CHAR_COLORWHITE +#define NPC_ROOMADMINNEW_2WEEK 60*60*24*14 + +static void NPC_RoomAdminNew_DspNextAuction( int meindex, int talkerindex); +static void NPC_RoomAdminNew_DspRoomPasswd( int meindex, int adminindex, int talkerindex); +static BOOL NPC_RoomAdminNew_SetNextAuction( int meindex); +static BOOL NPC_RoomAdminNew_WriteDataFile( int meindex, int pindex, char *roomname, + char *passwd, BOOL flg); +static void NPC_RoomAdminNew_CreatePasswd( char *passwd, int passlen); +static void NPC_RoomAdminNew_SendMsgThisFloor( int index, char *buff); +static int NPC_RoomAdminNew_SearchPlayerHasMostMoney( int meindex); +static void NPC_RoomAdminNew_CloseProc( int meindex); +static int NPC_RoomAdminNew_WriteScoreFile( int meindex, int pindex); +static void NPC_RoomAdminNew_ReadScoreFile( int meindex, int talkerindex, + char *admname); + +/************************************************ + * 赓渝质 + ************************************************/ +BOOL NPC_RoomAdminNewInit( int meindex ) +{ + int i; + char buf[256]; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + + /* 愤坌及栋喱及蝈 及玉失互请 晓互月引匹仇及NPC反综岳今木卅中 */ + for( i = 3; ; i ++ ) { + if( getStringFromIndexWithDelim(argstr, "|" , i , buf,sizeof(buf) )) { + if( NPC_DoorSearchByName( buf) < 0 ) { + print( "admin not created.在密码门做好之前先等待。\n"); + return FALSE; + } + } + else{ + break; + } + } + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + + /* 赓渝祭质 */ + + /* type本永玄 */ + CHAR_setInt( meindex, CHAR_WHICHTYPE, CHAR_TYPEROOMADMIN); + /* 躲 区潸 */ + getStringFromIndexWithDelim(argstr, "|" , 1 , buf,sizeof(buf) ); + CHAR_setWorkInt( meindex , CHAR_WORKINT_RANGE , atoi( buf )); + /* 愤坌及 蟆潸 */ + if( !getStringFromIndexWithDelim(argstr, "|" , 2 , buf,sizeof(buf) )) { + print( "arg err.admin not created.\n"); + return( FALSE); + } + CHAR_setWorkChar( meindex , CHAR_WORKCHAR_MYNAME , buf); + + /* 憎迕>蠡濠"坌蟆=赓渝祭 */ + CHAR_setWorkInt( meindex, CHAR_WORKINT_PRINTCLOSETIME, 0); + + /* 戚及 瘀午左□弁扑亦件钒疡凛棉毛本永玄 */ + NPC_RoomAdminNew_SetNextAuction( meindex); + + return TRUE; +} +/************************************************ + * 伙□皿质 + * 裟太请仄 蘸反公氏卅卞 匹卅仁化手中中[ + * 匹手濮覆卞ㄠ坌 卞允月仪 + ************************************************/ +void NPC_RoomAdminNewLoop( int meindex ) +{ + int hun; + /* 手仄手钒疡凛棉互瑁引匀化中卅井匀凶日潸 仄卅云允 */ + if( CHAR_getWorkInt( meindex, CHAR_WORKINT_NEXTTIME) == 0 ) { + /* 蟆荚腹绸仄凶 互啜尹壬腹绸仄卅云允 */ + struct tm tm1,tm2; + time_t t; + memcpy( &tm1, localtime( (time_t *)&NowTime.tv_sec), sizeof( tm1)); + t = CHAR_getWorkInt( meindex, CHAR_WORKINT_SEARCHROOMTIME); + memcpy( &tm2, localtime( &t), + sizeof( tm2)); + if( tm1.tm_year != tm2.tm_year || + tm1.tm_mday != tm2.tm_mday || + tm1.tm_mon != tm2.tm_mon ) + { + NPC_RoomAdminNew_SetNextAuction( meindex); + } + return; + } + + hun = ceil((double)(CHAR_getWorkInt( meindex, CHAR_WORKINT_NEXTTIME) - + NowTime.tv_sec) / 60.0); + /* 手仄手及凛及啃卞hun互穴奶瓜旦及凛反ㄟ卞 允 */ + if( hun < 0 ) hun = 0; + + if( hun < NPC_ROOMADMINNEW_PRINTCLOSETIME_DEFAULT ) { + /* 蠡户濠曰嗤仁卞卅匀凶日>蠡户濠曰"坌蟆匹允=午蜕歹允 */ + if( hun != CHAR_getWorkInt( meindex, CHAR_WORKINT_PRINTCLOSETIME)) { + char buff[256]; + if( hun != 0 ) { + char buf2[1024]; + char msgbuff[16]; + char argstr2[NPC_UTIL_GETARGSTR_BUFSIZE]; + int doorindex; + + /* 盒树 潸 */ + doorindex = NPC_DoorSearchByName( CHAR_getWorkChar( meindex, CHAR_WORKCHAR_NEXTROOM)); + NPC_Util_GetArgStr( doorindex, argstr2, sizeof( argstr2)); + getStringFromIndexWithDelim( argstr2, "|" , 9 , + buf2,sizeof(buf2) ); + /* 盒树 */ + if( strlen(CHAR_getChar( doorindex, CHAR_NAME) ) != 0 ) { + strcpy( msgbuff, "号室"); + } + else { + msgbuff[0] = '\0'; + } + /* >蠡户濠曰"坌蟆匹允= */ + snprintf( buff, sizeof(buff), + NPC_ROOMADMINNEW_MSG_CLOSE_BEFORE, + buf2, + CHAR_getChar( doorindex, CHAR_NAME), + msgbuff, + hun); + + CHAR_setWorkInt( meindex, CHAR_WORKINT_PRINTCLOSETIME, hun); + } + else { + /* >蠡户濠曰引仄凶= */ + strcpy( buff, NPC_ROOMADMINNEW_MSG_CLOSE); + CHAR_setWorkInt( meindex, CHAR_WORKINT_PRINTCLOSETIME, 0); + } + /* 仇及白夫失卞中月谛蝈够卞霜耨 */ + NPC_RoomAdminNew_SendMsgThisFloor( meindex, buff); + } + } + /* 蠡户濠匀凶凛及质 */ + if( hun == 0 ) { + NPC_RoomAdminNew_CloseProc( meindex); + } +} + +/************************************************ + * 仄井仃日木凶凛及质 + ************************************************/ +void NPC_RoomAdminNewTalked( int meindex , int talkerindex , char *msg , + int color ) +{ + + /* 皿伊奶乩□互玉失穴件及1弘伉永玉动 卅日 杀允月[ */ + if(NPC_Util_CharDistance( talkerindex, meindex ) > 1)return; + + /* 仄井仃日木凶谛互 盒毛欧曰化中凶日由旦伐□玉毛 憎允月 */ + /*NPC_RoomAdminNew_DspRoomPasswd( meindex, talkerindex);*/ + + /* 戚荚钒疡凛棉] 盒毛蜕丹 */ + NPC_RoomAdminNew_DspNextAuction( meindex, talkerindex); +} +/*----------------------------------------------- + * 蠡户濠日木凶凛及质 + *----------------------------------------------*/ +static void NPC_RoomAdminNew_CloseProc( int meindex) +{ + int pindex; + char buff[256]; + char pname[32]; + int failed = TRUE; + + /* 域 云嗯毛聂仁 匀化中月皿伊奶乩□毛茧允 */ + pindex = NPC_RoomAdminNew_SearchPlayerHasMostMoney( meindex); + /* 竟癫樊失伉 */ + if( pindex != -1) { + /* ㄠ荚匹 仃月伙□皿匹允 */ + while( 1) { + char passwd[9]; + int doorindex; + doorindex = NPC_DoorSearchByName( + CHAR_getWorkChar( meindex, CHAR_WORKCHAR_NEXTROOM)); + /* 由旦伐□玉毛戏岳允月 */ + NPC_RoomAdminNew_CreatePasswd( passwd, sizeof( passwd)); + /* 白央奶伙卞仇及谛及 平□]平乓仿 ] 盒 ]由旦毛踏五 戈 */ + if( NPC_RoomAdminNew_WriteDataFile( meindex, pindex, + CHAR_getWorkChar( meindex, CHAR_WORKCHAR_NEXTROOM), + passwd, 1) + == FALSE) + { + break; + } + /* 玉失卞由旦毛本永玄 */ + if( NPC_DoorSetPasswd( doorindex, passwd) == -1 ) { + break; + } + /* 躲渝蜃毛本永玄 */ + CHAR_setWorkInt( doorindex, CHAR_WORKDOOREXPIRETIME, + CHAR_getWorkInt( meindex, CHAR_WORKINT_NEXTTIME) + + NPC_ROOMADMINNEW_2WEEK); + /* 诳樊仿件平件弘民尼永弁↓白央奶伙踏五 心 */ + NPC_RoomAdminNew_WriteScoreFile( meindex, pindex); + + CHAR_setInt( pindex, CHAR_GOLD, 0); + + CHAR_send_P_StatusString( pindex , CHAR_P_STRING_GOLD); + + /* 云户匹午丹″丢永本□斥 */ + strcpy( pname, CHAR_getChar( pindex, CHAR_NAME)); + snprintf( buff, sizeof(buff), + NPC_ROOMADMINNEW_MSG_CONGRATULATION, pname, pname, pname); + failed = FALSE; + break; + } + } + + /* 竟癫樊瓜扑引凶反质 撩 及凛 */ + if( failed) { + /* 白央奶伙井日仇及 盒及树 毛壅允 */ + NPC_RoomAdminNew_WriteDataFile( meindex, -1, + CHAR_getWorkChar( meindex, CHAR_WORKCHAR_NEXTROOM), + NULL, 0); + /* 竟癫樊反中引六氏丢永本□斥 */ + snprintf( buff, sizeof(buff), + NPC_ROOMADMINNEW_MSG_NONE); + } + /* 仇及白夫失卞中月谛蝈够卞霜耨 */ + NPC_RoomAdminNew_SendMsgThisFloor( meindex, buff); + + /* 戚及 瘀午左□弁扑亦件钒疡凛棉毛本永玄 */ + NPC_RoomAdminNew_SetNextAuction( meindex); + +} +/*----------------------------------------------- + * 域 云嗯毛聂仁 匀化中月皿伊奶乩□毛茧允 + *----------------------------------------------*/ +static int NPC_RoomAdminNew_SearchPlayerHasMostMoney( int meindex) +{ + int i,j, range; + int fl,x,y, gold; + int doorindex; + int topindex; + + fl = CHAR_getInt( meindex, CHAR_FLOOR); + x = CHAR_getInt( meindex, CHAR_X); + y = CHAR_getInt( meindex, CHAR_Y); + range = CHAR_getWorkInt( meindex , CHAR_WORKINT_RANGE); + topindex = -1; + + /* 盒及 蟆井日 斓 诳嗯喊毛譬屯月 */ + doorindex = NPC_DoorSearchByName( CHAR_getWorkChar( meindex, + CHAR_WORKCHAR_NEXTROOM)); + gold = atoi( CHAR_getWorkChar( doorindex, CHAR_WORKDOORGOLDLIMIT)); + /* 区 卞中月平乓仿及醒毛譬屯月 */ + for( i = x-range ; i <= x+range ; i++ ){ + for( j = y-range ; j <= y+range ; j ++ ){ + OBJECT object; + for( object = MAP_getTopObj( fl, i,j); object; + object = NEXT_OBJECT(object) ) + { + int objindex = GET_OBJINDEX( object); + if( OBJECT_getType(objindex) == OBJTYPE_CHARA ){ + int index; + index = OBJECT_getIndex(objindex); + if( CHAR_getInt( index, + CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ) + { + if( CHAR_getInt( index, CHAR_GOLD) >= gold ) { + if( topindex == -1 ) { + topindex = index; + } + else { + /* 玄永皿及谛午云嗯 胜 */ + int nowgold,topgold; + nowgold = CHAR_getInt( index, CHAR_GOLD ); + topgold = CHAR_getInt( topindex, CHAR_GOLD); + if( nowgold > topgold ) { + topindex = index; + } + else if( nowgold == topgold ) { + /* 域踝卅日伊矛伙互斓中谛 */ + int nowlv, toplv; + nowlv = CHAR_getInt( index, CHAR_LV ); + toplv = CHAR_getInt( topindex, CHAR_LV); + if( nowlv < toplv ) { + topindex = index; + } + /* 公木匹手荸瑁仄卅中氏卅日仿件母丞元扎*/ + /* index互燮及谛互切斤匀午尕厍分仃升 */ + else if( nowlv == toplv ) { + if( RAND( 0,1)) { + topindex = index; + } + } + } + } + } + } + } + } + } + } + return( topindex); +} +/*----------------------------------------------- + * 隙烂今木凶index及白夫失卞中月皿伊奶乩□蝈够卞 + * 丢永本□斥毛霜耨允月[ + *----------------------------------------------*/ +static void NPC_RoomAdminNew_SendMsgThisFloor( int index, char *buff) +{ + int i, fl; + int playernum = CHAR_getPlayerMaxNum(); + + fl = CHAR_getInt( index, CHAR_FLOOR); + for( i = 0; i < playernum; i ++ ) { + if( CHAR_getInt( i, CHAR_FLOOR) == fl ) { + /* 及凶户皿伊奶乩□井民尼永弁 */ + if( CHAR_getInt( i, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER ) { + CHAR_talkToCli( i, index, buff, NPC_ROOMADMINNEW_MSGCOLOR); + } + } + } +} +/*----------------------------------------------- + * 由旦伐□玉毛戏岳允月[passlen及-1 侬互综日木月[ + * makecdn.c及天仁曰[ + *----------------------------------------------*/ +static void NPC_RoomAdminNew_CreatePasswd( char *passwd, int passlen) +{ +#define NPC_ROOMADMINNEW_RAND() ( (rand() /256) % 32768 ) /* 256匹喃月及反刭醒及 撙及凶户 */ + int i; + char *candidates[]= { + "A","B","D", "E","F","G","H", "J","K","L","M", "N","P","Q","R", + "T","W","X","Y", "a","b","d","e", "f","g","m","n", "q","r","t", + "0","1","2", "3","4","5","6", "7","8","9" + }; + strcpy( passwd , ""); + for(i = 0;i < passlen -1 ; i++){ + strcat( passwd , candidates[ NPC_ROOMADMINNEW_RAND() % (sizeof( candidates)/sizeof(candidates[0])) ] ); + } +#undef NPC_ROOMADMINNEW_RAND +} +/*----------------------------------------------- + * 栋 谛迕及白央奶伙卞犯□正毛踏五 戈 + * + * 白央奶伙 反"房间的名字.room" + * 毛银丹[ + * + * 白央奶伙及白巧□穴永玄反] + * cdkey|charaname|passwd|expiretime + * + * + * 娄醒及flg 互ㄠ分匀凶日踏五 心]ㄟ分匀凶日白央奶伙绰轮 + * 曰袄“TRUE“岳 + * FALSE:窒日井及撩 + *----------------------------------------------*/ +static BOOL NPC_RoomAdminNew_WriteDataFile( int meindex, int pindex, + char *roomname, + char *passwd, int flg) +{ + char *cdkey; + char charaname[32*2]; + char expiretime[64]; + char filename[128]; + char outbuf[1024]; + FILE *fp_src; + + /* 白央奶伙 毛戏岳 */ + strcpy( filename, NPC_ROOMADMINNEW_DATADIR); + /*strcat( filename, CHAR_getWorkChar( meindex, CHAR_WORKCHAR_NEXTROOM));*/ + strcat( filename, roomname); + strcat( filename, NPC_ROOMADMINNEW_EXTENSION); + + if( flg) { + /* 诳仄凶谛及 平□ */ + //getcdkeyFromCharaIndex( pindex, cdkey, sizeof(cdkey )); + cdkey = CHAR_getChar( pindex, CHAR_CDKEY); + /* 诳仄凶谛及平乓仿 */ + makeEscapeString( CHAR_getChar( pindex, CHAR_NAME), + charaname, sizeof( charaname)); + /* 渝蜃濠木凛棉 */ + snprintf( expiretime, sizeof( expiretime), "%d", + CHAR_getWorkInt( meindex, CHAR_WORKINT_NEXTTIME) + + NPC_ROOMADMINNEW_2WEEK /* ㄡ葱棉 */ + ); + + /* 犯伉立正匹仁仁月 */ + snprintf( outbuf, sizeof( outbuf), "%s|%s|%s|%s|", + cdkey, charaname, passwd, expiretime); + fp_src = fopen( filename, "w"); + if( !fp_src) { + print( "[%s:%d] File Open Error\n", __FILE__, __LINE__); + return FALSE; + } + fputs( outbuf, fp_src); + fclose( fp_src); + } + else { + unlink( filename); + } + + return TRUE; + +} +/*----------------------------------------------- + * 犯□正白央奶伙毛 氏匹竟癫允月 盒互丐木壬 + * 犯□正毛伞 仄化忒允[ + *----------------------------------------------*/ +BOOL NPC_RoomAdminNew_ReadFile( char *roomname, NPC_ROOMINFO *data) +{ + FILE *fp; + char line[1024]; + char buf2[128]; + char filename[128]; + + /* 白央奶伙 毛戏岳 */ + strcpy( filename, NPC_ROOMADMINNEW_DATADIR); + strcat( filename, roomname); + strcat( filename, NPC_ROOMADMINNEW_EXTENSION); + + fp = fopen( filename, "r"); + if( !fp) return FALSE; + fgets( line, sizeof( line), fp); + /* 犯□正本永玄 */ + getStringFromIndexWithDelim( line, "|" , 1 , buf2,sizeof(buf2) ); + strcpy( data->cdkey, buf2); + getStringFromIndexWithDelim( line, "|" , 2 , buf2,sizeof(buf2) ); + strcpy( data->charaname, makeStringFromEscaped( buf2)); + getStringFromIndexWithDelim( line, "|" , 3 , buf2,sizeof(buf2) ); + strcpy( data->passwd, buf2); + getStringFromIndexWithDelim( line, "|" , 4 , buf2,sizeof(buf2) ); + if( strcmp( buf2, "max") == 0 ) { + data->expire = 0xffffffff; + } + else { + data->expire = atoi( buf2); + } + fclose( fp); + return TRUE; +} +/*----------------------------------------------- + * 戚及左□弁扑亦件及凛棉午 盒 毛伐□弁卞本永玄允月 + *----------------------------------------------*/ +static BOOL NPC_RoomAdminNew_SetNextAuction( int meindex) +{ + int i, j; + int hitindex = -1; + int charnum = CHAR_getCharNum(); + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + struct tm tmwk; + + /* 卅升毛潸 允月*/ + memcpy( &tmwk, localtime( ( time_t *)&NowTime.tv_sec), sizeof( tmwk)); + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + + /* 玉失毛腹绸允月[NPC_DoorSearchByName()毛银匀凶日啼分仃升 + * 蛲互聂仁卅曰公丹卅及匹仇仇左伉斥瓜伙 + */ + for( i = CHAR_getPlayerMaxNum()+ CHAR_getPetMaxNum(); + i < charnum; + i ++ ) + { + if( CHAR_getInt( i, CHAR_WHICHTYPE) != CHAR_TYPEDOOR) { + continue; + } + if( CHAR_getWorkInt( i, CHAR_WORKDOORPASSFLG) == 0 ) { + continue; + } + /* 蟆互栋喱及手及井民尼永弁允月 */ + for( j = 3; ; j ++ ) { + int rc; + char *doorname; + char buf[256]; + int dataexist; + NPC_ROOMINFO data; + + rc = getStringFromIndexWithDelim( argstr, "|" , j, + buf,sizeof(buf) ); + if( rc != TRUE ) { + break; + } + doorname = CHAR_getWorkChar( i, CHAR_WORKDOORNAME); + /* 玉失 互域谯仄凶 */ + if( strcmp( buf, doorname ) != 0 ) { + continue; + } + /* 互域谯允月 */ + if( atoi( CHAR_getWorkChar( i, CHAR_WORKDOORWEEK)) != tmwk.tm_wday) { + break; + } + /* 域杀赓渝祭 */ + memset( &data, 0, sizeof( data)); + /* 犯□正白央奶伙井日犯□正毛 戈 */ + if( NPC_RoomAdminNew_ReadFile( doorname, &data) ) { + struct tm tmdoor; + /* 仇仇匹渝蜃濠木民尼永弁毛支匀化支月[ + * 渝蜃互濠木化中凶日白央奶伙毛绰轮允月 + * 酷 读卞丐引曰仇及伙□民件骚月仪反卅中午 丹[ + */ + if( data.expire < NowTime.tv_sec) { + NPC_RoomAdminNew_WriteDataFile( meindex, -1,doorname, NULL, 0); + /* 玉失手五木中卞*/ + NPC_DoorSetPasswd( i, "8hda8iauia90494jasd9asodfasdf89"); + CHAR_setWorkInt( i, CHAR_WORKDOOREXPIRETIME, 0xffffffff); + + break; + } + /* 漆 匹濠木月 瘀卅日 */ + memcpy( &tmdoor, localtime( ( time_t *)&data.expire), sizeof( tmdoor)); + if( tmdoor.tm_mon != tmwk.tm_mon || + tmdoor.tm_mday != tmwk.tm_mday) + { + break; + } + dataexist = TRUE; + } + else { + dataexist = FALSE; + } + /* 蜇箕及凛棉方曰 匹丐月仪[ */ + if( tmwk.tm_hour > atoi( CHAR_getWorkChar( i, CHAR_WORKDOORHOUR))){ + break; + } + if( tmwk.tm_hour == atoi( CHAR_getWorkChar( i, CHAR_WORKDOORHOUR))) { + if( tmwk.tm_min >= atoi( CHAR_getWorkChar( i, CHAR_WORKDOORMINUTE))) { + break; + } + } + /* 仇仇引匹五凶日午曰丐尹内仇及玉失反戚钒疡卞请月凤伞互 + * 丐月午中丹仪[仇木井日职及玉失午民尼永弁允月[ + */ + if( hitindex == -1 ) { + hitindex = i; + } + else { + /* 钒疡凛棉互镀仁]蜇箕欧曰日木化中月午中丹及互穸燮赐匏 */ + if( atoi( CHAR_getWorkChar( hitindex, CHAR_WORKDOORHOUR)) + > atoi( CHAR_getWorkChar( i, CHAR_WORKDOORHOUR))) + { + hitindex = i; + } + else if( atoi( CHAR_getWorkChar( hitindex, CHAR_WORKDOORHOUR)) + == atoi( CHAR_getWorkChar( i, CHAR_WORKDOORHOUR))) + { + if( atoi( CHAR_getWorkChar( hitindex, CHAR_WORKDOORMINUTE)) + > atoi( CHAR_getWorkChar( i, CHAR_WORKDOORMINUTE))) + { + hitindex = i; + } + else if( atoi( CHAR_getWorkChar( hitindex, CHAR_WORKDOORMINUTE)) + == atoi( CHAR_getWorkChar( i, CHAR_WORKDOORMINUTE))) + { + NPC_ROOMINFO datawk; + int hitindexdataexist; + hitindexdataexist = NPC_RoomAdminNew_ReadFile( + CHAR_getWorkChar( hitindex, CHAR_WORKDOORNAME), + &datawk); + if( hitindexdataexist < dataexist ) { + hitindex = i; + } + /* 仇仇引匹 月方丹卅日燮及index及引引午允月[*/ + + } + } + } + } + } + if( hitindex > 0 ) { + /* 钒疡凛棉毛本永玄 */ + tmwk.tm_sec = 0; + tmwk.tm_min = atoi( CHAR_getWorkChar( hitindex, CHAR_WORKDOORMINUTE)); + tmwk.tm_hour = atoi( CHAR_getWorkChar( hitindex, CHAR_WORKDOORHOUR)); + CHAR_setWorkInt( meindex, CHAR_WORKINT_NEXTTIME, mktime( &tmwk)); + /* 盒 毛本永玄 */ + CHAR_setWorkChar( meindex, CHAR_WORKCHAR_NEXTROOM, + CHAR_getWorkChar( hitindex, CHAR_WORKDOORNAME)); + + } + else { + CHAR_setWorkInt( meindex, CHAR_WORKINT_NEXTTIME, 0); + /* 盒 毛本永玄 */ + CHAR_setWorkChar( meindex, CHAR_WORKCHAR_NEXTROOM,"" ); + + } + /* 腹绸凛棉毛本永玄 */ + CHAR_setWorkInt( meindex, CHAR_WORKINT_SEARCHROOMTIME, NowTime.tv_sec); + return( TRUE); +} +/*----------------------------------------------- + * 仄井仃日木凶谛互 盒毛欧曰化中凶日由旦伐□玉毛 憎允月 + *----------------------------------------------*/ +static void NPC_RoomAdminNew_DspRoomPasswd( int index, int adminindex, int talkerindex) +{ + int i, rc, flg = FALSE; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char argstr2[NPC_UTIL_GETARGSTR_BUFSIZE]; + char *cdkey; + char buf[128]; + char buff[16]; + char buf2[1024]; + + NPC_ROOMINFO info; + + //getcdkeyFromCharaIndex( talkerindex, cdkey, sizeof(cdkey)); + cdkey = CHAR_getChar( talkerindex, CHAR_CDKEY); + + NPC_Util_GetArgStr( adminindex, argstr, sizeof( argstr)); + for( i = 3; ; i ++ ) { + if( getStringFromIndexWithDelim(argstr, "|" , i , buf,sizeof(buf) )) { + rc = NPC_RoomAdminNew_ReadFile( buf, &info); + if( rc == TRUE ) { + /* CDKEY 午平乓仿及 蟆互域谯仄凶日 */ + if( strcmp( info.cdkey, cdkey) == 0 && + strcmp( info.charaname, + CHAR_getChar( talkerindex, CHAR_NAME)) == 0 ) + { + int doorindex; + char msgbuf[256]; + /* 盒树 潸 */ + doorindex = NPC_DoorSearchByName( buf); + NPC_Util_GetArgStr( doorindex, argstr2, sizeof( argstr2)); + getStringFromIndexWithDelim( argstr2, "|" , 9 , + buf2,sizeof(buf2) ); + /* 盒树 */ + if( strlen(CHAR_getChar( doorindex, CHAR_NAME) ) != 0 ) { + strcpy( buff, "号室"); + } + else { + buff[0] = '\0'; + } + + /* 丢永本□斥本永玄 */ + snprintf( msgbuf, sizeof( msgbuf), + NPC_ROOMADMINNEW_MSG_DSPPASSWD1, + buf2, + CHAR_getChar( doorindex, CHAR_NAME), + buff + ); + /* 丢永本□斥霜耨 */ + CHAR_talkToCli( talkerindex, index,msgbuf, + NPC_ROOMADMINNEW_MSGCOLOR); + + /* 丢永本□斥本永玄 */ + snprintf( msgbuf, sizeof( msgbuf), + NPC_ROOMADMINNEW_MSG_DSPPASSWD2, + CHAR_getWorkChar(doorindex, CHAR_WORKDOORPASSWD) + ); + /* 丢永本□斥霜耨 */ + CHAR_talkToCli( talkerindex, index,msgbuf, + NPC_ROOMADMINNEW_MSGCOLOR); + flg = TRUE; + } + } + } + else { + break; + } + } + if( !flg) { + CHAR_talkToCli( talkerindex, index, + NPC_ROOMADMINNEW_MSG_PRINTPASSWD_NONE, + NPC_ROOMADMINNEW_MSGCOLOR); + } +} +/*----------------------------------------------- + * 戚荚钒疡凛棉] 盒毛蜕丹 + *----------------------------------------------*/ +static void NPC_RoomAdminNew_DspNextAuction( int meindex, int talkerindex) +{ + char msgbuf[2048]; + time_t closetime; + + closetime = CHAR_getWorkInt( meindex, CHAR_WORKINT_NEXTTIME); + /* 戚及钒疡凛棉互瑁引匀化中卅仃木壬>瑁引匀化引六氏[=丢永本□斥*/ + if( closetime == 0 ) { + snprintf( msgbuf, sizeof( msgbuf), + NPC_ROOMADMINNEW_MSG_DSPNEXTAUCTION_NONE + ); + CHAR_talkToCli( talkerindex, meindex,msgbuf, NPC_ROOMADMINNEW_MSGCOLOR); + } + else { + int doorindex; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char explain[1024]; /* */ + char buff[16]; + struct tm tmwk; + int difftime; + /* 盒树 毛潸 */ + doorindex = NPC_DoorSearchByName( + CHAR_getWorkChar( meindex, CHAR_WORKCHAR_NEXTROOM)); + NPC_Util_GetArgStr( doorindex, argstr, sizeof( argstr)); + getStringFromIndexWithDelim(argstr, "|" , 9 , explain,sizeof(explain)); + /* 盒树 */ + if( strlen(CHAR_getChar( doorindex, CHAR_NAME) ) != 0 ) { + strcpy( buff, "号室"); + } + else { + buff[0] = '\0'; + } + snprintf( msgbuf, sizeof( msgbuf), + NPC_ROOMADMINNEW_MSG_DSPNEXTAUCTION1, + explain, + CHAR_getChar( doorindex, CHAR_NAME), + buff + ); + CHAR_talkToCli( talkerindex, meindex,msgbuf, NPC_ROOMADMINNEW_MSGCOLOR); + /* 蠡户濠曰凛棉 */ + memcpy( &tmwk, localtime( &closetime), sizeof( tmwk)); + difftime = closetime - NowTime.tv_sec; + snprintf( msgbuf, sizeof( msgbuf), + NPC_ROOMADMINNEW_MSG_DSPNEXTAUCTION2, + tmwk.tm_hour, + tmwk.tm_min, + difftime / 3600, + (difftime % 3600) / 60 + ); + CHAR_talkToCli( talkerindex, meindex,msgbuf, NPC_ROOMADMINNEW_MSGCOLOR); + + /* 票蜃嗯喊 */ + snprintf( msgbuf, sizeof( msgbuf), + NPC_ROOMADMINNEW_MSG_DSPNEXTAUCTION3, + CHAR_getWorkChar( doorindex, CHAR_WORKDOORGOLDLIMIT) + ); + CHAR_talkToCli( talkerindex, meindex,msgbuf, NPC_ROOMADMINNEW_MSGCOLOR); + } + +} +/*----------------------------------------------- + * 诳樊仿件平件弘民尼永弁↓白央奶伙踏五 心 + * + * 白央奶伙 反"管理者的名字.score" + * 件禾仿伉白央奶伙 反"管理者的名字.score.tmp" + * + * 白央奶伙白巧□穴永玄反] + * gold|time|cdkey|charaname|owntitle + * 匹ㄠㄟ垫引匹[ + * + * 曰袄“ 岳 “仿件平件弘窒匏井忒允[仿件平件弘卞 日卅仃木壬ㄟ[ + * 撩 “-1 + *----------------------------------------------*/ +static int NPC_RoomAdminNew_WriteScoreFile( int meindex, int pindex) +{ +#define NPC_RANKING_DEFAULT 10 + int ret = 0; + char *cdkey; + char charaname[32*2],owntitle[32*2]; + char filename_dest[128],filename[128]; + char outbuf[1024], line[1024]; + FILE *fp_src, *fp_dest; + + /* 白央奶伙 毛戏岳 */ + strcpy( filename, NPC_ROOMADMINNEW_DATADIR); + strcat( filename, CHAR_getWorkChar( meindex, CHAR_WORKCHAR_MYNAME)); + strcpy( filename_dest, filename); + strcat( filename, NPC_ROOMADMINNEW_RANKING_EXTENSION); + strcat( filename_dest, NPC_ROOMADMINNEW_RANKING_EXTENSION_TMP); + + /* 诳仄凶谛及 平□ */ + //getcdkeyFromCharaIndex( pindex , cdkey , sizeof(cdkey )); + cdkey = CHAR_getChar( pindex, CHAR_CDKEY); + + /* 诳仄凶谛及平乓仿 */ + makeEscapeString( CHAR_getChar( pindex, CHAR_NAME), + charaname, sizeof( charaname)); + + /* 诳仄凶谛及惫寞 */ + makeEscapeString( CHAR_getChar( pindex, CHAR_OWNTITLE), + owntitle, sizeof( owntitle)); + + /* 犯伉立正匹仁仁月 */ + snprintf( outbuf, sizeof( outbuf), "%d|%d|%s|%s|%s|\n", + CHAR_getInt( pindex, CHAR_GOLD), + CHAR_getWorkInt( meindex,CHAR_WORKINT_NEXTTIME), + cdkey, charaname, owntitle ); + + + fp_dest = fopen( filename_dest, "w"); + if( !fp_dest) return -1; + + fp_src = fopen( filename, "r"); + if( !fp_src ) { + /* 赓及域瘀卅及匹公及引引踏中化蔽歹曰 */ + fclose( fp_dest); + fp_src = fopen( filename, "w"); + if( !fp_src) return -1; + fputs( outbuf, fp_src); + fclose( fp_src); + return 1; + } + else { + int cnt = 1; + char buf[128]; + while( fgets( line, sizeof( line), fp_src)) { + getStringFromIndexWithDelim( line, "|" , 1 , buf,sizeof(buf) ); + if( ret == 0 ) { + /* 诳嗯喊 胜 */ + if( atoi( buf) < CHAR_getInt( pindex, CHAR_GOLD) ) { + /* 嗯喊互 匀化中月及匹醣 */ + fputs( outbuf, fp_dest); + fputs( line, fp_dest); + ret = cnt; + cnt ++; + } + else { + /* 公木动陆反公及引引踏仁 */ + fputs( line, fp_dest); + } + } + else { + /* 公木动陆反公及引引踏仁 */ + fputs( line, fp_dest); + } + cnt ++; + if( cnt > NPC_RANKING_DEFAULT ) break; + } + /* 仿件平件弘互ㄠㄟ蜊公欠匀化中卅中凛 */ + if( ret == 0 && cnt <= NPC_RANKING_DEFAULT ) { + fputs( outbuf, fp_dest); + ret = cnt; + } + } + fclose( fp_src); + fclose( fp_dest); + /* 褥 木晶尹 */ + /* 簿井白央奶伙戊疋□允月棵签卅 芊襞匀化凶日 尹化票今中[ */ + fp_src = fopen( filename_dest, "r"); + if( !fp_src) return -1; + fp_dest = fopen( filename, "w"); + if( !fp_dest) { + fclose( fp_src); + return -1; + } + while( fgets( line, sizeof( line), fp_src)) { + fputs( line, fp_dest); + } + fclose( fp_dest); + fclose( fp_src); + return( ret); +#undef NPC_RANKING_DEFAULT +} +/*----------------------------------------------- + * 诳樊仿件平件弘白央奶伙 心 心↓ 憎 + * + * 娄醒 meindex 平乓仿奶件犯永弁旦[仿件平件弘NPC及奶件犯永弁旦[ + * talkerindex 仄井仃日木凶谛及index[仇木卞talk毛霜耨允月[ + * admname 尕 遣盒今氏及 蟆 + * + *----------------------------------------------*/ +static void NPC_RoomAdminNew_ReadScoreFile( int meindex, int talkerindex, + char *admname) +{ + int cnt; + char filename[128]; + char line[1024]; + FILE *fp; + + /* 白央奶伙 毛戏岳 */ + strcpy( filename, NPC_ROOMADMINNEW_DATADIR); + strcat( filename, admname); + strcat( filename, NPC_ROOMADMINNEW_RANKING_EXTENSION); + + fp = fopen( filename, "r"); + if( !fp) return; + cnt = 1; + while( fgets( line, sizeof( line), fp)) { + int gold,bidtime; + char charaname[32],owntitle[32]; + char tmp[64]; + char outbuf[1024], buf[256]; + struct tm tmwk; + + getStringFromIndexWithDelim( line, "|" , 1 , buf,sizeof(buf) ); + gold = atoi(buf); + getStringFromIndexWithDelim( line, "|" , 2 , buf,sizeof(buf) ); + bidtime = atoi(buf); + getStringFromIndexWithDelim( line, "|" , 4 , buf,sizeof(buf) ); + strcpy( charaname, makeStringFromEscaped( buf)); + getStringFromIndexWithDelim( line, "|" , 5 , buf,sizeof(buf) ); + strcpy( owntitle, makeStringFromEscaped( buf)); + if( strlen( owntitle) != 0 ) { + strcpy( tmp, "["); + strcat( tmp, owntitle); + strcat( tmp, "] "); + strcpy( owntitle, tmp); + } + else { + strcpy( owntitle, " "); + } + memcpy( &tmwk, localtime( (time_t *)&bidtime), sizeof( tmwk)); + + snprintf( outbuf, sizeof( outbuf), + NPC_ROOMADMINNEW_MSG_RANKING, + cnt, + tmwk.tm_year + 1900, + tmwk.tm_mon+1, + tmwk.tm_mday, + gold,charaname,owntitle + ); + CHAR_talkToCli( talkerindex, meindex,outbuf, + NPC_RANKING_MSGCOLOR); + cnt ++; + } + fclose( fp); + +} +/************************************************ + * 赓渝质 + ************************************************/ +BOOL NPC_RankingInit( int meindex ) +{ + char buf[256]; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + + /* 赓渝祭质 */ + + /* type本永玄 */ + CHAR_setInt( meindex, CHAR_WHICHTYPE, CHAR_TYPERANKING); + /* 栋 谛及 蟆潸 */ + if( !getStringFromIndexWithDelim(argstr, "|" , 1 , buf,sizeof(buf) )) { + print( "arg err.rankingNPC not created.\n"); + return( FALSE); + } + CHAR_setWorkChar( meindex , CHAR_WORKCHAR_ADMNAME , buf); + + return TRUE; +} +/************************************************ + * 仄井仃日木凶凛及质 + ************************************************/ +void NPC_RankingTalked( int meindex , int talkerindex , char *msg , + int color ) +{ + /* 皿伊奶乩□互玉失穴件及1弘伉永玉动 卅日 杀允月[ */ + if(NPC_Util_CharDistance( talkerindex, meindex ) > 1)return; + + CHAR_talkToCli( talkerindex, meindex, + NPC_ROOMADMINNEW_MSG_RANKING_INFO, + NPC_RANKING_MSGCOLOR); + + NPC_RoomAdminNew_ReadScoreFile( meindex, talkerindex, + CHAR_getWorkChar( meindex, CHAR_WORKCHAR_ADMNAME)); + +} +/************************************************ + * 赓渝质 + ************************************************/ +BOOL NPC_PrintpassmanInit( int meindex ) +{ + char buf[256]; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + + /* 赓渝祭质 */ + + /* type本永玄 */ + CHAR_setInt( meindex, CHAR_WHICHTYPE, CHAR_TYPEPRINTPASSMAN); + /* 栋 谛及 蟆潸 */ + if( !getStringFromIndexWithDelim(argstr, "|" , 1 , buf,sizeof(buf) )) { + print( "arg err.passmanNPC not created.\n"); + return( FALSE); + } + CHAR_setWorkChar( meindex , CHAR_WORKCHAR_ADMNAME , buf); + + return TRUE; +} +/************************************************ + * 仄井仃日木凶凛及质 + ************************************************/ +void NPC_PrintpassmanTalked( int meindex , int talkerindex , char *msg , + int color ) +{ + int i; + int charnum; + /* 皿伊奶乩□互玉失穴件及2弘伉永玉动 卅日 杀允月[ */ + if(NPC_Util_CharDistance( talkerindex, meindex ) > 2)return; + + /* 愤坌迕及栋 谛及 蟆毛腹绸允月*/ + charnum = CHAR_getCharNum(); + for(i= CHAR_getPlayerMaxNum() +CHAR_getPetMaxNum(); + i +#include "object.h" +#include "char_base.h" +#include "char.h" +#include "util.h" +#include "npcutil.h" +#include "npc_oldman.h" +#include "title.h" +#include "char_data.h" +#include "readmap.h" +#include "lssproto_serv.h" +#include "log.h" + +#define RANGE 2 + + +void NPC_SetFlg(int talker,int shiftbit); +BOOL NPC_CheckFlg(int point,int shiftbit); +BOOL NPC_SavePointItemCheck(int meindex,int talker,int itemno,int kosuu); +void NPC_MessageDisp(int meindex,int talker,int MseNo); +BOOL NPC_UsedCheck(int meindex,int talker,int flg); +BOOL NPC_SavePointItemDelete(int meindex,int talker,int itemNo,int kosuu); + +extern time_t initTime; + +BOOL NPC_SavePointInit( int meindex ) +{ + int oldmanid=0, bornfl=0, bornx=0 ,borny=0; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char token[32]; + char buf2[512]; + + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr))==NULL){ + print("NPC_Savepoint.c Init: GetArgStrErr"); + return FALSE; + } + + if(NPC_Util_GetStrFromStrWithDelim(argstr,"ID",buf2,sizeof( buf2) )==NULL){ + print("SavePoint:ID尚未设定 "); + return FALSE; + } + + oldmanid=atoi(buf2); + NPC_Util_GetStrFromStrWithDelim(argstr,"Born",buf2,sizeof( buf2) ); + getStringFromIndexWithDelim( buf2,",",1,token,sizeof(token)); + bornfl = atoi( token ); + getStringFromIndexWithDelim( buf2,",",2,token,sizeof(token)); + bornx = atoi( token ); + getStringFromIndexWithDelim( buf2,",",3,token,sizeof(token)); + borny = atoi( token ); + + CHAR_setWorkInt( meindex , CHAR_WORKOLDMANID ,oldmanid ); + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPESAVEPOINT ); + CHAR_setFlg( meindex , CHAR_ISATTACKED , 1 ); + + if( MAP_IsValidCoordinate( bornfl,bornx,borny )== TRUE + && CHAR_ElderSetPosition( oldmanid ,bornfl,bornx, borny ) == TRUE ){ + return TRUE; + }else{ + printf( "Invalid elder npcarg=%s\n", argstr ); + return FALSE; + } +} + +void NPC_SavePointTalked( int meindex , int talkerindex , char *msg , + int color ) +{ + int fd; + + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char token[512]; + char buf2[1024]; + char timeMsg[1024]; + int oldmanid; + + if( ! NPC_Util_charIsInFrontOfChar(talkerindex,meindex,RANGE) + || CHAR_getFlg( talkerindex,CHAR_ISDIE )){ + if( (CHAR_getInt(talkerindex,CHAR_X) == CHAR_getInt(meindex,CHAR_X)) + && (CHAR_getInt(talkerindex,CHAR_Y) == CHAR_getInt(meindex,CHAR_Y)) + && (CHAR_getInt(talkerindex,CHAR_FLOOR) ==CHAR_getInt(meindex,CHAR_FLOOR)) ){ + }else{ + return; + } + } + + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr))==NULL){ + print("NPC_Savepoint.c TypeCheck: GetArgStrErr\n"); + return ; + } + + if(NPC_Util_GetStrFromStrWithDelim(argstr,"ID",buf2,sizeof( buf2) )==NULL) return ; + oldmanid=atoi(buf2); + + if(strstr(argstr,"NOITEM")!=NULL) { + NPC_SetFlg(talkerindex,oldmanid); + } + + if(NPC_CheckFlg(CHAR_getInt(talkerindex,CHAR_SAVEPOINT),oldmanid)==FALSE){ + + if(NPC_UsedCheck(meindex,talkerindex,0)==TRUE){ + NPC_MessageDisp(meindex,talkerindex,2); + }else{ + NPC_MessageDisp(meindex,talkerindex,0); + } + }else{ + CHAR_setInt( talkerindex, CHAR_LASTTALKELDER ,CHAR_getWorkInt( meindex, CHAR_WORKOLDMANID ) ); + fd = getfdFromCharaIndex( talkerindex); + if( fd != -1 ) { +#ifndef _NPC_NOSAVEPOINT + Char *chwk; + chwk = CHAR_getCharPointer( talkerindex); + // CoolFish: +1 2001/11/05 + if (!chwk) return; + + CHAR_charSaveFromConnectAndChar( fd, chwk ,FALSE ); + // Nuke 0907: For acsv test + { + CHAR_charSaveFromConnectAndChar( fd, chwk ,FALSE ); + } +#endif + } + + NPC_Util_GetStrFromStrWithDelim(argstr,"NomalMsg",token,sizeof( token) ); + sprintf(buf2,token,CHAR_getChar(talkerindex,CHAR_NAME)); + + // Robin 0619 display time + { + time_t new_t; + int dd,hh,mm,ss; + + time(&new_t); + new_t-=initTime; + + dd=(int) new_t / 86400; new_t=new_t % 86400; + hh=(int) new_t / 3600; new_t=new_t % 3600; + mm=(int) new_t / 60; new_t=new_t % 60; + ss=(int) new_t; + + if (dd>0) { + snprintf( timeMsg, sizeof( timeMsg ) , + "本星球已经启动了 %d 日 %d 小时 %d 分 %d 秒。",dd,hh,mm,ss); + } else if (hh>0) { + snprintf( timeMsg, sizeof( timeMsg ) , + "本星球已经启动了 %d 小时 %d 分 %d 秒。",hh,mm,ss); + } else { + snprintf( timeMsg, sizeof( timeMsg ) , + "本星球已经启动了 %d 分 %d 秒。",mm,ss); + } + strcat(buf2,timeMsg); + + } + { + char temp[1024]; + //char *answer;// CoolFish: Rem 2001/4/18 + extern unsigned int StateTable[]; + // Robin 03/20 万能的天神,请赐给我灌水的力量!!!! + sprintf(temp,"目前线上人数为 %d 人。当前服务端版本 : <%s>",abs(StateTable[LOGIN]),SERVER_VERSION); + strcat(buf2,temp); + + } + CHAR_talkToCli( talkerindex , meindex , buf2 , CHAR_COLORWHITE ); + + } + + + +} + + +/*----------------------------------------- + * 弁仿奶失件玄井日忒匀化五凶凛卞裟太请今木月[ + * +-------------------------------------------*/ +void NPC_SavePointWindowTalked( int meindex, int talkerindex, + int seqno, int select, char *data) +{ + + /*-- 及引歹曰卞中卅中午五反蔽 --*/ + if( NPC_Util_CharDistance( talkerindex, meindex ) > 2) { + return; + } + + if(seqno==CHAR_WINDOWTYPE_WINDOWSAVEPOINT_START){ + if(select==WINDOW_BUTTONTYPE_YES){ + if(NPC_UsedCheck(meindex,talkerindex,1)==TRUE){ + NPC_MessageDisp(meindex,talkerindex,1); + } + } + } + + +} + + +/* + *--失奶 丞及民尼永弁分仃毛垫丹 + */ +BOOL NPC_AndReduce(int meindex,int talker,char *buf,int flg) +{ + + char buf2[512]; + char buf3[256]; + int itemNo=0; + int kosuu; + int j=1; + + if(flg==0){ + + while(getStringFromIndexWithDelim(buf,"&",j,buf2,sizeof(buf2))!=FALSE) + { + j++; + /*-- ← 互丐木壬}公及失奶 丞反 醒隙烂仄化月午蜕丹啦 --*/ + if(strstr( buf2, "*") != NULL){ + getStringFromIndexWithDelim(buf2,"*",1,buf3,sizeof(buf3)); + itemNo = atoi(buf3); + getStringFromIndexWithDelim(buf2,"*",2,buf3,sizeof(buf3)); + kosuu = atoi(buf3); + + + /*--民尼永弁乒□玉--*/ + if(NPC_SavePointItemCheck(meindex,talker,itemNo,kosuu)==FALSE){ + return FALSE; + } + + }else{ + itemNo = atoi(buf2); + + /*--民尼永弁乒□玉--*/ + if(NPC_SavePointItemCheck(meindex,talker,itemNo,1)==FALSE){ + return FALSE; + } + + } + } + + }else{ + /*-- ← 互丐木壬}公及失奶 丞反 醒隙烂仄化月午蜕丹啦 --*/ + if(strstr( buf, "*") != NULL){ + getStringFromIndexWithDelim(buf,"*",1,buf3,sizeof(buf3)); + itemNo = atoi(buf3); + getStringFromIndexWithDelim(buf,"*",2,buf3,sizeof(buf3)); + kosuu = atoi(buf3); + + /*--民尼永弁乒□玉--*/ + if(NPC_SavePointItemCheck(meindex,talker,itemNo,kosuu)==FALSE){ + return FALSE; + } + + }else{ + itemNo = atoi(buf); + /*--民尼永弁乒□玉--*/ + if(NPC_SavePointItemCheck(meindex,talker,itemNo,1)==FALSE){ + return FALSE; + } + } + + } + + + return TRUE; +} + + +BOOL NPC_AndReduceDelete(int meindex,int talker,char *buf,int flg) +{ + + char buf2[512]; + char buf3[256]; + int itemNo=0; + int kosuu; + int j=1; + + if(flg==0){ + + while(getStringFromIndexWithDelim(buf,"&",j,buf2,sizeof(buf2))!=FALSE) + { + j++; + /*-- ← 互丐木壬}公及失奶 丞反 醒隙烂仄化月午蜕丹啦 --*/ + if(strstr( buf2, "*") != NULL){ + getStringFromIndexWithDelim(buf2,"*",1,buf3,sizeof(buf3)); + itemNo = atoi(buf3); + getStringFromIndexWithDelim(buf2,"*",2,buf3,sizeof(buf3)); + kosuu = atoi(buf3); + + /*--绰轮乒□玉--*/ + if(NPC_SavePointItemDelete(meindex,talker,itemNo,kosuu)==FALSE){ + return FALSE; + } + + }else{ + itemNo = atoi(buf2); + /*--绰轮乒□玉--*/ + if(NPC_SavePointItemDelete(meindex,talker,itemNo,1)==FALSE){ + return FALSE; + } + + } + } + + }else{ + /*-- ← 互丐木壬}公及失奶 丞反 醒隙烂仄化月午蜕丹啦 --*/ + if(strstr( buf, "*") != NULL){ + getStringFromIndexWithDelim(buf,"*",1,buf3,sizeof(buf3)); + itemNo = atoi(buf3); + getStringFromIndexWithDelim(buf,"*",2,buf3,sizeof(buf3)); + kosuu = atoi(buf3); + + /*--绰轮乒□玉--*/ + if(NPC_SavePointItemDelete(meindex,talker,itemNo,kosuu)==FALSE){ + return FALSE; + } + + }else{ + itemNo = atoi(buf); + + /*--绰轮乒□玉--*/ + if(NPC_SavePointItemDelete(meindex,talker,itemNo,1)==FALSE){ + return FALSE; + } + } + + } + + + return TRUE; +} + + + +/* + * 椭瘀毛苇凶仄凶井及民尼永弁 + */ +BOOL NPC_UsedCheck(int meindex,int talker,int flg) +{ + + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[128]; + char buf2[512]; + int i=1; + int checkflg=0; + + + /*--涩烂白央奶伙毛 心 心--*/ + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr))==NULL){ + print("NPC_savePoint.c UseCheck: GetArgStrErr"); + return FALSE; + } + + /*-- 邰卅失奶 丞毛手匀化中月井及民尼永弁-*/ + if(NPC_Util_GetStrFromStrWithDelim(argstr,"GetItem",buf,sizeof( buf) )!=NULL) + { + i=1; + while( getStringFromIndexWithDelim(buf,",",i,buf2,sizeof(buf2)) !=FALSE ) + { + i++; + if(strstr( buf2, "&") != NULL){ + + if(NPC_AndReduce( meindex, talker, buf2,0)==TRUE) + { + checkflg=1; + break; + } + }else{ + if(NPC_AndReduce( meindex, talker, buf2,1)==TRUE) + { + checkflg=2; + break; + } + } + } + if(checkflg==0) return FALSE; + } else return TRUE; // Arminius 2.5 如果没有设 GetItem 则一律储存 + + if(flg==1){ + if(checkflg==1){ + /*--仇仇匹绰轮及质 --*/ + if(NPC_AndReduceDelete(meindex,talker,buf2,0)==FALSE){ + return FALSE; + } + }else{ + /*--仇仇匹绰轮及质 --*/ + if(NPC_AndReduceDelete(meindex,talker,buf2,1)==FALSE){ + return FALSE; + } + } + } + + return TRUE; + +} + + + +void NPC_MessageDisp(int meindex,int talker,int MesNo) +{ + + int fd = getfdFromCharaIndex( talker); + int buttontype=WINDOW_BUTTONTYPE_OK; + int windowtype=WINDOW_MESSAGETYPE_MESSAGE; + int windowno=CHAR_WINDOWTYPE_WINDOWSAVEPOINT_START; + + char token[1024]; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[32]; + + /*--涩烂白央奶伙毛 心 心--*/ + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr))==NULL){ + print("NPC_savePoint.c UseCheck: GetArgStrErr"); + return ; + } + + switch(MesNo){ + case 0:/*-- 邰卅失奶 丞毛手匀化中月井及民尼永弁-*/ + NPC_Util_GetStrFromStrWithDelim(argstr,"RequestMsg",token,sizeof( token) ); + + break; + + case 1:/*-- 邰卅失奶 丞毛手匀化中月井及民尼永弁-*/ + NPC_Util_GetStrFromStrWithDelim(argstr,"OkMsg",token,sizeof( token) ); + NPC_Util_GetStrFromStrWithDelim(argstr,"ID",buf,sizeof( buf) ); + NPC_SetFlg(talker,atoi(buf)); + /*--本□皮今六化丐仆月--*/ + /* 反卅仄井仃凶蛊卞}愤坌及ID毛筏盛今六月 */ + CHAR_setInt( talker, CHAR_LASTTALKELDER ,CHAR_getWorkInt( meindex, CHAR_WORKOLDMANID ) ); + + /* 本□皮允月 */ + /* 夫永弁仄化中月反内互卅中及匹失件夫永弁仄卅中 */ + fd = getfdFromCharaIndex( talker); + if( fd != -1 ) { +#ifndef _NPC_NOSAVEPOINT + Char *chwk; + chwk = CHAR_getCharPointer( talker); + // CoolFish: +1 2001/11/05 + if (!chwk) return; + CHAR_charSaveFromConnectAndChar( fd, chwk ,FALSE ); +#endif + } + + break; + + case 2:/*-- 邰卅失奶 丞毛手匀化中月井及民尼永弁-*/ + NPC_Util_GetStrFromStrWithDelim(argstr,"RealyMsg",token,sizeof( token) ); + buttontype=WINDOW_BUTTONTYPE_YESNO; + break; + + } + lssproto_WN_send( fd, windowtype, + buttontype, + windowno, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + + +} + +BOOL NPC_SavePointItemDelete(int meindex,int talker,int itemNo,int kosuu) +{ + int i; + int itemindex; + int id; + int cnt=0; + + for( i=CHAR_STARTITEMARRAY;i +#include "object.h" +#include "char_base.h" +#include "char.h" +#include "util.h" +#include "npcutil.h" +#include "npc_oldman.h" +#include "title.h" +#include "char_data.h" +#include "readmap.h" +#include "lssproto_serv.h" +#include "log.h" + +#define RANGE 2 + + +void NPC_SetFlg(int talker,int shiftbit); +BOOL NPC_CheckFlg(int point,int shiftbit); +BOOL NPC_SavePointItemCheck(int meindex,int talker,int itemno,int kosuu); +void NPC_MessageDisp(int meindex,int talker,int MseNo); +BOOL NPC_UsedCheck(int meindex,int talker,int flg); +BOOL NPC_SavePointItemDelete(int meindex,int talker,int itemNo,int kosuu); + +extern time_t initTime; + +BOOL NPC_SavePointInit( int meindex ) +{ + int oldmanid=0, bornfl=0, bornx=0 ,borny=0; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char token[32]; + char buf2[512]; + + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr))==NULL){ + print("NPC_Savepoint.c Init: GetArgStrErr"); + return FALSE; + } + + if(NPC_Util_GetStrFromStrWithDelim(argstr,"ID",buf2,sizeof( buf2) )==NULL){ + print("SavePoint:ID尚未设定 "); + return FALSE; + } + + oldmanid=atoi(buf2); + NPC_Util_GetStrFromStrWithDelim(argstr,"Born",buf2,sizeof( buf2) ); + getStringFromIndexWithDelim( buf2,",",1,token,sizeof(token)); + bornfl = atoi( token ); + getStringFromIndexWithDelim( buf2,",",2,token,sizeof(token)); + bornx = atoi( token ); + getStringFromIndexWithDelim( buf2,",",3,token,sizeof(token)); + borny = atoi( token ); + + CHAR_setWorkInt( meindex , CHAR_WORKOLDMANID ,oldmanid ); + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPESAVEPOINT ); + CHAR_setFlg( meindex , CHAR_ISATTACKED , 1 ); + + if( MAP_IsValidCoordinate( bornfl,bornx,borny )== TRUE + && CHAR_ElderSetPosition( oldmanid ,bornfl,bornx, borny ) == TRUE ){ + return TRUE; + }else{ + printf( "Invalid elder npcarg=%s\n", argstr ); + return FALSE; + } +} + +void NPC_SavePointTalked( int meindex , int talkerindex , char *msg , + int color ) +{ + int fd; + + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char token[512]; + char buf2[1024]; + char timeMsg[1024]; + int oldmanid; + + if( ! NPC_Util_charIsInFrontOfChar(talkerindex,meindex,RANGE) + || CHAR_getFlg( talkerindex,CHAR_ISDIE )){ + if( (CHAR_getInt(talkerindex,CHAR_X) == CHAR_getInt(meindex,CHAR_X)) + && (CHAR_getInt(talkerindex,CHAR_Y) == CHAR_getInt(meindex,CHAR_Y)) + && (CHAR_getInt(talkerindex,CHAR_FLOOR) ==CHAR_getInt(meindex,CHAR_FLOOR)) ){ + }else{ + return; + } + } + + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr))==NULL){ + print("NPC_Savepoint.c TypeCheck: GetArgStrErr\n"); + return ; + } + + if(NPC_Util_GetStrFromStrWithDelim(argstr,"ID",buf2,sizeof( buf2) )==NULL) return ; + oldmanid=atoi(buf2); + + if(strstr(argstr,"NOITEM")!=NULL) { + NPC_SetFlg(talkerindex,oldmanid); + } + + if(NPC_CheckFlg(CHAR_getInt(talkerindex,CHAR_SAVEPOINT),oldmanid)==FALSE){ + + if(NPC_UsedCheck(meindex,talkerindex,0)==TRUE){ + NPC_MessageDisp(meindex,talkerindex,2); + }else{ + NPC_MessageDisp(meindex,talkerindex,0); + } + }else{ + CHAR_setInt( talkerindex, CHAR_LASTTALKELDER ,CHAR_getWorkInt( meindex, CHAR_WORKOLDMANID ) ); + fd = getfdFromCharaIndex( talkerindex); + if( fd != -1 ) { +#ifndef _NPC_NOSAVEPOINT + Char *chwk; + chwk = CHAR_getCharPointer( talkerindex); + // CoolFish: +1 2001/11/05 + if (!chwk) return; + + CHAR_charSaveFromConnectAndChar( fd, chwk ,FALSE ); + // Nuke 0907: For acsv test + { + CHAR_charSaveFromConnectAndChar( fd, chwk ,FALSE ); + } +#endif + } + + NPC_Util_GetStrFromStrWithDelim(argstr,"NomalMsg",token,sizeof( token) ); + sprintf(buf2,token,CHAR_getChar(talkerindex,CHAR_NAME)); + + // Robin 0619 display time + { + time_t new_t; + int dd,hh,mm,ss; + + time(&new_t); + new_t-=initTime; + + dd=(int) new_t / 86400; new_t=new_t % 86400; + hh=(int) new_t / 3600; new_t=new_t % 3600; + mm=(int) new_t / 60; new_t=new_t % 60; + ss=(int) new_t; + + if (dd>0) { + snprintf( timeMsg, sizeof( timeMsg ) , + "本星球已经启动了 %d 日 %d 小时 %d 分 %d 秒。",dd,hh,mm,ss); + } else if (hh>0) { + snprintf( timeMsg, sizeof( timeMsg ) , + "本星球已经启动了 %d 小时 %d 分 %d 秒。",hh,mm,ss); + } else { + snprintf( timeMsg, sizeof( timeMsg ) , + "本星球已经启动了 %d 分 %d 秒。",mm,ss); + } + strcat(buf2,timeMsg); + + } + { + char temp[1024]; + //char *answer;// CoolFish: Rem 2001/4/18 + extern unsigned int StateTable[]; + // Robin 03/20 万能的天神,请赐给我灌水的力量!!!! + sprintf(temp,"目前线上人数为 %d 人。当前服务端版本 : <%s>",abs(StateTable[LOGIN]),SERVER_VERSION); + strcat(buf2,temp); + + + } + CHAR_talkToCli( talkerindex , meindex , buf2 , CHAR_COLORWHITE ); + + } + + + +} + + +/*----------------------------------------- + * 弁仿奶失件玄井日忒匀化五凶凛卞裟太请今木月[ + * +-------------------------------------------*/ +void NPC_SavePointWindowTalked( int meindex, int talkerindex, + int seqno, int select, char *data) +{ + + /*-- 及引歹曰卞中卅中午五反蔽 --*/ + if( NPC_Util_CharDistance( talkerindex, meindex ) > 2) { + return; + } + + if(seqno==CHAR_WINDOWTYPE_WINDOWSAVEPOINT_START){ + if(select==WINDOW_BUTTONTYPE_YES){ + if(NPC_UsedCheck(meindex,talkerindex,1)==TRUE){ + NPC_MessageDisp(meindex,talkerindex,1); + } + } + } + + +} + + +/* + *--失奶 丞及民尼永弁分仃毛垫丹 + */ +BOOL NPC_AndReduce(int meindex,int talker,char *buf,int flg) +{ + + char buf2[512]; + char buf3[256]; + int itemNo=0; + int kosuu; + int j=1; + + if(flg==0){ + + while(getStringFromIndexWithDelim(buf,"&",j,buf2,sizeof(buf2))!=FALSE) + { + j++; + /*-- ← 互丐木壬}公及失奶 丞反 醒隙烂仄化月午蜕丹啦 --*/ + if(strstr( buf2, "*") != NULL){ + getStringFromIndexWithDelim(buf2,"*",1,buf3,sizeof(buf3)); + itemNo = atoi(buf3); + getStringFromIndexWithDelim(buf2,"*",2,buf3,sizeof(buf3)); + kosuu = atoi(buf3); + + + /*--民尼永弁乒□玉--*/ + if(NPC_SavePointItemCheck(meindex,talker,itemNo,kosuu)==FALSE){ + return FALSE; + } + + }else{ + itemNo = atoi(buf2); + + /*--民尼永弁乒□玉--*/ + if(NPC_SavePointItemCheck(meindex,talker,itemNo,1)==FALSE){ + return FALSE; + } + + } + } + + }else{ + /*-- ← 互丐木壬}公及失奶 丞反 醒隙烂仄化月午蜕丹啦 --*/ + if(strstr( buf, "*") != NULL){ + getStringFromIndexWithDelim(buf,"*",1,buf3,sizeof(buf3)); + itemNo = atoi(buf3); + getStringFromIndexWithDelim(buf,"*",2,buf3,sizeof(buf3)); + kosuu = atoi(buf3); + + /*--民尼永弁乒□玉--*/ + if(NPC_SavePointItemCheck(meindex,talker,itemNo,kosuu)==FALSE){ + return FALSE; + } + + }else{ + itemNo = atoi(buf); + /*--民尼永弁乒□玉--*/ + if(NPC_SavePointItemCheck(meindex,talker,itemNo,1)==FALSE){ + return FALSE; + } + } + + } + + + return TRUE; +} + + +BOOL NPC_AndReduceDelete(int meindex,int talker,char *buf,int flg) +{ + + char buf2[512]; + char buf3[256]; + int itemNo=0; + int kosuu; + int j=1; + + if(flg==0){ + + while(getStringFromIndexWithDelim(buf,"&",j,buf2,sizeof(buf2))!=FALSE) + { + j++; + /*-- ← 互丐木壬}公及失奶 丞反 醒隙烂仄化月午蜕丹啦 --*/ + if(strstr( buf2, "*") != NULL){ + getStringFromIndexWithDelim(buf2,"*",1,buf3,sizeof(buf3)); + itemNo = atoi(buf3); + getStringFromIndexWithDelim(buf2,"*",2,buf3,sizeof(buf3)); + kosuu = atoi(buf3); + + /*--绰轮乒□玉--*/ + if(NPC_SavePointItemDelete(meindex,talker,itemNo,kosuu)==FALSE){ + return FALSE; + } + + }else{ + itemNo = atoi(buf2); + /*--绰轮乒□玉--*/ + if(NPC_SavePointItemDelete(meindex,talker,itemNo,1)==FALSE){ + return FALSE; + } + + } + } + + }else{ + /*-- ← 互丐木壬}公及失奶 丞反 醒隙烂仄化月午蜕丹啦 --*/ + if(strstr( buf, "*") != NULL){ + getStringFromIndexWithDelim(buf,"*",1,buf3,sizeof(buf3)); + itemNo = atoi(buf3); + getStringFromIndexWithDelim(buf,"*",2,buf3,sizeof(buf3)); + kosuu = atoi(buf3); + + /*--绰轮乒□玉--*/ + if(NPC_SavePointItemDelete(meindex,talker,itemNo,kosuu)==FALSE){ + return FALSE; + } + + }else{ + itemNo = atoi(buf); + + /*--绰轮乒□玉--*/ + if(NPC_SavePointItemDelete(meindex,talker,itemNo,1)==FALSE){ + return FALSE; + } + } + + } + + + return TRUE; +} + + + +/* + * 椭瘀毛苇凶仄凶井及民尼永弁 + */ +BOOL NPC_UsedCheck(int meindex,int talker,int flg) +{ + + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[128]; + char buf2[512]; + int i=1; + int checkflg=0; + + + /*--涩烂白央奶伙毛 心 心--*/ + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr))==NULL){ + print("NPC_savePoint.c UseCheck: GetArgStrErr"); + return FALSE; + } + + /*-- 邰卅失奶 丞毛手匀化中月井及民尼永弁-*/ + if(NPC_Util_GetStrFromStrWithDelim(argstr,"GetItem",buf,sizeof( buf) )!=NULL) + { + i=1; + while( getStringFromIndexWithDelim(buf,",",i,buf2,sizeof(buf2)) !=FALSE ) + { + i++; + if(strstr( buf2, "&") != NULL){ + + if(NPC_AndReduce( meindex, talker, buf2,0)==TRUE) + { + checkflg=1; + break; + } + }else{ + if(NPC_AndReduce( meindex, talker, buf2,1)==TRUE) + { + checkflg=2; + break; + } + } + } + if(checkflg==0) return FALSE; + } else return TRUE; // Arminius 2.5 如果没有设 GetItem 则一律储存 + + if(flg==1){ + if(checkflg==1){ + /*--仇仇匹绰轮及质 --*/ + if(NPC_AndReduceDelete(meindex,talker,buf2,0)==FALSE){ + return FALSE; + } + }else{ + /*--仇仇匹绰轮及质 --*/ + if(NPC_AndReduceDelete(meindex,talker,buf2,1)==FALSE){ + return FALSE; + } + } + } + + return TRUE; + +} + + + +void NPC_MessageDisp(int meindex,int talker,int MesNo) +{ + + int fd = getfdFromCharaIndex( talker); + int buttontype=WINDOW_BUTTONTYPE_OK; + int windowtype=WINDOW_MESSAGETYPE_MESSAGE; + int windowno=CHAR_WINDOWTYPE_WINDOWSAVEPOINT_START; + + char token[1024]; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[32]; + + /*--涩烂白央奶伙毛 心 心--*/ + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr))==NULL){ + print("NPC_savePoint.c UseCheck: GetArgStrErr"); + return ; + } + + switch(MesNo){ + case 0:/*-- 邰卅失奶 丞毛手匀化中月井及民尼永弁-*/ + NPC_Util_GetStrFromStrWithDelim(argstr,"RequestMsg",token,sizeof( token) ); + + break; + + case 1:/*-- 邰卅失奶 丞毛手匀化中月井及民尼永弁-*/ + NPC_Util_GetStrFromStrWithDelim(argstr,"OkMsg",token,sizeof( token) ); + NPC_Util_GetStrFromStrWithDelim(argstr,"ID",buf,sizeof( buf) ); + NPC_SetFlg(talker,atoi(buf)); + /*--本□皮今六化丐仆月--*/ + /* 反卅仄井仃凶蛊卞}愤坌及ID毛筏盛今六月 */ + CHAR_setInt( talker, CHAR_LASTTALKELDER ,CHAR_getWorkInt( meindex, CHAR_WORKOLDMANID ) ); + + /* 本□皮允月 */ + /* 夫永弁仄化中月反内互卅中及匹失件夫永弁仄卅中 */ + fd = getfdFromCharaIndex( talker); + if( fd != -1 ) { +#ifndef _NPC_NOSAVEPOINT + Char *chwk; + chwk = CHAR_getCharPointer( talker); + // CoolFish: +1 2001/11/05 + if (!chwk) return; + CHAR_charSaveFromConnectAndChar( fd, chwk ,FALSE ); +#endif + } + + break; + + case 2:/*-- 邰卅失奶 丞毛手匀化中月井及民尼永弁-*/ + NPC_Util_GetStrFromStrWithDelim(argstr,"RealyMsg",token,sizeof( token) ); + buttontype=WINDOW_BUTTONTYPE_YESNO; + break; + + } + lssproto_WN_send( fd, windowtype, + buttontype, + windowno, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + + +} + +BOOL NPC_SavePointItemDelete(int meindex,int talker,int itemNo,int kosuu) +{ + int i; + int itemindex; + int id; + int cnt=0; + + for( i=CHAR_STARTITEMARRAY;i +#include "char.h" +#include "object.h" +#include "lssproto_serv.h" +#include "npcutil.h" +#include "handletime.h" +#include "npc_scheduleman.h" +#include "family.h" + +/* + * 家族 PK 登记员 + * + * 这个 npc 显示并且登记家族 pk 排程 + * pk 排程以一小时一场 pk 为原则排定 pk 场的赛程, 这个赛程由登记员 + * 登记与设定,主要的设定事项在 FamilyPKSchedule + * + * 这个登记员同时会将这个 schedule 写入磁碟,如果 Game Server 重新 + * 启动的话,会先读入这一份对战排程表,同时进行排程。 + * 排程只排从现在开始的 24 小时之内的赛程 + * 排程表档案的格式为: + * + * time|host_index|host_name|guest_index|guest_name|prepare_time|max_player|flag|win + * + * 档案的命名: 登记员楼层号码_登记员X座标_登记员Y座标 + * + */ + +// 全部的家族 pk 赛程 +FamilyPKSchedule fmpks[MAX_SCHEDULE*MAX_SCHEDULEMAN]; + +extern int familyNumTotal; + +enum { + NPC_WORK_ID = CHAR_NPCWORKINT1, // 登记员 ID, 从 0 开始 + NPC_WORK_CHALLENGETIMEOUT = CHAR_NPCWORKINT2, // 同意挑战的 timeout + NPC_WORK_SETTINGTIMEOUT = CHAR_NPCWORKINT3, // 设定挑战的 timeout + NPC_WORK_PREVIOUSCHECKTIME = CHAR_NPCWORKINT4, // 上一次检查的时间 + NPC_WORK_FIGHTINTERVAL = CHAR_NPCWORKINT5, // PK 场次的间隔 (单位: 分) +}; + +enum { + CHAR_WORK_PAGE = CHAR_WORKSHOPRELEVANT, // 换页用 + CHAR_WORK_DUELTIME = CHAR_WORKSHOPRELEVANTSEC, // 所选择的 pk 时间 +}; + +#define SCHEDULEFILEDIR "./Schedule/" + +void NPC_LoadPKSchedule(int meindex); // Load schedule from disk +void NPC_SavePKSchedule(int meindex); // save schedule to disk +void NPC_RemoveExpiredBattle(int meindex); // 移除过期的战斗 +void NPC_ProcessTimeout(int meindex); // 处理 timeout +BOOL NPC_AlreadyScheduled(int meindex, int talkerindex); // 检查, 一个家族只能安排一场 +// 产生排程表的 data +void NPC_LIST_gendata(int meindex, int talkerindex, int page, char *buf, int size); +// 产生选择家族的 data +void NPC_SELECT_gendata(int meindex, int talkerindex, int page, char *buf, int size); +// 产生排程详细的 data +void NPC_DETAIL_gendata(int meindex, char *buf, int size, int dueltime); + +BOOL NPC_SchedulemanInit( int meindex ) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + int meid; + int interval; + + CHAR_setInt( meindex, CHAR_WHICHTYPE, CHAR_TYPEFMSCHEDULEMAN ); + CHAR_setWorkInt ( meindex, NPC_WORK_PREVIOUSCHECKTIME, -1); + + // 参数 + NPC_Util_GetArgStr(meindex, argstr, sizeof(argstr)); + meid = NPC_Util_GetNumFromStrWithDelim(argstr, "id" ); + if ((meid<0) || (meid>=MAX_SCHEDULEMAN)) { + print("SCHEDULEMAN init error: invalid ID(%d)\n",meid); + meid=0; + } + CHAR_setWorkInt(meindex, NPC_WORK_ID, meid); + + interval = NPC_Util_GetNumFromStrWithDelim(argstr, "loopinterval" ); + if ((interval<100) || (interval>10000)) interval=1000; + CHAR_setInt(meindex, CHAR_LOOPINTERVAL, interval); + + interval = NPC_Util_GetNumFromStrWithDelim(argstr, "challengetimeout"); + if ((interval<60) || (interval>60*60)) interval=20*60; + CHAR_setWorkInt(meindex, NPC_WORK_CHALLENGETIMEOUT, interval); + + interval = NPC_Util_GetNumFromStrWithDelim(argstr, "settingtimeout"); + if ((interval<10) || (interval>60*60)) interval=60; + CHAR_setWorkInt(meindex, NPC_WORK_SETTINGTIMEOUT, interval); + + interval = NPC_Util_GetNumFromStrWithDelim(argstr, "fightinterval"); + if ((interval<5) || (interval>60)) interval = 50; + CHAR_setWorkInt(meindex, NPC_WORK_FIGHTINTERVAL, interval); + + + NPC_LoadPKSchedule(meindex); + + return TRUE; +} + +void NPC_SchedulemanTalked(int meindex, int talkerindex, char *msg, int color) +{ + char buf[4096]; + int fd; + if (NPC_Util_CharDistance(meindex, talkerindex) > 2) return; + if (!NPC_Util_isFaceToFace(meindex, talkerindex, 2)) return; + fd = getfdFromCharaIndex(talkerindex); + if (fd == -1) return; + + CHAR_setWorkInt(talkerindex, CHAR_WORK_PAGE, 0); + NPC_LIST_gendata(meindex, talkerindex, 0, buf, sizeof(buf)); + lssproto_WN_send(fd, WINDOW_MESSAGETYPE_PKSCHEDULELIST, + WINDOW_BUTTONTYPE_NEXT | WINDOW_BUTTONTYPE_CANCEL, + CHAR_WINDOWTYPE_SCHEDULEMAN_START, + CHAR_getWorkInt(meindex, CHAR_WORKOBJINDEX), + buf); +} + +void NPC_SchedulemanWindowTalked(int meindex, int talkerindex, + int seqno, int select, char *data) +{ + int page; + int buttontype; + char buf[4096],token[256]; + int fd,i,dt,a; + int fmpks_pos; + + if (NPC_Util_CharDistance(meindex,talkerindex) > 2) return; + if (!NPC_Util_isFaceToFace(meindex, talkerindex, 2)) return; + fd = getfdFromCharaIndex(talkerindex); + if (fd == -1) return; + fmpks_pos = CHAR_getWorkInt(meindex, NPC_WORK_ID)*MAX_SCHEDULE; + +// print("seqno=%d select=%d data=%s\n", seqno,select,data); + + switch (seqno) { + case CHAR_WINDOWTYPE_SCHEDULEMAN_START: + switch (select) { + case WINDOW_BUTTONTYPE_NEXT: + case WINDOW_BUTTONTYPE_PREV: + page=CHAR_getWorkInt(talkerindex, CHAR_WORK_PAGE) + + MAXSCHEDULEINONEWINDOW + * (( select == WINDOW_BUTTONTYPE_NEXT) ? 1 : -1); + buttontype=WINDOW_BUTTONTYPE_NEXT | WINDOW_BUTTONTYPE_PREV | WINDOW_BUTTONTYPE_CANCEL; + if (page<0) { + page=0; + buttontype=WINDOW_BUTTONTYPE_NEXT | WINDOW_BUTTONTYPE_CANCEL; + } + if (page>MAX_SCHEDULE-MAXSCHEDULEINONEWINDOW) { + page=MAX_SCHEDULE-MAXSCHEDULEINONEWINDOW; + buttontype=WINDOW_BUTTONTYPE_PREV | WINDOW_BUTTONTYPE_CANCEL; + } + CHAR_setWorkInt(talkerindex, CHAR_WORK_PAGE, page); + // Send WN + NPC_LIST_gendata(meindex, talkerindex, page, buf, sizeof(buf)); + lssproto_WN_send(fd, WINDOW_MESSAGETYPE_PKSCHEDULELIST, + buttontype, + CHAR_WINDOWTYPE_SCHEDULEMAN_START, + CHAR_getWorkInt(meindex, CHAR_WORKOBJINDEX), + buf); + break; + case WINDOW_BUTTONTYPE_OK: + +#ifdef _DEATH_FAMILY_CANT_SCHEDULE // WON ADD 家族战玩家不能自行约战 + CHAR_talkToCli(talkerindex, meindex, "此星球无法约战", CHAR_COLORWHITE); + break; +#endif + + +#ifdef _FMVER21 + if ((CHAR_getInt(talkerindex,CHAR_FMLEADERFLAG)==FMMEMBER_LEADER) && +#else + if ((CHAR_getInt(talkerindex,CHAR_FMLEADERFLAG)==1) && +#endif + + (CHAR_getWorkInt(talkerindex, CHAR_WORKFMSETUPFLAG)==1)) { + // 只有已成立家族的族长可以使用进一步的功能 (设定、更改、同意) + + // decide: send family list or detail or accept + dt=atoi(data); + for (i=0; iMAXFAMILYINONEWINDOW) + buttontype |= WINDOW_BUTTONTYPE_NEXT; + lssproto_WN_send(fd, WINDOW_MESSAGETYPE_PKSCHEDULESELECTFAMILY, + buttontype, + CHAR_WINDOWTYPE_SCHEDULEMAN_SELECT, + CHAR_getWorkInt(meindex, CHAR_WORKOBJINDEX), + buf); + + } + break; + case FMPKS_FLAG_CHALLENGE: + { // 主队族长可以重设条件,客队则是同意 pk,其他人滚蛋 + int tkfmindex=CHAR_getWorkInt(talkerindex, CHAR_WORKFMINDEXI); + if (tkfmindex==fmpks[fmpks_pos+i].host_index) { + fmpks[fmpks_pos+i].flag=FMPKS_FLAG_SETTING; + fmpks[fmpks_pos+i].setting_timeout= + CHAR_getWorkInt(meindex, NPC_WORK_SETTINGTIMEOUT); + // 送出细部调整的列表 + CHAR_setWorkInt(talkerindex, CHAR_WORK_DUELTIME, dt); + NPC_DETAIL_gendata(meindex, buf, sizeof(buf), dt); + lssproto_WN_send(fd, WINDOW_MESSAGETYPE_PKSCHEDULEDETAIL, + WINDOW_BUTTONTYPE_OK | WINDOW_BUTTONTYPE_CANCEL, + CHAR_WINDOWTYPE_SCHEDULEMAN_DETAIL, + CHAR_getWorkInt(meindex, CHAR_WORKOBJINDEX), + buf); + } else if (tkfmindex==fmpks[fmpks_pos+i].guest_index) { + fmpks[fmpks_pos+i].flag=FMPKS_FLAG_SCHEDULED; + page=CHAR_getWorkInt(talkerindex, CHAR_WORK_PAGE); + buttontype=WINDOW_BUTTONTYPE_NEXT | WINDOW_BUTTONTYPE_PREV | WINDOW_BUTTONTYPE_OK; + if (page<0) { + page=0; + buttontype=WINDOW_BUTTONTYPE_NEXT | WINDOW_BUTTONTYPE_OK; + } + if (page>MAX_SCHEDULE-MAXSCHEDULEINONEWINDOW) { + page=MAX_SCHEDULE-MAXSCHEDULEINONEWINDOW; + buttontype=WINDOW_BUTTONTYPE_PREV | WINDOW_BUTTONTYPE_OK; + } + CHAR_talkToCli(talkerindex, meindex, + "你的家族已经接受挑战。", CHAR_COLORWHITE); + // 重新送出 list + NPC_LIST_gendata(meindex, talkerindex, page, buf, sizeof(buf)); + lssproto_WN_send(fd, WINDOW_MESSAGETYPE_PKSCHEDULELIST, + buttontype, + CHAR_WINDOWTYPE_SCHEDULEMAN_START, + CHAR_getWorkInt(meindex, CHAR_WORKOBJINDEX), + buf); + } + } + break; + case FMPKS_FLAG_SETTING: + { // 主队族长可以重设条件 + int tkfmindex=CHAR_getWorkInt(talkerindex, CHAR_WORKFMINDEXI); + if (tkfmindex==fmpks[fmpks_pos+i].host_index) { + fmpks[fmpks_pos+i].flag=FMPKS_FLAG_SETTING; + fmpks[fmpks_pos+i].setting_timeout= + CHAR_getWorkInt(meindex, NPC_WORK_SETTINGTIMEOUT); + // 送出细部调整的列表 + CHAR_setWorkInt(talkerindex, CHAR_WORK_DUELTIME, dt); + NPC_DETAIL_gendata(meindex, buf, sizeof(buf), dt); + lssproto_WN_send(fd, WINDOW_MESSAGETYPE_PKSCHEDULEDETAIL, + WINDOW_BUTTONTYPE_OK | WINDOW_BUTTONTYPE_CANCEL, + CHAR_WINDOWTYPE_SCHEDULEMAN_DETAIL, + CHAR_getWorkInt(meindex, CHAR_WORKOBJINDEX), + buf); + } + } + // WON ADD 修正家族pk场的约战问题 + break; + } + + } + } + NPC_SavePKSchedule(meindex); + } else { +#ifdef _FMVER21 + if (CHAR_getInt(talkerindex,CHAR_FMLEADERFLAG)!=FMMEMBER_LEADER) { +#else + if (CHAR_getInt(talkerindex,CHAR_FMLEADERFLAG)!=1) { +#endif + CHAR_talkToCli(talkerindex, meindex, + "只有族长才能预约家族PK喔。", CHAR_COLORWHITE); + }else if (CHAR_getWorkInt(talkerindex, CHAR_WORKFMSETUPFLAG)!=1) { + CHAR_talkToCli(talkerindex, meindex, + "你的家族还没有正式成立喔。", CHAR_COLORWHITE); + } + } + break; + } + break; + case CHAR_WINDOWTYPE_SCHEDULEMAN_SELECT: + switch (select) { + case WINDOW_BUTTONTYPE_PREV: + case WINDOW_BUTTONTYPE_NEXT: + page=CHAR_getWorkInt(talkerindex, CHAR_WORK_PAGE) + + MAXFAMILYINONEWINDOW + * (( select == WINDOW_BUTTONTYPE_NEXT) ? 1 : -1); + buttontype=WINDOW_BUTTONTYPE_NEXT | WINDOW_BUTTONTYPE_PREV; + if (page<1) { + page=1; + buttontype=WINDOW_BUTTONTYPE_NEXT; + } + if (page>familyNumTotal-MAXFAMILYINONEWINDOW+1) { + page=familyNumTotal-MAXFAMILYINONEWINDOW+1; + buttontype=WINDOW_BUTTONTYPE_PREV; + } + CHAR_setWorkInt(talkerindex, CHAR_WORK_PAGE, page); + // Send WN + NPC_SELECT_gendata(meindex, talkerindex, page, buf, sizeof(buf)); + lssproto_WN_send(fd, WINDOW_MESSAGETYPE_PKSCHEDULESELECTFAMILY, + buttontype, + CHAR_WINDOWTYPE_SCHEDULEMAN_SELECT, + CHAR_getWorkInt(meindex, CHAR_WORKOBJINDEX), + buf); + break; + case WINDOW_BUTTONTYPE_OK: + +#ifdef _FMVER21 + if ((CHAR_getInt(talkerindex,CHAR_FMLEADERFLAG)==FMMEMBER_LEADER) && +#else + if ((CHAR_getInt(talkerindex,CHAR_FMLEADERFLAG)==1) && +#endif + (CHAR_getWorkInt(talkerindex, CHAR_WORKFMSETUPFLAG)==1)) { + + dt=CHAR_getWorkInt(talkerindex, CHAR_WORK_DUELTIME); + for (i=0; i0) && (a<=40)) fmpks[fmpks_pos+i].prepare_time=a; + } + // 最大人数 + if (getStringFromIndexWithDelim(data,"|",5,token,sizeof(token))) { + a=atoi(token); + if ((a>0) && (a<=50)) fmpks[fmpks_pos+i].max_player=a; + } + // 胜利条件 + if (getStringFromIndexWithDelim(data,"|",6,token,sizeof(token))) { + a=atoi(token); + if ((a>=0) && (a<=1)) fmpks[fmpks_pos+i].win = a; + } + fmpks[fmpks_pos+i].flag=FMPKS_FLAG_CHALLENGE; + fmpks[fmpks_pos+i].challenge_timeout= + CHAR_getWorkInt(meindex, NPC_WORK_CHALLENGETIMEOUT); + CHAR_talkToCli(talkerindex, meindex, + "家族挑战设定完成。", CHAR_COLORWHITE); + } + break; + case WINDOW_BUTTONTYPE_CANCEL: + fmpks[fmpks_pos+i].flag=FMPKS_FLAG_NONE; + fmpks[fmpks_pos+i].host_index=-1; + strcpy(fmpks[fmpks_pos+i].host_name,""); + fmpks[fmpks_pos+i].guest_index=-1; + strcpy(fmpks[fmpks_pos+i].guest_name,""); + CHAR_talkToCli(talkerindex, meindex, + "清除家族挑战。", CHAR_COLORWHITE); + break; + } + NPC_SavePKSchedule(meindex); + } + } + } + } + break; + } +} + +void NPC_SchedulemanLoop(int meindex) +{ +// int fmpks_pos = CHAR_getWorkInt(meindex, NPC_WORK_ID)*MAX_SCHEDULE; + +/* + print("Scheduleman: fmpks_pos=%d dueltime=%d host=%s guest=%s\n", + fmpks_pos, fmpks[fmpks_pos].dueltime, fmpks[fmpks_pos].host_name, fmpks[fmpks_pos].guest_name); +*/ + + NPC_RemoveExpiredBattle(meindex); + NPC_ProcessTimeout(meindex); +} + +// 移除过期的战斗 +void NPC_RemoveExpiredBattle(int meindex) +{ + struct tm tm1; + int keeptime; + int i,expired=-1; + int fmpks_pos = CHAR_getWorkInt(meindex, NPC_WORK_ID)*MAX_SCHEDULE; + int prevckt = CHAR_getWorkInt(meindex, NPC_WORK_PREVIOUSCHECKTIME); + int fin = CHAR_getWorkInt(meindex, NPC_WORK_FIGHTINTERVAL); + int h,d; + + // 以目前的时刻当标准去移除过期的排程 + memcpy( &tm1, localtime( (time_t *)&NowTime.tv_sec), sizeof( tm1)); + + if (tm1.tm_min=60) keeptime = keeptime + 100 - 60; + } + if (fmpks[fmpks_pos].dueltime > keeptime) expired=23; + } + + if (expired>=0) { + // 移动後面的排程来取代已经失效的排程 + for (i=expired+1; i=60 ) h=h+100-60; + if (h>=2400) { + h = h-2400; + d = 10000; + } + fmpks[fmpks_pos+i].dueltime=d+h; + } + + // 检查第一项排程, 如果不在排定的状况下则设为『无排程』 + if (fmpks[fmpks_pos].flag < FMPKS_FLAG_SCHEDULED) { + fmpks[fmpks_pos].flag = FMPKS_FLAG_NONE; + fmpks[fmpks_pos+i].host_index=-1; + strcpy(fmpks[fmpks_pos+i].host_name,""); + fmpks[fmpks_pos+i].guest_index=-1; + strcpy(fmpks[fmpks_pos+i].guest_name,""); + } + + } +} + +// 处理 timeout +void NPC_ProcessTimeout(int meindex) +{ + int i; + int fmpks_pos = CHAR_getWorkInt(meindex, NPC_WORK_ID)*MAX_SCHEDULE; + + for (i=0; i=0) { + fmpks[fmpks_pos+i].challenge_timeout--; + if (fmpks[fmpks_pos+i].challenge_timeout<0) { + fmpks[fmpks_pos+i].host_index = -1; + strcpy(fmpks[fmpks_pos+i].host_name, "-1"); + fmpks[fmpks_pos+i].guest_index = -1; + strcpy(fmpks[fmpks_pos+i].guest_name, "-1"); + fmpks[fmpks_pos+i].prepare_time = -1; + fmpks[fmpks_pos+i].max_player = -1; + fmpks[fmpks_pos+i].flag=-1; + fmpks[fmpks_pos+i].win=-1; + } + } + } + if (fmpks[fmpks_pos+i].flag==FMPKS_FLAG_SETTING) { + if (fmpks[fmpks_pos+i].setting_timeout>=0) { + fmpks[fmpks_pos+i].setting_timeout--; + if (fmpks[fmpks_pos+i].setting_timeout<0) { + fmpks[fmpks_pos+i].host_index = -1; + strcpy(fmpks[fmpks_pos+i].host_name, "-1"); + fmpks[fmpks_pos+i].guest_index = -1; + strcpy(fmpks[fmpks_pos+i].guest_name, "-1"); + fmpks[fmpks_pos+i].prepare_time = -1; + fmpks[fmpks_pos+i].max_player = -1; + fmpks[fmpks_pos+i].flag=-1; + fmpks[fmpks_pos+i].win=-1; + } + } + } + } +} + +// 检查, 一个家族只能安排一场战斗 +BOOL NPC_AlreadyScheduled(int meindex, int talkerindex) +{ + int i; + int fmpks_pos = CHAR_getWorkInt(meindex, NPC_WORK_ID)*MAX_SCHEDULE; + int tkfmindex = CHAR_getWorkInt(talkerindex, CHAR_WORKFMINDEXI); + int flag=1; + + for (i=0; i=FMPKS_FLAG_SCHEDULED) { + if (fmpks[fmpks_pos+i].host_index==tkfmindex) return TRUE; + } else if (fmpks[fmpks_pos+i].flag!=FMPKS_FLAG_NONE) { + if (flag==1) flag=0; else return TRUE; + } + } + return FALSE; +} + +// 读取 schedule 档案 +void NPC_LoadPKSchedule(int meindex) +{ + char filename[256],tmp[4096],token[256]; + FILE *f; + int i; + int fmpks_pos = CHAR_getWorkInt(meindex, NPC_WORK_ID)*MAX_SCHEDULE; + + snprintf(filename,sizeof(filename), "%s%d_%d_%d", + SCHEDULEFILEDIR, CHAR_getInt(meindex, CHAR_FLOOR), + CHAR_getInt(meindex, CHAR_X), + CHAR_getInt(meindex, CHAR_Y) ); + + if( ! (f=fopen( filename, "r" )) ){ // create new schedule file + f = fopen( filename, "w" ); + if( !f ){ + print( "ERROR:Can't create Schedule file %s!\n",filename ); + return; + } + for (i=0; i=MAX_SCHEDULE)) return; + + // 记录目前的时间 + memcpy( &tm1, localtime( (time_t *)&NowTime.tv_sec), sizeof( tm1)); + sprintf(buf, "%d|", tm1.tm_hour*100 + tm1.tm_min); + + for (i=page; i +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "lssproto_serv.h" +#include "saacproto_cli.h" +#include "readmap.h" +#include "battle.h" +#include "log.h" +#include "enemy.h" +#include "handletime.h" +#include "npc_eventaction.h" +#include "npc_sellsthman.h" +#include "pet_skill.h" + +#ifdef _NPC_SELLSTH +enum { + NPC_WORK_CURRENTTIME = CHAR_NPCWORKINT1, + + NPC_WORK_PAGE = CHAR_NPCWORKINT2, + NPC_WORK_NUM = CHAR_NPCWORKINT3, + + NPC_WORK_CALLPAGE = CHAR_NPCWORKINT4, + NPC_WORK_CALLNUM = CHAR_NPCWORKINT5, + +/* + NPC_WORK_ROUTETOY = CHAR_NPCWORKINT2, + NPC_WORK_ROUTEPOINT = CHAR_NPCWORKINT3, + NPC_WORK_ROUNDTRIP = CHAR_NPCWORKINT4, + NPC_WORK_MODE = CHAR_NPCWORKINT5, + NPC_WORK_CURRENTROUTE = CHAR_NPCWORKINT6, + NPC_WORK_ROUTEMAX = CHAR_NPCWORKINT7, + NPC_WORK_WAITTIME = CHAR_NPCWORKINT8, + NPC_WORK_CURRENTTIME = CHAR_NPCWORKINT9, + NPC_WORK_SEFLG = CHAR_NPCWORKINT10, +*/ +}; +#define SELLSTHMESS_LOOP 2000 +enum{ + WINDOW_TALK=0, + WINDOW_START=10, + WINDOW_MENU, + WINDOW_LOOK, + WINDOW_CALL, + WINDOW_FIND, + WINDOW_SELLON, + WINDOW_SELLHANDLE, + WINDOW_BUYMESS, + WINDOW_BUYHANDLE, + WINDOW_HELP, + WINDOW_END, + + NPC_WINDOW_TALK=300, + NPC_WINDOW_START, + NPC_WINDOW_MENU, + NPC_WINDOW_LOOK, + NPC_WINDOW_FIND, + NPC_WINDOW_NEXT, + NPC_WINDOW_SELLON, + NPC_WINDOW_SELLHANDLE, + NPC_WINDOW_BUYMESS, + NPC_WINDOW_BUYHANDLE, + NPC_WINDOW_HELP, + NPC_WINDOW_END, + +}; + +#define MAX_LISTPAGE 20 +#define MAX_LISTNUM 12 +struct _tagNSellSthList{ + int use; + int fd; + int sellindex; + int selltype; + int uindex; + int Iindex; + char headmess[256]; + char sellmess[256]; +}NSellSthList[MAX_LISTPAGE][MAX_LISTNUM]; + +static int StructBeInit=0; + +static void NPC_SellsthMan_selectWindow( int meindex, int toindex, int num,int select, char *data); +BOOL NPC_getSellSth_ListString( int page, int num, char *ListString, int slen ); +BOOL NPC_setSellSth_ListString( int meindex, int toindex, int *page, int *num, char *data ); +BOOL NPC_getSellSth_ViewString( int page, int num, char *ListString, int slen ); +int NPC_getSellSth_FreeTiCount( void); + +void NPC_SellrePutList( int defpage, int ti) +{ + int i; + if( NSellSthList[defpage][ti].use != 0 ) return; + for( i=(ti+1); i= MAX_LISTNUM ) return; + if( NPC_getSellSth_ViewString( page, num, token, sizeof( token)) == FALSE ){ + return; + } + windowtype = WINDOWS_MESSAGETYPE_SELLSTHVIEW; + windowno = NPC_WINDOW_NEXT; + } + break; + case WINDOW_CALL: + { + int num; + int page = CHAR_getWorkInt( toindex, CHAR_WORKSHOPRELEVANT); + num = atoi( data); + if( num <0 || num >= MAX_LISTNUM ) return; + + if( NSellSthList[page][num].use == 0 )return; + if( !CHAR_CHECKINDEX( NSellSthList[page][num].sellindex) || + NSellSthList[page][num].fd != getfdFromCharaIndex( NSellSthList[page][num].sellindex) ) + return; + + sprintf( token, "%s欲购买你拍卖(%d页,%d项)的物品,\n%s正在%s。", CHAR_getChar( toindex, CHAR_NAME), + page, num, CHAR_getChar( toindex, CHAR_NAME), MAP_getFloorName( CHAR_getInt( toindex, CHAR_FLOOR)) ); + + if( CHAR_getWorkInt( NSellSthList[page][num].sellindex, CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE ){ + CHAR_talkToCli( NSellSthList[page][num].sellindex, meindex, token, CHAR_COLORYELLOW); + }else{ + int callfd = getfdFromCharaIndex( NSellSthList[page][num].sellindex); + buttontype = WINDOW_BUTTONTYPE_OK; + windowno = NPC_WINDOW_END; + lssproto_WN_send( callfd, windowtype, buttontype, windowno, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), token); + } + return; + } + break; + case WINDOW_FIND: + { + int page, num; + page = select >> 16; + num = select & 0x0000ffff; + + page = (page<0||page>=MAX_LISTPAGE)?0:page; + num = (num<0||num>=MAX_LISTNUM)?0:num; + if( NPC_getSellSth_ListString( page, num, token, sizeof( token) ) == FALSE ) return; + windowtype = WINDOWS_MESSAGETYPE_SELLSTHMENU; + windowno = NPC_WINDOW_NEXT; + } + break; + case WINDOW_SELLON: + if( CHAR_getWorkInt( toindex, CHAR_WORKSELLSTHNUM) >= 3 ){ + CHAR_talkToCli( toindex, meindex, "最多只能登记叁次。", CHAR_COLORRED); + return; + }else if( CHAR_getInt( toindex, CHAR_GOLD) < 100 ){ + CHAR_talkToCli( toindex, meindex, "需付100石币才能登记。", CHAR_COLORRED); + return; + } + + if( NPC_getSellSth_FreeTiCount() < 1 ){ + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "FULL_MSG", token, sizeof( token) ) == NULL) { + print("SellSthMan err Can't Get FULL_MSG string\n"); + return; + } + buttontype = WINDOW_BUTTONTYPE_OK; + windowno = NPC_WINDOW_END; + }else{ + windowtype = WINDOWS_MESSAGETYPE_SELLSTHSELL; + windowno = NPC_WINDOW_SELLON; + } + break; + case WINDOW_SELLHANDLE: + { + int page, num; + if( NPC_setSellSth_ListString( meindex, toindex, &page, &num, data ) == FALSE ) { + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "ERROR_MSG", token, sizeof( token) ) == NULL) { + print("SellSthMan err Can't Get ERROR_MSG string\n"); + return; + } + }else if( NPC_Util_GetStrFromStrWithDelim( npcarg, "OK_MSG", token, sizeof( token) ) == NULL) { + print("SellSthMan err Can't Get OK_MSG string\n"); + return; + } + { + int sellnum = CHAR_getWorkInt( toindex, CHAR_WORKSELLSTHNUM); + CHAR_setWorkInt( toindex, CHAR_WORKSELLSTHNUM, sellnum+1); + CHAR_DelGold( toindex, 100); + } + buttontype = WINDOW_BUTTONTYPE_OK; + windowno = NPC_WINDOW_END; + } + break; + case WINDOW_BUYMESS: + break; + case WINDOW_BUYHANDLE: + break; + case WINDOW_HELP: + break; + case WINDOW_END: + break; + } + + lssproto_WN_send( fd, windowtype, buttontype, windowno, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), token); +} + +void NPC_SellsthManWindowTalked( int meindex, int talkerindex, int seqno, int select, char *data) +{ + if(NPC_Util_isFaceToFace( meindex ,talkerindex , 2) == FALSE) { + if(NPC_Util_isFaceToChara( talkerindex, meindex, 1) == FALSE) + return; + } + if( select == WINDOW_BUTTONTYPE_CANCEL || select == WINDOW_BUTTONTYPE_NO) + return; + + switch( seqno) { + case NPC_WINDOW_START: + NPC_SellsthMan_selectWindow( meindex, talkerindex, WINDOW_MENU, select, NULL); + break; + case NPC_WINDOW_MENU: + switch( atoi( data)) { + case 1://查看 + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, 0); + NPC_SellsthMan_selectWindow( meindex, talkerindex, WINDOW_FIND, 0, NULL); + break; + case 2://登记 + NPC_SellsthMan_selectWindow( meindex, talkerindex, WINDOW_SELLON, select, NULL); + break; + } + break; + case NPC_WINDOW_LOOK: + break; + case NPC_WINDOW_FIND://包含买 + break; + case NPC_WINDOW_NEXT: + { + int ti; + int page = CHAR_getWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT); + + if( select == WINDOW_BUTTONTYPE_PREV ){ + page = ((page-1)<0)?0:page-1; + }else if( select == WINDOW_BUTTONTYPE_NEXT ){ + page = ((page+1)>=MAX_LISTPAGE)?(MAX_LISTPAGE-1):(page+1); + }else if( select == WINDOW_BUTTONTYPE_OK ){ //买 + }else if( select == WINDOW_BUTTONTYPE_YES ){ //买 + NPC_SellsthMan_selectWindow( meindex, talkerindex, WINDOW_CALL, select, data); + return; + }else if( select == 0 ){ + NPC_SellsthMan_selectWindow( meindex, talkerindex, WINDOW_LOOK, select, data); + return; + } + ti = (page<<16); + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, page); + NPC_SellsthMan_selectWindow( meindex, talkerindex, WINDOW_FIND, ti, data); + } + break; + case NPC_WINDOW_SELLON: + NPC_SellsthMan_selectWindow( meindex, talkerindex, WINDOW_SELLHANDLE, select, data); + break; + case NPC_WINDOW_SELLHANDLE: + break; + case NPC_WINDOW_BUYMESS: + break; + case NPC_WINDOW_BUYHANDLE: + break; + case NPC_WINDOW_HELP: + break; + case NPC_WINDOW_END: + break; + } +} +static int runType = 0; +void NPC_SellsthManLoop( int meindex) +{ + int i, j; + char headmsg[256]; + char token[256]; + int playernum, page, num; + int floor = CHAR_getInt( meindex, CHAR_FLOOR); + playernum = CHAR_getPlayerMaxNum(); + + runType = (++runType)%100; + + page = CHAR_getWorkInt( meindex, NPC_WORK_CALLPAGE ); + num = CHAR_getWorkInt( meindex, NPC_WORK_CALLNUM ); + + for( i=0; i= MAX_LISTNUM ){ + num = 0; + if( ++page >= MAX_LISTPAGE ){ + page=0; + } + } + } + CHAR_setWorkInt( meindex, NPC_WORK_CALLPAGE, page); + CHAR_setWorkInt( meindex, NPC_WORK_CALLNUM, num); + if( i >= MAX_LISTNUM )return; + sprintf( headmsg, "拍卖频道(%d页%d项):%s (拍卖者:%s)。", + page, num, NSellSthList[page][num].headmess, + CHAR_getChar( NSellSthList[page][num].sellindex, CHAR_NAME) ); + if( NSellSthList[page][num].selltype==1 ){ + sprintf( token, "拍卖道具:%s。", + ITEM_getChar( NSellSthList[page][num].Iindex, ITEM_NAME) ); + }else{ + sprintf( token, "拍卖宠物:%s LV:%d %s。", + CHAR_getChar( NSellSthList[page][num].Iindex, CHAR_NAME), + CHAR_getInt( NSellSthList[page][num].Iindex, CHAR_LV), +#ifdef _PET_2TRANS + CHAR_getInt( NSellSthList[page][num].Iindex , CHAR_TRANSMIGRATION) == 2 )?"二转":(CHAR_getInt( NSellSthList[page][num].Iindex , CHAR_TRANSMIGRATION) == 1 )?"一转":"") +#else + ( CHAR_getInt( NSellSthList[page][num].Iindex , CHAR_TRANSMIGRATION) == 1 )?"转":"" +#endif + ); + } + + for(i=0; i= MAX_LISTNUM ){ + num = 0; + if( ++page >= MAX_LISTPAGE ){ + page=0; + } + } + CHAR_setWorkInt( meindex, NPC_WORK_CALLPAGE, page); + CHAR_setWorkInt( meindex, NPC_WORK_CALLNUM, num); + + if( runType%10 == 0 ){ + for( i=0; i slen ) return FALSE; + + sprintf( ListString, "%d|%d|%s", listnum, page, buff); + printf( "ANDY ListString:%s\nstrlen = %d \n", ListString, strlen( ListString) ); + + if( strlen( ListString) <= 0 ) return FALSE; + return TRUE; +} + +BOOL NPC_setSellSth_ListString( int meindex, int toindex, int *page, int *num, char *data ) +{ + char buf1[256]; + int i, j; + int fd = getfdFromCharaIndex( toindex); + + for( i=0; i MAX_LISTNUM ) return FALSE; + if( NSellSthList[page][num].use == 0 )return FALSE; + if( !CHAR_CHECKINDEX( NSellSthList[page][num].sellindex ) )return FALSE; + sellindex = NSellSthList[page][num].sellindex; + + if( NSellSthList[page][num].selltype == 1 ){//道具 + int itemindex, crushe; + ti = NSellSthList[page][num].uindex; + itemindex = CHAR_getItemIndex( sellindex , ti); + if( !ITEM_CHECKINDEX( itemindex) ) return FALSE; + crushe = ITEM_getItemDamageCrusheED( itemindex); + sprintf( buff, "1|%s|%s|0|%d|%d|%d|0|0|0|%s|||||||", + makeEscapeString( ITEM_getChar( itemindex, ITEM_SECRETNAME), buf2, sizeof( buf2)), + makeEscapeString( ITEM_getChar( itemindex, ITEM_NAME), buf1, sizeof( buf1)), + ITEM_getInt( itemindex, ITEM_BASEIMAGENUMBER), + crushe, + ITEM_getInt( itemindex, ITEM_USEPILENUMS), + ITEM_getChar( itemindex, ITEM_EFFECTSTRING) ); + }else if( NSellSthList[page][num].selltype == 2 ){//宠物 + int petindex, i; + ti = NSellSthList[page][num].uindex; + petindex = CHAR_getCharPet( sellindex, ti); + if( !CHAR_CHECKINDEX( petindex) ) return FALSE; + //TYPE|名| |图|等级|转| |攻|防|敏|技1|技2|技3|技4|技5|技6|技7 + sprintf( buff, "2|%s|%s|%d|%d|%d|%d|%d|%d|%d|", + makeEscapeString( CHAR_getChar( petindex, CHAR_NAME ), buf1, sizeof(buf1)), + makeEscapeString( CHAR_getUseName( petindex), buf2, sizeof(buf2)), + CHAR_getInt( petindex, CHAR_BASEBASEIMAGENUMBER), + CHAR_getInt( petindex , CHAR_LV), + CHAR_getInt( petindex , CHAR_TRANSMIGRATION), + CHAR_getWorkInt(petindex , CHAR_WORKMAXHP), + CHAR_getWorkInt( petindex, CHAR_WORKATTACKPOWER), + CHAR_getWorkInt( petindex, CHAR_WORKDEFENCEPOWER), + CHAR_getWorkInt( petindex, CHAR_WORKQUICK)); + + for( i=0; i<7; i++){ + int skillarray, skillID; + skillID = CHAR_getPetSkill( petindex, i); + skillarray = PETSKILL_getPetskillArray( skillID); + if( PETSKILL_CHECKINDEX( skillarray) ){ + strcat( buff, PETSKILL_getChar( skillarray, PETSKILL_NAME) ); + } + strcat( buff, "|"); + } + } + sprintf( ListString, "%d|%s|%s|%s|%s", + num, CHAR_getChar( sellindex, CHAR_NAME), + NSellSthList[page][num].headmess, + NSellSthList[page][num].sellmess, + buff ); + + if( strlen( ListString) <= 0 ){ + print("err ListString:%s strlen <= %d\n", ListString, strlen( ListString)); + return FALSE; + } + return TRUE; +} + + +int NPC_getSellSth_FreeTiCount( void) +{ + int counts = 0, i, j; + for( i=0; i +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "lssproto_serv.h" +#include "readmap.h" +// Arminius 8.4 manor +#include "family.h" + +static void NPC_SignBoard_Window( int meindex, int toindex, int num,int select); + + +/********************************* +* 赓渝质 +*********************************/ +BOOL NPC_SignBoardInit( int meindex ) +{ + + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + /*--正奶皿涩烂--*/ + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPEMSG ); + + /*--白央奶伙互卅仃木壬准憎 毛涩 今六卅中--*/ + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("GetArgStrErr"); + return FALSE; + } + + return TRUE; + +} + + + + +/********************************* +* 苇日木凶凛及质 +*********************************/ +void NPC_SignBoardLooked( int meindex , int lookedindex) +{ + + /* 皿伊奶乩□卞覆仄化分仃 杀允月 */ + if( CHAR_getInt( lookedindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) { + return; + } + + /* ㄠ弘伉永玉动 及心 */ + if( NPC_Util_CharDistance( lookedindex, meindex ) > 1) return; + + + NPC_SignBoard_Window( meindex, lookedindex,0,-1); + +} + + +static void NPC_SignBoard_Window( int meindex, int toindex, int num,int select) +{ + + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + char token[1024]; + int fd = getfdFromCharaIndex( toindex); + + + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("GetArgStrErr"); + return; + } + + // Arminius: manor + { + char *p,*q; + extern struct FM_POINTLIST fmpointlist; + p=strstr(npcarg, "%manorid:"); + if (p!=NULL) { + char tmp[1024]; + int a; + + q=strstr(p+1,"%"); + if (q!=NULL) { + q[0]='\0'; + p[0]='\0'; + a=atoi(p+9); +#ifdef _FAMILY_MANORNUM_CHANGE // CoolFish 用来修改装园数量 + if ((a>=1) && (a<=MANORNUM)) { +#else + if ((a>=1) && (a<=4)) { +#endif + getStringFromIndexWithDelim(fmpointlist.pointlistarray[a-1], "|", 5, token, sizeof(token)); + if (atoi(token)>=0) { + getStringFromIndexWithDelim(fmpointlist.pointlistarray[a-1], "|", 6, token, sizeof(token)); + sprintf(tmp,"%s%s%s",npcarg,token,q+1); + strcpy(npcarg, tmp); + } else { + sprintf(tmp,"%s没有任何家族%s",npcarg,q+1); + strcpy(npcarg, tmp); + } + } + } + } + } + + sprintf(token, "      < 看板 >\n%s",npcarg); + + /*--霜耨--*/ + lssproto_WN_send( fd,WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + CHAR_WINDOWTYPE_WINDOWPETSHOP_START, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); +} + + + +/*----------------------------------------- + * 弁仿奶失件玄井日忒匀化五凶凛卞裟太请今木月[ + * +-------------------------------------------*/ +void NPC_SignBoardWindowTalked( int meindex, int talkerindex, + int seqno, int select, char *data) +{ + + if( NPC_Util_CharDistance( talkerindex, meindex ) > 1) { + return; + } +} + diff --git a/gmsv/npc/npc_simpleshop.c b/gmsv/npc/npc_simpleshop.c new file mode 100644 index 0000000..0b9ad92 --- /dev/null +++ b/gmsv/npc/npc_simpleshop.c @@ -0,0 +1,785 @@ +#include "version.h" +#include + +#include "object.h" +#include "char_base.h" +#include "char.h" +#include "item.h" +#include "util.h" +#include "handletime.h" +#include "anim_tbl.h" +#include "npc_door.h" +#include "lssproto_serv.h" +#include "npcutil.h" +#include "npccreate.h" +#include "log.h" + + +/* + * 赏读卅饕及伙□民件[by nakamura + * + * NPCARGUMENT卞俜 仄凶失奶 丞毛 蜃卞赭 仄化中月云饕[ + * SIMPLESHOP_MAXINFINITITEM潘 蜃卞戏岳允月仇午互匹五月[ + * 蜃戏岳失奶 丞午 元潘 及失奶 丞毛 匀凶日 匀凶支勾互 + * 壑钗井日壅 允月[ + * 引凶}皿伊奶乩□井日手及毛 中午月仇午互匹五月互}丐月袄蟾 + * (NPC_SIMPLESHOPMAXBUYPRICE)方曰嫖中嗯毛障 歹卅仁化反中仃 + * 卅中 潸反匹五卅中[ 中午匀凶失奶 丞反公及桦匹卅仁卅月[ + * 引凶}失奶 丞及涩烂匹cost互涩烂今木化中卅中手及手 中午木卅中[ + * 2谛动晓及皿伊奶乩□互饕卞五凶午五反} 及菸毛穸燮允月[公丹允月 + * 仇午卞方曰饕互捩菁卞簿井毛锹澎仄化中月仇午毛 什[ + * + * 正奶皿 “SimpleShop + * 健丹奶矛件玄: init, talked, specialtalked + * + * + */ +static void NPC_SimpleShopOpenShopWindow( int meindex, int cliindex, + char *npcarg ); +static void NPC_SimpleShopGetEscapedItemString( int shopindex, + int cliindex, char *str ); +static BOOL NPC_SimpleShopProcessBuyMsg( char *msg, int shop, int cli ); +static BOOL NPC_SimpleShopProcessSellMsg( char *msg, int shop, int cli ); + +static BOOL NPC_LimitBuyInShopProcessSellMsg(char *msg,int shop,int cli); + + +static BOOL NPC_SimpleShopFillItem( int meindex, char *npcarg ); +static int NPC_SimpleShopGetItemNum( int meindex ); +static void NPC_SimpleShopNormalWindow( int meindex, + int playerindex, char *str ); +static int NPC_ShopWindowIndexToItemTableIndex( int charindex, + int shopwindowindex ); +static BOOL NPC_SimpleShopOpenShopOrNot( char *msg, char *openshopstr ); +//static void NPC_SimpleShopSetLeakLevel( int meindex ); + +#define NPC_SIMPLESHOPMAXBUYPRICE 9999 +#define SIMPLESHOPTALKBUFSIZE 256 + +#define SIMPLESHOP_FATALERRSTR "好痛!对不起,最近状况不太佳。。。" + +#define SIMPLESHOP_MAXINFINITITEM 40 + +enum{ + OPENSHOPTOKEN=1, + MSGTOKEN, + MAINTOKEN, + BUYTOKEN, + OKBUYTOKEN, + SELLTOKEN, + OKSELLTOKEN, + POORTOKEN, + ITEMFULLTOKEN, + ANOTHERPLAYERTOKEN, + RAREITEMTOKEN, + THANKYOUTOKEN, + ITEMLISTTOKEN, + + BUYINITEMLISTTOKEN, + }; +void NPC_SimpleShopTalked( int meindex, int talker, char *msg, int color ) +{ +#define SHOPRANGE 3 + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE], token[NPC_UTIL_GETARGSTR_LINEMAX]; + if( CHAR_getInt( talker,CHAR_WHICHTYPE) != CHAR_TYPEPLAYER ){ + return; + } + if( NPC_Util_charIsInFrontOfChar( talker, meindex, SHOPRANGE ) + && ! CHAR_getFlg( talker,CHAR_ISDIE ) ){ + NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg)); + getStringFromIndexWithDelim( npcarg,"|", OPENSHOPTOKEN,token, sizeof(token)); + if( NPC_SimpleShopOpenShopOrNot( msg, token ) + && NPC_Util_isFaceToFace( meindex, talker, SHOPRANGE ) ){ + CHAR_setWorkInt( meindex, CHAR_WORKSHOPCLIENTINDEX, talker ); + NPC_SimpleShopOpenShopWindow( meindex, talker, npcarg ); + }else{ + int tokennum; + int i; + char tmp[NPC_UTIL_GETARGSTR_LINEMAX]; + getStringFromIndexWithDelim( npcarg,"|", MSGTOKEN,token, sizeof(token)); + tokennum = 1; + for( i=0;token[i]!='\0';i++ ){ + if( token[i] == ',' ) tokennum++; + } + getStringFromIndexWithDelim( token,",", rand()%tokennum+1,tmp, sizeof(tmp)); + CHAR_talkToCli( talker, meindex, tmp, CHAR_COLORWHITE ); + } + } +} + +void NPC_SimpleShopSpecialTalked( int meindex, int talker, char *msg, int color ) +{ + if( CHAR_getInt(talker,CHAR_WHICHTYPE) == CHAR_TYPEPLAYER + && NPC_Util_isFaceToFace( meindex, talker, SHOPRANGE ) ){ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE], token[NPC_UTIL_GETARGSTR_LINEMAX]; + NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg)); + switch( tolower(msg[0]) ){ + case 's': + { + int ret; + if( CHAR_getWorkInt(meindex,CHAR_WORKSHOPCLIENTINDEX)!= talker ){ + getStringFromIndexWithDelim( npcarg,"|",ANOTHERPLAYERTOKEN, + token, sizeof(token)); + NPC_SimpleShopNormalWindow( meindex, talker, token ); + return; + } + ret = getStringFromIndexWithDelim( msg, "|", 3, token, sizeof(token)); + if( ret == FALSE ){ + token[0] = 'e'; + token[1] = '\0'; + } + switch( tolower(token[0])){ + case 'b': + if( (ret=NPC_SimpleShopProcessBuyMsg(msg,meindex,talker)) + <0){ + switch( ret ){ + case -2: + getStringFromIndexWithDelim( npcarg,"|",POORTOKEN, + token,sizeof(token)); + NPC_SimpleShopNormalWindow( meindex,talker,token); + break; + case -3: + getStringFromIndexWithDelim( npcarg,"|", + ITEMFULLTOKEN, + token,sizeof(token)); + NPC_SimpleShopNormalWindow(meindex,talker,token); + break; + case -1: + default: + NPC_SimpleShopNormalWindow(meindex, talker, + SIMPLESHOP_FATALERRSTR + ); + break; + } + }else{ + NPC_SimpleShopFillItem( meindex, npcarg ); + getStringFromIndexWithDelim(npcarg,"|",THANKYOUTOKEN, + token, sizeof(token)); + NPC_SimpleShopNormalWindow(meindex,talker,token); + } + break; + case 's': + if( CHAR_getWorkInt(meindex,CHAR_WORKSHOPCLIENTINDEX) != talker ){ + getStringFromIndexWithDelim( npcarg,"|", + ANOTHERPLAYERTOKEN, + token, sizeof(token)); + NPC_SimpleShopNormalWindow( meindex, talker, token ); + return; + } + if((ret=NPC_SimpleShopProcessSellMsg(msg,meindex,talker)) <0 ){ + switch(ret){ + case -2: + getStringFromIndexWithDelim( npcarg,"|", + RAREITEMTOKEN, + token, sizeof(token) ); + NPC_SimpleShopNormalWindow( meindex,talker,token); + break; + case -1: + default: + NPC_SimpleShopNormalWindow(meindex, talker, + SIMPLESHOP_FATALERRSTR ); + break; + } + }else{ + getStringFromIndexWithDelim(npcarg,"|",THANKYOUTOKEN, + token, sizeof(token)); + NPC_SimpleShopNormalWindow(meindex,talker,token); + } + break; + case 'e': + default: + CHAR_setWorkInt( meindex, CHAR_WORKSHOPCLIENTINDEX, -1 ); + break; + } + break; + } + case 'i': + if( CHAR_getWorkInt(meindex,CHAR_WORKSHOPCLIENTINDEX) + == talker ){ + NPC_SimpleShopOpenShopWindow( meindex, talker, npcarg ); + } + break; + default: + break; + } + } +} + +void NPC_LimitBuyInShopSpecialTalked( int meindex, int talker, char *msg, int color ) +{ + if( CHAR_getInt(talker,CHAR_WHICHTYPE) == CHAR_TYPEPLAYER + && NPC_Util_isFaceToFace( meindex, talker, SHOPRANGE ) ){ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE], token[NPC_UTIL_GETARGSTR_LINEMAX]; + NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg)); + switch( tolower(msg[0]) ){ + case 's': + { + int ret; + if( CHAR_getWorkInt(meindex,CHAR_WORKSHOPCLIENTINDEX) != talker ){ + getStringFromIndexWithDelim( npcarg,"|", + ANOTHERPLAYERTOKEN, + token, sizeof(token)); + NPC_SimpleShopNormalWindow( meindex, talker, token ); + return; + } + ret = getStringFromIndexWithDelim( msg, "|", 3, token, sizeof( token)); + if( ret == FALSE ){ + token[0] = 'e'; + token[1] = '\0'; + } + switch( tolower(token[0])){ + case 'b': + if( ( ret = NPC_SimpleShopProcessBuyMsg( msg, meindex, talker)) < 0){ + switch( ret ){ + case -2: + getStringFromIndexWithDelim( npcarg,"|",POORTOKEN, + token,sizeof(token)); + NPC_SimpleShopNormalWindow( meindex,talker,token); + break; + case -3: + getStringFromIndexWithDelim( npcarg,"|", + ITEMFULLTOKEN, + token,sizeof(token)); + NPC_SimpleShopNormalWindow(meindex,talker,token); + break; + case -1: + default: + NPC_SimpleShopNormalWindow(meindex, talker, + SIMPLESHOP_FATALERRSTR + ); + break; + } + }else{ + NPC_SimpleShopFillItem( meindex, npcarg ); + getStringFromIndexWithDelim(npcarg,"|",THANKYOUTOKEN, + token, sizeof(token)); + NPC_SimpleShopNormalWindow(meindex,talker,token); + + } + break; + case 's': + if( CHAR_getWorkInt(meindex,CHAR_WORKSHOPCLIENTINDEX) != talker ){ + getStringFromIndexWithDelim( npcarg,"|", + ANOTHERPLAYERTOKEN, + token, sizeof(token)); + NPC_SimpleShopNormalWindow( meindex, talker, token ); + return; + } + if((ret=NPC_LimitBuyInShopProcessSellMsg( + msg,meindex,talker))<0){ + switch(ret){ + case -2: + getStringFromIndexWithDelim( npcarg,"|", + RAREITEMTOKEN, + token,sizeof(token)); + NPC_SimpleShopNormalWindow( meindex,talker,token); + break; + case -1: + default: + NPC_SimpleShopNormalWindow(meindex, talker, SIMPLESHOP_FATALERRSTR + ); + break; + } + }else{ + getStringFromIndexWithDelim(npcarg,"|",THANKYOUTOKEN, token, sizeof(token)); + NPC_SimpleShopNormalWindow(meindex,talker,token); + + } + break; + case 'e': + default: + CHAR_setWorkInt( meindex, CHAR_WORKSHOPCLIENTINDEX, -1 ); + break; + } + break; + } + case 'i': + if( CHAR_getWorkInt(meindex,CHAR_WORKSHOPCLIENTINDEX) + == talker ){ + NPC_SimpleShopOpenShopWindow( meindex, talker, npcarg ); + } + break; + default: + break; + } + } +} + + + + + +/* + * 饕互用□穴伙它奶件玉它毛请允[它奶件玉它及廿凶氏毛瓷允午} + * 赓卞饕卞 仄井仃凶午五午 元橇谪卞手升月[ + * int meindex : 饕及index + * int playerindex : 它奶件玉它毛请允皿伊奶乩□及index + * char *str : + */ +static void NPC_SimpleShopNormalWindow( int meindex, int playerindex, + char *str ) +{ + int fd; + int objindex; + char tmp[512], *name; + + objindex = CHAR_getWorkInt(meindex,CHAR_WORKOBJINDEX); + name = CHAR_getChar( meindex, CHAR_NAME ); + snprintf(tmp,sizeof(tmp),"W|%d|N|%s|123|%s", objindex, name, str ); + fd = getfdFromCharaIndex(playerindex); + if( fd == -1 ) return; + lssproto_TK_send(fd,-1,tmp,CHAR_COLORWHITE ); +} + +/* + * 饕它奶件玉它及奶件犯弁旦井日}失奶 丞 □皮伙及奶件犯弁旦卞 晶 + * 娄醒 + * int charindex:平乓仿及奶件犯弁旦 + * int shopwindowindex:饕它奶件玉它及奶件犯弁旦[0井日反元引月[ + * 忒曰袄 + * 失奶 丞 □皮伙及奶件犯弁旦[巨仿□反-1[ + */ +static int NPC_ShopWindowIndexToItemTableIndex( int charindex, + int shopwindowindex ) +{ + int i, counter; + + counter = 0; + for( i=CHAR_STARTITEMARRAY;i NPC_SIMPLESHOPMAXBUYPRICE ){ + return -2; + } + price *= NPC_Util_sellRate(playerindex); + + CHAR_AddGold( playerindex, price ); + + CHAR_sendStatusString( playerindex , "P"); + + id = ITEM_getInt(itemind,ITEM_ID); + { + LogItem( + CHAR_getChar( playerindex, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( playerindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemind, +#else + ITEM_getInt( itemind, ITEM_ID ), /* 失奶 丞 寞 */ +#endif + "Sell", + CHAR_getInt( playerindex,CHAR_FLOOR), + CHAR_getInt( playerindex,CHAR_X ), + CHAR_getInt( playerindex,CHAR_Y ), + ITEM_getChar( itemind, ITEM_UNIQUECODE), + ITEM_getChar( itemind, ITEM_NAME), + ITEM_getInt( itemind, ITEM_ID) + ); + } + + if( ! NPC_Util_moveItemToChar( shopindex,itemind,TRUE ) ){ + return -1; + } + NPC_Util_RemoveItemByID(shopindex,id,FALSE); + return 1; +} + +static BOOL NPC_LimitBuyInShopProcessSellMsg(char *msg, + int shopindex, int playerindex ) +{ + int sellwindowindex, itemtableindex,itemind, id,i,buyokflag, setid; + int price, tmpgold; + char buf[BUFSIZ]; + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE], token[NPC_UTIL_GETARGSTR_LINEMAX]; + + if(!CHAR_CHECKINDEX(shopindex)||!CHAR_CHECKINDEX(playerindex)) + return -1; + if( !getStringFromIndexWithDelim( msg,"|",4,buf,sizeof(buf) )){ + return -1; + } + sellwindowindex = atoi(buf); + itemtableindex = sellwindowindex + CHAR_STARTITEMARRAY; + itemind = CHAR_getItemIndex(playerindex,itemtableindex ); + if( ! ITEM_CHECKINDEX(itemind) ) return -1; + id = ITEM_getInt(itemind,ITEM_ID); + NPC_Util_GetArgStr( shopindex, npcarg, sizeof(npcarg)); + getStringFromIndexWithDelim( npcarg, "|", BUYINITEMLISTTOKEN, token, sizeof( token) ); + buyokflag = FALSE; + for( i=1;getStringFromIndexWithDelim(token,",",i,buf,sizeof(buf)); i++){ + + char *tok1 = NULL; + char *tok2 = NULL; + int no1=0, no2=0; + tok1 = strtok( buf, "-" ); + tok2 = strtok( NULL, "-" ); + + setid = atoi(buf); + + if( tok1 == NULL || tok2 == NULL ){ + if( setid == 0 ) return -2; + if( setid == id ) buyokflag = TRUE; + } else { + no1 = atoi( tok1 ); + no2 = atoi( tok2 ); + if( no1 <= id && id <= no2 ){ + buyokflag = TRUE; + } + } + } + if( buyokflag == FALSE ) return -2; + price = ITEM_getInt( itemind, ITEM_COST ); + price *= NPC_Util_sellRate(playerindex); + + CHAR_AddGold( playerindex, price ); + + CHAR_sendStatusString( playerindex , "P"); + if( ! NPC_Util_moveItemToChar( shopindex,itemind,TRUE ) ){ + return -1; + } + + { + LogItem( + CHAR_getChar( playerindex, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( playerindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemind, +#else + ITEM_getInt( itemind, ITEM_ID ), /* 失奶 丞 寞 */ +#endif + "Sell", + CHAR_getInt( playerindex,CHAR_FLOOR), + CHAR_getInt( playerindex,CHAR_X ), + CHAR_getInt( playerindex,CHAR_Y ), + ITEM_getChar( itemind, ITEM_UNIQUECODE), + ITEM_getChar( itemind, ITEM_NAME), + ITEM_getInt( itemind, ITEM_ID) + ); + } + + /* 中潸匀凶失奶 丞毛壅蛔 */ + NPC_Util_RemoveItemByID(shopindex,id,FALSE); + + return 1; + +} + +/* + * 饕卞丐月失奶 丞及醒毛 月 + */ +static int NPC_SimpleShopGetItemNum( int meindex ) +{ + int counter, i; + + counter = 0; + for( i=CHAR_STARTITEMARRAY;i=2 ){ /* 手切允亢及桦宁绰轮 */ + NPC_Util_RemoveItemByID(meindex,itemid,FALSE); + } + }else{ + break; + } + } + + /* 域荚仄五屯勾今木凶橇谪卞允月 */ + //NPC_SimpleShopSetLeakLevel( meindex ); + + return TRUE; +} + + +/* + * 赓渝祭允月[ + */ +BOOL NPC_SimpleShopInit( int meindex ) +{ + unsigned int mlevel; + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + + + /* 域荚撩 仄凶丐午反2蘸午综日卅中方丹卞允月 */ + int createindex = CHAR_getInt( meindex, CHAR_NPCCREATEINDEX ); + +/* print("shopinit start\n" );*/ + if( NPC_CHECKCREATEINDEX(createindex) ){ + NPC_create[createindex].intdata[NPC_CREATETIME] = -1; + } + + CHAR_setInt( meindex , CHAR_HP , 0 ); + CHAR_setInt( meindex , CHAR_MP , 0 ); + CHAR_setInt( meindex , CHAR_MAXMP , 0 ); + CHAR_setInt( meindex , CHAR_STR , 0 ); + CHAR_setInt( meindex , CHAR_TOUGH, 0 ); + CHAR_setInt( meindex , CHAR_LV , 0 ); + mlevel = ((100<<16)|(100<<0)); /* 晓匏2田奶玄互 丹午五及 } + 票匏2田奶玄互 月午五及 [ */ + CHAR_setInt( meindex, CHAR_MERCHANTLEVEL, mlevel ); + + CHAR_setWorkInt( meindex, CHAR_WORKSHOPCLIENTINDEX, -1 ); + + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPESHOP ); + CHAR_setFlg( meindex , CHAR_ISOVERED , 0 ); + CHAR_setFlg( meindex , CHAR_ISATTACKED , 0 ); + + NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg)); + + /* 失奶 丞 凶六月[撩 仄凶日return FALSE */ + if( ! NPC_SimpleShopFillItem( meindex,npcarg ) ){ + print( "SHOP INIT ERROR: npcarg=%s\n", npcarg ); + return FALSE; + } + +/* print("shopinit end\n" );*/ + + + return TRUE; +} + +/* + * 饕它奶件玉它毛钒仁井升丹井 烂允月[ + * npcarg及中匀仇户及玄□弁件卞 + * 仇氏卞切反,仍户氏仁分今中,仁分今中卅 + * 及方丹卞俜 今木凶 侬 毛手午卞 烂允月[仇及午五及犯伉立正反","[ + * + * 娄醒 + * msg:皿伊奶乩□互仄扎屯匀凶 侬 + * openshopstr:npcarg及中匀仇户及玄□弁件[ + * 忒曰袄 + * 钒仁卅日TRUE, 钒井卅中卅日FALSE + */ +static BOOL NPC_SimpleShopOpenShopOrNot( char *msg, char *openshopstr ) +{ + int i; + char buf[256]; + + i=1; + while(getStringFromIndexWithDelim(openshopstr,",",i,buf,sizeof(buf))){ + if( strstr( msg, buf ) ) return TRUE; + i++; + } + return FALSE; +} + +/* + * 允屯化及手切手及毛域荚摹 今木凶橇谪卞允月[ + */ +#if 0 +static void NPC_SimpleShopSetLeakLevel( int meindex ) +{ + int i, itemindex; + + for( i=CHAR_STARTITEMARRAY;i +#include +#include +#include +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "lssproto_serv.h" +#include "npc_stoneserviceman.h" +#include "readmap.h" +#include "battle.h" +#include "log.h" +#include "enemy.h" +#include "configfile.h" + +#ifdef _SERVICE +#define LOOP_TIME 100 //0.1秒(进入loop function 的时间) +#define MAX_AP_MSG 128 // 接收AP送来讯息的最大数 + +// socket struct +struct socketaddr_in +{ + u_short sin_family; + u_short sin_port; + u_long sin_addr; + char sin_zero[8]; +}; + +// 接收AP传来的讯息 +typedef struct _MSG +{ + int nAid; // nAid => 流水号*10 + 讯息代号(_AP_CLIENT_MESSAGE) + int nIndex; // NPC的index值 + int nLen; // 讯息长度 + LPList Data; // 实际资料 + int bIsUse; // 这个讯息是否有使用过 +}Msg,*pMsg; +Msg g_APMsg[MAX_AP_MSG]; + +// 动作id +enum _AP_CLIENT_MESSAGE +{ + Cli_CHECKPLAYER, //要求AP对玩家是否有购买产品的确认 0 + AP_CHECKPLAYER, //AP回应玩家是否有购买产品 + Cli_YES, //玩家确定要将奖品拿走 + Cli_CANCEL, //通知AP把lock栏位清为0 + Cli_GET, //通知AP给物品 + AP_GET, //AP回应物品 5 + Cli_CONNECT, //测试是否有连到AP + AP_CONNECT, //AP回应 + AP_ERROR //AP有错误 +}; + +// NPC的工作变数 +enum +{ + NPC_WORK_FLAG1 = CHAR_NPCWORKINT2, //flag1 + NPC_WORK_FLAG2 = CHAR_NPCWORKINT3, //flag2 + NPC_WORK_FLAG3 = CHAR_NPCWORKINT4, //flag3 + NPC_WORK_TIMEOUT = CHAR_NPCWORKINT5, //time out 时间 + NPC_WORK_STATE = CHAR_NPCWORKINT6, //目前执行状态 + NPC_WORK_START = CHAR_NPCWORKINT7, //开始计时flag + NPC_WORK_LEAVE_COUNT = CHAR_NPCWORKINT8, //玩家talk时间计时 + NPC_WORK_TOINDEX = CHAR_NPCWORKINT9, //玩家的index值 + NPC_WORK_SERIALNUM = CHAR_NPCWORKINT10, //流水号 + NPC_WORK_ISUSE = CHAR_NPCWORKINT11, //目前NPC是否有玩家在使用 +}; + +// 执行的状态 +enum +{ + SERVICE_STATE_1, // check 有没有和AP连线中 + SERVICE_STATE_2, // 向AP取得玩家有无买产品 + SERVICE_STATE_3, // 取得要给玩家的东西的资料 + SERVICE_STATE_4 // end state +}; + +extern int errno; + +int g_nServiceSocket; +int g_EnableService = 0; +char g_ApID[32]; +struct socketaddr_in server_sin; +struct sockaddr temp; +unsigned short g_Port; + +static void NPC_StoneServiceMan_selectWindow(int meindex,int toindex,int num,int select); +extern int GetSerialNum(void); +static int flag = 1; + +/********************************* +* 初始化 +*********************************/ +BOOL NPC_StoneServiceManInit(int meindex ) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + + if(NPC_Util_GetArgStr(meindex,npcarg,sizeof(npcarg)) == NULL){ + print("StoneServiceMan:GetArgStrErr"); + return FALSE; + } + + CHAR_setInt(meindex,CHAR_LOOPINTERVAL,LOOP_TIME); + CHAR_setInt(meindex,CHAR_WHICHTYPE,CHAR_TYPESTONESERVICEMAN); + CHAR_setWorkInt(meindex,NPC_WORK_FLAG1,1); + CHAR_setWorkInt(meindex,NPC_WORK_FLAG2,1); + CHAR_setWorkInt(meindex,NPC_WORK_FLAG3,1); + CHAR_setWorkInt(meindex,NPC_WORK_TIMEOUT,0); + CHAR_setWorkInt(meindex,NPC_WORK_STATE,SERVICE_STATE_2); + CHAR_setWorkInt(meindex,NPC_WORK_START,0); + CHAR_setWorkInt(meindex,NPC_WORK_TOINDEX,-1); + CHAR_setWorkInt(meindex,NPC_WORK_ISUSE,0); + CHAR_setWorkInt(meindex,NPC_WORK_LEAVE_COUNT,0); + CHAR_setWorkInt(meindex,NPC_WORK_SERIALNUM,-1); + + g_EnableService = getEnableService(); + + //连线到AP在init时只做一次 + if(flag && g_EnableService){ + strcpy(g_ApID,getApID()); + g_Port = getApPort(); + bzero(g_APMsg,sizeof(g_APMsg)); + ConnectToAP();//连线到AP + flag = 0; + } + + return TRUE; +} + +void NPC_StoneServiceManTalked(int meindex,int talkerindex,char *szMes,int color) +{ + if(CHAR_getInt(talkerindex,CHAR_WHICHTYPE) != CHAR_TYPEPLAYER) return; + if(NPC_Util_isFaceToFace(talkerindex,meindex,1) == FALSE) return; + NPC_StoneServiceMan_selectWindow(meindex,talkerindex,0,-1); +} + +static void NPC_StoneServiceMan_selectWindow(int meindex,int toindex,int num,int select) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + char token[1024],buf[128],*pUserid; + int buttontype = 0, windowtype = 0, windowno = 0,nAid,nLen; + int fd = getfdFromCharaIndex(toindex); + char Data[3][32],talk[128]; + int i,j,k,Ret; + LPList DataList = NULL,Kill = NULL; + + + if(fd == -1) + { + print("getfd err\n"); + return; + } + + if(NPC_Util_GetArgStr(meindex,npcarg,sizeof(npcarg)) == NULL) + { + print("GetArgStrErr"); + return ; + } + + token[0] = '\0'; + + //如果不使用石器服务员的功能 + if(!g_EnableService) + { + sprintf(token,"\n 请到此星系的最後一颗星球使用此服务,谢谢!"); + buttontype = WINDOW_BUTTONTYPE_OK; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_SERVICE_WAIT; + + lssproto_WN_send(fd,windowtype,buttontype,windowno, + CHAR_getWorkInt(meindex,CHAR_WORKOBJINDEX), + token); + return; + } + + //如果这个玩家是第一个和NPC讲话 + if(CHAR_getWorkInt(meindex,NPC_WORK_ISUSE) == 0 && + CHAR_getWorkInt(meindex,NPC_WORK_TOINDEX) == -1) + { + //记住第一个和NPC讲话的是谁 + CHAR_setWorkInt(meindex,NPC_WORK_TOINDEX,toindex); + //设定为NPC正在使用中 + CHAR_setWorkInt(meindex,NPC_WORK_ISUSE,1); + } + //如果是第二个以後和NPC讲话的人 + else if(CHAR_getWorkInt(meindex,NPC_WORK_ISUSE) == 1 && + CHAR_getWorkInt(meindex,NPC_WORK_TOINDEX) != toindex) + { + sprintf(token,"\n 正在服务其他玩家中,请稍等..."); + buttontype = WINDOW_BUTTONTYPE_OK; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_SERVICE_WAIT; + + lssproto_WN_send(fd,windowtype,buttontype,windowno, + CHAR_getWorkInt(meindex,CHAR_WORKOBJINDEX), + token); + return; + } + if(flag) + { + ConnectToAP(); + flag = 0; + } + switch(num) + { + case 0: + case 1: + //取得玩家的id + pUserid = CHAR_getChar(toindex,CHAR_CDKEY); + if(CHAR_getWorkInt(meindex,NPC_WORK_FLAG2) == 1) + { + if(pUserid == NULL || SendToAP(Cli_CHECKPLAYER,meindex,1,pUserid,NULL) == 0) + { + if(NPC_Util_GetStrFromStrWithDelim(npcarg,"SysBusyMsg",buf,sizeof(buf)) == NULL) return; + sprintf(token,"\n %s",buf); + buttontype = WINDOW_BUTTONTYPE_OK; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_SERVICE_EXIT; + break; + } + CHAR_setWorkInt(meindex,NPC_WORK_FLAG2,0); + CHAR_setWorkInt(meindex,NPC_WORK_START,1); + } + if(CHAR_getWorkInt(meindex,NPC_WORK_STATE) == SERVICE_STATE_2) + { + // 超过五秒time out + if(CHAR_getWorkInt(meindex,NPC_WORK_TIMEOUT) >= 50) + { + close(g_nServiceSocket); + flag = 1; + sprintf(token,"\n 重新与系统取得连线..."); + buttontype = WINDOW_BUTTONTYPE_OK; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_SERVICE_CONTINUE; + CHAR_setWorkInt(meindex,NPC_WORK_TIMEOUT,0); + CHAR_setWorkInt(meindex,NPC_WORK_FLAG2,1); + CHAR_setWorkInt(meindex,NPC_WORK_START,0); + break; + } + if((Ret = RecvFromAP(&nAid,meindex,&nLen,&DataList)) == -1) + { + sprintf(token,"\n 等待回应..."); + buttontype = WINDOW_BUTTONTYPE_OK; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_SERVICE_CONTINUE; + break; + } + else + { + for(i=0;iData); + Kill = DataList; + DataList = DataList->Next; + if(Kill != NULL) free(Kill); + } + // 使用过的讯息清空 + bzero(&g_APMsg[Ret],sizeof(Msg)); + } + if(nAid == AP_CHECKPLAYER) + { + switch(atoi(Data[0])) + { + case 0: //没买 + if(NPC_Util_GetStrFromStrWithDelim(npcarg,"ErrMsg",buf,sizeof(buf)) == NULL) return; + sprintf(token,"\n %s",buf); + buttontype = WINDOW_BUTTONTYPE_OK; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_SERVICE_EXIT; + break; + case 1: //有买 + if(NPC_Util_GetStrFromStrWithDelim(npcarg,"MainMsg",buf,sizeof(buf)) == NULL) return; + sprintf(token,"5\n %s" + "\n 你要将%s" + "\n 的奖品给这个角色吗?\n" + "\n" + "\n 《 确 定 》" + "\n" + "\n 《 取 消 》", + buf,Data[1]); + buttontype = WINDOW_BUTTONTYPE_NONE; + windowtype = WINDOW_MESSAGETYPE_SELECT; + windowno = CHAR_WINDOWTYPE_SERVICE_START; + break; + //另一个角色正在使用中 + case 2: + sprintf(token,"\n 目前您的另一个角色正在领取."); + buttontype = WINDOW_BUTTONTYPE_OK; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_SERVICE_EXIT; + break; + //玩家的奖品已领完 + case 3: + sprintf(token,"\n 您的奖品已经领完了!!"); + buttontype = WINDOW_BUTTONTYPE_OK; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_SERVICE_EXIT; + break; + break; + } + } + else + { + sprintf(token,"\n 系统讯息错误!!(%d)",nAid); + buttontype = WINDOW_BUTTONTYPE_OK; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_SERVICE_EXIT; + } + CHAR_setWorkInt(meindex,NPC_WORK_TIMEOUT,0); + CHAR_setWorkInt(meindex,NPC_WORK_FLAG2,1); + } + else + { + sprintf(token,"\n 等待回应..."); + buttontype = WINDOW_BUTTONTYPE_OK; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_SERVICE_CONTINUE; + } + break; + case 2: + //取得玩家的id + pUserid = CHAR_getChar(toindex,CHAR_CDKEY); + if(CHAR_getWorkInt(meindex,NPC_WORK_FLAG3) == 1){ + if(pUserid == NULL || SendToAP(Cli_GET,meindex,1,pUserid,NULL) == 0){ + if(NPC_Util_GetStrFromStrWithDelim(npcarg,"SysBusyMsg",buf,sizeof(buf)) == NULL) return; + sprintf(token,"\n %s",buf); + buttontype = WINDOW_BUTTONTYPE_OK; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_SERVICE_EXIT; + break; + } + CHAR_setWorkInt(meindex,NPC_WORK_START,1); + CHAR_setWorkInt(meindex,NPC_WORK_FLAG3,0); + } + if(CHAR_getWorkInt(meindex,NPC_WORK_STATE) == SERVICE_STATE_3){ + // 超过五秒time out + if(CHAR_getWorkInt(meindex,NPC_WORK_TIMEOUT) >= 50){ + close(g_nServiceSocket); + flag = 1; + sprintf(token,"\n 重新与系统取得连线..."); + buttontype = WINDOW_BUTTONTYPE_OK; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_SERVICE_CONTINUE; + CHAR_setWorkInt(meindex,NPC_WORK_TIMEOUT,0); + CHAR_setWorkInt(meindex,NPC_WORK_FLAG3,1); + CHAR_setWorkInt(meindex,NPC_WORK_START,0); + break; + } + if((Ret = RecvFromAP(&nAid,meindex,&nLen,&DataList)) == -1){ + sprintf(token,"\n 等待回应..."); + buttontype = WINDOW_BUTTONTYPE_OK; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_SERVICE_CONTINUE; + break; + } + else + { + for(i=0;iData); + Kill = DataList; + DataList = DataList->Next; + if(Kill != NULL) free(Kill); + } + // 使用过的讯息清空 + bzero(&g_APMsg[Ret],sizeof(Msg)); + } + if(nAid == AP_GET) + { + //如果是给钱 + //确定玩家身上有没有空的栏位 + if(atoi(Data[2]) == 0){ + if(CHAR_getInt(toindex,CHAR_GOLD)+atoi(Data[1]) > CHAR_getMaxHaveGold(toindex) ){ + sprintf(token,"\n" + "\n 你身上的空间不足以放入那麽多钱!\n"); + buttontype = WINDOW_BUTTONTYPE_OK; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_SERVICE_EXIT; + break; + }else{ + CHAR_AddGold( toindex, atoi(Data[1]) ); + + CHAR_send_P_StatusString(toindex,CHAR_P_STRING_GOLD); + LogService(CHAR_getChar(toindex,CHAR_NAME), + CHAR_getChar(toindex,CHAR_CDKEY), + atoi(Data[1]), + "钱", + CHAR_getInt(toindex,CHAR_FLOOR), + CHAR_getInt(toindex,CHAR_X), + CHAR_getInt(toindex,CHAR_Y) + ); + sprintf(talk,"%s石币已经给你喽!!\n",Data[1]); + } + } + //如果是给物品 + else if(atoi(Data[2]) == 1){ + //确定玩家身上有没有空的栏位 + int num = 0,itemindex = 0; + + for(i=CHAR_STARTITEMARRAY;i CHAR_MAXITEMNUM){ + sprintf(token,"\n" + "\n 你的道具栏空间不够!\n"); + buttontype = WINDOW_BUTTONTYPE_OK; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_SERVICE_EXIT; + break; + } + //有空的栏位 + for(j=0;j CHAR_MAXPETHAVE) + { + sprintf(token,"\n" + "\n 你的宠物栏空间不够!\n"); + buttontype = WINDOW_BUTTONTYPE_OK; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_SERVICE_EXIT; + break; + } + //有空的栏位 + for(j=0;j getLoopTime()) + { + int talkerindex,i; + char *pUserid; + + talkerindex = CHAR_getWorkInt(meindex,NPC_WORK_TOINDEX); + pUserid = CHAR_getChar(talkerindex,CHAR_CDKEY); + if(pUserid != NULL) SendToAP(Cli_CANCEL,meindex,1,pUserid,NULL); + CHAR_setWorkInt(meindex,NPC_WORK_FLAG1,1); + CHAR_setWorkInt(meindex,NPC_WORK_FLAG2,1); + CHAR_setWorkInt(meindex,NPC_WORK_FLAG3,1); + CHAR_setWorkInt(meindex,NPC_WORK_STATE,SERVICE_STATE_2); + CHAR_setWorkInt(meindex,NPC_WORK_START,0); + CHAR_setWorkInt(meindex,NPC_WORK_TIMEOUT,0); + CHAR_setWorkInt(meindex,NPC_WORK_TOINDEX,-1); + CHAR_setWorkInt(meindex,NPC_WORK_ISUSE,0); + CHAR_setWorkInt(meindex,NPC_WORK_LEAVE_COUNT,0); + CHAR_setWorkInt(meindex,NPC_WORK_SERIALNUM,-1); + //把之前收的有关这个NPC的讯息buf清空 + for(i=0;iNext; + if(kill != NULL) free(kill); + } + bzero(&g_APMsg[i],sizeof(Msg)); + } + } + } + print("Player leave NPC\n"); + return; + } + // 未超过时间则计数 + CHAR_setWorkInt(meindex,NPC_WORK_LEAVE_COUNT,++nLeaveCount); + } + + /*if(dwLifeTime > 3000) + { + SendToAP(Cli_CONNECT,meindex,0,NULL,NULL); + dwLifeTime = 0; + print("\nI'm life!!!!!"); + } + else dwLifeTime++;*/ + // NPC_WORK_START为1时计时五秒,超过五秒为time out + if(CHAR_getWorkInt(meindex,NPC_WORK_START) == 1) + { + tm.tv_sec = 0; + tm.tv_usec = 0; + FD_ZERO(&readfds); + FD_SET(g_nServiceSocket,&readfds); + // 检查AP有没有送讯息过来 + if(!select(g_nServiceSocket+1,&readfds,NULL,NULL,&tm)) + { + nTimeout = CHAR_getWorkInt(meindex,NPC_WORK_TIMEOUT); + CHAR_setWorkInt(meindex,NPC_WORK_TIMEOUT,++nTimeout); + return; + } + print("\nAP send message."); + + // 有送讯息过来接收讯息 + switch(GetMsg(meindex)) + { + //这个讯息不是给这个NPC + case 0: + print("Msg not send to this npc!!\n"); + nTimeout = CHAR_getWorkInt(meindex,NPC_WORK_TIMEOUT); + CHAR_setWorkInt(meindex,NPC_WORK_TIMEOUT,++nTimeout); + return; + case -1: break; //重新connect to ap + case -2: print("Msg buf is full!!\n"); break; // 讯息buffer用光了 + case -3: print("Msg data is wrong!!\n"); break; // 讯息内容错误 + case -4: print("calloc fail!!\n"); break; // 记忆体配置错失败 + case -5: print("\nAP send get I'm life"); break; // AP收到Cli_CONNECT的回应 + } + CHAR_setWorkInt(meindex,NPC_WORK_START,0); + } + } +} + +void NPC_StoneServiceManWindowTalked(int meindex,int talkerindex,int seqno,int select,char *data) +{ + int datanum = -1,i; + char *pUserid; + LPList Kill = NULL; + + makeStringFromEscaped(data); + datanum = atoi( data); + switch(seqno) + { + case CHAR_WINDOWTYPE_SERVICE_START: + if(datanum == 1) + { + CHAR_setWorkInt(meindex,NPC_WORK_STATE,SERVICE_STATE_3); + NPC_StoneServiceMan_selectWindow(meindex,talkerindex,2,-1); + } + else + if(datanum == 3) NPC_StoneServiceMan_selectWindow(meindex,talkerindex,3,-1); + break; + case CHAR_WINDOWTYPE_SERVICE_EXIT: + pUserid = CHAR_getChar(talkerindex,CHAR_CDKEY); + if(pUserid != NULL) SendToAP(Cli_CANCEL,meindex,1,pUserid,NULL); + CHAR_setWorkInt(meindex,NPC_WORK_FLAG1,1); + CHAR_setWorkInt(meindex,NPC_WORK_FLAG2,1); + CHAR_setWorkInt(meindex,NPC_WORK_FLAG3,1); + CHAR_setWorkInt(meindex,NPC_WORK_STATE,SERVICE_STATE_2); + CHAR_setWorkInt(meindex,NPC_WORK_START,0); + CHAR_setWorkInt(meindex,NPC_WORK_TIMEOUT,0); + CHAR_setWorkInt(meindex,NPC_WORK_TOINDEX,-1); + CHAR_setWorkInt(meindex,NPC_WORK_ISUSE,0); + CHAR_setWorkInt(meindex,NPC_WORK_LEAVE_COUNT,0); + CHAR_setWorkInt(meindex,NPC_WORK_SERIALNUM,-1); + //把之前收的有关这个NPC的讯息buf清空 + for(i=0;iNext != NULL) + { + g_APMsg[i].Data = g_APMsg[i].Data->Next; + if(Kill != NULL) free(Kill); + } + else + { + if(Kill != NULL) free(Kill); + break; + } + } + bzero(&g_APMsg[i],sizeof(Msg)); + } + } + } + break; + case CHAR_WINDOWTYPE_SERVICE_CONTINUE: + if(CHAR_getWorkInt(meindex,NPC_WORK_STATE) == SERVICE_STATE_1) + { + NPC_StoneServiceMan_selectWindow(meindex,talkerindex,0,-1); + } + if(CHAR_getWorkInt(meindex,NPC_WORK_STATE) == SERVICE_STATE_2) + { + NPC_StoneServiceMan_selectWindow(meindex,talkerindex,1,-1); + } + if(CHAR_getWorkInt(meindex,NPC_WORK_STATE) == SERVICE_STATE_3) + { + NPC_StoneServiceMan_selectWindow(meindex,talkerindex,2,-1); + } + break; + case CHAR_WINDOWTYPE_SERVICE_WAIT: + break; + default: + print("ERROR type\n"); + break; + } +} + +//送讯息到AP + +//nAid (Cli_????) nIndex (npc Index) nLen (後续资料笔数) Data1 (user cdkey) +int SendToAP(int nAid,int nIndex,int nLen,void *Data1,void *Data2) +{ + char buf[128]; + char *pData[2]; + int i,j,bufnum; + fd_set fdset; + struct timeval tmv; + int ret; + // Syu ADD 修正石器服务员星系确认 + char *sags=""; + if( strcmp ( getAccountservername() , "210.64.50.31") == 0 ) sags = "sags31"; //北斗 + if( strcmp ( getAccountservername() , "210.64.50.41") == 0 ) sags = "sags41"; //天神 + if( strcmp ( getAccountservername() , "210.64.50.51") == 0 ) sags = "sags51"; //太阳 + if( strcmp ( getAccountservername() , "210.64.50.61") == 0 ) sags = "sags61"; //紫微 + if( strcmp ( getAccountservername() , "210.64.50.71") == 0 ) sags = "sags71"; //苍龙 + if( strcmp ( getAccountservername() , "210.64.50.81") == 0 ) sags = "sags81"; //银河 + if( strcmp ( getAccountservername() , "210.64.50.91") == 0 ) sags = "sags91"; //天鹰 + if( strcmp ( getAccountservername() , "210.64.50.101") == 0 ) sags = "sags101"; //网路家庭 + if( strcmp ( getAccountservername() , "210.64.50.106") == 0 ) sags = "sags106"; //星乐园 + if( strcmp ( getAccountservername() , "210.64.50.111") == 0 ) sags = "sags111"; //圣兽 + if( strcmp ( getAccountservername() , "152.104.1.206") == 0 ) sags = "hkgs206"; //香港 + if( strcmp ( getAccountservername() , "202.134.122.130") == 0 ) sags = "hkgs130"; //新界 + + + bzero(buf,sizeof(buf)); + pData[0] = (char*)Data1; + pData[1] = (char*)Data2; + + // 以下为编码 + // 取得流水号 + nAid = GetSerialNum()*10+nAid; +// Syu ADD 修正石器服务员星系确认 + nLen=2; + + sprintf(buf,"&;%d;%d;%d;",nAid,nIndex,nLen); + CHAR_setWorkInt(nIndex,NPC_WORK_SERIALNUM,nAid/10); + if(nLen > 0) + { + // Syu ADD 修正石器服务员星系确认 + for(j = 0 ; j < 1 ; j++) + + { + for(i = strlen(buf) ; i < 128 ; i++) + { + if(*pData[j] == '\0') + break; + else if(*pData[j] == ';') + { + buf[i] = '\\'; + buf[++i] = ';'; + } + else if(*pData[j] == '\\') + { + buf[i] = '\\'; + buf[++i] = '\\'; + } + else if(*pData[j] == '&') + { + buf[i] = '\\'; + buf[++i] = '&'; + } + else buf[i] = *pData[j]; + pData[j]++; + } +// Syu ADD 修正石器服务员星系确认 + strcat(buf,";"); + strcat(buf,sags); + + buf[strlen(buf)] = ';'; + + } + } + else strcat(buf,"0;0;"); + + + memset(&buf[strlen(buf)],'&',sizeof(buf)-strlen(buf)); + + // 检查网路可不可以传送讯息 + FD_ZERO(&fdset); + FD_SET(g_nServiceSocket,&fdset); + tmv.tv_sec = tmv.tv_usec = 0; + ret = select(g_nServiceSocket + 1,(fd_set*)NULL,&fdset,(fd_set*)NULL,&tmv); + print("ret1=%d ",ret); + + + if(ret > 0) + { + // 送讯息到AP + print("\n**SendToAP**:[%s]",buf); + if((bufnum = write(g_nServiceSocket,buf,sizeof(buf))) < 0) + { + //与主机失去连线 + print("reconnect to server!\n"); + close(g_nServiceSocket); + flag = 1; + return 0; + } + print("\nSend %d bytes to AP.",bufnum); + + } + else + { + print("reconnect to server!\n"); + close(g_nServiceSocket); + flag = 1; + + return 0; + } + + return 1; +} + +//收到AP回应的讯息 +int RecvFromAP(int *nAid,int nIndex,int *nLen,LPList *Data) +{ + int i; + + for(i=0;iData = (LPList)calloc( 1,sizeof(List))) != NULL) + { + Msg->Data->Next = NULL; + tempList = Msg->Data; + break; + } + else return -4; + } + } + // 超过MAX_AP_MSG表示讯息栏都满了 + if(j == MAX_AP_MSG) return -2; + Msg->bIsUse = 1; + + // 以下为解码 + if(buf[i] == '&') + { + if(buf[++i] == ';') + { + bzero(temp[0] , sizeof(temp[0])); + bzero(temp[1] , sizeof(temp[1])); + bzero(temp[2] , sizeof(temp[2])); + for(j = 0 ; j < 3 ; j++) + { + p = strchr(&buf[i+1] , ';'); + strncpy(temp[j] , &buf[i+1] , p - (&buf[i+1])); + i += strlen(temp[j]) + 1; + } + Msg->nAid = atoi(temp[0]); + Msg->nIndex = atoi(temp[1]); + Msg->nLen = atoi(temp[2]); + // 如果收到的是AP_CONNECT不理这个讯息 + if(Msg->nAid%10 == AP_CONNECT) + { + free(Msg->Data); + bzero(Msg,sizeof(Msg)); + return -5; + } + j = 0; + + bzero(temp[0] , sizeof(temp[0])); + + if(Msg->nLen > 0) + { + while(buf[++i] != '\0') + { + switch(buf[i]) + { + case '\\': + switch(buf[i + 1]) + { + case ';': + case '&': + case '\\': + temp[0][j++] = buf[++i]; + break; + default: + temp[0][j++] = buf[i++]; + break; + } + break; + case ';': + j = 0; + strcpy(tempList->Data,temp[0]); + tempList->Next = (LPList)calloc( 1,sizeof(List)); + tempList = tempList->Next; + bzero(temp[0],sizeof(temp[0])); + break; + case '&': + buf[i--] = '\0'; + break; + default: + temp[0][j++] = buf[i]; + break; + } + } + tempList->Next = NULL; + // 如果这个讯息是给这个NPC return 1 + if(Msg->nIndex == meindex) return 1; + else return 0; + } + } + } + else return -3; + + return 1; +} + +int ConnectToAP(void) +{ + //make socket and connect to ap + if((g_nServiceSocket = socket(PF_INET,SOCK_STREAM,0)) < 0) + //if((g_nServiceSocket = socket(PF_INET,SOCK_DGRAM,0)) < 0) + { + print("can't create socket!\n"); + return 0; + } + bzero((char*)&server_sin , sizeof(server_sin)); + server_sin.sin_family = AF_INET; + server_sin.sin_port = htons(g_Port); + server_sin.sin_addr = inet_addr(g_ApID); + memcpy(&temp , &server_sin , sizeof(server_sin)); + if(connect(g_nServiceSocket,&temp,sizeof(temp)) < 0) + { +// print("connect server error: %s\n" , sys_errlist[errno]); + print("connect server error !!\n"); + print("ip:%s,port:%d\n",g_ApID,g_Port); + return 0; + } + else print("connect AP server success!\n"); + + return 1; +} + +//取得流水号 +int GetSerialNum(void) +{ + static int i = 0; + + if(++i > 65535) + { + i = 0; + } + return i; +} + +#endif diff --git a/gmsv/npc/npc_storyteller.c b/gmsv/npc/npc_storyteller.c new file mode 100644 index 0000000..c9a4385 --- /dev/null +++ b/gmsv/npc/npc_storyteller.c @@ -0,0 +1,68 @@ +#include "version.h" +#include "char.h" + +/* + + + 井凶曰屯[ + + 伉伉□旦 匹反2潘 及仇午分引[ + + NPCARGUMENT: 0分匀凶日仇午分引0}1分匀凶日仇午分引1及贿曰 [ + + 橇谪反3勾丐曰}赐卞褡垫允月[ + + 橇谪0“ 失奶玉伉件弘[仇及橇谪匹talk今木月午} + >方仁五凶}幻仆幻仆方[中井卞手}歹仄互鳗 及井凶曰屯元扎[=匹 + 橇谪1卞啖垫[ + 橇谪1“talk今木凶日} + >公卅凶互及冗戈卅日壬}熔午夫五井尹卞}雄 卅蜕昵毛夫午勾} 今内仃方丹[ + 公及蜕昵毛及冗戈井? yes/no=yes匹橇谪2尺[no匹 + >匹反}今日壬元扎[=匹橇谪0尺 + + 橇谪2“ talk今木凶日} + >公卅凶卞鳗 及蜕昵>幻仆幻仆=毛鳗噩仄凶[ 及勾亢卞 濠卅手及午仄化 + 域戏 濠卞允月屯仄[今日壬元扎[= + 午中匀化熔毛蛹日仄}蜕昵白仿弘毛馨笛允月[ + 匹橇谪0卞手升月[ + + + + + Talked: + + if( 卞反卅仄化井日1坌凶匀化中月井"){ + 橇谪0卞手升月[ + } + + switch(橇谪){ + case 0: 质 [橇谪1尺[break; + case 1: 质 [橇谪2尺[break; + case 2: 质 [橇谪0尺[break; + } + + } + + + + + + + + + + */ +BOOL NPC_StoryTellerInit( int meindex ) +{ + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPESTORYTELLER ); + CHAR_setFlg( meindex , CHAR_ISATTACKED , 0 ); + CHAR_setFlg( meindex , CHAR_ISOVERED , 0 ); + + return TRUE; +} + + +void NPC_StoryTellerTalked( int meindex , int talker , char *msg , int col ) +{ + +} diff --git a/gmsv/npc/npc_sysinfo.c b/gmsv/npc/npc_sysinfo.c new file mode 100644 index 0000000..f3648e5 --- /dev/null +++ b/gmsv/npc/npc_sysinfo.c @@ -0,0 +1,875 @@ +#include "version.h" +#include +#include "char.h" +#include "char_event.h" +#include "object.h" +#include "handletime.h" +#include "magic.h" +#include "npcutil.h" +#include "char_data.h" +#include "chatmagic.h" +#include "net.h" +#include "configfile.h" +#include "npcgen.h" + +/* +--------------------------------------------------------------------- +sysinfo By Kawata +--------------------------------------------------------------------- +*/ + +#define NPC_SYSINFO_MSGMAX 21 + +#define NPC_SYSINFO_PASSWD_DEFAULT "G00d1uck" + +#define NPC_SYSINFO_TIMELIMIT_DEFAULT 120 + +#define NPC_SYSINFO_SHUTDOWNLIMIT_DEFAULT 5 + +#define NPC_SYSINFO_SHUTDOWN_MSG "再过 %d 分钟後,即开始进行server系统维护。" + +#define NPC_SYSINFO_SHUTDOWN_MSG_COMP "server已关闭。" +enum { + CHAR_WORK_MODE = CHAR_NPCWORKINT1, + CHAR_WORK_TIME = CHAR_NPCWORKINT2, + CHAR_WORK_TIMELIMIT = CHAR_NPCWORKINT3, + CHAR_WORK_SHUTDOWNTIME = CHAR_NPCWORKINT4, + CHAR_WORK_SHUTDOWNLIMIT = CHAR_NPCWORKINT5, + CHAR_WORK_SHUTDOWNDSPTIME = CHAR_NPCWORKINT6, + CHAR_WORK_MSGCOLOR = CHAR_NPCWORKINT7, + CHAR_WORK_PLAYER = CHAR_NPCWORKINT8, +}; + +enum { + CHAR_WORKCHAR_PASSWD = CHAR_NPCWORKCHAR1, +}; +typedef struct { + char msg[16]; +}CMD_MSG; +CMD_MSG cmd_msg[] = { + { "startinfo"}, {"endinfo"}, {"help"}, + {"player"}, {"list"}, {"sendno"}, + {"sendmsg"}, {"shutdown"}, {"msgcol"}, + {"sysinfo"}, {"info"}, + { "allowaccept" } , { "denyaccept" } , + { "closeallsockets" }, + { "allnosee" }, + { "allnobody" }, + { "movenum" }, + { "bornnum" }, + { "enemystate" }, + { "setwalktime"},{ "setcatime" },{"setcdtime"}, + { "setoneloop"}, + { "titlerestart"}, + { "setsaacwrite"}, { "setsaacread"}, +}; +enum{ + NPC_SYSINFO_MSG_STARTINFO, + NPC_SYSINFO_MSG_ENDINFO, + NPC_SYSINFO_MSG_HELP, + NPC_SYSINFO_MSG_PLAYER, + NPC_SYSINFO_MSG_LIST, + NPC_SYSINFO_MSG_SENDNO, + NPC_SYSINFO_MSG_SENDMSG, + NPC_SYSINFO_MSG_SHUTDOWN, + NPC_SYSINFO_MSG_MSGCOL, + NPC_SYSINFO_MSG_SYSINFO, + NPC_SYSINFO_MSG_INFO, + NPC_SYSINFO_MSG_ALLOWACCEPT, + NPC_SYSINFO_MSG_DENYACCEPT, + NPC_SYSINFO_MSG_CLOSEALLSOCKETS, + + /* 错痊馨笛 */ + NPC_SYSINFO_ALL_NOSEE, + NPC_SYSINFO_ALL_NOBODY, + NPC_SYSINFO_MOVE_NUM, + NPC_SYSINFO_BORN_NUM, + NPC_SYSINFO_ENEMY_STATE, + NPC_SYSINFO_SETWALKTIME, + NPC_SYSINFO_SETCATIME, + NPC_SYSINFO_SETCDTIME, + NPC_SYSINFO_SETONELOOP, + NPC_SYSINFO_TITLERESTART, + NPC_SYSINFO_SETSAACWRITE, + NPC_SYSINFO_SETSAACREAD, + + NPC_SYSINFO_MSG_NUM, +}; + +typedef struct { + char arg[32]; + char defMsg[128]; +}NPC_Sysinfo_Msg; + +static NPC_Sysinfo_Msg msgtable[] = { + { "def_msg", "我拥有和全世界的人说话的能力。" }, + { "shutdown_msg", "现在开始要进行server系统维护请尽速logout!!"}, +}; +enum{ + NPC_SYSINFO_ARG_DEF_MSG, + NPC_SYSINFO_ARG_SHUTDOWN_MSG, +}; + + +static void NPC_Sysinfo_SendMsg( int meindex, int pindex, int tblnum); +static char *NPC_Sysinfo_GetMsg( int meindex, char *msgindexstr, + char *out,int outlen, int num ); +static void NPC_Sysinfo_SendMsgToAll( int meindex, char *msg); +static void NPC_Sysinfo_Msg_EndInfo( int meindex, int tindex, char *msg); +static void NPC_Sysinfo_Msg_Help( int meindex, int tindex, char *msg); +static void NPC_Sysinfo_Msg_Player( int meindex, int tindex, char *msg); +static void NPC_Sysinfo_Msg_List( int meindex, int tindex, char *msg); +static void NPC_Sysinfo_Msg_SendNo( int meindex, int tindex, char *msg); +static void NPC_Sysinfo_Msg_SendMsg( int meindex, int tindex, char *msg); +static void NPC_Sysinfo_Msg_Shutdown( int meindex, int tindex, char *msg); +static void NPC_Sysinfo_Msg_Msgcol( int meindex, int tindex, char *msg); + +/* 错痊馨笛 */ +static void NPC_Sysinfo_All_NoBody( int meindex, int tindex, char *msg); +static void NPC_Sysinfo_All_NoSee( int meindex, int tindex, char *msg); + +static void NPC_Sysinfo_Move_Num( int meindex, int tindex, char *msg); +static void NPC_Sysinfo_Born_Num( int meindex, int tindex, char *msg); +static void NPC_Sysinfo_Enemy_State( int meindex, int tindex, char *msg); +static void NPC_Sysinfo_SetWalkTime( int meindex, int tindex, char *msg); +static void NPC_Sysinfo_SetCATime( int meindex, int tindex, char *msg); +static void NPC_Sysinfo_SetCDTime( int meindex, int tindex, char *msg); +static void NPC_Sysinfo_SetOneloop( int meindex, int tindex, char *msg); +static void NPC_Sysinfo_TitleRestart( int meindex, int tindex, char *msg); +static void NPC_Sysinfo_SetSaacwrite( int meindex, int tindex, char *msg); +static void NPC_Sysinfo_SetSaacread( int meindex, int tindex, char *msg); + +static void NPC_Sysinfo_Msg_allowAccept(int meindex, int tindex, char*msg) +{ + SERVSTATE_SetAcceptMore( 1 ); + CHAR_talkToCli( tindex, meindex, "allowaccept OK.", CHAR_COLORYELLOW); +} +static void NPC_Sysinfo_Msg_denyAccept(int meindex, int tindex, char*msg) +{ + SERVSTATE_SetAcceptMore( 0 ); + CHAR_talkToCli( tindex, meindex, "denyaccept OK.", CHAR_COLORYELLOW); +} +static void NPC_Sysinfo_Msg_closeallsockets(int meindex, int tindex, + char*msg) +{ + CHAR_talkToCli( tindex, meindex, "closeallsockets OK.", CHAR_COLORYELLOW); + closeAllConnectionandSaveData(); +} +static void NPC_Sysinfo_Msg_Sysinfo(int meindex, int tindex, char*msg) +{ + CHAR_CHAT_DEBUG_sysinfo( tindex, msg); +} +static void NPC_Sysinfo_Msg_Info(int meindex, int tindex, char*msg) +{ + CHAR_CHAT_DEBUG_info( tindex, msg); +} + + +typedef void (*FUNC)(int,int,char *); +static FUNC functbl[] = { + NULL, + NPC_Sysinfo_Msg_EndInfo, + NPC_Sysinfo_Msg_Help, + NPC_Sysinfo_Msg_Player, + NPC_Sysinfo_Msg_List, + NPC_Sysinfo_Msg_SendNo, + NPC_Sysinfo_Msg_SendMsg, + NPC_Sysinfo_Msg_Shutdown, + NPC_Sysinfo_Msg_Msgcol, + NPC_Sysinfo_Msg_Sysinfo, + NPC_Sysinfo_Msg_Info, + NPC_Sysinfo_Msg_allowAccept, + NPC_Sysinfo_Msg_denyAccept, + NPC_Sysinfo_Msg_closeallsockets, + /* 错痊馨笛 */ + NPC_Sysinfo_All_NoSee, + NPC_Sysinfo_All_NoBody, + NPC_Sysinfo_Move_Num, + NPC_Sysinfo_Born_Num, + NPC_Sysinfo_Enemy_State, + NPC_Sysinfo_SetWalkTime, + NPC_Sysinfo_SetCATime, + NPC_Sysinfo_SetCDTime, + NPC_Sysinfo_SetOneloop, + NPC_Sysinfo_TitleRestart, + NPC_Sysinfo_SetSaacwrite, + NPC_Sysinfo_SetSaacread, + +}; + +/********************************* +* 赓渝质 +*********************************/ +BOOL NPC_SysinfoInit( int meindex ) +{ + int tmp; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buff[128]; + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + + /* 赓渝祭质 */ + + CHAR_setWorkInt( meindex, CHAR_WORK_MODE, 0); + + /* 由旦伐□玉本永玄 */ + if( NPC_Util_GetStrFromStrWithDelim( argstr, "passwd", buff, sizeof( buff)) + == NULL) + { + strcpy( buff, NPC_SYSINFO_PASSWD_DEFAULT); + } + CHAR_setWorkChar( meindex, CHAR_WORKCHAR_PASSWD, buff); + + + tmp = NPC_Util_GetNumFromStrWithDelim( argstr, "time"); + if( tmp == -1 ) tmp = NPC_SYSINFO_TIMELIMIT_DEFAULT; + CHAR_setWorkInt( meindex, CHAR_WORK_TIMELIMIT, tmp); + + /* 丢永本□斥及缙潸 */ + tmp = NPC_Util_GetNumFromStrWithDelim( argstr, "msg_col"); + if( tmp < CHAR_COLORRED || tmp > CHAR_COLORWHITE ) + tmp = CHAR_COLORYELLOW; + CHAR_setWorkInt( meindex, CHAR_WORK_MSGCOLOR, tmp); + + CHAR_setWorkInt( meindex, CHAR_WORK_PLAYER, -1); + CHAR_setWorkInt( meindex, CHAR_WORK_SHUTDOWNTIME, 0); + CHAR_setWorkInt( meindex, CHAR_WORK_SHUTDOWNDSPTIME, 0); + CHAR_setInt( meindex, CHAR_WHICHTYPE, CHAR_TYPEOTHERNPC); + CHAR_setFlg( meindex, CHAR_ISATTACKED, 0); + + return TRUE; +} + +/********************************* +* Loop质 +**********************************/ +void NPC_SysinfoLoop( int meindex ) +{ + int shuttime; + if( CHAR_getWorkInt( meindex, CHAR_WORK_MODE) == 1) { + int oldtime; + /* 凛棉毛褡户月 */ + oldtime = CHAR_getWorkInt( meindex, CHAR_WORK_TIME); + /* 孺蜃凛棉左□田□匹骚橘乒□玉尺 */ + if( NowTime.tv_sec - oldtime > + CHAR_getWorkInt( meindex, CHAR_WORK_TIMELIMIT)) + { + CHAR_setWorkInt( meindex, CHAR_WORK_MODE, 0); + CHAR_setWorkInt( meindex, CHAR_WORK_PLAYER, -1); + } + } + shuttime = CHAR_getWorkInt( meindex, CHAR_WORK_SHUTDOWNTIME); + /* shutdown凛棉民尼永弁 */ + if( shuttime > 0 ) { + int diff,limit,hun; + + diff = NowTime.tv_sec - shuttime; + limit = CHAR_getWorkInt( meindex, CHAR_WORK_SHUTDOWNLIMIT); + hun = limit - (diff/60); + /* ㄠ坌云五卞丢永本□斥 */ + if( hun != CHAR_getWorkInt( meindex, CHAR_WORK_SHUTDOWNDSPTIME)){ + char buff[256]; + if( hun != 0 ) { + snprintf( buff, sizeof(buff), NPC_SYSINFO_SHUTDOWN_MSG, hun); + } + else { + strcpy( buff, NPC_SYSINFO_SHUTDOWN_MSG_COMP); + } + NPC_Sysinfo_SendMsgToAll( meindex, buff); + CHAR_setWorkInt( meindex, CHAR_WORK_SHUTDOWNDSPTIME, hun); + } + if( hun == 0) { + CHAR_setWorkInt( meindex, CHAR_WORK_SHUTDOWNDSPTIME,0); + CHAR_setWorkInt( meindex, CHAR_WORK_SHUTDOWNLIMIT,0); + CHAR_setWorkInt( meindex, CHAR_WORK_SHUTDOWNTIME,0); + } + } +} +/********************************* +* 井仃日木凶凛及质 +**********************************/ +void NPC_SysinfoTalked( int meindex, int tindex, char *msg, int color) +{ + char *msgwk; + char *buff; + int len; + int msgno; + + len = strlen( msg)+1; + msgwk = calloc( 1, sizeof(char)*len); + buff = calloc( 1, sizeof(char)*len); + strcpy( msgwk, msg); + /* 旦矢□旦毛引午户月 */ + deleteSequentChar( msgwk, " "); + if( CHAR_getWorkInt( meindex, CHAR_WORK_MODE) == 0 ) { + msgno = 0; + if( strncmp( msgwk, cmd_msg[NPC_SYSINFO_MSG_STARTINFO].msg, + strlen( cmd_msg[NPC_SYSINFO_MSG_STARTINFO].msg)) == 0) + { + if( getStringFromIndexWithDelim( msgwk, " ", 2, buff, len) + == TRUE ) + { + if( strcmp( buff, CHAR_getWorkChar( meindex, CHAR_WORKCHAR_PASSWD)) + == 0 ) + { + CHAR_setWorkInt( meindex, CHAR_WORK_MODE, 1); + CHAR_setWorkInt( meindex, CHAR_WORK_PLAYER, tindex); + CHAR_setWorkInt( meindex, CHAR_WORK_TIME, NowTime.tv_sec); + CHAR_talkToCli( tindex, meindex, + "已移到指令模式。按下help即会出现说明档。", + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + CHAR_talkToCli( tindex, meindex, + "可以在enemystate 中了解敌人的产生和行动数。", + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + + } + } + } + if( CHAR_getWorkInt( meindex, CHAR_WORK_MODE ) == 0 ) { + NPC_Sysinfo_SendMsg( meindex, tindex, NPC_SYSINFO_ARG_DEF_MSG); + } + } + else { + /* 戊穴件玉乒□玉卞仄凶谛仄井质 匹五卅中 */ + if( tindex == CHAR_getWorkInt( meindex, CHAR_WORK_PLAYER)) { + int i; + /* 公木冗木质 蕊曰坌仃 */ + for( i = NPC_SYSINFO_MSG_ENDINFO; i < NPC_SYSINFO_MSG_NUM; i ++ ) { + if( strncmp( msgwk, cmd_msg[i].msg, strlen( cmd_msg[i].msg)) == 0) { + if( functbl[i] != NULL ) { + functbl[i]( meindex, tindex, msgwk); + } + break; + } + } + CHAR_setWorkInt( meindex, CHAR_WORK_TIME, NowTime.tv_sec); + } + else { + NPC_Sysinfo_SendMsg( meindex, tindex, NPC_SYSINFO_ARG_DEF_MSG); + } + } + free( msgwk); + free( buff); +} +/*------------------------------------------------------------------------ + * 骚橘乒□玉尺 + *----------------------------------------------------------------------*/ +static void NPC_Sysinfo_Msg_EndInfo( int meindex, int tindex, char *msg) +{ + CHAR_setWorkInt( meindex, CHAR_WORK_MODE, 0); + CHAR_setWorkInt( meindex, CHAR_WORK_PLAYER, -1); + CHAR_talkToCli( tindex, meindex, + "已移到一般模式", + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + +} +/*------------------------------------------------------------------------ + * HELP丢永本□斥 + *----------------------------------------------------------------------*/ +static void NPC_Sysinfo_Msg_Help( int meindex, int tindex, char *msg) +{ + int i; + typedef struct { + char str[512]; + }SYSINFO_MSGWK; + SYSINFO_MSGWK msgwk[] = { + { "指令HELP"}, + { "help 此项讯息。"}, + { "player 表示现在LOGIN的玩家人数。"}, + { "list 讯息一览。"}, + { "send number 「number」 是数值。指定讯息的号码後将该讯息内容传送给全部的玩家。"}, + { "sendmsg msgs msgs为想传送的讯息。在send 之後空一格,即可将之後的文章送信给全部的玩家。"}, + { "shutdown min min 代表分。"}, + { "msgcol col 设定传送给玩家讯息的颜色。颜色的指定有red,green,yellow,blue,purple,cyan,white。"}, + { "sysinfo 系统状态"}, + { "info 玩家状态"}, + { "endinfo 回复普通的状态。"}, + { "denyaccept 无法接受CLIENT端的接续。"}, + { "allowaccept 接受CLIENT端的接续。"}, + { "closeallsockets 强迫让CLIENT端LOGOUT。在内部实行denyaccept。"}, + { "titlerestart 再次读取称号名的设定。"}, + { "enemystate 说明NPC的状况。"}, + { ""}, + }; + + for( i = 0; msgwk[i].str[0] != '\0'; i ++ ) { + CHAR_talkToCli( tindex, meindex, msgwk[i].str, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + } +} +/*------------------------------------------------------------------------ + * 皿伊奶乩□及醒毛譬屯月 + *----------------------------------------------------------------------*/ +static void NPC_Sysinfo_Msg_Player( int meindex, int tindex, char *msg) +{ + int i, cnt = 0; + int playernum=CHAR_getPlayerMaxNum(); + char buff[64]; + for( i=0 ; i=1 && num < NPC_SYSINFO_MSGMAX ) { + if( NPC_Sysinfo_GetMsg( meindex, "sendno", msgbuf, + sizeof( msgbuf), num) != NULL ) + { + NPC_Sysinfo_SendMsgToAll( meindex, msgbuf); + } + } + } +} +/*------------------------------------------------------------------------ + * 隙烂今木凶丢永本□斥 侬 毛霜耨允月 + *----------------------------------------------------------------------*/ +static void NPC_Sysinfo_Msg_SendMsg( int meindex, int tindex, char *msg) +{ + char buff[512]; + + if( getStringFromIndexWithDelim( msg, " ", 2, buff, sizeof( buff)) == TRUE ) + { + NPC_Sysinfo_SendMsgToAll( meindex, buff); + } +} +/*------------------------------------------------------------------------ + * 丢永本□斥市仿□毛 凳允月 + *----------------------------------------------------------------------*/ +static void NPC_Sysinfo_Msg_Msgcol( int meindex, int tindex, char *msg) +{ + char buff[64]; + typedef struct { + int color; + char str[10]; + }SYSINFO_COLSET; + SYSINFO_COLSET colset[] = { + { 249, "red"}, + { 250, "green"}, + { 251, "yellow"}, + { 252, "blue"}, + { 253, "purple"}, + { 254, "cyan"}, + { 255, "white"}, + }; + + if( getStringFromIndexWithDelim( msg, " ", 2, buff, sizeof( buff)) == TRUE ) + { + int i; + for( i = 0; i < 7; i ++ ) { + if( strstr( buff, colset[i].str) != NULL ) { + CHAR_setWorkInt( meindex, CHAR_WORK_MSGCOLOR, colset[i].color); + CHAR_talkToCli( tindex, meindex, "已改变讯息的颜色。", + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + break; + } + } + } +} +/*------------------------------------------------------------------------ + * 娄醒井日丢永本□斥毛潸 允月 + *----------------------------------------------------------------------*/ +static char *NPC_Sysinfo_GetMsg( int meindex, char *msgindexstr, + char *out,int outlen, int num ) +{ + + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char *work; + char *buff; + char *cret = NULL; + int worklen; + + worklen = strlen( msgindexstr)+3; + work = (char *)calloc( 1, worklen * sizeof( char)); + buff = (char *)calloc( 1, outlen * sizeof( char)); + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + + snprintf( work, worklen, "%s%d", msgindexstr, num); + if( NPC_Util_GetStrFromStrWithDelim( argstr, work, + buff, outlen) != NULL ) + { + strcpy( out, buff); + cret = out; + } + + free( work); + free( buff); + return( cret); +} +/*------------------------------------------------------------------------ + * shutdown丢永本□斥质 + *----------------------------------------------------------------------*/ +static void NPC_Sysinfo_Msg_Shutdown( int meindex, int tindex, char *msg) +{ + char buff[10]; + int hun; + + /* 赓及丢永本□斥霜耨 */ + NPC_Sysinfo_SendMsg( meindex, tindex, NPC_SYSINFO_ARG_SHUTDOWN_MSG); + /* 凛棉本永玄 */ + CHAR_setWorkInt( meindex, CHAR_WORK_SHUTDOWNTIME, NowTime.tv_sec); + /* 孺蜃凛棉潸 */ + if( getStringFromIndexWithDelim( msg, " ", 2, buff, sizeof( buff)) == TRUE ) + { + hun = atoi( buff); + if( hun <= 0 ) { + hun = NPC_SYSINFO_SHUTDOWNLIMIT_DEFAULT; + } + } + else { + hun = NPC_SYSINFO_SHUTDOWNLIMIT_DEFAULT; + } + + CHAR_setWorkInt( meindex, CHAR_WORK_SHUTDOWNLIMIT, hun); + + CHAR_setWorkInt( meindex, CHAR_WORK_SHUTDOWNDSPTIME,0); +} +/*------------------------------------------------------------------------ + * 丢永本□斥毛霜月 娄醒井日丢永本□斥毛潸 + *----------------------------------------------------------------------*/ +static void NPC_Sysinfo_SendMsg( int meindex, int pindex, int tblnum) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buff[128]; + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + if( NPC_Util_GetStrFromStrWithDelim( argstr, msgtable[tblnum].arg, + buff, sizeof( buff)) == NULL ) + { + strcpy( buff, msgtable[tblnum].defMsg); + } + if( buff[0] != '\0' ) { + CHAR_talkToCli( pindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + } +} +/*------------------------------------------------------------------------ + * 蝈化及谛卞丢永本□斥毛霜月[ + *----------------------------------------------------------------------*/ +static void NPC_Sysinfo_SendMsgToAll( int meindex, char *msg) +{ + int i; + int playernum = CHAR_getPlayerMaxNum(); + + for( i = 0 ; i < playernum ; i++) { + if( CHAR_getCharUse(i) != FALSE ) { + CHAR_talkToCli( i, meindex, msg, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + } + } +} + + + +/* 蝈衬平乓仿毛 NO_SEE 卞允月井升丹井 */ +static void NPC_Sysinfo_All_NoSee( int meindex, int tindex, char *msg ){ + char buff[256]; + + buff[0] = buff[1] = 0; + /* 孺蜃凛棉潸 */ + if( getStringFromIndexWithDelim( msg, " ", 2, buff, sizeof( buff)) == TRUE ) + { + /* 卞允月桦宁 */ + if( strncmp( buff, "on", strlen( buff ) ) == 0 ){ + all_nosee = 1; + snprintf( buff, sizeof( buff), "已开启all_nosee 。" ); + CHAR_talkToCli( tindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + }else + /* 卞允月桦宁 */ + if( strncmp( buff, "off", strlen( buff ) ) == 0 ){ + all_nosee = 0; + snprintf( buff, sizeof( buff), "已关闭all_nosee 。" ); + CHAR_talkToCli( tindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + } + }else + if( all_nosee == 0 ){ + snprintf( buff, sizeof( buff), "all_nosee关闭着。" ); + CHAR_talkToCli( tindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + }else{ + snprintf( buff, sizeof( buff), "all_nosee开启着。" ); + CHAR_talkToCli( tindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + } +} + +/* 蝈衬平乓仿毛 NO_BODY 卞允月井升丹井 */ +static void NPC_Sysinfo_All_NoBody( int meindex, int tindex, char *msg ){ + char buff[256]; + + buff[0] = buff[1] = 0; + /* 孺蜃凛棉潸 */ + if( getStringFromIndexWithDelim( msg, " ", 2, buff, sizeof( buff)) == TRUE ) + { + /* 卞允月桦宁 */ + if( strncmp( buff, "on", strlen( buff ) ) == 0 ){ + all_nobody = 1; + snprintf( buff, sizeof( buff), "已开启all_nobody 。" ); + CHAR_talkToCli( tindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + }else + /* 卞允月桦宁 */ + if( strncmp( buff, "off", strlen( buff ) ) == 0 ){ + all_nobody = 0; + snprintf( buff, sizeof( buff), "已关闭all_nobody 。" ); + CHAR_talkToCli( tindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + } + }else + if( all_nobody == 0 ){ + snprintf( buff, sizeof( buff), "all_nobody 关闭着。" ); + CHAR_talkToCli( tindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + }else{ + snprintf( buff, sizeof( buff), "all_nobody 开启着。" ); + CHAR_talkToCli( tindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + } +} + + +/* 蝈衬平乓仿毛 ㄠ伙□皿匹窒 综今六月井" */ +static void NPC_Sysinfo_Move_Num( int meindex, int tindex, char *msg ){ + char buff[256]; + int work; + buff[0] = buff[1] = 0; + + /* 孺蜃凛棉潸 */ + if( getStringFromIndexWithDelim( msg, " ", 2, buff, sizeof( buff)) == TRUE ) + { + work = atoi( buff ); + if( work <= 0 ) { + work = 1000; /* 赝癫 */ + } + /* 凛卞仇木分仃 井仄引允 */ + EnemyMoveNum = work; + snprintf( buff, sizeof( buff), "让敌人同时%d动作。", + EnemyMoveNum ); + CHAR_talkToCli( tindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + }else{ + snprintf( buff, sizeof( buff), "现在敌人同时在进行%d动作。", + EnemyMoveNum ); + CHAR_talkToCli( tindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + } +} + + + +/* 衬平乓仿毛ㄠ伙□皿匹窒 嫖戏心请允井 */ +static void NPC_Sysinfo_Born_Num( int meindex, int tindex, char *msg ){ + char buff[256]; + int work; + buff[0] = buff[1] = 0; + + /* 孺蜃凛棉潸 */ + if( getStringFromIndexWithDelim( msg, " ", 2, buff, sizeof( buff)) == TRUE ) + { + work = atoi( buff ); + if( work <= 0 ) { + work = 2; /* 赝癫 */ + } + /* 凛卞仇木分仃戏心请仄引允 */ + one_loop_born = work; + snprintf( buff, sizeof( buff), "敌人同时派出最高的%d。", + one_loop_born ); + CHAR_talkToCli( tindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + }else{ + snprintf( buff, sizeof( buff), "现在敌人同时派出最高的%d。", + one_loop_born ); + CHAR_talkToCli( tindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + } +} + + + +/* 蜇箕及 平平乓仿橇谪毛苇月 */ +static void NPC_Sysinfo_Enemy_State( int meindex, int tindex, char *msg ){ + char buff[256]; + + if( all_nobody == 0 ){ + snprintf( buff, sizeof( buff), "allnobody 关闭着。" ); + CHAR_talkToCli( tindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + }else{ + snprintf( buff, sizeof( buff), "allnobody 开启着。" ); + CHAR_talkToCli( tindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + } + if( all_nosee == 0 ){ + snprintf( buff, sizeof( buff), "allnosee 关闭着。" ); + CHAR_talkToCli( tindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + }else{ + snprintf( buff, sizeof( buff), "allnosee 开启着。" ); + CHAR_talkToCli( tindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + } + snprintf( buff, sizeof( buff), + "bornnum 现在敌人同时派出最高的%d。", + one_loop_born ); + CHAR_talkToCli( tindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + + snprintf( buff, sizeof( buff), + "movenum 现在敌人同时在进行%d动作。", + EnemyMoveNum ); + CHAR_talkToCli( tindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + + +} +static void NPC_Sysinfo_SetWalkTime( int meindex, int tindex, char *msg) +{ + int interval; + char msgbuf[256]; + char buff[256]; + if( getStringFromIndexWithDelim( msg, " ", 2, buff, sizeof( buff)) == TRUE ) { + interval = atoi( buff); + if( interval > 0 ) { + setWalksendinterval( (unsigned)interval); + } + } + snprintf( msgbuf, sizeof(msgbuf),"WalkInterval = %d 秒",getWalksendinterval()); + CHAR_talkToCli( tindex, meindex, msgbuf, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + +} +static void NPC_Sysinfo_SetCATime( int meindex, int tindex, char *msg) +{ + int interval; + char msgbuf[256]; + char buff[256]; + if( getStringFromIndexWithDelim( msg, " ", 2, buff, sizeof( buff)) == TRUE ) { + interval = atoi( buff); + if( interval > 0 ) { + setCAsendinterval_ms( (unsigned)interval); + } + } + snprintf( msgbuf, sizeof(msgbuf),"CAsendInterval = %d 秒", + getCAsendinterval_ms()); + CHAR_talkToCli( tindex, meindex, msgbuf, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); +} +static void NPC_Sysinfo_SetCDTime( int meindex, int tindex, char *msg) +{ + int interval; + char msgbuf[256]; + char buff[256]; + if( getStringFromIndexWithDelim( msg, " ", 2, buff, sizeof( buff)) == TRUE ) { + interval = atoi( buff); + if( interval > 0 ) { + setCDsendinterval_ms( (unsigned)interval); + } + } + snprintf( msgbuf, sizeof(msgbuf),"CDsendInterval = %d 秒", + getCDsendinterval_ms()); + CHAR_talkToCli( tindex, meindex, msgbuf, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); +} +static void NPC_Sysinfo_SetOneloop( int meindex, int tindex, char *msg) +{ + int interval; + char msgbuf[256]; + char buff[256]; + if( getStringFromIndexWithDelim( msg, " ", 2, buff, sizeof( buff)) == TRUE ) { + interval = atoi( buff); + if( interval > 0 ) { + setOnelooptime_ms( (unsigned)interval); + } + } + snprintf( msgbuf, sizeof(msgbuf),"Onelooptime = %d 秒", + getOnelooptime_ms()); + CHAR_talkToCli( tindex, meindex, msgbuf, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); +} +static void NPC_Sysinfo_TitleRestart( int meindex, int tindex, char *msg) +{ + int rc; + char msgbuf[256]; + + rc = TITLE_reinitTitleName(); + if( rc) { + snprintf( msgbuf, sizeof(msgbuf),"读取完毕。" ); + } + else { + snprintf( msgbuf, sizeof(msgbuf),"发生ERROR。" ); + } + CHAR_talkToCli( tindex, meindex, msgbuf, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); +} + + +static void NPC_Sysinfo_SetSaacwrite( int meindex, int tindex, char *msg) +{ + int interval; + char msgbuf[256]; + char buff[256]; + if( getStringFromIndexWithDelim( msg, " ", 2, buff, sizeof( buff)) == TRUE ) { + interval = atoi( buff); + if( interval > 0 ) { + setSaacwritenum( (unsigned)interval); + } + } + snprintf( msgbuf, sizeof(msgbuf),"Saacwritenum = %d ",getSaacwritenum()); + CHAR_talkToCli( tindex, meindex, msgbuf, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); +} +static void NPC_Sysinfo_SetSaacread( int meindex, int tindex, char *msg) +{ + int interval; + char msgbuf[256]; + char buff[256]; + if( getStringFromIndexWithDelim( msg, " ", 2, buff, sizeof( buff)) == TRUE ) { + interval = atoi( buff); + if( interval > 0 ) { + setSaacreadnum( (unsigned)interval); + } + } + snprintf( msgbuf, sizeof(msgbuf),"Saacreadnum = %d ",getSaacreadnum()); + CHAR_talkToCli( tindex, meindex, msgbuf, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); +} diff --git a/gmsv/npc/npc_sysinfo.c.bak b/gmsv/npc/npc_sysinfo.c.bak new file mode 100644 index 0000000..36e46a9 --- /dev/null +++ b/gmsv/npc/npc_sysinfo.c.bak @@ -0,0 +1,876 @@ +#include "version.h" +#include + +#include "char.h" +#include "char_event.h" +#include "object.h" +#include "handletime.h" +#include "magic.h" +#include "npcutil.h" +#include "char_data.h" +#include "chatmagic.h" +#include "net.h" +#include "configfile.h" +#include "npcgen.h" + +/* +--------------------------------------------------------------------- +sysinfo By Kawata +--------------------------------------------------------------------- +*/ + +#define NPC_SYSINFO_MSGMAX 21 + +#define NPC_SYSINFO_PASSWD_DEFAULT "G00d1uck" + +#define NPC_SYSINFO_TIMELIMIT_DEFAULT 120 + +#define NPC_SYSINFO_SHUTDOWNLIMIT_DEFAULT 5 + +#define NPC_SYSINFO_SHUTDOWN_MSG "再过 %d 分钟後,即开始进行server系统维护。" + +#define NPC_SYSINFO_SHUTDOWN_MSG_COMP "server已关闭。" +enum { + CHAR_WORK_MODE = CHAR_NPCWORKINT1, + CHAR_WORK_TIME = CHAR_NPCWORKINT2, + CHAR_WORK_TIMELIMIT = CHAR_NPCWORKINT3, + CHAR_WORK_SHUTDOWNTIME = CHAR_NPCWORKINT4, + CHAR_WORK_SHUTDOWNLIMIT = CHAR_NPCWORKINT5, + CHAR_WORK_SHUTDOWNDSPTIME = CHAR_NPCWORKINT6, + CHAR_WORK_MSGCOLOR = CHAR_NPCWORKINT7, + CHAR_WORK_PLAYER = CHAR_NPCWORKINT8, +}; + +enum { + CHAR_WORKCHAR_PASSWD = CHAR_NPCWORKCHAR1, +}; +typedef struct { + char msg[16]; +}CMD_MSG; +CMD_MSG cmd_msg[] = { + { "startinfo"}, {"endinfo"}, {"help"}, + {"player"}, {"list"}, {"sendno"}, + {"sendmsg"}, {"shutdown"}, {"msgcol"}, + {"sysinfo"}, {"info"}, + { "allowaccept" } , { "denyaccept" } , + { "closeallsockets" }, + { "allnosee" }, + { "allnobody" }, + { "movenum" }, + { "bornnum" }, + { "enemystate" }, + { "setwalktime"},{ "setcatime" },{"setcdtime"}, + { "setoneloop"}, + { "titlerestart"}, + { "setsaacwrite"}, { "setsaacread"}, +}; +enum{ + NPC_SYSINFO_MSG_STARTINFO, + NPC_SYSINFO_MSG_ENDINFO, + NPC_SYSINFO_MSG_HELP, + NPC_SYSINFO_MSG_PLAYER, + NPC_SYSINFO_MSG_LIST, + NPC_SYSINFO_MSG_SENDNO, + NPC_SYSINFO_MSG_SENDMSG, + NPC_SYSINFO_MSG_SHUTDOWN, + NPC_SYSINFO_MSG_MSGCOL, + NPC_SYSINFO_MSG_SYSINFO, + NPC_SYSINFO_MSG_INFO, + NPC_SYSINFO_MSG_ALLOWACCEPT, + NPC_SYSINFO_MSG_DENYACCEPT, + NPC_SYSINFO_MSG_CLOSEALLSOCKETS, + + /* 错痊馨笛 */ + NPC_SYSINFO_ALL_NOSEE, + NPC_SYSINFO_ALL_NOBODY, + NPC_SYSINFO_MOVE_NUM, + NPC_SYSINFO_BORN_NUM, + NPC_SYSINFO_ENEMY_STATE, + NPC_SYSINFO_SETWALKTIME, + NPC_SYSINFO_SETCATIME, + NPC_SYSINFO_SETCDTIME, + NPC_SYSINFO_SETONELOOP, + NPC_SYSINFO_TITLERESTART, + NPC_SYSINFO_SETSAACWRITE, + NPC_SYSINFO_SETSAACREAD, + + NPC_SYSINFO_MSG_NUM, +}; + +typedef struct { + char arg[32]; + char defMsg[128]; +}NPC_Sysinfo_Msg; + +static NPC_Sysinfo_Msg msgtable[] = { + { "def_msg", "我拥有和全世界的人说话的能力。" }, + { "shutdown_msg", "现在开始要进行server系统维护请尽速logout!!"}, +}; +enum{ + NPC_SYSINFO_ARG_DEF_MSG, + NPC_SYSINFO_ARG_SHUTDOWN_MSG, +}; + + +static void NPC_Sysinfo_SendMsg( int meindex, int pindex, int tblnum); +static char *NPC_Sysinfo_GetMsg( int meindex, char *msgindexstr, + char *out,int outlen, int num ); +static void NPC_Sysinfo_SendMsgToAll( int meindex, char *msg); +static void NPC_Sysinfo_Msg_EndInfo( int meindex, int tindex, char *msg); +static void NPC_Sysinfo_Msg_Help( int meindex, int tindex, char *msg); +static void NPC_Sysinfo_Msg_Player( int meindex, int tindex, char *msg); +static void NPC_Sysinfo_Msg_List( int meindex, int tindex, char *msg); +static void NPC_Sysinfo_Msg_SendNo( int meindex, int tindex, char *msg); +static void NPC_Sysinfo_Msg_SendMsg( int meindex, int tindex, char *msg); +static void NPC_Sysinfo_Msg_Shutdown( int meindex, int tindex, char *msg); +static void NPC_Sysinfo_Msg_Msgcol( int meindex, int tindex, char *msg); + +/* 错痊馨笛 */ +static void NPC_Sysinfo_All_NoBody( int meindex, int tindex, char *msg); +static void NPC_Sysinfo_All_NoSee( int meindex, int tindex, char *msg); + +static void NPC_Sysinfo_Move_Num( int meindex, int tindex, char *msg); +static void NPC_Sysinfo_Born_Num( int meindex, int tindex, char *msg); +static void NPC_Sysinfo_Enemy_State( int meindex, int tindex, char *msg); +static void NPC_Sysinfo_SetWalkTime( int meindex, int tindex, char *msg); +static void NPC_Sysinfo_SetCATime( int meindex, int tindex, char *msg); +static void NPC_Sysinfo_SetCDTime( int meindex, int tindex, char *msg); +static void NPC_Sysinfo_SetOneloop( int meindex, int tindex, char *msg); +static void NPC_Sysinfo_TitleRestart( int meindex, int tindex, char *msg); +static void NPC_Sysinfo_SetSaacwrite( int meindex, int tindex, char *msg); +static void NPC_Sysinfo_SetSaacread( int meindex, int tindex, char *msg); + +static void NPC_Sysinfo_Msg_allowAccept(int meindex, int tindex, char*msg) +{ + SERVSTATE_SetAcceptMore( 1 ); + CHAR_talkToCli( tindex, meindex, "allowaccept OK.", CHAR_COLORYELLOW); +} +static void NPC_Sysinfo_Msg_denyAccept(int meindex, int tindex, char*msg) +{ + SERVSTATE_SetAcceptMore( 0 ); + CHAR_talkToCli( tindex, meindex, "denyaccept OK.", CHAR_COLORYELLOW); +} +static void NPC_Sysinfo_Msg_closeallsockets(int meindex, int tindex, + char*msg) +{ + CHAR_talkToCli( tindex, meindex, "closeallsockets OK.", CHAR_COLORYELLOW); + closeAllConnectionandSaveData(); +} +static void NPC_Sysinfo_Msg_Sysinfo(int meindex, int tindex, char*msg) +{ + CHAR_CHAT_DEBUG_sysinfo( tindex, msg); +} +static void NPC_Sysinfo_Msg_Info(int meindex, int tindex, char*msg) +{ + CHAR_CHAT_DEBUG_info( tindex, msg); +} + + +typedef void (*FUNC)(int,int,char *); +static FUNC functbl[] = { + NULL, + NPC_Sysinfo_Msg_EndInfo, + NPC_Sysinfo_Msg_Help, + NPC_Sysinfo_Msg_Player, + NPC_Sysinfo_Msg_List, + NPC_Sysinfo_Msg_SendNo, + NPC_Sysinfo_Msg_SendMsg, + NPC_Sysinfo_Msg_Shutdown, + NPC_Sysinfo_Msg_Msgcol, + NPC_Sysinfo_Msg_Sysinfo, + NPC_Sysinfo_Msg_Info, + NPC_Sysinfo_Msg_allowAccept, + NPC_Sysinfo_Msg_denyAccept, + NPC_Sysinfo_Msg_closeallsockets, + /* 错痊馨笛 */ + NPC_Sysinfo_All_NoSee, + NPC_Sysinfo_All_NoBody, + NPC_Sysinfo_Move_Num, + NPC_Sysinfo_Born_Num, + NPC_Sysinfo_Enemy_State, + NPC_Sysinfo_SetWalkTime, + NPC_Sysinfo_SetCATime, + NPC_Sysinfo_SetCDTime, + NPC_Sysinfo_SetOneloop, + NPC_Sysinfo_TitleRestart, + NPC_Sysinfo_SetSaacwrite, + NPC_Sysinfo_SetSaacread, + +}; + +/********************************* +* 赓渝质 +*********************************/ +BOOL NPC_SysinfoInit( int meindex ) +{ + int tmp; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buff[128]; + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + + /* 赓渝祭质 */ + + CHAR_setWorkInt( meindex, CHAR_WORK_MODE, 0); + + /* 由旦伐□玉本永玄 */ + if( NPC_Util_GetStrFromStrWithDelim( argstr, "passwd", buff, sizeof( buff)) + == NULL) + { + strcpy( buff, NPC_SYSINFO_PASSWD_DEFAULT); + } + CHAR_setWorkChar( meindex, CHAR_WORKCHAR_PASSWD, buff); + + + tmp = NPC_Util_GetNumFromStrWithDelim( argstr, "time"); + if( tmp == -1 ) tmp = NPC_SYSINFO_TIMELIMIT_DEFAULT; + CHAR_setWorkInt( meindex, CHAR_WORK_TIMELIMIT, tmp); + + /* 丢永本□斥及缙潸 */ + tmp = NPC_Util_GetNumFromStrWithDelim( argstr, "msg_col"); + if( tmp < CHAR_COLORRED || tmp > CHAR_COLORWHITE ) + tmp = CHAR_COLORYELLOW; + CHAR_setWorkInt( meindex, CHAR_WORK_MSGCOLOR, tmp); + + CHAR_setWorkInt( meindex, CHAR_WORK_PLAYER, -1); + CHAR_setWorkInt( meindex, CHAR_WORK_SHUTDOWNTIME, 0); + CHAR_setWorkInt( meindex, CHAR_WORK_SHUTDOWNDSPTIME, 0); + CHAR_setInt( meindex, CHAR_WHICHTYPE, CHAR_TYPEOTHERNPC); + CHAR_setFlg( meindex, CHAR_ISATTACKED, 0); + + return TRUE; +} + +/********************************* +* Loop质 +**********************************/ +void NPC_SysinfoLoop( int meindex ) +{ + int shuttime; + if( CHAR_getWorkInt( meindex, CHAR_WORK_MODE) == 1) { + int oldtime; + /* 凛棉毛褡户月 */ + oldtime = CHAR_getWorkInt( meindex, CHAR_WORK_TIME); + /* 孺蜃凛棉左□田□匹骚橘乒□玉尺 */ + if( NowTime.tv_sec - oldtime > + CHAR_getWorkInt( meindex, CHAR_WORK_TIMELIMIT)) + { + CHAR_setWorkInt( meindex, CHAR_WORK_MODE, 0); + CHAR_setWorkInt( meindex, CHAR_WORK_PLAYER, -1); + } + } + shuttime = CHAR_getWorkInt( meindex, CHAR_WORK_SHUTDOWNTIME); + /* shutdown凛棉民尼永弁 */ + if( shuttime > 0 ) { + int diff,limit,hun; + + diff = NowTime.tv_sec - shuttime; + limit = CHAR_getWorkInt( meindex, CHAR_WORK_SHUTDOWNLIMIT); + hun = limit - (diff/60); + /* ㄠ坌云五卞丢永本□斥 */ + if( hun != CHAR_getWorkInt( meindex, CHAR_WORK_SHUTDOWNDSPTIME)){ + char buff[256]; + if( hun != 0 ) { + snprintf( buff, sizeof(buff), NPC_SYSINFO_SHUTDOWN_MSG, hun); + } + else { + strcpy( buff, NPC_SYSINFO_SHUTDOWN_MSG_COMP); + } + NPC_Sysinfo_SendMsgToAll( meindex, buff); + CHAR_setWorkInt( meindex, CHAR_WORK_SHUTDOWNDSPTIME, hun); + } + if( hun == 0) { + CHAR_setWorkInt( meindex, CHAR_WORK_SHUTDOWNDSPTIME,0); + CHAR_setWorkInt( meindex, CHAR_WORK_SHUTDOWNLIMIT,0); + CHAR_setWorkInt( meindex, CHAR_WORK_SHUTDOWNTIME,0); + } + } +} +/********************************* +* 井仃日木凶凛及质 +**********************************/ +void NPC_SysinfoTalked( int meindex, int tindex, char *msg, int color) +{ + char *msgwk; + char *buff; + int len; + int msgno; + + len = strlen( msg)+1; + msgwk = calloc( 1, sizeof(char)*len); + buff = calloc( 1, sizeof(char)*len); + strcpy( msgwk, msg); + /* 旦矢□旦毛引午户月 */ + deleteSequentChar( msgwk, " "); + if( CHAR_getWorkInt( meindex, CHAR_WORK_MODE) == 0 ) { + msgno = 0; + if( strncmp( msgwk, cmd_msg[NPC_SYSINFO_MSG_STARTINFO].msg, + strlen( cmd_msg[NPC_SYSINFO_MSG_STARTINFO].msg)) == 0) + { + if( getStringFromIndexWithDelim( msgwk, " ", 2, buff, len) + == TRUE ) + { + if( strcmp( buff, CHAR_getWorkChar( meindex, CHAR_WORKCHAR_PASSWD)) + == 0 ) + { + CHAR_setWorkInt( meindex, CHAR_WORK_MODE, 1); + CHAR_setWorkInt( meindex, CHAR_WORK_PLAYER, tindex); + CHAR_setWorkInt( meindex, CHAR_WORK_TIME, NowTime.tv_sec); + CHAR_talkToCli( tindex, meindex, + "已移到指令模式。按下help即会出现说明档。", + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + CHAR_talkToCli( tindex, meindex, + "可以在enemystate 中了解敌人的产生和行动数。", + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + + } + } + } + if( CHAR_getWorkInt( meindex, CHAR_WORK_MODE ) == 0 ) { + NPC_Sysinfo_SendMsg( meindex, tindex, NPC_SYSINFO_ARG_DEF_MSG); + } + } + else { + /* 戊穴件玉乒□玉卞仄凶谛仄井质 匹五卅中 */ + if( tindex == CHAR_getWorkInt( meindex, CHAR_WORK_PLAYER)) { + int i; + /* 公木冗木质 蕊曰坌仃 */ + for( i = NPC_SYSINFO_MSG_ENDINFO; i < NPC_SYSINFO_MSG_NUM; i ++ ) { + if( strncmp( msgwk, cmd_msg[i].msg, strlen( cmd_msg[i].msg)) == 0) { + if( functbl[i] != NULL ) { + functbl[i]( meindex, tindex, msgwk); + } + break; + } + } + CHAR_setWorkInt( meindex, CHAR_WORK_TIME, NowTime.tv_sec); + } + else { + NPC_Sysinfo_SendMsg( meindex, tindex, NPC_SYSINFO_ARG_DEF_MSG); + } + } + free( msgwk); + free( buff); +} +/*------------------------------------------------------------------------ + * 骚橘乒□玉尺 + *----------------------------------------------------------------------*/ +static void NPC_Sysinfo_Msg_EndInfo( int meindex, int tindex, char *msg) +{ + CHAR_setWorkInt( meindex, CHAR_WORK_MODE, 0); + CHAR_setWorkInt( meindex, CHAR_WORK_PLAYER, -1); + CHAR_talkToCli( tindex, meindex, + "已移到一般模式", + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + +} +/*------------------------------------------------------------------------ + * HELP丢永本□斥 + *----------------------------------------------------------------------*/ +static void NPC_Sysinfo_Msg_Help( int meindex, int tindex, char *msg) +{ + int i; + typedef struct { + char str[512]; + }SYSINFO_MSGWK; + SYSINFO_MSGWK msgwk[] = { + { "指令HELP"}, + { "help 此项讯息。"}, + { "player 表示现在LOGIN的玩家人数。"}, + { "list 讯息一览。"}, + { "send number 「number」 是数值。指定讯息的号码後将该讯息内容传送给全部的玩家。"}, + { "sendmsg msgs msgs为想传送的讯息。在send 之後空一格,即可将之後的文章送信给全部的玩家。"}, + { "shutdown min min 代表分。"}, + { "msgcol col 设定传送给玩家讯息的颜色。颜色的指定有red,green,yellow,blue,purple,cyan,white。"}, + { "sysinfo 系统状态"}, + { "info 玩家状态"}, + { "endinfo 回复普通的状态。"}, + { "denyaccept 无法接受CLIENT端的接续。"}, + { "allowaccept 接受CLIENT端的接续。"}, + { "closeallsockets 强迫让CLIENT端LOGOUT。在内部实行denyaccept。"}, + { "titlerestart 再次读取称号名的设定。"}, + { "enemystate 说明NPC的状况。"}, + { ""}, + }; + + for( i = 0; msgwk[i].str[0] != '\0'; i ++ ) { + CHAR_talkToCli( tindex, meindex, msgwk[i].str, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + } +} +/*------------------------------------------------------------------------ + * 皿伊奶乩□及醒毛譬屯月 + *----------------------------------------------------------------------*/ +static void NPC_Sysinfo_Msg_Player( int meindex, int tindex, char *msg) +{ + int i, cnt = 0; + int playernum=CHAR_getPlayerMaxNum(); + char buff[64]; + for( i=0 ; i=1 && num < NPC_SYSINFO_MSGMAX ) { + if( NPC_Sysinfo_GetMsg( meindex, "sendno", msgbuf, + sizeof( msgbuf), num) != NULL ) + { + NPC_Sysinfo_SendMsgToAll( meindex, msgbuf); + } + } + } +} +/*------------------------------------------------------------------------ + * 隙烂今木凶丢永本□斥 侬 毛霜耨允月 + *----------------------------------------------------------------------*/ +static void NPC_Sysinfo_Msg_SendMsg( int meindex, int tindex, char *msg) +{ + char buff[512]; + + if( getStringFromIndexWithDelim( msg, " ", 2, buff, sizeof( buff)) == TRUE ) + { + NPC_Sysinfo_SendMsgToAll( meindex, buff); + } +} +/*------------------------------------------------------------------------ + * 丢永本□斥市仿□毛 凳允月 + *----------------------------------------------------------------------*/ +static void NPC_Sysinfo_Msg_Msgcol( int meindex, int tindex, char *msg) +{ + char buff[64]; + typedef struct { + int color; + char str[10]; + }SYSINFO_COLSET; + SYSINFO_COLSET colset[] = { + { 249, "red"}, + { 250, "green"}, + { 251, "yellow"}, + { 252, "blue"}, + { 253, "purple"}, + { 254, "cyan"}, + { 255, "white"}, + }; + + if( getStringFromIndexWithDelim( msg, " ", 2, buff, sizeof( buff)) == TRUE ) + { + int i; + for( i = 0; i < 7; i ++ ) { + if( strstr( buff, colset[i].str) != NULL ) { + CHAR_setWorkInt( meindex, CHAR_WORK_MSGCOLOR, colset[i].color); + CHAR_talkToCli( tindex, meindex, "已改变讯息的颜色。", + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + break; + } + } + } +} +/*------------------------------------------------------------------------ + * 娄醒井日丢永本□斥毛潸 允月 + *----------------------------------------------------------------------*/ +static char *NPC_Sysinfo_GetMsg( int meindex, char *msgindexstr, + char *out,int outlen, int num ) +{ + + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char *work; + char *buff; + char *cret = NULL; + int worklen; + + worklen = strlen( msgindexstr)+3; + work = (char *)calloc( 1, worklen * sizeof( char)); + buff = (char *)calloc( 1, outlen * sizeof( char)); + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + + snprintf( work, worklen, "%s%d", msgindexstr, num); + if( NPC_Util_GetStrFromStrWithDelim( argstr, work, + buff, outlen) != NULL ) + { + strcpy( out, buff); + cret = out; + } + + free( work); + free( buff); + return( cret); +} +/*------------------------------------------------------------------------ + * shutdown丢永本□斥质 + *----------------------------------------------------------------------*/ +static void NPC_Sysinfo_Msg_Shutdown( int meindex, int tindex, char *msg) +{ + char buff[10]; + int hun; + + /* 赓及丢永本□斥霜耨 */ + NPC_Sysinfo_SendMsg( meindex, tindex, NPC_SYSINFO_ARG_SHUTDOWN_MSG); + /* 凛棉本永玄 */ + CHAR_setWorkInt( meindex, CHAR_WORK_SHUTDOWNTIME, NowTime.tv_sec); + /* 孺蜃凛棉潸 */ + if( getStringFromIndexWithDelim( msg, " ", 2, buff, sizeof( buff)) == TRUE ) + { + hun = atoi( buff); + if( hun <= 0 ) { + hun = NPC_SYSINFO_SHUTDOWNLIMIT_DEFAULT; + } + } + else { + hun = NPC_SYSINFO_SHUTDOWNLIMIT_DEFAULT; + } + + CHAR_setWorkInt( meindex, CHAR_WORK_SHUTDOWNLIMIT, hun); + + CHAR_setWorkInt( meindex, CHAR_WORK_SHUTDOWNDSPTIME,0); +} +/*------------------------------------------------------------------------ + * 丢永本□斥毛霜月 娄醒井日丢永本□斥毛潸 + *----------------------------------------------------------------------*/ +static void NPC_Sysinfo_SendMsg( int meindex, int pindex, int tblnum) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buff[128]; + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + if( NPC_Util_GetStrFromStrWithDelim( argstr, msgtable[tblnum].arg, + buff, sizeof( buff)) == NULL ) + { + strcpy( buff, msgtable[tblnum].defMsg); + } + if( buff[0] != '\0' ) { + CHAR_talkToCli( pindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + } +} +/*------------------------------------------------------------------------ + * 蝈化及谛卞丢永本□斥毛霜月[ + *----------------------------------------------------------------------*/ +static void NPC_Sysinfo_SendMsgToAll( int meindex, char *msg) +{ + int i; + int playernum = CHAR_getPlayerMaxNum(); + + for( i = 0 ; i < playernum ; i++) { + if( CHAR_getCharUse(i) != FALSE ) { + CHAR_talkToCli( i, meindex, msg, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + } + } +} + + + +/* 蝈衬平乓仿毛 NO_SEE 卞允月井升丹井 */ +static void NPC_Sysinfo_All_NoSee( int meindex, int tindex, char *msg ){ + char buff[256]; + + buff[0] = buff[1] = 0; + /* 孺蜃凛棉潸 */ + if( getStringFromIndexWithDelim( msg, " ", 2, buff, sizeof( buff)) == TRUE ) + { + /* 卞允月桦宁 */ + if( strncmp( buff, "on", strlen( buff ) ) == 0 ){ + all_nosee = 1; + snprintf( buff, sizeof( buff), "已开启all_nosee 。" ); + CHAR_talkToCli( tindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + }else + /* 卞允月桦宁 */ + if( strncmp( buff, "off", strlen( buff ) ) == 0 ){ + all_nosee = 0; + snprintf( buff, sizeof( buff), "已关闭all_nosee 。" ); + CHAR_talkToCli( tindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + } + }else + if( all_nosee == 0 ){ + snprintf( buff, sizeof( buff), "all_nosee关闭着。" ); + CHAR_talkToCli( tindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + }else{ + snprintf( buff, sizeof( buff), "all_nosee开启着。" ); + CHAR_talkToCli( tindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + } +} + +/* 蝈衬平乓仿毛 NO_BODY 卞允月井升丹井 */ +static void NPC_Sysinfo_All_NoBody( int meindex, int tindex, char *msg ){ + char buff[256]; + + buff[0] = buff[1] = 0; + /* 孺蜃凛棉潸 */ + if( getStringFromIndexWithDelim( msg, " ", 2, buff, sizeof( buff)) == TRUE ) + { + /* 卞允月桦宁 */ + if( strncmp( buff, "on", strlen( buff ) ) == 0 ){ + all_nobody = 1; + snprintf( buff, sizeof( buff), "已开启all_nobody 。" ); + CHAR_talkToCli( tindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + }else + /* 卞允月桦宁 */ + if( strncmp( buff, "off", strlen( buff ) ) == 0 ){ + all_nobody = 0; + snprintf( buff, sizeof( buff), "已关闭all_nobody 。" ); + CHAR_talkToCli( tindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + } + }else + if( all_nobody == 0 ){ + snprintf( buff, sizeof( buff), "all_nobody 关闭着。" ); + CHAR_talkToCli( tindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + }else{ + snprintf( buff, sizeof( buff), "all_nobody 开启着。" ); + CHAR_talkToCli( tindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + } +} + + +/* 蝈衬平乓仿毛 ㄠ伙□皿匹窒 综今六月井" */ +static void NPC_Sysinfo_Move_Num( int meindex, int tindex, char *msg ){ + char buff[256]; + int work; + buff[0] = buff[1] = 0; + + /* 孺蜃凛棉潸 */ + if( getStringFromIndexWithDelim( msg, " ", 2, buff, sizeof( buff)) == TRUE ) + { + work = atoi( buff ); + if( work <= 0 ) { + work = 1000; /* 赝癫 */ + } + /* 凛卞仇木分仃 井仄引允 */ + EnemyMoveNum = work; + snprintf( buff, sizeof( buff), "让敌人同时%d动作。", + EnemyMoveNum ); + CHAR_talkToCli( tindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + }else{ + snprintf( buff, sizeof( buff), "现在敌人同时在进行%d动作。", + EnemyMoveNum ); + CHAR_talkToCli( tindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + } +} + + + +/* 衬平乓仿毛ㄠ伙□皿匹窒 嫖戏心请允井 */ +static void NPC_Sysinfo_Born_Num( int meindex, int tindex, char *msg ){ + char buff[256]; + int work; + buff[0] = buff[1] = 0; + + /* 孺蜃凛棉潸 */ + if( getStringFromIndexWithDelim( msg, " ", 2, buff, sizeof( buff)) == TRUE ) + { + work = atoi( buff ); + if( work <= 0 ) { + work = 2; /* 赝癫 */ + } + /* 凛卞仇木分仃戏心请仄引允 */ + one_loop_born = work; + snprintf( buff, sizeof( buff), "敌人同时派出最高的%d。", + one_loop_born ); + CHAR_talkToCli( tindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + }else{ + snprintf( buff, sizeof( buff), "现在敌人同时派出最高的%d。", + one_loop_born ); + CHAR_talkToCli( tindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + } +} + + + +/* 蜇箕及 平平乓仿橇谪毛苇月 */ +static void NPC_Sysinfo_Enemy_State( int meindex, int tindex, char *msg ){ + char buff[256]; + + if( all_nobody == 0 ){ + snprintf( buff, sizeof( buff), "allnobody 关闭着。" ); + CHAR_talkToCli( tindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + }else{ + snprintf( buff, sizeof( buff), "allnobody 开启着。" ); + CHAR_talkToCli( tindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + } + if( all_nosee == 0 ){ + snprintf( buff, sizeof( buff), "allnosee 关闭着。" ); + CHAR_talkToCli( tindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + }else{ + snprintf( buff, sizeof( buff), "allnosee 开启着。" ); + CHAR_talkToCli( tindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + } + snprintf( buff, sizeof( buff), + "bornnum 现在敌人同时派出最高的%d。", + one_loop_born ); + CHAR_talkToCli( tindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + + snprintf( buff, sizeof( buff), + "movenum 现在敌人同时在进行%d动作。", + EnemyMoveNum ); + CHAR_talkToCli( tindex, meindex, buff, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + + +} +static void NPC_Sysinfo_SetWalkTime( int meindex, int tindex, char *msg) +{ + int interval; + char msgbuf[256]; + char buff[256]; + if( getStringFromIndexWithDelim( msg, " ", 2, buff, sizeof( buff)) == TRUE ) { + interval = atoi( buff); + if( interval > 0 ) { + setWalksendinterval( (unsigned)interval); + } + } + snprintf( msgbuf, sizeof(msgbuf),"WalkInterval = %d 秒",getWalksendinterval()); + CHAR_talkToCli( tindex, meindex, msgbuf, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); + +} +static void NPC_Sysinfo_SetCATime( int meindex, int tindex, char *msg) +{ + int interval; + char msgbuf[256]; + char buff[256]; + if( getStringFromIndexWithDelim( msg, " ", 2, buff, sizeof( buff)) == TRUE ) { + interval = atoi( buff); + if( interval > 0 ) { + setCAsendinterval_ms( (unsigned)interval); + } + } + snprintf( msgbuf, sizeof(msgbuf),"CAsendInterval = %d 秒", + getCAsendinterval_ms()); + CHAR_talkToCli( tindex, meindex, msgbuf, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); +} +static void NPC_Sysinfo_SetCDTime( int meindex, int tindex, char *msg) +{ + int interval; + char msgbuf[256]; + char buff[256]; + if( getStringFromIndexWithDelim( msg, " ", 2, buff, sizeof( buff)) == TRUE ) { + interval = atoi( buff); + if( interval > 0 ) { + setCDsendinterval_ms( (unsigned)interval); + } + } + snprintf( msgbuf, sizeof(msgbuf),"CDsendInterval = %d 秒", + getCDsendinterval_ms()); + CHAR_talkToCli( tindex, meindex, msgbuf, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); +} +static void NPC_Sysinfo_SetOneloop( int meindex, int tindex, char *msg) +{ + int interval; + char msgbuf[256]; + char buff[256]; + if( getStringFromIndexWithDelim( msg, " ", 2, buff, sizeof( buff)) == TRUE ) { + interval = atoi( buff); + if( interval > 0 ) { + setOnelooptime_ms( (unsigned)interval); + } + } + snprintf( msgbuf, sizeof(msgbuf),"Onelooptime = %d 秒", + getOnelooptime_ms()); + CHAR_talkToCli( tindex, meindex, msgbuf, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); +} +static void NPC_Sysinfo_TitleRestart( int meindex, int tindex, char *msg) +{ + int rc; + char msgbuf[256]; + + rc = TITLE_reinitTitleName(); + if( rc) { + snprintf( msgbuf, sizeof(msgbuf),"读取完毕。" ); + } + else { + snprintf( msgbuf, sizeof(msgbuf),"发生ERROR。" ); + } + CHAR_talkToCli( tindex, meindex, msgbuf, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); +} + + +static void NPC_Sysinfo_SetSaacwrite( int meindex, int tindex, char *msg) +{ + int interval; + char msgbuf[256]; + char buff[256]; + if( getStringFromIndexWithDelim( msg, " ", 2, buff, sizeof( buff)) == TRUE ) { + interval = atoi( buff); + if( interval > 0 ) { + setSaacwritenum( (unsigned)interval); + } + } + snprintf( msgbuf, sizeof(msgbuf),"Saacwritenum = %d ",getSaacwritenum()); + CHAR_talkToCli( tindex, meindex, msgbuf, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); +} +static void NPC_Sysinfo_SetSaacread( int meindex, int tindex, char *msg) +{ + int interval; + char msgbuf[256]; + char buff[256]; + if( getStringFromIndexWithDelim( msg, " ", 2, buff, sizeof( buff)) == TRUE ) { + interval = atoi( buff); + if( interval > 0 ) { + setSaacreadnum( (unsigned)interval); + } + } + snprintf( msgbuf, sizeof(msgbuf),"Saacreadnum = %d ",getSaacreadnum()); + CHAR_talkToCli( tindex, meindex, msgbuf, + CHAR_getWorkInt( meindex, CHAR_WORK_MSGCOLOR)); +} diff --git a/gmsv/npc/npc_timeman.c b/gmsv/npc/npc_timeman.c new file mode 100644 index 0000000..0cb951c --- /dev/null +++ b/gmsv/npc/npc_timeman.c @@ -0,0 +1,231 @@ +#include "version.h" +#include +#include "object.h" +#include "char_base.h" +#include "char.h" +#include "util.h" +#include "npcutil.h" +#include "npc_oldman.h" +#include "title.h" +#include "char_data.h" +#include "readmap.h" +#include "lssproto_serv.h" +#include "log.h" +#include "handletime.h" + + + + + +enum { + E_INT_GRAPHIC = CHAR_NPCWORKINT1, /* 褥蟆及 飓 */ + E_INT_GRAPHIC2 = CHAR_NPCWORKINT2, /* 褥 及 飓 */ + E_INT_BORN = CHAR_NPCWORKINT3, /* 藕戏凛棉 */ + E_INT_DEAD = CHAR_NPCWORKINT4, /* 壅尹月凛棉*/ + E_INT_MODE = CHAR_NPCWORKINT5, /* 蜇箕及乒□玉 */ + E_INT_NOWGRAPHIC = CHAR_NPCWORKINT6, /* 蜇箕及弘仿白奴永弁瓜件田□ */ + +}; + + +typedef struct { + char arg[32]; + int born; + int dead; +}NPC_TimeMan; + + +#define YOAKE 700 +#define NICHIBOTU 300 +#define SHOUGO 125 +#define YONAKA 500 + +static NPC_TimeMan TimeTble[] = { + + {"ALLNIGHT", NICHIBOTU+1, YOAKE}, /* 脐 互请化中卅中凛 */ + {"ALLNOON", YOAKE+1, NICHIBOTU},/* 脐 互请化中月凛 */ + {"AM", YONAKA+1, SHOUGO}, /* AM 凛及心 */ + {"PM", SHOUGO+1, YONAKA}, /* PM 凛及心 */ + {"FORE", YOAKE+1, SHOUGO}, /* 脐 互匹化井日恳诟引匹 */ + {"AFTER", SHOUGO+1, NICHIBOTU},/* 恳诟井日脐 互释戈引匹 */ + {"EVNING", NICHIBOTU+1, YONAKA}, /* 脐 互释氏匹井日蕞 引匹 */ + {"MORNING", YONAKA+1, YOAKE}, /* 蕞 井日脐 互哝月引匹 */ + {"FREE", 0, 1024}, +}; + + + + +BOOL NPC_TimeManInit( int meindex ) +{ + + int i=0; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[32]; + + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr))==NULL){ + print("GetArgStrErr"); + return FALSE; + } + + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPETOWNPEOPLE ); + if( NPC_Util_GetStrFromStrWithDelim( argstr, "change_no", buf, sizeof( buf)) != NULL ){ + if(strstr(buf,"CLS")!=NULL){ + CHAR_setWorkInt( meindex,E_INT_GRAPHIC2, 9999 ); + }else{ + CHAR_setWorkInt( meindex,E_INT_GRAPHIC2, atoi(buf) ); + } + }else{ + CHAR_setWorkInt( meindex,E_INT_GRAPHIC2, 9999 ); + } + + CHAR_setWorkInt( meindex, E_INT_GRAPHIC, CHAR_getInt( meindex, CHAR_BASEIMAGENUMBER) ); + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "time", buf, sizeof( buf)) != NULL ){ + for(i=0 ; i<9 ; i++){ + if(strstr(buf,TimeTble[i].arg) != NULL){ + CHAR_setWorkInt( meindex, E_INT_BORN, TimeTble[i].born); + CHAR_setWorkInt( meindex, E_INT_DEAD, TimeTble[i].dead); + return TRUE; + } + } + } + + return FALSE; + +} + + +void NPC_TimeManTalked( int meindex , int talkerindex , char *msg ,int color ) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char token[512]; + char buf[512]; + int tokennum=0; + int i; + + + /*-- 及蟆卞中月井升丹井"--*/ + if(NPC_Util_isFaceToFace( meindex ,talkerindex ,2)==FALSE){ + /* ㄠ弘伉永玉动 及心 */ + if( NPC_Util_CharDistance( talkerindex ,meindex ) > 1) return; + } + + if(CHAR_getInt(meindex,CHAR_BASEIMAGENUMBER)==9999){ + /*--壅尹化中月乒□玉--*/ + return; + } + + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr))==NULL){ + print("GetArgStrErr"); + return; + } + + + if( CHAR_getInt(talkerindex,CHAR_WHICHTYPE) != CHAR_TYPEPLAYER )return; + + if( NPC_Util_charIsInFrontOfChar( talkerindex, meindex, 3 ) ==FALSE) return; + + + + + if(CHAR_getWorkInt(meindex,E_INT_MODE)==0){ + /*--丢永本□斥毛忒允 */ + NPC_Util_GetStrFromStrWithDelim(argstr,"main_msg",buf,sizeof( buf) ); + + }else{ + /*弘仿白奴永弁 毛 尹凶分仃卅及匹}啜丹丢永本□斥毛忒允 */ + NPC_Util_GetStrFromStrWithDelim(argstr,"change_msg",buf,sizeof( buf) ); + } + + tokennum = 1; + /* 戊件穴匹嗉濠日木凶玄□弁件互窒仇丐月井醒尹月 */ + for( i=0;buf[i]!='\0';i++ ){ + if( buf[i] == ',' ) tokennum++; + } + + /* 仿件母丞匹升木毛韵月井瑁户化}公及玄□弁件毛潸曰分允 */ + getStringFromIndexWithDelim( buf,",", rand()%tokennum+1,token, sizeof(token)); + /*--仄扎屯月--*/ + CHAR_talkToCli( talkerindex, meindex, token, CHAR_COLORWHITE ); + + +} + +/** 引歹曰卞窒井互粟仇匀凶午五卞裟壬木月*/ +void NPC_TimeManWatch( int meobjindex, int objindex, CHAR_ACTION act, + int x,int y,int dir, int* opt,int optlen ) +{ + int meindex=0; + int index; + LSTIME nowlstime; + int born; + int dead; + + if( OBJECT_getType( objindex) != OBJTYPE_CHARA) return; + index = OBJECT_getIndex( objindex); + + /* 皿伊奶乩□卞及心 杀允月 */ + if( CHAR_getInt( index, CHAR_WHICHTYPE) != CHAR_TYPEPLAYER) return; + + meindex = OBJECT_getIndex( meobjindex); + born = CHAR_getWorkInt( meindex , E_INT_BORN ); + dead = CHAR_getWorkInt( meindex , E_INT_DEAD ); + +// print("now_hour=%d",nowlstime.hour); + + /* 凛棉毛苇化橇谪毛瑁户月 */ + if(born < dead){ + RealTimeToLSTime( NowTime.tv_sec, &nowlstime); + if( (born < nowlstime.hour) && (dead > nowlstime.hour) ){ + if(CHAR_getWorkInt(meindex,E_INT_NOWGRAPHIC) + ==CHAR_getWorkInt( meindex, E_INT_GRAPHIC)) return; + + CHAR_setInt(meindex,CHAR_BASEIMAGENUMBER, + CHAR_getWorkInt( meindex, E_INT_GRAPHIC)); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX ) ); + CHAR_setWorkInt(meindex,E_INT_MODE,0); + CHAR_setWorkInt(meindex,E_INT_NOWGRAPHIC, + CHAR_getInt(meindex,CHAR_BASEIMAGENUMBER)); + }else{ + /*-壅尹化中月--*/ + if(CHAR_getWorkInt(meindex,E_INT_NOWGRAPHIC) + ==CHAR_getWorkInt( meindex, E_INT_GRAPHIC2)) return; + + CHAR_setInt(meindex,CHAR_BASEIMAGENUMBER, + CHAR_getWorkInt( meindex, E_INT_GRAPHIC2)); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX ) ); + CHAR_setWorkInt(meindex,E_INT_MODE,1); + CHAR_setWorkInt(meindex,E_INT_NOWGRAPHIC, + CHAR_getInt(meindex,CHAR_BASEIMAGENUMBER)); + + } + }else{ + RealTimeToLSTime( NowTime.tv_sec, &nowlstime); + if( (born < nowlstime.hour && 1024 > nowlstime.hour) + || ( 0 < nowlstime.hour && dead > nowlstime.hour) + ){ + if(CHAR_getWorkInt(meindex,E_INT_NOWGRAPHIC) + ==CHAR_getWorkInt( meindex, E_INT_GRAPHIC)) return; + + CHAR_setInt(meindex,CHAR_BASEIMAGENUMBER, + CHAR_getWorkInt( meindex, E_INT_GRAPHIC)); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX ) ); + CHAR_setWorkInt(meindex,E_INT_MODE,0); + CHAR_setWorkInt(meindex,E_INT_NOWGRAPHIC, + CHAR_getInt(meindex,CHAR_BASEIMAGENUMBER)); + }else{ + if(CHAR_getWorkInt(meindex,E_INT_NOWGRAPHIC) + ==CHAR_getWorkInt( meindex, E_INT_GRAPHIC2)) return; + + CHAR_setInt(meindex,CHAR_BASEIMAGENUMBER, + CHAR_getWorkInt( meindex, E_INT_GRAPHIC2)); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX ) ); + CHAR_setWorkInt(meindex,E_INT_MODE,1); + CHAR_setWorkInt(meindex,E_INT_NOWGRAPHIC, + CHAR_getInt(meindex,CHAR_BASEIMAGENUMBER)); + } + } + +} + diff --git a/gmsv/npc/npc_townpeople.c b/gmsv/npc/npc_townpeople.c new file mode 100644 index 0000000..401a01e --- /dev/null +++ b/gmsv/npc/npc_townpeople.c @@ -0,0 +1,72 @@ +#include "version.h" +#include "object.h" +#include "char_base.h" +#include "char.h" +#include "util.h" +#include "handletime.h" +#include "anim_tbl.h" +#include "npc_door.h" +#include "lssproto_serv.h" +#include "npcutil.h" + + +/* + * 引切及夫午太午 by nakamura + * 正奶皿 “TownPeople + * 仄井仃日木凶午五卞NPCARGUMENT及 侬 毛 仄井仃化五凶谛卞 允[ + * + * 引凶}npcarg卞 仇氏卞切反,漆 反化氏五互中中匹允友 + * 及方丹卞 剩戊件穴毛犯伉立正午仄化 醒及丢□本□斥毛 + * 踏仁仇午互匹五}公及桦宁仿件母丞匹公及 井日仄扎屯月[ + * npcgen.perl 匹反} MAN匹丐月[ MSG午幻午氏升云卅元分卅丐 + * + */ + +/* + * 仄井仃日木凶午五反NPCARGUMENT毛公及引引 允[ + */ +void NPC_TownPeopleTalked( int index, int talker, char *msg, int color ) +{ + char arg[NPC_UTIL_GETARGSTR_BUFSIZE], token[NPC_UTIL_GETARGSTR_LINEMAX]; + int i, tokennum; + + /* 3弘伉永玉动 及桦宁分仃忒蚕允月 */ + + if( CHAR_getInt(talker,CHAR_WHICHTYPE) == CHAR_TYPEPLAYER + && NPC_Util_charIsInFrontOfChar( talker, index, 3 ) ){ + + NPC_Util_GetArgStr( index, arg, sizeof( arg)); + + tokennum = 1; + /* 戊件穴匹嗉濠日木凶玄□弁件互窒仇丐月井醒尹月 */ + for( i=0;arg[i]!='\0';i++ ){ + if( arg[i] == ',' ) tokennum++; + } + + /* 仿件母丞匹升木毛韵月井瑁户化}公及玄□弁件毛潸曰分允 */ + getStringFromIndexWithDelim( arg,",", + rand()%tokennum+1,token, sizeof(token)); + + CHAR_talkToCli( talker, index, token, CHAR_COLORWHITE ); + } +} + +/* + * 赓渝祭允月[ + */ +BOOL NPC_TownPeopleInit( int meindex ) +{ + + //CHAR_setInt( meindex , CHAR_HP , 0 ); + //CHAR_setInt( meindex , CHAR_MP , 0 ); + //CHAR_setInt( meindex , CHAR_MAXMP , 0 ); + //CHAR_setInt( meindex , CHAR_STR , 0 ); + //CHAR_setInt( meindex , CHAR_TOUGH, 0 ); + //CHAR_setInt( meindex , CHAR_LV , 0 ); + + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPETOWNPEOPLE ); + //CHAR_setFlg( meindex , CHAR_ISOVERED , 1 ); + //CHAR_setFlg( meindex , CHAR_ISATTACKED , 0 ); /* 猾今木卅中方氏 */ + + return TRUE; +} diff --git a/gmsv/npc/npc_transerman.c b/gmsv/npc/npc_transerman.c new file mode 100644 index 0000000..644f4e9 --- /dev/null +++ b/gmsv/npc/npc_transerman.c @@ -0,0 +1,201 @@ +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "npc_transerman.h" +#include "lssproto_serv.h" +#include "saacproto_cli.h" +#include "readmap.h" +#include "battle.h" +#include "log.h" +#include "enemy.h" +#include "handletime.h" +#include "npc_eventaction.h" + +//特地从天堂高薪挖角来的"传送师" +#ifdef _TRANSER_MAN +enum { + WINDOW_START=1, + WINDOW_SELECT, + WINDOW_WARP, + WINDOW_END, +}; +enum { + NPC_WORK_CURRENTTIME = CHAR_NPCWORKINT1, +/* + NPC_WORK_ROUTETOY = CHAR_NPCWORKINT2, + NPC_WORK_ROUTEPOINT = CHAR_NPCWORKINT3, + NPC_WORK_ROUNDTRIP = CHAR_NPCWORKINT4, + NPC_WORK_MODE = CHAR_NPCWORKINT5, + NPC_WORK_CURRENTROUTE = CHAR_NPCWORKINT6, + NPC_WORK_ROUTEMAX = CHAR_NPCWORKINT7, + NPC_WORK_WAITTIME = CHAR_NPCWORKINT8, + NPC_WORK_CURRENTTIME = CHAR_NPCWORKINT9, + NPC_WORK_SEFLG = CHAR_NPCWORKINT10, +*/ +}; + +#define STANDBYTIME 50 + +static void NPC_TranserMan_selectWindow( int meindex, int toindex, int num,int select); +BOOL TranserMan_GetMenuStr( int meindex, int toindex, char *npcarg, char *token); + +BOOL NPC_TranserManInit( int meindex ) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("TRANSER_MAN: GetArgStrErr!!"); + return FALSE; + } + + CHAR_setInt( meindex, CHAR_WHICHTYPE, CHAR_TRANSERMANS); + + //CHAR_setInt( meindex, CHAR_LOOPINTERVAL, NEWNPCMAN_STANDBY); + CHAR_setWorkInt( meindex, NPC_WORK_CURRENTTIME, NowTime.tv_sec); + return TRUE; +} +//CHAR_setWorkInt(talkerindex,CHAR_WORKSHOPRELEVANT,1); +void NPC_TranserManTalked( int meindex, int talkerindex, char *msg, int color ) +{ + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) + return; + if(NPC_Util_isFaceToFace( meindex ,talkerindex , 2) == FALSE) { + if(NPC_Util_isFaceToChara( talkerindex, meindex, 1) == FALSE) + return; + } +#ifdef _ITEM_CHECKWARES + if( CHAR_CheckInItemForWares( talkerindex, 0) == FALSE ){ + CHAR_talkToCli( talkerindex, meindex, "根据传送师工会规定,不能服务携带货物的人!", CHAR_COLORYELLOW); + return; + } +#endif +// Syu ADD 天才传送师判断组队状态 + if( CHAR_getWorkInt ( talkerindex , CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE) + { + CHAR_talkToCli( talkerindex, meindex, "根据传送师工会规定,不能帮组队中的人传送!",CHAR_COLORYELLOW); + return; + } + + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, 0); + NPC_TranserMan_selectWindow( meindex, talkerindex, WINDOW_START, 0); +} + +void NPC_TranserManWindowTalked( int meindex, int talkerindex, int seqno, + int select, char *data) +{ + if( select == WINDOW_BUTTONTYPE_CANCEL || select == WINDOW_BUTTONTYPE_NO) + return; + switch( seqno) { + case NPC_TRANSERMAN_START: + break; + case NPC_TRANSERMAN_SELECT: + NPC_TranserMan_selectWindow( meindex, talkerindex, WINDOW_SELECT, atoi( data)); + break; + case NPC_TRANSERMAN_WARP: + if( select == WINDOW_BUTTONTYPE_CANCEL ) + return; + NPC_TranserMan_selectWindow( meindex, talkerindex, WINDOW_WARP, atoi( data)); + break; + case NPC_TRANSERMAN_END: + break; + } + +} + +static void NPC_TranserMan_selectWindow( int meindex, int toindex, int num,int select) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + char token[256]; + + int buttontype = 0, windowtype = 0, windowno = 0; + int fd = getfdFromCharaIndex( toindex); + + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + + if(NPC_Util_isFaceToFace( meindex ,toindex , 2) == FALSE) { + if(NPC_Util_isFaceToChara( toindex, meindex, 1) == FALSE) + return; + } + + memset( npcarg, 0, sizeof( npcarg)); + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("TRANSER_MAN: GetArgStrErr!!"); + return; + } + memset( token, 0, sizeof( token)); + + switch( num) { + case WINDOW_START: + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "START_MSG", token, sizeof( token) ) == NULL) { + print("TranserMan Get START_MSG ERROR !"); + return; + } + CHAR_setWorkInt( toindex, CHAR_WORKSHOPRELEVANT, WINDOW_START); + buttontype = WINDOW_BUTTONTYPE_YESNO; + windowno = NPC_TRANSERMAN_SELECT; + break; + case WINDOW_SELECT: + if( TranserMan_GetMenuStr( meindex, toindex, npcarg, token) == FALSE ) { + print( "TranserMan GetMenu ERROR !!"); + return; + } + windowtype = WINDOW_MESSAGETYPE_SELECT; + buttontype = WINDOW_BUTTONTYPE_CANCEL; + windowno = NPC_TRANSERMAN_WARP; + break; + case WINDOW_WARP: + if( ActionNpc_CheckMenuFree( meindex, toindex, npcarg, select) == FALSE ){ + memset( token, 0, sizeof( token)); + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "FAIL_MSG", token, sizeof( token) ) != NULL) { + CHAR_talkToCli( toindex, meindex, token, CHAR_COLORYELLOW); + } + } + return; + + case WINDOW_END: + break; + } + + lssproto_WN_send( fd, windowtype, buttontype, windowno, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), token); +} + + +void NPC_TranserManLoop( int meindex) +{ + +} + +BOOL TranserMan_GetMenuStr( int meindex, int toindex, char *npcarg, char *token) +{ + char buf1[1024], buf2[256], buf3[256]; + BOOL FINDS=FALSE; + int talkNo=1; + if( npcarg == NULL ) return FALSE; + + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "MenuHead", buf1, sizeof( buf1) ) == NULL){ + print("TranserMan Get MenuHead ERROR!"); + return FALSE; + } + sprintf( token, "%s\n", buf1); + + while( getStringFromIndexWithDelim( npcarg,"}",talkNo, buf1, sizeof( buf1)) != FALSE ) { + talkNo++; + memset( buf2, 0, sizeof( buf2)); + if( NPC_Util_GetStrFromStrWithDelim( buf1, "MenuStr", buf2, sizeof( buf2)) == NULL ) + continue; + FINDS = TRUE; + + sprintf( buf3, " %s\n", buf2); + strcat( token, buf3); + } + + return FINDS; +} + +#endif + + diff --git a/gmsv/npc/npc_transmigration.c b/gmsv/npc/npc_transmigration.c new file mode 100644 index 0000000..c08f0e9 --- /dev/null +++ b/gmsv/npc/npc_transmigration.c @@ -0,0 +1,1783 @@ +#include "version.h" +#include +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "lssproto_serv.h" +#include "enemy.h" +#include "log.h" +#include "battle.h" +#include "readmap.h" +#include "npc_transmigration.h" + +#ifdef _PET_TRANS +#include "npc_pettransman.h" +#endif + +static void NPC_Transmigration_selectWindow( int meindex, int toindex, int num); +static int NPC_TransmigrationCheck(int meindex, int talker); +BOOL NPC_TransmigrationAddPet(int meindex, int talker, int petid); +//楮醒及烂聒 +int NPC_StartpointCheck(int meindex,int talker); +BOOL NPC_TransmigrationMain(int meindex, int toindex, char *buf); +int NPC_TransmigrationFlg_CLS(int meindex, int toindex); +BOOL NPC_TransmigrationDelPet(int meindex, int talker); +BOOL NPC_TransmigrationStatus(int meindex, int toindex,int *work); +BOOL NPC_TransmigratiomWarp(int meindex, int toindex, char *buf); +void s_eventsetend( int charaindex, int shiftbit ); + +#ifdef _PET_TRANS +int Pet_Select; +#endif + +/********************************* +* 赓渝质 +*********************************/ +BOOL NPC_TransmigrationInit( int meindex ) +{ + + /*--平乓仿及正奶皿毛涩烂--*/ + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPETRANSMIGRATION ); + + return TRUE; + +} + +/********************************* +* 仄井仃日木凶凛及质 +*********************************/ +void NPC_TransmigrationTalked( int meindex , int talkerindex , char *szMes ,int color ) +{ +#ifdef _PET_TRANS + int i,petindex; + char buf[256]; +#endif + /* 皿伊奶乩□卞覆仄化分仃 杀允月 */ + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) + { + return; + } + /*-- 及蟆卞中月井升丹井"--*/ + if(NPC_Util_isFaceToFace( meindex ,talkerindex , 2) == FALSE) { + /* ㄠ弘伉永玉动 及心 */ + if(NPC_Util_isFaceToChara( talkerindex, meindex, 1) == FALSE) return; + } +// print("savepoot=%d",CHAR_getInt( talkerindex, CHAR_SAVEPOINT)); +// NPC_StartpointCheck( meindex, talkerindex); + + +//玛雷菲雅判断 成立 宠物转生 不成立 人物转生 +#ifdef _PET_TRANS + for(i=0 ; i < CHAR_MAXPETHAVE ; i++) { + petindex = CHAR_getCharPet( talkerindex, i); + if( petindex == -1 ) + continue; + //检查宠物的 ID 是否为玛雷菲雅 1479 ID 为718 + if( CHAR_getInt( petindex, CHAR_PETID) == 718 +#ifdef _PET_2TRANS + || CHAR_getInt( petindex, CHAR_PETID) == 401 +#endif + ) { + if( CHAR_getInt( petindex, CHAR_LV) > 79 ) { + //continue; + }else if( CHAR_getInt( petindex, CHAR_LV) == 79 ) { + if( strcmp( CHAR_getChar( petindex, CHAR_OWNERCDKEY), CHAR_getChar( talkerindex, CHAR_CDKEY) ) || + strcmp( CHAR_getChar( petindex, CHAR_OWNERCHARANAME), CHAR_getChar( talkerindex, CHAR_NAME) )) { + sprintf( buf,"你身上的玛雷菲雅,并不是你的啊!"); + CHAR_talkToCli( talkerindex, -1, buf, CHAR_COLORWHITE); + return; + } + break; + } + } + } + + if(i != CHAR_MAXPETHAVE) { + CHAR_setWorkInt(talkerindex,CHAR_WORKSHOPRELEVANT,1); + NPC_PetTransMan_selectWindow( meindex, talkerindex,0,-1); + }else { +#endif + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT,1); + NPC_Transmigration_selectWindow( meindex, talkerindex, 0); +#ifdef _PET_TRANS + } +#endif + + //原转生 + //CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT,1); + //NPC_Transmigration_selectWindow( meindex, talkerindex, 0); + +} + + +//备质 卞坌仃月 +static void NPC_Transmigration_selectWindow( int meindex, int toindex, int num) +{ + + char token[1024]; + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[2048]; + char buf2[512]; + char tmp[512]; + char s_tensei[64]; + int buttontype = 0; + int windowtype = 0; + int windowno = 0; + int tenseiNo = 1; + int fd = getfdFromCharaIndex( toindex); + int i = 1; + BOOL tenflg = FALSE; + char *elder[4] = {"samugiru","marinasu","jaja","karutarna"}; + int point; + int ten_no; + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("Tensei:GetArgStrErr"); + return; + } + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + tenseiNo = CHAR_getInt( toindex, CHAR_TRANSMIGRATION); + tenseiNo++; + if(CHAR_getWorkInt( toindex, CHAR_WORKSHOPRELEVANT) >= 2){ + tenseiNo--; + } + + //涩烂白央奶伙 匹及鳖戏荚醒卞丐丹手及毛蓟少凶户及赏 + sprintf(s_tensei,"TENSEI:%d",tenseiNo); + + while(getStringFromIndexWithDelim( npcarg,"END",i,buf,sizeof( buf)) != FALSE){ + i++; + if(strstr(buf,s_tensei) != NULL) { + tenflg = TRUE; + break; + } + } +#if 0 + //升木卞手丐化反引日卅井匀凶日蔽 + if(tenflg == FALSE){ + print("SettingFile Error "); + return ; + } +#endif + //ttom + print("\nTrans meindex=%d,toindex=%d,num=%d",meindex,toindex,num); + //ttom + CONNECT_set_state_trans(fd,6); + //ttom end + + //公木冗木及质 卞坌仃月[ + switch( num){ + case 0: + //ttom + //CONNECT_set_state_trans(fd,0); + //ttom end + ten_no = NPC_TransmigrationCheck(meindex, toindex); + if( +#ifdef _TRANS_6 + ten_no < 6 +#else +#ifdef _PK_SERVER + ten_no < 3//百万PK限制到3转 +#else + ten_no < 5 +#endif +#endif//_TRANS_6 + && ten_no >= 0){ + //椭瘀弁伉失□ + if(NPC_Util_GetStrFromStrWithDelim( buf,"startmsg", token,sizeof( token) ) + == NULL) + { + print("startmsgErr"); + return; + } + buttontype = WINDOW_BUTTONTYPE_NEXT; + //ttom + CONNECT_set_state_trans(fd,0); + //ttom end + }else if( +#ifdef _TRANS_6 + ten_no == 6 +#else +#ifdef _PK_SERVER + ten_no == 3//百万PK限制到3转 +#else + ten_no == 5 +#endif +#endif//_TRANS_6 + ){ + //鳖戏毛ㄤ荚支匀凶 + if(NPC_Util_GetStrFromStrWithDelim( npcarg,"maxmsg", token,sizeof( token) ) + == NULL) + { + print("maxmsgErr"); + return; + } + buttontype = WINDOW_BUTTONTYPE_OK; + }else{ + //椭瘀弁伉失仄化卅中 + if(NPC_Util_GetStrFromStrWithDelim( buf,"nonemsg", token,sizeof( token) ) + == NULL) + { + print("nonemsgErr"); + return; + } + buttontype = WINDOW_BUTTONTYPE_OK; + + } + windowno = CHAR_WINDOWTYPE_TRANSMIGRATION_START; + + break; + + case 1: + if(NPC_Util_GetStrFromStrWithDelim( buf,"mainmsg", token,sizeof( token) ) + == NULL) + { + print("mainmsgErr"); + return; + } + buttontype = WINDOW_BUTTONTYPE_OKCANCEL; + windowno = CHAR_WINDOWTYPE_TRANSMIGRATION_MAIN; + break; + + case 2: + // Robin 2001/03/05 Tensei Check + //if(!CHAR_getWorkInt(toindex,CHAR_TENSEICHECKED)) return; + + //鳖戏质 毛 + point = NPC_StartpointCheck( meindex, toindex); + if(point == -1) { + return; + } + + NPC_Util_GetStrFromStrWithDelim( npcarg,elder[point],buf2,sizeof( buf2)); + if(NPC_TransmigrationMain(meindex, toindex, buf2) == FALSE) + { + return; + } + + + sprintf( tmp, "yesmsg%d", + CHAR_getWorkInt( toindex, CHAR_WORKSHOPRELEVANT)); + + //鳖戏蔽 丢永本□斥毛分允[ + if(NPC_Util_GetStrFromStrWithDelim( buf,tmp, token,sizeof( token) ) + == NULL) + { + print("yesmsgErr"); + return; + } + + CHAR_setWorkInt( toindex, CHAR_WORKSHOPRELEVANT, + CHAR_getWorkInt( toindex, CHAR_WORKSHOPRELEVANT) +1 + ); + sprintf( tmp, "yesmsg%d", + CHAR_getWorkInt( toindex, CHAR_WORKSHOPRELEVANT)); + + //鳖戏蔽 丢永本□斥毛分允[ + //鳖戏蔽 丢永本□斥毛分允[ + if(strstr(buf, tmp) == NULL) { + buttontype = WINDOW_BUTTONTYPE_OK; + windowno = CHAR_WINDOWTYPE_TRANSMIGRATION_END; + }else { + buttontype = WINDOW_BUTTONTYPE_NEXT; + windowno = CHAR_WINDOWTYPE_TRANSMIGRATION_END; + } + break; + + case 3: + + /*--蓟 --*/ + /*--平□伐□玉及民尼永弁毛垫丹--*/ + if(NPC_Util_GetStrFromStrWithDelim( buf,"nomsg", token,sizeof( token) ) + == NULL) + { + print("nomsgErr"); + return; + } + buttontype = WINDOW_BUTTONTYPE_OK; + windowno = CHAR_WINDOWTYPE_TRANSMIGRATION_NONE; + + break; + + case 4: + //鳖戏 及丢永本□斥质 + sprintf( tmp, "yesmsg%d", + CHAR_getWorkInt( toindex, CHAR_WORKSHOPRELEVANT)); + //鳖戏蔽 丢永本□斥毛分允[ + if(NPC_Util_GetStrFromStrWithDelim( buf,tmp, token,sizeof( token) ) + == NULL) + { + print("yesmsgErr"); + return; + } + + CHAR_setWorkInt( toindex, CHAR_WORKSHOPRELEVANT, + CHAR_getWorkInt( toindex, CHAR_WORKSHOPRELEVANT) +1 + ); + sprintf( tmp, "yesmsg%d", + CHAR_getWorkInt( toindex, CHAR_WORKSHOPRELEVANT)); + + //鳖戏蔽 丢永本□斥毛分允[ + //鳖戏蔽 丢永本□斥毛分允[ + if(strstr(buf, tmp) == NULL) + { + buttontype = WINDOW_BUTTONTYPE_OK; + windowno = CHAR_WINDOWTYPE_TRANSMIGRATION_END; + }else{ + buttontype = WINDOW_BUTTONTYPE_NEXT; + windowno = CHAR_WINDOWTYPE_TRANSMIGRATION_END; + } + + + break; + case 5: + + // Robin 2001/03/05 Tensei Check + //if(!CHAR_getWorkInt(toindex,CHAR_TENSEICHECKED)) return; + //鳖戏质 毛 + point = NPC_StartpointCheck( meindex, toindex); + if(point == -1) return; + NPC_Util_GetStrFromStrWithDelim( npcarg,elder[point],buf2,sizeof( buf2)); + NPC_TransmigratiomWarp(meindex, toindex, buf2); +// buttontype = WINDOW_BUTTONTYPE_OK; +// windowno = CHAR_WINDOWTYPE_TRANSMIGRATION_END; + return; + break; + + + } +// makeEscapeString( token, escapedname, sizeof(escapedname)); + /*-仇仇匹霜耨允月--*/ + lssproto_WN_send( fd, windowtype, + buttontype, + windowno, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); +} +/*----------------------------------------- +弁仿奶失件玄井日忒匀化五凶凛卞裟太请今木月[ +-------------------------------------------*/ +void NPC_TransmigrationWindowTalked( int meindex, int talkerindex, + int seqno, int select, char *data) +{ + + int datanum = -1; + + int fd = getfdFromCharaIndex( talkerindex); + /*-- 及引歹曰卞中卅中午五反蔽 --*/ + if( NPC_Util_CharDistance( talkerindex, meindex ) > 2) { + return; + } + //ttom + //CONNECT_set_state_trans(fd,6); + //ttom end + datanum = atoi( data); + switch( seqno) { + /*-- 赓及丢永本□斥-*/ + case CHAR_WINDOWTYPE_TRANSMIGRATION_START: + if( select == WINDOW_BUTTONTYPE_NEXT) { + //ttom + if(CONNECT_get_state_trans(fd)==0){ } else return; + //ttom end + NPC_Transmigration_selectWindow( meindex, talkerindex,1); + //ttom + CONNECT_set_state_trans(fd,1); + //ttom end + + } + break; + + //鳖戏允月井升丹井 仁丢永本□斥及蚕尹 + case CHAR_WINDOWTYPE_TRANSMIGRATION_MAIN: + if( select == WINDOW_BUTTONTYPE_OK) { + //ttom + if(CONNECT_get_state_trans(fd)==1){ } else return; + //ttom end + NPC_Transmigration_selectWindow( meindex, talkerindex, 2); + //ttom + CONNECT_set_state_trans(fd,2); + //ttom end + }else if(select == WINDOW_BUTTONTYPE_CANCEL) { + NPC_Transmigration_selectWindow( meindex, talkerindex, 3); + } + break; + + /*-- 及丢永本□斥--*/ + case CHAR_WINDOWTYPE_TRANSMIGRATION_END: + if( select == WINDOW_BUTTONTYPE_NEXT) { + //ttom + if(CONNECT_get_state_trans(fd)==2){ } else return; + //ttom end + NPC_Transmigration_selectWindow( meindex, talkerindex, 4); + //ttom + CONNECT_set_state_trans(fd,4); + //ttom end + }else if( select == WINDOW_BUTTONTYPE_OK) { + //ttom + if(CONNECT_get_state_trans(fd)==4){ } else return; + //ttom end + NPC_Transmigration_selectWindow( meindex, talkerindex, 5); + } + break; + +//ANDY_ADD 10/19 +#ifdef _PET_TRANS + + case CHAR_WINDOWTYPE_PETTRANS_START: //开始对话 + if( select == WINDOW_BUTTONTYPE_NEXT) { + NPC_PetTransMan_selectWindow( meindex, talkerindex, 1, 0); + } + break; + + case CHAR_WINDOWTYPE_PETTRANS_SELECT: //是否让宠物转生 + if( select == WINDOW_BUTTONTYPE_YES) { + NPC_PetTransMan_selectWindow( meindex, talkerindex, 2, 0); + }else { + NPC_PetTransMan_selectWindow( meindex, talkerindex, 5, 0); + } + break; + + case CHAR_WINDOWTYPE_PETTRANS_SELPET: //选宠 + if(select==WINDOW_BUTTONTYPE_CANCEL) { + NPC_PetTransMan_selectWindow( meindex, talkerindex, 5,-1 ); + }else { + Pet_Select = datanum; + NPC_PetTransMan_selectWindow( meindex, talkerindex, 3, datanum ); + } + break; + + case CHAR_WINDOWTYPE_PETTRANS_MAIN1: //确定宠物 确定/取消 + if(select==WINDOW_BUTTONTYPE_YES){ + NPC_PetTransMan_selectWindow( meindex, talkerindex, 4, Pet_Select); + }else { + NPC_PetTransMan_selectWindow( meindex, talkerindex, 5, -1); + } + break; + + case CHAR_WINDOWTYPE_PETTRANS_END: //宠物转生结束结束 + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, 0); + break; + +#endif + + } + + +} + +//************************************************************ +// 反元户及赢 镉卞伐□皿今六月 +//************************************************************ +BOOL NPC_TransmigratiomWarp(int meindex, int toindex, char *buf) +{ + char buf2[512]; + char buf3[128]; + char buf4[64]; + int floor=0 , x = 0, y = 0; + int i = 1; + int ret; + + //请褥翘仍午及椭瘀毛 仁 + while(getStringFromIndexWithDelim( buf,",",i,buf2,sizeof( buf2)) + != FALSE) + { + i++; + if(strstr(buf2,"Warp") != NULL) + { + getStringFromIndexWithDelim( buf2 ,"=" ,2, buf3 ,sizeof(buf3)); + //白夫失 + ret = getStringFromIndexWithDelim( buf3,".",1 ,buf4 ,sizeof( buf4)); + if(ret ==FALSE) return FALSE; + floor = atoi(buf4); + // 甄 + ret = getStringFromIndexWithDelim( buf3,".",2 ,buf4 ,sizeof( buf4)); + if(ret ==FALSE) return FALSE; + x = atoi(buf4); + // 甄 + ret = getStringFromIndexWithDelim( buf3,".",3 ,buf4 ,sizeof( buf4)); + if(ret ==FALSE) return FALSE; + y = atoi(buf4); + + } + } + + + //伐□皿燮及民尼永弁 + if( MAP_IsValidCoordinate( floor, x, y )== FALSE ){ + return FALSE; + } + + //ttom + /* + { + int tenseiNo; + tenseiNo=CHAR_getInt( toindex, CHAR_TRANSMIGRATION); + CHAR_setInt( toindex,CHAR_SKILLUPPOINT,tenseiNo*10); + print("\n the set the skillpoint %d",tenseiNo*10); + CHAR_sendStatusString( toindex , "P"); + } + */ + //ttom + + //伐□皿今六月 + CHAR_warpToSpecificPoint(toindex, floor, x, y); + + return TRUE; + +} + +//************************************************************ +//*请 鳔及民尼永弁 +// +// 曰袄“ +// ㄟ“扔丞幼伙 +// ㄠ“穴伉瓜旦 +// ㄡ“斥乓斥乓 +// ㄢ“市伙正□瓜 +// ≡ㄠ“巨仿□ +//************************************************************ +int NPC_StartpointCheck(int meindex,int talker) +{ + int point; + int shift = 0; + point = CHAR_getInt( talker, CHAR_SAVEPOINT); + for(shift = 0; shift < 4 ;shift++){ + if( (point & ( 1<< shift)) == ( 1<< shift)) { + return shift; + } + } + return -1; +} + +//******************************************************** +// +// 鳖戏椭瘀毛 凶仄化中月井升丹井及民尼永弁 +// +// 曰袄 +// 岳 “鳖戏荚醒 +// 撩 “-1 +// +//******************************************************** +static int NPC_TransmigrationCheck(int meindex, int talker) +{ + // 鳖戏椭瘀 + //伊矛伙互ㄧㄟ动晓 + //ㄣ勾及箪岭奶矛件玄互蔽歹匀化中月仇午 + // 蔽奶矛件玄毛仇卅允[(仇木反中日氏井卅 + int i,j,k=0; + int ch_no[4] = {39,40,42,46}; + int petindex; + int num; +// int petid[4] = {1, 2, 3, 4}; //矢永玄及 毛隙烂 + int petid[4] = {693, 694, 695, 696}; //矢永玄及 毛隙烂 +// int petidfinal[4] = {11, 12, 13, 14}; //矢永玄及 毛隙烂 + int petidfinal[4] = {693, 694, 695, 696}; //矢永玄及 毛隙烂 + + // Robin 2001/03/05 + //CHAR_setWorkInt(talker,CHAR_TENSEICHECKED,FALSE); + //手仄ㄤ荚动晓卅日鳖戏匹五卅中[ +#ifdef _TRANS_6 + if(CHAR_getInt( talker, CHAR_TRANSMIGRATION) >= 6){ + return 6; + } +#else + if(CHAR_getInt( talker, CHAR_TRANSMIGRATION) >= 5){ + return 5; + } +#endif + + //伊矛伙互ㄧㄟ动晓 + if(CHAR_getInt( talker, CHAR_LV) < 80) return -1; + + //奶矛件玄及白仿弘民尼永弁 +#ifdef _TRANS_6 + if(CHAR_getInt( talker, CHAR_TRANSMIGRATION) < 6){ +#else + if(CHAR_getInt( talker, CHAR_TRANSMIGRATION) < 5){ +#endif + for(i = 0; i < 4 ;i++) + if(NPC_EventCheckFlg( talker, ch_no[i] ) == FALSE) return -1; + } + + num = CHAR_getInt(talker, CHAR_TRANSMIGRATION); + + if(num < 4 ){ + //隙烂矢永玄毛手匀化中月井矢永玄民尼永弁 + for(i=0 ; i < CHAR_MAXPETHAVE ; i++){ + petindex = CHAR_getCharPet( talker, i); + if( petindex == -1 ) continue; + //ttom + //print("petid=%d ",CHAR_getInt( petindex, CHAR_PETID)); + //矢永玄及 反域踝井" + if(CHAR_getInt( petindex, CHAR_PETID) != petid[num]) continue; + + //矢永玄及伊矛伙反椭瘀毛 凶仄化中月井 +// if(CHAR_getInt( petindex, CHAR_LV) < PETLEVEL) continue; + //仇仇引匹五凶日公及矢永玄反 午 蝇 + break; + } + if(i == CHAR_MAXPETHAVE) return -1; + }else +#ifdef _TRANS_6 + if( num == 4 ) +#endif + { + for(j = 0; j < 4 ;j++){ + //诡荚 及桦宁反ㄣ 毛民尼永弁 + for(i=0 ; i < CHAR_MAXPETHAVE ; i++){ + petindex = CHAR_getCharPet( talker, i); + if( petindex == -1 ) continue; + // print("petid=%d ",CHAR_getInt( petindex, CHAR_PETID)); + //矢永玄及 反域踝井" + if(CHAR_getInt( petindex, CHAR_PETID) != petidfinal[j]) continue; + k++; + break; + } + } + if(k < 4) return -1; + } +#ifdef _TRANS_6 + else{ + /*int lasttalkelder = 2;//乌力 + if( CHAR_getInt( talker, CHAR_LASTTALKELDER) == 1 )//玛丽娜丝 + lasttalkelder = 112;//凯比 + else if( CHAR_getInt( talker, CHAR_LASTTALKELDER) == 2 )//加加 + lasttalkelder = 102;//克克尔 + else if( CHAR_getInt( talker, CHAR_LASTTALKELDER) == 3 )//卡鲁它那 + lasttalkelder = 34;//威伯 + print("\npetid:%d",lasttalkelder);*/ + + //找看看有没有带2转出生宠物 + for(i=0 ; i < CHAR_MAXPETHAVE ; i++){ + petindex = CHAR_getCharPet( talker, i); + if( petindex == -1 ) continue; + if( CHAR_getInt( petindex, CHAR_TRANSMIGRATION) == 2 + && ( CHAR_getInt( petindex, CHAR_PETID) == 2 + || CHAR_getInt( petindex, CHAR_PETID) == 112 + || CHAR_getInt( petindex, CHAR_PETID) == 102 + || CHAR_getInt( petindex, CHAR_PETID) == 34 ) ) break; + //if(CHAR_getInt( petindex, CHAR_TRANSMIGRATION) != 2 || CHAR_getInt( petindex, CHAR_PETID) != lasttalkelder ) continue; + } + if(i == CHAR_MAXPETHAVE){ + CHAR_talkToCli( talker,-1,"你没有带2转的出生宠哦!",CHAR_COLORWHITE); + return -1; + } + + + if(NPC_EventCheckFlg( talker, 63) == FALSE){ print("\nerr63");return -1;} + if(NPC_EventCheckFlg( talker, 136) == FALSE){ print("\nerr136");return -1;} + if(NPC_EventCheckFlg( talker, 175) == FALSE){ print("\nerr175");return -1;} + if(NPC_EventCheckFlg( talker, 176) == FALSE){ print("\nerr176");return -1;} + //检查有无15个魔界之门碎片 + j=0; + for( i=0 ; i 6) + CHAR_setInt(toindex ,CHAR_TRANSMIGRATION,6); + if( CHAR_getInt(toindex,CHAR_TRANSMIGRATION) == 6 )//6转後所送的宠 + present = 2546; +#else + if(CHAR_getInt( toindex, CHAR_TRANSMIGRATION) > 5) + CHAR_setInt(toindex ,CHAR_TRANSMIGRATION,5); +#endif + NPC_TransmigrationStatus(meindex, toindex, work); + NPC_TransmigrationFlg_CLS(meindex, toindex); + CHAR_setInt(toindex, CHAR_LV ,1); + CHAR_setMaxExp( toindex, 0); + +#ifdef _TRANS_6 +//删除魔界之门碎片 + for( i=0 ; i> 16 ) & 0xFFFF); + level = (float)(( equ >> 0 ) & 0xFFFF); + //tttom + //print("\n this test equ=%d,quest=%f,level=%f",equ,quest,level); + //鳖戏荚醒 + num = CHAR_getInt(toindex, CHAR_TRANSMIGRATION); // 前面已加1,故0转1时为1 + tmp = (float)para / 100; +#ifdef _TRANS_6 + if (num == 6) tmp = 620; // 六转生时旧点数不计 +#endif + ans =(float)tmp/12 + (float)(quest / 4) +( (float)(level- num * 85) /4); + return (int)ans; +} + +//******************************************************* +// 铨桩诡 +//******************************************************* +float Rounding(float work,int num) +{ + + float p; + + if(num <0 ) return work; + num--; + p = (float)pow(10,num); + + return ( (work * p + 0.5) /p); + + +} + +//******************************************************* +// +// 旦 □正旦楮溢及凳蕙 +// +//******************************************************* +BOOL NPC_TransmigrationStatus(int meindex, int toindex,int work[10]) +{ + int vital, str, tgh, dex; + int quest , level ,equ; + int t_quest, t_level; + int total,ans; + float tmp,lvup; + + vital = CHAR_getInt(toindex,CHAR_VITAL); + str = CHAR_getInt(toindex,CHAR_STR); + tgh = CHAR_getInt(toindex,CHAR_TOUGH); + dex = CHAR_getInt(toindex,CHAR_DEX); + + + //弁巨旦玄白仿弘毛民尼永弁 + quest = NPC_TransmigrationQuestCheck( toindex); + //伊矛伙 + level = CHAR_getInt(toindex,CHAR_LV); + + work[0] = level; + work[1] = quest; + + equ = CHAR_getInt(toindex, CHAR_TRANSEQUATION); + + t_quest = (float)(( equ >> 16 ) & 0xFFFF); + t_level = (float)(( equ >> 0 ) & 0xFFFF); + + if( level > 130 ) level = 130; + t_quest = t_quest + quest; + t_level = t_level + level; + + CHAR_setInt(toindex, CHAR_TRANSEQUATION, + ( t_quest << 16 )+( t_level << 0 ) + ); + + total = vital + str + tgh + dex; + ans = NPC_TransCalculation(toindex, total); + + work[2] = vital; + tmp = (float)vital/total * ans; + work[3] = Rounding(tmp,1) * 100; + + work[4] = str; + tmp = (float)str/total * ans; + work[5] = Rounding(tmp,1) * 100; + + work[6] = tgh; + tmp = (float)tgh/total * ans; + work[7] = Rounding(tmp,1) * 100; + + work[8] = dex; + tmp = (float)dex/total * ans; + work[9] = Rounding(tmp,1) * 100; + + //vital本永玄 + if(work[3] < 0) work[3] = 0; + CHAR_setInt(toindex, CHAR_VITAL, work[3]); + //str本永玄 + if(work[5] < 0) work[5] = 0; + CHAR_setInt(toindex, CHAR_STR, work[5]); + + //tghr本永玄 + if(work[7] < 0) work[7] = 0; + CHAR_setInt(toindex, CHAR_TOUGH, work[7]); + + //dex本永玄 + if(work[9] < 0) work[9] = 0; + CHAR_setInt(toindex, CHAR_DEX, work[9]); + + + + //伊矛伙 禾奶件玄手 凳 + lvup = CHAR_getInt(toindex, CHAR_SKILLUPPOINT ); +/*#ifdef _TRANS_6 + if( CHAR_getInt(toindex, CHAR_TRANSMIGRATION) == 6) + lvup = 620; +#endif*/ + lvup = lvup / 12; + lvup = Rounding(lvup, 1); + if(lvup < 0) lvup = 0; + CHAR_setInt(toindex, CHAR_SKILLUPPOINT, (int)lvup); + + /* 旦平伙失永皿匹五凶日仇木毛霜月 */ + if( CHAR_getInt( toindex,CHAR_SKILLUPPOINT ) >=1 ) + CHAR_Skillupsend(toindex); + + + return TRUE; + + +} + + +/*---------------------------- + * 矢永玄毛馨笛允月 + ------------------------------*/ +BOOL NPC_TransmigrationAddPet(int meindex, int talker, int petid) +{ + int ret; + char msgbuf[64]; + int enemynum; + int i,j; + int petindex; + int petindex2; + for( i = 0 ;i < CHAR_MAXPETHAVE ; i++) { + petindex = CHAR_getCharPet( talker, i); + if( petindex == -1 ) break; + } + if(i == CHAR_MAXPETHAVE) return FALSE; + enemynum = ENEMY_getEnemyNum(); + for( i = 0; i < enemynum; i ++ ) { + if( ENEMY_getInt( i, ENEMY_ID) == petid) { + break; + } + } + + if( i == enemynum ) return FALSE; + + ret = ENEMY_createPetFromEnemyIndex( talker, i); + + for( i = 0; i < CHAR_MAXPETHAVE; i ++ ){ + if( CHAR_getCharPet( talker, i ) == ret )break; + } + if( i == CHAR_MAXPETHAVE ) i = 0; + if( CHAR_CHECKINDEX( ret ) == TRUE ){ + CHAR_setMaxExpFromLevel( ret, CHAR_getInt( ret, CHAR_LV )); + } + + petindex2 = CHAR_getCharPet(talker, i); + if( !CHAR_CHECKINDEX( petindex2) ) return FALSE; + + snprintf( msgbuf,sizeof( msgbuf), "拿到%s。", + CHAR_getChar(petindex2,CHAR_NAME)); + CHAR_talkToCli( talker, -1, msgbuf, CHAR_COLORWHITE); + for(j = 0; j < CHAR_MAXPETHAVE; j++){ + petindex = CHAR_getCharPet(talker, j); + if( !CHAR_CHECKINDEX( petindex) ) continue; + CHAR_complianceParameter( petindex ); + snprintf( msgbuf, sizeof( msgbuf ), "K%d", j ); + CHAR_sendStatusString( talker, msgbuf ); + snprintf( msgbuf, sizeof( msgbuf ), "W%d", j ); + CHAR_sendStatusString( talker, msgbuf ); + } + // 矢永玄毛澎卞 木凶夫弘 + LogPet( + CHAR_getChar( talker, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( talker, CHAR_CDKEY ), + CHAR_getChar( petindex2, CHAR_NAME), + CHAR_getInt( petindex2, CHAR_LV), + "TenseiGet", + CHAR_getInt( talker,CHAR_FLOOR), + CHAR_getInt( talker,CHAR_X ), + CHAR_getInt( talker,CHAR_Y ), + CHAR_getChar( petindex2, CHAR_UNIQUECODE) // shan 2001/12/14 + ); + + return TRUE; + +} + +#ifdef _TEACHER_SYSTEM +extern int FMAdvTbl[]; +#endif + +int NPC_TransmigrationFlg_CLS(int meindex, int toindex) +{ +#ifdef _TEACHER_SYSTEM + int iGetFame = 0; +#endif +#ifdef _PET_TRANS +#ifdef _PROSK99 + int endevflg[]={69,70,71,72,109,118,122,131,127,158,159,181,-1};//181:白狼奖品 +#else + int endevflg[]={69,70,71,72,109,118,122,131,127,158,159,-1}; +#endif + int nowevflg[]={69,70,71,72,-1}; +#endif +#ifdef _TRANS_6 + int flg[6] = {48,49,50,51,52,179}; +#else + int flg[5] = {48,49,50,51,52}; +#endif + int num= CHAR_getInt(toindex ,CHAR_TRANSMIGRATION); + int i; +#ifdef _PET_TRANS + i=0; + while(endevflg[i] != -1 ) { + if( NPC_EventCheckFlg( toindex, endevflg[i] ) == FALSE ) { + endevflg[i] = 0; + } + i++; + } + i=0; + while( nowevflg[i] != -1 ) { + if( NPC_NowEventCheckFlg( toindex, nowevflg[i] ) == FALSE ) { + nowevflg[i] = 0; + } + i++; + } +#endif + + CHAR_setInt(toindex,CHAR_ENDEVENT,0); + CHAR_setInt(toindex,CHAR_ENDEVENT2,0); + CHAR_setInt(toindex,CHAR_ENDEVENT3,0); +#ifdef _NEWEVENT + CHAR_setInt(toindex,CHAR_ENDEVENT4,0); + CHAR_setInt(toindex,CHAR_ENDEVENT5,0); + CHAR_setInt(toindex,CHAR_ENDEVENT6,0); +#endif + CHAR_setInt(toindex,CHAR_NOWEVENT,0); + CHAR_setInt(toindex,CHAR_NOWEVENT2,0); + CHAR_setInt(toindex,CHAR_NOWEVENT3,0); +#ifdef _NEWEVENT + CHAR_setInt(toindex,CHAR_NOWEVENT4,0); + CHAR_setInt(toindex,CHAR_NOWEVENT5,0); + CHAR_setInt(toindex,CHAR_NOWEVENT6,0); +#endif +#ifdef _ADD_NEWEVENT // WON 多增任务旗标 + CHAR_setInt(toindex,CHAR_ENDEVENT7,0); + CHAR_setInt(toindex,CHAR_NOWEVENT7,0); + CHAR_setInt(toindex,CHAR_ENDEVENT8,0); + CHAR_setInt(toindex,CHAR_NOWEVENT8,0); +#endif + + //鳖戏白仿弘毛 化月 +#ifdef _PET_TRANS + i=0; + while( endevflg[i] != -1 ) { + if( endevflg[i] > 0 ) { + // shan Begin + //NPC_EventSetFlg( toindex, endevflg[i]); + s_eventsetend(toindex, endevflg[i]); + // End + } + i++; + } + i=0; + while( nowevflg[i] != -1 ) { + if( nowevflg[i] > 0 ) { + NPC_NowEventSetFlg( toindex, nowevflg[i]); + } + i++; + } + +#endif + + for(i = 0 ;i < num ;i++) { + NPC_EventSetFlg(toindex, flg[i]); + // CoolFish: Family Adv 2001/8/4 + AddFMAdv(toindex, flg[i]); +#ifdef _TEACHER_SYSTEM + // 累加所得声望 + if(flg[i] < 179) iGetFame += FMAdvTbl[flg[i]]; +#endif + } +#ifdef _TEACHER_SYSTEM + iGetFame /= 20; // 导师获得学生所得声望的 5% (1/20) + // 检查所得的声望有没有大於0 + if(iGetFame > 0){ + // 检查有没有导师 + if(strlen(CHAR_getChar(toindex,CHAR_TEACHER_ID)) > 0 && strlen(CHAR_getChar(toindex,CHAR_TEACHER_NAME)) > 0){ + int iPlayernum = CHAR_getPlayerMaxNum(); + char szMsg[128]; + + // 检查导师在不在线上 + for(i=0;i= 0 ) + errtype = 3; + + if( errtype >= 0 ) { + if( NPC_Util_GetStrFromStrWithDelim( buf,errchar[ errtype], token,sizeof( token)) == NULL ) { + print("\n ERROR str errchar !!"); + return; + } + buttontype = WINDOW_BUTTONTYPE_OK; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_PETTRANS_END; + break; + } + if( NPC_Util_GetStrFromStrWithDelim( buf,"selectmsg", token,sizeof( token)) == NULL ) { + print("\n ERROR selectmsg !!"); + return; + } + CHAR_setWorkInt( toindex, CHAR_WORKSHOPRELEVANT, 1); + windowno = CHAR_WINDOWTYPE_PETTRANS_SELECT; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + buttontype=WINDOW_BUTTONTYPE_YESNO; + break; + + case 2: //选宠 + if( NPC_Util_GetStrFromStrWithDelim( buf,"setpetmsg", token,sizeof( token)) == NULL ) { + print("\n ERROR setpetmsg !!"); + return; + } + buttontype = WINDOW_BUTTONTYPE_NONE; + windowtype = WINDOW_MESSAGETYPE_PETSELECT; + windowno = CHAR_WINDOWTYPE_PETTRANS_SELPET; + break; + + case 3: //宠物转生 确定/取消 + if( NPC_Util_GetStrFromStrWithDelim( buf,"transmsg", buf1,sizeof( buf1)) == NULL ){ + print("\n ERROR transmsg !!"); + return; + } + strcpy( token,"\0"); + petindex = CHAR_getCharPet( toindex, select-1); + petname = CHAR_getUseName( petindex); + sprintf(token, "\n是[%s]没错吧? \n\n %s",petname,buf1); + + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + buttontype = WINDOW_BUTTONTYPE_YESNO; + windowno = CHAR_WINDOWTYPE_PETTRANS_MAIN1; + break; + + case 4: //宠物转生 CHAR_TRANSMIGRATION + //转生条件判断 + petindex = CHAR_getCharPet( toindex, select-1); + if( !CHAR_CHECKINDEX( petindex) ) { + return; + } + if( CHAR_getInt( petindex, CHAR_FUSIONBEIT ) == 1 ) { + sprintf(token, "\n\n融合过的宠物不能转生喔!"); + CHAR_setWorkInt( toindex, CHAR_WORKSHOPRELEVANT, 0); + }else +#ifdef _PET_2TRANS + if( CHAR_getInt( toindex, CHAR_RIDEPET ) == select-1 /*&& CHAR_getInt( petindex, CHAR_TRANSMIGRATION ) > 0*/ ){//骑乘中的宠物不能转生 + sprintf(token, "\n\n骑乘中的宠物不能转生喔!"); + }else +#endif + if( CHAR_getInt( petindex, CHAR_LV) < 80 ) { + sprintf(token, "\n\n接受转生祝福的宠物必需要等级80以上喔!"); + CHAR_setWorkInt( toindex, CHAR_WORKSHOPRELEVANT, 0); + }else if( CHAR_getInt( petindex, CHAR_PETID) == 718 +#ifdef _PET_2TRANS + || CHAR_getInt( petindex, CHAR_PETID) == 401 +#endif + ){ + sprintf(token, "\n\n这只宠物不能转生喔!"); + CHAR_setWorkInt( toindex, CHAR_WORKSHOPRELEVANT, 0); +#ifdef _PET_2TRANS + }else if( CHAR_getInt( petindex, CHAR_TRANSMIGRATION ) > 1 ) { +#else + }else if( CHAR_getInt( petindex, CHAR_TRANSMIGRATION ) > 0 ) { +#endif + sprintf(token, "\n\n这只宠物已经接受过祝福了喔!"); + CHAR_setWorkInt( toindex, CHAR_WORKSHOPRELEVANT, 0); + //检查宠物是否重复转生 + }else { // 转生OK + petindex = CHAR_getCharPet( toindex, select-1); + if( NPC_PetTransManStatus( meindex, toindex, petindex) == FALSE ) + return; + if( NPC_Util_GetStrFromStrWithDelim( buf,"main1msg", token,sizeof( token)) == NULL ) + return; + } + + buttontype = WINDOW_BUTTONTYPE_OK; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_PETTRANS_END; //结束 + break; + + case 5: //宠物转生取消 + if( NPC_Util_GetStrFromStrWithDelim( buf,"cancelmsg", token,sizeof( token)) == NULL ) + return; + CHAR_setWorkInt( toindex, CHAR_WORKSHOPRELEVANT, 0); + buttontype = WINDOW_BUTTONTYPE_OK; + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = CHAR_WINDOWTYPE_PETTRANS_END; //结束 + break; + + default: + break; + } + lssproto_WN_send( fd, windowtype, buttontype, windowno, CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), token); + +} + +int NPC_PetTransManCheck( int meindex, int toindex, int select) +{ + //char errchar[][56]={"errormy","erroritem","errorpet","failmsg"}; + int i; + int petindex = 0; + char token[256]; + int PetEvent_no[3]={4,69,70}; + //int PetEvent_no[3]={4,4,4}; + + int petNum = 0; + //宠物转生条件 + if( CHAR_getInt( toindex, CHAR_LV ) < 80 ) { + return 0; + }else { + //检查任务的FLAG 是否已完成宠转需要的任务 + for(i = 0; i < 3 ;i++) { + if( NPC_EventCheckFlg( toindex, PetEvent_no[i] ) == FALSE) { + return 0; + } + } + //检查所需(宠物/精灵) & 检查所需物品 + for(i=0 ; i < CHAR_MAXPETHAVE ; i++) { + petindex = CHAR_getCharPet( toindex, i); + if( petindex == -1 ) + continue; + //检查宠物的 ID 是否为玛雷菲雅 1479 ID 为718 + if(CHAR_getInt( petindex, CHAR_PETID) == 718 +#ifdef _PET_2TRANS + || CHAR_getInt( petindex, CHAR_PETID) == 401 +#endif + ){ + petNum ++; + if( CHAR_getInt( petindex, CHAR_LV) > 79 ) { + return 0; + }else if( CHAR_getInt( petindex, CHAR_LV) == 79 ) { + if( strcmp( CHAR_getChar( petindex, CHAR_OWNERCDKEY), CHAR_getChar( toindex, CHAR_CDKEY) ) || + strcmp( CHAR_getChar( petindex, CHAR_OWNERCHARANAME), CHAR_getChar( toindex, CHAR_NAME) )) { + sprintf( token,"你身上的玛雷菲雅,并不是你的啊!"); + CHAR_talkToCli( toindex, -1, token, CHAR_COLORWHITE); + return 0; + } + } + } + } + + if( petNum > 1 ) { + sprintf( token,"你怎会有那麽多玛雷菲雅呢?"); + CHAR_talkToCli( toindex, -1, token, CHAR_COLORWHITE); + print("\n error PetTrans : (PETID = 718) > 1 !!"); + return 0; + }else if( petNum != 1 ) { + print("\n 宠转发生错误 !!"); + return 0; + } + } + return -1; +} + +BOOL NPC_PetTransManStatus( int meindex, int toindex, int petNo) +{ + int petindex; + int LevelUpPoint = 0,petrank = 0; + int i,j,k,itemindex,itemID,count; + int vital1,str1,tgh1,dex1; + int vital2,str2,tgh2,dex2; + char token[128]; + int total1,total2,total,petLV,ans; + int petID,enemynum,ret; + int work[4]={0,0,0,0}; + struct PetTransDelItem { + int minItemID; + int maxItemID; + }DelItem[3] = { {19629,19632} , {19672,19687} , {19625,19628} }; +#define RAND(x,y) ((x-1)+1+ (int)( (double)(y-(x-1))*rand()/(RAND_MAX+1.0)) ) +#ifdef _PET_2TRANS + int tran = CHAR_getInt ( petNo, CHAR_TRANSMIGRATION ); + int tpetidx1,tpetidx2; + if( tran == 0 ){ + tpetidx1 = 718; + tpetidx2 = 401; + } + else{ + tpetidx1 = 401; + tpetidx2 = 401; + } +#endif + + for(i=0 ; i < CHAR_MAXPETHAVE ; i++) { + petindex = CHAR_getCharPet( toindex, i); + if( petindex == -1 ) + continue; + if( +#ifdef _PET_2TRANS + CHAR_getInt( petindex, CHAR_PETID) == tpetidx1 + || CHAR_getInt( petindex, CHAR_PETID) == tpetidx2 +#else + CHAR_getInt( petindex, CHAR_PETID) == 718 +#endif + ){ + if( CHAR_getInt( petindex, CHAR_LV) == 79 ){ + if( strcmp( CHAR_getChar( petindex, CHAR_OWNERCDKEY), CHAR_getChar( toindex, CHAR_CDKEY) ) || + strcmp( CHAR_getChar( petindex, CHAR_OWNERCHARANAME), CHAR_getChar( toindex, CHAR_NAME) )) { + continue; + } + break; + } + } + } + if(i == CHAR_MAXPETHAVE) { + print("\n 宠物转生发生错误 !!"); + return FALSE; + } + + LevelUpPoint = CHAR_getInt( petindex, CHAR_ALLOCPOINT ); + petrank = CHAR_getInt( petindex, CHAR_PETRANK ); + + vital1 = (float)(( LevelUpPoint >> 24 ) & 0xFF); + str1 = (float)(( LevelUpPoint >> 16 ) & 0xFF); + tgh1 = (float)(( LevelUpPoint >> 8 ) & 0xFF); + dex1 = (float)(( LevelUpPoint >> 0 ) & 0xFF); + total1 = ( vital1 + str1 + tgh1 + dex1 ); + if( total1 > 150 ) total1 = 150; + if( total1 < 0 ) total1 = 0; + LevelUpPoint = CHAR_getInt( petNo, CHAR_ALLOCPOINT ); + petrank = CHAR_getInt( petNo, CHAR_PETRANK ); + petLV = CHAR_getInt( petNo, CHAR_LV); + vital2 = (float)(( LevelUpPoint >> 24 ) & 0xFF); + str2 = (float)(( LevelUpPoint >> 16 ) & 0xFF); + tgh2 = (float)(( LevelUpPoint >> 8 ) & 0xFF); + dex2 = (float)(( LevelUpPoint >> 0 ) & 0xFF); + total2 = ( vital2 + str2 + tgh2 + dex2 ); + +#ifdef _PET_2TRANS + ans = NPC_PetTransManGetAns( total1, total2, petLV, petrank, CHAR_getInt( petNo, CHAR_TRANSMIGRATION ) ); +#else + ans = NPC_PetTransManGetAns( total1, total2, petLV, petrank); +#endif + total = total1 + (total2*4); + + work[0] = ( ans * ( vital1 + (vital2*4) ) ) / total; + work[1] = ( ans * ( str1 + (str2*4) ) ) / total; + work[2] = ( ans * ( tgh1 + (tgh2*4) ) ) / total; + work[3] = ( ans * ( dex1 + (dex2*4) ) ) / total; +//取array========================= + enemynum = ENEMY_getEnemyNum(); + for(i=0;i= DelItem[j].minItemID ) && ( itemID <= DelItem[j].maxItemID ) ) { + LogItem( + CHAR_getChar( toindex, CHAR_NAME ), + CHAR_getChar( toindex, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID), +#endif + "WarpManDelItem", + CHAR_getInt( toindex, CHAR_FLOOR), + CHAR_getInt( toindex, CHAR_X ), + CHAR_getInt( toindex, CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + CHAR_DelItem( toindex, i); + } + + }//for(j) + } + } + + NPC_NowEventSetFlg( toindex, 71 ); + + return TRUE; +} + + + +// shan add +void s_eventsetend( int charaindex, int shiftbit ) +{ +#ifdef _ADD_NEWEVENT // WON 多增任务旗标 + int event_num = 8; +#else + int event_num = 6; +#endif + int point; + int array; + int shift; + + array = shiftbit / 32; + shift = shiftbit % 32; + + if( array>=event_num ){ + //print("错误!!所设的任务旗标编号已超过 围(0~%d)。",32*event_num-1); + return; + } + point = CHAR_getInt( charaindex, CHAR_ENDEVENT+array); + point = point | (1< +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "configfile.h" +#include "lssproto_serv.h" +#include "saacproto_cli.h" +#include "npc_verywelfare.h" + +#ifdef _NPC_VERYWELFARE + +static void NPC_VeryWelfare_selectWindow(int meindex, int toindex, int num, int select); + +//载入非常好康NPC的初始化 +BOOL NPC_VeryWelfareInit( int meindex ) +{ + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPEVERYWELFARE); + print("\n名称:%s\n",CHAR_getChar( meindex, CHAR_NAME)); + return TRUE; +} + +//对话时的处理 +void NPC_VeryWelfareTalked( int meindex , int talkerindex , char *szMes ,int color ) +{ + if( NPC_Util_isFaceToFace( talkerindex, meindex , 1 ) == FALSE ) + return; + //开始的选择画面 + NPC_VeryWelfare_selectWindow( meindex, talkerindex, 0, -1); +} + +static void NPC_VeryWelfare_selectWindow( int meindex, int toindex, int num,int select) +{ + int buttontype = 0,windowtype = 0,windowno = 0; + char buf[256]; + int fd = getfdFromCharaIndex( toindex); + char token[256]; + if( fd == -1 ) + return; + switch(num) + { + case 0: + sprintf(token,"%s","我是非常好康A的NPC,我将提供最好康A的服务。"); + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = NPC_VERYWELFARE_START; + lssproto_WN_send( fd, windowtype, WINDOW_BUTTONTYPE_OK, windowno, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX),token); + break; + case 1: + sprintf(token,"%s","2\n请选择以下的选项\n\n提升生命力\n提升魔法力"); + windowtype = WINDOW_MESSAGETYPE_SELECT; + windowno = NPC_VERYWELFARE_NO1; + lssproto_WN_send( fd, windowtype, buttontype, windowno, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + makeEscapeString( token, buf, sizeof(buf))); + break; + case 2: + sprintf(token,"%s","我要提高生命力"); + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = NPC_VERYWELFARE_NO2; + lssproto_WN_send( fd, windowtype, buttontype, windowno, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + makeEscapeString( token, buf, sizeof(buf))); + break; + case 3: + sprintf(token,"%s","我要提高魔法力"); + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + windowno = NPC_VERYWELFARE_NO3; + lssproto_WN_send( fd, windowtype, buttontype, windowno, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + makeEscapeString( token, buf, sizeof(buf))); + break; + } + +} + +void NPC_VeryWelfareWindowTalked( int meindex, int talkerindex, + int seqno, int select, char *data) +{ + + print("\n选:%d",select); + //int datanum = atoi( data); + switch( seqno){ + + case NPC_VERYWELFARE_START: + NPC_VeryWelfare_selectWindow(meindex, talkerindex, 1, 0); + break; + case NPC_VERYWELFARE_NO1: + NPC_VeryWelfare_selectWindow(meindex, talkerindex, 2, 1); + break; + case NPC_VERYWELFARE_NO2: + NPC_VeryWelfare_selectWindow(meindex, talkerindex, 3, 1); + break; + default: + break; + } +} + +#endif diff --git a/gmsv/npc/npc_warp.c b/gmsv/npc/npc_warp.c new file mode 100644 index 0000000..8827dbf --- /dev/null +++ b/gmsv/npc/npc_warp.c @@ -0,0 +1,380 @@ +#include "version.h" +#include +#include "object.h" +#include "char_base.h" +#include "char.h" +#include "map_deal.h" +#include "readmap.h" +#include "npccreate.h" +#include "npcutil.h" +#include "handletime.h" +#include "npc_eventaction.h" + +//#define _RECORD_NPCMAN_ //纪录 + +BOOL NPC_TimeWarpCheck(int meindex,char *buf,int mode); + +static void NPC_WarpsetNeverMake( int charaindex ) +{ + int cindex; + cindex = CHAR_getInt(charaindex,CHAR_NPCCREATEINDEX); + if( NPC_CHECKCREATEINDEX(cindex) ) + NPC_create[cindex].workdata[NPC_CREATEWORKNEVERMAKE] = 1; +} + +BOOL NPC_WarpInit( int charaindex ) +{ + char arg[NPC_UTIL_GETARGSTR_BUFSIZE]; + int ret; + int floor=-1,x=-1,y=-1; + char token[128]; + +#ifdef _RECORD_NPCMAN_ //纪录 + char evtype[256]; + char evtime[256]; + char argfile[256]; + + if( NPC_Util_CheckAssignArgFile( charaindex, argfile) == NULL ) + sprintf( argfile, "NULL"); +#endif + + CHAR_setInt( charaindex, CHAR_WHICHTYPE , CHAR_TYPEWARP ); + if( NPC_Util_GetArgStr( charaindex, arg, sizeof( arg)) == NULL ) { + print("\n GetArgStr ERR!!"); + return FALSE; + } +#ifdef _NEW_WARPPOINT + if( strstr( arg, "FREEMORE") != NULL ) { +#ifdef _RECORD_NPCMAN_ //纪录 + sprintf( evtype, "FREE"); + sprintf( evtime, "NULL"); +#endif + CHAR_setWorkInt( charaindex, CHAR_WORKEVENTTYPE, CHAR_EVENT_WARP); + }else { +#endif +#ifdef _MAP_WARPPOINT + return FALSE; +#endif +#ifdef _RECORD_NPCMAN_ //纪录 + sprintf( evtype, "NONE"); +#endif + ret=getStringFromIndexWithDelim(arg,"|", 1,token,sizeof(token)); + if( ret ) floor = atoi( token ); + ret=getStringFromIndexWithDelim(arg,"|", 2,token,sizeof(token)); + if( ret ) x = atoi( token ); + ret=getStringFromIndexWithDelim(arg,"|", 3,token,sizeof(token)); + if( ret ) y = atoi( token ); + if( MAP_IsValidCoordinate( floor,x,y )== FALSE ){ + NPC_WarpsetNeverMake( charaindex ); + //print( "Warp NPC:Invalid arg:%s\n", arg ); + print( "Warp Npc Err:%d:%d:%d->(%s)\n", + CHAR_getInt( charaindex, CHAR_FLOOR ), + CHAR_getInt( charaindex, CHAR_X ), + CHAR_getInt( charaindex, CHAR_Y ), + arg ); + return FALSE; + } + ret=getStringFromIndexWithDelim(arg,"|",4,token,sizeof(token)); + if(ret==TRUE){ + int day; + day=NPC_TimeWarpCheck(charaindex,token,0); + if(day==0){ +#ifdef _RECORD_NPCMAN_ //纪录 + sprintf( evtime, "N"); +#endif + CHAR_setWorkInt( charaindex, CHAR_WORKEVENTTYPE, CHAR_EVENT_WARP_NIGHT); + }else if(day==1){ +#ifdef _RECORD_NPCMAN_ //纪录 + sprintf( evtime, "M"); +#endif + CHAR_setWorkInt( charaindex, CHAR_WORKEVENTTYPE, CHAR_EVENT_WARP_MORNING); + }else if(day==2){ +#ifdef _RECORD_NPCMAN_ //纪录 + sprintf( evtime, "A"); +#endif + CHAR_setWorkInt( charaindex, CHAR_WORKEVENTTYPE, CHAR_EVENT_WARP_NOON); + }else{ +#ifdef _RECORD_NPCMAN_ //纪录 + sprintf( evtime, "NULL"); +#endif + CHAR_setWorkInt( charaindex, CHAR_WORKEVENTTYPE, CHAR_EVENT_WARP); + } + }else{ +#ifdef _RECORD_NPCMAN_ //纪录 + sprintf( evtime, "NULL"); +#endif + CHAR_setWorkInt( charaindex, CHAR_WORKEVENTTYPE, CHAR_EVENT_WARP); + } +#ifdef _NEW_WARPPOINT + } +#endif + CHAR_setFlg( charaindex,CHAR_ISVISIBLE, 0 ); + CHAR_setFlg( charaindex,CHAR_ISOVERED,1 ); + CHAR_setFlg( charaindex,CHAR_ISATTACKED,0 ); + CHAR_setFlg( charaindex,CHAR_ISATTACK,0 ); + +#ifdef _RECORD_NPCMAN_ //纪录 + { + FILE *fp=NULL; + char filename[256]; + sprintf( filename,"./data/npc/%s", "mapwarp.txt"); + if( (fp = fopen( filename, "a+")) != NULL ) { + fprintf( fp, "%s:%s:%d,%d,%d:%d,%d,%d:%s\n", + evtype, evtime, + CHAR_getInt( charaindex, CHAR_FLOOR), + CHAR_getInt( charaindex, CHAR_X), + CHAR_getInt( charaindex, CHAR_Y), + floor, x, y, argfile ); + fclose( fp); + }else { + } + } +#endif + return TRUE; +} + +void NPC_WarpWarpCharacter( int warpnpcindex, int charaindex ) +{ + char arg[NPC_UTIL_GETARGSTR_BUFSIZE]; + int i=0; +#ifdef _NEW_WARPPOINT + char buf1[256], buf2[256], buf3[256], freemsg[256]; + BOOL nBefind = FALSE; + struct wapepoints { + int m_floor; + int m_x; + int m_y; + }Wpoint[10]={ + {-1,0,0}, {-1,0,0}, {-1,0,0}, {-1,0,0}, {-1,0,0}, + {-1,0,0}, {-1,0,0}, {-1,0,0}, {-1,0,0}, {-1,0,0} + }; + int iRand=0; +#endif + if( CHAR_getInt( charaindex,CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ){ + return; + } + + if( NPC_Util_GetArgStr( warpnpcindex, arg, sizeof( arg)) == NULL ){ + return; + } + + { + char token[16]; + int floor=0,x=0,y=0; + int ret; + +#ifdef _NEW_WARPPOINT + i=1; + if( strstr( arg, "FREEMORE") != NULL ) { + int k=1, pw=-1; + while( getStringFromIndexWithDelim( arg, "OVER", i, buf1, sizeof( buf1)) != FALSE ) { + i++; + if( NPC_Util_GetStrFromStrWithDelim( buf1, "FREE", buf2, sizeof( buf2)) == NULL ) + continue; + if( NPC_ActionPassCheck( warpnpcindex, charaindex, buf2) == FALSE ) { + continue; + }else { + iRand=0; + if( NPC_Util_GetStrFromStrWithDelim( buf1, "TO", buf2, sizeof( buf2)) != FALSE ) { + k=1; + while( getStringFromIndexWithDelim( buf2, "&", k, freemsg, sizeof( freemsg)) != FALSE ){ + k++; + if( getStringFromIndexWithDelim( freemsg, ",", 1, buf3, sizeof( buf3)) == FALSE ) + break; + Wpoint[iRand].m_floor = atoi( buf3); + if( getStringFromIndexWithDelim( freemsg, ",", 2, buf3, sizeof( buf3)) == FALSE ) + break; + Wpoint[iRand].m_x = atoi( buf3); + if( getStringFromIndexWithDelim( freemsg, ",", 3, buf3, sizeof( buf3)) == FALSE ) + break; + Wpoint[iRand].m_y = atoi( buf3); + iRand++; + nBefind = TRUE; + if( iRand >= arraysizeof( Wpoint)) + break; + } + break; + } + } + if( nBefind == TRUE ) + break; + } + + if( nBefind == FALSE || iRand <= 0){ //没找到条件 + floor = CHAR_getInt( warpnpcindex, CHAR_FLOOR); + x = CHAR_getInt( warpnpcindex, CHAR_X); + y = CHAR_getInt( warpnpcindex, CHAR_Y); + }else { + pw = RAND( 0, (iRand-1)); + floor = Wpoint[pw].m_floor; + x = Wpoint[pw].m_x; + y = Wpoint[pw].m_y; + if( NPC_Util_GetStrFromStrWithDelim( arg, "CHECKPARTY", buf1, sizeof( buf1)) != NULL ) { + if( strstr( buf1, "TRUE") != NULL ){ + if( CHAR_getWorkInt( charaindex, CHAR_WORKPARTYMODE ) == CHAR_PARTY_LEADER ) { + CHAR_DischargeParty( charaindex, 0); // 拆队 + } + } + } + if( MAP_IsValidCoordinate( floor,x,y )== FALSE ){ + print( "*Warp NPC:Invalid %d %d %d" , floor,x,y ); + return; + } + k=0; + } + }else { +#endif + ret=getStringFromIndexWithDelim(arg,"|", 1,token,sizeof(token)); + if( ret == FALSE )return; + floor = atoi( token ); + + ret=getStringFromIndexWithDelim(arg,"|", 2,token,sizeof(token)); + if( ret == FALSE )return; + x = atoi( token ); + + ret=getStringFromIndexWithDelim(arg,"|", 3,token,sizeof(token)); + if( ret == FALSE )return; + y = atoi( token ); +#ifdef _NEW_WARPPOINT + } +#endif + { + int ff=floor; + + int of=CHAR_getInt(charaindex, CHAR_FLOOR); + int fd=CHAR_getWorkInt( charaindex, CHAR_WORKFD); + int eqen=getEqNoenemy(fd); + if (eqen<200) { + if (eqen>=120) { + if ((ff==100)||(ff==200)||(ff==300)||(ff==400)||(ff==500)) { + if ((of!=100)&&(of!=200)&&(of!=300)&&(of!=400)&&(of!=500)) { + CHAR_talkToCli(charaindex, -1, + "太阳神的首饰发出一道奇异的光芒,隐藏了你的行踪。", CHAR_COLORWHITE); + } + } else { + if ((of==100)||(of==200)||(of==300)||(of==400)||(of==500)) { + CHAR_talkToCli(charaindex, -1, "环绕着你的光芒消失了。", CHAR_COLORWHITE); + } + } + } else if (eqen>=80) { + if ((ff==100)||(ff==200)||(ff==300)||(ff==400)) { + if ((of!=100)&&(of!=200)&&(of!=300)&&(of!=400)) { + CHAR_talkToCli(charaindex, -1, + "太阳神的首饰发出一道奇异的光芒,隐藏了你的行踪。", CHAR_COLORWHITE); + } + } else { + if ((of==100)||(of==200)||(of==300)||(of==400)) { + CHAR_talkToCli(charaindex, -1, "环绕着你的光芒消失了。", CHAR_COLORWHITE); + } + } + } else if (eqen>=40) { + if ((ff==100)||(ff==200)) { + if ((of!=100)&&(of!=200)) { + CHAR_talkToCli(charaindex, -1, + "太阳神的首饰发出一道奇异的光芒,隐藏了你的行踪。", CHAR_COLORWHITE); + } + } else { + if ((of==100)||(of==200)) { + CHAR_talkToCli(charaindex, -1, "环绕着你的光芒消失了。", CHAR_COLORWHITE); + } + } + } + } + } + +#ifdef _DROPSTAKENEW + { + i = 0; + for (i = 0; i < MAXSTAKENUM; i++){ + if (CHAR_getWorkInt(charaindex, CHAR_WORKSTAKETYPE1 + i) > 0){ + char tmpbuf[256]; + snprintf(tmpbuf, sizeof(tmpbuf), "由於你离开了房间,所以将无法取回彩券!"); + CHAR_setWorkInt(charaindex, CHAR_WORKSTAKETYPE1 + i, 0); + CHAR_talkToCli(charaindex, -1, tmpbuf, CHAR_COLORYELLOW); + } + } + CHAR_setWorkInt(charaindex, CHAR_WORKSTAKEFLAG, 0); +#ifdef _FIX_GAMBLENUM + if(CHAR_getInt(charaindex, CHAR_GAMBLENUM) < 0) + CHAR_setInt(charaindex, CHAR_GAMBLENUM, 0); +#endif + } +#endif + if( floor == -1) { + return; + }else { + if( MAP_IsValidCoordinate( floor,x,y )== FALSE ){ + print( "Warp NPC:Invalid %d %d %d" , floor,x,y ); + return; + } + + CHAR_warpToSpecificPoint(charaindex, floor, x, y); + } + } +} + +void NPC_WarpWatch( int meobjindex, int objindex, CHAR_ACTION act, + int x,int y,int dir, int* opt,int optlen ) +{ + int meindex,moveindex; + if( OBJECT_getType( objindex ) != OBJTYPE_CHARA )return; + + meindex = OBJECT_getIndex(meobjindex); + moveindex = OBJECT_getIndex(objindex); + + if( CHAR_getInt( moveindex,CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ){ + return; + } + if( act != CHAR_ACTWALK )return; + + if( opt[0] == x && opt[1] == y )return; + if( CHAR_getInt(meindex,CHAR_X) == x && CHAR_getInt(meindex,CHAR_Y) == y ) { + NPC_WarpWarpCharacter( meindex, moveindex ); + } +} + +void NPC_WarpPostOver( int meindex, int charaindex ) +{ + NPC_WarpWarpCharacter( meindex, charaindex ); +} + +int NPC_WarpSearchByPosition( int fl , int x, int y) +{ + OBJECT object; + for( object=MAP_getTopObj(fl,x,y) ; object ; + object=NEXT_OBJECT(object)){ + int objindex = GET_OBJINDEX(object); + if( OBJECT_getType( objindex ) == OBJTYPE_CHARA + && CHAR_getInt( OBJECT_getIndex(objindex), CHAR_WHICHTYPE) + == CHAR_TYPEWARP ){ + return OBJECT_getIndex(objindex); + } + } + return -1; +} + + +int NPC_TimeWarpCheck(int meindex,char *buf,int mode) +{ + LSTIME nowlstime; + char *time[4]={"N","M","A"}; + int now; + int i=0; + RealTimeToLSTime( NowTime.tv_sec, &nowlstime); + now = getLSTime( &nowlstime); + if(mode==0){ + for( i=0 ; i < 3 ; i++){ + if(strstr( buf,time[i]) != NULL){ + return i; + } + } + return -1;; + } + if(mode==1){ + if(now==CHAR_getWorkInt( meindex, CHAR_WORKEVENTTYPE)){ + return now; + } + return -1; + } + return -1; +} diff --git a/gmsv/npc/npc_warpman.c b/gmsv/npc/npc_warpman.c new file mode 100644 index 0000000..174192c --- /dev/null +++ b/gmsv/npc/npc_warpman.c @@ -0,0 +1,1134 @@ +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "lssproto_serv.h" +#include "saacproto_cli.h" +#include "npc_warpman.h" +#include "map_deal.h" +#include "readmap.h" +#include "battle.h" +#include "npc_exchangeman.h" +#include "log.h" +#include "enemy.h" +#include "handletime.h" +#include "npc_eventaction.h" + +static void NPC_WarpMan_selectWindow( int meindex, int toindex, int num,int select); +//ANDY_END +BOOL NPC_GetDuelPointCheck(int meindex,int talker); +BOOL NPC_PARTY_CHAECK( int meindex, int talkerindex); +void NPC_ERR_DiSP(int meindex,int talker,int errNO); + +BOOL NPC_BigSmallLastCheck(int point1,int mypoint,int flg); + +//BOOL NPC_ItemCheck(int meindex,int talker,int itemNo,int flg); +int NPC_FloorUse(int talker,int floor); +BOOL NPC_WarpMsg(int meindex,int talker,char *buf); +BOOL NPC_NpcWarpMsg(int meindex,int talker,char *arg); +int NPC_FloorUseOtherFloor(int charaindex, char *buf); + + +#ifdef _NPC_ADDLEVELUP +void NPC_LevelAndTransUp( int meindex, int charindex, int level, int skillpoint, int exp, int ridepet); +#endif + +#define WARPMAN_STANDBY 3000 +#define WARPMAN_WAIT 150 +//ANDY_ADD +int CheckWarpMsg( int meindex, int talkerindex,char *npcarg ,char *TalkStr); + +#ifdef _TREASURE_BOX +BOOL NPC_TreasureEventRunMsg( int meindex); +#endif + +BOOL NPC_TreasureRandItemGet(int meidex,int talker,int rand_j,char *buf); + +enum { + NPC_WORK_CURRENTTIME = CHAR_NPCWORKINT1, + NPC_TIME_BORN = CHAR_NPCWORKINT2, + NPC_TIME_DEAD = CHAR_NPCWORKINT3, + NPC_TIME_MODE = CHAR_NPCWORKINT4, + + NPC_TIME_EVENTMODE = CHAR_NPCWORKINT6,// 1 + NPC_TIME_EVENTTIME = CHAR_NPCWORKINT7, + NPC_TIME_EVENONBBI = CHAR_NPCWORKINT8, + NPC_TIME_EVENOFFDBBI = CHAR_NPCWORKINT9, + NPC_TIME_EVENTNUM = CHAR_NPCWORKINT10, +}; + +enum{ + NPC_EVENTMODE_NONE, + NPC_EVENTMODE_OPEN, + NPC_EVENTMODE_EVENT, +}; + +#ifdef _NEW_WARPMAN +static void NPC_NewWarpMan_selectWindow( int meindex, int toindex, int num,int select,char *TalkStr); + +enum { + WARP_MAN=0, + NEW_WARPMAN, + NEW_WARPMAN_END + }; +#endif +#define TIMECHECKLOOP 20 +// Robin 0518 +//BOOL checkend = FALSE; + + +BOOL NPC_WarpManInit( int meindex ) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buff2[256]; + char buf[1024]; + int fl,x,y; + + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("WarpMan:GetArgStrErr"); + return FALSE; + } + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPEWARPMAN ); +#ifdef _NEW_WARPMAN + if( strstr( npcarg,"NEWWARPMAN") ) { + //timeman 功能 + CHAR_setWorkInt( meindex, NPC_TIME_MODE, 1); + if(NPC_Util_GetStrFromStrWithDelim( npcarg, "NEWTIME", buff2, sizeof( buff2)) != NULL ){ + CHAR_setInt( meindex, CHAR_LOOPINTERVAL, 60*1000); + } +#ifdef _TREASURE_BOX + CHAR_setWorkInt( meindex, NPC_TIME_EVENTMODE, NPC_EVENTMODE_NONE); + if(NPC_Util_GetStrFromStrWithDelim( npcarg, "TREASURE_BOX", buff2, sizeof( buff2)) != NULL ){ + if( strstr( buff2, "ON") != NULL ){ + CHAR_setWorkInt( meindex, NPC_TIME_EVENTMODE, NPC_EVENTMODE_EVENT); + CHAR_setWorkInt( meindex, NPC_TIME_EVENTTIME, NowTime.tv_sec); + if(NPC_Util_GetStrFromStrWithDelim( npcarg, "TREASURE_ONBBI", buff2, sizeof( buff2)) != NULL ) + CHAR_setWorkInt( meindex, NPC_TIME_EVENONBBI, atoi( buff2)); + if(NPC_Util_GetStrFromStrWithDelim( npcarg, "TREASURE_OFFDBBI", buff2, sizeof( buff2)) != NULL ) + CHAR_setWorkInt( meindex, NPC_TIME_EVENOFFDBBI, atoi( buff2)); + CHAR_setWorkInt( meindex, NPC_TIME_EVENTNUM, 0 ); + } + } + +#endif + return TRUE; + }else{ +#endif + if(NPC_Util_GetStrFromStrWithDelim( npcarg, "WARP", buf, sizeof( buf))==NULL){ + char filename[256]; + if( NPC_Util_CheckAssignArgFile( meindex, filename) != NULL ) + print("\n Warpman Err -> file:%s", filename); + return FALSE; + } + getStringFromIndexWithDelim(buf,",",1,buff2,sizeof(buff2)); + fl=atoi(buff2); + getStringFromIndexWithDelim(buf,",",2,buff2,sizeof(buff2)); + x=atoi(buff2); + getStringFromIndexWithDelim(buf,",",3,buff2,sizeof(buff2)); + y=atoi(buff2); + if( MAP_IsValidCoordinate( fl,x,y )== FALSE ){ + char filename[256]; + NPC_Util_CheckAssignArgFile( meindex, filename); + print( "\nWarp NPC: filename:%s\n 3.Invalid warpman ERR %d %d %d" , filename, fl , x , y ); + return FALSE; + } +#ifdef _NEW_WARPMAN + } +#endif + return TRUE; +} + +void NPC_WarpManTalked( int meindex , int talkerindex , char *szMes ,int color ) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + char token[256]; + int RunType=-1; + + CHAR_setWorkInt( talkerindex, CHAR_WORKWARPCHECK, FALSE ); + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) { + return; + } + if(NPC_Util_isFaceToFace( meindex ,talkerindex ,2)==FALSE){ + if(NPC_Util_isFaceToChara(talkerindex,meindex,1 )==FALSE) return; + } + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("GetArgStrErr"); + return ; + } + +#ifdef _NEW_WARPMAN + if( strstr( npcarg,"NEWWARPMAN") ) { +#ifdef _TREASURE_BOX + if( CHAR_getWorkInt( meindex, NPC_TIME_EVENTMODE) == NPC_EVENTMODE_OPEN ) + return; +#endif + NPC_NewWarpMan_selectWindow( meindex ,talkerindex, 0, -1, szMes); + return; + }else { + if(NPC_PARTY_CHAECK( meindex, talkerindex) == FALSE) {//有组队 + NPC_ERR_DiSP( meindex, talkerindex, 1); + return; + } + + + RunType = CheckWarpMsg( meindex, talkerindex, npcarg , szMes); + if( RunType !=0 ) { + if( RunType == 1 ) { + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "nomal_msg", token, sizeof(token)) != NULL) { + CHAR_talkToCli( talkerindex, meindex,token,CHAR_COLORWHITE); + } + } + return; + } + } +#else + + + if(NPC_PARTY_CHAECK( meindex, talkerindex) == FALSE) {//有组队 + NPC_ERR_DiSP( meindex, talkerindex, 1); + return; + } + RunType = CheckWarpMsg( meindex, talkerindex, npcarg , szMes); + if( RunType !=0 ) { + if( RunType == 1 ) { + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "nomal_msg", token, sizeof(token)) != NULL) { + CHAR_talkToCli( talkerindex, meindex,token,CHAR_COLORWHITE); + } + } + return; + } +#endif + + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, 0); + CHAR_setWorkInt( talkerindex , CHAR_WORKSHOPRELEVANTTRD , 0 ); + if(strstr(npcarg,"DR")!=NULL) { + CHAR_setWorkInt( talkerindex , CHAR_WORKSHOPRELEVANTSEC , -1 ); + if(NPC_GetDuelPointCheck(meindex,talkerindex)==FALSE) return; + }else{ + NPC_WarpMan_selectWindow( meindex, talkerindex,0,-1); + } +} + +static void NPC_WarpMan_selectWindow( int meindex, int toindex, int num,int select) +{ + + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + char token[1024]; + char buf[256]; + char buf2[1024]; + char buf3[256]; + int fl=0 ; + int money=100 ; + int fd = getfdFromCharaIndex( toindex); + char tmp[64]; + + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("GetArgStrErr"); + CHAR_setWorkInt( toindex, CHAR_WORKSHOPRELEVANT, 0); + return ; + } + + if(NPC_PARTY_CHAECK( meindex, toindex) == FALSE) { + NPC_ERR_DiSP( meindex, toindex, 1); + return; + } + + + if( CHAR_getWorkInt( toindex, CHAR_WORKSHOPRELEVANT) != 0 ) { + return; + }else { + CHAR_setWorkInt( toindex, CHAR_WORKSHOPRELEVANT, 1); + } + + if(strstr(npcarg,"%4d")!=NULL){ + int flwork = 0; + int work; + NPC_Util_GetStrFromStrWithDelim( npcarg, "WARP", buf, sizeof( buf)); + getStringFromIndexWithDelim(buf,",",1,buf3,sizeof(buf3)); + work = atoi( buf3); + fl = NPC_FloorUse( toindex, atoi(buf3)); + + if(NPC_Util_GetStrFromStrWithDelim( npcarg, "Floor", buf3, sizeof( buf3)) != NULL){ + flwork = NPC_FloorUseOtherFloor(work, buf3); + } + fl = fl +flwork; + } + + NPC_Util_GetStrFromStrWithDelim( npcarg, "FREE", buf, sizeof( buf)); + + if( (NPC_ActionPassCheck(meindex,toindex,buf)==TRUE) || (strstr(buf,"ALLFREE")!=NULL) ){ + if(NPC_Util_GetStrFromStrWithDelim( npcarg, "FreeMsg", buf2, sizeof( buf2))==NULL) return; + CONNECT_set_pass(fd,TRUE); + CONNECT_set_first_warp(fd,TRUE); + if(strstr(buf2,"%4d") != NULL){ + sprintf(token,buf2,fl); + }else{ + strcpy(token,buf2); + } + CHAR_setWorkInt( toindex , CHAR_WORKSHOPRELEVANTTRD , -1 ); + CHAR_setWorkInt( toindex, CHAR_WORKSHOPRELEVANT, 2); + }else { + if(NPC_Util_GetStrFromStrWithDelim( npcarg, "PayMsg", buf2, sizeof( buf2)) != NULL){ + CONNECT_set_pass(fd,FALSE); + CONNECT_set_first_warp(fd,FALSE); + if(strstr(buf2,"%8d") != NULL){ + NPC_Util_GetStrFromStrWithDelim( npcarg, "MONEY", tmp, sizeof( tmp)); + if(strstr(tmp,"LV")!=NULL){ + int level; + char buff2[32]; + + level = CHAR_getInt(toindex,CHAR_LV); + getStringFromIndexWithDelim(tmp,"*",2,buff2,sizeof(buff2)); + money = level*atoi(buff2); + }else{ + money=atoi(tmp); + } + if(strstr(buf2,"%4d") != NULL){ + sprintf(token,buf2,fl,money); + }else{ + sprintf(token,buf2,money); + } + }else if(strstr(buf2,"%4d") != NULL){ + sprintf(token,buf2,fl); + NPC_Util_GetStrFromStrWithDelim( npcarg, "MONEY", tmp, sizeof( tmp)); + if( strstr( tmp,"-" ) != NULL){ + money=10000001; + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + CHAR_WINDOWTYPE_WINDOWWARPMAN_MAIN, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + return ; + } + }else{ + strcpy(token,buf2); + NPC_Util_GetStrFromStrWithDelim( npcarg, "MONEY", tmp, sizeof( tmp)); + if( strstr( tmp,"-" ) != NULL){ + money=10000001; + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + CHAR_WINDOWTYPE_WINDOWWARPMAN_MAIN, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + return ; + }else{ + money = atoi(tmp); + } + } + if(CHAR_getInt(toindex,CHAR_FLOOR)==117){ + money=CHAR_getInt(toindex,CHAR_GOLD); + if (money>=10) money*=0.9; + else if( money == 0 ) { + CHAR_warpToSpecificPoint(toindex,117,225,13); + return; + } + } + CHAR_setWorkInt( toindex , CHAR_WORKSHOPRELEVANTTRD , money ); + CONNECT_set_pass(fd,TRUE); + CONNECT_set_first_warp(fd,TRUE); + + }else if(NPC_Util_GetStrFromStrWithDelim( npcarg, "NomalMsg", token,sizeof(token)) !=NULL){ + CHAR_setWorkInt( toindex , CHAR_WORKSHOPRELEVANTTRD , -2 ); + CHAR_setWorkInt( toindex, CHAR_WORKSHOPRELEVANT, -1); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + CHAR_WINDOWTYPE_WINDOWWARPMAN_MAIN, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + } + } + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_YESNO, + CHAR_WINDOWTYPE_WINDOWWARPMAN_MAIN, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); +} + +void NPC_WarpManWindowTalked( int meindex, int talkerindex, + int seqno, int select, char *data) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[NPC_UTIL_GETARGSTR_BUFSIZE]; +#ifdef _NEW_WARPMAN + BOOL checkp=TRUE; + char buf1[1024]; + int talkNo = 1; + BOOL tenflg=FALSE; +#else + int fl,x,y; +#endif + char buff2[256]; + int fd = getfdFromCharaIndex( talkerindex ); + if( NPC_Util_CharDistance( talkerindex, meindex ) > 2) + return; + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("GetArgStrErr"); + return ; + } + if( CHAR_getWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT) < 1 ) { + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, -1); + return; + } + +#ifdef _NEW_WARPMAN + if( seqno == NEW_WARPMAN ) { + int eqnum=0; + eqnum = CHAR_getWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT); + sprintf(buf1,"%s", "NOFREE"); + if( eqnum >= 0 ) { + sprintf(buf1,"TALKEVENT%d", eqnum); + } + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, 0); + while( getStringFromIndexWithDelim( npcarg,"OVER",talkNo,buf,sizeof( buf)) != FALSE){ + if( strstr(buf, buf1) != NULL) { + strcpy( npcarg , buf); + tenflg = TRUE; + break; + } + talkNo++; + } + if( tenflg == FALSE ) { + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, -1); + return; + } + }else { +#endif + if( select != WINDOW_BUTTONTYPE_YES ) { + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, -1); + return; + } + if(NPC_PARTY_CHAECK( meindex, talkerindex) == FALSE){ + NPC_ERR_DiSP( meindex, talkerindex, 1); + return; + } +#ifdef _NEW_WARPMAN + } +#else + NPC_Util_GetStrFromStrWithDelim( npcarg, "WARP", buf, sizeof( buf)); + GetRand_WarpPoint( buf, &fl, &x, &y ); +#endif + +#ifdef _NEW_WARPMAN + switch( seqno) { + case WARP_MAN: + if( select != WINDOW_BUTTONTYPE_YES ) + return; + if( NPC_PARTY_CHAECK( meindex, talkerindex) == FALSE ){ + NPC_ERR_DiSP( meindex, talkerindex, 1); + return; + } +#else + if( select != WINDOW_BUTTONTYPE_YES) return; + if( NPC_PARTY_CHAECK( meindex, talkerindex) == FALSE) + return; +#endif + +#ifdef _NEW_WARPMAN + break; + case NEW_WARPMAN: + if( select != WINDOW_BUTTONTYPE_YES ){ + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, -1); + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "CancelMsg", buff2, sizeof( buff2) ) != NULL) { + CHAR_talkToCli( talkerindex, meindex, buff2, CHAR_COLORYELLOW); + } + return; + } + checkp=TRUE; + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "CHECKPARTY", buff2, sizeof( buff2) ) != NULL) { + if( strstr( buff2, "FALSE") != NULL ) { + checkp = FALSE; + } + } + if( checkp==TRUE && NPC_PARTY_CHAECK( meindex, talkerindex) == FALSE ) { + NPC_ERR_DiSP( meindex, talkerindex, 1); + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, -1); + return; + } + break; + case NEW_WARPMAN_END: + return; + break; + } +#endif + + if( Action_RunDoEventAction( meindex, talkerindex, npcarg) == FALSE ){ + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, -1); + return; + } + + CHAR_complianceParameter( talkerindex ); + CHAR_send_P_StatusString( talkerindex , + CHAR_P_STRING_ATK|CHAR_P_STRING_DEF| + CHAR_P_STRING_CHARM|CHAR_P_STRING_QUICK| + CHAR_P_STRING_WATER|CHAR_P_STRING_FIRE| + CHAR_P_STRING_WIND|CHAR_P_STRING_EARTH + ); + if( CHAR_getWorkInt( CONNECT_getCharaindex(fd), CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE){ + return ; + } + if(CHAR_getWorkInt( talkerindex , CHAR_WORKSHOPRELEVANTTRD) <= 0){ + CHAR_setWorkInt( talkerindex, CHAR_WORKWARPCHECK, FALSE ); +#ifdef _NEW_WARPMAN + NPC_WarpMsg( meindex, talkerindex, npcarg); +#else + if( fl == 0 && x == 0 && y == 0 ) { + }else { + CHAR_warpToSpecificPoint(talkerindex, fl, x,y); + } +#endif + }else { + if(CHAR_getInt(talkerindex,CHAR_GOLD) < + CHAR_getWorkInt(talkerindex,CHAR_WORKSHOPRELEVANTTRD)){ + NPC_ERR_DiSP( meindex, talkerindex, 2); + return ; + } + CHAR_DelGold( talkerindex, CHAR_getWorkInt(talkerindex,CHAR_WORKSHOPRELEVANTTRD )); + + CHAR_setWorkInt( talkerindex, CHAR_WORKWARPCHECK, FALSE ); +#ifdef _NEW_WARPMAN + NPC_WarpMsg( meindex, talkerindex, npcarg); +#else + if( fl == 0 && x == 0 && y == 0 ) { + }else { + CHAR_warpToSpecificPoint(talkerindex, fl, x,y); + } +#endif + + } +#ifdef _NEW_WARPMAN + NPC_NpcWarpMsg( meindex, talkerindex, npcarg); +#else + } +#endif +} + +BOOL NPC_BigSmallLastCheck(int point1,int mypoint,int flg) +{ + + if(flg==0){ + if(point1==mypoint) { + return TRUE; + } + + }else if(flg==1){ + if(mypoint < point1) { + return TRUE; + } + + }else if(flg==2){ + if(mypoint > point1) { + return TRUE; + } + } + + return FALSE; + +} + +BOOL NPC_GetDuelPointCheck(int meindex,int talker) +{ + + int fdid = getFdidFromCharaIndex( talker); + char dbkey[256]; + + if( fdid == -1 ) return FALSE; + + CHAR_makeDBKey( talker, dbkey, sizeof( dbkey)); + saacproto_DBGetEntryRank_send( acfd, DB_DUELPOINT, dbkey, fdid, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX)); + + return TRUE; + +} + +void NPC_GetDuelRank(int rank,int fdid,int objindex) +{ + + int talker; + int meindex; + + + rank++; + talker = getCharindexFromFdid( fdid); + if( talker == -1 ) return; + + meindex= OBJECT_getIndex( objindex); + if( !CHAR_CHECKINDEX( meindex)) return; + + CHAR_setWorkInt(talker,CHAR_WORKSHOPRELEVANTSEC,rank); + + NPC_WarpMan_selectWindow( meindex, talker,0,-1); + +} + +BOOL NPC_PARTY_CHAECK(int meindex,int talker) +{ + if(CHAR_getWorkInt(talker,CHAR_WORKPARTYMODE) != CHAR_PARTY_NONE){ + return FALSE; + } + return TRUE; +} + +void NPC_ERR_DiSP(int meindex,int talker,int errNO) +{ + char token[1024]; + int i=0; + int otherindex; + int fd = getfdFromCharaIndex( talker); + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("GetArgStrErr"); + return ; + } + if(errNO==1){ + if(NPC_Util_GetStrFromStrWithDelim( npcarg, "PartyMsg",token, sizeof( token))==NULL) { + sprintf(token,"\n\n    无法加入团队。  " + "\n\n    请解散团队 。 "); + } + if(CHAR_getWorkInt(talker,CHAR_WORKPARTYMODE)==CHAR_PARTY_CLIENT){ + }else{ + + for( i=0 ; i < CHAR_PARTYMAX ;i++){ + otherindex=CHAR_getWorkInt(talker,CHAR_WORKPARTYINDEX1+i); + if(otherindex != -1){ + fd = getfdFromCharaIndex( otherindex); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + CHAR_WINDOWTYPE_WINDOWWARPMAN_ERR, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + } + } + return ; + } + }else if (errNO==2){ + if(NPC_Util_GetStrFromStrWithDelim( npcarg, "MoneyMsg", token, sizeof( token))==NULL){ + sprintf(token,"\n\n    似乎金钱不足唷。  " + "\n\n 请存好钱後,再过来。"); + } + } + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGE, + WINDOW_BUTTONTYPE_OK, + CHAR_WINDOWTYPE_WINDOWWARPMAN_ERR, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); +} + +int NPC_FloorUse(int charaindex,int floor) +{ + int i; + int players=0; + int playernum = CHAR_getPlayerMaxNum(); + for( i=0 ; i< playernum ; i++ ){ + if( CHAR_getCharUse(i) == FALSE )continue; + if(CHAR_getInt(i,CHAR_FLOOR)==floor){ + players++; + } + } + return players; +} + +int NPC_FloorUseOtherFloor(int warp, char *buf) +{ + int i,j=1; + int players=0; + int playernum = CHAR_getPlayerMaxNum(); + char buf2[32]; + int floor; + + for( i=0 ; i< playernum ; i++ ){ + if( CHAR_getCharUse(i) == FALSE )continue; + j=1; + while(getStringFromIndexWithDelim(buf,",",j,buf2,sizeof(buf2))!= FALSE){ + j++; + floor = atoi(buf2); + if(CHAR_getInt(i,CHAR_FLOOR) == floor && warp != floor) { + players++; + } + } + } + return players; +} + +BOOL NPC_WarpMsg(int meindex,int talker,char *arg) +{ + char buf[256]; + int fl=0,x=0,y=0; + int parent=-1; + int pmode; + int subindex; + int i; + + if( NPC_Util_GetStrFromStrWithDelim( arg, "WARP", buf, sizeof( buf)) == NULL ) + return FALSE; + GetRand_WarpPoint( buf, &fl, &x, &y ); + if( fl == 0 && x == 0 && y == 0 ) { + return TRUE; + }else { + if( MAP_IsValidCoordinate( fl,x,y )== FALSE ){ + print( "Warp NPC:1.Invalid warpman ERR" ); + return FALSE; + } + } +#ifdef _TIME_TICKET + if( check_TimeTicketMap( fl) ) { + int havei, itemi; + CHAR_setWorkInt( talker, CHAR_WORKTICKETTIME, 0); + CHAR_setWorkInt( talker, CHAR_WORKTICKETTIMESTART, 0); + for( havei = CHAR_STARTITEMARRAY ; havei < CHAR_MAXITEMHAVE ; havei++ ){ + itemi = CHAR_getItemIndex( talker, havei); + if( !ITEM_CHECKINDEX( itemi) ) continue; + if( strcmp( ITEM_getChar( itemi, ITEM_USEFUNC), "ITEM_timeticket") ) continue; + //if( ITEM_getInt( itemi ,ITEM_ID) != 20646 ) continue; + CHAR_talkToCli( talker, -1, "自动使用门票。", CHAR_COLORYELLOW); + ITEM_timeticketEx( talker, talker, havei, 1); + break; + } + if( havei == CHAR_MAXITEMHAVE ) { + CHAR_talkToCli( talker, -1, "请先准备专用门票才可进入。", CHAR_COLORYELLOW); + return FALSE; + } + } +#endif + pmode = CHAR_getWorkInt( talker, CHAR_WORKPARTYMODE ); + switch( pmode ){ + case 1: + parent = talker; + break; + case 2: + parent = CHAR_getWorkInt( talker, CHAR_WORKPARTYINDEX1 ); + break; + default: + CHAR_warpToSpecificPoint(talker, fl, x,y); + return TRUE; + } + if( parent < 0 ) + return TRUE; + for( i = 0; i < CHAR_PARTYMAX; i ++ ){ + subindex = CHAR_getWorkInt( parent, CHAR_WORKPARTYINDEX1+i ); + if( CHAR_CHECKINDEX( subindex ) == FALSE )continue; + if( fl==0 && x==0 && y==0 ) { + }else { + CHAR_warpToSpecificPoint( subindex, fl, x, y ); + } + } + return TRUE; +} + +#ifdef _NEW_WARPMAN +static void NPC_NewWarpMan_selectWindow( int meindex, int toindex, int num,int select,char *TalkStr) +{ + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + char token[1024]; + int buttontype = 0, windowtype = 0, windowno = 0; + char buf[NPC_UTIL_GETARGSTR_BUFSIZE],buf1[256]; + int fd = getfdFromCharaIndex( toindex); + BOOL tenflg =FALSE; + int talkNo=1,RunType=-1; + + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("GetArgStrErr"); + return ; + } + + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "NEWTIME", buf1, sizeof( buf1)) != NULL ){ + if( CHAR_getWorkInt( meindex, NPC_TIME_MODE) <= 0 ) { + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "Time_Msg", token, sizeof( token) ) != NULL) { + CHAR_talkToCli( toindex, meindex, token, CHAR_COLORYELLOW); + } + return; + } + } + + windowtype = WINDOW_MESSAGETYPE_MESSAGE; + sprintf( buf1,"TALKEVENT"); + //寻找多种条件 FREE + while(getStringFromIndexWithDelim( npcarg,"OVER",talkNo,buf,sizeof( buf)) != FALSE) { + if(strstr(buf, buf1) != NULL) { + //检查对话 暗语 + RunType = CheckWarpMsg( meindex, toindex, buf , TalkStr); + if( RunType > 1 ) { + return; + }else if( RunType != 0 ) { + talkNo++; + continue; + } + if( NPC_Util_GetStrFromStrWithDelim( buf, "FREE", token, sizeof( token) ) == NULL) { + print("msgErr"); + return; + } + + //检查玩家是否附合条件 + if((NPC_ActionPassCheck(meindex,toindex,token)==TRUE) || (strstr( token, "ALLFREE")!=NULL) ) { + CHAR_setWorkInt( toindex, CHAR_WORKSHOPRELEVANT, talkNo-1); + + //若附合条件 取出 FreeMsg 字串 + if(NPC_Util_GetStrFromStrWithDelim( buf, "FreeMsg", token, sizeof( token))==NULL) + return; + CONNECT_set_pass(fd,TRUE); + CONNECT_set_first_warp(fd,TRUE); + buttontype = WINDOW_BUTTONTYPE_YESNO; + windowno = NEW_WARPMAN; + tenflg = TRUE; + CHAR_setWorkInt( toindex , CHAR_WORKSHOPRELEVANTTRD , -1 ); + break; + } + } + talkNo++; + } + + //无任何条件成立 + if( tenflg == FALSE ) { + if( getStringFromIndexWithDelim( npcarg,"OVER",1,buf,sizeof( buf)) == FALSE ) + return; + if( strstr( buf, "NOFREE") == NULL ) { + return; + }else { + strcpy( npcarg, buf); + } + if(NPC_Util_GetStrFromStrWithDelim( npcarg, "NomalMsg", token,sizeof(token)) != NULL) { + CHAR_talkToCli( toindex, meindex, token,CHAR_COLORWHITE); + return; + } + } + + //送讯息给 CLI + lssproto_WN_send( fd, windowtype, buttontype, windowno, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), token ); +} + +#endif +//ANDY_RE +int CheckWarpMsg( int meindex, int talkerindex,char *npcarg ,char *TalkStr) +{ + char buf[1024]; + + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "warp_msg", buf, sizeof( buf) ) == NULL) + return 0; + if( strcmp( buf, TalkStr) ) + return 1; + + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "CHECKPARTY", buf, sizeof( buf) ) != NULL) { + if( strstr( buf, "FALSE") != NULL ) { + }else { + if( NPC_PARTY_CHAECK( meindex, talkerindex) == FALSE ) { + NPC_ERR_DiSP( meindex, talkerindex, 1); + return 2; + } + } + } + + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "FREE", buf, sizeof( buf)) == NULL ) + return 2; + if( ( NPC_ActionPassCheck( meindex, talkerindex, buf ) == FALSE) ) { + if(NPC_Util_GetStrFromStrWithDelim( npcarg, "NomalMsg", buf,sizeof(buf)) != NULL) { + CHAR_talkToCli( talkerindex, meindex,buf,CHAR_COLORWHITE); + } + return 2; + }else { + if( Action_RunDoEventAction( meindex, talkerindex, npcarg) == FALSE ){ + + CHAR_setWorkInt( talkerindex, CHAR_WORKSHOPRELEVANT, -1); + return 3; + } + CHAR_complianceParameter( talkerindex ); + CHAR_send_P_StatusString( talkerindex , + CHAR_P_STRING_ATK|CHAR_P_STRING_DEF| + CHAR_P_STRING_CHARM|CHAR_P_STRING_QUICK| + CHAR_P_STRING_WATER|CHAR_P_STRING_FIRE| + CHAR_P_STRING_WIND|CHAR_P_STRING_EARTH ); + + if(NPC_Util_GetStrFromStrWithDelim( npcarg, "FreeMsg", buf, sizeof( buf)) != NULL ){ + CHAR_talkToCli( talkerindex, meindex, buf, CHAR_COLORWHITE); + } + + NPC_WarpMsg( meindex, talkerindex, npcarg); + NPC_NpcWarpMsg( meindex, talkerindex, npcarg); + return 4; + } + return 0; +} + +BOOL NPC_NpcWarpMsg(int meindex,int talker,char *arg) +{ + char buf[256]; + int fl=0,x=0,y=0; + + if( CHAR_CHECKINDEX( meindex ) == FALSE ) + return FALSE; + + if( NPC_Util_GetStrFromStrWithDelim( arg, "NPCPOINT", buf, sizeof( buf)) == NULL ) + return FALSE; + GetRand_WarpPoint( buf, &fl, &x, &y ); + + if( MAP_IsValidCoordinate( fl,x,y )== FALSE ){ + print( "Warp NPC:2.Invalid warpman ERR" ); + return FALSE; + } + + CHAR_warpToSpecificPoint( meindex, fl, x, y ); + + return TRUE; +} + +void NPC_WarpManLoop( int meindex) +{ + int born, dead; + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + if( !CHAR_CHECKINDEX( meindex) ) return; + + if( NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg)) == NULL ){ + print("WarpMan:GetArgStrErr"); + return; + } + if( !strstr( npcarg,"NEWWARPMAN") ) + return; + + if( NPC_getTimeData( meindex, npcarg, &born, &dead, 200) != FALSE ){ + NPC_TimeDefineDo( meindex, born, dead, NPC_TIME_MODE); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX ) ); + } +} + +void NPC_WarpManWatch( int meobjindex, int objindex, CHAR_ACTION act, + int x,int y,int dir, int* opt,int optlen ) +{ + int born, dead; + int meindex, index; + + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + + if( OBJECT_getType( objindex) != OBJTYPE_CHARA) return; + index = OBJECT_getIndex( objindex); + if( !CHAR_CHECKINDEX( index) ) return; + if( CHAR_getInt( index, CHAR_WHICHTYPE) != CHAR_TYPEPLAYER) return; + meindex = OBJECT_getIndex( meobjindex); + if( !CHAR_CHECKINDEX( meindex) ) return; + + if( NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg)) == NULL ){ + print("WarpMan:GetArgStrErr"); + return; + } + if( !strstr( npcarg,"NEWWARPMAN") ) + return; +#ifdef _TREASURE_BOX + if( CHAR_getWorkInt( meindex, NPC_TIME_EVENTMODE) == NPC_EVENTMODE_OPEN ){ + if( CHAR_getWorkInt( meindex, NPC_TIME_EVENTTIME) < NowTime.tv_sec ){ + //变回宝箱 + CHAR_setWorkInt( meindex, NPC_TIME_EVENTMODE, NPC_EVENTMODE_EVENT); + //变图 + CHAR_setInt( meindex, CHAR_BASEBASEIMAGENUMBER, + CHAR_getWorkInt( meindex, NPC_TIME_EVENOFFDBBI)); + CHAR_setInt( meindex, CHAR_BASEIMAGENUMBER, + CHAR_getWorkInt( meindex, NPC_TIME_EVENOFFDBBI)); + NPC_TreasureEventRunMsg( meindex); //是否warp + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX ) ); + } + } +#endif + if( NPC_getTimeData( meindex, npcarg, &born, &dead, 200) != FALSE ){ + NPC_TimeDefineDo( meindex, born, dead, NPC_TIME_MODE); + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX ) ); + } +} + +#ifdef _TREASURE_BOX +BOOL NPC_TreasureEventRunMsg( int meindex) +{ + char buf[256]; + char npcarg[NPC_UTIL_GETARGSTR_BUFSIZE]; + + int fl,x,y; + + if( !CHAR_CHECKINDEX( meindex )) + return FALSE; + + + if(NPC_Util_GetArgStr( meindex, npcarg, sizeof(npcarg))==NULL){ + print("WarpMan:GetArgStrErr"); + return FALSE; + } + + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "TREASURE_NUM", buf, sizeof( buf)) == NULL ) + return FALSE; + + if( CHAR_getWorkInt( meindex, NPC_TIME_EVENTNUM) < atoi( buf) ) return FALSE; + CHAR_setWorkInt( meindex, NPC_TIME_EVENTNUM, 0); + + if( NPC_Util_GetStrFromStrWithDelim( npcarg, "TREASURE_POINT", buf, sizeof( buf)) == NULL ) + return FALSE; + GetRand_WarpPoint( buf, &fl, &x, &y ); + + if( MAP_IsValidCoordinate( fl,x,y )== FALSE ){ + print( "Warp NPC:2.Invalid warpman ERR" ); + return FALSE; + } + + CHAR_warpToSpecificPoint( meindex, fl, x, y ); + return TRUE; +} + +#endif + +BOOL NPC_TreasureRandItemGet(int meidex,int talker,int rand_j,char *buf) +{ + char buff2[64]; + int randitem; + int ret; + int itemindex; + char token[128]; + + if(rand_j == 0) { + print("Event:由於0的介入,出现错误。"); + return FALSE; + } + + randitem = rand()%rand_j; + if(randitem == 0) randitem = rand_j; + + getStringFromIndexWithDelim(buf , "," , randitem, buff2, sizeof(buff2)) ; + + itemindex = ITEM_makeItemAndRegist( atoi( buff2)); + + if(itemindex == -1) return FALSE; + + /*失奶 丞及馨笛( 涛失奶 丞 卞中木化仄引丹 */ + ret = CHAR_addItemSpecificItemIndex( talker, itemindex); + if( !CHAR_CHECKITEMINDEX( talker, ret) ){ + print( "npc_exchangeman.c: additem error itemindex[%d]\n", itemindex); + ITEM_endExistItemsOne( itemindex); + return FALSE; + } + + if(itemindex != -1) { + LogItem( + CHAR_getChar( talker, CHAR_NAME ), /* 平乓仿 */ + CHAR_getChar( talker, CHAR_CDKEY ), +#ifdef _add_item_log_name // WON ADD 在item的log中增加item名称 + itemindex, +#else + ITEM_getInt( itemindex, ITEM_ID), /* 失奶 丞 寞 */ +#endif + "EventAddItem(任务需求所得到的道具)", + CHAR_getInt( talker,CHAR_FLOOR), + CHAR_getInt( talker,CHAR_X ), + CHAR_getInt( talker,CHAR_Y ), + ITEM_getChar( itemindex, ITEM_UNIQUECODE), + ITEM_getChar( itemindex, ITEM_NAME), + ITEM_getInt( itemindex, ITEM_ID) + ); + } + + sprintf(token,"收下了%s",ITEM_getChar( itemindex, ITEM_NAME)); + CHAR_talkToCli( talker, -1, token, CHAR_COLORWHITE); + + CHAR_sendItemDataOne( talker, ret); + return TRUE; + +} + +#ifdef _NPC_ADDLEVELUP // (不可开) ANDY 外部测试机用来增加玩家等级 +extern tagRidePetTable ridePetTable[296]; +void NPC_LevelAndTransUp( int meindex, int charindex, int level, int skillpoint, int exp, int ridepet) +{ + char szBuffer[256]=""; + if( !CHAR_CHECKINDEX( charindex) ) + return; +//int CHAR_LevelUpCheck( int charaindex , int toindex) + if( exp > 0 ){ + int LevelUp=0; + int myexp = CHAR_getInt( charindex, CHAR_EXP); + myexp += exp; + if( myexp > 300000000 ) myexp = 300000000; + CHAR_setInt( charindex, CHAR_EXP, myexp); + snprintf( szBuffer, sizeof(szBuffer), + "(%s) 得到 EXP %d", CHAR_getUseName( charindex ), exp); + CHAR_talkToCli( charindex, -1, szBuffer, CHAR_COLORYELLOW); + LevelUp = CHAR_LevelUpCheck( charindex , -1); + if( LevelUp > 0 ){ + snprintf( szBuffer, sizeof(szBuffer), + "(%s) 升级至 %d", + CHAR_getUseName( charindex ), + CHAR_getInt( charindex, CHAR_LV ) + ); + CHAR_talkToCli( charindex, -1, szBuffer, CHAR_COLORYELLOW); + CHAR_setInt( charindex, CHAR_SKILLUPPOINT, + CHAR_getInt( charindex, CHAR_SKILLUPPOINT) + LevelUp*3 ); + CHAR_complianceParameter( charindex ); + } + } + + if( level > 0 ){ + CHAR_setInt( charindex, CHAR_LV, level); + snprintf( szBuffer, sizeof(szBuffer), + "(%s) 等级设定为 %d", + CHAR_getUseName( charindex ), CHAR_getInt( charindex, CHAR_LV ) + ); + CHAR_talkToCli( charindex, -1, szBuffer, CHAR_COLORYELLOW); + } + + if( skillpoint > 0 ){ + int MySp = CHAR_getInt( charindex, CHAR_SKILLUPPOINT); + MySp += skillpoint; + CHAR_setInt( charindex, CHAR_SKILLUPPOINT, MySp); + } + if( ridepet >= 0 ){ + int basepet[2][4]={ {2066,2067,2068,2069}, + {2072,2073,2074,2075}}; + int petTemp[]={-1,-1,-1,-1,-1}; + char msgbuf[256]; + int petNum=0; + int i,j=0; + int k=0, petindex,enemyarray; + petTemp[j++] = basepet[0][rand()%4]; + petTemp[j++] = basepet[1][rand()%4]; + + for( i=0; i< arraysizeof(ridePetTable) ; i++ ){ + if( CHAR_getInt( charindex, CHAR_BASEBASEIMAGENUMBER) == ridePetTable[i].charNo ){ + petTemp[j]= ridePetTable[i].petId; + j++; + if( j >= arraysizeof( petTemp) ) + break; + } + } + j=0; + for( petNum=0; petNum +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "lssproto_serv.h" +#include "pet_skill.h" +#include "readmap.h" +#include "battle.h" +#include "profession_skill.h" +#include "chatmagic.h" +#include "npc_welfare.h" +#include "npc_exchangeman.h" + +static void NPC_Welfare_selectWindow(int meindex, int toindex, int num, int select); + + +//载入好康NPC的初始化 +BOOL NPC_WelfareInit( int meindex ) +{ + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPEWELFARE); + //print("名称:%s\n",CHAR_getChar( meindex, CHAR_NAME)); + return TRUE; +} + +//对话时的处理 +void NPC_WelfareTalked( int meindex , int talkerindex , char *szMes ,int color ) +{ + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) { + return; + } + if(NPC_Util_isFaceToFace(talkerindex,meindex,2 )==FALSE){ + if( NPC_Util_CharDistance( talkerindex, meindex ) > 1) return; + } + NPC_Welfare_selectWindow( meindex, talkerindex,0,-1); +} + +static void NPC_Welfare_selectWindow( int meindex, int toindex, int num,int select) +{ + switch(num){ + case 0: + //free + NPC_WelfareMakeStr(meindex, toindex, select); + break; + case 1: + break; + } +} + +void NPC_WelfareWindowTalked( int meindex, int talkerindex, + int seqno, int select, char *data) +{ + int skill, i, j; + int cost; + int skillID=0; + char buf[64]; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char msg[512]; + char message[64]; + int fd = getfdFromCharaIndex( talkerindex ); + double rate= 1.0; + int skillarray; + int p_class=0, need_class=0; + int profession_skill_point; + + memset( message, -1, sizeof(message) ); + + if( NPC_Util_CharDistance( talkerindex, meindex ) > 2) { + return; + } + + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr))==NULL){ + print("GetArgStrErr"); + return; + } + + makeStringFromEscaped( data); + getStringFromIndexWithDelim(data,"|",1,buf,sizeof(buf)); + skill=atoi(buf); + getStringFromIndexWithDelim(data,"|",2,buf,sizeof(buf)); + cost=atoi(buf); + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "profession_skill", msg, sizeof( msg)) != NULL){ + getStringFromIndexWithDelim(msg,",",skill,buf,sizeof(buf)); + skillID=atoi(buf); + } + + + if(skillID < 0) return ; + + if( CHAR_getWorkInt( CONNECT_getCharaindex(fd), CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE) return ; + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "skill_rate", msg, sizeof( msg)) != NULL){ + rate = atof( msg); + } + + skillarray = PROFESSION_SKILL_getskillArray( skillID ); + + if(skillarray == -1){ + CHAR_send_P_StatusString( talkerindex, CHAR_P_STRING_GOLD); + return ; + } + + // 判断职业 + { + if( NPC_Util_GetStrFromStrWithDelim( argstr, "profession_class", msg, sizeof(msg) ) == NULL){ + return ; + }else{ + p_class = atoi(msg); + } + + // 技能所需职业 + need_class = PROFESSION_SKILL_getInt( skillarray, PROFESSION_SKILL_PROFESSION_CLASS ); + + if( CHAR_getInt( talkerindex, PROFESSION_CLASS ) == 0 ){ + char token[256]; + memset(token, -1, sizeof(token) ); + sprintf( token, "您尚未就职!" ); + CHAR_talkToCli( talkerindex, meindex, token, CHAR_COLORYELLOW); + CHAR_send_P_StatusString( talkerindex, CHAR_P_STRING_GOLD); + return; + + } + + if( CHAR_getInt( talkerindex, PROFESSION_CLASS ) != need_class && need_class != 4 ){ + char token[256]; + memset(token, -1, sizeof(token) ); + sprintf( token, "此技能你不能学喔!" ); + CHAR_talkToCli( talkerindex, meindex, token, CHAR_COLORYELLOW); + CHAR_send_P_StatusString( talkerindex, CHAR_P_STRING_GOLD); + return; + } + + + } + + // 判断剩馀点数 + { + profession_skill_point = CHAR_getInt( talkerindex, PROFESSION_SKILL_POINT ); + if( profession_skill_point <= 0 ){ + char token[256]; + memset(token, -1, sizeof(token) ); + sprintf( token, "你目前没有学习点数!" ); + CHAR_talkToCli( talkerindex, meindex, token, CHAR_COLORYELLOW); + CHAR_send_P_StatusString( talkerindex, CHAR_P_STRING_GOLD); + return; + } + } + + // 判断是否达成学习的条件 + { + int temp[4] = {0}, count = 0, flag = -1 , need_percent = -1, need_count = 0; + + for( i=0; i<4; i++){ + int limit = -1; + flag = -1; + limit = PROFESSION_SKILL_getInt( skillarray, PROFESSION_SKILL_LIMIT1+i*2 ); + need_percent = PROFESSION_SKILL_getInt( skillarray, PROFESSION_SKILL_LIMIT1+i*2 + 1 ); + + if( limit!= 0 && need_percent == 0 ) need_count++; + + if( limit == 0 ){ + continue; + }else if( limit == -1 ){ + for( j=0; j 0 ) break; + } + if( j >= PROFESSION_MAX_LEVEL ){ + char token[256]; + sprintf( token, "需先学会任1种战斗技能才能学习!"); + CHAR_talkToCli( talkerindex, meindex, token, CHAR_COLORYELLOW); + CHAR_send_P_StatusString( talkerindex, CHAR_P_STRING_GOLD); + return; + } + }else{ + flag = -1; + for( j=0; jskill, SKILL_LEVEL); + + // 判断熟练度 + if( skill_level >= need_percent ){ + flag = 1; break; + } + } + } + + // 未达成条件 + if( flag == -1 && need_percent == 0 ){ + temp[count] = limit; + count ++; + }else if( flag == -1 ){ + char token[256]; + memset(token, -1, sizeof(token) ); + sprintf( token, "尚未学会%s!", PROFESSION_SKILL_getChar( limit, PROFESSION_SKILL_NAME) ); + CHAR_talkToCli( talkerindex, -1, token, CHAR_COLORYELLOW); + CHAR_send_P_StatusString( talkerindex, CHAR_P_STRING_GOLD); + return; + }else if( flag == -2 ){ + char token[256]; + memset(token, -1, sizeof(token) ); + sprintf( token, "%s熟练度不足%d!", PROFESSION_SKILL_getChar( limit, PROFESSION_SKILL_NAME), need_percent ); + CHAR_talkToCli( talkerindex, -1, token, CHAR_COLORYELLOW); + CHAR_send_P_StatusString( talkerindex, CHAR_P_STRING_GOLD); + return; + } + } + } + + if( count == need_count && need_count != 0 ){ + char msg[256] = {0}; + + sprintf( msg, "需先学会 " ); + for( i = 0; i< count; i++ ){ + if( temp[i] != 0 ){ + char token[50] = {0}; + sprintf( token, "%s ", PROFESSION_SKILL_getChar( temp[i], PROFESSION_SKILL_NAME) ); + strcat( msg, token ); + } + } + sprintf( msg, "%s 任一种技能", msg ); + CHAR_talkToCli( talkerindex, -1, msg, CHAR_COLORYELLOW); + CHAR_send_P_StatusString( talkerindex, CHAR_P_STRING_GOLD); + + return; + } + + } + + // 判断金钱 + { + cost = PROFESSION_SKILL_getInt( skillarray, PROFESSION_SKILL_COST ); + cost = cost * rate; + + if(CHAR_getInt(talkerindex,CHAR_GOLD) < cost){ + CHAR_send_P_StatusString( talkerindex, CHAR_P_STRING_GOLD); + return; + } + } + +#ifdef _NPC_ProfessionTrans + //判断转生 + { + if( NPC_Util_GetStrFromStrWithDelim( argstr, "trans", msg, sizeof(msg) ) != NULL){ + int trans = atoi(msg); + print("\n转生要求:%d,%d",CHAR_getInt( talkerindex, CHAR_TRANSMIGRATION),trans); + if( CHAR_getInt( talkerindex, CHAR_TRANSMIGRATION) < trans){ + if( NPC_Util_GetStrFromStrWithDelim( argstr, "trans_msg", msg, sizeof(msg) ) != NULL){ + CHAR_talkToCli( talkerindex, meindex, msg, CHAR_COLORYELLOW); + return; + } + else{ + CHAR_talkToCli( talkerindex, meindex, "您的转生次数不够哦。", CHAR_COLORYELLOW); + return; + } + } + } + } +#endif + + // 增加技能 + { + int skill_level = 0; + + // 共通技能熟练度给50,其馀给10 + if( (skillID == 63) || (skillID == 64) || (skillID == 65) ){ + int Pskillid = -1; + skill_level = 50; + Pskillid = PROFESSION_SKILL_getskillArray( skillID ); + }else{ + skill_level = 10; + } + + if( PROFESSION_SKILL_ADDSK( talkerindex, skillID, skill_level ) == -1 ) return; + + CHAR_DelGold( talkerindex, cost ); + + CHAR_sendStatusString( talkerindex , "S"); + + NPC_Welfare_selectWindow( meindex, talkerindex,0,-1); + } + + // 传送讯息 + { + char token[256]; + int next_profession_skill_point = profession_skill_point-1; + + CHAR_setInt( talkerindex, PROFESSION_SKILL_POINT, next_profession_skill_point ); + + memset(token, -1, sizeof(token) ); + sprintf( token, "您学习了 %s,剩馀学习点数 %d" + ,PROFESSION_SKILL_getChar( skillarray, PROFESSION_SKILL_NAME ) + ,next_profession_skill_point ); + CHAR_talkToCli( talkerindex, -1, token, CHAR_COLORYELLOW); + + CHAR_sendCToArroundCharacter( CHAR_getWorkInt( talkerindex , CHAR_WORKOBJINDEX )); + } + +} + +void NPC_WelfareMakeStr(int meindex,int toindex,int select) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char msg[256]; + double rate=1.0; + int i=0; + char token[65530]; + int fd = getfdFromCharaIndex( toindex); + + if(select==0){ + sprintf(token,"0|0"); + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_PETSKILLSHOP, + WINDOW_BUTTONTYPE_NONE, + CHAR_WINDOWTYPE_WINDOWPETSKILLSHOP, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + + } + + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr))==NULL){ + print("GetArgStrErr"); + return; + } + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "main_msg", msg, sizeof( msg)) == NULL){ + print("mainERR"); + return ; + } + + sprintf(token,"1|%s|%s", CHAR_getChar(meindex,CHAR_NAME), msg); + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "skill_rate", msg, sizeof( msg)) != NULL){ + rate=atof(msg); + } + + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "profession_skill", msg, sizeof( msg) ) != NULL){ + int skillarray; + int skillID; + int cost; + char token2[265]; + char buf[64]; + + i=1; + while( getStringFromIndexWithDelim(msg,",",i,buf,sizeof(buf)) !=FALSE ){ + i++; + skillID=atoi(buf); + + skillarray = PROFESSION_SKILL_getskillArray( skillID ); + + if( PROFESSION_SKILL_CHECKINDEX( skillarray ) == FALSE ) continue; + + cost = PROFESSION_SKILL_getInt( skillarray, PROFESSION_SKILL_COST ); + + cost = (int)cost*rate; + + sprintf(token2,"|%s|%d|%s|%d", + PROFESSION_SKILL_getChar( skillarray, PROFESSION_SKILL_NAME ), // 技能名称 + cost, // 金额 + PROFESSION_SKILL_getChar( skillarray, PROFESSION_SKILL_TXT ), // 说明 + PROFESSION_SKILL_getInt( skillarray, PROFESSION_SKILL_ICON ) // 图示 + ); + strcat(token,token2); + } + } + + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_PROFESSIONSHOP, + WINDOW_BUTTONTYPE_NONE, + WINDOW_MESSAGETYPE_PROFESSIONSHOP, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + + return; +} + + +#endif +#endif + + diff --git a/gmsv/npc/npc_welfare2.c b/gmsv/npc/npc_welfare2.c new file mode 100644 index 0000000..eb78de2 --- /dev/null +++ b/gmsv/npc/npc_welfare2.c @@ -0,0 +1,278 @@ +#include "version.h" + +#ifdef _NPC_WELFARE_2 // WON ADD 职业NPC-2 +#ifdef _PROFESSION_SKILL // WON ADD 人物职业技能 + +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "lssproto_serv.h" +#include "pet_skill.h" +#include "readmap.h" +#include "battle.h" +#include "profession_skill.h" +#include "chatmagic.h" +#include "npc_welfare2.h" + + +static void NPC_Welfare_selectWindow2(int meindex, int toindex, int num, int select); + +//载入好康NPC的初始化 +BOOL NPC_WelfareInit2( int meindex ) +{ + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPEWELFARE); + print("名称:%s\n",CHAR_getChar( meindex, CHAR_NAME)); + return TRUE; +} + +//对话时的处理 +void NPC_WelfareTalked2( int meindex , int talkerindex , char *szMes ,int color ) +{ + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) { + return; + } + if(NPC_Util_isFaceToFace(talkerindex,meindex,2 )==FALSE){ + if( NPC_Util_CharDistance( talkerindex, meindex ) > 1) return; + } + NPC_Welfare_selectWindow2( meindex, talkerindex,0,-1); +} + +static void NPC_Welfare_selectWindow2( int meindex, int toindex, int num,int select) +{ + switch(num){ + case 0: + //free + NPC_WelfareMakeStr2(meindex, toindex, select); + break; + case 1: + break; + } +} + +void NPC_WelfareWindowTalked2( int meindex, int talkerindex, + int seqno, int select, char *data) +{ + int skill, i, j; + int skillID = -1, skillid = -1; + int ENDEV = -1, NOWEV = -1; + char buf[64]; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char msg[512]; + int fd = getfdFromCharaIndex( talkerindex ); + double rate= 1.0; + int skillarray; + CHAR_HaveSkill* hskill; + char err_msg[128] = {0}; + + if( NPC_Util_CharDistance( talkerindex, meindex ) > 2) { + return; + } + + if(NPC_Util_GetArgStr( meindex, argstr, sizeof(argstr))==NULL){ + print("GetArgStrErr"); + return; + } + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "ENDEV:", msg, sizeof( msg)) != NULL){ + ENDEV=atof(msg); + } + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "NOWEV:", msg, sizeof( msg)) != NULL){ + NOWEV=atof(msg); + } + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "err_msg:", err_msg, sizeof( msg)) == NULL){ + print("GetArgStrErr"); + return; + } + + if( ENDEV > 0 ){ + if( NPC_EventCheckFlg( talkerindex, ENDEV ) != TRUE ){ + CHAR_talkToCli( talkerindex, -1, err_msg, CHAR_COLORYELLOW); + return; + } + }else if( NOWEV > 0 ){ + if( NPC_EventCheckFlg( talkerindex, NOWEV ) != TRUE ){ + CHAR_talkToCli( talkerindex, -1, err_msg, CHAR_COLORYELLOW); + return; + } + } + + makeStringFromEscaped( data); + getStringFromIndexWithDelim(data,"|",1,buf,sizeof(buf)); + skill=atoi(buf); + + // 技能id + skillid = CHAR_getCharSkill( talkerindex, skill - 1 ); + skillID = skillid; + + if(skillID <= 0) return ; + + if( CHAR_getWorkInt( CONNECT_getCharaindex(fd), CHAR_WORKBATTLEMODE) != BATTLE_CHARMODE_NONE) return ; + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "skill_rate", msg, sizeof( msg)) != NULL){ + rate = atof( msg); + } + + // 不扣钱 + CHAR_send_P_StatusString( talkerindex, CHAR_P_STRING_GOLD); + + skillarray = PROFESSION_SKILL_getskillArray( skillID ); + + // 检查是否有不能删除的技能 + for( i=0; i 0 && limit == skillID ){ + char token[256] = {0}; + + sprintf( token, "需先遗忘%s,才可删除此技能", PROFESSION_SKILL_getChar( skillarray_temp, PROFESSION_SKILL_NAME ) ); + CHAR_talkToCli( talkerindex, -1, token, CHAR_COLORYELLOW); + return; + } + } + } + + // 遗忘技能 + { + + int skill_level = -1; + int count = 0; + int skill_id[CHAR_SKILLMAXHAVE] = {0}; + int skill_temp[CHAR_SKILLMAXHAVE] = {0}; + + // 取熟练度 + for( i=0; iskill, SKILL_LEVEL); + + skill_id[count] = skillid; + skill_temp[count] = skill_level; + count++; + } + + // 删除所有技能 + CHAR_CHAT_DEBUG_delsk( talkerindex, "all" ); + + // 还原技能 + for( i=0; iskill, SKILL_LEVEL); + + sprintf(token2,"|%s|%d|%s|%d", + PROFESSION_SKILL_getChar( skillarray, PROFESSION_SKILL_NAME ), // 技能名称 + skill_level, // 熟练度 + PROFESSION_SKILL_getChar( skillarray, PROFESSION_SKILL_TXT ), // 说明 + PROFESSION_SKILL_getInt( skillarray, PROFESSION_SKILL_ICON ) // 图示 + ); + + strcat(token,token2); + } + + lssproto_WN_send( fd, WINDOW_MESSAGETYPE_PROFESSIONSHOP2, + WINDOW_BUTTONTYPE_NONE, + WINDOW_MESSAGETYPE_PROFESSIONSHOP, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + token); + + return; +} + + +#endif +#endif + + diff --git a/gmsv/npc/npc_windowhealer.c b/gmsv/npc/npc_windowhealer.c new file mode 100644 index 0000000..7c676bd --- /dev/null +++ b/gmsv/npc/npc_windowhealer.c @@ -0,0 +1,731 @@ +#include "version.h" +#include +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "lssproto_serv.h" +#include "npc_windowhealer.h" + + + +/*--怂 ---*/ +#define RATE 1000 + + +/* + * 涩烂今木凶它奴件玉它毛请允NPC + * 棵哑 平旦玄失玉矛件民乓□仁日中卅日综木月井手[ + * + */ + +enum { + CHAR_WORK_LEVEL = CHAR_NPCWORKINT1, + CHAR_WORK_RANGE = CHAR_NPCWORKINT2, + CHAR_WORK_HP = CHAR_NPCWORKINT3, + CHAR_WORK_MP = CHAR_NPCWORKINT4, + +}; + + +static void NPC_WindowHealer_selectWindow( int meindex, int toindex, int num); +void NPC_WindowHealerAllHeal( int talker,int mode ); +BOOL NPC_WindowHealerLevelCheck(int meindex,int talker); +BOOL NPC_WindowMoneyCheck(int meindex,int talker,int mode); +int NPC_WindowCostCheck(int meindex,int talker); +BOOL NPC_PetHealerCheck(int talker); +int NPC_WindowCostCheckMp(int meindex,int talker); + + +/********************************* +* 赓渝质 +*********************************/ +BOOL NPC_WindowHealerInit( int meindex ) +{ + + char *npcarg; + char buf2[256]; + int range=1; + int rate; + double drate; + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPEHEALER ); + + npcarg = CHAR_getChar(meindex,CHAR_NPCARGUMENT); + + /*--荚汊允月午五及云嗯毛潸月伊矛伙毛筏盛--*/ + /*-- 仃木壬综日木卅中--*/ + if(getStringFromIndexWithDelim(npcarg,"|",1,buf2,sizeof(buf2))!=FALSE){ + CHAR_setWorkInt(meindex,CHAR_WORK_LEVEL,atoi(buf2)); + + }else{ + return FALSE; + } + /*--觐菁 伊□玄--*/ + if(getStringFromIndexWithDelim(npcarg, "|", 2, buf2, sizeof( buf2)) != FALSE ){ + drate = atof(buf2); + if(drate==0) { + rate=500; + }else{ + rate=(int) (drate * RATE); + } + CHAR_setWorkInt(meindex,CHAR_WORK_HP,rate); + } + if(getStringFromIndexWithDelim(npcarg, "|", 3, buf2, sizeof( buf2)) != FALSE ){ + drate = atof(buf2); + if(drate==0){ + rate=2000; + }else{ + rate=(int)( drate * RATE); + } + CHAR_setWorkInt(meindex,CHAR_WORK_MP,rate); + } + if(getStringFromIndexWithDelim(npcarg, "|", 4, buf2, sizeof( buf2)) != FALSE ){ + range=atoi(buf2); + if(range == 0){ + range=1; + } + } + CHAR_setWorkInt(meindex,CHAR_WORK_RANGE,range); + return TRUE; + +} + +void NPC_WindowHealerTalked( int meindex , int talkerindex , char *szMes ,int color ) +{ + if( CHAR_getInt( talkerindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) { + return; + } + + if( NPC_Util_CharDistance( talkerindex, meindex ) + > CHAR_getWorkInt(meindex,CHAR_WORK_RANGE)){ + return; + } + if( (CHAR_getWorkInt(talkerindex,CHAR_WORKPARTYMODE) == 0) + || (CHAR_getWorkInt(talkerindex,CHAR_WORKPARTYMODE) == 2) ){ + NPC_WindowHealer_selectWindow( meindex, talkerindex,0); + }else{ + int i=0; + int otherindex; + + for( i=0 ; i < CHAR_PARTYMAX ;i++){ + otherindex=CHAR_getWorkInt(talkerindex,CHAR_WORKPARTYINDEX1+i); + if(otherindex != -1){ + NPC_WindowHealer_selectWindow( meindex, otherindex,0); + } + } + } +} +void NPC_WindowHealerLooked( int meindex , int lookedindex) +{ + if( CHAR_getInt( lookedindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) { + return; + } + if( NPC_Util_CharDistance( lookedindex, meindex ) + > CHAR_getWorkInt(meindex,CHAR_WORK_RANGE)){ + return; + } + NPC_WindowHealer_selectWindow( meindex, lookedindex,0); +} + +static void NPC_WindowHealer_selectWindow( int meindex, int toindex, int num) +{ + + char token[1024]; + char escapedname[1024]; + int fd = getfdFromCharaIndex( toindex); + int buttontype=0; + int windowtype=0; + int windowno=0; + + /*--它奶件玉它正奶皿丢永本□斥互云云中及匹燮卞涩烂--*/ + windowtype=WINDOW_MESSAGETYPE_MESSAGE; + + switch( num){ + case 0: + /*--蓟 --*/ + sprintf(token,"    哎呀!你受伤了吗?  \n\n " + "       < 耐久力回复>      \n" + "       < 气力回复 >      \n" + "      < 耐久力·气力回复 >   \n\n" + "       <宠物回复(免费)>     " + ); + + buttontype=WINDOW_BUTTONTYPE_CANCEL; + windowtype=WINDOW_MESSAGETYPE_SELECT; + windowno=CHAR_WINDOWTYPE_WINDOWHEALER_STARTMSG; + break; + + + case 1: + if( CHAR_getInt(toindex,CHAR_HP) ==CHAR_getWorkInt( toindex, CHAR_WORKMAXHP)){ + if(NPC_PetHealerCheck(toindex)==FALSE){ + sprintf(token, + "       < 耐久力回复 >" + "\n\n\n\n    似乎没有必要回复唷! "); + }else{ + sprintf(token, + "       < 耐久力回复 >" + "\n\n     似乎没有必要回复唷! " + "\n\n   因为宠物好像也受伤了!" + "\n 先帮他回复吧!"); + + NPC_WindowHealerAllHeal(toindex,0 ); + } + + buttontype=WINDOW_BUTTONTYPE_OK; + windowno=CHAR_WINDOWTYPE_WINDOWHEALER_HPMSG; + break; + }else if(NPC_WindowHealerLevelCheck(meindex,toindex)==TRUE){ + sprintf(token,"       < 耐久力回复 >" + "\n\n\n       是要回复耐久力没错吧!    " + "\n\n 现在的等级可以免费帮你回复唷!"); + + }else{ + int gold; + gold=NPC_WindowCostCheck(meindex,toindex); + sprintf(token,"       < 耐久力回复 >" + "\n\n\n       是要回复耐久力没错吧!    " + "\n\n     收您%d的STONE 。" + ,gold); + } + + buttontype=WINDOW_BUTTONTYPE_YESNO; + windowno=CHAR_WINDOWTYPE_WINDOWHEALER_HPMSG; + break; + + case 2: + if( CHAR_getInt(toindex,CHAR_MP) ==CHAR_getWorkInt( toindex, CHAR_WORKMAXMP)){ + if(NPC_PetHealerCheck(toindex)==FALSE){ + sprintf(token, "       < 气力回复 >" + "\n\n\n\n    似乎没有必要回复唷! "); + }else{ + sprintf(token, "       < 气力回复 >" + "\n\n     似乎没有必要回复唷! " + "\n\n   因为宠物好像也受伤了!" + "\n 先帮他回复吧!"); + NPC_WindowHealerAllHeal(toindex,0 ); + } + buttontype=WINDOW_BUTTONTYPE_OK; + windowno=CHAR_WINDOWTYPE_WINDOWHEALER_SPIRITMSG; + break; + } + + if(NPC_WindowHealerLevelCheck(meindex,toindex)==TRUE){ + sprintf(token,"       < 气力回复>" + "\n\n       是要回复气力没错吧!     " + "\n\n 现在的等级可以免费帮你回复唷!"); + }else{ + int cost; + cost=NPC_WindowCostCheckMp(meindex,toindex); + sprintf(token,"       < 气力回复>" + "\n\n\n       是要回复气力没错吧! " + "\n\n    收您%d的STONE 。", + cost); + } + buttontype=WINDOW_BUTTONTYPE_YESNO; + windowno=CHAR_WINDOWTYPE_WINDOWHEALER_SPIRITMSG; + break; + + + case 3: + sprintf(token, "\n      <耐久力已回复>" + "\n   <宠物也已回复一般状态>" + "\n\n\n      这样子就没问题了!    "); + + /*--觐菁 及心荚汊今六月--*/ + NPC_WindowHealerAllHeal( toindex ,1 ); + buttontype=WINDOW_BUTTONTYPE_OK; + windowno=CHAR_WINDOWTYPE_WINDOWHEALER_OKHPMSG; + break; + + + case 4: + sprintf(token, "\n      <气力已回复>" + "\n   <宠物也已回复一般状态>" + "\n\n\n      这样子就没问题了!    "); + /*--竣 及心荚汊今六月---*/ + NPC_WindowHealerAllHeal( toindex ,2 ); + buttontype=WINDOW_BUTTONTYPE_OK; + windowno=CHAR_WINDOWTYPE_WINDOWHEALER_OKSPIRITMSG; + break; + + + case 6: + { + int cost=0; + + if(CHAR_getInt(toindex,CHAR_HP) < CHAR_getWorkInt( toindex, CHAR_WORKMAXHP)) + { + cost+=NPC_WindowCostCheck(meindex,toindex); + } + + if( CHAR_getInt(toindex,CHAR_MP) < CHAR_getWorkInt( toindex, CHAR_WORKMAXMP)) + { + cost=cost+NPC_WindowCostCheckMp(meindex,toindex); + } + + if(cost==0) { + if(NPC_PetHealerCheck(toindex)==FALSE){ + sprintf(token, + "     < 耐久力气力回复 >" + "\n\n\n\n    似乎没有必要回复唷! "); + }else{ + sprintf(token,"     < 耐久力气力回复 >" + "\n\n     似乎没有必要回复唷! " + "\n\n   因为宠物好像也受伤了!" + "\n 先帮他回复吧!"); + NPC_WindowHealerAllHeal(toindex,0 ); + } + + + + buttontype=WINDOW_BUTTONTYPE_OK; + windowtype=WINDOW_MESSAGETYPE_MESSAGE; + windowno=CHAR_WINDOWTYPE_WINDOWHEALER_SPIRITMSG; + break; + + }else{ + sprintf(token,"    < 耐久力气力回复 >" + "\n\n\n     是要回复耐久力气力没错吧!" + "\n\n     收您%d的STONE 。",cost); + } + } + + if(NPC_WindowHealerLevelCheck(meindex,toindex)==TRUE){ + sprintf(token,"     < 耐久力气力回复 >" + "\n\n\n      是要回复耐久力气力没错吧!" + "\n\n 现在的等级可以免费帮你回复唷!"); + } + + buttontype=WINDOW_BUTTONTYPE_YESNO; + windowtype=WINDOW_MESSAGETYPE_MESSAGE; + windowno=CHAR_WINDOWTYPE_WINDOWHEALER_ALLMSG; + break; + + + case 7: + sprintf(token,"     <耐久力气力已回复>" + "\n   <宠物也已回复一般状态>" + "\n\n\n    这样一来就回复健康了!"); + + NPC_WindowHealerAllHeal( toindex ,3 ); + buttontype=WINDOW_BUTTONTYPE_OK; + windowtype=WINDOW_MESSAGETYPE_MESSAGE; + windowno=CHAR_WINDOWTYPE_WINDOWHEALER_OKALLMSG; + break; + + + case 8: + sprintf(token,"\n\n\n\n   真可惜似乎所带的金钱不够唷!"); + + buttontype=WINDOW_BUTTONTYPE_OK; + windowtype=WINDOW_MESSAGETYPE_MESSAGE; + windowno=CHAR_WINDOWTYPE_WINDOWHEALER_OKHPMSG; + break; + + case 9: + sprintf(token,"       <宠物回复>      " + "\n\n\n       已经没问题了啦!     " + "\n\n  但是太勉强的话也不行唷!  "); + NPC_WindowHealerAllHeal(toindex,0 ); + buttontype=WINDOW_BUTTONTYPE_OK; + windowtype=WINDOW_MESSAGETYPE_MESSAGE; + windowno=CHAR_WINDOWTYPE_WINDOWHEALER_OKHPMSG; + break; + + case 10: + sprintf(token,"       <宠物回复>      " + "\n\n\n  似乎没有必要回复宠物的样子。 " + "\n\n  但是太勉强的话也不行唷!  "); + buttontype=WINDOW_BUTTONTYPE_OK; + windowtype=WINDOW_MESSAGETYPE_MESSAGE; + windowno=CHAR_WINDOWTYPE_WINDOWHEALER_OKHPMSG; + break; + + + } + + + makeEscapeString( token, escapedname, sizeof(escapedname)); + /*-仇仇匹霜耨允月--*/ + lssproto_WN_send( fd, windowtype, + buttontype, + windowno, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + escapedname); + +} + + +/*----------------------------------------- +弁仿奶失件玄井日忒匀化五凶凛卞裟太请今木月[ +-------------------------------------------*/ +void NPC_WindowHealerWindowTalked( int meindex, int talkerindex, + int seqno, int select, char *data) +{ + + if( NPC_Util_CharDistance( talkerindex, meindex ) > (CHAR_getWorkInt(meindex,CHAR_WORK_RANGE)+4)) return; + + switch( seqno){ + case CHAR_WINDOWTYPE_WINDOWHEALER_STARTMSG: + if(atoi(data)==2) /*--蓟 仄凶嫩 1--*/ + { + NPC_WindowHealer_selectWindow( meindex, talkerindex, 1 ); + + }else if(atoi(data)==3){ + /*--蓟 仄凶嫩 2--*/ + NPC_WindowHealer_selectWindow( meindex, talkerindex, 2 ); + + }else if(atoi(data)==4){ + /*--蓟 仄凶嫩 2--*/ + NPC_WindowHealer_selectWindow( meindex, talkerindex, 6 ); + + }else if(atoi(data)==6){ + /*--蓟 仄凶嫩 2--*/ + if(NPC_PetHealerCheck( talkerindex)==TRUE){ + NPC_WindowHealer_selectWindow( meindex, talkerindex, 9 ); + }else{ + NPC_WindowHealer_selectWindow( meindex, talkerindex, 10 ); + } + }else if(select==WINDOW_BUTTONTYPE_CANCEL){ + /*--仇仇引匹仁月午蔽 卅及匹窒手仄卅中--*/ + } + break; + + + /*-----觐菁 荚汊毛云仇卅丹-----*/ + case CHAR_WINDOWTYPE_WINDOWHEALER_HPMSG: + if(select==WINDOW_BUTTONTYPE_OK){ + NPC_WindowHealer_selectWindow( meindex, talkerindex, 0 ); + + }else if(select==WINDOW_BUTTONTYPE_YES){ + /*--云嗯及民尼永弁--*/ + if(NPC_WindowMoneyCheck(meindex,talkerindex,1)==TRUE){ + NPC_WindowHealer_selectWindow( meindex, talkerindex, 3 ); + }else{ + NPC_WindowHealer_selectWindow( meindex, talkerindex, 8 ); + } + }else if(select==WINDOW_BUTTONTYPE_NO){ + NPC_WindowHealer_selectWindow( meindex, talkerindex, 0 ); + + } + break; + + + /*-----竣 荚汊毛云仇卅丹-----*/ + case CHAR_WINDOWTYPE_WINDOWHEALER_SPIRITMSG: + if(select==WINDOW_BUTTONTYPE_OK){ + NPC_WindowHealer_selectWindow( meindex, talkerindex, 0 ); + + }else if(select==WINDOW_BUTTONTYPE_YES){ + /*--云嗯及民尼永弁--*/ + if(NPC_WindowMoneyCheck(meindex,talkerindex,2)==TRUE){ + NPC_WindowHealer_selectWindow( meindex, talkerindex, 4 ); + }else{ + NPC_WindowHealer_selectWindow( meindex, talkerindex, 8 ); + } + + }else if(select==WINDOW_BUTTONTYPE_NO){ + NPC_WindowHealer_selectWindow( meindex, talkerindex, 0 ); + } + + break; + + + /*-----觐菁 荚汊及瑛绊-----*/ + case CHAR_WINDOWTYPE_WINDOWHEALER_OKHPMSG: + if(select==WINDOW_BUTTONTYPE_OK){ + NPC_WindowHealer_selectWindow( meindex, talkerindex, 0 ); + } + break; + + + case CHAR_WINDOWTYPE_WINDOWHEALER_OKSPIRITMSG: + if(select==WINDOW_BUTTONTYPE_OK){ + NPC_WindowHealer_selectWindow( meindex, talkerindex, 0 ); + } + break; + + + /*--蝈荚汊今六月--*/ + case CHAR_WINDOWTYPE_WINDOWHEALER_ALLMSG: + if(select==WINDOW_BUTTONTYPE_OK){ + NPC_WindowHealer_selectWindow( meindex, talkerindex, 0 ); + + }else if(select==WINDOW_BUTTONTYPE_YES){ + if(NPC_WindowMoneyCheck(meindex,talkerindex,3)==TRUE){ + NPC_WindowHealer_selectWindow( meindex, talkerindex, 7 ); + }else{ + NPC_WindowHealer_selectWindow( meindex, talkerindex, 8 ); + } + + }else if(select==WINDOW_BUTTONTYPE_NO){ + NPC_WindowHealer_selectWindow( meindex, talkerindex, 0 ); + } + break; + + + /*--蝈荚汊及瑛绊--*/ + case CHAR_WINDOWTYPE_WINDOWHEALER_OKALLMSG: + if(select==WINDOW_BUTTONTYPE_YES){ + NPC_WindowHealer_selectWindow( meindex, talkerindex, 0 ); + } + break; + } + + if(select==WINDOW_BUTTONTYPE_CANCEL + && CHAR_getWorkInt( talkerindex, CHAR_WORKPARTYMODE ) == 2) + { + CHAR_sendWatchEvent( CHAR_getWorkInt( talkerindex, CHAR_WORKOBJINDEX), + CHAR_ACTPLEASURE,NULL,0,TRUE); + CHAR_setWorkInt( talkerindex, CHAR_WORKACTION, CHAR_ACTPLEASURE); + } + +} + + +/*--辎勾中化中月及卅日}TRUE毛忒允--*/ +BOOL NPC_PetHealerCheck(int talker) +{ + + int petindex; + int i; + + /*--矢永玄反云引仃匹荚汊仄化丐仆月--*/ + for(i=0;i CHAR_getInt(talker,CHAR_LV)){ + return TRUE; + } + + return FALSE; + +} + + +/*------------------------------------------- +云嗯 匀化月井民尼永弁 +娄醒 +meindex’’’ 及奶件犯永弁旦 +talker’’’’平乓仿弁正□及奶件犯永弁旦 +---------------------------------------------*/ +BOOL NPC_WindowMoneyCheck(int meindex,int talker,int mode) +{ + int cost=0; + int level; + + level=CHAR_getWorkInt(meindex,CHAR_WORK_LEVEL); + + if(mode==1){ + if(level <= CHAR_getInt(talker,CHAR_LV)){ + /*---云嗯毛喃曰请允---*/ + cost=NPC_WindowCostCheck(meindex,talker); + /*--蜇箕反移涩烂---*/ + /*---云嗯互箫曰月井升丹井及民尼永弁---*/ + if(CHAR_getInt(talker,CHAR_GOLD) < cost){ + return FALSE; + + } + CHAR_DelGold( talker, cost); + } + } + if(mode==2){ + if(level <= CHAR_getInt(talker,CHAR_LV)){ + /*---云嗯毛喃曰请允---*/ + cost=NPC_WindowCostCheckMp(meindex,talker); + + /*--蜇箕反移涩烂---*/ + /*---云嗯互箫曰月井升丹井及民尼永弁---*/ + if(CHAR_getInt(talker,CHAR_GOLD) < cost){ + return FALSE; + } + CHAR_DelGold( talker, cost); + } + } + + if(mode==3){ + if(level <= CHAR_getInt(talker,CHAR_LV)){ + + /*--觐菁 及云嗯及煌遥--*/ + if( CHAR_getInt(talker,CHAR_HP) +#include "char.h" +#include "object.h" +#include "char_base.h" +#include "npcutil.h" +#include "configfile.h" +#include "lssproto_serv.h" +#include "npc_windowman.h" + +struct { + int windowno; + int windowtype; + int buttontype; + int takeitem; + int giveitem; + char message[4096]; +}w; + +struct { + BOOL use; + int checkhaveitem; + int checkhaveitemgotowin; + int checkdonthaveitem; + int checkdonthaveitemgotowin; + int warp; + int battle; + int gotowin; +}buttonproc[13]; /* ok,cancel, yes,no,prev,next 及凛及质 */ + + + + + +enum { + CHAR_WORK_MSGCOLOR = CHAR_NPCWORKINT1, +}; +//static void NPC_Windowman_selectWindow( int meindex, int toindex, int num); +//static BOOL NPC_Windowman_readData( int meindex, int windowno, BOOL chkflg); +//static int NPC_Windowman_restoreButtontype( char *data ); + +/********************************* +* 赓渝质 +*********************************/ +BOOL NPC_WindowmanInit( int meindex ) +{ + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[1024]; + //int i; + //char secondToken[1024]; + + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "conff", buf, sizeof( buf)) + == NULL ) + { + print( "windowman:没有指定设定的档案 。\n"); + return FALSE; + } + /* 赓渝凛卞涩烂犯□正毛民尼永弁仄化支月 */ + if( !NPC_Windowman_readData( meindex, -1, TRUE) ) { + return FALSE; + } + + CHAR_setInt( meindex , CHAR_WHICHTYPE , CHAR_TYPEWINDOWMAN ); + + return TRUE; +} + + + + +/********************************* +* 仄井仃日木凶凛及质 +*********************************/ +void NPC_WindowmanTalked( int meindex , int talkerindex , char *szMes ,int color ) +{ + + NPC_Windowman_selectWindow( meindex, talkerindex, 1 ); + +} +/********************************* +* 苇日木凶凛及质 +*********************************/ +void NPC_WindowmanLooked( int meindex , int lookedindex) +{ + + NPC_Windowman_selectWindow( meindex, lookedindex,1 ); + +} + +/*static*/ void NPC_Windowman_selectWindow( int meindex, int toindex, int num) +{ + + int fd; + char buf[256]; + + /* 皿伊奶乩□卞覆仄化分仃 杀允月 */ + if( CHAR_getInt( toindex , CHAR_WHICHTYPE ) != CHAR_TYPEPLAYER ) { + return; + } + /* ㄠ弘伉永玉动 及心 */ + if( !NPC_Util_charIsInFrontOfChar( toindex, meindex, 1 )) return; + + if( !NPC_Windowman_readData( meindex, num, FALSE) ) { + print( "windowman:readdata error\n"); + return; + } + + fd = getfdFromCharaIndex( toindex); + if( fd != -1 ) { + lssproto_WN_send( fd, w.windowtype, + w.buttontype, + w.windowno+100, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + makeEscapeString( w.message, buf, sizeof(buf))); + } +} +void NPC_WindowmanWindowTalked( int meindex, int talkerindex, + int seqno, int select, char *data) + +{ + int button = -1; + char buf[256]; + if( NPC_Util_CharDistance( talkerindex, meindex ) > 1) return; + + if( !NPC_Windowman_readData( meindex, seqno - 100, FALSE) ) { + print( "windowman:readdata error\n"); + return; + } + if( w.windowtype == WINDOW_MESSAGETYPE_SELECT ) { + button = atoi( data)+5; + if( button > 12 ) { + print( "windowman:invalid button[%d]\n", button); + return; + } + } + else if( select & WINDOW_BUTTONTYPE_OK) button = 0; + else if( select & WINDOW_BUTTONTYPE_CANCEL) button = 1; + else if( select & WINDOW_BUTTONTYPE_YES) button = 2; + else if( select & WINDOW_BUTTONTYPE_NO) button = 3; + else if( select & WINDOW_BUTTONTYPE_PREV) button = 4; + else if( select & WINDOW_BUTTONTYPE_NEXT) button = 5; + else { + print( "windowman:invalid button[%d]\n", select); + return; + } + if( buttonproc[button].use == TRUE ) { + int i; + int fd; + int newwin = -1; + if( buttonproc[button].checkhaveitem != -1 ) { + for( i = 0; i < CHAR_MAXITEMHAVE; i ++ ) { + int itemindex = CHAR_getItemIndex( talkerindex, i); + if( ITEM_CHECKINDEX( itemindex)) { + if( ITEM_getInt( itemindex, ITEM_ID) + == buttonproc[button].checkhaveitem ) + { + break; + } + } + } + if( i == CHAR_MAXITEMHAVE ) { + return; + } + newwin = buttonproc[button].checkhaveitemgotowin; + } + if( buttonproc[button].checkdonthaveitem != -1 ) { + for( i = 0; i < CHAR_MAXITEMHAVE; i ++ ) { + int itemindex = CHAR_getItemIndex( talkerindex, i); + if( ITEM_CHECKINDEX( itemindex)) { + if( ITEM_getInt( itemindex, ITEM_ID) + == buttonproc[button].checkdonthaveitem ) + { + break; + } + } + } + if( i != CHAR_MAXITEMHAVE ) { + return; + } + newwin = buttonproc[button].checkdonthaveitemgotowin; + } + + if( newwin == -1 ) { + newwin = buttonproc[button].gotowin; + } + if( !NPC_Windowman_readData( meindex, newwin, FALSE) ) { + print( "windowman:readdata error\n"); + return; + } + fd = getfdFromCharaIndex( talkerindex); + if( fd != -1 ) { + lssproto_WN_send( fd, w.windowtype, + w.buttontype, + w.windowno+100, + CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), + makeEscapeString( w.message, buf, sizeof(buf))); + } + } +} + +BOOL NPC_Windowman_readData( int meindex, int windowno, BOOL chkflg) +{ + + int i; + int linenum = 0; + int endflg = FALSE; + int buttonendflg; + int winno = -1; + int buttonconfmode; + int b_mode; + int selectnum ; + int messagepos; + BOOL errflg = FALSE; + BOOL readflg = TRUE; + FILE *fp; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char filename[64]; + char opfile[128]; + char line[1024]; + char firstToken[1024]; + char secondToken[1024]; + + /* 它奴件玉它及涩烂毛 曰 戈厌瞻 */ + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + /* 涩烂白央奶伙 潸 */ + if( NPC_Util_GetStrFromStrWithDelim( argstr, "conff", filename, sizeof( filename)) == NULL ) { + print("\n err:NOT FIND [conff] "); + return FALSE; + } + + sprintf( opfile, "%s/", getNpcdir( ) ); + strcat( opfile, filename); + + fp = fopen( opfile, "r"); + if( fp == NULL ) { + print( "windowman:file open error [%s]\n", opfile); + return FALSE; + } + + while( readflg == TRUE ) { + endflg = FALSE; + buttonendflg = TRUE; + buttonconfmode = FALSE; + selectnum = 0; + messagepos = 0; + winno = -1; + b_mode = -1; + errflg = FALSE; + + /* 赓渝祭 */ + w.windowno = -1; + w.windowtype = -1; + w.buttontype = -1; + w.takeitem = -1; + w.giveitem = -1; + w.message[0] = '\0'; + + for( i = 0; i < arraysizeof( buttonproc); i ++ ) { + buttonproc[i].use = FALSE; + buttonproc[i].checkhaveitem = -1; + buttonproc[i].checkhaveitemgotowin = -1; + buttonproc[i].checkdonthaveitem = -1; + buttonproc[i].checkdonthaveitemgotowin = -1; + buttonproc[i].warp = -1; + buttonproc[i].battle = -1; + buttonproc[i].gotowin = -1; + } + + while( 1) { + char buf[256]; + int ret; + if( !fgets( line, sizeof( line), fp)){ + readflg = FALSE; + break; + } + + linenum ++; + + /* 戊丢件玄反 骰 */ + if( line[0] == '#' || line[0] == '\n') continue; + /* 荼垫潸月 */ + chomp( line ); + + /* 垫毛帮溥允月 */ + /* 引内 tab 毛 " " 卞 五晶尹月 */ + replaceString( line, '\t' , ' ' ); + /* 燮 及旦矢□旦毛潸月[*/ + for( i = 0; i < strlen( line); i ++) { + if( line[i] != ' ' ) { + break; + } + strcpy( buf, &line[i]); + } + if( i != 0 ) strcpy( line, buf); + + /* delim "=" 匹 赓(1)及玄□弁件毛 月*/ + ret = getStringFromIndexWithDelim( line, "=", 1, firstToken, + sizeof( firstToken ) ); + if( ret == FALSE ){ + print( "Find error at %s in line %d. Ignore\n", + filename , linenum); + continue; + } + /* delim "=" 匹2 及玄□弁件毛 月*/ + ret = getStringFromIndexWithDelim( line, "=", 2, secondToken, + sizeof( secondToken ) ); + if( ret == FALSE ){ + print( "Find error at %s in line %d. Ignore\n", + filename , linenum); + continue; + } + + if( strcasecmp( firstToken, "winno") == 0 ) { + if( winno != -1 ) { + print( "windowman:已有winno却重新定义winno\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + errflg = TRUE; + readflg = FALSE; + break; + } + /* 它奴件玉它No毛忡绣 */ + winno = atoi( secondToken); + continue; + } + /* 它奴件玉它No 互瑁引匀化中卅中凛及垫反 骰允月 */ + if( winno == -1 ) { + print( "windowman:winno 尚未定义,资料却已设定。\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + readflg = FALSE; + errflg = FALSE; + break; + } + /* 它奴件玉它No 互域谯仄凶凛反椭瘀毛 戈[ + * 公木动陆反 骰允月 */ + if( (chkflg == FALSE && winno == windowno )|| + chkflg == TRUE) + { + if( buttonconfmode == TRUE ) { + if( strcasecmp( firstToken, "gotowin") == 0 ) { + buttonproc[b_mode].gotowin = atoi( secondToken); + } + else if( strcasecmp( firstToken, "checkhaveitem") == 0 ) { + buttonproc[b_mode].checkhaveitem = atoi( secondToken); + } + else if( strcasecmp( firstToken, "haveitemgotowin") == 0 ) { + buttonproc[b_mode].checkhaveitemgotowin = atoi( secondToken); + } + else if( strcasecmp( firstToken, "checkdonthaveitem") == 0 ) { + buttonproc[b_mode].checkdonthaveitem = atoi( secondToken); + } + else if( strcasecmp( firstToken, "donthaveitemgotowin") == 0 ) { + buttonproc[b_mode].checkdonthaveitemgotowin = atoi( secondToken); + } + else if( strcasecmp( firstToken, "endbutton") == 0 ) { + if( buttonproc[b_mode].gotowin == - 1 ) { + if( buttonproc[b_mode].checkhaveitem == -1 && + buttonproc[b_mode].checkdonthaveitem == -1) + { + errflg = TRUE; + } + else { + /* 升匀切井井凶匀吊分仃匹手涩烂今木化中木壬 */ + if( !((buttonproc[b_mode].checkhaveitem != -1 && + buttonproc[b_mode].checkhaveitemgotowin != -1) + || (buttonproc[b_mode].checkdonthaveitem != -1 && + buttonproc[b_mode].checkdonthaveitemgotowin != -1))) + { + errflg = TRUE; + } + } + } + + if( errflg == TRUE) { + print( "windowman: 找不到gotowin\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + readflg = FALSE; + errflg = TRUE; + break; + } + buttonproc[b_mode].use = TRUE; + buttonconfmode = FALSE; + buttonendflg = TRUE; + } + } + else { + + w.windowno = winno; + /* 它奴件玉它正奶皿及涩烂 */ + if( strcasecmp( firstToken, "wintype") == 0 ) { + w.windowtype = atoi( secondToken); + } + /* 示正件正奶皿及涩烂 */ + else if( strcasecmp( firstToken, "buttontype") == 0 ) { + w.buttontype = NPC_Windowman_restoreButtontype( secondToken); + } + /* getitem及涩烂 */ + else if( strcasecmp( firstToken, "takeitem") == 0 ) { + w.takeitem = atoi( secondToken); + } + /* giveitem及涩烂 */ + else if( strcasecmp( firstToken, "giveitem") == 0 ) { + w.giveitem = atoi( secondToken); + } + /* message及涩烂 */ + else if( strcasecmp( firstToken, "message") == 0 ) { + if( messagepos == 0 ) { + strcpy( w.message, secondToken); + messagepos = strlen( w.message); + } + else { + w.message[messagepos]='\n'; + messagepos++; + strcpy( &w.message[messagepos], secondToken); + messagepos+=strlen(secondToken); + } + } + /* 示正件毛瓷仄凶凛及涩烂 */ + else if( strcasecmp( firstToken, "okpressed") == 0 ) { + buttonconfmode = TRUE; + b_mode = 0; + buttonendflg = FALSE; + } + else if( strcasecmp( firstToken, "cancelpressed") == 0 ) { + buttonconfmode = TRUE; + b_mode = 1; + buttonendflg = FALSE; + } + else if( strcasecmp( firstToken, "yespressed") == 0 ) { + buttonconfmode = TRUE; + b_mode = 2; + buttonendflg = FALSE; + } + else if( strcasecmp( firstToken, "nopressed") == 0 ) { + buttonconfmode = TRUE; + b_mode = 3; + buttonendflg = FALSE; + } + else if( strcasecmp( firstToken, "prevpressed") == 0 ) { + buttonconfmode = TRUE; + b_mode = 4; + buttonendflg = FALSE; + } + else if( strcasecmp( firstToken, "nextpressed") == 0 ) { + buttonconfmode = TRUE; + b_mode = 5; + buttonendflg = FALSE; + } + else if( strcasecmp( firstToken, "selected") == 0 ) { + buttonconfmode = TRUE; + b_mode = 6 + selectnum; + buttonendflg = FALSE; + selectnum ++; + } + /* 涩烂蔽歹曰 */ + else if( strcasecmp( firstToken, "endwin") == 0 ) { + endflg = TRUE; + if( chkflg == FALSE) { + readflg = FALSE; + } + break; + } + else { + print( "windowman:设定是不可能的参数\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + } + } + } + else { + if( strcasecmp( firstToken, "endwin") == 0 ) { + winno = -1; + } + } + } + if( buttonendflg == FALSE) { + print( "windowman: 找不到endbutton\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + errflg = TRUE; + break; + } + if( winno != -1 ) { + if( w.windowtype == -1 ) { + print( "windowman: 找不到wintype\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + errflg = TRUE; + break; + } + if( w.buttontype == -1 ) { + print( "windowman: 找不到button\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + errflg = TRUE; + break; + } + if( strlen( w.message) == 0 ) { + print( "windowman: 找不到message\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + errflg = TRUE; + break; + } + } + } + fclose( fp); + + if( chkflg == FALSE && w.windowno == -1 ) { + print( "windowman: 找不到所指定的windowno\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + return FALSE; + } + if( winno != -1 && endflg == FALSE) { + print( "windowman: 找不到endwin\n"); + print( "filename:[%s] line[%d]\n", filename, linenum); + return FALSE; + } + if( errflg == TRUE) return FALSE; + + return TRUE; +} +/* + * buttontype=匹隙烂仄凶 侬 毛醒袄卞 晶允月[ + * + */ +/*static*/ int NPC_Windowman_restoreButtontype( char *data ) +{ + int ret = 0; + int rc; + int i; + char buff[1024]; + + for( i = 1; ; i ++ ) { + rc = getStringFromIndexWithDelim( data, "|", i, buff, + sizeof( buff ) ); + if( rc == FALSE) break; + if( strcasecmp( buff, "ok") == 0 ) { + ret |= WINDOW_BUTTONTYPE_OK; + } + else if( strcasecmp( buff, "cancel") == 0 ) { + ret |= WINDOW_BUTTONTYPE_CANCEL; + } + else if( strcasecmp( buff, "yes") == 0 ) { + ret |= WINDOW_BUTTONTYPE_YES; + } + else if( strcasecmp( buff, "no") == 0 ) { + ret |= WINDOW_BUTTONTYPE_NO; + } + else if( strcasecmp( buff, "prev") == 0 ) { + ret |= WINDOW_BUTTONTYPE_PREV; + } + else if( strcasecmp( buff, "next") == 0 ) { + ret |= WINDOW_BUTTONTYPE_NEXT; + } + } + if( ret == 0 ) { + ret = atoi( data); + } + return ret; +} diff --git a/gmsv/npc/npccreate.c b/gmsv/npc/npccreate.c new file mode 100644 index 0000000..81c7306 --- /dev/null +++ b/gmsv/npc/npccreate.c @@ -0,0 +1,626 @@ +#include "version.h" +#define __NPCCREATE__ + +#include +#include + +#include "common.h" +#include "npccreate.h" +#include "npctemplate.h" +#include "util.h" +#include "buf.h" +#include "readmap.h" +#include "char_data.h" +#include "handletime.h" +#include "configfile.h" + +INLINE int NPC_CHECKCREATEINDEX(int index) +{ + if( NPC_createnum <= index || index < 0 )return FALSE; + return TRUE; +} + +INLINE int NPC_CHECKCREATEINTINDEX( int index) +{ + if( NPC_CREATEINTNUM <= index || index < 0 )return FALSE; + return TRUE; +} + +INLINE int NPC_setCreateInt( int index , NPC_CREATEINT element, int data ) +{ + int buf; + buf = NPC_create[index].intdata[element]; + NPC_create[index].intdata[element] = data; + return buf; +} + +INLINE int NPC_getCreateInt( int index , NPC_CREATEINT element ) +{ + return NPC_create[index].intdata[element]; +} + + +BOOL NPC_initCreateArray( int createnum ) +{ + NPC_createnum = createnum; + NPC_create = (NPC_Create*)allocateMemory( sizeof( NPC_Create ) * NPC_createnum ); + + print( "开启大小:%d. 创建数量:%d.\n", sizeof( NPC_Create ), createnum); + if( NPC_create == NULL ){ + return FALSE; + } + NPC_create_readindex = 0; + return TRUE; +} + +void NPC_setDefaultNPCCreate( NPC_Create* cr ) +{ + if( cr == NULL )return; + + cr->intdata[NPC_CREATEFLOORID]=0; + cr->intdata[NPC_CREATEBORNLEFTUPX]=0; + cr->intdata[NPC_CREATEBORNLEFTUPY]=0; + cr->intdata[NPC_CREATEBORNRIGHTDOWNX]=0; + cr->intdata[NPC_CREATEBORNRIGHTDOWNY]=0; + cr->intdata[NPC_CREATEMOVELEFTUPX]=0; + cr->intdata[NPC_CREATEMOVELEFTUPY]=0; + cr->intdata[NPC_CREATEMOVERIGHTDOWNX]=0; + cr->intdata[NPC_CREATEMOVERIGHTDOWNY]=0; + + cr->intdata[NPC_CREATEDIR]=0; + //jeffrey 1231 +#ifdef _ADD_ACTION + cr->intdata[NPC_CREATEACTION] = 0; +#endif + cr->intdata[NPC_CREATEBASEIMAGENUMBER]=-1; + cr->intdata[NPC_CREATETIME]=0; + cr->intdata[NPC_CREATEBORNNUM]=0; + cr->intdata[NPC_CREATEENEMYNUM]=0; + cr->intdata[NPC_CREATEBOUNDARY]=1; + cr->intdata[NPC_CREATEIGNOREINVINCIBLE]=0; + + cr->intdata[NPC_CREATEDATE]=0; + + cr->intdata[NPC_CREATEFAMILY]=0; + + cr->chardata[NPC_CREATENAME].string[0]= '\0'; + + cr->workdata[NPC_CREATEWORKENEMYNUM]=0; + cr->workdata[NPC_CREATEWORKMAKESTARTSEC]=0; + cr->workdata[NPC_CREATEWORKMAKESTARTUSEC]=0; + cr->workdata[NPC_CREATEWORKNEVERMAKE]=0; + + + { + int i; + for( i=0 ; itemplateindex) ; i++ ){ + cr->templateindex[i] = -1; + cr->arg[i].string[0] = '\0'; + } + } +} + +BOOL NPC_IsNPCCreateFile( char* filename ) +{ + FILE* f; + char line1[128]; + char* ret; + + /* ~匹蔽月白央奶伙反卅仄卞允月 */ + if( filename == NULL + || strlen( filename ) < 1 + || filename[strlen(filename)-1] == '~' + || filename[0] == '#' + || strcmptail( filename, ".bak" ) == 0 )return FALSE; + + f= fopen( filename , "r" ); + if( f == NULL ) goto RETURNFALSE; + + ret = fgets( line1, sizeof( line1 ), f ); + if( ret == NULL )goto FCLOSERETURNFALSE; + + if( strcasecmp( NPC_CREATEFILEMAGIC, line1 ) == 0 ){ + fclose(f); + return TRUE; + } + +FCLOSERETURNFALSE: + fclose(f); +RETURNFALSE: + return FALSE; +} + +static int NPC_readCreateFile( char* filename ) +{ + FILE* f; + char line[512]; + int linenum=0; + int start=OFF; + NPC_Create cr; + int enemyreadindex=0; + + typedef struct tagPOINT + { + int x,y; + }POINT; + typedef struct tagREC + { + int w,h; + }REC; + POINT center[2]={{0,0},{0,0}}; /* born 互 0 匹 move 互 1 */ + REC wh[2] ={{0,0},{0,0}}; /* born 互 0 匹 move 互 1 */ + + POINT lu[2] ={{0,0},{0,0}}; /* born 互 0 匹 move 互 1 */ + POINT rd[2] ={{0,0},{0,0}}; /* born 互 0 匹 move 互 1 */ + + int defborn=FALSE; /* born 毛涩烂仄凶井升丹井 */ + int defmove=FALSE; /* move 毛涩烂仄凶井升丹井 */ + int deflurd[2]={FALSE,FALSE}; /* lu,rd 匹涩烂仄凶井升丹井 */ + char* ret; + + + if( NPC_create_readindex >= NPC_createnum ){ + print("创建超过配置缓冲\n" ); + print("配置缓冲数目是 %d\n",NPC_createnum); + print("没用文件 %s\n",filename); + return FALSE; + } + + NPC_setDefaultNPCCreate( &cr ); + + f= fopen( filename ,"r"); + if( f == NULL )return FALSE; + + ret = fgets( line, sizeof( line ), f ); + if( ret == NULL )goto FCLOSERETURNFALSE; + if( strcmp( NPC_CREATEFILEMAGIC, line ) != 0 ){ + print( "这不是一个create文件.\n" ); + goto FCLOSERETURNFALSE; + } + linenum = 1; + + while( fgets( line , sizeof( line ) , f ) ){ + + linenum++; + + if( line[0] == '#' )continue; /* comment */ + if( line[0] == '\n' )continue; /* none */ + chomp( line ); + + switch( line[0] ){ + case '{': + if( start == ON ){ + fprint( "Find {. But already START state. %s:%d\n", + filename, linenum); + fprint( "退出\n" ); + goto FCLOSERETURNFALSE; + + }else{ + NPC_setDefaultNPCCreate( &cr ); + start = ON; + } + break; + case '}': + if( start == ON ){ + int err = FALSE; + if( enemyreadindex == 0 ){ + err = TRUE; + print( "这不是遇敌数据 %s:%d\n", + filename,linenum); + }else if( MAP_IsThereSpecificFloorid( + cr.intdata[NPC_CREATEFLOORID]) == FALSE ){ + err = TRUE; + print( "地图ID号有毛病 %s:%d-floor:%d\n", + filename,linenum, cr.intdata[NPC_CREATEFLOORID]); + }else if( defborn == FALSE ){ + err = TRUE; + print( "这些不是 born 安装 %s:%d\n", + filename,linenum); + } + + if( err == FALSE ){ + cr.intdata[NPC_CREATEENEMYNUM] = enemyreadindex; + + if( deflurd[0] ){ + cr.intdata[NPC_CREATEBORNLEFTUPX] = + min(lu[0].x,rd[0].x); + cr.intdata[NPC_CREATEBORNRIGHTDOWNX] = + max(lu[0].x,rd[0].x); + cr.intdata[NPC_CREATEBORNLEFTUPY] = + min(lu[0].y,rd[0].y); + cr.intdata[NPC_CREATEBORNRIGHTDOWNY] = + max(lu[0].y,rd[0].y); + }else{ + cr.intdata[NPC_CREATEBORNLEFTUPX] = + center[0].x-wh[0].w/2; + cr.intdata[NPC_CREATEBORNRIGHTDOWNX] = + center[0].x+wh[0].w/2; + cr.intdata[NPC_CREATEBORNLEFTUPY] = + center[0].y-wh[0].h/2; + cr.intdata[NPC_CREATEBORNRIGHTDOWNY] = + center[0].y+wh[0].h/2; + } + /* 99/01/21 扎鼹 [0]-->[1]卞膜恳 */ + if( defmove ){ + if( deflurd[0] ){ + cr.intdata[NPC_CREATEMOVELEFTUPX] = + min(lu[1].x,rd[1].x); + cr.intdata[NPC_CREATEMOVERIGHTDOWNX] = + max(lu[1].x,rd[1].x); + cr.intdata[NPC_CREATEMOVELEFTUPY] = + min(lu[1].y,rd[1].y); + cr.intdata[NPC_CREATEMOVERIGHTDOWNY] = + max(lu[1].y,rd[1].y); + }else{ + cr.intdata[NPC_CREATEMOVELEFTUPX] = + center[1].x-wh[1].w/2; + cr.intdata[NPC_CREATEMOVERIGHTDOWNX] = + center[1].x+wh[1].w/2; + cr.intdata[NPC_CREATEMOVELEFTUPY] = + center[1].y-wh[1].h/2; + cr.intdata[NPC_CREATEMOVERIGHTDOWNY] = + center[1].y+wh[1].h/2; + } + + }else{ + /* born 毛戊疋□允月 */ + cr.intdata[NPC_CREATEMOVELEFTUPX] = + cr.intdata[NPC_CREATEBORNLEFTUPX]; + cr.intdata[NPC_CREATEMOVERIGHTDOWNX] = + cr.intdata[NPC_CREATEBORNRIGHTDOWNX]; + cr.intdata[NPC_CREATEMOVELEFTUPY] = + cr.intdata[NPC_CREATEBORNLEFTUPY]; + cr.intdata[NPC_CREATEMOVERIGHTDOWNY] = + cr.intdata[NPC_CREATEBORNRIGHTDOWNY]; + } + + memcpy( &NPC_create[NPC_create_readindex], &cr, + sizeof( NPC_Create ) ); + + + NPC_create_readindex++; + + if( NPC_create_readindex >= NPC_createnum ){ + print("创建超过配置缓冲\n" ); + print("配置创建文件数目 %d\n", + NPC_createnum); + print("没用文件:%s\n",filename); + goto FCLOSERETURNFALSE; + } + + } + /* 赓渝袄卞 仄化云仁 */ + NPC_setDefaultNPCCreate( &cr ); + enemyreadindex=0; + defborn=FALSE; + defmove=FALSE; + deflurd[0]=FALSE; + deflurd[1]=FALSE; + + start = OFF; + }else{ + fprint( "未解决 '}' at %s:%d\n",filename,linenum); + goto FCLOSERETURNFALSE; + } + break; + default: + { + + char firstToken[256]; + char secondToken[256]; + int ret; + ret = getStringFromIndexWithDelim( line, "=", 1, firstToken, + sizeof( firstToken ) ); + if( ret == FALSE ){ + print( "Find error at %s in line %d. Ignore\n", + filename , linenum); + break; + } + ret = getStringFromIndexWithDelim( line, "=", 2, secondToken, + sizeof( secondToken ) ); + if( ret == FALSE ){ + print( "Find error at %s in line %d. Ignore\n", + filename , linenum); + break; + } + + if( strcasecmp("floorid",firstToken) == 0 ){ + cr.intdata[NPC_CREATEFLOORID] = atoi(secondToken); + + }else if( strcasecmp("borncenter", firstToken) == 0 ){ + getFourIntsFromString(secondToken,¢er[0].x, + ¢er[0].y,&wh[0].w,&wh[0].h ); + defborn = TRUE; + }else if( strcasecmp("borncorner", firstToken) == 0 ){ + getFourIntsFromString(secondToken,&lu[0].x,&lu[0].y, + &rd[0].x,&rd[0].y ); + defborn = TRUE; + deflurd[0]=TRUE; + + }else if( strcasecmp("movecenter", firstToken) == 0 ){ + getFourIntsFromString(secondToken,¢er[1].x, + ¢er[1].y,&wh[1].w,&wh[1].h ); + defmove = TRUE; + }else if( strcasecmp("movecorner", firstToken) == 0 ){ + getFourIntsFromString(secondToken,&lu[1].x,&lu[1].y, + &rd[1].x,&rd[1].y ); + defmove = TRUE; + deflurd[1]=TRUE; + + }else if( strcasecmp("dir",firstToken) == 0 ){ + cr.intdata[NPC_CREATEDIR] = atoi( secondToken ); + + }else if( strcasecmp("graphicname",firstToken) == 0 ){ + cr.intdata[NPC_CREATEBASEIMAGENUMBER] + = CHAR_seekGraphicNumberFromString(secondToken); + + }else if( strcasecmp("name",firstToken) == 0 ){ + strcpysafe( cr.chardata[NPC_CREATENAME].string, + sizeof(cr.chardata[NPC_CREATENAME].string), + secondToken ); + + }else if( strcasecmp("time",firstToken) == 0 ){ + cr.intdata[NPC_CREATETIME] = atoi( secondToken ); + + }else if( strcasecmp("date",firstToken) == 0 ){ + cr.intdata[NPC_CREATEDATE] = atoi( secondToken ); + + }else if( strcasecmp("createnum",firstToken) == 0 ){ + cr.intdata[NPC_CREATEBORNNUM] = atoi( secondToken ); + + }else if( strcasecmp( "boundary", firstToken) == 0 ){ + cr.intdata[NPC_CREATEBOUNDARY] = atoi( secondToken ); + + }else if( strcasecmp( "ignoreinvincible", firstToken) == 0 ){ + cr.intdata[NPC_CREATEIGNOREINVINCIBLE] = atoi( secondToken ); + + //jeffrey 1231 +#ifdef _ADD_ACTION + }else if( strcasecmp( "action", firstToken) == 0 ){ + cr.intdata[NPC_CREATEACTION] = atoi( secondToken ); +#endif + // Robin 0731 + }else if( strcasecmp( "family", firstToken) == 0 ){ + cr.intdata[NPC_CREATEFAMILY] = atoi( secondToken ); + + }else if( strcasecmp("enemy", firstToken) == 0 ){ + /* 娄醒毛 六月方丹卞允月 */ + int templateindex; + char enemyname[64]; + + /* 雁钗瞬民尼永弁 */ + if( enemyreadindex <= arraysizeof(cr.templateindex) ) + /* OK */ + ; + else + break; + + /* secondToken 毛 侬 卞坌荸允月 */ + getStringFromIndexWithDelim(secondToken,"|",1,enemyname, + sizeof(enemyname) ); + templateindex= NPC_templateGetTemplateIndex(enemyname); + if( templateindex != -1 ){ + cr.templateindex[enemyreadindex] = templateindex; + { + /* 娄醒毛质 允月 */ + char tmp[2]; + int ret; + ret = getStringFromIndexWithDelim( secondToken, + "|",2,tmp, + sizeof(tmp) ); + if( ret == FALSE ) + cr.arg[enemyreadindex].string[0] = '\0'; + else + strcpysafe( cr.arg[enemyreadindex].string, + sizeof( cr.arg[enemyreadindex]. + string ), + secondToken+strlen(enemyname)+1 ); + } + enemyreadindex++; + }else + fprint( "没有这种模块:\n[%s(%d)%s] enemy:%s\n", + filename ,linenum,secondToken, enemyname); + }else{ + fprint( "没有这种登陆 %s %s:%d\n",firstToken,filename, + linenum ); + } + } + } + } + + fclose(f); + return TRUE; + +FCLOSERETURNFALSE: + fclose(f); + return FALSE; +} + +BOOL NPC_readNPCCreateFiles( char* topdirectory ,int createsize) +{ + STRING64 *filenames; + int filenum; + int i; + filenames = (STRING64 *)allocateMemory( sizeof( STRING64 ) * + (int)getFilesearchnum( ) ); + if( filenames == NULL ){ + print( "读取NPC创建文件... 内存错误\n" ); + return FALSE; + } + filenum = rgetFileName( topdirectory ,filenames ,getFilesearchnum( ) ); + if( filenum == -1 ){ + freeMemory( filenames ); + return FALSE; + } + if( filenum >= getFilesearchnum( ) ){ + print( "文件搜索数目失败 %d\n", getFilesearchnum( ) ); + while( 1 ); + } + if( !NPC_initCreateArray( createsize ) ){ + fprint( "开启创建数组错误\n" ); + freeMemory( filenames ); + return FALSE; + } + print( "读取NPC创建文件..." ); + for( i = 0 ; i < filenum ; i ++ ) + if( NPC_IsNPCCreateFile( filenames[i].string )) + if( NPC_readCreateFile( filenames[i].string ) == -1 ) + break; + print( "正确创建NPC %d ..." , NPC_create_readindex ); + NPC_createnum=NPC_create_readindex; +#ifdef DEBUG + /* 99/4/8 By Kawata csv溥挚卞仄化支月 */ + print( "Npc_Create's\n"); + for( i = 0 ; i < NPC_createnum ; i ++ ){ + int j; + /*print( "NPC_create[%d]:\n", i);*/ + print( "%d,", i); + for( j = 0 ; j < NPC_CREATECHARNUM ; j ++ ) + print("%s," , NPC_create[i].chardata[j].string ); + /*print( "\tIntdata\t" );*/ + for( j = 0 ; j < NPC_CREATEINTNUM ; j ++ ) + print("%d," , NPC_create[i].intdata[j] ); + /***print("\n" ); + print( "\tChardata\t" );***/ + for( j = 0 ; j < NPC_create[i].intdata[NPC_CREATEENEMYNUM]; j ++ ) + print("%d" , NPC_create[i].templateindex[j] ); + /*print("\n" );*/ + print("\n" ); + } +#endif /*DEBUG*/ + + freeMemory( filenames ); + return TRUE; +} + + + +/*------------------------------------------------------------ + * createindex 井日 boundary 互涩烂今木化中月井升丹井毛苇月 + * 娄醒 + * createindex int create及奶件犯永弁旦 + * 忒曰袄 + * 涩烂今木化中月 TRUE(1) + * 涩烂今木化中卅中 FALSE(0) + ------------------------------------------------------------*/ +BOOL NPC_isBoundarySet( int createindex ) +{ + if( NPC_CHECKCREATEINDEX(createindex) == FALSE )return FALSE; + return NPC_create[createindex].intdata[NPC_CREATEBOUNDARY]; +} +/*------------------------------------------------------------ + * createindex 井日 仃月 区及RECT 毛菲户月[ + * 娄醒 + * createindex int 件皿伊□玄及奶件犯永弁旦 + * r RECT* 袄毛熬仃午月RECT 及禾奶件正 + * 忒曰袄 + * 岳 TRUE(1) + * 撩 FALSE(0) + ------------------------------------------------------------*/ +BOOL NPC_createGetRECT( int createindex,RECT* r ) +{ + if( NPC_CHECKCREATEINDEX(createindex) == FALSE )return FALSE; + + r->x = NPC_create[createindex].intdata[NPC_CREATEMOVELEFTUPX]; + r->y = NPC_create[createindex].intdata[NPC_CREATEMOVELEFTUPY]; + r->width + = NPC_create[createindex].intdata[NPC_CREATEMOVERIGHTDOWNX] + - NPC_create[createindex].intdata[NPC_CREATEMOVELEFTUPX]; + r->height + = NPC_create[createindex].intdata[NPC_CREATEMOVERIGHTDOWNY] + - NPC_create[createindex].intdata[NPC_CREATEMOVELEFTUPY]; + return TRUE; +} + + + +/*------------------------------------------------------------ + * 凛棉井日综匀化手中中井升丹井民尼永弁允月[ + * 娄醒 + * cindex int 奶件犯永弁旦 + * 忒曰袄 + * BOOL 综匀化中中桦宁 TRUE(1) + * BOOL 综匀化中仃卅中桦宁 FALSE(0) + ------------------------------------------------------------*/ +BOOL NPC_createCheckGenerateFromTime( int cindex ) +{ + struct timeval old; + if( !NPC_CHECKCREATEINDEX(cindex) ) + return FALSE; + + if( NPC_create[cindex].workdata[NPC_CREATEWORKNEVERMAKE] ) + return FALSE; + + if( NPC_create[cindex].intdata[NPC_CREATEBORNNUM] + <= NPC_create[cindex].workdata[NPC_CREATEWORKENEMYNUM] ) + return FALSE; + + if( NPC_create[cindex].intdata[NPC_CREATETIME] < 0 )return FALSE; + old.tv_sec = NPC_create[cindex].workdata[NPC_CREATEWORKMAKESTARTSEC]; + old.tv_usec= NPC_create[cindex].workdata[NPC_CREATEWORKMAKESTARTUSEC]; + + if( time_diff_us( NowTime , old ) <= + NPC_create[cindex].intdata[NPC_CREATETIME]*1000 ) + return FALSE; + + return TRUE; +} + + + + +/*------------------------------------------------------------ + * 综月凛及凛棉及涩烂毛赓渝祭允月[ + * 娄醒 + * tindex int 奶件犯永弁旦 + * 忒曰袄 + * 卅仄 + ------------------------------------------------------------*/ +void NPC_createInitTime( int index ) +{ + /* 综月仪卞卅匀凶井日袄毛涩烂 */ + NPC_create[index].workdata[NPC_CREATEWORKMAKESTARTSEC] = + NowTime.tv_sec; + NPC_create[index].workdata[NPC_CREATEWORKMAKESTARTUSEC] = + NowTime.tv_usec; +} +/*------------------------------------------------------------ + * 衬毛综匀凶 卞市它件玄醒毛 支允楮醒 + * 娄醒 + * index int 奶件犯永弁旦 + * 忒曰袄 + * 卅仄 + ------------------------------------------------------------*/ +void NPC_createIncreaseEnemynum( int index ) +{ + if( !NPC_CHECKCREATEINDEX(index) )return; + NPC_create[index].workdata[NPC_CREATEWORKENEMYNUM] ++; +} +/*------------------------------------------------------------ + * 衬互韶氏匹市它件玄醒毛蛹日允楮醒 + * 娄醒 + * index int 奶件犯永弁旦 + * 忒曰袄 + * 卅仄 + ------------------------------------------------------------*/ +void NPC_createDecreaseEnemynum( int index ) +{ + if( !NPC_CHECKCREATEINDEX(index) )return; + NPC_create[index].workdata[NPC_CREATEWORKENEMYNUM] --; +} +/*------------------------------------------------------------ + * 市它件玄醒互漆 井譬屯月楮醒 + * 娄醒 + * index int 奶件犯永弁旦 + * 忒曰袄 + * TRUE:MAX FALSE:啜丹 + ------------------------------------------------------------*/ +BOOL NPC_createCheckMaxEnemynum( int index ) +{ + + if( NPC_create[index].intdata[NPC_CREATEBORNNUM] + <= NPC_create[index].workdata[NPC_CREATEWORKENEMYNUM] ) + return TRUE; + else + return FALSE; +} diff --git a/gmsv/npc/npcgen.c b/gmsv/npc/npcgen.c new file mode 100644 index 0000000..8ad9039 --- /dev/null +++ b/gmsv/npc/npcgen.c @@ -0,0 +1,387 @@ +#include "version.h" +#include + +#include "common.h" +#include "npccreate.h" +#include "npctemplate.h" +#include "char.h" +#include "char_data.h" +#include "buf.h" +#include "object.h" +#include "readmap.h" +#include "item.h" +#include "handletime.h" +#include "map_deal.h" + +typedef struct tagNPC_searchPoint +{ + int floor; + int x; + int y; +}NPC_searchPoint; + + +/* 窒荚NPC毛综月井 */ +#define NPC_CREATECHALLENGETIME 1 +int all_nosee = 0; /* ㄠ及凛{蝈化及衬毛 no_see 卞 */ +int all_nobody = 0; /* ㄠ及凛{蝈化及衬毛 no_body 卞 */ +int one_loop_born = 1; /* ㄠ伙□皿匹 嫖戏心请允醒 oneloop_born */ + +/*------------------------------------------------------------ + * 衬毛丹心分允桦赭毛瑁烂允月 + * 娄醒 + * cr NPC_Create* 甄 及汔互瑁匀化中月NPC_Create及禾奶件正 + * nobody int 1 及凛反簿手中卅中凛卞勾仁月 + * (簿井中化手综月) + * 0 及凛反簿手中卅中凛反综日卅中[ + * (簿井中凶凛及心综月) + * nosee int 1 及凛反皿伊奶乩□及骰钗及 匹手综月[ + * 0 及凛反皿伊奶乩□及骰钗及陆匹综月[ + * point NPC_searchPoint* 请蜇今六月桦赭毛医 允月 + * isflying BOOL 氏匹中月井升丹井[ 氏匹中月卅日 TRUE 匹 + * 请蜇匏 氏及及穴永皿午及癫曰 烂 + * 毛仄卅仁卅月 + * 忒曰袄 + * 综木月凛反 TRUE + * 综木卅中凛反 FALSE + ------------------------------------------------------------*/ +static BOOL NPC_searchCreatePoint( NPC_Create* cr,int nobody,int nosee, + NPC_searchPoint* point, BOOL isflying ) +{ + int floor=cr->intdata[NPC_CREATEFLOORID]; + int x = cr->intdata[NPC_CREATEBORNLEFTUPX]; + int y = cr->intdata[NPC_CREATEBORNLEFTUPY]; + int width; + int height; + int area; + int loop; + BOOL ret = FALSE; + int i, j; + + width = cr->intdata[NPC_CREATEBORNRIGHTDOWNX] + - cr->intdata[NPC_CREATEBORNLEFTUPX] + 1; + height = cr->intdata[NPC_CREATEBORNRIGHTDOWNY] + - cr->intdata[NPC_CREATEBORNLEFTUPY] + 1; + area = width * height; + if( nobody == 0 && all_nobody == 0 ) { + BOOL found = FALSE; + for( i = x ; i <= x +width && found == FALSE; i ++ ) { + for( j = y; j <= y + height && found == FALSE; j ++ ) { + OBJECT object; + for( object = MAP_getTopObj( floor, i,j); + object; + object = NEXT_OBJECT(object) ) + { + int objindex = GET_OBJINDEX( object); + if( OBJECT_getType(objindex) == OBJTYPE_CHARA ){ + if( CHAR_getInt( OBJECT_getIndex(objindex), + CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ) + { + found = TRUE; + break; + } + } + } + } + } + if( found == FALSE ) { + return( FALSE); + } + } + for( loop=0 ; loopintdata[NPC_CREATEIGNOREINVINCIBLE] == 0 + && CHAR_isInvincibleArea( floor,crx,cry ) ){ + continue; + } + if( nosee == 0 && all_nosee == 0 ) { + BOOL found = FALSE; + for( i = crx - CHAR_DEFAULTSEESIZ/2 ; + i <= crx +CHAR_DEFAULTSEESIZ/2 && found == FALSE ; i ++ ) + { + for( j = cry - CHAR_DEFAULTSEESIZ/2; + j <= cry + CHAR_DEFAULTSEESIZ/2 && found == FALSE; + j ++ ) + { + OBJECT object; + for( object = MAP_getTopObj( floor, i,j); + object; + object = NEXT_OBJECT(object) ) + { + int objindex = GET_OBJINDEX( object); + if( OBJECT_getType(objindex) == OBJTYPE_CHARA ){ + if( CHAR_getInt( OBJECT_getIndex(objindex), + CHAR_WHICHTYPE ) + == CHAR_TYPEPLAYER ) + { + found = TRUE; + break; + } + } + } + } + } + if( found == TRUE ){ + return FALSE; + } + } + if( MAP_walkAbleFromPoint( floor,crx,cry,isflying ) == TRUE ){ + point->floor = cr->intdata[NPC_CREATEFLOORID]; + point->x = crx; + point->y = cry; + ret = TRUE; + break; + }else{ + } + } + + return( ret ); +} + + +typedef struct tagNPC_Correspondfunction +{ + int template; + int ch; +}NPC_Correspondfunction; + +static NPC_Correspondfunction correspondfunction[]={ + { NPC_TEMPLATEINITFUNC, CHAR_INITFUNC }, + { NPC_TEMPLATEWALKPREFUNC, CHAR_WALKPREFUNC }, + { NPC_TEMPLATEWALKPOSTFUNC, CHAR_WALKPOSTFUNC }, + { NPC_TEMPLATEPREOVERFUNC, CHAR_PREOVERFUNC }, + { NPC_TEMPLATEPOSTOVERFUNC, CHAR_POSTOVERFUNC }, + { NPC_TEMPLATEWATCHFUNC, CHAR_WATCHFUNC }, + { NPC_TEMPLATELOOPFUNC, CHAR_LOOPFUNC }, + { NPC_TEMPLATETALKEDFUNC, CHAR_TALKEDFUNC }, + { NPC_TEMPLATEDYINGFUNC, CHAR_DYINGFUNC }, + { NPC_TEMPLATEPREATTACKEDFUNC,CHAR_PREATTACKEDFUNC }, + { NPC_TEMPLATEPOSTATTACKEDFUNC, CHAR_POSTATTACKEDFUNC }, + { NPC_TEMPLATEOFFFUNC, CHAR_OFFFUNC }, + { NPC_TEMPLATELOOKEDFUNC, CHAR_LOOKEDFUNC }, + { NPC_TEMPLATEITEMPUTFUNC, CHAR_ITEMPUTFUNC }, + { NPC_TEMPLATESPECIALTALKEDFUNC, CHAR_SPECIALTALKEDFUNC}, + { NPC_TEMPLATEWINDOWTALKEDFUNC, CHAR_WINDOWTALKEDFUNC}, +#ifdef _USER_CHARLOOPS + { NPC_TEMPLATELOOPFUNCTEMP1, CHAR_LOOPFUNCTEMP1}, + { NPC_TEMPLATELOOPFUNCTEMP2, CHAR_LOOPFUNCTEMP2}, + { NPC_TEMPLATEBATTLEPROPERTY, CHAR_BATTLEPROPERTY}, +#endif +}; +/*------------------------------------------------------------ + * 楮醒戊疋□允月 + * 娄醒 + * ch Char* 平乓仿犯□正 + * temp NPC_template* 件皿伊□玄及禾奶件正□ + * 忒曰袄 + * 卅仄 + ------------------------------------------------------------*/ +static void NPC_copyFunction( Char* ch, NPC_Template* temp ) +{ + int i; + for( i=0 ; ichardata[correspondfunction[i].template].string[0] != '\0' ) + strcpysafe( ch->charfunctable[correspondfunction[i].ch].string, + sizeof(ch->charfunctable[correspondfunction[i].ch].string), + temp->chardata[correspondfunction[i].template].string); +} + +static BOOL NPC_generateNPC( int createindex, int createtemplateindex ) +{ + Char one; + NPC_searchPoint sp; + int i; + NPC_Template* template; + NPC_Create* cr; + + if( NPC_CHECKCREATEINDEX(createindex) + && 0 <= createtemplateindex + && createtemplateindex < arraysizeof(NPC_create[createindex].templateindex ) + && NPC_CHECKTEMPLATEINDEX( NPC_create[createindex].templateindex[createtemplateindex])){ + cr = &NPC_create[createindex]; + template = &NPC_template[NPC_create[createindex]. + templateindex[createtemplateindex]]; + }else{ + return FALSE; + } + if( NPC_searchCreatePoint( cr, + template->intdata[NPC_TEMPLATEMAKEATNOBODY], + template->intdata[NPC_TEMPLATEMAKEATNOSEE], &sp, + template->intdata[NPC_TEMPLATEISFLYING]) == FALSE ){ + return FALSE; + } + if( CHAR_getDefaultChar( &one, template->intdata[NPC_TEMPLATETYPE] ) == FALSE ){ + return FALSE; + } + one.data[CHAR_FLOOR] = sp.floor; + one.data[CHAR_X] = sp.x; + one.data[CHAR_Y] = sp.y; + one.data[CHAR_DIR] = cr->intdata[NPC_CREATEDIR]; +#ifdef _ADD_ACTION + one.data[CHAR_ACTIONSTYLE] = cr->intdata[NPC_CREATEACTION]; +#endif + + one.data[CHAR_BASEBASEIMAGENUMBER] = one.data[CHAR_BASEIMAGENUMBER] + = template->intdata[NPC_TEMPLATEIMAGENUMBER]; + if( cr->intdata[NPC_CREATEBASEIMAGENUMBER] != -1 ) + one.data[CHAR_BASEBASEIMAGENUMBER] + = one.data[CHAR_BASEIMAGENUMBER] + = cr->intdata[NPC_CREATEBASEIMAGENUMBER]; + + strcpysafe(one.string[CHAR_NAME].string, + sizeof(one.string[CHAR_NAME].string), + template->chardata[NPC_TEMPLATECHARNAME].string); + + + if( cr->chardata[NPC_CREATENAME].string[0] != '\0' ){ + strcpysafe(one.string[CHAR_NAME].string, + sizeof(one.string[CHAR_NAME].string), + cr->chardata[NPC_CREATENAME].string); + } + + // Robin 0731 + one.data[CHAR_FMINDEX] = cr->intdata[NPC_CREATEFAMILY]; + NPC_copyFunctionSetToChar( template-> + intdata[NPC_TEMPLATEFUNCTIONINDEX], + &one ); + NPC_copyFunction( &one, template ); + one.data[CHAR_LOOPINTERVAL] = template-> + intdata[NPC_TEMPLATELOOPFUNCTIME]; + if( cr->arg[createtemplateindex].string[0] != '\0' ){ + strcpysafe( one.string[CHAR_NPCARGUMENT].string, + sizeof(one.string[CHAR_NPCARGUMENT].string), + cr->arg[createtemplateindex].string ); + }else{ + one.string[CHAR_NPCARGUMENT].string[0] = '\0'; + } + one.data[CHAR_WHICHTYPE] = CHAR_TYPEENEMY; + one.data[CHAR_NPCCREATEINDEX] = createindex; + { + static struct NPC_Paramtable + { + int templateindex; + int charadataindex; + }paramtbl[]={ + { NPC_TEMPLATEMINMP, CHAR_MAXMP }, + { NPC_TEMPLATEMINSTR, CHAR_STR }, + { NPC_TEMPLATEMINTOUGH, CHAR_TOUGH }, + + + }; + for( i=0 ; irandomdata[ + paramtbl[i].templateindex] ); + one.data[paramtbl[i].charadataindex] + = one.data[paramtbl[i].charadataindex] + + template->intdata[paramtbl[i].templateindex] + + randomvalue; + } + one.data[CHAR_MP] = one.data[CHAR_MAXMP]; + } + { + int itemindex=CHAR_STARTITEMARRAY; + for( i = 0 ; i < template->intdata[NPC_TEMPLATEITEMNUM] ; i ++ ){ + if( RAND(0,32767) <= template->haveitem[i].haverate ){ + if( template->haveitem[i].itemnumber == -1 + && template->haveitem[i].havenum > 0 ){ + int randomvalue = template->haveitem[i].havenum; + randomvalue *= (RAND(90,110))/100.0; + one.data[CHAR_GOLD] = min( CHAR_MAXGOLDHAVE, randomvalue ); + }else if( itemindex+i < CHAR_MAXITEMHAVE ){ + one.indexOfExistItems[itemindex+i] = + ITEM_makeItemAndRegist(template->haveitem[i] + .itemnumber); + } + } + } + } + + { + int charaindex; + int objindex; + Object obj; + charaindex = CHAR_initCharOneArray( &one ); + if( charaindex == -1 ){ + CHAR_endCharData( &one ); + return FALSE; + } + if( template->intdata[NPC_TEMPLATEISFLYING] ) + CHAR_setFlg(charaindex, CHAR_ISFLYING, 1 ); + + obj.type = OBJTYPE_CHARA; + obj.index= charaindex; + obj.x = CHAR_getInt(charaindex,CHAR_X); + obj.y = CHAR_getInt(charaindex,CHAR_Y); + obj.floor = CHAR_getInt(charaindex,CHAR_FLOOR); + objindex = initObjectOne( &obj ); + if( objindex == -1 ){ + CHAR_endCharOneArray( charaindex ); + return FALSE; + }else{ + } + CHAR_setWorkInt( charaindex,CHAR_WORKOBJINDEX,objindex ); +#ifdef _ADD_ACTION +//CHAR_WORKACTION + CHAR_setWorkInt( charaindex, CHAR_WORKACTION, + CHAR_getInt( charaindex, CHAR_ACTIONSTYLE ) ); + + CHAR_sendWatchEvent( objindex, CHAR_getWorkInt( charaindex, CHAR_WORKACTION) + ,NULL,0,TRUE); +#else + CHAR_sendWatchEvent(objindex,CHAR_ACTSTAND,NULL,0,TRUE); +#endif + CHAR_complianceParameter( charaindex ); + } + + return TRUE; +} + +void NPC_generateLoop( BOOL checkall ) +{ + int i,j; + int CreateOk=0; + int enemynum ; + static int createcount = 0; /* create及窒 井日蔺爵允月井 */ + static struct timeval _store_npc_generateloop_time; + if( checkall == FALSE) { + if( time_diff_us( NowTime, _store_npc_generateloop_time ) < (1000*1000)){ + return; + } else { + _store_npc_generateloop_time = NowTime; + } + } + + for( i=0 ; i < NPC_createnum ; i++ ){ + if( createcount >= NPC_createnum ) createcount = 0; + enemynum = NPC_getCreateInt( createcount, NPC_CREATEENEMYNUM ); + for( j = 0 ; j < enemynum ; j ++ ){ + if( NPC_createCheckGenerateFromTime(createcount) == TRUE ){ + CreateOk ++; + NPC_createInitTime(createcount); + if( NPC_generateNPC(createcount,j) == TRUE ){ + NPC_createIncreaseEnemynum(createcount); + }else{ + } + } + } + createcount ++; + if( checkall == FALSE && CreateOk >= one_loop_born ){ + break; + } + } +} + diff --git a/gmsv/npc/npctemplate.c b/gmsv/npc/npctemplate.c new file mode 100644 index 0000000..9055d37 --- /dev/null +++ b/gmsv/npc/npctemplate.c @@ -0,0 +1,1131 @@ +#include "version.h" +#define __NPCTEMPLATE__ + +#include +#include + +#include "common.h" +#include "npctemplate.h" +#include "buf.h" +#include "char_data.h" +#include "util.h" +#include "handletime.h" +#include "item.h" +#include "anim_tbl.h" +#include "configfile.h" + +/*涩烂毛棵签卞允月凶户卞楮醒烂聒本永玄毛综月 */ +typedef struct tagFunctionNameSet +{ + char* id; + char* initfunc; + char* walkprefunc; + char* walkpostfunc; + char* preoverfunc; + char* postoverfunc; + char* watchfunc; + char* loopfunc; + char* dyingfunc; + char* talkedfunc; + char* preattackedfunc; + char* postattackedfunc; + char* offfunc; + char* lookedfunc; + char* itemputfunc; + char* specialtalkedfunc; + char* windowtalkedfunc; +}FunctionNameSet; + + +static FunctionNameSet functionSet[]={ + + { "Sample" , "", "", "", "", "", "", "SampleLoop", + "SampleDying" ,"","", "","","","","",""}, + + /* 玉失 */ + { "Door" , "DoorInit" , "","", + "","DoorPostOver","DoorWatch","", + "","DoorTalked","", "", + "DoorOff","DoorLooked","","",""}, + + /* 饕 */ + { "SimpleShop" ,"SimpleShopInit","","", + "","","","","", + "SimpleShopTalked" , "","", + "","","" ,"SimpleShopSpecialTalked" ,""}, + + /* 丢永本□斥 */ + { "Msg" , "MsgInit" , "","", + "","","","", + "","","", "", + "","MsgLooked","","",""}, + + /* 伐□皿札□件 */ + { "Warp","WarpInit","","", + "","","","", + "","","","", + "","", "","",""}, + + /* 及谛 */ + { "TownPeople" ,"TownPeopleInit","","", + "","","","", + "", "TownPeopleTalked" ,"","", + "","","","",""}, + + /* 赢 */ + { "Oldman","OldmanInit","","", + "","","","", + "","OldmanTalked","","", + "","", "","",""}, + + + /* 本□皮禾奶件玄 */ + { "SavePoint","SavePointInit","","", + "","","","", + "","SavePointTalked","","", + "","", "","","SavePointWindowTalked"}, + + /* 甲□仿□ */ + { "Healer","HealerInit","","", + "","","","", + "","HealerTalked","","", + "","", "","",""}, + + /* 家族Healer add code by shan */ + { "FmHealer","FmHealerInit","","", + "","","","", + "","FmHealerTalked","","", + "","", "","",""}, + + /* 白虎给予者 add code by shan */ + { "PetMaker","PetMakerInit","","", + "","","","", + "","PetMakerTalked","","", + "","", "","",""}, + + /* 贿曰 */ + { "StoryTeller","StoryTellerInit","","", + "","","","", + "","StoryTellerTalked","","", + "","", "","",""}, + + /* 尕 遣盒 */ + { "RoomAdminNew","RoomAdminNewInit","","", + "","","","RoomAdminNewLoop", + "","RoomAdminNewTalked","","", + "","", "","",""}, + + /* 鳗蜕 */ + {"Dengon", + "DengonInit", "", "", "", "", "", "", "", "", + "", "", "", "DengonLooked", "", "","DengonWindowTalked"}, + + /* 家族留言板 add code by shan */ + {"FmDengon", + "FmDengonInit", "", "", "", "", "", "", "", "", + "", "", "", "FmDengonLooked", "", "","FmDengonWindowTalked"}, + + /*煽沓馨笛失奶 丞宁岳*/ + { "ItemCompo" , "ItemCompoInit", "", "", + "", "", "", "", + "" ,"ItemCompoTalked","","" + ,"","","" , "",""}, + + /* 裔烂衬 */ + { "NPCEnemy","NPCEnemyInit","","", + "","","NPCEnemyWatch","", + "","NPCEnemyTalked","","", + "","", "","","NPCEnemyWindowTalked"}, + + /* 失弁扑亦件楝 */ + { "Action","ActionInit","","", + "","","ActionWatch","", + "","ActionTalked","","", + "","", "","",""}, + + /* 迕它奴件玉它NPC */ + { "Windowman","WindowmanInit","","", + "","","","", + "","WindowmanTalked","","", + "","WindowmanLooked", "","","WindowmanWindowTalked"}, + + /*windowhealer */ + { "WindowHealer","WindowHealerInit","","", + "","","","", + "","WindowHealerTalked","","", + "","WindowHealerLooked", "","","WindowHealerWindowTalked"}, + + + /* ItemShop */ + { "ItemShop","ItemShopInit","","", + "","","","", + "","ItemShopTalked","","", + "","", "","","ItemShopWindowTalked"}, + + {"Sysinfo", + "SysinfoInit", "", "", + "", "", "", "SysinfoLoop", + "", "SysinfoTalked","", "", + "", "", "", "",""}, + + /* Duel仿件平件弘 憎NPC */ + { "Duelranking","DuelrankingInit","","", + "","","", +#ifdef _DEATH_CONTEND + "Duelrankingloop", +#else + "", +#endif + "","","","", + "","DuelrankingLooked", "","","DuelrankingWindowTalked"}, + + + /* PetSkillShop */ + { "PetSkillShop","PetSkillShopInit","","", + "","","","", + "","PetSkillShopTalked","","", + "","", "","","PetSkillShopWindowTalked"}, + + /* PetShop */ + { "PetShop","PetShopInit","","", + "","","","", + "","PetShopTalked","","", + "","", "","","PetShopWindowTalked"}, + + + /* SignBoard */ + { "SignBoard","SignBoardInit","","", + "","","","", + "","","","", + "","SignBoardLooked", "","","SignBoardWindowTalked"}, + + + /* WarpMan */ + { "WarpMan","WarpManInit","","", + "","","WarpManWatch","WarpManLoop", + "","WarpManTalked","","", + "","", "","","WarpManWindowTalked"}, + + + /* ExChangeman */ + { "ExChangeMan","ExChangeManInit","","", + "","","","", + "","ExChangeManTalked","","", + "","", "","","ExChangeManWindowTalked"}, + + /* timeman */ + { "TimeMan","TimeManInit","","", + "","","TimeManWatch","", + "","TimeManTalked","","", + "","", "","",""}, + + /* 示犯奴仿件必□斥 */ + { "BodyLan","BodyLanInit","","", + "","","BodyLanWatch","", + "","BodyLanTalked","","", + "","", "","","BodyLanWindowTalked"}, + + /* 示犯奴仿件必□斥 */ + { "Mic","MicInit","","", + "","","","", + "","MicTalked","","", + "","", "","",""}, + + /* 仿永平□穴件 */ + { "LuckyMan","LuckyManInit","","", + "","","","", + "","LuckyManTalked","","", + "","", "","","LuckyManWindowTalked"}, + + /* 穴件乒旦田旦楝 */ + { "Bus","BusInit","","", + "","","","BusLoop", + "","BusTalked","","", + "","", "","",""}, + + /* 加美航空 */ // Arminius 7.7 Ariplane + { "Airplane","AirInit","","", + "","","","AirLoop", + "","AirTalked","","", + "","", "","",""}, + + /* 楝 */ + { "Charm","CharmInit","","", + "","","","", + "","CharmTalked","","", + "","", "","","CharmWindowTalked"}, + + /* 弁奶术楝 */ + { "Quiz","QuizInit","","", + "","","","", + "","QuizTalked","","", + "","", "","","QuizWindowTalked"}, + + /* 失奶 丞 曰盒今氏 */ + { "PoolItemShop","PoolItemShopInit","","", + "","","","PoolItemShopLoop", + "","PoolItemShopTalked","","", + "","", "","","PoolItemShopWindowTalked"}, + + /* 奶矛件玄民尼永弁穴件 */ + { "CheckMan","CheckManInit","","", + "","","","", + "","CheckManTalked","","", + "","", "","","CheckManWindowTalked"}, + + /* 元扎氏仃氏楝 */ + { "Janken","JankenInit","","", + "","","","", + "","JankenTalked","","", + "","", "","","JankenWindowTalked"}, + + /* 鳖戏谛 */ + { "Transmigration","TransmigrationInit","","", + "","","","", + "","TransmigrationTalked","","", + "","", "","","TransmigrationWindowTalked"}, + + /* Family Man */ + { "Familyman","FamilymanInit","","", + "","","","", + "","FamilymanTalked","","", + "","FamilymanLooked", "","","FamilymanWindowTalked"}, + + /* CoolFish: Family Warp Man 2001/6/6 */ + { "FMWarpMan","FMWarpManInit","","", + "","","","FMWarpManLoop", + "","FMWarpManTalked","","", + "","", "","","FMWarpManWindowTalked"}, + + /* CoolFish: Family PK Man 2001/7/4 */ + { "FMPKMan","FMPKManInit","","", + "","","","", + "","FMPKManTalked","","", + "","", "","","FMPKManWindowTalked"}, + + /* CoolFish: Family PK CallMan 2001/7/13 */ + { "FMPKCallMan","FMPKCallManInit","","", + "","","","", + "","FMPKCallManTalked","","", + "","", "","","FMPKCallManWindowTalked"}, + + /* Bank Man */ + { "Bankman","BankmanInit","","", + "","","","", + "","BankmanTalked","","", + "","BankmanLooked", "","","BankmanWindowTalked"}, + + /* Arminius 7.13 scheduleman */ + { "Scheduleman","SchedulemanInit","","", + "","","","SchedulemanLoop", + "","SchedulemanTalked","","", + "","", "","","SchedulemanWindowTalked"}, + + /* Arminius 7.24 manor scheduleman */ + { "ManorSman","ManorSmanInit","","", + "","","","ManorSmanLoop", + "","ManorSmanTalked","","", + "","", "","","ManorSmanWindowTalked"}, + + // Robin + { "Riderman","RidermanInit","","", + "","","","", + "","RidermanTalked","","", + "","RidermanLooked", "","","RidermanWindowTalked"}, + + { "FmLetter","FmLetterInit","","", + "","","","", + "","FmLetterTalked","","", + "","FmLetterLooked", "","","FmLetterWindowTalked"} + // Terry 2001/08/30 + // 石器服务员 StoneSreviceMan +#ifdef _SERVICE + ,{ + "StoneServiceMan","StoneServiceManInit","","","","","", + "StoneServiceManLoop","", + "StoneServiceManTalked","","","","","","", + "StoneServiceManWindowTalked" + } +#endif +#ifdef _GAMBLE_BANK + ,{ + "NPC_GambleBank","GambleBankInit","","","","","", + "GambleBankLoop","", + "GambleBankTalked","","","","","","", + "GambleBankWindowTalked" + } +#endif + +#ifdef _GAMBLE_ROULETTE //Gamble_Roulette + ,{ + "NPC_GambleRoulette","GambleRouletteInit","","","","","", + "GambleRouletteLoop","", + "GambleRouletteTalked","","","","","","", + "GambleRouletteWindowTalked" + } + //主持人 + ,{ + "NPC_GambleMaster","GambleMasterInit","","","","","", + "GambleMasterLoop","", + "GambleMasterTalked","","","","","","", + "GambleMasterWindowTalked" + } + +#endif + +#ifdef _TRANSER_MAN + /* TranserMan */ + ,{ "TranserMan","TranserManInit","","", + "","","","TranserManLoop", + "","TranserManTalked","","", + "","", "","","TranserManWindowTalked" + } +#endif + +#ifdef _NPC_SELLSTH + /* SellsthMan */ + ,{ "SellsthMan","SellsthManInit","","", + "","","","SellsthManLoop", + "","SellsthManTalked","","", + "","", "","","SellsthManWindowTalked" + } +#endif + +#ifdef _NPC_MAKEPAIR + ,{ "MakePair","MakePairManInit","","", + "","","","MakePairManLoop", + "","MakePairManTalked","","", + "","", "","","MakePairManWindowTalked" + } +#endif + +#ifdef _NPC_FUSION + ,{ "PetFusion","PetFusionManInit","","", + "","","","PetFusionManLoop", + "","PetFusionManTalked","","", + "","", "","","PetFusionManWindowTalked" + } +#endif + +#ifdef _PAUCTION_MAN + /* PauctionMan */ + ,{ "PauctionMan","PauctionManInit","","", + "","","","PauctionManLoop", + "","PauctionManTalked","","", + "","", "","","PauctionManWindowTalked" + } +#endif + +#ifdef _ITEM_NPCCHANGE + ,{ "ItemchangeMan","ItemchangeManInit","","", + "","","","ItemchangeManLoop", + "","ItemchangeManTalked","","", + "","", "","","ItemchangeManWindowTalked" + } +#endif + +#ifdef _CFREE_petskill + ,{ + "NPC_FreePetSkill","FreePetSkillInit","","","","","", + "","", + "FreePetSkillTalked","","","","","","", + "FreePetSkillWindowTalked" + } + +#endif + +#ifdef _PETRACE + //主持人 + ,{ + "PetRaceMaster","PetRaceMasterInit","","","","","", + "PetRaceMasterLoop","", + "PetRaceMasterTalked","","","","","","", + "PetRaceMasterWindowTalked" + } + // 宠物 + ,{ + "PetRacePet","PetRacePetInit","","","","","", + "PetRacePetLoop","", + "PetRacePetTalked","","","","","","","" + } +#endif + +#ifdef _NEW_WARPMAN + ,{ + "NPC_NewNpcMan","NewNpcManInit","","","","","", + "NewNpcManLoop","", + "NewNpcManTalked","","","","","","", + "NewNpcManWindowTalked" + } +#endif + +#ifdef _MARKET_TRADE + ,{ + "NPC_MTradeNpcMan","MapTradeManInit","","","","","", + "MapTradeManLoop","", + "MapTradeManTalked","","","","","","", + "MapTradeManWindowTalked" + } +#endif + +#ifdef _BLACK_MARKET + ,{ + "BlackMarket", + "BlackMarketInit","","","","","","","","BlackMarketTalked","","", + "","", "","","BlackMarketWindowTalked" + } +#endif + +#ifdef _ALLDOMAN // (不可开) Syu ADD 排行榜NPC + ,{ + "Alldoman","AlldomanInit","","", + "","","","","","AlldomanTalked","","","","","","", + "AlldomanWindowTalked"} +#endif + +#ifdef _NPC_WELFARE + ,{ "Welfare","WelfareInit","","", + "","","","", + "","WelfareTalked","","", + "","", "","","WelfareWindowTalked"} +#endif + +#ifdef _NPC_VERYWELFARE + ,{ "VeryWelfare","VeryWelfareInit","","", + "","","","", + "","VeryWelfareTalked","","", + "","", "","","VeryWelfareWindowTalked"} +#endif + +#ifdef _NPC_WELFARE_2 // WON ADD 职业NPC-2 + ,{ "Welfare2","WelfareInit2","","", + "","","","", + "","WelfareTalked2","","", + "","", "","","WelfareWindowTalked2"} +#endif + +#ifdef _RACEMAN + ,{"Raceman","RacemanInit", "", "", + "", "", "", "", + "", "RacemanTalked", "", "", + "", "", "", "","RacemanWindowTalked"}, +#endif + +}; + +static int NPC_searchFunctionSet( char* name, int* unuse) +{ + int i; + for( i=0 ; i =arraysizeof(functionSet) )return FALSE; + + strcpysafe( ch->charfunctable[CHAR_INITFUNC].string, + sizeof( ch->charfunctable[CHAR_INITFUNC].string ), + functionSet[id].initfunc); + + strcpysafe( ch->charfunctable[CHAR_WALKPREFUNC].string, + sizeof(ch->charfunctable[CHAR_WALKPREFUNC].string), + functionSet[id].walkprefunc); + + strcpysafe( ch->charfunctable[CHAR_WALKPOSTFUNC].string, + sizeof(ch->charfunctable[CHAR_WALKPOSTFUNC].string), + functionSet[id].walkpostfunc); + + strcpysafe( ch->charfunctable[CHAR_PREOVERFUNC].string, + sizeof(ch->charfunctable[CHAR_PREOVERFUNC].string), + functionSet[id].preoverfunc); + + strcpysafe( ch->charfunctable[CHAR_POSTOVERFUNC].string, + sizeof(ch->charfunctable[CHAR_POSTOVERFUNC].string), + functionSet[id].postoverfunc); + + strcpysafe( ch->charfunctable[CHAR_WATCHFUNC].string, + sizeof(ch->charfunctable[CHAR_WATCHFUNC].string), + functionSet[id].watchfunc); + + strcpysafe( ch->charfunctable[CHAR_LOOPFUNC].string, + sizeof(ch->charfunctable[CHAR_LOOPFUNC].string), + functionSet[id].loopfunc); + + strcpysafe( ch->charfunctable[CHAR_TALKEDFUNC].string, + sizeof(ch->charfunctable[CHAR_TALKEDFUNC].string), + functionSet[id].talkedfunc); + + strcpysafe( ch->charfunctable[CHAR_DYINGFUNC].string, + sizeof(ch->charfunctable[CHAR_DYINGFUNC].string), + functionSet[id].dyingfunc); + + strcpysafe( ch->charfunctable[CHAR_PREATTACKEDFUNC].string, + sizeof(ch->charfunctable[CHAR_PREATTACKEDFUNC].string), + functionSet[id].preattackedfunc); + strcpysafe( ch->charfunctable[CHAR_POSTATTACKEDFUNC].string, + sizeof(ch->charfunctable[CHAR_POSTATTACKEDFUNC].string), + functionSet[id].postattackedfunc); + + strcpysafe( ch->charfunctable[CHAR_OFFFUNC].string, + sizeof(ch->charfunctable[CHAR_OFFFUNC].string), + functionSet[id].offfunc ); + + strcpysafe( ch->charfunctable[CHAR_LOOKEDFUNC].string, + sizeof(ch->charfunctable[CHAR_LOOKEDFUNC].string), + functionSet[id].lookedfunc ); + + strcpysafe( ch->charfunctable[CHAR_ITEMPUTFUNC].string, + sizeof(ch->charfunctable[CHAR_ITEMPUTFUNC].string), + functionSet[id].itemputfunc ); + + strcpysafe( ch->charfunctable[CHAR_SPECIALTALKEDFUNC].string, + sizeof(ch->charfunctable[CHAR_SPECIALTALKEDFUNC].string), + functionSet[id].specialtalkedfunc ); + + strcpysafe( ch->charfunctable[CHAR_WINDOWTALKEDFUNC].string, + sizeof(ch->charfunctable[CHAR_WINDOWTALKEDFUNC].string), + functionSet[id].windowtalkedfunc ); + +#ifdef _USER_CHARLOOPS + strcpysafe( ch->charfunctable[CHAR_LOOPFUNCTEMP1].string, + sizeof(ch->charfunctable[CHAR_LOOPFUNCTEMP1].string), ""); + + strcpysafe( ch->charfunctable[CHAR_LOOPFUNCTEMP2].string, + sizeof(ch->charfunctable[CHAR_LOOPFUNCTEMP2].string), ""); +#endif + return TRUE; +} + + +typedef enum +{ + NPC_INTENTRY=0, + NPC_CHARENTRY=1, + NPC_INTFUNC=2, + NPC_CHARFUNC=3, +}NPC_TYPECATEGORYATREADFILE; + +/*------------------------------------------------------------ + * Template index 午仄化恳仄中井升丹井check允月 + * 娄醒 + * index int index + * 忒曰袄 + * valid TRUE + * invalid FALSE + ------------------------------------------------------------*/ +INLINE int NPC_CHECKTEMPLATEINDEX(int index) +{ + if( NPC_templatenum <= index || index < 0 )return FALSE; + return TRUE; +} +/*------------------------------------------------------------ + * Template intdata index 午仄化恳仄中井升丹井check允月 + * 娄醒 + * index int index + * 忒曰袄 + * valid TRUE + * invalid FALSE + ------------------------------------------------------------*/ +static INLINE int NPC_CHECKTEMPLATEINTINDEX(int index) +{ + if( NPC_TEMPLATEINTNUM <= index || index < 0 )return FALSE; + return TRUE; +} +/*------------------------------------------------------------ + * Template chardata index 午仄化恳仄中井升丹井check允月 + * 娄醒 + * index int index + * 忒曰袄 + * valid TRUE + * invalid FALSE + ------------------------------------------------------------*/ +static INLINE int NPC_CHECKTEMPLATECHARINDEX(int index) +{ + if( NPC_TEMPLATECHARNUM <= index || index < 0 )return FALSE; + return TRUE; +} + + + +/*------------------------------------------------------------ + * NPC_Template毛赓渝祭允月[ + * 娄醒 + * filenum int 白央奶伙醒 + * 忒曰袄 + * 岳 TRUE(1) + * 撩 FALSE(0) + ------------------------------------------------------------*/ +BOOL NPC_initTemplateArray( int templatenum ) +{ + NPC_templatenum = templatenum; + NPC_template = (NPC_Template*)allocateMemory( sizeof( NPC_Template ) * + NPC_templatenum ); + if( NPC_template == NULL )return FALSE; + NPC_template_readindex = 0; + return TRUE; +} + +/*------------------------------------------------------------ + * 犯白巧伙玄及NPC 件皿伊□玄毛医 允月[ + * 娄醒 + * temp NPC_Template* 件皿伊□玄及禾奶件正□ + * 忒曰袄 + * 卅仄 + ------------------------------------------------------------*/ +void NPC_setDefaultNPCTemplate( NPC_Template* temp ) +{ + int i; + if( temp == NULL )return; + + for( i=0 ; i< arraysizeof(temp->chardata) ; i ++ ) + memset( &temp->chardata[i], 0, sizeof(temp->chardata[i] )); + + temp->intdata[NPC_TEMPLATEMAKEATNOBODY]=0; + temp->intdata[NPC_TEMPLATEMAKEATNOSEE]=0; + temp->intdata[NPC_TEMPLATEIMAGENUMBER]=0; + temp->intdata[NPC_TEMPLATETYPE]=-1; + + temp->intdata[NPC_TEMPLATEMINHP]=0; + temp->intdata[NPC_TEMPLATEMINMP]=0; + temp->intdata[NPC_TEMPLATEMINSTR]=0; + temp->intdata[NPC_TEMPLATEMINTOUGH]=0; + + temp->intdata[NPC_TEMPLATEISFLYING]=0; + + temp->intdata[NPC_TEMPLATEITEMNUM]=0; + temp->intdata[NPC_TEMPLATELOOPFUNCTIME]=-1; + temp->intdata[NPC_TEMPLATEFUNCTIONINDEX]=-1; + + for( i=0; irandomdata[i] = 0; + } + + temp->hash = 0; + temp->haveitem=NULL; +} + +BOOL NPC_IsNPCTemplateFile( char* filename ) +{ + FILE* f; + char line1[128]; + char* ret; + if( filename == NULL + ||strlen( filename ) < 1 + ||filename[strlen(filename)-1] == '~' + ||filename[0] == '#' + ||strcmptail( filename, ".bak" ) == 0 )return FALSE; + + f = fopen( filename , "r" ); + if( f == NULL ) goto RETURNFALSE; + ret = fgets( line1, sizeof( line1 ), f ); + if( ret == NULL )goto FCLOSERETURNFALSE; + + if( strcmp( NPC_TEMPLATEFILEMAGIC, line1 ) == 0 ){ + fclose(f); + return TRUE; + } + +FCLOSERETURNFALSE: + fclose(f); +RETURNFALSE: + return FALSE; +} + +void NPC_templateallocitemdata( NPC_Template* one ) +{ + int itemnum = one->intdata[NPC_TEMPLATEITEMNUM]; + if( itemnum > 8 ) itemnum = 8; + else if( itemnum <= 0 ) itemnum = 0; + /* 袄及 凳 */ + one->intdata[NPC_TEMPLATEITEMNUM] = itemnum; + one->haveitem = allocateMemory( sizeof( NPC_haveItem ) * itemnum ); + +} + + +/*------------------------------------------------------------ + * NPC_getRandomValue 午及娄醒及询晶岭及凶户及楮醒 + * 娄醒 + * string char* 侬 + * unuse int* 银歹卅中[ + * 忒曰袄 + * 仿件母丞及 斓及袄 汔及涩烂反}2 及娄醒卞忡绣允月[ + ------------------------------------------------------------*/ +static int NPC_seekGraphicNumberFromString( char* string, int* unuse ) +{ + return CHAR_seekGraphicNumberFromString( string ); + +} +/*------------------------------------------------------------ + * 仿件母丞袄毛 戈 + * 娄醒 + * string char* 侬 + * randomvalue int* 仿件母丞及 五今 + * 忒曰袄 + * 仿件母丞及 斓及袄 汔及涩烂反}2 及娄醒卞忡绣允月[ + ------------------------------------------------------------*/ +static int NPC_getRandomValue( char* string,int* randomwidth ) +{ + int minvalue; + int maxvalue; + char* startmax=NULL; + + minvalue = atoi( string ); + startmax = index( string,',' ); + if( startmax != NULL ){ + /* 仿件母丞涩烂互今木化中月 */ + /* +1 反 ","及凶户 */ + maxvalue = atoi(startmax+1); + + /* 切扎氏午仄凶涩烂分 */ + *randomwidth = ABS(maxvalue - minvalue); + return min(minvalue,maxvalue); + } + *randomwidth = 0; + return minvalue; +} + + +/*------------------------------------------------------------ + * NPCTemplate 白央奶伙毛夫午勾 戈[ + * 娄醒 + * filename char* 涩烂白央奶伙毛 心铵户月玄永皿犯奴伊弁玄伉 + * 忒曰袄 + * 岳 TRUE(1) + * 分户(仇木动晓白央奶伙毛 氏匹反中仃卅中) + * 撩 FALSE(0) + ------------------------------------------------------------*/ +BOOL NPC_readTemplateFile( char* filename ) +{ + FILE* f; + char line[512]; + int linenum=0; + int start=OFF; + NPC_Template temp; + int itmreadindex=0; + char* ret; + int randomdata[NPC_TEMPLATEINTNUM]; + int i; + + if( NPC_template_readindex >= NPC_templatenum ){ + print("模块超过配置数目\n" ); + print("配置模块数目 %d\n", NPC_templatenum); + return FALSE; + } + + for( i=0; i= NPC_templatenum ){ + print("模块超过配置数目\n" ); + print("配置模块数目是 %d\n", + NPC_templatenum); + goto FCLOSERETURNFALSE; + } + } + NPC_setDefaultNPCTemplate( &temp ); + itmreadindex=0; + start=OFF; + }else{ + fprint( "未解决 '}' at %s:%d\n",filename,linenum); + goto FCLOSERETURNFALSE; + } + break; + default: + { + typedef struct tagNPC_Readtemplate + { + char* keyword; + NPC_TYPECATEGORYATREADFILE type; + int index; + void* func; + }NPC_Readtemplate; + static NPC_Readtemplate NPC_readtemplate[NPC_TEMPLATECHARNUM+NPC_TEMPLATEINTNUM]= + { + {"templatename" , NPC_CHARENTRY, NPC_TEMPLATENAME,NULL}, + {"name" , NPC_CHARENTRY, NPC_TEMPLATECHARNAME, + NULL}, + {"makeatnobody", NPC_INTENTRY, NPC_TEMPLATEMAKEATNOBODY, + NULL}, + {"makeatnosee" , NPC_INTENTRY, NPC_TEMPLATEMAKEATNOSEE, + NULL}, + {"graphicname", NPC_INTFUNC, NPC_TEMPLATEIMAGENUMBER, + NPC_seekGraphicNumberFromString}, + {"type", NPC_INTFUNC, NPC_TEMPLATETYPE, + NPC_seekGraphicNumberFromString}, + + {"hp", NPC_INTFUNC, NPC_TEMPLATEMINHP, + NPC_getRandomValue}, + {"mp", NPC_INTFUNC, NPC_TEMPLATEMINMP, + NPC_getRandomValue}, + {"str", NPC_INTFUNC, NPC_TEMPLATEMINSTR, + NPC_getRandomValue}, + {"tough", NPC_INTFUNC, NPC_TEMPLATEMINTOUGH, + NPC_getRandomValue}, + + {"fly", NPC_INTENTRY,NPC_TEMPLATEISFLYING,NULL}, + + {"itemnum", NPC_INTENTRY, NPC_TEMPLATEITEMNUM, NULL,}, + {"functionset",NPC_INTFUNC, NPC_TEMPLATEFUNCTIONINDEX, + NPC_searchFunctionSet,}, + {"initfunc", NPC_CHARENTRY, NPC_TEMPLATEINITFUNC,NULL,}, + {"walkprefunc", NPC_CHARENTRY, NPC_TEMPLATEWALKPREFUNC, + NULL,}, + {"walkpostfunc",NPC_CHARENTRY, NPC_TEMPLATEWALKPOSTFUNC, + NULL,}, + {"preoverfunc", NPC_CHARENTRY, NPC_TEMPLATEPREOVERFUNC, + NULL,}, + {"postoverfunc",NPC_CHARENTRY, NPC_TEMPLATEPOSTOVERFUNC, + NULL,}, + {"watchfunc", NPC_CHARENTRY, NPC_TEMPLATEWATCHFUNC, + NULL,}, + {"loopfunc", NPC_CHARENTRY, NPC_TEMPLATELOOPFUNC, NULL,}, + {"talkedfunc",NPC_CHARENTRY,NPC_TEMPLATETALKEDFUNC,NULL,}, + {"dyingfunc",NPC_CHARENTRY,NPC_TEMPLATEDYINGFUNC,NULL,}, + {"preattackedfunc",NPC_CHARENTRY, + NPC_TEMPLATEPREATTACKEDFUNC,NULL,}, + {"postattackedfunc",NPC_CHARENTRY, + NPC_TEMPLATEPOSTATTACKEDFUNC,NULL,}, + {"offfunc",NPC_CHARENTRY,NPC_TEMPLATEOFFFUNC,NULL,}, + {"lookedfunc",NPC_CHARENTRY,NPC_TEMPLATELOOKEDFUNC,NULL,}, + {"itemputfunc",NPC_CHARENTRY,NPC_TEMPLATEITEMPUTFUNC, + NULL,}, + {"specialtalkedfunc",NPC_CHARENTRY, + NPC_TEMPLATESPECIALTALKEDFUNC, NULL,}, + + {"windowtalkedfunc",NPC_CHARENTRY, + NPC_TEMPLATEWINDOWTALKEDFUNC, NULL,}, + + {"loopfunctime",NPC_INTENTRY,NPC_TEMPLATELOOPFUNCTIME, + NULL,}, + }; + + char firstToken[256]; + int ret,i; + ret = getStringFromIndexWithDelim( line, "=", 1, firstToken, sizeof( firstToken ) ); + if( ret == FALSE ){ + print( "Find error at %s in line %d. Ignore\n", filename , linenum); + break; + } + + if( strcasecmp(firstToken,"itm") == 0 ){ + char one[128]; + char two[128]; + char three[128]; + int itemnumber=0,rate=0,amount=1; + char secondToken[256]={""}; + if( itmreadindex < temp.intdata[NPC_TEMPLATEITEMNUM] && + temp.haveitem != NULL ) + ; + else + continue; + ret = getStringFromIndexWithDelim( line, "=", 2, + secondToken, sizeof(secondToken ) ); + if( ret == FALSE ){ + print( "Find error at %s in line %d. Ignore\n", + filename , linenum); + secondToken[0] = '\0'; + } + ret = getStringFromIndexWithDelim( secondToken, "|", 1, one,sizeof( one ) ); + if( ret != FALSE )itemnumber=atoi(one); + ret = getStringFromIndexWithDelim( secondToken, "|", 2, two,sizeof(two)); + if( ret != FALSE )rate=atoi(two); + ret = getStringFromIndexWithDelim( secondToken, "|", 3, three,sizeof(three)); + if( ret != FALSE )amount=atoi(three); + if( rate > 0 && amount > 0 ){ + if( itemnumber == -1 ){ + temp.haveitem[itmreadindex].itemnumber = -1; + temp.haveitem[itmreadindex].haverate = rate; + temp.haveitem[itmreadindex].havenum = amount; + itmreadindex++; + }else if( ITEM_CHECKITEMTABLE( itemnumber ) == TRUE ){ + temp.haveitem[itmreadindex].itemnumber=itemnumber; + temp.haveitem[itmreadindex].haverate = rate; + temp.haveitem[itmreadindex].havenum = amount; + itmreadindex++; + }else + print("this item is not item %s:%d\n", + filename , linenum); + }else + print("rate or amount is odd setting. rate=%d " + "amount=%d %s:%d\n", rate,amount, filename, + linenum); + goto NEXT; + }else{ + for( i = 0 ; i < arraysizeof(NPC_readtemplate) ; i ++ ){ + if( strcasecmp( NPC_readtemplate[i].keyword, + firstToken ) == 0 ){ + char secondToken[256]={""}; + ret = getStringFromIndexWithDelim( + line, "=", 2, secondToken, sizeof(secondToken) + ); + if( ret == FALSE ) + print( "Find error at %s in line %d. Ignore\n" + ,filename , linenum); + + switch( NPC_readtemplate[i].type ){ + case NPC_INTENTRY: + temp.intdata[NPC_readtemplate[i].index]=atoi(secondToken); + if( NPC_readtemplate[i].index == NPC_TEMPLATEITEMNUM ) + NPC_templateallocitemdata( &temp ); + break; + case NPC_CHARENTRY: + strcpysafe( temp.chardata[NPC_readtemplate[i].index].string, + sizeof(temp.chardata[NPC_readtemplate[i].index].string), + secondToken); + break; + case NPC_INTFUNC: + { + int (*intfunction)(char*,int* ); + intfunction = NPC_readtemplate[i].func; + temp.intdata[NPC_readtemplate[i].index] + = intfunction( secondToken, &randomdata[NPC_readtemplate[i].index]); + break; + } + case NPC_CHARFUNC: + { + char* (*charfunction)(char* ); + charfunction = NPC_readtemplate[i].func; + strcpysafe( temp.chardata[NPC_readtemplate[i].index].string, + sizeof(temp.chardata[NPC_readtemplate[i].index].string), + charfunction(secondToken)); + break; + } + default: + break; + } + goto NEXT; + } + } + } + fprint("%s:%d There is no such entry %s\n" , filename, + linenum, firstToken ); + NEXT: + break; + } + break; + } + } + fclose(f); + return TRUE; + +FCLOSERETURNFALSE: + fclose(f); + return FALSE; +} + +BOOL NPC_readNPCTemplateFiles( char* topdirectory ,int templatesize) +{ + STRING64 *filenames; + int filenum; + int i; + filenames = (STRING64 *)allocateMemory( sizeof( STRING64 ) * + (int)getFilesearchnum( ) ); + if( filenames == NULL ){ + print( "读取NPC创建文件... 内存出错\n" ); + return FALSE; + } + filenum = rgetFileName( topdirectory ,filenames ,getFilesearchnum( ) ); + if( filenum == -1 ){ + fprint("无法从 %s 递归获取文件名\n",topdirectory); + freeMemory( filenames ); + return FALSE; + } + if( filenum >= getFilesearchnum( ) ){ + print( "文件搜索数目失败 %d\n", getFilesearchnum( ) ); + while( 1 ); + }else{ + print( "搜索到文件 = %d\n", filenum ); + } + if( !NPC_initTemplateArray( templatesize ) ){ + fprint( "开启模块数组错误\n" ); + freeMemory( filenames ); + return FALSE; + } + print( "读取文件模块数组错误...." ); + for( i = 0 ; i < filenum ; i ++ ) + if( NPC_IsNPCTemplateFile( filenames[i].string )) + NPC_readTemplateFile( filenames[i].string ); + print( "正确模块 %d ...\n" , NPC_template_readindex ); + NPC_templatenum=NPC_template_readindex; + freeMemory( filenames ); + return TRUE; +} + + + +/*------------------------------------------------------------ + * 侬 卞覆杀允月 template 及 index 毛忒允[ + * 娄醒 + * templatename char* 件皿伊□玄及 蟆 + * 忒曰袄 + * -1 及凛巨仿□ + ------------------------------------------------------------*/ +int NPC_templateGetTemplateIndex( char* templatename ) +{ + int i; + int hash=hashpjw( templatename ); + + for( i = 0 ; i < NPC_templatenum ; i ++ ) + if( hash == NPC_template[i].hash && + strcasecmp( templatename , NPC_template[i].chardata[NPC_TEMPLATENAME].string) == 0 ) + return i; + + return -1; +} diff --git a/gmsv/npc/npcutil.c b/gmsv/npc/npcutil.c new file mode 100644 index 0000000..3ca1103 --- /dev/null +++ b/gmsv/npc/npcutil.c @@ -0,0 +1,1736 @@ +#include "version.h" +#include +#include "common.h" +#include "char.h" +#include "char_base.h" +#include "configfile.h" +#include "object.h" +#include "item.h" +#include "map_deal.h" +#include "npcutil.h" +#include "npc_door.h" +#include "readmap.h" +#include "npccreate.h" +#include "enemy.h" + +// CoolFish: Family 2001/7/29 +#include "family.h" +#include "saacproto_cli.h" + +#define IS_2BYTEWORD( _a_ ) ( (char)(0x80) <= (_a_) && (_a_) <= (char)(0xFF) ) + +extern struct FM_POINTLIST fmpointlist; + +#ifdef _PERSONAL_FAME // Arminius 8.30: 家族个人声望 + +// Arminius: 我把声望值减半 +int FMAdvTbl[] = { // 家族冒险 Table + 0, // 0 + 15, // 1 + 5, // 2 + 0, // 3 + 10, // 4 + 5, // 5 + 0, // 6 + 0, // 7 + 30, // 8 + 0, // 9 + 0, // 10 + 0, // 11 + 68, // 12 + 68, // 13 + 0, // 14 + 15, // 15 + 120, // 16 + 90, // 17 + 0, // 18 + 120, // 19 + 0, // 20 + 0, // 21 + 60, // 22 + 0, // 23 + 0, // 24 + 0, // 25 + 60, // 26 + 0, // 27 + 0, // 28 + 0, // 29 + 0, // 30 + 60, // 31 + 0, // 32 + 0, // 33 + 30, // 34 + 225, // 35 + 0, // 36 + 0, // 37 + 60, // 38 + 135, // 39 + 600, // 40 + 0, // 41 + 360, // 42 + 0, // 43 + 0, // 44 + 480, // 45 + 840, // 46 + 0, // 47 + 600, // 48 + 600, // 49 + 600, // 50 + 600, // 51 + 600, // 52 + 600, // 53 + 720, // 54 + 0, // 55 + 0, // 56 + 0, // 57 + 0, // 58 + 0, // 59 + 0, // 60 + 0, // 61 + 0, // 62 + 120, // 63 + 900, // 64 + 0, // 65 + 0, // 66 + 0, // 67 + 0, // 68 + 0, // 69 + 0, // 70 + 15000, // 71 + 20000, // 72 + 0, // 73 + 0, // 74 + 0, // 75 + 0, // 76 + 0, // 77 + 0, // 78 + 0, // 79 + 0, // 80 + 1200, // 81 + 3000, // 82 + 0, // 83 + 1500, // 84 + 0, // 85 + 0, // 86 + 100, // 87 + 0, // 88 + 400, // 89 + 0, // 90 + 0, //91 + 0, // 92 + 0, // 93 + 0, // 94 + 0, // 95 + 0, // 96 + 100, // 97 + 0, // 98 + 0, // 99 + 0, // 100 + 0, //101 + 0, //102 + 0, //103 + 0, //104 + 600, // 105 + 0, // 106 + 100, // 107 + 0, // 108 + 0, // 109 + 400, // 110 + 500, // 111 + 1000, // 112 + 100, // 113 + 300, // 114 + 0, // 115 + 500, // 116 + 15000, // 117 + 0, // 118 + 0, // 119 + 0, // 120 + 0, // 121 + 0, // 122 + 0, // 123 + 0, // 124 + 400, // 125 + 300, // 126 + 0, // 127 + 0, // 128 + 0, // 129 + 0, // 130 + 0, // 131 + 0, // 132 + 500, // 133 +}; + +#endif + +BOOL NPC_Util_AddOneTitle( int charindex, int titleindex ) +{ + int i; + Char *c ; + + if( !CHAR_CHECKINDEX( charindex ) )return FALSE; + + c = CHAR_getCharPointer( charindex ); + // CoolFish: +1 2001/11/05 + if (!c) return FALSE; + + for(i=0;iindexOfHaveTitle[i] == -1 ){ + c->indexOfHaveTitle[i] = titleindex; + return TRUE; + } + } + return FALSE; +} + + +BOOL NPC_Util_HaveTitle( int charindex , int titleindex ) +{ + int i; + Char *c; + if( !CHAR_CHECKINDEX( charindex ) )return -1; + + c = CHAR_getCharPointer( charindex ); + // CoolFish: +1 2001/11/05 + if (!c) return FALSE; + + for(i=0;iindexOfHaveTitle[i] == titleindex ){ + return TRUE; + } + } + return FALSE; +} + + +BOOL NPC_Util_Nearby( int x1 , int y1, int x2 , int y2 ) +{ + if( ABS( x1 - x2 ) <= 1 && + ABS( y1 - y2 ) <= 1 ){ + return TRUE; + } else { + return FALSE; + } +} + +BOOL NPC_Util_CharNearby(int ind1,int ind2) +{ + if( !CHAR_CHECKINDEX(ind1)) return FALSE; + if( !CHAR_CHECKINDEX(ind2)) return FALSE; + + if( CHAR_getInt( ind1 , CHAR_FLOOR ) != + CHAR_getInt( ind2 , CHAR_FLOOR ) ){ + return FALSE; + } + + return NPC_Util_Nearby( CHAR_getInt( ind1,CHAR_X), + CHAR_getInt( ind1,CHAR_Y), + CHAR_getInt( ind2,CHAR_X), + CHAR_getInt( ind2,CHAR_Y)); + +} + + +static struct ynset +{ + int value; + char string[32]; +}yntable[] ={ + { 0 , "no" }, + { 0 , "No" }, + { 0 , "NO" }, + { 0 , "NO" }, + { 0 , "No" }, + { 0 , "no" }, + { 0 , "否" }, + { 0 , "否" }, + + { 1 , "yes" }, + { 1 , "Yes" }, + { 1 , "YES" }, + { 1 , "YES" }, + { 1 , "Yes" }, + { 1 , "yes" }, + { 1 , "是" }, + { 1 , "是" }, + +}; + +int NPC_Util_YN(char *input ) +{ + int i; + for(i=0;;i++){ + int j; + + if( input[i] == '\0' ){ + return -1; + } + for(j=0;jx - pstart->x; + dify = pend->y - pstart->y; + + if( difx < 0 )difx=-1; + else if( difx > 0 )difx=1; + if( dify < 0 )dify=-1; + else if( dify > 0 )dify=1; + + return dirtable[dify+1][difx+1]; +} + +int NPC_Util_countHaveItem( int meindex , int itemid ) +{ + int i, count=0, itemindex; + if( !CHAR_CHECKINDEX(meindex))return -1; + for( i=0 ; i= 0 ){ + CHAR_ObjectDelete( oind ); + CHAR_setItemIndex( charindex, emptyindex, itemindex ); + ITEM_setWorkInt( itemindex, ITEM_WORKOBJINDEX, -1 ); + ITEM_setWorkInt( itemindex, ITEM_WORKCHARAINDEX, charindex ); + if( net ) CHAR_sendItemDataOne( charindex, emptyindex); + return TRUE; + }else if( cind >= 0 ){ + int itemgrp[2]; + int itemindexinchara; + if( cind == charindex )return FALSE; + itemindexinchara = NPC_Util_SearchItemInChar( cind , itemindex); + if( itemindexinchara == -1 )return FALSE; + CHAR_setItemIndex( cind , itemindexinchara , -1 ); + CHAR_complianceParameter(cind); + itemgrp[0] = itemindexinchara; + CHAR_setItemIndex( charindex , emptyindex , itemindex ); + itemgrp[1] = emptyindex; + if( net ) CHAR_sendItemData( charindex, itemgrp, arraysizeof(itemgrp)); + ITEM_setWorkInt( itemindex, ITEM_WORKOBJINDEX, -1 ); + ITEM_setWorkInt( itemindex, ITEM_WORKCHARAINDEX, charindex ); + return TRUE; + } + return FALSE; +} + +BOOL NPC_Util_moveItemToMap( int itemindex , int fl , int x , int y, + BOOL net ) +{ + int oind,cind; + + if( !ITEM_CHECKINDEX( itemindex ) ) return FALSE; + + oind = ITEM_getWorkInt( itemindex , ITEM_WORKOBJINDEX ); + cind = ITEM_getWorkInt( itemindex , ITEM_WORKCHARAINDEX ); + + if( oind >= 0 ){ + return MAP_objmove( oind , OBJECT_getFloor(oind), + OBJECT_getX(oind), + OBJECT_getY(oind), + fl,x,y); + } else if( cind >= 0 ){ + int itemindexinchara = NPC_Util_SearchItemInChar(cind,itemindex); + if( itemindexinchara == -1 ) return FALSE; + + CHAR_setItemIndex( cind , itemindexinchara , -1 ); + CHAR_complianceParameter(cind); + if( net ) CHAR_sendItemDataOne( cind, itemindexinchara); + if( CHAR_DropItemAbsolute( itemindex, fl,x,y,TRUE) < 0 ){ + return FALSE; + } else { + return TRUE; + } + } + return FALSE; +} + +int NPC_Util_GiveAllItemToChar( int give , int take ) +{ + int i ; + int count=0; + + for(i=0;i= 0 )break; + }else + if( Part == 1 ){ /* 惘及仿奶件毛腹绸 */ + iTarget = SearchNearLine( x+Level, y-Level+1, + floor, 0, 1, Level*2, type ); + if( iTarget >= 0 )break; + }else + if( Part == 2 ){ /* 票及仿奶件毛腹绸 */ + iTarget = SearchNearLine( x+Level-1, y+Level, + floor, -1, 0, Level*2, type ); + if( iTarget >= 0 ) break; + }else + if( Part == 3 ){ /* 尔及仿奶件毛腹绸 */ + iTarget = SearchNearLine( x-Level, y+Level-1, + floor, 0, -1, Level*2, type ); + if( iTarget >= 0 ) break; + } + Part ++; Part &= 3; /* 戚及由□玄毛腹绸 */ + } + return iTarget; +} + +int NPC_Util_SearchNear( int meindex, int maxlen, int type ) +{ +#if 1 + /* MAP 井日及伉件弁匹腹绸允月方丹卞 凳 */ + int floor, x, y, i,iTarget = -1; + /* 蜇箕及愤坌及树 毛娄五请允 */ + if( !CHAR_CHECKINDEX( meindex ) )return -1; + floor = CHAR_getInt( meindex, CHAR_FLOOR ); + x = CHAR_getInt( meindex, CHAR_X ); + y = CHAR_getInt( meindex, CHAR_Y ); + + /* 区 匹譬屯月 */ + for( i = 0; i < maxlen; i ++ ){ + iTarget = SearchNearAround( x, y, floor, RAND( 0,3 ), i+1, type ); + if( iTarget >= 0 )break; + } + return iTarget; + + +#else + /* 仇切日反衙中支曰 */ + int floor, x, y, i,iTarget = -1, iLen, iMin = 655360, tX, tY; + /* 醒必永玄*/ + if( !CHAR_CHECKINDEX( meindex ) )return -1; + floor = CHAR_getInt( meindex, CHAR_FLOOR ); + x = CHAR_getInt( meindex, CHAR_X ); + y = CHAR_getInt( meindex, CHAR_Y ); + + /* 腹绸 */ + for( i = 0 ; i maxlen )continue; /* 木允亢*/ + if( tY > maxlen )continue; /* 卅日戚尺*/ + + /* 称井中覃 毛煌遥*/ + iLen = tX*tX+tY*tY; + /* 域 嗤井匀凶桦宁反筏 凳蕙*/ + if( iMin > iLen ){ + iMin = iLen; + iTarget = obj[i].index; /* 奶件犯永弁旦毛瓒 */ + } + } + + return iTarget; +#endif +} +/*------------------------------------------------------------ +* 域 嗤中皿伊奶乩□及腹绸 +------------------------------------------------------------*/ +int NPC_Util_SearchNearPlayer( int meindex, int maxlen ) +{ + return( NPC_Util_SearchNear( meindex, maxlen, CHAR_TYPEPLAYER)); +} +/*------------------------------------------------------------ +* 域 嗤中衬及腹绸- +-----------------------------------------------------------*/ +int NPC_Util_SearchNearEnemy( int meindex, int maxlen ) +{ + return( NPC_Util_SearchNear( meindex, maxlen, CHAR_TYPEENEMY)); +} + + + +/******************************************************* + + 标户啖 允月蟆卞窒井卞少勾井匀化中月井升丹井譬屯月 + int NPC_Util_SuberiWalk( + int index, CHAR 及奶件犯永弁旦 + int dir 汹仁轾五 + ); + + 曰袄 0 7“汹仃月 轾 + -1 “穴永皿卞娄匀井井匀化巨仿□ + -2 “平乓仿弁正卞娄匀井井匀化巨仿□ + -3 “ 卞娄匀井井匀化巨仿□ + + 标户啖 允月桦宁引内冲}产卞啖 匹五月井譬屯月[ + 啖 匹五木壬标户毛民尼永弁允月[ 仄井啖 匹五卅仃木壬 + 公切日及 轾毛忒允[ + + 公仇卞窒井丐匀凶日 穴永皿动陆 ㄠ毛忒允 +*******************************************************/ +int NPC_Util_OtherCharCheck( int ff, int fx, int fy) +{ +#if 1 + /* 腹绸 挚毛 井日及伉件弁卞 凳 */ + OBJECT object; + for( object=MAP_getTopObj(ff,fx,fy); object ; + object = NEXT_OBJECT(object) ) + { + int objindex = GET_OBJINDEX(object); + /* 元甄 卞平乓仿弁正互丐月井 */ + if( OBJECT_getType(objindex) == OBJTYPE_CHARA ){ + return 1; + } + } + return 0; +#else + /* 仇切日反蛙挚及支曰 */ + int i; + for( i = 0 ; i < objnum ; i ++){ + /* 甄 互 元井"*/ + if( obj[i].x == fx && obj[i].y == fy && obj[i].floor == ff ){ + /* 平乓仿弁正井"*/ + if( obj[i].type != OBJTYPE_NOUSE ){ + return 1; + } + } + } + return 0; +#endif +} + + +/* 汹仃卅中桦宁反唤匀化心月*/ +int NPC_Util_SuberiWalk( + int index, + int dir +) +{ + int i, OkFlg = 0, x = 0, y = 0, fl = 0; + int aDirList[3],dir2; + int tX, tY; + + x = CHAR_getInt(index,CHAR_X); + y = CHAR_getInt(index,CHAR_Y); + fl = CHAR_getInt(index,CHAR_FLOOR); + + /* 标户 轾井"*/ + switch( dir ){ + case 1: aDirList[0] = 0; aDirList[1] = 2; aDirList[2] = 1; + break; + case 3: aDirList[0] = 2; aDirList[1] = 4; aDirList[2] = 3; + break; + case 5: aDirList[0] = 4; aDirList[1] = 6; aDirList[2] = 5; + break; + case 7: aDirList[0] = 6; aDirList[1] = 0; aDirList[2] = 7; + break; + default: + tX = x+CHAR_getDX(dir); + tY = y+CHAR_getDY(dir); + /* 褡户凶*/ + if( MAP_walkAble( index,fl,tX,tY ) == 0 ){ + dir = -1;/* 穴永皿卞娄匀井井匀凶*/ + } +// }else +// if( NPC_Util_OtherCharCheck( fl,tX, tY ) ){ +// dir = -2;/* 平乓仿卞娄匀井井匀凶*/ +// } + /* 引匀允什分!! 公及引引汹仁*/ +/* CHAR_walk( index, dir, 0 );*/ + return dir; + } + + /* 引匀允什卅日 烂卅仄*/ + for( i = 0; i < 3; i ++ ){ + dir2 = aDirList[i]; + tX = x+CHAR_getDX(dir2); + tY = y+CHAR_getDY(dir2); + if( MAP_walkAble( index,fl,tX,tY ) == 0 ){ + aDirList[i] = -1; /* 垫仃卅中桦宁反公及 轾坫诮*/ +// }else if( NPC_Util_OtherCharCheck( fl,tX, tY ) ){ +// aDirList[i] = -2; /* 垫仃卅中桦宁反公及 轾坫诮*/ + }else{ + /* 垫仃凶!!*/ + OkFlg ++; + } + } + + /* ㄢ勾蝈 第 卅桦宁反} 赓及骚曰 仁*/ + if( aDirList[0] >= 0 && aDirList[1] >= 0 && aDirList[2] >= 0 ){ + }else + /* 仇切日卞 仃月井"*/ + if( aDirList[0] >= 0 ){ + dir = aDirList[0]; + }else + /* 公木午手仇切日井"*/ + if( aDirList[1] >= 0 ){ + dir = aDirList[1]; + }else{ + dir = aDirList[0]+aDirList[1]; + } + + /* 啖 */ +/* CHAR_walk( index, dir, 0 );*/ + + return dir; +} +/*----------------------------------------------------------------------- +* NPC及create凛及娄醒及 井日隙烂今木凶 侬 毛腹绸仄] +* 公及 及醒袄毛潸 允月[左皿扑亦件匹醒袄毛隙烂今六化支曰凶中午五卞忐厍 +* +* 镗啦“犯伉立正反"|"卞蜃烂仄化引允[ +* 娄醒卞 元 侬 互ㄡ勾岈氏分桦宁] +* 燮及 互穸燮今木引允[ +* ---------------------------------- +* IN : int meindex : 平乓仿index +* : char* in : 腹绸允月 侬 +* OUT: +* RETURN: +* 潸 请 卅井匀凶凛 :-1 +* 潸 请 凶凛 :醒袄 +* ---------------------------------- +* +* “ +* [File:enemykill.create] +* enemy=enemykill|range:4 +* +* call: +* range = NPC_Util_GetNumFromArg( index, "range"); +*----------------------------------------------------------------------*/ +int NPC_Util_GetNumFromArg( int meindex, char* in) +{ + BOOL rc; + int i; + char outstr[sizeof( STRING32)]; + int out = -1; + char *a = CHAR_getChar( meindex, CHAR_NPCARGUMENT); + + for( i = 1; ; i++ ) { + /* 犯伉立正ㄠ勾内勾 戈 */ + rc = getStringFromIndexWithDelim( a, "|", i, outstr, sizeof(outstr)); + if( rc == FALSE) break; + if( strstr( outstr, in) != NULL ) { + out = textToInt( outstr); + break; + } + } + + return out; +} + +/* + * 失奶 丞及 index 午平乓仿 index 及孔凶勾及树 井日} + * 平乓仿互公及失奶 丞毛 匀化月井升丹井仄日屯化 匀化凶日升及 + * 匏 卞 匀化月井毛忒允[ 失奶 丞楮 及NPC迕[CHAR_卞啖垫 + * 匹五月井手仄木氏楮醒瓜伉 + * by ringo + * + * int charindex : 覆擂平乓仿及 index + * int itemindex : 失奶 丞及index + * + * 忒曰袄 + * + * >=0 : 升及匏 卞 匀化中月及井[ 躲卅袄[ + * -1 : 手仄仁反 匀化卅中[ + * -2 : 巨仿□[ + */ +int NPC_Util_SearchItemInChar( int charindex , int itemindex) +{ + int i; + + if( !CHAR_CHECKINDEX(charindex) ) return -2; + if( !ITEM_CHECKINDEX(itemindex) ) return -2; + + for(i=0;i<=CHAR_MAXITEMHAVE;i++){ + int ii = CHAR_getItemIndex( charindex , i ); + if( ii == itemindex ){ + return i; + } + } + return -1; +} + + +/*------------------------------------------------------------------------ +* 平乓仿井日心凶职及平乓仿及 轾毛菲户月 +* +* int NPC_Util_GetDirCharToChar( int fromindex, int toindex, int mode) +* +* int fromindex 仇及平乓仿index井日 +* int toindex 仇及平乓仿index卞覆仄化及 轾互菲户日木月 +* int mode 潸 允月 轾 +* 0:toindex卞轾井匀化 +* 1:toindex及 覆 轾 +* 2:toindex卞覆仄化惘ㄨㄟ蘸 轾 +* 3:toindex卞覆仄化尔ㄨㄟ蘸 轾 +* +* 忒曰袄 岳 “dir 轾毛忒允 +* 撩 “-1 +------------------------------------------------------------------------*/ +int NPC_Util_GetDirCharToChar( int fromindex, int toindex, int mode) +{ + int ret = -1; + + if( CHAR_getInt( fromindex, CHAR_FLOOR) + == CHAR_getInt( toindex, CHAR_FLOOR)) + { + POINT start,end; + int dir; + start.x = CHAR_getInt( fromindex, CHAR_X); + start.y = CHAR_getInt( fromindex, CHAR_Y); + end.x = CHAR_getInt( toindex, CHAR_X); + end.y = CHAR_getInt( toindex, CHAR_Y); + dir = NPC_Util_getDirFromTwoPoint( &start,&end ); + if( mode == 1 ) dir = (dir > 3)? dir -4 : dir +4; + else if( mode == 2) dir = (dir + 2) % 8; + else if( mode == 3) dir = (dir < 1)? dir +6 : dir -2; + ret = dir; + } + return( ret); +} + +/*------------------------------------------------------------------------ +* 平乓仿卞覆仄化]丐月 轾卞啖 允月[ +* +* int NPC_Util_WalkCharToChar( int fromindex, int toindex, int mode) +* +* int fromindex 汹仁平乓仿index +* int toindex 汹仁 及平乓仿index +* int mode 汹仁 轾 +* 0:toindex卞轾井匀化 +* 1:toindex及 覆 轾 +* 2:toindex卞覆仄化惘ㄨㄟ蘸 轾 +* 3:toindex卞覆仄化尔ㄨㄟ蘸 轾 +* BOOL suberi NPC_Util_SuberiWalk毛哔 允月井"TRUE:允月 FALSE:仄卅中 +* +* 忒曰袄 岳 汹中凶 “dir 汹中凶 轾毛忒允 +* 撩 “-1 +------------------------------------------------------------------------*/ +int NPC_Util_WalkCharToChar( int fromindex, int toindex, int mode, int suberi) +{ + int ret = -1; + int dir; + + if( CHAR_getInt( fromindex, CHAR_FLOOR) + != CHAR_getInt( toindex, CHAR_FLOOR)) + { + return( -1); + } + dir = NPC_Util_GetDirCharToChar( fromindex, toindex, mode ); + if( dir != -1) { + if( suberi) { + dir = NPC_Util_SuberiWalk( fromindex, dir ); + } + } + if( dir >= 0 ) { + ret = CHAR_walk(fromindex,dir,0); + if( ret == CHAR_WALKSUCCESSED ) ret = dir; + else ret = -1; + } + return( ret); +} + + +/*------------------------------------------------------------------------ +* NPC毛壅 今六月[ +* +* void NPC_Util_NPCDelete( int srcindex) +* +* int srcindex 壅允index +* +------------------------------------------------------------------------*/ +void NPC_Util_NPCDelete( int srcindex) +{ + //int objindex; + //objindex = CHAR_getWorkInt(srcindex,CHAR_WORKOBJINDEX); + + /* createnum 互 及凛]戏引木凶凛棉毛本永玄允月 + * 卅兮仇仇匹仇氏卅仪毛仄化中月井午中丹午 + * create白央奶伙及time袄互戏引木化井日公木分仃坌烦匀化中月午] + * 濮覆卞允什卞戏引木化仁月午中丹酷 毛卅氏午井仄方丹午允月啃 + */ + if( CHAR_getInt( srcindex, CHAR_WHICHTYPE) == CHAR_TYPEPLAYER ) return; + if( NPC_createCheckMaxEnemynum( CHAR_getInt(srcindex,CHAR_NPCCREATEINDEX ))) + NPC_createInitTime( CHAR_getInt(srcindex,CHAR_NPCCREATEINDEX )); + NPC_createDecreaseEnemynum( CHAR_getInt(srcindex, + CHAR_NPCCREATEINDEX ) ); + + CHAR_CharaDelete( srcindex ); + +} + +char *NPC_Util_CheckAssignArgFile( int index, char *filename) +{ + BOOL rc; + int i; + char *cret = NULL; + char outstr[64]; + char outstr2[64]; + char *a = CHAR_getChar( index , CHAR_NPCARGUMENT ); + + if( a == NULL ) { + print( "%s : %d err\n", __FILE__, __LINE__); + return cret; + } + + for( i = 1; ; i++ ) { + /* 犯伉立正ㄠ勾内勾 戈 */ + rc = getStringFromIndexWithDelim( a, "|", i, outstr, sizeof(outstr)); + if( rc == FALSE) break; + if( strstr( outstr, "file") != NULL ) { + rc = getStringFromIndexWithDelim( outstr, ":", 2, + outstr2, sizeof(outstr2)); + if( rc != FALSE ) { + strcpy( filename, outstr2); + cret = filename; + break; + } + } + } + return( cret); +} + +static char *NPC_Util_MargeStrFromArgFile( char *filename, char *buf, int len) +{ + FILE *fp; + char *cret = NULL; + char line[NPC_UTIL_GETARGSTR_LINEMAX]; + char opfile[32]; + + sprintf( opfile, "%s/", getNpcdir( ) ); + strcat( opfile, filename); + *buf = '\0'; + fp = fopen( opfile, "r"); + if( fp != NULL ) { + while( fgets( line, sizeof( line), fp)) { + if( strlen(buf) != 0 ) { + if( buf[strlen(buf) -1] != '|' ) { + strcatsafe( buf, len, "|"); + } + } + chompex( line); + strcatsafe( buf,len, line); + } + fclose( fp); + cret=buf; + } + return( cret); +} + +char *NPC_Util_GetArgStr( int index, char *argstr, int len) +{ + char filename[128]; + char *cret = NULL; + if( NPC_Util_CheckAssignArgFile( index, filename) != NULL ) { + if( NPC_Util_MargeStrFromArgFile( filename, argstr, len) != NULL ) { + cret = argstr; + } + }else { + if( CHAR_getChar( index, CHAR_NPCARGUMENT) != NULL ){ + strcpy( argstr, CHAR_getChar( index, CHAR_NPCARGUMENT)); + cret = argstr; + }else{ + cret = NULL; + } + } + if( cret == NULL ) print("File:%s\n", NPC_Util_CheckAssignArgFile( index, filename)); + + return( cret); +} + +int NPC_Util_GetNumFromStrWithDelim( char *srcstr, char* in) +{ + BOOL rc; + int i; + char outstr[32]; + int out = -1; + + for( i = 1; ; i++ ) { + /* 犯伉立正ㄠ勾内勾 戈 */ + rc = getStringFromIndexWithDelim( srcstr, "|", i, outstr, sizeof(outstr)); + if( rc == FALSE) break; + if( strstr( outstr, in) != NULL ) { + out = textToInt( outstr); + break; + } + } + + return out; +} + +char *NPC_Util_GetStrFromStrWithDelim( char *srcstr, char *srhstr, + char *buf, int buflen) +{ + BOOL rc; + char *cret = NULL; + int i; + char outstr[1024]; + char outstr2[1024]; + + memset( outstr, 0, sizeof( outstr)); + memset( outstr2, 0, sizeof( outstr2)); + buf[0] = '\0'; + for( i = 1; ; i++ ) { + rc = getStringFromIndexWithDelim( srcstr, "|", i, outstr, sizeof(outstr)); + if( rc == FALSE) break; + if( strstr( outstr, srhstr) != NULL) { + rc = getStringFromIndexWithDelim( outstr, ":", 2, outstr2, sizeof(outstr2)); + if( rc != FALSE ) { + strcpysafe( buf, buflen, outstr2 ); + cret = buf; + break; + } + } + } + return cret; +} + +inline double NPC_Util_sellRate( int seller ) +{ + return (CHAR_getInt( seller, CHAR_MERCHANTLEVEL)&0x0000ffff)*0.01; +} + +inline double NPC_Util_buyRate( int buyer ) +{ + return (CHAR_getInt( buyer, CHAR_MERCHANTLEVEL )>>16)*0.01; +} + +BOOL NPC_Util_IsVisiblePlayer( int meindex) +{ + int chr_fl,chr_x,chr_y, i, j; + BOOL found = FALSE; + + chr_fl = CHAR_getInt( meindex, CHAR_FLOOR); + chr_x = CHAR_getInt( meindex, CHAR_X); + chr_y = CHAR_getInt( meindex, CHAR_Y); + + for( i = chr_x-CHAR_DEFAULTSEESIZ/2 ; + i <= chr_x+CHAR_DEFAULTSEESIZ/2 && found == FALSE; i++ ){ + for( j = chr_y-CHAR_DEFAULTSEESIZ/2 ; + j <= chr_y+CHAR_DEFAULTSEESIZ/2 && found == FALSE; + j ++ ){ + OBJECT object; + for( object = MAP_getTopObj( chr_fl, i,j); + object; + object = NEXT_OBJECT(object) ) + { + int objindex = GET_OBJINDEX( object); + if( OBJECT_getType(objindex) == OBJTYPE_CHARA ){ + if( CHAR_getInt( OBJECT_getIndex(objindex), + CHAR_WHICHTYPE ) == CHAR_TYPEPLAYER ) + { + found = TRUE; + break; + } + } + } + } + } + return( found); +} + +BOOL NPC_Util_WordInclude( char *text , char *word ) +{ + if( strstr( text , word ) == NULL ){ + return FALSE; + } else { + return TRUE; + } +} + +void NPC_Util_RandomToken(char *in, char *out, int outbufsize ) +{ + int tokennum; + int i; + tokennum = 1; + for( i=0;in[i]!='\0';i++ ){ + if( in[i] == ',' ) tokennum++; + } + getStringFromIndexWithDelim(in,",", rand()%tokennum+1,out,outbufsize ); + +} + +void cutDotsTail( char *s ) +{ + int l = strlen( s ); + int i; + for(i=l-1;i>=0;i--){ + if( s[i] == '.' ){ + s[i] = 0; + } else { + break; + } + } +} + +int NPC_Util_FrontItem( int meindex ) +{ + int front_x, front_y,objindex,itemindex; + OBJECT obj; + + CHAR_getCoordinationDir( CHAR_getInt(meindex,CHAR_DIR) + , CHAR_getInt(meindex,CHAR_X) + , CHAR_getInt(meindex,CHAR_Y) + ,1, &front_x, &front_y ); + for( obj=MAP_getTopObj(CHAR_getInt(meindex,CHAR_FLOOR), + front_x,front_y );obj; + obj=NEXT_OBJECT(obj) ){ + objindex = GET_OBJINDEX(obj); + if( OBJECT_getType(objindex) == OBJTYPE_ITEM ){ + itemindex = OBJECT_getIndex(objindex); + if(ITEM_CHECKINDEX(itemindex) ){ + return itemindex; + }else{ + return -1; + } + } + } + + return -1; + +} + +int NPC_Util_FrontChar( int meindex ) +{ + int front_x, front_y,objindex,enemyindex; + OBJECT obj; + CHAR_getCoordinationDir( CHAR_getInt(meindex,CHAR_DIR) + , CHAR_getInt(meindex,CHAR_X) + , CHAR_getInt(meindex,CHAR_Y) + ,1, &front_x, &front_y ); + for( obj=MAP_getTopObj(CHAR_getInt(meindex,CHAR_FLOOR), + front_x,front_y );obj; + obj=NEXT_OBJECT(obj) ){ + objindex = GET_OBJINDEX(obj); + if( OBJECT_getType(objindex) == OBJTYPE_CHARA ){ + enemyindex = OBJECT_getIndex(objindex); + if(CHAR_CHECKINDEX(enemyindex) ){ + return enemyindex; + } + } + } + return -1; +} +static int NPCUtil_enemytbl[NPC_ENEMY_ENEMYNUMBER+1]; +int *NPC_Util_getEnemy( int meindex, int charaindex) +{ + int i; + char argstr[NPC_UTIL_GETARGSTR_BUFSIZE]; + char buf[64]; + int ret; + int bigcnt; + int insert; + + NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr)); + for( i = 0; i < NPC_ENEMY_ENEMYNUMBER+1; i ++ ) { + NPCUtil_enemytbl[i] = -1; + } + + if( NPC_Util_GetStrFromStrWithDelim( argstr, "enemyno", buf, sizeof( buf)) + == NULL ) + { + return NULL; + } + bigcnt = 0; + insert = 0; + + for( i = 0; i < NPC_ENEMY_ENEMYNUMBER; i ++ ) { + int curEnemy; + int et_array; + char data[128]; + + ret = getStringFromIndexWithDelim( buf,",", i + 1,data, sizeof(data)); + if( ret == FALSE) { + break; + } + + curEnemy = ENEMY_getEnemyArrayFromId( atoi( data)); + if( !ENEMY_CHECKINDEX( curEnemy) ) continue; + et_array = ENEMYTEMP_getEnemyTempArray( curEnemy ); + /* 扔奶术互 五中及互中凶凛及啃及岈太赘尹 */ + if( ENEMYTEMP_getInt( et_array, E_T_SIZE ) == E_T_SIZE_BIG) { + if( bigcnt >= 5 ) { + continue; + } + /* 桦赭互 卞卅匀化中凶桦宁反 木晶尹月 */ + if( insert > 4 ) { + int target_et_array; + int flg = FALSE; + int j; + /* 木月桦赭毛茧允 */ + for( j = 0; j < 5; j ++ ) { + /* 坞中化月及反云井仄中 */ + if( !ENEMY_CHECKINDEX( NPCUtil_enemytbl[j])) break; + + target_et_array = ENEMYTEMP_getEnemyTempArray( + NPCUtil_enemytbl[j]); + /* 云井仄中 */ + if( !ENEMYTEMP_CHECKINDEX( target_et_array)) break; + + /* 木医歹木月 */ + if( ENEMYTEMP_getInt( target_et_array, E_T_SIZE) + == E_T_SIZE_NORMAL ) + { + flg = TRUE; + break; + } + } + if( !flg) continue; + + NPCUtil_enemytbl[insert] = NPCUtil_enemytbl[j]; + NPCUtil_enemytbl[j] = curEnemy; + } + else { + NPCUtil_enemytbl[insert] = curEnemy; + } + bigcnt ++; + } + else { + NPCUtil_enemytbl[insert] = curEnemy; + } + insert ++; + } + return NPCUtil_enemytbl; +} + +/*==================动票}白仿弘申永玄楮溢=============================*/ + +/* 奶矛件玄蔽 + * 申永玄白仿弘毛 化月分仃及质 + */ +void NPC_EventSetFlg(int talker,int shiftbit) + +{ + int point=0; + int array; + int shift; +#ifdef _TEACHER_SYSTEM + int iGetFame = 0; +#endif + + /*-- -1反白仿弘卞楮溢互卅中奶矛件玄 -*/ + if(shiftbit==-1) return; + + array = shiftbit / 32; + shift = shiftbit % 32; + + point = CHAR_getInt( talker, CHAR_ENDEVENT+array); + + // Arminius 8.24 prevent wash dp + if (!(point & (1 << shift))) { + // CoolFish: Family Adv 2001/8/4 + AddFMAdv(talker, shiftbit); +#ifdef _TEACHER_SYSTEM + if(shiftbit < arraysizeof(FMAdvTbl)) iGetFame = FMAdvTbl[shiftbit]; +#endif + } +#ifdef _TEACHER_SYSTEM + iGetFame /= 20; // 导师获得学生所得声望的 5% (1/20) + // 检查所得的声望有没有大於0 + if(iGetFame > 0){ + // 检查有没有导师 + if(strlen(CHAR_getChar(talker,CHAR_TEACHER_ID)) > 0 && strlen(CHAR_getChar(talker,CHAR_TEACHER_NAME)) > 0){ + int iPlayernum = CHAR_getPlayerMaxNum(),i; + char szMsg[128]; + + // 检查导师在不在线上 + for(i=0;i= arraysizeof(FMAdvTbl)) + return; + else + fmadv = FMAdvTbl[shiftbit]; + if (fmadv <= 0) return; + sprintf(buf, "%d", fmadv); + #ifdef _PERSONAL_FAME // Arminius 8.30: 家族个人声望 + CHAR_earnFame(talker, fmadv); + #endif + #ifdef _NEW_MANOR_LAW + sprintf(buf1, "%d", CHAR_getInt(talker,CHAR_FAME)); + #endif +#ifdef _FMVER21 + if (CHAR_getInt(talker, CHAR_FMLEADERFLAG) > 0 + && CHAR_getInt(talker, CHAR_FMLEADERFLAG) != FMMEMBER_APPLY) + { + // CoolFish: 2001/10/03 + int fd = getfdFromCharaIndex(talker); + saacproto_ACFixFMData_send(acfd, + CHAR_getChar(talker, CHAR_FMNAME), + CHAR_getInt(talker, CHAR_FMINDEX), + CHAR_getWorkInt(talker, CHAR_WORKFMINDEXI), + FM_FIX_FMADV, buf, +#ifndef _NEW_MANOR_LAW + "", +#else + buf1, +#endif + // CoolFish: 2001/10/03 + CHAR_getWorkInt(talker, CHAR_WORKFMCHARINDEX), + CONNECT_getFdid(fd)); + // CHAR_getWorkInt(talker, CHAR_WORKFMCHARINDEX), 0); +#ifdef _NEW_MANOR_LAW + { + int i; + for(i=0;i +#include + +#include "version.h" + +#include "common.h" +#include "npctemplate.h" +#include "npccreate.h" + +BOOL NPC_readNPCSettingFiles( char* topdirectory ,int templatesize, int createsize) +{ + print("\n"); + if( NPC_readNPCTemplateFiles( topdirectory ,templatesize) == FALSE ) + return FALSE; + + if( NPC_readNPCCreateFiles( topdirectory ,createsize) == FALSE ) + return FALSE; + + return TRUE; +} diff --git a/gmsv/npcserver.c b/gmsv/npcserver.c new file mode 100644 index 0000000..92bf691 --- /dev/null +++ b/gmsv/npcserver.c @@ -0,0 +1,407 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "autil.h" +#include "util.h" +#include "net.h" +#include "char.h" +#include "char_base.h" +#include "log.h" +#include "handletime.h" +#include "npcserver.h" +#include "lssproto_serv.h" +//#include "chatmagic.h" +#include "lssproto_util.h" + +#ifdef _NPCSERVER_NEW +#include "npcshandle.h" +#define SEPARATOR ";" + +NPCMessC *NPCMess; +static int AskListOK = 0; +//Mserver NETProc +int NSproto_DispatchMessage(int fd,char* encoded) +{ + char funcname[1024]; + if( NPCMESS_setChar( encoded) == FALSE ) + return -1; + memset( funcname, 0, sizeof( funcname)); + if( NPCMESS_getChar( funcname, sizeof( funcname)) == FALSE ) { + return 0; + } + if( !strcmp( funcname , "TEST" )){ + char buf1[1024],buf2[1024],buf3[1024]; + if( NPCMESS_getChar( buf1, sizeof( buf1)) == FALSE ) return 0; + if( NPCMESS_getChar( buf2, sizeof( buf2)) == FALSE ) return 0; + if( NPCMESS_getChar( buf3, sizeof( buf3)) == FALSE ) return 0; + return 0; + }else if( !strcmp( funcname , "NPC_LOGIN" )){ + char buf1[256]; + if( NPCMESS_getChar( buf1, sizeof( buf1)) == FALSE ) return 0; + NPCS_NpcSLogin_recv( fd, buf1); + }else if( !strcmp( funcname , "NPC_ASKLIST" )){ + char buf1[4096]; + if( NPCMESS_getChar( buf1, sizeof( buf1)) == FALSE ) return 0; + NPCS_AskNpcList_recv( fd, buf1); + return 0; + }else if( !strcmp( funcname , "NPCS_CREATE" )){ + int dir, floor, x, y, image, npcsindex; + char Name[256], buf1[256]; + if( NPCMESS_getChar( buf1, sizeof( buf1)) == FALSE ) return 0; + npcsindex = atoi( buf1); + if( NPCMESS_getChar( buf1, sizeof( buf1)) == FALSE ) return 0; + memcpy( Name, buf1, strlen( buf1)+1); + if( NPCMESS_getChar( buf1, sizeof( buf1)) == FALSE ) return 0; + dir = atoi( buf1); + if( NPCMESS_getChar( buf1, sizeof( buf1)) == FALSE ) return 0; + image = atoi( buf1); + if( NPCMESS_getChar( buf1, sizeof( buf1)) == FALSE ) return 0; + floor = atoi( buf1); + if( NPCMESS_getChar( buf1, sizeof( buf1)) == FALSE ) return 0; + x = atoi( buf1); + if( NPCMESS_getChar( buf1, sizeof( buf1)) == FALSE ) return 0; + y = atoi( buf1); + + if( NPCSERVER_CreateObjindexFromServer( fd, npcsindex, Name, image, dir, floor, x, y) == FALSE ){ + } + return 0; + }else if( !strcmp( funcname , "NPC_TALKMESS" )){ + char TalkMess[1024], buf1[1024]; + int npcobjindex, charaindex, charobjindex, Color; + if( NPCMESS_getChar( buf1, sizeof( buf1)) == FALSE ) return 0; + npcobjindex = atoi( buf1); + if( NPCMESS_getChar( buf1, sizeof( buf1)) == FALSE ) return 0; + charaindex = atoi( buf1); + if( NPCMESS_getChar( buf1, sizeof( buf1)) == FALSE ) return 0; + charobjindex = atoi( buf1); + if( NPCMESS_getChar( buf1, sizeof( buf1)) == FALSE ) return 0; + memcpy( TalkMess, buf1, strlen( buf1)+1 ); + if( NPCMESS_getChar( buf1, sizeof( buf1)) == FALSE ) return 0; + Color = atoi( buf1); + NPCS_NpcTalkMess_recv( npcobjindex, charaindex, charobjindex, TalkMess, Color); + }else if( !strcmp( funcname , "NPC_WINMESS") ){ + int charaindex, charobjindex, npcobjindex; + int seqno, windowtype, buttontype, page; + char Token[1024], buf1[1024]; + + if( NPCMESS_getChar( buf1, sizeof( buf1)) == FALSE ) return 0; + npcobjindex = atoi( buf1); + if( NPCMESS_getChar( buf1, sizeof( buf1)) == FALSE ) return 0; + charaindex = atoi( buf1); + if( NPCMESS_getChar( buf1, sizeof( buf1)) == FALSE ) return 0; + charobjindex = atoi( buf1); + if( NPCMESS_getChar( buf1, sizeof( buf1)) == FALSE ) return 0; + memcpy( Token, buf1, strlen( buf1)+1); + Token[ strlen( Token)+1] = 0; + if( NPCMESS_getChar( buf1, sizeof( buf1)) == FALSE ) return 0; + seqno = atoi( buf1); + if( NPCMESS_getChar( buf1, sizeof( buf1)) == FALSE ) return 0; + windowtype = atoi( buf1); + if( NPCMESS_getChar( buf1, sizeof( buf1)) == FALSE ) return 0; + buttontype = atoi( buf1); + if( NPCMESS_getChar( buf1, sizeof( buf1)) == FALSE ) return 0; + page = atoi( buf1); + NPCS_NpcWinMess_recv( npcobjindex, charaindex, charobjindex, Token, + seqno, windowtype, buttontype, page); + }else if( !strcmp( funcname , "NPC_CHECKFREE") ){ + int charaindex, charobjindex, npcobjindex; + char buf1[4096], freeMess1[4096]; + if( NPCMESS_getChar( buf1, sizeof( buf1)) == FALSE ) return 0; + npcobjindex = atoi( buf1); + if( NPCMESS_getChar( buf1, sizeof( buf1)) == FALSE ) return 0; + charaindex = atoi( buf1); + if( NPCMESS_getChar( buf1, sizeof( buf1)) == FALSE ) return 0; + charobjindex = atoi( buf1); + if( NPCMESS_getChar( buf1, sizeof( buf1)) == FALSE ) return 0; + memcpy( freeMess1, buf1, strlen( buf1)+1); + + NPCS_NpcCheckFreeMess_recv( npcobjindex, charaindex, charobjindex, freeMess1); + }else{ + + } + return 0; +} + +void NPCS_NpcCheckFreeMess_recv( int npcobjindex, int charaindex, int charobjindex, + char *CheckfreeMess) +{ + if( NPCS_HandleCheckFreeMess( npcobjindex, charaindex, charobjindex, + CheckfreeMess) == TRUE ){ + }else { + } +} + +void NPCS_NpcWinMess_recv( int npcobjindex, int charaindex, int charobjindex, char *WinMess, + int seqno, int windowtype, int buttontype, int page) +{ + int fd = getfdFromCharaIndex( charaindex); + if( CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX) != charobjindex ) + return; + CHAR_setWorkInt( charaindex, CHAR_WORKSHOPRELEVANT, page); + lssproto_WN_send( fd, windowtype, buttontype, seqno, npcobjindex, WinMess); +} + +void NPCS_NpcWinMess_send( int npcobjindex, int npcindex, int charaindex, char *WinMess, + int seqno, int select) +{ + char buf[4096]; + int charobjindex, page; + memset( buf, 0, sizeof( buf)); + charobjindex = CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX); + page = CHAR_getWorkInt( charaindex, CHAR_WORKSHOPRELEVANT); + sprintf( buf, "NPC_WINMESS %d %d %d %d %s %d %d %d\n", npcindex, npcobjindex, charaindex, charobjindex, + WinMess, seqno, select, page); + lssproto_Send( npcfd, buf); +} + +void NPCS_AskNpcTalk_send( int objindex, int npcsindex, int charaindex, char *Nlist) +{//NPCS_TALK + char buf[4096]; + int charobjindex; + if( !CHAR_CHECKINDEX( charaindex) ) return; + memset( buf, 0, sizeof( buf)); + charobjindex = CHAR_getWorkInt( charaindex, CHAR_WORKOBJINDEX); + sprintf( buf, "NPCS_TALK %d %d %d %d %s\n", npcsindex, objindex, charaindex, charobjindex, Nlist); + lssproto_Send( npcfd, buf); +} + +void NPCS_AskNpcList_recv( int fd, char *Nlist) +{ + char Npclist[256]; + int i=1, createnpc = 0; + while( getStringFromIndexWithDelim( Nlist, "|", i, Npclist,sizeof(Npclist) ) != FALSE ){ + char buf1[256], NpcName[256]; + int npcsindex, dir, floor, x, y, image; + i++; + if( getStringFromIndexWithDelim( Npclist, ",", 1, buf1, sizeof( buf1)) == FALSE ) continue; + npcsindex = atoi( buf1); + if( getStringFromIndexWithDelim( Npclist, ",", 2, buf1, sizeof( buf1)) == FALSE ) continue; + memcpy( NpcName, buf1, strlen( buf1)+1); + if( getStringFromIndexWithDelim( Npclist, ",", 3, buf1, sizeof( buf1)) == FALSE ) continue; + dir = atoi( buf1); + if( getStringFromIndexWithDelim( Npclist, ",", 4, buf1, sizeof( buf1)) == FALSE ) continue; + image = atoi( buf1); + if( getStringFromIndexWithDelim( Npclist, ",", 5, buf1, sizeof( buf1)) == FALSE ) continue; + floor = atoi( buf1); + if( getStringFromIndexWithDelim( Npclist, ",", 6, buf1, sizeof( buf1)) == FALSE ) continue; + x = atoi( buf1); + if( getStringFromIndexWithDelim( Npclist, ",", 7, buf1, sizeof( buf1)) == FALSE ) continue; + y = atoi( buf1); + NpcName[ strlen( NpcName)+1] = 0; + if( NPCSERVER_CreateObjindexFromServer( fd, npcsindex, NpcName, image, dir, floor, x, y) == FALSE ){ + }else{ + createnpc++; + } + } +} + +void NPCS_AskNpcList_send( int fd) +{ + char buf[4096]; + memset( buf, 0, sizeof( buf)); + sprintf( buf, "NPC_ASKLIST\n"); + lssproto_Send(fd, buf); +} + +void NPCS_NpcSLogin_recv( int fd, char *Mess) +{ + if( !strcmp( Mess, "OK") ){ + if( AskListOK == 0 ){ + NPCS_AskNpcList_send( fd); + AskListOK = 1; + } + }else { + } +} + +void NPCS_NpcSLogin_send( int fd) +{ + char buf[4096]; + memset( buf, 0, sizeof( buf)); + sprintf( buf, "NPC_LOGIN ABC\n"); + lssproto_Send(fd, buf); +} + +void NPCS_NpcTalkMess_recv( int npcobjindex, int charaindex, int charobjindex, char *TalkMess, int Color) +{ + NPCS_NpcstalkToCli( charaindex, npcobjindex, TalkMess, Color); +} + +int connectNpcServer(char* hostname,unsigned short port) +{ + struct sockaddr_in sock; + struct hostent* hoste; + int fd,lr; + fd_set fdset,fde; + struct timeval tmv; + + memset( &sock , 0 , sizeof( struct sockaddr_in ) ); + sock.sin_family = AF_INET; + sock.sin_port = htons( port ); + sock.sin_addr.s_addr = inet_addr( hostname ); + + if( sock.sin_addr.s_addr == -1 ){ + hoste = gethostbyname( hostname ); + if( hoste == NULL ){ + print( "获取主机名: %s\n", hostname); + return -1; + } + memcpy((void*)&sock.sin_addr.s_addr , hoste->h_addr , sizeof(struct in_addr) ); + } + + fd = socket( AF_INET, SOCK_STREAM , 0 ); + if( fd == -1 ){ + print("Cannot Create Socket( errno:%d)\n",errno ); + return -1; + } + //set the no block + if ( fcntl(fd,F_SETFL,O_NONBLOCK) == -1 ){ + print("set noblock error!\n"); + return -1; + } + lr = connect(fd,(struct sockaddr*)&sock,sizeof(struct sockaddr_in)); + if( lr != 0 ){ + if ( errno != EINPROGRESS ){ + print("Cannot connect. (errno:%d)\n",errno ); + close(fd); + return -1; + } + } + FD_ZERO(&fdset); + FD_SET(fd,&fdset); + FD_SET(fd,&fde); + tmv.tv_sec =3; + tmv.tv_usec = 0; + lr=select(fd+1,NULL,&fdset,&fde,&tmv); + if (FD_ISSET(fd,&fde)){ + print("connectNPCS fde\n"); + close(fd); //add more + return -1; + } + if ( lr > 0 && FD_ISSET(fd,&fdset)){ + int errorcode; + int errorcodelen; + errorcode=1; + errorcodelen=sizeof(errorcode); + getsockopt(fd,SOL_SOCKET,SO_ERROR,&errorcode,&errorcodelen); + if (errorcode == 0 ){ + fcntl(fd,F_SETFL,0); + print("connectNPCS return fd=%d\n",fd); + return fd; + }else{ + print("connectNPCS errorcode error\n"); + close(fd); + return -1; + } + }else{ + close(fd); + return -1; + } + +} + +void NPCS_SendProbe( int fd) +{ + char buf[65535]; + int i; + + memset( buf, 0, sizeof( buf)); + + sprintf( buf, "TEST %d,%d,%s,%s", 99999, 99999, + "1234567891012345678901234567890", "1234567891012345678901234567890" ); + + strcat( buf, " "); + for( i=0; i<5; i++) { + if( i==0 ) strcat( buf, "99999"); + else strcat( buf, ",99999"); + } + strcat( buf, " "); + for( i=0; i<15; i++) { + if( i==0 ) strcat( buf, "99999"); + strcat( buf, ",99999"); + } + + strcat( buf, "\n"); + lssproto_Send(fd, buf); +} + +BOOL NPCMESS_setChar( char *buf) +{ + char Mbuf[4096]; + int i=0,j=0; + int len=0; + NPCMessC *Works; + NPCMessC *point; + point = NULL; + + memset( Mbuf, 0, sizeof( Mbuf)); + sprintf( Mbuf, "%s", buf); + NPCMess = NULL; + while( Mbuf[i] != '\0' ) { + if( Mbuf[i] == '\n' ) + Mbuf[i] = '\0'; + i++; + } + i=0; + len = 0; + while( Mbuf[i] != '\0' && Mbuf[j] != '\0' ) { + j=i; + len = 0; + while( Mbuf[j] != ' ' && Mbuf[j] != '\0') { + len++; + j++; + } + Works = MESS_getNew(); + if( Works == NULL ) + return FALSE; + memcpy( Works->buf, &Mbuf[i], len); + Works->len = len; + if( NPCMess == NULL ) { + NPCMess = Works; + point = Works; + }else { + point->next = Works; + point = point->next; + } + i = (j+1); + } + return TRUE; +} + + +BOOL NPCMESS_getChar( char *buf, int len) +{ + NPCMessC *Works; + Works = NPCMess; + + if( Works == NULL ) + return FALSE; + memcpy( buf, Works->buf, len); + buf[ strlen( buf)+1] = 0; + NPCMess = Works->next; + free( Works); + return TRUE; +} + +NPCMessC *MESS_getNew() +{ + NPCMessC *MBUF=NULL; + MBUF = (NPCMessC *) calloc( 1, sizeof( struct _NPCMessCommand) ); + if( MBUF == NULL ) + return NULL; + memset( MBUF->buf, 0, sizeof( MBUF->buf)); + MBUF->len = 0; + MBUF->next = NULL; + return MBUF; +} +#endif diff --git a/gmsv/npcshandle.c b/gmsv/npcshandle.c new file mode 100644 index 0000000..64e74e8 --- /dev/null +++ b/gmsv/npcshandle.c @@ -0,0 +1,322 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "autil.h" +#include "util.h" +#include "net.h" +#include "object.h" +#include "char.h" +#include "char_base.h" +#include "log.h" +#include "handletime.h" +#include "npcserver.h" +#include "lssproto_serv.h" +#include "lssproto_util.h" +#include "npcshandle.h" +#include "npcutil.h" +#include "npc_eventaction.h" + +#ifdef _NPCSERVER_NEW +enum{ + uEQUAL = 1, //等於 + uBIGEQUALt, //大於等於 + uSMALLEQUALt, //小於等於 + uBIGTHAN = 5, //大於 + uSMALLTHAN, //小於 + uNEQUAL, //不等於 +}; +BOOL NPCS_HandleCheckFreeMess( int npcobjindex, int charaindex, int charobjindex, + char *CheckfreeMess) +{ + BOOL ReCall = FALSE; + BOOL Enable = FALSE; + char buf1[1024], buf2[256]; + int i=1; + + //主条件判断 + while( getStringFromIndexWithDelim( CheckfreeMess, "OVER", i, buf1, sizeof( buf1)) != FALSE ){ + i++; + if( NPC_Util_GetStrFromStrWithDelim( buf1, "FREE", buf2, sizeof( buf2)) == NULL ) continue; + if( NPCS_FreePassCheck( charaindex, buf2) == TRUE ){ + if( NPC_Util_GetStrFromStrWithDelim( buf1, "FreeMess", buf2, sizeof( buf2)) == NULL ) continue; + Enable = TRUE; + if( NPCS_RunDoEventAction( charaindex, buf1) == FALSE ) + return FALSE; + + //事件处理 + NPCS_NpcstalkToCli( charaindex, npcobjindex, buf2, CHAR_COLORYELLOW); + break; + } + } + if( Enable == FALSE ){//所有条件不成立 + NPCS_NpcstalkToCli( charaindex, npcobjindex, "条件不足!", CHAR_COLORYELLOW); + return FALSE; + } + if( ReCall == TRUE ){ + //判断是否recall + } + return TRUE; +} + +BOOL NPCS_FreePassCheck( int charaindex, char *buf) +{ + char buff2[256]; + char buff3[128]; + int i=1,j=1; + int loop=0; + while( getStringFromIndexWithDelim(buf,",",i,buff2,sizeof(buff2)) !=FALSE ) { + i++; + if(strstr(buff2,"&")!=NULL){ + j=1; + loop=0; + while( getStringFromIndexWithDelim(buff2,"&",j,buff3,sizeof(buff3)) !=FALSE ) { + j++; + if(NPCS_FreeBigSmallCheck( charaindex, buff3)==FALSE) { + loop=1; + break; + } + } + if(loop==0) return TRUE; + }else{ + if( NPCS_FreeBigSmallCheck( charaindex, buff2) == TRUE) return TRUE; + } + } + CHAR_setWorkInt( charaindex, CHAR_WORKWARPCHECK, FALSE ); + return FALSE; + +} + +BOOL NPCS_FreeBigSmallCheck( int charaindex,char* buf) +{ + char buff1[128], buff2[128], Head[128]; + int kosuu,temp=-1,flg=0; + + memset( Head, 0, sizeof( Head)); + if( strstr( buf, "=" ) != NULL ){ + strcpy( Head, "="); + flg = uEQUAL; + if( strstr( buf, ">") != NULL ){ + strcat( Head, ">"); + flg = uBIGEQUALt; + }else if( strstr( buf, "<") != NULL ){ + strcat( Head, "<"); + flg = uSMALLEQUALt; + }else if( strstr( buf, "!") != NULL ) { + strcat( Head, "!"); + flg = uNEQUAL; + } + }else if(strstr( buf, "<") != NULL){ + strcpy( Head, "<"); + flg = uSMALLTHAN; + }else if(strstr( buf, ">") != NULL){ + strcpy( Head, ">"); + flg = uBIGTHAN; + } + Head[ strlen( Head)+1] = 0; + getStringFromIndexWithDelim( buf, Head, 2, buff2, sizeof(buff2)); + getStringFromIndexWithDelim( buf, Head, 1, buff1, sizeof(buff1)); + + if( strstr( buff2, "*") != NULL ){ + char buff3[128]; + getStringFromIndexWithDelim( buff2, "*", 1, buff3, sizeof(buff3)); + temp = atoi( buff3); + getStringFromIndexWithDelim( buff2, "*", 2, buff3, sizeof(buff3)); + kosuu = atoi( buff3); + }else { + kosuu = atoi( buff2); + temp = 1; + } + return NPCS_ArgumentFreeCheck( charaindex, buff1, kosuu, flg, temp); +} + +BOOL NPCS_ArgumentFreeCheck( int charaindex, char* Argument, int amount, int temp, int probjID) +{//amount 数量 Argument 参数 + int MyPoint=0, reAmount; + reAmount = 0; + if( strcmp( Argument, "LV") == 0) {//等级 + MyPoint = CHAR_getInt( charaindex, CHAR_LV); + }else if( strcmp( Argument, "GOLD") == 0) {//石币 + MyPoint = CHAR_getInt( charaindex, CHAR_GOLD); + }else if( strcmp( Argument, "TRANS") == 0) {//转生次数 + MyPoint = CHAR_getInt( charaindex, CHAR_TRANSMIGRATION); + }else if( strcmp( Argument, "PET") == 0) {//宠物 ID 数量 + MyPoint = NPCS_getUserPetAmount( charaindex, probjID, 1); + }else if( strcmp( Argument, "ITEM") == 0) {//道具 ID 数量 + MyPoint = NPCS_getUserItemAmount( charaindex, probjID, 1); + }else if( strcmp( Argument, "ENDEV") == 0) {//结束旗标 + return NPC_EventCheckFlg( charaindex, amount); + }else if( strcmp( Argument, "NOWEV") == 0) {//开启旗标 + return NPC_NowEventCheckFlg( charaindex, amount); + }else if( strcmp( Argument, "PARTY") == 0) {//检查团队人数 + MyPoint = NPCS_getUserPartyAmount( charaindex ); + }else if( strcmp( Argument, "reITEM")== 0) {//剩馀道具栏位 + NPCS_getUserItemAmount( charaindex, probjID, 0); + MyPoint = reAmount; + }else if( strcmp( Argument, "rePET") == 0) {//剩馀宠物栏位 + NPCS_getUserPetAmount( charaindex, probjID, 0); + MyPoint = reAmount; + }else { + } + + return NPCS_ArgumentBigSmallCheck( amount, MyPoint, temp); +} + +BOOL NPCS_ArgumentBigSmallCheck( int point, int mypoint, int flg) +{ + switch( flg){ + case uEQUAL: //等於 + if( mypoint == point ) return TRUE; + break; + case uBIGEQUALt: //大於等於 + if( mypoint >= point ) return TRUE; + break; + case uSMALLEQUALt: //小於等於 + if( mypoint <= point ) return TRUE; + break; + case uBIGTHAN: //大於 + if( mypoint > point ) return TRUE; + break; + case uSMALLTHAN: //小於 + if( mypoint < point ) return TRUE; + break; + case uNEQUAL: //不等於 + if( mypoint != point ) return TRUE; + break; + } + return FALSE; +} + +int NPCS_getUserPetAmount( int charaindex, int objID, int flg) +{ + int i, Amount=0, reAmount=0; + for( i=0 ;i CHAR_COLORGREEN2 )return FALSE; +#ifndef _CHANNEL_MODIFY + snprintf( lastbuf, sizeof(lastbuf), "P|%s:%s", +#else + snprintf( lastbuf, sizeof(lastbuf), "P|P|%s:%s", +#endif + makeEscapeString( OBJECT_getName( npcobjindex), escapebuf, sizeof(escapebuf)), message); + + lssproto_TK_send( fd, npcobjindex, lastbuf, color); + return TRUE; +} +#endif diff --git a/gmsv/object.c b/gmsv/object.c new file mode 100644 index 0000000..135f347 --- /dev/null +++ b/gmsv/object.c @@ -0,0 +1,483 @@ +#include "version.h" +#include + +#include +#include +#include +#include + +#include "common.h" +#include "object.h" +#include "char_base.h" +#include "char.h" +#include "item.h" +#include "buf.h" +#include "readmap.h" +#include "pet.h" + +static Object *obj; +static int objnum; + +#ifndef _SIMPLIFY_ITEMSTRING +static int Restored = FALSE; +#endif + +BOOL initObjectArray( int num ) +{ + int i; + objnum = num; + obj = allocateMemory( sizeof( Object ) * objnum ); + if( obj == NULL ) return FALSE; + for( i = 0 ; i < objnum ; i ++ ){ + memset( &obj[i], 0 , sizeof( Object )); + obj[i].type = OBJTYPE_NOUSE; + } + return TRUE; +} + + +BOOL endObjectArray( void ) +{ + freeMemory( obj ); + return TRUE; +} + +INLINE int _initObjectOne( char *file, int line, Object* ob ) +{ + static int allocobjnum = 0; + int i; + BOOL first; + + i = allocobjnum; + first = TRUE; + while( 1 ) { + if( !first && i >= allocobjnum ) { + fprint( "Can't allocate an object\n" ); + return -1; + } + if( obj[i].type == OBJTYPE_NOUSE ) { + if( MAP_addNewObj( ob->floor ,ob->x, ob->y, i ) == 1 ){ + memcpy( &obj[i] , ob , sizeof( Object ) ); + allocobjnum = ( i+1 >= objnum) ? 0:i+1; + return i; + }else{ + allocobjnum = ( i+1 >= objnum) ? 0:i+1; + fprint( "MAP_addNewObj error\n" ); + return -1; + } + }else { + if( ++i >= objnum ) { + i = 0; + first = FALSE; + } + } + } + + fprint( "Can't allocate an object\n" ); + return -1; +} + +void endObjectOne( int index ) +{ + if(objnum <= index || index < 0 )return; + + if( MAP_removeObj(obj[index].floor,obj[index].x, obj[index].y, + index) == FALSE){ + //fprint( "REMOVE OBJ ERROR floor:%d x:%d y:%d\n",obj[index].floor,obj[index].x, obj[index].y ); + } + obj[index].type = OBJTYPE_NOUSE; +} + +BOOL CHECKOBJECT( int index ) +{ + if( 0<=index && indextype = OBJTYPE_ITEM; + else if( strcmp( token , STOREGOLDID ) == 0 ) + one->type = OBJTYPE_GOLD; + else if( strcmp( token, STORECHARID) == 0 ) + one->type = OBJTYPE_CHARA; + for( i = 2 ; i < 5 ; i ++ ){ + char first[64]; + char second[64]; + ret = getStringFromIndexWithDelim(line,"|" ,i, + token,sizeof( token )); + if( ret == FALSE )return FALSE; + + ret = getStringFromIndexWithDelim(token,"=" ,1, first,sizeof( first )); + if( ret == FALSE )return FALSE; + ret = getStringFromIndexWithDelim(token,"=" ,2, second,sizeof( second )); + if( ret == FALSE )return FALSE; + + if( strcmp( first , "x" ) == 0 ) + one->x = atoi( second ); + else if( strcmp( first , "y" ) == 0 ) + one->y = atoi( second ); + else if( strcmp( first , "floor" ) == 0 ) + one->floor = atoi( second ); + } + { + char* findex = nindex( line , '|' , 4); + *stringstart = findex + 1; + } + return TRUE; +} + +BOOL storeObjects( char* dirname ) +{ + int i; + FILE* igfile; + char igfilename[256]; + + if( Restored == TRUE ){ + snprintf( igfilename ,sizeof( igfilename ) ,"%s/%s" ,dirname , + ITEMGOLDSTOREFILENAME ); + }else{ + snprintf( igfilename ,sizeof( igfilename ) ,"%s/%s_extra" ,dirname , + ITEMGOLDSTOREFILENAME ); + + print( "\n---- Saving didn't do with gmsv. ----- \n"); + print( "---- It is because gmsv stopped before reading . ----- \n"); + print( "---- It is kept with a name of (%s) just in case. ----- \n", igfilename ); + } + igfile = fopen( igfilename , "w" ); + if( igfile == NULL ){ + print( "\n\n---- ERR:can not open (%s) for backup items. ----- \n\n", igfilename ); + return FALSE; + } + + print( "Store Objects ..."); + for( i = 0 ; i < objnum ; i ++ ){ + switch( obj[i].type ){ + case OBJTYPE_ITEM: + { + fprintf( igfile , STOREITEMID "|x=%d|y=%d|floor=%d|%s\n" , + obj[i].x , obj[i].y ,obj[i].floor, + ITEM_makeStringFromItemIndex( obj[i].index,0 ) ); + break; + } + case OBJTYPE_GOLD: + { + fprintf( igfile , STOREGOLDID "|x=%d|y=%d|floor=%d|%d\n" , + obj[i].x , obj[i].y ,obj[i].floor, obj[i].index ); + break; + } + case OBJTYPE_CHARA: + { + int petindex = obj[i].index; + if( CHAR_CHECKINDEX( petindex) ) { + if( CHAR_getInt( obj[i].index, CHAR_WHICHTYPE) == CHAR_TYPEPET){ + fprintf( igfile , STORECHARID "|x=%d|y=%d|floor=%d|%s\n" , + obj[i].x , obj[i].y ,obj[i].floor, + CHAR_makePetStringFromPetIndex( obj[i].index ) ); + } + } + break; + } + default: + break; + } + } + fclose( igfile ); + print( "done\n"); +system( "./itemda.pl" ); + print( "item backup end\n"); + return TRUE; +} +#endif + +int detectStoreFile( char* filename ) +{ + FILE* f; + char buffer[10]; + f = fopen ( filename ,"r" ); + if( f == NULL )return 3; + + if( fgets( buffer, sizeof( buffer ), f ) == NULL ){ + fclose(f); + return 3; + } + + if( strncmp(buffer,STOREITEMID,sizeof(STOREITEMID) ) == 0 || + strncmp(buffer,STOREGOLDID,sizeof(STOREGOLDID) ) == 0 ){ + fclose(f); + return 2; + } + + fclose(f); + return 3; +} + +#ifndef _SIMPLIFY_ITEMSTRING +BOOL restoreObjects( char* dirname ) +{ + char igfilename[512]; + FILE* file; + char line[2048]; + + snprintf( igfilename, sizeof(igfilename), "%s/%s", dirname, ITEMGOLDSTOREFILENAME ); + file = fopen( igfilename , "r" ); + if( file == NULL ){ + Restored = TRUE; + return FALSE; + } + while( fgets( line, sizeof( line ), file ) != NULL ){ + Object one; + char *string; + chomp( line ); + if( checkObjectStoreFile( line, &one ,&string ) == FALSE ) + continue; + switch( one.type ){ + case OBJTYPE_ITEM: + { + ITEM_Item itmone; + BOOL ret; + int objindex; + ret = ITEM_makeExistItemsFromStringToArg( string, &itmone, 0 ); + if( ret == TRUE ){ + one.index = ITEM_initExistItemsOne( &itmone ); + if( one.index == -1 ) break; + objindex = initObjectOne( &one ); + ITEM_setWorkInt(one.index,ITEM_WORKCHARAINDEX,-1); + ITEM_setWorkInt(one.index,ITEM_WORKOBJINDEX,objindex); + } + break; + } + + case OBJTYPE_GOLD: + one.index = atoi( string ); + initObjectOne( &one ); + break; + case OBJTYPE_CHARA: + { + Char ch; + int ret; + ret = CHAR_makePetFromStringToArg(string,&ch, -1); + if( ret ) { + Object object; + int objindex; + int petindex = PET_initCharOneArray( &ch ); + if( petindex < 0 ) { + print( "宠物制作失败。\n"); + } + object.type = OBJTYPE_CHARA; + object.index = petindex; + object.x = ch.data[CHAR_X]; + object.y = ch.data[CHAR_Y]; + object.floor = ch.data[CHAR_FLOOR]; + objindex = initObjectOne( &object ); + if( objindex == -1 ) { + CHAR_endCharOneArray( petindex ); + }else { + CHAR_setWorkInt( petindex,CHAR_WORKOBJINDEX,objindex ); + } + } + break; + } + default: + break; + } + } + fclose( file ); + Restored = TRUE; + + return TRUE; +} +#endif diff --git a/gmsv/saacproto_cli.c b/gmsv/saacproto_cli.c new file mode 100644 index 0000000..0136294 --- /dev/null +++ b/gmsv/saacproto_cli.c @@ -0,0 +1,2166 @@ +#include "version.h" +#define _SAACPROTOCLI_C_ +#include "version.h" +#include "saacproto_cli.h" +#include +#include +#include +#include "common.h" +#include "net.h" + +#ifdef _SEND_EFFECT // WON ADD AC送下雪、下雨等特效 +#include "chatmagic.h" +#endif + +#define IS_2BYTEWORD( _a_ ) ( (char)(0x80) <= (_a_) && (_a_) <= (char)(0xFF) ) + +/* +90 :
  • clienttoserver ACServerLogin(string servername,string serverpas);
    +91 : 必□丞扔□田□互失市它件玄扔□田□卞夫弘奶件允月午五卞银丹[ +92 : 涛粮毛舰匀凶丐午}仇及夫弘奶件毛仄卅中午允屯化及扔□申旦毛仄卅中[ +93 :

    +94 :
    +95 :
    string servername +96 :
    扔□田□ [acserv.cf卞涩烂今木化中月[ +97 :
    string serverpas +98 :
    扔□田□由旦伐□玉[acserv.cf卞涩烂今木化中月[ +99 :
    +100 : +*/ + +#ifdef _ALLDOMAN // (不可开) Syu ADD 排行榜NPC +void saacproto_UpdataStele_send( int fd , char *cdkey , char *name , char *title , int level , int trns , int time , int floor) { + saacproto_CreateHeader( saacproto.work , "UpdataStele" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( cdkey ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( name ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( title ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( level ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( trns ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( time ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( floor ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} +#endif + + +void saacproto_ACServerLogin_send( int fd,char* servername,char* serverpas ) +{ + saacproto_CreateHeader( saacproto.work , "ACServerLogin" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( servername ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( serverpas ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} +/* +114 :
  • clienttoserver ACServerLogout(void);
    +115 : 扔□田□互失市它件玄扔□田□井日夫弘失它玄允月午五卞银丹[ +116 : 涛粮反扔□田卞方匀化 澎卞濠日木月[仄凶互匀化仇木卞覆允月失市它件玄扔□田 +117 : 及忒蚕反戊生弁扑亦件毛濠月仪匹丐月[ +118 :
    +119 :
    +120 :
    +121 : +122 : +*/ + +void saacproto_ACServerLogout_send( int fd ) +{ + saacproto_CreateHeader( saacproto.work , "ACServerLogout" ); + saacproto_strcatsafe( saacproto.work , "" ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} + +#ifdef _PKSEVER_VER +void saacproto_ACCharList_send( int fd,char* id,char* pas,int mesgid, int star) +#else +void saacproto_ACCharList_send( int fd,char* id,char* pas,int mesgid ) +#endif +{ + saacproto_CreateHeader( saacproto.work , "ACCharList" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( id ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( pas ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( mesgid ) ,saacproto.workbufsize ); + +#ifdef _PKSEVER_VER + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( star ) ,saacproto.workbufsize ); +#endif + saacproto_Send( fd , saacproto.work ); +} + +void saacproto_ACCharLoad_send( int fd,char* id,char* pas,char* charname,int lock,char* opt,int mesgid ) +{ + saacproto_CreateHeader( saacproto.work , "ACCharLoad" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( id ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( pas ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( charname ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( lock ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( opt ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( mesgid ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} + +#ifdef _NEWSAVE +void saacproto_ACCharSave_send( int fd,char* id,char* charname,char* opt,char* charinfo,int unlock,int mesgid,int saveindex ) +#else +void saacproto_ACCharSave_send( int fd,char* id,char* charname,char* opt,char* charinfo,int unlock,int mesgid ) +#endif +{ + saacproto_CreateHeader( saacproto.work , "ACCharSave" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( id ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( charname ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( opt ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( charinfo ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( unlock ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( mesgid ) ,saacproto.workbufsize ); +#ifdef _NEWSAVE + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( saveindex ) ,saacproto.workbufsize ); +#endif + saacproto_Send( fd , saacproto.work ); +} + +#ifdef _PAUCTION_MAN +void saacproto_ACItemAuction_send( int fd, char *ITEMNAME, char *data, int itemID, int ret, int flg) +{ + print("ACItemAuction( %d, %s, %s, %d, %d)\n", fd, ITEMNAME, data, itemID, flg); + saacproto_CreateHeader( saacproto.work , "AUCTIONADDITEM" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( ITEMNAME ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( data ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( itemID ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( ret ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( flg ) ,saacproto.workbufsize ); + + saacproto_Send( fd , saacproto.work ); +} +#endif + +void saacproto_ACCharDelete_send( int fd,char* id,char* passwd,char* charname,char* option,int mesgid ) +{ + saacproto_CreateHeader( saacproto.work , "ACCharDelete" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( id ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( passwd ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( charname ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( option ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( mesgid ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} + +void saacproto_ACLock_send( int fd,char* id,int lock,int mesgid ) +{ + saacproto_CreateHeader( saacproto.work , "ACLock" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( id ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( lock ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( mesgid ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} + +void saacproto_ACUCheck_send( int fd,char* mem_id,int status ) +{ + saacproto_CreateHeader( saacproto.work , "ACUCheck" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( mem_id ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( status ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} + +void saacproto_DBUpdateEntryString_send( int fd,char* table,char* key,char* value,int msgid,int msgid2 ) +{ + saacproto_CreateHeader( saacproto.work , "DBUpdateEntryString" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( table ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( key ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( value ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid2 ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} + +void saacproto_DBDeleteEntryString_send( int fd,char* table,char* key,int msgid,int msgid2 ) +{ + saacproto_CreateHeader( saacproto.work , "DBDeleteEntryString" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( table ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( key ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid2 ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} + +void saacproto_DBGetEntryString_send( int fd,char* table,char* key,int msgid,int msgid2 ) +{ + saacproto_CreateHeader( saacproto.work , "DBGetEntryString" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( table ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( key ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid2 ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} + +void saacproto_DBUpdateEntryInt_send( int fd,char* table,char* key,int value,char* info,int msgid,int msgid2 ) +{ + saacproto_CreateHeader( saacproto.work , "DBUpdateEntryInt" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( table ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( key ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( value ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( info ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid2 ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} + +void saacproto_DBGetEntryRank_send( int fd,char* table,char* key,int msgid,int msgid2 ) +{ + saacproto_CreateHeader( saacproto.work , "DBGetEntryRank" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( table ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( key ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid2 ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} + +void saacproto_DBDeleteEntryInt_send( int fd,char* table,char* key,int msgid,int msgid2 ) +{ + saacproto_CreateHeader( saacproto.work , "DBDeleteEntryInt" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( table ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( key ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid2 ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} + +void saacproto_DBGetEntryInt_send( int fd,char* table,char* key,int msgid,int msgid2 ) +{ + saacproto_CreateHeader( saacproto.work , "DBGetEntryInt" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( table ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( key ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid2 ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} + +void saacproto_DBGetEntryByRank_send( int fd,char* table,int rank_start,int rank_end,int msgid,int msgid2 ) +{ + saacproto_CreateHeader( saacproto.work , "DBGetEntryByRank" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( table ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( rank_start ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( rank_end ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid2 ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} + +void saacproto_DBGetEntryByCount_send( int fd,char* table,int count_start,int num,int msgid,int msgid2 ) +{ + saacproto_CreateHeader( saacproto.work , "DBGetEntryByCount" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( table ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( count_start ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( num ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid2 ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} +/* +608 :
  • clienttoserver Broadcast( string id, string charname, string message , int flag );
    +609 : 必□丞扔□田□卞覆仄化仇及戊穴件玉毛霜耨允月午} +610 : 允屯化及必□丞扔□田□卞凶中仄化 元丢永本□斥互霜耨今木月[ +611 : id , charname 反方仁勾井歹木月及匹}蜊 及娄醒毛手勾方丹卞仄凶[ +612 : 中切中切 侬 由□旦及伙□民件毛踏井卅仁化手中中方丹卞[ +613 :
    +614 :
    string id +615 :
    user ID +616 :
    string charname +617 :
    平乓仿 (巨旦弗□皿卅仄) +618 :
    string message +619 :
    霜今木月丢永本□斥[必□丞扔□田□互驯五卞银丹[ +620 :
    +*/ + +void saacproto_Broadcast_send( int fd,char* id,char* charname,char* message,int flag ) +{ + saacproto_CreateHeader( saacproto.work , "Broadcast" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( id ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( charname ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( message ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( flag ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} +/* +634 :
  • clienttoserver Message( string id_from, string charname_from, string id_to, string charname_to, string message , int option );
    +635 : 奶件旦正件玄丢永本□斥毛霜耨允月 +636 :
    +637 :
    string id_from +638 :
    from ID +639 :
    string charname_from +640 :
    from Character name +641 :
    string id_to +642 :
    to ID +643 :
    string charname_to +644 :
    to character name +645 :
    string message +646 :
    丢永本□斥 +647 :
    int option +648 :
    左皿扑亦件[民乓永玄及缙午井中欠中欠 木木月[漆 及傀舰迕 +649 : 仇木毛升丹银丹井反必□丞扔□田□及 澎匹}失市它件玄扔□田□反 +650 : 域濠仇及 卞正永民仄卅中 +651 :
    +*/ + +void saacproto_Message_send( int fd,char* id_from,char* charname_from,char* id_to,char* charname_to,char* message,int option ) +{ + saacproto_CreateHeader( saacproto.work , "Message" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( id_from ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( charname_from ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( id_to ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( charname_to ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( message ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( option ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} + +void saacproto_MessageAck_send( int fd,char* id,char* charname,char* result,int mesgid ) +{ + saacproto_CreateHeader( saacproto.work , "MessageAck" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( id ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( charname ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( result ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( mesgid ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} + +void saacproto_MessageFlush_send( int fd,char* id,char* charname ) +{ + saacproto_CreateHeader( saacproto.work , "MessageFlush" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( id ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( charname ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} + +/************************************************************ + * CoolFish: Family 2001/5/18 + ***********************************************************/ +#ifdef _PERSONAL_FAME +void saacproto_ACAddFM_send(int fd, char *fmname, char *fmleadername, + char *fmleaderid, int fmleaderlv, char *petname, char *petattr, + char *fmrule, int fmsprite, int fmleadergrano, int fame, int charfdid) +#else +void saacproto_ACAddFM_send(int fd, char *fmname, char *fmleadername, + char *fmleaderid, int fmleaderlv, char *petname, char *petattr, + char *fmrule, int fmsprite, int fmleadergrano, int charfdid) +#endif +{ + saacproto_CreateHeader(saacproto.work, "ACAddFM"); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(fmname), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(fmleadername), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(fmleaderid), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmleaderlv), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(petname), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(petattr), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(fmrule), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmsprite), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmleadergrano), saacproto.workbufsize); +// #ifdef _PERSONAL_FAME + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fame), saacproto.workbufsize); +// #endif + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charfdid), saacproto.workbufsize); + saacproto_Send(fd, saacproto.work); +} +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 +void saacproto_ACJoinFM_send(int fd, char *fmname, int fmindex, char *charname, + char *charid, int charlv, int index, int fame, int charfdid) +#else +void saacproto_ACJoinFM_send(int fd, char *fmname, int fmindex, char *charname, + char *charid, int charlv, int index, int charfdid) +#endif +{ + saacproto_CreateHeader(saacproto.work, "ACJoinFM"); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(fmname), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmindex), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(charname), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(charid), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charlv), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(index), saacproto.workbufsize); +// #ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fame), saacproto.workbufsize); +// #endif + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charfdid), saacproto.workbufsize); + saacproto_Send(fd, saacproto.work); +} +void saacproto_ACLeaveFM_send(int fd, char *fmname, int fmindex, char *charname, + char *charid, int index, int charfdid) +{ + saacproto_CreateHeader(saacproto.work, "ACLeaveFM"); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(fmname), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmindex), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(charname), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(charid), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(index), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charfdid), saacproto.workbufsize); + saacproto_Send(fd, saacproto.work); +} +void saacproto_ACDelFM_send(int fd, char *fmname, int fmindex, int index, + char *charname, char *charid, int charfdid) +{ + saacproto_CreateHeader(saacproto.work, "ACDelFM"); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(fmname), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmindex), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(index), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(charname), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(charid), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charfdid), saacproto.workbufsize); + saacproto_Send(fd, saacproto.work); +} + +void saacproto_ACShowFMList_send(int fd) +{ + saacproto_CreateHeader(saacproto.work, "ACShowFMList"); + saacproto_Send(fd, saacproto.work); +} + +#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令 +void saacproto_ACShowMemberList_2_send( int fd, int charaindex, int fm1, int fm2, int time, int id ) +{ + saacproto_CreateHeader(saacproto.work, "ACShowMemberList2"); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charaindex), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fm1), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fm2), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(time), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(id), saacproto.workbufsize); + saacproto_Send(fd, saacproto.work); +} +#endif + + +void saacproto_ACShowMemberList_send(int fd, int index) +{ + saacproto_CreateHeader(saacproto.work, "ACShowMemberList"); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string("MemberList"), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(index), saacproto.workbufsize); + saacproto_Send(fd, saacproto.work); +} +void saacproto_ACFMDetail_send(int fd, char *fmname, int fmindex, int index, int charfdid) +{ + saacproto_CreateHeader(saacproto.work, "ACFMDetail"); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(fmname), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmindex), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(index), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charfdid), saacproto.workbufsize); + saacproto_Send(fd, saacproto.work); +} +#ifdef _FMVER21 +void saacproto_ACMemberJoinFM_send(int fd, char *fmname, int fmindex, + char *charname, int charindex, int index, int result, int meindex, + int charfdid) +#else +void saacproto_ACMemberJoinFM_send(int fd, char *fmname, int fmindex, + char *charname, int charindex, int index, int result, int charfdid) +#endif +{ + saacproto_CreateHeader(saacproto.work, "ACMemberJoinFM"); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(fmname), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmindex), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(charname), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charindex), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(index), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(result), saacproto.workbufsize); +#ifdef _FMVER21 + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(meindex), saacproto.workbufsize); +#endif + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charfdid), saacproto.workbufsize); + saacproto_Send(fd, saacproto.work); +} +#ifdef _FMVER21 +void saacproto_ACMemberLeaveFM_send(int fd, char *fmname, int fmindex, + char *charname, int charindex, int index, int meindex, int charfdid) +#else +void saacproto_ACMemberLeaveFM_send(int fd, char *fmname, int fmindex, + char *charname, int charindex, int index, int charfdid) +#endif +{ + saacproto_CreateHeader(saacproto.work, "ACMemberLeaveFM"); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(fmname), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmindex), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(charname), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charindex), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(index), saacproto.workbufsize); +#ifdef _FMVER21 + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(meindex), saacproto.workbufsize); +#endif + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charfdid), saacproto.workbufsize); + saacproto_Send(fd, saacproto.work); +} +#ifdef _FM_MODIFY +void saacproto_ACFMCharLogin_send(int fd, char *fmname, int fmindex, char *charname, + char *charid, int charlv, int eventflag, int charfdid,int gsnum) +#else + #ifdef _FMVER21 + void saacproto_ACFMCharLogin_send(int fd, char *fmname, int fmindex, char *charname, + char *charid, int charlv, int eventflag, int charfdid) + #else + void saacproto_ACFMCharLogin_send(int fd, char *fmname, int fmindex, char *charname, + char *charid, int charlv, int charfdid) + #endif +#endif +{ + saacproto_CreateHeader(saacproto.work, "ACFMCharLogin"); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(fmname), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmindex), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(charname), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(charid), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charlv), saacproto.workbufsize); +#ifdef _FMVER21 + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(eventflag), saacproto.workbufsize); +#endif + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charfdid), saacproto.workbufsize); +#ifdef _FM_MODIFY + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(gsnum), saacproto.workbufsize); +#endif + saacproto_Send(fd, saacproto.work); +} + + +#ifdef _DEATH_FAMILY_LOGIN_CHECK // WON ADD 家族战登入检查 +void saacproto_new_ACFM_Login_send( int acfd, int charaindex, char *char_id, char *char_name ) +{ + saacproto_CreateHeader(saacproto.work, "ACFMCharLogin2"); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(char_id), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(char_name), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charaindex), saacproto.workbufsize); + saacproto_Send( acfd, saacproto.work ); +} +#endif + +#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令 +void saacproto_ReloadFamily_send( int acfd, int charaindex ) +{ + saacproto_CreateHeader(saacproto.work, "ACRELOADFM"); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charaindex), saacproto.workbufsize); + saacproto_Send( acfd, saacproto.work ); +} +#endif + + +void saacproto_ACFMCharLogout_send(int fd, char *fmname, int fmindex, char *charname, + char *charid, int charlv, int index, int charfdid) +{ + saacproto_CreateHeader(saacproto.work, "ACFMCharLogout"); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(fmname), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmindex), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(charname), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(charid), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charlv), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(index), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charfdid), saacproto.workbufsize); + saacproto_Send(fd, saacproto.work); +} +void saacproto_ACFMReadMemo_send(int fd, int index) +{ + saacproto_CreateHeader(saacproto.work, "ACFMReadMemo"); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string("ReadMemo"), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(index), saacproto.workbufsize); + saacproto_Send(fd, saacproto.work); +} +void saacproto_ACFMWriteMemo_send(int fd, char *fmname, int fmindex, + char *data, int index) +{ + saacproto_CreateHeader(saacproto.work, "ACFMWriteMemo"); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(fmname), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmindex), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(data), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(index), saacproto.workbufsize); + saacproto_Send(fd, saacproto.work); +} +void saacproto_ACFMPointList_send(int fd) +{ + saacproto_CreateHeader(saacproto.work, "ACFMPointList"); + saacproto_Send(fd, saacproto.work); +} + +#ifdef _CK_ONLINE_PLAYER_COUNT // WON ADD 计算线上人数 +void saacproto_GS_PLAYER_COUNT_SEND(int acfd, int num) +{ + saacproto_CreateHeader(saacproto.work, "ACGSPCOUNT"); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(num), saacproto.workbufsize); + saacproto_Send(acfd, saacproto.work); +} +#endif + + +void saacproto_ACSetFMPoint_send(int fd, char *fmname, int fmindex, int index, + int fmpointindex, int fl, int x, int y, int charfdid) +{ + saacproto_CreateHeader(saacproto.work, "ACSetFMPoint"); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(fmname), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmindex), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(index), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmpointindex), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fl), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(x), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(y), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charfdid), saacproto.workbufsize); + saacproto_Send(fd, saacproto.work); +} +void saacproto_ACFixFMPoint_send(int fd, char *winfmname, int winfmindex, + int winindex, char *losefmname, int losefmindex, int loseindex, + int village) +{ + saacproto_CreateHeader(saacproto.work, "ACFixFMPoint"); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(winfmname), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(winfmindex), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(winindex), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(losefmname), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(losefmindex), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(loseindex), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(village), saacproto.workbufsize); + saacproto_Send(fd, saacproto.work); +} +void saacproto_ACFMAnnounce_send(int fd, char *fmname, int fmindex, int index, + char *data, int color) +{ + saacproto_CreateHeader(saacproto.work, "ACFMAnnounce"); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(fmname), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmindex), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(index), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(data), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(color), saacproto.workbufsize); + saacproto_Send(fd, saacproto.work); +} +void saacproto_ACShowTopFMList_send(int fd, int kindflag) +{ + saacproto_CreateHeader(saacproto.work, "ACShowTopFMList"); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string("ShowTopFMList"), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(kindflag), saacproto.workbufsize); + saacproto_Send(fd, saacproto.work); +} + +void saacproto_ACFixFMData_send(int fd, char *fmname, int fmindex, int index, + int kindflag, char *data1, char *data2, int charindex, int charfdid) +{ + saacproto_CreateHeader(saacproto.work, "ACFixFMData"); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(fmname), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmindex), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(index), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(kindflag), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(data1), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(data2), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charindex), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charfdid), saacproto.workbufsize); + saacproto_Send(fd, saacproto.work); +} +#ifdef _FAMILYBANKSTONELOG +void saacproto_ACgetFMBankgold_send(int fd, char *fmname, int fmindex, int index, + int charindex, int charfdid) +{ + saacproto_CreateHeader(saacproto.work, "ACgetFMBankgold"); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(fmname), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmindex), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(index), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charindex), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charfdid), saacproto.workbufsize); + saacproto_Send(fd, saacproto.work); +} +#endif + + +#ifdef _DEATH_FAMILY_STRUCT // WON ADD 家族战存放胜负资料 +void saacproto_Init_FM_PK_STRUC_send( int fd ) +{ + saacproto_CreateHeader(saacproto.work, "FMINITPKSTRUCT"); + saacproto_Send(fd, saacproto.work); +} + +void saacproto_FM_PK_STRUCT_send( int fd, char *msg ) +{ + saacproto_CreateHeader(saacproto.work, "FMPKSTRUCT"); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(msg), saacproto.workbufsize); + saacproto_Send(fd, saacproto.work); +} +#endif + +void saacproto_ACFixFMPK_send(int fd, char *winfmname, int winfmindex, + int winindex, char *losefmname, int losefmindex, int loseindex) +{ + saacproto_CreateHeader(saacproto.work, "ACFixFMPK"); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(winfmname), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(winfmindex), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(winindex), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(losefmname), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(losefmindex), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(loseindex), saacproto.workbufsize); + saacproto_Send(fd, saacproto.work); +} +void saacproto_ACGMFixFMData_send(int fd, int index, char *charid, char *cmd, + char *data, int charfdid) +{ + saacproto_CreateHeader(saacproto.work, "ACGMFixFMData"); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string("ACGMFixFMData"), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(index), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(charid), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(cmd), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(data), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charfdid), saacproto.workbufsize); + saacproto_Send(fd, saacproto.work); +} +void saacproto_ACGetFMData_send(int fd, char *fmname, int fmindex, int index, + int kindflag, int charfdid) +{ + saacproto_CreateHeader(saacproto.work, "ACGetFMData"); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(fmname), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmindex), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(index), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(kindflag), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charfdid), saacproto.workbufsize); + saacproto_Send(fd, saacproto.work); +} + +// Arminius 7.26 manor pk acknowledge +void saacproto_ACManorPKAck_send(int fd, char *data) +{ + saacproto_CreateHeader(saacproto.work, "ACManorPKAck"); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(data), saacproto.workbufsize); + saacproto_Send(fd, saacproto.work); +} + +void saacproto_ACreLoadFmData_send( int fd, int type, int data) +{ + saacproto_CreateHeader( saacproto.work, "ACreLoadFmData"); + saacproto_strcatsafe( saacproto.work, saacproto_mkstr_int( type), saacproto.workbufsize); + saacproto_strcatsafe( saacproto.work, saacproto_mkstr_int( data), saacproto.workbufsize); + saacproto_Send( fd, saacproto.work); +} + +#ifdef _ACFMPK_LIST +void saacproto_ACLoadFmPk_send(int fd, int fmpks_pos) +{ + saacproto_CreateHeader(saacproto.work, "ACLoadFmPk"); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmpks_pos), saacproto.workbufsize); + saacproto_Send(fd, saacproto.work); +} + + +void saacproto_ACSendFmPk_send(int fd, int toindex, int PkFlg, int fmpks_pos, char *msg) +{ + saacproto_CreateHeader(saacproto.work, "ACSendFmPk"); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmpks_pos), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int( toindex), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int( PkFlg), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(msg), saacproto.workbufsize); + saacproto_Send(fd, saacproto.work); +} +#endif + + +#ifdef _RECAL_ASK_PLAYER // WON 要求人物资料 +void saacproto_Recal_Player_send(int acfd, char *uid, int userfdid, int GmCliId, char *id, int char_num, int date, int backup_flag) +{ + saacproto_CreateHeader(saacproto.work, "ACSendRecalPlayer"); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(uid), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(userfdid), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(GmCliId), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(id), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(char_num), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(date), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(backup_flag), saacproto.workbufsize); + saacproto_Send(acfd, saacproto.work); +} + +void saacproto_Recal_Backup_send(int acfd, char *uid, int userfdid, int GmCliId, char *id, int char_num, int date, char *char_data, int backup_flag) +{ + saacproto_CreateHeader(saacproto.work, "ACSendRecalBackup"); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(uid), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(userfdid), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(GmCliId), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(id), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(char_num), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(date), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(char_data), saacproto.workbufsize); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(backup_flag), saacproto.workbufsize); + saacproto_Send(acfd, saacproto.work); +} +#endif // end RECAL_ASK_PLAYER + +void saacproto_ACAuctionSold_send(int fd, char *data) +{ + saacproto_CreateHeader(saacproto.work, "ACAuctionSold"); + saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(data), saacproto.workbufsize); + saacproto_Send(fd, saacproto.work); +} + +int saacproto_ClientDispatchMessage(int fd ,char*line) +{ + int msgid; + char funcname[1024]; + saacproto_strcpysafe( saacproto.work , line, saacproto.workbufsize ); + saacproto_splitString( saacproto.work); + saacproto_GetMessageInfo( &msgid , funcname , sizeof(funcname),saacproto.token_list); + +#ifdef _ANDYLOG_TEST + print( "funcname:%s , line len:%d\n", funcname, strlen( line)); +#endif + + if( strcmp( funcname , "ACGmsvDownRequest" ) == 0 ){ + int min; + min = saacproto_demkstr_int( saacproto.token_list[2] ); + saacproto_ACGmsvDownRequest_recv( fd,min); + return 0; + } + + if( strcmp( funcname , "ACServerLogin" ) == 0 ){ + char* result; + char* data; + result = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); + data = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); + saacproto_ACServerLogin_recv( fd,result,data); + return 0; + } + + if( strcmp( funcname , "ACCharList" ) == 0 ){ + char* result; + char* output; + int id; + result = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); + output = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); + id = saacproto_demkstr_int( saacproto.token_list[4] ); + + saacproto_ACCharList_recv( fd,result,output,id); + return 0; + } + + if( strcmp( funcname , "ACCharLoad" ) == 0 ){ + char* result=NULL; + char* data=NULL; + int id; +#ifdef _NEWSAVE + int saveindex; +#endif + result = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); + data = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); + id = saacproto_demkstr_int( saacproto.token_list[4] ); + if( data == NULL ) return 0; + if( result == NULL ) return 0; + +#ifdef _NEWSAVE + saveindex = saacproto_demkstr_int( saacproto.token_list[5] ); + saacproto_ACCharLoad_recv( fd,result,data,id,saveindex); +#else + saacproto_ACCharLoad_recv( fd,result,data,id, -1); +#endif + return 0; + } + + if( strcmp( funcname , "ACCharSave" ) == 0 ){ + char* result; + char* data; + int id; + result = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); + data = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); + id = saacproto_demkstr_int( saacproto.token_list[4] ); + saacproto_ACCharSave_recv( fd,result,data,id); + return 0; + } + +#ifdef _DEATH_CONTEND + if( strcmp( funcname , "PKLISTGETDATA" ) == 0 ){ + char* result; + char* data; + int ti; + + ti = saacproto_demkstr_int( saacproto.token_list[2] ); + data = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); + result = saacproto_wrapStringAddr( saacproto_stringwrapper[3] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[4] )); + saacproto_LoadPkTeamListData_recv( fd, result, data, ti); + return 0; + } + + if( strcmp( funcname , "PKLISTCHARTS" ) == 0 ){ + char* data; + int type, flg; + data = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); + type = saacproto_demkstr_int( saacproto.token_list[3] ); + flg = saacproto_demkstr_int( saacproto.token_list[4] ); + + saacproto_PKLISTCHARTS_recv( fd, data, type, flg); + return 0; + } + +#endif + +#ifdef _PAUCTION_MAN + if( strcmp( funcname , "AUCTIONADDITEM" ) == 0 ){ + int itemID; + char *name; + char *data; + int flg, ret; + + name = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); + data = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); + itemID = saacproto_demkstr_int( saacproto.token_list[4] ); + ret = saacproto_demkstr_int( saacproto.token_list[5] ); + flg = saacproto_demkstr_int( saacproto.token_list[6] ); + saacproto_ACItemAuction_recv( fd, name, data, itemID, ret, flg); + + return 0; + } +#endif + + if( strcmp( funcname , "ACCharDelete" ) == 0 ){ + char* result; + char* data; + int id; + result = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); + data = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); + id = saacproto_demkstr_int( saacproto.token_list[4] ); + saacproto_ACCharDelete_recv( fd,result,data,id); + return 0; + } + + if( strcmp( funcname , "ACLock" ) == 0 ){ + char* result; + char* data; + int id; + result = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); + data = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); + id = saacproto_demkstr_int( saacproto.token_list[4] ); + saacproto_ACLock_recv( fd,result,data,id); + return 0; + } + +#ifdef _WAEI_KICK + if( strcmp( funcname , "ACKick" ) == 0 ){ + int act; + char* data; + int id; + act = saacproto_demkstr_int( saacproto.token_list[2] ); + data = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); + id = saacproto_demkstr_int( saacproto.token_list[4] ); + saacproto_ACKick_recv( fd, act, data, id); + return 0; + } +#endif + +#ifdef _NEW_PLAYERGOLD + if( strcmp( funcname , "LoadNEWPlayer" ) == 0 ){ + char* data; + int charaindex; + charaindex = saacproto_demkstr_int( saacproto.token_list[2] ); + data = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); + saacproto_LoadNEWPlayer_recv( fd, charaindex, data); + return 0; + } +#endif + +#ifdef _CHAR_POOLITEM + + if( strcmp( funcname , "ACSavePoolItem" ) == 0 ){ + char* result; + char* data; + int id; + + result = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); + data = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); + id = saacproto_demkstr_int( saacproto.token_list[4] ); + saacproto_ACCharSavePoolItem_recv( fd, result, data, id); + return 0; + } + + if( strcmp( funcname , "ACGetPoolItem" ) == 0 ){ + char* result; + char* data; + int id, npcid; + + result = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); + data = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); + id = saacproto_demkstr_int( saacproto.token_list[4] ); + npcid = saacproto_demkstr_int( saacproto.token_list[5] ); + saacproto_ACCharGetPoolItem_recv( fd, result, data, id, npcid); + return 0; + } +#endif + + +#ifdef _CHAR_POOLPET + + if( strcmp( funcname , "ACSavePoolPet" ) == 0 ){ + char* result; + char* data; + int id; + + result = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); + data = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); + id = saacproto_demkstr_int( saacproto.token_list[4] ); + saacproto_ACCharSavePoolPet_recv( fd, result, data, id); + return 0; + } + + if( strcmp( funcname , "ACGetPoolPet" ) == 0 ){ + char* result; + char* data; + int id, npcid; + + result = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); + data = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); + id = saacproto_demkstr_int( saacproto.token_list[4] ); + npcid = saacproto_demkstr_int( saacproto.token_list[5] ); + saacproto_ACCharGetPoolPet_recv( fd, result, data, id, npcid); + return 0; + } +#endif + + + +#ifdef _UNIVERSE_CHATROOM + if( strcmp( funcname , "ACUniChatroom" ) == 0 ){ + char* result; + char* data; + char *id; + int charaindex, clifdid; + + result = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); + data = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); + id = saacproto_wrapStringAddr( saacproto_stringwrapper[3] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[4] )); + charaindex = saacproto_demkstr_int( saacproto.token_list[5] ); + clifdid = saacproto_demkstr_int( saacproto.token_list[6] ); + + saacproto_ACUniChatroom_recv( fd, charaindex, clifdid, result, id, data); + return 0; + } + +#endif + if( strcmp( funcname , "ACUCheck" ) == 0 ){ + char* mem_id; + mem_id = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); + saacproto_ACUCheck_recv( fd,mem_id); + return 0; + } +/* +354 :
  • servertoclient DBUpdateEntryString( string result, string table, string key, int msgid, int msgid2 );
    +355 : 晓及戊穴件玉及瑛绊[撩 仄化手荚汊尕第 卅及匹 骰仄化方中冗 +356 :
    +357 :
    string result +358 :
    successful 井failed +359 :
    string table +360 :
    +361 :
    int msgid +362 :
    +363 :
    int msgid2 +364 :
    +365 :
    +366 : +*/ + + if( strcmp( funcname , "DBUpdateEntryString" ) == 0 ){ + char* result; + char* table; + char* key; + int msgid; + int msgid2; + result = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); + table = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); + key = saacproto_wrapStringAddr( saacproto_stringwrapper[3] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[4] )); + msgid = saacproto_demkstr_int( saacproto.token_list[5] ); + msgid2 = saacproto_demkstr_int( saacproto.token_list[6] ); + saacproto_DBUpdateEntryString_recv( fd,result,table,key,msgid,msgid2); + return 0; + } +/* +379 :
  • servertoclient DBDeleteEntryString( string result, string table, string key , int msgid , int msgid2 );
    +380 : 侬 巨件玄伉及绰轮及瑛绊 +381 :
    +382 :
    string result +383 :
    successful / failed +384 :
    string table +385 :
    +386 :
    string key +387 :
    +388 :
    int msgid +389 :
    +390 :
    int msgid2 +391 :
    +392 :
    +393 : +*/ + + if( strcmp( funcname , "DBDeleteEntryString" ) == 0 ){ + char* result; + char* table; + char* key; + int msgid; + int msgid2; + result = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); + table = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); + key = saacproto_wrapStringAddr( saacproto_stringwrapper[3] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[4] )); + msgid = saacproto_demkstr_int( saacproto.token_list[5] ); + msgid2 = saacproto_demkstr_int( saacproto.token_list[6] ); + saacproto_DBDeleteEntryString_recv( fd,result,table,key,msgid,msgid2); + return 0; + } +/* +406 :
  • servertoclient DBGetEntryString( string result, string value, string table, string key, int msgid, int msgid2 );
    +407 : 潸曰分仄及忒曰袄 +408 :
    +409 :
    string result +410 :
    successful / failed +411 :
    string value +412 :
    袄 +413 :
    string table +414 :
    +415 :
    string key +416 :
    +417 :
    int msgid +418 :
    +419 :
    int msgid2 +420 :
    +421 :
    +422 : +*/ + + if( strcmp( funcname , "DBGetEntryString" ) == 0 ){ + char* result; + char* value; + char* table; + char* key; + int msgid; + int msgid2; + result = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); + value = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); + table = saacproto_wrapStringAddr( saacproto_stringwrapper[3] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[4] )); + key = saacproto_wrapStringAddr( saacproto_stringwrapper[4] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[5] )); + msgid = saacproto_demkstr_int( saacproto.token_list[6] ); + msgid2 = saacproto_demkstr_int( saacproto.token_list[7] ); + saacproto_DBGetEntryString_recv( fd,result,value,table,key,msgid,msgid2); + return 0; + } +/* +445 :
  • servertoclient DBUpdateEntryInt( string result , string table, string key, int msgid, int msgid2 );
    +446 : DBUpdateEntry及瑛绊[ +447 :
    +448 :
    string result +449 :
    succesful/failed +450 :
    string table +451 :
    □皮伙 毛公及引引井尹允 +452 :
    string key +453 :
    平□毛公及引引井尹允 +454 :
    int msgid, int msgid2 +455 :
    msgid 毛公及引引忒允[ +456 :
    +457 :

    +458 : +*/ + + if( strcmp( funcname , "DBUpdateEntryInt" ) == 0 ){ + char* result; + char* table; + char* key; + int msgid; + int msgid2; + result = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); + table = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); + key = saacproto_wrapStringAddr( saacproto_stringwrapper[3] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[4] )); + msgid = saacproto_demkstr_int( saacproto.token_list[5] ); + msgid2 = saacproto_demkstr_int( saacproto.token_list[6] ); + saacproto_DBUpdateEntryInt_recv( fd,result,table,key,msgid,msgid2); + return 0; + } +/* +473 :
  • servertoclient DBGetEntryRank( string result , int rank , int count, string table, string key, int msgid, int msgid2 );
    +474 : 赐匏毛忒允[ +475 :
    +476 :
    string result +477 :
    successful/failed +478 :
    int rank +479 :
    赐匏[1动晓及袄毛潸月[ +480 :
    int count +481 :
    晓井日中仁勾户井[ 赓及巨件玄伉反0井日反元引月[ +482 :
    string table +483 :
    □皮伙 毛公及引引井尹允 +484 :
    string key +485 :
    平□毛公及引引井尹允 +486 :
    int msgid, int msgid2 +487 :
    msgid 毛公及引引忒允 +488 :
    +489 :

    +490 : +491 : +*/ + + if( strcmp( funcname , "DBGetEntryRank" ) == 0 ){ + char* result; + int rank; + int count; + char* table; + char* key; + int msgid; + int msgid2; + result = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); + rank = saacproto_demkstr_int( saacproto.token_list[3] ); + count = saacproto_demkstr_int( saacproto.token_list[4] ); + table = saacproto_wrapStringAddr( saacproto_stringwrapper[4] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[5] )); + key = saacproto_wrapStringAddr( saacproto_stringwrapper[5] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[6] )); + msgid = saacproto_demkstr_int( saacproto.token_list[7] ); + msgid2 = saacproto_demkstr_int( saacproto.token_list[8] ); + saacproto_DBGetEntryRank_recv( fd,result,rank,count,table,key,msgid,msgid2); + return 0; + } +/* +504 :
  • servertoclient DBDeleteEntryInt( string result , string table, string key, int msgid, int msgid2 );
    +505 : 绰轮及瑛绊 +506 :
    +507 :
    string result +508 :
    successful/failed +509 :
    string table +510 :
    □皮伙 毛公及引引井尹允 +511 :
    string key +512 :
    平□毛公及引引井尹允 +513 :
    int msgid, int msgid2 +514 :
    msgid 毛公及引引忒允 +515 :
    +516 :

    +517 : +*/ + + if( strcmp( funcname , "DBDeleteEntryInt" ) == 0 ){ + char* result; + char* table; + char* key; + int msgid; + int msgid2; + result = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); + table = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); + key = saacproto_wrapStringAddr( saacproto_stringwrapper[3] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[4] )); + msgid = saacproto_demkstr_int( saacproto.token_list[5] ); + msgid2 = saacproto_demkstr_int( saacproto.token_list[6] ); + saacproto_DBDeleteEntryInt_recv( fd,result,table,key,msgid,msgid2); + return 0; + } +/* +530 :
  • servertoclient DBGetEntryInt( string result , int value , string table, string key, int msgid, int msgid2 );
    +531 : 巨件玄伉及袄毛井尹允 +532 :
    +533 :
    string result +534 :
    successful/failed +535 :
    int value +536 :
    袄公及手及 +537 :
    string table +538 :
    □皮伙 毛公及引引井尹允 +539 :
    string key +540 :
    平□毛公及引引井尹允 +541 :
    int msgid, int msgid2 +542 :
    msgid 毛公及引引忒允 +543 :
    +544 : +545 : +546 : +*/ + + if( strcmp( funcname , "DBGetEntryInt" ) == 0 ){ + char* result; + int value; + char* table; + char* key; + int msgid; + int msgid2; + result = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); + value = saacproto_demkstr_int( saacproto.token_list[3] ); + table = saacproto_wrapStringAddr( saacproto_stringwrapper[3] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[4] )); + key = saacproto_wrapStringAddr( saacproto_stringwrapper[4] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[5] )); + msgid = saacproto_demkstr_int( saacproto.token_list[6] ); + msgid2 = saacproto_demkstr_int( saacproto.token_list[7] ); + saacproto_DBGetEntryInt_recv( fd,result,value,table,key,msgid,msgid2); + return 0; + } +/* +562 :
  • servertoclient DBGetEntryByRank( string result , string list , string table, int msgid, int msgid2 );
    +563 : DBGetEntryByRank及瑛绊[ +564 :
    +565 :
    string result +566 :
    +567 :
    string list +568 :
    "RANK,KEY,SCORE,INFO|RANK,KEY,SCORE,INFO|...."
    +569 : RANK反赐匏匹丐月[KEY反公及赐匏卞卅匀化中月旦戊失毛手匀化中月 +570 : 平□[SCORE反帮醒袄匹旦戊失匹丐月[ +571 : [
    +572 : "1,RINGO,123465,data1|2,HOGE,4567,data2|2,FUCK,4567,data3"
    +573 : 仇及 分午}2匏反2谛中月仇午卞卅月[ +574 :
    string table +575 :
    □皮伙 +576 :
    int msgid, int msgid2 +577 :
    +578 :
    +579 : +580 : +*/ + + if( strcmp( funcname , "DBGetEntryByRank" ) == 0 ){ + char* result; + char* list; + char* table; + int msgid; + int msgid2; + result = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); + list = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); + table = saacproto_wrapStringAddr( saacproto_stringwrapper[3] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[4] )); + msgid = saacproto_demkstr_int( saacproto.token_list[5] ); + msgid2 = saacproto_demkstr_int( saacproto.token_list[6] ); + saacproto_DBGetEntryByRank_recv( fd,result,list,table,msgid,msgid2); + return 0; + } +/* +593 :
  • servertoclient DBGetEntryByCount( string result , string list , string table, int count_start, int msgid, int msgid2 );
    +594 : DBGetEntryByCount 及瑛绊[ +595 :
    +596 :
    string result +597 :
    SUCCESSFUL/FAILED +598 :
    string list +599 :
    请 伉旦玄[1巨件玄伉丐凶曰 "INDEX,RANK,KEY,SCORE,INFO" 及4蜊及树 +600 : 及赚匹丐曰}公木互蜊醒坌 "|" 匹勾卅互月[蜊醒互0及桦宁反 +601 : 坞 侬 [ +602 :
    int num +603 :
    中仁勾午曰分允井[1卅日1蜊[2卅日2蜊[ +604 :
    int msgid ,msgid2 +605 :
    丢永本□斥ID. +606 :
    +607 : +*/ + + if( strcmp( funcname , "DBGetEntryByCount" ) == 0 ){ + char* result; + char* list; + char* table; + int count_start; + int msgid; + int msgid2; + result = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); + list = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); + table = saacproto_wrapStringAddr( saacproto_stringwrapper[3] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[4] )); + count_start = saacproto_demkstr_int( saacproto.token_list[5] ); + msgid = saacproto_demkstr_int( saacproto.token_list[6] ); + msgid2 = saacproto_demkstr_int( saacproto.token_list[7] ); + saacproto_DBGetEntryByCount_recv( fd,result,list,table,count_start,msgid,msgid2); + return 0; + } +#ifdef _ALLDOMAN // (不可开) Syu ADD 排行榜NPC + if ( strcmp( funcname , "UpdataStele" ) == 0 ) { + char* token; + token = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); + saacproto_UpdataStele_recv( fd , token) ; + return 0; + } + if ( strcmp( funcname , "S_UpdataStele" ) == 0 ) { + char* ocdkey; + char* oname; + char* ncdkey; + char* nname; + char* title; + int level; + int trns; + int floor; + ocdkey = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); + oname = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); + ncdkey = saacproto_wrapStringAddr( saacproto_stringwrapper[3] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[4] )); + nname = saacproto_wrapStringAddr( saacproto_stringwrapper[4] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[5] )); + title = saacproto_wrapStringAddr( saacproto_stringwrapper[5] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[6] )); + level = saacproto_demkstr_int( saacproto.token_list[7] ); + trns = saacproto_demkstr_int( saacproto.token_list[8] ); + floor = saacproto_demkstr_int( saacproto.token_list[9] ); + saacproto_S_UpdataStele_recv( fd , ocdkey , oname , ncdkey , nname , title , level , + trns , floor ); + return 0 ; + } +#endif +/* +621 :
  • servertoclient Broadcast( string id, string charname, string message );
    +622 : Broadcast及失市它件玄扔□田□井日必□丞扔□田□尺及霜耨迕 +623 :
    +624 :
    string id +625 :
    user ID +626 :
    string charname +627 :
    character name +628 :
    string message +629 :
    丢永本□斥 +630 :
    int flag +631 :
    1卞允月午}愤坌卞卞反 霜今木卅中[ +632 :
    +633 : +*/ + + if( strcmp( funcname , "Broadcast" ) == 0 ){ + char* id; + char* charname; + char* message; + id = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); + charname = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); + message = saacproto_wrapStringAddr( saacproto_stringwrapper[3] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[4] )); + saacproto_Broadcast_recv( fd,id,charname,message); + return 0; + } +/* +652 :
  • servertoclient Message( string id_from, string charname_from, string id_to, string charname_to, string message , int option , int mesgid );
    +653 : 失市它件玄扔□田□井日必□丞扔□田□卞丢永本□斥毛霜耨允月[ +654 :
    +655 :
    string id_from +656 :
    from ID +657 :
    string charname_from +658 :
    from character name +659 :
    string id_to +660 :
    to ID +661 :
    string charname_to +662 :
    to character name +663 :
    string message +664 :
    丢永本□斥及 +665 :
    int option +666 :
    左皿扑亦件(晓及楮醒毛辅寰) +667 :
    int mesgid +668 :
    丢永本□斥ID 失市它件玄扔□田□及栋 迕 +669 :
    +670 : +*/ + + if( strcmp( funcname , "Message" ) == 0 ){ + char* id_from; + char* charname_from; + char* id_to; + char* charname_to; + char* message; + int option; + int mesgid; + id_from = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); + charname_from = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); + id_to = saacproto_wrapStringAddr( saacproto_stringwrapper[3] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[4] )); + charname_to = saacproto_wrapStringAddr( saacproto_stringwrapper[4] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[5] )); + message = saacproto_wrapStringAddr( saacproto_stringwrapper[5] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[6] )); + option = saacproto_demkstr_int( saacproto.token_list[7] ); + mesgid = saacproto_demkstr_int( saacproto.token_list[8] ); + saacproto_Message_recv( fd,id_from,charname_from,id_to,charname_to,message,option,mesgid); + return 0; + } + + // CoolFish: Family 2001/5/9 + if( strcmp( funcname, "ACAddFM") == 0){ + int fmindex, index, charfdid; + char *result; + result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + fmindex = saacproto_demkstr_int(saacproto.token_list[3]); + index = saacproto_demkstr_int(saacproto.token_list[4]); + charfdid = saacproto_demkstr_int(saacproto.token_list[5]); + saacproto_ACAddFM_recv(fd, result, fmindex, charfdid, index); + return 0; + } + if( strcmp( funcname, "ACJoinFM") == 0){ + int charfdid, recv; + char *result; + result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + recv = saacproto_demkstr_int(saacproto.token_list[3]); + charfdid = saacproto_demkstr_int(saacproto.token_list[4]); + saacproto_ACJoinFM_recv(fd, result, recv, charfdid); + return 0; + } + if( strcmp( funcname, "ACLeaveFM") == 0){ + int charfdid, resultflag; + char *result; + result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + resultflag = saacproto_demkstr_int(saacproto.token_list[3]); + charfdid = saacproto_demkstr_int(saacproto.token_list[4]); + saacproto_ACLeaveFM_recv(fd, result, resultflag, charfdid); + return 0; + } + if( strcmp( funcname, "ACDelFM") == 0){ + int charfdid; + char *result; + result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + charfdid = saacproto_demkstr_int(saacproto.token_list[3]); + saacproto_ACDelFM_recv(fd, result, charfdid); + return 0; + } + if( strcmp( funcname, "ACShowFMList") == 0){ + int fmnum; + char *result, *data; + result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + fmnum = saacproto_demkstr_int(saacproto.token_list[3]); + data = saacproto_wrapStringAddr(saacproto_stringwrapper[3], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[4])); + saacproto_ACShowFMList_recv(fd, result, fmnum, data); + return 0; + } + +#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令 + if( strcmp( funcname, "ACRELOADFMOK") == 0){ + int charindex; + charindex = saacproto_demkstr_int(saacproto.token_list[2]); + saacproto_ACRELOADFMOK_recv( fd, charindex ); + return 0; + } + + if( strcmp( funcname, "ACSHOWMEMBERLIST2") == 0){ + int charaindex = -1, time = -1, id = -1, fm1 = -1, fm2 = -1; + char *fm1_name, *fm2_name; + + charaindex = saacproto_demkstr_int(saacproto.token_list[2]); + fm1 = saacproto_demkstr_int(saacproto.token_list[3]); + fm1_name = saacproto_wrapStringAddr(saacproto_stringwrapper[3], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[4])); + fm2 = saacproto_demkstr_int(saacproto.token_list[5]); + fm2_name = saacproto_wrapStringAddr(saacproto_stringwrapper[5], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[6])); + time = saacproto_demkstr_int(saacproto.token_list[7]); + id = saacproto_demkstr_int(saacproto.token_list[8]); + + saacproto_ACSHOWMEMBERLIST2_recv( fd, charaindex, fm1, fm1_name, fm2, fm2_name, time, id ); + + return 0; + } + +#endif + +#ifdef _DEATH_FAMILY_STRUCT // WON ADD 家族战存放胜负资料 + if( strcmp( funcname, "ACSendFmPkStruct") == 0){ + char *data; + + data = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + + saacproto_ACSendFmPkStruct_recv( fd, data ); + return 0; + } +#endif + +#ifdef _DEATH_FAMILY_LOGIN_CHECK // WON ADD 家族战登入检查 + if( strcmp( funcname, "ACSendMemberList") == 0){ + int charindex; + char *result, *data; + + result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + charindex = saacproto_demkstr_int(saacproto.token_list[3]); + data = saacproto_wrapStringAddr(saacproto_stringwrapper[3], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[4])); + + saacproto_ACSendMember_recv( fd, result, data, charindex ); + return 0; + } +#endif + + if( strcmp( funcname, "ACShowMemberList") == 0){ + int index, fmmemnum, fmacceptflag, fmjoinnum; + char *result, *data; + result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + index = saacproto_demkstr_int(saacproto.token_list[3]); + fmmemnum = saacproto_demkstr_int(saacproto.token_list[4]); + fmacceptflag = saacproto_demkstr_int(saacproto.token_list[5]); + fmjoinnum = saacproto_demkstr_int(saacproto.token_list[6]); + data = saacproto_wrapStringAddr(saacproto_stringwrapper[6], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[7])); + saacproto_ACShowMemberList_recv(fd, result, index, fmmemnum, fmacceptflag, fmjoinnum, data); + return 0; + } + if( strcmp( funcname, "ACFMDetail") == 0){ + int charfdid; + char *result, *data; + result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + data = saacproto_wrapStringAddr(saacproto_stringwrapper[2], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[3])); + charfdid = saacproto_demkstr_int(saacproto.token_list[4]); + saacproto_ACFMDetail_recv(fd, result, data, charfdid); + return 0; + } + if( strcmp( funcname, "ACMemberJoinFM") == 0){ + int charfdid; + char *result, *data; + result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + data = saacproto_wrapStringAddr(saacproto_stringwrapper[2], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[3])); + charfdid = saacproto_demkstr_int(saacproto.token_list[4]); + saacproto_ACMemberJoinFM_recv(fd, result, data, charfdid); + return 0; + } + if( strcmp( funcname, "ACMemberLeaveFM") == 0){ + int charfdid; + char *result, *data; + result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + data = saacproto_wrapStringAddr(saacproto_stringwrapper[2], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[3])); + charfdid = saacproto_demkstr_int(saacproto.token_list[4]); + saacproto_ACMemberLeaveFM_recv(fd, result, data, charfdid); + return 0; + } + if( strcmp( funcname, "ACFMCharLogin") == 0){ + int charfdid, index, floor, fmdp, joinflag, fmsetupflag, flag, charindex; +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + int charfame; +#endif +#ifdef _NEW_MANOR_LAW + int momentum; +#endif + char *result; + result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + index = saacproto_demkstr_int(saacproto.token_list[3]); + floor = saacproto_demkstr_int(saacproto.token_list[4]); + fmdp = saacproto_demkstr_int(saacproto.token_list[5]); + joinflag = saacproto_demkstr_int(saacproto.token_list[6]); + fmsetupflag = saacproto_demkstr_int(saacproto.token_list[7]); + flag = saacproto_demkstr_int(saacproto.token_list[8]); + charindex = saacproto_demkstr_int(saacproto.token_list[9]); +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + charfame = saacproto_demkstr_int(saacproto.token_list[10]); + charfdid = saacproto_demkstr_int(saacproto.token_list[11]); + #ifdef _NEW_MANOR_LAW + momentum = saacproto_demkstr_int(saacproto.token_list[12]); + #endif + saacproto_ACFMCharLogin_recv(fd, result, index, floor, fmdp, + joinflag, fmsetupflag, flag, charindex, charfame, charfdid + #ifdef _NEW_MANOR_LAW + ,momentum + #endif + ); +#else + charfdid = saacproto_demkstr_int(saacproto.token_list[10]); + saacproto_ACFMCharLogin_recv(fd, result, index, floor, fmdp, + joinflag, fmsetupflag, flag, charindex, charfdid); +#endif + return 0; + } + if( strcmp( funcname, "ACFMCharLogout") == 0){ + int charfdid; + char *result; + result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + charfdid = saacproto_demkstr_int(saacproto.token_list[3]); + saacproto_ACFMCharLogout_recv(fd, result, charfdid); + return 0; + } + if( strcmp( funcname, "ACFMReadMemo") == 0){ + int index, num, dataindex; + char *result, *data; + result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + index = saacproto_demkstr_int(saacproto.token_list[3]); + num = saacproto_demkstr_int(saacproto.token_list[4]); + dataindex = saacproto_demkstr_int(saacproto.token_list[5]); + data = saacproto_wrapStringAddr(saacproto_stringwrapper[5], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[6])); + saacproto_ACFMReadMemo_recv(fd, result, index, num, dataindex, data); + return 0; + } + if( strcmp( funcname, "ACFMWriteMemo") == 0){ + int index; + char *result; + result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + index = saacproto_demkstr_int(saacproto.token_list[3]); + saacproto_ACFMWriteMemo_recv(fd, result, index); + return 0; + } + if( strcmp( funcname, "ACFMPointList") == 0){ + char *result, *data; + result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + data = saacproto_wrapStringAddr(saacproto_stringwrapper[2], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[3])); + saacproto_ACFMPointList_recv(fd, result, data); + return 0; + } + + + if( strcmp( funcname, "ACSetFMPoint") == 0){ + int charfdid, r; + char *result; + result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + r = saacproto_demkstr_int(saacproto.token_list[3]); + charfdid = saacproto_demkstr_int(saacproto.token_list[4]); + saacproto_ACSetFMPoint_recv(fd, result, r, charfdid); + return 0; + } + if( strcmp( funcname, "ACFixFMPoint") == 0){ + int r; + char *result; + result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + r = saacproto_demkstr_int(saacproto.token_list[3]); + saacproto_ACFixFMPoint_recv(fd, result, r); + return 0; + } + if( strcmp( funcname, "ACFMAnnounce") == 0){ + int fmindex, index, color, kindflag; + char *result, *fmname, *data; + result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + fmname = saacproto_wrapStringAddr(saacproto_stringwrapper[2], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[3])); + fmindex = saacproto_demkstr_int(saacproto.token_list[4]); + index = saacproto_demkstr_int(saacproto.token_list[5]); + kindflag = saacproto_demkstr_int(saacproto.token_list[6]); + data = saacproto_wrapStringAddr(saacproto_stringwrapper[6], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[7])); + color = saacproto_demkstr_int(saacproto.token_list[8]); + saacproto_ACFMAnnounce_recv(fd, result, fmname, fmindex, index, kindflag, data, color); + return 0; + } + if( strcmp( funcname, "ACShowTopFMList") == 0){ + int num, kindflag; + char *result, *data; + result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + kindflag = saacproto_demkstr_int(saacproto.token_list[3]); + num = saacproto_demkstr_int(saacproto.token_list[4]); + data = saacproto_wrapStringAddr(saacproto_stringwrapper[4], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[5])); + saacproto_ACShowTopFMList_recv(fd, result, kindflag, num, data); + return 0; + } + if( strcmp( funcname, "ACFixFMData") == 0){ + int kindflag, charfdid; + char *result, *data1, *data2; + result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + kindflag = saacproto_demkstr_int(saacproto.token_list[3]); + data1 = saacproto_wrapStringAddr(saacproto_stringwrapper[3], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[4])); + data2 = saacproto_wrapStringAddr(saacproto_stringwrapper[4], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[5])); + charfdid = saacproto_demkstr_int(saacproto.token_list[6]); + saacproto_ACFixFMData_recv(fd, result, kindflag, data1, data2, charfdid); + return 0; + } +#ifdef _FAMILYBANKSTONELOG + if( strcmp( funcname, "ACgetFMBankgold") == 0){ + int charfdid,r; + charfdid = saacproto_demkstr_int(saacproto.token_list[2]); + r=saacproto_demkstr_int(saacproto.token_list[3]); + saacproto_ACgetFMBankgold_recv(fd,charfdid,r); + return 0; + } +#endif + if( strcmp( funcname, "ACFixFMPK") == 0){ + int data, winindex, loseindex; + char *result; + result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + data = saacproto_demkstr_int(saacproto.token_list[3]); + winindex = saacproto_demkstr_int(saacproto.token_list[4]); + loseindex = saacproto_demkstr_int(saacproto.token_list[5]); + saacproto_ACFixFMPK_recv(fd, result, data, winindex, loseindex); + return 0; + } + if( strcmp( funcname, "ACGMFixFMData") == 0){ + int charfdid; + char *result, *fmname; + result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + fmname = saacproto_wrapStringAddr(saacproto_stringwrapper[2], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[3])); + charfdid = saacproto_demkstr_int(saacproto.token_list[4]); + saacproto_ACGMFixFMData_recv(fd, result, fmname, charfdid); + return 0; + } + if( strcmp( funcname, "ACGetFMData") == 0){ + int kindflag, charfdid, data; + char *result; + result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + kindflag = saacproto_demkstr_int(saacproto.token_list[3]); + data = saacproto_demkstr_int(saacproto.token_list[4]); + charfdid = saacproto_demkstr_int(saacproto.token_list[5]); + saacproto_ACGetFMData_recv(fd, result, kindflag, data, charfdid); + return 0; + } + if( strcmp( funcname, "ACFMClearPK") == 0){ + int fmindex, index; + char *result, *fmname; + result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + fmname = saacproto_wrapStringAddr(saacproto_stringwrapper[2], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[3])); + fmindex = saacproto_demkstr_int(saacproto.token_list[4]); + index = saacproto_demkstr_int(saacproto.token_list[5]); + saacproto_ACFMClearPK_recv(fd, result, fmname, fmindex, index); + return 0; + } + // Arminius 7.26 manor pk acknowledge + if( strcmp( funcname, "ACManorPKAck") == 0){ + char *data; + data = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + saacproto_ACManorPKAck_recv(fd, data); + return 0; + } + +#ifdef _ACFMPK_LIST + if( strcmp( funcname, "ACLoadFmPk") == 0){ + char *data; + data = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + saacproto_ACLoadFmPk_recv( fd, data); + return 0; + } + if( strcmp( funcname, "ACSendFmPk") == 0){ + int toindex, flg; + toindex = saacproto_demkstr_int( saacproto.token_list[2] ); + flg =saacproto_demkstr_int( saacproto.token_list[3] ); + saacproto_ACSendFmPk_recv( fd, toindex, flg); + return 0; + } +#endif + + + +#ifdef _RECAL_ASK_PLAYER // WON 要求人物资料 + if( strcmp( funcname, "ACRecalPlayer") == 0){ // 线上人物资料 + char *uid, *id, *char_data; + int userfdid, char_num, date, GmCliId; + + uid = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + userfdid = saacproto_demkstr_int(saacproto.token_list[3]); + GmCliId = saacproto_demkstr_int(saacproto.token_list[4]); + id = saacproto_wrapStringAddr(saacproto_stringwrapper[4], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[5])); + char_num = saacproto_demkstr_int(saacproto.token_list[6]); + date = saacproto_demkstr_int(saacproto.token_list[7]); + char_data = saacproto_wrapStringAddr(saacproto_stringwrapper[7], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[8])); + + saacproto_ACRecalPlayer_recv(uid, userfdid, GmCliId, id, char_num, date, char_data); + return 0; + } + if( strcmp( funcname, "ACRecalBackupPlayer") == 0){ // 备份人物资料 + char *uid, *id, *char_data; + int userfdid, char_num, date, GmCliId; + + uid = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + userfdid = saacproto_demkstr_int(saacproto.token_list[3]); + GmCliId = saacproto_demkstr_int(saacproto.token_list[4]); + id = saacproto_wrapStringAddr(saacproto_stringwrapper[4], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[5])); + char_num = saacproto_demkstr_int(saacproto.token_list[6]); + date = saacproto_demkstr_int(saacproto.token_list[7]); + char_data = saacproto_wrapStringAddr(saacproto_stringwrapper[7], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[8])); + + saacproto_ACRecalBackupPlayer_recv(uid, userfdid, GmCliId, id, char_num, date, char_data); + return 0; + } + if( strcmp( funcname, "ACRecalBackupDate") == 0){ // 备份日期 + char *uid, *id, *char_data; + int userfdid, char_num, date, GmCliId; + + uid = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + userfdid = saacproto_demkstr_int(saacproto.token_list[3]); + GmCliId = saacproto_demkstr_int(saacproto.token_list[4]); + id = saacproto_wrapStringAddr(saacproto_stringwrapper[4], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[5])); + char_num = saacproto_demkstr_int(saacproto.token_list[6]); + date = saacproto_demkstr_int(saacproto.token_list[7]); + char_data = saacproto_wrapStringAddr(saacproto_stringwrapper[7], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[8])); + + saacproto_ACRecalBackupDate_recv(uid, userfdid, GmCliId, id, char_num, date, char_data); + return 0; + } + if( strcmp( funcname, "ACRecalAllBackupOK") == 0){ // 回溯ok + char *uid, *id, *char_data; + int userfdid, char_num, date, GmCliId; + + uid = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + userfdid = saacproto_demkstr_int(saacproto.token_list[3]); + GmCliId = saacproto_demkstr_int(saacproto.token_list[4]); + id = saacproto_wrapStringAddr(saacproto_stringwrapper[4], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[5])); + char_num = saacproto_demkstr_int(saacproto.token_list[6]); + date = saacproto_demkstr_int(saacproto.token_list[7]); + char_data = saacproto_wrapStringAddr(saacproto_stringwrapper[7], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[8])); + + saacproto_ACRecalAllBackupOK_recv(uid, userfdid, GmCliId, id, char_num, date, char_data); + return 0; + } +#endif + +#ifdef _NEW_PLAYERGOLD + if( strcmp( funcname, "ACNewPlayerList") == 0) + { + char *CdKey, *UserName; + int charaindex, RunType; + CdKey = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, + saacproto_demkstr_string(saacproto.token_list[2])); + UserName = saacproto_wrapStringAddr(saacproto_stringwrapper[2], saacproto.workbufsize, + saacproto_demkstr_string(saacproto.token_list[3])); + + charaindex = saacproto_demkstr_int(saacproto.token_list[4]); + RunType = saacproto_demkstr_int(saacproto.token_list[5]); + saacproto_ACNEWPlayerList_recv( fd, CdKey, UserName, charaindex, RunType); + return 0; + } +#endif +#ifdef _AUCTIONEER + if( strcmp(funcname, "ACAuctionSold") == 0){ + char *data; + data = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + saacproto_ACAuctionSold_recv(fd, data); + return 0; + } +#endif + +#ifdef _SEND_EFFECT // WON ADD AC送下雪、下雨等特效 + if( strcmp(funcname, "EFFECT") == 0){ + char *effect; + effect = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + print("\n AC send to GS weather effect !!"); + + CHAR_CHAT_DEBUG_sendeffect( fd, effect ); + return 0; + } +#endif + +#ifdef _GM_BROADCAST // WON ADD 客服公告系统 + if( strcmp(funcname, "GMBROADCAST") == 0){ + int time = 0, loop = 0, wait = 0; + char *msg; + + time = saacproto_demkstr_int(saacproto.token_list[2]); + loop = saacproto_demkstr_int(saacproto.token_list[3]); + wait = saacproto_demkstr_int(saacproto.token_list[4]); + msg = saacproto_wrapStringAddr(saacproto_stringwrapper[4], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[5])); + + Init_GM_BROADCAST( loop, time, wait, msg ); + + return 0; + } +#endif + +#ifdef _ANGEL_SUMMON + if( strcmp( funcname , "ACMissionTable" ) == 0 ){ + int num; + int type; + char* data; + //int charaindex; + char* angelinfo; + + num = saacproto_demkstr_int( saacproto.token_list[2] ); + type = saacproto_demkstr_int( saacproto.token_list[3] ); + data = saacproto_wrapStringAddr( saacproto_stringwrapper[3] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[4] )); + //charaindex = saacproto_demkstr_int( saacproto.token_list[5] ); + angelinfo = saacproto_wrapStringAddr( saacproto_stringwrapper[4] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[5] )); + + //saacproto_ACMissionTable_recv( fd, num, type, data, charaindex); + saacproto_ACMissionTable_recv( fd, num, type, data, angelinfo); + return 0; + } +#endif + +#ifdef _TEACHER_SYSTEM + if(strcmp(funcname,"ACCheckCharacterOnLine") == 0){ + int flag,charaindex,iOnline; + char* data; + + charaindex = saacproto_demkstr_int(saacproto.token_list[2]); + iOnline = saacproto_demkstr_int(saacproto.token_list[3]); + data = saacproto_wrapStringAddr( saacproto_stringwrapper[3] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[4] )); + flag = saacproto_demkstr_int( saacproto.token_list[5] ); + saacproto_ACCheckCharacterOnLine_recv(fd,charaindex,iOnline,data,flag); + return 0; + } +#endif + +#ifdef _RACEMAN + if( strcmp( funcname , "ACRaceRecordandSort" ) == 0 ){ + int charaindex,racetype; + char* data; + + charaindex = saacproto_demkstr_int( saacproto.token_list[2] ); + racetype = saacproto_demkstr_int( saacproto.token_list[3] ); + data = saacproto_wrapStringAddr( saacproto_stringwrapper[3] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[4] )); + + saacproto_ACRaceRecordandSort_recv(fd,charaindex,racetype,data); + } +#endif + + return -1; +} +void saacproto_SetClientLogFiles( char *r , char *w ) +{ + saacproto_strcpysafe( saacproto_readlogfilename , r , sizeof( saacproto_readlogfilename ) ); + saacproto_strcpysafe( saacproto_writelogfilename , w , sizeof( saacproto_writelogfilename ) ); +} +int saacproto_InitClient( int (*writefunc)(int,char*,int) ,int bufsiz ,int fd) +{ + int i; + if( (void*)writefunc == NULL){saacproto.write_func = saacproto_default_write_wrap;} else {saacproto.write_func = writefunc;} + saacproto_AllocateCommonWork(bufsiz); + saacproto_stringwrapper = (char**)calloc( 1,sizeof(char*) * MAXLSRPCARGS); + if(saacproto_stringwrapper ==NULL)return -1; + memset( saacproto_stringwrapper , 0, sizeof(char*)*MAXLSRPCARGS); + for(i=0;i +#include +#include +#ifndef WIN32 +#include +#include +#endif +#include "saacproto_util.h" +//ttom +1 +#define IS_2BYTEWORD( _a_ ) ( (char)(0x80) <= (_a_) && (_a_) <= (char)(0xFF) ) + +#ifdef saacproto__ENCRYPT +long saacproto_ringoCompressor( unsigned char *code , long codelen , unsigned char *text , long textlen); +long saacproto_ringoDecompressor( unsigned char *text , long textlen , unsigned char *code , long codelen); +#endif +/* + lsrpc routines +*/ +int saacproto_AllocateCommonWork(int bufsiz) +{ + saacproto.workbufsize = bufsiz; + saacproto.work = NULL; + saacproto.arraywork = NULL; + saacproto.escapework = NULL; + saacproto.val_str = NULL; + saacproto.token_list = NULL; + saacproto.cryptwork = NULL; + saacproto.jencodecopy = NULL; + saacproto.jencodeout = NULL; + saacproto.compresswork = NULL; + saacproto.work = (char*)calloc( 1, saacproto.workbufsize ); + saacproto.arraywork = (char*)calloc( 1, saacproto.workbufsize ); + saacproto.escapework = (char*)calloc( 1, saacproto.workbufsize ); + saacproto.val_str = (char*)calloc( 1, saacproto.workbufsize ); + saacproto.token_list = (char**)calloc( 1, saacproto.workbufsize *sizeof( char** ) ); + saacproto.cryptwork = (char*)calloc( 1, saacproto.workbufsize * 3 ); + saacproto.jencodecopy = (char*)calloc( 1, saacproto.workbufsize * 3 ); + saacproto.jencodeout = (char*)calloc( 1, saacproto.workbufsize * 3 ); + saacproto.compresswork = (char*)calloc( 1, saacproto.workbufsize * 3 ); + memset( saacproto.work , 0, saacproto.workbufsize ); + memset( saacproto.arraywork , 0, saacproto.workbufsize ); + memset( saacproto.escapework , 0, saacproto.workbufsize ); + memset( saacproto.val_str , 0, saacproto.workbufsize ); + memset( (char*)saacproto.token_list ,0, saacproto.workbufsize*sizeof(char**) ); + memset( saacproto.cryptwork , 0, saacproto.workbufsize*3 ); + memset( saacproto.jencodecopy , 0, saacproto.workbufsize*3 ); + memset( saacproto.jencodeout , 0, saacproto.workbufsize*3 ); + memset( saacproto.compresswork , 0, saacproto.workbufsize*3 ); + if( saacproto.work == NULL || + saacproto.arraywork == NULL || + saacproto.escapework == NULL || + saacproto.val_str == NULL || + saacproto.token_list == NULL || + saacproto.cryptwork == NULL || + saacproto.jencodecopy == NULL || + saacproto.jencodeout == NULL || + saacproto.compresswork == NULL ){ + free( saacproto.work);free( saacproto.val_str); + free( saacproto.escapework);free( saacproto.arraywork ); + free( saacproto.token_list);free( saacproto.cryptwork ); + free( saacproto.jencodecopy);free( saacproto.jencodeout ); + free( saacproto.compresswork ); + return -1; + } + return 0; +} + +int saacproto_StringRest() +{ + return 0; +/* free( saacproto.work); + saacproto.work = NULL; + saacproto.work = (char*)calloc( 1, saacproto.workbufsize ); + if( saacproto.work == NULL ) return -1; + return sizeof( saacproto.work); +*/ +} + +/********** + Get message information from a network input +**********/ +void saacproto_GetMessageInfo( int *id , char *funcname , int len, char **tk ) +{ + if( tk[0] == NULL || tk[1] == NULL ){ + *id = 0; + saacproto_strcpysafe( funcname , "" , len ); + return; + } + *id = strtoul( tk[0] ,NULL,10); + saacproto_strcpysafe( funcname , tk[1] , len ); + return; +} +/******************************************** + string utilities +*********************************************/ +void saacproto_strcpysafe( char *dest, char *src, int maxlen ) +{ + int i; + for(i=0;i (int)( saacproto.workbufsize*3-2) ){ + fprintf( stderr, "lsgen: badly configured work buflen\n" ); + exit(1); + } + if( (flag%2) == 1 ) flag ++; + saacproto.compresswork[0] = flag; + memcpy( saacproto.compresswork+1,src,srclen ); + compressed_l = srclen + 1; + } else { + if((flag%2)==0)flag++; + saacproto.compresswork[0] = flag; + compressed_l = saacproto_ringoCompressor( + (unsigned char*)saacproto.compresswork + 1 , + (long)saacproto.workbufsize*3 - 1, + (unsigned char*)src , + (long)strlen(src) ) + 1; /* be careful! */ + } + /* return empty line if error or buffer excess */ + if( compressed_l <= 0 ){ + saacproto_strcpysafe( out , "\n" , maxoutlen ); + return; + } + memcpy( saacproto.jencodecopy ,saacproto.compresswork ,compressed_l ); + saacproto_jEncode( saacproto.jencodecopy , compressed_l , JENCODE_KEY , + saacproto.jencodeout, &jencodedlen , saacproto.workbufsize*3 -1 ); + saacproto_encode64( (unsigned char*)saacproto.jencodeout , jencodedlen, (unsigned char*)out ); +} +/* translate code64 text to original lsrpc text */ +static void saacproto_decodeString( char *src , char *out ) +{ + int compressed_l =0, outlen64; + int l; + long decompressed_l = 0; + /* copy src to copybuffer because jencoder modifies the input buffer */ + l = strlen( src ); + if( src[l-1]=='\n' || src[l-1]=='\r' )src[l-1]=0; + if( src[l-2]=='\n' || src[l-2]=='\r' )src[l-2]=0; + outlen64 = saacproto_decode64( (unsigned char*)src , (unsigned char*)saacproto.jencodecopy ); + saacproto_jDecode( saacproto.jencodecopy , outlen64 , JENCODE_KEY, + saacproto.compresswork , &compressed_l); + /*out[outlen]=0; PENDING*/ + if( (saacproto.compresswork[0] % 2 ) == 0 ){ + if( compressed_l <= 0 ){ + decompressed_l = 0; + fprintf( stderr, "LSRPC: too short:[%s]\n", src ); + } else { + memcpy( out, saacproto.compresswork+1, compressed_l -1 ); + decompressed_l = compressed_l -1; + } + } else { + decompressed_l = + saacproto_ringoDecompressor( (unsigned char*)out , + (long)saacproto.workbufsize , + (unsigned char*)saacproto.compresswork+1 , + (long)compressed_l -1 ); + } + out[decompressed_l] = 0; +} +/* followings are taken from code64.c */ +char saacproto_charset[64]={ + 'A','B','C','D', 'E','F','G','H', + 'I','J','K','L', 'M','N','O','P', + 'Q','R','S','T', 'U','V','W','X', + 'Y','Z','a','b', 'c','d','e','f', + 'g','h','i','j', 'k','l','m','n', + 'o','p','q','r', 's','t','u','v', + 'w','x','y','z', '0','1','2','3', + '4','5','6','7', '8','9','+','-' +}; +char saacproto_reversecharset[256]={ + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,62, 0,63,0,0, + 52,53,54,55, 56,57,58,59, + 60,61,0,0, 0,0,0,0, + 0,0,1,2, 3,4,5,6, + 7,8,9,10, 11,12,13,14, + 15,16,17,18, 19,20,21,22, + 23,24,25,0, 0,0,0,0, + 0,26,27,28, 29,30,31,32, + 33,34,35,36, 37,38,39,40, + 41,42,43,44, 45,46,47,48, + 49,50,51,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0 +}; + +static void saacproto_encode64( unsigned char *in , int len , unsigned char *out ) +{ + int i; + int use_bytes; + int address = 0; + out[0] = 0; + for(i=0;;i+=3){ + unsigned char in1 , in2 , in3; + unsigned char out1 ,out2 , out3 , out4; + if( i >= len ) break; + if( i >= (len-1)){ /* the last letter ( to be thrown away ) */ + in1 = in[i] & 0xff; + in2 = in3 = 0; + use_bytes = 2; + } else if( i >= (len-2)){ /* the last 2 letters ( process only 1 byte)*/ + in1 = in[i] & 0xff; + in2 = in[i+1] & 0xff; + in3 = 0; + use_bytes = 3; + } else { /* there are more or equal than 3 letters */ + in1 = in[i] & 0xff; + in2 = in[i+1] & 0xff; + in3 = in[i+2] & 0xff; + use_bytes = 4; + } + out1 = ((in1 & 0xfc)>>2) & 0x3f; + out2 = ((in1 & 0x03)<<4) | ((( in2 & 0xf0)>>4)&0x0f); + out3 = ((in2 & 0x0f)<<2) | ((( in3 & 0xc0)>>6)&0x03); + out4 = (in3 & 0x3f ); + if( use_bytes >= 2 ){ + out[address++] = saacproto_charset[out1]; + out[address++] = saacproto_charset[out2]; + out[address]=0; + } + if( use_bytes >= 3 ){ + out[address++] = saacproto_charset[out3]; + out[address]=0; + } + if( use_bytes >= 4 ){ + out[address++] = saacproto_charset[out4]; + out[address]=0; + } + } +} +/* + * Decode it + * char *in : encoded ascii chars + * char *out : decoded( output) + * return value : output byte count + * + * note: no need to have bigger buffer. because output is to + * be smaller than input string size + */ +static int saacproto_decode64( unsigned char *in , unsigned char *out ) +{ + unsigned char in1 , in2 , in3 , in4; + unsigned char out1 , out2 , out3; + int use_bytes; + int address= 0; + int i; + for(i=0;;i+=4 ){ + if( in[i] == 0 ){ + break; + } else if( in[i+1] == 0 ){ /* the last letter */ + break; + } else if( in[i+2] == 0 ){ /* the last 2 letters */ + in1 = saacproto_reversecharset[in[i]]; + in2 = saacproto_reversecharset[in[i+1]]; + in3 = in4 = 0; + use_bytes = 1; + } else if( in[i+3] == 0 ){ /* the last 3 letters */ + in1 = saacproto_reversecharset[in[i]]; + in2 = saacproto_reversecharset[in[i+1]]; + in3 = saacproto_reversecharset[in[i+2]]; + in4 = 0; + use_bytes = 2; + } else { /* process 4 letters */ + in1 = saacproto_reversecharset[in[i]]; + in2 = saacproto_reversecharset[in[i+1]]; + in3 = saacproto_reversecharset[in[i+2]]; + in4 = saacproto_reversecharset[in[i+3]]; + use_bytes = 3; + } + out1 = (in1<<2) | (((in2 & 0x30)>>4)&0x0f) ; + out2 = ((in2 & 0x0f )<<4) | ((( in3 & 0x3c)>>2)&0x0f); + out3 = ( (in3 &0x03)<<6) | ( in4 & 0x3f ); + if( use_bytes >= 1 ){ + out[address++] = out1; + } + if( use_bytes >= 2 ){ + out[address++] = out2; + } + if( use_bytes >= 3 ){ + out[address++] = out3; + } + if( use_bytes != 3 ){ + break; + } + } + return address; +} + +/* followings are taken from Jencode.c by jun */ +static void saacproto_jEncode(char *src,int srclen,int key,char *encoded,int *encodedlen,int maxencodedlen) +{ + char sum=0; + int i; + if(srclen+1 > maxencodedlen){ + *encodedlen = maxencodedlen; + for(i=0;i<(*encodedlen);i++)encoded[i] = src[i]; + } + if(srclen+1 <= maxencodedlen){ + *encodedlen=srclen+1; + for(i=0;i i) encoded[i] = src[i] + sum*((i*i)%3); + if(abs((key%srclen)) == i) encoded[i] = sum; + if(abs((key%srclen)) < i) encoded[i] = src[i-1] + sum*((i*i)%7); + } + } +} +static void saacproto_jDecode(char *src,int srclen,int key,char *decoded,int *decodedlen) +{ + char sum=0; + int i; + *decodedlen=srclen-1; + if( *decodedlen == 0 ){ + return; /* return error if length is 0 */ + } + sum = src[abs(key%(*decodedlen))]; + for(i=0;i i) decoded[i] = src[i] - sum*((i*i)%3); + if(abs((key%(*decodedlen))) < i) decoded[i-1] = src[i] - sum*((i*i)%7); + } + for(i=0;i<(*decodedlen);i++){ + if(((key%7) == (i%5))||((key%2) == (i%2)))decoded[i] = ~decoded[i]; + } +} + +/*****************************************************************/ +/* Compress / Decompress routine */ +/*****************************************************************/ +#define B00000000 0 +#define B00000001 1 +#define B00000010 2 +#define B00000011 3 +#define B00000100 4 +#define B00000101 5 +#define B00000110 6 +#define B00000111 7 +#define B00001000 8 +#define B00001001 9 +#define B00001010 10 +#define B00001011 11 +#define B00001100 12 +#define B00001101 13 +#define B00001110 14 +#define B00001111 15 +#define B00010000 16 +#define B00010001 17 +#define B00010010 18 +#define B00010011 19 +#define B00010100 20 +#define B00010101 21 +#define B00010110 22 +#define B00010111 23 +#define B00011000 24 +#define B00011001 25 +#define B00011010 26 +#define B00011011 27 +#define B00011100 28 +#define B00011101 29 +#define B00011110 30 +#define B00011111 31 +#define B00100000 32 +#define B00100001 33 +#define B00100010 34 +#define B00100011 35 +#define B00100100 36 +#define B00100101 37 +#define B00100110 38 +#define B00100111 39 +#define B00101000 40 +#define B00101001 41 +#define B00101010 42 +#define B00101011 43 +#define B00101100 44 +#define B00101101 45 +#define B00101110 46 +#define B00101111 47 +#define B00110000 48 +#define B00110001 49 +#define B00110010 50 +#define B00110011 51 +#define B00110100 52 +#define B00110101 53 +#define B00110110 54 +#define B00110111 55 +#define B00111000 56 +#define B00111001 57 +#define B00111010 58 +#define B00111011 59 +#define B00111100 60 +#define B00111101 61 +#define B00111110 62 +#define B00111111 63 +#define B01000000 64 +#define B01000001 65 +#define B01000010 66 +#define B01000011 67 +#define B01000100 68 +#define B01000101 69 +#define B01000110 70 +#define B01000111 71 +#define B01001000 72 +#define B01001001 73 +#define B01001010 74 +#define B01001011 75 +#define B01001100 76 +#define B01001101 77 +#define B01001110 78 +#define B01001111 79 +#define B01010000 80 +#define B01010001 81 +#define B01010010 82 +#define B01010011 83 +#define B01010100 84 +#define B01010101 85 +#define B01010110 86 +#define B01010111 87 +#define B01011000 88 +#define B01011001 89 +#define B01011010 90 +#define B01011011 91 +#define B01011100 92 +#define B01011101 93 +#define B01011110 94 +#define B01011111 95 +#define B01100000 96 +#define B01100001 97 +#define B01100010 98 +#define B01100011 99 +#define B01100100 100 +#define B01100101 101 +#define B01100110 102 +#define B01100111 103 +#define B01101000 104 +#define B01101001 105 +#define B01101010 106 +#define B01101011 107 +#define B01101100 108 +#define B01101101 109 +#define B01101110 110 +#define B01101111 111 +#define B01110000 112 +#define B01110001 113 +#define B01110010 114 +#define B01110011 115 +#define B01110100 116 +#define B01110101 117 +#define B01110110 118 +#define B01110111 119 +#define B01111000 120 +#define B01111001 121 +#define B01111010 122 +#define B01111011 123 +#define B01111100 124 +#define B01111101 125 +#define B01111110 126 +#define B01111111 127 +#define B10000000 128 +#define B10000001 129 +#define B10000010 130 +#define B10000011 131 +#define B10000100 132 +#define B10000101 133 +#define B10000110 134 +#define B10000111 135 +#define B10001000 136 +#define B10001001 137 +#define B10001010 138 +#define B10001011 139 +#define B10001100 140 +#define B10001101 141 +#define B10001110 142 +#define B10001111 143 +#define B10010000 144 +#define B10010001 145 +#define B10010010 146 +#define B10010011 147 +#define B10010100 148 +#define B10010101 149 +#define B10010110 150 +#define B10010111 151 +#define B10011000 152 +#define B10011001 153 +#define B10011010 154 +#define B10011011 155 +#define B10011100 156 +#define B10011101 157 +#define B10011110 158 +#define B10011111 159 +#define B10100000 160 +#define B10100001 161 +#define B10100010 162 +#define B10100011 163 +#define B10100100 164 +#define B10100101 165 +#define B10100110 166 +#define B10100111 167 +#define B10101000 168 +#define B10101001 169 +#define B10101010 170 +#define B10101011 171 +#define B10101100 172 +#define B10101101 173 +#define B10101110 174 +#define B10101111 175 +#define B10110000 176 +#define B10110001 177 +#define B10110010 178 +#define B10110011 179 +#define B10110100 180 +#define B10110101 181 +#define B10110110 182 +#define B10110111 183 +#define B10111000 184 +#define B10111001 185 +#define B10111010 186 +#define B10111011 187 +#define B10111100 188 +#define B10111101 189 +#define B10111110 190 +#define B10111111 191 +#define B11000000 192 +#define B11000001 193 +#define B11000010 194 +#define B11000011 195 +#define B11000100 196 +#define B11000101 197 +#define B11000110 198 +#define B11000111 199 +#define B11001000 200 +#define B11001001 201 +#define B11001010 202 +#define B11001011 203 +#define B11001100 204 +#define B11001101 205 +#define B11001110 206 +#define B11001111 207 +#define B11010000 208 +#define B11010001 209 +#define B11010010 210 +#define B11010011 211 +#define B11010100 212 +#define B11010101 213 +#define B11010110 214 +#define B11010111 215 +#define B11011000 216 +#define B11011001 217 +#define B11011010 218 +#define B11011011 219 +#define B11011100 220 +#define B11011101 221 +#define B11011110 222 +#define B11011111 223 +#define B11100000 224 +#define B11100001 225 +#define B11100010 226 +#define B11100011 227 +#define B11100100 228 +#define B11100101 229 +#define B11100110 230 +#define B11100111 231 +#define B11101000 232 +#define B11101001 233 +#define B11101010 234 +#define B11101011 235 +#define B11101100 236 +#define B11101101 237 +#define B11101110 238 +#define B11101111 239 +#define B11110000 240 +#define B11110001 241 +#define B11110010 242 +#define B11110011 243 +#define B11110100 244 +#define B11110101 245 +#define B11110110 246 +#define B11110111 247 +#define B11111000 248 +#define B11111001 249 +#define B11111010 250 +#define B11111011 251 +#define B11111100 252 +#define B11111101 253 +#define B11111110 254 +#define B11111111 255 +/* masks for first byte ( write )*/ +int saacproto_modifymask_first[8][9]={ + {0, B00000001,B00000011,B00000111,B00001111,B00011111,B00111111,B01111111,B11111111},/* mod 0*/ + {0, B00000011,B00000111,B00001111,B00011111,B00111111,B01111111,B11111111,B11111111},/* mod 1*/ + {0, B00000111,B00001111,B00011111,B00111111,B01111111,B11111111,B11111111,B11111111},/* mod 2*/ + {0, B00001111,B00011111,B00111111,B01111111,B11111111,B11111111,B11111111,B11111111},/* mod 3*/ + {0, B00011111,B00111111,B01111111,B11111111,B11111111,B11111111,B11111111,B11111111},/* mod 4*/ + {0, B00111111,B01111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111},/* mod 5*/ + {0, B01111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111},/* mod 6*/ + {0, B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111},/* mod 7*/ +}; +/* masks for second byte ( write ) */ +int saacproto_modifymask_second[8][9]={ + {0, B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000},/* mod 0 */ + {0, B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001},/* mod 1 */ + {0, B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B00000011},/* mod 2 */ + {0, B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B00000011,B00000111},/* mod 3 */ + {0, B00000000,B00000000,B00000000,B00000000,B00000001,B00000011,B00000111,B00001111},/* mod 4 */ + {0, B00000000,B00000000,B00000000,B00000001,B00000011,B00000111,B00001111,B00011111},/* mod 5 */ + {0, B00000000,B00000000,B00000001,B00000011,B00000111,B00001111,B00011111,B00111111},/* mod 6 */ + {0, B00000000,B00000001,B00000011,B00000111,B00001111,B00011111,B00111111,B01111111},/* mod 7 */ +}; +/* + * used by bitstream routines + */ +int bitstream_maxbyte, bitstream_bitaddr ; +char *bitstream_buf; +/* initialize bitstream for output */ +static int initOutputBitStream( char *buf ,int buflen) +{ + bitstream_bitaddr = 0; + bitstream_maxbyte = buflen; + bitstream_buf = buf; + memset( buf,0, buflen); + return 0; +} +/* initialize bitstream for input */ +static int initInputBitStream( char *buf , int buflen) +{ + bitstream_bitaddr = 0; + bitstream_maxbyte = buflen; + bitstream_buf = buf; + return 0; +} +/* + * read from bit stream. used only from 1 bit to 8 bits + * this is a base routine + */ +static unsigned int readInputBitStreamBody( int bwidth ) +{ + int mod = bitstream_bitaddr % 8; + int byteaddr = bitstream_bitaddr / 8; + /* return if excess */ + if( byteaddr >= bitstream_maxbyte)return 0; + if( bwidth >= 1 && bwidth <= 8){ + int b1 = (( bitstream_buf[byteaddr] & saacproto_modifymask_first[mod][bwidth] )>>mod); + int b2 = (( bitstream_buf[byteaddr+1] & saacproto_modifymask_second[mod][bwidth])<<(8-mod)); + bitstream_bitaddr += bwidth; + return b1 | b2; + } else { + return 0; + } +} +/* + * read from bit stream. used from 1 bit to 32 bits + * + */ +static unsigned int readInputBitStream( int bwidth ) +{ + if( bwidth <= 0 ){ + return 0; + } else if( bwidth >= 1 && bwidth <= 8 ){ + return readInputBitStreamBody( bwidth ); + } else if( bwidth >= 9 && bwidth <= 16 ){ + unsigned int first = readInputBitStreamBody(8); + unsigned int second = readInputBitStreamBody( bwidth-8); + return first + (second << 8 ); + } else if( bwidth >= 17 && bwidth <= 24 ){ + unsigned int first = readInputBitStreamBody(8); + unsigned int second = readInputBitStreamBody(8); + unsigned int third = readInputBitStreamBody(bwidth-8); + return first + ( second << 8 ) + ( third << 16 ); + } else if( bwidth >= 25 && bwidth <= 32 ){ + unsigned int first = readInputBitStreamBody(8); + unsigned int second = readInputBitStreamBody(8); + unsigned int third = readInputBitStreamBody(8); + unsigned int forth = readInputBitStreamBody(bwidth-8); + return first + ( second << 8 ) + ( third << 16 ) + ( forth << 24 ); + } + return 0; +} +/* + * write to a bitstream. only used from 1 bit to 8 bits + * this is a base routine. + */ +static int writeOutputBitStreamBody( int bwidth , unsigned char b) +{ + int mod = bitstream_bitaddr % 8; + int byteaddr = bitstream_bitaddr / 8; + /* return error if excess */ + if( bitstream_maxbyte <= (byteaddr+1)) return -1; + bitstream_buf[byteaddr] &= saacproto_modifymask_first[mod][bwidth]; + bitstream_buf[byteaddr] |= (b << mod) & saacproto_modifymask_first[mod][bwidth]; + bitstream_buf[byteaddr+1] &= saacproto_modifymask_second[mod][bwidth]; + bitstream_buf[byteaddr+1] |= (b>>(8-mod))& saacproto_modifymask_second[mod][bwidth]; + bitstream_bitaddr += bwidth; + return byteaddr+1; +} +/* + * write to a bitstream. used from 1 bits to 32 bits + * returns -1 if error or buffer excession + */ +static int writeOutputBitStream( int bwidth, unsigned int dat) +{ + int ret; + if( bwidth <= 0){ + return -1; + } else if( bwidth >= 1 && bwidth <= 8 ){ + if((ret=writeOutputBitStreamBody( bwidth , (unsigned char)dat))<0)return -1; + } else if( bwidth > 8 && bwidth <= 16 ){ + if(writeOutputBitStreamBody( 8 , (unsigned char)(dat&0xff))<0)return -1; + if((ret=writeOutputBitStreamBody( bwidth - 8 , ( unsigned char)((dat>>8)&0xff)))<0)return -1; + } else if( bwidth > 16 && bwidth <= 24 ){ + if(writeOutputBitStreamBody( 8 , (unsigned char)(dat&0xff))<0)return -1; + if(writeOutputBitStreamBody( 8 , (unsigned char)((dat>>8)&0xff))<0)return -1; + if((ret=writeOutputBitStreamBody( bwidth-16,(unsigned char)((dat>>16)&0xff)))<0)return -1; + } else if( bwidth > 24 && bwidth <= 32 ){ + if(writeOutputBitStreamBody( 8 , (unsigned char)(dat&0xff))<0)return -1; + if(writeOutputBitStreamBody( 8 , (unsigned char)((dat>>8)&0xff))<0)return -1; + if(writeOutputBitStreamBody( 8 , (unsigned char)((dat>>16)&0xff))<0)return -1; + if((ret=writeOutputBitStreamBody( bwidth-24,(unsigned char)((dat>>24)&0xff)))<0)return -1; + } else { + return -1; + } + return ret; +} +#define CHAR_SIZE 256 +#define NODE_SIZE 512 +#define BITS_LEN 9 /* 9 bit lzw compression */ +typedef struct { + unsigned char chr; + int parent; + int brother; + int child; +}NODE; +long saacproto_ringoCompressor( unsigned char *code , long codelen , + unsigned char *text , long textlen) +{ + NODE node[NODE_SIZE]; + int freeNode; + int w,k; /* used in this algo */ + int textind; /* index to text buffer */ + int i; + int position = 0; /* indicates the last byte of code buffer */ + if( textlen <= 0 ) return -1; + initOutputBitStream((char*) code,codelen); + /* fill characters ( 0 ~ 255 ) in the beggining part of + Node list */ + for(i=0; i<= CHAR_SIZE; i++){ + node[i].chr = (unsigned char)i; + node[i].brother = i + 1; + node[i].parent = 0; + node[i].child = 0; + } + node[CHAR_SIZE].brother = 0; + freeNode = CHAR_SIZE + 1; + w = text[0]; + textind = 1; + while(1){ + int rv; + if( textind >= textlen ){ + k = CHAR_SIZE; /* indicates EOF */ + } else { + k = text[textind]; + } + /* search if pattern 'wk' is registered or not. */ + rv = node[w].child; + while(1){ + if( rv <= 0 ) break; + if( node[rv].chr == k ) break; + rv = node[rv].brother; + } + if( rv > 0 ){ + /* found it */ + w = rv; + } else { + position = writeOutputBitStream( BITS_LEN ,w ); + /* return if buffer excession */ + if( position > codelen ) return -1; + /* register pattern 'wk' in the dictionary */ + if( freeNode < NODE_SIZE ){ + node[freeNode].parent = w; + node[freeNode].chr = k; + node[freeNode].brother = node[w].child; + node[freeNode].child = 0; + node[w].child = freeNode; + freeNode++; + } + w = k; + } + if( textind == ( textlen + 1 ) ) break; + textind++; + } + return position; +} + +/* + * Decoder. + * return -1 if buffer excession. Notice buffer text + * is modified . + */ +long saacproto_ringoDecompressor( unsigned char *text , long textlen , + unsigned char *code , long codelen) +{ + NODE node[NODE_SIZE]; + int stack[NODE_SIZE]; + int sp; + int freeNode; + int len; + int i; + int k = 0; + int w = 0; + if( codelen <= 0 ) return -1; + initInputBitStream( (char*)code , codelen ); + for(i=0;i= freeNode ){ + stack[sp++] = k; /* exception */ + if( sp >=( sizeof( stack ) /sizeof(stack[0] )) )return -1; + k = w; + } else { + k = rv; + } + while(k> CHAR_SIZE ){ + if( k >= (sizeof(node)/sizeof(node[0]))) return -1; + stack[sp++] = node[k].chr; + k = node[k].parent; + if( sp >=( sizeof( stack ) /sizeof(stack[0] )) ) return -1; + } + stack[sp++] = k; + if( sp >= ( sizeof( stack ) /sizeof(stack[0] )) ) return -1; + /* output to text buffer from stack.*/ + while(sp){ + if( ++len > textlen ) return -1; + *text++ = stack[--sp]; + } + /* register the pattern 'wk'*/ + if( len > 1 && freeNode < NODE_SIZE ){ + node[freeNode].parent = w; + node[freeNode].chr = k; + if( w >= (sizeof(node)/sizeof(node[0])))return -1; + node[freeNode].brother = node[w].child; + node[freeNode].child = 0; + node[w].child = freeNode; + freeNode++; + } + w = rv; + } + return len; +} +#endif /* ifdef saacproto__ENCRYPT */ + +/* Convert 62-base digits to 10 digits */ +int saacproto_a62toi( char *a ) +{ + int ret = 0; + int minus ; + if( a[0] == '-' ){ + minus = -1; + a++; + } else { + minus = 1; + } + + while( *a != '\0' ) + { + ret *= 62; + if( '0' <= (*a) && (*a) <= '9' ) + ret += (*a)-'0'; + else + if( 'a' <= (*a) && (*a) <= 'z' ) + ret += (*a)-'a'+10; + else + if( 'A' <= (*a) && (*a) <= 'Z' ) + ret += (*a)-'A'+36; + else + return 0; + a++; + } + return ret * minus; +} + +/* Convert 10-base digits into 62-base digits. */ +char *saacproto_cnv10to62( int a, char *out, int outlen ) +{ + int i, j; + char base[] = { "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"}; + int tmp[64]; + int src; + int minus; + int baselen = sizeof( base)-1; + if( a < 0 ){ + minus = 1; + a *= -1; + } else { + minus = 0; + } + /* special case */ + if( a < baselen) { + if( minus ){ + *(out) = '-'; + *(out+1) = base[a]; + *(out+2) = '\0'; + return (out); + } else { + *out = base[a]; + *(out+1) = '\0'; + return( out); + } + } + src = a; + for( i = 0; src >= baselen; i ++ ) { + tmp[i] = src % baselen; + src /= baselen; + } + i--; + if( minus ){ + *out = '-'; + *(out+1) = base[src]; + for( j = 2; i >= 0; i --, j ++ ) { + if( j > outlen - 2 ) return NULL; + *(out+j) = base[tmp[i]]; + } + } else { + *out = base[src]; + for( j = 1; i >= 0; i --, j ++ ) { + if( j > outlen - 2 ) return NULL; + *(out+j) = base[tmp[i]]; + } + } + *(out+j) = '\0'; + return( out); +} diff --git a/gmsv/util.c b/gmsv/util.c new file mode 100644 index 0000000..071e189 --- /dev/null +++ b/gmsv/util.c @@ -0,0 +1,1758 @@ +#include "version.h" +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "common.h" +#include "util.h" +#include "configfile.h" + +#define IS_2BYTEWORD( _a_ ) ( (char)(0x80) <= (_a_) && (_a_) <= (char)(0xFF) ) + +/*----------------------------------------- + 仃勾及荼垫毛仇欠允 + 娄醒“ 手午及 侬 [ 涛 凳今木月冗 + + windows , macintosh , unix及升及垫手覆杀匹五月[ + + windows : \r\n + macintosh : \n\r + unix : \n + + 分匀凶井卅 + macintosh : \r + 匹允[ + 公木午仇及皿夫弘仿丞分午仃勾及 侬元扎卅仁化手 + 荼垫壅允仃升中中氏匹允井 + -----------------------------------------*/ +void chompex( char *buf ) +{ + while( *buf ){ + if( *buf == '\r' || *buf == '\n' ){ + *buf='\0'; + } + buf++; + } +} + + + +/*---------------------------------------- + * 仃勾及1 侬毛潸曰轮仁 + * 娄醒 + * src 凳允月 侬 + ----------------------------------------*/ +void chop( char* src ) +{ + /* + * 凶分凶氏卞 及 侬毛潸曰轮仁 + */ + int length = strlen( src ); + if( length == 0 ) return; + src[length-1] = '\0'; +} + + +/*---------------------------------------- + * 仃勾及 侬毛潸月[公及 侬毛 醒隙烂匹五月[ + * 娄醒 + * src 葭及 侬 + * delim 绰轮允月 侬及 [ 反NULL 侬匹蔽匀化中月仪 + ----------------------------------------*/ +void dchop( char* src , char* del) +{ + int dellen, srclen; + int i; + BOOL delete=FALSE; + + /* + * src及 欠井日譬屯化中仁[1 侬卞勾五 del 允屯化毛伙□皿仄化 + * 域谯允木壬壅允[公仄化戚及 侬卞中仁[ + */ + + srclen = strlen( src ); + dellen = strlen( del ); + if( srclen == 0 || dellen == 0 ) return; + + for( i = 0 ; i < dellen ; i ++ ){ + if( src[srclen-1] == del[i] ){ + delete = TRUE; + break; + } + } + + /* 濠曰潸曰 */ + if( delete )src[srclen - 1] = '\0'; +} + + +/*---------------------------------------- + * dchop及菅[ 赓及 侬毛潸月[公及 侬毛 醒隙烂匹五月[ + * 娄醒 + * src 葭及 侬 + * delim 绰轮允月 侬及 [ 反NULL 侬匹蔽匀化中月仪 + ----------------------------------------*/ +void pohcd( char* src , char* del) +{ + int dellen, srclen; + int i; + BOOL delete=FALSE; + + /* + * src及蟆井日譬屯化中仁[1 侬卞勾五 del 允屯化毛伙□皿仄化 + * 域谯允木壬壅允[公仄化戚及 侬卞中仁[ + */ + + srclen = strlen( src ); + dellen = strlen( del ); + if( srclen == 0 || dellen == 0 ) return; + + for( i = 0 ; i < dellen ; i ++ ){ + if( src[0] == del[i] ){ + delete = TRUE; + break; + } + } + + /* 绰轮 */ + if( delete ) + /* 仇及戊疋□匹 NULL 侬手戊疋□今木月 */ + for( i = 0 ; i < srclen ; i ++ ) + src[i] = src[i+1]; +} + + +/*---------------------------------------- + * 侬 卞 侬互殖引木化中月井升丹井譬屯月[ + * 娄醒 + * src char* 譬屯月 侬 + * include char* 殖引木化中月井升丹井及 侬 [ + * 忒曰袄 + * 岳 赓卞殖引木化中凶src及桦赭 + * 撩 -1 + ----------------------------------------*/ +int charInclude( char* src, char* include ) +{ + int i,j; + int srclen,includelen; + + srclen = strlen( src ); + includelen = strlen( include ); + + for( i = 0 ; i < srclen ; i ++ ){ + for( j = 0 ; j < includelen ; j ++ ) + if( src[i] == include[j] ) + return i; + } + return -1; +} + + +/*------------------------------------------------------------ + * EUC及2田奶玄 分仃毛戊疋□仄卅中strncpy + * freeBSD 及仿奶皮仿伉井日 strncpy 毛潸匀化五化} + * 公木毛手午卞荼瞻[*dest++ 午井银中凶中仃升}瑛宁赐辆卞愤褥互 + * 卅中及匹}银匀化中卅中[井歹曰卞 分仃升}禾奶件正手银匀化化 + * 井卅曰 卅皿夫弘仿丞 + * 娄醒 + * dest char* 戊疋□燮 + * src char* 末□旦 + * n size_t 赢今 + * 忒曰袄 + * dest + ------------------------------------------------------------*/ +char* strncpy2( char* dest, const char* src, size_t n ) +{ + if( n > 0 ){ + char* d = dest; + const char* s = src; + int i; + for( i=0; i=n ){ + *(d+i-1)='\0'; + break; + } + *(d+i) = *(s+i); + }else + *(d+i) = *(s+i); + } + } + return dest; +} + +/*---------------------------------------- + * src 井日 dest 卞戊疋□允月[ 戊疋□燮及扔奶术毛譬屯月[ + * 娄醒 + * dest 戊疋□燮 + * n 扔奶术 + * src 葭及 侬 + ----------------------------------------*/ +void strcpysafe( char* dest ,size_t n ,const char* src ) +{ + /* + * src 井日 dest 尺戊疋□允月. + * strcpy, strncpy 匹反 dest 方曰 戊疋□允月汹互 + * 五中凛卞裟少午,丢乒伉陆失弁本旦互粟月. + * 仇木毛 什啃卞, strncpy 互丐月互 strlen( src ) 互 n 方曰 + * 五中凛卞反, dest 及 互 NULL 侬午反卅日卅中. + * + * 仄凶互匀化 dest 及 五今方曰 src 及幻丹互赢中凛卞反 + * n-1 匹 strncpy 毛允月. 凝今中凛反公及引引戊疋□允月 + * + * n 互 及凛反云井仄仁卅月及匹 及凛反 窒手仄卅中[ + * + */ + // Nuke +1 (08/25): Danger if src=0 + if (!src) { + *dest = '\0'; + return; + } + if( n <= 0 ) /* 窒手仄卅中 */ + return; + + /* 仇及凛鳔匹} n >= 1 动晓互瑁烂 */ + /* NULL 侬毛哔 仄化 胜允月 */ + else if( n < strlen( src ) + 1 ){ + /* + * 田永白央互箫曰卅中及匹 n - 1(NULL 侬) + * 匹 strncpy 毛裟少 + */ + strncpy2( dest , src , n-1 ); + dest[n-1]='\0'; + }else + strcpy( dest , src ); + +} + +/*---------------------------------------- + * src 井日 length 掏允[ 戊疋□燮及 五今毛譬屯月[ + * 娄醒 + * dest 戊疋□燮 + * n 戊疋□燮及扔奶术 + * src 戊疋□葭 + * length 窒 侬戊疋□允月井 + ----------------------------------------*/ +void strncpysafe( char* dest , const size_t n , + const char* src ,const int length ) +{ + /* + * src 井日 dest 卞 length 戊疋□允月 + * strcpy, strncpy 匹反 dest 方曰 戊疋□允月汹互 + * 五中凛卞裟少午,丢乒伉陆失弁本旦互粟月. + * 仇及楮醒匹反}strlen( src ) 午 length 及凝今中幻丹 + * ( 端卞戊疋□允月汹) 午 dest 及扔奶术毛 屯化} + * strcpysafe 午 元仪毛允月[ + */ + + int Short; + Short = min( strlen( src ) , length ); + + /* NULL 侬 毛哔 仄凶 胜 */ + if( n < Short + 1 ){ + /* + * 田永白央互箫曰卅中及匹 n - 1(NULL 侬) + * 匹 strncpy 毛裟少 + */ + strncpy2( dest , src , n-1 ); + dest[n-1]='\0'; + + }else if( n <= 0 ){ + return; + }else{ + /* + * 田永白央反蜗坌卞丐月及匹 Short 匹strncpy毛裟少 + * 卅云 src 卞反 Short 及赢今 卞 NULL 互卅中及匹} + * dest 卞反 馨笛仄化云仁[ + */ + + strncpy2( dest , src , Short ); + dest[Short]= '\0'; + + } +} + +/*------------------------------------------------------------ + * strcat毛兜蝈卞 蜇允月[赞中及匹} 卅桦宁毛轮中化银歹卅中仪[ + * 娄醒 + * src char* 葭卞卅月 侬 + * size int src 及扔奶术( 欠卞升木分仃酸匀化中月井匹反 + * 卅仁化田永白央蝈 ) + * ap char* 尥仃笛尹月 + * 忒曰袄 + * src ( 木阂迕) + ------------------------------------------------------------*/ +char* strcatsafe( char* src, int size, char* ap ) +{ + strcpysafe( src + strlen( src ) , size - strlen(src), ap ); + return src; +} + +/*---------------------------------------- + * 侬 及 毛 胜允月[ 元井升丹井仄井 烂仄卅中 by ringo + * char *s1 , *s2 : 胜允月 侬 + * 忒曰袄 + * 0 “ 云卅元 + * 1 : 仇午卅月 + * 仇木反NPC及 平旦玄荸 卞支仁分勾[ + ----------------------------------------*/ +int strcmptail( char *s1 , char *s2 ) +{ + int i; + int len1 = strlen( s1 ); + int len2 = strlen( s2 ); + + for(i=0;;i++){ + int ind1 = len1 - 1 - i; + int ind2 = len2 - 1 - i; + if( ind1 < 0 || ind2 < 0 ) return 0; + if( s1[ind1] != s2[ind2] ) return 1; + } +} + + + +/*---------------------------------------- + * 侬 及 卞踏井木化中月帮醒毛必永玄允月[ + * NPC及 平旦玄荸 卞支仁分勾[ + * 凶分仄 卞中日氏 侬互丐月桦宁 骰允月[ + * 耨痊互 切卅中失伙打伉术丞卞 凳[ + * 娄醒 + * hoge char* 荸 允月 侬 + * 忒曰袄 + * 荸 仄凶帮醒[ + * + * “ + * "ringo ( 吧噗吧噗星人 ) : 100" + * 及桦宁反100互井尹月[ + * "ringo ( 吧噗吧噗星人 ) : 是100" + * 手100卞卅月[幻氏引卞NPC迕卅曰友[ + ----------------------------------------*/ +#define DECIMALCHARNUM 10 +#define FIGURECHARNUM 3 +#define SPECIALCHARNUM 2 +char *UTIL_decimalchar[DECIMALCHARNUM] = {"0","1","2", + "3", "4","5", + "6","7","8","9"}; +char *UTIL_figurechar[FIGURECHARNUM] = {"","",""}; +char *UTIL_specialchar[SPECIALCHARNUM] = {"",""}; + +/* + * 侬 井日}醒袄毛 允午 歹木月 坌毛 五请允[燮 及幻丹井日 + * 茧仄化 五请允[euc迕[ + * + * : in "这本书七万册300美金吗?" + * out "7万" + * 娄醒 + * char *in: 侬 + * char *out:请 侬 + * int outsiz:请 侬 及田永白央扔奶术 + * 忒曰袄 + * 醒袄毛 允 坌互丐匀凶日公及 侬 及赢今}卅井匀凶日ㄟ + */ +static int findNumberString( char *in, char *out, int outsiz ) +{ + int len,i,j,k, findflag, numstrflag; + char tmp[3]; + + len = strlen(in); + if( len == 0 ) return 0; + + numstrflag=0; + findflag = 0; + for( i=0,j=0;in[i]!='\0'&& j 0x7fffffff ) return 0x7fffffff; + else return (int)val; + +} + + +/* + * 挚匹 仄凶醒袄毛帮醒卞 晶 + * char *str 醒袄毛 允 侬 + * 忒曰袄 醒袄 + * + * str互"一亿4千万?"及午五忒曰袄 140000000 + */ +int kanjistrToInt( char *str ) +{ + double val,tmpval; + char tmp[3]; + int num,i,j,numflag; + + numflag = 0; + num = 1; + tmpval = 0; + val = 0; + for( i=0;str[i]!='\0';i++ ){ + if( str[i] & 0x80 ){ + tmp[0] = str[i]; + tmp[1] = str[i+1]; + tmp[2] = '\0'; + i++; + }else{ + tmp[0] = str[i]; + tmp[1] = '\0'; + } + for( j=0;j 0x7fffffff ) return 0x7fffffff; + else return (int)val; + +} + + + +/*---------------------------------------- + * 侬 及 卞踏井木化中月帮醒毛必永玄允月[ + * NPC及 平旦玄荸 卞支仁分勾[ + * 凶分仄 卞中日氏 侬互丐月桦宁 骰允月[ + * 耨痊互 切卅中失伙打伉术丞卞 凳[ + * 娄醒 + * hoge char* 荸 允月 侬 + * 忒曰袄 + * 荸 仄凶帮醒[ + * + * “ + * "ringo ( 吧噗吧噗星人 ) : 100" + * 及桦宁反100互井尹月[ + * "ringo ( 吧噗吧噗星人 ) : 是100" + * 手100卞卅月[幻氏引卞NPC迕卅曰友[ + ----------------------------------------*/ +int texttoiTail( char *hoge) +{ + return 0; /* 壬什匀化凶及匹仇丹仄凶[公及丹切楮醒仍午壅允[ */ + + +#if 0 + int len = strlen(hoge); + + if( len == 0 )return atoi(hoge); + /* 井日茧仄化 赓卞醒侬毛苇勾仃月 */ + while(--len && len >= 0){ + if( isdigit(hoge[len]) ) + break; + } + while( --len && len >= 0 ){ + if( !isdigit(hoge[len]) ) + break; + if( hoge[len]=='+' || hoge[len]=='-') + break; + } + return atoi(hoge+len+1); +#endif +#if 0 + int f = 0; + for(i=len-1;i>=0;i--){ + if( isdigit( hoge[i] ) ) f = 1; + if( (f == 1) + && !( isdigit(hoge[i]) || hoge[i]=='+' || hoge[i]=='-') ){ + return atoi( hoge + i + 1 ); + } + } + return atoi(hoge); +#endif +} + +/*---------------------------------------- + * 侬 毛醒侬井升丹井民尼永弁仄化}醒侬分匀凶日 + * 娄醒卞 木化忒允 + * 娄醒 + * arg 晶葭 + * number 晶 毛医 允月赭 + * base 湘醒 + * type 娄醒及滇( CTYPE 反 common.h 卞烛蜕今木化中月 ) + * 忒曰袄 + * TRUE(1) 岳 + * FALSE(0) strtol互敦僬卞反岳 仄卅井匀凶 + * 仇及凛及number反strtol及忒曰袄匹丐月 + ----------------------------------------*/ +BOOL strtolchecknum( char* arg , void* number,int base ,CTYPE type) +{ + char* buf; + int num; + + num = strtol( arg, &buf, base); + + switch( type ){ + case CHAR: + *(char*)number = (char)num; + break; + case SHORT: + *(short*)number = (short)num; + break; + case INT: + *(int*)number = num; + break; + case DOUBLE: + *(double*)number = (double)num; + break; + default: + break; + } + + + if( strlen( buf ) >= 1 ) + /* + * 酸曰 侬互丐月午中丹仪反 晶仄五木化卅中午中丹仪卅及分[ + */ + return FALSE; + + return TRUE; + +} + + + + +/*---------------------------------------- + * src 井日 dels 匹隙烂仄凶 侬毛潸曰轮仁 + * 田永弁旦仿永扑亘反巨旦弗□皿匹丐月仪卞镗啦[ + * 勾引曰田永弁旦仿永扑亘反绰轮匹五卅中[ + * 娄醒 + * src 凳今木月 侬 + * char* 绰轮允月 侬( 侬 匹隙烂第) + * 忒曰袄 + * 卅仄 + ----------------------------------------*/ +void deleteCharFromString( char* src , char* dels ) +{ + int index=0; /* 匹五丐互曰及 侬 匹及 index */ + int delength; /* dels 及赢今毛涩烂允月(剂仄反簧蘸失永皿及啃 */ + int i=0,j;/* i 反 src 毛伙□皿允月 醒 j 反 dels 毛伙□皿允月 醒 */ + + delength= strlen( dels ); + + while( src[i] != '\0' ){ + if( src[i] == BACKSLASH ) + /* + * 田永弁旦仿永扑亘卅及匹巨旦弗□皿允月 + * 勾引曰戚及 侬反 椭瘀卞啖 允月 + */ + src[index++] = src[++i]; /* substitute next char */ + + else{ + for( j = 0 ; j < delength ; j ++ ){ + if( src[i] == dels[j] ) + /* + * 绰轮允月 侬分[方匀化 i 卞 1 毛凶允 + */ + goto incrementi; + } + /* + * 壅允 卞隙烂今木化中卅中及匹戊疋□允月[ + */ + src[index++] = src[i]; + } + incrementi: + i++; + } + + src[index] = '\0'; +} + + + +/*---------------------------------------- + * src 井日 dels 匹隙烂仄凶 侬毛潸曰轮仁 + * 巨旦弗□皿反卅中 + * 娄醒 + * src 凳今木月 侬 + * char* 绰轮允月 侬( 侬 匹隙烂第) + * 忒曰袄 + * 卅仄 + ----------------------------------------*/ +void deleteCharFromStringNoEscape( char* src , char* dels ) +{ + int index=0; /* 匹五丐互曰及 侬 匹及 index */ + int delength; /* dels 及赢今毛涩烂允月(剂仄反簧蘸失永皿及啃 */ + int i=0,j;/* i 反 src 毛伙□皿允月 醒 j 反 dels 毛伙□皿允月 醒 */ + + delength= strlen( dels ); + + while( src[i] != '\0' ){ + for( j = 0 ; j < delength ; j ++ ){ + if( src[i] == dels[j] ) + /* + * 绰轮允月 侬分[方匀化 i 卞 1 毛凶允 + */ + goto incrementi; + } + /* + * 壅允 卞隙烂今木化中卅中及匹戊疋□允月[ + */ + src[index++] = src[i]; + incrementi: + i++; + } + + src[index] = '\0'; +} + +/*------------------------------------------------------------ + * 隙烂今木凶 侬毛隙烂今木凶 侬匹 五井尹月 + * 娄醒 + * src char* 凳今木月 侬 + * oldc char 凳今木月 侬 + * newc char 凳允月 侬 + * 忒曰袄 + * src + ------------------------------------------------------------*/ +char* replaceString( char* src, char oldc ,char newc ) +{ + char* cp=src; + + do{ + if( *cp == oldc ) *cp=newc; + }while( *cp++ ); + return src; +} + +typedef struct tagEscapeChar +{ + char escapechar; + char escapedchar; +}EscapeChar; +static EscapeChar escapeChar[]= +{ + { '\n', 'n' }, + { ',', 'c' }, + { '|', 'z' }, + { '\\', 'y' }, +}; + + +char makeCharFromEscaped( char c )//add this function,because the second had it +{ + int i; + + for( i = 0; i < sizeof( escapeChar )/sizeof( escapeChar[0] ); i++ ) + { + if( escapeChar[i].escapedchar == c ) + { + c = escapeChar[i].escapechar; + break; + } + } + return c; +} +/*---------------------------------------- + * makeEscapeString匹综岳今木凶 侬 毛葭卞 允 + * 娄醒 + * src char* 葭卞卅月 侬 [仇木互踏五赘月[ + * 忒曰袄 + * src 毛忒允[(楮醒毛 木仇卞仄支允中方丹卞) + ----------------------------------------*/ +char *makeStringFromEscaped( char* src ) +{//ttom this function all change,beside copy from the second + + int i; + // CoolFish: Fix bug 2001/10/13 + // int srclen = strlen( src ); + int srclen = 0; + int searchindex=0; + + // CoolFish: Fix bug 2001/10/13 + if (!src) return NULL; + srclen = strlen(src); + + for( i = 0; i < srclen; i ++ ) + { + // for 2Byte Word + if( IS_2BYTEWORD( src[i] ) ){ + src[searchindex++] = src[i++]; + src[searchindex++] = src[i]; + }else + if( src[i] == '\\' ) + { + // 戚及 侬卞垫仁 + i++; + src[searchindex++] = makeCharFromEscaped( src[i] ); + } + else + { + src[searchindex++] = src[i]; + } + } + src[searchindex] = '\0'; + + return src; +} + +char* makeEscapeString( char* src , char* dest, int sizeofdest) +{ //ttom this function all change, copy from the second + int i; + int srclen = 0; + int destindex=0; + + // CoolFish: Fix bug 2001/10/13 + if (!src) return NULL; + srclen = strlen(src); + + for( i = 0 ; i < srclen ; i ++ ){ + BOOL dirty=FALSE; + int j; + char escapechar='\0'; + if( destindex + 1 >= sizeofdest )break; + if( IS_2BYTEWORD( src[i] ) ){ + if( destindex + 2 >= sizeofdest )break; + + dest[destindex] = src[i]; + dest[destindex+1] = src[i+1]; + destindex += 2; + i ++; + continue; + } + for( j = 0; j= length ){ + print( "*\n"); + break; + } + src[index++]=src[i]; + /* 粮互鞅匀凶仪卞允月 */ + backchar = '\0'; + continue; + } + if( src[i] == backchar ) + /* + * 绰轮允月手元分匀凶日窒手仄卅中[勾引曰绰轮卞卅月[ + */ + continue; + + /* + * 粮及绰轮允月 侬互卅仁卅匀凶及匹 backchar 反 NULL 侬卞允月 + * 仇木互井氏元氏 + */ + backchar = '\0'; + for( j = 0 ; j < delength ; j ++ ){ + if( src[i] == dels[j] ){ + /* + * 绰轮允月 侬 分[ 仇仇匹 continue 仄卅中仪卞方曰 + * 域 侬反绰轮仄卅中仪互忡据匹五月[ + */ + backchar=src[i]; + break; + } + } + src[index++]=src[i]; + } + src[index++]='\0'; +} + +/*---------------------------------------- + * hash袄毛忒允[ 侬 卞及心银丹仇午 + * 仇木反 公及引引卅及匹失伙打伉术丞反方丹歹井日氏互 + * 中中失伙打伉术丞日仄中[ + * 娄醒 + * s 侬 + * 忒曰袄 + * int 甩永扑亘袄 + *----------------------------------------*/ +#define PRIME 211 +int hashpjw ( char* s ) +{ + char *p; + unsigned int h= 0 ,g; + for( p = s ; *p ; p ++ ){ + h = ( h<< 4 ) + (*p); + if( (g = h & 0xf0000000) != 0){ + h = h ^ (g>>24); + h = h ^ g; + } + } + return h % PRIME; +} + +/*---------------------------------------- + * 夫□市伙卞田奶件玉仄凶末弗永玄毛忒允( TCP ) + * 娄醒 + * port 夫□市伙禾□玄 + * 忒曰袄 + * -1 巨仿□ + * 1. socket扑旦 丞戊□伙及巨仿□ + * 2. bind扑旦 丞戊□伙及巨仿□ + * 3. listen扑旦 丞戊□伙及巨仿□ + ----------------------------------------*/ +int bindlocalhost( int port ) +{ + struct sockaddr_in sin; /*夫□市伙失玉伊旦迕*/ + int sfd; /*末弗永玄犯奴旦弁伉皿正*/ + int rc; /*夫□市伙伉正□件戊□玉*/ + + /*AF_INET皿夫玄戊伙 及 SOCK_STREAM */ + sfd = socket( AF_INET, SOCK_STREAM, 0 ); + if( sfd == -1 ){ + print( "%s\n" , strerror(errno ) ); + return -1; + } + + if( getReuseaddr() ) { + int sendbuff; + /* 夫□市伙失玉伊旦及疯厍迕 */ + setsockopt( sfd, SOL_SOCKET, SO_REUSEADDR, + (char *)&sendbuff, sizeof( sendbuff)); + } + + /*0弁伉失仄化袄毛医 */ + memset( &sin ,0, sizeof( struct sockaddr_in ) ); + sin.sin_family=AF_INET; + sin.sin_port = htons( port ); + sin.sin_addr.s_addr = INADDR_ANY; + + rc = bind( sfd , (struct sockaddr*)&sin, sizeof(struct sockaddr_in)); + if( rc == -1 ){ + print( "%s\n" , strerror(errno ) ); + return -1; + } + + + rc = listen( sfd , 5 ); + if( rc == -1 ){ + print( "%s\n" , strerror(errno ) ); + return -1; + } + return sfd; +} + + + +/*---------------------------------------- + * 戊生弁玄允月[( TCP ) + * 娄醒 + * hostname 涛粮允月石旦玄 + * (xx.xxx.xxx.xxx匹手中中仄xxx.co.jp午井匹手中中) + * port 涛粮允月石旦玄及禾□玄 + * 忒曰袄 + * 犯奴旦弁伉皿正( -1 及凛反巨仿□ ) + ----------------------------------------*/ +int connectHost( char* hostname , unsigned short port ) +{ + struct sockaddr_in sock; /*connect及凛卞银丹*/ + struct hostent* hoste; /*hostname及hostent*/ + int fd; /*戊生弁玄仄凶末弗永玄犯奴旦弁伉皿正*/ + int lr; /*夫□市伙伉正□件戊□玉*/ + + memset( &sock , 0 , sizeof( struct sockaddr_in ) ); + sock.sin_family = AF_INET; + sock.sin_port = htons( port ); + + /* dot notation 井升丹井毛譬屯月 */ + sock.sin_addr.s_addr = inet_addr( hostname ); + if( sock.sin_addr.s_addr == -1 ){ + /* + *巨仿□ dot notation 匹反卅中[仄凶互匀化 骚及 蟆荸瑁互 邰分[ + * dns毛夫井卅仃木壬卅日卅中凛反夫五卞中仁及手仇仇匹支匀化仁木月[ + */ + hoste = gethostbyname( hostname ); + if( hoste == NULL ){ + print( "获取主机名: %s\n", hostname); + return -1; + } + + memcpy((void*)&sock.sin_addr.s_addr , + hoste->h_addr , sizeof(struct in_addr) ); + } + + /*末弗永玄毛综月*/ + fd = socket( AF_INET, SOCK_STREAM , 0 ); + if( fd == -1 ){ + print("Cannot Create Socket(%s errno:%d)\n" + ,strerror( errno ) ,errno ); + return -1; + } + /*戊生弁玄允月*/ + lr = connect(fd,(struct sockaddr*)&sock,sizeof(struct sockaddr_in)); + if( lr != 0 ){ + print("Cannot connect. (%s errno:%d)\n" + ,strerror( errno ) ,errno ); + return -1; + } + + return fd; +} + + +/*---------------------------------------- + * 田永白央及 卞荼垫筏寞互丐月井升丹井[ + * 剂仄镀中失伙打伉术丞卞 凳[ + * 娄醒 + * char* 譬屯月 侬 + * 忒曰袄 + * 赓卞苇勾井凶荼垫筏寞及匏 失弁本旦仄凶凛卞中中袄[ + * 升丹中丹仪井午中丹午} + * existsNewLinwCharacter( "aho\nhoge\n" ) + * 分午}忒曰袄反 3 卞卅月[仇木卞镗啦允月仪[ + * -1 卅井匀凶 + * + ----------------------------------------*/ +int existsNewLineCharacter( char* line ) +{ +#if 1 + char* old = line; + do{ + if( *line == NEWLINE)return line-old; + }while( *(line++) ); +#else + int i; /*伙□皿 醒*/ + int length = strlen( line ); /*譬屯月 侬 及赢今*/ + for( i = 0 ; i < length ; i ++ ){ + if( line[i] == NEWLINE ) + return i; + } +#endif + + return -1; +} + + + +/*---------------------------------------- + * 侬 卞 侬互 歹木月桦赭毛井尹允[窒 井毛瑁户木月[ + * nindex( string , c , 1 ) 午 index( string , c ) 反 equivalent 匹丐月[ + * number互 引凶反0及凛反忒曰袄反}string午 元匹丐月[ + * + * 娄醒 + * string char* 譬屯月 侬 + * c int 譬屯月 侬 + * number int 歹月 寞 + * 忒曰袄 + * 域谯仄凶 侬及禾奶件正□ + * NULL 心勾井日卅井匀凶[ + ----------------------------------------*/ +char* nindex( char* string, int c , int number ) +{ + int i; /*伙□皿 醒*/ + int num=0; + int length = strlen( string ); /*譬屯月 侬 及赢今*/ + if( number <= 0 )return string; + for( i = 0 ; i < length ; i ++ ){ + if( string[i] == c )num++; + if( number == num ) return &string[i]; + } + return NULL; +} + +BOOL rrd( char* dirname , STRING64* buf ,int bufsize, int* index) +{ + DIR* d; + char dirn[1024]; + + d = opendir( dirname ); + if( d == NULL )return FALSE; + + while( 1 ){ + struct dirent* dent; + struct stat st; + dent = readdir( d ); + if( dent == NULL ){ + if( errno == EBADF ){ + errorprint; + closedir(d); + return FALSE; + }else + /* successful */ + break; + } + + /* . 匹铵引月白央奶伙反 引卅中 */ + if( dent->d_name[0] == '.' )continue; + + snprintf(dirn, sizeof(dirn), "%s/%s" , dirname,dent->d_name ); + if( stat( dirn , &st ) == -1 )continue; + if( S_ISDIR( st.st_mode ) ){ + if( rrd( dirn , buf ,bufsize, index) == FALSE ){ + closedir(d); + return FALSE; + } + }else{ + if( *index >= bufsize ) + break; + + strcpysafe( buf[*index].string , sizeof( buf[*index].string ), dirn ); + (*index)++; + } + } + closedir(d); + return TRUE; +} + +int rgetFileName( char* dirname , STRING64* string, int size) +{ + int index=0; + if( rrd( dirname , string ,size ,&index ) == FALSE )return -1; + else return index; +} + +BOOL checkStringsUnique( char** strings, int num ,int verbose) +{ + int i,j; + for( i = 0 ; i < num - 1; i ++ ){ + for( j = i+1 ; j < num ; j ++){ + if( !strcmp( strings[i] ,strings[j] )){ + if( verbose ) + print( "Overlapp string is %s\n", strings[i] ); + return FALSE; + } + } + } + return TRUE; +} + +BOOL PointInRect( RECT* rect, POINT* p ) +{ + if( rect->x <= p->x && p->x <= rect->x + rect->width && + rect->y <= p->y && p->y <= rect->y + rect->height ) + return TRUE; + return FALSE; +} + +BOOL CoordinateInRect( RECT* rect, int x, int y) +{ + POINT p={x,y}; + return PointInRect(rect,&p); +} + +int clipRect( RECT *rect1, RECT *rect2, RECT *ret ) +{ + if( rect1->x > rect2->x + rect2->width -1 + || rect2->x > rect1->x + rect1->width -1 + || rect1->y > rect2->y + rect2->height -1 + || rect2->y > rect1->y + rect1->height -1 ) + return 0; + ret->x = max( rect1->x, rect2->x ); + ret->y = max( rect1->y, rect2->y ); + ret->width = min( rect1->x+rect1->width, rect2->x+rect2->width ) - ret->x; + ret->height = min( rect1->y+rect1->height, rect2->y+rect2->height ) - ret->y; + return 1; +} + +BOOL isstring1or0( char* string ) +{ + if( strcasecmp(string,"TRUE" ) == 0 )return TRUE; + if( strcasecmp(string,"FALSE") == 0 )return FALSE; + if( strcasecmp(string,"1" ) == 0 )return TRUE; + if( strcasecmp(string,"0" ) == 0 )return FALSE; + if( strcasecmp(string,"ON" ) == 0 )return TRUE; + if( strcasecmp(string,"OFF" ) == 0 )return FALSE; + return FALSE; +} + +void easyGetTokenFromString( char *src,int count,char*output,int len ) +{ + int i; + int counter = 0; + + if( len <= 0 )return; + + +#define ISSPACETAB( c ) ( (c) == ' ' || (c) == '\t' ) + + for(i=0;;i++){ + if( src[i]=='\0'){ + output[0] = '\0'; + return; + } + if( i > 0 && ! ISSPACETAB( src[i-1] ) && + ! ISSPACETAB( src[i] ) ){ + continue; + } + + if( ! ISSPACETAB( src[i]) ){ + counter++; + if( counter == count){ + /* copy it */ + int j; + for(j=0;j1---- + * + * + ------------------------------------------------------------*/ +float linearDiv( float val1 , float val2 , float d ) +{ + return val1 + ( val2 - val1 ) * ( d ); +} + + +/*------------------------------------------------------------ + * 侬 及卅井井日 啦卅 侬毛len 侬午曰分仄化仿件母丞卅 + * 侬 毛勾仁月[NPC及仿件母丞由旦伐□玉戏岳卞勾井匀化月 + * + * char *cand : 仇仇井日蓟少[跳 及 侬[ + * char *out : 请 田永白央 + * int len : 请 及赢今 + ------------------------------------------------------------*/ +void makeRandomString( char *cand , char *out , int len ) +{ + int i; + int l = strlen( cand ); + + for(i=0;i= baselen; i ++ ) { + tmp[i] = src % baselen; + src /= baselen; + } + i--; + if( minus ){ + *out = '-'; + *(out+1) = base[src]; + for( j = 2; i >= 0; i --, j ++ ) { + if( j > outlen - 2 ) return NULL; + *(out+j) = base[tmp[i]]; + } + } else { + *out = base[src]; + for( j = 1; i >= 0; i --, j ++ ) { + if( j > outlen - 2 ) return NULL; + *(out+j) = base[tmp[i]]; + } + } + *(out+j) = '\0'; + return( out); +#else +/* 衙中 */ +#define CNV_NUMBER 62 + int i, j; + char base[] = { "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"}; + int tmp[64]; + int src; + if( a < 0 ) return( NULL); + if( a < CNV_NUMBER) { + *out = base[a]; + *(out+1) = '\0'; + return( out); + } + src = a; + for( i = 0; src >= CNV_NUMBER; i ++ ) { + tmp[i] = src % CNV_NUMBER; + src /= CNV_NUMBER; + } + i--; + *out = base[src]; + for( j = 1; i >= 0; i --, j ++ ) { + if( j > outlen - 2 ) return NULL; + *(out+j) = base[tmp[i]]; + } + *(out+j) = '\0'; + return( out); +#undef CNV_NUMBER +#endif +} +/* + * 芨尹日木凶 及 匹]醒袄互褐 仄化中月井譬屯月楮醒 + * -1 反覆擂陆午中丹 卅楮醒 + * + * 娄醒 + * src *int 譬屯月葭及 + * srclen int src 及 五今 + * + * 曰袄 褐 丐曰 TRUE + * 卅仄 FALSE + */ +BOOL checkRedundancy( int *src, int srclen) +{ + int i,j; + int ret = FALSE; + + for( i = 0; i < srclen; i ++ ) { + if( *(src + i) != -1 ) { + for( j = i+1; j < srclen; j ++ ) { + if( *(src +i) == *( src+j) ) { + ret = TRUE; + break; + } + } + } + } + return ret; +} +void +shuffle_ints( int num, int *a, int t ) +{ + int i; + for(i=0;i> 8 ) & 0xFF ] + ^ ( crc << 8 ) ^ BitTable[ p[ i ] ] ); + } + return crc; +} + +// Add Code By Shan 2001.06.16 +INLINE double time_diff(struct timeval subtrahend, + struct timeval subtractor) +{ + return( (subtrahend.tv_sec - subtractor.tv_sec) + + (subtrahend.tv_usec + - subtractor.tv_usec ) / (double)1E6 ); +} diff --git a/gmsv2.28_code.rar b/gmsv2.28_code.rar new file mode 100644 index 0000000000000000000000000000000000000000..f32bb685040e89f9f918b497d4da60c18c37bf71 GIT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K|Y7)aC!`Pu#&6wVu|Req=zTz|ACt`mq0PRHvWseOO9{OG~i=(qMY)eCYe_-%HD8BMBh$Q8{8AJy`&Hp{1|GVwx q_HbddAp#)q`hNuaRShCX^}j-p>;K5@{Er;$|H=Im_63L`0RA5yBmo)# literal 0 HcmV?d00001 diff --git a/saac/acfamily.c b/saac/acfamily.c new file mode 100644 index 0000000..3f8d3a6 --- /dev/null +++ b/saac/acfamily.c @@ -0,0 +1,4094 @@ +#define _FAMILY_C_ + +#include "version.h" +#include "main.h" +#include "acfamily.h" +#include "util.h" +#include "saacproto_serv.h" + +#include +#include +#include +#include +#include +#include + +// 家族 Int 资料 +static char* FAMILY_INTDATA[familymaxint] = +{ + "fmindex", + "fmleadergrano", + "fmnum", + "fmjoinnum", + "fmacceptflag", + "fmsetupflag", + "fmsprite", + "fmpointindex", + "fmpopular", + "fmgold", + "fmmemberindexmaxnum", + "apply_time", + "setup_time", + "predel_time", + "memonowwritenum", + "memonum", + "fmadv", + "fmfeed", + "fmsynthesize", + "fmdealfood", + "fmpk", +#ifdef _NEW_MANOR_LAW + "fmmomentum", +#endif +}; + +// 家族 char 资料 +static char* FAMILY_CHARDATA[familymaxchar] = +{ + "fmname", + "fmleadername", + "fmleaderid", + "petname", + "petattr", + "fmrule", +}; + +// 家族成员 int 资料 +static char* MEMBER_INTDATA[memberdatamaxint] = +{ + "charlv", + "charflag", + "onlineflag", + "charfdid", + "predeltime", + "popular", +#ifdef _FMVER21 + "eventflag", +#endif +#ifdef _NEW_MANOR_LAW + "momentum", +#endif +}; + +// 家族成员 char 资料 +static char* MEMBER_CHARDATA[memberdatamaxchar] = +{ + "charname", + "charid", +}; + +// 成员种类 char 资料 +static char* MEMBERKIND_INTDATA[FMMEMBER_KINDNUM] = +{ + "无", + "一般成员", + "申请中", + "族长", + "长老", +}; + +// 家族之间留言板 +struct FMSMEMO +{ + int num; // 留言数量 + int fmsnowwritenum; // 目前留言位置 + char memodata[FMSMEMONUM][FAMILY_MEMOLEN]; // 留言内容 +}; + +// 庄园 +struct FMPOINT +{ + int fl; // 庄园进入图层 + int x; // 庄园进入X座标 + int y; // 庄园进入Y座标 + int fmfl; // 庄园族长图层 + int village; // 庄园邻近之村庄 + int hadfmindex; // 占领庄园之家族 index + char hadfmname[CHARNAME_MAX]; // 占领庄园之家族 name + int hadfmpopular; // 占领庄园之家族综合声望值 + +}; + +// 家族成员资料 +typedef struct +{ + char charname[CHARNAME_MAX]; // 成员名字 + char charid[USERID_MAX]; // 成员帐号 + int charlv; // 成员等级 + int charflag; /* + FMMEMBER_NONE 清空资料 + FMMEMBER_MEMBER 家族成员 + FMMEMBER_APPLY 申请中 + FMMEMBER_LEADER 族长 + FMMEMBER_ELDER 长老 + */ + int onlineflag; // 0:offline; gmsv index + int charfdid; // 成员在 gmsv 的 fd + int predeltime; // 预计删除成员时间 + int popular; // 成员的声望 +#ifdef _FMVER21 + int eventflag; // 是否拥有族长资格 +#endif +#ifdef _NEW_MANOR_LAW + int momentum; // 成员气势 +#endif +#ifdef _FM_MODIFY + int gsnum; // 记录玩家是在那一个game server +#endif +} MEMBERDATA; + +struct FAMILY +{ + int fmindex; // 家族 index + char fmname[CHARNAME_MAX]; // 家族名称 + char fmleadername[CHARNAME_MAX]; // 族长名称 + + char fmleaderid[USERID_MAX]; // 族长帐号 + int fmleadergrano; // 族长照片 + char petname[CHARNAME_MAX]; // 守护兽名称 + char petattr[256]; // 守护兽资料 + + int fmnum; // 家族人数,包含申请退出、加入人数 + int fmjoinnum; // 真正加入家族人数 + int fmacceptflag; // 是否接收成员 0:不接受 1:接受 + int fmsetupflag; // 0:尚未成立 1:已成立 + char fmrule[256]; // 家族主旨 + int fmsprite; // 0:光明精灵 1:黑暗精灵 + int fmpointindex; // 家族据点 index + int fmpopular; // 家族综合声望 +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + int fmtotalfame; // 家族综合 + 家族个人声望总合 +#endif +#ifdef _NEW_MANOR_LAW + int fmmomentum; // 家族气势 +#endif + int fmgold; // 家族基金 + int fmmemberindexmaxnum; // 家族目前最大人数 + int apply_time; // 家族申请时间 + int setup_time; // 家族成立时间 + int predel_time; // 预计删除家族时间 + + int memonowwritenum; // 目前留言位置 + int memonum; // 留言数量 + int fmadv; // 冒险任务声望 + int fmfeed; // 饲育声望 + int fmsynthesize; // 合成加工声望 + int fmdealfood; // 料理声望 + int fmpk; // PK声望 + char memolist[FAMILY_MEMONUM][FAMILY_MEMOLEN]; // 留言内容 + MEMBERDATA fmmemberindex[MAX_MEMBERNUM]; // 成员资料 +}; + +int db_familyupdate[MAX_FAMILY]; +int db_fmpointupdate = 0; +int db_fmsmemoupdate = 0; +int fmnownum = 0; +int fmindexmaxnum = 0; +extern gmsv gs[MAXCONNECTION]; + +struct FAMILY family[MAX_FAMILY]; +int fmpopularindex[MAX_FAMILY]; // Arminius: sort family +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 +int fmtotalfameindex[MAX_FAMILY]; +#endif +#ifdef _NEW_MANOR_LAW +int fmMomentumIndex[MAX_FAMILY]; +#endif +int fmadvindex[MAX_FAMILY]; +int fmfeedindex[MAX_FAMILY]; +int fmsynthesizeindex[MAX_FAMILY]; +int fmdealfoodindex[MAX_FAMILY]; +int fmpkindex[MAX_FAMILY]; +struct FMPOINT fmpoint[MAX_FMPOINT]; +struct FMSMEMO fmsmemo; + +// Arminius: sort family & output the sorted list +// Make a sorted index (fmindex) for the family data (family) +#ifdef _NEW_MANOR_LAW +int fmMomentumcompar(const void *indexa, const void *indexb); +#endif +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 +int fmtotalfamecompar(const void *indexa, const void *indexb); +#endif +int fmpopularcompar(const void *indexa, const void *indexb); +int fmadvcompar(const void *indexa, const void *indexb); +int fmfeedcompar(const void *indexa, const void *indexb); +int fmsynthesizecompar(const void *indexa, const void *indexb); +int fmdealfoodcompar(const void *indexa, const void *indexb); +int fmpkcompar(const void *indexa, const void *indexb); +int CheckFM(int *index, char *fmname, int fmindex); +int CheckFMUse(int index); +void setFamilyFileDataToArg(int index, char *data); +void setMemberFileDataToArg(int index, int memberindex, char *databuf); + +// sortFamily: call this after family loaded +void sortFamily(void) +{ + int i; + + for(i = 0; i < MAX_FAMILY; i++) + { +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + fmtotalfameindex[i] = i; +#endif +#ifdef _NEW_MANOR_LAW + fmMomentumIndex[i] = i; +#endif + fmpopularindex[i] = i; + fmadvindex[i] = i; + fmfeedindex[i] = i; + fmsynthesizeindex[i] = i; + fmdealfoodindex[i] = i; + fmpkindex[i] = i; + } +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + qsort(fmtotalfameindex, MAX_FAMILY, sizeof(int), &fmtotalfamecompar); +#endif + qsort(fmpopularindex, MAX_FAMILY, sizeof(int), &fmpopularcompar); + qsort(fmadvindex, MAX_FAMILY, sizeof(int), &fmadvcompar); + qsort(fmfeedindex, MAX_FAMILY, sizeof(int), &fmfeedcompar); + qsort(fmsynthesizeindex, MAX_FAMILY, sizeof(int), &fmsynthesizecompar); + qsort(fmdealfoodindex, MAX_FAMILY, sizeof(int), &fmdealfoodcompar); + qsort(fmpkindex, MAX_FAMILY, sizeof(int), &fmpkcompar); +#ifdef _NEW_MANOR_LAW + qsort(fmMomentumIndex,MAX_FAMILY,sizeof(int),&fmMomentumcompar); +#endif +} + +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 +int fmtotalfamecompar(const void *indexa, const void *indexb) +{ + int famea,fameb; + + if ( CheckFMUse(* (int*) indexa)==0 ) return 1; // empty record + if ( CheckFMUse(* (int*) indexb)==0 ) return -1; + + famea = family[ * (int*) indexa ].fmtotalfame; + fameb = family[ * (int*) indexb ].fmtotalfame; + return (famea>fameb)? -1 : 1; +} +#endif + +#ifdef _NEW_MANOR_LAW +int fmMomentumcompar(const void *indexa, const void *indexb) +{ + int momentumA,momentumB; + + if(CheckFMUse(*(int*)indexa) == 0) return 1; // empty record + if(CheckFMUse(*(int*)indexb) == 0) return -1; + + momentumA = family[*(int*)indexa].fmmomentum; + momentumB = family[*(int*)indexb].fmmomentum; + return (momentumA > momentumB) ? -1:1; +} +#endif + +int fmpopularcompar(const void *indexa, const void *indexb) +{ + int fmpopulara,fmpopularb; + + if ( CheckFMUse(* (int*) indexa)==0 ) return 1; // empty record + if ( CheckFMUse(* (int*) indexb)==0 ) return -1; + + fmpopulara = family[ * (int*) indexa ].fmpopular; + fmpopularb = family[ * (int*) indexb ].fmpopular; + return (fmpopulara>fmpopularb)? -1 : 1; +} + +int fmadvcompar(const void *indexa, const void *indexb) +{ + int fmadva,fmadvb; + + if ( CheckFMUse(* (int*) indexa)==0 ) return 1; // empty record + if ( CheckFMUse(* (int*) indexb)==0 ) return -1; + + fmadva = family[ * (int*) indexa ].fmadv; + fmadvb = family[ * (int*) indexb ].fmadv; + return (fmadva>fmadvb)? -1 : 1; +} + +int fmfeedcompar(const void *indexa, const void *indexb) +{ + int fmfeeda,fmfeedb; + + if ( CheckFMUse(* (int*) indexa)==0 ) return 1; // empty record + if ( CheckFMUse(* (int*) indexb)==0 ) return -1; + + fmfeeda = family[ * (int*) indexa ].fmfeed; + fmfeedb = family[ * (int*) indexb ].fmfeed; + return (fmfeeda>fmfeedb)? -1 : 1; +} + +int fmsynthesizecompar(const void *indexa, const void *indexb) +{ + int fmsynthesizea,fmsynthesizeb; + + if ( CheckFMUse(* (int*) indexa)==0 ) return 1; // empty record + if ( CheckFMUse(* (int*) indexb)==0 ) return -1; + + fmsynthesizea = family[ * (int*) indexa ].fmsynthesize; + fmsynthesizeb = family[ * (int*) indexb ].fmsynthesize; + return (fmsynthesizea>fmsynthesizeb)? -1 : 1; +} + +int fmdealfoodcompar(const void *indexa, const void *indexb) +{ + int fmdealfooda,fmdealfoodb; + + if ( CheckFMUse(* (int*) indexa)==0 ) return 1; // empty record + if ( CheckFMUse(* (int*) indexb)==0 ) return -1; + + fmdealfooda = family[ * (int*) indexa ].fmdealfood; + fmdealfoodb = family[ * (int*) indexb ].fmdealfood; + return (fmdealfooda>fmdealfoodb)? -1 : 1; +} + +int fmpkcompar(const void *indexa, const void *indexb) +{ + int fmpka,fmpkb; + + if ( CheckFMUse(* (int*) indexa)==0 ) return 1; // empty record + if ( CheckFMUse(* (int*) indexb)==0 ) return -1; + + fmpka = family[ * (int*) indexa ].fmpk; + fmpkb = family[ * (int*) indexb ].fmpk; + return (fmpka>fmpkb)? -1 : 1; +} + +// getFMsortedlist +// arg: buf=returned list (format: "index 名次 家族名 族长名 popular|...") +// bufsize=sizeof(buf) +// bp=begin point (bp=-1 -> begin at 0) +// ep=end point (ep=-1 -> end at MAX_FAMILY-1) +// ret: 1=success; 0=failed +// Arminius end + +// 取得家族各声望值列表 +// kindflag 1:综合 2:冒险 3:饲育 4:合成 5:料理 6:PK 7:总合(综合+个人) +int ACShowTopFMList(char *data, int datasize, int kindflag) +{ + int i = 0, j = 0; + char t1[4096]; + + strcpy(data, ""); + if (kindflag == 1) + { + for (i = 0; i < MAX_FAMILY; i++) { + if (strcmp(family[fmpopularindex[i]].fmname, "") == 0) + { + j++; + continue; + } +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + #ifdef _NEW_MANOR_LAW + sprintf(t1, "%d|%d|%s|%s|%d|%d|%d",fmtotalfameindex[i], i + 1, + family[fmtotalfameindex[i]].fmname, + family[fmtotalfameindex[i]].fmleadername, + (family[fmtotalfameindex[i]].fmpopular / 100), + (family[fmtotalfameindex[i]].fmtotalfame / 100), + (family[fmtotalfameindex[i]].fmmomentum)); + #else + sprintf(t1, "%d|%d|%s|%s|%d|%d",fmtotalfameindex[i], i + 1, + family[fmtotalfameindex[i]].fmname, + family[fmtotalfameindex[i]].fmleadername, + (family[fmtotalfameindex[i]].fmpopular / 100), + (family[fmtotalfameindex[i]].fmtotalfame / 100)); + #endif +#else + sprintf(t1, "%d|%d|%s|%s|%d", fmpopularindex[i], i + 1, + family[fmpopularindex[i]].fmname, + family[fmpopularindex[i]].fmleadername, + (family[fmpopularindex[i]].fmpopular / 100)); +#endif + if (i < MAX_FAMILY) strcat(t1, " "); + if (strlen(data) + strlen(t1) >= datasize){ + log("getFMsortedlist: datafer overflow."); + return -1; + } + strcat(data, t1); + } + } + else if (kindflag == 2) + { + for (i = 0; i < TOPFMLISTNUM; i++) { + if (strcmp(family[fmadvindex[i]].fmname, "") == 0) + { + j++; + continue; + } + sprintf(t1, "%d|%d|%s|%s|%d", fmadvindex[i], i + 1, + family[fmadvindex[i]].fmname, + family[fmadvindex[i]].fmleadername, + (family[fmadvindex[i]].fmadv / 100)); + if (i < TOPFMLISTNUM) strcat(t1, " "); + if (strlen(data) + strlen(t1) >= datasize) + { + log("getFMsortedlist: datafer overflow."); + return -1; + } + strcat(data, t1); + } + } + else if (kindflag == 3) + { + for (i = 0; i < TOPFMLISTNUM; i++) { + if (strcmp(family[fmfeedindex[i]].fmname, "") == 0) + { + j++; + continue; + } + sprintf(t1, "%d|%d|%s|%s|%d", fmfeedindex[i], i + 1, + family[fmfeedindex[i]].fmname, + family[fmfeedindex[i]].fmleadername, + (family[fmfeedindex[i]].fmfeed / 100)); + if (i < TOPFMLISTNUM) strcat(t1, " "); + if (strlen(data) + strlen(t1) >= datasize) + { + log("getFMsortedlist: datafer overflow."); + return -1; + } + strcat(data, t1); + } + } + else if (kindflag == 4) + { + for (i = 0; i < TOPFMLISTNUM; i++) { + if (strcmp(family[fmsynthesizeindex[i]].fmname, "") == 0) + { + j++; + continue; + } + sprintf(t1, "%d|%d|%s|%s|%d", fmsynthesizeindex[i], i + 1, + family[fmsynthesizeindex[i]].fmname, + family[fmsynthesizeindex[i]].fmleadername, + (family[fmsynthesizeindex[i]].fmsynthesize / 100)); + if (i < TOPFMLISTNUM) strcat(t1, " "); + if (strlen(data) + strlen(t1) >= datasize) + { + log("getFMsortedlist: datafer overflow."); + return -1; + } + strcat(data, t1); + } + } + else if (kindflag == 5) + { + for (i = 0; i < TOPFMLISTNUM; i++) { + if (strcmp(family[fmdealfoodindex[i]].fmname, "") == 0) + { + j++; + continue; + } + sprintf(t1, "%d|%d|%s|%s|%d", fmdealfoodindex[i], i + 1, + family[fmdealfoodindex[i]].fmname, + family[fmdealfoodindex[i]].fmleadername, + (family[fmdealfoodindex[i]].fmdealfood / 100)); + if (i < TOPFMLISTNUM) strcat(t1, " "); + if (strlen(data) + strlen(t1) >= datasize) + { + log("getFMsortedlist: datafer overflow."); + return -1; + } + strcat(data, t1); + } + } + else if (kindflag == 6) + { + for (i = 0; i < TOPFMLISTNUM; i++) { + if (strcmp(family[fmpkindex[i]].fmname, "") == 0) + { + j++; + continue; + } + sprintf(t1, "%d|%d|%s|%s|%d", fmpkindex[i], i + 1, + family[fmpkindex[i]].fmname, + family[fmpkindex[i]].fmleadername, + (family[fmpkindex[i]].fmpk / 100)); + if (i < TOPFMLISTNUM) strcat(t1, " "); + if (strlen(data) + strlen(t1) >= datasize) + { + log("getFMsortedlist: datafer overflow."); + return -1; + } + strcat(data, t1); + } + } +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + else if (kindflag == 7) + { + for (i = 0; i < MAX_FAMILY; i++) { + if (strcmp(family[fmtotalfameindex[i]].fmname, "") == 0) + { + j++; + continue; + } + sprintf(t1, "%d|%d|%s|%s|%d", fmtotalfameindex[i], i + 1, + family[fmtotalfameindex[i]].fmname, + family[fmtotalfameindex[i]].fmleadername, + (family[fmtotalfameindex[i]].fmtotalfame / 100)); + if (i < MAX_FAMILY) strcat(t1, " "); + if (strlen(data) + strlen(t1) >= datasize) + { + log("getFMsortedlist: datafer overflow."); + return -1; + } + strcat(data, t1); + } + } +#endif +#ifdef _NEW_MANOR_LAW + else if(kindflag == 8){ // 十大气势家族(全部气势排名都传给game server) + for(i=0;i= datasize){ + log("getFMsortedlist: datafer overflow."); + return -1; + } + strcat(data, t1); + } + } +#endif + return i - j; +} + +void AddFMMaintainSort(int index) +{ + int i = 0, j = MAX_FAMILY - 1, k; + // modify popular sort + while ((family[fmpopularindex[i]].fmpopular >= family[index].fmpopular) + && (i < MAX_FAMILY) && CheckFMUse(fmpopularindex[i])) + { + if (i == MAX_FAMILY -1) break; + i++; + } + while ((fmpopularindex[j] != index) && (j > 0)) j--; + if (j > i) + { + for (k = j; k > i; k--) fmpopularindex[k] = fmpopularindex[k - 1]; + fmpopularindex[i] = index; + } else if (j < i) { + log("ACAddFM: fmpopularindex add error (j < i)"); + } else log("ACAddFM: fmpopularindex add error (j = i)"); + // modify adv sort + i = 0;j = MAX_FAMILY;k = 0; + while ((family[fmadvindex[i]].fmadv >= family[index].fmadv) + && (i < MAX_FAMILY) && CheckFMUse(fmadvindex[i])) + { + if (i == MAX_FAMILY -1) break; + i++; + } + while ((fmadvindex[j] != index) && (j > 0)) j--; + if (j > i) + { + for (k = j; k > i; k--) fmadvindex[k] = fmadvindex[k - 1]; + fmadvindex[i] = index; + } else if (j < i) { + log("ACAddFM: fmadvindex add error (j < i)"); + } else log("ACAddFM: fmadvindex add error (j = i)"); + // modify feed sort + i = 0; j = MAX_FAMILY; k = 0; + while ((family[fmfeedindex[i]].fmfeed >= family[index].fmfeed) + && (i < MAX_FAMILY) && CheckFMUse(fmfeedindex[i])) + { + if (i == MAX_FAMILY -1) break; + i++; + } + while ((fmfeedindex[j] != index) && (j > 0)) j--; + if (j > i) + { + for (k = j; k > i; k--) fmfeedindex[k] = fmfeedindex[k - 1]; + fmfeedindex[i] = index; + } else if (j < i) { + log("ACAddFM: fmfeedindex add error (j < i)"); + } else log("ACAddFM: fmfeedindex add error (j = i)"); + // modify synthesize sort + i = 0;j = MAX_FAMILY;k = 0; + while ((family[fmsynthesizeindex[i]].fmsynthesize >= family[index].fmsynthesize) + && (i < MAX_FAMILY) && CheckFMUse(fmsynthesizeindex[i])) + { + if (i == MAX_FAMILY -1) break; + i++; + } + while ((fmsynthesizeindex[j] != index) && (j > 0)) j--; + if (j > i) + { + for (k = j; k > i; k--) fmsynthesizeindex[k] = fmsynthesizeindex[k - 1]; + fmsynthesizeindex[i] = index; + } else if (j < i) { + log("ACAddFM: fmsynthesizeindex add error (j < i)"); + } else log("ACAddFM: fmsynthesizeindex add error (j = i)"); + // modify dealfood sort + i = 0;j = MAX_FAMILY;k = 0; + while ((family[fmdealfoodindex[i]].fmdealfood >= family[index].fmdealfood) + && (i < MAX_FAMILY) && CheckFMUse(fmdealfoodindex[i])) + { + if (i == MAX_FAMILY -1) break; + i++; + } + while ((fmdealfoodindex[j] != index) && (j > 0)) j--; + if (j > i) + { + for (k = j; k > i; k--) fmdealfoodindex[k] = fmdealfoodindex[k - 1]; + fmdealfoodindex[i] = index; + } else if (j < i) { + log("ACAddFM: fmdealfoodindex add error (j < i)"); + } else log("ACAddFM: fmdealfoodindex add error (j = i)"); + // modify pk sort + i = 0;j = MAX_FAMILY;k = 0; + while ((family[fmpkindex[i]].fmpk >= family[index].fmpk) + && (i < MAX_FAMILY) && CheckFMUse(fmpkindex[i])) + { + if (i == MAX_FAMILY -1) break; + i++; + } + while ((fmpkindex[j] != index) && (j > 0)) j--; + if (j > i) + { + for (k = j; k > i; k--) fmpkindex[k] = fmpkindex[k - 1]; + fmpkindex[i] = index; + } else if (j < i) { + log("ACAddFM: fmpkindex add error (j < i)"); + } else log("ACAddFM: fmpkindex add error (j = i)"); +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + // modify pk sort + i = 0;j = MAX_FAMILY;k = 0; + while ((family[fmtotalfameindex[i]].fmtotalfame >= family[index].fmtotalfame) + && (i < MAX_FAMILY) && CheckFMUse(fmtotalfameindex[i])) + { + if (i == MAX_FAMILY -1) break; + i++; + } + while ((fmtotalfameindex[j] != index) && (j > 0)) j--; + if (j > i) + { + for (k = j; k > i; k--) fmtotalfameindex[k] = fmtotalfameindex[k - 1]; + fmtotalfameindex[i] = index; + } else if (j < i) { + log("ACAddFM: fmtotalfameindex add error (j < i)"); + } else log("ACAddFM: fmtotalfameindex add error (j = i)"); +#endif +#ifdef _NEW_MANOR_LAW + // modify momentum sort + i = 0;j = MAX_FAMILY;k = 0; + while ((family[fmMomentumIndex[i]].fmmomentum >= family[index].fmmomentum) + && (i < MAX_FAMILY) && CheckFMUse(fmMomentumIndex[i])) + { + if (i == MAX_FAMILY -1) break; + i++; + } + while ((fmMomentumIndex[j] != index) && (j > 0)) j--; + if (j > i) + { + for (k = j; k > i; k--) fmMomentumIndex[k] = fmMomentumIndex[k - 1]; + fmMomentumIndex[i] = index; + } else if (j < i) { + log("ACAddFM: fmMomentumIndex add error (j < i)"); + } else log("ACAddFM: fmMomentumIndex add error (j = i)"); +#endif +} + +void DelFMMaintainSort(int index) +{ + int i = 0,j; + // modify popular sort + while ((fmpopularindex[i] != index) && (i < MAX_FAMILY)) i++; + if (fmpopularindex[i] == index) + { + for (j = i; j < MAX_FAMILY - 1; j++) + fmpopularindex[j] = fmpopularindex[j + 1]; + fmpopularindex[MAX_FAMILY - 1] = index; // move to last one + } + // modify adv sort + i = 0;j = 0; + while ((fmadvindex[i] != index) && (i < MAX_FAMILY)) i++; + if (fmadvindex[i] == index) + { + for (j = i; j < MAX_FAMILY - 1; j++) + fmadvindex[j] = fmadvindex[j + 1]; + fmadvindex[MAX_FAMILY - 1] = index; // move to last one + } + // modify feed sort + i = 0;j = 0; + while ((fmfeedindex[i] != index) && (i < MAX_FAMILY)) i++; + if (fmfeedindex[i] == index) + { + for (j = i; j < MAX_FAMILY - 1; j++) + fmfeedindex[j] = fmfeedindex[j + 1]; + fmfeedindex[MAX_FAMILY - 1] = index; // move to last one + } + // modify synthesize sort + i = 0;j = 0; + while ((fmsynthesizeindex[i] != index) && (i < MAX_FAMILY)) i++; + if (fmsynthesizeindex[i] == index) + { + for (j = i; j < MAX_FAMILY - 1; j++) + fmsynthesizeindex[j] = fmsynthesizeindex[j + 1]; + fmsynthesizeindex[MAX_FAMILY - 1] = index; // move to last one + } + // modify dealfood sort + i = 0;j = 0; + while ((fmdealfoodindex[i] != index) && (i < MAX_FAMILY)) i++; + if (fmdealfoodindex[i] == index) + { + for (j = i; j < MAX_FAMILY - 1; j++) + fmdealfoodindex[j] = fmdealfoodindex[j + 1]; + fmdealfoodindex[MAX_FAMILY - 1] = index; // move to last one + } + // modify pk sort + i = 0;j = 0; + while ((fmpkindex[i] != index) && (i < MAX_FAMILY)) i++; + if (fmpkindex[i] == index) + { + for (j = i; j < MAX_FAMILY - 1; j++) + fmpkindex[j] = fmpkindex[j + 1]; + fmpkindex[MAX_FAMILY - 1] = index; // move to last one + } +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + // modify pk sort + i = 0;j = 0; + while ((fmtotalfameindex[i] != index) && (i < MAX_FAMILY)) i++; + if (fmtotalfameindex[i] == index) + { + for (j = i; j < MAX_FAMILY - 1; j++) + fmtotalfameindex[j] = fmtotalfameindex[j + 1]; + fmtotalfameindex[MAX_FAMILY - 1] = index; // move to last one + } +#endif +#ifdef _NEW_MANOR_LAW + // modify momentum sort + i = 0;j = 0; + while ((fmMomentumIndex[i] != index) && (i < MAX_FAMILY)) i++; + if (fmMomentumIndex[i] == index){ + for (j = i; j < MAX_FAMILY - 1; j++) + fmMomentumIndex[j] = fmMomentumIndex[j + 1]; + fmMomentumIndex[MAX_FAMILY - 1] = index; // move to last one + } +#endif +} + +// 从档案读取家族资料(启动时读取) +int readFamily(char *dir) +{ + char dirname[256]; + DIR *d; + struct dirent *de; + int i = 0, fmnum = 0, fmmaxnum = 0; + { + char tmp[256]; + snprintf(tmp, sizeof(tmp), "%s", dir); + if (mkdir(tmp, 0755) == 0) + log("create %s\n", tmp); + } + + snprintf(dirname, sizeof(dirname), "%s", dir); + d = opendir(dirname); + if (d == NULL){ + log("cannot open %s\n", dirname); + return -1; + } + de = readdir(d); + if(de == NULL){ + log("de == NULL\n"); + return -1; + } +{ + char filename[256]; + struct stat s; + for (i = 0; i < MAX_FAMILY; i++){ +// FILE *fp; + snprintf(filename, sizeof(filename), "%s/Family.%d", dirname, i); + if (stat(filename, &s) < 0)continue; + + if (!(s.st_mode & S_IFREG)){ + log("%s is not a regular file\n", filename); + continue; + } + if( readOneFamily( filename, i) != 1 ){ + log("cannot open file %s %s\n", filename, strerror(errno)); + continue; + } + fmnum = fmnum + 1; + fmmaxnum = i; + } + + fmindexmaxnum = fmmaxnum; + fmnownum = fmnum; +} + closedir(d); + +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + // 计算家族总合声望 = 家族综合声望 + 家族个人声望 + { + int i,j; + for (i = 0; i < MAX_FAMILY; i++) { + family[i].fmpopular=family[i].fmadv+family[i].fmfeed + +family[i].fmsynthesize+family[i].fmdealfood + +family[i].fmpk; + family[i].fmtotalfame=family[i].fmpopular; + for (j = 0; j < MAX_MEMBERNUM; j++) { + if ((family[i].fmmemberindex[j].charflag!=FMMEMBER_NONE) && + (family[i].fmmemberindex[j].charflag!=FMMEMBER_APPLY) ) + family[i].fmtotalfame += family[i].fmmemberindex[j].popular; + } + } + } +#endif + + sortFamily(); // Arminius: sort it + +#ifdef _DEATH_FAMILY_STRUCT // WON ADD 家族战存放胜负资料 + read_fm_pk_score(); +#endif + + return 0; +} + +// 将家族资料写入档案 +int writeFamily(char *dir) +{ + int i = 0, j = 0, k = 0; + FILE *fp; + char filename[256]; + for (i = 0; i < MAX_FAMILY; i++) + { + if (db_familyupdate[i] == 0) continue; + sprintf(filename, "%s/Family.%d", dir, i); + fp = fopen(filename, "w"); + if (fp == NULL) continue; + if ((family[i].fmindex != -1) && (strcmp(family[i].fmname, "") != 0)) + { + fprintf(fp, "fmindex=%d|fmname=%s|fmleadername=%s|fmleaderid=%s|" + "fmleadergrano=%d|petname=%s|petattr=%s|fmnum=%d|fmjoinnum=%d|" + "fmacceptflag=%d|fmsetupflag=%d|fmrule=%s|fmsprite=%d|" + "fmpointindex=%d|fmpopular=%d|fmgold=%d|fmmemberindexmaxnum=%d|" + "apply_time=%d|setup_time=%d|predel_time=%d|memonowwritenum=%d|" + "memonum=%d|fmadv=%d|fmfeed=%d|fmsynthesize=%d|fmdealfood=%d|fmpk=%d" +#ifdef _NEW_MANOR_LAW + "|fmmomentum=%d" +#endif + ,family[i].fmindex, family[i].fmname, family[i].fmleadername, + family[i].fmleaderid, family[i].fmleadergrano, family[i].petname, + family[i].petattr, family[i].fmnum, family[i].fmjoinnum, + family[i].fmacceptflag, family[i].fmsetupflag, family[i].fmrule, + family[i].fmsprite, family[i].fmpointindex, family[i].fmpopular, + family[i].fmgold, family[i].fmmemberindexmaxnum, + family[i].apply_time, family[i].setup_time, family[i].predel_time, + family[i].memonowwritenum, family[i].memonum, family[i].fmadv, + family[i].fmfeed, family[i].fmsynthesize, family[i].fmdealfood, + family[i].fmpk +#ifdef _NEW_MANOR_LAW + ,family[i].fmmomentum +#endif + ); + for (j = 0; j < family[i].memonum; j++) + fprintf(fp, "|%s%d=%s", FMMEMOLIST, j, family[i].memolist[j]); + for (k = 0; k < family[i].fmmemberindexmaxnum; k++) + { + if ((strcmp(family[i].fmmemberindex[k].charname, "") != 0) + && (strcmp(family[i].fmmemberindex[k].charid, "") != 0) + && (family[i].fmmemberindex[k].charflag != FMMEMBER_NONE)) + { +#ifdef _FMVER21 + #ifndef _NEW_MANOR_LAW + fprintf(fp, "|%s%d=charname=%s charid=%s charlv=%d charflag=%d onlineflag=%d predeltime=%d popular=%d eventflag=%d", + #else + fprintf(fp, "|%s%d=charname=%s charid=%s charlv=%d charflag=%d onlineflag=%d predeltime=%d popular=%d eventflag=%d momentum=%d", + #endif +#else + fprintf(fp, "|%s%d=charname=%s charid=%s charlv=%d charflag=%d onlineflag=%d predeltime=%d popular=%d", +#endif + FMMEMBERINDEX, k, family[i].fmmemberindex[k].charname, + family[i].fmmemberindex[k].charid, + family[i].fmmemberindex[k].charlv, + family[i].fmmemberindex[k].charflag, + family[i].fmmemberindex[k].onlineflag, + family[i].fmmemberindex[k].predeltime, + family[i].fmmemberindex[k].popular +#ifdef _FMVER21 + ,family[i].fmmemberindex[k].eventflag +#endif +#ifdef _NEW_MANOR_LAW + ,family[i].fmmemberindex[k].momentum +#endif + ); + } + } // for + fprintf(fp, "\n"); + } // if + fclose(fp); + db_familyupdate[i] = 0; + } + + return 0; +} + +// 从档案读取家族庄园(启动时读取) +int readFMPoint(char *dir) +{ + char dirname[256]; + DIR *d; + struct dirent *de; + int i = 0; + { + char tmp[256]; + snprintf(tmp, sizeof(tmp), "%s", dir); + if (mkdir(tmp, 0755) == 0) + log("create %s\n", tmp); + } + + snprintf(dirname, sizeof(dirname), "%s", dir); + d = opendir(dirname); + if (d == NULL) + { + log("无法打开文件 %s\n", dirname); + return -1; + } + while(1) + { + de = readdir(d); + if(de == NULL) break; + if (de -> d_name[0] != '.') + { + char filename[256]; + FILE *fp; + struct stat s; + snprintf(filename, sizeof(filename), "%s/%s", dirname, de -> d_name); + if (stat(filename, &s) < 0){ + continue; + } + if (!(s.st_mode & S_IFREG)) + { + log("%s is not a regular file\n", filename); + continue; + } + fp = fopen(filename, "r"); + if (fp == NULL) + { + log("无法打开文件 %s %s\n", filename, strerror(errno)); + continue; + } + while(1) + { + char line[1024]; + char data[1024]; + if (fgets(line, sizeof(line), fp) == NULL) + break; + chop(line); + easyGetTokenFromBuf(line, '|', 1, data, sizeof(data)); + fmpoint[i].fl = atoi(data); + easyGetTokenFromBuf(line, '|', 2, data, sizeof(data)); + fmpoint[i].x = atoi(data); + easyGetTokenFromBuf(line, '|', 3, data, sizeof(data)); + fmpoint[i].y = atoi(data); + easyGetTokenFromBuf(line, '|', 4, data, sizeof(data)); + fmpoint[i].fmfl = atoi(data); + easyGetTokenFromBuf(line, '|', 5, data, sizeof(data)); + fmpoint[i].village = atoi(data); + easyGetTokenFromBuf(line, '|', 6, data, sizeof(data)); + fmpoint[i].hadfmindex = atoi(data); + easyGetTokenFromBuf(line, '|', 7, data, sizeof(data)); + strcpy(fmpoint[i].hadfmname, data); + easyGetTokenFromBuf(line, '|', 8, data, sizeof(data)); + fmpoint[i].hadfmpopular = atoi(data); + + i++; + } + fclose(fp); + } + } + closedir(d); + return 0; +} + +// 将家族庄园写入档案 +int writeFMPoint(char *dir) +{ + int i = 0; + FILE *fp; + char filename[256]; + sprintf(filename, "%s/db_fmpoint", dir); + if (db_fmpointupdate == 0) + { + log("db_fmpoint 无更新资料写入文件.\n"); + return 0; + } + fp = fopen(filename, "w"); + if (fp == NULL) + { + log("无法打开文件: %s %s\n", filename, strerror(errno)); + return -1; + } + for(i = 0; i < MAX_FMPOINT; i++) + { +#ifdef _ADD_FAMILY_TAX // WON ADD 增加庄园税收 + +#else + fprintf(fp, "%d|%d|%d|%d|%d|%d|%s|%d\n", + fmpoint[i].fl, fmpoint[i].x, fmpoint[i].y, fmpoint[i].fmfl, + fmpoint[i].village, fmpoint[i].hadfmindex, fmpoint[i].hadfmname, + fmpoint[i].hadfmpopular); +#endif + } // for + fclose(fp); + db_fmpointupdate = 0; + return 0; +} + +// 从档案中读取家族之间留言资料(启动时读取) +int readFMSMemo(char *dir) +{ + char dirname[256]; + DIR *d; + struct dirent *de; + int i = 0; + { + char tmp[256]; + snprintf(tmp, sizeof(tmp), "%s", dir); + if (mkdir(tmp, 0755) == 0) + log("create %s\n", tmp); + } + + snprintf(dirname, sizeof(dirname), "%s", dir); + d = opendir(dirname); + if (d == NULL) + { + log("无法打开文件 %s\n", dirname); + return -1; + } + while(1) + { + de = readdir(d); + if(de == NULL) break; + if (de -> d_name[0] != '.') + { + char filename[256]; + FILE *fp; + struct stat s; + snprintf(filename, sizeof(filename), "%s/%s", dirname, de -> d_name); + if (stat(filename, &s) < 0){ + continue; + } + if (!(s.st_mode & S_IFREG)) + { + log("%s 不是正常文件\n", filename); + continue; + } + fp = fopen(filename, "r"); + if (fp == NULL) + { + log("无法打开文件 %s %s\n", filename, strerror(errno)); + continue; + } + { + char line[15000]; + char data[15000]; + if (fgets(line, sizeof(line), fp) == NULL) + break; + chop(line); + easyGetTokenFromBuf(line, '|', 1, data, sizeof(data)); + fmsmemo.num = atoi(data); + easyGetTokenFromBuf(line, '|', 2, data, sizeof(data)); + fmsmemo.fmsnowwritenum = atoi(data); + for (i = 0; i < fmsmemo.num; i++){ + easyGetTokenFromBuf(line, '|', 3 + i, data, sizeof(data)); + strcpy(fmsmemo.memodata[i], data); + } + } + fclose(fp); + } + } + closedir(d); + return 0; +} + +// 将家族之间留言资料写入档案 +int writeFMSMemo(char *dir) +{ + int i = 0; + FILE *fp; + char filename[256]; + sprintf(filename, "%s/db_fmsmemo", dir); + if (db_fmsmemoupdate == 0) + { + log("db_fmsmemo 无更新资料写入文件.\n"); + return 0; + } + fp = fopen(filename, "w"); + if (fp == NULL) + { + log("无法打开文件: %s %s\n", filename, strerror(errno)); + return -1; + } + fprintf(fp, "%d|%d", fmsmemo.num, fmsmemo.fmsnowwritenum); + for(i = 0; i < fmsmemo.num; i++) + { + fprintf(fp, "|%s", fmsmemo.memodata[i]); + log("%s\n", fmsmemo.memodata[i]); + } // for + fprintf(fp, "\n"); + fclose(fp); + db_fmsmemoupdate = 0; + return 0; +} + +// 取得未使用的 index +int getblankindex() +{ + int i = 0; + for(i = 0; i < MAX_FAMILY; i++) + if (((family[i].fmindex <= 0) || (family[i].fmindex > MAX_FAMILY)) + && (strcmp(family[i].fmname, "") == 0)) + return i; + return -1; +} + +// 取得未使用的 fmindex +int getblankfmindex() +{ + int i = 0, j = 0; + for (i = 1; i <= MAX_FAMILY; i++) + { + int useflag = 0; + for (j = 0; j < MAX_FAMILY; j++) + { + if (family[j].fmindex == i) + { + useflag = 1; + continue; + } + } + if (useflag == 0) + return i; + } + return -1; +} + +// 从 fmindex, fmname 取得 index +int getindex(int fmindex, char *fmname) +{ + int i = 0; + for (i = 0; i <= fmindexmaxnum; i++) + { + if ((family[i].fmindex == fmindex) + && (strcmp(family[i].fmname, fmname) == 0)) + return i; + } + return -1; +} + +// 删除庄园的家族 fmindex +int delfmpointindex(int fmindex) +{ + int i; + for (i = 0; i < MAX_FMPOINT; i++) + { + if (fmpoint[i].hadfmindex == fmindex) + { + fmpoint[i].hadfmindex = -1; + strcpy(fmpoint[i].hadfmname, "-1"); + fmpoint[i].hadfmpopular = -1; + + db_fmpointupdate = 1; + return 0; + } + } + return -1; +} + +// 检查 index 是否已使用 +int CheckFMUse(int index) +{ + if ((index >= MAX_FAMILY) || (index < 0)) + return -1; + if ((family[index].fmindex < 0) || (strcmp(family[index].fmname, "") == 0)) + return 0; + else + return 1; +} + +// 检查 index fmindex, fmname资料是否正确 +int CheckFM(int *index, char *fmname, int fmindex) +{ + if (*index == -1){ + *index = getindex(fmindex, fmname); + } + if ((*index > MAX_FAMILY) || (*index < 0)){ + log ("CheckFM_2 *index: big small? %d\n", *index); + return -1; + }else { + if ((family[*index].fmindex != fmindex) + || strcmp(family[*index].fmname, fmname) != 0) + { + log("CheckFM_3 [*index].fmindex:%d fmindex:%d [index].fmname:%s fmname:%s\n", + family[*index].fmindex, fmindex, family[*index].fmname, fmname); + return -1; + } + } + if (*index == -1){ + log ("CheckFM_4 index: -1 ? %d\n", *index); + return -1; + } + if(CheckFMUse(*index) == 0) + { + log ("CheckFM_5 index: -1 ? %d\n", *index); + return -1; + } + if (family[*index].fmnum > MAX_MEMBERNUM || family[*index].fmjoinnum > MAX_MEMBERNUM) + { + log ("CheckFM_6 fmnum: -1 ? %d\n", family[*index].fmnum); + return -1; + } + return 0; +} + +// 删除人数不足之家族或太久未上站之成员 +void delovertimeFMMem(int time) +{ + int i = 0, j = 0, k = 0; + char data[150 * MAX_FAMILY]; + extern gmsv gs[MAXCONNECTION]; + for (i = 0 ; i <= fmindexmaxnum; i++){ + if(CheckFMUse(i) == 0) + continue; + if ( ( (family[i].predel_time < time) && (family[i].predel_time != -1) + && (family[i].fmsetupflag != 1)) || (family[i].fmjoinnum==0) ){ + + log("ACDelOverTimeFM fmindex:%d fmname:%s fmjoinnum:%d flag:%d \n", + family[i].fmindex, family[i].fmname, + family[i].fmjoinnum, family[i].fmsetupflag ); + + ACDelFM(i, family[i].fmname, family[i].fmindex); + + // 传送家族已删除之讯息至各 GMSV + for (k = 0; k < MAXCONNECTION; k++){ + if (gs[k].use && gs[k].name[0]) + saacproto_ACFMAnnounce_send(k, SUCCESSFUL, + family[i].fmname, family[i].fmindex, i, + 2, "", 0); + } + + db_familyupdate[i] = 1; + continue; + } + + for (j = 1; j < family[i].fmmemberindexmaxnum; j++){ + if (family[i].fmmemberindex[j].charflag == FMMEMBER_NONE) + continue; + if ((family[i].fmmemberindex[j].predeltime < time) + && (family[i].fmmemberindex[j].predeltime != -1)){ +#ifdef _FMVER21 + ACMemberLeaveFM(i, family[i].fmname, family[i].fmindex, + family[i].fmmemberindex[j].charname, 0, j, 0); +#else + ACMemberLeaveFM(i, family[i].fmname, family[i].fmindex, + family[i].fmmemberindex[j].charname, 0, j); +#endif + db_familyupdate[i] = 1; + + /* + // 通知族长有玩家已被删除 + if (family[i].fmmemberindex[0].onlineflag > 0) + { + char buf[256]; + sprintf(buf, "(%s)因太久未上线而离开您的家族了!目前家族人数:%4d人", + family[i].fmmemberindex[j].charname, family[i].fmjoinnum); + saacproto_ACFMAnnounce_send(family[i].fmmemberindex[0].onlineflag, + SUCCESSFUL, family[i].fmname, family[i].fmindex, i, 3, buf, + family[i].fmmemberindex[0].charfdid); + } + */ + + } // if + } // for + } // for + if (db_familyupdate[i] == 1) + { + strcpy(data, ""); + for (i = 0; i <= fmindexmaxnum; i++) + { + char msg[256]; + if ((strcmp(family[i].fmname, "") != 0) && (family[i].fmindex != -1)) + { +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + sprintf(msg, "%d %s %s %d %d %d %d %d|", family[i].fmindex, family[i].fmname, + family[i].fmleadername, family[i].fmtotalfame, family[i].fmjoinnum, i, + family[i].fmsetupflag, family[i].fmacceptflag); +#else + sprintf(msg, "%d %s %s %d %d %d %d %d|", family[i].fmindex, family[i].fmname, + family[i].fmleadername, family[i].fmpopular, family[i].fmjoinnum, i, + family[i].fmsetupflag, family[i].fmacceptflag); +#endif + strcat(data, msg); + } + } + for (i = 0; i < MAXCONNECTION; i++) + { + if (gs[i].use && gs[i].name[0]) + saacproto_ACShowFMList_send(i, SUCCESSFUL, fmnownum, data); + } + } +} + +// 成立家族 +#ifdef _PERSONAL_FAME +int ACAddFM(int fd, int *workindex, char *fmname, char *fmleadername, + char *fmleaderid, int fmleaderlv, char *petname, char *petattr, + char *fmrule, int fmsprite, int fmleadergrano, int fame, int charfdid) +#else +int ACAddFM(int fd, int *workindex, char *fmname, char *fmleadername, + char *fmleaderid, int fmleaderlv, char *petname, char *petattr, + char *fmrule, int fmsprite, int fmleadergrano, int charfdid) +#endif +{ + int i = 0, index, fmindex; + time_t t1; + index = getblankindex(); + if (index == -1) { + return -1; // 家族数量已满 + } + fmindex = getblankfmindex(); + if (fmindex == -1){ + return -1; // 家族数量已满,无空的 fmindex + } + for (i = 0; i <= fmindexmaxnum; i++){ + if (strcmp(family[i].fmname, fmname) == 0) + return -2; // 已有相同家族名称存在 + } + *workindex = index; + family[index].fmindex = fmindex; + strcpy(family[index].fmname, fmname); + strcpy(family[index].fmleadername, fmleadername); + strcpy(family[index].fmleaderid, fmleaderid); + family[index].fmleadergrano = fmleadergrano; + strcpy(family[index].petname, petname); + strcpy(family[index].petattr, petattr); + family[index].fmnum = 1; + family[index].fmjoinnum = 1; + family[index].fmacceptflag = 1; + strcpy(family[index].fmrule, fmrule); + family[index].fmsprite = fmsprite; + family[index].fmpointindex = -1; + family[index].fmgold = 0; + family[index].fmmemberindexmaxnum = 1; + time(&t1); + family[index].apply_time = t1; + family[index].predel_time = t1 + PREDEL_TIME; + family[index].fmmemberindex[0].charlv = fmleaderlv; +#ifdef _FMVER21 + family[index].fmmemberindex[0].charflag = FMMEMBER_LEADER; + family[index].fmmemberindex[0].eventflag = 1; +#else + family[index].fmmemberindex[0].charflag = 1; +#endif + family[index].fmmemberindex[0].onlineflag = fd; + strcpy(family[index].fmmemberindex[0].charid, fmleaderid); + strcpy(family[index].fmmemberindex[0].charname, fmleadername); + family[index].fmmemberindex[0].charfdid = charfdid; + family[index].fmmemberindex[0].predeltime = -1; + family[index].memonowwritenum = 0; + family[index].memonum = 0; + family[index].fmpopular = 0; + family[index].fmadv = 0; + family[index].fmfeed = 0; + family[index].fmsynthesize = 0; + family[index].fmdealfood = 0; + family[index].fmpk = 0; +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + family[index].fmmemberindex[0].popular = fame; + family[index].fmtotalfame = fame; +#endif +#ifdef _NEW_MANOR_LAW + family[index].fmmomentum = 0; +#endif + + db_familyupdate[index] = 1; + fmnownum++; + if (fmindexmaxnum <= index) fmindexmaxnum = index + 1; + log("AddFM fmindexmaxnum:%d fmnownum:%d\n", fmindexmaxnum, fmnownum); + + AddFMMaintainSort(index); + + return fmindex; +} + +// 加入家族 +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 +int ACJoinFM(int fd, int index, char *fmname, int fmindex, + char *charname, char *charid, int charlv, int fame, int charfdid) +#else +int ACJoinFM(int fd, int index, char *fmname, int fmindex, + char *charname, char *charid, int charlv, int charfdid) +#endif +{ + int i = 0; + time_t t1; + if (CheckFM(&index, fmname, fmindex) < 0) return -1; + if (family[index].fmacceptflag == 0) return -2; + if (family[index].fmnum >= MAX_MEMBERNUM || family[index].fmjoinnum >= MAX_MEMBERNUM) + return -3; + + // 防止族长加入自己的家族 code:shan + if ((strcmp(family[index].fmmemberindex[0].charname, charname) == 0) + && (strcmp(family[index].fmmemberindex[0].charid, charid) == 0)) + return -1; + + for (i = 1; i < MAX_MEMBERNUM; i++){ + if ((strcmp(family[index].fmmemberindex[i].charname, "") == 0) + && (strcmp(family[index].fmmemberindex[i].charid, "") == 0)){ + strcpy(family[index].fmmemberindex[i].charname, charname); + strcpy(family[index].fmmemberindex[i].charid, charid); + family[index].fmmemberindex[i].charlv = charlv; +#ifdef _FMVER21 + family[index].fmmemberindex[i].charflag = FMMEMBER_APPLY; + family[index].fmmemberindex[i].eventflag = 0; +#else + family[index].fmmemberindex[i].charflag = 2; +#endif + family[index].fmmemberindex[i].onlineflag = fd; + family[index].fmmemberindex[i].charfdid = charfdid; + time(&t1); + family[index].fmmemberindex[i].predeltime = t1 + PREDEL_TIME; +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + family[index].fmmemberindex[i].popular = fame; + log("fame:%d\n", fame); + // 这个时候还不可以把这个人的声望加到家族 +#endif +#ifdef _NEW_MANOR_LAW + family[index].fmmemberindex[i].momentum = 0; +#endif + family[index].fmnum = family[index].fmnum + 1; + if (family[index].fmmemberindexmaxnum <= i) family[index].fmmemberindexmaxnum = i + 1; + db_familyupdate[index] = 1; +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + // 更新玩家资料 + saacproto_ACFMCharLogin_send( + family[index].fmmemberindex[i].onlineflag, + SUCCESSFUL, index,ACgetFMFloor(fmindex), family[index].fmtotalfame, + family[index].fmmemberindex[i].charflag, + family[index].fmsetupflag, 1, i, + family[index].fmmemberindex[i].popular, // Arminius 9.11 + family[index].fmmemberindex[i].charfdid +#ifdef _NEW_MANOR_LAW + ,family[index].fmmemberindex[i].momentum +#endif + ); +#else + saacproto_ACFMCharLogin_send( + family[index].fmmemberindex[i].onlineflag, + SUCCESSFUL, index,ACgetFMFloor(fmindex),family[index].fmpopular, + family[index].fmmemberindex[i].charflag, + family[index].fmsetupflag, 1, i, + family[index].fmmemberindex[i].charfdid); +#endif + // 通知族长有玩家愿意加入 + if (family[index].fmmemberindex[0].onlineflag > 0){ + char buf[256]; + sprintf(buf, "(%s lv:%d)正要求加入您的家族喔!目前家族人数:%4d人", + charname, charlv, family[index].fmjoinnum); + saacproto_ACFMAnnounce_send(family[index].fmmemberindex[0].onlineflag, + SUCCESSFUL, fmname, fmindex, index, 3, buf, + family[index].fmmemberindex[0].charfdid); + } + return 0; + } + } + return -1; +} + +// 离开家族 +int ACLeaveFM(int index, char *fmname, int fmindex, + char *charname, char* charid) +{ + int i = 0; + if (CheckFM(&index, fmname, fmindex) < 0) return -1; + + for (i = 1; i < family[index].fmmemberindexmaxnum; i++) + { + if ((strcmp(family[index].fmmemberindex[i].charname, charname) == 0) + && (strcmp(family[index].fmmemberindex[i].charid, charid) == 0)) + { +#ifdef _FMVER21 + ACMemberLeaveFM(index, fmname, fmindex, charname, 0, i, 0); +#else + ACMemberLeaveFM(index, fmname, fmindex, charname, 0, i); +#endif + db_familyupdate[index] = 1; + // 通知族长有玩家已离开家族 + if (family[index].fmmemberindex[0].onlineflag > 0) + { + char buf[256]; + sprintf(buf, "(%s)已经离开您的家族了!目前家族人数:%4d人", + charname, family[index].fmjoinnum); + saacproto_ACFMAnnounce_send(family[index].fmmemberindex[0].onlineflag, + SUCCESSFUL, fmname, fmindex, index, 3, buf, + family[index].fmmemberindex[0].charfdid); + } + return 0; + } + } + return -1; +} +#ifdef _FAMILYBANKSTONELOG +int ACgetFMBankgold(int index, char *fmname,int fmindex,int charindex) +{ + return family[index].fmgold; +} +#endif +// 修正家族资料 +// kindflag 1:是否继续招募家族成员 2:家族PK声望 3:家族守护兽 4:家族主旨 +// 5:解散家族时间 6:家族基金 7:家族冒险声望 8:家族饲育声望 +// 9:家族合成、加工声望 10:家族料理声望 11:族长禅让 +int ACFixFMData(int index, char *fmname, int fmindex, int kindflag, int charindex, + char *data1, char *data2) +{ + int recvdata = 0; + if (CheckFM(&index, fmname, fmindex) < 0) return -1; + + if (kindflag == 1 || kindflag == 2 || (kindflag >= 6 && kindflag <= 11) +#ifdef _NEW_MANOR_LAW + || kindflag == 12 || kindflag == 13 +#endif + ){ + recvdata = atoi(data1); + if (recvdata > MAXRECVPOP && (kindflag == 2 || (kindflag >= 7 && kindflag <= 10))) { + log("ACDelOverTimePOP index:%d fmname:%s kindflag:%d charindex:%d recvdata:%d\n", + index, fmname, kindflag, charindex, recvdata); + return -1; + } + } + if (kindflag == 1) + family[index].fmacceptflag = recvdata; + else if (kindflag == 2){ + family[index].fmpk = family[index].fmpk + recvdata; + if (family[index].fmpk < MINFMPOPNUM) family[index].fmpk = MINFMPOPNUM; + if (family[index].fmpk > MAXFMPOPNUM) family[index].fmpk = MAXFMPOPNUM; + }else if (kindflag == 3){ + if ((strcmp(data1, "") == 0) || (strcmp(data2, "") == 0)) return -1; + strcpy(family[index].petname, data1); + strcpy(family[index].petattr, data2); + if (family[index].fmsetupflag == 1) + family[index].predel_time = -1; + }else if (kindflag == 4){ + if (strcmp(data1, "") == 0) return -1; + strcpy(family[index].fmrule, data1); + }else if (kindflag == 5){ + time_t t1; + time(&t1); + family[index].predel_time = t1 + PREDEL_TIME; + }else if (kindflag == 6){ + if (family[index].fmgold + recvdata < 0) return -1; + family[index].fmgold = family[index].fmgold + recvdata; + if (family[index].fmgold > FMMAXGOLD) + family[index].fmgold = FMMAXGOLD; + sprintf(data2,"%d",family[index].fmgold); + } + else if (kindflag == 7){ + family[index].fmadv = family[index].fmadv + recvdata; + if (family[index].fmadv < 0) family[index].fmadv = 0; + if (family[index].fmadv > MAXFMPOPNUM) family[index].fmadv = MAXFMPOPNUM; +#ifdef _NEW_MANOR_LAW + family[index].fmmemberindex[charindex].momentum += recvdata; + if (family[index].fmmemberindex[charindex].momentum < 0) family[index].fmmemberindex[charindex].momentum = 0; + if (family[index].fmmemberindex[charindex].momentum > MAXFMPOPNUM) family[index].fmmemberindex[charindex].momentum = MAXFMPOPNUM; + family[index].fmmemberindex[charindex].popular = atoi(data2); +#endif + }else if (kindflag == 8){ + family[index].fmfeed = family[index].fmfeed + recvdata; + if (family[index].fmfeed < 0) family[index].fmfeed = 0; + if (family[index].fmfeed > MAXFMPOPNUM) family[index].fmfeed = MAXFMPOPNUM; +#ifdef _NEW_MANOR_LAW + family[index].fmmemberindex[charindex].momentum += recvdata; + if (family[index].fmmemberindex[charindex].momentum < 0) family[index].fmmemberindex[charindex].momentum = 0; + if (family[index].fmmemberindex[charindex].momentum > MAXFMPOPNUM) family[index].fmmemberindex[charindex].momentum = MAXFMPOPNUM; + family[index].fmmemberindex[charindex].popular = atoi(data2); +#endif + } +#ifndef _NEW_MANOR_LAW + else if (kindflag == 9){ + family[index].fmsynthesize = family[index].fmsynthesize + recvdata; + if (family[index].fmsynthesize < 0) family[index].fmsynthesize = 0; + if (family[index].fmsynthesize > MAXFMPOPNUM) family[index].fmsynthesize = MAXFMPOPNUM; + } + else if (kindflag == 10){ + family[index].fmdealfood = family[index].fmdealfood + recvdata; + if (family[index].fmdealfood < 0) family[index].fmdealfood = 0; + if (family[index].fmdealfood > MAXFMPOPNUM) family[index].fmdealfood = MAXFMPOPNUM; + } +#endif +#ifdef _FMVER21 + else if (kindflag == 11){ + char charname[256], charid[256]; + int charlv, onlineflag, charfdid, popular; +#ifdef _NEW_MANOR_LAW + int momentum; +#endif + int floor = ACgetFMFloor(fmindex); + if (strcmp(family[index].fmmemberindex[charindex].charname, data2) != 0 + || strcmp(family[index].fmmemberindex[charindex].charid, "") == 0) + return -1; + // shan 2002/01/04 + log("\nshan-->fmindex:%d fmname:%s newleadername:%s newleaderid->%s\n", + fmindex, fmname, family[index].fmmemberindex[charindex].charname, + family[index].fmmemberindex[charindex].charid ); + strcpy(charname, family[index].fmmemberindex[charindex].charname); + strcpy(charid, family[index].fmmemberindex[charindex].charid); + charlv = family[index].fmmemberindex[charindex].charlv; + onlineflag = family[index].fmmemberindex[charindex].onlineflag; + charfdid = family[index].fmmemberindex[charindex].charfdid; + popular = family[index].fmmemberindex[charindex].popular; +#ifdef _NEW_MANOR_LAW + momentum = family[index].fmmemberindex[charindex].momentum; +#endif + // 资料转换 + strcpy(family[index].fmmemberindex[charindex].charname, + family[index].fmmemberindex[0].charname); + strcpy(family[index].fmmemberindex[charindex].charid, + family[index].fmmemberindex[0].charid); + family[index].fmmemberindex[charindex].charlv = family[index].fmmemberindex[0].charlv; + family[index].fmmemberindex[charindex].charflag = FMMEMBER_MEMBER; + family[index].fmmemberindex[charindex].onlineflag = family[index].fmmemberindex[0].onlineflag; + family[index].fmmemberindex[charindex].charfdid = family[index].fmmemberindex[0].charfdid; + family[index].fmmemberindex[charindex].popular = family[index].fmmemberindex[0].popular; +#ifdef _NEW_MANOR_LAW + family[index].fmmemberindex[charindex].momentum = family[index].fmmemberindex[0].momentum; +#endif + + strcpy(family[index].fmmemberindex[0].charname, charname); + strcpy(family[index].fmmemberindex[0].charid, charid); + family[index].fmmemberindex[0].charlv = charlv; + family[index].fmmemberindex[0].charflag = FMMEMBER_LEADER; + family[index].fmmemberindex[0].onlineflag = onlineflag; + family[index].fmmemberindex[0].charfdid = charfdid; + family[index].fmmemberindex[0].popular = popular; +#ifdef _NEW_MANOR_LAW + family[index].fmmemberindex[0].momentum = momentum; +#endif + strcpy(family[index].fmleadername, charname); + strcpy(family[index].fmleaderid, charid); + family[index].fmleadergrano = recvdata; + strcpy(family[index].petname, ""); + strcpy(family[index].petattr, ""); + + // 更新族长资料 + if (family[index].fmmemberindex[0].onlineflag > 0) + { +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + saacproto_ACFMCharLogin_send( + family[index].fmmemberindex[0].onlineflag, + SUCCESSFUL, index, floor, family[index].fmtotalfame, + family[index].fmmemberindex[0].charflag, + family[index].fmsetupflag, 1, 0, + family[index].fmmemberindex[0].popular, // Arminius 9.11 + family[index].fmmemberindex[0].charfdid +#ifdef _NEW_MANOR_LAW + ,family[index].fmmemberindex[0].momentum +#endif + ); +#else + saacproto_ACFMCharLogin_send( + family[index].fmmemberindex[0].onlineflag, + SUCCESSFUL, index, floor, family[index].fmpopular, + family[index].fmmemberindex[0].charflag, + family[index].fmsetupflag, 1, 0, + family[index].fmmemberindex[0].charfdid); +#endif + } + // 更新成员资料 + if (family[index].fmmemberindex[charindex].onlineflag > 0) + { +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + saacproto_ACFMCharLogin_send( + family[index].fmmemberindex[charindex].onlineflag, + SUCCESSFUL, index, floor, family[index].fmtotalfame, + family[index].fmmemberindex[charindex].charflag, + family[index].fmsetupflag, 1, charindex, + family[index].fmmemberindex[charindex].popular, // Arminius 9.11 + family[index].fmmemberindex[charindex].charfdid +#ifdef _NEW_MANOR_LAW + ,family[index].fmmemberindex[charindex].momentum +#endif + ); +#else + saacproto_ACFMCharLogin_send( + family[index].fmmemberindex[charindex].onlineflag, + SUCCESSFUL, index, floor, family[index].fmpopular, + family[index].fmmemberindex[charindex].charflag, + family[index].fmsetupflag, 1, charindex, + family[index].fmmemberindex[charindex].charfdid); +#endif + } + } +#endif +#ifdef _NEW_MANOR_LAW + else if (kindflag == 12){ + family[index].fmmemberindex[charindex].momentum = recvdata; + if(family[index].fmmemberindex[charindex].momentum < 0) family[index].fmmemberindex[charindex].momentum = 0; + if(family[index].fmmemberindex[charindex].momentum > MAXFMPOPNUM) family[index].fmmemberindex[charindex].momentum = MAXFMPOPNUM; + } + else if(kindflag == 13){ + family[index].fmmemberindex[charindex].popular = recvdata; + } +#endif + if ((kindflag == 2) || (kindflag == 7) || (kindflag == 8) || (kindflag == 9) + || (kindflag == 10) +#ifdef _NEW_MANOR_LAW + || (kindflag == 12) || (kindflag == 13) +#endif + ) + { +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + // 记录玩家家族声望 +#ifndef _NEW_MANOR_LAW + if (charindex >= 0 && charindex < MAX_MEMBERNUM) + family[index].fmmemberindex[charindex].popular += recvdata; +#endif + // 计算家族声望 + family[index].fmpopular = family[index].fmadv + family[index].fmfeed + + family[index].fmsynthesize + family[index].fmdealfood + + family[index].fmpk; + { + int j; + family[index].fmtotalfame=family[index].fmpopular; +#ifdef _NEW_MANOR_LAW + family[index].fmmomentum = 0; +#endif + for (j = 0; j < MAX_MEMBERNUM; j++) { + if ((family[index].fmmemberindex[j].charflag!=FMMEMBER_NONE) && + (family[index].fmmemberindex[j].charflag!=FMMEMBER_APPLY) ) + { + family[index].fmtotalfame += family[index].fmmemberindex[j].popular; +#ifdef _NEW_MANOR_LAW + // 家族成员个人气势加总 + family[index].fmmomentum += family[index].fmmemberindex[j].momentum; +#endif + } + } +#ifdef _NEW_MANOR_LAW + // 家族气势 = (家族人数平方) / 10 + 1 + 家族成员个人气势加总 + family[index].fmmomentum += ((family[index].fmjoinnum * family[index].fmjoinnum) / 10 + 1) * 100; + log("\nACFixFMData total family momentum %d\n",family[index].fmmomentum); +#endif + } + sortFamily(); + if (family[index].fmpointindex >= 0){ + fmpoint[family[index].fmpointindex].hadfmpopular = family[index].fmtotalfame; + db_fmpointupdate = 1; + } +#else + family[index].fmpopular = family[index].fmadv + family[index].fmfeed + + family[index].fmsynthesize + family[index].fmdealfood + + family[index].fmpk; + sortFamily(); + if (family[index].fmpointindex >= 0){ + fmpoint[family[index].fmpointindex].hadfmpopular = family[index].fmpopular; + db_fmpointupdate = 1; + } + // 记录玩家家族声望 + if (charindex >= 0 && charindex < MAX_MEMBERNUM) + family[index].fmmemberindex[charindex].popular = + family[index].fmmemberindex[charindex].popular + recvdata; +#endif + // 更新族长资料 + if (family[index].fmmemberindex[0].onlineflag > 0) + { + int floor = ACgetFMFloor(fmindex); +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + saacproto_ACFMCharLogin_send( + family[index].fmmemberindex[0].onlineflag, + SUCCESSFUL, index, floor, family[index].fmtotalfame, +#ifdef _FMVER21 + family[index].fmmemberindex[0].charflag, family[index].fmsetupflag, 1, 0, +#else + 1, family[index].fmsetupflag, 1, 0, +#endif + family[index].fmmemberindex[0].popular, // Arminius 9.11 + family[index].fmmemberindex[0].charfdid +#ifdef _NEW_MANOR_LAW + ,family[index].fmmemberindex[0].momentum +#endif + ); +#else + saacproto_ACFMCharLogin_send( + family[index].fmmemberindex[0].onlineflag, + SUCCESSFUL, index, floor, family[index].fmpopular, +#ifdef _FMVER21 + family[index].fmmemberindex[0].charflag, family[index].fmsetupflag, 1, 0, +#else + 1, family[index].fmsetupflag, 1, 0, +#endif + family[index].fmmemberindex[0].charfdid); +#endif + } + } + db_familyupdate[index] = 1; + return kindflag; +} + +// 更改PK後家族PK值 +int ACFixFMPK(int winindex, char* winfmname, int winfmindex, int loseindex, + char* losefmname, int losefmindex) +{ + int award = 0; + if (CheckFM(&winindex, winfmname, winfmindex) < 0) return -1; + if (CheckFM(&loseindex, losefmname, losefmindex) < 0) return -1; + + award = (family[loseindex].fmpopular / 10); + if (family[loseindex].fmpopular - award < 0) + award = family[loseindex].fmpopular; + + family[loseindex].fmpk = family[loseindex].fmpk - award; + family[winindex].fmpk = family[winindex].fmpk + award; + + if (family[loseindex].fmpk < MINFMPOPNUM) + { +#if 1 // Robin 2003/11/27 修正输方家族PK声望到达下限时胜方可洗声望 + int overpoint; + overpoint = MINFMPOPNUM - family[loseindex].fmpk; + family[winindex].fmpk = family[winindex].fmpk - overpoint; +#endif + family[loseindex].fmpk = MINFMPOPNUM; + } + // CoolFish: 2001/11/28 MINFMPOPNUM -> MAXFMPOPNUM + if (family[winindex].fmpk > MAXFMPOPNUM) + family[winindex].fmpk = MAXFMPOPNUM; + + { + family[winindex].fmpopular = family[winindex].fmadv + family[winindex].fmfeed + + family[winindex].fmsynthesize + family[winindex].fmdealfood + + family[winindex].fmpk; + +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + { + int j; + family[winindex].fmtotalfame=family[winindex].fmpopular; + for (j = 0; j < MAX_MEMBERNUM; j++) { + if ((family[winindex].fmmemberindex[j].charflag!=FMMEMBER_NONE) && + (family[winindex].fmmemberindex[j].charflag!=FMMEMBER_APPLY) ) + family[winindex].fmtotalfame += family[winindex].fmmemberindex[j].popular; + } + } +#endif + + if (family[winindex].fmmemberindex[0].onlineflag > 0) + { + int floor = ACgetFMFloor(winfmindex); +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + saacproto_ACFMCharLogin_send( + family[winindex].fmmemberindex[0].onlineflag, + SUCCESSFUL, winindex, floor, family[winindex].fmtotalfame, + #ifdef _FMVER21 + family[winindex].fmmemberindex[0].charflag, family[winindex].fmsetupflag, 1, 0, + #else + 1, family[winindex].fmsetupflag, 1, 0, + #endif + family[winindex].fmmemberindex[0].popular, // Arminius 9.11 + family[winindex].fmmemberindex[0].charfdid + #ifdef _NEW_MANOR_LAW + ,family[winindex].fmmemberindex[0].momentum + #endif + ); +#else + saacproto_ACFMCharLogin_send( + family[winindex].fmmemberindex[0].onlineflag, + SUCCESSFUL, winindex, floor, family[winindex].fmpopular, + #ifdef _FMVER21 + family[winindex].fmmemberindex[0].charflag, family[winindex].fmsetupflag, 1, 0, + #else + 1, family[winindex].fmsetupflag, 1, 0, + #endif + family[winindex].fmmemberindex[0].charfdid); +#endif + } + family[loseindex].fmpopular = family[loseindex].fmadv + family[loseindex].fmfeed + + family[loseindex].fmsynthesize + family[loseindex].fmdealfood + + family[loseindex].fmpk; + +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + { + int j; + family[loseindex].fmtotalfame=family[loseindex].fmpopular; + for (j = 0; j < MAX_MEMBERNUM; j++) { + if ((family[loseindex].fmmemberindex[j].charflag!=FMMEMBER_NONE) && + (family[loseindex].fmmemberindex[j].charflag!=FMMEMBER_APPLY) ) + family[loseindex].fmtotalfame += family[loseindex].fmmemberindex[j].popular; + } + } +#endif + + if (family[loseindex].fmmemberindex[0].onlineflag > 0) + { + int floor = ACgetFMFloor(losefmindex); +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + saacproto_ACFMCharLogin_send( + family[loseindex].fmmemberindex[0].onlineflag, + SUCCESSFUL, loseindex, floor, family[loseindex].fmtotalfame, + #ifdef _FMVER21 + family[loseindex].fmmemberindex[0].charflag, family[loseindex].fmsetupflag, 1, 0, + #else + 1, family[loseindex].fmsetupflag, 1, 0, + #endif + family[loseindex].fmmemberindex[0].popular, // Arminius 9.11 + family[loseindex].fmmemberindex[0].charfdid + #ifdef _NEW_MANOR_LAW + ,family[loseindex].fmmemberindex[0].momentum + #endif + ); +#else + saacproto_ACFMCharLogin_send( + family[loseindex].fmmemberindex[0].onlineflag, + SUCCESSFUL, loseindex, floor, family[loseindex].fmpopular, + #ifdef _FMVER21 + family[loseindex].fmmemberindex[0].charflag, family[loseindex].fmsetupflag, 1, 0, + #else + 1, family[loseindex].fmsetupflag, 1, 0, + #endif + family[loseindex].fmmemberindex[0].charfdid); +#endif + } + } + sortFamily(); + if (family[winindex].fmpointindex >= 0) + { +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + fmpoint[family[winindex].fmpointindex].hadfmpopular = family[winindex].fmtotalfame; +#else + fmpoint[family[winindex].fmpointindex].hadfmpopular = family[winindex].fmpopular; +#endif + db_fmpointupdate = 1; + } + if (family[loseindex].fmpointindex >= 0) + { +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + fmpoint[family[loseindex].fmpointindex].hadfmpopular = family[loseindex].fmtotalfame; +#else + fmpoint[family[loseindex].fmpointindex].hadfmpopular = family[loseindex].fmpopular; +#endif + db_fmpointupdate = 1; + } + return award; +} + +// 解散家族 +int ACDelFM(int index, char *fmname, int fmindex) +{ + int i; + if (CheckFM(&index, fmname, fmindex) < 0) return -1; + + log("\nACDelFM index:%d fmname:%s fmindex:%d\n", index, fmname, fmindex); + + if (family[index].fmpointindex >= 0) + { + delfmpointindex(family[index].fmindex); + family[index].fmpointindex = -1; + } + if (family[index].memonum > 0) + { + for (i = 0; i < family[index].memonum; i++) + memset(family[index].memolist[i], 0, + sizeof(family[index].memolist[i])); + } + family[index].fmindex = -1; + memset(family[index].fmname, 0, sizeof(family[index].fmname)); + memset(family[index].memolist, 0, sizeof(family[index].memolist)); + family[index].fmnum = 0; + family[index].fmjoinnum = 0; + family[index].fmsetupflag = -1; + family[index].fmpopular = 0; + family[index].fmadv = 0; + family[index].fmfeed= 0; + family[index].fmsynthesize = 0; + family[index].fmdealfood = 0; + family[index].fmpk = 0; +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + family[index].fmtotalfame = 0; +#endif +#ifdef _NEW_MANOR_LAW + family[index].fmmomentum = 0; +#endif + for (i = 0; i < family[index].fmmemberindexmaxnum; i++) + { + // 传送最新状态给家族成员 +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + if (family[index].fmmemberindex[i].onlineflag > 0) + saacproto_ACFMCharLogin_send( + family[index].fmmemberindex[i].onlineflag, + FAILED, index, family[index].fmpointindex, + family[index].fmtotalfame, -1, family[index].fmsetupflag, 0, + i, family[index].fmmemberindex[i].popular, // Arminius 9.11 + family[index].fmmemberindex[i].charfdid + #ifdef _NEW_MANOR_LAW + ,family[index].fmmemberindex[i].momentum + #endif + ); +#else + if (family[index].fmmemberindex[i].onlineflag > 0) + saacproto_ACFMCharLogin_send( + family[index].fmmemberindex[i].onlineflag, + FAILED, index, family[index].fmpointindex, + family[index].fmpopular, -1, family[index].fmsetupflag, 0, + i, family[index].fmmemberindex[i].charfdid); +#endif + memset(family[index].fmmemberindex[i].charname, 0, + sizeof(family[index].fmmemberindex[i].charname)); + memset(family[index].fmmemberindex[i].charid, 0, + sizeof(family[index].fmmemberindex[i].charid)); + family[index].fmmemberindex[i].charflag = FMMEMBER_NONE; + family[index].fmmemberindex[i].predeltime = -1; + family[index].fmmemberindex[i].popular = 0; +#ifdef _NEW_MANOR_LAW + family[index].fmmemberindex[i].momentum = 0; +#endif + } + family[index].fmmemberindexmaxnum = 0; + fmnownum--; + if (fmindexmaxnum == index) fmindexmaxnum--; + + // 传送家族已删除之讯息至各 GMSV 以清除对战排程 + for (i = 0; i < MAXCONNECTION; i++) + { + if (gs[i].use && gs[i].name[0]) + saacproto_ACFMClearPK_send(i, SUCCESSFUL, fmname, fmindex, index); + } + + DelFMMaintainSort(index); + + db_familyupdate[i] = 1; + return 0; +} + +// 显示家族列表 +int ACShowFMList(char *data) +{ + int i = 0; + strcpy(data, ""); + + for (i = 0; i <= fmindexmaxnum; i++) + { + char msg[256]; + if ((strcmp(family[i].fmname, "") != 0) && (family[i].fmindex != -1)) + { +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + sprintf(msg, "%d %s %s %d %d %d %d %d|", family[i].fmindex, family[i].fmname, + family[i].fmleadername, family[i].fmtotalfame, family[i].fmjoinnum, i, + family[i].fmsetupflag, family[i].fmacceptflag); +#else + sprintf(msg, "%d %s %s %d %d %d %d %d|", family[i].fmindex, family[i].fmname, + family[i].fmleadername, family[i].fmpopular, family[i].fmjoinnum, i, + family[i].fmsetupflag, family[i].fmacceptflag); +#endif + strcat(data, msg); + } + } + return fmnownum; +} + +// 显示家族成员列表 +int ACShowFMMemberList(int index, int *fmacceptflag, int *fmjoinnum, char *data) +{ + int i = 0; + if ((index > MAX_FAMILY) || (index < 0)) return -1; + if (CheckFMUse(index) == 0) return -1; + + strcpy(data, ""); + *fmjoinnum = family[index].fmjoinnum; + for (i = 0; i < family[index].fmmemberindexmaxnum; i++) + { + char msg[256]; + if ((strcmp(family[index].fmmemberindex[i].charname, "") != 0) + && (strcmp(family[index].fmmemberindex[i].charid, "") != 0) + && (family[index].fmmemberindex[i].charflag != FMMEMBER_NONE)) + { +#ifdef _FM_MODIFY + #ifdef _NEW_MANOR_LAW + sprintf(msg, "%d|%s|%d|%d|%d|%d|%d|%d|%d ", i, + #else + sprintf(msg, "%d|%s|%d|%d|%d|%d|%d|%d ", i, + #endif + family[index].fmmemberindex[i].charname, + family[index].fmmemberindex[i].charlv, + family[index].fmmemberindex[i].onlineflag, + (family[index].fmmemberindex[i].popular / 100), + family[index].fmmemberindex[i].eventflag, + family[index].fmmemberindex[i].charflag, + family[index].fmmemberindex[i].gsnum + #ifdef _NEW_MANOR_LAW + ,family[index].fmmemberindex[i].momentum/100 + #endif + ); + strcat(data, msg); +#else + #ifdef _FMVER21 + sprintf(msg, "%d|%s|%d|%d|%d|%d|%d ", i, + family[index].fmmemberindex[i].charname, + family[index].fmmemberindex[i].charlv, + family[index].fmmemberindex[i].onlineflag, + (family[index].fmmemberindex[i].popular / 100), + family[index].fmmemberindex[i].eventflag, + family[index].fmmemberindex[i].charflag); + strcat(data, msg); + #else + sprintf(msg, "%d|%s|%d|%d|%d|%d ", i, + family[index].fmmemberindex[i].charname, + family[index].fmmemberindex[i].charlv, + family[index].fmmemberindex[i].onlineflag, + (family[index].fmmemberindex[i].popular / 100), + family[index].fmmemberindex[i].charflag); + strcat(data, msg); + #endif +#endif + } + } // for + *fmacceptflag = family[index].fmacceptflag; + return family[index].fmnum; +} + +// 显示家族详细资料 +int ACFMDetail(int index, char *fmname, int fmindex, char *data) +{ + if (CheckFM(&index, fmname, fmindex) < 0) return -1; + + strcpy(data, ""); + sprintf(data, "%d|%d|%s|%s|%d|%s|%s|%d|%d|%s|%d", index, family[index].fmindex, + family[index].fmname, family[index].fmleadername, + family[index].fmleadergrano, family[index].petname, family[index].petattr, + family[index].fmjoinnum, family[index].fmacceptflag, + family[index].fmrule, family[index].fmsprite ); + return 0; +} + +// 族长审核成员加入家族 +#ifdef _FMVER21 +int ACMemberJoinFM(int index, char *fmname, int fmindex, + char *charname, int charindex, int result, int meindex) +#else +int ACMemberJoinFM(int index, char *fmname, int fmindex, + char *charname, int charindex, int result) +#endif +{ + time_t t1; + int floor; + if (CheckFM(&index, fmname, fmindex) < 0) return -1; + floor = ACgetFMFloor(fmindex); + +#ifdef _FIX_LEADER_ERR // WON ADD 修正族长问题 + if (charindex == 0 ) return -1; +#endif + +#ifdef _FMVER21 + if (result < 0) return -1; + if (meindex < 0 || meindex > MAX_MEMBERNUM) return -1; +#endif + if (strcmp(family[index].fmmemberindex[charindex].charname, charname) == 0){ +#ifdef _FIXFMASSIGN // Syu ADD 修正家族一百人无法指派、移除长老 + if (family[index].fmjoinnum > MAX_MEMBERNUM) return -1; + if (result != FMMEMBER_MEMBER){ + if (result == FMMEMBER_ELDER && family[index].fmmemberindex[charindex].eventflag != 1) return -1; + if (ACFMAssignOcp(index, fmname, fmindex, charname, charindex, result) >= 0) return 0; + else return -1; + } + if( family[index].fmmemberindex[charindex].charflag == FMMEMBER_ELDER) + if (result == 1) family[index].fmmemberindex[charindex].charflag = FMMEMBER_MEMBER; +#endif + if (family[index].fmjoinnum >= MAX_MEMBERNUM) return -1; + time(&t1); + family[index].fmmemberindex[charindex].predeltime = t1 + PREDELMEMBER_TIME; + if (family[index].fmmemberindex[charindex].charflag == FMMEMBER_APPLY) family[index].fmjoinnum++; + if (family[index].fmmemberindexmaxnum <= charindex) family[index].fmmemberindexmaxnum = charindex + 1; + if (family[index].fmjoinnum >= MIN_MEMBERNUM) + { + if (family[index].fmjoinnum == MIN_MEMBERNUM) family[index].setup_time = t1; + family[index].fmsetupflag = 1; + family[index].predel_time = -1; + } + if (family[index].fmjoinnum >= MAX_MEMBERNUM) family[index].fmacceptflag = 0; +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + { + int j; + family[index].fmtotalfame=family[index].fmpopular; + for (j = 0; j < MAX_MEMBERNUM; j++) { + if ((family[index].fmmemberindex[j].charflag!=FMMEMBER_NONE) && + (family[index].fmmemberindex[j].charflag!=FMMEMBER_APPLY) ) + family[index].fmtotalfame += family[index].fmmemberindex[j].popular; + } + } +#endif +#ifdef _FMVER21 + if (result != FMMEMBER_MEMBER) + { + if (result == FMMEMBER_ELDER && family[index].fmmemberindex[charindex].eventflag != 1) + return -1; + if (ACFMAssignOcp(index, fmname, fmindex, charname, charindex, result) >= 0) + return 0; + else return -1; + } +#endif + if (family[index].fmmemberindex[charindex].onlineflag > 0){ + char buf[256]; + // 通知玩家 +#ifdef _FMVER21 + if (family[index].fmmemberindex[charindex].charflag != FMMEMBER_APPLY) + sprintf(buf, "%s族长已经将你的家族职等改为%s!", + family[index].fmname, MEMBERKIND_INTDATA[result]); + else + sprintf(buf, "恭喜你!%s已经审核完毕您的加入申请!", + family[index].fmmemberindex[meindex].charname); +#else + sprintf(buf, "恭喜你!%s族长已经审核完毕您的加入申请!", family[index].fmname); +#endif + saacproto_ACFMAnnounce_send(family[index].fmmemberindex[charindex].onlineflag, + SUCCESSFUL, fmname, fmindex, index, 3, buf, + family[index].fmmemberindex[charindex].charfdid); +#ifdef _FMVER21 + family[index].fmmemberindex[charindex].charflag = FMMEMBER_MEMBER; + // 计算家族声望 + family[index].fmpopular = family[index].fmadv + family[index].fmfeed + + family[index].fmsynthesize + family[index].fmdealfood + + family[index].fmpk; + { + int j; + family[index].fmtotalfame = family[index].fmpopular; + for (j = 0; j < MAX_MEMBERNUM; j++) + { + if ((family[index].fmmemberindex[j].charflag != FMMEMBER_NONE) && + (family[index].fmmemberindex[j].charflag != FMMEMBER_APPLY) ) + family[index].fmtotalfame += family[index].fmmemberindex[j].popular; + } + } +#else + family[index].fmmemberindex[charindex].charflag = 1; +#endif +#ifdef _NEW_MANOR_LAW + { + int i; + + family[index].fmmomentum = 0; + for(i=0;i 0) + { +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + saacproto_ACFMCharLogin_send( + family[index].fmmemberindex[0].onlineflag, + SUCCESSFUL, index, floor, family[index].fmtotalfame, + #ifdef _FMVER21 + family[index].fmmemberindex[0].charflag, family[index].fmsetupflag, 1, 0, + #else + 1, family[index].fmsetupflag, 1, 0, + #endif + family[index].fmmemberindex[0].popular, // Arminius 9.11 + family[index].fmmemberindex[0].charfdid + #ifdef _NEW_MANOR_LAW + ,family[index].fmmemberindex[0].momentum + #endif + ); +#else + saacproto_ACFMCharLogin_send( + family[index].fmmemberindex[0].onlineflag, + SUCCESSFUL, index, floor, family[index].fmpopular, + #ifdef _FMVER21 + family[index].fmmemberindex[0].charflag, family[index].fmsetupflag, 1, 0, + #else + 1, family[index].fmsetupflag, 1, 0, + #endif + family[index].fmmemberindex[0].charfdid); +#endif + } +#ifdef _FMVER21 + family[index].fmmemberindex[charindex].charflag = FMMEMBER_MEMBER; +#else + family[index].fmmemberindex[charindex].charflag = 1; +#endif + } + db_familyupdate[index] = 1; + return 0; + return -1; +} + +// 族长审核成员离开家族 +#ifdef _FMVER21 +int ACMemberLeaveFM(int index, char *fmname, int fmindex, + char *charname, int flag, int charindex, int meindex) +#else +int ACMemberLeaveFM(int index, char *fmname, int fmindex, + char *charname, int flag, int charindex) +#endif +{ + time_t t1; + if (CheckFM(&index, fmname, fmindex) < 0) return -1; +#ifdef _FMVER21 + if (meindex < 0 || meindex > MAX_MEMBERNUM) return -1; +#endif + +#ifdef _FIX_LEADER_ERR // WON ADD 修正族长问题 + if (charindex == 0 ) return -1; +#endif + + if (strcmp(family[index].fmmemberindex[charindex].charname, charname) == 0) + { + if (family[index].fmmemberindex[charindex].charflag <= 0) return -1; + if (family[index].fmmemberindex[charindex].onlineflag > 0) + { + char buf[256]; +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + saacproto_ACFMCharLogin_send( + family[index].fmmemberindex[charindex].onlineflag, + FAILED, index, family[index].fmpointindex, + 0, -1, family[index].fmsetupflag, 1, + charindex, + family[index].fmmemberindex[charindex].popular, // Arminius 9.11 + family[index].fmmemberindex[charindex].charfdid + #ifdef _NEW_MANOR_LAW + ,family[index].fmmemberindex[charindex].momentum + #endif + ); +#else + saacproto_ACFMCharLogin_send( + family[index].fmmemberindex[charindex].onlineflag, + FAILED, index, family[index].fmpointindex, + family[index].fmpopular, -1, family[index].fmsetupflag, 1, + charindex, family[index].fmmemberindex[charindex].charfdid); +#endif + // 通知玩家 + if (flag == 1) + { +#ifdef _FMVER21 + sprintf(buf, "%s已经将你踢出家族了!", family[index].fmmemberindex[meindex].charname); +#else + sprintf(buf, "%s族长已经将你踢出家族了!", family[index].fmname); +#endif + saacproto_ACFMAnnounce_send(family[index].fmmemberindex[charindex].onlineflag, + SUCCESSFUL, fmname, fmindex, index, 3, buf, + family[index].fmmemberindex[charindex].charfdid); + } + } + memset(family[index].fmmemberindex[charindex].charname, 0, + sizeof(family[index].fmmemberindex[charindex].charname)); + memset(family[index].fmmemberindex[charindex].charid, 0, + sizeof(family[index].fmmemberindex[charindex].charid)); + family[index].fmmemberindex[charindex].onlineflag = -1; + family[index].fmmemberindex[charindex].popular = 0; +#ifdef _FMVER21 + family[index].fmmemberindex[charindex].eventflag = 0; + if (family[index].fmmemberindex[charindex].charflag != FMMEMBER_APPLY) +#else + if(family[index].fmmemberindex[charindex].charflag != 2) +#endif + family[index].fmjoinnum = family[index].fmjoinnum - 1; + family[index].fmnum = family[index].fmnum - 1; + family[index].fmmemberindex[charindex].charflag = FMMEMBER_NONE; +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + { + int j; + family[index].fmtotalfame=family[index].fmpopular; + for (j = 0; j < MAX_MEMBERNUM; j++) { + if ((family[index].fmmemberindex[j].charflag!=FMMEMBER_NONE) && + (family[index].fmmemberindex[j].charflag!=FMMEMBER_APPLY) ) + family[index].fmtotalfame += family[index].fmmemberindex[j].popular; + } + } +#endif + if (family[index].fmnum < 1 || family[index].fmjoinnum < 1) + { + int i = 0, fmnum1 = 0, fmnum2 = 0; + for (i = 0; i < MAX_MEMBERNUM; i++) + { + if (family[index].fmmemberindex[i].charflag <= 0) continue; +#ifdef _FMVER21 + if (family[index].fmmemberindex[i].charflag != FMMEMBER_APPLY) +#else + if (family[index].fmmemberindex[i].charflag == 1) +#endif + fmnum1 = fmnum1 + 1; + if (family[index].fmmemberindex[i].charflag > 0) + fmnum2 = fmnum2 + 1; + } + log("MemberLeave_fmnum err!\n index:%d fmname:%s" + " orifmnum:%d orifmjoinnum:%d\n fmnum1:%d fmnum2:%d\n", + index, fmname, family[index].fmnum, + family[index].fmjoinnum, fmnum1, fmnum2); + family[index].fmjoinnum = fmnum1; + family[index].fmnum = fmnum2; + } +#ifdef _NEW_MANOR_LAW + // 家族成员个人气势设定为0 + family[index].fmmemberindex[charindex].momentum = 0; + { + int i; + + family[index].fmmomentum = 0; + for(i=0;i 0 ){ + char token[256]; + sprintf( token, "在七天之内要赶快召集10名成员,否则家族会被解散喔!剩馀%d天。", + (int)((family[index].predel_time - t1)/(60*60*24)) ); + saacproto_ACFMAnnounce_send( + family[index].fmmemberindex[0].onlineflag, + SUCCESSFUL, fmname, fmindex, index, 3, + token, family[index].fmmemberindex[0].charfdid ); + } + } + db_familyupdate[index] = 1; + return 0; + } + return -1; +} + +// 族长分配职务 +int ACFMAssignOcp(int index, char *fmname, int fmindex, + char *charname, int charindex, int result) +{ +#ifdef _FMVER21 + int floor, count = 0, i = 0; + char buf[256]; + if (CheckFM(&index, fmname, fmindex) < 0) return -1; + floor = ACgetFMFloor(fmindex); + if (result < 0) return -1; + +#ifdef _FIX_LEADER_ERR // WON ADD 修正族长问题 + if (charindex == 0 ) return -1; +#endif + + log("AsssignOcp index:%d fmindex:%d fmname:%s charname:%s charindex:%d result:%d\n", + index, fmindex, fmname, charname, charindex, result); + for (i = 0; i < MAX_MEMBERNUM; i++) + { + if (family[index].fmmemberindex[i].charflag == result + && result != FMMEMBER_MEMBER) + count++; + } + if (count >= FMELDERNUM) + { + sprintf(buf, "\n只能指派%d位家族成员成为%s喔!", + FMELDERNUM, MEMBERKIND_INTDATA[result]); + saacproto_ACFMAnnounce_send(family[index].fmmemberindex[0].onlineflag, + SUCCESSFUL, fmname, fmindex, index, 4, buf, + family[index].fmmemberindex[0].charfdid); + return -1; + } + if (strcmp(family[index].fmmemberindex[charindex].charname, charname) == 0) + { + family[index].fmmemberindex[charindex].charflag = result; + if (family[index].fmmemberindex[charindex].onlineflag > 0) + { +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + saacproto_ACFMCharLogin_send( + family[index].fmmemberindex[charindex].onlineflag, + SUCCESSFUL, index, floor, family[index].fmtotalfame, + family[index].fmmemberindex[charindex].charflag, + family[index].fmsetupflag, 1, charindex, + family[index].fmmemberindex[charindex].popular, // Arminius 9.11 + family[index].fmmemberindex[charindex].charfdid +#ifdef _NEW_MANOR_LAW + ,family[index].fmmemberindex[charindex].momentum +#endif + ); +#else + saacproto_ACFMCharLogin_send( + family[index].fmmemberindex[charindex].onlineflag, + SUCCESSFUL, index, floor, family[index].fmpopular, + family[index].fmmemberindex[charindex].charflag, + family[index].fmsetupflag, 1, charindex, + family[index].fmmemberindex[charindex].charfdid); +#endif + // 通知玩家 + sprintf(buf, "%s族长已经将你的家族职等改为%s!", family[index].fmname, + MEMBERKIND_INTDATA[result]); + saacproto_ACFMAnnounce_send(family[index].fmmemberindex[charindex].onlineflag, + SUCCESSFUL, fmname, fmindex, index, 3, buf, + family[index].fmmemberindex[charindex].charfdid); + } + if (family[index].fmmemberindex[0].onlineflag > 0) + { + // 通知族长 + sprintf(buf, "\n你已经将%s的职等改为%s了!", charname, + MEMBERKIND_INTDATA[result]); + saacproto_ACFMAnnounce_send(family[index].fmmemberindex[0].onlineflag, + SUCCESSFUL, fmname, fmindex, index, 4, buf, + family[index].fmmemberindex[0].charfdid); + } + db_familyupdate[index] = 1; + return 0; + } + log("AssignOcp Failed\n"); +#endif + return -1; +} + +// 家族成员 login +#ifdef _FM_MODIFY +int ACFMCharLogin(int fd, int index, char *fmname, int fmindex, + char *charname, char *charid, int charlv, int *floor, int *fmpopular, + int *joinflag, int *fmsetupflag, int *charindex, int charfdid, + int *charfame, int eventflag,int gsnum + #ifdef _NEW_MANOR_LAW + ,int *momentum + #endif + ) +#else + #ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + int ACFMCharLogin(int fd, int index, char *fmname, int fmindex, + char *charname, char *charid, int charlv, int *floor, int *fmpopular, + int *joinflag, int *fmsetupflag, int *charindex, int charfdid, + int *charfame, int eventflag) + #else + int ACFMCharLogin(int fd, int index, char *fmname, int fmindex, + char *charname, char *charid, int charlv, int *floor, int *fmpopular, + int *joinflag, int *fmsetupflag, int *charindex, int charfdid) + #endif +#endif +{ + int i = 0; + time_t t1; + + if (CheckFM(&index, fmname, fmindex) < 0) return -1; + + if (family[index].fmpointindex != -1) + *floor = ACgetFMFloor(fmindex); +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + *fmpopular = family[index].fmtotalfame; +#else + *fmpopular = family[index].fmpopular; +#endif + *fmsetupflag = family[index].fmsetupflag; + + for (i = 0; i < family[index].fmmemberindexmaxnum; i++){ + if ((strcmp(family[index].fmmemberindex[i].charname, charname) == 0) + && (strcmp(family[index].fmmemberindex[i].charid, charid) == 0)){ + *charindex = i; + family[index].fmmemberindex[i].onlineflag = fd; + family[index].fmmemberindex[i].charfdid = charfdid; + family[index].fmmemberindex[i].charlv = charlv; +#ifdef _FM_MODIFY + family[index].fmmemberindex[i].gsnum = gsnum; +#endif +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + *charfame = family[index].fmmemberindex[i].popular; +#endif +#ifdef _NEW_MANOR_LAW + *momentum = family[index].fmmemberindex[i].momentum; +#endif + time(&t1); + family[index].fmmemberindex[i].predeltime = t1 + PREDELMEMBER_TIME; +#ifdef _FMVER21 + *joinflag = family[index].fmmemberindex[i].charflag; + family[index].fmmemberindex[i].eventflag = eventflag; +#else + if (i == 0) *joinflag = 1; + else if ((family[index].fmmemberindex[i].charflag == 1) + || (family[index].fmmemberindex[i].charflag == 3)) + *joinflag = 2; + else *joinflag = 0; +#endif + db_familyupdate[index] = 1; + + return index; + } + } + return -1; +} + +// 家族成员离线 +int ACFMCharLogout(int index, char *fmname, int fmindex, char *charname, + char *charid, int charlv, int charfdid) +{ + int i = 0; + time_t t1; + if (CheckFM(&index, fmname, fmindex) < 0) return -1; + + for (i = 0; i < family[index].fmmemberindexmaxnum; i++) + { + if ((strcmp(family[index].fmmemberindex[i].charname, charname) == 0) + && (strcmp(family[index].fmmemberindex[i].charid, charid) == 0)) + { + family[index].fmmemberindex[i].onlineflag = 0; + family[index].fmmemberindex[i].charfdid = 0; + family[index].fmmemberindex[i].charlv = charlv; +#ifdef _FM_MODIFY + family[index].fmmemberindex[i].gsnum = 0; +#endif + time(&t1); + family[index].fmmemberindex[i].predeltime = t1 + PREDELMEMBER_TIME; + db_familyupdate[index] = 1; + return 0; + } + } + return -1; +} + +// 取得家族庄园图层 +int ACgetFMFloor(fmindex) +{ + int i = 0; + for (i = 0; i < MAX_FMPOINT; i++) + { + if (fmindex == fmpoint[i].hadfmindex) + return fmpoint[i].fmfl; + } + return -1; +} + +// 玩家手动删除角色 +int ACgetFMInfoFromChar(char *fmname, int *fmindex, + char *charname, char *charid, int *charindex) +{ + int i = 0, j = 0; + for (i = 0; i < MAX_FAMILY; i++) + { + if (family[i].fmindex <= 0) continue; + for (j = 0; j < MAX_MEMBERNUM; j++) + { + if (family[i].fmmemberindex[j].charflag <= 0) continue; + if ((strcmp(family[i].fmmemberindex[j].charname, charname) == 0) + && (strcmp(family[i].fmmemberindex[j].charid, charid) == 0)) + { + strcpy(fmname, ""); + strcpy(fmname, family[i].fmname); + *fmindex = family[i].fmindex; + *charindex = j; + db_familyupdate[i] = 1; + return i; + } + } // for + } // for + return -1; +} + +// 阅读家族留言 +int ACFMReadMemo(int index, int *dataindex, char *data) +{ + int i = 0; + char buf[256]; + strcpy(data, ""); + if (index == -1){ + return -1; + } else if (index == FMSMEMOINDEX){ + *dataindex = fmsmemo.fmsnowwritenum; + for (i = 0; i < fmsmemo.num; i++){ + sprintf(buf, "%s|", fmsmemo.memodata[i]); + strcat(data, buf); + } + return fmsmemo.num; + } + if ((index >= MAX_FAMILY) || (index < 0)) + return -1; + if (CheckFMUse(index) == 0) + return -1; + *dataindex = family[index].memonowwritenum; + for (i = 0; i < family[index].memonum; i++){ + strcpy(buf, ""); + sprintf(buf, "%s|", family[index].memolist[i]); + strcat(data, buf); + } + db_familyupdate[index] = 1; + return family[index].memonum; +} + +// 写入家族留言板 +int ACFMWriteMemo(int index, char *fmname, int fmindex, char *data) +{ + if (index == -1){ + return -1; + }else if (index == FMSMEMOINDEX){ + fmsmemo.num++; + if (fmsmemo.num > FMSMEMONUM) fmsmemo.num = FMSMEMONUM; + strcpy(fmsmemo.memodata[fmsmemo.fmsnowwritenum], data); + fmsmemo.fmsnowwritenum++; + if (fmsmemo.fmsnowwritenum >= FMSMEMONUM) fmsmemo.fmsnowwritenum = 0; + db_fmsmemoupdate = 1; + return 0; + } + if ((index > MAX_FAMILY) || (index < 0)) + return -1; + if (CheckFMUse(index) == 0) + return -1; + if ((family[index].fmindex != fmindex) || (strcmp(family[index].fmname, fmname) != 0)) { + return -1; + } + if (strlen(data) > FAMILY_MEMOLEN) return -1; + family[index].memonum++; + if (family[index].memonum > FAMILY_MEMONUM) family[index].memonum = FAMILY_MEMONUM; + strcpy(family[index].memolist[family[index].memonowwritenum], data); + family[index].memonowwritenum++; + if (family[index].memonowwritenum >= FAMILY_MEMONUM) family[index].memonowwritenum = 0; + db_familyupdate[index] = 1; + return 0; +} + +// 取得庄园列表 +int ACFMPointList(char *data) +{ + int i = 0; + char msg[256]; + strcpy(data, ""); + for (i = 0; i < MAX_FMPOINT; i++) + { + sprintf(msg, "%d|%d|%d|%d|%d|%s|%d|%d|%d ", + i, fmpoint[i].fl, fmpoint[i].x, fmpoint[i].y, + fmpoint[i].hadfmindex, fmpoint[i].hadfmname, + fmpoint[i].hadfmpopular, fmpoint[i].hadfmindex - 1, + fmpoint[i].village); + strcat(data, msg); + } + return 0; +} + + + + +// 申请庄园 +int ACSetFMPoint(int index, char *fmname, int fmindex, int fmpointindex, + int fl, int x, int y) +{ + int i = 0; + if (CheckFM(&index, fmname, fmindex) < 0) return -1; + if (family[index].fmpointindex >= 0) return -2; + if ((fmpoint[fmpointindex].x != x) || (fmpoint[fmpointindex].y != y))return -1; +#ifndef _ACFMPK_NOFREE + if (fmpoint[fmpointindex].hadfmindex > 0)return -4; + if (family[index].fmjoinnum < MINAPPLYPNUM)return -5; +#endif + + fmpoint[fmpointindex].hadfmindex = fmindex; + family[index].fmpointindex = fmpointindex; + strcpy(fmpoint[fmpointindex].hadfmname, fmname); +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + fmpoint[fmpointindex].hadfmpopular = family[index].fmtotalfame; +#else + fmpoint[fmpointindex].hadfmpopular = family[index].fmpopular; +#endif + // 更新线上家族成员状况 + for (i = 0; i < MAX_MEMBERNUM; i++){ + if (strcmp(family[index].fmmemberindex[i].charname, "") == 0) continue; + if (family[index].fmmemberindex[i].onlineflag > 0){ + int floor = ACgetFMFloor(fmindex); +#ifdef _FMVER21 +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + saacproto_ACFMCharLogin_send( + family[index].fmmemberindex[i].onlineflag, + SUCCESSFUL, index, floor, family[index].fmtotalfame, + family[index].fmmemberindex[i].charflag, family[index].fmsetupflag, 1, i, + family[index].fmmemberindex[i].popular, // Arminuis 9.11 + family[index].fmmemberindex[i].charfdid +#ifdef _NEW_MANOR_LAW + ,family[index].fmmemberindex[i].momentum +#endif + ); +#else + saacproto_ACFMCharLogin_send( + family[index].fmmemberindex[i].onlineflag, + SUCCESSFUL, index, floor, family[index].fmpopular, + family[index].fmmemberindex[i].charflag, family[index].fmsetupflag, 1, i, + family[index].fmmemberindex[i].charfdid); +#endif +#else + { + int joinflag = 0; + if (i == 0) joinflag = 1; + else joinflag = 2; + saacproto_ACFMCharLogin_send( + family[index].fmmemberindex[i].onlineflag, + SUCCESSFUL, index, floor, family[index].fmpopular, + joinflag, family[index].fmsetupflag, 1, i, + family[index].fmmemberindex[i].charfdid); + } +#endif + } + } + // 更新庄园状况 + { + char data[15000]; + if (ACFMPointList(data) >= 0){ + for (i = 0; i < MAXCONNECTION; i++) + if (gs[i].use && gs[i].name[0]) + saacproto_ACFMPointList_send(i, SUCCESSFUL, data); + } + } + + db_fmpointupdate = 1; + return 0; +} + +// 设定庄园 +int ACFixFMPoint(int winindex, char *winfmname, int winfmindex, int loseindex, + char* losefmname, int losefmindex, int village) +{ + int i = 0; + if (CheckFM(&winindex, winfmname, winfmindex) < 0) return -1; + if (CheckFM(&loseindex, losefmname, losefmindex) < 0) return -1; +#ifdef _NEW_MANOR_LAW + // 如果原家族守住了庄园 + if(fmpoint[village -1].hadfmindex == winfmindex){ + unsigned int iTotalGetGold = 0,iOldGold = 0,iTotalMamberMomentum = 0; + // 获得金钱 = (家族气势 * 10000) - (家族成员个人气势总合 * 5000) + for(i=0;i FMMAXGOLD) family[winindex].fmgold = FMMAXGOLD; + log("ACFMGetMoney fmindex:%d fmname:%s fmoldgold:%d getmoney:%d fmnewgold:%d\n", + family[winindex].fmindex,family[winindex].fmname,iOldGold,iTotalGetGold,family[winindex].fmgold); + } +#endif + delfmpointindex(losefmindex); + family[loseindex].fmpointindex = -1; + fmpoint[village -1].hadfmindex = winfmindex; + family[winindex].fmpointindex = village - 1; + strcpy(fmpoint[village - 1].hadfmname, winfmname); +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + fmpoint[village -1].hadfmpopular = family[winindex].fmtotalfame; +#else + fmpoint[village -1].hadfmpopular = family[winindex].fmpopular; +#endif +#ifdef _NEW_MANOR_LAW + // 庄园战後,家族气势全归零 + family[winindex].fmmomentum = 0; + family[loseindex].fmmomentum = 0; +#endif + // 更新线上两个家族成员资料 + for (i = 0; i < MAX_MEMBERNUM; i++){ + if (strcmp(family[winindex].fmmemberindex[i].charname, "") == 0) continue; +#ifdef _NEW_MANOR_LAW + // 庄园战後,个人气势全归零 + family[winindex].fmmemberindex[i].momentum = 0; +#endif + if (family[winindex].fmmemberindex[i].onlineflag > 0){ + int floor = ACgetFMFloor(winfmindex); +#ifdef _FMVER21 + #ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + saacproto_ACFMCharLogin_send( + family[winindex].fmmemberindex[i].onlineflag, + SUCCESSFUL, winindex, floor, family[winindex].fmtotalfame, + family[winindex].fmmemberindex[i].charflag, family[winindex].fmsetupflag, 1, i, + family[winindex].fmmemberindex[i].popular, // Arminius 9.11 + family[winindex].fmmemberindex[i].charfdid + #ifdef _NEW_MANOR_LAW + ,family[winindex].fmmemberindex[i].momentum + #endif + ); + #else + saacproto_ACFMCharLogin_send( + family[winindex].fmmemberindex[i].onlineflag, + SUCCESSFUL, winindex, floor, family[winindex].fmpopular, + family[winindex].fmmemberindex[i].charflag, family[winindex].fmsetupflag, 1, i, + family[winindex].fmmemberindex[i].charfdid); + #endif +#else + { + int joinflag = 0; + if (i == 0) joinflag = 1; + else joinflag = 2; + saacproto_ACFMCharLogin_send( + family[winindex].fmmemberindex[i].onlineflag, + SUCCESSFUL, winindex, floor, family[winindex].fmpopular, + joinflag, family[winindex].fmsetupflag, 1, i, + family[winindex].fmmemberindex[i].charfdid); + } +#endif + } + } +#ifdef _NEW_MANOR_LAW + if(loseindex >= 0){ +#endif + for (i = 0; i < MAX_MEMBERNUM; i++){ + if (strcmp(family[loseindex].fmmemberindex[i].charname, "") == 0) continue; +#ifdef _NEW_MANOR_LAW + // 庄园战後,个人气势全归零 + family[loseindex].fmmemberindex[i].momentum = 0; +#endif + if (family[loseindex].fmmemberindex[i].onlineflag > 0){ +#ifdef _FMVER21 + #ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + saacproto_ACFMCharLogin_send( + family[loseindex].fmmemberindex[i].onlineflag, + SUCCESSFUL, loseindex, -1, family[loseindex].fmtotalfame, + family[loseindex].fmmemberindex[i].charflag, family[loseindex].fmsetupflag, 1, i, + family[loseindex].fmmemberindex[i].popular, // Arminius 9.11 + family[loseindex].fmmemberindex[i].charfdid + #ifdef _NEW_MANOR_LAW + ,family[loseindex].fmmemberindex[i].momentum + #endif + ); + #else + saacproto_ACFMCharLogin_send( + family[loseindex].fmmemberindex[i].onlineflag, + SUCCESSFUL, loseindex, -1, family[loseindex].fmpopular, + family[loseindex].fmmemberindex[i].charflag, family[loseindex].fmsetupflag, 1, i, + family[loseindex].fmmemberindex[i].charfdid); + #endif +#else + { + int joinflag = 0; + if (i == 0) joinflag = 1; + else joinflag = 2; + saacproto_ACFMCharLogin_send( + family[loseindex].fmmemberindex[i].onlineflag, + SUCCESSFUL, loseindex, -1, family[loseindex].fmpopular, + joinflag, family[loseindex].fmsetupflag, 1, i, + family[loseindex].fmmemberindex[i].charfdid); + } +#endif + } + } +#ifdef _NEW_MANOR_LAW + } +#endif + // 更新庄园状况 + { + char data[15000]; + if (ACFMPointList(data) >= 0){ + for (i = 0; i < MAXCONNECTION; i++) + if (gs[i].use && gs[i].name[0]) + saacproto_ACFMPointList_send(i, SUCCESSFUL, data); + } + } + db_fmpointupdate = 1; + return 0; +} + +// 族长广播 +int ACFMAnnounce(char *fmname, int fmindex, int index, char *data, int color) +{ + if (CheckFM(&index, fmname, fmindex) < 0) return -1; + return 0; +} + +// 取得家族资料 +// kindflag 1:家族银行 +int ACGetFMData(int index, char *fmname, int fmindex, int kindflag, int *data) +{ + if (CheckFM(&index, fmname, fmindex) < 0) return -1; + + if (kindflag == 1) + *data = family[index].fmgold; + return 0; +} + +void setMemberFileDataToArg(int index, int memberindex, char *data) +{ + int i = 0; + char value[256]; + char *ptr; + if (index < 0 || index > MAX_FAMILY) return; + if (strcmp(data, "") == 0) return; + ptr = (char *)strstr(data, "="); + if (ptr == NULL) return; + strcpy(ptr, ""); + strcpy(value, ptr + 1); + for (i = 0; i < memberdatamaxint; i++){ + if (strcmp(data, MEMBER_INTDATA[i]) == 0){ + switch(i){ + case 0: + family[index].fmmemberindex[memberindex].charlv = atoi(value); + break; + case 1: + family[index].fmmemberindex[memberindex].charflag = atoi(value); + break; + case 2: + family[index].fmmemberindex[memberindex].onlineflag = atoi(value); + break; + case 3: + family[index].fmmemberindex[memberindex].charfdid = atoi(value); + break; + case 4: + family[index].fmmemberindex[memberindex].predeltime = atoi(value); + break; + case 5: + family[index].fmmemberindex[memberindex].popular = atoi(value); + break; +#ifdef _FMVER21 + case 6: + family[index].fmmemberindex[memberindex].eventflag = atoi(value); + break; +#endif +#ifdef _NEW_MANOR_LAW + case 7: + family[index].fmmemberindex[memberindex].momentum = atoi(value); + break; +#endif + default: + break; + } + return; + } + } + for (i = 0; i < memberdatamaxchar; i++){ + if (strcmp(data, MEMBER_CHARDATA[i]) == 0){ + switch(i){ + case 0: + strcpy(family[index].fmmemberindex[memberindex].charname, value); + break; + case 1: + strcpy(family[index].fmmemberindex[memberindex].charid, value); + break; + default: + break; + } + return; + } + } +} + +void setFamilyFileDataToArg(int index, char *data) +{ + int i = 0, j = 0; + char value[1024]; + char *ptr; + if (index < 0 || index > MAX_FAMILY) return; + if (strcmp(data, "") == 0) return; + ptr = (char *)strstr(data, "="); + if (ptr == NULL) return; + strcpy(ptr, ""); + strcpy(value, ptr + 1); + for (i = 0; i < familymaxint; i++){ + if (strcmp(data, FAMILY_INTDATA[i]) == 0){ + switch(i){ + case 0: + family[index].fmindex = atoi(value); + break; + case 1: + family[index].fmleadergrano = atoi(value); + break; + case 2: + family[index].fmnum = atoi(value); + break; + case 3: + family[index].fmjoinnum = atoi(value); + break; + case 4: + family[index].fmacceptflag = atoi(value); + break; + case 5: + family[index].fmsetupflag = atoi(value); + break; + case 6: + family[index].fmsprite = atoi(value); + break; + case 7: + family[index].fmpointindex = atoi(value); + break; + case 8: + family[index].fmpopular = atoi(value); + break; + case 9: + family[index].fmgold = atoi(value); + break; + case 10: + family[index].fmmemberindexmaxnum = atoi(value); + break; + case 11: + family[index].apply_time = atoi(value); + break; + case 12: + family[index].setup_time = atoi(value); + break; + case 13: + family[index].predel_time = atoi(value); + break; + case 14: + family[index].memonowwritenum = atoi(value); + break; + case 15: + family[index].memonum = atoi(value); + break; + case 16: + family[index].fmadv = atoi(value); + break; + case 17: + family[index].fmfeed = atoi(value); + break; + case 18: + family[index].fmsynthesize = atoi(value); + break; + case 19: + family[index].fmdealfood = atoi(value); + break; + case 20: + family[index].fmpk = atoi(value); + break; +#ifdef _NEW_MANOR_LAW + case 21: + family[index].fmmomentum = atoi(value); + break; +#endif + default: + break; + } + return; + } + } + for (i = 0; i < familymaxchar; i++){ + if (strcmp(data, FAMILY_CHARDATA[i]) == 0){ + switch(i){ + case 0: + strcpy(family[index].fmname, value); + break; + case 1: + strcpy(family[index].fmleadername, value); + break; + case 2: + strcpy(family[index].fmleaderid, value); + break; + case 3: + strcpy(family[index].petname, value); + break; + case 4: + strcpy(family[index].petattr, value); + break; + case 5: + strcpy(family[index].fmrule, value); + break; + default: + break; + } + return; + } + } + for (i = 0; i < FAMILY_MEMONUM; i ++){ + char memolist[256]; + sprintf(memolist, "%s%d", FMMEMOLIST, i); + if (strcmp(data, memolist) == 0){ + strcpy(family[index].memolist[i], value); + return; + } + } + for (i = 0; i < MAX_MEMBERNUM; i ++){ + char memberdata[256]; + sprintf(memberdata, "%s%d", FMMEMBERINDEX, i); + if (strcmp(data, memberdata) == 0){ + for (j = 1; j < memberdatamaxint + memberdatamaxchar; j++){ + char databuf[256]; + easyGetTokenFromBuf(value, ' ', j, databuf, sizeof(databuf)); + if (strcmp(databuf, "") == 0) continue; + setMemberFileDataToArg(index, i, databuf); + } + return; + } + } + +} + +// GM修改家族资料 +int ACGMFixFMData(int index, char *fmname, char *charid, char *cmd, + char *data) +{ + int i = 0,charindex = -1; + int floor = ACgetFMFloor(index); + if (index < 0 || index > MAX_FAMILY) return -1; + log("GMFixFMData index:%d charid:%s cmd:%s data:%s\n", + index, charid, cmd, data); + strcpy(fmname, family[index].fmname); + if (charid[0] == '-' && charid[1] == '1') + { + for (i = 0; i < familymaxint; i++) + { + if (strcmp(cmd, FAMILY_INTDATA[i]) == 0) + { + switch(i) + { + case 2: + family[index].fmnum = atoi(data); + log("fmnum:%s\n", data); + break; + case 3: + family[index].fmjoinnum = atoi(data); + log("fmjoinnum:%s\n", data); + break; + case 4: + family[index].fmacceptflag = atoi(data); + log("fmacceptflag:%s\n", data); + break; + case 5: + family[index].fmsetupflag = atoi(data); + log("fmsetupflag:%s\n", data); + break; + case 6: + family[index].fmsprite = atoi(data); + log("fmsprite:%s\n", data); + break; + case 7: + family[index].fmpointindex = atoi(data); + log("fmpointindex:%s\n", data); + break; + case 8: + family[index].fmpopular = atoi(data); + log("fmpopular:%s\n", data); + break; + case 9: + family[index].fmgold = atoi(data); + log("fmgold:%s\n", data); + break; + case 11: + family[index].apply_time = atoi(data); + log("apply_time:%s\n", data); + break; + case 12: + family[index].setup_time = atoi(data); + log("setup_time:%s\n", data); + break; + case 13: + family[index].predel_time = atoi(data); + log("predel_time:%s\n", data); + break; + case 16: + family[index].fmadv = atoi(data); + log("adv:%s\n", data); + break; + case 17: + family[index].fmfeed = atoi(data); + log("feed:%s\n", data); + break; + case 18: + family[index].fmsynthesize = atoi(data); + log("synthesize:%s\n", data); + break; + case 19: + family[index].fmdealfood = atoi(data); + log("dealfood:%s\n", data); + break; + case 20: + family[index].fmpk = atoi(data); + log("pk:%s\n", data); + break; +#ifdef _NEW_MANOR_LAW + case 21: + family[index].fmmomentum = atoi(data); + log("momentum:%s\n", data); + for(i=0;i 0){ + charindex = i; + break; + } + } + // 找不到家族成员 + if(charindex == -1){ + log("FMName:%s,id:%s\n",fmname,charid); + return -1; + } + for(i = 0; i < memberdatamaxint; i++){ + if (strcmp(cmd, MEMBER_INTDATA[i]) == 0) + { + switch(i) + { + case 0: + family[index].fmmemberindex[charindex].charlv = atoi(data); + log("charlv:%s\n", data); + break; + case 1: + family[index].fmmemberindex[charindex].charflag = atoi(data); + log("charflag:%s\n", data); + break; + case 2: + family[index].fmmemberindex[charindex].onlineflag = atoi(data); + log("onlineflag:%s\n", data); + break; + case 3: + family[index].fmmemberindex[charindex].charfdid = atoi(data); + log("charfdid:%s\n", data); + break; + case 4: + family[index].fmmemberindex[charindex].predeltime = atoi(data); + log("predeltime:%s\n", data); + break; + case 5: + family[index].fmmemberindex[charindex].popular = atoi(data); + log("popular:%s\n", data); + // 计算家族声望 + family[index].fmpopular = family[index].fmadv + family[index].fmfeed + + family[index].fmsynthesize + family[index].fmdealfood + + family[index].fmpk; + family[index].fmtotalfame = family[index].fmpopular; + for(i = 0;i < MAX_MEMBERNUM;i++){ + if((family[index].fmmemberindex[i].charflag != FMMEMBER_NONE) && + (family[index].fmmemberindex[i].charflag != FMMEMBER_APPLY)) + family[index].fmtotalfame += family[index].fmmemberindex[i].popular; + } + break; + case 6: + family[index].fmmemberindex[charindex].eventflag = atoi(data); + log("eventflag:%s\n", data); + break; +#ifdef _NEW_MANOR_LAW + case 7: + family[index].fmmemberindex[charindex].momentum = atoi(data); + log("momentum:%s\n", data); + for(i=0;i + family[index].fmmemberindex[tmpindex].popular) + tmpindex = i; + } + } + } + log("ChangeFMLeader_1 tmpindex:%d\n", tmpindex); + if (tmpindex == 0) return -1; // shan return 0 -> -1 + sprintf(buf, "%d", family[index].fmleadergrano); + if (ACFixFMData(index, fmname, fmindex, 11, tmpindex, buf, + family[index].fmmemberindex[tmpindex].charname) < 0) + return -1; + log("ChangeFMLeader_2 tmpindex:%d\n", tmpindex); + if (family[index].fmmemberindex[tmpindex].onlineflag > 0) + { + char tmpbuf[256]; + sprintf(tmpbuf, "您已经退出家族了~\n族长职位已让给%s,辛苦你了!", + family[index].fmmemberindex[0].charname); + saacproto_ACFMAnnounce_send( + family[index].fmmemberindex[tmpindex].onlineflag, + SUCCESSFUL, fmname, fmindex, index, 4, tmpbuf, + family[index].fmmemberindex[tmpindex].charfdid); + } + ACMemberLeaveFM(index, fmname, fmindex, + family[index].fmmemberindex[tmpindex].charname, 0, tmpindex, 0); + return 0; +} + +#ifdef _LEADERFUNCHECK +int CheckLeaderQ(int index, char *fmname, int fmindex, char *charname, char *charid) +{ + int result = -1; + if(CheckFM(&index, fmname, fmindex) < 0) return -1; + if ((strcmp(family[index].fmmemberindex[0].charname, charname) == 0) + && (strcmp(family[index].fmmemberindex[0].charid, charid) == 0)) + result = 0; + return result; +} +#endif + +#ifdef _ACFMPK_LIST +FamilyPKSchedule FMPK_List[FMPKLIST_MAXNUM]; +void FMPK_InitList( void) +{ + int i; + for( i=0; i= FMPKLIST_MAXNUM ) return -1; + return FMPK_List[ti].pkflg; +} +char *FMPK_GetData( int ti) +{ + if( ti <0 || ti >= FMPKLIST_MAXNUM ) return NULL; + return FMPK_List[ti].Data; +} +int FMPK_SetData( int ti, int Pkflg, char *Data, int sizes) +{ + if( ti <0 || ti >= FMPKLIST_MAXNUM ) return 0; + memcpy( FMPK_List[ti].Data, Data, sizes+1); + FMPK_List[ti].pkflg = Pkflg; + return 1; +} + +#endif + +int readOneFamilyFromTi( int ti) +{ + char filename[256]; + struct stat s; + + snprintf(filename, sizeof(filename), "%s/Family.%d", familydir, ti); + + if (stat(filename, &s) < 0)return 0; + if (!(s.st_mode & S_IFREG)){ + log("%s is not a regular file\n", filename); + return 0; + } + if( readOneFamily( filename, ti) != 1 ){ + log("cannot open file %s %s\n", filename, strerror(errno)); + return 0; + } +/* + if( readOneFamily( filename, ti) != 1 ){ + log("read:%s Error !! \n", filename); + }else{ + log("read:%s OK !! \n", filename); + } +*/ + return 1; +} + +//andy_add 2003/06/16 +int readOneFamily( char *filename, int i) +{ + char line[40000], data[40000]; + FILE *fp=NULL; + int j; + int m = 0, fmnum1 = 0, fmnum2 = 0; + + if( (fp = fopen(filename, "r") ) == NULL ) return 0; + if (fgets(line, sizeof(line), fp) == NULL) return 0; + fclose( fp); + + chop(line); + for (j = 1; j <= familymaxint + familymaxchar + MAX_MEMBERNUM + FAMILY_MEMONUM; j ++){ + easyGetTokenFromBuf(line, '|', j, data, sizeof(data)); + if (strcmp(data, "") == 0) continue; + setFamilyFileDataToArg( i, data); + } + if (family[i].fmgold > FMMAXGOLD) family[i].fmgold = FMMAXGOLD; + if (family[i].fmgold < 0) family[i].fmgold = 0; + for (m = 0; m < MAX_MEMBERNUM; m++){ + if (family[i].fmmemberindex[m].charflag <= 0) continue; + if (family[i].fmmemberindex[m].charflag != FMMEMBER_APPLY) + fmnum1 = fmnum1 + 1; + if (family[i].fmmemberindex[m].charflag > 0 ) + fmnum2 = fmnum2 + 1; + } + family[i].fmjoinnum = fmnum1; + family[i].fmnum = fmnum2; + if (family[i].fmjoinnum >= MIN_MEMBERNUM){ + family[i].fmsetupflag = 1; + family[i].predel_time = -1; + db_familyupdate[i] = 1; + }else if (family[i].fmjoinnum < MIN_MEMBERNUM){ + family[i].fmsetupflag = 0; + if (family[i].predel_time == -1) { + time_t t1; + time(&t1); + family[i].predel_time = t1 + PREDEL_TIME; + db_familyupdate[i] = 1; + } + } + return 1; +} + + +#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令 +void saacproto_ACRELOADFM_recv( int fd, int charindex ) +{ + log("\n won test 51 ==>"); + + readFamily(familydir); + + log("\n won test 53 ==>" ); + + saacproto_ACRELOADFM_send( fd, charindex ); + +} + +#endif + +#ifdef _DEATH_FAMILY_LOGIN_CHECK // WON ADD 家族战登入检查 +void saacproto_ACFMCharLogin2_recv( int fd, char *char_id, char *char_name, int charindex ) +{ + int i, j; + char data[512] = {0}; + + for( i=0; i i(%d) fmsprite(%d) charflag(%d)", i, family[i].fmsprite, family[i].fmmemberindex[j].charflag ); + log("\n won test 2 ==> fmsetupflag(%d) fmname(%s)", family[i].fmsetupflag, family[i].fmname ); + log("\n won test 3 ==> data(%s)", data ); + + saacproto_ACFMCharLogin2_send(fd, SUCCESSFUL, charindex, data ); + + return; + } + } + } + + saacproto_ACFMCharLogin2_send(fd, FAILED, charindex, data ); + +} +#endif + +#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令 +char *get_fm_leader_index( int fm_index ) +{ + + return family[ fm_index ].fmname; + +} +#endif + + +#ifdef _DEATH_FAMILY_STRUCT // WON ADD 家族战存放胜负资料 + +FM_PK_STRUCT fm_pk_struct; + +void setInt_fm_pk_struct( int index, int type, int num ) +{ + switch( type ){ + case FM_INDEX: + fm_pk_struct.fm_index[index] = num; + break; + case FM_WIN: + fm_pk_struct.fm_win[index] = num; + break; + case FM_LOSE: + fm_pk_struct.fm_lose[index] = num; + break; + case FM_SCORE: + fm_pk_struct.fm_score[index] = num; + break; + } +} + +void setChar_fm_pk_struct( int index, int type, char *msg ) +{ + switch( type ){ + case FM_NAME: + strcpy( fm_pk_struct.fm_name[index], msg ); + break; + } +} + +int getInt_fm_pk_struct( int index, int type ) +{ + switch( type ){ + case FM_INDEX: + return fm_pk_struct.fm_index[index]; + case FM_WIN: + return fm_pk_struct.fm_win[index]; + case FM_LOSE: + return fm_pk_struct.fm_lose[index]; + case FM_SCORE: + return fm_pk_struct.fm_score[index]; + } + + return -1; +} + +char *getChar_fm_pk_struct( int index, int type ) +{ + switch( type ){ + case FM_NAME: + return fm_pk_struct.fm_name[index]; + } + + return NULL; +} + + +void read_fm_pk_score() +{ + FILE *f; + int i, j; + + if( !( f = fopen( "fm_pk_struct.txt", "r" ) ) ){ + log("\n opne fm_pk_struct.txt Err !!"); + return; + } + + for( i=0; i sort "); + + for( i=0; i msg(%s) ", msg ); + msg[ strlen(msg) -1 ] = 0; + log("\n won test 200 ==> msg(%s) ", msg ); + + // send to gmsv + { + extern gmsv gs[MAXCONNECTION]; + + for (i=0; i (%d) buf(%s)", i, buf[i] ); + strcat( out , "|" ); + strcat( out, buf[i] ); + i++; + } + + fclose( f ); + + { + extern gmsv gs[MAXCONNECTION]; + + log("\n won test 9 ==> out(%s)", out ); + + for (i=0; i name(%s) name2(%s) ", getChar_fm_pk_struct( no1, FM_NAME ), getChar_fm_pk_struct( no2, FM_NAME ) ); +} + + +int get_fm_pk_index( int win_index ) +{ + int i; + + log("\n won test 32 ==> win_index(%d) ", win_index ); + + for( i=0; i i(%d)", i ); + return i; + } + } + + for( i=0; i i(%d)", i ); + return i; + } + } + + return -1; +} + +#endif + + diff --git a/saac/acfamily.h b/saac/acfamily.h new file mode 100644 index 0000000..71b0c19 --- /dev/null +++ b/saac/acfamily.h @@ -0,0 +1,296 @@ +#ifndef _FAMILY_H_ +#define _FAMILY_H_ + +#include "version.h" + +#define MAX_FAMILY 1000 // 1000 +#define TEXT_MAX 1024 +#ifdef MEMBER_100 + #define MAX_MEMBERNUM 100 +#else + #define MAX_MEMBERNUM 50 // 50 +#endif +#define MIN_MEMBERNUM 10 // 10 + +#ifdef _FIX_9_FMPOINT // WON ADD 九大庄园 +#define MAX_FMPOINT 10 +#else +#define MAX_FMPOINT 4 // 4 +#endif + +#define PREDEL_TIME 60*60*24*7 // 七天 60*60*24*3 +#define PREDELMEMBER_TIME 60*60*24*30 // 30天 60*60*24*30 +#define FAMILY_MEMONUM 35 // 家族留言板最大留言数量 +#define FAMILY_MEMOLEN 256 +#define FMSMEMOINDEX 10000 // 家族之间留言板 index +#define FMSMEMONUM 140 +#define TOPFMLISTNUM 10 // 家族排行榜数量 +#define MINFMPOPNUM -20000000 +// shan 20011207 +#define MAXFMPOPNUM 100000000 +//#define MAXFMPOPNUM 5000000 +#define MINAPPLYPNUM 30 // 申请家族最低人数 +#define FMMEMBERINDEX "fmmember" +#define FMMEMOLIST "memo" +#define FMELDERNUM 4 // 长老数量 +#ifdef _EVERYONE_RIDE + #define FMMAXGOLD 100000000 // 家族基金上限 +#else + #define FMMAXGOLD 10000000 // 家族基金上限 +#endif +// shan 20011207 +#define MAXRECVPOP 50000000 // 家族声望转移上限 +// CoolFish: 2001/11/26 +//#define MAXRECVPOP 2500000 // 家族声望转移上限 + +typedef enum +{ + fmindex, + fmleadergrano, + fmnum, + fmjoinnum, + fmacceptflag, + fmsetupflag, + fmsprite, + fmpointindex, + fmpopular, + fmgold, + fmmemberindexmaxnum, + apply_time, + setup_time, + predel_time, + memonowwritenum, + memonum, + fmadv, + fmfeed, + fmsynthesize, + fmdealfood, + fmpk, +#ifdef _NEW_MANOR_LAW + fmmomentum, +#endif + familymaxint, +} FAMILY_DATAINT; + +typedef enum +{ + fmname, + fmleadername, + fmleaderid, + petname, + petattr, + fmrule, + familymaxchar, +} FAMILY_DATACHAR; + +typedef enum +{ + charlv, + charflag, + onlineflag, + charfdid, + predeltime, + popular, +#ifdef _FMVER21 + eventflag, +#endif +#ifdef _NEW_MANOR_LAW + momentum, +#endif + memberdatamaxint, +} MEMBER_DATAINT; + +typedef enum +{ + charname, + charid, + memberdatamaxchar, +} MEMBER_DATACHAR; + +typedef enum +{ + FMMEMBER_NONE = -1, + FMMEMBER_MEMBER = 1, + FMMEMBER_APPLY, + FMMEMBER_LEADER, + FMMEMBER_ELDER, + FMMEMBER_KINDNUM, +} MEMBER_KIND; + +// #define MEMBERMEM memberdatamaxint * sizeof(int) + 50 +// #define FAMILYMEM familymaxint * sizeof(int) + 1000 + MAX_MEMBERNUM * MEMBERMEM +#ifdef _ACFMPK_LIST +void FMPK_InitList( void); +#endif +void sortFamily(void); // Arminius: sort family +int getFMsortedlist(char *buf, int bufsize, int bp, int ep); + +int readFamily(char *dir); + +int readOneFamilyFromTi( int ti); +int readOneFamily( char *filename, int i); + +int writeFamily(char *dir); +int readFMPoint(char *dir); +int writeFMPoint(char *dir); +int readFMSMemo(char *dir); +int writeFMSMemo(char *dir); +void delovertimeFMMem(int time); +#ifdef _PERSONAL_FAME +int ACAddFM(int fd, int *workindex, char *fmname, char *fmleadername, + char *fmleaderid, int fmleaderlv, char *petname, char *petattr, + char *fmrule, int fmsprite, int fmleadergrano, int fame, int charfdid); +#else +int ACAddFM(int fd, int *workindex, char *fmname, char *fmleadername, + char *fmleaderid, int fmleaderlv, char *petname, char *petattr, + char *fmrule, int fmsprite, int fmleadergrano, int charfdid); +#endif +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 +int ACJoinFM(int fd, int index, char *fmname, int fmindex, + char *charname, char *charid, int charlv, int fame, int charfdid); +#else +int ACJoinFM(int fd, int index, char *fmname, int fmindex, + char *charname, char *charid, int charlv, int charfdid); +#endif +int ACLeaveFM(int index, char *fmname, int fmindex, + char *charname, char* charid); +int ACDelFM(int index, char *fmname, int fmindex); +int ACShowFMList(char *data); +int ACShowFMMemberList(int index, int *acceptflag, int *fmjoinnum, char *data); +int ACFMDetail(int index, char *fmname, int fmindex, char *data); +#ifdef _FMVER21 +int ACMemberJoinFM(int index, char *fmname, int fmindex, + char *charname, int charindex, int result, int meindex); +#else +int ACMemberJoinFM(int index, char *fmname, int fmindex, + char *charname, int charindex, int result); +#endif +#ifdef _FMVER21 +int ACMemberLeaveFM(int index, char *fmname, int fmindex, + char *charname, int flag, int charindex, int meindex); +#else +int ACMemberLeaveFM(int index, char *fmname, int fmindex, + char *charname, int flag, int charindex); +#endif +int ACFMAssignOcp(int index, char *fmname, int fmindex, + char *charname, int charindex, int result); + +#ifdef _FM_MODIFY +int ACFMCharLogin(int fd, int index, char *fmname, int fmindex, + char *charname, char *charid, int charlv, int *floor, int *fmpopular, + int *joinflag, int *fmsetupflag, int *charindex, int charfdid, + int *charfame, int eventflag,int gsnum + #ifdef _NEW_MANOR_LAW + ,int *momentum + #endif + ); +#else + #ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + int ACFMCharLogin(int fd, int index, char *fmname, int fmindex, + char *charname, char *charid, int charlv, int *floor, int *fmpopular, + int *joinflag, int *fmsetupflag, int *charindex, int charfdid, + int *charfame, int eventflag); + #else + int ACFMCharLogin(int fd, int index, char *fmname, int fmindex, + char *charname, char *charid, int charlv, int *floor, int *fmpopular, + int *joinflag, int *fmsetupflag, int *charindex, int charfdid); + #endif +#endif + +int ACFMCharLogout(int index, char *fmname, int fmindex, char *charname, + char *charid, int charlv, int charfdid); +int delfmpointindex(int fmindex); +int ACgetFMFloor(int fmindex); +int ACgetFMInfoFromChar(char *fmname, int *fmindex, + char *charname, char *charid, int *charindex); +int ACFMReadMemo(int index, int *dataindex, char *data); +int ACFMWriteMemo(int index, char *fmname, int fmindex, char *data); +int ACFMPointList(char *data); +int ACSetFMPoint(int index, char *fmanme, int fmindex, int fmpointindex, + int fl, int x, int y); +int ACFixFMPoint(int winindex, char *winfmname, int winfmindex, int loseindex, + char *losefmname, int losefmindex, int village); +int ACShowTopFMList(char *data, int datasize, int kindflag); +int ACFMAnnounce(char *fmname, int fmindex, int index, char *data, int color); +#ifdef _FAMILYBANKSTONELOG +int ACgetFMBankgold(int index, char *fmname,int fmindex,int charindex); +#endif +int ACFixFMData(int index, char *fmname, int fmindex, int kindflag, int charindex, + char *data1, char *data2); +int ACGetFMData(int index, char *fmname, int fmindex, int kindflag, int *data); +int ACFixFMPK(int winindex, char *winfmname, int winfmindex, int loseindex, + char *losefmname, int losefmindex); +int ACGMFixFMData(int index, char *fmname, char *charid, char *cmd, char *data); +int ChangeFMLeader(int index, char *fmname, int fmindex); +#ifdef _LEADERFUNCHECK +int CheckLeaderQ(int index, char *fmname, int fmindex, char *charname, char *charid); +#endif + + + + +#ifdef _ACFMPK_LIST +#define FMPKLIST_MAXNUM 10 +typedef struct tagFamilyPKSchedule { + int pkflg; + char Data[256]; +} FamilyPKSchedule; + +void FMPK_LoadList(); +void FMPK_BackUpList(); +int FMPK_GetTypeFlg( int ti); +char *FMPK_GetData( int ti); +int FMPK_SetData( int ti, int Pkflg, char *Data, int sizes); +#endif + + + +#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令 +void saacproto_ACRELOADFM_recv( int fd, int charindex ); +char *get_fm_leader_index( int fm_index ); +#endif + + + + +#ifdef _DEATH_FAMILY_STRUCT // WON ADD 家族战存放胜负资料 + +#define fm_pk_max 200 + +typedef struct _fm_pk_struct +{ + int fm_index[fm_pk_max]; + int fm_win[fm_pk_max]; + int fm_lose[fm_pk_max]; + int fm_score[fm_pk_max]; + char fm_name[fm_pk_max][30]; +}FM_PK_STRUCT; + + +enum{ + FM_INDEX =0, + FM_WIN, + FM_LOSE, + FM_SCORE, + FM_NAME, +}; + + +void setInt_fm_pk_struct( int index, int type, int num ); +void setChar_fm_pk_struct( int index, int type, char *msg ); +int getInt_fm_pk_struct( int index, int type ); +char *getChar_fm_pk_struct( int index, int type ); + + +void set_fm_pk_score( char *msg ); +void swap_fm_pk_struct( int no1, int no2 ); +int get_fm_pk_index( int win_index ); +void read_fm_pk_score(); +//void save_fm_pk_score(); + + +#endif + + +#endif + diff --git a/saac/auction.c b/saac/auction.c new file mode 100644 index 0000000..509c335 --- /dev/null +++ b/saac/auction.c @@ -0,0 +1,98 @@ +#define _AUCTION_C_ +#include "version.h" + +#ifdef _PAUCTION_MAN +#include "lock.h" +#include "util.h" +#include "main.h" +#include "saacproto_serv.h" +#include "char.h" +#include "auction.h" + +//#define PAUCTION_ADD 1 +//#define PAUCTION_DEL 2 +//#define MAXPAITEMS 20 +/*typedef struct _tagItemAuctionData +{ + char ItemName[256]; + char Data[1024]; + int ItemId; + int use; +}ItemAuctionData; +*/ +ItemAuctionData IAData[MAXPAITEMS]; + +void IAData_Init() +{ + int i; + for( i=0; i= MAXPAITEMS ) return FALSE; + //送回给GS + for(i=0;i= MAXCONNECTION ) return FALSE; + + for(i=0;i +#include +#include +#include +#include +#include + +#include "main.h" +#include "char.h" +#include "saacproto_serv.h" +#include "util.h" +#include "saacproto_lserver.h" + +// CoolFish: Family 2001/6/12 +#include "acfamily.h" +#include "version.h" + +// Arminius 7.17 memory lock +#include "lock.h" +#include "recv.h" + +#ifdef _SASQL1 +#include "sasql.h" +#endif + +static void getCharNameFromString(char*str ,char *out ); +static void getCharOptionFromString( char *str , char *out ); +static void getCharNameFromString(char*str ,char *out ); +static void makeCharFileName( char *idstring ,char *output, int outlen,int num); +// Nuke *1*1 +static int makeSaveCharString( char *out , int outlen , + char *nm , char *opt , char *info ); +static int findBlankCharIndex( char *id ); + +static int unlinkCharFile( char *id , int num ); +#ifdef _SLEEP_CHAR // 取得非活跃人物档名 +static void makeSleepCharFileName( char *id,char *output, int outlen, int num); +static void makeSleepCharPoolItemFileName( char *id,char *output, int outlen); +#endif +#ifdef _CHAR_POOLITEM +static void makeCharPoolItemFileName( char *id,char *output, int outlen); +#endif +#define SPACE '|' +#define SPACESTRING "|" + +#define IS_2BYTEWORD( _a_ ) ( (char)(0x80) <= (_a_) && (_a_) <= (char)(0xFF) ) + + +#define USERLOG( id , format, args...) \ +{\ + char body[1000];\ + char fn[1000];\ + if(id[0]){\ + snprintf( body ,sizeof(body), "%s.log.%d" , id ,get_rotate_count() );\ + makeDirFilename( fn , sizeof(fn),logdir, getHash(id), body);\ + LOGBASE( fn , "%u " , (unsigned int ) time(NULL) );\ + LOGBASE( fn , format , ## args );\ + }\ +} + +#ifdef _ANGEL_SUMMON +struct MissionTable missiontable[MAXMISSIONTABLE]; +#endif + +/* + + + 仇及白央奶伙匹烂聒今木化中月楮醒反兮氏少 据毛勾井丹[ + + + char *c0 : ID + char *c1 : Passwd 手丹 据允氏匹月井日银歹卅中 + char *c2 : Charname + char *c3 : opt + Spock fixed, opt change to process + char *c3 : process + char *c4 : 勾井歹氏 + int i0 : lock + int i1 : mesgid +*/ + +void charLoadCallback( int ti , int auth , char *c0, char* c1 , + char *c2 , char *c3, char *c4, int i0 , int i1 ) +{ + // Spock deleted 2000/11/2 + //static int process_id = 0; + // CoolFish: Init charindex 2001/10/16 +#ifdef _NewSave + int charindex = -1; +#else + int charindex; +#endif +#ifndef _LOCK_SERVER + char loadbuf[CHARDATASIZE]; + char infobuf[CHARDATASIZE]; + int lock = i0; +#endif + char *process = c3; + char *id = c0; + char *passwd = c1; + char *charname = c2; + int mesgid = i1; + + char *deadline = c4; + + // Spock deleted 2000/11/2 + //process_id++; + + if( auth != 0 ){ + char data[100]; + + snprintf( data, sizeof( data ), "%d" , auth ); +#ifdef _NewSave + saacproto_ACCharLoad_send( ti , FAILED , data, mesgid, charindex ); +#else + saacproto_ACCharLoad_send( ti , FAILED , data, mesgid ); +#endif + + +#ifdef _FIX_MESSAGE // WON ADD 修改WORKER封包内容 + // 同一星系重覆登入送 game end + if( auth == 204 ){ +#ifdef _WAEI_KICK + log("\n (%s) AP同一星系重覆登入,踢人!! ", id ); + saacproto_ACKick_recv( ti, id, 7, -1); //踢人 +#ifdef _UNLOCKPOOL + addUnlockPool( ti, id, "", process, ""); // AP解锁 +#else + addWorkerTask( id , "dummy" , "3" , dummyCallback , ti , + id , "dummy" , charname , process ,"", mesgid , 0 ); +#endif +#endif + }else + log("\n (%s) 登入异常!!:%d ", id, auth ); +#endif + + return; + } +#ifdef _DELAY_UNLOCK + if( UNlockM_isBe( id ) ){ + saacproto_ACCharLoad_send( ti , FAILED , "locked" , mesgid, charindex ); + return; + }else +#endif + if( isLocked( id ) ){ + //int process; +#ifdef _NewSave + saacproto_ACCharLoad_send( ti , FAILED , "locked" , mesgid, charindex ); +#else + saacproto_ACCharLoad_send( ti , FAILED , "locked" , mesgid ); +#endif + //DeleteMemLock(getHash(id) & 0xff, id, &process); // 如果AP无锁则AC解锁 + log("\n (%s) AC同一星系重覆登入,踢人!! ", id ); + saacproto_ACKick_recv( ti, id, 7, -1); //踢人 + + // checkGSUCheck( id); + return; + } + +#ifdef _LOCK_SERVER + if( CHECK_LS_BEUSE() == TRUE ) { + LServer_SACheckLock2_send( ti, id, mesgid, charname, 1, process);//process + return; + }else { + saacproto_ACCharLoad_send( ti , FAILED , "locked" , mesgid, charindex ); + } +#else + + charindex = getCharIndexByName( id , charname ); +#ifdef _NewSave + //log("\n档案装载序号:%d 账号:%s 名字:%s\n", charindex, id, charname); +#endif + +#ifdef _SQL_BACKGROUND + sasql_online(id,charname); +#endif + + if( charindex < 0 ){ + /* 平乓仿互绣箕仄卅中及匹巨仿□卅及分 */ +#ifdef _NewSave + saacproto_ACCharLoad_send( ti , FAILED , + "char nonexistent" , mesgid , charindex ); +#else + saacproto_ACCharLoad_send( ti , FAILED , + "char nonexistent" , mesgid ); +#endif + return; + } + + +// log( "loadCharOne: id:[%s] char:[%s]\n", id, charname ); + + if( loadCharOne( id , charindex , loadbuf ,sizeof( loadbuf ))<0){ +#ifdef _NewSave + saacproto_ACCharLoad_send( ti , FAILED , + "cannot load ( disk i/o error?)", mesgid, charindex ); +#else + saacproto_ACCharLoad_send( ti , FAILED , + "cannot load ( disk i/o error?)", mesgid ); +#endif + return; + }else{ +#ifdef _CHAR_POOLITEM + checkCharPoolItem( id); +#endif +#ifdef _CHAR_POOLITEM + checkCharPoolPet( id); +#endif + + } + {//ttom + char *c_ptr; + c_ptr=loadbuf; + while(*c_ptr!='\0'){ + if( IS_2BYTEWORD(*c_ptr) ){ + if(*(c_ptr+1)==' '){ + *(c_ptr+1)=0x41; + } + c_ptr++; + if(*c_ptr=='\0') break; + } + c_ptr++; + } + }//ttom + + if( lock ){ + char result[100]; + char retdata[100]; + +#ifdef _LOCK_ADD_NAME + if( lockUser( getGSName(ti) , id , charname, passwd , 1 , result , sizeof( result ) , + retdata , sizeof( retdata ) , process , deadline) <0 ){ +#else + // Spock 2000/11/2 + if( lockUser( getGSName(ti) , id , passwd , 1 , result , sizeof( result ) , + retdata , sizeof( retdata ) , process , deadline) <0 ){ +#endif + saacproto_ACCharLoad_send( ti , FAILED, "lock FAIL!!" , mesgid , charindex ); + return; + }else { +#ifdef _TIMEOUTKICK + // +#endif + } + } + memset( infobuf , 0 , sizeof( infobuf )); + getCharInfoFromString( loadbuf , infobuf ); + makeStringFromEscaped( infobuf ); + + +#ifdef _BAD_PLAYER // WON ADD 送坏玩家去关 + { + extern int MAX_BAD_PLAYER; + extern char BadPlayerList[500][20]; // 定义最大 500 名 + int i; + + for( i=0; i<=MAX_BAD_PLAYER; i++){ + if( strcmp( id, BadPlayerList[i] ) == 0){ + saacproto_ACCharLoad_send( ti , BADPLAYER , infobuf , mesgid, charindex ); +#ifdef _WAEI_KICK + saacproto_ACKick_recv( ti, id, 10, -1); +#endif + return; + } + } + } +#endif + +#ifdef _NewSave + saacproto_ACCharLoad_send( ti , SUCCESSFUL , infobuf , mesgid, charindex ); +#else + saacproto_ACCharLoad_send( ti , SUCCESSFUL , infobuf , mesgid); +#endif + +#ifdef _WAEI_KICK + saacproto_ACKick_recv( ti, id, 10, -1); //踢其他星系 +#endif + + +#endif +} + +#ifdef _NewSave +int charSave( int ti , char *id , + char *charname , char *opt , char *charinfo, + int unlock , int mesgid , int charindex) +#else + int charSave( int ti , char *id , + char *charname , char *opt , char *charinfo, + int unlock , int mesgid ) +#endif +{ +#ifdef _NewSave +#else + int charindex; +#endif + char savebuf[CHARDATASIZE]; + int ret = -1; + + + memset(savebuf, 0, sizeof(savebuf)); + + //andy_log + if( strstr( charinfo, "DATAEND=") == NULL ){ + FILE *fp; + if( (fp=fopen( "badpetstring.txt", "a+")) != NULL ){ + fprintf( fp, "%s\n", charinfo); + fclose( fp); + } + log( "err add batpetstring.txt:%s[%s] !\n", id, charname); + } + + if( unlock ){ + char result[100]; + char retdata[100]; +#ifdef _LOCK_ADD_NAME + if( (ret = lockUser( getGSName(ti), id , "" , "0" , 0 , result , sizeof( result ) , + retdata , sizeof( retdata ) , "0" , "0")) < 0 ){ +#else + if( (ret = lockUser( getGSName(ti), id , "0" , 0 , result , sizeof( result ) , + retdata , sizeof( retdata ) , "0" , "0")) < 0 ){ +#endif + log( "Unlock:%s FAILED err!!\n", id); + } +#ifdef _LOCK_SERVER + if( CHECK_LS_BEUSE() == TRUE ) { + LServer_SAUNLock_send( ti, id, mesgid, 1); + } +#endif + } + // Nuke *1 add escape + if( makeSaveCharString( savebuf , sizeof( savebuf ) , + charname, opt , charinfo )<0){ + log("\n ACCharSave:too long "); + saacproto_ACCharSave_send( ti , FAILED , "too long" , mesgid ); + // Spock fixed 2000/11/1 + return ret; + } +#ifdef _NewSave + if (charindex == -1) + charindex = getCharIndexByName( id , charname ); +#else + // Nuke *1- + charindex = getCharIndexByName( id , charname ); +#endif + if( charindex < 0 ){ + int blankind = findBlankCharIndex( id ); + if( blankind < 0 ){ + log("\n ACCharSave:char full "); + saacproto_ACCharSave_send( ti , FAILED , "char full" ,mesgid); + return ret; + } else { + charindex = blankind; + } + } + + log( "账号:[%s] 人物:[%s]\n", id, charname ); + if( saveCharOne( id , charindex , savebuf ) < 0 ){ + log("\n ACCharSave:disk I/O error or a bug "); + saacproto_ACCharSave_send( ti , FAILED , "disk I/O error or a bug", mesgid ); + return ret; + } + else + { +#ifdef _SASQL + sasql_save_nm( charindex, id, charname ); + sasql_save_opt( charindex, id, opt ); + sasql_save_int_info( charindex, id, charinfo ); + sasql_save_char_info( charindex, id, charinfo ); +#endif + } + + saacproto_ACCharSave_send( ti , SUCCESSFUL , "" , mesgid); + return ret; +} + +void charListCallback( int ti , int auth , char *c0 , char *c1 , + char *c2 , char *c3 , char *c4 , int i0 , int i1 ) +{ +#ifndef _LOCK_SERVER + char listbuf[CHARDATASIZE]; +#endif + char *id = c0; + int mesgid = i0; + + //log(" 档案列表回溯:%s:%d \n", id, auth); + + if( auth != 0 ){ + char data[100]; + snprintf( data, sizeof( data ) , "%d" , auth ); + saacproto_ACCharList_send( ti , FAILED , data , mesgid ); + total_ng_charlist++; + return; + } + +if (!sasql_query(c0,c1)){ +#ifdef _SQL_REGISTER + if(!sasql_register(c0,c1)) +#endif + { + log("密码错误或没有注册\n"); + saacproto_ACCharList_send( ti , FAILED , "Password error" , mesgid); + return;}} + + + // 取消下列 unlock 动作 +#ifndef _FIX_MESSAGE // WON ADD 修改WORKER封包内容 +#ifdef _DELAY_UNLOCK + if( UNlockM_isBe( id ) ){ + saacproto_ACCharList_send( ti , FAILED , "locked" , mesgid ); + return; + }else +#endif + if( isLocked( id ) ){ + saacproto_ACCharList_send( ti , FAILED , "locked" , mesgid ); + checkGSUCheck( id ); + total_ng_charlist++; + return; + } +#endif // end FIX_MESSAGE + +#ifdef _LOCK_SERVER + if( CHECK_LS_BEUSE() == TRUE ) { + LServer_SACheckLock1_send( ti, id, mesgid, 1); + }else { + saacproto_ACCharList_send( ti , FAILED , "locked" , mesgid ); + total_ng_charlist++; + } +#else + +#ifdef _SLEEP_CHAR // 如果无新档, 将旧档移至新档 + { + char fn_old[256], fn_new[256]; + FILE *fp_old, *fp_new; + int i; + + // 移人物档 + for( i=0; i= 0) + { + if (ACDelFM(index, fmname, fmindex) >= 0) + log("ACDelFM index:%d fmname:%s fmindex:%d charname:%s, charid:%s, charindex:%d\n", + index, fmname, fmindex, charname, id, fmcharindex); + } + log("ChangeFMLeader_3 index:%d fmname:%s fmindex:%d\n", index, fmname, fmindex); +#else + if (ACDelFM(index, fmname, fmindex) >= 0) + log("ACDelFM index:%d fmname:%s fmindex:%d charname:%s, charid:%s, charindex:%d\n", + index, fmname, fmindex, charname, id, fmcharindex); +#endif + } + else + { +#ifdef _FMVER21 + if (ACMemberLeaveFM(index, fmname, fmindex, charname, 0, 0, fmcharindex) >= 0) + log("ACMemberLeaveFM index:%d fmname:%s fmindex:%d charname:%s, charid:%s, charindex:%d\n", + index, fmname, fmindex, charname, id, fmcharindex); +#else + if (ACMemberLeaveFM(index, fmname, fmindex, charname, 0, fmcharindex) >= 0) + log("ACMemberLeaveFM index:%d fmname:%s fmindex:%d charname:%s, charid:%s, charindex:%d\n", + index, fmname, fmindex, charname, id, fmcharindex); +#endif + } + } + } +#endif + // Spock 2000/12/6 + time( &timenow ); + now = localtime( &timenow ); + sprintf( logfile , "log/chardel/%04d%02d%02d.log" , + now->tm_year + 1900 , now->tm_mon + 1 , now->tm_mday ); + LOGBASE( logfile , "%04d/%02d/%02d %02d:%02d:%02d id:[%s] char:[%s] index:[%d]\n" , + now->tm_year + 1900 , now->tm_mon + 1 , now->tm_mday , + now->tm_hour , now->tm_min , now->tm_sec , + id , charname , charindex ); + // Spock end + USERLOG( id , "chardelete: successful\n" ); + saacproto_ACCharDelete_send( ti , SUCCESSFUL , "ok" , mesgid); +} + +void dummyCallback( int ti , int auth , + char *c0 , char *c1 , char *c2 , char *c3 , + char *c4 , int i0 , int i1 ) +{ + return; +} + +static void getCharNameFromString(char*str ,char *out ) +{ + int c; + + out[0]='\0'; + for(c=0;;c++){ + if( IS_2BYTEWORD( str[c] ) ){ + out[c] = str[c]; + c ++ ; // 戚及 侬尺 + out[c] = str[c]; + continue; + } + + out[c] = str[c]; + if( str[c] == '\0' )break; + + if( str[c] == SPACE ){ + out[c] = '\0'; + break; + } + } +} + +static void getCharOptionFromString( char *str , char *out ) +{ + int c; + int outc = 0; + out[outc] = '\0'; + for(c=0;;c++){ + if( str[c]=='\0')break; + if( IS_2BYTEWORD( str[c] ) ){ + c++; + if( str[c] == '\0' )break; // 公及 侬互允匹卞NULL卅日蔽 + continue; + } + + if( str[c]== SPACE ){ + c++; + for(;;c++){ + + if( str[c] == '\0' ){ // 蔽 分匀凶日 NULL 木化蔽歹月 + out[outc] = '\0'; + break; + } + + // 仇仇手ㄡ田奶玄 侬及ㄠ田奶玄 卅日手丹域田奶玄戊疋□允月 + //---- For 2Byte Code ---- + if( IS_2BYTEWORD( str[c] ) ){ + out[outc++] = str[c++]; // ㄠ田奶玄 戊疋□ + out[outc++] = str[c]; // ㄡ田奶玄 戊疋□ + if( str[c] == '\0' )break; // 公及 侬互允匹卞NULL卅日蔽 + continue; + } + + // 骚橘 侬反ㄠ田奶玄戊疋□ + out[outc] = str[c]; // 引内戊疋□ + if( str[c] == '\0' )break; // 蔽 分匀凶日蔽歹月 + + if( str[c] == SPACE ){ + out[outc] = '\0'; + break; + } + outc++; + } + return; + } + } +} + +void getCharInfoFromString( char *str , char *out ) +{ + int c=0,outc=0; + int space_counter=0; + + out[outc] = '\0'; + for(c=0;;c++){ + if( str[c]=='\0')break; + if( IS_2BYTEWORD( str[c] ) ){ + c++; + continue; + }else + if( str[c]== SPACE ){ + space_counter++; + } + if( space_counter==2 && str[c]== SPACE ){ + c++; + for(;;c++){ + if( IS_2BYTEWORD( str[c] ) ){ + out[outc++] = str[c++]; + out[outc++] = str[c]; + if( str[c] == '\0' ){ + out[outc] = '\0'; + break; + } + continue; + } + + out[outc] = str[c]; + if( str[c] == '\0' )break; + if( str[c] == SPACE ){ + out[outc] = '\0'; + break; + } + outc++; + } + return; + } + } +} + +static void makeCharFileName( char *id,char *output, int outlen, int num) +{ + char body[1024]; + if ( strlen( id) < 1)return; + + snprintf(body , sizeof(body ) , "%s.%d.char" , id , num ); + makeDirFilename(output , outlen, chardir , getHash(id) ,body); +} + +#ifdef _SLEEP_CHAR // 取得非活跃人物档名 +static void makeSleepCharFileName( char *id,char *output, int outlen, int num) +{ + char body[1024]; + if ( strlen( id) < 1)return; + + snprintf(body , sizeof(body ) , "%s.%d.char" , id , num ); + makeDirFilename(output , outlen, sleepchardir , getHash(id) ,body); +} +#endif + +int loadCharNameAndOption( char *id , char *output , int outlen) +{ + char chbuf[MAXCHAR_PER_USER][CHARDATASIZE]; + char namework[CHARDATASIZE]; + char optionwork[CHARDATASIZE]; + char nm_work[CHARDATASIZE]; + + int i,count=0; + int so_far_bytes = 0; + output[0] = 0; + + for(i=0;i 0 ){ + delim[0] = SPACE; + delim[1] = 0; + } else { + delim[0] = 0; + } + + snprintf( nm_work , sizeof( nm_work ), + "%s%s|%s" , delim,namework , optionwork ); + l = strlen( nm_work ); + + if( ( so_far_bytes + l ) < outlen ){ + strcat( output , nm_work ); + so_far_bytes += l; + count++; + } + } + + return count; +} +#ifdef _CHECK_BADFILES +int backupBadcharfile( char *filename, char *cdkey, int num) +{ + char file1[256],file2[256]; + char userpath[256]; + FILE *fp; + + log("backupBadcharfile( %s) -%s.%d-%s\n", filename, cdkey, num, userpath); + sprintf( userpath , "%s.%d.char" , cdkey , num ); + sprintf( file1, "char/0x%x/%s", getHash(cdkey) & 0xff, userpath); + sprintf( file2, "badchar/%s", userpath); + { + char buf[1024]; + int f; + bzero(buf,sizeof(buf)); + f=open( file1, O_RDONLY); + if ( f <= 0 ){ + log( "Can't open %s..\n", file1); + return 1; + } + lseek( f, -4, SEEK_END); + read(f,buf,4); + close(f); + if ((buf[2]=='\\')&&(buf[3]=='n')&& + (buf[0]=='\\')&&(buf[1]=='z')){ + return 1; + } + } + if (mkdir("badchar", 0755) == 0) + log("create %s\n", "badchar"); + sprintf( file2, "./badchar/%s", filename); + fp = fopen( file2, "a+"); + if( fp == NULL ){ + + log("create file:%s error !!\n", file1); + return -1; + } + fprintf( fp, "%s %s\n", cdkey, file1); + fclose( fp); + + log("backup badcharfile:%s..\n", userpath); + return -1; +} +#endif + +int loadCharOne( char *id , int num, char *output , int outlen ) +{ + char fn[1024]; + FILE *fp; + char c_temp,*c_ptr; + c_ptr=output; + + makeCharFileName( id , fn , sizeof(fn),num ); + fp = fopen( fn , "r" ); + if( fp == NULL ){ + return -1; + } + + do{ + c_temp = fgetc(fp); + *c_ptr=c_temp; + c_ptr++; + }while(c_temp != EOF); + *c_ptr='\0'; + + if( output[0]=='|' && output[1]=='|' ){ + return -1; + } + fclose(fp); +#ifdef _CHECK_BADFILES + if( backupBadcharfile( "badfilelist.txt", id, num) < 0 ){ + return -1; + } +#endif + return 0; +} + +int saveCharOne( char *id , int num , char *input ) +{ + char fn[1024]; + FILE *fp; + char *strp; + char *strp1; // Won 修正 hp 为负的人 + + makeCharFileName( id , fn , sizeof(fn),num ); + fp= fopen( fn , "w" ); + if( fp == NULL ) { + log( "save error 01: %d",errno );//Change add errno + return -1; + } + + // Won 修正 hp 为负的人 + if ((strp=strstr(input,"\\nhp=-"))!=NULL) { + strp1=strstr(input,"\\nmp="); + *(strp+5)='1'; + strcpy((strp+6), strp1); + } + + // Arminius + if ((strp=strstr(input,"\\nhp=0\\n"))!=NULL) *(strp+5)='1'; + + fprintf( fp , "%s" , input ); + fclose(fp); + +#if 0 //_SLEEP_CHAR // 旧档也存 + { + char fn1[1024], fn2[1024]; + makeSleepCharFileName( id , fn1 , sizeof(fn1),num ); + fp = fopen( fn1 , "w" ); + if( fp != NULL ) { + fprintf( fp , "%s" , input ); + fclose(fp); + } + + // 复制新仓库档到旧档 + makeCharPoolItemFileName( id, fn1, sizeof(fn)); + makeSleepCharPoolItemFileName( id, fn2, sizeof(fn)); + filecopy( fn1, fn2); + } +#endif +#ifdef _SQL_BACKGROUND + sasql_update(id,fn); + sasql_online(id,NULL); +#endif + log( "写入 %s 档案文件:%s\n",id , fn ); + return 0; + +} + +static int makeSaveCharString( char *out , int outlen , + char *nm , char *opt , char *info ) +{ + char nmwork[CHARDATASIZE]; + char optwork[CHARDATASIZE]; + char infowork[CHARDATASIZE]; + char outwork[CHARDATASIZE]; + char *nmwork_p , *optwork_p , *infowork_p; + int l; + + /* 戊疋□仄化 */ + + strncpy( nmwork , nm , sizeof( nmwork )); + nmwork[strlen( nm)]=0; + + strncpy( optwork , opt , sizeof( optwork )); + optwork[strlen(opt)]=0; + + strncpy( infowork , info , sizeof( infowork )); + infowork[strlen(info)]=0; + + /* 巨旦弗□皿仄 */ + /* if ( esc ) { + nmwork_p = makeEscapeString1( nm , nmwork ,sizeof( nmwork )); + optwork_p = makeEscapeString1( opt , optwork , sizeof( optwork )); + infowork_p = makeEscapeString1( info , infowork , sizeof( infowork )); +} else {*/ + + nmwork_p = makeEscapeString( nm , nmwork ,sizeof( nmwork )); + optwork_p = makeEscapeString( opt , optwork , sizeof( optwork )); + infowork_p = makeEscapeString( info , infowork , sizeof( infowork )); + +#ifdef _SASQL + { + FILE *f; + f=fopen("nmkill.txt","w"); + if( f ) + { + fprintf(f,"%s",nmwork_p); + fclose( f ); + } + f=fopen("optkill.txt","w"); + if( f ) + { + fprintf(f,"%s",optwork_p); + fclose( f ); + } + f=fopen("infokill.txt","w"); + if( f ) + { + fprintf(f,"%s",infowork_p); + fclose( f ); + } + } +#endif + // } + /* 勾卅仆月[赞中互巨仿□腹请及凶户卞域荚伐□弁卞中木月[ */ + snprintf( outwork ,sizeof( outwork ) , + "%s" SPACESTRING "%s" SPACESTRING "%s" , + nmwork_p , optwork_p , infowork_p ); + + l = strlen( outwork ); + if( l >= (outlen-1)){ + return -1; + } + + /* NULL 侬互 卞丐月井日0毛中木氏午中井氏及分[ */ + memcpy( out , outwork , l + 1); + + return 0; +} + +int getCharIndexByName( char *id , char *charname ) +{ + int i; + for(i=0;i= (outlen-1) ) break; + }while(c_temp != EOF); + *c_ptr='\0'; + fclose(fp); + return sizes; +} + +int checkCharPoolItem( char *id) +{ + char fn[256]; + FILE *fp; + + makeCharPoolItemFileName( id , fn , sizeof(fn)); + fp = fopen( fn , "r" ); + if( fp == NULL ) { + if( saveCharPoolItem( id , "", 0) < 0 ){ + log("\n Can't Create char:%s poolitem File!!", id); + return -1; + } + }else{ + fclose(fp); + } + + return 1; +} +#endif + + +#ifdef _CHAR_POOLPET +static void makeCharPoolPetFileName( char *id,char *output, int outlen) +{ + char poolpet[256]; + if ( strlen( id) < 1)return; + snprintf( poolpet , sizeof( poolpet ) , "%s.pet" , id); + makeDirFilename(output , outlen, chardir , getHash(id) ,poolpet); +} + +#ifdef _SLEEP_CHAR // 取得非活跃人物仓库档名 +static void makeSleepCharPoolPetFileName( char *id,char *output, int outlen) +{ + char poolpet[256]; + if ( strlen( id) < 1)return; + snprintf( poolpet , sizeof( poolpet ) , "%s.pet" , id); + makeDirFilename(output , outlen, sleepchardir , getHash(id) ,poolpet); +} +#endif + +int InsertCharPoolPet( char *id , char *input, int sizes) +{ + char fn[256]; + FILE *fp; + + if( sizes <= 0 ) return sizes; + makeCharPoolPetFileName( id , fn , sizeof(fn)); + + fp= fopen( fn , "a+" ); + if( fp == NULL ) { + fp= fopen( fn , "w" ); + if( fp == NULL ) { + log( "save %s error.\n", fn); + return -1; + } + } + + fprintf( fp , "%s" , input ); + fclose(fp); + + log( "add %s charpoolpet file:%s\n", id , fn ); + return sizes; +} + +int saveCharPoolPet( char *id , char *input, int sizes) +{ + char fn[256]; + FILE *fp; + + if( sizes < 0 ) return sizes; + if( input == NULL ) return -1; + makeCharPoolPetFileName( id , fn , sizeof(fn)); + + fp= fopen( fn , "w" ); + if( fp == NULL ) { + log( "save %s error.\n", fn); + return -1; + } + + fprintf( fp , "%s" , input ); + fclose(fp); + + log( "写入 %s 宠物档案文件:%s\n", id , fn ); + return sizes; +} + +int loadCharPoolPetOne( char *id , char *output , int outlen) +{ + char fn[256]; + FILE *fp; + + char c_temp,*c_ptr; + int sizes=0; + c_ptr=output; + + makeCharPoolPetFileName( id , fn , sizeof(fn)); + + fp = fopen( fn , "r" ); + if( fp == NULL ){ + if( (fp = fopen( fn , "w" )) == NULL) + return -1; + return 0; + } + + do{ + c_temp = fgetc(fp); + *c_ptr=c_temp; + c_ptr++; + sizes++; + if( sizes >= (outlen-1) ) break; + }while(c_temp != EOF); + *c_ptr='\0'; + fclose(fp); + return sizes; +} + +int checkCharPoolPet( char *id) +{ + char fn[256]; + FILE *fp; + + makeCharPoolPetFileName( id , fn , sizeof(fn)); + fp = fopen( fn , "r" ); + if( fp == NULL ) { + if( saveCharPoolPet( id , "", 0) < 0 ){ + log("\n Can't Create char:%s poolpet File!!", id); + return -1; + } + }else{ + fclose(fp); + } + + return 1; +} +#endif + + + + +int filecopy( char *oldfilename, char *newfilename) +{ + FILE *oldfile; + FILE *newfile; + char c_temp; + + if( (oldfile = fopen( oldfilename, "r") ) == NULL ) { + return -1; + } + if( (newfile = fopen( newfilename, "w") ) == NULL ) { + return -1; + } + + while(1) { + c_temp = fgetc( oldfile); + if( c_temp == EOF) + break; + fputc( c_temp, newfile); + }; + + fclose( oldfile); + fclose( newfile); + + return 0; +} diff --git a/saac/char.h b/saac/char.h new file mode 100644 index 0000000..aa56a1a --- /dev/null +++ b/saac/char.h @@ -0,0 +1,106 @@ +#ifndef _CHAR_H_ +#define _CHAR_H_ +#include "version.h" + +/* 1交□扒丐凶曰及 平乓仿醒(白央奶伙醒) */ +#define MAXCHAR_PER_USER 2 + +int isLocked( char *id ); +void charLoadCallback( int ti , int auth_ok , char *c0, char* c1 , + char *c2 , char *c3, char *c4, int i0 , int i1 ); + + +// Spock 2000/11/1 +//void charSave( int ti , char *c0 , +// char *c2 , char *c3 , char *c4, int i0 , int i1 ); +// return process number +#ifdef _NewSave +int charSave( int ti , char *c0 , + char *c2 , char *c3 , char *c4, int i0 , int i1 , int charindex ); +#else +int charSave( int ti , char *c0 , + char *c2 , char *c3 , char *c4, int i0 , int i1 ); +#endif +// Spock end + +void charListCallback( int ti , int auth_ok , char *c0 , char *c1 , + char *c2 , char *c3 , char *c4 , int i0 , int i1 ); + +void charDeleteCallback( int ti , int auth_ok , + char *c0 , char *c1 , char *c2 , char *c3 , + char *c4 , int i0 , int i1 ); +// Nuke +void dummyCallback( int ti , int auth_ok , + char *c0 , char *c1 , char *c2 , char *c3 , + char *c4 , int i0 , int i1 ); + + +// Spock 2000/11/1 +#ifdef _LOCK_ADD_NAME +int lockUser( char *gmsvname , char *id , char *name, char *passwd , int lock , + char *result, int resultlen, + char *retdata , int retdatalen , char *process , char *deadline); +#else +int lockUser( char *gmsvname , char *id , char *passwd , int lock , + char *result, int resultlen, + char *retdata , int retdatalen , char *process , char *deadline); +#endif +// Spock end + +int checkValidCharName( char *a); + +int loadCharOne( char *idstring , int num, char *output , int outlen ); +int saveCharOne( char *idstring , int num , char *input ); + +int loadCharNameAndOption( char *id , char *output , int outlen); +int getCharIndexByName( char *id , char *charname ); +void getCharInfoFromString( char *str , char *out ); + +#ifdef _CHAR_POOLITEM +int InsertCharPoolItem( char *id , char *input, int sizes); +int saveCharPoolItem( char *id , char *input, int sizes); +int loadCharPoolItemOne( char *id , char *output , int outlen); +int checkCharPoolItem( char *id); +#endif + +#ifdef _CHAR_POOLPET +int InsertCharPoolPet( char *id , char *input, int sizes); +int saveCharPoolPet( char *id , char *input, int sizes); +int loadCharPoolPetOne( char *id , char *output , int outlen); +int checkCharPoolPet( char *id); +#endif + + +#ifdef _ANGEL_SUMMON + +#define MAXMISSIONTABLE 1000 + +struct MissionTable +{ + char angelinfo[128]; + char heroinfo[128]; + int mission; + int flag; + int time; + int limittime; +}; + +extern struct MissionTable missiontable[MAXMISSIONTABLE]; + +#endif + + +#ifdef _RACEMAN +#define DEFMAXRANK 100 +struct RankTable +{ + int rank; + char id[20]; + char name[64]; + int catchcnt; +}; +extern struct RankTable ranktable[DEFMAXRANK]; +#endif + +#endif + diff --git a/saac/chatroom.c b/saac/chatroom.c new file mode 100644 index 0000000..ebdd87b --- /dev/null +++ b/saac/chatroom.c @@ -0,0 +1,505 @@ +#include "version.h" +#include "main.h" +#include "util.h" + +#include "saacproto_serv.h" +#include "saacproto_util.h" + +#ifdef _UNIVERSE_CHATROOM +#include "chatroom.h" + +UniChatRoomlist UniChatRoom[MAX_CHATROOM]; + +void CHATROOM_resetChat( int chat) +{ + int i; + if( chat<0 || chat>=MAX_CHATROOM ) return; + UniChatRoom[chat].use=0; + UniChatRoom[chat].masindex=-1; + UniChatRoom[chat].charanum=0; + for( i=0; i=MAX_CHATROOM ) return; + + easyGetTokenFromBuf( data, '|', 3, buf1, sizeof(buf1) ); + sprintf( cdkey, "%s", buf1); + easyGetTokenFromBuf( data, '|', 4, buf1, sizeof(buf1) ); + sprintf( name, "%s", buf1); + + uti = UniChatRoom[chat].masindex; + if( uti<0 || uti >= MAX_PPLINROOM ) return; + if( UniChatRoom[chat].charalist[uti].use == 0 ) return; + if( !strcmp( UniChatRoom[chat].charalist[uti].cdkey, cdkey) && + !strcmp( UniChatRoom[chat].charalist[uti].name, name) ){ + int i; + char token[256]; + CHATROOM_resetChat( chat); + sprintf( token, "D|%d|", chat); + for( i=0; i=MAX_CHATROOM ) return; + + easyGetTokenFromBuf( data, '|', 3, buf1, sizeof(buf1) ); + uti = atoi( buf1); + if( uti<0 || uti >= MAX_PPLINROOM ) return; + if( UniChatRoom[chat].charalist[uti].use == 0 ) return; + + sprintf( token, "L|%d|%d|%s|", chat, uti, UniChatRoom[chat].charalist[uti].name ); + for( i=0; i=MAX_PPLINROOM ){ + CHATROOM_resetChat( chat); + sprintf( token, "D|%d|", chat); + for( i=0; i=MAX_CHATROOM ) return; + + easyGetTokenFromBuf( data, '|', 3, buf1, sizeof(buf1) ); + sprintf( cdkey, "%s", buf1); + easyGetTokenFromBuf( data, '|', 4, buf1, sizeof(buf1) ); + sprintf( name, "%s", buf1); + easyGetTokenFromBuf( data, '|', 5, buf1, sizeof(buf1) ); + whoti = atoi( buf1); + + uti = UniChatRoom[chat].masindex; + if( uti<0 || uti >= MAX_PPLINROOM ) return; + if( UniChatRoom[chat].charalist[uti].use == 0 ) return; + if( whoti<0 || whoti >= MAX_PPLINROOM ) return; + if( UniChatRoom[chat].charalist[whoti].use == 0 ) return; + + if( !strcmp( UniChatRoom[chat].charalist[uti].cdkey, cdkey) && + !strcmp( UniChatRoom[chat].charalist[uti].name, name) ){ + int i; + char token[256]; + + sprintf( token, "K|%d|%d|", chat, whoti); + + for( i=0; i=MAX_CHATROOM ) return; + + uti = UniChatRoom[chat].masindex; + if( uti<0 || uti >= MAX_PPLINROOM ) return; + if( UniChatRoom[chat].charalist[uti].use == 0 ) return; + if( !gs[ UniChatRoom[chat].masfd].use ) return; + saacproto_ACUniChatroom_send( UniChatRoom[chat].masfd, "", SUCCESSFUL, data, -1, -1); + UniChatRoom[chat].charanum++; + +} + +void CHATROOM_AgreeJoinCR( int fd, char *data, int userindex, int clifd) +{ + int chat=-1, ti, i; + char buf1[256], cdkey[256], name[256], own[256]; + char token[256]; +extern gmsv gs[MAXCONNECTION]; + + easyGetTokenFromBuf( data, '|', 2, buf1, sizeof(buf1) ); + chat = atoi( buf1); + if( chat<0 || chat>=MAX_CHATROOM ) return; + easyGetTokenFromBuf( data, '|', 3, buf1, sizeof(buf1) ); + sprintf( cdkey, "%s", buf1); + easyGetTokenFromBuf( data, '|', 4, buf1, sizeof(buf1) ); + sprintf( name, "%s", buf1); + easyGetTokenFromBuf( data, '|', 5, buf1, sizeof(buf1) ); + sprintf( own, "%s", buf1); + + if( (ti=CHATROOM_AgreeSomeOne( chat, cdkey, name, own, fd)) < 0 ){ + sprintf( token, "A|%d|FULL|", chat); + saacproto_ACUniChatroom_send( fd, "", SUCCESSFUL, token, userindex, clifd); + }else{ + sprintf( token, "A|%d|OK|", chat); + saacproto_ACUniChatroom_send( fd, "", SUCCESSFUL, token, userindex, clifd); + UniChatRoom[chat].charanum++; + } + CHATROOM_UpdateChatRoom( -1, chat); + + +} + +void CHATROOM_GSClosedHandle( int fd) +{ + int i, j, mindex; +extern gmsv gs[MAXCONNECTION]; + //andy_log + log( "\nCHATROOM_GSClosedHandle( %d)\n", fd); + + for( j=0; j= MAX_PPLINROOM || + UniChatRoom[j].charalist[mindex].use == 0 ){ + char token[512]; + + CHATROOM_resetChat( j); + sprintf( token, "D|%d|", j); + for( i=0; i=MAX_CHATROOM ) return -1; + if( UniChatRoom[chat].use == 0 ) return -1; + for( i=0; i=MAX_CHATROOM ) return; + + easyGetTokenFromBuf( data, '|', 3, buf1, sizeof(buf1) ); + sprintf( cdkey, "%s", buf1); + easyGetTokenFromBuf( data, '|', 4, buf1, sizeof(buf1) ); + sprintf( name, "%s", buf1); + + uti = UniChatRoom[chat].masindex; + if( uti<0 || uti >= MAX_PPLINROOM ) return; + if( UniChatRoom[chat].charalist[uti].use == 0 ) return; + + if( !strcmp( UniChatRoom[chat].charalist[uti].cdkey, cdkey) && + !strcmp( UniChatRoom[chat].charalist[uti].name, name) ){ + char token[256]; + + easyGetTokenFromBuf( data, '|', 5, buf1, sizeof(buf1) ); + sprintf( result, "%s", buf1); + + easyGetTokenFromBuf( data, '|', 6, buf1, sizeof(buf1) ); + sprintf( cdkey, "%s", buf1); + easyGetTokenFromBuf( data, '|', 7, buf1, sizeof(buf1) ); + sprintf( name, "%s", buf1); + easyGetTokenFromBuf( data, '|', 8, buf1, sizeof(buf1) ); + sprintf( own, "%s", buf1); + easyGetTokenFromBuf( data, '|', 9, buf1, sizeof(buf1) ); + whofd = atoi( buf1); + if( !gs[ whofd].use ) return; + + sprintf( token, "A|%d|%s|%s|%s|%s|", chat, result, cdkey, name, own ); + if( !strcmp( result, "OK") ){ +// UniChatRoom[chat].charanum++; + if( CHATROOM_AgreeSomeOne( chat, cdkey, name, own, whofd) < 0 ){ + sprintf( token, "A|%d|FULL|%s|%s|%s|", chat, cdkey, name, own ); + } + }else{ + UniChatRoom[chat].charanum--; + } + saacproto_ACUniChatroom_send( whofd, "", SUCCESSFUL, token, -1, -1); + } +} + +void CHATROOM_MasterChatRoom( char *Cdkey, char *data ) +{ + int chat=-1, uti; + char buf1[256]; + char cdkey[256],name[256]; + +extern gmsv gs[MAXCONNECTION]; + + easyGetTokenFromBuf( data, '|', 2, buf1, sizeof(buf1) ); + chat = atoi( buf1); + if( chat<0 || chat>=MAX_CHATROOM ) return; + if( UniChatRoom[chat].use == 0 ) return; + easyGetTokenFromBuf( data, '|', 3, buf1, sizeof(buf1) ); + sprintf( cdkey, "%s", buf1); + easyGetTokenFromBuf( data, '|', 4, buf1, sizeof(buf1) ); + sprintf( name, "%s", buf1); + + uti = UniChatRoom[chat].masindex; + if( uti<0 || uti >= MAX_PPLINROOM ) return; + if( UniChatRoom[chat].charalist[uti].use == 0 ) return; + + if( !strcmp( UniChatRoom[chat].charalist[uti].cdkey, cdkey) && + !strcmp( UniChatRoom[chat].charalist[uti].name, name) ){ + int i,ti; + char token[256]; + + easyGetTokenFromBuf( data, '|', 5, buf1, sizeof(buf1) ); + ti = atoi( buf1); + if( UniChatRoom[chat].charalist[ti].use == 0 ) return; + UniChatRoom[chat].masindex = ti; + UniChatRoom[chat].masfd = UniChatRoom[chat].charalist[ti].fd; + sprintf( token, "M|%d|%d|", chat, ti ); + + for( i=0; i=MAX_CHATROOM ) return; + + for( i=0; i=MAX_CHATROOM ) return 0; +// if( UniChatRoom[chat].use == 0 ) return 0; + + sprintf( token, "U|%d|%d|%s|%d|%d|", + chat, + UniChatRoom[chat].use, + UniChatRoom[chat].chatname, + UniChatRoom[chat].masindex, + UniChatRoom[chat].charanum + ); + + + for( i=0; i= 0 ){ + }else{ + saacproto_ACUniChatroom_send( fd, cdkey, FAILED, data, userindex, clifdid ); + } + }else if( !strcmp( comm, "D") ) {//删除频道 + CHATROOM_DelChatRoom( cdkey, data); + }else if( !strcmp( comm, "L") ) {//离开频道 + CHATROOM_LeaveChatRoom( cdkey, data); + }else if( !strcmp( comm, "T") ) {//频道讯息 + CHATROOM_MessageChatRoom( cdkey, data); + }else if( !strcmp( comm, "K") ) {//踢出频道 + CHATROOM_KickChatRoom( cdkey, data); + }else if( !strcmp( comm, "J") ) {//申请加入频道 + CHATROOM_AgreeJoinCR( fd, data, userindex, clifdid); + //CHATROOM_JoinChatRoom( cdkey, data); + }else if( !strcmp( comm, "A") ) {//同意加入 + CHATROOM_AgreeChatRoom( cdkey, data); + }else if ( strcmp ( comm , "M" ) == 0 ) { // 更换室长 + CHATROOM_MasterChatRoom( cdkey, data); + }else if( !strcmp( comm, "U") ) {//更新频道 + easyGetTokenFromBuf( data, '|', 2, buf1, sizeof(buf1) ); + if( atoi( buf1) == -1 ){ + for( i=0; i +#include +#include +#include +#include +#include +#include + +/* 侬 巨件玄伉及 length */ +//#define CHARVALUE_MAX 1024 +#define MAXTABLE 16 +// Spock 2000/10/12 +#define CHARVALUE_MAX 256 // DB 字串资料的buffer大小 +#define KEY_MAX 64 // DB Key字串的buffer大小 +#define HASH_SIZE 65536 // Hash table 一次增加的Entry数量 +#define HASH_PRIME 65521 // Hash function 使用的质数 +#define DBINIT_SIZE 16384 // DB 每次配置Entry的数量 +// Spock end + +/* 犯□正矛□旦及伉件弁及邰豳1蜊毛丐日歹允[ */ +struct dbentry +{ + int use; +// unsigned int keyhash; /* 腹绸平□及甩永扑亘戊□玉 */ + int ivalue; /* 旦戊失[玄永皿 NODE 反 -1 匹} + 允屯化及旦戊失反 0 动晓匹卅中午中仃卅中*/ +// int nextind; /* -1 分匀凶日 毛啦 允月 */ + // Spock 2000/10/12 + int prev; // 前一个dbentry, -1表示此项为head + int next; // 下一个dbentry, -1表示此项为tail + char key[KEY_MAX]; + char charvalue[CHARVALUE_MAX]; +// char key[64]; /* 腹绸平□午卅月 侬 */ +// int charvalue_index; /* 侬 田永白央毛今允index */ + // Spock end +}; + +// Spock 2000/10/12 +// Database hashtable +struct hashentry +{ + char key[KEY_MAX]; // 索引key值 + int use; // 是否已被使用 + int dbind; // 指向 dbentry 的 index + int prev; // 同一key值的上一个 hashentry, -1为head + int next; // 同一key值的下一个 hashentry, -1为tail +}; +// Spock end + +typedef enum +{ + DB_INT_SORTED, + DB_STRING, +}DBTYPE; + +/* 1蜊及犯□正矛□旦毛丐日歹允 */ +struct table +{ + int use; // 0:未使用 1:已使用 + DBTYPE type; /* DB及潘 */ + char name[32]; /* 犯□正矛□旦及 蟆 */ + int num; /* 巨件玄伉及醒 */ + int toplinkindex; + // Spock 2000/10/12 + struct hashentry *hashtable; + int hashsize; + int updated; // 0:dbflush後未更新 1:已更新 + int ent_finder; // 指向最後一次配置的 hashentry + // Spock end +}; + +struct dbentry *master_buf; /* 巨件玄伉筏盛迕 */ +int dbsize = 0; /* 赓0匹}1,2,4,8,16...*/ +static int dbent_finder = 0; + +struct table dbt[MAXTABLE]; + +static void dbShowAllTable(void); + +// Spock 2000/10/12 +int dbHash(char* s) +{ + char *p; + unsigned int h= 0 ,g; + for( p = s ; *p ; p ++ ){ + h = ( h<< 4 ) + (*p); + if( (g = h & 0xf0000000) != 0){ + h = h ^ (g>>24); + h = h ^ g; + } + } + return h % HASH_PRIME; +} +// Spock end + +/* Spock deleted 2000/10/12 +struct charvalue +{ + int use; + char buf[CHARVALUE_MAX]; +}; +struct charvalue *charvalue_buf; +int charvaluesize=0; +*/ + +/* + 侬 田永白央□毛傀舰允月 + */ +/* Spock deleted 2000/10/12 +int +reallocCharValue(void) +{ + struct charvalue *previous = charvalue_buf; + struct charvalue *newbuf; + int new_charvaluesize; + if( charvaluesize == 0 ){ + new_charvaluesize = 1; + } else { + new_charvaluesize = charvaluesize * 2; + } + + newbuf = ( struct charvalue *) calloc( 1, new_charvaluesize * + sizeof( struct charvalue )); + if( newbuf == NULL ){ + log( "reallocCharValue: memory shortage!! new_charvaluesize:%d\n", + new_charvaluesize ); + return -1; + } + memset( newbuf, 0 , new_charvaluesize * sizeof( struct charvalue )); + if( previous) memcpy( (char*)newbuf, (char*)previous, + charvaluesize * sizeof( struct charvalue )); + free( previous ); + charvaluesize = new_charvaluesize; + charvalue_buf = newbuf; + + log( "reallocCharValue: " + "new_charvaluesize:%d Old address:%x New address:%x\n", + new_charvaluesize , (unsigned int )previous, + (unsigned int)newbuf ); + return 0; +} +*/ + +/* + 侬 田永白央□毛1蜊歹曰丐化月[ + 凶曰卅仁卅匀凶日realloc允月[ + +*/ +/* Spock deleted 2000/10/12 +static int charvalue_finder=0; +static int +dbAllocCharValue( void ) +{ + int i; + for(i=0;i= (sizeof( charvalue_buf[0].buf )-1)) return -1; + memcpy( charvalue_buf[index].buf , data, l+1 ); + return 0; +} +*/ + +/* + DB及云云五今互凶日氏仁卅匀凶日歹曰丐化卅云允[中引及扔奶术及2 卞允月 + 0分匀凶日1卞允月 + */ +static int +reallocDB( void ) +{ + struct dbentry *previous = master_buf; + struct dbentry *newbuf; + int new_dbsize; +/* Spock deleted 2000/10/12 + if( dbsize == 0 ){ + new_dbsize = 1; + } else { + new_dbsize = dbsize * 2; + } +*/ + // Spock+1 2000/10/12 + new_dbsize = dbsize + DBINIT_SIZE; + + newbuf = (struct dbentry* ) calloc( 1, new_dbsize * + sizeof( struct dbentry) ); + /* 丢乒伉凶曰卅中 */ + if( newbuf == NULL ){ + log( "重新分配数据: 内存不足!!! 新数据大小: %d\n", new_dbsize ); + return -1; + } + + /* 衙中幻丹井日蕙仄中 卞戊疋□仄化 */ + + memset( newbuf , 0 , new_dbsize * sizeof( struct dbentry ) ); + /* Spock deleted 2000/10/19 + if( previous )memcpy( (char*)newbuf, (char*)previous, + dbsize * sizeof( struct dbentry )); + + // 衙中幻丹毛荸 仄 + free( previous ); + */ + // Spock 2000/10/19 + if ( dbsize > 0 ) + { + memcpy( newbuf , previous , dbsize * sizeof(struct dbentry)); + free( previous ); + } + // Spock end + + dbent_finder = dbsize; // 将 dbent_finder 指向未使用的 entry + dbsize = new_dbsize; + master_buf = newbuf; + + log( "重新分配数据: 新数据大小:%d 旧地址: %x 新地址:%x\n", + new_dbsize , (unsigned int)previous, (unsigned int)newbuf ); + + return 0; +} + + + +/* + allocate a node + */ +static int +//dbAllocNode( DBTYPE type ) +// Spock +1 2000/10/13 +dbAllocNode() +{ + int i; + for(i=0;i= 0 ) master_buf[prev].next = next; + if ( next >= 0 ) master_buf[next].prev = prev; + // Spock end + /* Spock deleted 2000/10/12 + if( master_buf[index].charvalue_index >= 0 ) { + charvalue_buf[ master_buf[index].charvalue_index].use = 0; + } + */ +} +void +dbShowLink( int topind ) +{ + int cur = topind; + + log( "开始从 %d 链接数据\n", cur ); + + /* Spock deleted 2000/10/19 + for(;;){ + if( cur == -1 )break; + */ + // Spock +1 2000/10/19 + while ( cur >= 0 ) + { + if( master_buf[cur].use == 0 ){ + log( "dbShowLink: use is 0! key:%s\n", master_buf[cur].key ); + return; + } + // Spock +1 2000/10/12 + log( "%s %i\n", master_buf[cur].key, master_buf[cur].ivalue ); + /* Spock deleted 2000/10/12 + log( "%s %u %i\n", master_buf[cur].key , + master_buf[cur].keyhash, master_buf[cur].ivalue ); + */ + cur = master_buf[cur].next; + } +} +// Spock 2000/10/13 +static int +reallocHash( int dbi ) +{ + struct hashentry *previous = dbt[dbi].hashtable; + struct hashentry *newbuf; + int new_hashsize; + + new_hashsize = dbt[dbi].hashsize + HASH_SIZE; + newbuf = (struct hashentry* ) calloc( 1, new_hashsize * + sizeof( struct hashentry) ); + if( newbuf == NULL ){ + log( "重新分配无用信息: 内存不足!!! 新无用信息大小: %d\n", new_hashsize ); + return -1; + } + + memset( newbuf , 0 , new_hashsize * sizeof( struct hashentry ) ); + if( previous ) + { + memcpy( newbuf, previous, + dbt[dbi].hashsize * sizeof( struct hashentry )); + free( previous ); + } + + if ( dbt[dbi].hashsize > HASH_PRIME ) + dbt[dbi].ent_finder = dbt[dbi].hashsize; + else + dbt[dbi].ent_finder = HASH_PRIME; + dbt[dbi].hashsize = new_hashsize; + dbt[dbi].hashtable = newbuf; + + log( "重新分配无用信息: 新无用信息大小:%d 旧地址: %x 新地址:%x\n", + new_hashsize , (unsigned int)previous, (unsigned int)newbuf ); + + return 0; +} + +static int tableGetEntry( int dbi , char *k ) +{ + int hashkey = dbHash( k ); + struct hashentry *hash = dbt[dbi].hashtable; + if ( hash[hashkey].use == 0 ) return -1; + while ( 1 ) { +// if ( hash[hashkey].use == 1 && strcmp( hash[hashkey].key , k ) == 0 ){ + if ( hash[hashkey].use == 1 ){ + if( strcmp( hash[hashkey].key , k ) == 0 )return hashkey; + } + hashkey = hash[hashkey].next; + if ( hashkey <= 0 ){ +// log("err not found hash[%x] -%s!\n", hashkey, k) + return -1; + } + } +} + +static int tableInsertNode( int dbi , char *k , int dbind ) +{ + int hashkey = dbHash( k ); + int hashnext = -1; + int i; + struct hashentry *hash = dbt[dbi].hashtable; + + if ( hash[hashkey].use == 0 ) { + strcpy( hash[hashkey].key , k ); + hash[hashkey].use = 1; + hash[hashkey].dbind = dbind; + hash[hashkey].prev = -1; + hash[hashkey].next = -1; + dbt[dbi].num++; + return hashkey; + }else { + for ( i=0; i= dbt[dbi].hashsize ) + dbt[dbi].ent_finder = HASH_PRIME; + if ( hash[dbt[dbi].ent_finder].use == 0 ) + { + hashnext = dbt[dbi].ent_finder; + break; + } + } + if ( hashnext < HASH_PRIME ) + { + log( "tableInsertNode: hashentry array full. reallocating....\n" ); + if( reallocHash( dbi ) < 0 ){ + log( "tableInsertNode: reallocation fail\n" ); + return -1; + } + else + { + hash = dbt[dbi].hashtable; + hashnext = dbt[dbi].ent_finder; + } + } + strcpy( hash[hashnext].key , k ); + hash[hashnext].use = 1; + hash[hashnext].dbind = dbind; + hash[hashnext].prev = hashkey; + hash[hashnext].next = hash[hashkey].next; + if ( hash[hashkey].next >= 0 ) + hash[hash[hashkey].next].prev = hashnext; + hash[hashkey].next = hashnext; + dbt[dbi].num++; + return hashnext; + } +} + +static void +tableReleaseNode( int dbi , int ind ) +{ + dbt[dbi].hashtable[ind].use = 0; + if ( dbt[dbi].hashtable[ind].prev >= 0 ){ + dbt[dbi].hashtable[dbt[dbi].hashtable[ind].prev].next = + dbt[dbi].hashtable[ind].next; + } + if ( dbt[dbi].hashtable[ind].next >= 0 ){ + dbt[dbi].hashtable[dbt[dbi].hashtable[ind].next].prev = + dbt[dbi].hashtable[ind].prev; + } + dbt[dbi].num--; +} +// Spock end +/* + 伉件弁及玄永皿毛芨尹日木凶日}平□毛 曰卞用□玉毛腹绸允月[ + 心勾井日卅中桦宁反巨仿□匹反卅中及匹0 + + */ +/* Spock deleted 2000/10/13 +static int +dbExtractNodeByKey( int topind , char *k ) +{ + int cur = topind; + int prev = -1; + unsigned int h = hashpjw( k ); + + // 伉件弁互坞匹手心勾井日卅中分仃卅及匹0毛井尹允 + if( topind == -1 ) return 0; + + for(;;){ + if( cur == -1 )break; + if( master_buf[cur].keyhash == h + && strcmp( master_buf[cur].key , k ) == 0 ){ + // prev 及 戚互 cur 及戚卞卅月方丹卞允月 + if( prev == -1 ){ + // 燮 分匀凶及匹伉件弁反中元日卅中 + } else { + master_buf[prev].nextind = master_buf[cur].nextind; + } + // 公木匹愤坌互伉旦玄井日陆木月及匹荸 允月 + dbReleaseNode( cur ); + log( "find key %s deleted\n", k ); + return 0; + } + prev = cur; + cur = master_buf[cur].nextind; + } + // not found + log( "dbExtractNodeBykey: %s not found\n" , k ); + return 0; +} +*/ +// Spock 2000/10/13 +static int +dbExtractNodeByKey( int dbi , char *k ) +{ + int hashind = tableGetEntry( dbi , k ); + + if ( hashind < 0 ){ + log( "dbExtractNodeByKey: tableGetEntry fail, key:%s\n" , k ); + return -1; + } + if ( dbt[dbi].hashtable[hashind].dbind < 0 ){ + log( "dbExtractNodeByKey: invalid dbind in hash, key:%s\n" , k ); + return -1; + } + dbReleaseNode( dbt[dbi].hashtable[hashind].dbind ); + tableReleaseNode( dbi , hashind ); + return 0; +} +// Spock end + +/* Spock deleted 2000/10/12 +static int +dbGetEntryByKey( int topind , char *k ) +{ + int cur = topind; + unsigned int h = hashpjw( k ); + + if( topind == -1 ) return 0; + + for(;;){ + if( cur == -1 )break; + if( master_buf[cur].keyhash == h + && strcmp( master_buf[cur].key, k ) == 0 ){ + return cur; + } + cur = master_buf[cur].nextind; + } + return -1; +} +*/ + +/* + 伉件弁及玄永皿毛芨尹日木凶日}袄毛 曰卞用□玉毛腹绸仄化 + 赝濠卅午仇欠卞 Insert 允月[切中今中 井日云云五中 卞卅日氏匹中月午 + 移烂 + + */ +/* Spock deleted 2000/10/13 +static int +dbInsertNodeByIValue( int topind , int ins ) +{ + int cur = topind; + int prev = -1; + + if( topind == -1 ) return -1; + + for(;;){ + if( cur == -1 ){ + // 引匹中匀凶及匹馨笛允月 + master_buf[prev].nextind = ins; + master_buf[ins].nextind = -1; + return 0; + } + if( master_buf[cur].ivalue < master_buf[ins].ivalue ){ + if( prev == -1 ){ + log( "top_node is badly configured\n" ); + return -1; + } + master_buf[prev].nextind = ins; + master_buf[ins].nextind = cur; + return 0; + } + prev = cur; + cur = master_buf[cur].nextind; + } + + return -1; +} +*/ +// Spock 2000/10/13 +static int +dbInsertNodeByIValue( int topind , int ins ) +{ + int cur = topind; + if ( (topind < 0)||(topind >= dbsize)||(ins < 0)||(ins >= dbsize ) ) + return -1; + while ( master_buf[cur].next >= 0 ){ + if ( master_buf[master_buf[cur].next].ivalue < master_buf[ins].ivalue ) + break; + cur = master_buf[cur].next; + } + master_buf[ins].prev = cur; + master_buf[ins].next = master_buf[cur].next; + if ( master_buf[cur].next >= 0 ) + master_buf[master_buf[cur].next].prev = ins; + master_buf[cur].next = ins; + return 0; +} +// Spock end +/* Spock deleted 2000/10/13 +static int +dbAppendNode( int topind , int ins ) +{ + int cur =topind; + int prev = -1; + if( topind == -1 ) return -1; + for(;;){ + if( cur == -1 ){ + master_buf[prev].nextind = ins; + master_buf[ins].nextind = -1; + return 0; + } + prev = cur; + cur = master_buf[cur].nextind; + } + return -1; +} +*/ +// Spock 2000/10/13 +static int +dbAppendNode( int topind , int ins ) +{ + + if ( (topind < 0)||(topind >= dbsize)||(ins < 0)||(ins >= dbsize ) ) + return -1; + master_buf[ins].prev = topind; + master_buf[ins].next = master_buf[topind].next; + if ( master_buf[topind].next >= 0 ) + master_buf[master_buf[topind].next].prev = ins; + master_buf[topind].next = ins; + return 0; +} +// Spock end + +/* + 犯□正矛□旦及 蟆毛 月[db反醒互剂卅中及匹 骚卞strcmp仄化方中 + DBTYPE :潘 [ + + 云卅元卅引尹及 反}帮醒午 侬 及 卞绣箕允月仇午互匹五月[ + + */ +static int +dbGetTableIndex( char *tname , DBTYPE type ) +{ + int i; + + for(i=0;i= sizeof( master_buf[0].key) )return -1; + + if( dbi < 0 ) return -1; + + r = dbExtractNodeByKey( dbt[dbi].toplinkindex , key ); + if( r < 0 ){ + log( "dbUpdateEntryInt: dbExtractNodeByKey fail! bug!!!!\n" ); + return -1; + } + + entind = dbAllocNode(DB_INT_SORTED); + if( entind < 0 ) return -1; + master_buf[entind].ivalue = value; + snprintf( master_buf[entind].key , + sizeof(master_buf[entind].key), "%s", key ); + master_buf[entind].keyhash = hashpjw( master_buf[entind].key ); + master_buf[entind].nextind = -1; + + // 尥笛树 毛本永玄允月 + dbSetString( master_buf[entind].charvalue_index, info ); + + + r = dbInsertNodeByIValue( dbt[dbi].toplinkindex , entind ); + if( r < 0 ){ + log( "dbUpdateEntryInt: dbInsertNodeByIValue failed\n" ); + return -1; + } + + log( "dbUpdateEntryInt: successfully updated entry %s:%s:%d\n", + table, key, value ); + return 0; + +} +*/ +// Spock 2000/10/16 +int dbUpdateEntryInt( char *table , char *key , int value, char *info ) +{ + int dbi = dbGetTableIndex( table , DB_INT_SORTED ); + int dbind, hashind, newpos; + // Spock 2000/10/23 + if ( strlen( key ) >= KEY_MAX ) { + log( "dbUpdateEntryInt: key is too long, key:%s\n", key ); + return -1; + } + if ( strlen( info ) >= CHARVALUE_MAX ) { + log( "dbUpdateEntryInt: charvalue is too long, charvalue:%s\n", info ); + return -1; + } + // Spock end + if ( dbi < 0 ){ + log( "dbUpdateEntryInt: dbGetTableIndex fail\n"); + return -1; + } + hashind = tableGetEntry( dbi , key ); + if ( hashind < 0 ) + { + dbind = dbAllocNode(); + if ( dbind < 0 ) + { + log( "dbUpdateEntryInt: dbAllocNode fail\n" ); + return -1; + } + master_buf[dbind].ivalue = value; + strcpy( master_buf[dbind].key , key ); + strcpy( master_buf[dbind].charvalue , info ); + if ( dbInsertNodeByIValue( dbt[dbi].toplinkindex , dbind ) < 0 ) + { + master_buf[dbind].use = 0; + log( "dbUpdateEntryInt: dbInsertNodeByIValue fail\n" ); + return -1; + } + if ( tableInsertNode( dbi , key , dbind ) < 0 ) + { + dbReleaseNode( dbind ); + log( "dbUpdateEntryInt: tableInsertNode fail\n" ); + return -1; + } + } + else + { + dbind = dbt[dbi].hashtable[hashind].dbind; + master_buf[dbind].ivalue = value; + strcpy( master_buf[dbind].charvalue , info ); + newpos = dbind; + while ( master_buf[newpos].prev >= 0 ) + { + if ( value <= master_buf[master_buf[newpos].prev].ivalue ) + { + break; + } + newpos = master_buf[newpos].prev; + } + if ( newpos != dbind ) + { + master_buf[master_buf[dbind].prev].next = master_buf[dbind].next; + if ( master_buf[dbind].next >= 0 ) + master_buf[master_buf[dbind].next].prev = master_buf[dbind].prev; + master_buf[dbind].prev = master_buf[newpos].prev; + master_buf[dbind].next = newpos; + if ( master_buf[newpos].prev >= 0 ) + master_buf[master_buf[newpos].prev].next = dbind; + master_buf[newpos].prev = dbind; + dbt[dbi].updated = 1; + /* + log( "dbUpdateEntryInt: successfully updated entry %s:%s:%d\n", + table, key, value ); + */ + return 0; + } + while ( master_buf[newpos].next >= 0 ) + { + if ( value >= master_buf[master_buf[newpos].next].ivalue ) + { + break; + } + newpos = master_buf[newpos].next; + } + if ( newpos != dbind ) + { + master_buf[master_buf[dbind].prev].next = master_buf[dbind].next; + master_buf[master_buf[dbind].next].prev = master_buf[dbind].prev; + master_buf[dbind].prev = newpos; + master_buf[dbind].next = master_buf[newpos].next; + if ( master_buf[newpos].next >= 0 ) + master_buf[master_buf[newpos].next].prev = dbind; + master_buf[newpos].next = dbind; + } + } + dbt[dbi].updated = 1; + /* + log( "dbUpdateEntryInt: successfully updated entry %s:%s:%d\n", + table, key, value ); + */ + return 0; +} +// Spock end + +int +dbDeleteEntryInt( char *table, char *key ) +{ + int dbi = dbGetTableIndex( table , DB_INT_SORTED ); + int r; + + if ( strlen( key ) >= KEY_MAX ) { + log( "dbDeleteEntryInt: key is too long, key:%s\n", key ); + return -1; + } + if( dbi < 0 ) { + log( "dbDeleteEntryInt: dbGetTableIndex failed for %s\n", table ); + return -1; + } + //r = dbExtractNodeByKey( dbt[dbi].toplinkindex , key ); + // Spock fixed 2000/10/19 + r = dbExtractNodeByKey( dbi , key ); + if( r < 0 ){ + log( "dbDeleteEntryInt: dbExtractNodeByKey failed for %s in %s\n", + key,table ); + return -1; + } + // Spock +1 2000/10/19 + dbt[dbi].updated = 1; + log( "deleted key %s from table %s\n", key, table ); + return 0; +} + +static void +dbShowAllTable(void) +{ + int i; + + for(i=0;i= sizeof( master_buf[entind].key) ) return -1; + if( dbi <0 ) { + log( "dbGetEntryInt: dbGetTableIndex fail\n" ); + return -1; + } + // Spock 2000/10/19 + if( strlen(key) >= KEY_MAX ) { + log( "dbGetEntryInt: key is too long, key:%s\n" , key ); + return -1; + } + hashind = tableGetEntry( dbi , key ); + if( hashind < 0 ) return -1; + entind = dbt[dbi].hashtable[hashind].dbind; + //entind = dbGetEntryByKey( dbt[dbi].toplinkindex , key ); + // Spock end + if( entind < 0 ) { + log( "dbGetEntryInt: Invalid dbind in hashtable of %s\n" , table ); + return -1; + } + /* 心勾井匀凶及匹袄毛请 卞 木化忒允 */ + *output = master_buf[entind].ivalue; + + return 0; +} + +/* + 巨仿□及桦宁反 [0分匀凶日岳 [ + + int *rank_out : 仿件弁及请 + int *count_out : 晓井日窒蜊 井及请 + + int 犯□正矛□旦毁迕友 + + */ + +int +dbGetEntryRank( char *table, char *key , int *rank_out, int *count_out) +{ + int dbi = dbGetTableIndex( table , DB_INT_SORTED ); + // Spock deleted 2000/10/19 + //unsigned int hash = hashpjw(key); + int cur; + int now_score = 0x7fffffff; /*int 匹中切壬氏匹井中袄 */ + int r = -1 , i=0; + + // Spock 2000/10/23 + //if( strlen(key) >= sizeof( master_buf[cur].key) ) return -1; + if( strlen(key) >= KEY_MAX ) { + log( "dbGetEntryRank: key is too long, key:%s\n" , key ); + return -1; + } + if( dbi <0 ) { + log( "dbGetEntryRank: dbGetTableIndex fail\n" ); + return -1; + } + // Spock end + + // Spock 2000/10/23 + //cur = master_buf[dbt[dbi].toplinkindex].nextind; + cur = master_buf[dbt[dbi].toplinkindex].next; + //i=0; + //for(;;){ + // if( cur == -1 )break; + while ( cur >= 0 ) + { + // Spock end + if( master_buf[cur].ivalue != now_score ){ + r=i; + now_score = master_buf[cur].ivalue; + } + // Spock 2000/10/19 + //if( hash == master_buf[cur].keyhash && + // strcmp( master_buf[cur].key, key )== 0 ){ + if( strcmp( master_buf[cur].key , key ) == 0 ) + { + // Spock end + *rank_out = r; + *count_out = i; + return 0; + } + //cur = master_buf[cur].nextind; + // Spock fixed 2000/10/19 + cur = master_buf[cur].next; + i++; + } + *count_out = i; + *rank_out = r; + return 0; +} + +/* + int 毁迕友 + */ +int +dbGetEntryRankRange( char *table, + int start, int end, char *output, int outlen ) +{ +#define MAXHITS 1024 /* 赝癫支卅丐[匹手仇木匹蜗坌日仄中冗 ringo */ + struct hitent{ /* 仇及厌瞻 卞甲永玄仄凶支勾毛凶户化中仁 */ + int entind; + int rank; + }; + + int r=0; + struct hitent hits[MAXHITS]; + int dbi = dbGetTableIndex( table , DB_INT_SORTED ); + int cur; + int hitsuse = 0,i; + int now_score = 0x7fffffff; + + if( dbi <0 ) return -1; + if( outlen <= 0 )return -1; + + cur = dbt[dbi].toplinkindex; + // Spock 2000/10/23 + //for(;;){ + // if( cur == -1 )break; + while ( cur >= 0 ) + { + // Spock end + if( master_buf[cur].ivalue != now_score ){ + r++; + now_score = master_buf[cur].ivalue; + } + if( r >= start && r <= end ){ + hits[hitsuse].entind = cur; + hits[hitsuse].rank = r; + hitsuse++; + //if( hitsuse == MAXHITS )break; + // Spock fixed 2000/10/23 + if( hitsuse >= MAXHITS ) break; + } + //cur = master_buf[cur].nextind; + // Spock fixed 2000/10/19 + cur = master_buf[cur].next; + } + output[0] = 0; + + for(i=0;i= 0 ) + { + // Spock end + if( dbt[i].type == DB_INT_SORTED ){ + fprintf( fp , "%s %d %s\n", master_buf[entind].key, + master_buf[entind].ivalue, + //makeStringFromEscaped( + // dbGetString(master_buf[entind].charvalue_index))); + // Spock fixed 2000/10/19 + makeStringFromEscaped(master_buf[entind].charvalue)); + } else { + fprintf( fp , "%s %s\n", master_buf[entind].key, + //makeStringFromEscaped( + // dbGetString(master_buf[entind].charvalue_index))); + // Spock fixed 2000/10/19 + makeStringFromEscaped(master_buf[entind].charvalue)); + } + //entind = master_buf[entind].nextind; + // Spock fixed 2000/10/19 + entind = master_buf[entind].next; + } + fclose(fp); + dbt[i].updated = 0; + } + + return 0; +} + + +int dbRead( char *dir ) +{ + char dirname[1024]; + DIR *d; + struct dirent *de; + // Spock +1 2000/10/19 + memset( dbt , 0 , MAXTABLE * sizeof(struct table) ); + { + char tmp[1024]; + snprintf( tmp, sizeof( tmp ), "%s/int" , dir ); + if( mkdir( tmp, 0755 )==0){ + log( "创建 %s\n", tmp ); + } + snprintf( tmp, sizeof( tmp ), "%s/string" , dir ); + if( mkdir( tmp, 0755 )==0){ + log( "创建 %s\n", tmp ); + } + } + + snprintf( dirname, sizeof( dirname ), + "%s/int" , dir ); + d = opendir(dirname); + if( d == NULL ){ + log( "不能打开文件 %s\n", dirname ); + return -1; + } + + while(1){ + de = readdir( d ); + if( de == NULL )break; + if( de->d_name[0] != '.' ){ + char filename[1024]; + FILE *fp; + struct stat s; + snprintf( filename, sizeof(filename),"%s/%s",dirname, de->d_name ); + log( "读取数据:%s\n..", filename); + if( stat( filename, &s ) < 0 ){ + continue; + } + if( !( s.st_mode & S_IFREG ) ){ + continue; + } + + fp = fopen( filename, "r" ); + if( fp == NULL ){ + log( "不能打开文件 %s %s\n", + filename, strerror( errno )); + continue; + } + while(1){ + char line[1024]; + char k[1024] , v[1024], info[1024]; + if( fgets( line , sizeof( line) , fp ) == NULL )break; + chop( line); + k[0] = '\0'; + easyGetTokenFromString( line, 1, k, sizeof(k)); + v[0] = '\0'; + easyGetTokenFromString( line, 2, v, sizeof(v)); + info[0] = '\0'; + easyGetTokenFromString( line, 3, info, sizeof(info)); + dbUpdateEntryInt( de->d_name, k, atoi(v), info); + } + fclose(fp); + } + } + closedir(d); + snprintf( dirname, sizeof( dirname), "%s/string" , dir ); + d = opendir( dirname ); + if( d == NULL ){ + log( "不能打开文件 %s\n", dirname ); + return -1; + } + while(1){ + de = readdir( d ); + if( de == NULL )break; + if( de->d_name[0] != '.' ){ + char filename[1024]; + FILE *fp; + struct stat s; + snprintf( filename, sizeof( filename),"%s/%s",dirname,de->d_name ); + log( "读取数据:%s\n..", filename); + + if( stat( filename, &s ) < 0 ){ + continue; + } + if( !(s.st_mode & S_IFREG )){ + continue; + } + fp = fopen( filename, "r" ); + if( fp == NULL ){ + log( "不能打开文件 %s %s\n", + filename, strerror(errno )); + continue; + } + while(1){ + char line[CHARVALUE_MAX+1024]; + char k[1024]; + if( fgets( line, sizeof( line), fp ) == NULL )break; + /* chop */ + chop(line); + k[0] = '\0'; + easyGetTokenFromString( line, 1, k,sizeof(k)); + dbUpdateEntryString( de->d_name, k, line+strlen(k)+1); + } + // Nuke +1 1027: Close for safe + fclose(fp); + } + } + closedir(d); + return 0; +} + +/* 隙烂仄凶匏 井日隙烂仄凶蜊醒潸曰分允[ + 撩 仄凶日 }岳 仄凶日0[岳 仄化手坞及请 及午五互丐月冗[ + “num互0及午五午井}竟癫允月巨件玄伉互卅中午五[ + + int 犯□正矛□旦毁迕分冗 + + */ +int dbGetEntryCountRange( char *table, int count_start, int num, + char *output, int outlen ) +{ + int dbi = dbGetTableIndex( table , DB_INT_SORTED ); + int cur; + int i; + int now_score = 0x7fffffff , r; + + if( dbi < 0) return -1; + if( outlen < 1 ) return -1; + output[0]=0; + + //cur = master_buf[dbt[dbi].toplinkindex].nextind; + // Spock fixed 2000/10/19 + cur = master_buf[dbt[dbi].toplinkindex].next; + i=0; + r=0; + for(;;){ + if( cur == -1 ) break; + + if( master_buf[cur].ivalue != now_score ){ + r=i; + now_score = master_buf[cur].ivalue; + } + + if( ( i >= count_start ) && + ( i < (count_start + num ) ) ){ + char tmp[1024]; + if( (i !=count_start)){ + strcatsafe( output, outlen, "|" ); + } + + snprintf( tmp, sizeof( tmp), + "%d,%d,%s,%d,%s", i, r, master_buf[cur].key, + master_buf[cur].ivalue, + //dbGetString( master_buf[cur].charvalue_index )); + // Spock fixed 2000/10/19 + master_buf[cur].charvalue); + strcatsafe( output, outlen,tmp ); + } + i++; + //cur = master_buf[cur].nextind; + // Spock fixed 2000/10/19 + cur = master_buf[cur].next; + } + return 0; +} + + +/* + 侬 犯□正矛□旦及质 + */ +/* Spock deleted 2000/10/19 +int +dbUpdateEntryString( char *table, char *key, char *value ) +{ + int dbi = dbGetTableIndex(table, DB_STRING); + int r, entind; + + log( "dbUpdateEntryString: [%s] [%s] [%s]\n", table, key, value ); + + if( strlen(key) >= sizeof(master_buf[0].key) )return -1; + if( dbi < 0 )return -1; + + r = dbExtractNodeByKey( dbt[dbi].toplinkindex, key ); + if( r< 0 ){ + log( "dbUpdateEntryString dbExtractNodeByKey fail! bug!!\n" ); + return -1; + } + + entind = dbAllocNode( DB_STRING ); + if( entind < 0 ) return -1; + + master_buf[entind].ivalue = 0; + dbSetString( master_buf[entind].charvalue_index, value ); + snprintf( master_buf[entind].key, + sizeof(master_buf[0].key), "%s",key ); + master_buf[entind].keyhash = hashpjw( master_buf[entind].key ); + master_buf[entind].nextind = -1; + + if( dbAppendNode( dbt[dbi].toplinkindex, entind ) < 0 ){ + log( "dbUpdateEntryString: dbAppendNode failed\n" ); + return -1; + } + log( "dbUpdateEntryString: successfully updated entry %s:%s:%s\n", + table,key,value ); + + return 0; +} +*/ +// Spock 2000/10/19 +int dbUpdateEntryString( char *table, char *key, char *value ) +{ + int dbi = dbGetTableIndex( table , DB_STRING ); + int dbind, hashind; + + if ( strlen( key ) >= KEY_MAX ) { + log( "dbUpdateEntryString: key is too long, key:%s\n", key ); + return -1; + } + if ( strlen( value ) >= CHARVALUE_MAX ) { + log( "dbUpdateEntryString: charvalue is too long, charvalue:%s\n", value ); + return -1; + } + if ( dbi < 0 ) { + log( "dbUpdateEntryString: dbGetTableIndex fail, table:%s\n", table ); + return -1; + } + hashind = tableGetEntry( dbi , key ); + if ( hashind < 0 ) + { + dbind = dbAllocNode(); + if ( dbind < 0 ) + { + log( "dbUpdateEntryString: dbAllocNode fail\n" ); + return -1; + } + strcpy( master_buf[dbind].key , key ); + strcpy( master_buf[dbind].charvalue , value ); + if ( dbAppendNode( dbt[dbi].toplinkindex , dbind ) < 0 ) + { + master_buf[dbind].use = 0; + log( "dbUpdateEntryString: dbAppendNode fail\n" ); + return -1; + } + if ( tableInsertNode( dbi , key , dbind ) < 0 ) + { + dbReleaseNode( dbind ); + log( "dbUpdateEntryString: tableInsertNode fail\n" ); + return -1; + } + } + else + { + dbind = dbt[dbi].hashtable[hashind].dbind; + strcpy( master_buf[dbind].charvalue , value ); + } + dbt[dbi].updated = 1; + /* + log( "dbUpdateEntryString: successfully updated entry %s:%s:%s\n", + table,key,value ); + */ + return 0; +} +// Spock end + +int +dbGetEntryString( char *table, char *key, char *output, int outlen ) +{ + int dbi = dbGetTableIndex( table, DB_STRING ); + int entind; + // Spock +1 2000/10/19 + int hashind; + + // Spock 2000/10/23 + //if( strlen(key) >= sizeof( master_buf[entind].key) ) return -1; + if ( strlen(key) >= KEY_MAX ) { + log( "dbGetEntryString: key is too long, key:%s\n", key ); + return -1; + } + if( dbi <0 ) { + log( "dbGetEntryString: dbGetTableIndex fail\n" ); + return -1; + } + // Spock 2000/10/19 + hashind = tableGetEntry( dbi , key ); + if ( hashind < 0 ){ + log("err hashind <0\n") + return -1; + } + entind = dbt[dbi].hashtable[hashind].dbind; + + if ( entind < 0 ){ + log( "entind < 0 "); + return -1; + } + snprintf( output , outlen , "%s" , master_buf[entind].charvalue ); + + return 0; +} + +int +dbDeleteEntryString( char *table, char *key ) +{ + int dbi = dbGetTableIndex( table, DB_STRING ); + int r; + + // Spock 2000/10/23 + //if( strlen(key) >= sizeof( master_buf[entind].key) ) return -1; + if ( strlen(key) >= KEY_MAX ) { + log( "dbDeleteEntryString: key is too long, key:%s\n", key ); + return -1; + } + if( dbi <0 ) { + log( "dbDeleteEntryString: dbGetTableIndex fail\n" ); + return -1; + } + // Spock end + //r = dbExtractNodeByKey( dbt[dbi].toplinkindex, key ); + // Spock fixed 2000/10/19 + r = dbExtractNodeByKey( dbi , key ); + if( r < 0 ){ + log( "dbDeleteEntryString: dbExtractNodeByKey failed for %s in %s\n", + key,table ); + return -1; + } + dbt[dbi].updated = 1; + log( "deleted key %s from table %s\n", key, table ); + return 0; +} diff --git a/saac/db.h b/saac/db.h new file mode 100644 index 0000000..54eae2f --- /dev/null +++ b/saac/db.h @@ -0,0 +1,19 @@ +#ifndef _DB_H_ +#define _DB_H_ + +int dbUpdateEntryInt( char *table , char *key , int value, char *info ); +int dbUpdateEntryString( char *table, char *key, char *value ); +int dbDeleteEntryInt( char *table, char *key ); +int dbDeleteEntryString( char *table, char *key ); +int dbGetEntryInt( char *table, char *key, int *output ); +int dbGetEntryString( char *table, char *key, char *output, int outlen ); +int dbGetEntryRank( char *table, char *key , int *r_out, int *c_out ); +int dbGetEntryRankRange( char *table, + int start, int end, char *output, int outlen ); +int dbGetEntryCountRange( char *table, int count_start, int num, + char *output, int outlen ); + +int dbRead( char *dir ); +int dbFlush( char *dir ); + +#endif diff --git a/saac/deathcontend.c b/saac/deathcontend.c new file mode 100644 index 0000000..3542ccb --- /dev/null +++ b/saac/deathcontend.c @@ -0,0 +1,1127 @@ +#include "version.h" +#include +#include "main.h" +#include "saacproto_util.h" +#include "saacproto_serv.h" +#include "recv.h" +#include "char.h" +#include "util.h" + +#include "deathcontend.h" + +#ifdef _DEATH_CONTEND + +PkTeamLists *PkTeamList=NULL; +static int PKListSort[550]; +enum{ + CODE_OK=0, + CODE_ERR=-1, + CODE_OUTSTRIP=-2, + CODE_REPEAT=-3, + + CODE_LEADERERR=-10, + CODE_ERRBATTLEFULL=-11, +}; +static int maxteam = 0; + +void del_rn( char *s ) +{ + int i; + for(i=0;;i++){ + if( s[i] == '\r' || s[i] == '\n' ) s[i] = 0; + if( s[i] == 0 )break; + } +} + +int PKLIST_SetOneBHistory( int ti, int hi, int use, int teamnum, int flg ) +{ + if( ti < 0 || ti >= maxteam ) return CODE_OUTSTRIP; + if( hi < 0 || hi >= MAXBATTLENUM ) return CODE_OUTSTRIP; + if( PkTeamList[ti].BHistory[hi].use == use ) return CODE_REPEAT; + + PkTeamList[ti].BHistory[hi].teamnum = teamnum; + PkTeamList[ti].BHistory[hi].flg = flg; + PkTeamList[ti].BHistory[hi].use = use; + return CODE_OK; +} + +int PKLIST_GetOneBHistory( int ti ) +{ + int i; + if( ti < 0 || ti >= maxteam ){ + log( "GetOneBHistory(ti:%d) err return -1 !!\n", ti) + return -1; + } + for( i=0; i=DEFMAXBATTLENUM ) break; + if( PkTeamList[ti].BHistory[i].use == 0 ){ + log("return BHistory[%d] \n", i) ; + return i; + } + } + + log("return CODE_ERRBATTLEFULL err !! \n") ; + return CODE_ERRBATTLEFULL; +} +//勿动------------------------------------------------------- +void PKLIST_ResetOneTeamMan( int ti ) +{ + int k; + if( ti < 0 || ti >= maxteam ) return; + for( k=0;k= maxteam ) return; + PkTeamList[ti].use = 0; + PkTeamList[ti].teamnum = -1; + memset( PkTeamList[ti].teamname, 0, sizeof( PkTeamList[ti].teamname ) ); + memset( PkTeamList[ti].pathdir, 0, sizeof( PkTeamList[ti].pathdir) ); + memset( PkTeamList[ti].leadercdkey, 0, sizeof( PkTeamList[ti].leadercdkey ) ); +} +//----------------------------------------------------------- + +int PKLIST_InitPkTeamList( int teamnum ) +{ + int i; + if( PkTeamList != NULL || teamnum <= 0 ) return -1; + + log( "PKLIST_InitPkTeamList( maxteam:%d) \n", teamnum); + + maxteam = teamnum; + PkTeamList = (PkTeamLists *)calloc( 1, sizeof( struct _tagPkTeamLists) * maxteam ); + if( PkTeamList == NULL ){ + log( "ANDY err Can't calloc PkTeamList :%d !!\n", + sizeof( struct _tagPkTeamLists) * maxteam ); + return -1; + } + for( i=0; i= DEFWINSCORE ){ + PkTeamList[ti].inside = 2; //录取 + }else if( PkTeamList[ti].lost > DEFMAXBATTLENUM*DEFLOSERATE){// 0.7 = (1-胜率3成)*最高场次 + PkTeamList[ti].inside = 0; + }else { + PkTeamList[ti].inside = 1; + } + + if( PkTeamList[ti].score < 0 ) PkTeamList[ti].score = 0; + + ret = PKLIST_SetOneBHistory( ti, battleTi, 1, forti, winerflg); + PKLIST_SortTheCharts( ti); + return ret; +} + +int PKLIST_getStringPkTeamData( int ti, char *data, int sizes) +{ + int k; + char buf[512]; + if( PkTeamList[ti].use != 1 ) return 0; + + + sprintf( data, "%d_%d|%s|%s|%s|%d|%d|%d|%d|%d_", + ti, + PkTeamList[ti].teamnum, PkTeamList[ti].pathdir, + PkTeamList[ti].teamname, PkTeamList[ti].leadercdkey, + PkTeamList[ti].win, PkTeamList[ti].lost, + PkTeamList[ti].battleplay, PkTeamList[ti].score, + PkTeamList[ti].inside ); + + for( k=0; k= maxteam || count < 1) return; + memset( data, 0, sizeof( data)); + + for( i=startTi; i= sizeof( data)) { + saacproto_PKLISTGETDATA_send( fd, "success", i, data ); + return; + } + if( first != 1 ) strcat( data, " "); + first = 0; + strcat( data, bufarg); + } + + if( strlen( data) > 0 ){ + saacproto_PKLISTGETDATA_send( fd, "success", -1, data ); + } + + return; +} + +int PKLIST_GetPkTeamListArray( int teamnum, char *cdkey) +{ + int i; + for( i=0; i= DEFWINSCORE ){ + PkTeamList[i].inside = 2; //录取 + }else if( PkTeamList[i].lost > DEFMAXBATTLENUM*DEFLOSERATE){// 0.7 = (1-胜率3成)*最高场次 + PkTeamList[i].inside = 0; + }else { + PkTeamList[i].inside = 1; + } + } +} + +//load档 +int PKLIST_LoadPkTeamListfromFile( char *dirpath, char *listfilename ) +{ + char line[512], filename[256], buf1[64]; + FILE *fp = NULL, *efp=NULL; + int i, count=0; + + if( PkTeamList == NULL ) return -1; + sprintf( filename, "%s/%s", dirpath, listfilename); + log( "LoadPkTeamListfromFile( file:%s) \n", filename); + if( (fp = fopen( filename, "r" )) == NULL ){ + log( "can't load file:%s !\n", filename); + return -1; + } + sprintf( filename, "%s/%s", dirpath, "err1.txt"); + if( (efp = fopen( filename, "w+" )) == NULL ){ + log( "can't load file:%s !\n", filename); + return -1; + } + + while( fgets( line, sizeof( line), fp) ) { + if( strlen( line) <= 0 || line[0] == '#' ) continue; + if( count >= maxteam )break; + del_rn( line); + log( "#"); + easyGetTokenFromBuf( line, '|', 1, buf1, sizeof( buf1 )); + if( strlen( buf1) <= 0 ){ + fprintf( efp,"TEAMNUM err:%s", line); + continue; + } + PkTeamList[count].teamnum = atoi(buf1); + if( PkTeamList[count].teamnum < 0 ) continue; + easyGetTokenFromBuf( line, '|', 2, buf1, sizeof( buf1 )); + if( strlen( buf1) <= 0 ) continue; + sprintf( PkTeamList[count].pathdir, "%s", buf1); + easyGetTokenFromBuf( line, '|', 3, buf1, sizeof( buf1 )); + if( strlen( buf1) <= 0 ){ + if( strlen( buf1) <= 0 ){ + fprintf( efp,"TEAMNAME err:%s", line); + continue; + } + continue; + } + sprintf( PkTeamList[count].teamname, "%s", buf1); + easyGetTokenFromBuf( line, '|', 4, buf1, sizeof( buf1 )); + if( strlen( buf1) <= 0 ){ + if( strlen( buf1) <= 0 ){ + fprintf( efp,"MASTER err:%s", line); + continue; + } + continue; + } + sprintf( PkTeamList[count].leadercdkey, "%s", buf1); + + easyGetTokenFromBuf( line, '|', 5, buf1, sizeof( buf1 )); + if( strlen( buf1) <= 0 ) continue; + PkTeamList[count].win = atoi(buf1); + easyGetTokenFromBuf( line, '|', 6, buf1, sizeof( buf1 )); + if( strlen( buf1) <= 0 ) continue; + PkTeamList[count].lost = atoi(buf1); + easyGetTokenFromBuf( line, '|', 7, buf1, sizeof( buf1 )); + if( strlen( buf1) <= 0 ) continue; + PkTeamList[count].battleplay = atoi(buf1); + easyGetTokenFromBuf( line, '|', 8, buf1, sizeof( buf1 )); + if( strlen( buf1) <= 0 ) continue; + PkTeamList[count].score = atoi(buf1); + easyGetTokenFromBuf( line, '|', 9, buf1, sizeof( buf1 )); + if( strlen( buf1) <= 0 ) continue; + PkTeamList[count].inside = atoi(buf1); + + easyGetTokenFromBuf( line, '|', 10, buf1, sizeof( buf1 )); + if( strlen( buf1) <= 0 ) continue; + PkTeamList[count].updata = atoi(buf1); + + { + FILE *ffp=NULL; + char teamfilename[256], bufarg[256], buf2[256]; + int readfirst = 1, k, bnum=0; + sprintf( teamfilename, "%s/%s/team_%d.txt", "pklist", + PkTeamList[count].pathdir, PkTeamList[count].teamnum ); + + if( (ffp=fopen( teamfilename, "r") ) == NULL ) continue; + + while( fgets( bufarg, sizeof( bufarg), ffp) ) { + if( strlen( bufarg) <= 0 || bufarg[0] == '#' ) continue; + del_rn( bufarg); + if( readfirst == 1 ){ + for( k=0; k= MAXBATTLENUM )break;//超过战斗场次 + for( k=0; k<10; k++){ + easyGetTokenFromBuf( bufarg, '|', k+1, buf1, sizeof( buf1 )); + if( strlen( buf1) <= 0 ) continue; + easyGetTokenFromBuf( buf1, ',', 1, buf2, sizeof( buf2 )); + if( strlen( buf2) <= 0 ) continue; + PkTeamList[count].BHistory[bnum].teamnum = atoi( buf2); + easyGetTokenFromBuf( buf1, ',', 2, buf2, sizeof( buf2 )); + if( strlen( buf2) <= 0 ) continue; + PkTeamList[count].BHistory[bnum].flg = atoi( buf2); + PkTeamList[count].BHistory[bnum].use = 1; + bnum++; + } + + } + + fclose( ffp); + } + + PkTeamList[count].use = 1; + count++; + } + fclose( efp); + fclose( fp); + { + int k; + log( "\n"); + for( i=0; i 0 ) + fprintf( ffp, "%s\n", bufarg); + fclose( ffp); + } + } + fclose( fp); + return 1; +} +//PKListSort[1000] +void PKLIST_SortTheCharts( int ti) //排行榜处理 +{ +extern gmsv gs[MAXCONNECTION]; + int i, k, last=-1; + + if( PkTeamList[ti].use != 1 ) return; + if( PkTeamList[ti].battleplay < 3 ) return; + + for( k=0; k<550; k++){ + if( PKListSort[k] == -1 )continue; + if( PKListSort[k] == ti ){ + PKListSort[k] = -1; + } + } + + for( k=549; k>=0; k-- ){ + if( PKListSort[k] == -1 ){ + last = k; + continue; + } + if( PkTeamList[ti].score > PkTeamList[PKListSort[k]].score ){ + last = k; + continue; + } + break; + } + if( last == -1 ) return; + for( i=548; i>=last; i-- ){ + PKListSort[i+1] = PKListSort[i]; + } + log( "\nPKListSort[%d]=%d \n", PKListSort[last], ti); + PKListSort[last]=ti; + + //更新所有伺服器 + for (i=0; i 0 ) + saacproto_PKLISTCHARTS_send( fd, data, type, flg ); + break; + + case 3: + { + char filename[256]; + FILE *fp=NULL; + PKLIST_Sort_PKListSort(); + sprintf( filename, "%s/%s", "pklist", "hero.txt" ); + remove( filename); + if( (fp=fopen( filename, "w+")) == NULL ) return; + for( i=0; i<550; i++ ){ + if( PKListSort[i] == -1 ) continue; + fprintf( fp, "%d|%s|%s|%s|%d|%d|%d|%d|%d|%d\n", + PkTeamList[PKListSort[i]].teamnum, PkTeamList[PKListSort[i]].pathdir, + PkTeamList[PKListSort[i]].teamname, PkTeamList[PKListSort[i]].leadercdkey, + PkTeamList[PKListSort[i]].win, PkTeamList[PKListSort[i]].lost, + PkTeamList[PKListSort[i]].battleplay, PkTeamList[PKListSort[i]].score, + PkTeamList[PKListSort[i]].inside, PkTeamList[PKListSort[i]].updata ); + } + fclose( fp); + } + break; + + + } +} + +//备份存档 + + +//load档 +int PKLIST_LoadUserfromFile( char *dirpath, char *listfilename ) +{ + char line[512], filename[256], buf1[64]; + FILE *fp = NULL, *tfp=NULL, *bfp=NULL; + int i, count=0, teamn = 1; + + if( PkTeamList == NULL ) return -1; + sprintf( filename, "%s/%s", dirpath, listfilename); + log( "PKLIST_LoadUserfromFile( file:%s) \n", filename); + if( (fp = fopen( filename, "r" )) == NULL ){ + log( "can't load file:%s !\n", filename); + return -1; + } + + sprintf( filename, "%s/%s", dirpath, "d.txt"); + if( (tfp = fopen( filename, "a+" )) == NULL ){ + log( "can't load file:%s !\n", filename); + return -1; + } + sprintf( filename, "%s/%s", dirpath, "badteam.txt"); + if( (bfp = fopen( filename, "a+" )) == NULL ){ + log( "can't load file:%s !\n", filename); + return -1; + } + while( fgets( line, sizeof( line), fp) ) { + int spoint=2; + int ManNum=0, leve=1; + char StartS[256], dData[1024]; + memset( dData, 0, sizeof(dData)); + memset( StartS, 0, sizeof(StartS)); + if( strlen( line) <= 0 || line[0] == '#' ) continue; + if( count >= maxteam )break; + del_rn( line); + + //队伍名称 队伍序号 + easyGetTokenFromBuf( line, ',', 1, buf1, sizeof( buf1 )); + if( strlen( buf1) <= 0 ) continue; + sprintf( PkTeamList[count].teamname, "%s", buf1); + + PkTeamList[count].teamnum = teamn++; + + while( 1){ + easyGetTokenFromBuf( line, ',', spoint++, buf1, sizeof( buf1 )); + if( strlen( buf1) <= 0 ) break; + sprintf( StartS, "%s", buf1); //星系 + + easyGetTokenFromBuf( line, ',', spoint++, buf1, sizeof( buf1 )); + if( strlen( buf1) <= 0 ) break; + sprintf( PkTeamList[count].MyTeamMans[ManNum].cdkey, "%s", buf1); //帐号 + + easyGetTokenFromBuf( line, ',', spoint++, buf1, sizeof( buf1 )); + if( strlen( buf1) <= 0 ) break; + sprintf( PkTeamList[count].MyTeamMans[ManNum].name, "%s", buf1); //人物名 + + easyGetTokenFromBuf( line, ',', spoint++, buf1, sizeof( buf1 )); + if( strlen( buf1) <= 0 ) break; + leve = atoi( buf1); //人物等级 + + sprintf( dData, "%s,%s,%s,%d\n", + StartS, PkTeamList[count].MyTeamMans[ManNum].cdkey, + PkTeamList[count].MyTeamMans[ManNum].name, leve ); + +// strcat( dData, buf2); + + fprintf( tfp, "%s", dData); + + PkTeamList[count].MyTeamMans[ManNum].use = 1; + ManNum++; + if( ManNum>=MAXTEAMMANNUM )break; + } + if( ManNum == 0 ){ + fprintf( bfp, "%s\n", line); + continue; + } + + + sprintf( PkTeamList[count].pathdir, "0x%x", getHash( PkTeamList[count].MyTeamMans[0].cdkey )&0xff); + sprintf( PkTeamList[count].leadercdkey, "%s", PkTeamList[count].MyTeamMans[0].cdkey ); + PkTeamList[count].win = 0; + PkTeamList[count].lost = 0; + PkTeamList[count].battleplay = 0; + PkTeamList[count].score = 0; + PkTeamList[count].inside = 1; + PkTeamList[count].updata = 0; + + PkTeamList[count].use = 1; + count++; + } + fclose( bfp); + fclose( tfp); + fclose( fp); + //清除 + sprintf( filename, "%s/%s", dirpath, listfilename); + remove( filename); + + { + int k; + log( "\n"); + for( i=0; i=0; k-- ){ + if( PkTeamList[i].score <= 0 ) continue; + if( PKListSort[k] == -1 ){ + last = k; + continue; + } + if( PkTeamList[i].score > PkTeamList[PKListSort[k]].score ){ + last = k; + continue; + }else if( PkTeamList[i].score == PkTeamList[PKListSort[k]].score ){ + if( PkTeamList[i].updata < PkTeamList[PKListSort[k]].updata ){ + last = k; + continue; + }else{ + continue; + } + } + break; + } + if( last == -1 ) continue; + for( j=548; j>=last; j-- ){ + PKListSort[j+1] = PKListSort[j]; + } + PKListSort[last]=i; + } +} + + +void PKLIST_CheckAllUser( void) +{ + int i, k; + FILE *fp=NULL, *ffp=NULL; + char output[CHARDATASIZE], buf1[256]; + + + if( (fp=fopen( "checkuser.txt", "w+")) == NULL ) return; + if( (ffp=fopen( "checkteam.txt", "w+")) == NULL ) return; + log( "PKLIST_CheckAllUser()\n"); + + for( i=0; i%s\n", + i, PkTeamList[i].teamname, PkTeamList[i].teamnum, + PkTeamList[i].MyTeamMans[k].cdkey, PkTeamList[i].MyTeamMans[k].name, + buf1 ); + snprintf( PkTeamList[i].MyTeamMans[k].name, sizeof(PkTeamList[i].MyTeamMans[k].name), + "%s", buf1); + } + } + } + } + fclose( fp); + fclose( ffp); +} +/* +序号|队名|帐号_人物名|帐号_人物名|帐号_人物名|帐号_人物名|帐号_人物名|胜|败|0 + +#序号|目录|队名|帐号_人物名|胜|败|场|积分|0 + +1|0x10|第1队|cdkey|胜|败|场|积分|0 +2|0x10|第2队|cdkey|胜|败|场|积分|0 +3|0x10|第3队|cdkey|胜|败|场|积分|0 +4|0x10|第4队|cdkey|胜|败|场|积分|0 +5|0x10|第5队|cdkey|胜|败|场|积分|0 +6|0x10|第6队|cdkey|胜|败|场|积分|0 +7|0x10|第7队|cdkey|胜|败|场|积分|0 +8|0x10|第8队|cdkey|胜|败|场|积分|0 +9|0x10|第9队|cdkey|胜|败|场|积分|0 +10|0x10|第10队|cdkey|胜|败|场|积分|0 +*/ +#endif diff --git a/saac/deathcontend.h b/saac/deathcontend.h new file mode 100644 index 0000000..8a699a9 --- /dev/null +++ b/saac/deathcontend.h @@ -0,0 +1,73 @@ +#include "version.h" + +#ifdef _DEATH_CONTEND +//团队人物名单 +typedef struct +{ + int use; + char cdkey[64]; + char name[64]; +}PkTeamMans; +//战斗纪录 +typedef struct +{ + int use; + int teamnum; + int flg; //0 1 +}BattleHistorys; + +#define MAXTEAMMANNUM 5 //队伍最高人数 +#define MAXBATTLENUM 100 //队伍最高战斗纪录 + +#define DEFMAXBATTLENUM 50 //最高决斗场次 +#define DEFWINSCORE 90 +#define DEFLOSERATE 0.4 +//决斗参赛队伍info +typedef struct _tagPkTeamLists +{ + int use; //flg + int teamnum; //队伍序号 + char teamname[64]; //队伍名称 + char pathdir[64]; //队伍资料目录 + char leadercdkey[64]; //队长CDKEY + int win; //胜 + int lost; //负 + int battleplay; //总场次 + int score; + int inside; //录取旗标 + + int updata; //更新时间 + + PkTeamMans MyTeamMans[MAXTEAMMANNUM]; + BattleHistorys BHistory[MAXBATTLENUM]; +}PkTeamLists; + +//勿动------------------------------------------------------- +int PKLIST_getStringPkTeamData( int ti, char *data, int sizes); +int PKLIST_SetOneBHistory( int ti, int hi, int use, int teamnum, int flg ); +int PKLIST_GetOneBHistory( int ti ); +void PKLIST_ResetOneTeamMan( int ti ); +void PKLIST_ResetOneBHistory( int ti ); +void PKLIST_ResetOnePkTeamList( int ti ); +int PKLIST_UpdateOnePkTeamData( int ti, int forti, int winerflg); +//----------------------------------------------------------- +int PKLIST_InitPkTeamList( int maxteam ); +void PKLIST_UpdatePkTeamList( int fd, int menum, char *mecdkey, int tonum, char *tocdkey, int winer, int flg); +void PKLIST_GetPkTeamListData( int fd, int startTi, int count); +void PKLIST_GetPkTeamListDataOne( int fd, int ti); +//----------------------------------------------------------- +int PKLIST_LoadPkTeamListfromFile( char *dirpath, char *listfilename ); +int PKLIST_BackupPkTeamListfromFile( char *dirpath, char *listfilename ); +void PKLIST_SortTheCharts( int ti);//排行榜处理 +void PKLIST_TheCharts( int fd, int type, int flg); + +int PKLIST_LoadUserfromFile( char *dirpath, char *listfilename ); +int PKLIST_CutStartUserfromFile( char *dirpath, char *listfilename ); + +void PKLIST_CheckRepeatBattleHistory( void); +int PKLIST_alteUserfromFile( char *dirpath, char *listfilename ); +void PKLIST_Sort_PKListSort( void); + +void PKLIST_CheckAllUser( void); + +#endif diff --git a/saac/defend.c b/saac/defend.c new file mode 100644 index 0000000..d0529ba --- /dev/null +++ b/saac/defend.c @@ -0,0 +1,415 @@ +#include "version.h" +#include +#include +#include +#include + +#include "saacproto_serv.h" +#include "main.h" +#include "char.h" +#include "util.h" +#include "defend.h" + +#ifdef _DEFEND_NEWUSERS +extern gmsv gs[MAXCONNECTION]; + +#define DEFEND_FILENAME "db/defend/defend.txt" +#define SCORE_FILENAME "db/defend/score.txt" + +DefendArrayList *DEFENDUserList = NULL; +ScoreArrayList *DEFENDScoreList = NULL; + +static int DEFEND_MAXSCORE = 0; +static int DEFEND_MINSCORE = 0; +void DEFEND_InitList() +{ + log("DEFEND_InitList( %d) - %4.2f KB.. \n", DEFEND_MAXLISTS, + (float)(sizeof( struct _tagDefendArrayList)*DEFEND_MAXLISTS)/1024 ); + + DEFENDUserList = (DefendArrayList*)calloc( 1, sizeof( struct _tagDefendArrayList)*DEFEND_MAXLISTS); + + if( DEFENDUserList == NULL ){ + log("Can't calloc sizeof(%4.2fKB.)err !!\n", + (float)(sizeof( struct _tagDefendArrayList)*DEFEND_MAXLISTS)/1024 ); + return; + } + + DEFENDScoreList = (ScoreArrayList*)calloc( 1, sizeof( struct _tagScoreArrayList)*DEFEND_SCOREMAXLISTS); + if( DEFENDScoreList == NULL ){ + log("Can't calloc sizeof(%4.2fKB.)err !!\n", + (float)(sizeof( struct _tagDefendArrayList)*DEFEND_SCOREMAXLISTS)/1024 ); + return; + } + + DEFEND_resetUserForList(); + DEFEND_ReadUserForList( DEFEND_FILENAME); + DEFEND_resetScoreForList(); + DEFEND_ReadScoreForList( SCORE_FILENAME); +} + +int DEFEND_getUse( int si) +{ + if( si >= DEFEND_MAXLISTS || si < 0 ) return -1; + return DEFENDUserList[ si].use; +} + +int DEFEND_setUse( int si, int num) +{ + int olds; + if( si >= DEFEND_MAXLISTS || si < 0 ) return -1; + olds = DEFENDUserList[ si].use; + DEFENDUserList[ si].use = num; + return olds; +} + +void DEFEND_resetUserForList() +{ + int i; + for( i=0; i 0 ){ + DEFEND_delOneUserForList( j); + } + continue; + } + DEFEND_copyOneUserForList( j, j+1); + } + } + } + for( i=0; i= DEFEND_MAXLISTS ) return -1; + ti = i; + + for( i=(DEFEND_MAXLISTS-1); i>ti; i--){ + if( DEFEND_getUse( i-1) <= 0 ) continue; + DEFEND_copyOneUserForList( i, i-1); + } + + memcpy( DEFENDUserList[ ti].cdkey, cdkey, sizeof( DEFENDUserList[ ti].cdkey) ); + memcpy( DEFENDUserList[ ti].name, name, sizeof( DEFENDUserList[ ti].name) ); + DEFENDUserList[ ti].defnums = nums; //次数 + DEFENDUserList[ ti].type = type; + DEFENDUserList[ ti].score = score; + DEFENDUserList[ ti].use = 1; + return ti; +} + +void DEFEND_LoadUserForList( char *listarg) +{ + char buf2[256]; + char cdkey[256], name[256]; + int type, nums, score; + + easyGetTokenFromBuf( listarg, ',', 1, buf2, sizeof(buf2)); + memcpy( cdkey, buf2, sizeof( cdkey)); + easyGetTokenFromBuf( listarg, ',', 2, buf2, sizeof(buf2)); + memcpy( name, buf2, sizeof( name)); + easyGetTokenFromBuf( listarg, ',', 3, buf2, sizeof(buf2)); + nums = atoi( buf2); + easyGetTokenFromBuf( listarg, ',', 4, buf2, sizeof(buf2)); + score = atoi( buf2); + easyGetTokenFromBuf( listarg, ',', 5, buf2, sizeof(buf2)); + type = atoi( buf2); + + if( DEFEND_addUserForList( cdkey, name, score, nums, type) != -1 ){ + DEFEND_ShowUserLists(); + DEFEND_SendToUserLists(); + } +} + +void DEFEND_ReadUserForList( char *filename) +{ + FILE *fp=NULL; + char buf1[256], buf2[256]; + char cdkey[256], name[256]; + int type, nums, score; + fp = fopen( filename, "r"); + if( fp == NULL ){ + log( "Can't Read %s..!\n", filename); + return; + } + + while( fgets( buf1 , sizeof( buf1 ) , fp )){ + easyGetTokenFromBuf( buf1, ',', 1, buf2, sizeof(buf2)); + memcpy( cdkey, buf2, sizeof( cdkey)); + easyGetTokenFromBuf( buf1, ',', 2, buf2, sizeof(buf2)); + memcpy( name, buf2, sizeof( name)); + easyGetTokenFromBuf( buf1, ',', 3, buf2, sizeof(buf2)); + nums = atoi( buf2); + easyGetTokenFromBuf( buf1, ',', 4, buf2, sizeof(buf2)); + score = atoi( buf2); + easyGetTokenFromBuf( buf1, ',', 5, buf2, sizeof(buf2)); + type = atoi( buf2); + + DEFEND_addUserForList( cdkey, name, score, nums, type); + } + fclose( fp); + DEFEND_ShowUserLists(); +} + +void DEFEND_ShowUserLists() +{ + int i; + if( DEFENDUserList == NULL ) return; + for( i=0; i= DEFEND_SCOREMAXLISTS || si < 0 ) return -1; + return DEFENDScoreList[ si].use; +} + +void DEFEND_ReadScoreForList( char *filename) +{ + FILE *fp=NULL; + char buf1[256], buf2[256]; + char cdkey[256], name[256], fromname[256]; + int score; + fp = fopen( filename, "r"); + if( fp == NULL ){ + log( "Can't Read %s..!\n", filename); + return; + } + + while( fgets( buf1 , sizeof( buf1 ) , fp )){ + int i; + if( strlen(buf1) < 1 || strlen(buf1) > 512 ) continue; + for( i=0; i +#include +#include "lock.h" +#include "main.h" +#include "char.h" + +#ifdef _WORKER_AUTO_LOGOUT // WON ADD GS断线自动送LOGOUT给WORKER +#include "recv.h" +#endif + +LockNode **userlock; + +#ifdef _UNLOCKPOOL +#define UNLOCKPOOLNUM 2000 +UnlockPoolNode UnlockPool[UNLOCKPOOLNUM]; +int iUnlockPoolAdd =0; +//int iUnlockPoolClean =0; +#endif + +void Lock_Init(void) +{ + int i; + userlock= (LockNode **) calloc( 1, sizeof(LockNode *) * 256); + memset(userlock, 0, sizeof(userlock)); + for (i=0; i<256; i++) { + userlock[i] = (LockNode *)calloc( 1,sizeof(LockNode)); + userlock[i]->use=0; + userlock[i]->next=NULL; + userlock[i]->prev=NULL; + memset( userlock[i]->cdkey, 0, sizeof( userlock[i]->cdkey) ); + memset( userlock[i]->server, 0, sizeof( userlock[i]->server) ); +#ifdef _LOCK_ADD_NAME + memset( userlock[i]->name, 0, sizeof( userlock[i]->name) ); +#endif + } + log("存贮器初始化"); +} + +LockNode *Creat_newNodes( void) +{ + LockNode *newln=NULL; + newln = ( LockNode *)calloc( 1, sizeof( LockNode) ); + if( newln == NULL ){ + log( "err Can't calloc:%d lock nodes !!\n", sizeof(LockNode)); + return 0; + } + newln->use=0; + newln->next=NULL; + memset( newln->cdkey, 0, sizeof( newln->cdkey) ); + memset( newln->server, 0, sizeof( newln->server) ); +#ifdef _LOCK_ADD_NAME + memset( newln->name, 0, sizeof( newln->name) ); +#endif + return newln; +} + +#ifdef _LOCK_ADD_NAME +int InsertMemLock(int entry, char *cdkey,char *name, char *passwd, char *server, int process, char *deadline) +#else +int InsertMemLock(int entry, char *cdkey, char *passwd, char *server, int process, char *deadline) +#endif +{ + int j; + LockNode *ln = userlock[entry]; +#ifdef _LOCK_ADD_NAME + log("进入游戏:目录:char/0x%x 账号:%s 名称:%s 服务器:%s\n", entry, cdkey, name, server); +#else + log("进入游戏:目录:%x 账号:%s 服务器:%s\n", entry, cdkey, server); +#endif + + while( (ln!=NULL) && (ln->use!=0)) ln=ln->next; + + if( ln == NULL ) { + LockNode *fhead=NULL; + LockNode *p = userlock[entry]; + log("Add more lock nodes.\n"); + while (p->next!=NULL) p=p->next; + fhead = p; + for( j=0; j<32; j++) { // allocate more nodes + if( (ln = Creat_newNodes() ) == NULL ) return 0; + ln->prev=p; + p->next=ln; + p=ln; + } + while( (fhead!=NULL) && (fhead->use!=0)) fhead=fhead->next; + ln = fhead; + } + + if( ln->use !=0 ) return 0; + ln->use = 1; + strcpy( ln->cdkey, cdkey); + strcpy( ln->server, server); +#ifdef _LOCK_ADD_NAME + strcpy( ln->name, name); +#endif + ln->process = process; +#ifdef _TIMEOUTKICK + strcpy( ln->passwd, passwd); + strcpy( ln->deadline, deadline); +#endif + return 1; +} + +int DeleteMemLock(int entry, char *cdkey, int *process) +{ + LockNode *ln = userlock[entry]; + + log("删除内存信息 位置=%x 账号=%s ..\n", entry, cdkey); + + while (ln!=NULL) { + if( ln->use != 0) { +#ifdef _CHANGEGALAXY + if( !strcmp( ln->cdkey, cdkey ) && strcmp( ln->server, "移民") ) break; +#else + if( strcmp( ln->cdkey, cdkey ) == 0 ) break; +#endif + } + ln=ln->next; + } + if( ln != NULL ) { + ln->use=0; + memset( ln->cdkey, 0, sizeof( ln->cdkey) ); + memset( ln->server, 0, sizeof( ln->server) ); +#ifdef _LOCK_ADD_NAME + memset( ln->name, 0, sizeof( ln->name) ); +#endif + *process = ln->process; + log("删除成功\n"); + return 1; + } + log("删除失败!!\n"); + return 0; +} + +void DeleteMemLockServer(char *sname) +{ + int i; + LockNode *ln; + for (i=0; i<256; i++) { + ln = userlock[i]; + while (ln!=NULL) { + if (ln->use != 0) { + if( strcmp( ln->server, sname)==0) { + ln->use=0; + } + } + ln=ln->next; + } + } +} + + +#ifdef _WORKER_AUTO_LOGOUT // WON ADD GS断线自动送LOGOUT给WORKER +void Worker_auto_logout(int ti, char *sname) +{ + int i; + LockNode *ln; + + log("\nGMSV 退出或工作站退出!! \n"); + + for (i=0; i<256; i++) { + ln = userlock[i]; + while (ln!=NULL) { + if (ln->use != 0) { + if (strcmp(ln->server, sname)==0) { +#if 0 + if( addUnlockPool( ti, ln->cdkey, "", "", "") <0 ) { + char id[20]; + strcpy(id ,ln->cdkey); + log("工作站发送退出 ==> ti(%d) 账号(%s) 序号(%d)\n", ti, id, iUnlockPoolAdd ); + Worker_send_logout(ti, id); + } +#else + char id[20]; + strcpy(id ,ln->cdkey); + log("工作站发送退出==>ti(%d) 账号(%s)\n", ti, id ); + Worker_send_logout(ti, id); +#endif + } + } + ln=ln->next; + } + } +} +#endif + + + + +int isMemLocked(int entry, char *cdkey) +{ + LockNode *ln = userlock[entry]; + while (ln!=NULL) { + if (ln->use != 0) { + if (strcmp(ln->cdkey, cdkey)==0) { + if( !strcmp(ln->server, "星系移民")) + log(" 星系移民中 "); + break; + } + } + ln=ln->next; + } + if (ln!=NULL) return 1; else return 0; +} + +int GetMemLockState(int entry, char *cdkey, char *result) +{ + LockNode *ln = userlock[entry]; + + while (ln!=NULL) { + if (ln->use != 0) { + if (strcmp(ln->cdkey, cdkey)==0) { + sprintf(result, "%s 是在 %s 被锁的.",cdkey, ln->server); + return 1; + } + } + ln=ln->next; + } + sprintf(result, "%s 没有被锁.", cdkey); + return 0; +} + +int GetMemLockServer(int entry, char *cdkey, char *result) +{ + LockNode *ln = userlock[entry]; + while (ln!=NULL) { + if (ln->use != 0) { + if (strcmp(ln->cdkey, cdkey)==0) { + strcpy(result, ln->server); + return 1; + } + } + ln=ln->next; + } + return 0; +} + +int LockNode_getGname( int entries, char *id, char *gname) +{ + LockNode *ln = userlock[entries]; + while (ln!=NULL) { + if (ln->use != 0) { + if( !strcmp(ln->cdkey, id) ){ + sprintf( gname,"%s", ln->server ); + return 1; + } + } + ln=ln->next; + } + return 0; +} + +#ifdef _CHANGEGALAXY + +int DeleteGalaxyChangeLock( void) +{ + int count =0; + int entry =0; + + log(" DeleteGalaxyChangeLock "); + + for( entry =0; entry <256; entry++) { + + LockNode *ln = userlock[entry]; + + while (ln!=NULL) { + if( ln->use != 0) { + if( strcmp( ln->server, "星系移民" ) == 0 ) { + ln->use=0; + memset( ln->cdkey, 0, sizeof( ln->cdkey) ); + memset( ln->server, 0, sizeof( ln->server) ); +#ifdef _LOCK_ADD_NAME + memset( ln->name, 0, sizeof( ln->name) ); +#endif + //*process = ln->process; + count++; + } + } + ln=ln->next; + } + } + + log("num=%d ", count); + + return count; +} + + +int isChangeGalaxyLocked( char *cdkey) +{ + LockNode *ln; + int entry; + + if (!cdkey[0]) return 1; // invalid id: lock it + + entry = getHash(cdkey) & 0xff; + ln = userlock[entry]; + + while (ln!=NULL) { + if (ln->use != 0) { + if( !strcmp(ln->cdkey, cdkey) && !strcmp(ln->server, "星系移民") ) { + log(" 星系移民中 "); + break; + } + } + ln=ln->next; + } + if (ln!=NULL) return 1; else return 0; +} + +#endif + + +#ifdef _TIMEOUTKICK +int ChangeMemDeadline(int entry, char *cdkey, char *deadline) +{ + + LockNode *ln = userlock[entry]; + while (ln!=NULL) { + if (ln->use != 0) { + if (strcmp(ln->cdkey, cdkey)==0) { + log(" 修改Deadline "); + strcpy( ln->deadline, deadline); + break; + } + } + ln=ln->next; + } + if (ln!=NULL) return 1; else return 0; +} +#endif + +#ifdef _UNLOCKPOOL +void UnlockPoolProc( void) +{ + static int unlockindex =0; + static time_t lastcheck =0; + int cleanCount =0; + + + if( sys_time < lastcheck + 3 ) // 每xx秒检查 + return; + lastcheck = sys_time; + + //log("\n Start send UnlockPool to worker!! "); + + //while( UnlockPool[unlockindex].use ) { + for( unlockindex =0; unlockindex =30) // 每次最多送X个logout + // break; + } + } + + // 一次全清归零 + iUnlockPoolAdd =0; + unlockindex =0; + + log("\n Unlockpool send Count:%d index:%d", cleanCount, unlockindex); + +} + + +int addUnlockPool( int serverindex, char *cdkey, char *charname, char *process, int mesgid) +{ + int i =0; + + while( UnlockPool[iUnlockPoolAdd].use ) { + iUnlockPoolAdd++; + iUnlockPoolAdd = iUnlockPoolAdd % UNLOCKPOOLNUM; + + i++; + if( i >= UNLOCKPOOLNUM ) { + log(" UnlockPool_FULL!!!!:%d ", iUnlockPoolAdd); + return -1; + } + } + + UnlockPool[iUnlockPoolAdd].use = 1; + UnlockPool[iUnlockPoolAdd].serverindex = serverindex; + strcpy( UnlockPool[iUnlockPoolAdd].cdkey, cdkey); + strcpy( UnlockPool[iUnlockPoolAdd].charname, charname); + strcpy( UnlockPool[iUnlockPoolAdd].process, process); + UnlockPool[iUnlockPoolAdd].mesgid = mesgid; + + log("\n add_UnlockPool:i(%d),si(%d),cdkey(%s)", iUnlockPoolAdd, serverindex, UnlockPool[iUnlockPoolAdd].cdkey ); + + iUnlockPoolAdd++; + iUnlockPoolAdd = iUnlockPoolAdd % UNLOCKPOOLNUM; + + return 0; +} + +void init_UnlockPool( void) +{ + int i; + for( i =0; i < UNLOCKPOOLNUM; i++) + memset( &(UnlockPool[i]), '\0', sizeof( UnlockPoolNode) ); +} + +int inUnlockPool( char* cdkey) +{ + int i; + for( i=0; i +#include +#include +#include +#include +#include + +typedef enum +{ + MS_NOUSE = 0, + MS_NEWMESSAGE, + MS_WAIT_ACK, +} MAILSTATE; + +#define TEXT_MAX 1024 +struct mail +{ + int use; + unsigned int id_charname_hash; + char id_to[USERID_MAX]; + char charname_to[CHARNAME_MAX]; + char id_from[USERID_MAX]; + char charname_from[CHARNAME_MAX]; + char text[TEXT_MAX]; + int option; + unsigned int message_id; + MAILSTATE state; + time_t recv_time; +}; + +struct mail *mailbuf; +int mailbufsize = 0; + + +static unsigned int +getNextMessageID(void) +{ + FILE *fp; + unsigned int i; + char filename[1024]; + char line[1000]; + snprintf( filename, sizeof( filename ), + "%s/mail_id" , maildir ); + fp = fopen( filename, "r" ); + if( fp == NULL ){ + fp = fopen( filename ,"w" ); + if( fp == NULL ){ + log( "不能创建 %s ... 使用同样的邮件ID," + " saac 发送变得缓慢!(id:9999)\n", filename ); + return 9999; + } + fprintf( fp, "10000\n" ); + fclose(fp); + return 1000; + } + fgets( line, sizeof(line), fp); + i = strtoul( line, NULL, 10 ); + fclose(fp); + + fp = fopen( filename, "w" ); + if( fp == NULL ){ + log( "不能写入新的ID到 %s ... 使用同样的数字!\n", filename ); + return i; + } + fprintf( fp, "%u", i+1 ); + fclose(fp); + + log( "新邮件ID:%u\n", i); + return i; +} + +static int reallocMailBuf( void ) +{ + struct mail *previous = mailbuf; + struct mail *newbuf; + int new_mailbufsize; + if( mailbufsize == 0 ){ + new_mailbufsize = 1; + } else { + new_mailbufsize = mailbufsize * 2; + } + + newbuf = ( struct mail * )calloc( 1, new_mailbufsize * + sizeof( struct mail )); + if( newbuf == NULL ){ + log( "回复邮件缓冲: 内件不足!! 新邮件大小:%d\n", + new_mailbufsize ); + return -1; + } + memset( newbuf, 0 , new_mailbufsize * sizeof( struct mail )); + if( previous ) memcpy( (char*)newbuf, (char*)previous, + mailbufsize * sizeof( struct mail )); + free( previous ); + mailbufsize = new_mailbufsize; + mailbuf = newbuf; + + log( "重新分配邮件缓冲: " + "新邮件缓冲:%d 旧地址:%x 新地址:%x\n", + new_mailbufsize, (unsigned int)previous,(unsigned int)newbuf ); + return 0; +} + +static int mailbuf_finder = 0; +static int allocMail( int use_msgid, unsigned int msgid ) +{ + int i; + for(i=0;i + mailbuf[flush_index[j+1]].message_id ){ + int sw = flush_index[j]; + flush_index[j] = flush_index[j+1]; + flush_index[j+1] = sw; + log( "inverted %d and %d in %d \n", flush_index[j], + flush_index[j+1], j ); + } + } + } + + /* 端卞霜耨允月 */ + for(i=0;i< flush_i; i++ ){ + /* flush 及桦宁反}flush毛霜耨仄化五凶必□丞扔□田□卞 + 覆仄化分仃霜耨允木壬中中 */ + saacproto_Message_send( fd, + mailbuf[flush_index[i]].id_from, + mailbuf[flush_index[i]].charname_from, + mailbuf[flush_index[i]].id_to, + mailbuf[flush_index[i]].charname_to, + mailbuf[flush_index[i]].text, + mailbuf[flush_index[i]].option, + mailbuf[flush_index[i]].message_id ); + mailbuf[flush_index[i]].state = MS_WAIT_ACK; + log( "分类邮件ID:%u\n", + mailbuf[flush_index[i]].message_id ); + } + // Nuke *1 + log( "邮件: 发送 %d 封邮件到 %s(%s)(%s)\n", c, id, charname ,chartime()); +} + +// Nuke start: To expire undelivered mail +#define MAIL_EXPIRE_TIME 3600 +void +expireMail() +{ + int i,c=0; + unsigned int h ; + char id_charname[1000]; + time_t now=time(NULL); + + /* 1荚及flush 匹霜耨允月 醒 */ +#define MAX_FLUSH_MAIL 1024 + int flush_index[MAX_FLUSH_MAIL]; + int flush_i=0; + // Nuke +1 + log("邮件缓冲大小:%d (%s)\n",mailbufsize,chartime()); + // Nuke *1 + for(i=0;(i= MAIL_EXPIRE_TIME)) { + log( "消息ID:%u 已过期\n", mailbuf[i].message_id ); + flush_index[flush_i++] = i; + c++; + } + } + + /* 端卞霜耨允月 */ + for(i=0;i< flush_i; i++ ){ + + snprintf( id_charname, sizeof( id_charname), "%s_%s", + mailbuf[flush_index[i]].id_to, + mailbuf[flush_index[i]].charname_to ); + h = hashpjw( id_charname ) & 0xff ; + { + char savefile[1024]; + char childname[1000]; + snprintf( childname,sizeof(childname),"%u", + mailbuf[flush_index[i]].message_id ); + makeDirFilename( savefile, sizeof(savefile),maildir, + h, childname ); + if( unlink( savefile ) != 0 ){ + log( "failed to unlink %s: %s\n", + savefile, strerror(errno )); + } else { + log( "过期邮件: 删除游戏 " + "%u 从 %s(%s) 到 %s(%s)\n", + mailbuf[flush_index[i]].message_id, + mailbuf[flush_index[i]].id_from, + mailbuf[flush_index[i]].charname_from, + mailbuf[flush_index[i]].id_to, + mailbuf[flush_index[i]].charname_to ); + } + memset( &mailbuf[flush_index[i]], 0 , sizeof( mailbuf[0] )); + } + } + // Nuke *1 + log( "过期邮件: 过期 %d 消息 (%s)\n", c ,chartime()); +} + +int readMail( char *dir ) +{ + int i, read_count=0; + for( i=0; i<256; i++){ + char dirname[1000]; + DIR *d; + + snprintf(dirname, sizeof( dirname ), "%s/0x%x", dir, i ); + d = opendir(dirname); + if(d == NULL ){ + mkdir( dirname, 0755); + log("创建 %s\n", dirname); + continue; + } + while(1){ + struct dirent *de; + de = readdir( d ); + if( de == NULL )break; + if( de->d_name[0] != '.' ){ + char filename[1000]; + FILE *fp; + struct stat s; + snprintf( filename, sizeof( filename), + "%s/%s", dirname, de->d_name ); + if( stat( filename, &s ) < 0 ){ + continue; + } + if( !(s.st_mode & S_IFREG)) continue; + fp = fopen( filename, "r" ); + if( fp == NULL ){ + log( "不能打开文件 %s %s\n",filename,strerror(errno)); + continue; + } + { + char line[16384]; + char toid[1000] , fromid[1000]; + char tochar[CHARNAME_MAX*2+1]; + char fromchar[CHARNAME_MAX*2+1]; + char text[TEXT_MAX*2+1]; + int opt=0; + toid[0] = fromid[0] = tochar[0] = + fromchar[0] = text[0] = 0; + fgets( line, sizeof(line), fp ); + chop(line); + if( strncmp( TO_ID_HEAD , line, strlen(TO_ID_HEAD) )==0){ + snprintf( toid , sizeof( toid ),"%s", + line+strlen(TO_ID_HEAD )); + } + fgets( line, sizeof( line ), fp ); + chop(line); + if( strncmp( TO_CHAR_HEAD, line,strlen(TO_CHAR_HEAD))==0){ + snprintf( tochar, sizeof( tochar ), "%s", + line+strlen( TO_CHAR_HEAD )); + makeStringFromEscaped( tochar ); + } + fgets( line, sizeof( line ),fp ); + chop(line); + if( strncmp( FROM_ID_HEAD,line,strlen(FROM_ID_HEAD))==0){ + snprintf( fromid, sizeof( fromid ),"%s", + line + strlen( FROM_ID_HEAD )); + } + fgets( line,sizeof(line),fp); + chop(line); + if(strncmp(FROM_CHAR_HEAD,line,strlen(FROM_CHAR_HEAD))==0){ + snprintf( fromchar, sizeof( fromchar ), + line + strlen(FROM_CHAR_HEAD )); + makeStringFromEscaped( fromchar ); + } + fgets( line,sizeof(line),fp); + chop(line); + if( strncmp( OPTION_HEAD,line, strlen(OPTION_HEAD))==0){ + opt = atoi( line + strlen( OPTION_HEAD ) ); + } + fgets( line, sizeof( line),fp); + chop(line); + if( strncmp(TEXT_HEAD,line,strlen(TEXT_HEAD))==0){ + snprintf( text, sizeof( text), "%s", + line + strlen( TEXT_HEAD )); + makeStringFromEscaped( text ); + } + if( toid[0] == 0 || fromid[0] == 0 || + tochar[0] == 0 || fromchar[0] == 0 || + text[0] == 0 ){ + log( "有问题邮件! %s 接收ID[%c] 接收名字[%c]" + " 发送ID[%c] 发送名字[%c] 文本[%c]\n", + filename, + toid[0], tochar[0], fromid[0], fromchar[0], + text[0] ); + // Nuke +1 1027: Close for safe + fclose(fp); + continue; + } + receiveMail( fromid, fromchar, + toid, tochar, + text, opt , 1, + strtoul(de->d_name,NULL,10)); + read_count++; + } + fclose(fp); + + } + } + closedir(d); + } + log( "读取邮件: 在'%s'目录里读取到 %d 封邮件 \n", dir, read_count ); + return 0; +} diff --git a/saac/mail.h b/saac/mail.h new file mode 100644 index 0000000..94b93bf --- /dev/null +++ b/saac/mail.h @@ -0,0 +1,13 @@ +#ifndef _MAIL_H_ +#define _MAIL_H_ + +void receiveMail( char *id_from, char *charname_from, + char *id_to, char *charname_to, char *message, int option , + int use_msgid, unsigned int msgid ); +void receiveMailAck( char *id, char *charname, int a , int mesgid ); +void flushMail( int fd, char *id, char *charname ); +void expireMail(); +int readMail( char *dir ); +#endif + + diff --git a/saac/main.c b/saac/main.c new file mode 100644 index 0000000..255b17b --- /dev/null +++ b/saac/main.c @@ -0,0 +1,2169 @@ +#define _MAIN_C_ + +#ifdef _SASQL1 +#include "sasql.h" +#endif + + +#include "main.h" +#include "util.h" +#include "mail.h" +#include "db.h" +#include "saacproto_util.h" +#include "saacproto_serv.h" +#ifdef _UNIVERSE_CHATROOM +#include "chatroom.h" +#endif +// CoolFish: Family 2001/5/9 +#include "acfamily.h" +#include "version.h" + +#ifdef _DEATH_CONTEND +#include "deathcontend.h" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "saacproto_work.h" +#ifdef _OACSTRUCT_TCP +#include "saacproto_oac.h" +#endif +#ifdef _PAUCTION_MAN +#include "auction.h" +#endif +#include "lock.h" +#define BACKLOGNUM 5 + + +#ifdef _FIX_WORKS +#include "saacproto_work.h" +int worksockfd; +#endif + +#ifdef _LOCK_SERVER +#include "saacproto_lserver.h" +#endif + +#ifdef _SEND_EFFECT // WON ADD 送下雪、下雨等特效 +#include "recv.h" +#endif + +#include "defend.h" + +#include "char.h" + +#ifdef _SASQL +#include "sasql.h" +#endif + +#ifndef _FIX_WORKS + +struct membuf +{ + int use; + char buf[512]; +// char buf[1024*128]; + int len; + int next; +}; + +struct connection +{ + int use; + int fd; + int mbtop_ri; + int mbtop_wi; + struct sockaddr_in remoteaddr; + int closed_by_remote; +}; +#else +#endif + +struct membuf *mb; +int mbsize; +int mbuse ; + +int mainsockfd; /* accept 及 域娄醒卞中木月 */ +struct sockaddr_in localaddr; /* bind 允月失玉伊旦 */ + + +struct connection *con; /* 戊生弁扑亦件 */ + +static int mb_finder=0; /* mb及坞五毛腹绸允月凶户及 + 腹绸玄永皿及匏 筏盛迕 */ +// WON FIX +char tmpbuf[65536]; +//char tmpbuf[65536*3]; /* read迕 */ + +struct timeval select_timeout; + +time_t sys_time =0; // Robin add + +extern gmsv gs[MAXCONNECTION]; + +int tcpstruct_init( char *addr, int port, int timeout_ms, int mem_use, int deb); +int tcpstruct_accept1( void ); +int tcpstruct_accept( int *tis , int ticount ); +int tcpstruct_close( int ti ); +int tcpstruct_read( int ti , char *buf , int len ); +int tcpstruct_readline( int ti , char *buf , int len ,int k ,int r); +int tcpstruct_readline_chop( int ti , char *buf, int len ); +int tcpstruct_write( int ti , char *buf , int len ); +int tcpstruct_countmbuse( void ); +int tcpstruct_connect( char *addr , int port ); +#ifndef _FIX_WORKS +void set_nodelay( int sock ); + + +#define OK 0 /* 岳 */ +#define TCPSTRUCT_ENOMEM -1 /* malloc 撩 */ +#define TCPSTRUCT_ESOCK -2 /* socket 撩 */ +#define TCPSTRUCT_EBIND -3 /* bind 撩 */ +#define TCPSTRUCT_ELISTEN -4 /* listen 撩 */ +#define TCPSTRUCT_EBUG -6 /* 田弘匹丐月 */ +#define TCPSTRUCT_EINVCIND -7 /* con尺及index互云井仄中方 */ +#define TCPSTRUCT_EREADFIN -8 /* read 允月犯□正互卅仁化 closed by remote */ +#define TCPSTRUCT_EHOST -9 /* gethostbyname 撩 */ +#define TCPSTRUCT_ECONNECT -10 /* connect 撩 */ +#define TCPSTRUCT_ECFULL -11 /* con 互中匀天中 */ +#define TCPSTRUCT_ETOOLONG -12 /* 垫互卅互允亢 */ +#define TCPSTRUCT_EMBFULL -13 /* mb 互中匀天中 */ +#define TCPSTRUCT_ECLOSEAGAIN -14 /* close 互2荚今木凶 */ +#endif + + +int port; /* 必□丞扔□田□互涛粮仄化仁月禾□玄 */ +int Total_Charlist; +int Expired_mail; +int Del_Family_or_Member; +int Write_Family; +#ifdef _NEW_PLAYERGOLD +int New_PlayerGold; +#endif + +// Nuke start +char *chartime() +{ + static char buf[80]; + time_t t; + t=time(0); + strcpy(buf,ctime(&t)); + buf[strlen(buf)-1]=0; + return(buf); +} + +/* + sigaction白弁 + */ +void sighandle( int a ) +{ + if (a==SIGUSR1) log("sigusr1信号!\n"); + + if (a==SIGUSR2) { + sigusr2( a); + log("sigusr2信号!\n"); + return; + } + #ifdef _SQL_BACKGROUND + if(!sasql_initonline()) + log("\n数据库保存失败!\n"); + #endif + log("得到一个信号! 异常中断......\n" ); + exit(1); +} + +void sigusr2(int a); + +// Arminius 7.20 memory unlock +void sigusr1(int a) +{ + int i; + FILE *f; + char key[4096],buf[4096]; + + signal(SIGUSR1, sigusr1); + + f = fopen("./unlock.arg", "r"); + + if (f) { + memset(key, 0, 4096); + fread(key, 4096, 1, f); + for (i=0; i ./sigusr1.result", buf); + system(key); + break; +#ifdef _CK_ONLINE_PLAYER_COUNT // WON ADD 计算线上人数 + case 'W': + PlayerCount(); + break; +#endif + +#ifdef _SEND_EFFECT // WON ADD 送下雪、下雨等特效 + case 'E': + log("\nAC 向 GS 发送下雪特效!!\n"); + SendEffect(&key[1]); + break; +#endif + +#ifdef _BAD_PLAYER // WON ADD 送坏玩家去关 + case 'B': + log("\nAC 发送坏玩家监狱!!\n"); + BadPlayer(); + break; +#endif + +#ifdef _RECAL_BACKUP_PLAYER // WON 回溯功能 + case 'U': + log("\n发送备份人物资料"); + // 得到备份人物资料 + send_backup_player_data(); + break; +#endif + +#ifdef _GM_BROADCAST // WON ADD 客服公告系统 + case 'G': + log("\n won test 1 ==> _GM_BROADCAST" ); + broadcast(key); + break; +#endif + +#ifdef _KILLDEADWORKER // 将所有Worker初始化 + case 'K': + log("\nKILL ALL WORKER!!!!!\n"); + initWorkerPort(); + break; +#endif + + case 'L': // Robin 列出所有Server连线 + log("\nList All Server Conncet!!!!!\n"); + for( i =0; i = 0 ){ + wk[i].ti = ti; + } else { + exit(1); + } + } + } +#endif +} + +static int countWorker( void ); + +// Nuke +int addWorkerTask( char *id , char *pas , char *flag, + void (*callbk)( int ti , int result , + char *cp0 , char *cp1 , char *cp2 , + char *cp3 , char *cp4, int i0 , int i1) , + int ti , + char *cparam0 , char *cparam1 , + char *cparam2 , char *cparam3 , char *cparam4 , + int iparam0 , int iparam1) +{ + + int i; + // Spock +1 2000/11/2 + char *process = cparam3; + for(i=0;i= MAXWK ) worker_finder = 0; + n = worker_finder; + if( wk[n].use && wk[n].status == WKSTAT_IDLE ){ + char s[256]; + + log("使用工作站:%d \n", n); + + // Nuke + { + int i; + for (i=0;id[i];i++) if (id[i]==' ') return -1; + } + + // Spock 2000/11/2 + snprintf( s , sizeof( s ) , "%s %s %s %s\n", id , pas , flag , process); + // Spock end +#ifdef _FIX_WORKS + if( cWork_write( wk[n].ti, s, strlen(s)) <= 0 ) { +#else + if( tcpstruct_write( wk[n].ti , s , strlen(s)) != strlen(s) ){ +#endif + return -1; + } else { + } + + snprintf( wk[n].cparam[0] , CHARDATASIZE , "%s", cparam0 ); + snprintf( wk[n].cparam[1] , CHARDATASIZE , "%s", cparam1 ); + snprintf( wk[n].cparam[2] , CHARDATASIZE , "%s", cparam2 ); + snprintf( wk[n].cparam[3] , CHARDATASIZE , "%s", cparam3 ); + snprintf( wk[n].cparam[4] , CHARDATASIZE , "%s", cparam4 ); + wk[n].iparam[0] = iparam0; + wk[n].iparam[1] = iparam1; + wk[n].status = WKSTAT_WAITING; + wk[n].callback = callbk; + wk[n].request_ti = ti ; + wk[n].last_query = time(NULL); + + return 0; + } + } + log( "工作站繁忙或工作站停止工作. 活动中的工作站有:%d\n", countWorker() ); + return -1; +} + +static int countWorker( void ) +{ + int i,c=0; + for(i=0;i 1min) + { + struct timeval st, et; + time_t t1; + gettimeofday(&st, NULL); + time(&t1); + delovertimeFMMem(t1); + gettimeofday(&et, NULL); + log("删除家族或成员(%fsec)\n", time_diff(et, st)); + } +#endif + + + if ((counter % 300) == 0) // 300( -> 60) + { + struct timeval st, et; + gettimeofday(&st, NULL); + writeFamily(familydir); + writeFMPoint(fmpointdir); + writeFMSMemo(fmsmemodir); + gettimeofday(&et, NULL); + log("记录家族(%fsec)\n", time_diff(et, st)); + } +#endif + } + +#ifdef _OACSTRUCT_TCP + OAC_select(); + OAC_ReadMessLine(); +#endif + + newti = tcpstruct_accept1(); + if( newti >= 0 ){ + log( "同意: %d\n" , newti ); + gs[newti].use = 1; + } + +#ifdef _LOCK_SERVER + { + int mlen; + char buf[4096]; + if( CHECK_LS_BEUSE() == TRUE ) { + TcpIp_LS_accept(); + + } + //Show_LS_MEMBufferList(); + + mlen = MMGet_LsReadBuflist( buf, sizeof( buf)); + if( mlen > 0 ) { + if( lockproto_SaacDispatchMessage( buf) < 0 ) { + log( "锁定信息:%s", buf); + } + } + CHECK_LSTYPE(); +#ifdef _TEST_LOCKSERVER + TEST_TOLOCKSERVER(); +#endif + } +#endif + +#ifdef _FIX_WORKS + { + int wkti=-1; + int tis[BACKLOGNUM]; + newti = tcpstruct_work_accept( tis , 1); + if( newti == 1 ) { + log( "同意工作站: %d\n" , newti ); + } + + + for( i=0; i 0 ){ + doWorker( i , buf ); + } else if( l == TCPSTRUCT_ETOOLONG || l < 0 ){ + checkWorkerClosed( i ); + tcpstruct_close( i ); + } else if( l == 0 ){ + ; + } +#endif + } else { + if( !gs[i].use )continue; + if( l > 0 ){ + char debugfun[256]; + buf[l]=0; + if( saacproto_ServerDispatchMessage( i , buf, debugfun)<0){ + // Nuke start + tcpstruct_close(i);// avoid the shutdown the gmsv ttom + log( "GMSV(%s) 消息:%s\n", gs[i].name, debugfun); + } + } else if( l == TCPSTRUCT_ETOOLONG ){ + log( "很长:%d 服务器名::%s\n", i , gs[i].name ); + +#ifdef _AC_UNLOCK_GS_PLAYER // WON ADD 自动UNLOCK + DeleteMemLockServer(gs[i].name); + log("\n用户(%s) 登出! 玩家解锁!!\n", gs[i].name ); +#endif + logout_game_server( i ); + } else if( l < 0 ){ + log( "关闭:%d 服务器名:%s\n", i , gs[i].name ); +#ifdef _UNIVERSE_CHATROOM + CHATROOM_GSClosedHandle( i); +#endif +#ifdef _AC_UNLOCK_GS_PLAYER // WON ADD 自动UNLOCK + DeleteMemLockServer(gs[i].name); + log("\n用户(%s) 登出! 玩家解锁!!\n", gs[i].name ); +#endif + + +#ifdef _WORKER_AUTO_LOGOUT // WON ADD GS断线自动送LOGOUT给WORKER + Worker_auto_logout( i, gs[i].name ); +#endif + logout_game_server(i); + } else if( l == 0 ){ + ; + } + } + } + { + static struct timeval tv_loop_store ; + struct timeval now; + double dif; + gettimeofday( &now , NULL ); + dif = time_diff( now, tv_loop_store ); + if( dif > 0.5 ){ // CoolFish 0.1 -> 0.5 2001/5/19 + //log( "Sl:%f" , dif ); + } + tv_loop_store = now; + } + + /* 伐□市□及正奶丞失它玄毛譬屯月[ + 正奶丞失它玄仄凶日夫弘毛分仄化伐□市□毛诮仄化仄引丹[ + 匹必□丞扔□田□卞 蔽读卞反骚襞允月 */ + { + int i; + time_t thre = time(NULL) - WKTIMEOUT; + for(i =0;i= 0 && con[i].closed_by_remote ==0 ){ + FD_SET( con[i].fd , & rfds ); + FD_SET( con[i].fd , & wfds ); + FD_SET( con[i].fd , & efds ); + } + } + + t = select_timeout; + sret = select( 1024, & rfds , (fd_set*)NULL, & efds , &t); + if( sret > 0 ) { + for(i=0;i< MAXCONNECTION;i++){ + if( ( con[i].fd >= 0 ) && FD_ISSET( con[i].fd , &rfds ) ){ + int fr = getFreeMem( ); + int rr , readsize ; + if( fr <= 0 ) continue; + if( fr > sizeof(tmpbuf ) ){ + readsize = sizeof( tmpbuf); + } else { + readsize = fr; + } + rr = read( con[i].fd , tmpbuf , readsize ); + if( rr <= 0 ){ + con[i].closed_by_remote = 1; + } else { + appendReadBuffer( i , tmpbuf , rr ); + } + } + } + } + /* write */ + t = select_timeout; + sret = select( 1024, (fd_set*)NULL, &wfds, & efds , &t); + if( sret > 0 ) { + for(i=0;i= 0 ) && FD_ISSET( con[i].fd , &wfds )){ + char send_buf[4096]; + int l , rr; + memset( send_buf, 0, sizeof( send_buf)); + l = consumeMemBufList( con[i].mbtop_wi ,send_buf, sizeof(send_buf),0 , 1 ); + rr = write( con[i].fd , send_buf , l ); + if( rr < 0 ){ + con[i].closed_by_remote = 1; + } else { + consumeMemBufList( con[i].mbtop_wi , send_buf, l, 1 , 0 ); + } + } + } + } + + for( i=0; i0 to avoid signal interrupt in select + if( (asret>0) && FD_ISSET( mainsockfd , & rfds )){ + struct sockaddr_in c; + int len , newsockfd; + int newcon; + bzero( &c , sizeof( c )); + len = sizeof( c ); + fprintf( stderr, "i can accept " ); + newcon = findregBlankCon( ); + if( newcon < 0 ) continue; + newsockfd = accept( mainsockfd, (struct sockaddr*)&c , &len ); + log( "同意: %d\n" , newsockfd ); + if( newsockfd < 0 ){ + unregMemBuf( newcon ); + continue; + } + set_nodelay( newsockfd ); + con[newcon].fd = newsockfd; + memcpy( &con[newcon].remoteaddr , &c ,sizeof(c)); + tis[accepted] = newcon; + accepted ++; + } + } + + return accepted; +} + + +int tcpstruct_close( int ti ) +{ + + if( ti < 0 || ti >= MAXCONNECTION )return TCPSTRUCT_EINVCIND; + if( con[ti].use == 0 ){ + return TCPSTRUCT_ECLOSEAGAIN; + } + close( con[ti].fd ); + con[ti].use = 0; + con[ti].fd = -1; + + /* 伉旦玄毛凶升匀化蝈 毛弁伉失允月 */ + consumeMemBufList( con[ti].mbtop_ri , NULL, + mbsize * sizeof( mb[0].buf ), 1, 0 ); + consumeMemBufList( con[ti].mbtop_wi , NULL, + mbsize * sizeof( mb[0].buf ), 1, 0 ); + unregMemBuf( con[ti].mbtop_ri ); + unregMemBuf( con[ti].mbtop_wi ); + con[ti].mbtop_ri = -1; + con[ti].mbtop_wi = -1; + return OK; +} + +/* + 心仇戈手及互手丹卅仁化}仄井手 remoteclose 分匀凶日 -1 毛井尹允 + + */ +int tcpstruct_read( int ti , char *buf , int len ) +{ + int l; + + if( ti < 0 || ti >= MAXCONNECTION || con[ti].use == 0 ) + return TCPSTRUCT_EINVCIND; + l = consumeMemBufList( con[ti].mbtop_ri , buf , len , 1 , 1); + if( l == 0 && con[ti].closed_by_remote ) return TCPSTRUCT_EREADFIN; + + return l; +} + +/* + 1垫毛方心仇戈[ + int kend : 1卅日垫 及 \n 毛诮允 + int kend_r : 1卅日垫 及 \r 手诮允(丐木壬) + + 心仇戈手及互手丹卅仁化}井勾 remote closed 分匀凶日-1毛井尹允 + // Nuke + Read 1 line + if kend==1 then delete \n at the tail + if kend_r== 1 then delete \r at the tail (if any) + if no data read, it means 'remote closed' then return -1 + */ +int tcpstruct_readline( int ti , char *buf , int len , int kend , int kend_r ) +{ + int l; + int minus = 0; + + if( ti < 0 || ti >= MAXCONNECTION || con[ti].use == 0 ) + return TCPSTRUCT_EINVCIND; + + l = getLineReadBuffer( ti , buf , len ); + if( l == 0 ){ + if( con[ti].closed_by_remote ){ + return TCPSTRUCT_EREADFIN; + } else { + return 0; + } + } + + if( kend ){ + if( buf[l-1]=='\n' ){ + buf[l-1] = 0; minus =-1; + } + } + if( kend_r ){ + if( buf[l-1]=='\r' ){ + buf[l-1] = 0; minus = -1; + } + if( buf[l-2]=='\r' ){ + buf[l-2] = 0; minus = -2; + } + } + return l + minus; +} +int tcpstruct_readline_chop( int ti , char *buf, int len ) +{ + return tcpstruct_readline( ti , buf , len , 1,1); +} + +int tcpstruct_write( int ti , char *buf , int len ) +{ + if( ti < 0 || ti >= MAXCONNECTION || con[ti].use == 0 ) + return TCPSTRUCT_EINVCIND; + return appendWriteBuffer( ti , buf , len ); +} + +int tcpstruct_connect( char *addr , int port ) +{ + int newti ; + int s, r; + struct sockaddr_in svaddr; + struct hostent *he; + + s = socket( AF_INET, SOCK_STREAM , 0 ); + if(s<0)return -2; + + bzero( &svaddr , sizeof( svaddr )); + svaddr.sin_family = AF_INET; + svaddr.sin_port = htons( port ); + + if( inet_aton( addr, &svaddr.sin_addr ) == 0 ){ + he = gethostbyname( addr ); + if( he == NULL ){ + return TCPSTRUCT_EHOST; + } + memcpy( & svaddr.sin_addr.s_addr , he->h_addr , + sizeof( struct in_addr)); + } + r = connect( s , ( struct sockaddr*)&svaddr,sizeof(svaddr)); + if( r < 0 ){ + return TCPSTRUCT_ECONNECT; + } + set_nodelay( s ); + newti = findregBlankCon( ); + if( newti < 0 ){ + fprintf( stderr , "连接失败: newti:%d\n", newti ); + return TCPSTRUCT_ECFULL; + } + con[newti].fd = s; + memcpy( & con[newti].remoteaddr , &svaddr , + sizeof( struct sockaddr_in)); + return newti; +} + +static int appendReadBuffer( int index , char *data , int len ) +{ + int top; + + top = con[index].mbtop_ri; + for(;;){ + int nextind = mb[top].next; + + if( nextind == -1 ) break; + top = nextind; + } + return appendMemBufList( top , data , len ); +} + +static int appendWriteBuffer( int index , char *data , int len ) +{ + int top; + top = con[index].mbtop_wi; + for(;;){ + int nextind = mb[top].next; + if( nextind == -1 ) break; + top = nextind; + } + return appendMemBufList( top , data , len ); +} +static int appendMemBufList( int top , char *data , int len ) +{ + int fr = getFreeMem( ); + int rest = len; + int data_topaddr = 0; + + if( len >= fr ){ + FILE *fp; + if( (fp=fopen( "badsysinfo.txt", "a+")) != NULL ){ + fprintf( fp, "appendMemBufList() len:%d / fr:%d err !! \n", len, fr); + fclose( fp); + } + //andy_log + log( "appendMemBufList() len:%d / fr:%d err !! \n", len, fr); + return -1; + } + data[len] = 0; + for(;;){ + int blanksize = sizeof( mb[0].buf ) - mb[top].len; + int cpsize = ( rest <= blanksize ) ? rest : blanksize; + memcpy( mb[top].buf + mb[top].len , + data + data_topaddr , cpsize ); + mb[top].len += cpsize; + if( rest <= blanksize ){ + return len; + } else { + int newmb; + rest -= cpsize; + data_topaddr += cpsize; + if( (newmb = findregBlankMemBuf( ) ) == TCPSTRUCT_EMBFULL ){ + FILE *fp; + if( (fp=fopen( "badsysinfo.txt", "a+")) != NULL ){ + fprintf( fp, "find newmb == TCPSTRUCT_EMBFULL err data:%s !!\n", data); + fclose( fp); + } + log( "find newmb == TCPSTRUCT_EMBFULL err data:%s !!\n", data); + } + mb[top].next = newmb; + top = mb[top].next; + } + } + return TCPSTRUCT_EBUG; +} + +static int consumeMemBufList( int top , char *out , int len , + int consumeflag , int copyflag ) +{ + int total = 0; + int top_store = top; + for(;;){ + int cpsize; + if( top == -1 ) break; + cpsize = ( mb[top].len <= ( len - total) ) ? + mb[top].len : ( len - total ); + + if( copyflag ) memcpy( out + total , mb[top].buf , cpsize ); + total += cpsize; + + if( consumeflag ){ + mb[top].len -= cpsize; + if( mb[top].len > 0 ){ + /* 勾井中反凶仄化卅中及匹memmove */ + memmove( mb[top].buf , mb[top].buf + cpsize , + sizeof( mb[top].buf ) - cpsize ); + } + } + top = mb[top].next; + if( total == len ){ + break; + } + } + + if( consumeflag ){ + /* 卅互今互0卞卅匀化月卅日荸 [匹手 赓及支勾反荸 仄卅中冗 */ + top = mb[top_store].next; + for(;;){ + if( top == -1 )break; + if( mb[top].len == 0 ){ + int prev; + mb[top_store].next = mb[top].next; + prev = top; + top = mb[top].next; + unregMemBuf( prev ); + } else { + top = mb[top].next; + } + } + } + + return total; +} + +static int getLineReadBuffer( int index , char *buf, int len ) +{ + + int top = con[index].mbtop_ri; + int ti = 0 , breakflag = 0; + + for(;;){ + int i; + int l = mb[top].len; + if( top == -1 )break; + for( i=0 ; i < l ; i++){ + if( mb[top].buf[i] == '\n' ){ + breakflag = 1; + break; + } + ti ++; + } + if( breakflag )break; + top = mb[top].next; + } + if( ti > len ){ + /* 1垫互卅互允亢月[ 卅巨仿□毛井尹六 */ + return TCPSTRUCT_ETOOLONG; + } + /* 垫互敦岳仄化卅中 */ + if( breakflag == 0 ){ + return 0; + } + + return consumeMemBufList( con[index].mbtop_ri , buf , ti+1 , 1 , 1 ); +} + + + +/* + 心仇户月 赢今毛忒允 + int index : con index + + return: + 反巨仿□ + 0动晓及桦宁反 read 仄化手方中赢今[ + + + mbsize 井日mbuse 毛娄中化扔奶术毛井仃月分仃[ + 仇引井中芴曰及坌反 骰允月[公氏卅称井中袄卞仇分歹日卅仁化手第[ + + */ +static int getFreeMem( void ) +{ + return ( mbsize - mbuse ) * sizeof( mb[0].buf ); +} + +/* + + membuf 及坞五毛茧仄分允[ + + return : 心勾井匀凶日 >=0 匹 index. + 心勾井日卅井匀凶日 + + 腹绸及午五卞反 mb_finder 毛勾井丹[ + 仇木匹腹绸仄化} 卞reg允月[ + */ + +static int findregBlankMemBuf( void ) +{ + int i; + for(i=0;i= mbsize || mb_finder < 0 ) mb_finder = 0; + + if( mb[mb_finder].use == 0 ){ + mb[mb_finder].use = 1; + mb[mb_finder].len = 0; + mb[mb_finder].next = -1; + mbuse ++; + return mb_finder; + } + } + return TCPSTRUCT_EMBFULL; +} + +/* + mb 毛荸 允月 + + */ +static int unregMemBuf( int index ) +{ + mb[index].use=0; + mb[index].next = -1; + mb[index].len = 0; + mbuse --; + return OK; +} + +static int findregBlankCon( void ) +{ + int i; + // Nuke changed 0->1 + //for(i=0;i15) || (toinfo <0) || ( toinfo >15)) + continue; + + // 是否要移民出去或移民进来 + if( !strcmp( servername[frominfo], saacname) || !strcmp( servername[toinfo], saacname) ) + { + + log(" from:%s to:%s ", servername[frominfo], servername[toinfo]); + + // 锁帐号 +#ifdef _LOCK_ADD_NAME + InsertMemLock( getHash(playerinfo) & 0xff, playerinfo, "", "", "星系移民", 0, "0"); +#else + InsertMemLock( getHash(playerinfo) & 0xff, playerinfo, "", "星系移民", 0, "0"); +#endif + + // 踢人 + log("移民前踢人 "); + for(i=0;i%s->%s", i, gs[i].name, playerinfo); + } + } + } + //else + //{ + // continue; + //} + + } + + // 列表档案改名备份 + //sprintf( backup_movelist, "%s.old", listfilename); + //rename( listfilename, backup_movelist); + + fclose( listfile); + + } + + signal(SIGUSR2, sighandle); +} + + + +#ifdef _ANGEL_SUMMON + +#define MISSIONFILE "db/missiontable.txt" + +static int initMissionTable( void ) +{ + FILE *fp; + char onedata[1024]; + char buf[1024]; + int index =0; + + memset( missiontable, 0, sizeof(missiontable)); + fp = fopen( MISSIONFILE, "r"); + if( !fp ) { + log("\n加载任务错误!!!! \n"); + //return false; + } + log("\n加载任务..."); + while(1) { + // + if( fgets( onedata, sizeof(onedata), fp) == NULL) + break; + if( onedata[0] == NULL || onedata[0] == '#' ) + continue; + //easyGetTokenFromBuf( onedata, ',', 1, buf, sizeof( buf)); + //index = atoi( buf); + easyGetTokenFromBuf( onedata, ',', 1, buf, sizeof( buf)); + if( buf[0] == NULL ) continue; + strcpy( missiontable[index].angelinfo, buf); + easyGetTokenFromBuf( onedata, ',', 2, buf, sizeof( buf)); + if( buf[0] == NULL ) continue; + strcpy( missiontable[index].heroinfo, buf); + easyGetTokenFromBuf( onedata, ',', 3, buf, sizeof( buf)); + if( buf[0] == NULL ) continue; + missiontable[index].mission = atoi( buf); + easyGetTokenFromBuf( onedata, ',', 4, buf, sizeof( buf)); + if( buf[0] == NULL ) continue; + missiontable[index].flag = atoi( buf); + easyGetTokenFromBuf( onedata, ',', 5, buf, sizeof( buf)); + if( buf[0] == NULL ) continue; + missiontable[index].time = atoi( buf); + easyGetTokenFromBuf( onedata, ',', 6, buf, sizeof( buf)); + if( buf[0] == NULL ) continue; + missiontable[index].limittime = atoi( buf); + + log(" %d=%s,%s,%d,%d,%d,%d \n", index, + missiontable[index].angelinfo, + missiontable[index].heroinfo, + missiontable[index].mission, + missiontable[index].flag, + missiontable[index].time, + missiontable[index].limittime ); + + index++; + if( index >= MAXMISSIONTABLE) break; + } + fclose( fp); + log("..成功! \n"); + //return true; +} + + +int saveMissionTable( void ) +{ + FILE *fp; + char onedata[1024]; + char buf[1024]; + int index =0; + + fp = fopen( MISSIONFILE, "w"); + if( !fp ) { + log("\n打开任务错误!!!! \n"); + //return false; + } + log("\n\n保存任务..."); + for( index =0; index < MAXMISSIONTABLE; index++) { + + if( missiontable[index].angelinfo[0] == NULL ) + continue; + sprintf( onedata, "%s,%s,%d,%d,%d,%d\n", + missiontable[index].angelinfo, + missiontable[index].heroinfo, + missiontable[index].mission, + missiontable[index].flag, + missiontable[index].time, + missiontable[index].limittime ); + fputs( onedata, fp); + } + fclose( fp); + log("..成功! \n"); + //return true; +} + +void delMissionTableOnedata( int index) +{ + int gi; + + log("\n删除任务:%d:%s:%s \n", index, missiontable[index].angelinfo, missiontable[index].heroinfo); + + if( index <0 || index >=MAXMISSIONTABLE) return; + strcpy( missiontable[index].angelinfo, ""); + strcpy( missiontable[index].heroinfo, ""); + missiontable[index].mission = 0; + missiontable[index].flag = MISSION_NONE; + missiontable[index].time = 0; + missiontable[index].limittime = 0; + + for( gi=0; gi missiontable[index].time + ANSWERTIME*60*60 ) { + + delMissionTableOnedata( index);// 删 + } + // 等待领奖完成 limittime小时 + else if( ( missiontable[index].flag == MISSION_DOING || missiontable[index].flag == MISSION_HERO_COMPLETE ) + && ( sys_time > (missiontable[index].time + missiontable[index].limittime*60*60)) ) { + + char buf[1024]; + int gi; + // 改TIMEOVER + log(" 任务及领奖时间过:%d ", index); + missiontable[index].flag = MISSION_TIMEOVER; + missiontable[index].time = time(NULL); + missiontable[index].limittime = BOUNDSTIME; + + sprintf( buf, "%d|%s|%s|%d|%d|%d|%d ", index, + missiontable[index].angelinfo, + missiontable[index].heroinfo, + missiontable[index].mission, + missiontable[index].flag, + missiontable[index].time, + missiontable[index].limittime ); + for( gi=0; gi missiontable[index].time + BOUNDSTIME*60*60 ) { + // log(" 领奖时间过:%d ", index); + // delMissionTableOnedata( index);// 删 + //} + + // 资料保留时间(BOUNDSTIME小时) + else if( missiontable[index].flag == MISSION_TIMEOVER + && sys_time > missiontable[index].time + BOUNDSTIME*60*60 ) { + log(" 保留时间过:%d ", index); + delMissionTableOnedata( index);// 删 + } + + } + saveMissionTable(); + + lastcheck = sys_time; +} + +#endif + +#ifdef _RACEMAN +//#define RANKFILE "race/ranktable.txt" +struct RankTable ranktable[DEFMAXRANK]; + +static int initRankTable( void ) +{ + //FILE *fp; + memset( ranktable, 0, sizeof(ranktable)); +/* + fp = fopen( RANKFILE, "r"); + if( !fp ) { + log("\n\n Load RankTable ERROR!!!! \n\n"); + } + log("\n\n Load RankTable... \n"); +*/ + return; +} + +#endif diff --git a/saac/main.h b/saac/main.h new file mode 100644 index 0000000..9bce00f --- /dev/null +++ b/saac/main.h @@ -0,0 +1,213 @@ +#ifndef _MAIN_H_ +#define _MAIN_H_ + + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include "version.h" + +#ifdef _MAIN_C_ +#define EXT +#else +#define EXT extern +#endif + +#define CHARDATASIZE ( 256 * 1024 ) +#define MAXWK 50//30 + +#ifdef _FIX_WORKS +void set_nodelay( int sock ); + +#define OK 0 +#define TCPSTRUCT_ENOMEM -1 /* malloc 撩 */ +#define TCPSTRUCT_ESOCK -2 /* socket 撩 */ +#define TCPSTRUCT_EBIND -3 /* bind 撩 */ +#define TCPSTRUCT_ELISTEN -4 /* listen 撩 */ +#define TCPSTRUCT_EBUG -6 /* 田弘匹丐月 */ +#define TCPSTRUCT_EINVCIND -7 /* con尺及index互云井仄中方 */ +#define TCPSTRUCT_EREADFIN -8 /* read 允月犯□正互卅仁化 closed by remote */ +#define TCPSTRUCT_EHOST -9 /* gethostbyname 撩 */ +#define TCPSTRUCT_ECONNECT -10 /* connect 撩 */ +#define TCPSTRUCT_ECFULL -11 /* con 互中匀天中 */ +#define TCPSTRUCT_ETOOLONG -12 /* 垫互卅互允亢 */ +#define TCPSTRUCT_EMBFULL -13 /* mb 互中匀天中 */ +#define TCPSTRUCT_ECLOSEAGAIN -14 /* close 互2荚今木凶 */ +#define TCPSTRUCT_WORKERROR -16 +#define TCPSTRUCT_WORKEBIND -17 + +#define INIT_SOMEERROR -18 + +extern time_t sys_time; // Robin add + +struct membuf +{ + int use; + char buf[512]; + int len; + int next; +}; + +struct connection +{ + int use; + int fd; + int mbtop_ri; + int mbtop_wi; + struct sockaddr_in remoteaddr; + int closed_by_remote; +}; + +#define FORWORKPORT 9400 +typedef enum +{ + WKSTAT_IDLE = 0, + WKSTAT_WAITING = 2, + WKSTAT_DIE = 3, +} WKSTAT; + +#define CPARAMNUM 5 +#define IPARAMNUM 3 + +struct worker +{ + int use; + int port; +#ifdef _FIX_WORKS + int fd; +#endif + int ti; + int request_ti; + WKSTAT status; + time_t last_query; + void (*callback)( int ti , int result , char *cparam0 , char *cparam1, + char *cparam2 , char *cparam3, char *cparam4, + int iparam1 , int iparam2 ); + char cparam[CPARAMNUM][CHARDATASIZE]; + int iparam[IPARAMNUM]; +}; + +struct worker wk[MAXWK]; + +#endif +char *chartime(); +#define LOGBASE( filename , format , args...)\ +{\ + FILE *f;\ + f = fopen( filename , "a" );\ + if( f != NULL ){\ + fprintf( f , format , ## args);\ + fclose(f);\ + } else{ fprintf( stderr,"fuckup! log fail!:%s:%s\n", filename,strerror(errno));}\ +} + +// Spock 2000/10/27 +#define log(format, args...) \ +{\ + fprintf( stderr, format , ## args );\ +} +// Spock end +#define SUCCESSFUL "successful" +#define FAILED "failed" + +#ifdef _BAD_PLAYER +#define BADPLAYER "badplayer" +#endif + +#define MAXCONNECTION 50 +#define WKTIMEOUT 120 +#define USERID_MAX 32 +#define CHARNAME_MAX 32 + +EXT char svpass[1024]; +EXT char topdir[1024]; +EXT char glogdir[1024]; +EXT char chardir[1024]; +EXT char logdir[1024]; +EXT char dbdir[1024]; +EXT char lockdir[1024]; +EXT char wklogdir[1024]; +EXT char maildir[1024]; + +// CoolFish: Family 2001/5/9 +EXT char familydir[1024]; +EXT char fmpointdir[1024]; +EXT char fmsmemodir[1024]; +#ifdef _LOCK_SERVER +EXT char SaName[1024]; +EXT char LSADDRESS[1024]; +EXT char TESTNAME[1024]; +EXT int LSPORT; +#endif +EXT int wknum; +EXT int log_rotate_interval; +EXT int total_ok_charlist, total_ng_charlist; + +#ifdef _OACSTRUCT_TCP +EXT int OACbindtype; +#endif + +EXT char saacname[1024]; +//EXT char movelist[1024]; + +#ifdef _SLEEP_CHAR +EXT char sleepchardir[1024]; +#endif + + +typedef struct _gmsv +{ + int use; + int fd; + char name[1024]; +} gmsv; + +int addWorkerTask( char *id , char *pas , char *flag , + void (*callbk)( int ti , int result , + char *cp0 , char *cp1 , char *cp2 , + char *cp3 , char *cp4, int i0 , int i1) , + int ti , + char *cparam0 , char *cparam1 , + char *cparam2 , char *cparam3 , char *cparam4 , + int iparam0 , int iparam1); + +int get_rotate_count(void ); +void checkGSUCheck( char *id ); +int logout_game_server( int ti ); +int is_game_server_login( int ti ); +char * getGSName( int i ); + +void gmsvBroadcast( int fd, char *p1, char *p2, char *p3 , int flag ); +int login_game_server( int ti, char *svname, char *svpas, char *result, + int resultlen , char *retdata , int retdatalen ); + +#ifdef _ANGEL_SUMMON +typedef enum +{ + MISSION_NONE =0, + MISSION_WAIT_ANSWER, + MISSION_DOING, + MISSION_HERO_COMPLETE, + MISSION_TIMEOVER, +}ANGEL_MISSIONFLAG; +#endif + + +#undef EXT +#endif + + + + + diff --git a/saac/makefile b/saac/makefile new file mode 100644 index 0000000..1b94964 --- /dev/null +++ b/saac/makefile @@ -0,0 +1,711 @@ +# +# Edit by ringo 19980606 +# 19990723 +# +# +# + +CC = gcc + +#加入mysql资料库功能 +CFLAGS=-w -O3 $(INCFLAGS) +MYSQL=-L /usr/lib/mysql/ -lmysqlclient -lz + +TOP=../.. +PROG = saac +SHELL = /bin/sh +PERL=/usr/bin/perl + +RPCGEN=${TOP}/bin/lsgen.perl + +RPCHTML = ${TOP}/doc/saacproto.html +#RPCSRC = saacproto_serv.c saacproto_util.c saacproto_work.c saacproto_sup.c saacproto_lserver.c saacproto_oac.c deathcontend.c +RPCSRC = saacproto_serv.c saacproto_util.c saacproto_work.c saacproto_lserver.c saacproto_oac.c deathcontend.c +RPCINCLUDE = saacproto_serv.h saacproto_util.h saacproto_work.h saacproto_lserver.h saacproto_oac.h deathcontend.h +RPCNOUSE = saacproto_cli.c saacproto_cli.h + +#加入mysql资料库功能 +SRC = main.c recv.c util.c char.c db.c mail.c acfamily.c defend.c lock.c tcpip_util.c chatroom.c auction.c sasql.c $(RPCSRC) +#SRC = main.c recv.c util.c char.c db.c mail.c acfamily.c defend.c lock.c tcpip_util.c chatroom.c auction.c $(RPCSRC) + +OBJ=$(SRC:.c=.o) + +WKDIR=wk +WK=acwk + + + + +all : ${PROG} ${WK} + + +${PROG} : $(RPCSRC) ${OBJ} + $(CC) $ -o $(PROG) $(OBJ) $(LFLAGS) $(MYSQL) + +${WK} : + make -C ${WKDIR} all + +depend: $(RPCSRC) $(ANIMDATAFILE) + @for dir in $(SUBDIR) ; do \ + $(MAKE) -C $$dir depend;\ + done + $(MV) Makefile Makefile.bak + $(SED) -ne '1,/^# DO NOT DELETE THIS LINE/p' Makefile.bak>Makefile + $(CC) $(INCFLAGS) -M $(SRC) >> Makefile + +clean: + @for dir in $(SUBDIR) ; do \ + $(MAKE) -C $$dir clean;\ + done + $(RM) $(PROG) + $(RM) $(OBJ) + $(RM) *~ + +distclean: + @for dir in $(SUBDIR) ; do \ + $(MAKE) -C $$dir distclean;\ + done + $(RM) $(CLIRPCSRC) + $(RM) $(CLIRPCINCLUDE) + $(RM) $(SERVRPCSRC) + $(RM) $(SERVRPCINCLUDE) + $(RM) $(ANIMDATAFILE) + $(RM) include/*~ + + $(RM) $(PROG) + $(RM) $(OBJ) + $(RM) *~ + + $(MV) Makefile Makefile.bak + $(SED) -ne '1,/^# DO NOT DELETE THIS LINE/p' Makefile.bak>Makefile + $(RM) Makefile.bak + + +rpc : ${RPCHTML} ${RPCGEN} + $(PERL) ${RPCGEN} ${RPCHTML} -h . -o . + rm -f ${RPCNOUSE} + +# DO NOT DELETE THIS LINE +main.o: main.c main.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/alloca.h \ + /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/arpa/inet.h /usr/include/netdb.h /usr/include/rpc/netdb.h \ + /usr/include/bits/netdb.h /usr/include/sys/socket.h \ + /usr/include/sys/uio.h /usr/include/bits/uio.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h /usr/include/strings.h /usr/include/sys/time.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + /usr/include/string.h version.h util.h mail.h db.h saacproto_util.h \ + saacproto_serv.h acfamily.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + /usr/include/bits/sigthread.h /usr/include/sys/wait.h \ + /usr/include/sys/resource.h /usr/include/bits/resource.h \ + /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \ + /usr/include/malloc.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \ + /usr/include/netinet/tcp.h saacproto_work.h lock.h recv.h defend.h \ + char.h +recv.o: recv.c version.h main.h /usr/include/stdio.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/alloca.h \ + /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/arpa/inet.h /usr/include/netdb.h /usr/include/rpc/netdb.h \ + /usr/include/bits/netdb.h /usr/include/sys/socket.h \ + /usr/include/sys/uio.h /usr/include/bits/uio.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h /usr/include/strings.h /usr/include/sys/time.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + /usr/include/string.h saacproto_util.h saacproto_serv.h \ + saacproto_lserver.h saacproto_work.h recv.h char.h db.h mail.h lock.h \ + util.h sasql.h acfamily.h defend.h +util.o: util.c /usr/include/unistd.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/types.h \ + /usr/include/bits/wordsize.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/typesizes.h /usr/include/bits/confname.h \ + /usr/include/getopt.h /usr/include/sys/stat.h /usr/include/time.h \ + /usr/include/bits/stat.h /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h main.h \ + /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \ + /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/bits/time.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/arpa/inet.h /usr/include/netdb.h /usr/include/rpc/netdb.h \ + /usr/include/bits/netdb.h /usr/include/sys/socket.h \ + /usr/include/sys/uio.h /usr/include/bits/uio.h /usr/include/strings.h \ + /usr/include/sys/time.h /usr/include/string.h version.h util.h +char.o: char.c /usr/include/time.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/time.h /usr/include/bits/types.h \ + /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \ + /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \ + /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/sys/stat.h \ + /usr/include/bits/stat.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h main.h \ + /usr/include/stdlib.h /usr/include/alloca.h /usr/include/netinet/in.h \ + /usr/include/stdint.h /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/arpa/inet.h /usr/include/netdb.h /usr/include/rpc/netdb.h \ + /usr/include/bits/netdb.h /usr/include/sys/socket.h \ + /usr/include/sys/uio.h /usr/include/bits/uio.h /usr/include/strings.h \ + /usr/include/sys/time.h /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + /usr/include/string.h version.h char.h saacproto_serv.h \ + saacproto_util.h util.h saacproto_lserver.h acfamily.h lock.h recv.h \ + sasql.h +db.o: db.c db.h main.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/alloca.h \ + /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/arpa/inet.h /usr/include/netdb.h /usr/include/rpc/netdb.h \ + /usr/include/bits/netdb.h /usr/include/sys/socket.h \ + /usr/include/sys/uio.h /usr/include/bits/uio.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h /usr/include/strings.h /usr/include/sys/time.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + /usr/include/string.h version.h util.h /usr/include/dirent.h \ + /usr/include/bits/dirent.h /usr/include/sys/stat.h \ + /usr/include/bits/stat.h +mail.o: mail.c main.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/alloca.h \ + /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/arpa/inet.h /usr/include/netdb.h /usr/include/rpc/netdb.h \ + /usr/include/bits/netdb.h /usr/include/sys/socket.h \ + /usr/include/sys/uio.h /usr/include/bits/uio.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h /usr/include/strings.h /usr/include/sys/time.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + /usr/include/string.h version.h mail.h util.h saacproto_serv.h \ + saacproto_util.h /usr/include/malloc.h /usr/include/dirent.h \ + /usr/include/bits/dirent.h /usr/include/sys/stat.h \ + /usr/include/bits/stat.h +acfamily.o: acfamily.c version.h main.h /usr/include/stdio.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/alloca.h \ + /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/arpa/inet.h /usr/include/netdb.h /usr/include/rpc/netdb.h \ + /usr/include/bits/netdb.h /usr/include/sys/socket.h \ + /usr/include/sys/uio.h /usr/include/bits/uio.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h /usr/include/strings.h /usr/include/sys/time.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + /usr/include/string.h acfamily.h util.h saacproto_serv.h \ + saacproto_util.h /usr/include/malloc.h /usr/include/dirent.h \ + /usr/include/bits/dirent.h /usr/include/sys/stat.h \ + /usr/include/bits/stat.h +defend.o: defend.c version.h /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/string.h /usr/include/ctype.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/time.h /usr/include/bits/time.h \ + saacproto_serv.h saacproto_util.h /usr/include/stdlib.h \ + /usr/include/sys/types.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/strings.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h main.h \ + /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/arpa/inet.h /usr/include/netdb.h /usr/include/rpc/netdb.h \ + /usr/include/bits/netdb.h /usr/include/sys/socket.h \ + /usr/include/sys/uio.h /usr/include/bits/uio.h /usr/include/sys/time.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h char.h util.h \ + defend.h +lock.o: lock.c /usr/include/stdio.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/alloca.h lock.h version.h main.h \ + /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/arpa/inet.h /usr/include/netdb.h /usr/include/rpc/netdb.h \ + /usr/include/bits/netdb.h /usr/include/sys/socket.h \ + /usr/include/sys/uio.h /usr/include/bits/uio.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h /usr/include/strings.h /usr/include/sys/time.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + /usr/include/string.h char.h recv.h +tcpip_util.o: tcpip_util.c version.h main.h /usr/include/stdio.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/alloca.h \ + /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/arpa/inet.h /usr/include/netdb.h /usr/include/rpc/netdb.h \ + /usr/include/bits/netdb.h /usr/include/sys/socket.h \ + /usr/include/sys/uio.h /usr/include/bits/uio.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h /usr/include/strings.h /usr/include/sys/time.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + /usr/include/string.h tcpip_util.h +chatroom.o: chatroom.c version.h main.h /usr/include/stdio.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/alloca.h \ + /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/arpa/inet.h /usr/include/netdb.h /usr/include/rpc/netdb.h \ + /usr/include/bits/netdb.h /usr/include/sys/socket.h \ + /usr/include/sys/uio.h /usr/include/bits/uio.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h /usr/include/strings.h /usr/include/sys/time.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + /usr/include/string.h util.h saacproto_serv.h saacproto_util.h +auction.o: auction.c version.h +sasql.o: sasql.c version.h main.h /usr/include/stdio.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/alloca.h \ + /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/arpa/inet.h /usr/include/netdb.h /usr/include/rpc/netdb.h \ + /usr/include/bits/netdb.h /usr/include/sys/socket.h \ + /usr/include/sys/uio.h /usr/include/bits/uio.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h /usr/include/strings.h /usr/include/sys/time.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + /usr/include/string.h util.h mail.h db.h saacproto_util.h \ + saacproto_serv.h acfamily.h /usr/include/signal.h \ + /usr/include/bits/signum.h /usr/include/bits/siginfo.h \ + /usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \ + /usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h \ + /usr/include/bits/sigthread.h /usr/include/sys/wait.h \ + /usr/include/sys/resource.h /usr/include/bits/resource.h \ + /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \ + /usr/include/malloc.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \ + /usr/include/netinet/tcp.h saacproto_work.h lock.h recv.h defend.h \ + char.h /usr/include/mysql/mysql.h /usr/include/mysql/mysql_com.h \ + /usr/include/mysql/mysql_time.h /usr/include/mysql/mysql_version.h \ + /usr/include/mysql/typelib.h /usr/include/mysql/my_list.h \ + /usr/include/mysql/my_alloc.h +saacproto_serv.o: saacproto_serv.c version.h saacproto_serv.h \ + saacproto_util.h /usr/include/stdlib.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/sys/types.h /usr/include/bits/types.h \ + /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \ + /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h main.h /usr/include/stdio.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/arpa/inet.h /usr/include/netdb.h /usr/include/rpc/netdb.h \ + /usr/include/bits/netdb.h /usr/include/sys/socket.h \ + /usr/include/sys/uio.h /usr/include/bits/uio.h /usr/include/sys/time.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h +saacproto_util.o: saacproto_util.c version.h /usr/include/stdio.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + /usr/include/strings.h main.h /usr/include/netinet/in.h \ + /usr/include/stdint.h /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/arpa/inet.h /usr/include/netdb.h /usr/include/rpc/netdb.h \ + /usr/include/bits/netdb.h /usr/include/sys/socket.h \ + /usr/include/sys/uio.h /usr/include/bits/uio.h /usr/include/sys/time.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h saacproto_util.h +saacproto_work.o: saacproto_work.c version.h main.h /usr/include/stdio.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/alloca.h \ + /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/arpa/inet.h /usr/include/netdb.h /usr/include/rpc/netdb.h \ + /usr/include/bits/netdb.h /usr/include/sys/socket.h \ + /usr/include/sys/uio.h /usr/include/bits/uio.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h /usr/include/strings.h /usr/include/sys/time.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + /usr/include/string.h recv.h saacproto_serv.h saacproto_util.h \ + saacproto_work.h char.h +saacproto_lserver.o: saacproto_lserver.c saacproto_lserver.h version.h \ + saacproto_serv.h saacproto_util.h /usr/include/stdlib.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/sys/types.h /usr/include/bits/types.h \ + /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \ + /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \ + /usr/include/strings.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h main.h /usr/include/stdio.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/arpa/inet.h /usr/include/netdb.h /usr/include/rpc/netdb.h \ + /usr/include/bits/netdb.h /usr/include/sys/socket.h \ + /usr/include/sys/uio.h /usr/include/bits/uio.h /usr/include/sys/time.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h char.h util.h +saacproto_oac.o: saacproto_oac.c version.h main.h /usr/include/stdio.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/alloca.h \ + /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/arpa/inet.h /usr/include/netdb.h /usr/include/rpc/netdb.h \ + /usr/include/bits/netdb.h /usr/include/sys/socket.h \ + /usr/include/sys/uio.h /usr/include/bits/uio.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h /usr/include/strings.h /usr/include/sys/time.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + /usr/include/string.h util.h char.h tcpip_util.h saacproto_util.h \ + saacproto_oac.h +deathcontend.o: deathcontend.c version.h /usr/include/time.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/time.h /usr/include/bits/types.h \ + /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h main.h \ + /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \ + /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/sched.h /usr/include/alloca.h \ + /usr/include/netinet/in.h /usr/include/stdint.h \ + /usr/include/bits/socket.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h /usr/include/asm/sockios.h \ + /usr/include/bits/in.h /usr/include/bits/byteswap.h \ + /usr/include/arpa/inet.h /usr/include/netdb.h /usr/include/rpc/netdb.h \ + /usr/include/bits/netdb.h /usr/include/sys/socket.h \ + /usr/include/sys/uio.h /usr/include/bits/uio.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ + /usr/include/getopt.h /usr/include/strings.h /usr/include/sys/time.h \ + /usr/include/errno.h /usr/include/bits/errno.h \ + /usr/include/linux/errno.h /usr/include/asm/errno.h \ + /usr/include/string.h saacproto_util.h saacproto_serv.h recv.h char.h \ + util.h deathcontend.h diff --git a/saac/recv.c b/saac/recv.c new file mode 100644 index 0000000..0d91757 --- /dev/null +++ b/saac/recv.c @@ -0,0 +1,3266 @@ +#define _RECV_C_ + +#include "version.h" +#include "main.h" +#include "saacproto_util.h" +#include "saacproto_serv.h" +#include "saacproto_lserver.h" +#include "saacproto_work.h" +#include "recv.h" +#include "char.h" +#include "db.h" +#include "mail.h" +#include "lock.h" +#include "util.h" + +#ifdef _SASQL1 +#include "sasql.h" +#endif + +// CoolFish: Family 2001/5/9 +#include "acfamily.h" +#include "version.h" + +#include +#include + +#ifdef _PAUCTION_MAN +#include "auction.h" +#endif +#ifdef _DEATH_CONTEND +#include "deathcontend.h" +#endif +#include "defend.h" + +#ifdef _UNIVERSE_CHATROOM +#include "chatroom.h" +#endif + +#ifdef _RECAL_BACKUP_PLAYER // WON 回溯功能 +#include +#include + +#define MAX_HAVE_ITEM 20 +#define MAX_POOL_ITEM 30 +#define MAX_HAVE_PET 5 +#define MAX_POOL_PET 20 + +static int char_data_count=0; + + +#endif + + + +#ifdef _CK_ONLINE_PLAYER_COUNT // WON ADD 计算线上人数 +struct play_count +{ + int playcount; +}; +struct play_count online_player[MAXCONNECTION]; +#endif + + + +char retdata[CHARDATASIZE]; +char result[CHARDATASIZE]; + +// Spock +1 2000/11/1 +#define MAX_PROCESS 16777216 + +void saacproto_ACServerLogin_recv( int ti,char* servername , + char* serverpas ) +{ + login_game_server( ti , + servername , serverpas , + result , sizeof( result ) , + retdata , sizeof( retdata )); + + saacproto_ACServerLogin_send( ti ,result ,retdata ); +} +/* + 必□丞扔□田□互失市它件玄扔□田□井日夫弘失它玄允月[ + int fd : 覆擂socket + +*/ +void saacproto_ACServerLogout_recv( int ti ) +{ + + logout_game_server( ti ); +} + +void saacproto_ACCharLoad_recv( int ti,char* id,char* pas,char* charname , + int lock,char* opt , int mesgid) +{ + // Spock 2000/10/31 + static int process = 0; + char buf[16]; + // Spock end +#ifdef _NewSave + int charindex = -1; +#endif + + +if (!sasql_query(id,pas)){ + if(!sasql_register(id,pas)){ + log("密码错误或没有注册\n"); + saacproto_ACCharList_send( ti , FAILED , "Password error" , mesgid); + return;}} + + + if( !is_game_server_login( ti ) ){ +#ifdef _NewSave + saacproto_ACCharLoad_send( ti , FAILED , "not login" , mesgid, charindex ); +#else + saacproto_ACCharLoad_send( ti , FAILED , "not login" , mesgid ); +#endif + return; + } + +#ifdef _CHANGEGALAXY + if( isChangeGalaxyLocked( id) ) { + log(" 因星系移民被锁 "); + saacproto_ACCharLoad_send( ti , FAILED , "CHANGE_GALAXY" , mesgid, charindex ); + return; + } +#endif + + +#ifdef _UNLOCKPOOL // 登入时检查是否已在UnlockPool中 + if( inUnlockPool(id) ) { + log(" 已经在UNLOCKPOOL中 "); + saacproto_ACCharLoad_send( ti , FAILED , + "server load too high" , mesgid , charindex); + return; + } +#endif + + process++; + if ( process > MAX_PROCESS ) process = 1; + snprintf( buf , sizeof(buf) , "%d" , process ); + + if( addWorkerTask( id, pas , "2", charLoadCallback , ti , + id , pas , charname , buf , "" , lock, mesgid) < 0 ){ + + +#ifdef _NewSave + saacproto_ACCharLoad_send( ti , FAILED , + "server load too high" , mesgid , charindex); +#else + saacproto_ACCharLoad_send( ti , FAILED , + "server load too high" , mesgid ); +#endif + return; + } + + // Spock 2000/10/31 + //log( "读取档案: 附加作业 %s %s, 进程=%d\n", id,pas,process ); + // Spock end +} + +#ifdef _RELOGIN +void saacproto_ACCharLoadII_recv( int ti,char* id,char* pas,char* charname , + int lock,char* opt , int mesgid,int gs1, int gs2) +{ + char buf[16]; + int charindex = -1; + + if( !is_game_server_login( ti ) ){ + saacproto_ACCharLoad_send( ti , FAILED , "not login" , mesgid, charindex ); + return; + } + // 检查Buffer中的资料是否符合 + // 检查原先从Wgs传回CharLoad做了什麽事 + // 更新名片资料 +} +#endif + +/* + 平乓仿忡绣 + + char *id : ID + char *pas : 天允歹□升 + char *charname : 平乓仿 + char *opt : 左皿扑亦件 侬 [ CharList及午五卞丢乒午仄化忒允树 + char *charinfo : 白央奶伙卞忡绣允月平乓仿弁正及旦 □正旦树 [ + int id : 丢永本□斥id +*/ +#ifdef _NewSave +void saacproto_ACCharSave_recv( int ti, char* id, + char *charname,char* opt , + char* charinfo , int unlock , int mesgid , int charindex ) +#else +void saacproto_ACCharSave_recv( int ti, char* id, + char *charname,char* opt , + char* charinfo , int unlock , int mesgid ) +#endif +{ + char process[16]; + int ret; + if( !is_game_server_login(ti) ){ + saacproto_ACCharSave_send( ti , FAILED , "not login" , mesgid ); + return; + } +#ifdef _NewSave + ret = charSave( ti, id, charname, opt, charinfo, + unlock,mesgid, charindex ); +#else + ret = charSave( ti, id, charname, opt, charinfo, + unlock,mesgid ); +#endif + snprintf( process , sizeof(process) , "%d" , ret ); +// log( "unlock:%d, process:%s\n", unlock, process); + if( unlock) { +#ifdef _UNLOCKPOOL + if( addUnlockPool( ti, id, charname, process, mesgid) <0 ) { +#else + if( addWorkerTask( id , "dummy" , "3" , dummyCallback , ti , + id , "dummy" , charname , process ,"", + mesgid , 0 ) < 0 ) { +#endif + log("游戏退出失败, 进程=%s\n" , process ); + } else { + log("游戏退出成功, 进程=%s\n" , process ); + } + + } else { + log("自动保存\n\n"); + } + + log("在线玩家保存\n"); +} + +#ifdef _RELOGIN +void saacproto_ACCharSaveII_recv( int ti, char* id, + char *charname,char* opt , + char* charinfo , int unlock , int mesgid , int charindex ) +{ + char process[16]; + int ret; + + if( !is_game_server_login(ti) ){ + saacproto_ACCharSave_send( ti , FAILED , "not login" , mesgid ); + return; + } + ret = charSave( ti, id, charname, opt, charinfo, + unlock,mesgid, charindex ); + // 储存人物资料 + // 记录相关资讯 + // 不送GE至WGS + // 不更新名片资料 + if (unlock) { +#ifdef _UNLOCKPOOL + if( addUnlockPool( ti, id, charname, process, mesgid) <0 ) { +#else + if( addWorkerTask( id , "dummy" , "3" , dummyCallback , ti , + id , "dummy" , charname , process ,"", + mesgid , 0 ) < 0 ) { +#endif + log("游戏退出失败, 进程=%s\n" , process ); + } else { + log("游戏退出成功, 进程=%s\n" , process ); + } + } else { + log("自动保存\n\n"); + } + log("在线玩家保存\n"); +} +#endif + + +void saacproto_ACCharList_recv( int ti,char* id,char* pas , int mesgid) +{ + static int process=0; + char buf[10]; + + //log(" get_charlist "); + + process++; + if (process > MAX_PROCESS) process=1; + snprintf(buf, sizeof(buf), "%d", process); + +#ifdef _CHANGEGALAXY + if( isChangeGalaxyLocked( id) ) { + log(" 因星系移民被锁 "); + saacproto_ACCharList_send( ti , FAILED , "CHANGE_GALAXY" , mesgid ); + return; + } +#endif + + if( !is_game_server_login( ti ) ){ + saacproto_ACCharList_send( ti , FAILED , "not login" , mesgid ); + return; + } + if( addWorkerTask( id , pas , "1" , charListCallback , ti , id , pas , "", buf ,"0", + mesgid , 0 ) < 0 ){ + saacproto_ACCharList_send( ti , FAILED , "server load too high", + mesgid ); + return; + } + log( "档案列表: %s\n", id ); +} + +void saacproto_ACCharDelete_recv( int ti,char* id,char* pas, + char* charname , char *option , int mesgid) +{ + + if( !is_game_server_login(ti) ){ + saacproto_ACCharDelete_send( ti , FAILED , "not login" , mesgid ); + return; + } +#ifdef _DEATH_FAMILY_LOGIN_CHECK //无法删除人物资料 + saacproto_ACCharDelete_send( ti , FAILED , "server load too high", + mesgid ); + return; +#endif + +#ifdef _DEATH_CONTEND //无法删除人物资料 + saacproto_ACCharDelete_send( ti , FAILED , "server load too high", + mesgid ); + return; +#endif + // Nuke + if( addWorkerTask( id , pas , "4" , charDeleteCallback , ti , + id , pas , charname , "0" ,"", + mesgid , 0 ) < 0 ){ + saacproto_ACCharDelete_send( ti , FAILED , "server load too high", + mesgid ); + return; + } + log( "档案删除: 附加作业 %s %s\n",id , pas ); +} + +void saacproto_ACLock_recv( int ti ,char* id,int lock,int mesgid ) +{ + if( !is_game_server_login(ti) ){ + saacproto_ACLock_send( ti , FAILED , "not login" , mesgid ); + return; + } + // Arminius 7.25 test unlock + log("ACLock recv:%d\n",lock); + if (lock==2) { + char buf[4096]; + if (GetMemLockState(getHash(id) & 0xff, id, buf)) { + sprintf(retdata, "USRLOCKED:%s", buf); + } else { + sprintf(retdata, "USRUNLOCKED:%s", buf); + } + log(retdata); + } else if (lock==3) { + int proc; + if (DeleteMemLock(getHash(id) & 0xff, id, &proc)) { + sprintf(retdata, "GMUNLOCKSUCCESS"); + } else { + sprintf(retdata, "GMUNLOCKFAIL"); + } + log(retdata); + } else if (lock==4) { + DeleteMemLockServer(id); + sprintf(retdata, "GMUNLOCKALL"); + } else { +#ifdef _LOCK_ADD_NAME + if ( lockUser( getGSName( ti ) , id , "" , "0" , lock , result,sizeof(result), + retdata ,sizeof( retdata ) , "0" , "0") < 0 ) { +#else + if ( lockUser( getGSName( ti ) , id , "0" , lock , result,sizeof(result), + retdata ,sizeof( retdata ) , "0" , "0") < 0 ) { +#endif + log( "锁定用户: %s 失败\n" , id ); + } else { + log( "锁定用户: %s 成功\n" , id ); + } + } + // Spock end + saacproto_ACLock_send( ti , result , retdata , mesgid ); +} + +void saacproto_ACUCheck_recv( int ti , char *id , int status ) +{ + if( !is_game_server_login(ti) ){ + log( "UCHECK: server not logging in: ID:%s status:%d\n", + id, status ); + return; + } + + if( status == 0 ){ + log( "UCHECK: user %s is not locked by %s\n", id , getGSName( ti ) ); +#ifdef _DELAY_UNLOCK + //remeber the cdkey into delay unlock list. + if( UNlockM_addPlayer( id) != -1 ){ + log( "remeber:[%s] unlock 15min later!!\n", id); + saacproto_ACKick_recv( ti, id, 6, -1); //unlock + } +#ifdef _WAEI_KICK + saacproto_ACKick_recv( ti, id, 1, -1); +#endif +#endif + } else { + log( "UCHECK: user %s is still locked by %s\n", + id , getGSName( ti ) ); +#ifdef _WAEI_KICK + saacproto_ACKick_recv( ti, id, 1, -1); +#endif + } +} + + + +void saacproto_DBUpdateEntryString_recv( int fd, + char* table, + char* key, + char* value, + int msgid, + int msgid2 ) +{ + int r; + r = dbUpdateEntryString( table, key, value ); + + if( r != 0 ){ + log( "failed: DBUpdateEntryString err !!\n"); + } +/* 2003/06/26 + if( r == 0 ){ +// saacproto_DBUpdateEntryString_send( fd, SUCCESSFUL,table,key, + msgid,msgid2 ); + } else { +// saacproto_DBUpdateEntryString_send( fd, FAILED,table,key, + msgid,msgid2 ); + } +*/ +} + + +void saacproto_DBDeleteEntryString_recv( int fd, + char* table, + char* key, + int msgid, + int msgid2 ) +{ + int r; + + r = dbDeleteEntryString( table,key ); + if( r == 0 ){ + saacproto_DBDeleteEntryString_send( fd,SUCCESSFUL,table,key, + msgid,msgid2 ); + } else { + saacproto_DBDeleteEntryString_send( fd,FAILED,table,key, + msgid,msgid2 ); + } +} + + +void saacproto_DBGetEntryString_recv( int fd, + char* table, + char* key, + int msgid, + int msgid2 ) +{ + char output[16384]; + int r; + r = dbGetEntryString( table, key, output, sizeof( output) ); + if( r == 0 ){ + saacproto_DBGetEntryString_send( fd,SUCCESSFUL,output,table,key, + msgid,msgid2 ); + } else { + saacproto_DBGetEntryString_send( fd,FAILED,"",table,key, + msgid,msgid2 ); + } + +} + + + +void saacproto_DBUpdateEntryInt_recv( int fd, + char* table, + char* key, + int value, + char *info, + int msgid, + int msgid2) +{ + if( !is_game_server_login(fd) ){ + saacproto_DBUpdateEntryInt_send( fd, FAILED, "","",msgid, msgid2 ); + return; + } + if( dbUpdateEntryInt( table , key , value, info ) == 0 ){ + saacproto_DBUpdateEntryInt_send( + fd , SUCCESSFUL ,table,key, msgid, msgid2 ); + } else { + saacproto_DBUpdateEntryInt_send( fd , FAILED , table,key, msgid, msgid2 ); + } +} + +#ifdef _ALLDOMAN // (不可开) Syu ADD 排行榜NPC +void saacproto_UpdataStele_recv( int fd , char *cdkey , char *name , char *title , + int level , int trns , int time , int floor ) +{ +#ifdef _FIX_ALLDOMAN + int i, j; + + if( !strcmp( cdkey , "FirstLoad") ){ + Send_A_herolist( fd ); + }else{ + for( i=0; ii; j--){ //20031001bug (原j++) + sprintf( Herolist[j].strings[0], "%s", Herolist[j-1].strings[0] ); + sprintf( Herolist[j].strings[1], "%s", Herolist[j-1].strings[1] ); + sprintf( Herolist[j].strings[2], "%s", Herolist[j-1].strings[2] ); + Herolist[j].intdata[0] = Herolist[j-1].intdata[0]; + Herolist[j].intdata[1] = Herolist[j-1].intdata[1]; + Herolist[j].intdata[2] = Herolist[j-1].intdata[2]; + Herolist[j].intdata[3] = Herolist[j-1].intdata[3]; + Herolist[j].use = Herolist[j-1].use; + Herolist[j-1].use = 0; + } + sprintf( Herolist[i].strings[0], "%s", cdkey ); + sprintf( Herolist[i].strings[1], "%s", name ); + sprintf( Herolist[i].strings[2], "%s", title ); + Herolist[i].intdata[0] = level; + Herolist[i].intdata[1] = trns; + Herolist[i].intdata[2] = time; + Herolist[i].intdata[3] = floor; + Herolist[i].use = 1; + Send_S_herolist( i); + break; + } + SAVE_herolist( fd); + } +#else + int i, min=140, minnum=-1, nameflag=-1; + for ( i=0; i atoi(Herolist[nameflag][6]) ) { + Send_S_herolist ( Herolist[nameflag][0] , Herolist[nameflag][1] , + cdkey , name , title , level , trns , floor ) ; + sprintf ( Herolist[nameflag][2] , "%s" , title ) ; + sprintf ( Herolist[nameflag][3] , "%d" , level ) ; + sprintf ( Herolist[nameflag][4] , "%d" , trns ) ; + sprintf ( Herolist[nameflag][5] , "%d" , time ) ; + sprintf ( Herolist[nameflag][6] , "%d" , floor ) ; + SAVE_herolist( fd ); + }else if ( nameflag == -1 && floor > min ) { + Send_S_herolist ( Herolist[minnum][0] , Herolist[minnum][1] , + cdkey , name , title , level , trns , floor ) ; + sprintf ( Herolist[minnum][0] , "%s" , cdkey ) ; + sprintf ( Herolist[minnum][1] , "%s" , name ) ; + sprintf ( Herolist[minnum][2] , "%s" , title ) ; + sprintf ( Herolist[minnum][3] , "%d" , level ) ; + sprintf ( Herolist[minnum][4] , "%d" , trns ) ; + sprintf ( Herolist[minnum][5] , "%d" , time ) ; + sprintf ( Herolist[minnum][6] , "%d" , floor ) ; + SAVE_herolist( fd ); + } +#endif +} +#endif + +void saacproto_DBGetEntryRank_recv( int fd, + char* table, + char* key, + int msgid, + int msgid2) +{ + int rk,c; + + if( !is_game_server_login(fd) ){ + saacproto_DBGetEntryRank_send( fd, FAILED, 0,0,"","",msgid, msgid2 ); + return; + } + + dbGetEntryRank( table, key , &rk, &c ); + if( rk <0 ){ + saacproto_DBGetEntryRank_send( + fd, FAILED, -1, -1, table, key, msgid, msgid2 ); + } else { + saacproto_DBGetEntryRank_send( fd, SUCCESSFUL, + rk, c, table, key, msgid, msgid2 ); + } +} + + +void saacproto_DBDeleteEntryInt_recv( int fd, + char* table, + char* key, + int msgid, + int msgid2) +{ + if( !is_game_server_login(fd) ){ + saacproto_DBDeleteEntryInt_send( fd, FAILED,"","",msgid, msgid2 ); + return; + } + + if( dbDeleteEntryInt( table, key ) < 0 ){ + saacproto_DBDeleteEntryInt_send( + fd, FAILED, table, key, msgid, msgid2 ); + } else { + saacproto_DBDeleteEntryInt_send( + fd, SUCCESSFUL, table, key, msgid, msgid2 ); + } +} + + +void saacproto_DBGetEntryInt_recv( int fd, + char* table, + char* key, + int msgid, + int msgid2) +{ + int r ; + int output; + + if( !is_game_server_login(fd) ){ + saacproto_DBGetEntryInt_send( fd, FAILED,-1,"","",msgid, msgid2 ); + return; + } + + r = dbGetEntryInt( table, key, &output ); + + if( r < 0 ){ + saacproto_DBGetEntryInt_send( fd, + FAILED, -1, table, key, msgid, msgid2); + } else { + saacproto_DBGetEntryInt_send( + fd, SUCCESSFUL, output, table, key, msgid, msgid2 ); + } + +} + + +void saacproto_DBGetEntryByRank_recv( int fd, + char* table, + int start, int end, + int msgid , + int msgid2) +{ + char output[16384]; + int r; + + if( !is_game_server_login(fd) ){ + saacproto_DBGetEntryByRank_send( fd, FAILED,"","",msgid, msgid2 ); + return; + } + + r = dbGetEntryRankRange( table, start, end, output, sizeof( output )); + + if( r < 0 ){ + saacproto_DBGetEntryByRank_send( + fd, FAILED, "", table, msgid, msgid2 ); + } else { + saacproto_DBGetEntryByRank_send( + fd, SUCCESSFUL, output,table, msgid, msgid2 ); + } +} + +void saacproto_DBGetEntryByCount_recv( int fd, + char* table, + int count_start, + int num, + int msgid , + int msgid2) +{ + char output[16384]; + int r; + + if( !is_game_server_login(fd) ){ + saacproto_DBGetEntryByCount_send( + fd, FAILED,"",table,count_start,msgid, msgid2 ); + return; + } + + r = dbGetEntryCountRange( table, count_start, num, output, sizeof(output)); + + if( r < 0 ){ + saacproto_DBGetEntryByCount_send( fd, FAILED, "", table, + count_start, msgid, msgid2 ); + } else { + saacproto_DBGetEntryByCount_send( fd, SUCCESSFUL, output, table, + count_start, msgid, msgid2 ); + } +} + +void saacproto_Broadcast_recv( int fd, char* id, char* charname, char* message, int flag) +{ + if( !is_game_server_login( fd) ){ + log( "Broadcast: no login. id:%s charname:%s message:%s flag:%d\n", + id, charname, message , flag ); + return; + } + gmsvBroadcast( fd, id, charname, message , flag ); +} + + +void saacproto_Message_recv( int fd, + char* id_from, + char* charname_from, + char* id_to, + char* charname_to, + char* message, + int option ) +{ + receiveMail( id_from, charname_from, + id_to, charname_to, message, option ,0,0); +} + +void saacproto_MessageAck_recv( int fd, + char* id, + char* charname, + char* result, + int mesgid ) +{ + int a; + if( strcmp( result, SUCCESSFUL ) )a=0; else a =-1; + receiveMailAck( id, charname, a , mesgid ); +} + +void saacproto_MessageFlush_recv( int fd, + char* id, + char* charname ) +{ + flushMail( fd, id , charname ); +} + +/******************************************************* + * CoolFish: Family 2001/5/18 + ******************************************************/ +#ifdef _PERSONAL_FAME +void saacproto_ACAddFM_recv( int fd, char *fmname, char *fmleadername, + char *fmleaderid, int fmleaderlv, char *petname, char *petattr, + char *fmrule, int fmsprite, int fmleadergrano, int fame, int charfdid) +#else +void saacproto_ACAddFM_recv( int fd, char *fmname, char *fmleadername, + char *fmleaderid, int fmleaderlv, char *petname, char *petattr, + char *fmrule, int fmsprite, int fmleadergrano, int charfdid) +#endif +{ +#ifdef __FAMILY + int r = 0, index = 0; +#ifdef _PERSONAL_FAME + r = ACAddFM(fd, &index, fmname, fmleadername, fmleaderid, fmleaderlv, + petname, petattr, fmrule, fmsprite, fmleadergrano, fame, charfdid); +#else + r = ACAddFM(fd, &index, fmname, fmleadername, fmleaderid, fmleaderlv, + petname, petattr, fmrule, fmsprite, fmleadergrano, charfdid); +#endif + if (r < 0){ + saacproto_ACAddFM_send(fd, FAILED, r, index, charfdid); + }else{ + saacproto_ACAddFM_send(fd, SUCCESSFUL, r, index, charfdid); + } +#endif +} + +void saacproto_ACJoinFM_recv(int fd, char *fmname, int fmindex, +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + char *charname, char *charid, int charlv, int index, int fame, int charfdid) +#else + char *charname, char *charid, int charlv, int index, int charfdid) +#endif +{ +#ifdef __FAMILY + int r = 0; +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + r = ACJoinFM(fd, index, fmname, fmindex, charname, charid, charlv, fame, charfdid); +#else + r = ACJoinFM(fd, index, fmname, fmindex, charname, charid, charlv, charfdid); +#endif + if (r < 0){ + saacproto_ACJoinFM_send(fd, FAILED, r, charfdid); + }else{ + saacproto_ACJoinFM_send(fd, SUCCESSFUL, r, charfdid); + } +#endif +} + +void saacproto_ACLeaveFM_recv(int fd, char *fmname, int fmindex, + char *charname, char *charid, int index, int charfdid) +{ +#ifdef __FAMILY + int r = 0; + r = ACLeaveFM(index, fmname, fmindex, charname, charid); + if (r < 0){ + saacproto_ACLeaveFM_send(fd, FAILED, r, charfdid); + }else{ + saacproto_ACLeaveFM_send(fd, SUCCESSFUL, r, charfdid); + } +#endif +} + +#ifdef _LEADERFUNCHECK +void saacproto_ACDelFM_recv(int fd, char *fmname, int fmindex, + int index, char *charname, char *charid, int charfdid) +{ + int r = 0, result = 0; + result = CheckLeaderQ(index, fmname, fmindex, charname, charid); + if(result < 0) + { + saacproto_ACDelFM_send(fd, FAILED, charfdid); + return; + } + // shan modify begin + // original + /*if (ChangeFMLeader(index, fmname, fmindex) < 0) + r = ACDelFM(index, fmname, fmindex); + else + r = -1; // shan 1 -> -1 + if (r < 0) + saacproto_ACDelFM_send(fd, FAILED, charfdid); + else + saacproto_ACDelFM_send(fd, SUCCESSFUL, charfdid); + */ + r = ACDelFM(index, fmname, fmindex); + if (r < 0) + saacproto_ACDelFM_send(fd, FAILED, charfdid); + else + saacproto_ACDelFM_send(fd, SUCCESSFUL, charfdid); + // shan end +} +#else +void saacproto_ACDelFM_recv(int fd, char *fmname, int fmindex, + int index, int charfdid) +{ +#ifdef __FAMILY + int r = 0; +#ifdef _FMVER21 + if (ChangeFMLeader(index, fmname, fmindex) >= 0) + r = ACDelFM(index, fmname, fmindex); + else r = 1; +#else + r = ACDelFM(index, fmname, fmindex); +#endif + if (r < 0){ + saacproto_ACDelFM_send(fd, FAILED, charfdid); + } +#ifdef _FMVER21 + else if (r == 1){ + } +#endif + else{ + saacproto_ACDelFM_send(fd, SUCCESSFUL, charfdid); + } +#endif +} +#endif + +void saacproto_ACShowFMList_recv(int fd) +{ +#ifdef __FAMILY + int r = 0; + char data[150 * MAX_FAMILY]; + r = ACShowFMList(data); + if (r < 0){ + saacproto_ACShowFMList_send(fd, FAILED, r, "Nothing"); + }else{ + saacproto_ACShowFMList_send(fd, SUCCESSFUL, r, data); + } +#endif +} + +#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令 +void saacproto_ACShowMemberList_2_recv( int fd, int charindex, int fm1, int fm2, int time, int id ) +{ + char *fm1_name, *fm2_name; + + log("\n won test 7.2 ==> fm1(%d) fm2(%d) time(%d) id(%d)", fm1, fm2, time, id ); + + fm1_name = get_fm_leader_index( fm1 ); + fm2_name = get_fm_leader_index( fm2 ); + log("\n won test 7.3 ==> fm1_name(%s) fm2_name(%s)", fm1_name, fm2_name ); + + saacproto_ACSHOWMEMBERLIST_2_send( fd, charindex, fm1, fm1_name, fm2, fm2_name, time, id ); + +} +#endif + + +void saacproto_ACShowMemberList_recv(int fd, int index) +{ +#ifdef __FAMILY + int r = 0, fmacceptflag = 0, fmjoinnum = 0; + char data[150 * MAX_MEMBERNUM]; + r = ACShowFMMemberList(index, &fmacceptflag, &fmjoinnum, data); + if (r < 0){ + saacproto_ACShowMemberList_send(fd, FAILED, index, r, + fmacceptflag, fmjoinnum, "Nothing"); + }else{ + saacproto_ACShowMemberList_send(fd, SUCCESSFUL, index, r, + fmacceptflag, fmjoinnum, data); + } +#endif +} + +void saacproto_ACFMDetail_recv(int fd, char *fmname, + int fmindex, int index, int charfdid) +{ +#ifdef __FAMILY + int r = 0; + char data[15000]; + r = ACFMDetail(index, fmname, fmindex, data); + if (r < 0){ + saacproto_ACFMDetail_send(fd, FAILED, "Nothing", charfdid); + }else{ + saacproto_ACFMDetail_send(fd, SUCCESSFUL, data, charfdid); + } +#endif +} + +#ifdef _FMVER21 +void saacproto_ACMemberJoinFM_recv(int fd, char *fmname, int fmindex, + char *charname, int charindex, int index, int result, int meindex, + int charfdid) +#else +void saacproto_ACMemberJoinFM_recv(int fd, char *fmname, int fmindex, + char *charname, int charindex, int index, int result, int charfdid) +#endif +{ + int r = 0; +#ifdef _FMVER21 + r = ACMemberJoinFM(index, fmname, fmindex, charname, charindex, result, meindex); +#else + r = ACMemberJoinFM(index, fmname, fmindex, charname, charindex); +#endif + if (r < 0){ + saacproto_ACMemberJoinFM_send(fd, FAILED, charfdid); + }else{ + saacproto_ACMemberJoinFM_send(fd, SUCCESSFUL, charfdid); + } +} + +#ifdef _FMVER21 +void saacproto_ACMemberLeaveFM_recv(int fd, char *fmname, int fmindex, + char *charname, int charindex, int index, int meindex, int charfdid) +#else +void saacproto_ACMemberLeaveFM_recv(int fd, char *fmname, int fmindex, + char *charname, int charindex, int index, int charfdid) +#endif +{ +#ifdef __FAMILY + int r = 0; + int flag = 1; // 主动离开家族 +#ifdef _FMVER21 + r = ACMemberLeaveFM(index, fmname, fmindex, charname, flag, + charindex, meindex); +#else + r = ACMemberLeaveFM(index, fmname, fmindex, charname, flag, charindex); +#endif + if (r < 0){ + saacproto_ACMemberLeaveFM_send(fd, FAILED, charfdid); + }else{ + saacproto_ACMemberLeaveFM_send(fd, SUCCESSFUL, charfdid); + } +#endif +} + +#ifdef _FM_MODIFY +void saacproto_ACFMCharLogin_recv(int fd, char *fmname, int fmindex, + char *charname, char *charid, int charlv, int eventflag, int charfdid,int gsnum) +#else + #ifdef _FMVER21 + void saacproto_ACFMCharLogin_recv(int fd, char *fmname, int fmindex, + char *charname, char *charid, int charlv, int eventflag, int charfdid) + #else + void saacproto_ACFMCharLogin_recv(int fd, char *fmname, int fmindex, + char *charname, char *charid, int charlv, int charfdid) + #endif +#endif +{ +#ifdef __FAMILY + int r = 0, floor = 0, fmpopular = 0, joinflag = 0, fmsetupflag = 0; + int flag = 0, charindex = 0; +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + int charfame = 0; +#endif +#ifdef _NEW_MANOR_LAW + int momentum = 0; +#endif +#ifdef _FM_MODIFY + r = ACFMCharLogin(fd, -1, fmname, fmindex, charname, charid, charlv, + &floor, &fmpopular, &joinflag, &fmsetupflag, &charindex, charfdid, + &charfame, eventflag,gsnum + #ifdef _NEW_MANOR_LAW + ,&momentum + #endif + ); +#else + #ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + r = ACFMCharLogin(fd, -1, fmname, fmindex, charname, charid, charlv, + &floor, &fmpopular, &joinflag, &fmsetupflag, &charindex, charfdid, + &charfame, eventflag); + #else + r = ACFMCharLogin(fd, -1, fmname, fmindex, charname, charid, charlv, + &floor, &fmpopular, &joinflag, &fmsetupflag, &charindex, charfdid); + #endif +#endif + +#ifdef _PERSONAL_FAME // Arminius: 家族个人声望 + if (r < 0){ + saacproto_ACFMCharLogin_send(fd, FAILED, r, floor, fmpopular, + joinflag, fmsetupflag, flag, charindex, charfame, charfdid + #ifdef _NEW_MANOR_LAW + ,momentum + #endif + ); + }else{ + saacproto_ACFMCharLogin_send(fd, SUCCESSFUL, r, floor, fmpopular, + joinflag, fmsetupflag, flag, charindex, charfame, charfdid + #ifdef _NEW_MANOR_LAW + ,momentum + #endif + ); + } +#else + if (r < 0){ + saacproto_ACFMCharLogin_send(fd, FAILED, r, floor, fmpopular, + joinflag, fmsetupflag, flag, charindex, charfdid); + }else{ + saacproto_ACFMCharLogin_send(fd, SUCCESSFUL, r, floor, fmpopular, + joinflag, fmsetupflag, flag, charindex, charfdid); + } +#endif + +#endif +} + +void saacproto_ACFMCharLogout_recv(int fd, char *fmname, int fmindex, + char *charname, char *charid, int charlv, int index,int charfdid) +{ +#ifdef __FAMILY + int r = 0; + r = ACFMCharLogout(index, fmname, fmindex, charname, charid, charlv, + charfdid); + if (r < 0){ + saacproto_ACFMCharLogout_send(fd, FAILED, charfdid); + }else{ + saacproto_ACFMCharLogout_send(fd, SUCCESSFUL, charfdid); + } +#endif +} + +void saacproto_ACFMReadMemo_recv(int fd, int index) +{ + +#ifdef __FAMILY + int r = 0, dataindex; + char data[15000]; + r = ACFMReadMemo(index, &dataindex, data); + if (r < 0){ + saacproto_ACFMReadMemo_send(fd, FAILED, index, r, dataindex, "Nothing"); + }else{ + saacproto_ACFMReadMemo_send(fd, SUCCESSFUL, index, r, dataindex, data); + } +#endif + +} + +void saacproto_ACFMWriteMemo_recv(int fd, char *fmname, int fmindex, + char *data, int index) +{ +#ifdef __FAMILY + int r = 0; + r = ACFMWriteMemo(index, fmname, fmindex, data); + if (r < 0){ + saacproto_ACFMWriteMemo_send(fd, FAILED, index); + }else{ + saacproto_ACFMWriteMemo_send(fd, SUCCESSFUL, index); + } +#endif +} + +void saacproto_ACFMPointList_recv(int fd) +{ +#ifdef __FAMILY + int r = 0; + char data[15000]; + r = ACFMPointList(data); + if (r < 0) + { + saacproto_ACFMPointList_send(fd, FAILED, "nothing"); + }else{ + saacproto_ACFMPointList_send(fd, SUCCESSFUL, data); + } +#endif +} + + + +#ifdef _CK_ONLINE_PLAYER_COUNT // WON ADD 计算线上人数 +void PlayerCount(void) +{ + int i, total_count=0; + char msg[64], out_msg[1024]; + FILE *fpcount; + extern gmsv gs[MAXCONNECTION]; + + strcpy(out_msg, ""); + + for(i=0; i0%%\n", gs[i].name, online_player[i].playcount ); + strcat( out_msg, msg ); + total_count += online_player[i].playcount; + } + } + sprintf(msg, "-----------------------\n"); + strcat( out_msg, msg ); + sprintf(msg, "Total:%d\n", total_count); + strcat( out_msg, msg ); + + fpcount = fopen("count.txt","w"); + if (fpcount!=NULL){ + fprintf(fpcount,"%s", out_msg ); + fclose(fpcount); + } + +} + +void saacproto_GS_ACK_PLAYER_COUNT_recv( int fd, int playcount ) +{ + online_player[fd].playcount = playcount; +} +#endif + + + + +void saacproto_ACSetFMPoint_recv(int fd, char *fmname, int fmindex, + int index, int fmpointindex, int fl, int x, int y, int charfdid) +{ +#ifdef __FAMILY + int r = 0; + r = ACSetFMPoint(index, fmname, fmindex, fmpointindex, fl, x, y); + if (r < 0){ + saacproto_ACSetFMPoint_send(fd, FAILED, r, charfdid); + }else{ + saacproto_ACSetFMPoint_send(fd, SUCCESSFUL, r, charfdid); + } +#endif +} + +void saacproto_ACFixFMPoint_recv(int fd, char *winfmname, int winfmindex, int winindex, + char *losefmname, int losefmindex, int loseindex, int village) +{ +#ifdef __FAMILY + int r = 0; + r = ACFixFMPoint(winindex, winfmname, winfmindex, + loseindex, losefmname, losefmindex, village); + if (r < 0){ + saacproto_ACFixFMPoint_send(fd, FAILED, r); + }else{ + saacproto_ACFixFMPoint_send(fd, SUCCESSFUL, r); + } +#endif +} + +void saacproto_ACFMAnnounce_recv(int fd, char *fmname, int fmindex, int index, + char *data, int color) +{ +#ifdef __FAMILY + int r = 0, i = 0; + r = ACFMAnnounce(fmname, fmindex, index, data, color); + if (r < 0){ + saacproto_ACFMAnnounce_send(fd, FAILED, fmname, fmindex, index, + 1, data, color); + }else{ + extern gmsv gs[MAXCONNECTION]; + for (i = 0; i < MAXCONNECTION; i ++) + { + if (gs[i].use && gs[i].name[0]) + { + saacproto_ACFMAnnounce_send(i, SUCCESSFUL, fmname, fmindex, + index, 1, data, color); + } + } + } +#endif +} + +void saacproto_ACShowTopFMList_recv(int fd, int kindflag) +{ +#ifdef __FAMILY + int r = 0; + char data[150 * MAX_FAMILY]; + strcpy(data, ""); + r = ACShowTopFMList(data, sizeof(data), kindflag); + if (r < 0) { + saacproto_ACShowTopFMList_send(fd, FAILED, kindflag, r, "Nothing"); + }else { + saacproto_ACShowTopFMList_send(fd, SUCCESSFUL, kindflag, r, data); + } +#endif +} + +#ifdef _FAMILYBANKSTONELOG +void saacproto_ACgetFMBankgold_recv(int fd, char *fmname, int fmindex, + int index, int charindex, int charfdid) +{ + int r = 0; + r = ACgetFMBankgold(index, fmname, fmindex, charindex); + saacproto_ACgetFMBankgold_send(fd,charfdid,r); +} +#endif +void saacproto_ACFixFMData_recv(int fd, char *fmname, int fmindex, int index, + int kindflag, char *data1, char *data2, int charindex, int charfdid) +{ +#ifdef __FAMILY + int r = 0; + r = ACFixFMData(index, fmname, fmindex, kindflag, charindex, data1, data2); + if (r < 0){ + saacproto_ACFixFMData_send(fd, FAILED, kindflag, data1, data2, charfdid); + }else{ + saacproto_ACFixFMData_send(fd, SUCCESSFUL, kindflag, data1, data2, charfdid); + } +#endif +} + +void saacproto_ACFixFMPK_recv(int fd, char *winfmname, int winfmindex, int winindex, + char *losefmname, int losefmindex, int loseindex) +{ +#ifdef __FAMILY + int r = 0; + r = ACFixFMPK(winindex, winfmname, winfmindex, + loseindex, losefmname, losefmindex); + if (r < 0){ + saacproto_ACFixFMPK_send(fd, FAILED, r, winindex, + loseindex); + }else{ + saacproto_ACFixFMPK_send(fd, SUCCESSFUL, r, winindex, + loseindex); + } +#endif +} + +void saacproto_ACGMFixFMData_recv(int fd, int index, char *charid, char *cmd, + char *data, int charfdid) +{ +#ifdef __FAMILY + int r = 0; + char fmname[256]; + r = ACGMFixFMData(index, fmname, charid, cmd, data); + if (r < 0){ + saacproto_ACGMFixFMData_send(fd, FAILED, fmname, charfdid); + } + else{ + saacproto_ACGMFixFMData_send(fd, SUCCESSFUL, fmname, charfdid); + } +#endif +} + +void saacproto_ACGetFMData_recv(int fd, char *fmname, int fmindex, int index, + int kindflag, int charfdid) +{ +#ifdef __FAMILY + int r = 0, data = 0; + r = ACGetFMData(index, fmname, fmindex, kindflag, &data); + if (r < 0){ + saacproto_ACGetFMData_send(fd, FAILED, kindflag, data, charfdid); + }else{ + saacproto_ACGetFMData_send(fd, SUCCESSFUL, kindflag, data, charfdid); + } +#endif +} + +void saacproto_ACreLoadFmData_recv(int fd, int type, int data) +{ + int i=0; +extern gmsv gs[MAXCONNECTION]; + switch( type){ + case 1: + log( "reload FM_DATA:%d !\n", data); + readOneFamilyFromTi( data); + break; + case 2: + { + char data[15000]; + readFMPoint( fmpointdir); + if( ACFMPointList( data) >= 0 ){ + log( "reload FM_POINT !\n" ); + for (i=0; i MAX_FMPOINT) return; + saacproto_ACLoadFmPk_send( fd, FMPK_GetData( fmpks_pos-1) ); +} + +void saacproto_ACSendFmPk_recv(int fd, int fmpks_pos, int userindex, int flg, char *data) +{ + extern gmsv gs[MAXCONNECTION]; + char buf[1024]; + int i=0; + sprintf( buf, "%d|%s", fmpks_pos, data); + + if( ( userindex != -1 && FMPK_GetTypeFlg( fmpks_pos-1) == 1 )|| + FMPK_SetData( fmpks_pos-1, flg, buf, strlen( buf)) != 1 ){ + if(userindex != -1) saacproto_ACSendFmPk_send( fd, userindex, 0); + log("err ACSendFmPk_send(%d, %d)\n", userindex, 0); + return; + } + FMPK_BackUpList(); + for (i=0; i MAX_FMPOINT){ + log("\n fmpks_pos(%d) too big", fmpks_pos); + } + saacproto_ACLoadFmPk_send(fd, fm_pk_list[fmpks_pos-1]); +} +void saacproto_ACSendFmPk_recv(int fd, int fmpks_pos, char *data) +{ + extern gmsv gs[MAXCONNECTION]; + int i=0; + + if( (fmpks_pos>MAX_FMPOINT) || (fmpks_pos<1) ){ + log("\n fmpks_pos(%d) err !!", fmpks_pos); + } + sprintf(fm_pk_list[fmpks_pos-1], "%d|%s", fmpks_pos, data); + + for (i=0; i1) { log("\n char_num(%d) err !!", char_num); return; } + if( date<20000000 ) { log("\n date(%d) format err!!", date); return; } + + + if( backup_flag == 1 ){ // 备份日期 + // 回传有备份的日期 + get_backup_date(fd, uid, userfdid, GmCliId, id, char_num, date); + + }else if( backup_flag == 2 ){ // 人物资料 + get_online_player_data(fd, uid, userfdid, GmCliId, id, char_num, date); // 传回线上人物资料 + get_backup_player_data(fd, uid, userfdid, GmCliId, id, char_num, date); // 传回备份人物资料 + } + +} + +void saacproto_ACRecalBackup_recv(int fd, char *uid, int userfdid, int GmCliId, char *id, + int char_num, int date, char *char_data, int backup_flag) +{ + extern struct ITEM_PET_CHANG item_pet_chang; + char temp[64]; + int i, count=0; + char filename1[128], filename2[128]; + char body[256]; + + if(backup_flag == 1){ // 回溯人物 + // 线上人物 + sprintf(filename1, "~/saac/char/0x%x/%s.%d.char", (getHash(id)&0xff), id, char_num ); + + // 备份人物 + sprintf(filename2, "%s/char/0x%x/%s.%d.char", BACKUP_DIR, (getHash(id)&0xff), id, char_num ); + + // 移动备份人物至线上人物 + strcpy(body, ""); + sprintf(body, "mv %s %s", filename2, filename1); + system(body); + + /* 回溯成功 */ + saacproto_ACRecalPlayer_send(fd, uid, userfdid, GmCliId, id, char_num, date, char_data, 4); + + + }else if(backup_flag == 2 ){ // 部分回溯人物 + + log("\n won test 44 ==> char_data_chang(%s)", char_data); + + // 取出需回溯项目 + for(i=0;i<5;i++){ + memset(temp, 0, sizeof(temp)); + easyGetTokenFromString( char_data , count , temp , sizeof( temp )); + item_pet_chang.equit_item[i] = atoi(temp); count++; + } + for(i=0;i<15;i++){ + memset(temp, 0, sizeof(temp)); + easyGetTokenFromString( char_data , count , temp , sizeof( temp )); + item_pet_chang.have_item[i] = atoi(temp); count++; + } + for(i=0;i<30;i++){ + memset(temp, 0, sizeof(temp)); + easyGetTokenFromString( char_data , count , temp , sizeof( temp )); + item_pet_chang.pool_item[i] = atoi(temp); count++; + } + for(i=0;i<5;i++){ + memset(temp, 0, sizeof(temp)); + easyGetTokenFromString( char_data , count , temp , sizeof( temp )); + item_pet_chang.have_pet[i] = atoi(temp); count++; + } + for(i=0;i<20;i++){ + memset(temp, 0, sizeof(temp)); + easyGetTokenFromString( char_data , count , temp , sizeof( temp )); + item_pet_chang.pool_pet[i] = atoi(temp); count++; + } + + + // 处理部分回溯功能 + recal_part_backup(fd, uid, userfdid, GmCliId, id, char_num, date); + + } + +} + +void recal_part_backup(int fd, char *uid, int userfdid, int GmCliId, char *id, int char_num, int date) +{ +/* + extern struct ITEM_PET_CHANG item_pet_chang; + FILE *fp; + char filename[128], filename2[128], body[128]; + char onlin_char[65500], backup_char[65500]; + char *c_ptr, c_temp; + int i=0; + char *temp=NULL, *temp2, *temp3, *temp4, *temp5, *msg1, delim[20], out_msg[65530]; + + + // 线上人物 + { + c_ptr=onlin_char; + snprintf(body , sizeof(body ) , "%s.%d.char" , id , char_num ); + makeDirFilename(filename , sizeof(filename), chardir , getHash(id) ,body); + + if( !(fp=fopen(filename, "r")) ){ + log("\n open (%s) file err", filename ); return; + } + + memset(onlin_char, 0, sizeof(onlin_char)); + + do{ + c_temp = fgetc(fp); + *c_ptr=c_temp; + c_ptr++; + }while(c_temp != EOF); + *c_ptr='\0'; + + fclose(fp); + } + + // 备份人物 + { + c_ptr=backup_char; + snprintf(body , sizeof(body ) , "%s.%d.char" , id , char_num ); + makeDirFilename(filename , sizeof(filename), chardir , getHash(id) ,body); + + sprintf(filename2, "%s/%s", BACKUP_DIR, filename); + if( !(fp=fopen( filename2, "r" )) ){ + log("\n won test 100 ==> open (%s) file err", filename ); return; + } + + memset(backup_char, 0, sizeof(backup_char)); + + do{ + c_temp = fgetc(fp); + *c_ptr=c_temp; + c_ptr++; + }while(c_temp != EOF); + *c_ptr='\0'; + + fclose(fp); + } + + log("\n won test 1 ==>"); + + { + for(i=0;i<5;i++){ + if( item_pet_chang.equit_item[i] != i ){ + log("\n won test 2 ==> i(%d) item(%d)", i, item_pet_chang.equit_item[i]); + + // 线上人物 + while( temp==NULL ){ + log("\n won test 2.1 ==> temp(%s)", temp); + sprintf( delim, "item%d=", i); + log("\n won test 2.2 ==> delim(%s)", delim); + temp=strstr( onlin_char, delim); + log("\n won test 2.3 ==> temp(%s)", temp); + if((i==0)&&(temp==NULL)){ + sprintf( delim, "flg2="); + temp=strstr( onlin_char, delim); + log("\n won test 2.4 ==> temp(%s)", temp); + break; + } + i--; + } + + + log("\n won test 3 ==> temp(%s)", temp); + temp2=strstr( temp, "\n"); + log("\n won test 3.1 ==> temp2(%s)", temp2); + + msg1=(char*)calloc( 1,sizeof(char)*strlen(onlin_char)-strlen(temp2)+1); + snprintf(msg1, strlen(onlin_char)-strlen(temp2), "%s", onlin_char ); + log("\n won test 3.2 ==> msg1(%s)", msg1); + + // 备份人物 + sprintf( delim, "item%d=", item_pet_chang.equit_item[i]-5+1); + temp3=strstr( backup_char, delim); + temp4=strstr( temp3, "\n"); + temp5=(char*)calloc( 1,sizeof(char)*strlen(temp3)-strlen(temp4)+1); + snprintf(temp5, strlen(temp3)-strlen(temp4), "%s", temp3); + log("\n won test 4 ==> temp5(%s)", temp5); + + // 组合 + memset(out_msg, 0, sizeof(out_msg)); + strcpy(out_msg, msg1); + strcat(out_msg, temp5); // 回溯的部分 + strcat(out_msg, temp2); + log("\n won test 5 ==> out_msg(%s)", out_msg); + } + } + + } +*/ +} +#endif + + +#ifdef _CHECKFMSCHEDULE // Syu ADD 透过AC确认家族挑战排程 +void saacproto_ACCheckSchedule_recv(int fd,char *data) +{ + extern gmsv gs[MAXCONNECTION]; + int i,j; + char filename[256]; + char token[256]; + char line[64]; + char line1[64]; + char line2[64]; + FILE* fpm; + easyGetTokenFromBuf(data, '|', 2, line1, sizeof(line1)); + j = atoi(data); + snprintf( filename ,sizeof( filename ) ,"%s/%d.%s" , + "family",j,"fmschedule.txt"); + + if( !(fpm=fopen( filename , "r")) ) + { + log("\nSyu log open file error!!"); + sprintf(line2,"%d %s",j,"FALSE"); + for (i=0; i %s , %s",line,line1); + if ( atoi(line1) > atoi(line) ) + { + sprintf(line2,"%d %s",j,"TRUE"); + for (i=0; i"); + // 有lock的话踢人 + for(i=0;i"); +#ifdef _LOCK_ADD_NAME + ret = lockUser( getGSName(ti), id , "" , "0" , 0 , result , sizeof( result ) , + retdata , sizeof( retdata ) , "0" , "0"); +#else + ret = lockUser( getGSName(ti), id , "0" , 0 , result , sizeof( result ) , + retdata , sizeof( retdata ) , "0" , "0"); +#endif + snprintf( process , sizeof(process) , "%d" , ret ); +#ifdef _UNLOCKPOOL + if( addUnlockPool( ti, id, "", process, mesgid) <0 ) { +#else + if( addWorkerTask( id , "dummy" , "3" , dummyCallback , ti , + id , "dummy" , charname , process ,"", mesgid , 0 ) < 0 ) { +#endif + log("Game end error, process=%s\n" , process ); + }else { + log("Game end :process=%s\n" , process ); + } + + } + } + break; +#endif + case 10: //跨星球踢人不含load该星球 + { + int i; + for(i=0;i time(%d) loop(%d) wait(%d) \n post_msg(%s)", time, loop, wait, post_msg ); + + for(i=0; i i(%d)", i ); + saacproto_GmBroadcast_send(i, time, loop, wait, post_msg ); + } + } +} +#endif + +#ifdef _SEND_EFFECT // WON ADD 送下雪、下雨等特效 +void SendEffect(char *effect) +{ + extern gmsv gs[MAXCONNECTION]; + int i; + + for (i=0; i filenum err !!"); + return; + } + + sprintf(id_dir, "%x", (getHash(id) & 0xff) ); + + memset(char_data, 0, sizeof(char_data)); + + // 找出符合帐号的备份日期 + for( i = 0 ; i < filenum ; i ++ ){ + if(strcmp(filenames[i].string, "") != 0 ){ + char temp[64]; + get_delim(filenames[i].string, temp, "_0x", ".tar" ); + + if(strcmp(temp, id_dir)==0){ + char temp2[20]; + get_delim(filenames[i].string, temp, "AC_", "_0x" ); + snprintf(temp2, 11, "%s", temp); + strcat( char_data, temp2); + strcat( char_data, "|"); + } + } + } + + saacproto_ACRecalPlayer_send(fd, uid, userfdid, GmCliId, id, char_num, date, char_data, 1); + +} + +// 取得线上人物资料 +void get_online_player_data(int fd, char *uid, int userfdid, int GmCliId, char *id, int char_num, int date) +{ + FILE *fp; + char filename[128]; + char body[128]; + char char_data[65500]; + char *c_ptr, c_temp; + + c_ptr=char_data; + + snprintf(body , sizeof(body ) , "%s.%d.char" , id , char_num ); + makeDirFilename(filename , sizeof(filename), chardir , getHash(id) ,body); + + if( !(fp=fopen(filename, "r")) ){ + log("\n open (%s) file err", filename ); + strcpy(char_data, "无此帐号人物资料"); + saacproto_ACRecalPlayer_send(fd, uid, userfdid, GmCliId, id, char_num, date, char_data, 2); + return; + } + + strcpy(char_data, ""); + + do{ + c_temp = fgetc(fp); + *c_ptr=c_temp; + c_ptr++; + }while(c_temp != EOF); + *c_ptr='\0'; + + fclose(fp); + + if( char_data[0]=='|' && char_data[1]=='|' ){ + log("\n open (%s) file err", filename ); + strcpy(char_data, "此帐号人物资料异常"); + saacproto_ACRecalPlayer_send(fd, uid, userfdid, GmCliId, id, char_num, date, char_data, 2); + return; + } + + // 分析人物资料,取出所需的人物资料 + analysis_char(char_data); + + saacproto_ACRecalPlayer_send(fd, uid, userfdid, GmCliId, id, char_num, date, char_data, 2); + +} + +void send_backup_player_data() +{ + FILE *fp; + char filename[128]; + char char_data[65500]; + char *c_ptr, c_temp; + int fd=-1, userfdid=-1, GmCliId=-1, char_num=-1, date=-1, i, j, count; + char uid[64], id[64], temp[8][64], buf[255]; + + sprintf( filename, "%s", "backup_player_name2.txt"); + if( !(fp=fopen(filename, "r")) ){ + log("\n open backup_player_name2.txt err!!"); + return; + } + + strcpy(buf, ""); + while(1) + if( fscanf( fp, "%s", buf) == EOF ) break; + + fclose(fp); + + for(i=0; i<8; i++) memset(temp[i], 0, sizeof(temp[i]) ); + + i=0; j=0; count=0; + for( i=0; i backup_player_name.txt; ~/saac/recal_player.sh", + filename, fd, uid, userfdid, GmCliId, id, char_num, date, (getHash(id)&0xff) ); + + system(body); + + +} + +void analysis_char(char *char_data) +{ + int i; + char delime[64]; + extern struct PLAYER_DATA player_data; + + char_data_count=0; + + // player name + memset( player_data.name, 0, sizeof(player_data.name) ); + won_get(player_data.name, "", "|"); + + // player information + _won_get_player( char_data ); + + // have item + for(i=0; id_name[0] == '.' )continue; + + snprintf(dirn, sizeof(dirn), "%s/%s" , dirname,dent->d_name ); + if( stat( dirn , &st ) == -1 )continue; + if( S_ISDIR( st.st_mode ) ){ + if( rrd( dirn , buf ,bufsize, index) == -1 ){ + closedir(d); + return -1; + } + }else{ + if( *index >= bufsize ) + break; + + strcpy( buf[*index].string , dirn ); + (*index)++; + } + } + closedir(d); + return 1; +} + +void _won_get_player(char *char_data) +{ + + _won_get_2( char_data, player_data.fl, "nfl=" ); + _won_get_2( char_data, player_data.x, "nx=" ); + _won_get_2( char_data, player_data.y, "ny=" ); + _won_get_2( char_data, player_data.lv, "nlv=" ); + _won_get_2( char_data, player_data.gold, "ngld=" ); + _won_get_2( char_data, player_data.hp, "nhp=" ); + _won_get_2( char_data, player_data.mp, "nmp=" ); + _won_get_2( char_data, player_data.vi, "nvi=" ); + _won_get_2( char_data, player_data.str, "nstr=" ); + _won_get_2( char_data, player_data.tou, "ntou=" ); + _won_get_2( char_data, player_data.dex, "ndx=" ); + _won_get_2( char_data, player_data.exp, "nexp=" ); + _won_get_2( char_data, player_data.trn, "ntrn=" ); + _won_get_2( char_data, player_data.fmi, "nfmi=" ); + _won_get_2( char_data, player_data.fmlf, "nfmlf=" ); + _won_get_2( char_data, player_data.bankgld, "nbankgld=" ); + _won_get_2( char_data, player_data.fame, "nfame=" ); + _won_get_2( char_data, player_data.pgold, "npersonaglod=" ); + _won_get_2( char_data, player_data.fmname, "nfmname=" ); + + +} + +void _won_get_2(char *char_data, char *fun, char *check) +{ + memset( fun , 0, sizeof(fun) ); + won_get( fun, check, "\\n"); +} + +#endif // end RECAL_ASK_PLAYER + +#ifdef _ALLDOMAN // Syu ADD 排行榜NPC +void LOAD_herolist() +{ + FILE *fdb; + int i, linenum=0; + + char filename[256], token[512]; + + snprintf( filename , sizeof( filename ) ,"%s/%s" , "db/herolist","db_herolist.txt"); + if( !( fdb = fopen ( filename , "r+" ) ) ) { + log("\nSyu log open db_herolist.txt error!!"); + return ; + }else { +#ifdef _FIX_ALLDOMAN + int j; + char buf1[256]; + for( i=0; i= MAX_HERO_LIST ) break; + } + fclose( fdb); + + for( i=0; ii; j-- ){ + if( Herolist[j].use == 0 ) continue; + if( !strcmp( Herolist[i].strings[0], Herolist[j].strings[0]) && + !strcmp( Herolist[i].strings[1], Herolist[j].strings[1]) ){ + Herolist[j].use = 0; + } + } + } + for( j=(MAX_HERO_LIST-1); j>0; j-- ){ + if( Herolist[j].use == 0 ) continue; + if( Herolist[j-1].use == 1 ) continue; + + for( i=0; i<3; i++) { + sprintf( Herolist[j-1].strings[i], "%s", Herolist[j].strings[i]); + } + for( i=0; i<4; i++) { + Herolist[j-1].intdata[i] = Herolist[j].intdata[i]; + } + Herolist[j].use = 0; + Herolist[j-1].use = 1; + } + //andy_log + for( i=0; i= 65535 ){ + saacproto_UpdataStele_send ( fd , token ); + memset( token, 0, sizeof(token)); + lens = 0; + } + strcat( token, buf); + lens += strlen( buf); + } + fclose ( fdb ); + if( strlen( token) > 0 ) + saacproto_UpdataStele_send ( fd , token ); +#endif + } +} + +#ifdef _FIX_ALLDOMAN +void Send_S_herolist( int ti ) +{ + int i; + char token[512]; + extern gmsv gs[MAXCONNECTION]; + memset( token, 0, sizeof(token)); + strcat( token, "O|,"); + for (i = 0 ; i < MAXCONNECTION ; i ++ ) { + if ( gs[i].use && gs[i].name[0] ) { + snprintf( token, sizeof(token)-1, "%d|%s|%s|%s|%d|%d|%d|%d|", + ti, + Herolist[ti].strings[0], Herolist[ti].strings[1], Herolist[ti].strings[2], + Herolist[ti].intdata[0], Herolist[ti].intdata[1], + Herolist[ti].intdata[2], Herolist[ti].intdata[3] ); + saacproto_UpdataStele_send ( i, token); + } + } +} +#else +void Send_S_herolist( char *ocdkey , char *oname , char *ncdkey , char *nname , + char *title , int level , int trns , int floor ) +{ + int i; + extern gmsv gs[MAXCONNECTION]; + + for (i = 0 ; i < MAXCONNECTION ; i ++ ) { + if ( gs[i].use && gs[i].name[0] ) { + saacproto_S_UpdataStele_send( i , ocdkey , oname , + ncdkey , nname , title + , level , trns , floor ); + log("\nSyu log AC Send Single to Gmsv "); + } + } +} +#endif +#endif + + +#define MAXUNlockM 50 +#define delaytime (60*3) +UNLockMenus UNlockM[MAXUNlockM]; + +int UNlockM_Init( void) +{ + int i; + for( i=0; i= time(NULL) ) continue; + if( isLocked( UNlockM[i].PlayerId ) ){ + log( "等待解锁玩家: %s 还需锁定!!\n", UNlockM[i].PlayerId); + }else{ + log( "等待解锁玩家: %s 已经解锁!!\n", UNlockM[i].PlayerId); + } + reset_UNlockMPlayer( i); + nums++; + } + log( "等待解锁玩家: 总计 %d 个用户解锁 !!\n", nums); + return nums; +} + + +#ifdef _ANGEL_SUMMON + +extern int saveMissionTable( void ); + +//void saacproto_ACMissionTable_recv( int fd, int num, int type, char *data, int charaindex) +void saacproto_ACMissionTable_recv( int fd, int num, int type, char *data, char* angelinfo) +{ + extern gmsv gs[MAXCONNECTION]; + int i; + char buf[1024]; + + if( type == 1 ) { // ask data list + if( num == -1) { // ask all data + char alldata[MAXMISSIONTABLE*100]; + alldata[0]='\0'; + for( i =0; i use != 0){ + if(strcmp(ln->cdkey,id) == 0 && strcmp(ln->name,name) == 0){ + saacproto_ACCheckCharacterOnLine_send(fd,charaindex,1,ln->server,flag); + return; + } + } + ln = ln->next; + } + // 玩家不在线上 + saacproto_ACCheckCharacterOnLine_send(fd,charaindex,0,"",flag); + } + // 不须要确认名字 + else{ + while(ln != NULL){ + if(ln->use != 0){ + if(strcmp(ln->cdkey,id) == 0){ + saacproto_ACCheckCharacterOnLine_send(fd,charaindex,1,ln->server,flag); + return; + } + } + ln = ln->next; + } + // 玩家不在线上 + saacproto_ACCheckCharacterOnLine_send(fd,charaindex,0,"",flag); + } +} +#endif + +#ifdef _RACEMAN +//racetype 0:登记 9:删除 1~5:读资料 11~55:读资料 +void saacproto_ACRaceRecordandSort_recv( int fd, int charaindex, char *code , char *id, char *name , int racetype, int catchcnt, int ranknum ) +{ + //比较目前的排行 如果可以进入排行榜则写入 并且回传目前的排行榜 + FILE *fp; + char rankfile[64]; + char allfile[64]; + char line[512]; + int i,j,findflag = 0; + char buf[64]; + char data[4096]; //看server要多少笔就塞多少资料 + + //time_t endtime = (time_t)limittime; + //struct tm *limit; + + //time( &endtime ); + //limit = localtime( &endtime ); + //limit->tm_year + 1900 , limit->tm_mon + 1 , limit->tm_mday ); + //now->tm_hour , now->tm_min , now->tm_sec + //USERLOG( id , "ranktable W: successful\n" ); + data[0]='\0'; + memset( ranktable, 0, sizeof(ranktable)); + + sprintf( rankfile , "race/%s.txt", code ); + + fp = fopen( rankfile, "a+"); + if( fp == NULL ){ + log("create file:%s error !!\n", rankfile); + return; + } + if( fseek( fp , 0, SEEK_SET ) == -1 ){ + fprintf( fp ,"Seek Error\n" ); + fclose(fp); + return; + } + + i = 0; + while(1) + { + if(fgets( line, sizeof( line), fp) == NULL) break; + chop(line); + easyGetTokenFromBuf( line, '|', 1, buf, sizeof( buf )); + sprintf( ranktable[i].id, "%s", buf); + easyGetTokenFromBuf( line, '|', 2, buf, sizeof( buf )); + sprintf( ranktable[i].name,"%s", buf); + easyGetTokenFromBuf( line, '|', 3, buf, sizeof( buf )); + ranktable[i].catchcnt = atoi(buf); + i++; + } + fclose(fp); + + if(racetype == 0){ + if(catchcnt >= 230 ){ + sprintf( allfile , "race/%s_a.txt", code ); + fp = fopen( allfile , "a+"); + fprintf(fp,"%s|%s|%d|\n",id,name,catchcnt); + fclose(fp); + } + //处理排名 + fp = fopen( rankfile, "w"); + if( fp == NULL ){ + log("create file:%s error !!\n", rankfile); + return; + } + for(i=0; i < DEFMAXRANK ;i++) + { + + if( catchcnt > ranktable[i].catchcnt){ //只有大於才能把人家挤掉 + for( j=DEFMAXRANK ; j>i+1 ; j-- ) + { + strcpy(ranktable[j-1].id , ranktable[j-2].id); + strcpy(ranktable[j-1].name , ranktable[j-2].name); + ranktable[j-1].catchcnt = ranktable[j-2].catchcnt; + } + strcpy( ranktable[i].id , id); + strcpy( ranktable[i].name , name); + ranktable[i].catchcnt = catchcnt; + catchcnt = 0; + }else{ + if(strcmp(id,ranktable[i].id)==0 && strcmp(name,ranktable[i].name)==0) continue; + } + + if(ranktable[i].catchcnt == 0) break; + + fprintf(fp,"%s|%s|%d|\n",ranktable[i].id , ranktable[i].name , ranktable[i].catchcnt); + } + fclose(fp); + + }else if(racetype == 9){ //清除某笔资料 + + fp = fopen( rankfile, "w"); + if( fp == NULL ){ + log("create file:%s error !!\n", rankfile); + return; + } + for(i=0; i < DEFMAXRANK ;i++) + { + if(ranktable[i].catchcnt == 0) break; + + if(strcmp(id,ranktable[i].id)==0 && strcmp(name,ranktable[i].name)==0) continue; + + fprintf(fp,"%s|%s|%d|\n",ranktable[i].id , ranktable[i].name , ranktable[i].catchcnt); + } + fclose(fp); + + }else{ //server要资料而已 + for(i=0;i atoi(buf)){ + + findflag = 1; + break; + } + } + } + } + if( findflag == 0 ){ + fprintf(fp,"%s|%s|%d|\n",id,name,catchcnt); + } + fclose(fp); + +*/ diff --git a/saac/recv.h b/saac/recv.h new file mode 100644 index 0000000..41067ac --- /dev/null +++ b/saac/recv.h @@ -0,0 +1,145 @@ +#ifndef _RECV_H_ +#define _RECV_H_ + +#ifdef _CK_ONLINE_PLAYER_COUNT // WON ADD 计算线上人数 +void PlayerCount(void); +#endif + +#ifdef _SEND_EFFECT // WON ADD 送下雪、下雨等特效 +void SendEffect(char *ffect); +#endif + +#ifdef _BAD_PLAYER // WON ADD 送坏玩家去关 +void BadPlayer(void); +char BadPlayerList[500][20]; +int MAX_BAD_PLAYER; +#endif + +#ifdef _WORKER_AUTO_LOGOUT // WON ADD GS断线自动送LOGOUT给WORKER +void Worker_send_logout( int ti ,char* id ); +#endif + + +#ifdef _AC_SEND_FM_PK // WON ADD 庄园对战列表储存在AC +void load_fm_pk_list(void); +void save_fm_pk_list(void); +char fm_pk_list[9][255]; +#endif + +#ifdef _ALLDOMAN // Syu ADD 排行榜NPC +void LOAD_herolist(); +void SAVE_herolist(int); +void Send_A_herolist(int); + +#ifdef _FIX_ALLDOMAN +void Send_S_herolist( int ti ); +#define MAX_HERO_LIST 50 +typedef struct _tagHerolistBase +{ + char strings[3][64]; + int intdata[3]; + int use; +}HerolistBase; +HerolistBase Herolist[MAX_HERO_LIST]; +#else +void Send_S_herolist( char *ocdkey , char *oname , char *ncdkey , char *nname , + char *title , int level , int trns , int floor ); +#define MAX_HERO_COLUMN 7 +#define MAX_HERO_LIST 100 +char Herolist[MAX_HERO_LIST][MAX_HERO_COLUMN][72]; +#endif + +#endif + + +#ifdef _RECAL_BACKUP_PLAYER // WON 回溯功能 + +struct PLAYER_DATA { + char name[20]; + char fl[10]; + char x[10]; + char y[10]; + char lv[20]; + char gold[20]; + char hp[20]; + char mp[20]; + char vi[20]; + char str[20]; + char tou[20]; + char dex[20]; + char exp[20]; + char trn[20]; + char fmi[20]; + char fmlf[20]; + char bankgld[20]; + char fame[20]; + char pgold[20]; + char fmname[20]; + char item_name[50][64]; + char item[50][255]; + char pet_name[50][64]; + char pet[25][255]; +}player_data; + + +typedef struct tagSTRING64 +{ + char string[64]; +}STRING64; + +struct ITEM_PET_CHANG{ + int equit_item[5]; + int have_item[15]; + int pool_item[30]; + int have_pet[5]; + int pool_pet[20]; +}item_pet_chang; + +#define won_get(get, delime1, delime2) _won_get(get, delime1, delime2, char_data) +void _won_get(char *get, char *delime1, char *delime2, char *char_data); +void saacproto_ACRecalPlayer_recv(int fd, char *uid, int userfdid, int GmCliId, char *id, int char_num, int date, int backup_flag); +void analysis_char(char *char_data); +int get_delim(char *msg, char *temp, char *delime1, char *delime2); +void get_online_player_data(int fd, char *uid, int userfdid, int GmCliId, char *id, int char_num, int date); +void send_backup_player_data(); +void get_backup_player_data(int fd, char *uid, int userfdid, int GmCliId, char *id, int char_num, int date); +void get_backup_date(int fd, char *uid, int userfdid, int GmCliId, char *id, int char_num, int date); +void saacproto_ACRecalBackup_recv(int fd, char *uid, int userfdid, int GmCliId, char *id, int char_num, int date, char *char_data, int backup_flag); +void recal_part_backup(int fd, char *uid, int userfdid, int GmCliId, char *id, int char_num, int date); +int rgetFileName( char* dirname , STRING64* string, int size); +int rrd( char* dirname , STRING64* buf ,int bufsize, int* index); + + +#define BACKUP_DIR "/home/backup/char" + +void _won_get_player(char *char_data); +void _won_get_2(char *char_data, char *fun, char *check); + + +#endif // end RECAL_ASK_PLAYER + +typedef struct tagUNLOCKMENUS{ + char PlayerId[256]; + int use; + time_t time; +}UNLockMenus; + +int UNlockM_isBe( char *id); +int UNlockM_addPlayer( char *id); +int UNlockM_UnlockPlayer( void); +int UNlockM_Init( void); + + +#ifdef _GM_BROADCAST // WON ADD 客服公告系统 +void broadcast( char *msg ); +#endif + + +#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令 +void saacproto_ACShowMemberList_2_recv( int fd, int charindex, int fm1, int fm2, int time, int id ); +#endif + + + +#endif + diff --git a/saac/saacproto_lserver.c b/saac/saacproto_lserver.c new file mode 100644 index 0000000..8eb3e37 --- /dev/null +++ b/saac/saacproto_lserver.c @@ -0,0 +1,769 @@ +#include "saacproto_lserver.h" +#include "saacproto_serv.h" +#include "main.h" +#include "char.h" +#include "util.h" +#include "version.h" + + +#ifdef _LOCK_SERVER + +LServer Ls; +LSMem *LSbufHead; +SAMessC *SAMess; + +struct timeval select_timeout; +void REreadConfig( char *path ); +BOOL LSbuffInit() +{ + //LSbufHead->next = NULL; + //LSbufHead = NULL; + return TRUE; +} + +BOOL LServerInit() +{ + int i; + if( Ls.data[LS_FD] >= 0 ) + close( Ls.data[LS_FD]); + for( i=0;ih_addr, sizeof( struct in_addr)); + } + r = connect( s , ( struct sockaddr*)&svaddr,sizeof(svaddr)); + if( r < 0 ) return LSMESS_NOCONNECT; + set_nodelay( s ); + Ls.data[LS_FD] = s; + return LS_OK; +} +int LS_getData( int stype) +{ + return Ls.data[stype]; +} + +BOOL TcpIp_LS_accept() +{ + int sret; + struct timeval t; + char tmpbuf[4096]; + char send_buf[4096]; + int lsfd = Ls.data[LS_FD]; + LSMem *FlgMem; + fd_set rfds, wfds , efds; + + FD_ZERO( &rfds ); + FD_ZERO( &wfds ); + FD_ZERO( &efds ); + + select_timeout.tv_sec = 0; + select_timeout.tv_usec = 0; + + if( Ls.data[LS_USE] && (lsfd >= 0 ) && !Ls.errs ) { + FD_SET( lsfd, &rfds ); + FD_SET( lsfd, &wfds ); + FD_SET( lsfd, &efds ); + }else { + log(" LS error t1!!\n"); + return FALSE; + } + + t = select_timeout; + sret = select( lsfd+1, &rfds , (fd_set*)NULL, &efds , &t); + if( sret > 0 ) { + memset( tmpbuf, 0, sizeof( tmpbuf)); + if( ( lsfd >= 0 ) && FD_ISSET( lsfd , &rfds ) ){ + int rr; + rr = read( lsfd, tmpbuf , sizeof( tmpbuf)); + if( rr <= 0 ){ + Ls.errs = 1; + Ls.data[LS_LASTERROR] = LSMESS_READERROR; + } else { + Add_LS_WRMemBuffer( tmpbuf , rr, MEMREAD); //增加讯息 + } + } + } + + t = select_timeout; + sret = select( lsfd+1, (fd_set*)NULL, &wfds, &efds , &t); + if( sret > 0 ) { + if( ( lsfd >= 0 ) && FD_ISSET( lsfd , &wfds )){ + int l , rr, writesize; + FlgMem = NULL; + memset( send_buf, 0, sizeof( send_buf)); + l = MMGet_LS_WRMemBufList( send_buf, sizeof( send_buf), MEMWRITE); + if( l > 0 ){ + writesize = strlen( send_buf)+1; + rr = write( lsfd , send_buf , writesize); + if( rr < 0 ){ + Ls.errs = 1; + } + } + } + } + + return TRUE; +} + +BOOL Add_LS_WRMemBuffer( char *buf, int strlens, int flg) +{ + int i=0; + LSMem *workLS, *FindLs; + FindLs = LSbufHead; + + if( Ls.data[LS_LASTTIME] >= 50 ) { + log( "LS Mess busy:%d\n", Ls.data[LS_LASTTIME]); + return FALSE; + } + while ( 1 ) { + if( FindLs == NULL || FindLs->next == NULL ) + break; + FindLs = FindLs->next; + i++; + } + + Ls.data[LS_LASTTIME] = i; + workLS = MEMBUF_getNew(); + if( workLS == NULL ) + return FALSE; + memcpy( workLS->buf, buf, sizeof( workLS->buf)); + workLS->type = flg; + workLS->next = NULL; + + if( LSbufHead == NULL ) + LSbufHead = workLS; + else { + FindLs->next = workLS; + } + + return TRUE; +} + +LSMem *MEMBUF_getNew() +{ + LSMem *MBUF=NULL; + MBUF = (LSMem *) calloc( 1, sizeof( struct MemMessage) ); + if( MBUF == NULL ) + return NULL; + MBUF->type = 0; + return MBUF; +} + +int MMGet_LsReadBuflist( char *buf, int len) +{ + int l; + char buf1[256]; + LSMem *FlgMem; + FlgMem = NULL; + l = MMGet_LS_WRMemBufList( buf1, len, MEMREAD); + if( l > 0 ) { + memcpy( buf, &buf1, 256); + return strlen( buf1); + } + return 0; +} + +int MMGet_LS_WRMemBufList( char *buf, int len, int flg) +{ + LSMem *workLS; + LSMem *POINT1=NULL; + workLS = LSbufHead; + POINT1 = NULL; + while( workLS != NULL ){ + if( workLS->type == flg ) { + sprintf( buf, "%s", workLS->buf); + if( POINT1 == NULL ) { + LSbufHead = workLS->next; + }else { + POINT1->next = workLS->next; + } + free ( workLS); + return 1; + } + POINT1 = workLS; + workLS = workLS->next; + } + return 0; +} + +void DEL_LS_MemBufferHead() +{ + LSMem *workLS; + if( LSbufHead == NULL ) + return; + if( LSbufHead->next == NULL ) + return; + workLS = LSbufHead; + LSbufHead = LSbufHead->next; + free( workLS); +} + +void DEL_LS_MemBufferList( LSMem *FlgMem ) +{ + LSMem *workLS=NULL; + LSMem *POINT1=NULL; + + workLS = LSbufHead; + POINT1 = NULL; + while( workLS != NULL) { + if( workLS == FlgMem ) { + if( POINT1 == NULL ) { + LSbufHead = FlgMem->next; + }else { + POINT1->next = FlgMem->next; + } + free( FlgMem); + return; + }else { + POINT1 = workLS; + workLS = workLS->next; + } + } +} + +BOOL CHECK_LS_BEUSE() +{ + if( Ls.data[LS_USE] == 1) + return TRUE; + else + return FALSE; +} + +void CHECK_LSTYPE() +{ + static time_t standbyTime; + + if( Ls.data[LS_USE] ){ + if( Ls.errs ) { + if( DisConnectLServer() == FALSE ) { + log( "LS Close..\n"); + }else { + log( "LS Close error ..!!\n"); + } + } + standbyTime = time(NULL); + }else { + if( (standbyTime + 60 ) > time(NULL) ) + return; + + REreadConfig( "saac.cf"); + LServerInit(); + usleep( 200*10000); + standbyTime = time(NULL); + if( connectToLServer( LSADDRESS, LSPORT) == FALSE ) { + log("%s", "LOGIN LServer FAIL!!\n"); + return; + }else { + usleep( 100*10000); + LServer_SALogin_send(); + } + } + //if( Ls.data[LS_LASTTIME] >= 10 ) + +} + +int get_LSFD() +{ + if( Ls.data[LS_USE] ) { + return Ls.data[LS_FD]; + } + return -1; +} + +void Show_LS_MEMBufferList() +{ + LSMem *workLS=NULL; + + workLS = LSbufHead; + while( workLS != NULL ) { + log( "[ %s] ", workLS->buf); + workLS = workLS->next; + } + +} + +int lockproto_SaacDispatchMessage( char *encoded ) +{ + int lens; + char funcname[1024]; + if( SAMESS_setChar( encoded) == FALSE ) + return -1; + + memset( funcname, 0, sizeof( funcname)); + if( SAMESS_getChar( funcname, &lens) == FALSE ) { + log("funcname:NULL\n"); + return 0; + } + + if( !strcmp( funcname , "TEST" )){ + char buf1[256],buf2[256],buf3[256]; + if( SAMESS_getChar( buf1, &lens) == FALSE ) return 0; + if( SAMESS_getChar( buf2, &lens) == FALSE ) return 0; + if( SAMESS_getChar( buf3, &lens) == FALSE ) return 0; + return 0; + } + + if( !strcmp( funcname , "SACheckLock1" )){ + char si[256], Pcdkey[256], Pid[256], flg[256], PASS[256]; + if( SAMESS_getChar( si, &lens) == FALSE ) return 0; + if( SAMESS_getChar( Pcdkey, &lens) == FALSE ) return 0; + if( SAMESS_getChar( Pid, &lens) == FALSE ) return 0; + if( SAMESS_getChar( flg, &lens) == FALSE ) return 0; + if( SAMESS_getChar( PASS, &lens) == FALSE ) return 0; + LServer_SACheckLock1_recv( si, Pcdkey, Pid, flg, PASS); + return 0; + } + + if( !strcmp( funcname , "SACheckLock2" )){ + char si[256], Pcdkey[256], Pid[256], name[256], flg[256], PASS[256]; + if( SAMESS_getChar( si, &lens) == FALSE ) return 0; + if( SAMESS_getChar( Pcdkey, &lens) == FALSE ) return 0; + if( SAMESS_getChar( Pid, &lens) == FALSE ) return 0; + if( SAMESS_getChar( name, &lens) == FALSE ) return 0; + if( SAMESS_getChar( flg, &lens) == FALSE ) return 0; + if( SAMESS_getChar( PASS, &lens) == FALSE ) return 0; + LServer_SACheckLock2_recv( si, Pcdkey, Pid, name, flg, PASS); + return 0; + } + + if( !strcmp( funcname , "SALock" )){ + char si[256], Pcdkey[256], Pid[256], name[256], flg[256]; + + if( SAMESS_getChar( si, &lens) == FALSE ) return 0; + if( SAMESS_getChar( Pcdkey, &lens) == FALSE ) return 0; + if( SAMESS_getChar( Pid, &lens) == FALSE ) return 0; + if( SAMESS_getChar( name, &lens) == FALSE ) return 0; + if( SAMESS_getChar( flg, &lens) == FALSE ) return 0; + LServer_SALock_recv( si, Pcdkey, Pid, name, flg); + return 0; + } + + if( !strcmp( funcname , "SAUNLock" )){ + char si[256], Pcdkey[256], Pid[256], flg[256]; + + if( SAMESS_getChar( si, &lens) == FALSE ) return 0; + if( SAMESS_getChar( Pcdkey, &lens) == FALSE ) return 0; + if( SAMESS_getChar( Pid, &lens) == FALSE ) return 0; + if( SAMESS_getChar( flg, &lens) == FALSE ) return 0; + LServer_SAUNLock_recv( si, Pcdkey, Pid, flg); + return 0; + } + + if( !strcmp( funcname , "SAUCheck" )){ //check + char PCDKEY[256]; + if( SAMESS_getChar( PCDKEY, &lens) == FALSE ) return 0; + LServer_SAUCheck_recv( PCDKEY); + return 0; + } + + return -1; +} + +BOOL SAMESS_setChar( char *buf) +{ + char Mbuf[4096]; + int i=0,j=0; + int len=0; + SAMessC *Works; + SAMessC *point; + point = NULL; + + memset( Mbuf, 0, sizeof( Mbuf)); + sprintf( Mbuf, "%s", buf); + SAMess = NULL; + while( Mbuf[i] != '\0' ) { + if( Mbuf[i] == '\n' ) + Mbuf[i] = '\0'; + i++; + } + i=0; + len = 0; + while( Mbuf[i] != '\0' && Mbuf[j] != '\0' ) { + j=i; + len = 0; + while( Mbuf[j] != ' ' && Mbuf[j] != '\0') { + len++; + j++; + } + Works = MESS_getNew(); + if( Works == NULL ) + return FALSE; + memcpy( Works->buf, &Mbuf[i], len); + Works->len = len; + if( SAMess == NULL ) { + SAMess = Works; + point = Works; + }else { + point->next = Works; + point = point->next; + } + i = (j+1); + } + return TRUE; +} + + +BOOL SAMESS_getChar( char *buf, int *len) +{ + SAMessC *Works; + Works = SAMess; + *len = 0; + if( Works == NULL ) + return FALSE; + sprintf( buf, "%s", Works->buf); + *len = Works->len; + SAMess = Works->next; + free( Works); + return TRUE; +} + +SAMessC *MESS_getNew() +{ + SAMessC *MBUF=NULL; + MBUF = (SAMessC *) calloc( 1, sizeof( struct _SAMessCommand) ); + if( MBUF == NULL ) + return NULL; + memset( MBUF->buf, 0, sizeof( MBUF->buf)); + MBUF->len = 0; + MBUF->next = NULL; + return MBUF; +} + + +void LServer_SALogin_send() +{ + //Ls.data[LS_FD] + char buf[4096]; + sprintf( buf, "SALogin %s %d %s\n", SaName, 0, "LOGIN"); + if( Add_LS_WRMemBuffer( buf, sizeof( buf), MEMWRITE) == FALSE ) { + log( "LS WRITE ERROR!!"); + } +} + +void LServer_SACheckLock1_recv( char *si, char *Pcdkey, char *Pid, char *flg, char *PASS) +{ + +#ifndef _TEST_LOCKSERVER + int Pfd, Flg, seri; + char listbuf[CHARDATASIZE]; + Pfd = atoi( Pid); + Flg = atoi( flg); + seri = atoi( si); + + + if( !strcmp( flg, "LOCKED") ) { + saacproto_ACCharList_send( seri , FAILED , "locked" , Pfd ); + total_ng_charlist++; + }else { + loadCharNameAndOption( Pcdkey , listbuf,sizeof(listbuf)); + saacproto_ACCharList_send( seri , SUCCESSFUL , listbuf , Pfd); + total_ok_charlist++; + } +#endif +} + +void LServer_SACheckLock1_send( int ti, char *Pcdkey, int Pid, int flg) +{ + char buf[4096]; + sprintf( buf, "SACheckLock1 %d %s %d %d %s\n", ti, Pcdkey, Pid, flg, "CHECK"); + if( Add_LS_WRMemBuffer( buf, sizeof( buf), MEMWRITE) == FALSE ) { + log( "LS WRITE ERROR!!"); + } +} + +void LServer_SACheckLock2_send( int ti, char *Pcdkey, int Pid, char *charname, int flg, char *pro) +{ + char buf[4096]; + sprintf( buf, "SACheckLock2 %d %s %d %s %d %s\n", ti, Pcdkey, Pid, charname, flg, pro); + if( Add_LS_WRMemBuffer( buf, sizeof( buf), MEMWRITE) == FALSE ) { + log( "LS WRITE ERROR!!"); + } +} + +void LServer_SACheckLock2_recv( char *si, char *Pcdkey, char *Pid, char *name, char *flg, char *pro) +{ +#ifndef _TEST_LOCKSERVER + int Pfd, Flg, seri; + int charindex=-1; + char loadbuf[CHARDATASIZE]; + char infobuf[CHARDATASIZE]; + Pfd = atoi( Pid); + Flg = atoi( flg); + seri = atoi( si); + +#define IS_2BYTEWORD( _a_ ) ( (char)(0x80) <= (_a_) && (_a_) <= (char)(0xFF) ) + + + if( !strcmp( flg, "LOCKED") ) { + saacproto_ACCharLoad_send( seri , FAILED , "locked" , Pfd, charindex ); + }else { + int lock = 1; + charindex = getCharIndexByName( Pcdkey , name ); + if( charindex < 0 ){ + saacproto_ACCharLoad_send( seri , FAILED , "char nonexistent" , Pfd , charindex ); + return; + } + log( "loadCharOne: id:[%s] char:[%s]\n", Pcdkey, name ); + if( loadCharOne( Pcdkey , charindex , loadbuf ,sizeof( loadbuf ))<0){ + saacproto_ACCharLoad_send( seri , FAILED , + "cannot load ( disk i/o error?)", Pfd, charindex ); + return; + } + {//ttom + char *c_ptr; + c_ptr=loadbuf; + while(*c_ptr!='\0'){ + if( IS_2BYTEWORD(*c_ptr) ){ + if(*(c_ptr+1)==' '){ + *(c_ptr+1)=0x41; + } + c_ptr++; + if(*c_ptr=='\0') break; + } + c_ptr++; + } + }//ttom + + if( lock ){ + char result[100]; + char retdata[100]; +#ifdef _LOCK_ADD_NAME + if( lockUser( getGSName(seri) , Pcdkey , name , passwd , 1 , result , sizeof( result ) , + retdata , sizeof( retdata ) , pro , "0")<0){ +#else + if( lockUser( getGSName(seri) , Pcdkey , passwd , 1 , result , sizeof( result ) , + retdata , sizeof( retdata ) , pro , "0")<0){ +#endif + saacproto_ACCharLoad_send( seri , FAILED , "lock FAIL" , Pfd, charindex ); + log(" SAAC lock %s|%s FAIL!!\n", getGSName(seri), Pcdkey); + return; + } + } + //LS LOCK + if( CHECK_LS_BEUSE() == TRUE ) { + LServer_SALock_send( seri, Pcdkey, Pfd, name, 1); + } + + memset( infobuf , 0 , sizeof( infobuf )); + getCharInfoFromString( loadbuf , infobuf ); + makeStringFromEscaped( infobuf ); + saacproto_ACCharLoad_send( seri , SUCCESSFUL , infobuf , Pfd, charindex ); + + } +#endif +} + +void LServer_SALock_recv( char *si, char *Pcdkey, char *Pid, char *name, char *flg) +{ + int Pfd, seri; + Pfd = atoi( Pid); + seri = atoi( si); + + if( !strcmp( flg, "FAIL") ) { + log( "LS Lock %s|%s FAIL!!\n", getGSName(seri), Pcdkey); + } +} + +void LServer_SALock_send( int ti, char *Pcdkey, int Pid, char *Pname, int flg) +{ + //si[256], SANAME[256], PCDKEY[256], PNAME[256], FLG[256]; + char buf[4096]; + + sprintf( buf, "SALock %d %s %s %d %s %d\n", ti, SaName, Pcdkey, Pid, Pname, flg); + if( Add_LS_WRMemBuffer( buf, sizeof( buf), MEMWRITE) == FALSE ) { + log( "LS WRITE ERROR!!"); + } +} + +void LServer_SAUNLock_recv( char *si, char *Pcdkey, char *Pid, char *flg) +{ + int Pfd, seri; + Pfd = atoi( Pid); + seri = atoi( si); + + if( !strcmp( flg, "FAIL") ) { + log( "LS UNLock %s|%s FAIL!!\n", getGSName(seri), Pcdkey); + } +} + +void LServer_SAUNLock_send( int ti, char *Pcdkey, int Pid, int flg) +{ + char buf[4096]; + + sprintf( buf, "SAUNLock %d %s %s %d %d\n", ti, SaName, Pcdkey, Pid, flg); + if( Add_LS_WRMemBuffer( buf, sizeof( buf), MEMWRITE) == FALSE ) { + log( "LS WRITE ERROR!!\n"); + } +} + +void LServer_SAUCheck_recv( char *Pcdkey) +{ + if( isLocked( Pcdkey ) ){ + saacproto_SAUCheck_send( Pcdkey, 1); + checkGSUCheck( Pcdkey ); + return; + }else { + saacproto_SAUCheck_send( Pcdkey, 0); + return; + } +} +void saacproto_SAUCheck_send( char *Pcdkey, int flg) +{ + char buf[4096]; + + sprintf( buf, "SAUCheck %s %s %d\n", SaName, Pcdkey, flg); + if( Add_LS_WRMemBuffer( buf, sizeof( buf), MEMWRITE) == FALSE ) { + log( "LS WRITE ERROR!!"); + } +} + +void DefTimeC( char *buf, int flg)// 1 比较 2 秀时间 0 替换 +{ + static long int dTimes = 0; + time_t defLsTime; + + defLsTime = time(NULL); + if( flg == 1 ) { + if( defLsTime != dTimes ) { + log( "Time[%s]:%ld|%ld|%ld..\n", buf, defLsTime, dTimes, (defLsTime-dTimes)); + dTimes = defLsTime; + } + }else if( flg == 2 ) { + log( "Time[%s]:%ld..\n", buf, defLsTime); + }else { + dTimes = defLsTime; + } +} + +void REreadConfig( char *path ) +{ + char buf[2048]; + FILE *fp; + + fp = fopen( path , "r" ); + if( fp == NULL ) + return; + + while( fgets( buf , sizeof( buf ) , fp )){ + char command[1024]; + char param[2048]; + chop(buf); + + easyGetTokenFromString( buf , 1 , command , sizeof( command )); + easyGetTokenFromString( buf , 2 , param , sizeof( param )); + + if( strcmp( command, "SANAME" ) == 0 ){ + snprintf( SaName, sizeof( SaName ), param ); + } else if( strcmp( command, "LSADDRESS" ) == 0 ){ + snprintf( LSADDRESS, sizeof( LSADDRESS ), param ); + } else if( strcmp( command, "LSPORT" ) == 0 ){ + LSPORT = atoi( param); + } + } + + fclose(fp); + +} + +#ifdef _TEST_LOCKSERVER +void TEST_TOLOCKSERVER() +{ + static int po=0; + static time_t defLsTime; + //char charname[256]={"ankoo"}; + //char Pcdkey[256]; + int mesgid = -1; + int seri=-1; + + if( !Ls.data[LS_USE] ) + return; + if( defLsTime == time( NULL) ) + return; + defLsTime = time( NULL); + + //sprintf( Pcdkey,"%s", charname); + switch( po) { + case 0: + LServer_SACheckLock1_send( seri, TESTNAME, mesgid, 1); + LServer_SACheckLock2_send( seri, TESTNAME, mesgid, TESTNAME, 1, "-1"); + break; + case 1: + LServer_SALock_send( seri, TESTNAME, mesgid, TESTNAME, 1); + break; + case 2: + LServer_SAUNLock_send( seri, TESTNAME, mesgid, 1); + break; + } + po++; + po = po%3; +} +#endif + +#endif diff --git a/saac/saacproto_lserver.h b/saac/saacproto_lserver.h new file mode 100644 index 0000000..4370a70 --- /dev/null +++ b/saac/saacproto_lserver.h @@ -0,0 +1,113 @@ +#ifndef _LSERVER_H +#define _LSERVER_H + +#include "version.h" + +#ifdef _LOCK_SERVER +#define _DEFLSCONNECT +#ifndef BOOL +#define BOOL int +#define TRUE 1 +#define FALSE 0 +#endif + + +enum { + LS_PORT = 0, + LS_LASTTIME, + LS_FD, + LS_USE, + LS_TYPE, + LS_TI, + LS_LASTERROR, + LS_MAXDATA, +}; + +enum { + LSTYPE_NORMAL=0, + LSTYPE_STANDBY, + LSTYPE_BEDIE, + + LS_OK = 1000, + LSMESS_NOCONNECT, + LSMESS_BELIFE, + LSMESS_SOCKERROR, + LSMESS_HOSTERROR, + LSMESS_READERROR, + LSMESS_WRITEERROR, + LSMESS_LSMEMERROR, +}; + +typedef struct MemMessage +{ + char buf[4096]; + int type; + struct MemMessage *next; +}LSMem; + +#define MEMREAD 1 +#define MEMWRITE 2 +typedef struct _LockServer +{ + char address[256]; + int data[LS_MAXDATA]; + int errs; + int m_ri; + int m_wi; +}LServer; +extern LServer Ls; + + +BOOL LServerInit(); +BOOL connectToLServer( char *laddress, int lport); +BOOL DisConnectLServer(); +int tcpip_connect( char *addr , int port); +int LS_getData( int stype); +BOOL Add_LS_WRMemBuffer( char *buf, int strlens, int flg); +LSMem *MEMBUF_getNew(); +void DEL_LS_MemBufferList( LSMem *FlgMem ); +int MMGet_LS_WRMemBufList( char *buf, int len, int flg); +BOOL TcpIp_LS_accept(); +int MMGet_LsReadBuflist( char *buf, int len); +BOOL CHECK_LS_BEUSE(); +void CHECK_LSTYPE(); +int get_LSFD(); +void Show_LS_MEMBufferList(); +void DEL_LS_MemBufferHead(); + +typedef struct _SAMessCommand +{ + char buf[256]; + int len; + struct _SAMessCommand *next; +}SAMessC; +BOOL SAMESS_setChar( char *buf); +BOOL SAMESS_getChar( char *buf, int *len); + +SAMessC *MESS_getNew(); + +int lockproto_SaacDispatchMessage( char *encoded ); + +void LServer_SALogin_send(); +void LServer_SACheckLock1_send( int ti, char *Pcdkey, int Pid, int flg); +void LServer_SACheckLock1_recv( char *si, char *Pcdkey, char *Pid, char *flg, char *PASS); +void LServer_SACheckLock2_send( int ti, char *Pcdkey, int Pid, char *charname, int flg, char *pro); +void LServer_SACheckLock2_recv( char *si, char *Pcdkey, char *Pid, char *name, + char *flg, char *pro); +void LServer_SALock_recv( char *si, char *Pcdkey, char *Pid, char *name, char *flg); +void LServer_SALock_send( int ti, char *Pcdkey, int Pid, char *Pname, int flg); +void LServer_SAUNLock_recv( char *si, char *Pcdkey, char *Pid, char *flg); +//si[256], PCDKEY[256], Pid[256], FLG[256]; +void LServer_SAUNLock_send( int ti, char *Pcdkey, int Pid, int flg); +//check +void LServer_SAUCheck_recv( char *Pcdkey); +void saacproto_SAUCheck_send( char *Pcdkey, int flg); + +void DefTimeC( char *buf, int flg); +#ifdef _TEST_LOCKSERVER +void TEST_TOLOCKSERVER(); +#endif +#endif +#endif + + diff --git a/saac/saacproto_oac.c b/saac/saacproto_oac.c new file mode 100644 index 0000000..0b839f9 --- /dev/null +++ b/saac/saacproto_oac.c @@ -0,0 +1,338 @@ +#include "version.h" +#include "main.h" +#include "util.h" +#include "char.h" +#include "tcpip_util.h" +#include "saacproto_util.h" +#include "saacproto_oac.h" + +#ifdef _OACSTRUCT_TCP + +#define BACKLOGNUM 5 +int oactcptype = -1; +static int btime = 0; +OACListArray OAC_List[MAXTCPCONNECTION]; + +int OAC_InitTcpIp( int tcptype, char *addr, int tport) +{ + int tcpdb=0, binport=OAC_PORT; + + //andy_log + log( "_InitTcpIp( %d)\n", tcptype); + OAC_InitAclist(); + + if( MEMBUF_InitSize( CHARDATASIZE * 4 * MAXTCPCONNECTION , tcpdb ) != OK ){ + return INIT_SOMEERROR; + } + if( tport > 0 ) + binport = tport; + + oactcptype = tcptype; + switch( tcptype){ + case OACTYPE_BIND: + if( TCPIP_bindSocket( addr , binport, 0) < 0 ) + return INIT_SOMEERROR; + break; + case OACTYPE_CONNECT: + OAC_ReadFileInsertAcList( "oac.lis"); + OAC_ConnectOacList(); +// if( OAC_ConnectOacList() == 0 ) +// return INIT_SOMEERROR; + break; + default: + + return INIT_SOMEERROR; + } + return OK; +} + +int OAC_ConnectOacList( void) +{ + int i=0, cnt=0; + for( i=0; i btime){ + OAC_CheckConnect(); + btime = detime+180; + } + return 1; +} + +int OAC_ReadMessLine( void) +{ + int i=0, l; + char buf[ CHARDATASIZE*4 ]; + + for( i=0; i= MAXTCPCONNECTION ) break; + } + fclose( fp); + {//andy_log + int i; + for( i=0; i charindex(%d)", charindex ); + + saacproto_ACRELOADFM_recv( fd, charindex ); + + return 0; + } + + if ( strcmp( funcname, "ACShowMemberList2") == 0){ + int fm1 = -1, fm2 = -1, charindex = -1, time = -1, id = -1; + + charindex = saacproto_demkstr_int(saacproto.token_list[2]); + fm1 = saacproto_demkstr_int(saacproto.token_list[3]); + fm2 = saacproto_demkstr_int(saacproto.token_list[4]); + time = saacproto_demkstr_int(saacproto.token_list[5]); + id = saacproto_demkstr_int(saacproto.token_list[6]); + + log("\n won test 40 ==> charindex(%d) fm1(%d) fm2(%d) time(%d) id(%d)", charindex, fm1, fm2, time, id ); + + saacproto_ACShowMemberList_2_recv(fd, charindex, fm1, fm2, time, id ); + + return 0; + } + +#endif + + +#ifdef _DEATH_FAMILY_LOGIN_CHECK // WON ADD 家族战登入检查 + // 玩家login2 + if ( strcmp( funcname, "ACFMCharLogin2") == 0){ + int charindex = -1; + char *char_id, *char_name; + + char_id = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + char_name = saacproto_wrapStringAddr(saacproto_stringwrapper[2], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[3])); + charindex = saacproto_demkstr_int(saacproto.token_list[4]); + + log("\n won test 4 ==> char_id(%s) char_name(%s) charindex(%d)", char_id, char_name, charindex ); + + saacproto_ACFMCharLogin2_recv(fd, char_id, char_name, charindex ); + + return 0; + } +#endif + + // 玩家login + if ( strcmp( funcname, "ACFMCharLogin") == 0){ + int fmindex, charlv, charfdid; +#ifdef _FM_MODIFY + int gsnum; +#endif + char *fmname, *charname, *charid; +#ifdef _FMVER21 + int eventflag; +#endif + fmname = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + fmindex = saacproto_demkstr_int(saacproto.token_list[3]); + charname = saacproto_wrapStringAddr(saacproto_stringwrapper[3], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[4])); + charid = saacproto_wrapStringAddr(saacproto_stringwrapper[4], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[5])); + charlv = saacproto_demkstr_int(saacproto.token_list[6]); + +#ifdef _FMVER21 + eventflag = saacproto_demkstr_int(saacproto.token_list[7]); + charfdid = saacproto_demkstr_int(saacproto.token_list[8]); + #ifdef _FM_MODIFY + gsnum = saacproto_demkstr_int(saacproto.token_list[9]); + saacproto_ACFMCharLogin_recv(fd, fmname, fmindex, charname,charid, charlv, eventflag, charfdid,gsnum); + #else + saacproto_ACFMCharLogin_recv(fd, fmname, fmindex, charname,charid, charlv, eventflag, charfdid); + #endif +#else + charfdid = saacproto_demkstr_int(saacproto.token_list[7]); + saacproto_ACFMCharLogin_recv(fd, fmname, fmindex, charname,charid, charlv, charfdid); +#endif + return 0; + } + // 玩家logout + if ( strcmp( funcname, "ACFMCharLogout") == 0){ + int fmindex, charfdid, charlv, index; + char *fmname, *charname, *charid; + fmname = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + fmindex = saacproto_demkstr_int(saacproto.token_list[3]); + charname = saacproto_wrapStringAddr(saacproto_stringwrapper[3], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[4])); + charid = saacproto_wrapStringAddr(saacproto_stringwrapper[4], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[5])); + charlv = saacproto_demkstr_int(saacproto.token_list[6]); + index = saacproto_demkstr_int(saacproto.token_list[7]); + charfdid = saacproto_demkstr_int(saacproto.token_list[8]); + saacproto_ACFMCharLogout_recv(fd, fmname, fmindex, charname, + charid, charlv, index, charfdid); + return 0; + } + // 族长审核成员加入家族、修改家族成员职位 + if (strcmp( funcname, "ACMemberJoinFM") == 0){ + int fmindex, charfdid, index, charindex, result; + char *fmname, *charname; +#ifdef _FMVER21 + int meindex; +#endif + fmname = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + fmindex = saacproto_demkstr_int(saacproto.token_list[3]); + charname = saacproto_wrapStringAddr(saacproto_stringwrapper[3], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[4])); + charindex = saacproto_demkstr_int(saacproto.token_list[5]); + index = saacproto_demkstr_int(saacproto.token_list[6]); + result = saacproto_demkstr_int(saacproto.token_list[7]); +#ifdef _FMVER21 + meindex = saacproto_demkstr_int(saacproto.token_list[8]); + charfdid = saacproto_demkstr_int(saacproto.token_list[9]); + saacproto_ACMemberJoinFM_recv(fd, fmname, fmindex, charname, + charindex, index, result, meindex, charfdid); +#else + charfdid = saacproto_demkstr_int(saacproto.token_list[8]); + saacproto_ACMemberJoinFM_recv(fd, fmname, fmindex, charname, + charindex, index, result, charfdid); +#endif + return 0; + } + // 族长审核成员离开家族 + if (strcmp( funcname, "ACMemberLeaveFM") == 0){ + int fmindex, charfdid, index, charindex; + char *fmname, *charname; +#ifdef _FMVER21 + int meindex; +#endif + fmname = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + fmindex = saacproto_demkstr_int(saacproto.token_list[3]); + charname = saacproto_wrapStringAddr(saacproto_stringwrapper[3], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[4])); + charindex = saacproto_demkstr_int(saacproto.token_list[5]); + index = saacproto_demkstr_int(saacproto.token_list[6]); +#ifdef _FMVER21 + meindex = saacproto_demkstr_int(saacproto.token_list[7]); + charfdid = saacproto_demkstr_int(saacproto.token_list[8]); + saacproto_ACMemberLeaveFM_recv(fd, fmname, fmindex, charname, + charindex, index, meindex, charfdid); +#else + charfdid = saacproto_demkstr_int(saacproto.token_list[7]); + saacproto_ACMemberLeaveFM_recv(fd, fmname, fmindex, charname, + charindex, index, charfdid); +#endif + return 0; + } + // 列出家族据点 + if ( strcmp( funcname, "ACFMPointList") == 0){ + saacproto_ACFMPointList_recv(fd); + return 0; + } + + +#ifdef _CK_ONLINE_PLAYER_COUNT // WON ADD 计算线上人数 + if ( strcmp( funcname, "ACGSPCOUNT") == 0){ + int playcount = 0; + playcount = saacproto_demkstr_int(saacproto.token_list[2]); + saacproto_GS_ACK_PLAYER_COUNT_recv( fd, playcount ); + return 0; + } +#endif + + // 申请家族据点 + if (strcmp( funcname, "ACSetFMPoint") == 0){ + int fl, x, y, fmindex, index, fmpointindex, charfdid; + char *fmname; + fmname = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + fmindex = saacproto_demkstr_int(saacproto.token_list[3]); + index = saacproto_demkstr_int(saacproto.token_list[4]); + fmpointindex = saacproto_demkstr_int(saacproto.token_list[5]); + fl = saacproto_demkstr_int(saacproto.token_list[6]); + x = saacproto_demkstr_int(saacproto.token_list[7]); + y = saacproto_demkstr_int(saacproto.token_list[8]); + charfdid = saacproto_demkstr_int(saacproto.token_list[9]); + saacproto_ACSetFMPoint_recv(fd, fmname, fmindex, index, + fmpointindex, fl, x, y, charfdid); + return 0; + } + // 设定家族据点 + if (strcmp( funcname, "ACFixFMPoint") == 0){ + int winindex, winfmindex, loseindex, losefmindex, village; + char *winfmname, *losefmname; + winfmname = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + winfmindex = saacproto_demkstr_int(saacproto.token_list[3]); + winindex = saacproto_demkstr_int(saacproto.token_list[4]); + losefmname = saacproto_wrapStringAddr(saacproto_stringwrapper[4], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[5])); + losefmindex = saacproto_demkstr_int(saacproto.token_list[6]); + loseindex = saacproto_demkstr_int(saacproto.token_list[7]); + village= saacproto_demkstr_int(saacproto.token_list[8]); + saacproto_ACFixFMPoint_recv(fd, winfmname, winfmindex, winindex, + losefmname, losefmindex, loseindex, village); + return 0; + } + // 族长对全员广播 + if (strcmp( funcname, "ACFMAnnounce") == 0){ + int index, fmindex, color; + char *fmname, *data; + fmname = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + fmindex = saacproto_demkstr_int(saacproto.token_list[3]); + index = saacproto_demkstr_int(saacproto.token_list[4]); + data = saacproto_wrapStringAddr(saacproto_stringwrapper[4], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[5])); + color = saacproto_demkstr_int(saacproto.token_list[6]); + saacproto_ACFMAnnounce_recv(fd, fmname, fmindex, index, data, color); + return 0; + } + // 列出家族排行榜 + if ( strcmp( funcname, "ACShowTopFMList") == 0){ + int kindflag; + char *tmpbuf; + tmpbuf = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + kindflag = saacproto_demkstr_int(saacproto.token_list[3]); + saacproto_ACShowTopFMList_recv(fd, kindflag); + return 0; + } + // 修正家族资料 + if (strcmp( funcname, "ACFixFMData") == 0){ + int fmindex, charfdid, index, kindflag, charindex; + char *fmname, *data1, *data2; + fmname = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + fmindex = saacproto_demkstr_int(saacproto.token_list[3]); + index = saacproto_demkstr_int(saacproto.token_list[4]); + kindflag = saacproto_demkstr_int(saacproto.token_list[5]); + data1 = saacproto_wrapStringAddr(saacproto_stringwrapper[5], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[6])); + data2 = saacproto_wrapStringAddr(saacproto_stringwrapper[6], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[7])); + charindex = saacproto_demkstr_int(saacproto.token_list[8]); + charfdid = saacproto_demkstr_int(saacproto.token_list[9]); + saacproto_ACFixFMData_recv(fd, fmname, fmindex, index, kindflag, + data1, data2, charindex, charfdid); + return 0; + } +#ifdef _FAMILYBANKSTONELOG + if (strcmp( funcname, "ACgetFMBankgold") ==0){ + int fmindex, charfdid, index, charindex; + char *fmname; + fmname = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + fmindex = saacproto_demkstr_int(saacproto.token_list[3]); + index = saacproto_demkstr_int(saacproto.token_list[4]); + charindex = saacproto_demkstr_int(saacproto.token_list[5]); + charfdid = saacproto_demkstr_int(saacproto.token_list[6]); + saacproto_ACgetFMBankgold_recv(fd, fmname, fmindex, index, charindex, charfdid); + return 0; + } +#endif + +#ifdef _DEATH_FAMILY_STRUCT // WON ADD 家族战存放胜负资料 + if (strcmp( funcname, "FMINITPKSTRUCT") == 0){ + log("\n won test 300 ==>" ); + set_fm_pk_score( "" ); +// save_fm_pk_score(); + return 0; + } + + if (strcmp( funcname, "FMPKSTRUCT") == 0){ + char *msg; + + msg = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + + log("\n won test 54 ==> msg(%s)", msg ); + + set_fm_pk_score( msg ); +// save_fm_pk_score(); + + return 0; + } +#endif + + + // 家族PK後修正声望 + if (strcmp( funcname, "ACFixFMPK") == 0){ + int winindex, winfmindex, loseindex, losefmindex; + char *winfmname, *losefmname; + winfmname = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + winfmindex = saacproto_demkstr_int(saacproto.token_list[3]); + winindex = saacproto_demkstr_int(saacproto.token_list[4]); + losefmname = saacproto_wrapStringAddr(saacproto_stringwrapper[4], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[5])); + losefmindex = saacproto_demkstr_int(saacproto.token_list[6]); + loseindex = saacproto_demkstr_int(saacproto.token_list[7]); + saacproto_ACFixFMPK_recv(fd, winfmname, winfmindex, winindex, + losefmname, losefmindex, loseindex); + return 0; + } + // GM修正家族资料 + if (strcmp( funcname, "ACGMFixFMData") == 0){ + int index, charfdid; + char *cmd, *data, *tmpbuf,*charid; + tmpbuf = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + index = saacproto_demkstr_int(saacproto.token_list[3]); + charid = saacproto_wrapStringAddr(saacproto_stringwrapper[3], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[4])); + cmd = saacproto_wrapStringAddr(saacproto_stringwrapper[4], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[5])); + data = saacproto_wrapStringAddr(saacproto_stringwrapper[5], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[6])); + charfdid = saacproto_demkstr_int(saacproto.token_list[7]); + saacproto_ACGMFixFMData_recv(fd, index, charid, cmd, data, charfdid); + return 0; + } + // 取得家族资料 + if (strcmp( funcname, "ACGetFMData") == 0){ + int fmindex, charfdid, index, kindflag; + char *fmname; + fmname = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + fmindex = saacproto_demkstr_int(saacproto.token_list[3]); + index = saacproto_demkstr_int(saacproto.token_list[4]); + kindflag = saacproto_demkstr_int(saacproto.token_list[5]); + charfdid = saacproto_demkstr_int(saacproto.token_list[6]); + saacproto_ACGetFMData_recv(fd, fmname, fmindex, index, kindflag, + charfdid); + return 0; + } + // 广播踢馆人的资料 + if (strcmp( funcname,"ACManorPKAck") == 0){ + char *data; + data = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + saacproto_ACManorPKAck_recv(fd, data); + return 0; + } + +#ifdef _CHECKFMSCHEDULE // Syu ADD 透过AC确认家族挑战排程 + if (strcmp( funcname,"ACCheckSchedule") ==0) + { + char *data; + data = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + saacproto_ACCheckSchedule_recv(fd,data); + return 0; + } +#endif + + if (strcmp( funcname,"ACreLoadFmData") ==0){ + int type, data; + type = saacproto_demkstr_int(saacproto.token_list[2]); + data = saacproto_demkstr_int(saacproto.token_list[3]); + saacproto_ACreLoadFmData_recv( fd, type, data); + return 0; + } + +#ifdef _AC_SEND_FM_PK + if (strcmp( funcname,"ACLoadFmPk") ==0) + { + int fmpks_pos; + fmpks_pos = saacproto_demkstr_int(saacproto.token_list[2]); + saacproto_ACLoadFmPk_recv(fd, fmpks_pos); + return 0; + } +#ifdef _ACFMPK_LIST + if (strcmp( funcname,"ACSendFmPk") ==0){ + int fmpks_pos, userindex, flg; + char *data; + fmpks_pos = saacproto_demkstr_int(saacproto.token_list[2]); + userindex = saacproto_demkstr_int(saacproto.token_list[3]); + flg = saacproto_demkstr_int(saacproto.token_list[4]); + data = saacproto_wrapStringAddr( saacproto_stringwrapper[4] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[5] )); + saacproto_ACSendFmPk_recv( fd, fmpks_pos, userindex, flg, data); + return 0; + } +#else + if (strcmp( funcname,"ACSendFmPk") ==0){ + int fmpks_pos; + char *data; + fmpks_pos = saacproto_demkstr_int(saacproto.token_list[2]); + data = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); + saacproto_ACSendFmPk_recv(fd, fmpks_pos, data); + return 0; + } +#endif + +#endif + + + +#ifdef _RECAL_BACKUP_PLAYER // WON 回溯功能 + + if (strcmp( funcname,"ACSendRecalPlayer") ==0) + { + char *uid, *id; + int userfdid, char_num, date, GmCliId, backup_flag; + + uid = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); + userfdid = saacproto_demkstr_int(saacproto.token_list[3]); + GmCliId = saacproto_demkstr_int(saacproto.token_list[4]); + id = saacproto_wrapStringAddr( saacproto_stringwrapper[4] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[5] )); + char_num = saacproto_demkstr_int(saacproto.token_list[6]); + date = saacproto_demkstr_int(saacproto.token_list[7]); + backup_flag = saacproto_demkstr_int(saacproto.token_list[8]); + + saacproto_ACRecalPlayer_recv(fd, uid, userfdid, GmCliId, id, char_num, date, backup_flag); + + return 0; + } + + if (strcmp( funcname,"ACSendRecalBackup") ==0) + { + char *uid, *id, *char_data; + int userfdid, char_num, date, GmCliId, backup_flag; + + uid = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); + userfdid = saacproto_demkstr_int(saacproto.token_list[3]); + GmCliId = saacproto_demkstr_int(saacproto.token_list[4]); + id = saacproto_wrapStringAddr( saacproto_stringwrapper[4] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[5] )); + char_num = saacproto_demkstr_int(saacproto.token_list[6]); + date = saacproto_demkstr_int(saacproto.token_list[7]); + char_data = saacproto_wrapStringAddr( saacproto_stringwrapper[7] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[8] )); + backup_flag = saacproto_demkstr_int(saacproto.token_list[9]); + + saacproto_ACRecalBackup_recv(fd, uid, userfdid, GmCliId, id, char_num, date, char_data, backup_flag); + + return 0; + } +#endif // end RECAL_ASK_PLAYER + +#ifdef _AUCTIONEER + if (strcmp( funcname,"ACAuctionSold") == 0){ + char *data; + data = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); + saacproto_ACAuctionSold_recv(fd, data); + return 0; + } +#endif + +#ifdef _NEW_PLAYERGOLD + if (strcmp( funcname,"ACNewPlayerList") == 0){ + int RunType=-1, userIndex=-1; + char *CdKey, *UserName; + CdKey = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, + saacproto_demkstr_string(saacproto.token_list[2])); + UserName = saacproto_wrapStringAddr(saacproto_stringwrapper[2], saacproto.workbufsize, + saacproto_demkstr_string(saacproto.token_list[3])); + userIndex = saacproto_demkstr_int(saacproto.token_list[4]); + RunType = saacproto_demkstr_int(saacproto.token_list[5]); + saacproto_ACNewPlayerList_recv( fd, CdKey, UserName, userIndex, RunType); + return 0; + } + +#endif + +#ifdef _DEFEND_NEWUSERS + if( strcmp( funcname , "DEFENDLISTS" ) == 0 ){ + char* data; + int type; + type = saacproto_demkstr_int(saacproto.token_list[2]); + data = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); + saacproto_DefendList_recv( fd, type, data); + + return 0; + } + if( strcmp( funcname , "CHECKDEFENDSCORE" ) == 0 ){ + char *cdkey, *name; + int userindex; + cdkey = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); + name = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); + userindex = saacproto_demkstr_int(saacproto.token_list[4]); + saacproto_CheckDefendScore_recv( fd, userindex, cdkey, name); + return 0; + } +#endif + + +#ifdef _CHAR_POOLITEM + if( strcmp( funcname , "ACInsertPoolItem" ) == 0 ){ + char *cdkey, *Pooldataarg; + int clifdid, userindex; + + cdkey = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); + Pooldataarg = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); + userindex = saacproto_demkstr_int( saacproto.token_list[4] ); + clifdid = saacproto_demkstr_int( saacproto.token_list[5] ); + saacproto_ACCharInsertPoolItem_recv( fd, cdkey, userindex, clifdid, Pooldataarg); + return 0; + } + if( strcmp( funcname , "ACSavePoolItem" ) == 0 ){ + char *cdkey, *Pooldataarg; + int clifdid, userindex; + + cdkey = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); + Pooldataarg = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); + userindex = saacproto_demkstr_int( saacproto.token_list[4] ); + clifdid = saacproto_demkstr_int( saacproto.token_list[5] ); + saacproto_ACCharSavePoolItem_recv( fd, cdkey, userindex, clifdid, Pooldataarg); + return 0; + } + + if( strcmp( funcname , "ACGetPoolItem" ) == 0 ){ + char *cdkey; + int clifdid, userindex, npcid; + cdkey = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); + userindex = saacproto_demkstr_int( saacproto.token_list[3] ); + clifdid = saacproto_demkstr_int( saacproto.token_list[4] ); + npcid = saacproto_demkstr_int( saacproto.token_list[5] ); + + saacproto_ACCharGetPoolItem_recv( fd, cdkey, userindex, clifdid, npcid); + return 0; + } +#endif + + +#ifdef _CHAR_POOLPET + if( strcmp( funcname , "ACInsertPoolPet" ) == 0 ){ + char *cdkey, *Pooldataarg; + int clifdid, userindex; + + cdkey = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); + Pooldataarg = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); + userindex = saacproto_demkstr_int( saacproto.token_list[4] ); + clifdid = saacproto_demkstr_int( saacproto.token_list[5] ); + saacproto_ACCharInsertPoolPet_recv( fd, cdkey, userindex, clifdid, Pooldataarg); + return 0; + } + if( strcmp( funcname , "ACSavePoolPet" ) == 0 ){ + char *cdkey, *Pooldataarg; + int clifdid, userindex; + + cdkey = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); + Pooldataarg = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); + userindex = saacproto_demkstr_int( saacproto.token_list[4] ); + clifdid = saacproto_demkstr_int( saacproto.token_list[5] ); + saacproto_ACCharSavePoolPet_recv( fd, cdkey, userindex, clifdid, Pooldataarg); + return 0; + } + + if( strcmp( funcname , "ACGetPoolPet" ) == 0 ){ + char *cdkey; + int clifdid, userindex, npcid; + cdkey = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); + userindex = saacproto_demkstr_int( saacproto.token_list[3] ); + clifdid = saacproto_demkstr_int( saacproto.token_list[4] ); + npcid = saacproto_demkstr_int( saacproto.token_list[5] ); + + saacproto_ACCharGetPoolPet_recv( fd, cdkey, userindex, clifdid, npcid); + return 0; + } +#endif + + + +#ifdef _UNIVERSE_CHATROOM + if( strcmp( funcname , "ACUniChatroom" ) == 0 ){ + char *cdkey, *data; + int clifdid, userindex; + cdkey = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); + data = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); + userindex = saacproto_demkstr_int( saacproto.token_list[4] ); + clifdid = saacproto_demkstr_int( saacproto.token_list[5] ); + + saacproto_ACUniChatroom_recv( fd, cdkey, data, userindex, clifdid ); + return 0; + } +#endif + + +#ifdef _ANGEL_SUMMON + if( strcmp( funcname , "ACMissionTable" ) == 0 ){ + int num; + int type; + char* data; + //int charaindex; + char* angelinfo; + + num = saacproto_demkstr_int( saacproto.token_list[2] ); + type = saacproto_demkstr_int( saacproto.token_list[3] ); + data = saacproto_wrapStringAddr( saacproto_stringwrapper[3] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[4] )); + //charaindex = saacproto_demkstr_int( saacproto.token_list[5] ); + angelinfo = saacproto_wrapStringAddr( saacproto_stringwrapper[4] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[5] )); + + saacproto_ACMissionTable_recv( fd, num, type, data, angelinfo); + return 0; + } +#endif + +#ifdef _TEACHER_SYSTEM + if( strcmp( funcname , "ACCheckCharacterOnLine" ) == 0 ){ + int charaindex,flag; + char *id; + char *name; + + charaindex = saacproto_demkstr_int( saacproto.token_list[2] ); + id = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); + name = saacproto_wrapStringAddr( saacproto_stringwrapper[3] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[4] )); + flag = saacproto_demkstr_int( saacproto.token_list[5] ); + + saacproto_ACCheckCharacterOnLine_recv(fd,charaindex,id,name,flag); + return 0; + } +#endif + +#ifdef _RACEMAN + if( strcmp( funcname , "ACRaceRecordandSort" ) == 0 ){ + int charaindex,racetype,catchcnt,ranknum; + char *id; + char *name; + char *code; + + charaindex = saacproto_demkstr_int( saacproto.token_list[2] ); + code = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); + id = saacproto_wrapStringAddr( saacproto_stringwrapper[3] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[4] )); + name = saacproto_wrapStringAddr( saacproto_stringwrapper[4] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[5] )); + racetype = saacproto_demkstr_int( saacproto.token_list[6] ); + catchcnt = saacproto_demkstr_int( saacproto.token_list[7] ); //玩家目前抓多少只 + ranknum = saacproto_demkstr_int( saacproto.token_list[8] ); //server要排名到几个 + + saacproto_ACRaceRecordandSort_recv( fd , charaindex , code , id , name , racetype , catchcnt ,ranknum ); + return 0; + } + + if( strcmp( funcname , "ACRaceRecordfmdo" ) == 0 ){ + int charaindex; + int fmid , bbi; + char *unicode , *petname; + + charaindex = saacproto_demkstr_int( saacproto.token_list[2] ); + fmid = saacproto_demkstr_int( saacproto.token_list[3] ); + bbi = saacproto_demkstr_int( saacproto.token_list[4] ); + unicode = saacproto_wrapStringAddr( saacproto_stringwrapper[4] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[5] )); + petname = saacproto_wrapStringAddr( saacproto_stringwrapper[5] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[6] )); + + saacproto_ACRaceRecordfmdo_recv( fd , charaindex , fmid , bbi , unicode , petname ); + return 0; + } + +#endif + + sprintf( debugfun, "%s", funcname); + + return -1; +} + +void saacproto_ACServerLogin_send( int fd,char* result,char* data ) +{ + saacproto_CreateHeader( saacproto.work , "ACServerLogin" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( result ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( data ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} + +void saacproto_ACCharList_send( int fd,char* result,char* output,int id ) +{ + saacproto_CreateHeader( saacproto.work , "ACCharList" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( result ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( output ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( id ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} +static int CharDataLens = 0; +#ifdef _NewSave +void saacproto_ACCharLoad_send( int fd,char* result,char* data,int id,int charindex ) +#else +void saacproto_ACCharLoad_send( int fd,char* result,char* data,int id ) +#endif +{ + if( strstr( result, "successful") != NULL && strlen( data) > CharDataLens ){ + CharDataLens = strlen( data); + //andy_log + log("最大数据长度:%d\n", CharDataLens ); + } + + saacproto_CreateHeader( saacproto.work , "ACCharLoad" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( result ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( data ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( id ) ,saacproto.workbufsize ); +#ifdef _NewSave + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( charindex ) ,saacproto.workbufsize ); +#endif + saacproto_Send( fd , saacproto.work ); +} + +#ifdef _RELOGIN +void saacproto_ACCharLoadII_send( int fd,char* result,char* data,int id,int charindex,int gs1,int gs2 ) +{ + saacproto_CreateHeader( saacproto.work , "ACCharLoadII" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( result ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( data ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( id ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( charindex ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( gs1 ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( gs2 ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} +#endif + +/* +214 :

  • servertoclient ACCharSave( string result , string data,int id);
    +215 : ACCharSave卞覆允月忒蚕[ +216 :

    +217 :
    +218 :
    string result +219 :
    "successful" , "failed" 及中勿木井[ +220 :
    string data +221 :
    "failed"及凛反 毛憎允谛棉及苇化坌月 侬 匹丐月[ +222 :
    int id +223 :
    娄醒及id毛公及引引戊疋□仄化忒允 +224 :
    +225 :
    +226 :
    +227 : +228 : +229 : +230 : +*/ + +void saacproto_ACCharSave_send( int fd,char* result,char* data,int id ) +{ + saacproto_CreateHeader( saacproto.work , "ACCharSave" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( result ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( data ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( id ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} + +#ifdef _RELOGIN +void saacproto_ACCharSaveII_send( int fd,char* result,char* data,int id,int gs1,int gs2 ) +{ + saacproto_CreateHeader( saacproto.work , "ACCharSaveII" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( result ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( data ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( id ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( gs1 ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( gs2 ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} +#endif + +/* +256 :
  • servertoclient ACCharDelete(string result, string data,int id);
    +257 : ACCharDelete卞覆允月忒蚕[ +258 :

    +259 :
    +260 :
    string result +261 :
    "successful" , "failed" 及中勿木井[ +262 :
    string data +263 :
    "failed"及凛反 毛憎允谛棉及苇化坌月 侬 匹丐月[ +264 :
    int id +265 :
    娄醒及id及公及引引及戊疋□ +266 : +267 :
    +268 :
    +269 :
    +270 : +*/ + +void saacproto_ACCharDelete_send( int fd,char* result,char* data,int id ) +{ + saacproto_CreateHeader( saacproto.work , "ACCharDelete" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( result ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( data ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( id ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} +/* +290 :
  • servertoclient ACLock( string result, string data ,int id);
    +291 : ACLock卞覆允月忒蚕[ +292 :

    +293 :
    +294 :
    string result +295 :
    "successful" , "failed" 及中勿木井[ +296 :
    string data +297 :
    "failed"及凛反 毛憎允谛棉及苇化坌月 侬 匹丐月[ +298 :
    int id +299 :
    娄醒及id及公及引引戊疋□ +300 :
    +301 :
    +302 :
    +303 : +*/ + +void saacproto_ACLock_send( int fd,char* result,char* data,int id ) +{ + saacproto_CreateHeader( saacproto.work , "ACLock" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( result ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( data ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( id ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} +/* +318 :
  • servertoclient ACUCheck( string mem_id );
    +319 : 失市它件玄扔□田□井日必□丞扔□田□卞覆仄化}丐月交□扒□互蜇箕夫弘奶件 +320 : 仄化中月井升丹井毛民尼永弁允月[ +321 :

    +322 :
    +323 :
    string mem_id +324 :
    譬屯月覆擂及交□扒□及gamersDream member id +325 :
    +326 :

    +327 : +328 : +*/ + +void saacproto_ACUCheck_send( int fd,char* mem_id ) +{ + saacproto_CreateHeader( saacproto.work , "ACUCheck" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( mem_id ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} +/* +344 :
  • servertoclient DBUpdateEntryString( string result, string table, string key, int msgid, int msgid2 );
    +345 : 晓及戊穴件玉及瑛绊[撩 仄化手荚汊尕第 卅及匹 骰仄化方中冗 +346 :
    +347 :
    string result +348 :
    successful 井failed +349 :
    string table +350 :
    +351 :
    int msgid +352 :
    +353 :
    int msgid2 +354 :
    +355 :
    +356 : +*/ + +void saacproto_DBUpdateEntryString_send( int fd,char* result,char* table,char* key,int msgid,int msgid2 ) +{ + saacproto_CreateHeader( saacproto.work , "DBUpdateEntryString" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( result ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( table ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( key ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid2 ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} +/* +369 :
  • servertoclient DBDeleteEntryString( string result, string table, string key , int msgid , int msgid2 );
    +370 : 侬 巨件玄伉及绰轮及瑛绊 +371 :
    +372 :
    string result +373 :
    successful / failed +374 :
    string table +375 :
    +376 :
    string key +377 :
    +378 :
    int msgid +379 :
    +380 :
    int msgid2 +381 :
    +382 :
    +383 : +*/ + +void saacproto_DBDeleteEntryString_send( int fd,char* result,char* table,char* key,int msgid,int msgid2 ) +{ + saacproto_CreateHeader( saacproto.work , "DBDeleteEntryString" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( result ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( table ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( key ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid2 ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} +/* +396 :
  • servertoclient DBGetEntryString( string result, string value, string table, string key, int msgid, int msgid2 );
    +397 : 潸曰分仄及忒曰袄 +398 :
    +399 :
    string result +400 :
    successful / failed +401 :
    string value +402 :
    袄 +403 :
    string table +404 :
    +405 :
    string key +406 :
    +407 :
    int msgid +408 :
    +409 :
    int msgid2 +410 :
    +411 :
    +412 : +*/ + +void saacproto_DBGetEntryString_send( int fd,char* result,char* value,char* table,char* key,int msgid,int msgid2 ) +{ + saacproto_CreateHeader( saacproto.work , "DBGetEntryString" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( result ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( value ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( table ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( key ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid2 ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} +/* +435 :
  • servertoclient DBUpdateEntryInt( string result , string table, string key, int msgid, int msgid2 );
    +436 : DBUpdateEntry及瑛绊[ +437 :
    +438 :
    string result +439 :
    succesful/failed +440 :
    string table +441 :
    □皮伙 毛公及引引井尹允 +442 :
    string key +443 :
    平□毛公及引引井尹允 +444 :
    int msgid, int msgid2 +445 :
    msgid 毛公及引引忒允[ +446 :
    +447 :

    +448 : +*/ +#ifdef _ALLDOMAN // Syu ADD 排行榜NPC +void saacproto_UpdataStele_send( int fd , char *data ) +{ + saacproto_CreateHeader( saacproto.work , "UpdataStele" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( data ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} + +void saacproto_S_UpdataStele_send( int fd , char *ocdkey , char *oname , char *ncdkey , + char *nname , char *title , int level , int trns , int floor ) { + saacproto_CreateHeader( saacproto.work , "S_UpdataStele" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( ocdkey ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( oname ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( ncdkey ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( nname ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( title ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( level ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( trns ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( floor ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); + +} +#endif +void saacproto_DBUpdateEntryInt_send( int fd,char* result,char* table,char* key,int msgid,int msgid2 ) +{ + saacproto_CreateHeader( saacproto.work , "DBUpdateEntryInt" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( result ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( table ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( key ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid2 ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} +/* +463 :
  • servertoclient DBGetEntryRank( string result , int rank , int count, string table, string key, int msgid, int msgid2 );
    +464 : 赐匏毛忒允[ +465 :
    +466 :
    string result +467 :
    successful/failed +468 :
    int rank +469 :
    赐匏[1动晓及袄毛潸月[ +470 :
    int count +471 :
    晓井日中仁勾户井[ 赓及巨件玄伉反0井日反元引月[ +472 :
    string table +473 :
    □皮伙 毛公及引引井尹允 +474 :
    string key +475 :
    平□毛公及引引井尹允 +476 :
    int msgid, int msgid2 +477 :
    msgid 毛公及引引忒允 +478 :
    +479 :

    +480 : +481 : +*/ + +void saacproto_DBGetEntryRank_send( int fd,char* result,int rank,int count,char* table,char* key,int msgid,int msgid2 ) +{ + saacproto_CreateHeader( saacproto.work , "DBGetEntryRank" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( result ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( rank ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( count ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( table ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( key ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid2 ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} +/* +494 :
  • servertoclient DBDeleteEntryInt( string result , string table, string key, int msgid, int msgid2 );
    +495 : 绰轮及瑛绊 +496 :
    +497 :
    string result +498 :
    successful/failed +499 :
    string table +500 :
    □皮伙 毛公及引引井尹允 +501 :
    string key +502 :
    平□毛公及引引井尹允 +503 :
    int msgid, int msgid2 +504 :
    msgid 毛公及引引忒允 +505 :
    +506 :

    +507 : +*/ + +void saacproto_DBDeleteEntryInt_send( int fd,char* result,char* table,char* key,int msgid,int msgid2 ) +{ + saacproto_CreateHeader( saacproto.work , "DBDeleteEntryInt" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( result ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( table ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( key ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid2 ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} +/* +520 :
  • servertoclient DBGetEntryInt( string result , int value , string table, string key, int msgid, int msgid2 );
    +521 : 巨件玄伉及袄毛井尹允 +522 :
    +523 :
    string result +524 :
    successful/failed +525 :
    int value +526 :
    袄公及手及 +527 :
    string table +528 :
    □皮伙 毛公及引引井尹允 +529 :
    string key +530 :
    平□毛公及引引井尹允 +531 :
    int msgid, int msgid2 +532 :
    msgid 毛公及引引忒允 +533 :
    +534 : +535 : +536 : +*/ + +void saacproto_DBGetEntryInt_send( int fd,char* result,int value,char* table,char* key,int msgid,int msgid2 ) +{ + saacproto_CreateHeader( saacproto.work , "DBGetEntryInt" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( result ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( value ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( table ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( key ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid2 ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} +/* +552 :
  • servertoclient DBGetEntryByRank( string result , string list , string table, int msgid, int msgid2 );
    +553 : DBGetEntryByRank及瑛绊[ +554 :
    +555 :
    string result +556 :
    +557 :
    string list +558 :
    "RANK,KEY,SCORE,INFO|RANK,KEY,SCORE,INFO|...."
    +559 : RANK反赐匏匹丐月[KEY反公及赐匏卞卅匀化中月旦戊失毛手匀化中月 +560 : 平□[SCORE反帮醒袄匹旦戊失匹丐月[ +561 : [
    +562 : "1,RINGO,123465,data1|2,HOGE,4567,data2|2,FUCK,4567,data3"
    +563 : 仇及 分午}2匏反2谛中月仇午卞卅月[ +564 :
    string table +565 :
    □皮伙 +566 :
    int msgid, int msgid2 +567 :
    +568 :
    +569 : +570 : +*/ + +void saacproto_DBGetEntryByRank_send( int fd,char* result,char* list,char* table,int msgid,int msgid2 ) +{ + saacproto_CreateHeader( saacproto.work , "DBGetEntryByRank" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( result ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( list ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( table ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid2 ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} +/* +583 :
  • servertoclient DBGetEntryByCount( string result , string list , string table, int count_start, int msgid, int msgid2 );
    +584 : DBGetEntryByCount 及瑛绊[ +585 :
    +586 :
    string result +587 :
    SUCCESSFUL/FAILED +588 :
    string list +589 :
    请 伉旦玄[1巨件玄伉丐凶曰 "INDEX,RANK,KEY,SCORE,INFO" 及4蜊及树 +590 : 及赚匹丐曰}公木互蜊醒坌 "|" 匹勾卅互月[蜊醒互0及桦宁反 +591 : 坞 侬 [ +592 :
    int num +593 :
    中仁勾午曰分允井[1卅日1蜊[2卅日2蜊[ +594 :
    int msgid ,msgid2 +595 :
    丢永本□斥ID. +596 :
    +597 : +*/ + +void saacproto_DBGetEntryByCount_send( int fd,char* result,char* list,char* table,int count_start,int msgid,int msgid2 ) +{ + saacproto_CreateHeader( saacproto.work , "DBGetEntryByCount" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( result ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( list ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( table ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( count_start ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid2 ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} +/* +611 :
  • servertoclient Broadcast( string id, string charname, string message );
    +612 : Broadcast及失市它件玄扔□田□井日必□丞扔□田□尺及霜耨迕 +613 :
    +614 :
    string id +615 :
    user ID +616 :
    string charname +617 :
    character name +618 :
    string message +619 :
    丢永本□斥 +620 :
    int flag +621 :
    1卞允月午}愤坌卞卞反 霜今木卅中[ +622 :
    +623 : +*/ + +void saacproto_Broadcast_send( int fd,char* id,char* charname,char* message ) +{ + saacproto_CreateHeader( saacproto.work , "Broadcast" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( id ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( charname ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( message ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} +/* +642 :
  • servertoclient Message( string id_from, string charname_from, string id_to, string charname_to, string message , int option , int mesgid );
    +643 : 失市它件玄扔□田□井日必□丞扔□田□卞丢永本□斥毛霜耨允月[ +644 :
    +645 :
    string id_from +646 :
    from ID +647 :
    string charname_from +648 :
    from character name +649 :
    string id_to +650 :
    to ID +651 :
    string charname_to +652 :
    to character name +653 :
    string message +654 :
    丢永本□斥及 +655 :
    int option +656 :
    左皿扑亦件(晓及楮醒毛辅寰) +657 :
    int mesgid +658 :
    丢永本□斥ID 失市它件玄扔□田□及栋 迕 +659 :
    +660 : +*/ + +void saacproto_Message_send( int fd,char* id_from,char* charname_from,char* id_to,char* charname_to,char* message,int option,int mesgid ) +{ + saacproto_CreateHeader( saacproto.work , "Message" ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( id_from ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( charname_from ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( id_to ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( charname_to ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( message ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( option ) ,saacproto.workbufsize ); + saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( mesgid ) ,saacproto.workbufsize ); + saacproto_Send( fd , saacproto.work ); +} + +void saacproto_SetServerLogFiles( char *r , char *w ) +{ + saacproto_strcpysafe( saacproto_writelogfilename , w , sizeof(saacproto_writelogfilename )); + saacproto_strcpysafe( saacproto_readlogfilename , r , sizeof(saacproto_readlogfilename )); +} +int saacproto_InitServer( int (*writefunc)(int,char*,int) , int worksiz ) +{ + int i; + if( (void*)writefunc == NULL){saacproto.write_func = saacproto_default_write_wrap;} else {saacproto.write_func = writefunc;} + saacproto_AllocateCommonWork(worksiz); + saacproto_stringwrapper = (char**)calloc( 1,sizeof(char*) * MAXLSRPCARGS); + if(saacproto_stringwrapper ==NULL)return -1; + memset( saacproto_stringwrapper , 0, sizeof(char*)*MAXLSRPCARGS); + for(i=0;i +#include +#include +#ifndef WIN32 +#include +#include +#endif +#include "main.h" +#include "saacproto_util.h" +#ifdef saacproto__ENCRYPT +long saacproto_ringoCompressor( unsigned char *code , long codelen , unsigned char *text , long textlen); +long saacproto_ringoDecompressor( unsigned char *text , long textlen , unsigned char *code , long codelen); +#endif +/* + lsrpc routines +*/ +int saacproto_AllocateCommonWork(int bufsiz) +{ + saacproto.workbufsize = bufsiz; + saacproto.work = NULL; + saacproto.arraywork = NULL; + saacproto.escapework = NULL; + saacproto.val_str = NULL; + saacproto.token_list = NULL; + saacproto.cryptwork = NULL; + saacproto.jencodecopy = NULL; + saacproto.jencodeout = NULL; + saacproto.compresswork = NULL; + saacproto.work = (char*)calloc( 1, saacproto.workbufsize ); + saacproto.arraywork = (char*)calloc( 1, saacproto.workbufsize ); + saacproto.escapework = (char*)calloc( 1, saacproto.workbufsize ); + saacproto.val_str = (char*)calloc( 1, saacproto.workbufsize ); + saacproto.token_list = (char**)calloc( 1, saacproto.workbufsize *sizeof( char** ) ); + saacproto.cryptwork = (char*)calloc( 1, saacproto.workbufsize * 3 ); + saacproto.jencodecopy = (char*)calloc( 1, saacproto.workbufsize * 3 ); + saacproto.jencodeout = (char*)calloc( 1, saacproto.workbufsize * 3 ); + saacproto.compresswork = (char*)calloc( 1, saacproto.workbufsize * 3 ); + memset( saacproto.work , 0, saacproto.workbufsize ); + memset( saacproto.arraywork , 0, saacproto.workbufsize ); + memset( saacproto.escapework , 0, saacproto.workbufsize ); + memset( saacproto.val_str , 0, saacproto.workbufsize ); + memset( (char*)saacproto.token_list ,0, saacproto.workbufsize*sizeof(char**) ); + memset( saacproto.cryptwork , 0, saacproto.workbufsize*3 ); + memset( saacproto.jencodecopy , 0, saacproto.workbufsize*3 ); + memset( saacproto.jencodeout , 0, saacproto.workbufsize*3 ); + memset( saacproto.compresswork , 0, saacproto.workbufsize*3 ); + if( saacproto.work == NULL || + saacproto.arraywork == NULL || + saacproto.escapework == NULL || + saacproto.val_str == NULL || + saacproto.token_list == NULL || + saacproto.cryptwork == NULL || + saacproto.jencodecopy == NULL || + saacproto.jencodeout == NULL || + saacproto.compresswork == NULL ){ + free( saacproto.work);free( saacproto.val_str); + free( saacproto.escapework);free( saacproto.arraywork ); + free( saacproto.token_list);free( saacproto.cryptwork ); + free( saacproto.jencodecopy);free( saacproto.jencodeout ); + free( saacproto.compresswork ); + return -1; + } + return 0; +} +/********** + Get message information from a network input +**********/ +void saacproto_GetMessageInfo( int *id , char *funcname , int len, char **tk ) +{ + if( tk[0] == NULL || tk[1] == NULL ){ + *id = 0; + saacproto_strcpysafe( funcname , "" , len ); + return; + } + *id = strtoul( tk[0] ,NULL,10); + saacproto_strcpysafe( funcname , tk[1] , len ); + return; +} +/******************************************** + string utilities +*********************************************/ +void saacproto_strcpysafe( char *dest, char *src, int maxlen ) +{ + int i; + for(i=0;i (int)( saacproto.workbufsize*3-2) ){ + fprintf( stderr, "lsgen: badly configured work buflen\n" ); + exit(1); + } + if( (flag%2) == 1 ) flag ++; + saacproto.compresswork[0] = flag; + memcpy( saacproto.compresswork+1,src,srclen ); + compressed_l = srclen + 1; + } else { + if((flag%2)==0)flag++; + saacproto.compresswork[0] = flag; + compressed_l = saacproto_ringoCompressor( + (unsigned char*)saacproto.compresswork + 1 , + (long)saacproto.workbufsize*3 - 1, + (unsigned char*)src , + (long)strlen(src) ) + 1; /* be careful! */ + } + /* return empty line if error or buffer excess */ + if( compressed_l <= 0 ){ + saacproto_strcpysafe( out , "\n" , maxoutlen ); + return; + } + memcpy( saacproto.jencodecopy ,saacproto.compresswork ,compressed_l ); + saacproto_jEncode( saacproto.jencodecopy , compressed_l , JENCODE_KEY , + saacproto.jencodeout, &jencodedlen , saacproto.workbufsize*3 -1 ); + saacproto_encode64( (unsigned char*)saacproto.jencodeout , jencodedlen, (unsigned char*)out ); +} +/* translate code64 text to original lsrpc text */ +static void saacproto_decodeString( char *src , char *out ) +{ + int compressed_l =0, outlen64; + int l; + long decompressed_l = 0; + /* copy src to copybuffer because jencoder modifies the input buffer */ + l = strlen( src ); + if( src[l-1]=='\n' || src[l-1]=='\r' )src[l-1]=0; + if( src[l-2]=='\n' || src[l-2]=='\r' )src[l-2]=0; + outlen64 = saacproto_decode64( (unsigned char*)src , (unsigned char*)saacproto.jencodecopy ); + saacproto_jDecode( saacproto.jencodecopy , outlen64 , JENCODE_KEY, + saacproto.compresswork , &compressed_l); + /*out[outlen]=0; PENDING*/ + if( (saacproto.compresswork[0] % 2 ) == 0 ){ + if( compressed_l <= 0 ){ + decompressed_l = 0; + fprintf( stderr, "LSRPC: too short:[%s]\n", src ); + } else { + memcpy( out, saacproto.compresswork+1, compressed_l -1 ); + decompressed_l = compressed_l -1; + } + } else { + decompressed_l = + saacproto_ringoDecompressor( (unsigned char*)out , + (long)saacproto.workbufsize , + (unsigned char*)saacproto.compresswork+1 , + (long)compressed_l -1 ); + } + out[decompressed_l] = 0; +} +/* followings are taken from code64.c */ +char saacproto_charset[64]={ + 'A','B','C','D', 'E','F','G','H', + 'I','J','K','L', 'M','N','O','P', + 'Q','R','S','T', 'U','V','W','X', + 'Y','Z','a','b', 'c','d','e','f', + 'g','h','i','j', 'k','l','m','n', + 'o','p','q','r', 's','t','u','v', + 'w','x','y','z', '0','1','2','3', + '4','5','6','7', '8','9','+','-' +}; +char saacproto_reversecharset[256]={ + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,62, 0,63,0,0, + 52,53,54,55, 56,57,58,59, + 60,61,0,0, 0,0,0,0, + 0,0,1,2, 3,4,5,6, + 7,8,9,10, 11,12,13,14, + 15,16,17,18, 19,20,21,22, + 23,24,25,0, 0,0,0,0, + 0,26,27,28, 29,30,31,32, + 33,34,35,36, 37,38,39,40, + 41,42,43,44, 45,46,47,48, + 49,50,51,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0 +}; + +static void saacproto_encode64( unsigned char *in , int len , unsigned char *out ) +{ + int i; + int use_bytes; + int address = 0; + out[0] = 0; + for(i=0;;i+=3){ + unsigned char in1 , in2 , in3; + unsigned char out1 ,out2 , out3 , out4; + if( i >= len ) break; + if( i >= (len-1)){ /* the last letter ( to be thrown away ) */ + in1 = in[i] & 0xff; + in2 = in3 = 0; + use_bytes = 2; + } else if( i >= (len-2)){ /* the last 2 letters ( process only 1 byte)*/ + in1 = in[i] & 0xff; + in2 = in[i+1] & 0xff; + in3 = 0; + use_bytes = 3; + } else { /* there are more or equal than 3 letters */ + in1 = in[i] & 0xff; + in2 = in[i+1] & 0xff; + in3 = in[i+2] & 0xff; + use_bytes = 4; + } + out1 = ((in1 & 0xfc)>>2) & 0x3f; + out2 = ((in1 & 0x03)<<4) | ((( in2 & 0xf0)>>4)&0x0f); + out3 = ((in2 & 0x0f)<<2) | ((( in3 & 0xc0)>>6)&0x03); + out4 = (in3 & 0x3f ); + if( use_bytes >= 2 ){ + out[address++] = saacproto_charset[out1]; + out[address++] = saacproto_charset[out2]; + out[address]=0; + } + if( use_bytes >= 3 ){ + out[address++] = saacproto_charset[out3]; + out[address]=0; + } + if( use_bytes >= 4 ){ + out[address++] = saacproto_charset[out4]; + out[address]=0; + } + } +} +/* + * Decode it + * char *in : encoded ascii chars + * char *out : decoded( output) + * return value : output byte count + * + * note: no need to have bigger buffer. because output is to + * be smaller than input string size + */ +static int saacproto_decode64( unsigned char *in , unsigned char *out ) +{ + unsigned char in1 , in2 , in3 , in4; + unsigned char out1 , out2 , out3; + int use_bytes; + int address= 0; + int i; + for(i=0;;i+=4 ){ + if( in[i] == 0 ){ + break; + } else if( in[i+1] == 0 ){ /* the last letter */ + break; + } else if( in[i+2] == 0 ){ /* the last 2 letters */ + in1 = saacproto_reversecharset[in[i]]; + in2 = saacproto_reversecharset[in[i+1]]; + in3 = in4 = 0; + use_bytes = 1; + } else if( in[i+3] == 0 ){ /* the last 3 letters */ + in1 = saacproto_reversecharset[in[i]]; + in2 = saacproto_reversecharset[in[i+1]]; + in3 = saacproto_reversecharset[in[i+2]]; + in4 = 0; + use_bytes = 2; + } else { /* process 4 letters */ + in1 = saacproto_reversecharset[in[i]]; + in2 = saacproto_reversecharset[in[i+1]]; + in3 = saacproto_reversecharset[in[i+2]]; + in4 = saacproto_reversecharset[in[i+3]]; + use_bytes = 3; + } + out1 = (in1<<2) | (((in2 & 0x30)>>4)&0x0f) ; + out2 = ((in2 & 0x0f )<<4) | ((( in3 & 0x3c)>>2)&0x0f); + out3 = ( (in3 &0x03)<<6) | ( in4 & 0x3f ); + if( use_bytes >= 1 ){ + out[address++] = out1; + } + if( use_bytes >= 2 ){ + out[address++] = out2; + } + if( use_bytes >= 3 ){ + out[address++] = out3; + } + if( use_bytes != 3 ){ + break; + } + } + return address; +} + +/* followings are taken from Jencode.c by jun */ +static void saacproto_jEncode(char *src,int srclen,int key,char *encoded,int *encodedlen,int maxencodedlen) +{ + char sum=0; + int i; + if(srclen+1 > maxencodedlen){ + *encodedlen = maxencodedlen; + for(i=0;i<(*encodedlen);i++)encoded[i] = src[i]; + } + if(srclen+1 <= maxencodedlen){ + *encodedlen=srclen+1; + for(i=0;i i) encoded[i] = src[i] + sum*((i*i)%3); + if(abs((key%srclen)) == i) encoded[i] = sum; + if(abs((key%srclen)) < i) encoded[i] = src[i-1] + sum*((i*i)%7); + } + } +} +static void saacproto_jDecode(char *src,int srclen,int key,char *decoded,int *decodedlen) +{ + char sum=0; + int i; + *decodedlen=srclen-1; + if( *decodedlen == 0 ){ + return; /* return error if length is 0 */ + } + sum = src[abs(key%(*decodedlen))]; + for(i=0;i i) decoded[i] = src[i] - sum*((i*i)%3); + if(abs((key%(*decodedlen))) < i) decoded[i-1] = src[i] - sum*((i*i)%7); + } + for(i=0;i<(*decodedlen);i++){ + if(((key%7) == (i%5))||((key%2) == (i%2)))decoded[i] = ~decoded[i]; + } +} + +/*****************************************************************/ +/* Compress / Decompress routine */ +/*****************************************************************/ +#define B00000000 0 +#define B00000001 1 +#define B00000010 2 +#define B00000011 3 +#define B00000100 4 +#define B00000101 5 +#define B00000110 6 +#define B00000111 7 +#define B00001000 8 +#define B00001001 9 +#define B00001010 10 +#define B00001011 11 +#define B00001100 12 +#define B00001101 13 +#define B00001110 14 +#define B00001111 15 +#define B00010000 16 +#define B00010001 17 +#define B00010010 18 +#define B00010011 19 +#define B00010100 20 +#define B00010101 21 +#define B00010110 22 +#define B00010111 23 +#define B00011000 24 +#define B00011001 25 +#define B00011010 26 +#define B00011011 27 +#define B00011100 28 +#define B00011101 29 +#define B00011110 30 +#define B00011111 31 +#define B00100000 32 +#define B00100001 33 +#define B00100010 34 +#define B00100011 35 +#define B00100100 36 +#define B00100101 37 +#define B00100110 38 +#define B00100111 39 +#define B00101000 40 +#define B00101001 41 +#define B00101010 42 +#define B00101011 43 +#define B00101100 44 +#define B00101101 45 +#define B00101110 46 +#define B00101111 47 +#define B00110000 48 +#define B00110001 49 +#define B00110010 50 +#define B00110011 51 +#define B00110100 52 +#define B00110101 53 +#define B00110110 54 +#define B00110111 55 +#define B00111000 56 +#define B00111001 57 +#define B00111010 58 +#define B00111011 59 +#define B00111100 60 +#define B00111101 61 +#define B00111110 62 +#define B00111111 63 +#define B01000000 64 +#define B01000001 65 +#define B01000010 66 +#define B01000011 67 +#define B01000100 68 +#define B01000101 69 +#define B01000110 70 +#define B01000111 71 +#define B01001000 72 +#define B01001001 73 +#define B01001010 74 +#define B01001011 75 +#define B01001100 76 +#define B01001101 77 +#define B01001110 78 +#define B01001111 79 +#define B01010000 80 +#define B01010001 81 +#define B01010010 82 +#define B01010011 83 +#define B01010100 84 +#define B01010101 85 +#define B01010110 86 +#define B01010111 87 +#define B01011000 88 +#define B01011001 89 +#define B01011010 90 +#define B01011011 91 +#define B01011100 92 +#define B01011101 93 +#define B01011110 94 +#define B01011111 95 +#define B01100000 96 +#define B01100001 97 +#define B01100010 98 +#define B01100011 99 +#define B01100100 100 +#define B01100101 101 +#define B01100110 102 +#define B01100111 103 +#define B01101000 104 +#define B01101001 105 +#define B01101010 106 +#define B01101011 107 +#define B01101100 108 +#define B01101101 109 +#define B01101110 110 +#define B01101111 111 +#define B01110000 112 +#define B01110001 113 +#define B01110010 114 +#define B01110011 115 +#define B01110100 116 +#define B01110101 117 +#define B01110110 118 +#define B01110111 119 +#define B01111000 120 +#define B01111001 121 +#define B01111010 122 +#define B01111011 123 +#define B01111100 124 +#define B01111101 125 +#define B01111110 126 +#define B01111111 127 +#define B10000000 128 +#define B10000001 129 +#define B10000010 130 +#define B10000011 131 +#define B10000100 132 +#define B10000101 133 +#define B10000110 134 +#define B10000111 135 +#define B10001000 136 +#define B10001001 137 +#define B10001010 138 +#define B10001011 139 +#define B10001100 140 +#define B10001101 141 +#define B10001110 142 +#define B10001111 143 +#define B10010000 144 +#define B10010001 145 +#define B10010010 146 +#define B10010011 147 +#define B10010100 148 +#define B10010101 149 +#define B10010110 150 +#define B10010111 151 +#define B10011000 152 +#define B10011001 153 +#define B10011010 154 +#define B10011011 155 +#define B10011100 156 +#define B10011101 157 +#define B10011110 158 +#define B10011111 159 +#define B10100000 160 +#define B10100001 161 +#define B10100010 162 +#define B10100011 163 +#define B10100100 164 +#define B10100101 165 +#define B10100110 166 +#define B10100111 167 +#define B10101000 168 +#define B10101001 169 +#define B10101010 170 +#define B10101011 171 +#define B10101100 172 +#define B10101101 173 +#define B10101110 174 +#define B10101111 175 +#define B10110000 176 +#define B10110001 177 +#define B10110010 178 +#define B10110011 179 +#define B10110100 180 +#define B10110101 181 +#define B10110110 182 +#define B10110111 183 +#define B10111000 184 +#define B10111001 185 +#define B10111010 186 +#define B10111011 187 +#define B10111100 188 +#define B10111101 189 +#define B10111110 190 +#define B10111111 191 +#define B11000000 192 +#define B11000001 193 +#define B11000010 194 +#define B11000011 195 +#define B11000100 196 +#define B11000101 197 +#define B11000110 198 +#define B11000111 199 +#define B11001000 200 +#define B11001001 201 +#define B11001010 202 +#define B11001011 203 +#define B11001100 204 +#define B11001101 205 +#define B11001110 206 +#define B11001111 207 +#define B11010000 208 +#define B11010001 209 +#define B11010010 210 +#define B11010011 211 +#define B11010100 212 +#define B11010101 213 +#define B11010110 214 +#define B11010111 215 +#define B11011000 216 +#define B11011001 217 +#define B11011010 218 +#define B11011011 219 +#define B11011100 220 +#define B11011101 221 +#define B11011110 222 +#define B11011111 223 +#define B11100000 224 +#define B11100001 225 +#define B11100010 226 +#define B11100011 227 +#define B11100100 228 +#define B11100101 229 +#define B11100110 230 +#define B11100111 231 +#define B11101000 232 +#define B11101001 233 +#define B11101010 234 +#define B11101011 235 +#define B11101100 236 +#define B11101101 237 +#define B11101110 238 +#define B11101111 239 +#define B11110000 240 +#define B11110001 241 +#define B11110010 242 +#define B11110011 243 +#define B11110100 244 +#define B11110101 245 +#define B11110110 246 +#define B11110111 247 +#define B11111000 248 +#define B11111001 249 +#define B11111010 250 +#define B11111011 251 +#define B11111100 252 +#define B11111101 253 +#define B11111110 254 +#define B11111111 255 +/* masks for first byte ( write )*/ +int saacproto_modifymask_first[8][9]={ + {0, B00000001,B00000011,B00000111,B00001111,B00011111,B00111111,B01111111,B11111111},/* mod 0*/ + {0, B00000011,B00000111,B00001111,B00011111,B00111111,B01111111,B11111111,B11111111},/* mod 1*/ + {0, B00000111,B00001111,B00011111,B00111111,B01111111,B11111111,B11111111,B11111111},/* mod 2*/ + {0, B00001111,B00011111,B00111111,B01111111,B11111111,B11111111,B11111111,B11111111},/* mod 3*/ + {0, B00011111,B00111111,B01111111,B11111111,B11111111,B11111111,B11111111,B11111111},/* mod 4*/ + {0, B00111111,B01111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111},/* mod 5*/ + {0, B01111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111},/* mod 6*/ + {0, B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111},/* mod 7*/ +}; +/* masks for second byte ( write ) */ +int saacproto_modifymask_second[8][9]={ + {0, B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000},/* mod 0 */ + {0, B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001},/* mod 1 */ + {0, B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B00000011},/* mod 2 */ + {0, B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B00000011,B00000111},/* mod 3 */ + {0, B00000000,B00000000,B00000000,B00000000,B00000001,B00000011,B00000111,B00001111},/* mod 4 */ + {0, B00000000,B00000000,B00000000,B00000001,B00000011,B00000111,B00001111,B00011111},/* mod 5 */ + {0, B00000000,B00000000,B00000001,B00000011,B00000111,B00001111,B00011111,B00111111},/* mod 6 */ + {0, B00000000,B00000001,B00000011,B00000111,B00001111,B00011111,B00111111,B01111111},/* mod 7 */ +}; +/* + * used by bitstream routines + */ +int bitstream_maxbyte, bitstream_bitaddr ; +char *bitstream_buf; +/* initialize bitstream for output */ +static int initOutputBitStream( char *buf ,int buflen) +{ + bitstream_bitaddr = 0; + bitstream_maxbyte = buflen; + bitstream_buf = buf; + memset( buf,0, buflen); + return 0; +} +/* initialize bitstream for input */ +static int initInputBitStream( char *buf , int buflen) +{ + bitstream_bitaddr = 0; + bitstream_maxbyte = buflen; + bitstream_buf = buf; + return 0; +} +/* + * read from bit stream. used only from 1 bit to 8 bits + * this is a base routine + */ +static unsigned int readInputBitStreamBody( int bwidth ) +{ + int mod = bitstream_bitaddr % 8; + int byteaddr = bitstream_bitaddr / 8; + /* return if excess */ + if( byteaddr >= bitstream_maxbyte)return 0; + if( bwidth >= 1 && bwidth <= 8){ + int b1 = (( bitstream_buf[byteaddr] & saacproto_modifymask_first[mod][bwidth] )>>mod); + int b2 = (( bitstream_buf[byteaddr+1] & saacproto_modifymask_second[mod][bwidth])<<(8-mod)); + bitstream_bitaddr += bwidth; + return b1 | b2; + } else { + return 0; + } +} +/* + * read from bit stream. used from 1 bit to 32 bits + * + */ +static unsigned int readInputBitStream( int bwidth ) +{ + if( bwidth <= 0 ){ + return 0; + } else if( bwidth >= 1 && bwidth <= 8 ){ + return readInputBitStreamBody( bwidth ); + } else if( bwidth >= 9 && bwidth <= 16 ){ + unsigned int first = readInputBitStreamBody(8); + unsigned int second = readInputBitStreamBody( bwidth-8); + return first + (second << 8 ); + } else if( bwidth >= 17 && bwidth <= 24 ){ + unsigned int first = readInputBitStreamBody(8); + unsigned int second = readInputBitStreamBody(8); + unsigned int third = readInputBitStreamBody(bwidth-8); + return first + ( second << 8 ) + ( third << 16 ); + } else if( bwidth >= 25 && bwidth <= 32 ){ + unsigned int first = readInputBitStreamBody(8); + unsigned int second = readInputBitStreamBody(8); + unsigned int third = readInputBitStreamBody(8); + unsigned int forth = readInputBitStreamBody(bwidth-8); + return first + ( second << 8 ) + ( third << 16 ) + ( forth << 24 ); + } + return 0; +} +/* + * write to a bitstream. only used from 1 bit to 8 bits + * this is a base routine. + */ +static int writeOutputBitStreamBody( int bwidth , unsigned char b) +{ + int mod = bitstream_bitaddr % 8; + int byteaddr = bitstream_bitaddr / 8; + /* return error if excess */ + if( bitstream_maxbyte <= (byteaddr+1)) return -1; + bitstream_buf[byteaddr] &= saacproto_modifymask_first[mod][bwidth]; + bitstream_buf[byteaddr] |= (b << mod) & saacproto_modifymask_first[mod][bwidth]; + bitstream_buf[byteaddr+1] &= saacproto_modifymask_second[mod][bwidth]; + bitstream_buf[byteaddr+1] |= (b>>(8-mod))& saacproto_modifymask_second[mod][bwidth]; + bitstream_bitaddr += bwidth; + return byteaddr+1; +} +/* + * write to a bitstream. used from 1 bits to 32 bits + * returns -1 if error or buffer excession + */ +static int writeOutputBitStream( int bwidth, unsigned int dat) +{ + int ret; + if( bwidth <= 0){ + return -1; + } else if( bwidth >= 1 && bwidth <= 8 ){ + if((ret=writeOutputBitStreamBody( bwidth , (unsigned char)dat))<0)return -1; + } else if( bwidth > 8 && bwidth <= 16 ){ + if(writeOutputBitStreamBody( 8 , (unsigned char)(dat&0xff))<0)return -1; + if((ret=writeOutputBitStreamBody( bwidth - 8 , ( unsigned char)((dat>>8)&0xff)))<0)return -1; + } else if( bwidth > 16 && bwidth <= 24 ){ + if(writeOutputBitStreamBody( 8 , (unsigned char)(dat&0xff))<0)return -1; + if(writeOutputBitStreamBody( 8 , (unsigned char)((dat>>8)&0xff))<0)return -1; + if((ret=writeOutputBitStreamBody( bwidth-16,(unsigned char)((dat>>16)&0xff)))<0)return -1; + } else if( bwidth > 24 && bwidth <= 32 ){ + if(writeOutputBitStreamBody( 8 , (unsigned char)(dat&0xff))<0)return -1; + if(writeOutputBitStreamBody( 8 , (unsigned char)((dat>>8)&0xff))<0)return -1; + if(writeOutputBitStreamBody( 8 , (unsigned char)((dat>>16)&0xff))<0)return -1; + if((ret=writeOutputBitStreamBody( bwidth-24,(unsigned char)((dat>>24)&0xff)))<0)return -1; + } else { + return -1; + } + return ret; +} +#define CHAR_SIZE 256 +#define NODE_SIZE 512 +#define BITS_LEN 9 /* 9 bit lzw compression */ +typedef struct { + unsigned char chr; + int parent; + int brother; + int child; +}NODE; +long saacproto_ringoCompressor( unsigned char *code , long codelen , + unsigned char *text , long textlen) +{ + NODE node[NODE_SIZE]; + int freeNode; + int w,k; /* used in this algo */ + int textind; /* index to text buffer */ + int i; + int position = 0; /* indicates the last byte of code buffer */ + if( textlen <= 0 ) return -1; + initOutputBitStream((char*) code,codelen); + /* fill characters ( 0 ~ 255 ) in the beggining part of + Node list */ + for(i=0; i<= CHAR_SIZE; i++){ + node[i].chr = (unsigned char)i; + node[i].brother = i + 1; + node[i].parent = 0; + node[i].child = 0; + } + node[CHAR_SIZE].brother = 0; + freeNode = CHAR_SIZE + 1; + w = text[0]; + textind = 1; + while(1){ + int rv; + if( textind >= textlen ){ + k = CHAR_SIZE; /* indicates EOF */ + } else { + k = text[textind]; + } + /* search if pattern 'wk' is registered or not. */ + rv = node[w].child; + while(1){ + if( rv <= 0 ) break; + if( node[rv].chr == k ) break; + rv = node[rv].brother; + } + if( rv > 0 ){ + /* found it */ + w = rv; + } else { + position = writeOutputBitStream( BITS_LEN ,w ); + /* return if buffer excession */ + if( position > codelen ) return -1; + /* register pattern 'wk' in the dictionary */ + if( freeNode < NODE_SIZE ){ + node[freeNode].parent = w; + node[freeNode].chr = k; + node[freeNode].brother = node[w].child; + node[freeNode].child = 0; + node[w].child = freeNode; + freeNode++; + } + w = k; + } + if( textind == ( textlen + 1 ) ) break; + textind++; + } + return position; +} + +/* + * Decoder. + * return -1 if buffer excession. Notice buffer text + * is modified . + */ +long saacproto_ringoDecompressor( unsigned char *text , long textlen , + unsigned char *code , long codelen) +{ + NODE node[NODE_SIZE]; + int stack[NODE_SIZE]; + int sp; + int freeNode; + int len; + int i; + int k = 0; + int w = 0; + if( codelen <= 0 ) return -1; + initInputBitStream( (char*)code , codelen ); + for(i=0;i= freeNode ){ + stack[sp++] = k; /* exception */ + if( sp >=( sizeof( stack ) /sizeof(stack[0] )) )return -1; + k = w; + } else { + k = rv; + } + while(k> CHAR_SIZE ){ + if( k >= (sizeof(node)/sizeof(node[0]))) return -1; + stack[sp++] = node[k].chr; + k = node[k].parent; + if( sp >=( sizeof( stack ) /sizeof(stack[0] )) ) return -1; + } + stack[sp++] = k; + if( sp >= ( sizeof( stack ) /sizeof(stack[0] )) ) return -1; + /* output to text buffer from stack.*/ + while(sp){ + if( ++len > textlen ) return -1; + *text++ = stack[--sp]; + } + /* register the pattern 'wk'*/ + if( len > 1 && freeNode < NODE_SIZE ){ + node[freeNode].parent = w; + node[freeNode].chr = k; + if( w >= (sizeof(node)/sizeof(node[0])))return -1; + node[freeNode].brother = node[w].child; + node[freeNode].child = 0; + node[w].child = freeNode; + freeNode++; + } + w = rv; + } + return len; +} +#endif /* ifdef saacproto__ENCRYPT */ + +/* Convert 62-base digits to 10 digits */ +int saacproto_a62toi( char *a ) +{ + int ret = 0; + int minus ; + if( a[0] == '-' ){ + minus = -1; + a++; + } else { + minus = 1; + } + + while( *a != '\0' ) + { + ret *= 62; + if( '0' <= (*a) && (*a) <= '9' ) + ret += (*a)-'0'; + else + if( 'a' <= (*a) && (*a) <= 'z' ) + ret += (*a)-'a'+10; + else + if( 'A' <= (*a) && (*a) <= 'Z' ) + ret += (*a)-'A'+36; + else + return 0; + a++; + } + return ret * minus; +} + +/* Convert 10-base digits into 62-base digits. */ +char *saacproto_cnv10to62( int a, char *out, int outlen ) +{ + int i, j; + char base[] = { "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"}; + int tmp[64]; + int src; + int minus; + int baselen = sizeof( base)-1; + if( a < 0 ){ + minus = 1; + a *= -1; + } else { + minus = 0; + } + /* special case */ + if( a < baselen) { + if( minus ){ + *(out) = '-'; + *(out+1) = base[a]; + *(out+2) = '\0'; + return (out); + } else { + *out = base[a]; + *(out+1) = '\0'; + return( out); + } + } + src = a; + for( i = 0; src >= baselen; i ++ ) { + tmp[i] = src % baselen; + src /= baselen; + } + i--; + if( minus ){ + *out = '-'; + *(out+1) = base[src]; + for( j = 2; i >= 0; i --, j ++ ) { + if( j > outlen - 2 ) return NULL; + *(out+j) = base[tmp[i]]; + } + } else { + *out = base[src]; + for( j = 1; i >= 0; i --, j ++ ) { + if( j > outlen - 2 ) return NULL; + *(out+j) = base[tmp[i]]; + } + } + *(out+j) = '\0'; + return( out); +} +#ifdef _NEW_PLAYERGOLD +nNEWPlayerList *NEWPlayerList; +void NEWPLAYER_FreeGoldInit() +{ + NEWPlayerList = ( nNEWPlayerList *)calloc( 1, MAXNEWPLAYERLIST * sizeof( struct _tagNEWPlayerList)); + if( NEWPlayerList == NULL ) return; + resetNEWPlayerList(); + LoadNEWPlayerListFile( "newuser.txt"); +} + +void resetNEWPlayerList() +{ + int i; + for( i=0; i=MAXNEWPLAYERLIST ){ + log( "ANDY err Not Fuond CdKey:%s In NEWPlayerList!\n", CdKey); + return NEW_DELERR; + } + return NEW_ERR; +} + +int AddNEWPlayertoFile( char *CdKey, char *UserName, int Strlens) +{ + int i; + + for( i=0; isizeof(NEWPlayerList[i].name))?sizeof(NEWPlayerList[i].name):Strlens); + NEWPlayerList[i].use = 1; + return NEW_ADDOK; + } + if( i>=MAXNEWPLAYERLIST ){ + log( "ANDY err NEWPlayerList Be Full !\n"); + return NEW_LISTFULL; + } + return NEW_ADDERR; +} + +#endif +/* end of generated code */ diff --git a/saac/saacproto_util.h b/saac/saacproto_util.h new file mode 100644 index 0000000..a33385a --- /dev/null +++ b/saac/saacproto_util.h @@ -0,0 +1,142 @@ +#ifndef _SAACPROTOUTIL_H_ +#define _SAACPROTOUTIL_H_ +#include "version.h" +#include +#include +#ifndef WIN32 +#include +#include +#endif + + +#define saacproto__NOENCRYPT +#define saacproto__NODEBUG +struct saacproto_ { + int (*write_func)(int,char*,int) ; /* write function */ + size_t workbufsize; /* size of work area */ + char *work,*arraywork,*escapework,*val_str,*ret_work; /* work areas which have same size */ + char *cryptwork,*jencodecopy,*jencodeout,*compresswork; /* these work has bigger size (3times)*/ + char** token_list; /* token list */ + unsigned long message_id; /*= 1, */ /* for generating message IDs */ +}; + +#ifdef _SAACPROTOUTIL_C_ +struct saacproto_ saacproto = { + NULL, + 0, + NULL,NULL,NULL,NULL,NULL, + NULL,NULL,NULL,NULL, + NULL, + 1, +}; + +char **saacproto_stringwrapper; +char saacproto_readlogfilename[1024]; +char saacproto_writelogfilename[1024]; +#else +extern char **saacproto_stringwrapper; +extern struct saacproto_ saacproto; +extern char saacproto_readlogfilename[1024]; +extern char saacproto_writelogfilename[1024]; +#endif +char* saacproto_escapeString( char*a ); +char* saacproto_descapeString( char*a ); +void saacproto_splitString( char *src ); +void saacproto_strcpysafe( char *dest, char *src, int len ); +void saacproto_strcatsafe( char *dest , char *src , int maxlen ); +char*saacproto_mkstr_int( int i ); +char*saacproto_mkstr_u_int( unsigned int i ); +char*saacproto_mkstr_long( long l ); +char*saacproto_mkstr_u_long( unsigned long l ); +char*saacproto_mkstr_short( short s ); +char*saacproto_mkstr_u_short( short s ); +char*saacproto_mkstr_char( char c ); +char*saacproto_mkstr_u_char( char c); +char*saacproto_mkstr_string( char*a ); +char*saacproto_mkstr_float( float f ); +char*saacproto_mkstr_double( double d ); +char*saacproto_mkstr_int_array( int size , int *array ); +char*saacproto_mkstr_u_int_array( int size , int *array ); +char*saacproto_mkstr_short_array( int size , short *array ); +char*saacproto_mkstr_u_short_array(int size , short *array ); +char *saacproto_mkstr_char_array( int size , char *array ); +char *saacproto_mkstr_u_char_array( int size , unsigned char *array ); +char *saacproto_mkstr_float_array( int size , float *array ); +char *saacproto_mkstr_double_array( int size , double *array ); +int saacproto_demkstr_int( char*a ); +unsigned int saacproto_demkstr_u_int( char*a ); +long saacproto_demkstr_long( char*a ); +unsigned long saacproto_demkstr_u_long(char*a ); +short saacproto_demkstr_short( char*a ); +unsigned short saacproto_demkstr_u_short( char*a ); +char saacproto_demkstr_char( char*a ); +unsigned char saacproto_demkstr_u_char( char*a ); +float saacproto_demkstr_float( char*a ); +double saacproto_demkstr_double(char*a ); +char* saacproto_demkstr_string( char*a); +int *saacproto_demkstr_int_array( char**tk ,int *buf ,int start , int size ); +int *saacproto_demkstr_u_int_array( char **tk , int *buf , int start , int size ); +unsigned int *saacproto_demkstr_long_array( + char **tk , unsigned int *buf , int start , int size ); +unsigned long *saacproto_demkstr_u_long_array( + char **tk , unsigned long *buf , int start , int size ); +short *saacproto_demkstr_short_array( char **tk , short *buf , int start , int size ); +unsigned short*saacproto_demkstr_u_short_array( + char **tk , unsigned short *buf , int start , int size ); +char *saacproto_demkstr_char_array( char **tk , char *buf , int start , int size ); +unsigned char *saacproto_demkstr_u_char_array( + char **tk , unsigned char*buf , int start , int size ); +float *saacproto_demkstr_float_array( char **tk , float *buf , int start , int size ); +double *saacproto_demkstr_u_double_array( char **tk , double *buf , int start , int size ); +char *saacproto_wrapStringAddr( char *copy , int maxcopylen , char*src ); + +void saacproto_GetMessageInfo( int *id , char *funcname , int len,char **tk ); +int saacproto_ClientRead(void); +void saacproto_consumeLine(char *buf , int ofs ); +void saacproto_copyLine( char*src , char *out , int maxoutlen ); +void saacproto_Send( int fd , char *msg ); +int saacproto_AllocateCommonWork(int bufsiz); +unsigned int saacproto_GetNewMessageID(void); +void saacproto_CreateHeader(char*out, char *fname ); +void saacproto_CreateHeaderID( char *out,unsigned long msgid , char *fname ); +int saacproto_default_write_wrap( int fd , char *buf , int size ); +void saacproto_bzero( char *b , int siz ); +void saacproto_bcopy(char*s , char *d , int siz ); +char *saacproto_Ltoa( long v ); +char *saacproto_Ultoa( unsigned long v ); +void saacproto_DebugSend( int fd , char *msg ); +/* Modified by ringo to fasten int type transfer */ +char *saacproto_cnv10to62( int a, char *out, int outlen ); +int saacproto_a62toi( char *a ); + + + +#ifdef _NEW_PLAYERGOLD +#define MAXNEWPLAYERLIST 100000 +typedef struct _tagNEWPlayerList +{ + char name[256]; + int use; +}nNEWPlayerList; + +enum{ + NEW_ERR=0, + NEW_DELOK, + NEW_DELERR, + NEW_ADDOK=11, + NEW_ADDERR, + NEW_LISTFULL, +}; +void NEWPLAYER_FreeGoldInit(); +void resetNEWPlayerList(); +void backupNEWPlayerListFile( char *filename, char *refilename); +void LoadNEWPlayerListFile( char *filename); +int DelNEWPlayerfromFile( char *CdKey, char *UserName, int RunType); +int AddNEWPlayertoFile( char *CdKey, char *UserName, int Strlens); +int LoadNEWPlayerListAdd( char *filename); + +#endif + +#endif + + diff --git a/saac/saacproto_work.c b/saac/saacproto_work.c new file mode 100644 index 0000000..63d4130 --- /dev/null +++ b/saac/saacproto_work.c @@ -0,0 +1,242 @@ +#include "version.h" +#include "main.h" +#include "recv.h" +#ifdef _FIX_WORKS +#include "saacproto_serv.h" +#include "saacproto_work.h" +#include "char.h" + +extern int worksockfd; +struct timeval select_timeout; +static int findWk = 0; +int FindWorkRegBlankCon( void ); + + +int SetWorkConnectionInit( int mem_use) +{ + cWork = ( struct connection *) calloc( 1, MAXWORKCONNECTION * sizeof( struct connection )); + if( cWork == NULL ){ + //free( wb ); + return 0; + } else { + int i; + for( i=0; i= 0 && cWork[i].closed_by_remote ==0 ){ + FD_SET( cWork[i].fd , & rfds ); + FD_SET( cWork[i].fd , & wfds ); + FD_SET( cWork[i].fd , & efds ); + } + } + + t = select_timeout; + sret = select( 1024, & rfds , (fd_set*)NULL, & efds , &t); + if( sret > 0 ) { + for(i=0;i< MAXWORKCONNECTION;i++){ + if( cWork[i].use && ( cWork[i].fd >= 0 ) && FD_ISSET( cWork[i].fd , &rfds ) ){ + int rr , readsize ; + readsize = sizeof( tmpbuf); + memset( tmpbuf, 0, sizeof( tmpbuf)); + rr = read( cWork[i].fd , tmpbuf , readsize ); + if( rr <= 0 ){ + cWork[i].closed_by_remote = 1; + } else { + MEMBuffer_AddWkReadBuffer( i, tmpbuf, WK_R); + } + } + } + } + t = select_timeout; + sret = select( 1024 , (fd_set*)NULL, &wfds, & efds , &t); + if( sret > 0 ) { + for(i=0;i= 0 ) && FD_ISSET( cWork[i].fd , &wfds )){ + int rr; + memset( tmpbuf, 0, sizeof( tmpbuf)); + if( MEMBuffer_getWkLineReadBuffer( i, tmpbuf, sizeof( tmpbuf), WK_W) <= 0 ) + continue; + rr = write( cWork[i].fd , tmpbuf , strlen(tmpbuf) ); + if( rr <= 0 ){ + cWork[i].closed_by_remote = 1; + }else { + } + } + } + } + for(i=0; i0) && FD_ISSET( worksockfd , & rfds )){ + struct sockaddr_in c; + int len , newsockfd; + int newcon; + bzero( &c , sizeof( c )); + len = sizeof( c ); + newcon = FindWorkRegBlankCon(); + //newcon = FindWorkRegBlankCon( ); + if( newcon < 0 ){ + continue; + } + newsockfd = accept( worksockfd , (struct sockaddr*)&c , &len ); + + if( newsockfd < 0 ){ +// UnWorkRegMemBuf( newcon ); + continue; + } + if( MAXWK <= findWk ) continue; + set_nodelay( newsockfd ); + cWork[newcon].fd = newsockfd; + memcpy( &cWork[newcon].remoteaddr , &c ,sizeof(c)); + tis[accepted] = newcon; + //andy_add + for( j=0; j= MAXWK ) findWk=0; + if( wk[findWk].use != 1 && wk[findWk].fd < 0 ) { + wk[findWk].status = WKSTAT_IDLE; + wk[findWk].use = 1; + wk[findWk].ti = newcon; + wk[findWk].fd = newsockfd; + log( "同意工作: sockfd:%d,newfd:%d=aWork:%d\n" , worksockfd, newsockfd, findWk); + break; + } + } + accepted ++; + } + } + + return accepted; +} + +int cWork_write( int ti , char *buf , int len ) +{ + if( ti < 0 || ti >= MAXWORKCONNECTION || cWork[ti].use == 0 ) + return TCPSTRUCT_EINVCIND; + return MEMBuffer_AddWkReadBuffer( ti, buf, WK_W); +} + +int Work_close( int ti ) +{ + if( ti < 0 || ti >= MAXWORKCONNECTION )return TCPSTRUCT_EINVCIND; + if( cWork[ti].use == 0 ){ + return TCPSTRUCT_ECLOSEAGAIN; + } + close( cWork[ti].fd ); + cWork[ti].use = 0; + cWork[ti].fd = -1; + + MEMBuffer_clean( ti); + + cWork[ti].mbtop_ri = -1; + cWork[ti].mbtop_wi = -1; + + return OK; +} +#endif + + +MEMBuffers memBuf[MAXWORKCONNECTION]; //30 +void MEMBuffer_Init() +{ + int i; + for( i=0; i sizeof( memBuf[ti].buff) ) return -1; + memcpy( memBuf[ti].buff, data, strlen( data)+1); + memBuf[ti].WR = flg; + + return 1; +} + +int MEMBuffer_getWkLineReadBuffer( int ti, char *data, int sizes, int flg) +{ + if( !memBuf[ti].use ) return -1; + if( memBuf[ti].WR != flg )return -1; + + if( sizes < sizeof( memBuf[ti].buff) ){ + memBuf[ti].WR = -1; + memset( memBuf[ti].buff, 0, sizeof( memBuf[ti].buff)); + return -1; + } + memcpy( data, memBuf[ti].buff, sizeof( memBuf[ti].buff)); + memBuf[ti].WR = -1; + memset( memBuf[ti].buff, 0, sizeof( memBuf[ti].buff)); + return 1; +} + +void MEMBuffer_clean( int ti) +{ + memset( memBuf[ti].buff, 0, sizeof( memBuf[ti].buff) ); + memBuf[ti].use = 0; + memBuf[ti].WR =-1; +} + +int MEMBuffer_Find( int ti) +{ + if( !memBuf[ti].use ){ + memBuf[ti].use = 1; + memBuf[ti].WR =-1; + return 1; + } + + return -1; +} + +int FindWorkRegBlankCon( void ) +{ + int i; + + for(i=0;i +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "saacproto_work.h" +#ifdef _OACSTRUCT_TCP +#include "saacproto_oac.h" +#endif +#ifdef _PAUCTION_MAN +#include "auction.h" +#endif +#include "lock.h" +#define BACKLOGNUM 5 + + +#ifdef _FIX_WORKS +#include "saacproto_work.h" +int worksockfd; +#endif + +#ifdef _LOCK_SERVER +#include "saacproto_lserver.h" +#endif + +#ifdef _SEND_EFFECT // WON ADD 送下雪、下雨等特效 +#include "recv.h" +#endif + +#include "defend.h" + +#include "char.h" + +#include + +#define BOOL int +#define FALSE 0 +#define TRUE 1 +MYSQL mysql; +MYSQL_RES *mysql_result; +MYSQL_ROW mysql_row; + +typedef struct tagConfig +{ + char sql_IP[16]; + + int sql_Port; + + char sql_Port1[16]; + + char sql_ID[16]; + + char sql_PS[16]; + + char sql_DataBase[16]; + + char sql_Table[16]; + + char sql_Name[16]; + + char sql_PassWord[16]; + + char sql_RegTime[16]; + + char sql_LoginTime[16]; + + char sql_Path[10]; + + char sql_OnlineName[16]; + +}Config; + +Config config; + +int AutoReg; + +static int readConfig( char *path ) +{ + char buf[2048]; + FILE *fp; + + fp = fopen( path , "r" ); + if( fp == NULL ){ return -2; } + + while( fgets( buf , sizeof( buf ) , fp )){ + char command[1024]; + char param[2048]; + chop(buf); + + easyGetTokenFromString( buf , 1 , command , sizeof( command )); + easyGetTokenFromString( buf , 2 , param , sizeof( param )); + + if( strcmp( command , "sql_IP" ) == 0 ){ + strcmp( config.sql_IP , param ) ; + snprintf( config.sql_IP , sizeof( config.sql_IP) , param ); + log("\n数据库地址: %s",config.sql_IP); + } else if( strcmp( command , "sql_Port" ) == 0 ){ + config.sql_Port = atoi( param ); + snprintf( config.sql_Port1 , sizeof( config.sql_Port1) , param ); + log("\n数据库端口: %d",config.sql_Port); + } else if( strcmp( command , "sql_ID" ) == 0 ){ + strcmp( config.sql_ID , param ) ; + snprintf( config.sql_ID , sizeof( config.sql_ID) , param ); + log("\n数据库用户: %s",config.sql_ID); + } else if( strcmp( command , "sql_PS" ) == 0 ){ + strcmp( config.sql_PS , param ) ; + snprintf( config.sql_PS , sizeof( config.sql_PS) , param ); + log("\n数据库密码: %s",config.sql_PS); + } else if( strcmp( command , "sql_DataBase" ) == 0 ){ + strcmp( config.sql_DataBase , param ) ; + snprintf( config.sql_DataBase , sizeof( config.sql_DataBase) , param ); + log("\n登陆数据库名:%s",config.sql_DataBase); + } else if( strcmp( command , "sql_Table" ) == 0 ){ + strcmp( config.sql_Table , param ) ; + snprintf( config.sql_Table , sizeof( config.sql_Table) , param ); + log("\n数据库表名: %s",config.sql_Table); + } else if( strcmp( command , "sql_Name" ) == 0 ){ + strcmp( config.sql_Name , param ) ; + snprintf( config.sql_Name , sizeof( config.sql_Name) , param ); + log("\n用户名字段: %s",config.sql_Name); + } else if( strcmp( command , "sql_PassWord" ) == 0 ){ + strcmp( config.sql_PassWord , param ) ; + snprintf( config.sql_PassWord , sizeof( config.sql_PassWord) , param ); + log("\n密码字段: %s",config.sql_PassWord); + } else if( strcmp( command , "sql_RegTime" ) == 0 ){ + strcmp( config.sql_RegTime , param ) ; + snprintf( config.sql_RegTime , sizeof( config.sql_RegTime) , param ); + log("\n注册时间: %s",config.sql_RegTime); + } else if( strcmp( command , "sql_LoginTime" ) == 0 ){ + strcmp( config.sql_LoginTime , param ) ; + snprintf( config.sql_LoginTime , sizeof( config.sql_LoginTime) , param ); + log("\n登陆时间: %s",config.sql_LoginTime); + } else if( strcmp( command , "sql_Path" ) == 0 ){ + strcmp( config.sql_Path , param ) ; + snprintf( config.sql_Path , sizeof( config.sql_Path) , param ); + log("\n路径字段: %s",config.sql_Path); + } else if( strcmp( command , "sql_OnlineName" ) == 0 ){ + strcmp( config.sql_OnlineName , param ) ; + snprintf( config.sql_OnlineName , sizeof( config.sql_OnlineName) , param ); + log("\n在线玩家字段:%s",config.sql_OnlineName); + } else if( strcmp( command , "AutoReg" ) == 0 ){ + AutoReg = atoi( param ); + log("\n开放自动注册:%d",AutoReg); + fclose(fp); + return 0; + } + } +} + +BOOL sasql_init( void ) +{ + +if( mysql_init(&mysql) == NULL & readConfig("acserv.cf")) +{ + log("\n数据库初始化失败!"); + exit(1); + return FALSE; +} + + if( !mysql_real_connect( &mysql, + config.sql_IP, + config.sql_ID,//帐号 + config.sql_PS,//密码 + config.sql_DataBase,//选择的资料库 + config.sql_Port, + NULL, + 0 ) ) + { + log("\n更新数据库失败!\n"); + return FALSE; + } + + log("\n数据库连接成功!\n"); +#ifdef _SQL_BACKGROUND + if(!sasql_initonline()) + log("\n数据库初始化失败!\n"); +#endif + return TRUE; +} + +void sasql_close( void ) +{ + mysql_close( &mysql ); +} + + +BOOL sasql_query(char *nm, char *pas){ + char sqlstr[256]; + sprintf(sqlstr,"select * from %s where %s=BINARY'%s' and %s=BINARY'%s'",config.sql_Table,config.sql_Name,nm,config.sql_PassWord,pas); + if(!mysql_query(&mysql,sqlstr)){ + int num_row=0; + mysql_result=mysql_store_result(&mysql); + num_row=mysql_num_rows(mysql_result); + mysql_free_result(mysql_result); + if(num_row==1){ + return TRUE;} + else{ + return FALSE;}} + else{ + log("\n 数据库查找失败!\n"); + return FALSE;} +} + + +#ifdef _SQL_BACKGROUND +BOOL sasql_update(char *nm, char *path){ + char sqlstr[256]; + sprintf(sqlstr,"update %s set %s='%s' where %s=BINARY'%s'",config.sql_Table,config.sql_Path,path,config.sql_Name,nm); + if(!mysql_query(&mysql,sqlstr)){ + return TRUE;} + else{ + log("\n更新数据库失败!\n"); + return FALSE;} +} + +BOOL sasql_online(char *nm,char *lnm){ + char sqlstr[256]; + sprintf(sqlstr,"update %s set %s='%s',%s=NOW() where %s=BINARY'%s'",config.sql_Table,config.sql_OnlineName,lnm,config.sql_LoginTime,config.sql_Name,nm); + if(!mysql_query(&mysql,sqlstr)){ + return TRUE;} + else{ + log("\n更新数据库失败!\n"); + return FALSE;} +} + +BOOL sasql_initonline(){ + char sqlstr[256]; + sprintf(sqlstr,"update %s set %s=NULL",config.sql_Table,config.sql_OnlineName); + if(!mysql_query(&mysql,sqlstr)){ + return TRUE;} + else{ + return FALSE;} +} +#endif + +#ifdef _SQL_REGISTER +BOOL sasql_register(char *nm, char *pas){ + char sqlstr[256]; + if(AutoReg==1) + { + sprintf(sqlstr,"select * from %s where %s=BINARY'%s'",config.sql_Table,config.sql_Name,nm); + if(!mysql_query(&mysql,sqlstr)){ + int num_row=0; + mysql_result=mysql_store_result(&mysql); + num_row=mysql_num_rows(mysql_result); + mysql_free_result(mysql_result); + if(num_row==0){ + sprintf(sqlstr,"INSERT INTO %s (%s,%s,%s) VALUES ('%s','%s',NOW())",config.sql_Table,config.sql_Name,config.sql_PassWord,config.sql_RegTime,nm,pas); + if(!mysql_query(&mysql,sqlstr)){ + log("\n新用户注册成功!\n"); + return TRUE;} + else{ + log("\n新用户注册失败!\n"); + return FALSE;}} + else{ + return FALSE;}} + else{ + log("\n 数据库查找失败!\n"); + return FALSE;} + } + else{ + return FALSE;} +} +#endif + +#endif \ No newline at end of file diff --git a/saac/sasql.h b/saac/sasql.h new file mode 100644 index 0000000..72b7d07 --- /dev/null +++ b/saac/sasql.h @@ -0,0 +1,34 @@ +#ifndef _SASQL_H_ +#define _SASQL_H_ + +#include "version.h" +#ifdef _SASQL +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +void sasql_close( void ); +int sasql_save_nm( int idx, char *acc, char *data );//左右人物, 帐号, 资料 +int sasql_save_opt( int idx, char *acc, char *data ); +int sasql_save_int_info( int idx, char *acc, char *data ); +int sasql_save_char_info( int idx, char *acc, char *data ); + +BOOL sasql_init( void ); +BOOL sasql_query(char *nm, char *pas); +BOOL sasql_update(char *nm, char *path); +BOOL sasql_logindate(char *nm); +BOOL sasql_online(char *nm,char *lnm,int online); +BOOL sasql_register(char *nm, char *pas); +#endif + +#endif diff --git a/saac/tcpip_util.c b/saac/tcpip_util.c new file mode 100644 index 0000000..0319248 --- /dev/null +++ b/saac/tcpip_util.c @@ -0,0 +1,473 @@ +#include "version.h" +#include "main.h" +#include "tcpip_util.h" + +#ifdef _TCPIP_UTIL +struct connection *tcpcon; +struct membuf *mems=NULL; +static int me_find=0; +static int tpsockfd1=-1; +int mesize; +int meuse; +char tmpbuf[65536]; + +#define BACKLOGNUM 5 +struct timeval select_timeout; +struct sockaddr_in localaddr; + +int MEMBUF_InitSize( int mem_use, int db ) +{ + mesize = mem_use / sizeof( struct membuf ); + meuse = 0; + me_find = 0; + mems = ( struct membuf * ) calloc( 1, mesize * sizeof(struct membuf )); + if( mems == NULL ) return TCPSTRUCT_ENOMEM; + bzero( mems , mesize * sizeof( struct membuf )); + + tcpcon = ( struct connection *) calloc( 1, MAXTCPCONNECTION * sizeof( struct connection )); + if( tcpcon == NULL ){ + free( mems ); + return TCPSTRUCT_ENOMEM; + } else { + int i; + for( i=0; i= mesize || me_find < 0 ) + me_find = 0; + if( mems[me_find].use == 0 ){ + mems[me_find].use = 1; + mems[me_find].len = 0; + mems[me_find].next = -1; + meuse ++; + return me_find; + } + } + return TCPSTRUCT_EMBFULL; +} + +int MEMBUF_findregBlankCon( void ) +{ + int i; + for( i=0; i= fr ){ + FILE *fp; + if( (fp=fopen( "badsysinfo.txt", "a+")) != NULL ){ + fprintf( fp, "appendMemBufList() len:%d / fr:%d err !! \n", len, fr); + fclose( fp); + } + return -1; + } + + data[len] = 0; + for(;;){ + int blanksize = sizeof( mems[0].buf ) - mems[top].len; + int cpsize = ( rest <= blanksize ) ? rest : blanksize; + memcpy( mems[top].buf + mems[top].len, data + data_topaddr , cpsize ); + mems[top].len += cpsize; + + if( rest <= blanksize ){ + return len; + } else { + int newmb; + rest -= cpsize; + data_topaddr += cpsize; + if( (newmb = MEMBUF_findregBlankMemBuf() ) == TCPSTRUCT_EMBFULL ){ + FILE *fp; + if( (fp=fopen( "badsysinfo.txt", "a+")) != NULL ){ + fprintf( fp, "find newmb == TCPSTRUCT_EMBFULL err data:%s !!\n", data); + fclose( fp); + } + log( "find newmb == TCPSTRUCT_EMBFULL err data:%s !!\n", data); + } + mems[top].next = newmb; + top = mems[top].next; + } + } + + return TCPSTRUCT_EBUG; +} + +int MEMBUF_consumeMemBufList( int top, char *out, int len, int consumeflag , int copyflag ) +{ + int total = 0; + int top_store = top; + for(;;){ + int cpsize; + if( top == -1 ) break; + cpsize=(mems[top].len<=(len-total))?mems[top].len:(len-total); + if( copyflag ) memcpy( out + total , mems[top].buf , cpsize ); + total += cpsize; + if( consumeflag ){ + mems[top].len -= cpsize; + if( mems[top].len > 0 ){ + memmove( mems[top].buf, mems[top].buf+cpsize, sizeof(mems[top].buf)-cpsize); + } + } + top = mems[top].next; + if( total == len ){ + break; + } + } + if( consumeflag ){ + top = mems[top_store].next; + for(;;){ + if( top == -1 )break; + if( mems[top].len == 0 ){ + int prev; + mems[top_store].next = mems[top].next; + prev = top; + top = mems[top].next; + MEMBUF_unregMemBuf( prev); + } else { + top = mems[top].next; + } + } + } + return total; +} + +int MEMBUF_getLineReadBuffer( int ti , char *buf, int len ) +{ + int i, l; + int top = tcpcon[ti].mbtop_ri; + int tci = 0 , breakflag = 0; + for(;;){ + l = mems[top].len; + if( top == -1 )break; + for( i=0 ; i < l ; i++){ + if( mems[top].buf[i] == '\n' ){ + breakflag = 1; + break; + } + tci ++; + } + if( breakflag )break; + top = mems[top].next; + } + if( tci > len ) + return TCPSTRUCT_ETOOLONG; + if( breakflag == 0 ) + return 0; + return MEMBUF_consumeMemBufList( tcpcon[ti].mbtop_ri , buf , tci+1 , 1 , 1 ); +} + +int MEMBUF_readline( int ti , char *buf , int len , int kend , int kend_r ) +{ + int l; + int minus = 0; + if( ti < 0 || ti >= MAXTCPCONNECTION || tcpcon[ti].use == 0 ) + return TCPSTRUCT_EINVCIND; + l = MEMBUF_getLineReadBuffer( ti , buf , len ); + if( l == 0 ){ + if( tcpcon[ti].closed_by_remote ){ + return TCPSTRUCT_EREADFIN; + } else { + return 0; + } + } + if( kend ){ + if( buf[l-1]=='\n' ) buf[l-1] = 0; minus =-1; + } + if( kend_r ){ + if( buf[l-1]=='\r' ) buf[l-1] = 0; minus = -1; + if( buf[l-2]=='\r' ) buf[l-2] = 0; minus = -2; + } + return l + minus; +} + +int MEMBUF_readline_chop( int ti , char *buf, int len ) +{ + return MEMBUF_readline( ti , buf , len , 1,1); +} + +int MEMBUF_writeline( int ti , char *buf , int len ) +{ + if( ti < 0 || ti >= MAXTCPCONNECTION || tcpcon[ti].use == 0 ) + return TCPSTRUCT_EINVCIND; + return MEMBUF_appWriteBuffer( ti , buf , len ); +} + +//----------------------------------------------------------------------------- + +int TCPIP_bindSocket( char *addr , int p , int timeout_ms) +{ + int sockets; + + //andy_log + log("_bindSocket( %d, %d)\n", p, timeout_ms); + + select_timeout.tv_sec = timeout_ms / 1000; + select_timeout.tv_usec = (timeout_ms - ( timeout_ms/1000)*1000)*1000; + //socket + if( (sockets = socket( AF_INET , SOCK_STREAM , 0 ) ) < 0 ) + return TCPSTRUCT_ESOCK; + //bind + bzero( &localaddr ,sizeof( localaddr )); + localaddr.sin_family = AF_INET; + localaddr.sin_port = htons( p ); + if( addr ){ + localaddr.sin_addr.s_addr = inet_addr( addr ); + } else { + localaddr.sin_addr.s_addr = htonl( INADDR_ANY ); + } + if( bind( sockets, (struct sockaddr*) &localaddr, sizeof( localaddr )) < 0 ) + return TCPSTRUCT_EBIND; + //listen + if( listen( sockets , BACKLOGNUM ) < 0 ) + return TCPSTRUCT_ELISTEN; + + tpsockfd1 = sockets; + return OK; +} + +int TCPIP_connect( char *addr , int port ) +{ + int newti ; + int s, r; + struct sockaddr_in svaddr; + struct hostent *he; + + if( (s = socket( AF_INET, SOCK_STREAM , 0 )) < 0 ) return -2; + bzero( &svaddr , sizeof( svaddr )); + svaddr.sin_family = AF_INET; + svaddr.sin_port = htons( port ); + + if( inet_aton( addr, &svaddr.sin_addr ) == 0 ){ + he = gethostbyname( addr ); + if( he == NULL ){ + return TCPSTRUCT_EHOST; + } + memcpy( & svaddr.sin_addr.s_addr , he->h_addr , + sizeof( struct in_addr)); + } + r = connect( s , ( struct sockaddr*)&svaddr,sizeof(svaddr)); + if( r < 0 ){ + return TCPSTRUCT_ECONNECT; + } + set_nodelay( s ); + newti = MEMBUF_findregBlankCon( ); + if( newti < 0 ){ + log( "connection FULL: newti:%d !\n", newti ); + return TCPSTRUCT_ECFULL; + } + + tcpcon[newti].fd = s; + memcpy( &tcpcon[newti].remoteaddr, &svaddr, sizeof( struct sockaddr_in)); + return newti; +} + + +int TCPIP_close( int ti ) +{ + if( ti < 0 || ti >= MAXTCPCONNECTION )return TCPSTRUCT_EINVCIND; + if( tcpcon[ti].use == 0 ){ + return TCPSTRUCT_ECLOSEAGAIN; + } + close( tcpcon[ti].fd ); + tcpcon[ti].use = 0; + tcpcon[ti].fd = -1; + MEMBUF_consumeMemBufList( tcpcon[ti].mbtop_ri , NULL, mesize * sizeof( mems[0].buf ), 1, 0 ); + MEMBUF_consumeMemBufList( tcpcon[ti].mbtop_wi , NULL, mesize * sizeof( mems[0].buf ), 1, 0 ); + MEMBUF_unregMemBuf( tcpcon[ti].mbtop_ri ); + MEMBUF_unregMemBuf( tcpcon[ti].mbtop_wi ); + + tcpcon[ti].mbtop_ri = -1; + tcpcon[ti].mbtop_wi = -1; + return OK; +} + +int TCPIP_selectdata( void) +{ + int i; + int sret; + struct timeval t; + + fd_set rfds, wfds , efds; + FD_ZERO( & rfds ); + FD_ZERO( & wfds ); + FD_ZERO( & efds ); + + for(i=0;i= 0 && tcpcon[i].closed_by_remote ==0 ){ + FD_SET( tcpcon[i].fd , & rfds ); + FD_SET( tcpcon[i].fd , & wfds ); + FD_SET( tcpcon[i].fd , & efds ); + } + } + + t = select_timeout; + sret = select( 1024, & rfds , (fd_set*)NULL, & efds , &t); + if( sret > 0 ) { + for(i=0; i= 0 ) && FD_ISSET( tcpcon[i].fd , &rfds ) ){ + int fr = MEMBUF_getFreeMem( ); + int rr , readsize ; + if( fr <= 0 ) continue; + if( fr > sizeof(tmpbuf ) ){ + readsize = sizeof( tmpbuf); + } else { + readsize = fr; + } + rr = read( tcpcon[i].fd , tmpbuf , readsize ); + if( rr <= 0 ){ + tcpcon[i].closed_by_remote = 1; + } else { + MEMBUF_appReadBuffer( i , tmpbuf , rr ); + } + } + } + } + /* write */ + t = select_timeout; + sret = select( 1024, (fd_set*)NULL, &wfds, & efds , &t); + if( sret > 0 ) { + for(i=0;i= 0 ) && FD_ISSET( tcpcon[i].fd , &wfds ) ){ + char send_buf[4096]; + int l , rr; + memset( send_buf, 0, sizeof( send_buf)); + l = MEMBUF_consumeMemBufList( tcpcon[i].mbtop_wi ,send_buf, sizeof(send_buf),0 , 1 ); + rr = write( tcpcon[i].fd , send_buf , l ); + if( rr < 0 ){ + tcpcon[i].closed_by_remote = 1; + } else { + MEMBUF_consumeMemBufList( tcpcon[i].mbtop_wi , send_buf, l, 1 , 0 ); + } + } + } + } + return 1; +} + +int TCPIP_accept( int *tis , int ticount ) +{ + int i, accepted=0; + fd_set rfds, wfds , efds; + + for( i=0; i 0) && FD_ISSET( tpsockfd1 , & rfds )){ + struct sockaddr_in c; + int len , newsockfd; + int newcon; + bzero( &c , sizeof( c )); + len = sizeof( c ); + fprintf( stderr, "i can accept " ); + newcon = MEMBUF_findregBlankCon( ); + if( newcon < 0 ) continue; + newsockfd = accept( tpsockfd1, (struct sockaddr*)&c , &len ); + log( "tcpip accept: %d\n" , newsockfd ); + if( newsockfd < 0 ){ + MEMBUF_unregMemBuf( newcon ); + continue; + } + set_nodelay( newsockfd ); + tcpcon[newcon].fd = newsockfd; + memcpy( &tcpcon[newcon].remoteaddr , &c ,sizeof(c)); + tis[accepted] = newcon; + accepted ++; + } + } + + return accepted; +} + +int TCPIP_send( int ti , char *buf , int len ) +{ + return MEMBUF_writeline( ti , buf , len ); +} + +int TCPIP_checkCon( int ti) +{ + if( ti < 0 || ti >= MAXTCPCONNECTION) return 0; + return tcpcon[ti].use; +} + +#endif diff --git a/saac/tcpip_util.h b/saac/tcpip_util.h new file mode 100644 index 0000000..c0a26c6 --- /dev/null +++ b/saac/tcpip_util.h @@ -0,0 +1,33 @@ +#ifndef _TCPIPAC_H +#define _TCPIPAC_H +#include "version.h" + +#ifdef _TCPIP_UTIL +#define MAXTCPCONNECTION 15 +int MEMBUF_InitSize( int mem_use, int db ); +int MEMBUF_unregMemBuf( int ti ); +int MEMBUF_findregBlankMemBuf( void ); +int MEMBUF_findregBlankCon( void ); +int MEMBUF_getFreeMem( void ); +int MEMBUF_appReadBuffer( int ti, char *data, int len); +int MEMBUF_appWriteBuffer( int ti, char *data, int len ); +int MEMBUF_appMemBufList( int top , char *data , int len ); +int MEMBUF_consumeMemBufList( int top, char *out, int len, int + consumeflag, int copyflag ); +int MEMBUF_getLineReadBuffer( int ti , char *buf, int len ); +int MEMBUF_readline( int ti , char *buf , int len , int kend , int kend_r ); +int MEMBUF_readline_chop( int ti , char *buf, int len ); +int MEMBUF_writeline( int ti , char *buf , int len ); + +//----------------------------------------------------------------------------- + +int TCPIP_bindSocket( char *addr , int p , int timeout_ms); +int TCPIP_connect( char *addr , int port ); +int TCPIP_close( int ti ); +int TCPIP_selectdata( void); +int TCPIP_accept( int *tis , int ticount ); +int TCPIP_send( int ti , char *buf , int len ); +int TCPIP_checkCon( int ti); + +#endif +#endif diff --git a/saac/util.c b/saac/util.c new file mode 100644 index 0000000..072f468 --- /dev/null +++ b/saac/util.c @@ -0,0 +1,396 @@ +#define _UTIL_C_ + +#include +#include +#include + +#include "main.h" +#include "util.h" + +#define IS_2BYTEWORD( _a_ ) ( (char)(0x80) <= (_a_) && (_a_) <= (char)(0xFF) ) +#define PRIME 211 +int hashpjw ( char* s ) +{ + char *p; + unsigned int h= 0 ,g; + for( p = s ; *p ; p ++ ){ + h = ( h<< 4 ) + (*p); + if( (g = h & 0xf0000000) != 0){ + h = h ^ (g>>24); + h = h ^ g; + } + } + return h % PRIME; +} + +int getHash ( char* s ) +{ + int i; + int h=0; + + for(i=0;; i++){ + if( s[i] == 0 ){ + break; + } + h += s[i]; + } + return h; +} + +void easyGetTokenFromString( char *src,int count,char*output,int len ) +{ + int i; + int counter = 0; + + if( len <= 0 )return; + +#define ISSPACETAB( c ) ( (c) == ' ' || (c) == '\t' ) + + for(i=0;;i++){ + if( src[i]=='\0'){ + output[0] = '\0'; + return; + } + if( i > 0 && ! ISSPACETAB( src[i-1] ) && + ! ISSPACETAB( src[i] ) ){ + continue; + } + + if( ! ISSPACETAB( src[i]) ){ + counter++; + if( counter == count){ + int j; + for(j=0;j= sizeofdest ) break; + if( IS_2BYTEWORD( src[i] ) ){ + if( destindex + 2 >= sizeofdest ) break; + dest[destindex] = src[i]; + dest[destindex+1] = src[i+1]; + destindex += 2; + i ++; + continue; + } + + for( j = 0; j= sizeofdest ) + /* '\0'坌互箫曰卅中及匹仇仇匹蔽曰 */ + break; + + /* // 蝈剩及ㄠ田奶玄 井升丹井毛民尼永弁 + if( IS_2BYTEWORD( src[i] ) ){ + // 蝈剩分[公及桦宁反ㄠ田奶玄芴坌卞褡引六月[ + // 凶分仄ㄠ田奶玄仄井卅中桦宁反公丹仄卅中 + // 公及引引ㄡ田奶玄鳖霜 + if( destindex + 2 >= sizeofdest )break; + + dest[destindex] = src[i]; + dest[destindex+1] = src[i+1]; + destindex += 2; + i ++; + continue; + } + */ + for( j = 0; j= destlen ){ + return -1; + } else { + strcat( dest, append ); + } + return 0; +} + +char *chop( char *s ) +{ + int l = strlen(s); + if( l >= 1 ){ + s[l-1]=0; + } + return s; +} + +// CoolFish: Family 2001/5/30 +void easyGetTokenFromBuf(char *src, char delim, int count, char *output, int len) +{ + int i; + int counter = 0; + int wordflag = 0; + + if( len <= 0 ) return; + + #define ISSEPARATE( c ) ((c) == delim) + + for( i=0; ; i++){ + if( src[i] == '\0' ){ + output[0] = '\0'; + return; + } + if(IS_2BYTEWORD(src[i])){ + if( i>0 && wordflag == 1 ){ + i++; + wordflag = 1; + continue; + } + if( i>0 && !ISSEPARATE(src[i-1]) && !ISSEPARATE(src[i])){ + i++; + wordflag = 1; + continue; + } + wordflag = 1; + }else{ + if( i>0 && wordflag ){ + wordflag = 0; + continue; + } + if( i>0 && !ISSEPARATE(src[i-1]) && !ISSEPARATE(src[i])){ + wordflag = 0; + continue; + } + wordflag = 0; + } + if( !ISSEPARATE(src[i]) ){ + counter++; + if( counter == count ){ + int j; + for ( j=0; j +#include +#include +#include +#include +#include +#include +#include "TCPIP.h" +#include "version.h" + +int getAddress(char *host, struct in_addr *iaddr) +{ + char *p = host; + int ishost = 0; + + if (strcmp(host,"*")==0) { + iaddr->s_addr=htonl(INADDR_ANY); + return 1; + } + while (*p) { + if (!(isdigit(*p) || ((*p) == '.'))) { + ishost = 1; + break; + } + p++; + } + if (ishost) { + struct hostent *h; + h = gethostbyname(host); + if (!h) { return 0; } + memcpy((void *) &iaddr->s_addr,(void *) h->h_addr,4); + return 1; + } else { + iaddr->s_addr = inet_addr(host); + return 1; + } +} + +int TCPbind(char *bindAddress,int bindPort) +{ + struct in_addr iaddr; + struct sockaddr_in saddr; + struct linger lg; + int sd; + int nodelay,reuse; + + if (!getAddress(bindAddress, &iaddr)) + errexit2("Host %s could not be resolved\n",bindAddress); + sd = socket(PF_INET, SOCK_STREAM, 0); + if (sd < 0) + errexit("Couldn't create server socket!\n"); + + saddr.sin_family = AF_INET; + memcpy(&saddr.sin_addr, &iaddr, sizeof(iaddr)); + saddr.sin_port = htons(bindPort); + + if (setsockopt(sd,IPPROTO_TCP,TCP_NODELAY,&nodelay,sizeof(nodelay))<0) + error("TCP_NODELAY failed\n"); + if (setsockopt(sd,SOL_SOCKET,SO_REUSEADDR,&reuse,sizeof(reuse))<0) + error("SO_REUSEADDR failed\n"); + lg.l_onoff=1; lg.l_linger=5; + if (setsockopt(sd,SOL_SOCKET,SO_LINGER,&lg,sizeof(lg))<0) + error("SO_LINGER failed\n"); + + if (bind(sd, (struct sockaddr *)&saddr, sizeof(saddr)) < 0) + errexit3("Couldn't bind to address %s port %d\n", + bindAddress, bindPort); + if (listen(sd, 5) < 0) + errexit3("Couldn't listen to address %s port %d\n", + bindAddress, bindPort); + return(sd); +} + +int TCPaccept0(int sd,int block,unsigned long *ip) +{ + struct sockaddr_in saddr; + int ad,len,j; + + if (block==0) { + j=0; + setsockopt(sd, SOL_SOCKET, SO_LINGER, &j, sizeof(j)); + fcntl(sd, F_SETFL, O_NONBLOCK); + } + len=sizeof(saddr); + if ((ad = accept(sd, (struct sockaddr *)&saddr, (int *)&len)) < 0) { + error("Couldn't accept\n"); + return -1; + } else if (ip) memcpy(ip,&saddr.sin_addr, sizeof(unsigned long)); + return(ad); +} + +int TCPaccept(int sd) { return TCPaccept0(sd,1,0); } +int TCPacceptIP(int sd,unsigned long *ip) { return TCPaccept0(sd,1,ip); } +int TCPacceptNB(int sd) { return TCPaccept0(sd,0,0); } + +int TCPconnect0(char *bindAddress,int bindPort,int block) +{ + struct in_addr iaddr; + struct sockaddr_in saddr; + int sd,j; + int nodelay; + + if (!getAddress(bindAddress, &iaddr)) { + error2("Host %s could not be resolved\n",bindAddress); + return -1; + } + sd = socket(PF_INET, SOCK_STREAM, 0); + if (sd < 0) { + error("Couldn't create server socket!\n"); + return -1; + } + saddr.sin_family = AF_INET; + memcpy(&saddr.sin_addr, &iaddr, sizeof(iaddr)); + saddr.sin_port = htons(bindPort); + + if (setsockopt(sd,IPPROTO_TCP,TCP_NODELAY,&nodelay,sizeof(nodelay))<0) + error("TCP_NODELAY failed\n"); + + if (block==0) { + j=0; + setsockopt(sd, SOL_SOCKET, SO_LINGER, &j, sizeof(j)); + fcntl(sd, F_SETFL, O_NONBLOCK); + } + + if (connect(sd, (struct sockaddr *)&saddr, sizeof(saddr)) < 0) { + error3("无法连接地址 %s 端口 %d\n", + bindAddress, bindPort); + return -1; + } + return(sd); +} + +int TCPconnect(char *bindAddress,int bindPort) +{ + TCPconnect0(bindAddress,bindPort,1); +} + +int TCPconnectNB(char *bindAddress,int bindPort) +{ + TCPconnect0(bindAddress,bindPort,0); +} + + + diff --git a/saac/wk/TCPIP.h b/saac/wk/TCPIP.h new file mode 100644 index 0000000..28f0743 --- /dev/null +++ b/saac/wk/TCPIP.h @@ -0,0 +1,8 @@ +int TCPbind(char *bindAddress,int bindPort); +int TCPaccept(int sd); +int TCPacceptIP(int sd,unsigned long *ip); +int TCPacceptNB(int sd); +int TCPconnect(char *bindAddress,int bindPort); +int TCPconnectNB(char *bindAddress,int bindPort); + + diff --git a/saac/wk/TCPIP.o b/saac/wk/TCPIP.o new file mode 100644 index 0000000000000000000000000000000000000000..79277c5d1b397d2c9e92ed6d539474fe6f36664c GIT binary patch literal 3432 zcmbVNZD?Cn7=Dv>Yu9x)`~Fb3JLa^T7;8GQC~9kWT!*EL-3E>^x-_|6lBG#aZpI?i z3E7koivAE01>GM%e(ayRIYiy&AQj6TtV$U}CQjH$go^tyv=E;+_nhSP(yDl%ea`cK zpZ7iYX!Ip|oWJ~qY`n;IVcY4Zg<#e-( zEK4Y^v#Zl%sPginls_=@?Ke1Tw$y{ejfvZS%@D;chZK^qfm|vwXQZer>Q;iBn8=P! zP{xB=!=0MtP(e(&(KS@ap~u8j_FR4S>@8;m_pQo@a^fmD+m8DYe_=U2AyXJ9&e_oq zYSE?bMSs*Cb-!{x~-wI-!%e}Q2N02q>cW*K~I!T#(_>i6Gg(_cp z{Q%kjzK0X?9!~z_Jwz9Ie3y|)jZa;zs-r$WCB*kqy<1fo?iQM$?$(-FW2^L`xG*m! zb7DL%#9SE2i}Ra~gPw(4Y#eNQ4~8Jkl^Fp-XhjCjH_22CSrrV_CuW~hm% zo8|EbEF+jS1D0u|%;XU>X`~Xt!=|;diS~5+2l{qx7rkBkjG;gz#!kC;4fKn>yG7Ub z?fts2cW2)YQIk}vsm33S#6yOaFan_v(xdPyiP5pR=bDjR~>#KII9o^lJ8?8I~_HHrSy*{tc@U^wIxA}ZNqqW}* z89f2Z=#9kFM{Vsxk8UCIrZU4;U=U~}Z49ej(u{d6^QcAMP{0b1cQBPAZ!%$%U}AXK zjPqmmpVtOh@^dGD)`)-CuGQDv)%I?P7S+Ubaxs1j;fQCZ;?H)x-z<3@ke7!aQEjPs z4?@QF|7O<)8?MidKVAmnJ;DOH42c~;O-#?@Ko@_PEcT+?toUCUh0z+83F_Nt@VO|HW< z)vSszS%!Ekv;bt8x;XE-{RnpIrvi!-UH6LUP9@d&+pLhbMS)>9(M4!gJ&H4 zn1dg8@G%E}6Wql7J_2%m?>qD#IQS{>X0&~sv_B2JADsKf{uh8ky`LBYj z#r^zQ5g_wh4n7V3A;zlW{{?q+xS7IFg}A+_VPxCFC&tGLo50nnxp+kL;IM@k+21rA&+Ei4ltxi6rSh z?PR}=9Ls+G+Gr>kw_;?on!L8#>96hkp5c8k5s#ZetIbZ}Bgt*ru32bXc&Hl1Z`Cc477glL8lAMRb45Bo0%x?70uW5hr@r2I+dcqH~S z!v8SiGNRWQmlM4OWdC=WdS$}dQHLCSxV@);?2;qI~hO2(B$TY((sVdkrdo@QK4 zv`5PKNqLSDdEaAPOY{XJF6H+?_Mc>qxPLOD-g|Ke-DpyW#D0k}Mx6g;Ap2#RZy-9! zi1U9cyh#UjHvHLMuX^8Alv1cZzTGhaXscC F@o!%`qe%b& literal 0 HcmV?d00001 diff --git a/saac/wk/error.c b/saac/wk/error.c new file mode 100644 index 0000000..55ff628 --- /dev/null +++ b/saac/wk/error.c @@ -0,0 +1,70 @@ +#include +#include +#include "error.h" +#include "version.h" +//char *logfile=ERRLOG; + +#define SHOW_TIME + +char *chartime() +{ + static char buf[80]; + time_t t; + t=time(0); +// strcpy(buf,ctime(&t)); + buf[strlen(buf)-1]=' '; + return(buf); +} + +void errexit(char *message) +{ +#ifdef SHOW_TIME + fprintf(stderr,"%s",chartime()); +#endif + fprintf(stderr,"%s\n",message); + exit(1); +} + +void errexit2(char *message1, char *message2) +{ +#ifdef SHOW_TIME + fprintf(stderr,"%s",chartime()); +#endif + fprintf(stderr,message1,message2); + exit(1); +} + +void errexit3(char *message1, char *message2, int message3) +{ +#ifdef SHOW_TIME + fprintf(stderr,"%s",chartime()); +#endif + fprintf(stderr,message1,message2,message3); + exit(1); +} + +void error(char *message) +{ +#ifdef SHOW_TIME + fprintf(stderr,"%s",chartime()); +#endif + fprintf(stderr,"%s",message); +} + +void error2(char *message1, char *message2) +{ +#ifdef SHOW_TIME + fprintf(stderr,"%s",chartime()); +#endif + fprintf(stderr,message1,message2); +} + +void error3(char *message1, char *message2, int message3) +{ +#ifdef SHOW_TIME + fprintf(stderr,"%s",chartime()); +#endif + fprintf(stderr,message1,message2,message3); +} + + diff --git a/saac/wk/error.h b/saac/wk/error.h new file mode 100644 index 0000000..df0ee9f --- /dev/null +++ b/saac/wk/error.h @@ -0,0 +1,19 @@ +/* + error.h + + Handle error messages + + Created by Nuke +*/ + +void errexit(char *message); +void errexit2(char *message1,char *message2); +void errexit3(char *message1,char *message2, int message3); +void error(char *message); +void error2(char *message1,char *message2); +void error3(char *message1,char *message2, int message3); + +#define WGSLOG "wgs.log" + +#define P(A) { debug3("%s%d ","",A); } + diff --git a/saac/wk/error.o b/saac/wk/error.o new file mode 100644 index 0000000000000000000000000000000000000000..2cf553597d9248d29d35354bd847b9a92bb08249 GIT binary patch literal 1860 zcmb_dL1+^}6#d&oTT86flPJHMe`3+o=Wlu@i=2^F#mY#143gCL>LKS|PRH^V!-oNlEzB zlA38Jgd=pAwB~j)Z1j{8kU9gY1*`2kRH+oI{cEAH(H}PcMveJbT14h+m5Nsl_D$tLVE_@H*`w;< zS^X9}#7Wi90*~pK@a2fe5_~-v(@r19gUWdZ*;0B3A{O~LzKBl0@!9arFrdv=%m7*6 zl%cO%V+1qRtFbZl3-Dz*&}Mum!Oc4vdH~;;dI-ixH1DK7j0KKDp0iJ&x6x@8=d~)j(B`;nSZ?_J_^2qehZ!X#8!;YQpYBYYy3WN4tz}cL*ROhi|6|_ z-bMO16O0wtJ2~vmjkH>1q`LQ^KQQDfuTw}^c1*2zMt@&J2 z3cU*-^$gI$N9O(L!W|w`ep&GbbsPllkA=%~mx$zh)Q^i4R9{fNrus8tpU4^!`Rj}$ ze}jnpm(-E}RyqFx$UhR1_mzme?~EgFi-^3R)ZyDv&c7w{J|gl4h{#I=ndcCZm!%Hh rnCg?NPph6MBJYvLA8Y)H#$PC3Q~rtw|7+@a&l`=u(|AkyXXU>EeK2DG literal 0 HcmV?d00001 diff --git a/saac/wk/makefile b/saac/wk/makefile new file mode 100644 index 0000000..1623b89 --- /dev/null +++ b/saac/wk/makefile @@ -0,0 +1,14 @@ +CC=gcc + +all : acwk + + +acwk : wk.c TCPIP.o error.o tools.o + gcc -o /root/saserver/saac/acwk -O3 -g -w wk.c error.o TCPIP.o tools.o + +TCPIP: +error: +tools: + +clean : + rm -f acwk *.o *~ diff --git a/saac/wk/makefile.bak b/saac/wk/makefile.bak new file mode 100644 index 0000000..30c96fd --- /dev/null +++ b/saac/wk/makefile.bak @@ -0,0 +1,22 @@ +CC=gcc + +all : acwk + + +acwk : wk.c TCPIP.o error.o tools.o + gcc -o /root/saserver/saac/acwk -O3 -g -w wk.c error.o TCPIP.o tools.o + +TCPIP: +error: +tools: + +clean : + rm -f acwk *.o *~ + +depend: $(RPCSRC) $(ANIMDATAFILE) + @for dir in $(SUBDIR) ; do \ + $(MAKE) -C $$dir depend;\ + done + $(MV) makefile makefile.bak + $(SED) -ne '1,/^# DO NOT DELETE THIS LINE/p' makefile.bak>makefile + $(CC) $(INCFLAGS) -M $(SRC) >> makefile \ No newline at end of file diff --git a/saac/wk/tools.c b/saac/wk/tools.c new file mode 100644 index 0000000..acede60 --- /dev/null +++ b/saac/wk/tools.c @@ -0,0 +1,296 @@ +#include "error.h" +#include "tools.h" +#include "version.h" + +#define BUF_SIZE 4096 +//#define P(A) { printf("%d\n",A); } + +char Xtoken; // Original leading charactor of strxtok +char Ytoken; // Original tail charactor of strxtok + +int bakayaro(char *name) +{ + int i,sum; + if (!name) return 0; + for (i=0,sum=0;name[i];i++) sum+=name[i]*(i+1); +// error3("Aho:%s%d\n","",sum); + return sum; +} + +char *iptoa(unsigned long ip) +{ + static char buffer[80]; + unsigned char *p; + p=(unsigned char *)&ip; + sprintf(buffer,"%u.%u.%u.%u",p[0],p[1],p[2],p[3]); + return(buffer); +} + +char *strxcpy(char *src) +{ + static char dst[BUF_SIZE]; + int i; + + if (src) { + for (i=0;i<=strlen(src);i++) + dst[i]=(src[i]=='\n')?'\t':src[i]; + return(dst); + } else { + return(0); + } +} + +// +char *strxtok(char *src,int _limit) +{ + static char buf[BUF_SIZE]; + static char *ptr; + static int i,j,limit; + + if (src) { + limit=_limit '\' or '\;' => ';' or '\&' => '&' + if (buf[i+1]=='\\' || buf[i+1]==';' || buf[i+1]=='&') { + i++; buf[j++]=buf[i++]; + } + // '\' -> Ignore '\' + else { i++; } + } else if (buf[i]==';') { // Bug from AP + i++; buf[j++]=0; + Ytoken=';'; + return(ptr); + } else { + buf[j++]=buf[i++]; + } + } + buf[j]=0; + Ytoken=0; + return(ptr); +} + +// Add up \ for \, ; and & +char *xchange(char *src) +{ + static char buffer[BUF_SIZE]; + int i,j,limit; + + if (!src) return(0); + limit=strlen(src); + if (limit>=BUF_SIZE/2) limit=BUF_SIZE/2-1; + for (j=0,i=0;ihead=s->tail=0; + s->count=0; +} + +void stockAdd(Stock_Struct *s,char *data) +{ + Stock *new; + + if (!s) return; + if (!data) data=""; + // Make new stock + new=(Stock *)calloc(1,sizeof(Stock)); + new->data=strcpy((char *)calloc( 1,strlen(data)+1),data); + new->flag=0; + // Link new stock + if (!s->head) { // First Item, add to tail + s->head=s->tail=new; + } else { // Add to tail + s->tail->link=new; + s->tail=new; + } + s->count++; +} + +char *stockOut(Stock_Struct *s) +{ + static char buf[BUF_SIZE]; + Stock *t; + + if (!s || !s->head) return(0); + t=s->head; + s->head=t->link; + strcpy(buf,t->data); + free(t->data); + free(t); + s->count--; + if (!s->head) s->tail=0; + return(buf); +} + +void stockDel(Stock_Struct *s,int count) +{ + Stock *t; + + if (!s || !s->head) return; + + while ((t=s->head) && count) { + s->head=t->link; + free(t->data); + free(t); + count--; + s->count--; + } + if (!s->head) s->tail=0; +} + +int stockCount(Stock_Struct *s) +{ + return(s->count); +} + +void stockClear(Stock_Struct *s) +{ + Stock *t,*u; + if (!s) return; + u=s->head; + while (t=u) { + u=u->link; + free(t->data); + free(t); + } + s->head=0; s->tail=0; + s->count=0; +} + +void stockStore(Stock_Struct *s,char *buf,int limit) +{ + char *ptr; +// show(s); + if (!s || !buf) return; + ptr=strxtok(buf,limit); +// if (ptr && s->tail) P(s->tail->flag); + if (ptr && s->tail && + (s->tail->flag&STOCK_NONTERM)) { // Last message is non-terminated + strcat((char *)realloc(s->tail->data, + strlen(s->tail->data)+strlen(ptr)+1),ptr); + if (Ytoken==';') { s->tail->flag^=STOCK_NONTERM; s->count++; } + ptr=strxtok(0,0); + } + while (ptr) { + stockAdd(s,ptr); + if (Xtoken=='&') s->tail->flag|=STOCK_START; // The start + if (Ytoken!=';') { // Non-terminated + s->tail->flag|=STOCK_NONTERM; + s->count--; // This is not a valid item + } + ptr=strxtok(0,0); + } +} + +void rankAdd(Stock_Struct *ss,int rank,Rank_Struct *rs) +{ + int i; + + if (!ss) { error("rankAdd(): Null Stock?\n"); return; } + if (!rs) { error("rankAdd(): Null Storage?\n"); return; } + if (rank<=0) {error("rankAdd(): Invalid rank\n"); return; } + for (i=0;i<10;i++) { rs->entry[i].name[0]=0; rs->entry[i].score=0; } + rs->rank=rank; + for (i=0;(i<10)&&(ss->head);i++) { + strcpy(rs->entry[i].name,stockOut(ss)); + if (ss->head) rs->entry[i].score=atoi(stockOut(ss)); + else rs->entry[i].score=0; + } +} + +int rankSelect(int rank) +{ + return(((rank-1)/10)*10+1); +} + +int charXCount(char *buf) +{ + int i,count; + if (!buf) { error("charCount(): Null buffer?\n"); return(0); } + i=0; count=0; + while (buf[i]) { + if (buf[i]=='\\') { + if ((buf[i+1]=='\\') || (buf[i+1]=='&') || + (buf[i+1]==';')) { + i++; + } + } else if (buf[i]==';') count++; + i++; + } + return(count); +} + +// Construct the 8-byte formatted string +char *construct(char *src) +{ + static char dst[BUF_SIZE]; + const char *AND="&&&&&&&&"; + int n; + if (!src) { dst[0]=0; return(dst); } + else { + sprintf(dst,"&;%d;%s",charXCount(src)+1,src); + n=strlen(dst)%8; + if (!n) return(dst); + strcat(dst,AND+n); + } + return(dst); +} + +void show(Stock_Struct *s) +{ + Stock *trace; + if (!s) return; + for (trace=s->head;trace;trace=trace->link) + error3("<%s:%d>",trace->data,trace->flag); + error("\n"); +} + +/*main() +{ + Stock_Struct s; + char buf[100]; + char buf1[4096]; + int i; + + stockInit(&s); + while (1) { + gets(buf); +// for (i=0;buf[i];i++) printf("(%c)",buf[i]); +// stockStore(&s,buf,strlen(buf)); + printf("%s\n",construct(buf)); +// show(&s); + } +}*/ + + + + + + + + diff --git a/saac/wk/tools.h b/saac/wk/tools.h new file mode 100644 index 0000000..1205f4d --- /dev/null +++ b/saac/wk/tools.h @@ -0,0 +1,51 @@ +#define ID_SIZE 22 + +typedef struct STOCK { + struct STOCK *link; + char *data; + int flag; +} Stock; + +#define STOCK_START 1 +#define STOCK_NONTERM 2 + +typedef struct STOCK_STRUCT { + struct STOCK *head; // First item to be used + struct STOCK *tail; // Newest item + int count; +} Stock_Struct; + +typedef struct RANK_ENTRY { + char name[ID_SIZE]; + int score; +} Rank_Entry; + +typedef struct RANK_STRUCT { + struct RANK_ENTRY entry[10]; + int rank; +} Rank_Struct; + +int bakayaro(char *name); + +char *iptoa(unsigned long ip); +char *strxcpy(char *src); +char *xchange(char *src); + +void stockInit(Stock_Struct *s); +void stockAdd(Stock_Struct *s,char *data); +char *stockOut(Stock_Struct *s); +void stockDel(Stock_Struct *s,int count); +int stockCount(Stock_Struct *s); + +void rankAdd(Stock_Struct *ss,int rank,Rank_Struct *rs); +int rankSelect(int rank); + +int charXCount(char *buf); +char *construct(char *src); +void show(Stock_Struct *s); + +extern char Xtoken; +extern char Ytoken; +extern char welcome[]; + + diff --git a/saac/wk/tools.o b/saac/wk/tools.o new file mode 100644 index 0000000000000000000000000000000000000000..684696b262009d10c1eab8fdeed6fdba04e0024c GIT binary patch literal 5296 zcma)94RBOf6~6md7TlUZo03A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mg+0eH)p6clg zQ^_3Fk&I_nr=32#tZbLl)s@I#O}#W#AFb<*)(xl?bpy-mI`7A~sam&s_407Tx`)~t z!%HH~k>+r7Q`3^B=H}*b!{$V1czxUsZ|v!F2Hn}k%Nmu64D9Q*J%RWfG}~ zofx!Lq%&^ERbHH*zt^4YyLlZDB#Y2(>=1aLPR?eFAN< zwcs&*@;4#3gdJ&S4sMria>|4MB_0qN&81IyW0ONa$EV3v3@`@N!F^QYAvb$KSDnX4 zb<`LGujq2R+$zWY>Tjj;1Ul3I+aa&CK<+P}1w-a3N7dEhQvo#(-JPUxlJm9XbXfQY z$;0kGIKK#--|pNOc>^$6!9N1duX;1jJQ)Tz`uJMpSBv4R$zxL-y>jy*+cpS$1UL^C zHv`%KxNw$9)9Ch2JSXw6R#83)G>!9VJT(aFt9Us7sF?(E{s10K>1VF`d+G2D&N}i_ zobRhZu74VsMc6+i{5jyaz@HcXb)ad~|AHYv@|W>!La>eisqZzQX`DZY=Mv@}Am@Jq z+!#=b|JssY0zLx1TljB*XTdki{{9SZ8uk6d5Fk1K@x5i1QlAicyp+q0^K)kKD)4Sx z$Y#vZ{sQo4z`rQG4txoceMtC6!CwOZr0}KSrcuAL)9KVeq(iwSGSZ|v2kgk*q>*OT zZ)YM)R8M57+8tS@Qa!yrcH|x-`Y|okq8Hq&cE$I^_r)`5)zfdM<7%Kk)6-{nDU`#( zj{bebRH9E)JH1EsCVDyAjy^`Wx-f{s-PfIf5K8}sz8>4{;jN%L;;B@+gUelI5ZL6{ zswv8NpC4sng(M!|=H z-uX&x75-_#Zo$tAK1M{LI7qx5xhvyO3LY2ylHgYbzbklJ@P|a`IWPQ2g1->_wcy)= ze-fM&{HLG~_mTSv3f2fN5DW{}3Em~RRB*ZAD#49{4-0M=j0<)NrUe}$;_#U8!-6@% zV}i#8zascG!50O;C-?&*^qmv_7a-4Z9qJ1A*)F(Oa9D7Rh33Fe +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "TCPIP.h" +#include "tools.h" +#include "version.h" + +static int WORK_TYPE = 0; +#ifdef _FIX_WORKS +#define ACADDRESS "127.0.0.1" +#define ACPORT 9400 +static int afd; +int LoginToAC(); +int Ac_message_accept( char *buf, int slen); + +#endif + +#define PROD_ID "8904001" +unsigned long myIP; + +int mainsockfd; +int port = -1; +int debug = 0; +int timeout = 7200; +char logdir[1024]; + +int csd=-1; +char WGSAddress[1024]; +int WGSPort = -1; +#define BUF_SIZE 4096 +int zap=0; +int additional_process=0; + +#ifdef _ADD_AC_IP // WON ADD 加AC_IP至通讯协定中 +char AC_IP[20]; +#endif + + +void sigpipe(int i) +{ + csd=0; + signal(SIGPIPE,sigpipe); +} + +void sigusr1(int i) +{ + if (csd>0) close(csd); + csd=TCPconnect(WGSAddress,WGSPort); + signal(SIGUSR1,sigusr1); +} + +void sigusr2(int i) +{ + zap=1-zap; + additional_process=time(0)/256; + signal(SIGUSR2,sigusr2); +} + +void sigterm(int i) +{ + signal(SIGTERM,sigterm); +} + +void writeLog( char *msg ); + +char *dummy[7][2]={ + {"SYSOP","GoodNight" }, + {"SYSOP1","Good1" }, + {"SYSOP2","Good2" }, + {"SYSOP3","cary" }, + {"SYSOP4","Good4" }, + {"SYSOP5","Good5" }, + {"SYSOP6","Good6" }}; + +static int checkCSconnect( void) +{ + int num = 0; + while( csd <= 0 && num < 10 ){ + csd = TCPconnect(WGSAddress,WGSPort); + if( csd <= 0 ) sleep( 6); + num++; + } + if( csd <= 0 ){ + char buf[256]; + sprintf( buf, "无法连接到 %s:%d !\n", WGSAddress, WGSPort); + Log( buf); + return -1; + } + return 1; +} + +#ifdef _TIMEOUTKICK +static int doKN( char *id , char *pas , char *flag , char *process , char *deadline) +#else +static int doKN( char *id , char *pas , char *flag , char *process) +#endif +{ + char buffer[BUF_SIZE],idbuf[BUF_SIZE],pasbuf[BUF_SIZE],m[BUF_SIZE]; + char *ptr; + int ret, x, baka; + struct timeval tv; + fd_set rfds; + int iProcess; + + int length; + + if (zap) return(0); + + again: + + if (csd<=0) csd=TCPconnect(WGSAddress,WGSPort); + + if (csd<=0) {sleep(1); return(-1); } + else { + + tv.tv_sec=0; + tv.tv_usec=1000; + FD_ZERO(&rfds); + FD_SET(csd,&rfds); + x=select(1024,&rfds,0,0,&tv); + + if (x<0){ return(-100);} + + if (x>0) { + ret=read(csd,buffer,BUF_SIZE-8); + + if (ret<=0) { close(csd); sleep(1); csd=0; goto again; } + } + + strcpy(idbuf,xchange(id)); + strcpy(pasbuf,xchange(pas)); + iProcess = atoi( process ); + + switch (*flag) { + case '1': // Login + +#ifdef _FIX_MESSAGE // WON ADD 修改封包内容 + +#ifdef _ADD_AC_IP // WON ADD 加AC_IP至通讯协定中 + sprintf(buffer,"&;5;6;%s;%s;0;%s;",idbuf,pasbuf, AC_IP); +#else + sprintf(buffer,"&;5;6;%s;%s;0;",idbuf,pasbuf); +#endif + +#else + sprintf(buffer,"&;9999;5;J;%s;%s;",idbuf,pasbuf); +#endif + Log( buffer); + baka=90000+bakayaro(id); + break; + case '4': // Delete + +#ifdef _FIX_MESSAGE // WON ADD 修改封包内容 + +#ifdef _ADD_AC_IP // WON ADD 加AC_IP至通讯协定中 + sprintf(buffer,"删除人物:%s %s %s\n",idbuf,pasbuf, AC_IP); +#else + sprintf(buffer,"删除人物:%s %s\n",idbuf,pasbuf); +#endif + +#else + sprintf(buffer,"&;9999;5;J;%s;%s;",idbuf,pasbuf); +#endif + Log( buffer); + baka=90000+bakayaro(id); + break; + case '2': // Game Start +#ifdef _TIMEOUTKICK + case '5': // recheck WGS deadline +#endif + +#ifdef _FIX_MESSAGE // WON ADD 修改封包内容 + +#ifdef _ADD_AC_IP // WON ADD 加AC_IP至通讯协定中 + sprintf(buffer,"进入游戏:%s %s %s\n",idbuf,pasbuf, AC_IP); +#else + sprintf(buffer,"进入游戏:%s %s\n",idbuf,pasbuf); +#endif + +#else + sprintf(buffer,"&;9999;6;6;%s;%s;%d;",idbuf,pasbuf,iProcess+additional_process); +#endif + Log( buffer); + baka=10000+bakayaro(id); + break; + case '3': // Game End + +#ifdef _FIX_MESSAGE // WON ADD 修改封包内容 + +#ifdef _ADD_AC_IP // WON ADD 加AC_IP至通讯协定中 + sprintf(buffer,"退出游戏:%s %s\n",idbuf, AC_IP); +#else + sprintf(buffer,"退出游戏:%s\n",idbuf); +#endif + +#else + sprintf(buffer,"&;9999;5;7;%s;%d;",idbuf,iProcess+additional_process); +#endif + Log( buffer); + baka=20000+bakayaro(id); + break; + default: + return(-100); + } + //Log(""); + //Log(buffer); + ret=write(afd,buffer,strlen(buffer)); + //Log(""); + + // Write error + if (ret<0) { close(csd); sleep(1); csd=0; goto again; } + + // Line busy + if (ret==0) { sleep(1); return(-103); } + + tv.tv_sec=0; + tv.tv_usec=0; + FD_ZERO(&rfds); + FD_SET(csd,&rfds); + //Log (""); + x=select(1024,&rfds,0,0,&tv); + //Log (""); + if (x<0) return(-101); + if (x==0) return(0); + //Log ("
    "); + ret=read(csd,buffer,BUF_SIZE-8); + //Log (""); + snprintf( m, sizeof(m), "ret: %d ", ret ); + Log( m ); + // Read error + if (ret<=0) { close(csd); sleep(1); csd=0; return(-104); } + buffer[ret]=0; + + snprintf( m,sizeof(m) ," WGS: %s\n",buffer); + Log( m ); + + strtok(buffer,";"); // Get & + length = atoi( strtok(0,";")); // Get length + ptr=strtok(0,";"); // Get Flag + + if (ptr==0) return(-105); + + if (ptr[0]=='K') { + + int payType; + +#ifndef _FIX_MESSAGE // WON ADD 修改封包内容 + if (atoi(ptr+1)!=baka){ + char buff1[256]; + sprintf( buff1, "%d != %d\n", atoi(ptr+1), baka); + Log(buff1); + return(-100); + } +#endif + +#ifdef _TIMEOUTKICK + + payType = atoi( strtok(0,";")); + + if( *flag == '1' || *flag == '4' ) { // GameLogin or Char Delete + strtok(0,";"); // get Point + } + + if( strcmp( strtok(0,";"), idbuf)) { // get PlayerAccount + //Log(" 回传帐号不符! "); + //return(-106); + } + + switch( payType) { + case 1: // 包月制 + strcpy( deadline ,"0"); + Log(" 包月 "); + break; + case 2: // 时段制 + //strtok(0,";"); // get PlayerAccount + strcpy( deadline ,strtok(0,";")); + Log(" 时段 "); + break; + case 0: + strcpy( deadline ,"0"); + Log(" 结束 "); + break; + } + +#endif + + switch (*flag) { + case '1': // List + Log("用户登陆\n"); + break; + case '4': // Delete + Log("删除人物\n"); + break; + case '2': + Log("进入游戏\n"); + break; + case '3': + Log("退出游戏\n"); + break; +#ifdef _TIMEOUTKICK + case '5': + Log("Deadline recheck\n"); + break; +#endif + default: + Log("Strange but passed\n"); + break; + } + return(0); // Authencation passed + } + +#ifdef _FIX_MESSAGE // WON ADD 修改封包内容 + // 回传错误码 + else if (ptr[0]=='E'){ + char err_code[10]; + int i, err_num=0, login_star=-1; +#ifdef _TIMEOUTKICK + if( length != 3 ) + strtok(0,";"); // Get 1 + if( *flag != '1' && *flag != '4') { + if( strcmp( strtok(0,";"), idbuf)) { // get PlayerAccount + //Log(" 回传帐号不符! "); + //return(-106); + } + } + strcpy( deadline ,"0"); +#endif + ptr=strtok(0,";"); + + for(i=0; i<9; i++){ + if (ptr[i] == ' ' ) break; + err_code[i]=ptr[i]; + } + + err_num=atoi(err_code); + + if( err_num == 203 ){ // 203 不同星系 + login_star=atoi(ptr+i); + Log("203"); + // 回传已登入的星系代码 + if(login_star != -1) + return(login_star+2030); + } + else if( err_num == 204 ){ // 204 同星系 + Log("204"); + if( *flag == '5') + Log(" 时段未到 "); + return(204); + }else{ + char msg[256]; + sprintf( msg, "won test 1 ==> err_num(%d)", err_num); + Log( msg ); + return(err_num); + } + + + } +#endif + + return(-106); + } +} +#ifndef _FIX_WORKS +static int createMainSocket( int port ) +{ + int s,r; + struct sockaddr_in sin; + + s = socket( AF_INET , SOCK_STREAM , 0 ); + if( s < 0 ){ + fprintf( stderr, "socket error" ); + return s; + } + + sin.sin_family = AF_INET; + sin.sin_port = htons( port ); + sin.sin_addr.s_addr = htonl(INADDR_ANY); + + if( (r = bind( s , (struct sockaddr*) &sin , sizeof( sin )) ) <0 ){ + fprintf(stderr, "绑定失败" ); + return r; + } + listen( s , 5 ); + + return s; + +} +#endif +static void remove_r( char *s ) +{ + int i; + for(i=0;;i++){ + if(s[i]=='\r')s[i] =0; + if( s[i]==0)break; + } +} + +static void easyGetTokenFromString( char *src,int count,char*output,int len ) +{ + int i; + int counter = 0; + + if( len <= 0 )return; + +#define ISSPACETAB( c ) ( (c) == ' ' || (c) == '\t' ) + + for(i=0;;i++){ + if( src[i]=='\0'){ + output[0] = '\0'; + return; + } + if( i > 0 && ! ISSPACETAB( src[i-1] ) && + ! ISSPACETAB( src[i] ) ){ + continue; + } + + if( ! ISSPACETAB( src[i]) ){ + counter++; + if( counter == count){ + /* copy it */ + int j; + for(j=0;j 0 ) close( afd); + if( csd > 0 ) close( csd); +#else + fclose( fp ); +#endif + //if( AcLogFile != NULL) + // fclose( AcLogFile); + Log( "SAAC已关闭. 异常终止.\n" ); +} + +static void parseOpt( int argc , char **argv ) +{ + int c; + int option_index; + +#ifdef _ADD_AC_IP // WON ADD 修改封包内容 + memset( AC_IP, -1 , sizeof( AC_IP) ); +#endif + + if( argc == 1 ){ + strcpy( WGSAddress, "127.0.0.1" ); + WGSPort = 9200; + } + + while(1){ + static struct option long_options[] = + { + {"port" , 1, 0 ,'p'}, + {"debug" , 1, 0 , 'd'}, + {"help" , 0 , 0 , 'h'}, + {"logdir", 1, 0, 'l' }, + {"csaddr", 1, 0, 'a' }, + {"csport", 1, 0, 'c' }, +#ifdef _ADD_AC_IP // WON ADD 修改封包内容 + {"acaddr", 1, 0, 'w' }, +#endif + {0,0,0,0} + }; + +#ifdef _FIX_MESSAGE // WON ADD 修改封包内容 + c = getopt_long ( argc, argv, "p:dhl:a:c:w:", long_options, &option_index ); +#else + c = getopt_long ( argc, argv, "p:dhl:a:c:", long_options, &option_index ); +#endif + + if( c == -1 )break; + + switch(c ){ + case 'l': + if( optarg){ + snprintf( logdir, sizeof( logdir), "%s", optarg ); + } else{ + fprintf( stderr , "-l 后面需要日录名.\n" ); + } + break; + case 'p' : + port = atoi( optarg ); + break; + case 'd': + debug = 1; + break; + case 'h': + fprintf( stderr, + "使用方法: acwk [-d|--调试模试] [-p 端口|--端口 端口] [-h|--帮助] [-l 日志日录]\n" + " [-a CS地址] [-c CS端口]\n" + "默认调试模试为0.\n" + "\nCopyright 2003 龙zoro工作室 / Longzoro system supply\n" + ); + exit(0); + break; + // Spock 2000/12/5 + case 'a': + strcpy( WGSAddress, optarg ); + break; + case 'c': + WGSPort = atoi( optarg ); + break; + // Spock end +#ifdef _ADD_AC_IP // WON ADD 加AC_IP至通讯协定中 + case 'w': + strcpy( AC_IP, optarg ); + Log( AC_IP ); + break; +#endif + } + } +} + +int main( int argc , char ** argv ) +{ + + // Spock +1 2000/12/5 + WGSAddress[0] = 0; + parseOpt(argc,argv); +#ifndef _FIX_WORKS + if( port < 0 ){ + //fprintf( stderr , "You have to specify port number by -p option.\n"); + //exit(1); + WGSPort=9200; + } +#endif + // Spock 2000/12/5 + if( strlen(WGSAddress) < 8 || strlen(WGSAddress) > 16 ){ + fprintf( stderr , "你指定CS的IP地址不正确.\n"); + exit(1); + } + if( WGSPort < 0 ){ + fprintf( stderr , "你指定CS的端口不正确.\n"); + exit(1); + } +#ifndef _FIX_WORKS + fprintf( stderr , "\n端口:[%d] 调试模式:[%d] CS地址:[%s] CS端口:[%d]\n" , + port , debug , WGSAddress , WGSPort ); + // Spock end + if( (mainsockfd = createMainSocket( port ))<0){ + fprintf( stderr , "cannot create mainsocket: %s\n", + strerror( errno )); + return 1; + } +#else + fprintf( stderr , "\n调试模式:[%d] CS地址:[%s] CS端口:[%d]\n" , + debug , WGSAddress , WGSPort ); +#endif +// Nuke +1 + additional_process=time(0)/256; + signal(SIGPIPE,sigpipe); + signal(SIGUSR1,sigusr1); + signal(SIGUSR2,sigusr2); + signal(SIGTERM,sigterm); + + workerMainLoop(); + return 0; +} +/* +static char * chop( char *src ) +{ + int i; + + for(i=0;;i++){ + if( src[i] == '\n' ) src[i]= 0; + if( src[i] == 0 )break; + } + return src; +} +*/ +void writeLog( char *msg ) +{ + char logbuf[BUF_SIZE]; + time_t t; + if( sizeof( msg) > sizeof( logbuf)) + return; + sprintf( logbuf, "%s", msg); + Log( logbuf); + t = time(NULL); +} + +void Log( char *msg ) +{ +#ifdef _DEBUG_WORK + FILE *AcLogFile=NULL; + if( AcLogFile == NULL ) { + char filename[1000]; + snprintf( filename, sizeof( filename), "%s/%d.worker" , logdir, port ); + AcLogFile = fopen( filename, "a+" ); + if(AcLogFile == NULL)return; + } + + fprintf( AcLogFile, "%s" , msg ); + fclose( AcLogFile); +#else + fprintf( stderr,"%s", msg); +#endif +} + +#ifdef _FIX_WORKS +int LoginToAC() +{ + Log( "\n连接 SAAC "); + usleep( 80*10000); + Log( "."); + afd = TCPconnect( WGSAddress, ACPORT); + if( afd <= 0 ) { + close( afd); + return 0; + } + Log( ".成功\n"); + usleep( 40*10000); + return 1; +} +char tmpbuf[4096]; +int readsize; +struct timeval select_timeout; + +int Ac_message_accept( char *buf, int slen) +{ + //int i; + int sret; + //int accepted = 0; + struct timeval t; + fd_set rfds, /*wfds,*/ efds; + + readsize = sizeof( tmpbuf); + + FD_ZERO( & rfds ); + //FD_ZERO( & wfds ); + FD_ZERO( & efds ); + + FD_SET( afd, & rfds ); + //FD_SET( afd, & wfds ); + FD_SET( afd, & efds ); + + select_timeout.tv_sec = 0; + select_timeout.tv_usec = 0; + t = select_timeout; + sret = select( 1024 , & rfds , (fd_set*)NULL, & efds , &t); + if( ( afd >= 0 ) && FD_ISSET( afd , &rfds ) ){ + int rr; + rr = read( afd , tmpbuf , readsize ); + if( rr > 0 ) { + memcpy( buf, tmpbuf, slen); + }else { + Log("..WORK ERROR\n"); + return -1; + } + }else { + return 0; + } + return 1; +} + +#endif + + diff --git a/saac2.27_code.rar b/saac2.27_code.rar new file mode 100644 index 0000000000000000000000000000000000000000..34482c500f80f3f74cecc2c5966d3943c06e94ff GIT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