公会副本提交

dev_chengFeng
zhangqiang 2020-08-21 18:22:53 +08:00
parent b725617a8d
commit 0759809be9
7 changed files with 398 additions and 337 deletions

View File

@ -1827,7 +1827,7 @@ RectTransform:
m_GameObject: {fileID: 4864250674772076596}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.7, y: 0.7, z: 1}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 8623671869353108748}
m_Father: {fileID: 8772249491636870108}

View File

@ -347,6 +347,8 @@ GUILDCHALLENGEINDICATION_ISKILL_FIELD = protobuf.FieldDescriptor();
GUILDCHALLENGEBUYBUFFINDICATION = protobuf.Descriptor();
GUILDCHALLENGEBUYBUFFINDICATION_BUFFCOUNT_FIELD = protobuf.FieldDescriptor();
GUILDCHALLENGEBUYBUFFINDICATION_BUFFTIME_FIELD = protobuf.FieldDescriptor();
GUILDCHALLENGEMESSAGERESPONSE = protobuf.Descriptor();
GUILDCHALLENGEMESSAGERESPONSE_NEXTTIME_FIELD = protobuf.FieldDescriptor();
FAMILYUSERINFO_ROLEUID_FIELD.name = "roleUid"
FAMILYUSERINFO_ROLEUID_FIELD.full_name = ".com.ljsd.jieling.protocols.FamilyUserInfo.roleUid"
@ -3513,6 +3515,23 @@ GUILDCHALLENGEBUYBUFFINDICATION.enum_types = {}
GUILDCHALLENGEBUYBUFFINDICATION.fields = {GUILDCHALLENGEBUYBUFFINDICATION_BUFFCOUNT_FIELD, GUILDCHALLENGEBUYBUFFINDICATION_BUFFTIME_FIELD}
GUILDCHALLENGEBUYBUFFINDICATION.is_extendable = false
GUILDCHALLENGEBUYBUFFINDICATION.extensions = {}
GUILDCHALLENGEMESSAGERESPONSE_NEXTTIME_FIELD.name = "nextTime"
GUILDCHALLENGEMESSAGERESPONSE_NEXTTIME_FIELD.full_name = ".com.ljsd.jieling.protocols.GuildChallengeMessageResponse.nextTime"
GUILDCHALLENGEMESSAGERESPONSE_NEXTTIME_FIELD.number = 1
GUILDCHALLENGEMESSAGERESPONSE_NEXTTIME_FIELD.index = 0
GUILDCHALLENGEMESSAGERESPONSE_NEXTTIME_FIELD.label = 1
GUILDCHALLENGEMESSAGERESPONSE_NEXTTIME_FIELD.has_default_value = false
GUILDCHALLENGEMESSAGERESPONSE_NEXTTIME_FIELD.default_value = 0
GUILDCHALLENGEMESSAGERESPONSE_NEXTTIME_FIELD.type = 5
GUILDCHALLENGEMESSAGERESPONSE_NEXTTIME_FIELD.cpp_type = 1
GUILDCHALLENGEMESSAGERESPONSE.name = "GuildChallengeMessageResponse"
GUILDCHALLENGEMESSAGERESPONSE.full_name = ".com.ljsd.jieling.protocols.GuildChallengeMessageResponse"
GUILDCHALLENGEMESSAGERESPONSE.nested_types = {}
GUILDCHALLENGEMESSAGERESPONSE.enum_types = {}
GUILDCHALLENGEMESSAGERESPONSE.fields = {GUILDCHALLENGEMESSAGERESPONSE_NEXTTIME_FIELD}
GUILDCHALLENGEMESSAGERESPONSE.is_extendable = false
GUILDCHALLENGEMESSAGERESPONSE.extensions = {}
CarChallengeItem = protobuf.Message(CARCHALLENGEITEM)
CarDelayProgressIndication = protobuf.Message(CARDELAYPROGRESSINDICATION)
@ -3586,6 +3605,7 @@ GetFamilyMemberInfoResponse = protobuf.Message(GETFAMILYMEMBERINFORESPONSE)
GetGuildChallengeInfoResponse = protobuf.Message(GETGUILDCHALLENGEINFORESPONSE)
GuildChallengeBuyBuffIndication = protobuf.Message(GUILDCHALLENGEBUYBUFFINDICATION)
GuildChallengeIndication = protobuf.Message(GUILDCHALLENGEINDICATION)
GuildChallengeMessageResponse = protobuf.Message(GUILDCHALLENGEMESSAGERESPONSE)
GuildChallengeRequest = protobuf.Message(GUILDCHALLENGEREQUEST)
GuildChallengeResponse = protobuf.Message(GUILDCHALLENGERESPONSE)
GuildFightResultResponse = protobuf.Message(GUILDFIGHTRESULTRESPONSE)

