| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939 |
- local TequanExcel = require("excel.qqTequan")
- local Msg = require("core.Msg")
- local Grid = require("bag.Grid")
- local BagLogic = require("bag.BagLogic")
- local Util = require("common.Util")
- local Lang = require("common.Lang")
- local HeroLogic = require("hero.HeroLogic")
- local RoleSystemLogic = require("roleSystem.RoleSystemLogic")
- local RoleSystemDefine = require("roleSystem.RoleSystemDefine")
- TEQUAN_TYPE_1 = 1 -- 黄钻特权
- TEQUAN_TYPE_2 = 2 -- 蓝钻特权
- function activateTequan(human,type,tequanType,lv,hh,pf)
- if lv ~= nil and lv < 0 then
- return
- end
- if type == TEQUAN_TYPE_1 then -- 黄钻
- if human.db.yellow == nil then
- human.db.yellow = {}
- human.db.yellow.lv = lv
- human.db.yellow.isAdd = 1
- if tequanType == 1 then
- human.db.yellow.year = human.db.yellow.year or {}
- else
- human.db.yellow.year = nil
- end
- if hh == 1 then
- human.db.yellow.lux = human.db.yellow.lux or {}
- else
- human.db.yellow.lux = nil
- end
- else
- human.db.yellow.lv = lv
- if tequanType == 1 then
- human.db.yellow.year = human.db.yellow.year or {}
- else
- human.db.yellow.year = nil
- end
- if hh == 1 then
- human.db.yellow.lux = human.db.yellow.lux or {}
- else
- human.db.yellow.lux = nil
- end
- end
- elseif type == TEQUAN_TYPE_2 then
- if human.db.blue == nil then
- human.db.blue = {}
- human.db.blue.lv = lv
- human.db.blue.isAdd = 1
- if tequanType == 1 then
- human.db.blue.year = human.db.blue.year or {}
- else
- human.db.blue.year = nil
- end
- if hh == 1 then
- human.db.blue.lux = human.db.blue.lux or {}
- else
- human.db.blue.lux = nil
- end
- else
- human.db.blue.lv = lv
- if tequanType == 1 then
- human.db.blue.year = human.db.blue.year or {}
- else
- human.db.blue.year = nil
- end
- if hh == 1 then
- human.db.blue.lux = human.db.blue.lux or {}
- else
- human.db.blue.lux = nil
- end
- end
- end
- if pf == 1 then
- human.db.txHall = {}
- human.pf_info.pf = "qqgame"
- elseif pf == 2 then
- human.db.qqZone = {}
- human.pf_info.pf = "qzone"
- end
- HeroLogic.sendHeroBagCap(human)
- end
- function tencentXinShouQuery(human,tType,platformType)
- local msgRet = Msg.gc.GC_QQ_TEQUAN_VIP_XINSHOU_QUERY
- local config = nil
- if platformType ~= 2 then -- 查询平台类型
- if platformType == tType then
- config = TequanExcel.txXinshou
- local len = #config[1].reward
- if platformType == 1 then
- if human.pf_info.pf ~= "qqgame" then
- checkDot(human,tType,platformType)
- return
- end
- if human.db.txHall == nil then
- msgRet.isGet = 2
- else
- if human.db.txHall.isGet ~= nil then
- msgRet.isGet = 1
- else
- msgRet.isGet = 0
- end
- end
- else
- if human.pf_info.pf ~= "qzone" and human.pf_info.pf ~= "website" then
- checkDot(human,tType,platformType)
- return
- end
- if human.db.qqZone == nil then
- msgRet.isGet = 2
- else
- if human.db.qqZone.isGet ~= nil then
- msgRet.isGet = 1
- else
- msgRet.isGet = 0
- end
- end
- end
-
- for i = 1,len do
- Grid.makeItem(msgRet.reward[i], config[1].reward[i][1],config[1].reward[i][2])
- end
- msgRet.reward[0] = len
- msgRet.str = ""
- Msg.send(msgRet,human.fd)
- checkDot(human,tType,platformType)
- end
- return
- end
- if tType == 1 then -- 蓝钻
- config = TequanExcel.lzXinshou
- local len = #config[1].reward
- if human.db.blue == nil or human.db.blue.lv == 0 then
- msgRet.isGet = 2
- else
- if human.db.blue.isGet ~= nil then
- msgRet.isGet = 1
- else
- msgRet.isGet = 0
- end
- end
- for i = 1,len do
- Grid.makeItem(msgRet.reward[i], config[1].reward[i][1],config[1].reward[i][2])
- end
- config = TequanExcel.tequan[1]
- msgRet.str = Util.format(Lang.YELLOW_VIP_PRIVILEGE,config.privilege)
- msgRet.reward[0] = len
- elseif tType == 0 then -- 黄钻
- config = TequanExcel.hzXinshou
- local len = #config[1].reward
- if human.db.yellow == nil or human.db.yellow.lv == 0 then
- msgRet.isGet = 2
- else
- if human.db.yellow.isGet ~= nil then
- msgRet.isGet = 1
- else
- msgRet.isGet = 0
- end
- end
- for i = 1,len do
- Grid.makeItem(msgRet.reward[i], config[1].reward[i][1],config[1].reward[i][2])
- end
- config = TequanExcel.tequan[2]
- msgRet.str = Util.format(Lang.YELLOW_VIP_PRIVILEGE,config.privilege)
- msgRet.reward[0] = len
- else
- checkDot(human,tType,platformType)
- return
- end
- Msg.send(msgRet,human.fd)
- checkDot(human,tType,platformType)
- end
- function tencentXinShouGet(human,tType,platformType)
- if platformType ~= 2 then
- if platformType == tType then
- if platformType == 1 then
- if human.pf_info.pf ~= "qqgame" then
- return
- end
- if human.db.txHall == nil then
- return -- 不是大厅玩
- end
- if human.db.txHall.isGet ~= nil then
- return -- 已经领取过
- end
- human.db.txHall.isGet = 1
- else
- if human.pf_info.pf ~= "qzone" and human.pf_info.pf ~= "website" then
- return
- end
- if human.db.qqZone == nil then
- return -- 不是大厅玩
- end
- if human.db.qqZone.isGet ~= nil then
- return -- 已经领取过
- end
- human.db.qqZone.isGet = 1
- end
-
- local config = TequanExcel.txXinshou
- BagLogic.addItemList(human,config[1].reward, "hall_reward")
- end
- tencentXinShouQuery(human,tType,platformType)
-
- RoleSystemLogic.onDot(human, RoleSystemDefine.ROLE_SYS_ID_107)
- return
- end
- if tType == 1 then
- if human.db.blue == nil or human.db.blue.lv == 0 then
- return -- 当前黄钻未开通
- end
- if human.db.blue.isGet ~= nil then
- return -- 已经领取过
- end
- human.db.blue.isGet = 1
- local config = TequanExcel.lzXinshou
- BagLogic.addItemList(human,config[1].reward, "blue_reward")
- elseif tType == 0 then
- if human.db.yellow == nil or human.db.yellow.lv == 0 then
- return -- 当前黄钻未开通
- end
- if human.db.yellow.isGet ~= nil then
- return -- 已经领取过
- end
- human.db.yellow.isGet = 1
- local config = TequanExcel.hzXinshou
- BagLogic.addItemList(human,config[1].reward, "yellow_reward")
- else
- return
- end
- tencentXinShouQuery(human,tType,platformType)
- RoleSystemLogic.onDot(human, RoleSystemDefine.ROLE_SYS_ID_106)
- end
- function tencentLvUpQuery(human,tType,platformType)
- local msgRet = Msg.gc.GC_QQ_TEQUAN_VIP_LVUP_QUERY
- if platformType ~= 2 then
- if platformType == tType then
- local config = TequanExcel.txLvUp
- local lenConfig = #config
- for i = 1,lenConfig do
- if platformType == 1 then
- if human.pf_info.pf ~= "qqgame" then
- return
- end
- if human.db.txHall ~= nil and human.db.txHall.lvup ~= nil and human.db.txHall.lvup[i] ~= nil then
- msgRet.rewardMsg[i].isGet = 1
- else
- if human.db.txHall == nil then
- msgRet.rewardMsg[i].isGet = 2
- else
- msgRet.rewardMsg[i].isGet = 0
- end
- end
- else
- if human.pf_info.pf ~= "qzone" and human.pf_info.pf ~= "website" then
- return
- end
- if human.db.qqZone ~= nil and human.db.qqZone.lvup ~= nil and human.db.qqZone.lvup[i] ~= nil then
- msgRet.rewardMsg[i].isGet = 1
- else
- if human.db.qqZone == nil then
- msgRet.rewardMsg[i].isGet = 2
- else
- msgRet.rewardMsg[i].isGet = 0
- end
- end
- end
-
- if human.db.lv < config[i].needLv then
- msgRet.rewardMsg[i].isGet = 2
- end
- msgRet.rewardMsg[i].id = i
- msgRet.rewardMsg[i].lv = config[i].needLv
- local lenReward = #config[i].reward
- for j = 1,lenReward do
- Grid.makeItem(msgRet.rewardMsg[i].reward[j],config[i].reward[j][1],config[i].reward[j][2])
- end
- msgRet.rewardMsg[i].reward[0] = lenReward
- end
- msgRet.rewardMsg[0] = lenConfig
- end
- Msg.send(msgRet,human.fd)
- return
- end
- if tType == 1 then
- local config = TequanExcel.lzLvUp
- local lenConfig = #config
- for i = 1,lenConfig do
- if human.db.blue ~= nil and human.db.blue.lv ~= 0 and human.db.blue.lvup ~= nil and human.db.blue.lvup[i] ~= nil then
- msgRet.rewardMsg[i].isGet = 1
- else
- if human.db.blue == nil or human.db.blue.lv == 0 then
- msgRet.rewardMsg[i].isGet = 2
- else
- msgRet.rewardMsg[i].isGet = 0
- end
- end
- if human.db.lv < config[i].needLv then
- msgRet.rewardMsg[i].isGet = 2
- end
-
- msgRet.rewardMsg[i].id = i
- msgRet.rewardMsg[i].lv = config[i].needLv
- local lenReward = #config[i].reward
- for j = 1,lenReward do
- Grid.makeItem(msgRet.rewardMsg[i].reward[j],config[i].reward[j][1],config[i].reward[j][2])
- end
- msgRet.rewardMsg[i].reward[0] = lenReward
- end
- msgRet.rewardMsg[0] = lenConfig
- elseif tType == 0 then
- local config = TequanExcel.hzLvUp
- local lenConfig = #config
- for i = 1,lenConfig do
- if human.db.yellow ~= nil and human.db.yellow.lv ~= 0 and human.db.yellow.lvup ~= nil and human.db.yellow.lvup[i] ~= nil then
- msgRet.rewardMsg[i].isGet = 1
- else
- if human.db.yellow == nil or human.db.yellow.lv == 0 then
- msgRet.rewardMsg[i].isGet = 2
- else
- msgRet.rewardMsg[i].isGet = 0
- end
- end
- if human.db.lv < config[i].needLv then
- msgRet.rewardMsg[i].isGet = 2
- end
- msgRet.rewardMsg[i].id = i
- msgRet.rewardMsg[i].lv = config[i].needLv
- local lenReward = #config[i].reward
- for j = 1,lenReward do
- Grid.makeItem(msgRet.rewardMsg[i].reward[j],config[i].reward[j][1],config[i].reward[j][2])
- end
- msgRet.rewardMsg[i].reward[0] = lenReward
- end
- msgRet.rewardMsg[0] = lenConfig
- else
- return
- end
- Msg.send(msgRet,human.fd)
- end
- function tencentLvUpGet(human,id,tType,platformType)
- if platformType ~= 2 then
- if platformType == tType then
- local config = TequanExcel.txLvUp
- if id == nil or id > #config or id <= 0 then
- return -- 无效礼包id
- end
- if human.db.lv < config[id].needLv then
- return
- end
- if platformType == 1 then
- if human.pf_info.pf ~= "qqgame" then
- return
- end
- if human.db.txHall == nil then
- return -- 当前黄钻未开通
- end
- if human.db.txHall.lvup ~= nil and human.db.txHall.lvup[id] ~= nil then
- return -- 已经领取过
- end
- human.db.txHall.lvup = human.db.txHall.lvup or {}
- human.db.txHall.lvup[id] = 1
- else
- if human.pf_info.pf ~= "qzone" and human.pf_info.pf ~= "website" then
- return
- end
- if human.db.qqZone == nil then
- return -- 当前黄钻未开通
- end
- if human.db.qqZone.lvup ~= nil and human.db.qqZone.lvup[id] ~= nil then
- return -- 已经领取过
- end
- human.db.qqZone.lvup = human.db.qqZone.lvup or {}
- human.db.qqZone.lvup[id] = 1
- end
-
- BagLogic.addItemList(human,config[id].reward, "hall_reward")
- end
- tencentLvUpQuery(human,tType,platformType)
- checkDot(human,tType,platformType)
- RoleSystemLogic.onDot(human, RoleSystemDefine.ROLE_SYS_ID_107)
- return
- end
- if tType == 1 then
- if human.db.blue == nil or human.db.blue.lv == 0 then
- return -- 当前黄钻未开通
- end
- local config = TequanExcel.lzLvUp
- if human.db.lv < config[id].needLv then
- return
- end
- if id == nil or id > #config or id <= 0 then
- return -- 无效礼包id
- end
- if human.db.blue.lvup ~= nil and human.db.blue.lvup[id] ~= nil then
- return -- 已经领取过
- end
- human.db.blue.lvup = human.db.blue.lvup or {}
- human.db.blue.lvup[id] = 1
- BagLogic.addItemList(human,config[id].reward, "yellow_reward")
- elseif tType == 0 then
- if human.db.yellow == nil or human.db.yellow.lv == 0 then
- return -- 当前黄钻未开通
- end
- local config = TequanExcel.hzLvUp
- if human.db.lv < config[id].needLv then
- return
- end
- if id == nil or id > #config or id <= 0 then
- return -- 无效礼包id
- end
- if human.db.yellow.lvup ~= nil and human.db.yellow.lvup[id] ~= nil then
- return -- 已经领取过
- end
- human.db.yellow.lvup = human.db.yellow.lvup or {}
- human.db.yellow.lvup[id] = 1
-
- BagLogic.addItemList(human,config[id].reward, "yellow_reward")
- else
- return
- end
- tencentLvUpQuery(human,tType,platformType)
- checkDot(human,tType,platformType)
- RoleSystemLogic.onDot(human, RoleSystemDefine.ROLE_SYS_ID_106)
- end
- function tencentDailyQuery(human,tType,platformType)
- local msgRet = Msg.gc.GC_QQ_TEQUAN_VIP_DAILY_QUERY
- if platformType ~= 2 then
- if platformType == tType then
- local config = TequanExcel.txDaily[1]
- msgRet.tencent_daily[1].vipLv = 0
- local lenReward = #config.reward
- for j = 1,lenReward do
- Grid.makeItem(msgRet.tencent_daily[1].reward[j],config.reward[j][1],config.reward[j][2])
- end
- msgRet.tencent_daily[1].reward[0] = lenReward
- if platformType == 1 then
- if human.pf_info.pf ~= "qqgame" then
- return
- end
- if human.db.txHall ~= nil and human.db.txHall.daily == nil then
- msgRet.isGet = {0,0,0}
- elseif human.db.txHall == nil then
- msgRet.isGet = {2,0,0}
- else
- msgRet.isGet = {1,0,0}
- end
- else
- if human.pf_info.pf ~= "qzone" and human.pf_info.pf ~= "website" then
- return
- end
- if human.db.qqZone ~= nil and human.db.qqZone.daily == nil then
- msgRet.isGet = {0,0,0}
- elseif human.db.qqZone == nil then
- msgRet.isGet = {2,0,0}
- else
- msgRet.isGet = {1,0,0}
- end
- end
-
- msgRet.tencent_daily[0] = 1
- msgRet.extraRewardYear[0] = 0
- msgRet.extraRewardLux[0] = 0
- msgRet.isGet[0] = 3
- Msg.send(msgRet,human.fd)
- end
- return
- end
- local config = nil
- if tType == 1 then
- config = TequanExcel.lzDaily
- elseif tType == 0 then
- config = TequanExcel.hzDaily
- else
- return
- end
- local lenConfig = #config
- for i = 1,lenConfig do
- msgRet.tencent_daily[i].vipLv = config[i].needVipLv
- local lenReward = #config[i].reward
- for j = 1,lenReward do
- Grid.makeItem(msgRet.tencent_daily[i].reward[j],config[i].reward[j][1],config[i].reward[j][2])
- end
- msgRet.tencent_daily[i].reward[0] = lenReward
- end
- msgRet.tencent_daily[0] = lenConfig
- local lenExtra = #config[1].extraRewardYear
- for i = 1,lenExtra do
- Grid.makeItem(msgRet.extraRewardYear[i],config[1].extraRewardYear[i][1],config[1].extraRewardYear[i][2])
- end
- msgRet.extraRewardYear[0] = lenExtra
- lenExtra = #config[1].extraRewardLux
- for i = 1,lenExtra do
- Grid.makeItem(msgRet.extraRewardLux[i],config[1].extraRewardLux[i][1],config[1].extraRewardLux[i][2])
- end
- msgRet.extraRewardLux[0] = lenExtra
- msgRet.isGet = {0,0,0}
- if tType == 0 then
- if human.db.yellow == nil or human.db.yellow.lv == 0 then
- msgRet.isGet = {2,2,2}
- else
- if human.db.yellow.daily ~= nil then
- msgRet.isGet[1] = 1
- end
- if human.db.yellow.lux ~= nil and human.db.yellow.lux.isGet ~= nil then
- msgRet.isGet[2] = 1
- elseif human.db.yellow.lux == nil then
- msgRet.isGet[2] = 2
- end
- if human.db.yellow.year ~= nil and human.db.yellow.year.isGet ~= nil then
- msgRet.isGet[3] = 1
- elseif human.db.yellow.year == nil then
- msgRet.isGet[3] = 2
- end
- end
- elseif tType == 1 then
- if human.db.blue == nil or human.db.blue.lv == 0 then
- msgRet.isGet = {2,2,2}
- else
- if human.db.blue.daily ~= nil then
- msgRet.isGet[1] = 1
- end
- if human.db.blue.lux ~= nil and human.db.blue.lux.isGet ~= nil then
- msgRet.isGet[2] = 1
- elseif human.db.blue.lux == nil then
- msgRet.isGet[2] = 2
- end
- if human.db.blue.year ~= nil and human.db.blue.year.isGet ~= nil then
- msgRet.isGet[3] = 1
- elseif human.db.blue.year == nil then
- msgRet.isGet[3] = 2
- end
- end
- end
- msgRet.isGet[0] = 3
- Msg.send(msgRet,human.fd)
- end
- function tencentDailyGet(human,tType,platformType,rType)
- if platformType ~= 2 then
- if platformType == tType then
- if platformType == 1 then
- if human.pf_info.pf ~= "qqgame" then
- return
- end
- if human.db.txHall ~= nil and human.db.txHall.daily ~= nil then
- return
- end
- human.db.txHall.daily = 1
- else
- if human.pf_info.pf ~= "qzone" and human.pf_info.pf ~= "website" then
- return
- end
- if human.db.qqZone ~= nil and human.db.qqZone.daily ~= nil then
- return
- end
- human.db.qqZone.daily = 1
- end
-
- local config = TequanExcel.txDaily[1]
- BagLogic.addItemList(human,config.reward, "blue_reward")
- end
- tencentDailyQuery(human,tType,platformType)
- checkDot(human,tType,platformType)
- RoleSystemLogic.onDot(human, RoleSystemDefine.ROLE_SYS_ID_107)
- return
- end
- if tType == 1 then
- if human.db.blue == nil or human.db.blue.lv == 0 then
- return -- 当前黄钻未开通
- end
- local config = TequanExcel.lzDaily
- local lv = human.db.blue.lv
- local lenItem = 0
- local item = nil
- if human.db.blue.daily == nil then
- human.db.blue.daily = 1
- local lenReward = #config[lv].reward
- for i = 1,lenReward do
- lenItem = lenItem + 1
- item = item or {}
- item[lenItem] = {}
- item[lenItem][1] = config[lv].reward[i][1]
- item[lenItem][2] = config[lv].reward[i][2]
- end
- end
- if human.db.blue.year ~= nil and human.db.blue.year.isGet == nil then
- human.db.blue.year.isGet = 1
- local lenExtra = #config[lv].extraRewardYear
- for i = 1,lenExtra do
- lenItem = lenItem + 1
- item = item or {}
- item[lenItem] = {}
- item[lenItem][1] = config[1].extraRewardYear[i][1]
- item[lenItem][2] = config[1].extraRewardYear[i][2]
- end
- end
-
- if human.db.blue.lux ~= nil and human.db.blue.lux.isGet == nil then
- human.db.blue.lux.isGet = 1
- local lenExtra = #config[lv].extraRewardLux
- for i = 1,lenExtra do
- lenItem = lenItem + 1
- item = item or {}
- item[lenItem] = {}
- item[lenItem][1] = config[1].extraRewardLux[i][1]
- item[lenItem][2] = config[1].extraRewardLux[i][2]
- end
- end
- if item then
- BagLogic.addItemList(human,item, "blue_reward")
- end
- elseif tType == 0 then
- if human.db.yellow == nil or human.db.yellow.lv == 0 then
- return -- 当前黄钻未开通
- end
- local config = TequanExcel.hzDaily
- local lv = human.db.yellow.lv
- local lenItem = 0
- local item = nil
- if human.db.yellow.daily == nil then
- human.db.yellow.daily = 1
- local lenReward = #config[lv].reward
- for i = 1,lenReward do
- lenItem = lenItem + 1
- item = item or {}
- item[lenItem] = {}
- item[lenItem][1] = config[lv].reward[i][1]
- item[lenItem][2] = config[lv].reward[i][2]
- end
- end
- if human.db.yellow.year ~= nil and human.db.yellow.year.isGet == nil then
- human.db.yellow.year.isGet = 1
- local lenExtra = #config[lv].extraRewardYear
- for i = 1,lenExtra do
- lenItem = lenItem + 1
- item = item or {}
- item[lenItem] = {}
- item[lenItem][1] = config[1].extraRewardYear[i][1]
- item[lenItem][2] = config[1].extraRewardYear[i][2]
- end
- end
-
- if human.db.yellow.lux ~= nil and human.db.yellow.lux.isGet == nil then
- human.db.yellow.lux.isGet = 1
- local lenExtra = #config[lv].extraRewardLux
- for i = 1,lenExtra do
- lenItem = lenItem + 1
- item = item or {}
- item[lenItem] = {}
- item[lenItem][1] = config[1].extraRewardLux[i][1]
- item[lenItem][2] = config[1].extraRewardLux[i][2]
- end
- end
- if item then
- BagLogic.addItemList(human,item, "blue_reward")
- end
- else
- return
- end
- tencentDailyQuery(human,tType,platformType)
- checkDot(human,tType,platformType)
- RoleSystemLogic.onDot(human, RoleSystemDefine.ROLE_SYS_ID_106)
- end
- function cleanDaily(human)
- if human.db.yellow ~= nil and human.db.yellow.lv ~= 0 then
- human.db.yellow.daily = nil
- if human.db.yellow.year ~= nil then
- human.db.yellow.year = {}
- end
- if human.db.yellow.lux ~= nil then
- human.db.yellow.lux = {}
- end
- end
- if human.db.blue ~= nil and human.db.blue.lv ~= 0 then
- human.db.blue.daily = nil
- if human.db.blue.year ~= nil then
- human.db.blue.year = {}
- end
- if human.db.blue.lux ~= nil then
- human.db.blue.lux = {}
- end
- end
- if human.db.txHall ~= nil then
- human.db.txHall.daily = nil
- end
- if human.db.qqZone ~= nil then
- human.db.qqZone.daily = nil
- end
- end
- function isDot(human)
- if (human.db.yellow == nil or human.db.yellow.lv == 0) and (human.db.blue == nil or human.db.blue.lv == 0) and human.db.txHall == nil and human.db.qqZone == nil then
- return
- end
- if human.db.yellow ~= nil and human.db.yellow.lv ~= 0 then
- if human.db.yellow.isGet == nil then
- return true
- end
- if human.db.yellow.daily == nil then
- return true
- end
- if human.db.yellow.year ~= nil and human.db.yellow.year.isGet == nil then
- return true
- end
- if human.db.yellow.lux ~= nil and human.db.yellow.lux.isGet == nil then
- return true
- end
- local config = TequanExcel.hzLvUp
- local lenConfig = #config
- for i = 1,lenConfig do
- if human.db.yellow ~= nil and human.db.yellow.lv ~= 0 and (human.db.yellow.lvup == nil or human.db.yellow.lvup[i] == nil) then
- if human.db.lv >= config[i].needLv then
- return true
- end
- end
- end
- end
- if human.db.blue ~= nil and human.db.blue.lv ~= 0 then
- if human.db.blue.isGet == nil then
- return true
- end
- if human.db.blue.daily == nil then
- return true
- end
- if human.db.blue.year ~= nil and human.db.blue.year.isGet == nil then
- return true
- end
- if human.db.blue.lux ~= nil and human.db.blue.lux.isGet == nil then
- return true
- end
- local config = TequanExcel.lzLvUp
- local lenConfig = #config
- for i = 1,lenConfig do
- if human.db.blue ~= nil and human.db.blue.lv ~= 0 and (human.db.blue.lvup == nil or human.db.blue.lvup[i] == nil) then
- if human.db.lv >= config[i].needLv then
- return true
- end
- end
- end
- end
- return
- end
- function checkDot(human,tType,platformType)
- local msgRet = Msg.gc.GC_QQ_TEQUAN_CHECK_DOT
- msgRet.xinshou = 0
- msgRet.daily = 0
- msgRet.lvup = 0
- if platformType == 2 then
- msgRet.type = 1
- if tType == 0 then
- if human.db.yellow ~= nil and human.db.yellow.lv ~= 0 then
- if human.db.yellow.isGet == nil then
- msgRet.xinshou = 1
- end
- if human.db.yellow.daily == nil then
- msgRet.daily = 1
- end
- if human.db.yellow.year ~= nil and human.db.yellow.year.isGet == nil then
- msgRet.daily = 1
- end
- if human.db.yellow.lux ~= nil and human.db.yellow.lux.isGet == nil then
- msgRet.daily = 1
- end
- local config = TequanExcel.hzLvUp
- local lenConfig = #config
- for i = 1,lenConfig do
- if human.db.yellow ~= nil and human.db.yellow.lv ~= 0 then
- if human.db.yellow.lvup == nil or human.db.yellow.lvup[i] == nil then
- if human.db.lv >= config[i].needLv then
- msgRet.lvup = 1
- break
- end
- end
- end
- end
- end
- else
- if human.db.blue ~= nil and human.db.blue.lv ~= 0 then
- if human.db.blue.isGet == nil then
- msgRet.xinshou = 1
- end
- if human.db.blue.daily == nil then
- msgRet.daily = 1
- end
- if human.db.blue.year ~= nil and human.db.blue.year.isGet == nil then
- msgRet.daily = 1
- end
- if human.db.blue.lux ~= nil and human.db.blue.lux.isGet == nil then
- msgRet.daily = 1
- end
- local config = TequanExcel.lzLvUp
- local lenConfig = #config
- for i = 1,lenConfig do
- if human.db.blue ~= nil and human.db.blue.lv ~= 0 then
- if human.db.blue.lvup == nil or human.db.blue.lvup[i] == nil then
- if human.db.lv >= config[i].needLv then
- msgRet.lvup = 1
- break
- end
- end
- end
- end
- end
- end
- else
- msgRet.type = 2
- if platformType == 1 then
- if human.pf_info.pf ~= "qqgame" then
- return
- end
- if human.db.txHall ~= nil then
- if human.db.txHall.isGet == nil then
- msgRet.xinshou = 1
- end
- if human.db.txHall.daily == nil then
- msgRet.daily = 1
- end
- local config = TequanExcel.txLvUp
- local lenConfig = #config
- for i = 1,lenConfig do
- if human.db.txHall ~= nil then
- if human.db.txHall.lvup == nil or human.db.txHall.lvup[i] == nil then
- if human.db.lv >= config[i].needLv then
- msgRet.lvup = 1
- break
- end
- end
- end
- end
- end
- else
- if human.pf_info.pf ~= "qzone" and human.pf_info.pf ~= "website" then
- return
- end
- if human.db.qqZone ~= nil then
- if human.db.qqZone.isGet == nil then
- msgRet.xinshou = 1
- end
- if human.db.qqZone.daily == nil then
- msgRet.daily = 1
- end
- local config = TequanExcel.txLvUp
- local lenConfig = #config
- for i = 1,lenConfig do
- if human.db.qqZone ~= nil then
- if human.db.qqZone.lvup == nil or human.db.qqZone.lvup[i] == nil then
- if human.db.lv >= config[i].needLv then
- msgRet.lvup = 1
- break
- end
- end
- end
- end
- end
- end
- end
- Msg.send(msgRet,human.fd)
- end
- function setHumanTequan(human,net)
- if net.lvYellow ~= nil and net.lvYellow ~= "0" and net.lvYellow ~= 0 then
- human.db.yellow = human.db.yellow or {}
- human.db.yellow.isAdd = 1
- human.db.yellow.lv = tonumber(net.lvYellow)
- else
- if human.db.yellow ~= nil then
- human.db.yellow.lv = 0
- human.db.yellow.isAdd = nil
- end
- end
- if net.lvBlue ~= nil and net.lvBlue ~= "0" and net.lvBlue ~= 0 then
- human.db.blue = human.db.blue or {}
- human.db.blue.isAdd = 1
- human.db.blue.lv = tonumber(net.lvBlue)
- else
- if human.db.blue ~= nil then
- human.db.blue.lv = 0
- human.db.blue.isAdd = nil
- end
- end
- if net.yearYellow ~= nil and net.yearYellow ~= "0" and net.yearYellow ~= 0 then
- human.db.yellow = human.db.yellow or {}
- human.db.yellow.year = human.db.yellow.year or {}
- else
- if human.db.yellow ~= nil then
- human.db.yellow.year = nil
- end
- end
- if net.yearBlue ~= nil and net.yearBlue ~= "0" and net.yearBlue ~= 0 then
- human.db.blue = human.db.blue or {}
- human.db.blue.year = human.db.blue.year or {}
- else
- if human.db.blue ~= nil then
- human.db.blue.year = nil
- end
- end
- if net.superYellow ~= nil and net.superYellow ~= "0" and net.superYellow ~= 0 then
- human.db.yellow = human.db.yellow or {}
- human.db.yellow.lux = human.db.yellow.lux or {}
- else
- if human.db.yellow ~= nil then
- human.db.yellow.lux = nil
- end
- end
- if net.superBlue ~= nil and net.superBlue ~= "0" and net.superBlue ~= 0 then
- human.db.blue = human.db.blue or {}
- human.db.blue.lux = human.db.blue.lux or {}
- else
- if human.db.blue ~= nil then
- human.db.blue.lux = nil
- end
- end
- if net.pf == "qzone" or net.pf == "website" then
- human.db.qqZone = human.db.qqZone or {}
- end
- if net.pf == "qqgame" then
- human.db.txHall = human.db.txHall or {}
- end
- end
- function jihuopt(human)
- if human.pf_info.pf == "qzone" or human.pf_info.pf == "website" then
- human.db.qqZone = human.db.qqZone or {}
- end
- if human.pf_info.pf == "qqgame" then
- human.db.txHall = human.db.txHall or {}
- end
- end
|