| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325 |
- local Config = require("Config")
- local Util = require("common.Util")
- local Log = require("common.Log")
- local Msg = require("core.Msg")
- local ObjHuman = require("core.ObjHuman")
- local BagLogic = require("bag.BagLogic")
- local Broadcast = require("broadcast.Broadcast")
- local InnerMsg = require("core.InnerMsg")
- local CommonDB = require("common.CommonDB")
- local JjcDB = require("jjc.JjcDB")
- local VipLogic = require("vip.VipLogic")
- local VipExcel = require("excel.vip")
- local GMExcel = require("excel.gm")
- local RoleLogic = require("role.RoleLogic")
- local UnionDBLogic = require("union.UnionDBLogic")
- local CombatPosLogic = require("combat.CombatPosLogic")
- local CombatDefine = require("combat.CombatDefine")
- local ItemDefine = require("bag.ItemDefine")
- local MiddleConnect = require("middle.MiddleConnect")
- local BuyLogic = require("topup.BuyLogic")
- local WeekendLoopActManger = require("WeekendLoopActivity.WeekendLoopActManager")
- local RecommendLineup = require("drawCard.RecommendLineup")
- local NewFirstCharge = require("present.NewFirstChargeLogic")
- local ActPowerUp = require("present.OpenServerActPowerUp")
- local FestivalSevenDayCardLogic = require("absAct.FestivalSevenDayCardLogic")
- local TreasureChestLogic = require("treasurechest.TreasureChestLogic")
- local MaiDianLogic = require("MaiDian.MaiDianLogic")
- local CommerceManger = require("serverCommerce.ServerCommerceManager")
- local CommonDefine = require("common.CommonDefine")
- local winner = require("winnerRelic.WinnerRelicLogic")
- local day = require("dailyTask.DailyTaskLogic")
- local week = require("dailyTask.WeekTaskLogic")
- local honor = require("dailyTask.HonorJourney")
- local QQBigShot = require("platform.QQBigShot")
- local MergeServerCharge = require("present.MergeServerCharge")
- local HeroTable = require("excel.hero").hero
- d3 = {}
- local function send(human, err)
- local mm = Msg.gc.GC_CHAT
- mm.item.msgType = 3
- mm.item.targetUuid = ""
- mm.item.sendTime = os.time()
- mm.item.msg = tostring(err)
- mm.item.vipLv = human.db.vipLv or 0
- mm.item.videoUuid = ""
- mm.item.isJson = 0
- mm.item.unionFrame = 0
- local union = {}
- if human.db.unionUuid ~= nil then
- union = UnionDBLogic.getUnion(human.db.unionUuid)
- end
- RoleLogic.getRoleBase(human,mm.item.roleBase)
- mm.item.label = human.db.throneLabel or 0
- Msg.send(mm, human.fd)
- end
- -- 直接调用gm命令
- function execGm(human, cmd,pos)
- print("直接调用gm命令",cmd,pos)
- --Log.write(Log.LOGID_OSS_GM_CODE, human.db._id, human.db.account, human.db.name, cmd, pos)
- Log.write(Log.LOGID_OSS_GM_CODE, human.db._id, human.db.newUniqueTag, human.db.name, cmd, pos)
- d3[cmd](human, tonumber(pos) or pos)
- return true
- end
- function checkGm(human, str)
- if not Config.IS_USE_GM_CMD and human.db.gm == nil then
- return
- end
- local pos = string.find(str, " ", 1, true)
- local cmd = string.sub(str, 1, pos and pos - 1)
-
- if not Config.IS_USE_GM_CMD then
- if human.db.gm == 1 and not GmControl[cmd] then -- 一级权限的gm只能使用部分gm命令
- send(human, "not permit for this gm cmd!")
- return true
- end
- if human.db.gm == 100 then -- 新手引导员不能使用gm命令
- return
- end
- end
- if not d3[cmd] then
- return
- end
- local arg = string.sub(str, #cmd + 2)
- --Log.write(Log.LOGID_OSS_GM_CODE, human.db._id, human.db.account, human.db.name, cmd, arg)
- Log.write(Log.LOGID_OSS_GM_CODE, human.db._id, human.db.newUniqueTag, human.db.name, cmd, arg)
-
- d3[cmd](human, tonumber(arg) or arg)
- return true
- end
- function d3.heroadd(human,val)
- if val == nil then return end
- local tb = Util.split(val, " ")
-
- local id = tonumber(tb[1])
- local cnt = tonumber(tb[2])
- local lv = tonumber(tb[3])
- local star = tonumber(tb[4])
- if not (id and cnt) then return end
- for i = 1, cnt do
- local heroGrid = require("hero.HeroGrid").createHeroGrid(id , star)
- if not heroGrid then break end
-
- local skinLogic = require("skin.SkinLogic")
- local skinOn = skinLogic.checkHeroSkinById(human,id)
- if skinOn then
- heroGrid.skinOn = skinOn
- end
- local attrConfig = require("hero.HeroDefine").getAttrConfig(id, heroGrid.star)
- if not attrConfig then return end
- local quality = require("hero.HeroGrid").getMaxQualityByLv(heroGrid.star, lv)
- local maxLv = require("hero.HeroGrid").getMaxLv(heroGrid.star, quality)
- heroGrid.lv = math.min(maxLv, lv or 0)
- heroGrid.quality = math.max(heroGrid.quality, quality or 0)
- require("hero.HeroLogic").addHeroByGrid(human, heroGrid, "gm")
- end
- end
- function d3.herodel(human,val)
- if val == nil then return end
- local pos = string.find(val, " ", 1, true)
- if pos == nil then return end
-
- local index = tonumber(string.sub(val, 1, pos - 1))
- local cnt= tonumber(string.sub(val,pos+1,#val))
- require("hero.HeroLogic").delHeroByIndex(human,index,"gm")
- end
- function d3.herodelAll(human,val)
- for index = 1, human.db.heroBag[0]do
- require("hero.HeroLogic").delHeroByIndex(human,index,"gm")
- end
- end
- function d3.itemadd(human,val)
- if val == nil then return end
- local pos = string.find(val, " ", 1, true)
- if pos == nil then return end
- local id = tonumber(string.sub(val, 1, pos - 1))
- if not id then
- local name = string.sub(val, 1, pos - 1)
- local ItemExcel = require("excel.item").item
- for k,v in pairs(ItemExcel) do
- if v.name == name then
- id = k
- break
- end
- end
- end
- if not id then
- local name = string.sub(val,1,pos - 1)
- local EquipExcel = require("excel.equip").equip
- for k,v in pairs(EquipExcel) do
- if v.name == name then
- id = k
- break
- end
- end
- end
- if not id then
- return
- end
- local EquipExcel = require("excel.equip").equip
- if EquipExcel[id] then
- local cnt= tonumber(string.sub(val,pos+1,pos + 2))
- local rare= tonumber(string.sub(val,pos+2,#val))
- require("bag.BagLogic").addItem(human, id, cnt, "gm", nil, rare)
- human.getEquip = nil
- else
- -- 分开是因为 常规道具 给不了
- local cnt= tonumber(string.sub(val,pos+1,#val))
- print("[itemadd] id, cnt = ", id, cnt)
- require("bag.BagLogic").addItem(human,id,cnt,"gm")
- end
-
- end
- -- 删除道具
- function d3.itemdel(human,val)
- if val == nil then return end
- local pos = string.find(val, " ", 1, true)
- if pos == nil then return end
-
- local id = tonumber(string.sub(val, 1, pos - 1))
- local cnt= tonumber(string.sub(val,pos+1,#val))
- require("bag.BagLogic").delItem(human,id,cnt,"gm")
- end
- function d3.qingbaoMax(human)
- require("bar.BarTaskLogic").addBarQingBao(human, 10000)
- end
- function d3.maxbattle(human, val)
- val = val + 0
-
- human.db.battleID = val
- human.db.guajiID = val - 1
- local BRoleLogic = require("billboard.BRoleLogic")
- local BillboardDefine = require("billboard.BillboardDefine")
- BRoleLogic.updateData(BillboardDefine.TYPE_BATTLE, human.db)
- end
- function d3.dbsave(human)
- ObjHuman.save(human)
- end
- -- 设置当前金币
- function d3.jinbi(human, val)
- val = val + 0
- ObjHuman.updateJinbi(human, val - human.db.jinbi, "gm")
- end
- -- 设置钻石
- function d3.zuanshi(human, val)
- val = val + 0
-
- if val > human.db.zuanshi then
- print("234234234",val)
- ObjHuman.addZuanshi(human, val - human.db.zuanshi, "gm")
- else
- ObjHuman.decZuanshi(human, val - human.db.zuanshi, "gm")
- end
- end
- --添加邮件
- function d3.mail(human,val)
- local param = Util.split(val, " ")
- local mailtype = tonumber(param[1])
- local title = param[2]
- local content = param[3]
- local max = #param
- local count = (type(param[max]) == "number") and param[max] or 1
- local items
- if param[4] then
- items = {}
- for i = 4,max-1 do
- items[#items + 1] = {tonumber(param[i]),math.floor(math.random(1,10))}
- end
- end
- if not (mailtype == 1 or mailtype == 2) or not title or not content then
- send(human, "参数错误 "..type.." "..title.." "..content.." "..#items)
- end
- local MailManager = require("mail.MailManager")
- for i= 1,count do
- MailManager.add(mailtype,human.db._id,title,content,items,mailtype == 2 and [[测试用户]])
- end
- end
- function d3.clbag(human)
- human.db.bag = {}
- local msgRet = Msg.gc.GC_BAG_LIST
- msgRet.list[0] = 0
- Msg.send(msgRet, human.fd)
- end
- function d3.clhero(human)
- local HeroLogic = require("hero.HeroLogic")
- for i = 1, human.db.heroBag[0] do
- HeroLogic.delHeroByIndex(human, i, "gm")
- end
- end
- function d3.god(human)
- local GMExcelConfig = GMExcel.god[1]
- BagLogic.addItemList(human, GMExcelConfig.addItem, "gm")
- for k, v in ipairs(GMExcelConfig.addHero) do
- local id = tonumber(v[1])
- local cnt = tonumber(v[2])
- local lv = tonumber(v[3])
- local star = tonumber(v[4])
- local quality = require("hero.HeroGrid").getMaxQualityByLv(star, lv)
- for i = 1, cnt do
- local heroGrid = require("hero.HeroGrid").createHeroGrid(id, star)
- if heroGrid then
- heroGrid.lv = math.max(heroGrid.lv, lv or 0)
- heroGrid.quality = math.max(heroGrid.quality, quality or 0)
- require("hero.HeroLogic").addHeroByGrid(human, heroGrid, "gm")
- end
- end
- end
-
- --d3.viplv(human, 13)
- --d3.lv(human, 1)
- --d3.noguide(human)
- end
- function d3.wudi(human)
- if wudi then
- wudi = false
- Broadcast.sendErr(human, "取消无敌状态")
- else
- wudi = true
- Broadcast.sendErr(human, "进入无敌状态")
- end
- end
- -- 清空副本次数和购买次数
- function d3.clcopy(human)
- human.db.copy = nil
- end
- -- 设置等级
- function d3.lv(human, val)
- val = val + 0
- local lvOld = human.db.lv
- local lvNew = val + 0
- human.db.lv = lvNew
-
- ObjHuman.onLvUpCB(human,lvOld , lvNew)
- end
- -- 加经验
- function d3.addexp(human, val)
- val = val + 0
- ObjHuman.addExp(human, val)
- end
- -- 设置vip等级
- function d3.viplv(human, val)
- val = val + 0
-
- local oldVipLv = VipLogic.getVipLv(human)
-
- human.db.vipExp = VipExcel.vip[val] and VipExcel.vip[val].exp or 0
- human.db.vipLv = val
- VipLogic.addExp(human, 0)
- end
- -- 增加vip经验
- function d3.vipexp(human, val)
- val = val + 0
- VipLogic.addExp(human, val)
- end
- function d3.it1(human, value)
- value = tonumber(value)
- if not value then return end
- local ItemExcel = require("excel.item").item
- local BagLogic = require("bag.BagLogic")
- for itemID, cf in pairs(ItemExcel) do
- if cf.subType == value then
- BagLogic.addItem(human, itemID, 1, "gm", true)
- end
- end
- BagLogic.sendBagList(human)
- end
- function d3.equip(human, value)
- value = tonumber(value)
- if not value then return end
- local BagLogic = require("bag.BagLogic")
- local EquipExcel = require("excel.equip").equip
- for itemID in pairs(EquipExcel) do
- BagLogic.addItem(human, itemID, 1, "gm", true)
- end
- BagLogic.sendBagList(human)
- end
- function d3.task(human, val)
- if val == nil then return end
- local task = string.find(val, " ", 1, true)
- if task == nil then return end
-
- local id = tonumber(string.sub(val, 1, task - 1))
- local cnt= tonumber(string.sub(val,task+1,#val))
-
- local DailyTaskLogic = require("dailyTask.DailyTaskLogic")
- DailyTaskLogic.recordDailyTaskFinishCnt(human, id, cnt, nil)
- end
- function d3.os(human, value)
- value = value and tonumber(value)
-
- if value == nil then
- local openSvrTime = CommonDB.getServerOpenTime()
- if openSvrTime == 0 then
- Broadcast.sendErr(human, "未设置开服时间")
- else
- local tb = os.date("%Y%m%d", openSvrTime)
- Broadcast.sendErr(human, "当前开服时间为" .. tb)
- end
- else
- local now = os.time()
- local temp = Util.getDayStartTime(now)
- temp = temp - (value - 1) * 24 * 3600
-
- CommonDB.setServerOpenTime(temp)
-
- local tb = os.date("%Y%m%d", temp)
- Broadcast.sendErr(human, "设置当前开服时间为" .. tb)
-
- --同步中心服开服时间
- --[[local msgRet = InnerMsg.lw.LW_OS
- msgRet.uuid = human.db._id
- msgRet.value = temp
- InnerMsg.sendMsg(0, msgRet)]]
- end
- end
- function d3.createtime(human, value)
- value = value and tonumber(value)
- if not value then return end
- local now = os.time()
- local temp = Util.getDayStartTime(now)
- temp = temp - (value - 1) * 24 * 3600
- human.db.createTime = temp
-
- local tb = os.date("%Y%m%d", temp)
- Broadcast.sendErr(human, "设置当前创角时间为" .. tb)
- end
- --设置中心服开服时间
- function d3.osw(human, value)
- value = value and tonumber(value)
-
- local msgRet = InnerMsg.lw.LW_OS
- msgRet.uuid = human.db._id
- msgRet.value = value
- InnerMsg.sendMsg(0, msgRet)
- end
- function d3.chengjiu(human,val)
- local param = Util.split(val, " ")
- local ChengjiuLogic = require("chengjiu.ChengjiuLogic")
- ChengjiuLogic.onCallback(human,3,3,4)
- end
- function d3.cjcl(human)
- local ChengjiuLogic = require("chengjiu.ChengjiuLogic")
- ChengjiuLogic.GM_ClearAllData(human)
- end
- function d3.jjczero()
- local JjcLogic = require("jjc.JjcLogic")
- JjcLogic.onZero()
- end
- function d3.jjcreset()
- JjcDB.resetJJCDB()
- end
- function d3.jpSet(human,val)
- local point = tonumber(val)
- JjcDB.updatePlayerPoint(human.db._id, point, nil)
- end
- function d3.billboard(human)
- local BillboardDB = require("billboard.BillboardDB")
- BillboardDB.sort()
- end
- function d3.cldjs(human)
- human.db.jinbiExchange = nil
- end
- -- 激活钻石基金
- function d3.fund(human, val)
- local type = tonumber(val)
- local FundLogic = require("present.FundLogic")
- FundLogic.fundBuy(human, type)
- end
- -- 清空钻石基金购买和发放记录
- function d3.clfund(human)
- human.db.fundFlag = nil
- end
- function d3.clbuy(human)
- human.db.buy = {}
- end
- --增加好战者计数 仅限竞技场和试炼
- function d3.hzzadd(human, val)
- if val == nil then return end
- local pos = string.find(val, " ", 1, true)
- if pos == nil then return end
-
- local type = tonumber(string.sub(val, 1, pos - 1))
- local add= tonumber(string.sub(val,pos+1,#val))
- local MonthHzz = require("monthAct.MonthHzz")
- if type == MonthHzz.MONTHACT_HZZ_TYPE_1 then
- MonthHzz.addJjcFight(human, nil, add)
- elseif type == MonthHzz.MONTHACT_HZZ_TYPE_2 then
- MonthHzz.addTrialCnt(human, nil, add)
- end
- end
- function d3.ydjiuguan(human, val)
- if val == nil then return end
- local pos = string.find(val, " ", 1, true)
- if pos == nil then return end
- local star = tonumber(string.sub(val, 1, pos - 1))
- local add= tonumber(string.sub(val,pos+1,#val))
- local MonthDrunkery = require("monthAct.MonthDrunkery")
- MonthDrunkery.addDrunkCntEx(human, star, add)
- end
- function d3.ydhcjx(human, val)
- if val == nil then return end
- local param = Util.split(val, " ")
- local type = tonumber(param[1])
- local heroId= tonumber(param[2])
- local add = tonumber(param[3])
- local MonthHecJuex = require("monthAct.MonthHecJuex")
- MonthHecJuex.addCntByGm(human,type,heroId, add)
- end
- function d3.clboss(human)
- local DB = require("common.DB")
- local LuaMongo = _G.lua_mongo
- LuaMongo.remove(DB.db_boss)
- end
- function d3.clwish(human)
- human.db.wishCnt = nil
- human.db.wishActAlrCnt = nil
- end
- -- 设置高抽次数
- function d3.hsum(human,val)
- human.db.summonCnt = val
- end
- function d3.clhsum(human)
- human.db.summonCnt = nil
- human.db.sumWinScoCnt = nil
- end
- function d3.unionquery(human,val)
- local name = val
- local UnionLogic = require("union.UnionLogic")
- UnionLogic.createUnion(human,name)
- end
- function d3.uniondonate(human, value)
- local UnionDBLogic = require("union.UnionDBLogic")
- local union = UnionDBLogic.getUnion(human.db.unionUuid)
- if union == nil then
- return
- end
- union.donate = union.donate or {}
- union.donate[1] = value
- union.donate[2] = os.time()
- UnionDBLogic.updateUnionData(union)
- end
- function d3.settower(human,val)
- local HuanjingTowerLogic = require("huanjingTower.HuanjingTowerLogic")
- HuanjingTowerLogic.setTowerByGm(human, val)
- end
- function d3.setbattle(human,val)
- local BattleLogic = require("battle.BattleLogic")
- local param = Util.split(val, " ")
- BattleLogic.setBattleByGm(human, param[1], param[2])
- end
- function d3.clattr(human)
- local BattleLogic = require("battle.BattleLogic")
- BattleLogic.GM_ClearNowModelAttrData(human)
- end
- function d3.overmonth(human, val)
- val = math.max(tonumber(val) or 0, 10)
- human.db.actMonthEndTime = os.time() + val
- end
- function d3.zhuanpantime(human,val)
- local param = Util.split(val, " ")
- local ZhuanpanLogic = require("zhuanpan.ZhuanpanLogic")
- ZhuanpanLogic.zhuanpanByGm(human, tonumber(param[1]), tonumber(param[2]) )
- end
- function d3.signin(human,val)
- human.db.signInCnt = val
- for i =1,human.db.signInCnt do
- human.db.signIn[i] = 1
- end
- end
- function d3.unionLv(human, val)
- val = tonumber(val)
- if not val then return end
- local UnionDBLogic = require("union.UnionDBLogic")
- local union = UnionDBLogic.getUnion(human.db.unionUuid)
- if not union then return end
- UnionDBLogic.upsetUnionData(union._id, "lv", val)
- UnionDBLogic.upsetUnionData(union._id, "exp", 0)
- end
- function d3.unionexp(human, val)
- val = tonumber(val)
- if not val then return end
- local UnionDBLogic = require("union.UnionDBLogic")
- local UnionLogic = require("union.UnionLogic")
- local union = UnionDBLogic.getUnion(human.db.unionUuid)
- if not union then return end
- UnionLogic.addUnionExp(union, val)
- UnionDBLogic.updateUnionData(union)
- end
- function d3.gws(human,val)
- local LoginSignLogic = require("loginSign.LoginSignLogic")
- for i = 1,val do
- LoginSignLogic.getReward(human)
- end
- end
- function d3.tsht(human)
- local AdminLogic = require("AdminLogic")
- local JsonInput = {}
- JsonInput.accountName = human.db.account
- JsonInput.roleName = human.db.name
- AdminLogic.adminFunction.getuserstatus(JsonInput)
- end
- function d3.bs(human,val)
- local param = Util.split(val, " ")
- local AdminLogic = require("AdminLogic")
- local JsonInput = {}
- JsonInput.account = human.db.account
- JsonInput.minute = param[1]
- JsonInput.reason = param[2]
- AdminLogic.adminFunction.banSay(JsonInput)
- end
- function d3.bl(human,val)
- local AdminLogic = require("AdminLogic")
- local JsonInput = {}
- JsonInput.accountName = human.db.account
- JsonInput.minute = val
- AdminLogic.adminFunction.banAccount(JsonInput)
- end
- function d3.bl2(human,val)
- local AdminLogic = require("AdminLogic")
-
- local param = Util.split(val, " ")
- local JsonInput = {}
- JsonInput.accountName = param[1]
- JsonInput.minute = tonumber(param[2])
- AdminLogic.adminFunction.banAccount(JsonInput)
- end
- function d3.cbl(human,val)
- local param = Util.split(val, " ")
- local AdminLogic = require("AdminLogic")
- local JsonInput = {}
- JsonInput.accountName = param[1]
- JsonInput.cancelBanSay = param[2]
- AdminLogic.adminFunction.cancelBanAccount(JsonInput)
- end
- function d3.bip(human,val)
- local param = Util.split(val, " ")
- local AdminLogic = require("AdminLogic")
- local JsonInput = {}
- JsonInput.IP = param[1]
- JsonInput.banTime = param[2]
- AdminLogic.adminFunction.banIp(JsonInput)
- end
- function d3.ursc(human)
- human.db.ectypeCnt = nil
- human.db.ectypeFreeTime = nil
- end
- function d3.sue(human,val)
- local newLevel = tonumber(val)
- if not newLevel then return end
- local UnionDBLogic = require("union.UnionDBLogic")
- local union = UnionDBLogic.getUnion(human.db.unionUuid)
- if not union then return end
- UnionDBLogic.updateBossLv(union,newLevel)
- end
- function d3.smtp(human,val)
- local param = Util.split(val, " ")
- local AdminLogic = require("AdminLogic")
- local JsonInput = {}
- JsonInput.recvType = 3
- JsonInput.title = param[1]
- JsonInput.content = param[2]
- JsonInput.fbAccount = param[3]
- JsonInput.senderName = "系统邮件"
- JsonInput.fbTime = os.time()
- JsonInput.fbContent = "反馈"
- JsonInput.startLv =0
- JsonInput.endLv = 51
- JsonInput.lastLoginTime = os.time() - 60*60
- AdminLogic.adminFunction.mail(JsonInput)
- end
- function d3.clmilltime(human)
- human.db.unionTaskGetTime = nil
- end
- function d3.tstx(human,val)
- local RoleHeadLogic = require("role.RoleHeadLogic")
- RoleHeadLogic.active(human, RoleHeadLogic.HEAD_TYPE_1, val)
- end
- function d3.tstxk(human,val)
- local RoleHeadLogic = require("role.RoleHeadLogic")
- RoleHeadLogic.active(human, RoleHeadLogic.HEAD_TYPE_2, val)
- end
- function d3.buy(human,val)
- local AdminLogic = require("AdminLogic")
- local PlatformHandler = require("platform.Handler")
- local ApiLogic = require("platform.ApiLogic")
- local BuyExcel = require("excel.buy")
- local buyConf = BuyExcel.buy[val]
- if not buyConf then return end
- local shopConf = BuyExcel.topup[val]
- if shopConf and shopConf.buyID == val then
-
- else
- shopConf = nil
- end
-
- local checkMoney = buyConf["CN"]
- if human.phpChanelID and table.find(CommonDefine.SEA_CHANNEL_ARR, human.phpChanelID) then
- checkMoney = buyConf["US"]
- end
-
- local msg = {}
- msg.logintype = 2
- msg.openid = "oCD-L5RxAtfRe8-aiezdY-Ccla5U"
- msg.openkey = "VsBJf2DKah7QhzU5xuzLNA=="
- msg.yuanbao = shopConf and shopConf.cnt or buyConf.CN * 10
- msg.buyID = val
- msg.account = human.db.account
- msg.transaction_id = "transaction_id1"
- msg.pf = "android"
- msg.money = checkMoney
- ApiLogic.CHARGE_CODE_HIS = {}
- print("cccc:",val)
- local buyData = {buyID = val, price = checkMoney}
- BuyLogic.buy(human, buyData)
- --PlatformHandler.CG_TENCENT_BUY(human,msg)
- --AdminLogic.adminFunction.tencentPay(msg)
- end
- function d3.buyCharge(human, val)
- local BuyExcel = require("excel.buy")
- local buyConf = BuyExcel.buy[val]
- if not buyConf then
- return
- end
- local tOJsonInput = {}
- tOJsonInput.buyID = buyConf.id
- tOJsonInput.price = buyConf.CN
- tOJsonInput.money = buyConf.CN
- BuyLogic.charge(human, tOJsonInput)
- end
- function d3.gol(human)
- local AdminLogic = require("AdminLogic")
- AdminLogic.adminFunction.getonlinelist()
- end
- function d3.htm(human,val)
- local AdminLogic = require("AdminLogic")
- local oJsonInput = {}
- oJsonInput.recvType = val -- 邮件类型
- oJsonInput.title = "111" -- 邮件标题
- oJsonInput.content = "222" -- 邮件内容
- oJsonInput.items = nil -- 道具列表 可以为空
- oJsonInput.accounts = nil -- 指定玩家列表
- oJsonInput.startLv = 0
- oJsonInput.endLv = 200
- AdminLogic.adminFunction.mail(oJsonInput)
- end
- function d3.cluwar(human)
- require("union.UnionWarLogic").cleanUnionWar()
- local msg = InnerMsg.lw.LW_GM
- msg.gm = "cluwarmiddle"
- InnerMsg.sendMsg(0, msg)
- end
- function d3.cluniontime(human)
- human.db.unionJoinTime = nil
- end
- function d3.cluwarmiddle()
- local LuaMongo = _G.lua_mongo
- local DB = require("common.DB")
- LuaMongo.remove(DB.db_union_war)
- end
- function d3.uwarstart()
- -- 需要周1、3、5使用
- local UnionWarLogic = require("union.UnionWarLogic")
- UnionWarLogic.cleanUnionWar()
- local msg = InnerMsg.lw.LW_GM
- msg.gm = "cluwarmiddle"
- InnerMsg.sendMsg(0, msg)
- UnionWarLogic.onHour(0)
- UnionWarLogic.onHour(1)
- local msg = InnerMsg.lw.LW_GM
- msg.gm = "uwarstartmiddle"
- InnerMsg.sendMsg(0, msg)
- end
- function d3.warMaxtest(human, value)
- require("union.UnionWarLogic").auto(value)
- end
- function d3.uwar(human,state)
- local msg = InnerMsg.lw.LW_GM
- msg.gm = "muwar "..state
- InnerMsg.sendMsg(0, msg)
- if state == 1 then
- local UnionWarDBLogic = require("union.UnionWarDBLogic")
- UnionWarDBLogic.onHour(0, true)
- end
- end
- function d3.uwarshop(human, lv)
- require("union.UnionWarLogic").upWarShopLv(human, tonumber(lv))
- end
- function d3.uwarBuff(human)
- local msg = InnerMsg.lw.LW_GM
- msg.gm = "muwarBuff ".. human.db.unionUuid
- InnerMsg.sendMsg(0, msg)
- end
- function d3.muwar(human,state)
- local UnionWarDBLogic = require("union.UnionWarDBLogic")
- if state == 1 then
- UnionWarDBLogic.onHour(0, true)
- elseif state == 2 then
- UnionWarDBLogic.onHour(2, true)
- elseif state == 3 then
- UnionWarDBLogic.onHour(20, true)
- end
- end
- function d3.muwarBuff(human, unionUuid)
- local UnionWarDBLogic = require("union.UnionWarDBLogic")
- UnionWarDBLogic.addBuffLvByGm(unionUuid)
- end
- function d3.uwartask(human, type)
- local UnionWarLogic = require("union.UnionWarLogic")
- UnionWarLogic.chegnjiuFinishGm(human, tonumber(type))
- end
- function d3.uwarstartmiddle()
- -- 匹配
- require("union.UnionWarMiddleLogic").matchUnionStart()
- end
- function d3.cljjc(human, val)
- val = tonumber(val)
- local msgRet = InnerMsg.lw.LW_CL_JJC
- msgRet.type = val
- InnerMsg.sendMsg(0, msgRet)
- end
- function d3.cluwar(human)
- require("union.UnionWarLogic").cleanUnionWar()
- local msg = InnerMsg.lw.LW_GM
- msg.gm = "cluwarmiddle"
- InnerMsg.sendMsg(0, msg)
- end
- function d3.cluwarmiddle()
- local LuaMongo = _G.lua_mongo
- local DB = require("common.DB")
- LuaMongo.remove(DB.db_union_war)
- end
- function d3.uwarstart()
- -- 需要周1、3、5使用
- require("union.UnionWarLogic").onHour(0)
- require("union.UnionWarLogic").onHour(1)
- local msg = InnerMsg.lw.LW_GM
- msg.gm = "uwarstartmiddle"
- InnerMsg.sendMsg(0, msg)
- end
- function d3.uwarstartmiddle()
- -- 匹配
- require("union.UnionWarMiddleLogic").matchUnionStart()
- end
- function d3.cxh(human)
- d3.tgod(human)
- d3.lv(human,200)
- end
- function d3.drop(human,val)
- local BattleLogic = require("battle.BattleLogic")
- local param = Util.split(val, " ")
- local cnt = tonumber(param[1])
- local battleID = tonumber(param[2])
- BattleLogic.clacItemCntGM(human,cnt,battleID)
- end
- function d3.uif(human,val)
- local jsonInput = {}
- jsonInput.unionName = val
- local AdminLogic = require("AdminLogic")
- AdminLogic.adminFunction.unionInfo(jsonInput)
- end
- function d3.ul(human,val)
- local jsonInput = {}
- jsonInput.start = tonumber(val)
- local AdminLogic = require("AdminLogic")
- AdminLogic.adminFunction.unionList(jsonInput)
- end
- function d3.monthgaochou(human, val)
- local MonthSummon = require("monthAct.MonthSummon")
- MonthSummon.onSummon(human, tonumber(val))
- end
- function d3.jhtq(human,val)
- local TequanLogic = require("qqTequan.TequanLogic")
- local param = Util.split(val, " ")
- local val1 = tonumber(param[1])
- local val2 = tonumber(param[2])
- local val3 = tonumber(param[3])
- local val4 = tonumber(param[4])
- TequanLogic.activateTequan(human,val1,val2,val3,val4)
- end
- function d3.unionTecLv(human,val)
- local UnionTecLogic = require("union.UnionTecLogic")
- UnionTecLogic.lvAllUpByGm(human)
- end
- function d3.auto(human,val)
- local param = Util.split(val, " ")
- local str = param[1]
- local val = param[2]
- if not str or not val then
- return
- end
- for i = 1, val do
- require("union.UnionWarLogic").auto(str .. string.format("%02d", i))
- end
- end
- function d3.lvAuto(human, val)
- val = val + 0
- local lvOld = human.db.lv
- local lvNew = val + 0
- human.db.lv = lvNew
- end
- function d3.cap(human)
- human.db.buyCapCnt = require("hero.HeroDefine").BUY_CAP_CNT
- require("hero.HeroLogic").sendHeroBagCap(human)
- end
- function d3.abscharge(human)
- AbsBillboardLogic.charge(human,1000)
- end
- function d3.jhpt(human)
- if human.pf_info.pf == "qqgame" then
- human.db.txHall = {}
- elseif human.pf_info.pf == "qzone" or human.pf_info.pf == "website" then
- human.db.qqZone = {}
- end
- end
- function d3.addfuwen(human)
- d3.itemadd(human,"80001 10")
- d3.itemadd(human,"80002 10")
- d3.itemadd(human,"80003 10")
- d3.itemadd(human,"80004 10")
- d3.itemadd(human,"80005 10")
- end
- function d3.addSmelt(human,val)
- local num = tonumber(val)
- human.db.smeltVal = human.db.smeltVal or 0
- human.db.smeltVal = human.db.smeltVal + num
- end
- function d3.zdfw(human,val)
- local param = Util.split(val, " ")
- local fuwenID = tonumber(param[1])
- local attr1 = tonumber(param[2])
- local val1 = tonumber(param[3])
- local attr2 = tonumber(param[4])
- local val2 = tonumber(param[5])
- local skill1 = tonumber(param[6])
- local skill2 = tonumber(param[7])
- local FuwenGrid = require("fuwen.FuwenGrid")
-
- local FuwenExcel = require("excel.fuwen").skill
- if (skill1 ~= nil and FuwenExcel[skill1] == nil) or (skill2 ~= nil and FuwenExcel[skill2] == nil) then
- print("fuck! add fuwen skill is notreal")
- return
- end
- FuwenGrid.setFuwenSkillAttrByGM(human,fuwenID,attr1,val1,attr2,val2,skill1,skill2)
- end
- function d3.t2(human)
- local input = [[{"method":"OnTokenReturnForBuy","tencent_ret":{"ret":0,"token":"fC283BD0141D50418B68200972FBEE6A13102","url_params":"\/v1\/r\/1110099166\/mobile_goods_info?token_id=BC283BD0141D50418B68200972FBEE6A13102&transaction_id=BC283BD0141D50418B68200972FBEE6A13102&out_trade_no=&new_cpay=1&offer_type=0","transaction_id":"BC283BD0141D50418B68200972FBEE6A13102","attach":""},"callback_general_param":{"name":"0-15D9C743A68D57FF8B22CC944BAEAD8C","account":"0-a"}}]]
- local ret = require("AdminLogic").handleAdminRequest(_, input)
- print(ret)
- end
- function d3.t1(human)
- local input = {}
- input.token = "fC283BD0141D50418B68200972FBEE6A13102"
- input.payitem = "39*60*1"
- input.billno = os.time()
- local ret = require("platform.QQApi").onDeliverReturnForBuy(input)
- print(ret.ret,ret.msg)
- end
- function d3.skin(human,val)
- local tb = Util.split(val, " ")
- local id = tonumber(tb[1])
- local cnt = tonumber(tb[2])
- print(id,tb[1],tb[2])
- if not id then
- human.db.skinBag = {[0] = 999}
- return
- end
- local SkinLogic = require("skin.SkinLogic")
- SkinLogic.addSkin(human,id,cnt)
- end
- function d3.ff(human,val)
- local FriendLogic = require("friend.FriendLogic")
- FriendLogic.addFriend(human, val)
- end
- function d3.chenghao(human,val)
- val = tonumber(val)
- if not val then
- return
- end
- local RoleHeadLogic = require("role.RoleHeadLogic")
- RoleHeadLogic.active(human, RoleHeadLogic.HEAD_TYPE_4, val)
- end
- function d3.unionBillboard(human,val)
- val = tonumber(val)
- if not val then
- return
- end
- local BRoleLogic = require("billboard.BRoleLogic")
- BRoleLogic.queryUnionBillboard(human,val)
- end
- function d3.herotest(human, val)
- local tb = Util.split(val, " ")
- local combatType = 1
- local HeroExcel = require("excel.hero")
- local HeroLogic = require("hero.HeroLogic")
- local flags = {}
- human.db.combatHero = human.db.combatHero or {}
- human.db.combatHero[combatType] = {}
- for pos = 1, 6 do
- local id = tonumber(tb[pos])
- local index = nil
- if id and HeroExcel.hero[id] then
- for i = 1, human.db.heroBag[0] do
- local heroGrid = human.db.heroBag[i]
- if heroGrid and (heroGrid.id == id) and
- (not flags[i]) then
- flags[i] = true
- index = i
- break
- end
- end
- if not index then
- index = HeroLogic.getEmptyIndex(human)
- d3.heroadd(human, id .. " 1")
- end
- end
- human.db.combatHero[combatType][pos] = index
- end
- local CombatHandler = require("combat.Handler")
- CombatHandler.CG_COMBAT_BEGIN(human,{type = combatType, param = ""})
- end
- function d3.combat(human, monsterOutID)
- local CombatLogic = require("combat.CombatLogic")
- local param = {}
- param.defender, _, param.defRBase, param.defFormation = CombatLogic.getMonsterObjList(monsterOutID)
- require("combat.CombatLogic").combatBegin(human, 1001, param, 1)
- end
- function d3.combat2(human,id)
- local id = tonumber(id)
- local combatConf = require("excel.combat").gm[id]
- if not combatConf then
- assert()
- end
- local HeroGrid = require("hero.HeroGrid")
- local HeroLogic = require("hero.HeroLogic")
- local CombatLogic = require("combat.CombatLogic")
- local fakeman1 = {}
- local account1 = "combatFakeman1"
- local fakeman2 = {}
- local account2 = "combatFakeman2"
- local RoleDBLogic = require("role.RoleDBLogic")
- local fakemanDB1 = RoleDBLogic.getDbByAccount(account1)
- if not fakemanDB1 then
- fakemanDB1 = RoleDBLogic.createDefaultRole(account1)
- end
- fakeman1.db = fakemanDB1
- local fakemanDB2 = RoleDBLogic.getDbByAccount(account2)
- if not fakemanDB2 then
- fakemanDB2 = RoleDBLogic.createDefaultRole(account2)
- end
- fakeman2.db = fakemanDB2
- local attacker = {}
- local defender = {}
- for i = 1, fakeman1.db.heroBag[0] do
- HeroLogic.delHeroByIndex(fakeman1, i, "gm")
- end
- for i = 1, fakeman2.db.heroBag[0] do
- HeroLogic.delHeroByIndex(fakeman2, i, "gm")
- end
- for k,v in ipairs(combatConf.atk) do
- local heroGrid = HeroGrid.createHeroGrid(v[1], v[4])
- heroGrid.lv = math.max(heroGrid.lv, v[3] or 0)
- heroGrid.quality = HeroGrid.getMaxQuality(heroGrid.star)
- local heroIndex = HeroLogic.addHeroByGrid(fakeman1, heroGrid, "gm")
- attacker[v[2]] = CombatLogic.createHumanObj(fakeman1, heroGrid.uuid)
- end
- for k,v in ipairs(combatConf.def) do
- local heroGrid = HeroGrid.createHeroGrid(v[1], v[4])
- heroGrid.lv = math.max(heroGrid.lv, v[3] or 0)
- heroGrid.quality = HeroGrid.getMaxQuality(heroGrid.star)
- local heroIndex = HeroLogic.addHeroByGrid(fakeman2, heroGrid, "gm")
- defender[v[2]] = CombatLogic.createHumanObj(fakeman2, heroGrid.uuid)
- end
- local atkPet = nil
- local defPet = nil
- CombatLogic.combatGm(human,1001,combatConf.atkF, attacker,combatConf.defF,defender,atkPet,defPet,{{101,1},{102,2},{103,3},{104,4}})
- end
- function d3.combatEnd(human)
- local CombatLogic = require("combat.CombatLogic")
- for i = CombatDefine.COMBAT_TYPE1, CombatDefine.COMBAT_TYPE_MAX do
- CombatLogic.clientFinish(human, i)
- end
- end
- -- it道具添加(支持中文)
- function d3.it(human,value)
- local tb = Util.split(value," ")
- local id = tonumber(tb[1])
- local cnt = tonumber(tb[2])
- if id == nil then id = tb[1] end
- if type(id) == "string" then
- id = ItemDefine.getIdByName(id)
- end
- if type(id) ~= "number" then
- print("err id", tb[1], id, type(id))
- return
- end
- cnt = cnt or 1000
- BagLogic.addItem(human, id, cnt, "gm")
- end
- -- 清除酒馆
- function d3.clbartask(human)
- human.db.bar = nil
- end
- function d3.updaily(human)
- ObjHuman.updateDaily(human, true)
- end
- function d3.clguide(human)
- human.db.noguide = nil
- human.db.guide = nil
- human.guideLoginStep = nil
- require("guide.GuideLogic").refreshGuide(human)
- require("guide.GuideLogic").sendStep(human)
- end
- function d3.nextguide(human)
- local GuideExcel = require("excel.guide")
- local GuideLogic = require("guide.GuideLogic")
- local id = GuideLogic.getGuideID(human)
- local nextstep = GuideLogic.getGuideStep(human) + 1
- local cf = id and GuideExcel.main_guide[id]
- local sid = cf and cf.guideList[nextstep]
- GuideLogic.stepFinish(human, sid)
- end
- function d3.guide(human, id)
- human.db.noguide = nil
- human.guideLoginStep = nil
- local GuideLogic = require("guide.GuideLogic")
- GuideLogic.setGuide(human, id, GuideLogic.STATE_DOING)
- GuideLogic.sendStep(human)
- end
- -- 跳过指引
- function d3.noguide(human)
- human.db.noguide = true
- human.guideLoginStep = nil
- require("guide.GuideLogic").sendStep(human, true)
- end
- function d3.creatunion(human,value)
- d3.lv(human,30)
- d3.viplv(human,2)
- d3.zuanshi(human, 1000)
- local UnionLogic = require("union.UnionLogic")
- UnionLogic.createUnion(human, value)
- end
- function d3.cldraw(human, value)
- human.db.drawCard = {jifen=tonumber(value),list={[1]={},[2]={},[3]={},[4]={}}}
- end
- function d3.cldrill(human)
- require("drill.DrillDB").reset()
- end
- function d3.zhengdian(_, hour)
- hour = tonumber(hour) or 0
- require("core.Timer").doZhengDian(hour)
- end
- function d3.tgod(human)
- local HeroLogic = require("hero.HeroLogic")
- local HeroGrid = require("hero.HeroGrid")
- local HeroExcel = require("excel.hero")
- for heroID, config in pairs(HeroExcel.tujian) do
- local heroConfig = HeroExcel.hero[heroID]
- if heroConfig then
- local star = heroConfig.star
- local maxQuality = HeroGrid.getMaxQuality(star)
- local maxLv = HeroGrid.getMaxLv(star,maxQuality)
- d3.heroadd(human, heroID .. " 1".." "..maxLv.." "..maxQuality)
- end
- end
- end
- function d3.tujian(human, camp)
- local HeroExcel = require("excel.hero")
- camp = tonumber(camp)
- for heroID, config in pairs(HeroExcel.tujian) do
- if config.camp == camp or not camp then
- d3.heroadd(human, heroID .. " 1")
- end
- end
- end
- function d3.cljingcailibao(human)
- human.db.dailyLeiChong = nil
- human.db.leichongHaoli = nil
- human.db.topupAcountDaily = nil
- human.db.topupAccountMonth = nil
- end
- function d3.qijifen(human,value)
- human.db.sevenDayGoal = human.db.sevenDayGoal or {}
- human.db.sevenDayGoal[9] = human.db.sevenDayGoal[8] or {}
- human.db.sevenDayGoal[9].jifen = value
- end
- function d3.clqirimubiao(human)
- human.db.sevenDayGoal = nil
- end
- function d3.throne(human, str)
- if str == nil then return end
- local tb = Util.split(str, " ")
- local id = tonumber(tb[1])
- local lv = tonumber(tb[2])
- if not id or not lv then return end
- local TheStarsDBLogic = require("theStars.TheStarsDBLogic")
- local list = TheStarsDBLogic.getThroneList()
- local throne = list[id]
- if not throne then return end
- throne.lv = lv
- TheStarsDBLogic.updateThroneDB(throne)
- end
- function d3.cltsts(human)
- human.db.throneTime = human.db.throneTime - 14400
- end
- -- 删号
- function d3.delaccount(human, account)
- if not account then return end
- local target = ObjHuman.onlineAccount[account]
- if target then
- return Broadcast.sendErr(human, "can't delete online")
- end
- local RoleDBLogic = require("role.RoleDBLogic")
- if not RoleDBLogic.getDbByAccount(account) then
- return Broadcast.sendErr(human, "account not exist")
- end
- local LuaMongo = _G.lua_mongo
- local DB = require("common.DB")
- local query = {}
- query.account = tostring(account)
- LuaMongo.remove(DB.db_char, query)
- require("core.RoleDel").roleDel()
- Broadcast.sendErr(human, "delete ok, account = " .. account)
- end
- -- 临时开指引
- function d3.openguide()
- require("Config").HAS_GUIDE = true
- end
- function d3.closeguide()
- require("Config").HAS_GUIDE = false
- end
- -- 自动上阵
- function d3.autoteam(human, combatType)
- if tonumber(combatType) == nil then return end
- local CombatPosLogic = require("combat.CombatPosLogic")
- local str = ""
- for i = 1, 6 do
- if not human.db.heroBag[i] then
- local heroID = require("hero.HeroDefine").getRandHeroByIsElite()
- local lv = math.random(50, 100)
- d3.heroadd(human, heroID .. " 1 " .. lv)
- end
- str = str .. i
- if i % 6 == 0 then str = str .. ","
- else str = str .. "|" end
- end
- CombatPosLogic.updatePos(human,combatType,str)
- end
- function d3.fcmstate(human, state)
- human.fcmState = state
- require("fcm.FcmLogic").checkFcm(human)
- end
- function d3.oltimeday(human, time)
- time = tonumber(time)
- if not time then return end
- human.db.onlineTimeDay = time
- require("fcm.FcmLogic").checkFcm(human)
- end
- function d3.dis(human, code)
- ObjHuman.doDisconnect(human, code)
- end
- function d3.project(human)
- local Lang = require("common.Lang")
- Broadcast.sendErr(human, Lang.TEST_MULTY_PROJECT)
- end
- function d3.clextrabattle(human)
- human.db.battleExtraReward = nil
- end
- function d3.clsharepf(human)
- human.db.plShare = nil
- end
- function d3.clshareboard()
- require("present.SharePlatformLogic").resetBoard()
- end
- function d3.sharepfall(human, cnt)
- cnt = tonumber(cnt) or 15
- for i = 1, cnt do
- require("present.SharePlatformLogic").onShareOk(human.db.account, "account" .. i, true)
- end
- end
- function d3.sharepf(human, accountB)
- require("present.SharePlatformLogic").onShareOk(human.db.account, accountB)
- end
- function d3.sharepf2(human, accountA)
- require("present.SharePlatformLogic").onShareOk(accountA, human.db.account)
- end
- function d3.sharegroup(human)
- require("present.SharePlatformLogic").groupShareOK(human)
- end
- function d3.shareinvate(human)
- require("present.SharePlatformLogic").shareInvate(human)
- end
- function d3.cltuisonglibao(human)
- human.db.tuiSongLiBao = nil
- end
- function d3.clmoshou(human)
- human.db.moshou = nil
- end
- function d3.moshoulv(human,lv)
- local MoShouExcel = require("excel.moshou")
- if not lv or lv <= 0 or lv > #MoShouExcel.moshouLv then return end
- local MoshouLogic = require("moshou.MoshouLogic")
- local isAllActive = MoshouLogic.isAllMoshouActive(human)
- if not isAllActive then
- local MoShouExcel = require("excel.moshou")
- local config = MoShouExcel.moshouActive
- for i=1,#config do
- local activeTask = config[i].activeTask
- for j=1,#activeTask do
- human.db.moshou = human.db.moshou or {}
- human.db.moshou[i] = human.db.moshou[i] or {}
- human.db.moshou[i].taskGet = human.db.moshou[i].taskGet or {}
- human.db.moshou[i].taskGet[j] = j
- end
- end
- end
- human.db.moshou.lv = lv
- human.db.moshou.lvExp = MoShouExcel.moshouLv[lv].needJinDu
- human.db.moshou.skillLV = human.db.moshou.skillLV or 1
- MoshouLogic.calMoshouHero(human)
- end
- function d3.activemoshou(human,moshouID)
- if not moshouID or moshouID <= 0 then return end
- local MoShouExcel = require("excel.moshou")
- local config = MoShouExcel.moshouActive
- for i=1,moshouID do
- local activeTask = config[i].activeTask
- for j=1,#activeTask do
- human.db.moshou = human.db.moshou or {}
- human.db.moshou[i] = human.db.moshou[i] or {}
- human.db.moshou[i].taskGet = human.db.moshou[i].taskGet or {}
- human.db.moshou[i].taskGet[j] = j
- end
- end
- if moshouID == #config then
- d3.moshoulv(human,1)
- end
- local MoshouLogic = require("moshou.MoshouLogic")
- MoshouLogic.calMoshouHero(human)
- end
- function d3.moshouupneed(human)
- local MoShouExcel = require("excel.moshou")
- local lvUpNeed1 = MoShouExcel.moshouLv[2].lvUpNeed[1][1]
- local lvUpNeed2 = MoShouExcel.moshouLv[2].lvUpNeed[2][1]
- d3.it(human,lvUpNeed1)
- d3.it(human,lvUpNeed2)
- local jingLianUp1 = MoShouExcel.moshouJingLian[2].lvUpNeed[1][1]
- local jingLianUp2 = MoShouExcel.moshouJingLian[2].lvUpNeed[2][1]
- d3.it(human,jingLianUp1)
- d3.it(human,jingLianUp2)
- local zhuhunUp = MoShouExcel.moshouZhuHun[1].costID
- d3.it(human,zhuhunUp)
- local skillup1 = MoShouExcel.moshouSkillLv[2].upCost[1][1]
- local skillup2 = MoShouExcel.moshouSkillLv[2].upCost[2][1]
- d3.it(human,skillup1)
- d3.it(human,skillup2)
- end
- function d3.moshoujinglian(human,val)
- if not human.db.moshou then return end
- human.db.moshou.jingLian = val
- end
- function d3.clolinereward(human)
- require("onlineReward.OnlineRewardLogic").initDB(human)
- end
- function d3.clonlinerewardget(human)
- human.db.onlineReward.getId = 0
- end
- function d3.bartaskfinish(human)
- local BarTaskLogic = require("bar.BarTaskLogic")
- BarTaskLogic.initDB(human)
- for taskID, taskData in pairs(human.db.bar) do
- if type(taskID) == "number" then
- human.db.bar[taskID].ts = 0
- end
- end
- end
- function d3.test(human)
- local str = Util.format("aa{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}{11}{12}{13}{14}{15}{16}",1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16)
- Broadcast.sendErr(human, str)
- print(str)
- end
- function d3.clbattle()
- local DB = require("common.DB")
- local LuaMongo = _G.lua_mongo
- LuaMongo.remove(DB.db_battle_shark)
- end
- -- 设置天梯争霸状态
- function d3.jjcladderstart()
- local JjcLadderLogic = require("jjcLadder.JjcLadderLogic")
- local JjcLadderExcel = require("excel.jjcLadder")
- local JjcLadderDefine = JjcLadderExcel.define[1]
- JjcLadderLogic.onActReady()
- local week = Util.getWeekDay(os.time()) - 1
- if week == 0 then
- week = 7
- end
- JjcLadderLogic.TEMP_TIMER_STAMPTIME = nil
- JjcLadderDefine.startTime.week = week
- JjcLadderDefine.endTime.week = week + 1
- JjcLadderLogic.onTimer()
- local msg = InnerMsg.lw.LW_GM
- msg.gm = "jjcladderstartmiddle"
- InnerMsg.sendMsg(0, msg)
- end
- function d3.jjcladderstartmiddle()
- local JjcLadderLogic = require("jjcLadder.JjcLadderLogic")
- local JjcLadderExcel = require("excel.jjcLadder")
- local JjcLadderDefine = JjcLadderExcel.define[1]
- JjcLadderLogic.onActReady()
- local week = Util.getWeekDay(os.time()) - 1
- if week == 0 then
- week = 7
- end
- JjcLadderLogic.TEMP_TIMER_STAMPTIME = nil
- JjcLadderDefine.startTime.week = week
- JjcLadderDefine.endTime.week = week + 1
- JjcLadderLogic.onTimer()
- end
- -- 天梯争霸报错
- function d3.jjcladdersign(human)
- local JjcLadderLogic = require("jjcLadder.JjcLadderLogic")
- if JjcLadderLogic.getState() == JjcLadderLogic.STATE_ACT_START then
- local commonDB = JjcLadderLogic.getCommonDB()
- commonDB.uuid2sign = commonDB.uuid2sign or {}
- commonDB.uuid2sign[human.db._id] = os.time()
- JjcLadderLogic.saveCommonDB(commonDB)
- JjcLadderLogic.onUpdatePos(human)
- end
- end
- -- 天梯争霸结束回调
- function d3.jjcladderend()
- local JjcLadderLogic = require("jjcLadder.JjcLadderLogic")
- JjcLadderLogic.onActEnd()
- local msg = InnerMsg.lw.LW_GM
- msg.gm = "jjcladderendmiddle"
- InnerMsg.sendMsg(0, msg)
- end
- function d3.jjcladderendmiddle()
- local JjcLadderLogic = require("jjcLadder.JjcLadderLogic")
- JjcLadderLogic.onActEnd()
- end
- -- 重置天梯争霸活动信息
- function d3.cljjcladder()
- local JjcLadderLogic = require("jjcLadder.JjcLadderLogic")
- JjcLadderLogic.saveCommonDB()
- JjcLadderLogic.onActEnd()
- local msg = InnerMsg.lw.LW_GM
- msg.gm = "cljjcladdermiddle"
- InnerMsg.sendMsg(0, msg)
- end
- function d3.cljjcladdermiddle()
- local JjcLadderLogic = require("jjcLadder.JjcLadderLogic")
- JjcLadderLogic.saveCommonDB()
- JjcLadderLogic.onActEnd()
- end
- function d3.clcombat(human,val)
- human.db.combatHero[val] = nil
- end
- function d3.clshop(human,val)
- human.db.shop[val] = nil
- end
- -- 重置日常礼包
- function d3.clrichanglibao(human)
- human.db.richangLibao = nil
- end
- -- 重置荣耀峡谷(龙族战场)
- function d3.clvalley()
- local ValleyLogic = require("valley.ValleyLogic")
- ValleyLogic.cleanDB()
- local msg = InnerMsg.lw.LW_GM
- msg.gm = "clvalleymiddle"
- InnerMsg.sendMsg(0, msg)
- end
- function d3.clvalleymiddle()
- local ValleyLogic = require("valley.ValleyLogic")
- ValleyLogic.cleanDB()
- end
- -- 重置荣耀峡谷(龙族战场)成就
- function d3.clvalleytask(human)
- human.db.valleyTask = nil
- end
- -- 增加荣耀峡谷(龙族战场)个人成就值
- function d3.valleytask1(human, value)
- require("valley.ValleyTask").updateValue(human.db._id, value, 0)
- end
- -- 增加荣耀峡谷(龙族战场)团队成就值
- function d3.valleytask2(human, value)
- require("valley.ValleyTask").updateValue(human.db._id, 0, value)
- end
- function d3.touchLv(human,val)
- local liveness = val + 0
- require("union.UnionLivenessLogic").touchLv(human, liveness)
- end
- function d3.clyj()
- local DB = require("common.DB")
- local LuaMongo = _G.lua_mongo
- LuaMongo.remove(DB.db_yjTreasure)
- local YjTreasureDBLogic = require("yjTreasure.YjTreasureDB")
- YjTreasureDBLogic.YJ_TREASURE_DB = {}
- end
- function d3.yjlayer(human,val)
- local YjTreasureLogic = require("yjTreasure.YjTreasureLogic")
- local YjTreasureDBLogic = require("yjTreasure.YjTreasureDB")
- local YjTreasureExcel = require("excel.yjTreasure")
- local Lang = require("common.Lang")
- local layerData = YjTreasureDBLogic.getLayerDataByUuid(human.db._id)
- local layCnf = YjTreasureExcel.layer
- local nowLayer = layerData.layer
- if val > #layCnf then return Broadcast.sendErr(human,Lang.YJTREASURE_LAYER_ERR) end
- local roleData = YjTreasureDBLogic.getRoleDataByUuid(human.db._id)
- local layerMax = roleData.layerMax or 0
- if layerMax < val then
- roleData.layerMax = val
- YjTreasureDBLogic.updateRoleDataByUuid(roleData,human.db._id)
- end
- YjTreasureDBLogic.creatLayerDataByUuid(human.db._id,val)
-
- YjTreasureLogic.CG_YJTREASURE_QUERY(human)
- end
- function d3.towerKing(human)
- local HuanJingTowerLogic = require("huanjingTower.HuanjingTowerLogic")
- HuanJingTowerLogic.unlockTowerKing(human)
- end
- -- 设置炼狱最大通关层
- function d3.lianyu(human, value)
- value = tonumber(value)
- if not value then return end
- if value < 0 then return end
- local LianyuExcel = require("excel.lianyu")
- if value > 0 and not LianyuExcel.gamelevel[value] then
- return
- end
- LianyuLogic = require("lianyu.LianyuLogic")
- LianyuLogic.setMaxLv(human, value)
- end
- function d3.cllianyu(human)
- human.db.lianyu = nil
- end
- function d3.cllianyuhelp()
- local CommonDB = require("common.CommonDB")
- CommonDB.updateValue(CommonDB.KEY_LIANYU, nil)
- end
- -- 清除特权商店相关信息
- function cltequanshop(human)
- human.db.tequanShop = nil
- human.db.tequanMopup = nil
- if human.db.bar then
- human.db.bar.vip = nil
- human.db.bar.surVip = nil
- end
- end
- function d3.addbts(human)
- local now = os.time()
- require("battle.BattleLogic").initBattleOut(human, now)
- human.db.battleOut.expTs1 = now - 7200
- human.db.battleOut.itemTs1 = now - 7200
- human.db.battleOut.expTs2 = now - 7200
- human.db.battleOut.itemTs2 = now - 7200
- end
- function d3.addbsd(human)
- human.db.mopupDoCnt = 0
- human.db.mopupFreeCnt = 0
- end
- function d3.addYjYj(human,type)
- local YjTreasureLogic = require("yjTreasure.YjTreasureLogic")
- YjTreasureLogic.yjYaoJiAdd(human,10,type)
- end
- function d3.ajfc(human,val)
-
- for i = 1,val do
- human.db.jjcDailyFight = (human.db.jjcDailyFight or 0) + 1
- require("jjc.JjcDB").updateTotalFight(human.db._id)
- end
- end
- function d3.godWartest(human)
- local JjcGodWarLogic = require("jjcGodWar.JjcGodWarLogic")
- JjcGodWarLogic.jjcGodWarFinishGm(human)
- end
- function d3.closeMiddle(human)
- MiddleConnect.stopConnectMiddle()
- end
- function d3.resetMiddle(human)
- MiddleConnect.autoResetMiddle()
- end
- function d3.loginSign(human, value)
- value = tonumber(value)
- local LoginSignLogic = require("loginSign.LoginSignLogic")
- LoginSignLogic.updateGM(human, value)
- end
- function d3.yuanjun(human, value)
- human.db.combatBackup = 1
- end
- function d3.buyItem(human, value)
- require("shop.ShopLogic").buy(human, 9, 405007, 1, 1)
- end
- function d3.test1(human)
- require("absAct.MangHeLogic").draw(human, 1)
- end
- function d3.zbsj(human,val)
- if human.db.zhanbu == nil then
- return
- end
- human.db.zhanbu.money = val
- end
- function d3.tjm(human)
- require("present.RelationGiftLogic").relationBind(human, "017772140001")
- end
- function d3.qcjz(human)
- human.db.unionDonate = nil
- end
- function d3.unionCopyLv(human, val)
- require("union.UnionEctypeLogic").toUnionBossLvGm(human, tonumber(val))
- end
- function d3.fff(human)
- human.db.leaveUnionLimit = nil
- end
- function d3.hgw(args)
- require("absAct.HeroGrowUp").actLoop()
- end
- function d3.hgwlv(human,val)
- require("absAct.HeroGrowUp").addJifen(human,tonumber(val))
- end
- function d3.paoma(human, val)
- require("chat.ChatPaoMaLogic").notice(val)
- end
- -- 设置合服时间
- function d3.merge(human,value)
- value = value and tonumber(value)
-
- if value == nil then
- local mergeSvrTime = CommonDB.getMergeServerTime()
- if mergeSvrTime == 0 then
- Broadcast.sendErr(human, "未设置合服时间")
- else
- local tb = os.date("%Y%m%d", mergeSvrTime)
- Broadcast.sendErr(human, "当前合服时间为" .. tb)
- end
- else
- local now = os.time()
- local temp = Util.getDayStartTime(now)
- temp = temp - (value - 1) * 24 * 3600
-
- CommonDB.setMergeTime(temp)
-
- local tb = os.date("%Y%m%d", temp)
- Broadcast.sendErr(human, "设置当前合服时间为" .. tb)
-
- --同步中心服开服时间
- --[[local msgRet = InnerMsg.lw.LW_OS
- msgRet.uuid = human.db._id
- msgRet.value = temp
- InnerMsg.sendMsg(0, msgRet)]]
- end
- end
- -- 设置战斗界面挂机时间
- function d3.guaji(human,value)
- value = value and tonumber(value)
- local gmFuc = require("battle.BattleLogic").gmSetHangTime
- gmFuc(human, value)
- end
- function d3.resetweek(human)
- WeekendLoopActManger.GMResetWeekAct(human)
- end
- function d3.savedb(human)
- ObjHuman.GM_SaveDB(human)
- end
- ------种族试炼------------
- ---开启某个种族的试炼,value为种族
- function d3.zzkq(human, value)
- local RacialTrialLogic = require("racialTrial.RacialTrialLogic")
- RacialTrialLogic.GmOpenTrial(human, value)
- end
- --某个种族关卡的跳关
- function d3.zztg(human, value)
- local pos = string.find(value, " ", 1, true)
- if pos == nil then return end
- local camp = tonumber(string.sub(value, 1, pos - 1))
- local levelCnt = tonumber(string.sub(value,pos+1,#value))
- local RacialTrialLogic = require("racialTrial.RacialTrialLogic")
- RacialTrialLogic.GmSetlevel(human, camp, levelCnt)
- end
- --z增加某个种族关卡的每日奖励次数
- function d3.zzjl(human, value)
- local pos = string.find(value, " ", 1, true)
- if pos == nil then return end
- local camp = tonumber(string.sub(value, 1, pos - 1))
- local levelCnt = tonumber(string.sub(value,pos+1,#value))
- local RacialTrialLogic = require("racialTrial.RacialTrialLogic")
- RacialTrialLogic.GmAddDailyAwardCnt(human, camp, levelCnt)
- end
- ------------秘宝---------------------
- --设置某个秘宝的等级
- function d3.mblv(human, value)
- local pos = string.find(value, " ", 1, true)
- if pos == nil then return end
- local id = tonumber(string.sub(value, 1, pos - 1))
- local level = tonumber(string.sub(value,pos+1,#value))
- local TalismanLogic = require("talisman.TalismanLogic")
- TalismanLogic.GmSetlevel(human, id, level)
- end
- function d3.delZR(human)
- RecommendLineup.RecommendLineup_GMClear()
- end
- function d3.clearnewcharge(human)
- NewFirstCharge.NewFirstCharge_GMClear(human)
- end
- --战令增加进度
- function d3.zljd(human, value)
- local pos = string.find(value, " ", 1, true)
- if pos == nil then return end
- local orderType = tonumber(string.sub(value, 1, pos - 1))
- local cnt = tonumber(string.sub(value,pos+1,#value))
- local WarOrder = require("shop.WarOrder")
- WarOrder.warOrderUnlock(human,orderType)
- WarOrder.trigger(human, orderType, cnt)
- end
- -- 删除数据
- function d3.delActPower(human)
- ActPowerUp.ActPowerUp_GMClear(human)
- end
- function d3.delSevenDayCard(human, id)
- FestivalSevenDayCardLogic.SEVENDAYCARD_GMCLEAR(human, id)
- end
- function d3.delTreasure(human)
- TreasureChestLogic.TreasureChestLogic_GmClear(human)
- end
- --新商业活动——秘境翻牌, value > 0 表示该活动抽卡时使用GM模式
- function d3.chouka(human, value)
- value = tonumber(value)
- local AbsLotteryCardLogic = require("absAct.AbsLotteryCardLogic")
- AbsLotteryCardLogic.SetMode(value)
- end
- --事件GM,设置某个事件进度
- function d3.czhl(human, value)
- local pos = string.find(value, " ", 1, true)
- if pos == nil then return end
- local triggerId = tonumber(string.sub(value, 1, pos - 1))
- local progress = tonumber(string.sub(value,pos+1,#value))
- local AbsExcellentGiftLogic = require("absAct.AbsExcellentGiftLogic")
- AbsExcellentGiftLogic.TriggerCbFunc(human, triggerId, progress, true)
- end
- -- 清空玩家加成时间
- function d3.delBonusTime(human)
- if not human or not human.db then
- Log.write("GM_ERROR", "delBonusTime: invalid human object")
- return
- end
- CommonDB.setFireWorkBonusTime(0)
- end
- function d3.writeLog(human)
- MaiDianLogic.MaiDianLogic_GM()
- end
- ------专属武器--------------
- function d3.wlv(human, value)
- local pos = string.find(value, " ", 1, true)
- if pos == nil then return end
- local heroId = tonumber(string.sub(value, 1, pos - 1))
- local level = tonumber(string.sub(value,pos+1, #value))
- local HeroExclusiveWeapon = require("hero.HeroExclusiveWeapon")
- HeroExclusiveWeapon.GmSetHeroWeaponLv(human, heroId, level)
- end
- -- 清理跨服商业活动个人数据
- function d3.ClearCommerce(human)
- CommerceManger.CommerveManager_GMClear(human)
- end
- function d3.CSAHumanPoint(human, nAddNum)
- CommerceManger.CommerveManager_GMAddHumanPoint(human, nAddNum)
- end
- function d3.CSAServerPoint(human, nAddNum)
- CommerceManger.CommerveManager_AddServerPoint(nAddNum)
- end
- function d3.CSSendMail(human)
- CommerceManger.CommerveManager_SendMail()
- end
- function d3.CSARest(human)
- CommerceManger.CommerveManager_GMRest(human)
- end
- function d3.CSARestCommon(human)
- CommerceManger.CommerveManager_GMRestCommonDB()
- end
- function d3.CSAClearMiddleMail(human)
- CommerceManger.CommerveManager_GMClearMiddleMail()
- end
- function d3.clearRelic(human)
- for i = 1, human.db.heroBag[0] do
- local heroGrid = human.db.heroBag[i]
- if heroGrid and heroGrid.relic and heroGrid.relic.relicID then
- heroGrid.relic = {}
- end
- end
- human.db.relicListData = {}
- end
- function d3.equipRelic(human, heroID, heroIdx, relicId, operate)
- -- 参数校验
- if not heroID then
- return Broadcast.sendErr(human, "参数错误,格式:/gm equipRelic [英雄ID] ")
- end
- if not heroIdx then
- return Broadcast.sendErr(human, "参数错误,格式:/gm equipRelic [英雄索引] ")
- end
- if not relicId then
- return Broadcast.sendErr(human, "参数错误,格式:/gm equipRelic [遗物ID] ")
- end
- if not operate then
- return Broadcast.sendErr(human, "参数错误,格式:/gm equipRelic [0=卸下|1=装备] ")
- end
- -- 模拟客户端协议结构
- local tMsgData = {
- heroID = heroID,
- heroIdx = heroIdx,
- relicId = relicId,
- operate = operate
- }
- -- 调用原有处理逻辑(假设你已有处理函数)
- local oldData, newData = winner.EquipeandRemove(human, tMsgData.heroID, tMsgData.heroIdx, tMsgData.relicId, tMsgData.operate)
-
- end
- --周任务和荣耀历程访问接口---
- function d3.weekTask(human)
- local d= week.WeekTaskQuery(human)
- end
- function d3.weekHonorJourney(human)
- local d= honor.HonorJourneyTaskQuery(human)
- end
- function d3.honorclear(human)
- honor.HonorJourney_GMClear(human)
- end
- function d3.weekreward(human)
- local d= week.weekTaskGetReward(human)
- end
- function d3.weekhuoyue(human)
- local d= week.CG_WEEKTASK_GET_HUOYUEBOX(human)
- end
- function d3.dayhuoyue(human)
- local d= day.CG_DAILYTASK_GET_HUOYUEBOX(human)
- end
- function d3.honorcaddpoint(human, nAddNum)
- honor.HonorJourney_GMAddPoint(human, nAddNum)
- end
- function d3.dayreward(human)
- local d= day.dailyTaskGetReward(human)
- end
- function d3.dayaddHuoYue(human, nNum)
- day.Gm_AddHuoYue(human, nNum)
- end
- local allHeroIds= {}
- -- 一键获取所有资源--
- function d3.getAll(human)
- for id, hero in pairs(HeroTable) do
- if hero.grade == 4 or hero.grade == 5 then
- table.insert(allHeroIds, id)
- end
- end
- for _, id in ipairs(allHeroIds) do
- local val = string.format("%d %d %d %d", id, 1, 1000, 20)
- d3.heroadd(human, val)
- end
- local items = {
- {101, 1000000000},
- {111, 1000000000},
- {112, 1000000},
- {114, 10000},
- {118, 10000},
- {124, 10000},
- {120, 10000},
- {135, 10000},
- {80005, 10},
- {80006, 10},
- {1009, 10000},
- {1011, 900000},
- {1023, 99},
- {1024, 99},
- {1025, 99},
- {1014, 99},
- {1015, 99},
- {1016, 99},
- {1017, 99},
- {1031, 99},
- {1032, 99},
- {1033, 99},
- }
-
- for _, item in ipairs(items) do
- local cmd = string.format("%d %d", item[1], item[2])
- d3.itemadd(human, cmd)
- end
-
- end
- --清空周任务数据
- function d3.clearWeek(human)
- human.db.weekTask ={}
- end
- function d3.setWeekhuoyue(human,num)
- human.db.weekTask.nowHuoYue = num
- end
- function d3.CSASendHuma(human)
- CommerceManger.CommerveManager_GMSendHumanMail(human)
- end
- ------------------------主线任务流-------------------------------
- function d3.zxjd(human, value)
- local pos = string.find(value, " ", 1, true)
- if pos == nil then return end
- local taskId = tonumber(string.sub(value, 1, pos - 1))
- local progress = tonumber(string.sub(value,pos+1,#value))
- local MainTask = require("dailyTask.MainTask")
- MainTask.GM_UpdateTaskProgress(human, taskId, progress)
- end
- function d3.zxnt(human, value)
- local taskId = tonumber(value)
- local MainTask = require("dailyTask.MainTask")
- MainTask.GM_UpdateNowTask(human, taskId)
- end
- function d3.zxqc(human, value)
- local taskId = tonumber(value)
- local MainTask = require("dailyTask.MainTask")
- MainTask.GM_ClearTask(human, taskId)
- end
- function d3.zxreset(human)
- local MainTask = require("dailyTask.MainTask")
- MainTask.GM_ClearAllTaskData(human)
- end
- function d3.qqbsreset(human)
- QQBigShot.QQBigShot_GMReset(human)
- end
- --测试封号功能GM
- function d3.fh(human, value)
- print("=====================fh===================", value)
- local pos = string.find(value, " ", 1, true)
- if pos == nil then return end
- local banType = tonumber(string.sub(value, 1, pos - 1))
- local banMinutes = tonumber(string.sub(value,pos+1,#value))
- local banInfo = {}
- local targetBanInfo
- if banType == 1 then
- banInfo.roleBanInfo = {}
- banInfo.roleBanInfo.roleTag = human.db._id
- targetBanInfo = banInfo.roleBanInfo
- elseif banType == 2 then
- banInfo.accountBanInfo = {}
- banInfo.accountBanInfo.channelTag = human.phpChanelID
- banInfo.accountBanInfo.accountTag = human.db.account
- targetBanInfo = banInfo.accountBanInfo
- elseif banType == 3 then
- banInfo.appBanInfo = {}
- banInfo.appBanInfo.appId = human.appid
- targetBanInfo = banInfo.appBanInfo
- end
- if targetBanInfo then
- if banMinutes <= 0 then
- targetBanInfo.banTime = 0
- else
- targetBanInfo.banTime = banMinutes * 60 + os.time()
- end
- local JsonLogic = require("common.Json")
- local banStr = JsonLogic.Encode(banInfo)
- print("==================fh2=================", banStr)
- local BanLogic = require("scene.BanLogic")
- BanLogic.Update_Ban_Info(banStr)
- end
- end
- --酒馆
- function d3.jgidx(human, value)
- value = tonumber(value)
- local HeroPubLogic = require("hero.HeroPubLogic")
- HeroPubLogic.GM_SetAttrIdx(human, value)
- end
- function d3.MergeChargeDay(human, nDay)
- MergeServerCharge.MergeServerCharge_GMReset(human, nDay)
- end
- -- 绝望深渊设置当天通关关卡
- function d3.jwlv(human, value)
- value = tonumber(value)
- local LianyuLogic = require("lianyu.LianyuLogic")
- LianyuLogic.GM_SetTodayWinLv(human, value)
- end
- -- 删除诸神圣域称号
- function d3.delzsch(human)
- local GodsAreaNS = require("godsArea.GodsAreaNS")
- GodsAreaNS.GM_ClearChenghao(human)
- end
- -- 开启下一个循环活动
- function d3.cycleAct(human)
- local CycleActivityLogic = require("yunying.CycleActivity")
- CycleActivityLogic.GM_EnterNext(human)
- end
- function d3.active(human, value)
- local pos = string.find(value, " ", 1, true)
- if pos == nil then return end
- local tp = tonumber(string.sub(value, 1, pos - 1))
- local id = tonumber(string.sub(value,pos+1, #value))
- local RoleHeadLogic = require("role.RoleHeadLogic")
- RoleHeadLogic.GM_Active(human, tp, id)
- end
- function d3.unaActive(human, value)
- local pos = string.find(value, " ", 1, true)
- if pos == nil then return end
- local tp = tonumber(string.sub(value, 1, pos - 1))
- local id = tonumber(string.sub(value,pos+1, #value))
- local RoleHeadLogic = require("role.RoleHeadLogic")
- RoleHeadLogic.GM_UnActive(human, tp, id)
- end
|