--[[
哈喽,哥们
偷摸改了我代码后可以考虑再来发赞助哈
支付宝:18506823312
我滴房租可全靠你们咯!
本来打算弃坑的,奈何换工作后房租疯涨
为了不睡在公园长椅上,只好继续出售模(jie)组(cao)咯~
		--BY 快交不起房租的 天地
]]
local TD_R=td1madao_sv()local TD_V={}TD_V[8]=TD_R({125,123,130})TD_V[20]=TD_R({185,189,200,180,175,214,228,177,213,180,200,213})TD_V[6]=TD_R({103,261,222,232,251,238,232,259,231,266,260,239,288,250,277,241,284,248,283,262,260,291})TD_V[7]=TD_R({103,261,222,258,263,258,240,269,271,210,238,273,252,250,281})TD_V[16]=TD_R({261,239,260,236,229,236,194,273,259})TD_V[25]=TD_R({261,239,234,194,251,230,280,241,269,200,264,261,288})TD_V[28]=TD_R({169,221,170,202})TD_V[19]=TD_R({171,201,178,170})TD_V[30]=TD_R({169,221,164})TD_V[4]=TD_R({127})TD_V[33]=TD_R({169,221,186})TD_V[36]=TD_R({169,221,162})TD_V[12]=TD_R({129})TD_V[21]=TD_R({169,221,184})TD_V[37]=TD_R({261,259,274})TD_V[15]=TD_R({239,251,262,266})TD_V[5]=TD_R({261,225,260,240,237,268})TD_V[34]=TD_R({257,233})TD_V[14]=TD_R({163,189,188,200,203})TD_V[32]=TD_R({253,247,226,276,237,264})TD_V[13]=TD_R({261,231,130,252,229,236,232,261})TD_V[2]=TD_R({241,261,254,254,201,268,266})TD_V[24]=TD_R({163,183,178,172,191,204,228,179,197})TD_V[9]=TD_R({227,247,234,228,255,238,266})TD_V[3]=TD_R({137})TD_V[11]=TD_R({103,261,222,254,257,268,248,243,283,232,276,239,276,262})TD_V[27]=TD_R({169,221,176})TD_V[35]=TD_R({169,221,170,170})TD_V[18]=TD_R({253,247,226,276,237,264,206,233,269,248,246,277})TD_V[29]=TD_R({169,221,174,186})TD_V[23]=TD_R({171})TD_V[22]=TD_R({249,225,250,236})TD_V[31]=TD_R({169,221,168,174})TD_V[17]=TD_R({261,239,260,236,229,236,172,233,261,212,274,247})TD_V[26]=TD_R({169,221,170,190})TD_V[1]=TD_R({231,251,250,228,225,236,268,271,231,274,244,143,264,242,249,245,274})TD_V[38]=TD_R({169,221,170,172})TD_V[10]=TD_R({131})TD_R=TD_V local TD=TD[TD_V[13]][TD_V[1]]local CONST=TD[TD_V[14]]local sendMsgName=TD_V[2]local myComponent=Class(function(self,inst)self[TD_V[15]]=inst local threadNum=TN(TD_V[3])self[TD_V[16]]=threadNum self[TD_V[17]]=threadNum-TN(TD_V[4])self[TD_V[18]]=net_entity(inst[TD_V[19]],CONST[TD_V[20]]..TD_V[5],CONST[TD_V[20]]..TD_V[5])self:getTarget()for i=TN(TD_V[4]),threadNum do self[sendMsgName..tostring(i)]=net_string(inst[TD_V[19]],CONST[TD_V[20]]..tostring(i),CONST[TD_V[20]]..tostring(i))if not TD[TD_V[21]]()then self[TD_V[15]]:ListenForEvent(CONST[TD_V[20]]..tostring(i),function()local param=self:player_getJsonObj(i)if not param or not param[TD_V[22]]then return end local name=param[TD_V[22]]local client=TD[TD_V[23]][TD_V[24]]if not client or not name then return end param[TD_V[15]]=self[TD_V[15]]if param[TD_V[25]]and self[TD_V[15]]~=ThePlayer then return end TD[TD_V[26]](self:common_getStr(i),false)if client[name]then client[name](param)end end)end end end)function myComponent:setTarget(target)if target~=nil then self[TD_V[18]]:set(target)end end function myComponent:getTarget()local target=self[TD_V[18]]:value()if target~=nil then TD[TD_V[27]](function()self[TD_V[18]]:set(nil)end,function()TD[TD_V[28]](TD[TD_V[29]](TD_V[6]),{})end)end return target end local taskName=TD[TD_V[29]](TD_V[7])function myComponent:proessTarget(fn)if TD[TD_V[30]](fn)then TD[TD_V[31]](self[TD_V[15]],function(comp)comp:common_period(TN(TD_V[8]),function()local target=self:getTarget()if target~=nil then fn(target)comp:common_clean(taskName)comp:common_clean(taskName..TD_V[9])end end,taskName,TN(TD_V[10]))end)end end function myComponent:server_send(name,param,allPlayer)self:server_setJsonObj(name,param,allPlayer)end function myComponent:server_setJsonObj(name,obj,allPlayer)if not obj or not name then return end obj[TD_V[22]]=name if not allPlayer then obj[TD_V[25]]=true end if obj[TD_V[32]]then obj[TD_V[32]]=nil end if obj[TD_V[15]]then obj[TD_V[15]]=nil end if TD[TD_V[33]](self[TD_V[15]])then local client=TD[TD_V[23]][TD_V[24]]if not client or not name then return end obj[TD_V[15]]=self[TD_V[15]]if obj[TD_V[25]]and self[TD_V[15]]~=ThePlayer then return end if client[name]then client[name](obj)end else local sendSuccess=false for i=TN(TD_V[4]),self[TD_V[17]]do if not TD[TD_V[31]](self[TD_V[15]]):common_exist(TD[TD_V[29]](TD_V[11])..tostring(i))then local jsonObj=self:server_getJsonObj(i)local reverter=jsonObj[TD_V[34]]if not reverter or reverter==TN(TD_V[4])then obj[TD_V[34]]=TN(TD_V[12])else obj[TD_V[34]]=TN(TD_V[4])end local jsonStrMsg=TD[TD_V[35]](obj)TD[TD_V[26]](jsonStrMsg,true,self[TD_V[15]])TD[TD_V[31]](self[TD_V[15]]):common_task(TN(TD_V[8]),TD[TD_V[36]],TD[TD_V[29]](TD_V[11])..tostring(i))self[sendMsgName..tostring(i)]:set(jsonStrMsg)sendSuccess=true break; end end if not sendSuccess then self[sendMsgName..tostring(self[TD_V[16]])]:set(jsonStrMsg)end end end function myComponent:common_getStr(num)return tostring(self[sendMsgName..tostring(num)]:value())end function myComponent:common_getJsonObj(num)local returnResult TD[TD_V[37]](function()local res=self:common_getStr(num)returnResult=TD[TD_V[38]](res)end)return returnResult or{}end function myComponent:player_getJsonObj(num)return self:common_getJsonObj(num)end function myComponent:server_getJsonObj(num)return self:common_getJsonObj(num)end return myComponent
