Merge branch 'china/dev' of http://60.1.1.230/gaoxin/JL_Client into china/dev

dev_chengFeng
ZhangBiao 2021-09-23 19:47:32 +08:00
commit a2d7bedb5b
4 changed files with 20 additions and 3 deletions

View File

@ -247,9 +247,7 @@ function this.GetFormationByID(teamId)
local _v=tonumber(v)
if teamId==_v and #this.formationList[teamId].teamHeroInfos<=0 then
for n = 1, #this.formationList[1].teamHeroInfos do
if HeroManager.GetSingleHeroData(this.formationList[1].teamHeroInfos.heroId) then
table.insert(this.formationList[teamId].teamHeroInfos, this.formationList[1].teamHeroInfos[n])
end
table.insert(this.formationList[teamId].teamHeroInfos, this.formationList[1].teamHeroInfos[n])
end
--
FormationManager.SaveFormation(teamId, this.formationList[teamId].teamHeroInfos, {})

View File

@ -46,6 +46,10 @@ end
-- 请求创建公会
function GuildManager.RequestCreateGuild(name, announce, func)
if not NameManager.CheckStringRight(name) then
PopupTipPanel.ShowTip("名字不合法")
return
end
if not ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.GUILD) then
PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(FUNCTION_OPEN_TYPE.GUILD))
return

View File

@ -368,6 +368,10 @@ end
-- 请求修改公会名称
function MyGuildManager.RequestChangeGuildName(name, func)
if not NameManager.CheckStringRight(name) then
PopupTipPanel.ShowTip("名字不合法")
return
end
local pos = this.GetMyPositionInGuild()
if pos == GUILD_GRANT.MEMBER then
PopupTipPanel.ShowTip(Language[10962])

View File

@ -57,8 +57,19 @@ function this.GetRandomNameData()
end)
end
-- 字符正确性检测
function this.CheckStringRight(str)
if string.find(str, "|") then
return false
end
return true
end
--更改玩家姓名
function this.ChangeUserName(type, name, teamPosId, sex, callBack)
if not this.CheckStringRight(name) then
PopupTipPanel.ShowTip("名字不合法")
return
end
NetManager.ChangeUserNameRequest(type, name, teamPosId, sex, function()
this.roleSex = sex
this.roleName = name