| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220 |
- local this = {}
- local envDebug = nil
- function handlerequest(actor, uid, msgID, msgData)
- -- info("handlerequest-msgid", actor, msgID, msgData)
- envDebug = envDebug or getenv("debug")
- if envDebug then
- local last_lua_message = {
- ["uid"] = uid,
- ["msgID"] = msgID,
- ["msgData"] = msgData
- }
- setplaydef(actor, "J$gm_last_lua", last_lua_message)
- end
- -- error("角色加成方式")
- -- error(msgID)
- -- 发送客户端GM指令 SL:SendLuaNetMsg(1,{}) 可运行到这里
- if msgID == 1 then
- -- rolelist = getrolelist(actor,uid)
- -- print(rolelist)
- elseif msgID == 2 then
- -- setsysvar("G1",100)
- -- result = getsysvar("G1")
- -- print(result)
- -- 装备相关
- elseif msgID == LuaMessageIdToSever.SETTING_EQUIP_APPEAR then
- EquipAndAppear.settingequipappear(actor, msgData) -- 保存装备外观|幻化
- elseif msgID == LuaMessageIdToSever.GET_EQUIP_APPEAR then
- EquipAndAppear.getequipappear(actor, msgID) -- 获取装备外观
- elseif msgID == LuaMessageIdToSever.EQUIP_FASHION then
- EquipAndAppear.equipfashion(actor, msgData) -- 装备幻化
- elseif msgID == LuaMessageIdToSever.ACT_EQUIP_COLOR then
- EquipAndAppear.actquipcolor(actor, msgData) -- 装备染色
- elseif msgID == LuaMessageIdToSever.GET_EQUIP_COLOR then
- EquipAndAppear.getequipcolor(actor, msgID) -- 获取装备染色信息
- elseif msgID == LuaMessageIdToSever.SETTING_EQUIP_COLOR then
- EquipAndAppear.settingequipcolor(actor, msgData) -- 保存装备染色
- elseif msgID == LuaMessageIdToSever.REQ_ITEM_DECOMPOSITION then
- ItemRecycling.decompositionlua(actor, msgID, msgData) -- 装备分解
- elseif msgID == LuaMessageIdToSever.GET_TITLE then
- EquipAndAppear.gettitleinfo(actor, msgID) -- 获取称号信息
- elseif msgID == LuaMessageIdToSever.SET_TITLE then
- EquipAndAppear.settingtitleappear(actor, msgID, msgData) -- 设置当前称号
- elseif msgID == LuaMessageIdToSever.GET_SHAPE_RING then
- EquipAndAppear.getshapering(actor, msgID) -- 获取变身戒指信息
- elseif msgID == LuaMessageIdToSever.GET_GUARD_APPEAR then
- EquipAndAppear.getguardappear(actor, msgID) -- 获取守护皮肤信息
- elseif msgID == LuaMessageIdToSever.SET_SHAPE_RING then
- EquipAndAppear.wearshapering(actor, msgData) -- 穿戴变身戒指
- elseif msgID == LuaMessageIdToSever.REQ_STRENGTH_EQUIP then
- EquipAndAppear.luastrengthequip(actor, msgData) -- 请求装备强化
- elseif msgID == LuaMessageIdToSever.REQ_APPEND_EQUIP then
- EquipAndAppear.luaappendequip(actor, msgData) -- 请求装备追加
- elseif msgID == LuaMessageIdToSever.REQ_REFINED_EQUIP then
- EquipRefined.luarefinedequip(actor, msgData) -- 请求装备洗练
- elseif msgID == LuaMessageIdToSever.REQ_LUCK_EQUIP then
- EquipLuck.lualuckequip(actor, msgData) -- 请求装备幸运
- elseif msgID == LuaMessageIdToSever.REQ_EQUIP_FASHION then
- EquipAndAppear.getallequipfashion(actor) -- 请求已激活幻化外观
- elseif msgID == LuaMessageIdToSever.REQ_UPDATE_EQUIP_ORNAMENTS then
- EquipAndAppear.ssupdate(actor, msgData) -- 请求首饰升级
- elseif msgID == LuaMessageIdToSever.REQ_EQUIP_REGENERATION then
- EquipAndAppear.regeneration(actor, msgData) -- 请求装备再生
- elseif msgID == LuaMessageIdToSever.REQ_UP_EQUIP_REGENERATION then
- EquipAndAppear.getupregenerationattr(actor, msgData) -- 请求装备上次洗练数据
- elseif msgID == LuaMessageIdToSever.REQ_REPLACE_REGENERATION_ATTR then
- EquipAndAppear.confirmreplaceentry(actor, msgData) -- 请求替换装备再生属性
- elseif msgID == LuaMessageIdToSever.REQ_STRENGTH_REGENERATION_ATTR then
- EquipAndAppear.strengthregenerationattr(actor, msgData) -- 请求强化装备再生属性
- elseif msgID == LuaMessageIdToSever.REQ_ACT_EQUIP_ORNAMENTS then
- EquipAndAppear.actssattr(actor, msgData) -- 请求首饰属性激活
- elseif msgID == LuaMessageIdToSever.REQ_TRANSFER_EQUIP then
- -- 装备相关结束
- EquipAndAppear.luatransferequip(actor, msgData) -- 请求装备属性转移
- elseif msgID == LuaNetMsg.Equip_QiangHua_MsgID then
- Equip_QiangHua.questQiangHua(actor, msgData) -- 装备强化新
- elseif msgID == LuaNetMsg.Equip_XiuLi_MsgID then
- EquipDurability.onReqEquipXiuLi(actor, msgData) -- 装备修理
- elseif msgID == LuaMessageIdToSever.GET_TEAM_RECRUIT then
- Team.getteamrecruitlua(actor, msgID) -- 获取组队喊话信息
- elseif msgID == LuaMessageIdToSever.LEADER_AGREE_APPLY then
- Team.leaderAgreeApply(actor, msgData) -- 队长一键同意申请记录
- elseif msgID == LuaMessageIdToSever.GET_RESET_FRUIT_COUNT then
- FruitScript.toGetResetCount(actor) -- 获取重置果实次数
- elseif msgID == LuaMessageIdToSever.S_RESET_FRUIT then
- FruitScript.resetFruit(actor, msgData) -- 重置果实
- elseif msgID == LuaMessageIdToSever.GET_MOUNSTER_COUNT_BY_MAP then
- DuplicateCommon.getmonstercountbymap(actor, msgData) -- 根据地图信息获取怪物数量
- elseif msgID == LuaMessageIdToSever.SET_FRIEND_DEGREE then
- Friend.sendflower(actor, msgID, msgData) -- 好友送花
- elseif msgID == LuaMessageIdToSever.GET_DEVIL_SQUARE_PANEL then
- DevilSquare.ReqGetPanelInfo(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_RECIVE_DEVIL_SQUARE_REWARD then
- DevilSquare.ReqReciveRewardDevilSquare(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_ENTER_DUPLICATE then
- DuplicateCommon.ReqEnterDupLicate(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_QUIT_DUPLICATE then
- DuplicateCommon.ReqQuitDuplicate(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_CHANGE_DUPLICATE_STATE then
- DuplicateCommon.ReqChangeDupState(actor, msgData)
- elseif msgID == LuaMessageIdToSever.GET_DAILY_ACTIVITY_INFO then
- DailyActivity.getActivityInfo(actor)
- elseif msgID == LuaMessageIdToSever.GET_DAILY_ACTIVITY_REWARD then
- DailyActivity.receiveBoxReward(actor, msgData)
- elseif msgID == LuaMessageIdToSever.GET_DAILY_ACTIVITY_ACTIVITY_LIST then
- DailyActivity.getActivityList(actor)
- elseif msgID == LuaMessageIdToSever.OPEN_OR_CLOSE_AUTO_BUY_POTION then
- AutoBuyPotionScript.openOrCloseAutoBuyPotion(actor) -- 开启或关闭自动购买药水
- elseif msgID == LuaMessageIdToSever.GET_CURRENT_AUTO_BUY_POTION then
- AutoBuyPotionScript.getCurrentOpenState(actor) -- 当前自动购买药水状态
- elseif msgID == LuaMessageIdToSever.LOAD_RANK_DATA then
- RankScript.loadRankData(actor, msgData) -- 请求排行榜数据
- elseif msgID == LuaMessageIdToSever.STOP_REFRESH_RANK_DATA then
- RankScript.stopRefreshData(actor) -- 停止自动刷新排行榜数据
- elseif msgID == LuaMessageIdToSever.PLAYER_IS_ON_LINE_REQ then
- Chat.playerIsOnLineReq(actor, msgData) -- 玩家是否在线
- elseif msgID == LuaMessageIdToSever.RECRUIT_INFO_REQ then
- Chat.reqRecruitInfo(actor, msgData) -- 发送招募信息
- elseif msgID == LuaMessageIdToSever.GET_GOLD_TASK_INFO then
- GoldTask.SendTaskInfo(actor)
- elseif msgID == LuaMessageIdToSever.FLUSH_GOLD_TASK_POOL then
- GoldTask.FlushGoldTaskPool(actor)
- elseif msgID == LuaMessageIdToSever.ACCEPT_GOLD_TASK then
- GoldTask.AcceptTask(actor, msgData)
- elseif msgID == LuaMessageIdToSever.SUBMIT_GOLD_TASK then
- GoldTask.SubmitTask(actor, msgData)
- elseif msgID == LuaMessageIdToSever.GIVE_UP_GOLD_TASK then
- GoldTask.GiveUpTask(actor, msgData)
- elseif msgID == LuaMessageIdToSever.GET_PRIVILEGES then
- PrivilegeCardScript.getHasPrivileges(actor)
- elseif msgID == LuaMessageIdToSever.BRAVE_TEST_PANEL_INFO then
- BraveTest.ReqBraveTestPanelInfo(actor)
- elseif msgID == LuaMessageIdToSever.REQ_BLOODY_CASTLE_PANEL then
- BloodyCastle.ReqGetPanelInfo(actor, msgData) -- 请求血色城堡面板
- elseif msgID == LuaMessageIdToSever.BRAVE_TEST_REWARD then
- BraveTest.ReqBraveTestReward(actor)
- elseif msgID == LuaMessageIdToSever.REQ_GET_ACTIVITY_COUNT then
- DuplicateCommon.ReqGetActivityLeftCount(actor, msgData) -- 请求活动剩余次数
- elseif msgID == LuaMessageIdToSever.REQ_EQUIP_OVERLAY then
- EquipOverlay.reqEquipOverlay(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_ENTER_SECRET_REALM then
- SecretRealm.reqEnterSecretRealm(actor, msgData) -- 请求进入秘境副本
- elseif msgID == LuaMessageIdToSever.REQ_EXIT_SECRET_REALM then
- SecretRealm.reqExitSecretRealm(actor) -- 请求退出秘境副本
- elseif msgID == LuaMessageIdToSever.REQ_GET_SECRET_REALM_COUNT then
- SecretRealm.sendRemainingChallenges(actor) -- 发送秘境副本挑战次数
- elseif msgID == LuaMessageIdToSever.GET_SECRET_REALM_MONSTER_COUNT then
- SecretRealm.getMonsterCount(actor, msgData) -- 获取秘境副本怪物数量
- elseif msgID == LuaMessageIdToSever.GET_ALREADY_USE_POINTS then
- FruitScript.toGetAlreadyUsePoints(actor) -- 获取已经使用的点数
- elseif msgID == LuaMessageIdToSever.REQ_BLOODY_CASTLE_GIVE_NPC then
- BloodyCastle.ReqGive2NPC(actor) -- 给武器给NPC
- elseif msgID == LuaMessageIdToSever.REQ_GET_UNION_INFO then
- UnionChangeLeader.sendUnionInfo(actor)
- elseif msgID == LuaMessageIdToSever.REQ_UNION_ACTIVITY_DATA then
- Union.UnionActivity.getUnionActivity(actor)
- elseif msgID == LuaMessageIdToSever.REQ_RECIVE_BLOODY_CASTLE_SETTLEMENT then
- BloodyCastle.ReqReciveReward(actor, msgData)
- elseif msgID == LuaMessageIdToSever.MONSTER_ATTACK_BOSS_INFO then
- MonAtk.monsterInfo(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_CHANGE_DUPLICATE_TEAM_STATE then
- DuplicateCommon.ChangeTeamPrepareState(actor, msgData) -- 修改副本队伍状态
- elseif msgID == LuaMessageIdToSever.REQ_UNION_RUN_FOR_LEADER_DATA then
- UnionChangeLeader.RunForLeader.getRunForLeaderData(actor)
- elseif msgID == LuaMessageIdToSever.REQ_PLAYER_RUN_FOR_LEADER then
- UnionChangeLeader.RunForLeader.actorRunForLeader(actor)
- elseif msgID == LuaMessageIdToSever.REQ_PLAYER_RUN_FOR_LEADER_VOTE then
- UnionChangeLeader.RunForLeader.actorVoteRunForLeader(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_DUPLICATE_TEAM_ENTER then
- DuplicateCommon.DoTeamEnterDup(actor) -- 组队进入副本
- elseif msgID == LuaMessageIdToSever.REQ_SET_ROLE_ATT_ADD_WAY then
- RoleAttr.setRoleAttAddWay(actor, msgData) -- 设置角色属性加成方式
- elseif msgID == LuaMessageIdToSever.REQ_GET_ROLE_ATT_ADD_WAY then
- RoleAttr.getRoleAttAddWay(actor) -- 获取角色属性加成方式
- elseif msgID == LuaMessageIdToSever.BRAVE_TEST_STAGE_REWARD then
- BraveTest.ReqBraveTestStageReward(actor)
- elseif msgID == LuaMessageIdToSever.GET_SECRET_REALM_MONSTER_LIST then
- SecretRealm.ReqBossList(actor, msgData) -- 请求秘境副本中boss列表信息
- elseif msgID == LuaMessageIdToSever.REQ_ITEM_SYNTHESIS then
- ItemSynthesis.synthesis(actor, msgData) -- 装备合成
- elseif msgID == LuaMessageIdToSever.REQ_SECRET_REALM_HURT_TOP1 then
- SecretRealm.getTop1HurtInfo(actor, msgData) -- 装备合成
- elseif msgID == LuaMessageIdToSever.REQ_GET_UNION_ARMBAND_INFO then
- UnionArmbands.sendArmbandInfo(actor) -- 获取ArmBand信息
- elseif msgID == LuaMessageIdToSever.REQ_UNION_ARMBAND_LEVEL_UP then
- UnionArmbands.levelupUnionArmband(actor) -- 升级ArmBand
- elseif msgID == LuaMessageIdToSever.REQ_UNION_ARMBAND_STRONG then
- UnionArmbands.strongArmband(actor) -- 强化ArmBand
- elseif msgID == LuaMessageIdToSever.REQ_TRADE_LISTING_GOODS then
- -- 检查线路是否允许交易
- -- if not LineManager.isTradeAllowed(actor) then
- -- tipinfo(actor, "该线路禁止交易")
- -- return
- -- end
- Trade.worldTradeListing(actor, msgData) -- 交易行上架商品
- elseif msgID == LuaMessageIdToSever.REQ_TRADE_OFF_GOODS then
- Trade.worldOffShelfGoods(actor, msgData) -- 交易行下架商品
- elseif msgID == LuaMessageIdToSever.REQ_GET_TRADE_GOODS then
- Trade.getTradeWorldGoods(actor, msgData) -- 交易行搜索商品信息
- elseif msgID == LuaMessageIdToSever.REQ_TRADE_PUBLICITY_GOODS then
- Trade.getPublicityGoods(actor, msgData) -- 交易行获取公示区域商品
- elseif msgID == LuaMessageIdToSever.REQ_TRADE_MY_PRE_GOODS then
- Trade.getPreBuyGoods(actor, msgData) -- 交易行获取预购
- elseif msgID == LuaMessageIdToSever.REQ_TRADE_BUY_GOODS then
- Trade.bugWorldGoods(actor, msgData) -- 交易行购买商品
- elseif msgID == LuaMessageIdToSever.REQ_TRADE_RECORD then
- Trade.getWorldTradeRecord(actor) -- 交易行交易记录
- elseif msgID == LuaMessageIdToSever.REQ_TRADE_MY_SHELVES then
- Trade.getWorldMyListing(actor) -- 交易行上架商品信息
- elseif msgID == LuaMessageIdToSever.REQ_TRADE_PRE_ORDER then
- Trade.preWorldGoods(actor, msgData) -- 交易行预购商品
- elseif msgID == LuaMessageIdToSever.REQ_GET_UNION_IMPEACH_INFO then
- UnionChangeLeader.Impeach.sendImpeachInfo(actor) -- 获取弹劾信息
- elseif msgID == LuaMessageIdToSever.REQ_UNION_IMPEACH_LEADER then
- UnionChangeLeader.Impeach.actorImpeach(actor) -- 弹劾盟主
- elseif msgID == LuaMessageIdToSever.REQ_UNION_IMPEACH_VOTE then
- UnionChangeLeader.Impeach.actorVoteImpeach(actor, msgData) -- 弹劾投票
- elseif msgID == LuaMessageIdToSever.TRIPLE_INCOME_PANEL then
- TripleIncome.PanelInfo(actor) -- 三倍收益时间信息
- elseif msgID == LuaMessageIdToSever.TRIPLE_INCOME_RECEIVE then
- TripleIncome.ReceiveTime(actor, msgData)
- elseif msgID == LuaMessageIdToSever.TRIPLE_INCOME_RETURN then
- TripleIncome.ReturnTime(actor)
- elseif msgID == LuaMessageIdToSever.REQ_BOSS_BOUNTY_DATA then
- BossBounty.GetBountyInfo(actor)
- elseif msgID == LuaMessageIdToSever.REQ_BOUNTY_MONSTER_REWARD then
- BossBounty.ReqReceiveMonsterAward(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_BOUNTY_GROUP_REWARD then
- BossBounty.ReqReceiveGroupAward(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_ALL_MOUNT_INFO then
- Mount.allMountInfo(actor)
- elseif msgID == LuaMessageIdToSever.REQ_RIDING_MOUNT then
- Mount.ridingMount(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_CANCEL_RIDING_MOUNT then
- Mount.cancelRidingMount(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_MOUNT_STORE_TO_BAG then
- Mount.mountStoreToBag(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_MOUNT_BAG_TO_STORE then
- Mount.mountBagToStore(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_TRADE_GOODS_INFO then
- Trade.getGoodsInfo(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_WAR_ALLIANCE_PANEL_INFO then
- WarAlliance.GetWarAlliancePanelInfo(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_WAR_ALLIANCE_GOODS_DETAIL then
- Auction.GetGoodsDetailInfo(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_WAR_ALLIANCE_BID_GOODS then
- Auction.PlayerBidOnItem(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_WAR_ALLIANCE_BUY_NOW then
- Auction.PlayerBuyNow(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_WAR_ALLIANCE_UPDATE_GOODS then
- Auction.GetSomeGoods(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_KING_ROAD_TASK_INFO then
- KingRoad.SendKingRoadTask(actor)
- elseif msgID == LuaMessageIdToSever.REQ_SUBMIT_KING_ROAD_TASK then
- KingRoad.SubmitChapterTask(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_RECEIVE_KING_ROAD_CHAPTER_AWARD then
- KingRoad.ReceiveChapterAward(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_PRIVILEGE_BOSS_PANEL then
- -- 请求特权BOSS信息
- PrivilegeBoss.ReqPrivilegeBossPanel(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_MOUNT_PUT_ON_ITEM then
- Mount.putOnItem(actor, msgData) -- 坐骑穿戴装备
- elseif msgID == LuaMessageIdToSever.REQ_MOUNT_TAKE_OFF_ITEM then
- Mount.takeOffItem(actor, msgData) -- 坐骑脱下装备
- elseif msgID == LuaMessageIdToSever.REQ_MOUNT_DETAIL_INFO then
- Mount.mountDetail(actor, msgData) -- 获取坐骑详细信息
- elseif msgID == LuaMessageIdToSever.REQ_OFFLINE_ON_HOOK_INFO then
- -- onHook.getOffLineOnHookInfo(actor) -- 请求获取离线挂机信息
- elseif msgID == LuaMessageIdToSever.REQ_RECEIVE_OFFLINE_ON_HOOK_EXP then
- -- onHook.reqReceiveOfflineOnHookExp(actor) -- 请求领取离线挂机经验
- elseif msgID == LuaMessageIdToSever.REQ_MASTER_INFO then
- Master.reqMasterInfo(actor, msgData) -- 请求:大师信息
- elseif msgID == LuaMessageIdToSever.REQ_OPEN_MASTER_TYPE then
- Master.reqOpenMasterType(actor, msgData) -- -- 请求:启用大师系列
- elseif msgID == LuaMessageIdToSever.REQ_EXCHANGE_MASTER_EXP then
- Master.reqExchangeMasterExp(actor, msgData) -- 请求:兑换大师经验
- elseif msgID == LuaMessageIdToSever.REQ_RESET_MASTER then
- Master.reqResetMaster(actor, msgData) -- 请求:重置大师天赋
- elseif msgID == LuaMessageIdToSever.REQ_UPGRADE_MASTER_TALENT then
- Master.reqUpgradeMasterTalent(actor, msgData) -- 请求:升级大师天赋
- elseif msgID == LuaMessageIdToSever.REQ_ENTER_WAR_ALLIANCE then
- WarAlliance.ReqEnterWarAlliance(actor, msgData) -- 请求进入战盟boss副本
- elseif msgID == LuaMessageIdToSever.REQ_GET_MONTHCARD_INFO then
- MonthCard.getmonthcardinfo(actor) -- 请求获取月卡信息
- elseif msgID == LuaMessageIdToSever.REQ_RECEIVE_MONTHCARD_THREETIME then
- MonthCard.receivemonthcardthreetime(actor) -- 请求领取月卡三倍收益时间
- elseif msgID == LuaMessageIdToSever.REQ_UP_SHELF_MONTHCARD then
- MonthCard.upshelfmonthcard(actor, msgData) -- 请求上架月卡
- elseif msgID == LuaMessageIdToSever.REQ_GET_MONTH_PRIVILEGE_DATA then
- PrivilegeMonth.sendPrivilegeData(actor)
- elseif msgID == LuaMessageIdToSever.REQ_CHECK_MONTH_PRIVILEGE_IS_OPEN then
- PrivilegeMonth.sendHasPrivilege(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_EXCHANGE_MONTH_PRIVILEGE then
- PrivilegeMonth.monthCardExchangePrivilege(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_EXIT_WAR_ALLIANCE then
- WarAlliance.reqExitWarAlliance(actor)
- elseif msgID == LuaMessageIdToSever.REQ_MAP_INFO then
- GoldLine.GetGoldMapInfo(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_SET_MOUNT_IS_SHOW then
- Mount.mountShow(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_GET_ROLE_ATTR_POINT_PROGRAMME then
- RoleAttr.getPrivilegeAttrPointProgramme(actor)
- elseif msgID == LuaMessageIdToSever.REQ_SET_ROLE_ATTR_POINT_PROGRAMME then
- RoleAttr.setPrivilegeAttrPointProgramme(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_CHANGE_ROLE_ATTR_POINT_PROGRAMME then
- RoleAttr.changePrivilegeAttrPointProgramme(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_OPEN_SERVER_FIRST_KILL_INFO then
- OpenServerAct.SendFirstKillInfo(actor)
- elseif msgID == LuaMessageIdToSever.RECEIVE_GLOBAL_FIRST_KILL_AWARD then
- OpenServerAct.ReceiveGlobalFirstKill(actor, msgData)
- elseif msgID == LuaMessageIdToSever.RECEIVE_PERSONAL_FIRST_KILL_AWARD then
- OpenServerAct.ReceivePersonalFirstKill(actor, msgData)
- elseif msgID == LuaMessageIdToSever.PRIVILEGE_BOSS_COUNT_INIT then
- PrivilegeBoss.initCount(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_SET_MOUNT_RANK then
- Mount.setMountRank(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_OTHER_MOUNT_RANK then
- Mount.sendOtherMountRank(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_OPEN_SERVER_ACT_TYPE_RANK_INFO then
- OpenServerAct.SendSubRankInfo(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_OPEN_SERVER_ACT_PERSONAL_REWARD then
- OpenServerAct.ReceiveNewAreaPersonalReward(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_OPEN_SERVER_ACT_RANK_REWARD then
- OpenServerAct.ReceiveGlobalRankReward(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_WAR_ALLIANCE_HAS_QUALIFY then
- Auction.ShowAutionPanel(actor)
- elseif msgID == LuaMessageIdToSever.REQ_UNION_TASK_DATA then
- UnionMemberTask.sendUnionTaskData(actor)
- elseif msgID == LuaMessageIdToSever.REQ_SUBMIT_UNION_TASK then
- UnionMemberTask.submitUnionTask(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_MONSTER_COUNT_BY_ID then
- DuplicateCommon.getmonstercountbyid(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_CHALLENGE_BOSS_INFO_BY_ID then
- DuplicateCommon.getchallengebossinfobyid(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_GOTO_CROSS_MAP then
- CrossMap.Enter(actor)
- elseif msgID == LuaMessageIdToSever.REQ_SCHEME_INFO then
- EquipGem.schemeInfo(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_GEM_PUT_ON then
- EquipGem.putOnGemOrSlabstone(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_GEM_TAKE_OFF then
- EquipGem.takeOffGemOrSlabstone(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_SCHEME_SWITCH then
- EquipGem.schemeSwitch(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_OPEN_SERVER_ACT_RANK_ALL_REWARD then
- OpenServerAct.ReceivePlayerRankReward(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_ACTIVITY_OPENSERVER_INFO then
- OpenServerNewAct.SendActivityInfo(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_ACTIVITY_OPENSERVER_RECORD then
- OpenServerNewAct.SendActivitySubRecord(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_ACTIVITY_OPENSERVER_REWARD then
- OpenServerNewAct.ReceiveReward(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_KUNDUN_ENTER then
- KunDun.EnterKunDun(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_GODS_DESCENDED_DATA then
- GodsDescended.sendMonsterStateData(actor)
- elseif msgID == LuaMessageIdToSever.REQ_WOLF_SOUL_SUMMON then
- WolfSoul.ReqSummonWarder(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_STALL_POSITION then
- Stall.stallPosition(actor, msgData) -- 获取摆摊信息
- elseif msgID == LuaMessageIdToSever.REQ_START_STALL then
- Stall.startStall(actor, msgData) -- 开始摆摊
- elseif msgID == LuaMessageIdToSever.REQ_END_STALL then
- Stall.endStall(actor, msgData) -- 结束摆摊
- elseif msgID == LuaMessageIdToSever.REQ_STALL_GOODS then
- Stall.getStallGoods(actor, msgData) -- 获取摊位商品信息
- elseif msgID == LuaMessageIdToSever.REQ_DELETE_BAG_ITEM then
- Stall.deleteItem(actor, msgData) -- 减少背包内道具的数量
- elseif msgID == LuaMessageIdToSever.REQ_SET_PATROL then
- onHook.setOfflineState(actor, msgData) -- 设置离线挂机状态
- elseif msgID == LuaMessageIdToSever.REQ_ITEM_RECOVERY then
- ItemRecycling.recovery(actor, msgData) -- 装备回收
- elseif msgID == LuaMessageIdToSever.REQ_ITEM_EXCHANGE then
- ItemExchange.exchange(actor, msgData) -- 装备兑换
- elseif msgID == LuaMessageIdToSever.REQ_CANCEL_FSPREVIEW then
- FaceShootPreview.ReqCancelTodayPreview(actor, msgData) -- 拍照预告取消今日提醒
- elseif msgID == LuaMessageIdToSever.REQ_RECHARGE then
- Recharge.request(actor, msgData) -- 充值请求
- elseif msgID == LuaMessageIdToSever.REQ_CHANGE_ROLE_NAME then
- Player.changeRoleName(actor, msgData) -- 修改角色名字
- elseif msgID == LuaMessageIdToSever.REQ_CHANGE_UNION_NAME then
- Union.changeUnionName(actor, msgData) -- 修改战盟名字
- elseif msgID == LuaMessageIdToSever.REQ_ROLE_IS_FIRST_CHANGE_NAME then
- Player.getRoleChangeNameInfo(actor) -- 获取角色是否为首次改名
- elseif msgID == LuaMessageIdToSever.REQ_RECHARGE_TRADE_INFO then
- Trade.sendRecharge(actor) -- 发送月卡充值信息
- elseif msgID == LuaMessageIdToSever.REQ_COMBO_SKILL_UP then
- Skill.ComboSkillUp(actor) -- 升级连击技能
- elseif msgID == LuaMessageIdToSever.REQ_TRANSFER_CARD_PART_INFO then
- TransferCard.ReqGetHoleInfo(actor, msgData) -- 变身卡牌请求部位信息
- elseif msgID == LuaMessageIdToSever.REQ_TRANSFER_CARD_UNLOCK then
- local part = msgData[1]
- local idx = msgData[2]
- local type = msgData[3]
- TransferCard.ReqUnlockHole(actor, part, idx, type)
- elseif msgID == LuaMessageIdToSever.REQ_OTHER_GEM_EQUIP_INFO then
- EquipGem.getOtherGemScheme(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_RECHARGE_ACTION then
- Recharge.requestAction(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_ALL_SERVER_FIRST_KILL_INFO then
- GoldFirstKill.getFirstKillInfo(actor)
- elseif msgID == LuaMessageIdToSever.REQ_RECEIVE_FIRST_KILL_ENVELOPE then
- GoldFirstKill.receiveFirstKillAward(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_RECEIVE_PERSONAL_FIRST_KILL_AWARD then
- GoldFirstKill.SubmitTask(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_ANGLE_BENEFIT_INFO then
- AngelBenefit.getAllAngleBenefitInfo(actor)
- elseif msgID == LuaMessageIdToSever.REQ_RECEIVE_ANGLE_BENEFIT_REWARD then
- AngelBenefit.receiveScoreReward(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_SUBMIT_ANGLE_BENEFIT_TASK then
- AngelBenefit.submitTask(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_RECEIVE_LOGIN_REWARD then
- SevenLogin.receiveLoginReward(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_RECEIVE_RECHARGE_LOGIN_REWARD then
- RechargeSevenReceive.receiveLoginReward(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_RECEIVE_ANGEL_WEAPON_REWARD then
- AngelWeapon.receiveTaskReward(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_PERSONAL_LEVEL_REWARD_INFO then
- LevelReward.getLevelRewardInfo(actor)
- elseif msgID == LuaMessageIdToSever.REQ_RECEIVE_LEVEL_REWARD then
- LevelReward.receiveLevelReward(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_TRANSFER_CARD_BAG then
- TransferCard.ReqGetAllBagCard(actor)
- elseif msgID == LuaMessageIdToSever.REQ_TRANSFER_CARD_EXCHANGE then
- local cfgId = tonumber(msgData[1])
- local count = tonumber(msgData[2])
- TransferCard.ReqExchangeCards(actor, cfgId, count)
- elseif msgID == LuaMessageIdToSever.REQ_GENERATE_VERIFICATION_CODE then
- DailyLotteryDraw.generateVerificationCode(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_BIND_PHONE then
- DailyLotteryDraw.bindPhone(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_LUCK_DRAW then
- DailyLotteryDraw.luckDraw(actor)
- elseif msgID == LuaMessageIdToSever.REQ_LUCK_DRAW_INFO then
- DailyLotteryDraw.sendInfo(actor)
- elseif msgID == LuaMessageIdToSever.REQ_TRANSFER_CARD_SYNTHESIS then
- TransferCard.ReqSynthesisCard(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_TRANSFER_CARD_RECOVER then
- TransferCard.ReqRecoveryCard(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_TRANSFER_CARD_INLAY then
- local part = msgData[1]
- local idx = msgData[2]
- local id = msgData[3]
- TransferCard.ReqInlayCard(actor, part, idx, id)
- elseif msgID == LuaMessageIdToSever.REQ_TRANSFER_CARD_PUTOFF then
- local part = msgData[1]
- local idx = msgData[2]
- TransferCard.ReqPutOffCard(actor, part, idx)
- elseif msgID == LuaMessageIdToSever.REQ_BUY_TIME_LIMIT_GIFT then
- TimeLimitGift.reqBuyTimeLimitGift(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_SAVE_EFFECIENCY_RED_DOT then
- Efficiency.SaveReDot(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_GET_EFFECIENCY_REWARD then
- Efficiency.GetReward(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_CHECK_EFFECIENCY_ACTIVE then
- Efficiency.CheckActive(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_SINGLE_CHALLENGE_INFO then
- OpenServerCompetition.reqSingleChallengeInfo(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_SINGLE_CHALLENGE_AWARD then
- OpenServerCompetition.reqSingleChallengeAward(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_BUY_DISCOUNTS_GIFT then
- OpenServerCompetition.reqBuyDiscountsGift(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_TRANSFORMATION then
- local group = tonumber(msgData)
- if group == nil or group == 0 then
- TransferCard.ReqCancelTransfermation(actor)
- else
- TransferCard.ReqTransformation(actor, group)
- end
- elseif msgID == LuaMessageIdToSever.REQ_COMPETITION_RANK_INFO then
- OpenServerCompetition.sendCompetitionRankInfo(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_WINGS_TASK_INFO then
- Wings.SendWingsTask(actor)
- elseif msgID == LuaMessageIdToSever.REQ_SUBMIT_WINGS_TASK then
- Wings.SubmitChapterTask(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_RECEIVE_WINGS_CHAPTER_AWARD then
- Wings.ReceiveChapterAward(actor)
- elseif msgID == LuaMessageIdToSever.REQ_BREAK_ANGEL_EQUIP then
- AngelMajorEquipment.breakEquipment(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_ANGEL_TALENT then
- AngelMajorTalent.getTalentInfo(actor)
- elseif msgID == LuaMessageIdToSever.REQ_ADD_ANGEL_TALENT_POINT then
- AngelMajorTalent.addTalentPoint(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_RESET_ANGEL_TALENT_POINT then
- AngelMajorTalent.resetTalentPoint(actor)
- elseif msgID == LuaMessageIdToSever.REQ_ACTIVE_ANGEL_TALENT then
- AngelMajorTalent.activateTalent(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_NPC_CHEST_GOODS_INFO then
- NpcChest.sendShopGoodsInfoList(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_BUY_NPC_CHEST then
- NpcChest.buyGoods(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_ANGEL_EQUIP_ATTR then
- AngelMajorEquipment.getEquipAttrById(actor, msgData)
- elseif msgID == LuaMessageIdToSever.COMBO_TEST_PANEL_INFO then
- ComboTest.ReqComboTestPanelInfo(actor)
- elseif msgID == LuaMessageIdToSever.COMBO_TEST_REWARD then
- ComboTest.rewardByLevel(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_SWEEP_THROUGH_DUNGEONS then
- DuplicateCommon.sweepThroughDungeons(actor, msgData[1], msgData[2])
- elseif msgID == LuaMessageIdToSever.REQ_BIG_SECRET_REALM_PANEL_INFO then
- BigSecretRealm.getPanelInfo(actor)
- elseif msgID == LuaMessageIdToSever.REQ_BIG_SECRET_REALM_CHANGE_RECEIVE_STATUS then
- BigSecretRealm.setReceiveStatus(actor)
- elseif msgID == LuaMessageIdToSever.REQ_BIG_SECRET_REALM_KEY_LEVEL_UP then
- BigSecretRealm.keyLevelUp(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_BIG_SECRET_REALM_RECEIVE_REWARD then
- BigSecretRealm.receiveReward(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_TRANSFER_WITHIN_MAP then
- MapMoveTransfer.transferWithinMap(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_SETTING_RECYCLING_TYPE then
- ItemRecycling.setItemRecyclingType(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_GET_RECYCLING_TYPE then
- ItemRecycling.getItemRecyclingType(actor)
- elseif msgID == LuaMessageIdToSever.REQ_BIG_SECRET_REALM_SWEEP then
- BigSecretRealm.sweep(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_SANCTUARY_BOSS_ENTER_MAP then
- SanctuaryBoss.enterMap(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_CROSS_MAP_TRANSFER_TO_NPC then
- CrossMap.Transfer2NPC(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_INLAY_ANGEL_GRAIL then
- AngelMajorGrail.inlayGrail(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_UNLOAD_ANGEL_GRAIL then
- AngelMajorGrail.unloadGrail(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_GET_EQUIP_ALL_ENTRY_INFO then
- AngelMajorGrail.getEquipAllEntryInfo(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_STRENGTHEN_ANGEL_GRAIL then
- AngelMajorGrail.strengthenGrail(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_ANGEL_GRAIL_DECOMPOSE then
- AngelMajorGrail.grailDecompose(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_USE_SELF_CHOICE_BOX then
- UseSelfChoiceBox.use(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_OTHER_ANGE_EQUIP_INFO then
- AngelMajorEquipment.getPlayerAngelEquipInfo(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_OTHER_ANGE_GRAIL_INFO then
- AngelMajorGrail.getPlayerAngelGrailInfo(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_MONSTER_HUNT_RANK then
- MonsterHunt.RankList(actor)
- elseif msgID == LuaMessageIdToSever.REQ_SYNTHESIS_ALL_CARD then
- local type = tonumber(msgData[1])
- local level = tonumber(msgData[2])
- TransferCard.ReqSynthesisAll(actor, type, level)
- elseif msgID == LuaMessageIdToSever.REQ_BREAKTHROUGH_CARD then
- TransferCard.ReqBreakthrough(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_BREAKTHROUGH_CARD_ALL then
- local type = tonumber(msgData[1])
- local quality = tonumber(msgData[2])
- TransferCard.ReqBreakthroughAll(actor, type, quality)
- elseif msgID == LuaMessageIdToSever.REQ_MONSTER_HUNT_INFO then
- MonsterHunt.Info(actor)
- elseif msgID == LuaMessageIdToSever.REQ_TRANSFER_CARD_HANG_UP_SETTING then
- TransferCard.ReqUpdateTransferSetting(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_MAIN_ACTIVE_INFO then
- OperationalActivities.openSubActive(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_CHANGE_SKIP_ANIMATION then
- TurntableRaffle.changeSkipAnimation(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_TURNTABLE_RAFFLE_DRAWING then
- TurntableRaffle.drawing(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_RECEIVE_TURNTABLE_RAFFLE_REWARD then
- TurntableRaffle.receiveAccumulateReward(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_TURNTABLE_REWARD_COUNT_INFO then
- TurntableRaffle.getRewardCountInfo(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_WEEK_CHANGE_SKIP_ANIMATION then
- WeekTurntableRaffle.changeSkipAnimation(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_WEEK_TURNTABLE_RAFFLE_DRAWING then
- WeekTurntableRaffle.drawing(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_WEEK_RECEIVE_TURNTABLE_RAFFLE_REWARD then
- WeekTurntableRaffle.receiveAccumulateReward(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_WEEK_TURNTABLE_REWARD_COUNT_INFO then
- WeekTurntableRaffle.getRewardCountInfo(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_ROLAND_SEIGE_GET_MAIN_PANEL then
- RolandSeige.ReqMainPanel(actor)
- elseif msgID == LuaMessageIdToSever.REQ_ANGEL_GRAIL_RANKING_INFO then
- AngelMajorGrail.getGrailRankingInfo(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_WORSHIP_ANGEL_GRAIL_RANKING then
- AngelMajorGrail.worshipGrail(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_PLAYER_EQUIP_GRAIL_INFO then
- AngelMajorGrail.getPlayerAllAngelEquipAndGrail(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_REMAINING_ANGE_GRAIL_INFO then
- AngelMajorGrail.sendGrailInfo(actor, false)
- elseif msgID == LuaMessageIdToSever.REQ_KUN_DUN_AUCTION_BIDDING then
- KunDunAuction.PlayerBidding(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_UPDATE_ROLE_SETTING then
- RoleSetting.updateState(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_CUSTOME_TRANSFER then
- CustomTransmit.DoTransmit(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_TARGET_VIP_LV then
- RoleSetting.getTargetVipLv(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_CLOSE_DEMON_HERMIT_SKILL then
- Skill.closeDemonHermitSkill(actor)
- elseif msgID == LuaMessageIdToSever.REQ_CAREER_TRANSFER then
- PlayerCareerTransfer.careerTransfer(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_WEEKEN_ACTIVE_INFO then
- WeekActives.openSubActive(actor, msgData)
- elseif msgID == 2011669 or msgID == LuaMessageIdToSever.REQ_SummonChat_TRANSFER_RESPONSE then
- -- info("MS =============== >>>>>> QFunction-0 REQ_SummonChat_TRANSFER_RESPONSE: ", msgData)
- SummonAndChat.handleTransferResponse(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_AG_SD_INFO then
- AGAndSD.onLoginEnd(actor)
- elseif msgID == LuaMessageIdToSever.LianJi_MsgID then
- LianJi.onHandlereQuest(actor, msgID, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_ROLE_INFO then
- Player.updateLoginInfo(actor)
- elseif msgID == LuaMessageIdToSever.REQ_ALL_COUNT_INFO_EXT then
- CountManager.sendPlayerAllCountsMsg(actor)
- elseif msgID == LuaMessageIdToSever.SERVICE_HORN or msgID == 3001666 then
- EquipAndAppear.Horn(actor, msgData)
- elseif msgID == LuaMessageIdToSever.TransactionInfo_MsgID then
- Transaction.onHandlereQuest(actor, msgID, msgData)
- elseif msgID == LuaMessageIdToSever.ItemPick_MsgID then
- Hook.pickItem(actor, msgData)
- elseif msgID == LuaMessageIdToSever.HookUpdateStatus then
- Hook.hookUpdateStatus(actor, msgData)
- elseif msgID == LuaMessageIdToSever.Add_Buff_MsgID then
- Buffer.onAddBuff(actor, msgData)
- elseif msgID == LuaMessageIdToSever.SkillTransfer then
- Skill.onTransfers(actor, msgData)
- elseif msgID == LuaMessageIdToSever.Team_Invite_Apply_MsgID then
- Team.onHandleTeamInviteApplyMsg(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_DAY_CARD_EXPERIENCE then
- Bag.sendDayCardGift(actor)
- elseif msgID == LuaMessageIdToSever.UpdateWear then
- EquipAndAppear.UpdateWear(actor)
- elseif msgID == LuaMessageIdToSever.REQ_TRANSFER_TO_MAP_WITH_ITEM_NEED then
- MapMoveTransfer.transferToMapSelect(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_TEAMMATE_POSITION then
- Team.GetAllMemberPos(actor)
- elseif msgID == LuaMessageIdToSever.REQ_WORLD_BOSS_INFO then
- WorldBoss.ReqWorldBossMsg(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_UPDATE_TASK_CHECK_STRATEGY then
- RoleCount.checkStrategy(actor)
- elseif msgID == LuaMessageIdToSever.REQ_WORLD_BOSS_UPDATE_GOODS then
- WbAuction.login(actor)
- elseif msgID == LuaMessageIdToSever.REQ_WORLD_AUCTION_BIDDING then
- WbAuction.PlayerBidding(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_ACT_FIRST_RECHARGE_INFO then
- ActFirstRecharge.getInfo(actor, msgData)
- elseif msgID == LuaMessageIdToSever.REQ_ACT_FIRST_RECHARGE_REWARD then
- ActFirstRecharge.gainReward(actor, msgData)
- else
- -- 请放到最后,其余消息在上面追加
- error(actor, "收到无法处理的消息", "玩家", actor, "消息ID", msgID, "params", msgData)
- end
- end
- function login(play)
- -- local info = getrolelist(play,getbaseinfo(play, "uid"))--local 自定义变量 = 接口事件名称(默认参数【自定义名称】,参数1,参数2...)
- -- error(info)--打印返回数据
- gameDebug.debug(CountManager.login, play)
- gameDebug.debug(Friend.login, play)
- gameDebug.debug(DailyActivity.login, play)
- gameDebug.debug(Activity.LogIn, play)
- gameDebug.debug(Mount.sendCurrentRideMount, play)
- gameDebug.debug(Mount.sendMountLogo, play)
- gameDebug.debug(EquipGuard.login, play)
- gameDebug.debug(GoldTask.Login, play)
- gameDebug.debug(GoldFirstKill.login, play)
- gameDebug.debug(SecretRealm.login, play)
- gameDebug.debug(Union.sendLeaderOnlineStateMsg, play)
- gameDebug.debug(KingRoad.Login, play)
- gameDebug.debug(Wings.Login, play)
- gameDebug.debug(PrivilegeMonth.login, play)
- gameDebug.debug(Master.login, play)
- gameDebug.debug(MonthCard.login, play)
- gameDebug.debug(onHook.login, play)
- gameDebug.debug(CrossMap.EnterView, play, play)
- gameDebug.debug(GodsDescended.sendMonsterStateData, play)
- -- gameDebug.debug( EquipAndAppear.playerequipstrength(play,0)
- -- gameDebug.debug( Trade.sendRecharge, play)
- gameDebug.debug(TaskHandler.sendTaskState, play)
- gameDebug.debug(Efficiency.CheckRedDot, play)
- gameDebug.debug(PreferentialGift.CheckPreferentialGift, play)
- LoginEventListerTable:triggerEvent("0", play)
- gameDebug.debug(ExpBoost.login, play)
- gameDebug.debug(DailyLotteryDraw.login, play)
- gameDebug.debug(AngelBenefit.login, play)
- gameDebug.debug(SevenLogin.login, play)
- gameDebug.debug(RechargeSevenReceive.login, play)
- gameDebug.debug(LevelReward.login, play)
- gameDebug.debug(AngelWeapon.login, play)
- gameDebug.debug(AngelMajorEquipment.login, play)
- gameDebug.debug(AngelMajorTalent.sendActiveTalentInfo, play)
- gameDebug.debug(Mount.checkMountTime, play)
- gameDebug.debug(ComboTest.login, play)
- gameDebug.debug(BigSecretRealm.login, play)
- gameDebug.debug(RankScript.updateOnline, play, true)
- gameDebug.debug(AngelMajorGrail.sendGrailInfo, play, true)
- gameDebug.debug(Player.UpdateFightValue, play)
- gameDebug.debug(Trade.login, play)
- gameDebug.debug(HpMpRecover.recover, play)
- gameDebug.debug(RoleSetting.login, play)
- gameDebug.debug(EquipAndAppear.login, play)
- gameDebug.debug(FruitScript.toGetAlreadyUsePoints, play)
- gameDebug.debug(AGAndSD.onLoginEnd, play)
- gameDebug.debug(NewEquipWear.onLoginEnd, play)
- gameDebug.debug(EquipDurability.onLoginEnd, play)
- gameDebug.debug(EquipRefined.onLoginEnd, play)
- gameDebug.debug(LianJi.onLoginEnd, play)
- gameDebug.debug(Player.onLoginEnd, play)
- gameDebug.debug(Transaction.onLoginEnd, play)
- -- gameDebug.debug( OperationalActivities.openActive, play)
- gameDebug.debug(ActMonthlyGrow.login, play)
- end
- function exit(actor)
- local time = getbaseinfo("now")
- setplaydef(actor, "T$offlinetime", time)
- Skill.closeDemonHermitSkill(actor)
- Skill.closePet(actor)
- NewEquipWear.closePet(actor)
- end
- function logout(actor)
- onHook.logout(actor)
- RankScript.updateOnline(actor, false)
- gameDebug.debug(Player.UpdateFightValue, actor)
- gameDebug.debug(LogManager.RoleLogout, actor)
- gameDebug.debug(AGAndSD.onLogout, actor)
- gameDebug.debug(NewEquipWear.onLogout, actor)
- gameDebug.debug(EquipAndAppear.onLogout, actor)
- gameDebug.debug(Skill.closePet, actor)
- gameDebug.debug(Skill.closeDemonHermitSkill, actor)
- end
- function run(actor)
- -- 测试内网,看看能不能更新上去
- end
- function walk(actor)
- end
- function jump(actor)
- end
- function removeskillevent(actor, removeSkillList)
- end
- function releaseskillafter(actor, skillid, skilllevel, targetlist, finalTargetList, targetHurt, targetTotal)
- AGAndSD.onAttackAG(actor, skillid)
- Skill.releaseSkillAfter(actor, skillid)
- -- sendluamsg(actor, LuaMessageIdToSever.SkillRelease, {
- -- skillId = skillid,
- -- skillLevel = skilllevel
- -- })
- end
- function releaseskill(actor, skillid, skilllevel, targetlist)
- -- --Buffer.OnReleaseSkill(actor,targetlist)
- -- end
- --
- -- function releaseskillafter(actor, skillid, skilllevel, targetlist, finalTargetList, targetHurt, targetTotal)
- -- -- targetlist : 伤害目标列表
- -- -- finalTargetList: 伤害目标结果列表,包含了未产生伤害的对象,也就是被powersource=0过滤掉的目标
- -- -- targetHurt: 总伤害值
- -- -- targetTotal: 受到伤害目标的数量,等于size(targetlist)
- -- local baseCareer = getbaseinfo(actor, "getbasecareer")
- -- if baseCareer == 3 then
- -- local needWeapon = ConfigDataManager.getTableValue("cfg_skill_info", "needWeapon", "skillID", skillid,
- -- "skillLevel", skilllevel)
- -- if string.startsWith(needWeapon, "4") then
- -- local isPass = false
- -- local needWeapons = string.split(needWeapon, "|")
- -- local equipPos = {}
- -- local equips = getputonequipinfo(actor)
- -- for key, equip in pairs(equips) do
- -- local pos = gameequip.pos(equip.equipindex)
- -- equipPos[pos] = equip
- -- end
- -- for i = 2, #needWeapons, 1 do
- -- local weaponDatas = string.split(needWeapons[i], "#")
- -- local part = tonumber(weaponDatas[1])
- -- local weapon = tonumber(weaponDatas[2])
- -- local equip = equipPos[part]
- -- if equip ~= nil then
- -- local equipField = ConfigDataManager.getTableValue("cfg_item", "field", "id", equip.cfgid)
- -- local equipPart = ConfigDataManager.getTableValue("cfg_model_charactor", "part", "id", equipField)
- -- if tonumber(equipPart) == weapon then
- -- isPass = true;
- -- break
- -- end
- -- end
- -- end
- -- if isPass == false then
- -- return false
- -- end
- -- end
- -- end
- EquipDurability.updateQuiver(actor)
- LianJi.releaseskill(actor, skillid, skilllevel, targetlist)
- Skill.releaseSkill(actor, skillid)
- end
- function triggertaskrefresh(actor, type, param)
- -- 统一走lua触发任务刷新接口
- TaskHandler.TriggerTaskGoal(actor, type, param)
- end
- function levelup(actor, level, oldlevel)
- LevelUpEventListerTable:triggerEvent("0", actor, level)
- gameDebug.debug(LogManager.RoleLevelUp, actor)
- RoleAttr.levelup(actor, level, oldlevel)
- -- 处理职业解锁
- CareerUnlock.unlock(actor, level)
- -- 检查王者任务初始化
- KingRoad.TryInitKingRoadTask(actor)
- Wings.TryInitWingsTask(actor)
- Master.levelup(actor, level, oldlevel)
- -- Mail.levelUp(actor, level)
- OpenServerAct.UpdateRankValue(actor, OpenServerAct.RealTimeRank.ROLE_LEVEL, level)
- Buffer.levelUp(actor, level)
- Efficiency.CheckRedDot(actor, level)
- PreferentialGift.CheckPreferentialGift(actor)
- GoldFirstKill.AcceptTask(actor)
- AngelBenefit.AcceptTask(actor)
- SevenLogin.updateLoginInfo(actor)
- BraveTest.refreshRedDot(actor)
- RechargeSevenReceive.updateLoginInfo(actor)
- Player.onLevelUp(actor)
- -- AGAndSD.upLevelCfgId(actor)
- end
- function taskprogresscomplete(actor, taskId)
- Mail.taskComplete(actor, taskId)
- Buffer.taskProgressComplete(actor, taskId)
- end
- function taskcomplete(actor, taskId)
- FaceShootPreview.TaskCompleted(actor, taskId)
- end
- -- @description 玩家活动改变事件
- -- @param 玩家对象;活动id;1-开启,0-关闭
- -- @return
- function activitychange(actor, activityId, action)
- Activity.ActivityChange(actor, activityId, action)
- GodsDescended.actorActivityChange(actor, activityId, action)
- end
- -- @description 开启活动,系统执行
- -- @param 系统对象,id和mapid均为0;活动id;1-开启,0-关闭
- -- @return
- function systemactivitychange(system, activityId, action)
- if tonumber(activityId) == DuplicateType.MONSTER_ATTACK then
- MonAtk.run(activityId, action)
- elseif tonumber(activityId) == DuplicateType.MONSTER_ATTACK_GOLD1 then
- MonAtk.run(activityId, action)
- elseif tonumber(activityId) == DuplicateType.MONSTER_ATTACK_GOLD2 then
- MonAtk.run(activityId, action)
- elseif tonumber(activityId) == DuplicateType.WAR_ALLIANCE and tonumber(action) == 0 then
- WarAlliance.ClearThisTimeGameData()
- elseif tonumber(activityId) == DuplicateType.WOLF_SOUL and tonumber(action) == 1 then
- WolfSoul.OpenDuplicate(system)
- elseif tonumber(activityId) == DuplicateType.GODS_DESCENDED then
- GodsDescended.sysActivityChange(activityId, action)
- elseif tonumber(activityId) == DuplicateType.KUN_DUN then
- KunDun.Run(action)
- elseif activityId == DuplicateType.ROLAND_SEIGE and action == 1 then
- -- 罗兰峡谷攻城战活动开启
- RolandSeige.OpenDuplicate(system)
- elseif tonumber(activityId) == DuplicateType.WORLD_BOSS then
- WorldBoss.Run(action)
- end
- end
- -- 怪物进入战斗状态触发
- function monsterenterattack(actor, monstercfgid, enemyid)
- messagebox(actor, "怪物进入战斗状态触发")
- MonAtk.monAtkMonsterEnterAttack(actor, monstercfgid, enemyid)
- MonAtk.monAtkMonsterEnterAttack(actor, monstercfgid)
- end
- -- 怪物脱离战斗状态触发
- function monsterleaveattack(actor, monstercfgid)
- MonAtk.monAtkMonsterLeaveAttack(actor, monstercfgid)
- end
- ---击杀玩家事件
- ---@param actor any 攻击玩家对象
- ---@param diePlayer any 死亡玩家对象
- function killplayer(actor, diePlayer)
- pk.killplayerpkvaluehandle(actor, diePlayer) -- 击杀玩家PK值处理
- -- Friend.enemyaddbefore(diePlayer, actor)
- RedFortress.KillPlayer(actor, diePlayer)
- UnionTask.killPlayerEvent(actor, diePlayer)
- KunDun.KillPlayer(actor, diePlayer)
- RolandSeige.KillPlayer(actor, diePlayer)
- end
- ---玩家被攻击事件
- ---@param actor any 玩家对象
- ---@param fightParam any 被攻击参数 caster:攻击者对象、target:被攻击者对象、mapid:地图id、skillid:技能id、skilllevel:技能等级、castertype:攻击者类型、targettype:被攻击者类型
- function underattack(actor, fightParam, fightResult)
- pk.underattackpkvaluehandle(actor, fightParam) -- 被攻击PK值防卫时间处理
- EquipGem.setGemRecovery(actor, fightParam)
- MonsterScript.OnUnderAttack(actor, fightParam)
- -- EquipDurability.beattack(actor, fightParam.target, fightParam.targethurt, fightParam.targettype)
- EquipDurability.beattackMark(actor, fightParam.target, fightParam.targethurt, fightParam.targettype)
- end
- ---击杀怪物事件
- ---@param actor any 玩家对象
- ---@param monsterId any 怪物唯一ID
- ---@param monsterCfgId number 怪物configId
- ---@param monsterName string 怪物名称
- ---@param pointX number 怪物X坐标
- ---@param pointY number 怪物Y坐标
- ---@param activityId number 活动id
- ---@param monsterLevel number 怪物等级
- function killmon(actor, monsterId, monsterCfgId, monsterName, pointX, pointY, activityId, monsterLevel, mongenCfgId)
- gameDebug.debug(LogManager.KillMonster, actor, monsterCfgId)
- pk.killmonsterpkvaluehandle(actor, monsterCfgId, monsterLevel) -- 击杀怪物PK值处理
- UnionTask.killMonsterEvent(actor, monsterCfgId)
- -- AG / SD信息
- -- AGAndSD.onKillMon(actor, monsterId, monsterCfgId, monsterName, pointX, pointY, activityId, monsterLevel, mongenCfgId)
- end
- -- 当前地图检查是否可以使用道具(actor, id)
- function MapCanuseitem(actor, id)
- -- 获取所在地图
- -- local mapId = tonumber(getbaseinfo(actor, "mapid"))
- -- 需要消耗资源的地图不许使用此道具
- -- local items_need = ConfigDataManager.getTableValue("cfg_map_line", "items_need", "id", mapId)
- -- if not string.isNullOrEmpty(items_need) then
- -- tipinfo(actor, string.format("当前地图禁止使用该道具"))
- -- return false
- -- end
- return true
- end
- -- 道具使用检测
- function useitembefore(actor, data)
- if data.type == 1 then
- for key, value in pairs(data.items) do
- local itemInfo = getbagiteminfo(actor, key, 0)
- local canUse = WarFlag.canUseWarFlagItem(actor, itemInfo)
- if canUse == false then
- return false
- end
- end
- end
- for key, value in pairs(data.items) do
- local itemInfo = getbagiteminfo(actor, key, 0)
- if itemInfo == nil then
- elseif itemInfo.cfgid == 30030109 then
- local teamid = getbaseinfo(actor, "teamid")
- if teamid == nil or teamid == "" or teamid == 0 then
- tipinfo(actor, string.format("您不在队伍中"))
- return false
- end
- return MapCanuseitem(actor, itemInfo.cfgid)
- elseif itemInfo.cfgid == 30030108 then
- local unionid = getbaseinfo(actor, "unionid")
- if unionid == nil or unionid == "" or unionid == 0 then
- tipinfo(actor, string.format("您不在战盟中"))
- return false
- end
- local unioninfo = getunioninfo(actor, unionid)
- if unioninfo.num <= 1 then
- tipinfo(actor, string.format("没有可召唤的战盟成员"))
- return false
- end
- return MapCanuseitem(actor, itemInfo.cfgid)
- elseif itemInfo.cfgid == 70700026 then -- 免罪符
- local pkval = pk.getpkvalue(actor)
- if pkval <= 0 then
- messagebox(actor, "您的罪恶值为 0,无需消除")
- return false
- end
- local show = pkval - 10 > 0 and pkval - 10 or 0
- noticeTip.noticeinfo(actor, 35007, pkval, show)
- -- elseif itemInfo.cfgid == 50020021 then -- 使用防护药水
- -- return AGAndSD.useItem(actor,itemInfo.cfgid,1,1)
- end
- -- if not MapCanuseitem(actor, itemInfo.cfgid) then
- -- return false
- -- end
- end
- end
- ---使用道具事件
- ---@param actor any 玩家对象
- ---@param itemConfigId number 道具configId
- ---@param count number 使用数量
- function useitemtrigger(actor, itemConfigId, count)
- gameDebug.debug(CareerChange.useItemChangeCareer, actor, itemConfigId)
- CareerChange.useItemChangeCareer(actor, itemConfigId, count)
- EquipAndAppear.addbuffcostitem(actor, itemConfigId, count) -- 使用道具
- pk.exonerationcharmpkvaluehnadle(actor, itemConfigId, count) -- 免罪符使用减少PK值处理
- -- PrivilegeCardScript.setPrivilegeCardInfos(actor, itemConfigId, count) -- 特权卡使用后处理
- FruitScript.handleUseFruit(actor, itemConfigId, count) -- 果实使用后处理
- MonthCard.usemonthcard(actor, itemConfigId, count) -- 使用月卡后处理
- RandomChest.generateChestItem(actor, itemConfigId, count) -- 随机宝箱生成道具
- FashionBox.generateChestItem(actor, itemConfigId, count) -- 时装宝箱生成道具
- ExpBoost.useExperienceBoostItem(actor, itemConfigId, count) -- 经验加成道具处理
- PrivilegeMonth.usePrivilegeCard(actor, itemConfigId, count) -- 特权卡使用处理
- AngelMajorEquipment.useExperienceBoostItem(actor, itemConfigId, count) -- 大天使经验药水使用处理
- WarFlag.useWarFlagItem(actor, itemConfigId, count) -- 使用旗魂道具
- -- 新增召唤和聊天道具处理
- SummonAndChat.handleSpecialItems(actor, itemConfigId, count)
- LianJi.onUseItem(actor, itemConfigId, count)
- -- 防护药水使用处理
- AGAndSD.useItem(actor, itemConfigId)
- end
- ---玩家转职事件
- ---@param actor any 玩家对象
- ---@param transferCareerNum number 转职次数
- ---@param careerName string 转职名称
- function transfercareer(actor, transferCareerNum, careerName)
- RoleAttr.transferCareer(actor, careerName)
- local roleName = getrolefield(actor, "role.basic.name")
- -- 转职成功发送公告消息
- noticeTip.noticeinfo(actor, StringIdConst.JOB_CHANGE, roleName, transferCareerNum, careerName)
- end
- ---玩家进入视野事件
- ---@param actor any 玩家对象
- ---@param targetPlayer any 进入视野的玩家对象
- function playerenterview(actor, targetPlayer)
- pk.sendenterviewpkvalue(actor, targetPlayer) -- 进入视野发送PK值
- DuplicateCommon.PlayerEnterView(actor, targetPlayer) -- 副本中玩家进入视野
- CrossMap.EnterView(actor, targetPlayer)
- SceneMap.playerEnterView(actor, targetPlayer)
- Skill.playerequipview(actor, targetPlayer)
- TransferCard.PlayerEnterView(actor, targetPlayer)
- EquipAndAppear.playerequipstrength(actor, targetPlayer) -- 玩家进入视野发送装备强化信息
- EquipAndAppear.playerequipview(actor, targetPlayer)
- end
- --- 怪物进入视野事件
- ---@param actor any 玩家对象
- ---@param monsterActor any 怪物对象
- ---@param monsterCfgId number 怪物configId
- function monsterenterview(actor, monsterActor, monsterCfgId)
- MonsterScript.MonsterEnterView(actor, monsterActor, monsterCfgId)
- end
- --- 穿戴装备后触发
- function takeonequip(actor, pos, oldItemId, itemId, itemCfgId)
- gameDebug.debug(LogManager.RolePutOnEquip, actor)
- EquipGuard.putGuardEquip(actor, itemCfgId)
- -- 转移装备属性
- EquipAndAppear.checkCanTransfer(actor, oldItemId, itemId)
- -- EquipMaster.triggerEquipMaster(actor)
- EquipAndAppear.updateluaextattr(actor)
- EquipGem.schemeEffectByBoolean(actor, {pos}, true)
- -- EquipAndAppear.playerequipstrength(actor, 0) --发送玩家装备强化信息
- -- 刷新装备任务进度
- this.equipchangeflushtask(actor, pos, itemId)
- TransferCard.EquipChange(actor)
- OpenServerCompetition.updateSuitStageNum(actor)
- AngelWeapon.updateTaskInfo(actor)
- -- 穿戴大天使装备后操作
- AngelMajorEquipment.afterPutOnAngelEquipment(actor, oldItemId, itemId, itemCfgId)
- EquipDurability.takeonequip(actor, pos, oldItemId, itemId, itemCfgId)
- TwoWeaponsAttrs.updateAttrs(actor, pos)
- LineManager.takeoffequip(actor)
- EquipMaster.updateEquipMaster(actor)
- end
- --- 脱下装备后触发
- function takeoffequip(actor, pos, itemId, itemCfgId)
- EquipGuard.takeOffGuardEquip(actor, itemCfgId)
- -- EquipMaster.triggerEquipMaster(actor)
- EquipAndAppear.updateluaextattr(actor)
- EquipGem.schemeEffectByBoolean(actor, {pos}, false)
- -- EquipAndAppear.playerequipstrength(actor, 0) --发送玩家装备强化信息
- -- 刷新装备任务进度
- this.equipchangeflushtask(actor, pos, itemId)
- TransferCard.EquipChange(actor)
- AngelWeapon.updateTaskInfo(actor)
- -- 脱下大天使装备后操作
- AngelMajorEquipment.afterTakeOffAngelEquipment(actor, itemId, itemCfgId)
- TwoWeaponsAttrs.updateAttrs(actor, pos)
- Equip_QiangHua.takeOffEquip(actor, pos, itemId, itemCfgId)
- -- 地图检测
- LineManager.takeoffequip(actor)
- EquipMaster.updateEquipMaster(actor)
- end
- function weaponchange(actor, oldIndex, newIndex, itemId)
- local res = {
- oldIndex = oldIndex,
- newIndex = newIndex,
- itemId = itemId
- }
- sendluamsg(actor, LuaMessageIdToClient.RES_WEAPON_CHANGE_AUTO, res)
- end
- function this.equipchangeflushtask(actor)
- TaskHandler.TriggerTaskGoal(actor, TaskTargetType.EQUIP_APPEND)
- TaskHandler.TriggerTaskGoal(actor, TaskTargetType.PARTS_STRENGTHEN_LV)
- TaskHandler.TriggerTaskGoal(actor, TaskTargetType.JEWELRY_LV_UP)
- TaskHandler.TriggerTaskGoal(actor, TaskTargetType.EXCELLENCE_ATTR)
- TaskHandler.TriggerTaskGoal(actor, TaskTargetType.EQUIP_EXCELLENCE_ATTR_COUNT)
- TaskHandler.TriggerTaskGoal(actor, TaskTargetType.EQUIP_APPEND_TOTAL_LV)
- TaskHandler.TriggerTaskGoal(actor, TaskTargetType.SPECIFIC_STAGE_EQUIP)
- TaskHandler.TriggerTaskGoal(actor, TaskTargetType.INLAID_GEMSTONES)
- TaskHandler.TriggerTaskGoal(actor, TaskTargetType.TAKE_ON_GRAIL_COUNT)
- TaskHandler.TriggerTaskGoal(actor, TaskTargetType.STRENGTHEN_GRAIL)
- end
- -- 装备生效事件 是否生效 通过参数的布尔值判断
- function equipeffectbyboolean(actor, map, effect)
- -- 获取影响的装备位置
- local effectPos = {}
- for k, v in pairs(map) do
- table.insert(effectPos, gameequip.pos(k))
- end
- EquipGem.schemeEffectByBoolean(actor, effectPos, effect)
- -- sendluamsg(actor, LuaMessageIdToClient.RES_GEM_SCHEME, { ["触发了生效事件"] = map })
- end
- --- 物品变化
- function itemchange(actor, ids, cfgId, oldCount, newCount, change)
- EquipGuard.initGuardEquip(actor, ids, cfgId, oldCount, newCount)
- Master.masterItemChange(actor, ids, cfgId, oldCount, newCount)
- -- 任务进度刷新
- if tonumber(oldCount) < tonumber(newCount) then
- local count = tonumber(newCount) - tonumber(oldCount)
- TaskHandler.TriggerTaskGoal(actor, TaskTargetType.RE_GET_ITEM, {cfgId, count})
- end
- AutoBuyPotionScript.coinChange(actor, cfgId)
- end
- function addmonthcardbefore(actor, cfgId, count)
- if cfgId ~= 30030305 then
- return
- end
- -- 直接加月卡时间
- MonthCard.buymonthcardgoods(actor, cfgId, count)
- end
- -- 怪物进入战斗状态触发
- function monsterenterattack(actor, monstercfgid, enemyid)
- MonAtk.monAtkMonsterEnterAttack(actor, monstercfgid)
- end
- -- 怪物脱离战斗状态触发
- function monsterleaveattack(actor, monstercfgid)
- MonAtk.monAtkMonsterLeaveAttack(actor, monstercfgid)
- end
- -- 不入包的道具获取
- function nobagitemchange(actor, itemList)
- for _, itemInfo in pairs(itemList) do
- EquipAndAppear.titleenterbag(actor, itemInfo.cfgid)
- end
- TransferCard.NotEnterBagItemAdd(actor, itemList)
- end
- -- @description 副本阶段更新
- -- @param 系统id;地图唯一id;副本类型;副本阶段(1-准备 2-战斗 3-结算);下一阶段开始时间戳;配置id(cfg_rep的id)
- -- @return
- function dupstateupdate(system, id, dupType, state, nextStateStartTime, configId)
- if dupType == DuplicateType.DEVIL_SQUARE then
- -- 恶魔广场
- DevilSquare.DevilSquareStateUpdate(system, id, state, nextStateStartTime, configId)
- elseif dupType == DuplicateType.BLOODY_CASTLE then
- -- 血色城堡
- BloodyCastle.BloodyCastleStateUpdate(system, id, state, nextStateStartTime, configId)
- elseif dupType == DuplicateType.BRAVE_TEST then
- -- 勇者试炼
- BraveTest.BraveTestStateUpdate(system, id, state, nextStateStartTime, configId)
- elseif dupType == DuplicateType.RED_FORTRESS then
- -- 赤色要塞
- RedFortress.RedFortressStateUpdate(system, id, state, nextStateStartTime, configId)
- elseif dupType == DuplicateType.WAR_ALLIANCE then
- -- 战盟boss
- WarAlliance.WarAllianceStateUpdate(system, id, state, nextStateStartTime, configId)
- elseif dupType == DuplicateType.PRIVILEGE_BOSS then
- PrivilegeBoss.PrivilegeBossStateUpdate(system, id, state, nextStateStartTime, configId)
- elseif dupType == DuplicateType.WOLF_SOUL then
- WolfSoul.DupStateUpdate(system, id, state, nextStateStartTime, configId)
- elseif dupType == DuplicateType.KUN_DUN then
- KunDun.DupStateUpdate(system, id, state, nextStateStartTime, configId)
- elseif dupType == DuplicateType.COMBO_TEST then
- ComboTest.ComboStateUpdate(system, id, state, nextStateStartTime, configId)
- elseif dupType == DuplicateType.BIG_SECRET_REALM then
- BigSecretRealm.DupStateUpdate(system, id, state, nextStateStartTime, configId)
- elseif dupType == DuplicateType.ROLAND_SEIGE then
- RolandSeige.DupStateUpdate(system, id, state, nextStateStartTime, configId)
- elseif dupType == DuplicateType.ITEM_BOSS then
- ItemBoss.DupStateUpdate(system, id, state, nextStateStartTime, configId)
- elseif dupType == DuplicateType.WORLD_BOSS then
- WorldBoss.DupStateUpdate(system, id, state, nextStateStartTime, configId)
- end
- end
- -- @description 副本秒钟心跳
- -- @param
- -- @return
- function duplicatesecondheart(system)
- local mapId = getbaseinfo(system, "unimapid")
- local dupInfo = getduplicate(mapId)
- if dupInfo == nil then
- return
- end
- local dupType = dupInfo["type"]
- local state = dupInfo["state"]
- local dupConfig = dupInfo["dupcfgid"]
- if dupType == DuplicateType.WOLF_SOUL then
- WolfSoul.SecondHeart(mapId, dupConfig, state)
- elseif dupType == DuplicateType.ROLAND_SEIGE then
- RolandSeige.DupSecondHeart(mapId, dupConfig, state)
- elseif dupType == DuplicateType.KUN_DUN then
- KunDun.DupSecondHeart(mapId, dupConfig, state)
- end
- end
- -- 副本3秒钟心跳
- function duplicate3secondheart(system)
- local mapId = getbaseinfo(system, "unimapid")
- local dupInfo = getduplicate(mapId)
- if dupInfo == nil then
- return
- end
- local dupType = dupInfo["type"]
- local state = dupInfo["state"]
- local dupConfig = dupInfo["dupcfgid"]
- if dupType == DuplicateType.ROLAND_SEIGE then
- RolandSeige.Dup3SecondHeart(mapId, dupConfig, state)
- elseif dupType == DuplicateType.WORLD_BOSS then
- WorldBoss.DupSecondHeart(mapId, dupConfig, state)
- end
- end
- -- 副本5秒钟心跳
- function duplicate5secondheart(system)
- local mapId = getbaseinfo(system, "unimapid")
- local dupInfo = getduplicate(mapId)
- if dupInfo == nil then
- return
- end
- local dupType = dupInfo["type"]
- local state = dupInfo["state"]
- local dupConfig = dupInfo["dupcfgid"]
- if dupType == DuplicateType.RED_FORTRESS then
- RedFortress.Dup5SecondHeart(mapId, dupConfig, state)
- end
- end
- -- @description 怪物死亡掉落经验事件,归属者触发,主要处理怪物经验
- -- @param 归属者;默认掉落经验;怪物配置id;x坐标;y坐标
- -- @return 经验值
- function monsterdieexp(actor, exp, monCfgId, monsterId, x, y)
- local mapId = getbaseinfo(actor, "unimapid")
- SecretRealm.recordMonsterDie(actor, mapId, monCfgId, monsterId)
- local mapInfo = getmapinfobyid(mapId)
- -- 指定地图增加经验倍率
- local map_exp_rate = ConfigDataManager.getTableValue("cfg_map_info", "exprate", "id", mapInfo.cfgid)
- if tonumber(map_exp_rate) > 0 then
- exp = exp * (1 + map_exp_rate / 100)
- end
- local newExp = LineManager.applyExpRate(actor, exp) -- 应用线路经验倍率 2025.08.23 拓展地图线路
- -- info(string.format('MS 经验衰减倍率 线路应用前为:%d 线路应用后为:%d', exp, newExp))
- -- 经验衰减倍率
- local decayRate = MonsterScript.GetExpDecayRate(actor, monCfgId)
- local finalExp = newExp * TripleIncome.GetRate(actor) * decayRate
- local expRate = 0
- -- 判断是不是副本
- if mapInfo["isdup"] == true then
- local dupInfo = getduplicate(mapId)
- local dupType = dupInfo["type"]
- if dupType == DuplicateType.DEVIL_SQUARE then
- DevilSquare.KillMonterInDevilSquare(actor, mapId, finalExp, monCfgId)
- elseif dupType == DuplicateType.BLOODY_CASTLE then
- BloodyCastle.KillMonterInBloodyCastle(actor, mapId, finalExp, monCfgId)
- elseif dupType == DuplicateType.ITEM_BOSS then
- ItemBoss.KillMonterInItemBoss(actor, mapId, finalExp, monCfgId)
- end
- else
- -- 如果不是副本,则加成世界等级
- expRate = Player.calWorldLevelExpRate(actor)
- end
- -- 如果组队 经验分配
- local list = API.GetRangeTeamList(actor, 15)
- if #list > 1 then
- local TeamExp = {}
- local expPre = 0
- -- 配置表加成经验万分比
- local CfgVal = ConfigDataManager.getTableValue("cfg_global", "value", "id", "260002")
- local items = string.split(CfgVal, "|")
- for index, item in pairs(items) do
- local Val = string.split(item, "#")
- if tonumber(Val[1]) == tonumber(#list) then
- expPre = tonumber(Val[2])
- break
- end
- end
- -- 职业加成
- local jobM = {}
- for i = 1, #list do
- local player = list[i]
- local career = getbaseinfo(player, "getbasecareer")
- jobM[career] = true
- end
- if jobM[1] and jobM[2] and jobM[3] then -- 战、法、弓
- expPre = expPre + 3000 -- 加成30%
- end
- -- 向上取整-- 计算每个队员获得的经验值
- finalExp = math.ceil(finalExp * (expPre / 10000 + 1) / #list)
- -- local rid = getbaseinfo(actor, "rid")
- for i = 1, #list do
- local act = list[i]
- -- 世界等级加成百分比 *100
- expRate = Player.calWorldLevelExpRate(act) * 100
- -- 经验药水加成属性万分比
- local attrValue = getplaydef(act, PlayerDefKey.player.EXP_BOOST_ATTR_VALUE) or 0
- local retVal = math.ceil(finalExp * (1 + (expRate + attrValue) / 10000))
- addroleexp(act, retVal)
- -- TeamExp[playerRid] = math.ceil(finalExp * (1 + expRate / 100))
- TaskHandler.TriggerTaskGoal(act, TaskTargetType.KILL_MONSTER_TEAM_SHARE, monCfgId)
- end
- return TeamExp
- end
- TaskHandler.TriggerTaskGoal(actor, TaskTargetType.KILL_MONSTER_TEAM_SHARE, monCfgId)
- -- finalExpSelfExt = math.ceil(finalExp * (expRate / 100.0))
- return math.ceil(finalExp * (1 + expRate / 100))
- end
- function getexpafter(actor, exp, fromType)
- if fromType == 2 then
- local mapId = getbaseinfo(actor, "unimapid")
- local dupInfo = getduplicate(mapId)
- if dupInfo ~= nil then
- local dupType = dupInfo["type"]
- if dupType == DuplicateType.DEVIL_SQUARE then
- DevilSquare.AddExp(actor, mapId, exp)
- elseif dupType == DuplicateType.BLOODY_CASTLE then
- BloodyCastle.AddExp(actor, mapId, exp)
- end
- end
- end
- end
- -- @description 玩家进入副本事件
- -- @param 玩家对象;地图唯一id;副本类型;副本阶段(1-准备 2-战斗 3-结算);下一阶段开始时间戳;配置id(cfg_rep的id)
- -- @return
- function afterenterduplicate(actor, mapId, dupType, state, nextStateStartTime, configId)
- if dupType == DuplicateType.DEVIL_SQUARE then
- -- 恶魔广场
- DevilSquare.AfterPlayerEnterDevilSquare(actor, mapId, state, nextStateStartTime, configId)
- elseif dupType == DuplicateType.BLOODY_CASTLE then
- -- 血色城堡
- BloodyCastle.AfterPlayerBloodyCaster(actor, mapId, state, nextStateStartTime, configId)
- elseif dupType == DuplicateType.BRAVE_TEST then
- -- 勇者试炼
- BraveTest.BraveTestEnter(actor, mapId, state, nextStateStartTime, configId)
- elseif dupType == DuplicateType.RED_FORTRESS then
- -- 赤色要塞
- -- 如果是变身状态,取消变身
- local notExpired = TransferCard.CheckTransfermationExpired(actor, false)
- if notExpired then
- TransferCard.ReqCancelTransfermation(actor)
- end
- RedFortress.AfterRedFortressEnter(actor, mapId, state, nextStateStartTime, configId)
- elseif dupType == DuplicateType.WAR_ALLIANCE then
- -- 战盟boss
- WarAlliance.AfterEnterWarAlliance(actor, mapId, state, nextStateStartTime, configId)
- elseif dupType == DuplicateType.PRIVILEGE_BOSS then
- -- 特权BOSS
- PrivilegeBoss.afterEnterPrivilegeBoss(actor, mapId, state, nextStateStartTime, configId)
- elseif dupType == DuplicateType.WOLF_SOUL then
- -- 狼魂要塞
- WolfSoul.AfterEnterWolfSoul(actor, mapId, state, nextStateStartTime, configId)
- elseif dupType == DuplicateType.COMBO_TEST then
- -- 连击试炼
- ComboTest.AfterEnterComboTest(actor, mapId, state, nextStateStartTime, configId)
- elseif dupType == DuplicateType.BIG_SECRET_REALM then
- -- 大秘境副本
- BigSecretRealm.AfterEnterBigSecretRealm(actor, mapId, state, nextStateStartTime, configId)
- elseif dupType == DuplicateType.ROLAND_SEIGE then
- -- 罗兰峡谷攻城战
- RolandSeige.AfterEnterRoland(actor, mapId, state, nextStateStartTime, configId)
- elseif dupType == DuplicateType.KUN_DUN then
- -- 昆顿
- KunDun.AfterEnterKunDun(actor, mapId, state, nextStateStartTime, configId)
- elseif dupType == DuplicateType.ITEM_BOSS then
- -- 道具boss
- ItemBoss.AfterEnterItemBoss(actor, mapId, state, nextStateStartTime, configId)
- elseif dupType == DuplicateType.WORLD_BOSS then
- WorldBoss.afterenterduplicate(actor, mapId, dupType, state, nextStateStartTime, configId)
- end
- -- 进入副本后 刷新战盟任务
- UnionTask.enterDuplicate(actor, configId)
- end
- -- @description 退出副本事件
- -- @param 玩家对象;地图唯一id;副本类型;副本阶段(1-准备 2-战斗 3-结算);下一阶段开始时间戳;配置id(cfg_rep的id)
- -- @return
- function afterquitduplicate(actor, mapId, dupType, state, nextStateStartTime, configId)
- sendluamsg(actor, LuaMessageIdToClient.RES_QUIT_DUPLICATE, configId)
- if dupType == DuplicateType.RED_FORTRESS then
- -- 赤色要塞
- RedFortress.AfterRedFortressQuit(actor, mapId, state, nextStateStartTime, configId)
- elseif dupType == DuplicateType.BRAVE_TEST then
- -- 勇者试炼
- BraveTest.onQuitDup(actor, configId)
- elseif dupType == DuplicateType.ROLAND_SEIGE then
- -- 罗兰攻城战
- RolandSeige.OnQuitDup(actor, mapId, state, nextStateStartTime, configId)
- end
- end
- -- @description 玩家进入地图事件(所有地图,包括普通地图)
- -- @param 玩家对象;上一个地图配置id;当前地图配置id
- -- @return
- function entermap(actor, lastMapCfgId, mapCfgId)
- gameDebug.debug(Player.enterMap, actor)
- gameDebug.debug(RankScript.updateOnline, actor, true)
- gameDebug.debug(TaskHandler.TriggerTaskGoal, actor, TaskTargetType.ENTER_MAP_LINE)
- gameDebug.debug(DevilSquare.EnterAllMapDS, actor, lastMapCfgId, mapCfgId)
- gameDebug.debug(BloodyCastle.EnterAllMapDS, actor, lastMapCfgId, mapCfgId)
- gameDebug.debug(SecretRealm.afterEnterSecretRealm, actor, lastMapCfgId, mapCfgId)
- gameDebug.debug(RedFortress.EnterAllMap, actor, lastMapCfgId, mapCfgId)
- gameDebug.debug(CrossMap.CheckEnterCrossMap, actor, lastMapCfgId, mapCfgId)
- gameDebug.debug(TaskHandler.sendTaskState, actor)
- gameDebug.debug(RoleAttr.enterMap, actor, mapCfgId)
- gameDebug.debug(onHook.enterMap, actor)
- end
- function leavemap(actor, reason)
- gameDebug.debug(HpMpRecover.record, actor)
- end
- -- @description 地图怪物死亡事件,此时怪物还未从副本中移除
- -- @param 系统对象;地图唯一id;击杀者对象;死亡怪物的配置id
- -- @return
- function mapmonsterdie(system, mapId, killer, monCfgId, monActor)
- -- 昆顿怪物死亡
- KunDun.MonsterDie(mapId, killer, monCfgId, monActor)
- -- 减少秘境挑战次数
- SecretRealm.reduceCount(killer, monCfgId, mapId)
- if table.getKey(CountDownMonsterIds, monCfgId) then
- setsysvar(monActor, "G$_monsterDieTime" .. tostring(monCfgId), os.time())
- end
- local mapInfo = getmapinfobyid(mapId)
- if mapInfo["isdup"] == true then
- -- 是副本
- local dupInfo = getduplicate(mapId)
- local dupType = dupInfo["type"]
- if dupType == DuplicateType.DEVIL_SQUARE then
- elseif dupType == DuplicateType.BLOODY_CASTLE then
- BloodyCastle.BloodyCastleOnMonsterDie(mapId, killer, monCfgId)
- elseif dupType == DuplicateType.BRAVE_TEST then
- BraveTest.BraveTestMonsterDie(mapId, killer, monCfgId, monActor)
- elseif dupType == DuplicateType.WAR_ALLIANCE then
- callonserial(killer, "waralliancemonsterdie", mapId, killer, monCfgId)
- elseif dupType == DuplicateType.PRIVILEGE_BOSS then
- PrivilegeBoss.PrivilegeBossMonsterDie(mapId, killer, monCfgId)
- elseif dupType == DuplicateType.COMBO_TEST then
- ComboTest.ComboTestMonsterDie(mapId, killer, monCfgId, monActor)
- elseif dupType == DuplicateType.BIG_SECRET_REALM then
- BigSecretRealm.BigSecretRealmMonsterDie(mapId, killer, monCfgId, monActor)
- end
- end
- end
- function waralliancemonsterdie(killer, mapId, acotr, monCfgId)
- WarAlliance.OnKillWarAllianceMonster(mapId, acotr, monCfgId)
- end
- -- @description 地图怪物死亡事件,此时怪物已经从副本中移除
- -- @param 系统对象;地图唯一id;击杀者对象;死亡怪物的配置id
- -- @return
- function mapmonsterremove(system, mapId, killer, monCfgId)
- local mapInfo = getmapinfobyid(mapId)
- if mapInfo["isdup"] == true then
- -- 是副本
- local dupInfo = getduplicate(mapId)
- local dupType = dupInfo["type"]
- if dupType == DuplicateType.RED_FORTRESS then
- RedFortress.OnMonsterDie(mapId, killer)
- elseif dupType == DuplicateType.WOLF_SOUL then
- WolfSoul.MapMonsterRemove(mapId, killer, monCfgId)
- elseif dupType == DuplicateType.ROLAND_SEIGE then
- RolandSeige.MapMonsterRemove(mapId, killer, monCfgId)
- elseif dupType == DuplicateType.WORLD_BOSS then
- WorldBoss.OnMonsterDie(mapId, killer, monCfgId)
- end
- end
- end
- -- @description 用药之后触发自动买药
- -- @param 玩家对象
- -- @return
- function autobuydrug(actor)
- -- 触发自动买药
- AutoBuyPotionScript.autoBuyPotions(actor)
- end
- ---跑马灯事件
- ---@param actor any 玩家对象
- ---@param stringId number cfg_string表配置id
- ---@param text string 跑马灯消息文本
- function horselampevent(actor, stringId, ...)
- noticeTip.noticeinfo(actor, stringId, ...)
- end
- -- 物品拾取前触发
- -- function pickupitemfrontex(actor, items)
- -- local pickItems = getplaydef(actor, "@" .. "HOOK_PICK_ITEMS") or {}
- -- if pickItems[items.objectid] then
- -- return nil
- -- end
- -- return {allow=false}
- -- end
- -- function pickupitemfrontex(actor, items)
- -- local allow = MonAtk.pickUpItem(actor, items)
- -- if allow ~= nil then
- -- return allow
- -- end
- -- local allow = Hook.pickUpItem(actor, items)
- -- if allow ~= nil then
- -- return allow
- -- end
- -- end
- function pickupitembefore(actor, items)
- -- 做每天获取金币总量限制
- -- for _, item in pairs(items) do
- -- local itemId = item["id"]
- -- if item["id"] == 10010001 then
- -- local enough, left_num = Player.GoldCountEnough(0)
- -- if enough then
- -- item["id"] = left_num
- -- else
- -- item["id"] = nil
- -- end
- -- break
- -- end
- -- end
- local allow = MonAtk.pickUpItem(actor, items)
- if allow ~= nil then
- return allow
- end
- local allow = Hook.pickUpItem(actor, items)
- if allow ~= nil then
- return allow
- end
- end
- -- 玩家拾取物品后
- function pickupitem(actor, cfgId)
- MonAtk.checkPickItemBroad(actor, cfgId)
- end
- -- 怪物死亡掉落物品
- function monsterdiedropitem(actor, data)
- MonAtk.monsterDieDrop(actor, data)
- end
- -- @description 背包变化事件
- -- @param 玩家对象 索引 放入或 取出
- -- @return
- function bagchange(actor, index, state)
- -- 取出物品触发自动买药
- if state == 0 then
- AutoBuyPotionScript.autoBuyPotions(actor)
- end
- end
- -- 玩家死亡
- function playdie(actor, dieInfo, killInfo)
- Pet.ClearPet(actor)
- BraveTest.playerDie(actor)
- ComboTest.playerDie(actor)
- RedFortress.PlayerDie(actor)
- Mail.playerDie(actor, dieInfo, killInfo)
- SecretRealm.playerDie(actor)
- pk.PlayerDie(actor, dieInfo, killInfo)
- end
- ---装备回收事件
- function recovery(actor, data, reward)
- ItemRecycling.recyclingRateReward(actor, reward)
- TaskHandler.TriggerTaskGoal(actor, TaskTargetType.RECOVERY, data)
- TaskHandler.TriggerTaskGoal(actor, TaskTargetType.RECOVERY_GET_APPOINT_ITEM, reward)
- end
- -- 获取经验事件
- function getexp(actor, exp, fromType, expAddRate)
- bubblePointGetExp(actor, exp, fromType, expAddRate)
- end
- function printTable(t, indent)
- indent = indent or 0
- local spaces = string.rep(" ", indent)
- for k, v in pairs(t) do
- if type(v) == "table" then
- print(spaces .. tostring(k) .. ":")
- printTable(v, indent + 4)
- else
- print(spaces .. tostring(k) .. " = " .. tostring(v))
- end
- end
- end
- ---攻击触发,攻击对象掉血之后触发
- function attack(actor, fightData)
- -- messagebox(actor,"玩家攻击")
- -- local caster = fightData["caster"]
- -- local target = fightData["target"]
- -- local mapId = fightData["mapid"]
- -- local skillLevel = fightData["skilllevel"]
- -- local casterType = fightData["castertype"]
- -- local targetType = fightData["targettype"]
- local targetHurt = fightData["targethurt"]
- -- for key, paramMap in pairs(fightData) do
- -- info("fightData key = " .. key )
- -- if key ~= "caster" and key ~= "target" then
- -- info("fightData value = " .. paramMap )
- -- end
- -- end
- -- local caster=fightData["caster"]
- -- printTable(fightData)
- -- local mapCfgId = fightData["mapcfgid"]
- -- local targetCfgId = fightData["targetcfgid"]
- -- Buffer.OnAttack(actor, fightData["target"])
- EquipGem.setSpeedBonus(actor)
- -- EquipGuard.guardHpChange(actor, targetHurt)
- if fightData.castertype == MapObjectType.PLAYER then
- KunDun.Attack(actor, fightData)
- PlayerFight.AttackTrigger(actor, fightData)
- -- 增加大天使装备经验
- AngelMajorEquipment.attack(actor, fightData)
- end
- RolandSeige.Attack(actor, fightData)
- -- EquipDurability.attack(actor, fightData)
- EquipDurability.attackCareer3(actor)
- WorldBoss.Attack(actor, fightData)
- end
- -- @description 玩家复活事件
- -- @param 玩家对象
- -- @return
- function revival(actor, type)
- RedFortress.PlayerRelive(actor)
- PrivilegeBoss.playerRelive(actor)
- WarAlliance.playerRelive(actor, type)
- RolandSeige.PlayerRelive(actor)
- AGAndSD.playerRelive(actor)
- end
- -- @description 不管大退,小退还是断开连接都会执行
- -- @param 玩家对象
- -- @return
- function quit(actor)
- DuplicateCommon.OfflineQuitGame(actor)
- -- Union.sendLeaderOnlineStateMsg(play)
- Chat.onQuitGame(actor)
- end
- -- 创建角色事件
- function creatrole(actor)
- RankScript.addNewRole(actor)
- end
- -- 玩家加入战盟前
- function guildaddmember(actor)
- -- UnionArmbands.onEnterUnion(actor)
- end
- function guildaddmemberafter(actor, union_id)
- UnionArmbands.onEnterUnion(actor)
- end
- -- 玩家退出战盟前
- function guilddelmemberbefore(actor)
- UnionArmbands.onQuitUnion(actor)
- UnionChangeLeader.clearRunForLeaderMember(actor)
- end
- ---通知刷新外置任务目标
- function updateexternaltaskgoal(actor, taskModule, taskId, type, goalId, goalCount, realParam)
- -- jprint("updateexternaltaskgoal", type, goalId, goalCount, realParam)
- local count = TaskGoal.FlushTaskCount(actor, type, goalId, goalCount, realParam)
- if count ~= goalCount then
- onlyupdatetaskgoal(actor, taskModule, taskId, goalId, count)
- end
- end
- -- 交易行预购成功
- function preoredrsuccess(actor, ownId, itemId)
- Trade.changeItemInfo(actor, ownId, itemId)
- end
- -- 充值事件
- function recharge(actor, rechargeData)
- Recharge.OnRecharge(actor, rechargeData)
- end
- -- 1秒心跳
- function rolesecondheart(actor)
- -- 秒级心跳尽量不要加东西
- PassiveSkill.RoleSecondHeart(actor)
- AGAndSD.onRoleseCond(actor)
- end
- -- 3秒心跳
- function role3secondheart(actor)
- TransferCard.CheckTransfermationExpired(actor, true)
- -- 玩家泡点
- SecondHeartBP(actor)
- -- 安全区buff
- Buffer.safetyAreaBuff(actor)
- -- 经验药水过期检测,防止角色退出,时间间隔函数失效
- ExpBoost.expBoostExpireCheck(actor)
- end
- -- 5秒心跳
- function role5secondheart(actor)
- -- 角色PK值处理
- pk.SecondHeartPkValue(actor)
- -- 玩家称号过期检查
- EquipAndAppear.checktitleovertime(actor)
- -- 玩家变身戒指过期检查
- EquipAndAppear.checkringovertime(actor)
- end
- -- 10秒心跳
- function role10secondheart(actor)
- -- 检测玩家特权卡过期
- PrivilegeCardScript.checkPrivilegeExpire(actor)
- -- 检测玩家月卡过期
- MonthCard.checkmonthcardtime(actor)
- -- 记录玩家离线挂机的最后时间
- onHook.recordLastTime(actor)
- TimeLimitGift.checkTimeLimitGiftTime(actor)
- end
- -- 分钟心跳
- function roleminuteheart(actor)
- local now = getbaseinfo("nowsec")
- local lastTime = now - 60
- if not TimeUtil.isSameDay(now, lastTime) then
- MonthCard.receivemonthcardthreetime(actor)
- end
- Mount.checkMountTime(actor)
- -- 装备耐久改为60秒扣一次
- EquipDurability.attackCost(actor)
- EquipDurability.underattackCost(actor)
- end
- -- 判断当前时间是否是每天的凌晨 主要用于每天凌晨的服务器数据刷新
- local function __isDayZero(seconds)
- local now = TimeUtil.timeToDate(seconds)
- -- 每小时调用一次,所有只需要判定小时就行不需要分钟
- return now.hour == 0
- end
- -- 小时心跳
- function rolehourheart(actor)
- DailyLotteryDraw.flushDailyLotteryDraw(actor)
- local seconds = getbaseinfo("nowsec")
- if __isDayZero(seconds) then
- -- 每天凌晨事件
- MonthCard.limitCount(actor, MonthCard.monthcardtype.DAY)
- ZeroEventListerTable:triggerEvent("0", actor)
- SevenLogin.midNightUpdate(actor)
- AngelWeapon.updateTaskInfo(actor)
- RechargeSevenReceive.midNightUpdate(actor)
- end
- if TimeUtil.isMondayZero(seconds) then
- -- 每周一凌晨事件
- MonthCard.limitCount(actor, MonthCard.monthcardtype.WEEK)
- end
- if TimeUtil.isMonthZero(seconds) then
- -- 每月1号凌晨事件
- MonthCard.limitCount(actor, MonthCard.monthcardtype.MONTH)
- end
- -- 连击试炼增加副本次数
- ComboTest.roleHourHeart(actor)
- ActMonthlyGrow.midNightUpdate(actor)
- end
- --- 活动次数重置后触发
- ---@param actor table 玩家对象
- ---@param activityId number 活动ID
- ---@param count number 重置后次数
- function afteractivitycountreset(actor, activityId, count)
- VipPrivilege.entryCountHandler(actor, activityId)
- end
- -- @description 脚本计算角色最终属性
- -- @param 玩家对象
- -- @return
- function calcplayfinalattr(actor)
- return RoleAttr.CalcPlayFinalAttr(actor)
- end
- -- @description 内置传送拦截事件,做自定义传送
- -- @param 玩家对象 当前x坐标 当前y坐标 原目标x坐标 原目标y坐标
- -- @return 拦截结果 {result= true,reason = "ttt", ignoreNotice = false}
- -- true标识拦截,执行脚本内逻辑,放弃原传送,false 标识放行,执行原传送; reason为拦截原因说明; ignoreNotice为是否忽略向客户端发送拦截提示,默认发送
- function customtotransmit(actor, targetMap, targetLine, currX, currY, x, y, fromMapMove)
- -- info("MS customtotransmit-> ", actor, targetMap, targetLine, currX, currY, x, y, fromMapMove)
- local checkResult, tip = LineManager.CheckCanEnterLineMap(actor, targetMap, targetLine)
- -- info(string.format("MS customtotransmit-> checkResult: %s", checkResult))
- if checkResult ~= nil and checkResult == false then
- -- tipinfo(actor, tip)
- return {result = true, reason = tip}
- end
- return CustomTransmit.CustomToTransmit(actor, targetMap, targetLine, currX, currY, x, y, fromMapMove)
- end
- -- 次事件触发的时候玩家还未进入地图,所以使用actor作为参数的命令还无法使用
- function enterscene(actor, srcMapId, targetMapId)
- local srcMapCfgId, _ = gamemap.parseMapKey(srcMapId)
- local targetMapCfgId, _ = gamemap.parseMapKey(targetMapId)
- -- jprint("玩家进入场景", actor, srcMapCfgId, targetMapCfgId)
- local srcServerType = ConfigDataManager.getTableValue("cfg_map_info", "servertype", "id", srcMapCfgId)
- local targetServerType = ConfigDataManager.getTableValue("cfg_map_info", "servertype", "id", targetMapCfgId)
- -- 从跨服进入本服的时候执行这个
- if srcServerType ~= nil and targetServerType ~= nil and srcServerType ~= targetServerType then
- if tonumber(targetServerType) == 1 then
- local x, y = CustomTransmit.GetPointFromMapMove(targetMapCfgId)
- return {
- x = x,
- y = y
- }
- end
- end
- return nil
- end
- --- 怪物死亡事件(掉落之前触发计算掉落道具)
- ---@param monsterActor table 怪物对象
- ---@param dieParam table 怪物死亡参数
- function monsterdiep(monsterActor, monsterCfgId, killerId, ownerId, maxHurtRid, mapId, mongenCfgId, dieParam)
- -- jprint("怪物死亡", monsterActor, dieParam)
- -- 怪物死亡触发活动、任务等功能数据更新
- MonsterScript.MonsterDieTrigger(monsterActor, dieParam)
- -- 计算怪物掉落道具
- local dropResult = MonsterScript.MonsterDieCulDrop(monsterActor, dieParam)
- return dropResult
- end
- -- 宠物召唤后触发
- function callpetafter(actor, petCfgId, petId)
- Pet.onCall(actor, petCfgId, petId)
- end
- --- 传送后事件
- function aftertransmit(actor)
- onHook.afterTransmit(actor)
- end
- ---物品进背包后触发
- ---@param actor 玩家对象
- ---@param itemId 道具唯一id
- ---@param itemCfgId 道具配置id
- ---@param index 背包索引
- function addbag(actor, itemId, itemCfgId, index)
- EquipAndAppear.ItemAdd(actor, itemId, itemCfgId)
- OpenServerAct.UpdateEquipFirstDropRank(actor, tonumber(itemCfgId))
- -- 大天使装备初始化成长属性
- AngelMajorEquipment.initAngelEquipmentAttr(actor, itemId, itemCfgId)
- -- 大秘境钥匙等级初始化
- BigSecretRealm.initKeyLevel(actor, itemCfgId)
- -- 大天使圣杯初始化
- AngelMajorGrail.initGrailEntry(actor, itemId, itemCfgId)
- EquipRandom.newItmToBag(actor, itemId, itemCfgId)
- end
- --- 战盟创建后触发,初始化战盟数据
- function loadguild(actor)
- UnionTask.onUnionCreate(actor)
- end
- --- 战盟解散后触发,清理战盟数据
- function guildclosebefore(actor)
- UnionTask.onUnionClose(actor)
- end
- function createmap(sys, uniqueMapId)
- local mapCfgId, mapLine = gamemap.parseMapKey(uniqueMapId)
- -- jprint("地图被创建", uniqueMapId, mapCfgId, mapLine)
- GameMapHeart.AddMap(uniqueMapId)
- end
- function destroymap(sys, uniqueMapId)
- local mapCfgId, mapLine = gamemap.parseMapKey(uniqueMapId)
- -- jprint("地图被销毁", uniqueMapId, mapCfgId, mapLine)
- GameMapHeart.RemoveMap(uniqueMapId)
- end
- function attrupdate(actor, mapobjecttype)
- if mapobjecttype == nil then
- mapobjecttype = getbaseinfo(actor, "mapobjecttype")
- end
- if mapobjecttype == MapObjectType.PLAYER then
- local attackSpeedBonus = getattrinfo(actor, "attackSpeedBonus")
- local attackSpeedBonusValue = attackSpeedBonus * 10000
- attackSpeedBonusValue = 10000 + attackSpeedBonusValue
- updateparam(actor, 4, attackSpeedBonusValue)
- elseif mapobjecttype == MapObjectType.MONSTER or mapobjecttype == MapObjectType.PET then
- local monsterMoveSpeed = getattrinfo(actor, "monsterMoveSpeed")
- if monsterMoveSpeed ~= 0 then
- local monInfo = getmonsterinfo(actor)
- if monInfo == nil then
- return
- end
- local monsterId = monInfo["cfgid"]
- local aiId = ConfigDataManager.getTableValue("cfg_monster", "ai", "id", monsterId)
- local strWalkTime = ConfigDataManager.getTableValue("cfg_monster_ai", "walktime", "id", aiId)
- if not string.isNullOrEmpty(strWalkTime) then
- local walkTime = tonumber(strWalkTime)
- -- monsterMoveSpeed 值是负数的
- local newWalkTime = walkTime - walkTime * monsterMoveSpeed
- -- jprint("monster attrupdate", monsterId, aiId, walkTime, newWalkTime)
- setmonsterwalktime(actor, newWalkTime)
- end
- end
- end
- end
- -- 角色删除后触发
- function afterdeleterole(actor)
- RankScript.removeRole(actor)
- UnionChangeLeader.clearRunForLeaderMember(actor)
- end
- -- 地图心跳事件,lua内部触发
- function lua_mapsecondheart(uniMapId, mapId)
- end
- -- 地图3秒心跳事件,lua内部触发
- function lua_map3secondheart(uniMapId, mapId)
- SecretRealm.UpdateHurtTopRank(uniMapId, mapId)
- end
- -- 地图5秒心跳事件,lua内部触发
- function lua_map5secondheart(uniMapId, mapId)
- end
- --- 离线挂机战斗获得经验事件
- ---@param actor 玩家对象
- ---@param exp 经验值
- function getofflineexp(actor, exp)
- onHook.saveOfflineFightExp(actor, exp)
- end
- -- 获取摆摊位置
- function stallmapinfo(actor, stallPosition)
- Stall.sendStallPosition(actor, stallPosition)
- end
- function buffeffect(targetActor, buffCfgId, casterActor, hurtTotal, targetTotal, layers)
- Buffer.buffeffect(targetActor, buffCfgId, layers, casterActor)
- PassiveSkill.BuffEffect(targetActor, casterActor, buffCfgId)
- end
- function bufflose(actor, buffCfgId)
- Buffer.bufflose(actor, buffCfgId)
- end
- --- 商城购买道具后触发
- function buymallgoodsafter(actor, is_success, goods_id, count)
- local SUCCESS_STATE = 1
- -- 触发任务刷新
- if tonumber(is_success) == SUCCESS_STATE then
- TaskHandler.TriggerTaskGoal(actor, TaskTargetType.MALL_BUY_GOODS, goods_id)
- local configShop = ConfigDataManager.getById("cfg_shopMall", goods_id)
- if configShop == nil then
- return
- end
- if configShop.countkey == nil or configShop.countkey == "" or tonumber(configShop.countkey) <= 0 then
- return
- end
- -- info("商城购买道具触发计数:id=" .. goods_id, "count=" .. count)
- CountManager.count(actor, configShop.countkey, count)
- end
- end
- --- 购买NPC商城道具后触发 is_success 是否购买成功,1:成功,0:失败 item_id 和 item_count在购买成功后才会返回
- function buynpcshopgoodsafter(actor, is_success, item_id, item_count)
- if tonumber(is_success) == 1 then
- TaskHandler.TriggerTaskGoal(actor, TaskTargetType.NPC_MALL_BUY_GOODS, item_id)
- end
- end
- --- 分配属性点后触发
- function afterdeployattrpoint(actor)
- TaskHandler.TriggerTaskGoal(actor, TaskTargetType.DEPLOY_ATTR_POINT, true)
- end
- -- 进入地图后初始化怪物
- function initmonster(monster, monsterCfgId)
- MonsterAttribute.Initmonster(monster, monsterCfgId)
- end
- function showgetrewardpanel(actor, items)
- sendluamsg(actor, LuaMessageIdToClient.COMMON_REWARD_PANEL, items)
- end
- -- function setcombovaluebefore(actor, skillCfgId, skillLevel, skill)
- -- return Skill.calculationComboValue(actor, skillCfgId, skillLevel, skill)
- -- end
- -- 内置任务状态改变
- function taskchange(actor, taskId, state, data)
- TaskHandler.onTaskChange(actor, taskId, state)
- end
- --- 销毁物品触发
- ---@param actor table 玩家对象
- ---@param cfgId number 道具配置id
- ---@param itemId number 道具唯一id
- function destroyitem(actor, cfgId, itemId)
- AngelMajorEquipment.destroyAngelEquip(actor, cfgId, itemId)
- AngelMajorGrail.destroyAngelGrail(actor, cfgId, itemId)
- end
- --- 怪物复活
- function monsterrelive(monster, monsterCfgId)
- SanctuaryBoss.monsterRelive(monster)
- MonsterAttribute.Initmonster(monster, monsterCfgId)
- initmonsterTip(monster, monsterCfgId)
- end
- --- 自动回收道具
- function autorecoverybefore(actor)
- return ItemRecycling.autoRecycling(actor)
- end
- -- 玩家设置改变
- function settingchange(actor, type, oldValue, value)
- gameDebug.debug(KunDun.FightModelChange, actor, type, value)
- RolandSeige.RolandSettingChange(actor, tonumber(type), tonumber(value))
- end
- --- 获取跨服玩家变量异步回调
- ---@param actor table 玩家对象
- ---@param varName string 变量名
- ---@param varValue string 变量值
- function getplaydefasyncres(actor, varName, varValue, params)
- -- jprint("获取其他服玩家数据", actor, varName, varValue, params)
- if string.equalsIgnoreCase(varName, PlayerDefKey.angel.ANGEL_EQUIPMENT_ATTR_DATA) then
- AngelMajorEquipment.sendPlayerAngelEquipInfo(actor, varValue, params)
- end
- end
- --- 世界聊天成功触发
- function worldchatsuccess(actor)
- -- jprint("世界聊天发送成功")
- sendluamsg(actor, LuaMessageIdToClient.RES_WORLD_CHAT_SUCCESS, true)
- end
- --- 外置聊天频道触发事件
- function outversionchatevent(actor, param)
- Chat.OutVersionChant(actor, param)
- end
- --- 技能升级事件
- function levelupskillevent(actor, skillInfo)
- info(skillInfo)
- Skill.levelUp(actor, skillInfo)
- end
- function clicknpc(actor, npcid)
- GameEvent.push(EventCfg.onClicknpc, actor, npcid)
- end
- function playerexitview(actor, playerid)
- local playerActor = getactor(playerid)
- local mapobjecttype = getbaseinfo(playerActor, "mapobjecttype")
- if mapobjecttype ~= MapObjectType.PLAYER then
- return
- end
- local ownerId = getbaseinfo(actor, "id")
- sendluamsg(
- actor,
- 10000500,
- {
- playerid = playerid
- }
- )
- sendluamsg(
- playerActor,
- 10000500,
- {
- playerid = ownerId
- }
- )
- end
- -- function beforetakeoncheckequip(actor,bagIndex,equipIndex)
- -- local itemInfo = getbagiteminfo(actor,bagIndex,0)
- -- local itemId = itemInfo.id
- -- messagebox(actor,"itemId="..itemId)
- -- messagebox(actor,"bagIndex="..bagIndex)
- -- if not Equip_QiangHua.checkTakeOnNeed(actor,itemId) then
- -- messagebox(actor,"属性不足,无法穿戴!")
- -- return true
- -- end
- -- return false
- -- -- return true
- -- end
- function filtertakeonequip(actor, msgData)
- local bagIndex = msgData.bagindex
- local itemInfo = getbagiteminfo(actor, bagIndex, 0)
- if itemInfo == nil then
- return
- end
- local itemId = itemInfo.id
- if not Equip_QiangHua.checkTakeOnNeed(actor, itemId) then
- messagebox(actor, "属性不足穿戴失败")
- return false
- end
- local pos = msgData.pos
- local career = getbaseinfo(actor, "getbasecareer")
- local isPart = ConfigDataManager.getTableValue("cfg_character_create", "isPart", "id", career)
- -- 副手装备
- if pos == 2 and (isPart and isPart ~= "") then
- local equipField = ConfigDataManager.getTableValue("cfg_item", "field", "id", itemInfo.cfgid)
- local equipPart = ConfigDataManager.getTableValue("cfg_model_charactor", "part", "id", equipField)
- -- local config = ConfigDataManager.getById("cfg_item", itemId)
- -- local config = ConfigDataManager.getById("cfg_model_charactor", itemId)
- -- if isPart ~= tonumber(config['subtype']) then
- if tonumber(isPart) ~= tonumber(equipPart) then
- messagebox(actor, "条件不符,穿戴失败")
- return false
- end
- end
- return true
- end
- function initmonsterTip(actor, monsterId)
- local bossName = ConfigDataManager.getTableValue("cfg_monster", "name", "id", monsterId)
- local bossType = ConfigDataManager.getTableValue("cfg_monster", "type", "id", monsterId)
- local mapId = getbaseinfo(actor, "mapid")
- local mapName = ConfigDataManager.getTableValue("cfg_map_info", "mapname", "id", mapId)
- if tonumber(bossType) == 3 then -- 只有BOSS才通知
- noticeTip.noticeinfo(actor, StringIdConst.TEXT35005, bossName, mapName)
- end
- end
- -- @description 货币变化事件
- -- 参数说明:actor 玩家对象;cfgId 物品配置id 原来数量 现在数量
- function moneychangex(actor, cfgId, oldCount, newCount)
- -- info("moneychangex-> ", actor, cfgId, oldCount, newCount)
- callonserial(actor, "_savemoneydata", cfgId, newCount)
- end
- -- 保存货币数据
- function _savemoneydata(actor, cfgId, newCount)
- -- info("savemoneydata-> ", actor, cfgId, newCount)
- local uid = getbaseinfo(actor, "uid")
- local mData = getsysvar(actor, "R$MoneyData_" .. uid) or {}
- if mData[cfgId] ~= nil and newCount then
- mData[cfgId] = newCount
- setsysvar(actor, "R$MoneyData_" .. uid, mData)
- end
- end
- -- function triggerchat(actor,table)
- -- -- local actor1 = getactor(table.senderid)
- -- -- local name = getbaseinfo(actor1, "rolename")
- -- -- local rid = getbaseinfo(actor1, "rid")
- -- local uid = getbaseinfo(actor, "uid")
- -- local DataTab = {}
- -- local data = string.split(table.content, "#")
- -- if #data >= 2 then
- -- local cmd = data[1]
- -- local itemId = tonumber(data[2])
- -- -- local itemCount = tonumber(data[3]) or 1
- -- if cmd == "additem" then
- -- additemtobag(actor, itemId, 1)
- -- elseif cmd == "in" then
- -- gset(actor, "G@DePots", uid, DataTab)
- -- elseif cmd == "out" then
- -- end
- -- end
- -- end
|