private void OnStartBackMove(object a_oObject) { MINE_GUILD_CURRENTSTATUS_INFO mINE_GUILD_CURRENTSTATUS_INFO = a_oObject as MINE_GUILD_CURRENTSTATUS_INFO; if (mINE_GUILD_CURRENTSTATUS_INFO != null) { GS_MINE_MILITARY_BACKMOVE_REQ gS_MINE_MILITARY_BACKMOVE_REQ = new GS_MINE_MILITARY_BACKMOVE_REQ(); gS_MINE_MILITARY_BACKMOVE_REQ.m_nMineID = mINE_GUILD_CURRENTSTATUS_INFO.i64MineID; SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_MINE_MILITARY_BACKMOVE_REQ, gS_MINE_MILITARY_BACKMOVE_REQ); } this.RefreshList(); }
public void OnClickDefenceMilitaryInfo(IUIObject obj) { MINE_GUILD_CURRENTSTATUS_INFO mINE_GUILD_CURRENTSTATUS_INFO = obj.Data as MINE_GUILD_CURRENTSTATUS_INFO; if (mINE_GUILD_CURRENTSTATUS_INFO != null) { if (mINE_GUILD_CURRENTSTATUS_INFO.i64MineID <= 0L) { return; } string message = string.Empty; if (0L >= NrTSingleton <NewGuildManager> .Instance.GetGuildID()) { return; } NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; NewGuildMember memberInfoFromPersonID = NrTSingleton <NewGuildManager> .Instance.GetMemberInfoFromPersonID(kMyCharInfo.m_PersonID); if (memberInfoFromPersonID == null) { return; } if (memberInfoFromPersonID.GetRank() <= NewGuildDefine.eNEWGUILD_MEMBER_RANK.eNEWGUILD_MEMBER_RANK_INITIATE) { message = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("532"); Main_UI_SystemMessage.ADDMessage(message, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE); return; } byte nMode; if (mINE_GUILD_CURRENTSTATUS_INFO.i64DefenceGuildID == NrTSingleton <NewGuildManager> .Instance.GetGuildID()) { nMode = 2; } else { nMode = 3; } GS_MINE_SEARCH_REQ gS_MINE_SEARCH_REQ = new GS_MINE_SEARCH_REQ(); gS_MINE_SEARCH_REQ.bSearchMineGrade = 0; gS_MINE_SEARCH_REQ.m_nMineID = mINE_GUILD_CURRENTSTATUS_INFO.i64MineID; gS_MINE_SEARCH_REQ.m_nGuildID = 0L; gS_MINE_SEARCH_REQ.m_nMode = nMode; SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_MINE_SEARCH_REQ, gS_MINE_SEARCH_REQ); } }
public void SetListAttackGuildMark() { for (int i = 0; i < this.m_lbCurrentStatus.Count; i++) { IUIListObject item = this.m_lbCurrentStatus.GetItem(i); if (item != null) { MINE_GUILD_CURRENTSTATUS_INFO mINE_GUILD_CURRENTSTATUS_INFO = item.Data as MINE_GUILD_CURRENTSTATUS_INFO; if (mINE_GUILD_CURRENTSTATUS_INFO != null) { if (mINE_GUILD_CURRENTSTATUS_INFO.byCurrentStatusType == 1 || mINE_GUILD_CURRENTSTATUS_INFO.byCurrentStatusType == 0) { if (mINE_GUILD_CURRENTSTATUS_INFO.i64AttackGuildID > 0L) { DrawTexture drawTexture = ((UIListItemContainer)item).GetElement(8) as DrawTexture; if (drawTexture != null) { if (mINE_GUILD_CURRENTSTATUS_INFO.i64AttackGuildID == NrTSingleton <NewGuildManager> .Instance.GetGuildID() || !mINE_GUILD_CURRENTSTATUS_INFO.bIsAttackGuildNameHide) { string guildPortraitURL = NrTSingleton <NkCharManager> .Instance.GetGuildPortraitURL(mINE_GUILD_CURRENTSTATUS_INFO.i64AttackGuildID); WebFileCache.RequestImageWebFile(guildPortraitURL, new WebFileCache.ReqTextureCallback(this.ReqWebGuildImageCallback), drawTexture); } else { drawTexture.SetTexture("Win_BI_Nomark"); } } } } else if (mINE_GUILD_CURRENTSTATUS_INFO.byCurrentStatusType == 2) { DrawTexture drawTexture2 = ((UIListItemContainer)item).GetElement(8) as DrawTexture; if (drawTexture2 != null) { NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; drawTexture2.SetTexture(eCharImageType.SMALL, kMyCharInfo.GetImgFaceCharKind(), -1, string.Empty); } } } } } }
public void OnClickMilitaryReturn(IUIObject obj) { MINE_GUILD_CURRENTSTATUS_INFO mINE_GUILD_CURRENTSTATUS_INFO = obj.Data as MINE_GUILD_CURRENTSTATUS_INFO; if (mINE_GUILD_CURRENTSTATUS_INFO == null) { return; } if (mINE_GUILD_CURRENTSTATUS_INFO.i64MineID <= 0L) { return; } long num = 0L; MINE_CONSTANT_Manager instance = MINE_CONSTANT_Manager.GetInstance(); if (instance != null) { num = (long)instance.GetValue(eMINE_CONSTANT.eMINE_CONSTANT_MINE_RETURN_TIME); } string textFromMessageBox = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("94"); string textFromMessageBox2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("161"); string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { textFromMessageBox2, "count", num.ToString() }); MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI; msgBoxUI.SetMsg(new YesDelegate(this.OnStartBackMove), mINE_GUILD_CURRENTSTATUS_INFO, textFromMessageBox, empty, eMsgType.MB_OK_CANCEL, 2); }
public void OnClickMilitaryBatch(IUIObject obj) { string text = string.Empty; string message = string.Empty; MINE_GUILD_CURRENTSTATUS_INFO mINE_GUILD_CURRENTSTATUS_INFO = obj.Data as MINE_GUILD_CURRENTSTATUS_INFO; if (mINE_GUILD_CURRENTSTATUS_INFO != null) { if (mINE_GUILD_CURRENTSTATUS_INFO.i64MineID <= 0L) { return; } if (0L >= NrTSingleton <NewGuildManager> .Instance.GetGuildID()) { return; } NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; NewGuildMember memberInfoFromPersonID = NrTSingleton <NewGuildManager> .Instance.GetMemberInfoFromPersonID(kMyCharInfo.m_PersonID); if (memberInfoFromPersonID == null) { return; } if (memberInfoFromPersonID.GetRank() <= NewGuildDefine.eNEWGUILD_MEMBER_RANK.eNEWGUILD_MEMBER_RANK_INITIATE) { message = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("532"); Main_UI_SystemMessage.ADDMessage(message, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE); return; } MINE_CREATE_DATA mineCreateDataFromID = BASE_MINE_CREATE_DATA.GetMineCreateDataFromID(mINE_GUILD_CURRENTSTATUS_INFO.i16MineDataID); if (mineCreateDataFromID == null) { return; } MINE_DATA mineDataFromGrade = BASE_MINE_DATA.GetMineDataFromGrade(BASE_MINE_DATA.ParseGradeFromString(mineCreateDataFromID.MINE_GRADE)); if (kMyCharInfo.GetLevel() < (int)mineDataFromGrade.POSSIBLELEVEL) { text = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("408"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref message, new object[] { text, "count", mineDataFromGrade.POSSIBLELEVEL }); Main_UI_SystemMessage.ADDMessage(message, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE); return; } byte nMode = 0; long nGuildID = 0L; if (mINE_GUILD_CURRENTSTATUS_INFO.i64DefenceGuildID == NrTSingleton <NewGuildManager> .Instance.GetGuildID()) { nMode = 2; nGuildID = mINE_GUILD_CURRENTSTATUS_INFO.i64DefenceGuildID; } else if (mINE_GUILD_CURRENTSTATUS_INFO.i64AttackGuildID == NrTSingleton <NewGuildManager> .Instance.GetGuildID() || mINE_GUILD_CURRENTSTATUS_INFO.i64DefenceGuildID > 0L) { nMode = 4; nGuildID = NrTSingleton <NewGuildManager> .Instance.GetGuildID(); } GS_MINE_SEARCH_REQ gS_MINE_SEARCH_REQ = new GS_MINE_SEARCH_REQ(); gS_MINE_SEARCH_REQ.bSearchMineGrade = mineCreateDataFromID.nMine_Grade; gS_MINE_SEARCH_REQ.m_nMineID = mINE_GUILD_CURRENTSTATUS_INFO.i64MineID; gS_MINE_SEARCH_REQ.m_nGuildID = nGuildID; gS_MINE_SEARCH_REQ.m_nMode = nMode; SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_MINE_SEARCH_REQ, gS_MINE_SEARCH_REQ); } }
public void UpdateTime() { long num = this.m_RemainderCountGiveTime - (long)(Time.realtimeSinceStartup - this.m_InfoSettingTime); if (num >= 0L) { long num2 = num / 60L / 60L % 24L; long num3 = num / 60L % 60L; long num4 = num % 60L; this.m_MineCountGetTime.SetText(string.Format("{0:00}:{1:00}:{2:00}", num2, num3, num4)); } for (int i = 0; i < this.m_lbCurrentStatus.Count; i++) { IUIListObject item = this.m_lbCurrentStatus.GetItem(i); MINE_GUILD_CURRENTSTATUS_INFO mINE_GUILD_CURRENTSTATUS_INFO = item.Data as MINE_GUILD_CURRENTSTATUS_INFO; if (mINE_GUILD_CURRENTSTATUS_INFO != null) { if (mINE_GUILD_CURRENTSTATUS_INFO.i64LeftTime > 0L) { string text = string.Empty; string text2 = string.Empty; if (mINE_GUILD_CURRENTSTATUS_INFO.byCurrentStatusType == 1 || mINE_GUILD_CURRENTSTATUS_INFO.byCurrentStatusType == 0) { if (mINE_GUILD_CURRENTSTATUS_INFO.byMilitaryState == 2 || mINE_GUILD_CURRENTSTATUS_INFO.byMilitaryState == 3 || mINE_GUILD_CURRENTSTATUS_INFO.byMilitaryState == 6 || mINE_GUILD_CURRENTSTATUS_INFO.byMilitaryState == 7) { text = string.Empty; text2 = this.GetTextFromState(mINE_GUILD_CURRENTSTATUS_INFO); UIButton uIButton = ((UIListItemContainer)item).GetElement(0) as UIButton; if (null != uIButton && uIButton.Visible) { uIButton.Visible = false; } } else { text = this.GetTextFromState(mINE_GUILD_CURRENTSTATUS_INFO); text2 = string.Empty; } } else if (mINE_GUILD_CURRENTSTATUS_INFO.byCurrentStatusType == 2) { UIButton uIButton2 = ((UIListItemContainer)item).GetElement(0) as UIButton; if (null != uIButton2) { uIButton2.Visible = false; text = string.Empty; text2 = this.GetTextFromState(mINE_GUILD_CURRENTSTATUS_INFO); } } Label label = ((UIListItemContainer)item).GetElement(3) as Label; if (null != label) { label.Text = text; } Label label2 = ((UIListItemContainer)item).GetElement(4) as Label; if (null != label2) { label2.Text = text2; } } } } }
public string GetTextFromState(MINE_GUILD_CURRENTSTATUS_INFO info) { string text = string.Empty; string empty = string.Empty; string result = string.Empty; switch (info.byMilitaryState) { case 1: text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1525"); break; case 2: text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1526"); break; case 3: case 6: text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1623"); break; case 4: case 5: text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1622"); break; case 7: text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1661"); break; } result = text; if (info.byMilitaryState == 1 || info.byMilitaryState == 2) { long num = info.i64LeftTime - (long)(Time.realtimeSinceStartup - this.m_InfoSettingTime); if (num >= 0L) { long num2 = num / 60L / 60L % 24L; long num3 = num / 60L % 60L; long num4 = num % 60L; string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1527"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { textFromInterface, "hour", num2, "min", num3, "sec", num4 }); result = string.Format("{0} {1}", text, empty); } else if (info.byCurrentStatusType == 1 || info.byCurrentStatusType == 0) { if (info.byMilitaryState == 1) { info.byMilitaryState = 6; } else if (info.byMilitaryState == 2) { info.byMilitaryState = 7; } } else if (info.byCurrentStatusType == 2) { if (info.i64DefenceGuildID == NrTSingleton <NewGuildManager> .Instance.GetGuildID()) { if (info.byMilitaryState == 1 || info.byMilitaryState == 2) { info.byMilitaryState = 7; } } else if (info.byMilitaryState == 1) { info.byMilitaryState = 6; } else if (info.byMilitaryState == 2) { info.byMilitaryState = 7; } } } return(result); }