Example #1
0
 void OnClickSendCreateLegion(string createName, int iconID)
 {
     if (LegionEvent.SendCreateLegionMsg != null)
     {
         LegionEvent.SendCreateLegionMsg(createName, iconID);
     }
 }
Example #2
0
 //踢出军团
 void OnClickKickOut(long uid)
 {
     if (LegionEvent.SendMemberKickOut != null)
     {
         LegionEvent.SendMemberKickOut(uid);
     }
 }
Example #3
0
 private void OnClickSaveLimitBtn()
 {
     if (LegionEvent.SendSaveLimit != null)
     {
         LegionEvent.SendSaveLimit(int.Parse(limitLevelLabel.text), IsOpenApprove);
     }
 }
Example #4
0
 private void OnClick(GameObject go)
 {
     if (LegionEvent.OnClickMember != null)
     {
         LegionEvent.OnClickMember(uid);
     }
 }
Example #5
0
        void OnClickSendMail()
        {
            FusionAudio.PostEvent("UI/General/ButtonClick");
            if (InputTitleLabel.text.Equals(noInputTitleStr) || InputContentLabel.text.Equals(noInputContentStr))
            {
                MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_LegionMailView_2531"));
            }
            else if (lessMailTimes <= 0)
            {
                MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_LegionMailView_2680"));
            }
            else
            {
                if (LegionEvent.SendLegionMail != null)
                {
                    LegionEvent.SendLegionMail(InputTitleLabel.text, InputContentLabel.text);
                }

                if (InputTitleLabel != null)
                {
                    InputTitleLabel.text = noInputTitleStr;
                    InputTitleLabel.GetComponent <UIInput>().value = string.Empty;
                    InputContentLabel.text = noInputContentStr;
                    InputContentLabel.GetComponent <UIInput>().value = string.Empty;
                }
                mDMono.gameObject.SetActive(false);
            }
        }
Example #6
0
 //降职
 void OnClickDemote(long uid)
 {
     if (LegionEvent.SendMemberDemote != null)
     {
         LegionEvent.SendMemberDemote(uid);
     }
 }
Example #7
0
 private void OnClickTotalReject()
 {
     if (LegionEvent.SendRejectTotalRequestJoin != null)
     {
         LegionEvent.SendRejectTotalRequestJoin();
     }
 }
Example #8
0
 void OnClickGoldDontae()
 {
     if (LegionEvent.SendGoldDonate != null)
     {
         LegionEvent.SendGoldDonate();
     }
 }
Example #9
0
 private void OnClickConsentApprove(long id)
 {
     if (LegionEvent.SendConsentRequestJoin != null)
     {
         LegionEvent.SendConsentRequestJoin(id);
     }
 }
Example #10
0
 void OnClickItem()
 {
     if (LegionEvent.OnClickMember != null)
     {
         LegionEvent.OnClickMember(uid);
     }
 }
Example #11
0
 void OnClickZZDonate()
 {
     if (LegionEvent.SendLuxuryDonate != null)
     {
         LegionEvent.SendLuxuryDonate();
     }
 }
Example #12
0
 void OnClickGiveMonthCard(long uid)
 {
     if (LegionEvent.SendGiveMonthCard != null)
     {
         LegionEvent.SendGiveMonthCard(uid, GiveMonthCardSucess);
     }
 }
Example #13
0
 //给团长
 void OnClickGiveOwner(long uid)
 {
     if (LegionEvent.SendMemberGiveOwner != null)
     {
         LegionEvent.SendMemberGiveOwner(uid);
     }
 }
Example #14
0
 void OnClickDiamondDonate()
 {
     if (LegionEvent.SendDiamandDonate != null)
     {
         LegionEvent.SendDiamandDonate();
     }
 }
Example #15
0
 private void OnClickRefuseApprove(long id)
 {
     if (LegionEvent.SendRejectRequestJoin != null)
     {
         LegionEvent.SendRejectRequestJoin(id);
     }
 }
