CreateGuildPopUp = class("CreateGuildPopUp", ContainerView) CreateGuildPopUp.ViewType = UIViewType.PopUpLayer function CreateGuildPopUp:Init() self:InitUI(); self:MapViewEvent(); end function CreateGuildPopUp:InitUI() self.nameInput = self:FindComponent("Input", UIInput); local _MaskWordType = FunctionMaskWord.MaskWordType self.filterType = _MaskWordType.SpecialSymbol | _MaskWordType.Chat | _MaskWordType.SpecialName UIUtil.LimitInputCharacter(self.nameInput, 8); self:AddButtonEvent("ConfirmButton", function (go) self:CreateGuild(); end); end function CreateGuildPopUp:CreateGuild() -- 人物等級滿足20 local mylv = Game.Myself.data.userdata:Get(UDEnum.ROLELEVEL); if(mylv < GameConfig.Guild.createbaselv)then MsgManager.ShowMsgByIDTable(2600); return; end -- 材料或者金幣不足 local needItems = GameConfig.Guild.createitem; for i=1,#needItems do local needItem = needItems[i]; if(needItem[1] and needItem[2])then local sIData = Table_Item[needItem[1]]; local tempText,hasNum = ""; if(needItem[1] == 100)then hasNum = MyselfProxy.Instance:GetROB() elseif(needItem[1] == 105)then hasNum = MyselfProxy.Instance:GetGold() elseif(needItem[1] == 110)then hasNum = MyselfProxy.Instance:GetGarden() else hasNum = BagProxy.Instance:GetItemNumByStaticID(needItem[1]); if(hasNum