Merge branch 'china/dev' into 0功能/灵脉秘境
commit
336ea6b8d3
|
@ -2036,7 +2036,7 @@ function LanguageFontSizeFilter(text, size)
|
|||
end
|
||||
|
||||
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
|
||||
icon.sprite = spLoader:LoadSprite(GetResourcePath(heroConfig.Icon))
|
||||
else
|
||||
|
|
|
@ -318,6 +318,7 @@ GIFTGOODSINFO_BUYTIMES_FIELD = protobuf.FieldDescriptor();
|
|||
GIFTGOODSINFO_STARTTIME_FIELD = protobuf.FieldDescriptor();
|
||||
GIFTGOODSINFO_ENDTIME_FIELD = protobuf.FieldDescriptor();
|
||||
GIFTGOODSINFO_DYNAMICBUYTIMES_FIELD = protobuf.FieldDescriptor();
|
||||
GIFTGOODSINFO_ISBOUGHT_FIELD = protobuf.FieldDescriptor();
|
||||
GOODSTYPEDURATION = protobuf.Descriptor();
|
||||
GOODSTYPEDURATION_GOODSTYPE_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.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.full_name = ".rpc.protocols.GiftGoodsInfo"
|
||||
GIFTGOODSINFO.nested_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.extensions = {}
|
||||
GOODSTYPEDURATION_GOODSTYPE_FIELD.name = "goodsType"
|
||||
|
|
|
@ -616,7 +616,9 @@ function BattleUtil.ApplyDamage(skill, atkRole, defRole, damage, bCrit, damageTy
|
|||
-- end
|
||||
-- damage = floor(max(damage * (1 + n / #arr - defRole:GetRoleData(RoleDataName.TeamDamageReduceFactor)), 0.3 * damage))
|
||||
-- end
|
||||
-- 计算护盾减伤
|
||||
|
||||
damage = BattleUtil.CalShield(atkRole, defRole, damage,skill)
|
||||
--加入被动效果
|
||||
local damagingFunc = function(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)
|
||||
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)
|
||||
damage = damage - dmgDeduction
|
||||
|
@ -660,9 +658,14 @@ function BattleUtil.ApplyDamageNoPassive(skill, atkRole, defRole, damage, bCrit,
|
|||
end
|
||||
|
||||
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)
|
||||
BattleLogic.Event:DispatchEvent(BattleEventName.FinalDamage, damagingFunc, atkRole, defRole, damage, skill, dotType, bCrit, damageType)
|
||||
|
||||
--
|
||||
return BattleUtil.FinalDamage(skill, atkRole, defRole, damage, bCrit, damageType, dotType,isDirect)
|
||||
end
|
||||
|
|
|
@ -224,8 +224,11 @@ function this:OnOpen(_fightData, _fightType, _endFunc, _guideType,isChangeBGM)
|
|||
isBack = _fightType == BATTLE_TYPE.BACK --判定是否是战斗回放
|
||||
hadCounted = 0
|
||||
-- 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))
|
||||
|
||||
end
|
||||
-- SoundManager.PlayMusic(SoundConfig.BGM_Battle_1, true, function()
|
||||
if not isChangeBGM then
|
||||
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.BattleOrderChange, this.BattleOrderChange)
|
||||
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.BattleStart, this.OnBattleStart)
|
||||
|
||||
|
@ -426,6 +427,7 @@ function this.ClearBattleEvent()
|
|||
BattleLogic.Event:RemoveEvent(BattleEventName.BattleEnd, this.EndBattle)
|
||||
BattleLogic.Event:RemoveEvent(BattleEventName.BattleOrderChange, this.BattleOrderChange)
|
||||
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.BattleStart, this.OnBattleStart)
|
||||
end
|
||||
|
@ -507,6 +509,14 @@ function this.RoleTurnChange(role)
|
|||
end
|
||||
end
|
||||
|
||||
-- 回合结束
|
||||
function this.BattleRoundEnd(Round)
|
||||
-- 回调UI层
|
||||
if this.root.BattleRoundEnd then
|
||||
this.root.BattleRoundEnd(Round)
|
||||
end
|
||||
end
|
||||
|
||||
-- 回合变化
|
||||
function this.BattleRoundChange(Round)
|
||||
-- 回调UI层
|
||||
|
|
|
@ -79,6 +79,33 @@ function GuideBattleLogic:OnBattleStart(func)
|
|||
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)
|
||||
-- 没有就不引导了
|
||||
if not self.configList or #self.configList <= 0 then
|
||||
|
|
|
@ -86,10 +86,10 @@ function this:OnOpen(_fightData, _endFunc, guideType)
|
|||
endFunc = _endFunc
|
||||
|
||||
fightType = BATTLE_TYPE.Test --判定战斗类型
|
||||
if guideType == 1 then
|
||||
this.BG:GetComponent("Image").sprite = this.spLoader:LoadSprite("r_zhandou_changjing_1005")
|
||||
if _fightData.bg then
|
||||
this.BG:GetComponent("Image").sprite = this.spLoader:LoadSprite(_fightData.bg)
|
||||
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
|
||||
|
||||
this.BtnGM:SetActive(true)
|
||||
|
@ -183,6 +183,14 @@ function this.OnRoundChanged(round)
|
|||
local curRound, maxRound = BattleLogic.GetCurRound()
|
||||
this.roundText.text = string.format(Language[10211], curRound, maxRound)
|
||||
|
||||
--显示波次
|
||||
GuideBattleLogic:OnRoundChanged(round)
|
||||
end
|
||||
|
||||
-- 回合结束
|
||||
function this.BattleRoundEnd(Round)
|
||||
-- 回调UI层
|
||||
GuideBattleLogic.BattleRoundEnd(Round)
|
||||
end
|
||||
|
||||
-- 角色轮转回调
|
||||
|
|
|
@ -781,7 +781,7 @@ function this.CreatSingleMissionData(missionData,havaBought)
|
|||
if missionData.state == 0 then
|
||||
if PlayerManager.level < actRewardConfig[data.missionId].Values[1][2] then
|
||||
data.state = -1
|
||||
elseif havaBought.buyTimes > 0 then
|
||||
elseif havaBought.isBought > 0 then
|
||||
data.state = 2
|
||||
else
|
||||
data.state = 0
|
||||
|
|
|
@ -128,7 +128,7 @@ end
|
|||
function GrowthGiftPage:SetBtnInvestState()
|
||||
self.curGiftsId = GlobalActivity[self.curActiId].CanBuyRechargeId[1]
|
||||
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
|
||||
local rechargeConfig = ConfigManager.GetConfigData(ConfigName.RechargeCommodityConfig, self.curGiftsId)
|
||||
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
|
||||
local rechargeConfigLocal = ConfigManager.TryGetConfigData(ConfigName.RechargeCommodityConfig, giftGoodsInfo.goodsId)
|
||||
if rechargeConfigLocal then
|
||||
-- LogBlue("------充值活动-----------礼包类型:".. rechargeConfigLocal.Type .." 礼包ID:".. giftGoodsInfo.goodsId .." 已购:"
|
||||
-- ..giftGoodsInfo.buyTimes.." 开始:"..giftGoodsInfo.startTime.." 结束:"
|
||||
-- ..giftGoodsInfo.endTime .. " 可购(没卵用):" .. giftGoodsInfo.dynamicBuyTimes)
|
||||
-- LogBlue("礼包类型:"..tostring(rechargeConfigLocal.Type).." 礼包ID:"..tostring(giftGoodsInfo.goodsId).." 已购:"..tostring(giftGoodsInfo.buyTimes)
|
||||
-- .."次 开始时间:"..tostring(giftGoodsInfo.startTime).." 结束时间:"..tostring(giftGoodsInfo.endTime).. " 可购:" ..tostring(giftGoodsInfo.dynamicBuyTimes).." 是否已买:"..tostring(giftGoodsInfo.isBought))
|
||||
if giftGoodsInfo.endTime == 0 and giftGoodsInfo.startTime == 0 and (rechargeConfigLocal.ShowType == 25 or rechargeConfigLocal.ShowType == 26 or rechargeConfigLocal.ShowType == 8) then
|
||||
else
|
||||
if giftGoodsInfoList[rechargeConfigLocal.Type] then
|
||||
|
@ -58,7 +57,7 @@ function this.SetBasicValues(giftGoodsList)
|
|||
end
|
||||
end
|
||||
else
|
||||
LogError("服务器发过来一个前端表中不存在的礼包:"..giftGoodsInfo.goodsId)
|
||||
LogError("服务器发过来一个前端表中不存在的礼包:"..tostring(giftGoodsInfo.goodsId))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -146,8 +146,8 @@ function CreateNamePopup:BindEvent()
|
|||
this.curName = this.textName.text
|
||||
local callBack = function()
|
||||
if this.options then
|
||||
-- self:ClosePanel()
|
||||
StoryManager.StoryJumpType(this.options[1], self)
|
||||
self:ClosePanel()
|
||||
StoryManager.StoryJumpType(this.options[1], nil, this.callBackFunc)
|
||||
else
|
||||
PopupTipPanel.ShowTip(Language[10837])
|
||||
this:ClosePanel()
|
||||
|
@ -181,7 +181,7 @@ function CreateNamePopup:BindEvent()
|
|||
local callBack = function()
|
||||
if this.options then
|
||||
self:ClosePanel()
|
||||
StoryManager.StoryJumpType(this.options[1], self)
|
||||
StoryManager.StoryJumpType(this.options[1], nil, this.callBackFunc)
|
||||
-- 发送创建角色事件
|
||||
CustomEventManager.SendCustomEvents(FBSDKCustomEventType.CreateCharacter)
|
||||
CustomEventManager.SendCustomEvents(FBSDKCustomEventType.RoleLv,1)
|
||||
|
@ -301,6 +301,7 @@ function CreateNamePopup:OnOpen(...)
|
|||
this.eventId = args[2]
|
||||
this.showValues = args[3]
|
||||
this.options = args[4]
|
||||
this.callBackFunc = args[5]
|
||||
this.InitName()
|
||||
this.RefreshShow()
|
||||
end
|
||||
|
|
|
@ -137,6 +137,7 @@ function RoleGodSoulLayout:SetHeroData(heroGo,heroData,isCur)
|
|||
elseif starType == 2 then
|
||||
starSize = Vector2.New(60,60)
|
||||
end
|
||||
frame.sprite = self.spLoader:LoadSprite(GetHeroQuantityImageByquality(heroData.heroConfig.Quality,self.star))
|
||||
else
|
||||
if starType == 3 then
|
||||
starSize = Vector2.New(0.65,-29.2)
|
||||
|
@ -144,8 +145,8 @@ function RoleGodSoulLayout:SetHeroData(heroGo,heroData,isCur)
|
|||
elseif starType == 2 then
|
||||
starSize = Vector2.New(34.492,32.767)
|
||||
end
|
||||
frame.sprite = self.spLoader:LoadSprite(GetHeroQuantityImageByquality(heroData.heroConfig.Quality,heroData.star))
|
||||
end
|
||||
frame.sprite = self.spLoader:LoadSprite(GetHeroQuantityImageByquality(heroData.heroConfig.Quality,self.star))
|
||||
proIcon.sprite = self.spLoader:LoadSprite(GetProStrImageByProNum(heroData.heroConfig.PropertyName))
|
||||
SetHeroIcon(self.spLoader,heroData,icon,heroData.heroConfig)
|
||||
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 chapterTitleData = ConfigManager.GetConfig(ConfigName.LevelSetting)
|
||||
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.StoryOptionPopup, eventId)
|
||||
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 -- 引导战斗
|
||||
local fdata, fseed = BattleManager.GetFakeBattleData(options[1])
|
||||
local testFightData = {
|
||||
fightData = fdata,
|
||||
fightSeed = fseed,
|
||||
fightType = BATTLE_SERVER_TYPE.StoryFight,
|
||||
maxRound = 20
|
||||
maxRound = 20,
|
||||
bg = FakeBattleNew[options[1]].BgName
|
||||
}
|
||||
local panel = UIManager.OpenPanel(UIName.GuideBattlePanel, testFightData, function()
|
||||
StoryManager.StoryJumpType(options[3])
|
||||
|
|
Loading…
Reference in New Issue