Example #16
0
 void OnClickTalk(long uid)
 {
     if (LegionEvent.OpenMemberTalk != null)
     {
         LegionEvent.OpenMemberTalk(uid);
     }
 }
Example #17
0
        public void SetLegionMembers(List <AllianceMember> members)
        {
            int d = members.Count - legionData.listMember.Count;

            if (d > 0)
            {
                for (int i = 0; i < d; i++)
                {
                    LegionMemberData md = new LegionMemberData();
                    legionData.listMember.Add(md);
                }
            }
            else if (d < 0)
            {
                for (int i = 0; i < -d; i++)
                {
                    legionData.listMember.RemoveAt(legionData.listMember.Count - 1);
                }
            }

            for (int i = 0; i < members.Count; i++)
            {
                SetMember(members[i], legionData.listMember[i]);
            }

            RankLegionMembers();

            if (LegionEvent.NotifyUpdateLegionData != null)
            {
                LegionEvent.NotifyUpdateLegionData(legionData);
            }
        }
Example #18
0
 void OnClickAddFriend(long uid)
 {
     if (LegionEvent.SendMemberAddFriend != null)
     {
         LegionEvent.SendMemberAddFriend(uid);
     }
 }
Example #19
0
 void OnClickLeaveLegion()
 {
     if (LegionEvent.SendLeaveLegion != null)
     {
         LegionEvent.SendLeaveLegion();
     }
 }
Example #20
0
 void OnClickSaveNotice(string notice)
 {
     if (LegionEvent.SendSaveLegionNotice != null)
     {
         LegionEvent.SendSaveLegionNotice(notice);
     }
 }
Example #21
0
 void OnClickManager()
 {
     if (LegionEvent.OpenManagerMenu != null)
     {
         LegionEvent.OpenManagerMenu();
     }
 }
Example #22
0
 /// <summary>
 /// 点击事件标题
 /// </summary>
 private void OnClickChoiceMessage()
 {
     MainChoiceState = ChoiceState.Message;
     LegionLogic.GetInstance().IsHaveNewEvent = false;
     LTRedPointSystem.Instance.SetRedPointNodeNum(RedPointConst.haveevent, 0);
     if (LegionEvent.SendGetLegionMessages != null)
     {
         LegionEvent.SendGetLegionMessages();
     }
 }
Example #23
0
 void OnLegionAccount(AllianceAccount data)
 {
     if (data.State == eAllianceState.Joined)
     {
         controller.Close();
         if (LegionEvent.LegionShowUI != null)
         {
             LegionEvent.LegionShowUI();
         }
     }
 }
Example #24
0
 void OnItemApply(int legionID, bool isApply)
 {
     if (isApply && LegionEvent.SendApplyJoinLegion != null)
     {
         LegionEvent.SendApplyJoinLegion(legionID);
     }
     else if (!isApply && LegionEvent.SendCancelApplyJoinLegion != null)
     {
         LegionEvent.SendCancelApplyJoinLegion(legionID);
     }
 }
Example #25
0
        public void OnClickQuickJoin()
        {
            if (!isCouldClick())
            {
                return;
            }

            if (LegionEvent.SearchQuickJoinLegion != null)
            {
                LegionEvent.SearchQuickJoinLegion();
            }
        }
Example #26
0
        void OnClickApply()
        {
            if (!isCouldClick)
            {
                return;
            }

            if (LegionEvent.SendApplyJoinLegion != null)
            {
                LegionEvent.SendApplyJoinLegion(legionID);
            }
        }
