Merge branch 'china/dev' into 0功能/灵脉秘境
commit
336ea6b8d3
|
@ -2036,7 +2036,7 @@ function LanguageFontSizeFilter(text, size)
|
||||||
end
|
end
|
||||||
|
|
||||||
function SetHeroIcon(spLoader, heroData,icon,heroConfig)
|
function SetHeroIcon(spLoader, heroData,icon,heroConfig)
|
||||||
LogGreen("heroData.skinId:"..tostring(heroData.skinId))
|
-- LogGreen("heroData.skinId:"..tostring(heroData.skinId))
|
||||||
if not heroData.skinId or heroData.skinId == 0 then
|
if not heroData.skinId or heroData.skinId == 0 then
|
||||||
icon.sprite = spLoader:LoadSprite(GetResourcePath(heroConfig.Icon))
|
icon.sprite = spLoader:LoadSprite(GetResourcePath(heroConfig.Icon))
|
||||||
else
|
else
|
||||||
|
|
|
@ -318,6 +318,7 @@ GIFTGOODSINFO_BUYTIMES_FIELD = protobuf.FieldDescriptor();
|
||||||
GIFTGOODSINFO_STARTTIME_FIELD = protobuf.FieldDescriptor();
|
GIFTGOODSINFO_STARTTIME_FIELD = protobuf.FieldDescriptor();
|
||||||
GIFTGOODSINFO_ENDTIME_FIELD = protobuf.FieldDescriptor();
|
GIFTGOODSINFO_ENDTIME_FIELD = protobuf.FieldDescriptor();
|
||||||
GIFTGOODSINFO_DYNAMICBUYTIMES_FIELD = protobuf.FieldDescriptor();
|
GIFTGOODSINFO_DYNAMICBUYTIMES_FIELD = protobuf.FieldDescriptor();
|
||||||
|
GIFTGOODSINFO_ISBOUGHT_FIELD = protobuf.FieldDescriptor();
|
||||||
GOODSTYPEDURATION = protobuf.Descriptor();
|
GOODSTYPEDURATION = protobuf.Descriptor();
|
||||||
GOODSTYPEDURATION_GOODSTYPE_FIELD = protobuf.FieldDescriptor();
|
GOODSTYPEDURATION_GOODSTYPE_FIELD = protobuf.FieldDescriptor();
|
||||||
GOODSTYPEDURATION_ENDTIME_FIELD = protobuf.FieldDescriptor();
|
GOODSTYPEDURATION_ENDTIME_FIELD = protobuf.FieldDescriptor();
|
||||||
|
@ -3836,11 +3837,21 @@ GIFTGOODSINFO_DYNAMICBUYTIMES_FIELD.default_value = 0
|
||||||
GIFTGOODSINFO_DYNAMICBUYTIMES_FIELD.type = 5
|
GIFTGOODSINFO_DYNAMICBUYTIMES_FIELD.type = 5
|
||||||
GIFTGOODSINFO_DYNAMICBUYTIMES_FIELD.cpp_type = 1
|
GIFTGOODSINFO_DYNAMICBUYTIMES_FIELD.cpp_type = 1
|
||||||
|
|
||||||
|
GIFTGOODSINFO_ISBOUGHT_FIELD.name = "isBought"
|
||||||
|
GIFTGOODSINFO_ISBOUGHT_FIELD.full_name = ".rpc.protocols.GiftGoodsInfo.isBought"
|
||||||
|
GIFTGOODSINFO_ISBOUGHT_FIELD.number = 6
|
||||||
|
GIFTGOODSINFO_ISBOUGHT_FIELD.index = 5
|
||||||
|
GIFTGOODSINFO_ISBOUGHT_FIELD.label = 1
|
||||||
|
GIFTGOODSINFO_ISBOUGHT_FIELD.has_default_value = false
|
||||||
|
GIFTGOODSINFO_ISBOUGHT_FIELD.default_value = 0
|
||||||
|
GIFTGOODSINFO_ISBOUGHT_FIELD.type = 5
|
||||||
|
GIFTGOODSINFO_ISBOUGHT_FIELD.cpp_type = 1
|
||||||
|
|
||||||
GIFTGOODSINFO.name = "GiftGoodsInfo"
|
GIFTGOODSINFO.name = "GiftGoodsInfo"
|
||||||
GIFTGOODSINFO.full_name = ".rpc.protocols.GiftGoodsInfo"
|
GIFTGOODSINFO.full_name = ".rpc.protocols.GiftGoodsInfo"
|
||||||
GIFTGOODSINFO.nested_types = {}
|
GIFTGOODSINFO.nested_types = {}
|
||||||
GIFTGOODSINFO.enum_types = {}
|
GIFTGOODSINFO.enum_types = {}
|
||||||
GIFTGOODSINFO.fields = {GIFTGOODSINFO_GOODSID_FIELD, GIFTGOODSINFO_BUYTIMES_FIELD, GIFTGOODSINFO_STARTTIME_FIELD, GIFTGOODSINFO_ENDTIME_FIELD, GIFTGOODSINFO_DYNAMICBUYTIMES_FIELD}
|
GIFTGOODSINFO.fields = {GIFTGOODSINFO_GOODSID_FIELD, GIFTGOODSINFO_BUYTIMES_FIELD, GIFTGOODSINFO_STARTTIME_FIELD, GIFTGOODSINFO_ENDTIME_FIELD, GIFTGOODSINFO_DYNAMICBUYTIMES_FIELD, GIFTGOODSINFO_ISBOUGHT_FIELD}
|
||||||
GIFTGOODSINFO.is_extendable = false
|
GIFTGOODSINFO.is_extendable = false
|
||||||
GIFTGOODSINFO.extensions = {}
|
GIFTGOODSINFO.extensions = {}
|
||||||
GOODSTYPEDURATION_GOODSTYPE_FIELD.name = "goodsType"
|
GOODSTYPEDURATION_GOODSTYPE_FIELD.name = "goodsType"
|
||||||
|
|
|
@ -616,7 +616,9 @@ function BattleUtil.ApplyDamage(skill, atkRole, defRole, damage, bCrit, damageTy
|
||||||
-- end
|
-- end
|
||||||
-- damage = floor(max(damage * (1 + n / #arr - defRole:GetRoleData(RoleDataName.TeamDamageReduceFactor)), 0.3 * damage))
|
-- damage = floor(max(damage * (1 + n / #arr - defRole:GetRoleData(RoleDataName.TeamDamageReduceFactor)), 0.3 * damage))
|
||||||
-- end
|
-- end
|
||||||
|
-- 计算护盾减伤
|
||||||
|
|
||||||
|
damage = BattleUtil.CalShield(atkRole, defRole, damage,skill)
|
||||||
--加入被动效果
|
--加入被动效果
|
||||||
local damagingFunc = function(dmgDeduction)
|
local damagingFunc = function(dmgDeduction)
|
||||||
damage = damage - dmgDeduction
|
damage = damage - dmgDeduction
|
||||||
|
@ -625,10 +627,6 @@ function BattleUtil.ApplyDamage(skill, atkRole, defRole, damage, bCrit, damageTy
|
||||||
defRole.Event:DispatchEvent(BattleEventName.PassiveBeDamaging, damagingFunc, atkRole, damage, skill, dotType, bCrit)
|
defRole.Event:DispatchEvent(BattleEventName.PassiveBeDamaging, damagingFunc, atkRole, damage, skill, dotType, bCrit)
|
||||||
BattleLogic.Event:DispatchEvent(BattleEventName.PassiveDamaging, damagingFunc, atkRole, defRole, damage, skill, dotType, bCrit,damageType, dotType,isDirect)
|
BattleLogic.Event:DispatchEvent(BattleEventName.PassiveDamaging, damagingFunc, atkRole, defRole, damage, skill, dotType, bCrit,damageType, dotType,isDirect)
|
||||||
|
|
||||||
-- 计算护盾减伤
|
|
||||||
|
|
||||||
damage = BattleUtil.CalShield(atkRole, defRole, damage,skill)
|
|
||||||
|
|
||||||
-- 造成的最终伤害
|
-- 造成的最终伤害
|
||||||
local damagingFunc = function(dmgDeduction)
|
local damagingFunc = function(dmgDeduction)
|
||||||
damage = damage - dmgDeduction
|
damage = damage - dmgDeduction
|
||||||
|
@ -660,9 +658,14 @@ function BattleUtil.ApplyDamageNoPassive(skill, atkRole, defRole, damage, bCrit,
|
||||||
end
|
end
|
||||||
|
|
||||||
atkRole.Event:DispatchEvent(BattleEventName.PassiveDamaging, damagingFunc, defRole, damage, skill, dotType, bCrit,damageType, dotType,isDirect)
|
atkRole.Event:DispatchEvent(BattleEventName.PassiveDamaging, damagingFunc, defRole, damage, skill, dotType, bCrit,damageType, dotType,isDirect)
|
||||||
|
defRole.Event:DispatchEvent(BattleEventName.PassiveBeDamaging, damagingFunc, atkRole, damage, skill, dotType, bCrit)
|
||||||
|
BattleLogic.Event:DispatchEvent(BattleEventName.PassiveDamaging, damagingFunc, atkRole, defRole, damage, skill, dotType, bCrit,damageType, dotType,isDirect)
|
||||||
|
|
||||||
|
|
||||||
|
atkRole.Event:DispatchEvent(BattleEventName.FinalDamage, damagingFunc, defRole, damage, skill, dotType, bCrit, damageType)
|
||||||
|
defRole.Event:DispatchEvent(BattleEventName.FinalBeDamage, damagingFunc, atkRole, damage, skill, dotType, bCrit, damageType)
|
||||||
defRole.Event:DispatchEvent(BattleEventName.FinalBeDamageEnd, damagingFunc, atkRole, damage, skill, dotType, bCrit, damageType,isDirect)
|
defRole.Event:DispatchEvent(BattleEventName.FinalBeDamageEnd, damagingFunc, atkRole, damage, skill, dotType, bCrit, damageType,isDirect)
|
||||||
BattleLogic.Event:DispatchEvent(BattleEventName.FinalDamage, damagingFunc, atkRole, defRole, damage, skill, dotType, bCrit, damageType)
|
BattleLogic.Event:DispatchEvent(BattleEventName.FinalDamage, damagingFunc, atkRole, defRole, damage, skill, dotType, bCrit, damageType)
|
||||||
|
|
||||||
--
|
--
|
||||||
return BattleUtil.FinalDamage(skill, atkRole, defRole, damage, bCrit, damageType, dotType,isDirect)
|
return BattleUtil.FinalDamage(skill, atkRole, defRole, damage, bCrit, damageType, dotType,isDirect)
|
||||||
end
|
end
|
||||||
|
|
|
@ -224,8 +224,11 @@ function this:OnOpen(_fightData, _fightType, _endFunc, _guideType,isChangeBGM)
|
||||||
isBack = _fightType == BATTLE_TYPE.BACK --判定是否是战斗回放
|
isBack = _fightType == BATTLE_TYPE.BACK --判定是否是战斗回放
|
||||||
hadCounted = 0
|
hadCounted = 0
|
||||||
-- LogPink(fightType)
|
-- LogPink(fightType)
|
||||||
|
if _fightData.bg then
|
||||||
|
this.BG:GetComponent("Image").sprite = this.spLoader:LoadSprite(_fightData.bg)
|
||||||
|
else
|
||||||
this.BG:GetComponent("Image").sprite = this.spLoader:LoadSprite(BattleManager.GetBattleBg(fightType))
|
this.BG:GetComponent("Image").sprite = this.spLoader:LoadSprite(BattleManager.GetBattleBg(fightType))
|
||||||
|
end
|
||||||
-- SoundManager.PlayMusic(SoundConfig.BGM_Battle_1, true, function()
|
-- SoundManager.PlayMusic(SoundConfig.BGM_Battle_1, true, function()
|
||||||
if not isChangeBGM then
|
if not isChangeBGM then
|
||||||
SoundManager.PlayMusic(SoundConfig.BGM_Battle_2, false)
|
SoundManager.PlayMusic(SoundConfig.BGM_Battle_2, false)
|
||||||
|
|
|
@ -412,6 +412,7 @@ function this.InitBattleEvent()
|
||||||
BattleLogic.Event:AddEvent(BattleEventName.BattleEnd, this.EndBattle)
|
BattleLogic.Event:AddEvent(BattleEventName.BattleEnd, this.EndBattle)
|
||||||
BattleLogic.Event:AddEvent(BattleEventName.BattleOrderChange, this.BattleOrderChange)
|
BattleLogic.Event:AddEvent(BattleEventName.BattleOrderChange, this.BattleOrderChange)
|
||||||
BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, this.BattleRoundChange)
|
BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, this.BattleRoundChange)
|
||||||
|
BattleLogic.Event:AddEvent(BattleEventName.BattleRoundEnd, this.BattleRoundEnd)
|
||||||
BattleLogic.Event:AddEvent(BattleEventName.RoleTurnStart, this.RoleTurnChange)
|
BattleLogic.Event:AddEvent(BattleEventName.RoleTurnStart, this.RoleTurnChange)
|
||||||
BattleLogic.Event:AddEvent(BattleEventName.BattleStart, this.OnBattleStart)
|
BattleLogic.Event:AddEvent(BattleEventName.BattleStart, this.OnBattleStart)
|
||||||
|
|
||||||
|
@ -426,6 +427,7 @@ function this.ClearBattleEvent()
|
||||||
BattleLogic.Event:RemoveEvent(BattleEventName.BattleEnd, this.EndBattle)
|
BattleLogic.Event:RemoveEvent(BattleEventName.BattleEnd, this.EndBattle)
|
||||||
BattleLogic.Event:RemoveEvent(BattleEventName.BattleOrderChange, this.BattleOrderChange)
|
BattleLogic.Event:RemoveEvent(BattleEventName.BattleOrderChange, this.BattleOrderChange)
|
||||||
BattleLogic.Event:RemoveEvent(BattleEventName.BattleRoundChange, this.BattleRoundChange)
|
BattleLogic.Event:RemoveEvent(BattleEventName.BattleRoundChange, this.BattleRoundChange)
|
||||||
|
BattleLogic.Event:RemoveEvent(BattleEventName.BattleRoundEnd, this.BattleRoundEnd)
|
||||||
BattleLogic.Event:RemoveEvent(BattleEventName.RoleTurnStart, this.RoleTurnChange)
|
BattleLogic.Event:RemoveEvent(BattleEventName.RoleTurnStart, this.RoleTurnChange)
|
||||||
BattleLogic.Event:RemoveEvent(BattleEventName.BattleStart, this.OnBattleStart)
|
BattleLogic.Event:RemoveEvent(BattleEventName.BattleStart, this.OnBattleStart)
|
||||||
end
|
end
|
||||||
|
@ -507,6 +509,14 @@ function this.RoleTurnChange(role)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- 回合结束
|
||||||
|
function this.BattleRoundEnd(Round)
|
||||||
|
-- 回调UI层
|
||||||
|
if this.root.BattleRoundEnd then
|
||||||
|
this.root.BattleRoundEnd(Round)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- 回合变化
|
-- 回合变化
|
||||||
function this.BattleRoundChange(Round)
|
function this.BattleRoundChange(Round)
|
||||||
-- 回调UI层
|
-- 回调UI层
|
||||||
|
|
|
@ -79,6 +79,33 @@ function GuideBattleLogic:OnBattleStart(func)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function GuideBattleLogic:BattleRoundEnd(round)
|
||||||
|
-- 没有就不引导了
|
||||||
|
if not self.configList or #self.configList <= 0 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local _config = nil
|
||||||
|
for _, con in ipairs(self.configList) do
|
||||||
|
if con.Round == -3 and con.Camp == round then -- 战中第n回合触发
|
||||||
|
_config = con
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if not _config then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
-- 对话形式的引导
|
||||||
|
if _config.TriggerType == 1 then
|
||||||
|
BattleManager.SetGuidePause(true)
|
||||||
|
local storyId = _config.TriggerId
|
||||||
|
StoryManager.EventTrigger(storyId, function()
|
||||||
|
BattleManager.SetGuidePause(false)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 战斗结束
|
||||||
function GuideBattleLogic:OnBattleEnd(func)
|
function GuideBattleLogic:OnBattleEnd(func)
|
||||||
-- 没有就不引导了
|
-- 没有就不引导了
|
||||||
if not self.configList or #self.configList <= 0 then
|
if not self.configList or #self.configList <= 0 then
|
||||||
|
|
|
@ -86,10 +86,10 @@ function this:OnOpen(_fightData, _endFunc, guideType)
|
||||||
endFunc = _endFunc
|
endFunc = _endFunc
|
||||||
|
|
||||||
fightType = BATTLE_TYPE.Test --判定战斗类型
|
fightType = BATTLE_TYPE.Test --判定战斗类型
|
||||||
if guideType == 1 then
|
if _fightData.bg then
|
||||||
this.BG:GetComponent("Image").sprite = this.spLoader:LoadSprite("r_zhandou_changjing_1005")
|
this.BG:GetComponent("Image").sprite = this.spLoader:LoadSprite(_fightData.bg)
|
||||||
else
|
else
|
||||||
this.BG:GetComponent("Image").sprite = this.spLoader:LoadSprite("r_zhandou_changjing_2")
|
this.BG:GetComponent("Image").sprite = this.spLoader:LoadSprite(BattleManager.GetBattleBg(fightType))
|
||||||
end
|
end
|
||||||
|
|
||||||
this.BtnGM:SetActive(true)
|
this.BtnGM:SetActive(true)
|
||||||
|
@ -183,6 +183,14 @@ function this.OnRoundChanged(round)
|
||||||
local curRound, maxRound = BattleLogic.GetCurRound()
|
local curRound, maxRound = BattleLogic.GetCurRound()
|
||||||
this.roundText.text = string.format(Language[10211], curRound, maxRound)
|
this.roundText.text = string.format(Language[10211], curRound, maxRound)
|
||||||
|
|
||||||
|
--显示波次
|
||||||
|
GuideBattleLogic:OnRoundChanged(round)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 回合结束
|
||||||
|
function this.BattleRoundEnd(Round)
|
||||||
|
-- 回调UI层
|
||||||
|
GuideBattleLogic.BattleRoundEnd(Round)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 角色轮转回调
|
-- 角色轮转回调
|
||||||
|
|
|
@ -781,7 +781,7 @@ function this.CreatSingleMissionData(missionData,havaBought)
|
||||||
if missionData.state == 0 then
|
if missionData.state == 0 then
|
||||||
if PlayerManager.level < actRewardConfig[data.missionId].Values[1][2] then
|
if PlayerManager.level < actRewardConfig[data.missionId].Values[1][2] then
|
||||||
data.state = -1
|
data.state = -1
|
||||||
elseif havaBought.buyTimes > 0 then
|
elseif havaBought.isBought > 0 then
|
||||||
data.state = 2
|
data.state = 2
|
||||||
else
|
else
|
||||||
data.state = 0
|
data.state = 0
|
||||||
|
|
|
@ -128,7 +128,7 @@ end
|
||||||
function GrowthGiftPage:SetBtnInvestState()
|
function GrowthGiftPage:SetBtnInvestState()
|
||||||
self.curGiftsId = GlobalActivity[self.curActiId].CanBuyRechargeId[1]
|
self.curGiftsId = GlobalActivity[self.curActiId].CanBuyRechargeId[1]
|
||||||
self.gift = OperatingManager.GetGiftGoodsInfo(GoodsTypeDef.GrowthReward, self.curGiftsId)
|
self.gift = OperatingManager.GetGiftGoodsInfo(GoodsTypeDef.GrowthReward, self.curGiftsId)
|
||||||
if self.gift and self.gift.buyTimes == 0 then
|
if self.gift and self.gift.isBought == 0 then
|
||||||
self.btnInvest:GetComponent("Button").enabled = true
|
self.btnInvest:GetComponent("Button").enabled = true
|
||||||
local rechargeConfig = ConfigManager.GetConfigData(ConfigName.RechargeCommodityConfig, self.curGiftsId)
|
local rechargeConfig = ConfigManager.GetConfigData(ConfigName.RechargeCommodityConfig, self.curGiftsId)
|
||||||
self.btnInvestText.text = string.format(MoneyUtil.GetMoneyUnitName(),MoneyUtil.GetMoney(rechargeConfig.Price))--"$98"
|
self.btnInvestText.text = string.format(MoneyUtil.GetMoneyUnitName(),MoneyUtil.GetMoney(rechargeConfig.Price))--"$98"
|
||||||
|
|
|
@ -48,9 +48,8 @@ function this.SetBasicValues(giftGoodsList)
|
||||||
if giftGoodsInfo.goodsId and giftGoodsInfo.goodsId ~= 0 then
|
if giftGoodsInfo.goodsId and giftGoodsInfo.goodsId ~= 0 then
|
||||||
local rechargeConfigLocal = ConfigManager.TryGetConfigData(ConfigName.RechargeCommodityConfig, giftGoodsInfo.goodsId)
|
local rechargeConfigLocal = ConfigManager.TryGetConfigData(ConfigName.RechargeCommodityConfig, giftGoodsInfo.goodsId)
|
||||||
if rechargeConfigLocal then
|
if rechargeConfigLocal then
|
||||||
-- LogBlue("------充值活动-----------礼包类型:".. rechargeConfigLocal.Type .." 礼包ID:".. giftGoodsInfo.goodsId .." 已购:"
|
-- LogBlue("礼包类型:"..tostring(rechargeConfigLocal.Type).." 礼包ID:"..tostring(giftGoodsInfo.goodsId).." 已购:"..tostring(giftGoodsInfo.buyTimes)
|
||||||
-- ..giftGoodsInfo.buyTimes.." 开始:"..giftGoodsInfo.startTime.." 结束:"
|
-- .."次 开始时间:"..tostring(giftGoodsInfo.startTime).." 结束时间:"..tostring(giftGoodsInfo.endTime).. " 可购:" ..tostring(giftGoodsInfo.dynamicBuyTimes).." 是否已买:"..tostring(giftGoodsInfo.isBought))
|
||||||
-- ..giftGoodsInfo.endTime .. " 可购(没卵用):" .. giftGoodsInfo.dynamicBuyTimes)
|
|
||||||
if giftGoodsInfo.endTime == 0 and giftGoodsInfo.startTime == 0 and (rechargeConfigLocal.ShowType == 25 or rechargeConfigLocal.ShowType == 26 or rechargeConfigLocal.ShowType == 8) then
|
if giftGoodsInfo.endTime == 0 and giftGoodsInfo.startTime == 0 and (rechargeConfigLocal.ShowType == 25 or rechargeConfigLocal.ShowType == 26 or rechargeConfigLocal.ShowType == 8) then
|
||||||
else
|
else
|
||||||
if giftGoodsInfoList[rechargeConfigLocal.Type] then
|
if giftGoodsInfoList[rechargeConfigLocal.Type] then
|
||||||
|
@ -58,7 +57,7 @@ function this.SetBasicValues(giftGoodsList)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
LogError("服务器发过来一个前端表中不存在的礼包:"..giftGoodsInfo.goodsId)
|
LogError("服务器发过来一个前端表中不存在的礼包:"..tostring(giftGoodsInfo.goodsId))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -146,8 +146,8 @@ function CreateNamePopup:BindEvent()
|
||||||
this.curName = this.textName.text
|
this.curName = this.textName.text
|
||||||
local callBack = function()
|
local callBack = function()
|
||||||
if this.options then
|
if this.options then
|
||||||
-- self:ClosePanel()
|
self:ClosePanel()
|
||||||
StoryManager.StoryJumpType(this.options[1], self)
|
StoryManager.StoryJumpType(this.options[1], nil, this.callBackFunc)
|
||||||
else
|
else
|
||||||
PopupTipPanel.ShowTip(Language[10837])
|
PopupTipPanel.ShowTip(Language[10837])
|
||||||
this:ClosePanel()
|
this:ClosePanel()
|
||||||
|
@ -181,7 +181,7 @@ function CreateNamePopup:BindEvent()
|
||||||
local callBack = function()
|
local callBack = function()
|
||||||
if this.options then
|
if this.options then
|
||||||
self:ClosePanel()
|
self:ClosePanel()
|
||||||
StoryManager.StoryJumpType(this.options[1], self)
|
StoryManager.StoryJumpType(this.options[1], nil, this.callBackFunc)
|
||||||
-- 发送创建角色事件
|
-- 发送创建角色事件
|
||||||
CustomEventManager.SendCustomEvents(FBSDKCustomEventType.CreateCharacter)
|
CustomEventManager.SendCustomEvents(FBSDKCustomEventType.CreateCharacter)
|
||||||
CustomEventManager.SendCustomEvents(FBSDKCustomEventType.RoleLv,1)
|
CustomEventManager.SendCustomEvents(FBSDKCustomEventType.RoleLv,1)
|
||||||
|
@ -301,6 +301,7 @@ function CreateNamePopup:OnOpen(...)
|
||||||
this.eventId = args[2]
|
this.eventId = args[2]
|
||||||
this.showValues = args[3]
|
this.showValues = args[3]
|
||||||
this.options = args[4]
|
this.options = args[4]
|
||||||
|
this.callBackFunc = args[5]
|
||||||
this.InitName()
|
this.InitName()
|
||||||
this.RefreshShow()
|
this.RefreshShow()
|
||||||
end
|
end
|
||||||
|
|
|
@ -137,6 +137,7 @@ function RoleGodSoulLayout:SetHeroData(heroGo,heroData,isCur)
|
||||||
elseif starType == 2 then
|
elseif starType == 2 then
|
||||||
starSize = Vector2.New(60,60)
|
starSize = Vector2.New(60,60)
|
||||||
end
|
end
|
||||||
|
frame.sprite = self.spLoader:LoadSprite(GetHeroQuantityImageByquality(heroData.heroConfig.Quality,self.star))
|
||||||
else
|
else
|
||||||
if starType == 3 then
|
if starType == 3 then
|
||||||
starSize = Vector2.New(0.65,-29.2)
|
starSize = Vector2.New(0.65,-29.2)
|
||||||
|
@ -144,8 +145,8 @@ function RoleGodSoulLayout:SetHeroData(heroGo,heroData,isCur)
|
||||||
elseif starType == 2 then
|
elseif starType == 2 then
|
||||||
starSize = Vector2.New(34.492,32.767)
|
starSize = Vector2.New(34.492,32.767)
|
||||||
end
|
end
|
||||||
|
frame.sprite = self.spLoader:LoadSprite(GetHeroQuantityImageByquality(heroData.heroConfig.Quality,heroData.star))
|
||||||
end
|
end
|
||||||
frame.sprite = self.spLoader:LoadSprite(GetHeroQuantityImageByquality(heroData.heroConfig.Quality,self.star))
|
|
||||||
proIcon.sprite = self.spLoader:LoadSprite(GetProStrImageByProNum(heroData.heroConfig.PropertyName))
|
proIcon.sprite = self.spLoader:LoadSprite(GetProStrImageByProNum(heroData.heroConfig.PropertyName))
|
||||||
SetHeroIcon(self.spLoader,heroData,icon,heroData.heroConfig)
|
SetHeroIcon(self.spLoader,heroData,icon,heroData.heroConfig)
|
||||||
SetHeroStars(self.spLoader, starGrid, star,starType,starSize,starScale)
|
SetHeroStars(self.spLoader, starGrid, star,starType,starSize,starScale)
|
||||||
|
|
|
@ -5,6 +5,7 @@ local chapterDataConfig = ConfigManager.GetConfig(ConfigName.ChapterEventPointCo
|
||||||
local chapterOptionData = ConfigManager.GetConfig(ConfigName.ChapterOptionConfig)
|
local chapterOptionData = ConfigManager.GetConfig(ConfigName.ChapterOptionConfig)
|
||||||
local chapterTitleData = ConfigManager.GetConfig(ConfigName.LevelSetting)
|
local chapterTitleData = ConfigManager.GetConfig(ConfigName.LevelSetting)
|
||||||
local dialogueSetData = ConfigManager.GetConfig(ConfigName.DialogueViewConfig)
|
local dialogueSetData = ConfigManager.GetConfig(ConfigName.DialogueViewConfig)
|
||||||
|
local FakeBattleNew = ConfigManager.GetConfig(ConfigName.FakeBattleNew)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -49,14 +50,15 @@ function this.EventTrigger(eventId, callBack)
|
||||||
UIManager.OpenPanel(UIName.StoryDialoguePanel, eventId, false)
|
UIManager.OpenPanel(UIName.StoryDialoguePanel, eventId, false)
|
||||||
--UIManager.OpenPanel(UIName.StoryOptionPopup, eventId)
|
--UIManager.OpenPanel(UIName.StoryOptionPopup, eventId)
|
||||||
elseif showType == 10 then -- 起名字界面
|
elseif showType == 10 then -- 起名字界面
|
||||||
UIManager.OpenPanel(UIName.CreateNamePopup, showType, eventId, showValues, options)
|
UIManager.OpenPanel(UIName.CreateNamePopup, showType, eventId, showValues, options, callBack)
|
||||||
elseif showType == 14 then -- 引导战斗
|
elseif showType == 14 then -- 引导战斗
|
||||||
local fdata, fseed = BattleManager.GetFakeBattleData(options[1])
|
local fdata, fseed = BattleManager.GetFakeBattleData(options[1])
|
||||||
local testFightData = {
|
local testFightData = {
|
||||||
fightData = fdata,
|
fightData = fdata,
|
||||||
fightSeed = fseed,
|
fightSeed = fseed,
|
||||||
fightType = BATTLE_SERVER_TYPE.StoryFight,
|
fightType = BATTLE_SERVER_TYPE.StoryFight,
|
||||||
maxRound = 20
|
maxRound = 20,
|
||||||
|
bg = FakeBattleNew[options[1]].BgName
|
||||||
}
|
}
|
||||||
local panel = UIManager.OpenPanel(UIName.GuideBattlePanel, testFightData, function()
|
local panel = UIManager.OpenPanel(UIName.GuideBattlePanel, testFightData, function()
|
||||||
StoryManager.StoryJumpType(options[3])
|
StoryManager.StoryJumpType(options[3])
|
||||||
|
|
Loading…
Reference in New Issue