663 lines
21 KiB
C#
663 lines
21 KiB
C#
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using GCGame.Table;
|
|
using Games.LogicObj;
|
|
using Games.Mission;
|
|
using Games.GlobeDefine;
|
|
using Module.Log;
|
|
using Games.Item;
|
|
|
|
public class MissionInfoController : UIControllerBase<MissionInfoController>
|
|
{
|
|
|
|
public GameObject m_GameObj;
|
|
|
|
//接受任务界面信息
|
|
public Text[] m_NpcName; // 对话NPC
|
|
public Image m_NpcSprite; //任务NPC头像
|
|
public UICameraTexture[] _NpcCameraTexture;
|
|
public Text m_MissionAwardInfo; //任务奖励信息
|
|
|
|
public Text[] m_MissionConent; //任务内容
|
|
|
|
public GameObject playerPanel;
|
|
public GameObject npcPanel;
|
|
|
|
|
|
private int m_CurMissionID; //当前任务ID
|
|
private MissionUIType m_MissionType = MissionUIType.TYPE_NONE;
|
|
|
|
public List<Text> _RemainText;
|
|
|
|
public enum MissionUIType
|
|
{
|
|
TYPE_NONE,
|
|
TYPE_ACCETP,
|
|
TYPE_COMPLETE,
|
|
}
|
|
|
|
enum DialogType
|
|
{
|
|
None = -1,
|
|
Player = 0,
|
|
Npc = 1,
|
|
}
|
|
|
|
public class MissionUIInfo
|
|
{
|
|
public MissionUIInfo(int missionID, MissionUIType type)
|
|
{
|
|
_nMissionID = missionID;
|
|
_type = type;
|
|
}
|
|
public int _nMissionID;
|
|
public MissionUIType _type;
|
|
}
|
|
public static void ShowNpcDialogUI(int nDialogID)
|
|
{
|
|
UIManager.ShowUI(UIInfo.MissionInfoController, OnShowNpcDialogUI, nDialogID);
|
|
}
|
|
|
|
static void OnShowNpcDialogUI(bool bSuccess, object dialogID)
|
|
{
|
|
if (!bSuccess)
|
|
{
|
|
LogModule.ErrorLog("load MissionInfoController fail");
|
|
return;
|
|
}
|
|
|
|
int nDialogID = (int)dialogID;
|
|
|
|
if (null != MissionInfoController.Instance())
|
|
{
|
|
MissionInfoController.Instance().DoShowNPCDialog(nDialogID);
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 显示对话框
|
|
/// </summary>
|
|
/// <param name='bMission'>
|
|
/// 是否是任务
|
|
/// </param>
|
|
/// <param name='nDialogId'>
|
|
/// 任务ID/对白ID
|
|
/// </param>
|
|
public static void ShowMissionDialogUI(int nMissionID)
|
|
{
|
|
|
|
Tab_MissionBase table = TableManager.GetMissionBaseByID(nMissionID, 0);
|
|
if (table != null)
|
|
{
|
|
// NPC 距离判断
|
|
Obj_NPC TargetNpc = Singleton<DialogCore>.GetInstance().CareNPC;
|
|
|
|
// 是否已接取
|
|
bool isHaveMission = GameManager.gameManager.MissionManager.IsHaveMission(nMissionID);
|
|
MissionState misState = (MissionState)GameManager.gameManager.MissionManager.GetMissionState(nMissionID);
|
|
|
|
Tab_MissionBase missionBase = TableManager.GetMissionBaseByID(nMissionID, 0);
|
|
if (missionBase == null)
|
|
{
|
|
LogModule.ErrorLog("MissionBase is null , id : " + nMissionID);
|
|
return;
|
|
}
|
|
|
|
Tab_MissionLogic missionLogic = TableManager.GetMissionLogicByID(missionBase.LogicID, 0);
|
|
if (missionLogic == null)
|
|
{
|
|
LogModule.ErrorLog("MissionLogic is null, id is : " + missionBase.LogicID);
|
|
return;
|
|
}
|
|
|
|
|
|
if (isHaveMission)
|
|
{
|
|
int index = GameManager.gameManager.MissionManager.getCurMissionIndex(nMissionID);
|
|
|
|
bool isFinalMission = GameManager.gameManager.MissionManager.getCurMissionTypeCount(nMissionID) - 1 == index ? true : false;
|
|
|
|
if (isFinalMission)
|
|
{
|
|
misState = MissionState.Mission_Completed; //最后一个任务是对话的时候,打开对话框的时候就设置任务为完成状态。
|
|
}
|
|
}
|
|
|
|
if (isHaveMission && misState != MissionState.Mission_Failed)
|
|
{
|
|
if (MissionState.Mission_Completed == misState)
|
|
{
|
|
if (table.MissionType == (int)MISSIONTYPE.MISSION_INSEC
|
|
|| table.MissionType == (int)MISSIONTYPE.MISSION_TREASURE
|
|
|| table.MissionType == (int)MISSIONTYPE.MISSION_CIRCLE
|
|
|| (table.CompleteDataID > 0 && table.CompleteDataID == TargetNpc.BaseAttr.RoleBaseID)) //师门,藏宝图 任务自动弹出对话框
|
|
{
|
|
ShowMissionDialogUI(nMissionID, MissionInfoController.MissionUIType.TYPE_COMPLETE);
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
bool isCanAcceptMission = GameManager.gameManager.MissionManager.CanAcceptMission(nMissionID);
|
|
if (isCanAcceptMission)
|
|
{
|
|
if (table.MissionType == (int)MISSIONTYPE.MISSION_INSEC
|
|
|| table.MissionType == (int)MISSIONTYPE.MISSION_TREASURE
|
|
|| table.MissionType == (int)MISSIONTYPE.MISSION_CIRCLE
|
|
|| (table.AcceptDataID > 0 && table.AcceptDataID == TargetNpc.BaseAttr.RoleBaseID))
|
|
{
|
|
ShowMissionDialogUI(nMissionID, MissionInfoController.MissionUIType.TYPE_ACCETP);
|
|
}
|
|
}
|
|
}
|
|
|
|
if (GuideLogic.Instance())
|
|
{
|
|
GuideLogic.Instance().NextMissionID = -1;
|
|
}
|
|
}
|
|
}
|
|
|
|
public static void ShowMissionDialogUI(int nMissionID, MissionUIType type)
|
|
{
|
|
MissionUIInfo curInfo = new MissionUIInfo(nMissionID, type);
|
|
UIManager.ShowUI(UIInfo.MissionInfoController, OnShowMissionDialogUI, curInfo);
|
|
}
|
|
|
|
static void OnShowMissionDialogUI(bool bSuccess, object dialogID)
|
|
{
|
|
if (!bSuccess)
|
|
{
|
|
LogModule.ErrorLog("load MissionInfoController fail");
|
|
return;
|
|
}
|
|
|
|
MissionUIInfo curInfo = (MissionUIInfo)dialogID;
|
|
|
|
if (null != MissionInfoController.Instance() && curInfo != null)
|
|
{
|
|
MissionInfoController.Instance().MissionUI(curInfo._nMissionID, curInfo._type);
|
|
}
|
|
}
|
|
|
|
void Awake()
|
|
{
|
|
SetInstance(this);
|
|
}
|
|
// Use this for initialization
|
|
void Start()
|
|
{
|
|
if (m_GameObj)
|
|
{
|
|
m_GameObj.SetActive(true);
|
|
}
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void FixedUpdate()
|
|
{
|
|
if (Time.frameCount % 15 != 0)
|
|
{
|
|
if (gameObject.activeSelf)
|
|
{
|
|
if (false == Singleton<DialogCore>.GetInstance().IsInDialogArea())
|
|
{
|
|
//UIManager.CloseUI(UIInfo.MissionInfoController);
|
|
OnCloseClick();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
void OnDisable()
|
|
{
|
|
CleanUp();
|
|
//NPC 对话完需隐藏脚底光环
|
|
//GameManager.gameManager.ActiveScene.DeactiveSelectCircle();
|
|
_NpcCameraTexture[(int)DialogType.Npc].DestroyObj();
|
|
}
|
|
|
|
void OnDestroy()
|
|
{
|
|
SetInstance(null);
|
|
}
|
|
|
|
private DialogType curDialogType = DialogType.None;
|
|
void ShowPanel(DialogType type)
|
|
{
|
|
curDialogType = type;
|
|
npcPanel.gameObject.SetActive(type == DialogType.Npc);
|
|
playerPanel.gameObject.SetActive(type == DialogType.Player);
|
|
}
|
|
|
|
void CleanUp()
|
|
{
|
|
for (int index = 0; index < m_MissionConent.Length; index++)
|
|
{
|
|
m_MissionConent[index].text = "";
|
|
}
|
|
m_DialogIndex = -1;
|
|
m_CurMissionID = 0;
|
|
m_MissionType = MissionUIType.TYPE_NONE;
|
|
_RemainText[0].text = "";
|
|
_RemainText[1].text = "";
|
|
}
|
|
|
|
private int _NpcSoundLimitTime = -1;
|
|
void DoShowNPCDialog(int nDialogID)
|
|
{
|
|
// 先清理
|
|
CleanUp();
|
|
|
|
Tab_NpcDialog DialogLine = TableManager.GetNpcDialogByID(nDialogID, 0);
|
|
if (DialogLine != null)
|
|
{
|
|
|
|
if (m_MissionConent[(int)DialogType.Npc])
|
|
{
|
|
m_MissionConent[(int)DialogType.Npc].text = StrDictionary.GetClientString_WithNameSex(DialogLine.Dialog);
|
|
}
|
|
}
|
|
NpcDialogUI(MissionUIType.TYPE_NONE);
|
|
|
|
if(GlobalData.NextNpcSoundTime == -1)
|
|
{
|
|
GameManager.gameManager.SoundManager.StopSoundEffect(GlobalData._PlayingSoundID, 1);
|
|
GlobalData._PlayingSoundID = DialogLine.SoundId;
|
|
GameManager.gameManager.SoundManager.PlaySoundEffect(DialogLine.SoundId, 1);
|
|
}
|
|
else
|
|
{
|
|
if(GlobalData.ServerAnsiTime > GlobalData.NextNpcSoundTime)
|
|
{
|
|
GameManager.gameManager.SoundManager.StopSoundEffect(GlobalData._PlayingSoundID, 1);
|
|
GlobalData._PlayingSoundID = DialogLine.SoundId;
|
|
GameManager.gameManager.SoundManager.PlaySoundEffect(DialogLine.SoundId, 1);
|
|
|
|
if (_NpcSoundLimitTime == -1)
|
|
{
|
|
_NpcSoundLimitTime = int.Parse(TableManager.GetSystemParamByID(51, 0).StringValue);
|
|
}
|
|
|
|
GlobalData.NextNpcSoundTime += _NpcSoundLimitTime;
|
|
}
|
|
}
|
|
|
|
}
|
|
// Npc头像
|
|
//private int _LastNpcModelId = -1;
|
|
void NpcDialogUI(MissionUIType m_Type)
|
|
{
|
|
if (m_Type == MissionUIType.TYPE_NONE) //没有任务状态的时候进行默认的NPC对话
|
|
{
|
|
ShowPanel(DialogType.Npc);
|
|
}
|
|
Obj_NPC TargetNpc = Singleton<DialogCore>.GetInstance().CareNPC;
|
|
Tab_RoleBaseAttr baseAttr = null;
|
|
Tab_RoleBaseAttr roleBase = null;
|
|
Tab_CharModel charModel = null;
|
|
Tab_MissionBase missionBase = TableManager.GetMissionBaseByID(m_CurMissionID, 0);
|
|
if (missionBase.MissionType == (int)MISSIONTYPE.MISSION_INSEC) //师门任务NPC头像
|
|
{
|
|
if (missionBase != null && missionBase.MissionType == 3)
|
|
{
|
|
if (m_Type == MissionUIType.TYPE_ACCETP)
|
|
{
|
|
baseAttr = TableManager.GetRoleBaseAttrByID(GlobeVar.GetMasterRolebaseId(GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.Profession), 0);
|
|
}
|
|
else
|
|
{
|
|
baseAttr = TableManager.GetRoleBaseAttrByID(TargetNpc.RoleBaseID, 0);
|
|
}
|
|
if (baseAttr == null)
|
|
{
|
|
return;
|
|
}
|
|
|
|
roleBase = TableManager.GetRoleBaseAttrByID(baseAttr.Id, 0);
|
|
if (roleBase == null)
|
|
{
|
|
return;
|
|
}
|
|
|
|
charModel = TableManager.GetCharModelByID(baseAttr.CharModelID, 0);
|
|
if (null == charModel)
|
|
{
|
|
return;
|
|
}
|
|
|
|
{
|
|
m_NpcName[(int)DialogType.Npc].text = roleBase.Name;
|
|
if (missionBase.MissionType == 3)
|
|
{
|
|
m_NpcName[(int)DialogType.Npc].text = baseAttr.Name;
|
|
}
|
|
|
|
_NpcCameraTexture[(int)DialogType.Npc].isPreview = true;
|
|
_NpcCameraTexture[(int)DialogType.Npc].InitModelPath(charModel.ResPath, charModel, LoadAssetBundle.BUNDLE_PATH_MODEL,false);
|
|
}
|
|
|
|
}
|
|
return;
|
|
}
|
|
|
|
|
|
//int nNpcDataID = TargetNpc.BaseAttr.DataID;
|
|
if (TargetNpc.ModelID < 0)
|
|
{
|
|
return;
|
|
}
|
|
|
|
roleBase = TableManager.GetRoleBaseAttrByID(TargetNpc.BaseAttr.RoleBaseID, 0);
|
|
if (roleBase == null)
|
|
{
|
|
return;
|
|
}
|
|
|
|
charModel = TableManager.GetCharModelByID(TargetNpc.ModelID, 0);
|
|
if (null == charModel)
|
|
{
|
|
return;
|
|
}
|
|
|
|
{
|
|
var uiTexture = _NpcCameraTexture[(int)DialogType.Npc];
|
|
m_NpcName[(int)DialogType.Npc].text = roleBase.Name;
|
|
uiTexture.InitModelPath(charModel.ResPath, charModel);
|
|
// 统一加载流程,现在模型本身也不会反复加载,因此消耗是可以忽略的
|
|
// if (_LastNpcModelId == charModel.Id)
|
|
// uiTexture.EnableRawImage();
|
|
// else
|
|
// {
|
|
// _LastNpcModelId = charModel.Id;
|
|
// uiTexture.InitModelPath(charModel.ResPath, charModel);
|
|
// }
|
|
}
|
|
}
|
|
|
|
private int _LastPlayerModelId = -1;
|
|
void PlayerDialogUI()
|
|
{
|
|
m_NpcName[(int)DialogType.Player].text = Singleton<ObjManager>.Instance.MainPlayer.BaseAttr.RoleName;
|
|
//if (_LastPlayerModelId == Singleton<ObjManager>.Instance.MainPlayer.ModelID)
|
|
//{
|
|
// return;
|
|
//}
|
|
_LastPlayerModelId = Singleton<ObjManager>.Instance.MainPlayer.ModelID;
|
|
_NpcCameraTexture[(int)DialogType.Player].isPreview = true;
|
|
_NpcCameraTexture[(int)DialogType.Player].InitPlayerModel(Singleton<ObjManager>.Instance.MainPlayer, false, delegate ()
|
|
{
|
|
_NpcCameraTexture[(int)DialogType.Player]._FakeObj.renderCamera.orthographicSize = 1.3f;
|
|
if (!_NpcCameraTexture[(int)DialogType.Player]._RawImage.isActiveAndEnabled)
|
|
{
|
|
_NpcCameraTexture[(int)DialogType.Player]._RawImage.gameObject.SetActive(true);
|
|
}
|
|
});
|
|
}
|
|
|
|
// 接任务和交任务UI
|
|
public void MissionUI(int nMissionID, MissionUIType type)
|
|
{
|
|
// 先清理
|
|
CleanUp();
|
|
ShowMissionDialog(nMissionID, type);
|
|
}
|
|
|
|
int m_DialogIndex = -1;
|
|
public void ShowMissionDialog(int nMissionID, MissionUIType type)
|
|
{
|
|
if (nMissionID < 0)
|
|
{
|
|
return;
|
|
}
|
|
m_CurMissionID = nMissionID;
|
|
Tab_MissionDictionary MDLine = TableManager.GetMissionDictionaryByID(nMissionID, 0);
|
|
if (MDLine == null)
|
|
{
|
|
return;
|
|
}
|
|
|
|
Tab_MissionDialog DialogTab = null;
|
|
if (type == MissionUIType.TYPE_ACCETP)
|
|
{
|
|
DialogTab = TableManager.GetMissionDialogByID(MDLine.MissionAcceptDialogID, 0);
|
|
}
|
|
else
|
|
{
|
|
DialogTab = TableManager.GetMissionDialogByID(MDLine.MissionFinishDialogID, 0);
|
|
}
|
|
if (DialogTab == null)
|
|
return;
|
|
|
|
m_DialogIndex++;
|
|
string DialogStr = DialogTab.GetDialogbyIndex(m_DialogIndex);
|
|
bool isNpc = DialogTab.GetDialogTypebyIndex(m_DialogIndex);
|
|
if (string.IsNullOrEmpty(DialogStr) || DialogStr == "-1")
|
|
{
|
|
MissionDialogOver();
|
|
return;
|
|
}
|
|
|
|
if (isNpc)
|
|
{
|
|
ShowPanel(DialogType.Npc);
|
|
m_MissionConent[(int)DialogType.Npc].text = StrDictionary.GetClientString_WithNameSex(DialogStr);
|
|
}
|
|
else
|
|
{
|
|
ShowPanel(DialogType.Player);
|
|
m_MissionConent[(int)DialogType.Player].text = StrDictionary.GetClientString_WithNameSex(DialogStr);
|
|
}
|
|
|
|
if (type == MissionUIType.TYPE_ACCETP)
|
|
{
|
|
if (m_DialogIndex <= 0)
|
|
{
|
|
if(MDLine.AcceptSoundId != -1 && MDLine.AcceptSoundId != GlobalData._PlayingSoundID)
|
|
{
|
|
GameManager.gameManager.SoundManager.StopSoundEffect(GlobalData._PlayingSoundID, 1);
|
|
GlobalData._PlayingSoundID = MDLine.AcceptSoundId;
|
|
GameManager.gameManager.SoundManager.PlaySoundEffect(MDLine.AcceptSoundId, 1);
|
|
}
|
|
}
|
|
}
|
|
else if (type == MissionUIType.TYPE_COMPLETE)
|
|
{
|
|
if (m_DialogIndex <= 0)
|
|
{
|
|
if(MDLine.CompleteSoundID != -1 && MDLine.CompleteSoundID != GlobalData._PlayingSoundID)
|
|
{
|
|
GameManager.gameManager.SoundManager.StopSoundEffect(GlobalData._PlayingSoundID, 1);
|
|
GlobalData._PlayingSoundID = MDLine.CompleteSoundID;
|
|
GameManager.gameManager.SoundManager.PlaySoundEffect(MDLine.CompleteSoundID, 1);
|
|
}
|
|
}
|
|
}
|
|
m_MissionType = type;
|
|
if (isNpc)
|
|
NpcDialogUI(m_MissionType);
|
|
else
|
|
PlayerDialogUI();
|
|
|
|
GameManager.gameManager.SoundManager.PlaySoundEffect(128);
|
|
if (DialogTab.ContinueTime > 0)
|
|
{
|
|
StartCoroutine(NextDialog(DialogTab.ContinueTime / 1000));
|
|
SetRemainText(DialogTab.ContinueTime / 1000);
|
|
}else
|
|
{
|
|
for(int index = 0; index < _RemainText.Count; index++)
|
|
{
|
|
_RemainText[index].gameObject.SetActive(false);
|
|
}
|
|
}
|
|
}
|
|
|
|
IEnumerator NextDialog(int waitTime)
|
|
{
|
|
while(true)
|
|
{
|
|
yield return new WaitForSeconds(1.0f);
|
|
waitTime--;
|
|
if(waitTime <= 0)
|
|
{
|
|
ShowMissionDialog(m_CurMissionID, m_MissionType);
|
|
SetRemainText(0);
|
|
yield break;
|
|
}
|
|
SetRemainText(waitTime);
|
|
}
|
|
}
|
|
|
|
public void SetRemainText(int remainTime)
|
|
{
|
|
for(int index = 0; index < _RemainText.Count; index++)
|
|
{
|
|
if (!_RemainText[index].gameObject.activeInHierarchy)
|
|
_RemainText[index].gameObject.SetActive(true);
|
|
|
|
_RemainText[index].text = "(" + remainTime + ")";
|
|
}
|
|
}
|
|
|
|
public void MissionDialogOver()
|
|
{
|
|
if (m_MissionType == MissionUIType.TYPE_ACCETP)
|
|
{
|
|
GameManager.gameManager.SoundManager.PlaySoundEffect(135);
|
|
|
|
if (!GameManager.gameManager.MissionManager.IsHaveMission(m_CurMissionID))
|
|
GameManager.gameManager.MissionManager.AcceptMission(m_CurMissionID, MissionManager.AcceptMissionType.MISSIONID);
|
|
|
|
}
|
|
else if (m_MissionType == MissionUIType.TYPE_COMPLETE)
|
|
{
|
|
GameManager.gameManager.SoundManager.PlaySoundEffect(135);
|
|
GameManager.gameManager.MissionManager.CompleteMission(m_CurMissionID);
|
|
|
|
}
|
|
|
|
RingMissionAutoSearch(); //师门 在点击完对话后自动寻路
|
|
m_DialogIndex = -1;
|
|
|
|
//全部判断完之后再关闭,这边会清理一次信息
|
|
UIManager.CloseUI(UIInfo.MissionInfoController);
|
|
}
|
|
|
|
public void DialogClick()
|
|
{
|
|
if (m_DialogIndex < 0)
|
|
{
|
|
MissionDialogOver();
|
|
}
|
|
else
|
|
{
|
|
StopAllCoroutines();
|
|
ShowMissionDialog(m_CurMissionID, m_MissionType);
|
|
}
|
|
}
|
|
|
|
public void RingMissionAutoSearch()
|
|
{
|
|
Tab_MissionBase missionbase = TableManager.GetMissionBaseByID(m_CurMissionID, 0);
|
|
if (missionbase == null)
|
|
{
|
|
return;
|
|
}
|
|
|
|
if (Singleton<DialogCore>.GetInstance() != null
|
|
&& Singleton<DialogCore>.GetInstance().CareNPC != null
|
|
&& Singleton<DialogCore>.GetInstance().CareNPC.RoleBaseID == missionbase.CompleteDataID //如果当前发布任务NPC跟完成任务NPC是同一个NPC,这边在接到任务之后不会自动寻路
|
|
&& GameManager.gameManager.MissionManager.GetMissionState(m_CurMissionID) != (int)Games.Mission.MissionState.Mission_Accepted)
|
|
{
|
|
return;
|
|
}
|
|
|
|
if (missionbase.MissionType == (int)MISSIONTYPE.MISSION_INSEC)
|
|
{
|
|
if (GameManager.gameManager.MissionManager.GetMissionState(GameManager.gameManager.MissionManager.GetMissionInSecId()) == (int)MissionState.Mission_Accepted)
|
|
{
|
|
GameManager.gameManager.MissionManager.MissionPathFinder(GameManager.gameManager.MissionManager.GetMissionInSecId());
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 接受任务
|
|
/// </summary>
|
|
public void MissionAccept()
|
|
{
|
|
UIManager.CloseUI(UIInfo.MissionInfoController);
|
|
GameManager.gameManager.SoundManager.PlaySoundEffect(135);
|
|
GameManager.gameManager.MissionManager.AcceptMission(m_CurMissionID, MissionManager.AcceptMissionType.MISSIONID);
|
|
}
|
|
/// <summary>
|
|
/// 完成任务
|
|
/// </summary>
|
|
public void MissionComplete()
|
|
{
|
|
UIManager.CloseUI(UIInfo.MissionInfoController);
|
|
GameManager.gameManager.SoundManager.PlaySoundEffect(135);
|
|
GameManager.gameManager.MissionManager.CompleteMission(m_CurMissionID);
|
|
}
|
|
|
|
|
|
|
|
public void OnCloseClick()
|
|
{
|
|
if (m_MissionType == MissionUIType.TYPE_ACCETP)
|
|
{
|
|
GameManager.gameManager.MissionManager.AcceptMission(m_CurMissionID, MissionManager.AcceptMissionType.MISSIONID);
|
|
}
|
|
|
|
UIManager.CloseUI(UIInfo.MissionInfoController);
|
|
}
|
|
|
|
public void ItemTipClick(object itemID)
|
|
{
|
|
int nItemID = (int)itemID;
|
|
|
|
if (nItemID <= -1)
|
|
{
|
|
return;
|
|
}
|
|
GameItem item = new GameItem();
|
|
item.DataID = nItemID;
|
|
if (item.IsEquipMent())
|
|
{
|
|
SpecialItemClick(item);
|
|
EquipTooltipsLogic.ShowEquipTooltip(item, ItemTooltipsLogic.ShowType.Info, transform.position);
|
|
}
|
|
else
|
|
{
|
|
ItemTooltipsLogic.ShowItemTooltip(item, ItemTooltipsLogic.ShowType.Info, transform.position);
|
|
}
|
|
}
|
|
|
|
void SpecialItemClick(GameItem gItem)
|
|
{
|
|
int nItemStarLevel = 0;
|
|
if (m_CurMissionID == 233)
|
|
{
|
|
nItemStarLevel = 12;
|
|
}
|
|
else if (m_CurMissionID == 234)
|
|
{
|
|
nItemStarLevel = 24;
|
|
}
|
|
else if (m_CurMissionID == 235)
|
|
{
|
|
nItemStarLevel = 36;
|
|
}
|
|
if (nItemStarLevel > 0)
|
|
{
|
|
gItem.StarLevel = nItemStarLevel;
|
|
}
|
|
}
|
|
|
|
}
|