Example #27
0
        /// <summary>
        /// 可搜索列表进行自身数据维护
        /// </summary>
        private void SearchItemDatasProcess()
        {
            int userLevel = BalanceResourceUtil.GetUserLevel();

            if (searchItemDatas == null)
            {
                return;
            }

            for (int i = 0; i < searchItemDatas.Length; i++)
            {
                searchItemDatas[i].isHasApplyed     = false;
                searchItemDatas[i].isReachCondition = true;

                if (applyItemDatas != null) //对已申请的做判断
                {
                    for (int j = 0; j < applyItemDatas.Length; j++)
                    {
                        if (applyItemDatas[j].legionID == searchItemDatas[i].id)
                        {
                            searchItemDatas[i].isReachCondition = false;
                            searchItemDatas[i].isHasApplyed     = true;
                            break;
                        }
                    }
                }

                if (searchItemDatas[i].isHasApplyed) //如果已经申请过的
                {
                    continue;
                }

                if (searchItemDatas[i].conditionLevel > userLevel)
                {
                    searchItemDatas[i].isReachCondition = false;
                    continue;
                }

                if (searchItemDatas[i].currentPeopleNum >= searchItemDatas[i].maxPeopleNum)
                {
                    searchItemDatas[i].isReachCondition = false;
                    continue;
                }
            }

            if (LegionEvent.NotifyUpdateSearchItemDatas != null)
            {
                LegionEvent.NotifyUpdateSearchItemDatas(searchItemDatas);
            }
        }
Example #28
0
        public void SetAllianceApplys(List <AllianceApply> applies)
        {
            int d = applies.Count - legionData.listRequestJoin.Count;

            if (d > 0)
            {
                for (int i = 0; i < d; i++)
                {
                    RequestJoinData rjd = new RequestJoinData();
                    legionData.listRequestJoin.Add(rjd);
                }
            }
            else if (d < 0)
            {
                for (int i = 0; i < -d; i++)
                {
                    legionData.listRequestJoin.RemoveAt(legionData.listRequestJoin.Count - 1);
                }
            }

            int index = 0;

            for (int i = 0; i < applies.Count; i++)
            {
                RequestJoinData rjd  = legionData.listRequestJoin[index];
                AllianceApply   data = applies[i];
                if (data == null) //如果为空就移除
                {
                    legionData.listRequestJoin.RemoveAt(legionData.listRequestJoin.Count - 1);
                    continue;
                }
                rjd.name      = data.Name;
                rjd.level     = data.Level;
                rjd.approveID = data.Uid;
                rjd.headIcon  = data.Portrait;
                rjd.headFrame = data.Frame;
                index++;
            }

            if (LegionEvent.NotifyUpdateLegionData != null)
            {
                LegionEvent.NotifyUpdateLegionData(legionData);
            }
        }
Example #29
0
        public void OnClickSearchGroup()
        {
            if (!isCouldClick())
            {
                return;
            }

            if (LegionEvent.SearchLegion != null && searchInput != null &&
                !searchInput.value.Equals(searchNormalStr))
            {
                searchNormalStr = searchInput.value;
                LegionEvent.SearchLegion(searchInput.value);
            }
            else if (searchInput.value.Equals(searchNormalStr))
            {
                searchNormalStr = "";
                LegionEvent.SearchLegion("");
            }
        }
Example #30
0
        /// <summary>
        /// 合并操作成员列表
        /// </summary>
        /// <param name="members"></param>
        public void MergeLegionMembers(List <AllianceMember> members)
        {
            if (members == null)
            {
                return;
            }


            for (int i = 0; i < members.Count; i++)
            {
                if (members[i] == null)
                {
                    continue;
                }

                bool isFind = false;
                for (int j = 0; j < legionData.listMember.Count; j++)
                {
                    if (legionData.listMember[j].uid == members[i].Uid)
                    {
                        SetMember(members[i], legionData.listMember[j]);
                        isFind = true;
                        break;
                    }
                }

                if (!isFind)
                {
                    LegionMemberData md = new LegionMemberData();
                    legionData.listMember.Add(md);
                    SetMember(members[i], md);
                }
            }

            RankLegionMembers();

            if (LegionEvent.NotifyUpdateLegionData != null)
            {
                LegionEvent.NotifyUpdateLegionData(legionData);
            }
        }