594 lines
21 KiB
C#
594 lines
21 KiB
C#
//帮会货运
|
|
using Games.LogicObj;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using System.Collections;
|
|
using GCGame;
|
|
using Module.Log;
|
|
using Games.GlobeDefine;
|
|
using System.Collections.Generic;
|
|
using System;
|
|
using GCGame.Table;
|
|
|
|
public class GuildTransport : MonoBehaviour
|
|
{
|
|
|
|
//任务追踪界面点击货运任务
|
|
public static void GuildTransportClick(Tab_MissionBase missionBase,ulong guid,int index = 0)
|
|
{
|
|
CG_REQ_GUILD_FREIGHT send = (CG_REQ_GUILD_FREIGHT)PacketDistributed.CreatePacket(MessageID.PACKET_CG_REQ_GUILD_FREIGHT);
|
|
send.SetType((int)CG_REQ_GUILD_FREIGHT.REQ_FREIGHT_TYPE.RET_INFO);
|
|
send.SetGuid(guid);
|
|
send.AddIndex(index);
|
|
send.SendPacket();
|
|
}
|
|
|
|
public static Dictionary<int, float> AskHelpTime = new Dictionary<int, float>();
|
|
|
|
public UIContainerSelect m_Container;
|
|
|
|
public Image ItemQuility;
|
|
public Image ItemInfoIcon;
|
|
public Text ItemInfoNum;
|
|
public Text ItemInfoName;
|
|
|
|
public Text finishAwardExp;
|
|
public Text[] finishItemNum;
|
|
public Image[] finishItemQuility;
|
|
public Image[] finishItemIcon;
|
|
|
|
public Text HelpBtnNum;
|
|
public Text addAwardguildCon; //装填获得帮贡
|
|
public Text addAwardMoney; //装填获得银两
|
|
public Text addAwardExp; //装填获得经验
|
|
|
|
public Image GuildContronIcon;
|
|
public Image MoneyIcon;
|
|
|
|
public GameObject GetItemBtn; //物品获取按钮
|
|
public GameObject buyAndAdd; //购买并装填
|
|
public Button finishBtn; //完成装填按钮
|
|
public GameObject helpAddBtn; //帮助填充按钮
|
|
public GameObject HelpNoBtn;
|
|
public GameObject addBtn; //添加按钮
|
|
public Button helpBtn; //求助按钮
|
|
public GameObject helpBtnDisable;
|
|
public Text LeaveTimes; //剩下的可帮助按钮
|
|
public GameObject tip;
|
|
|
|
public GameObject addAwardTip;
|
|
public GameObject helpAwardTip;
|
|
|
|
public Text overTimeCoutDown; //任务剩余倒计时
|
|
|
|
FreightItemData m_currentSelectItem = null;
|
|
public static int _addedNum = 0; //已填充物品数
|
|
|
|
void Awake()
|
|
{
|
|
Hashtable add = new Hashtable();
|
|
add["name"] = "Transport";
|
|
Games.Events.MessageEventCallBack call = InitInfo;
|
|
add["callFun"] = call;
|
|
Games.Events.EventDispatcher.Instance.AddMessageEvent(Games.Events.EventId.GuildTransportInfo, add);
|
|
|
|
Hashtable calbackMoveparam = new Hashtable();
|
|
calbackMoveparam["name"] = "GuildTransfort";
|
|
Games.Events.MessageEventCallBack fun = FreshItems;
|
|
calbackMoveparam.Add("callFun", fun);
|
|
Games.Events.EventDispatcher.Instance.AddMessageEvent(Games.Events.EventId.FRESHSAMEUSETIP, calbackMoveparam);
|
|
}
|
|
|
|
private void OnEnable()
|
|
{
|
|
UIManager.CloseUI(UIInfo.MissionInfoController);
|
|
}
|
|
|
|
void Start()
|
|
{
|
|
InvokeRepeating("ActiveTimeDown", 0, 60);
|
|
helpBtnDisable.SetActive(false);
|
|
|
|
LoadAssetBundle.Instance.SetImageSprite(MoneyIcon, UICurrencyItem.GetCurrencySprite(MONEYTYPE.MONEYTYPE_COIN));
|
|
//LoadAssetBundle.Instance.SetImageSprite(GuildContronIcon, UICurrencyItem.GetScoreSprite(SCORE_TYPE.GUILD_SCORE));
|
|
}
|
|
|
|
public void ActiveTimeDown()
|
|
{
|
|
Tab_ActivityBase activityBase = TableManager.GetActivityBaseByID(11, 0);
|
|
if (activityBase == null)
|
|
return;
|
|
int m_ServerTime = GlobalData.ServerAnsiTime;
|
|
System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1));
|
|
DateTime dt = startTime.AddSeconds(m_ServerTime);
|
|
//获取服务器的小时 分钟
|
|
int hour = dt.Hour;
|
|
int minute = dt.Minute;
|
|
string m_StartTime = activityBase.GetTimebyIndex(0).ToString();
|
|
string[] m_TabStarTime = m_StartTime.Split('|');
|
|
int m_TabEndTime = int.Parse(m_TabStarTime[1]); //获取结束时间
|
|
int endHour = m_TabEndTime / 100;
|
|
int endMinute = m_TabEndTime % 100;
|
|
int leavehour = endHour - hour;
|
|
int leaveminu = endMinute - minute;
|
|
if(leaveminu<0 && leavehour>0)
|
|
{
|
|
leavehour--;
|
|
leaveminu = 60 + leaveminu;
|
|
}
|
|
if(leavehour<=0 && leaveminu<=0)
|
|
{
|
|
overTimeCoutDown.text = StrDictionary.GetClientDictionaryString("#{27025}");
|
|
return;
|
|
}
|
|
if(leavehour>0)
|
|
{
|
|
overTimeCoutDown.text = StrDictionary.GetClientDictionaryString("#{27026}", leavehour, leaveminu);
|
|
}
|
|
else
|
|
{
|
|
overTimeCoutDown.text = StrDictionary.GetClientDictionaryString("#{27027}", leaveminu);
|
|
}
|
|
}
|
|
|
|
void OnDestroy()
|
|
{
|
|
Games.Events.EventDispatcher.Instance.RemoveMessage(Games.Events.EventId.GuildTransportInfo, "Transport");
|
|
Games.Events.EventDispatcher.Instance.RemoveMessage(Games.Events.EventId.FRESHSAMEUSETIP, "GuildTransfort");
|
|
}
|
|
|
|
public void FreshItems(Hashtable add, Hashtable send)
|
|
{
|
|
if (m_Container != null)
|
|
m_Container.RefreshItems();
|
|
ClickItem(m_currentSelectItem);
|
|
}
|
|
|
|
private FreightItemData GetSelect(List<FreightItemData> showList,bool isSelfAdd)
|
|
{
|
|
FreightItemData result = null;
|
|
for (int i=0;i<showList.Count;i++)
|
|
{
|
|
FreightItemData itemData = showList[i];
|
|
Tab_GuildFreightPool table = TableManager.GetGuildFreightPoolByID(itemData.Freightid, 0);
|
|
if (table == null)
|
|
continue;
|
|
if(isSelfAdd==false)
|
|
{
|
|
if (itemData.IsSeekHelp == 1)
|
|
{
|
|
if (result == null)
|
|
result = itemData;
|
|
else if (result.IsActive == 1 && itemData.IsActive != 1)
|
|
result = itemData;
|
|
}
|
|
continue;
|
|
}
|
|
int hasNum = GameManager.gameManager.PlayerDataPool.BackPack.GetItemCountByDataId(table.ItemId);
|
|
if (itemData.IsActive != 1 && hasNum >= table.ItemNum)
|
|
return itemData;
|
|
if (itemData.IsActive != 1 && hasNum < table.ItemNum && result == null)
|
|
result = itemData;
|
|
}
|
|
return result;
|
|
}
|
|
|
|
GC_GUILD_FREIGHT_INFO m_packet = null;
|
|
public void InitInfo(Hashtable add, Hashtable send)
|
|
{
|
|
if (send.ContainsKey("data") == false)
|
|
return;
|
|
m_packet = (GC_GUILD_FREIGHT_INFO)send["data"];
|
|
if (m_packet == null)
|
|
return;
|
|
_addedNum = 0;
|
|
List<FreightItemData> showList = new List<FreightItemData>();
|
|
List<FreightItemData> selects = new List<FreightItemData>();
|
|
for (int i = 0; i < m_packet.iteminfoCount; i++)
|
|
{
|
|
FreightItemData item = new FreightItemData();
|
|
item.Index = i;
|
|
item.Guid = m_packet.Guid;
|
|
item.Freightid = m_packet.iteminfoList[i].Freightid;
|
|
item.IsActive = m_packet.iteminfoList[i].IsActive;
|
|
if (item.IsActive == 1)
|
|
_addedNum++;
|
|
item.IsSeekHelp = m_packet.iteminfoList[i].IsSeekHelp;
|
|
bool isSelfadd = (Singleton<ObjManager>.Instance.MainPlayer.GUID == m_packet.Guid);
|
|
showList.Add(item);
|
|
if (m_currentSelectItem != null && isSelfadd)
|
|
{
|
|
if (m_currentSelectItem.Freightid == item.Freightid)
|
|
{
|
|
selects.Add(item);
|
|
}
|
|
}
|
|
}
|
|
|
|
FreightItemData sel = GetSelect(showList, (Singleton<ObjManager>.Instance.MainPlayer.GUID == m_packet.Guid));
|
|
if(sel!=null)
|
|
{
|
|
selects.Clear();
|
|
selects.Add(sel);
|
|
}
|
|
|
|
if (selects.Count <= 0)
|
|
{
|
|
if(showList.Count>m_packet.Index)
|
|
{
|
|
selects.Add(showList[m_packet.Index]);
|
|
}
|
|
}
|
|
m_Container.InitSelectContent(showList, selects, ClickItem);
|
|
FinishAward();
|
|
if (_addedNum >= 5)
|
|
finishBtn.interactable = true;
|
|
else
|
|
finishBtn.interactable = false;
|
|
if (m_packet.Guid != Singleton<ObjManager>.Instance.MainPlayer.GUID)
|
|
{
|
|
finishBtn.interactable = false;
|
|
}
|
|
}
|
|
|
|
void SetBtnSelfText(int has,int need)
|
|
{
|
|
helpAddBtn.SetActive(false);
|
|
LeaveTimes.gameObject.SetActive(false);
|
|
if (m_packet == null)
|
|
return;
|
|
if(m_currentSelectItem.IsActive == 1)
|
|
{
|
|
addBtn.SetActive(false);
|
|
helpBtn.gameObject.SetActive(false);
|
|
buyAndAdd.SetActive(false);
|
|
tip.SetActive(true);
|
|
}
|
|
if (m_currentSelectItem.IsActive == 0)
|
|
{
|
|
if(has<need)
|
|
{
|
|
buyAndAdd.SetActive(true);
|
|
addBtn.SetActive(false);
|
|
}
|
|
else
|
|
{
|
|
buyAndAdd.SetActive(false);
|
|
addBtn.SetActive(true);
|
|
}
|
|
helpBtn.gameObject.SetActive(true);
|
|
tip.SetActive(false);
|
|
}
|
|
Tab_GuildFreightOther table = TableManager.GetGuildFreightOtherByID(0, 0);
|
|
if(table!=null)
|
|
{
|
|
HelpBtnNum.text = StrDictionary.GetClientDictionaryString("#{27028}", m_packet.Count, table.DaySeekHelpCount);
|
|
if (m_packet.Count >= table.DaySeekHelpCount || _addedNum < 5)
|
|
{ helpBtn.interactable = false; HelpNoBtn.gameObject.SetActive(true); }
|
|
else
|
|
{ helpBtn.interactable = true; HelpNoBtn.gameObject.SetActive(false); }
|
|
}
|
|
|
|
float time = -1;
|
|
if (AskHelpTime.TryGetValue(m_currentSelectItem.Index, out time))
|
|
{
|
|
if (Time.realtimeSinceStartup - time < 60)
|
|
{
|
|
helpBtnDisable.SetActive(true);
|
|
return;
|
|
}
|
|
}
|
|
helpBtnDisable.SetActive(false);
|
|
}
|
|
|
|
void SetBtnOtherText()
|
|
{
|
|
addBtn.SetActive(false);
|
|
helpBtn.gameObject.SetActive(false);
|
|
tip.gameObject.SetActive(false);
|
|
buyAndAdd.SetActive(false);
|
|
if (m_packet == null)
|
|
return;
|
|
if (m_currentSelectItem.IsSeekHelp == 1 && m_currentSelectItem.IsActive==0)
|
|
{
|
|
helpAddBtn.SetActive(true);
|
|
}
|
|
else
|
|
{
|
|
helpAddBtn.SetActive(false);
|
|
}
|
|
Tab_GuildFreightOther table = TableManager.GetGuildFreightOtherByID(0, 0);
|
|
if (table != null)
|
|
{
|
|
LeaveTimes.gameObject.SetActive(true);
|
|
LeaveTimes.text = StrDictionary.GetClientDictionaryString("#{27029}", table.DayHelpCount - m_packet.Count);
|
|
}
|
|
}
|
|
|
|
//完成任务的奖励
|
|
void FinishAward()
|
|
{
|
|
for(int i=0;i<finishItemIcon.Length;i++)
|
|
{
|
|
SetCommonItem(-1, i,0);
|
|
}
|
|
|
|
var tables = TableManager.GetGuildFreightReward().Values;
|
|
var Level = GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.Level;
|
|
foreach (var table in tables)
|
|
{
|
|
if (table.LevelSecMin <= Level && table.LevelSecMax >= Level)
|
|
{
|
|
if (table.FillNum == 5)
|
|
{
|
|
SetCommonItem(table.GetItemIdbyIndex(0), 0, table.GetItemNumbyIndex(0));
|
|
}
|
|
if (table.FillNum == 8)
|
|
{
|
|
SetCommonItem(table.GetItemIdbyIndex(1), 1, table.GetItemNumbyIndex(1));
|
|
SetCommonItem(table.GetItemIdbyIndex(2), 2, table.GetItemNumbyIndex(2));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
private void SetCommonItem(int ItemID,int index,int Num)
|
|
{
|
|
Tab_CommonItem item = TableManager.GetCommonItemByID(ItemID, 0);
|
|
if (item != null)
|
|
{
|
|
finishItemIcon[index].transform.parent.gameObject.SetActive(true);
|
|
LoadAssetBundle.Instance.SetImageSprite(finishItemIcon[index], item.Icon);
|
|
LoadAssetBundle.Instance.SetImageSprite(finishItemQuility[index], Utils.GetItemQualityFrame(item.Quality));
|
|
if (item.QualityEffect > 0)
|
|
{
|
|
CommonItemContainerItem.ShowQualityEffect(true, item.QualityEffect, finishItemIcon[index].transform);
|
|
}
|
|
else
|
|
{
|
|
CommonItemContainerItem.ShowQualityEffect(false, item.QualityEffect, finishItemIcon[index].transform);
|
|
}
|
|
|
|
finishItemNum[index].text = Num.ToString();
|
|
Button btn = finishItemIcon[index].GetComponent<Button>();
|
|
btn.onClick.RemoveAllListeners();
|
|
btn.onClick.AddListener(delegate ()
|
|
{
|
|
ItemTooltipsLogic.ShowItemTooltip(item.Id, ItemTooltipsLogic.ShowType.Info, btn.transform.position);
|
|
});
|
|
}
|
|
else
|
|
{
|
|
finishItemIcon[index].transform.parent.gameObject.SetActive(false);
|
|
}
|
|
}
|
|
|
|
public void ClickItem(object item)
|
|
{
|
|
if (item == null)
|
|
return;
|
|
FreightItemData freight = item as FreightItemData;
|
|
if (freight == null)
|
|
return;
|
|
Tab_GuildFreightPool table = TableManager.GetGuildFreightPoolByID(freight.Freightid, 0);
|
|
if (table == null)
|
|
return;
|
|
Tab_CommonItem commonItem = TableManager.GetCommonItemByID(table.ItemId, 0);
|
|
if (commonItem == null)
|
|
return;
|
|
if (Singleton<ObjManager>.Instance.MainPlayer == null)
|
|
return;
|
|
m_currentSelectItem = freight;
|
|
LoadAssetBundle.Instance.SetImageSprite(ItemInfoIcon, commonItem.Icon);
|
|
LoadAssetBundle.Instance.SetImageSprite(ItemQuility, Utils.GetItemQualityFrame(commonItem.Quality));
|
|
if (commonItem.QualityEffect > 0)
|
|
{
|
|
CommonItemContainerItem.ShowQualityEffect(true, commonItem.QualityEffect, ItemInfoIcon.transform);
|
|
}
|
|
else
|
|
{
|
|
CommonItemContainerItem.ShowQualityEffect(false, commonItem.QualityEffect, ItemInfoIcon.transform);
|
|
}
|
|
|
|
ItemInfoName.text = table.ItemName;
|
|
int hasNum = GameManager.gameManager.PlayerDataPool.BackPack.GetItemCountByDataId(table.ItemId);
|
|
GetItemBtn.SetActive(false);
|
|
if (m_currentSelectItem.IsActive == 1)
|
|
{
|
|
if (m_currentSelectItem.IsActive == 1)
|
|
{
|
|
ItemInfoNum.text = StrDictionary.GetClientDictionaryString("#{27030}");
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (hasNum < table.ItemNum)
|
|
{
|
|
ItemInfoNum.text = string.Format("{2}{0}</color>/{1}", hasNum, table.ItemNum, StrDictionary.GetClientDictionaryString("#{5526}"));
|
|
GetItemBtn.SetActive(true);
|
|
}
|
|
else
|
|
{
|
|
ItemInfoNum.text = string.Format("{0}/{1}", hasNum, table.ItemNum);
|
|
}
|
|
}
|
|
|
|
int levelCount = table.getLevelSecCount();
|
|
if (levelCount > 0)
|
|
{
|
|
for (int i = levelCount - 1; i >= 0; i--)
|
|
{
|
|
if (i <= 0)
|
|
{
|
|
levelCount = 0;
|
|
break;
|
|
}
|
|
int levelMin = table.GetLevelSecbyIndex(i - 1);
|
|
int levelMax = table.GetLevelSecbyIndex(i);
|
|
if (GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.Level >= levelMax)
|
|
{
|
|
levelCount = i;
|
|
break;
|
|
}
|
|
if (GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.Level < levelMax && GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.Level >= levelMin)
|
|
{
|
|
levelCount = i-1;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
levelCount = 0;
|
|
}
|
|
|
|
if (m_packet.Guid == Singleton<ObjManager>.Instance.MainPlayer.GUID)
|
|
{
|
|
SetBtnSelfText(hasNum , table.ItemNum);
|
|
addAwardTip.SetActive(true);
|
|
helpAwardTip.SetActive(false);
|
|
addAwardExp.gameObject.SetActive(true);
|
|
//addAwardguildCon.gameObject.SetActive(true);
|
|
addAwardMoney.gameObject.SetActive(true);
|
|
addAwardExp.text = table.GetExpbyIndex(levelCount).ToString();
|
|
addAwardMoney.text = table.GetYinLiangbyIndex(levelCount).ToString();
|
|
//addAwardguildCon.text = table.GetContributebyIndex(levelCount).ToString();
|
|
}
|
|
else
|
|
{
|
|
SetBtnOtherText();
|
|
addAwardTip.SetActive(false);
|
|
helpAwardTip.SetActive(true);
|
|
addAwardExp.text = table.GetExpbyIndex(levelCount).ToString();
|
|
addAwardMoney.text = table.GetYinLiangbyIndex(levelCount).ToString();
|
|
//addAwardExp.gameObject.SetActive(false);
|
|
//addAwardguildCon.gameObject.SetActive(true);
|
|
//addAwardMoney.gameObject.SetActive(false);
|
|
//addAwardguildCon.text = table.GetHelperContributebyIndex(levelCount).ToString();
|
|
}
|
|
}
|
|
|
|
public void Clicl_HelpMessage()
|
|
{
|
|
MessageHelpLogic.ShowHelpMessage(23);
|
|
}
|
|
|
|
public void Click_buyAndAdd()
|
|
{
|
|
CG_REQ_GUILD_FREIGHT send = (CG_REQ_GUILD_FREIGHT)PacketDistributed.CreatePacket(MessageID.PACKET_CG_REQ_GUILD_FREIGHT);
|
|
send.SetType((int)CG_REQ_GUILD_FREIGHT.REQ_FREIGHT_TYPE.AUTO_ACTIVE_ITEM);
|
|
send.SetGuid(m_packet.Guid);
|
|
send.AddIndex(m_currentSelectItem.Index);
|
|
send.SendPacket();
|
|
}
|
|
|
|
//装填物品
|
|
public void Click_AddItem()
|
|
{
|
|
Tab_GuildFreightPool table = TableManager.GetGuildFreightPoolByID(m_currentSelectItem.Freightid, 0);
|
|
if (table == null)
|
|
return;
|
|
int hasNum = GameManager.gameManager.PlayerDataPool.BackPack.GetItemCountByDataId(table.ItemId);
|
|
if(hasNum < table.ItemNum)
|
|
{
|
|
GUIData.AddNotifyData(GCGame.Table.StrDictionary.GetClientDictionaryString("#{21002}"));
|
|
return;
|
|
}
|
|
|
|
CG_REQ_GUILD_FREIGHT send = (CG_REQ_GUILD_FREIGHT)PacketDistributed.CreatePacket(MessageID.PACKET_CG_REQ_GUILD_FREIGHT);
|
|
send.SetType((int)CG_REQ_GUILD_FREIGHT.REQ_FREIGHT_TYPE.ACTIVE_ITEM);
|
|
send.SetGuid(m_packet.Guid);
|
|
send.AddIndex(m_currentSelectItem.Index);
|
|
send.SendPacket();
|
|
}
|
|
|
|
//求助
|
|
public void Click_AskHelp()
|
|
{
|
|
CG_REQ_GUILD_FREIGHT send = (CG_REQ_GUILD_FREIGHT)PacketDistributed.CreatePacket(MessageID.PACKET_CG_REQ_GUILD_FREIGHT);
|
|
send.SetType((int)CG_REQ_GUILD_FREIGHT.REQ_FREIGHT_TYPE.SEEK_HELP);
|
|
send.SetGuid(Singleton<ObjManager>.Instance.MainPlayer.GUID);
|
|
send.AddIndex(m_currentSelectItem.Index);
|
|
send.SendPacket();
|
|
helpBtnDisable.SetActive(true);
|
|
|
|
AskHelpTime[m_currentSelectItem.Index] = Time.realtimeSinceStartup;
|
|
|
|
StopCoroutine(OneSceond());
|
|
StartCoroutine(OneSceond());
|
|
|
|
}
|
|
|
|
public void Click_HelpNO()
|
|
{
|
|
GUIData.AddNotifyData(StrDictionary.GetClientDictionaryString("{#27033}"));
|
|
}
|
|
|
|
public void Click_HelpDisable()
|
|
{
|
|
GUIData.AddNotifyData(StrDictionary.GetClientDictionaryString("{#25131}"));
|
|
}
|
|
|
|
IEnumerator OneSceond()
|
|
{
|
|
yield return new WaitForSeconds(60);
|
|
List<int> keys = new List<int>(AskHelpTime.Keys);
|
|
for(int i=0;i<keys.Count;i++)
|
|
{
|
|
if(Time.realtimeSinceStartup - AskHelpTime[keys[i]] >=1)
|
|
{
|
|
AskHelpTime.Remove(keys[i]);
|
|
}
|
|
}
|
|
ClickItem(m_currentSelectItem);
|
|
}
|
|
|
|
public void GetItemMethod()
|
|
{
|
|
if (m_currentSelectItem == null)
|
|
return;
|
|
int poolID = m_currentSelectItem.Freightid;
|
|
Tab_GuildFreightPool table = TableManager.GetGuildFreightPoolByID(poolID, 0);
|
|
if (table == null)
|
|
return;
|
|
ItemTooltipsLogic.ShowItemTooltip(table.ItemId, ItemTooltipsLogic.ShowType.GetPath, transform.position);
|
|
//ItemGetPathPopRoot.Show(table.ItemId, Vector3.zero);
|
|
}
|
|
|
|
public void Click_AskFinish()
|
|
{
|
|
if (m_packet == null)
|
|
return;
|
|
Tab_GuildFreightOther table = TableManager.GetGuildFreightOtherByID(0, 0);
|
|
if (table == null)
|
|
return;
|
|
if (_addedNum < table.DaySeekHelpCount)
|
|
return;
|
|
if(_addedNum<m_packet.iteminfoCount)
|
|
{
|
|
MessageBoxLogic.OpenOKCancelBox(StrDictionary.GetClientDictionaryString("#{27031}"), "", AskFinishOK, null);
|
|
return;
|
|
}
|
|
if (GameManager.gameManager.MissionManager != null)
|
|
{
|
|
GameManager.gameManager.MissionManager.MissionPathFinder(GlobeVar.TRANSPORT_MISSION);
|
|
Click_Close();
|
|
return;
|
|
}
|
|
}
|
|
|
|
public void AskFinishOK()
|
|
{
|
|
if (GameManager.gameManager.MissionManager != null)
|
|
{
|
|
GameManager.gameManager.MissionManager.MissionPathFinder(GlobeVar.TRANSPORT_MISSION);
|
|
Click_Close();
|
|
return;
|
|
}
|
|
}
|
|
|
|
public void Click_Close()
|
|
{
|
|
UIManager.CloseUI(UIInfo.GuildTransport);
|
|
}
|
|
} |