File diff suppressed because one or more lines are too long

View File

@ -438,18 +438,13 @@ function this.RequestSendGuildAid(itemId1,itemId2,func)
end)
end
-- 请求发送公会副本
function this.RequestSendGuildTranscript(itemId1,itemId2,func)
function this.RequestSendGuildTranscript(func)
if not PlayerManager.familyId then return end
-- 构建字符串
local channel = CHAT_CHANNEL.FAMILY
local guildData = MyGuildManager.GetMyGuildInfo()
local content = string.format("【%s】发起了集结号角请全体公会成员前往挑战副本首领",PlayerManager.nickName)
-- 发送消息
NetManager.RequestSendChatMsg(channel, content, 0, function()
local msgId = this.GetMsgIdFlag(channel)
NetManager.RequestChatMsg(channel, msgId, function(data)
if func then func() end
end)
this.RequestSendChatMsg(channel, content, function()
end)
end
-- 请求发送公会红包信息

View File

@ -64,7 +64,12 @@ function GuildTranscriptMainPopup:BindEvent()
-- PopupTipPanel.ShowTip("今日已无剩余次数!")
-- else--是否花费XX妖晶购买1次挑战次数并发起挑战
-- local costId, finalNum, oriCostNum = ShopManager.calculateBuyCost(SHOP_TYPE.FUNCTION_SHOP, GuildTranscriptManager.shopGoodId, 1)
-- MsgPanel.ShowTwo(string.format( "是否花费%s%s购买1次挑战次数并发起挑战",finalNum,ConfigManager.GetConfigData(ConfigName.ItemConfig,costId).Name), nil, function()
-- local itemName = ConfigManager.GetConfigData(ConfigName.ItemConfig,costId).Name
-- if finalNum > BagManager.GetItemCountById(costId) then
-- PopupTipPanel.ShowTip(string.format("%s数量不足",itemName) )
-- return
-- end
-- MsgPanel.ShowTwo(string.format( "是否花费%s%s购买1次挑战次数并发起挑战",finalNum,itemName), nil, function()
-- --买东西
-- ShopManager.RequestBuyShopItem(SHOP_TYPE.FUNCTION_SHOP,GuildTranscriptManager.shopGoodId,1,function()
-- PopupTipPanel.ShowTip("成功购买1次挑战次数")
@ -83,7 +88,12 @@ function GuildTranscriptMainPopup:BindEvent()
-- PopupTipPanel.ShowTip("今日已无剩余次数!")
-- else--是否花费XX妖晶购买1次挑战次数并发起挑战
-- local costId, finalNum, oriCostNum = ShopManager.calculateBuyCost(SHOP_TYPE.FUNCTION_SHOP, GuildTranscriptManager.shopGoodId, 1)
-- MsgPanel.ShowTwo(string.format( "是否花费%s%s购买1次挑战次数并发起扫荡",finalNum,ConfigManager.GetConfigData(ConfigName.ItemConfig,costId).Name), nil, function()
-- local itemName = ConfigManager.GetConfigData(ConfigName.ItemConfig,costId).Name
-- if finalNum > BagManager.GetItemCountById(costId) then
-- PopupTipPanel.ShowTip(string.format("%s数量不足",itemName) )
-- return
-- end
-- MsgPanel.ShowTwo(string.format( "是否花费%s%s购买1次挑战次数并发起扫荡",finalNum,itemName), nil, function()
-- --买东西
-- ShopManager.RequestBuyShopItem(SHOP_TYPE.FUNCTION_SHOP,GuildTranscriptManager.shopGoodId,1,function()
-- PopupTipPanel.ShowTip("成功购买1次扫荡次数")
@ -99,13 +109,20 @@ function GuildTranscriptMainPopup:BindEvent()
-- end
end)
Util.AddClick(this.endNumBtn,function()
MsgPanel.ShowTwo(string.format( "是否花费%s%s购买1次挑战次数",finalNum,ConfigManager.GetConfigData(ConfigName.ItemConfig,costId).Name), nil, function()
--买东西
ShopManager.RequestBuyShopItem(SHOP_TYPE.FUNCTION_SHOP,GuildTranscriptManager.shopGoodId,1,function()
PopupTipPanel.ShowTip("成功购买1次扫荡次数")
this.ShowEndNumInfo()
end)
local costId, finalNum, oriCostNum = ShopManager.calculateBuyCost(SHOP_TYPE.FUNCTION_SHOP, GuildTranscriptManager.shopGoodId, 1)
local itemName = ConfigManager.GetConfigData(ConfigName.ItemConfig,costId).Name
if finalNum > BagManager.GetItemCountById(costId) then
PopupTipPanel.ShowTip(string.format("%s数量不足",itemName) )
return
end
MsgPanel.ShowTwo(string.format( "是否花费%s%s购买1次挑战次数",finalNum,itemName), nil, function()
--买东西
ShopManager.RequestBuyShopItem(SHOP_TYPE.FUNCTION_SHOP,GuildTranscriptManager.shopGoodId,1,function()
PopupTipPanel.ShowTip("成功购买1次扫荡次数")
PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BUY_BATTLENUM, 1)--更新特权
this.ShowEndNumInfo()
end)
end)
end)
-- GuildTranscriptRewardSortPanel
Util.AddClick(this.rankBun,function()
@ -113,7 +130,8 @@ function GuildTranscriptMainPopup:BindEvent()
end)
Util.AddClick(this.sendBtn,function()
local pos = MyGuildManager.GetMyPositionInGuild()
if pos ~= GUILD_GRANT.MEMBER then
LogGreen("pos "..pos)
if pos == GUILD_GRANT.MEMBER then
PopupTipPanel.ShowTip("只有会长和副会长才可使用此功能!")
return
end
@ -121,13 +139,14 @@ function GuildTranscriptMainPopup:BindEvent()
PopupTipPanel.ShowTip("该首领已被击败!")
return
end
NetManager.GuildSendHelpMessageRequest(function (msg)
if msg.sendMessage then
NetManager.GuildChallengeMessageResponse(function (msg)
if msg.nextTime <= 0 then
ChatManager.RequestSendGuildTranscript(function()
-- PopupTipPanel.ShowTip("")
end)
else
PopupTipPanel.ShowTip("XX分XX秒后才可再次使用此功能")
local timeStar = os.date("%Y时%m分%d", msg.nextTime)
PopupTipPanel.ShowTip(string.format("%s后才可再次使用此功能",timeStar) "XX分XX秒后才可再次使用此功能")
end
end)
end)

View File

@ -11,7 +11,7 @@ local buffTime = 0--buff结束时间
this.damage = 0
this.drop = nil--当场战斗掉落
this.shopGoodId = 10014--公会副本挑战价格
this.shopGoodId = 10031--公会副本挑战价格
function this.Initialize()
for _, configInfo in ConfigPairs(guildCheckpointConfig) do
table.insert(allChapterConfigData,configInfo)
@ -49,6 +49,9 @@ function this.GuildChallengeRequest(attackType,callBack)
this.damage = msg.damage
PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.GUILDTRANSCRIPT_BATTLENUM, 1)--更新特权
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop, 1,function()
if callBack then
callBack()
end
end, 6,true,true)
end)
end

View File

@ -4444,6 +4444,20 @@ end
--公会副本购买 buff
function this.GuildChallengeBuyBuffRequest(func)
Network:SendMessageWithCallBack(MessageTypeProto_pb.GUILD_CHALLENGE_BUY_BUFF_REQUEST, MessageTypeProto_pb.GUILD_CHALLENGE_BUY_BUFF_RESPONSE, nil, function(buffer)
if func then
func(msg)
end
end)
end
--公会副本发送号令
function this.GuildChallengeMessageResponse(func)
Network:SendMessageWithCallBack(MessageTypeProto_pb.GUILD_CHALLENGE_SEND_MESSAGE_REQUEST, MessageTypeProto_pb.GUILD_CHALLENGE_SEND_MESSAGE_RESPONSE, msg, function(buffer)
local data = buffer:DataByte()
local msg = Family_pb.GuildChallengeMessageResponse()
msg:ParseFromString(data)
if func then
func(msg)
end
end)
end
return this