public void MakeBattleCharInfo(short nBUID)
    {
        NkBattleChar charByBUID = NrTSingleton <NkBattleCharManager> .Instance.GetCharByBUID(nBUID);

        if (charByBUID != null)
        {
            if (charByBUID.GetBUID() <= -1)
            {
                return;
            }
            ColosseumObserverControlDlg.OBSERVER_SOLDIERINFO obSoldierInfo = this.GetObSoldierInfo(charByBUID.Ally, charByBUID.GetBUID());
            if (obSoldierInfo == null)
            {
                return;
            }
            if (obSoldierInfo.m_nBUID == -1)
            {
                NrCharKindInfo charKindInfo = charByBUID.GetCharKindInfo();
                if (charKindInfo == null)
                {
                    return;
                }
                string textureFromBundle = string.Empty;
                textureFromBundle = "UI/Soldier/64/" + charKindInfo.GetPortraitFile1(0, string.Empty) + "_64";
                obSoldierInfo.m_itSol.SetTextureFromBundle(textureFromBundle);
                obSoldierInfo.m_nBUID = charByBUID.GetBUID();
                obSoldierInfo.m_dtQuestion.Visible = false;
                obSoldierInfo.m_fMaxHP             = (float)charByBUID.GetMaxHP(false);
                this.UpdateHP(charByBUID.Ally, charByBUID.GetBUID(), (float)charByBUID.GetSoldierInfo().GetHP(), 0, false);
                this.SetEnableTurn(charByBUID.Ally, charByBUID.GetBUID(), charByBUID.GetTurnState() != eBATTLE_TURN_STATE.eBATTLE_TURN_STATE_DISABLE);
            }
        }
    }
示例#2
0
 public bool IsSameKindSolInBattle(int charkind)
 {
     if (this.m_arChar == null)
     {
         return(false);
     }
     NkBattleChar[] arChar = this.m_arChar;
     for (int i = 0; i < arChar.Length; i++)
     {
         NkBattleChar nkBattleChar = arChar[i];
         if (nkBattleChar != null)
         {
             if (nkBattleChar.GetCharKindInfo().GetCharKind() == charkind)
             {
                 if (nkBattleChar.MyChar)
                 {
                     if (!nkBattleChar.m_bDeadReaservation)
                     {
                         return(true);
                     }
                 }
             }
         }
     }
     return(false);
 }
    public void MakeAllBattleCharInfo()
    {
        NkBattleChar[] charArray = NrTSingleton <NkBattleCharManager> .Instance.GetCharArray();

        for (int i = 0; i < charArray.Length; i++)
        {
            NkBattleChar nkBattleChar = charArray[i];
            if (nkBattleChar != null)
            {
                if (nkBattleChar.GetBUID() > -1)
                {
                    ColosseumObserverControlDlg.OBSERVER_SOLDIERINFO obSoldierInfo = this.GetObSoldierInfo(nkBattleChar.Ally, nkBattleChar.GetBUID());
                    if (obSoldierInfo != null)
                    {
                        if (obSoldierInfo.m_nBUID == -1)
                        {
                            NrCharKindInfo charKindInfo = nkBattleChar.GetCharKindInfo();
                            if (charKindInfo != null)
                            {
                                string textureFromBundle = string.Empty;
                                textureFromBundle = "UI/Soldier/64/" + charKindInfo.GetPortraitFile1(0, string.Empty) + "_64";
                                obSoldierInfo.m_itSol.SetTextureFromBundle(textureFromBundle);
                                obSoldierInfo.m_nBUID = nkBattleChar.GetBUID();
                                obSoldierInfo.m_dtQuestion.Visible = false;
                                obSoldierInfo.m_fMaxHP             = (float)nkBattleChar.GetMaxHP(false);
                                this.UpdateHP(nkBattleChar.Ally, nkBattleChar.GetBUID(), (float)nkBattleChar.GetSoldierInfo().GetHP(), 0, false);
                                this.SetEnableTurn(nkBattleChar.Ally, nkBattleChar.GetBUID(), nkBattleChar.GetTurnState() != eBATTLE_TURN_STATE.eBATTLE_TURN_STATE_DISABLE);
                            }
                        }
                    }
                }
            }
        }
    }
示例#4
0
    public NrCharKindInfo GetCharKindInfo(int id)
    {
        NkBattleChar @char = this.GetChar(id);

        if (@char == null)
        {
            return(null);
        }
        return(@char.GetCharKindInfo());
    }
示例#5
0
    public List <NkBattleChar> GetCharListByKind(int charKind)
    {
        NkBattleChar[] charArray = this.GetCharArray();
        if (charArray == null)
        {
            return(null);
        }
        List <NkBattleChar> list = new List <NkBattleChar>();

        NkBattleChar[] array = charArray;
        for (int i = 0; i < array.Length; i++)
        {
            NkBattleChar nkBattleChar = array[i];
            if (nkBattleChar != null && nkBattleChar.GetCharKindInfo() != null)
            {
                if (charKind == nkBattleChar.GetCharKindInfo().GetCharKind())
                {
                    list.Add(nkBattleChar);
                }
            }
        }
        return(list);
    }
示例#6
0
    public void Set(NkBattleChar pkTarget, string strName, float fTime, int nTextIndex, bool bSkip)
    {
        this.m_bSkip = bSkip;
        this.m_lbCharName.SetText(strName);
        string empty = string.Empty;

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromTBS(nTextIndex.ToString())
        });

        this.m_lbTalk.SetFlashLabel(empty);
        this.m_dwCharFace.SetTexture(eCharImageType.LARGE, pkTarget.GetCharKindInfo().GetCharKind(), (int)pkTarget.GetSoldierInfo().GetGrade(), string.Empty);
        this.m_fEndTime = Time.time + fTime;
        this.Show();
    }
示例#7
0
    public void UpdateAggroSolInfo(GS_BATTLE_BOSS_AGGRO_NFY AggroSolData)
    {
        if (this.m_pkBossBattleChar == null)
        {
            return;
        }
        if (this.m_pkBossBattleChar.GetBUID() != AggroSolData.i16BUID)
        {
            return;
        }
        string empty = string.Empty;

        for (int i = 0; i < 3; i++)
        {
            if (AggroSolData.i8AggroValue[i] == 0)
            {
                this.m_itAggroSolIcon[i].Visible = false;
                this.m_lbAggroSolVal[i].Visible  = false;
                this.m_dwAggroSol_bg1[i].Visible = false;
                this.m_dwAggroSol_bg2[i].Visible = false;
            }
            else
            {
                NkBattleChar charByBUID = NrTSingleton <NkBattleCharManager> .Instance.GetCharByBUID(AggroSolData.i16AggroTargetBUID[i]);

                if (charByBUID != null)
                {
                    this.m_itAggroSolIcon[i].SetSolImageTexure(eCharImageType.SMALL, charByBUID.GetCharKindInfo().GetCharKind(), -1);
                }
                CTextParser arg_E7_0 = NrTSingleton <CTextParser> .Instance;
                object[]    expr_BA  = new object[3];
                expr_BA[0] = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("672");

                expr_BA[1] = "Count";
                int arg_E6_1 = 2;
                int num      = (int)AggroSolData.i8AggroValue[i];
                expr_BA[arg_E6_1] = num.ToString();
                arg_E7_0.ReplaceParam(ref empty, expr_BA);
                this.m_lbAggroSolVal[i].SetText(empty);
                this.m_itAggroSolIcon[i].Visible = true;
                this.m_lbAggroSolVal[i].Visible  = true;
                this.m_dwAggroSol_bg1[i].Visible = true;
                this.m_dwAggroSol_bg2[i].Visible = true;
            }
        }
    }
    public void SetBuffTextShowUp(int skillunique, NkBattleChar ActionBattleChar)
    {
        if (this.m_nlDeadSolList.Count > 0)
        {
            return;
        }
        if (Battle.BATTLE.ColosseumObserver)
        {
            return;
        }
        if (this.m_dwBuffIcon.Visible)
        {
            return;
        }
        if (!NrTSingleton <BattleSkill_Manager> .Instance.GetBuffSkillTextUse())
        {
            return;
        }
        if ((Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_BABELTOWER || Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_BOUNTYHUNT) && Battle.BabelPartyCount != 1)
        {
            return;
        }
        BATTLESKILL_BASE battleSkillBase = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(skillunique);

        if (battleSkillBase == null)
        {
            return;
        }
        if (ActionBattleChar != null)
        {
            if (NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillDESC(skillunique) == string.Empty)
            {
                return;
            }
            if (!this.CheckBattleSkillUnique(battleSkillBase.m_nSkillUnique))
            {
                return;
            }
            this.m_dwBuffIcon.Clear();
            this.m_lbBuffText.Clear();
            this.SetBattleSkillUnique(battleSkillBase.m_nSkillUnique);
            this.m_dwBuffIcon.SetSolImageTexure(eCharImageType.SMALL, ActionBattleChar.GetCharKindInfo().GetCharKind(), -1);
            string empty = string.Empty;
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_nSkillDESC),
                "targetname",
                ActionBattleChar.GetCharName()
            });

            this.m_lbBuffText.SetText(empty);
            base.AllHideLayer();
            base.SetShowLayer(this.BUFFSKILLTEXT_LAYER_1, true);
            this.m_fBuffIconTime = Time.time;
        }
        else
        {
            string text = string.Empty;
            for (int i = 0; i < 2; i++)
            {
                if (this.CheckBuffIconUnique(battleSkillBase.m_nBuffIconCode[i]))
                {
                    text = battleSkillBase.m_nBuffIconCode[i];
                    string battleSkillBuffIconDESC = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBuffIconDESC(text);

                    UIBaseInfoLoader battleSkillBuffIconTexture = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBuffIconTexture(text);

                    this.m_dwBuffIcon.Clear();
                    this.m_lbBuffText.Clear();
                    if (battleSkillBuffIconDESC != string.Empty && battleSkillBuffIconTexture != null)
                    {
                        this.SetBuffIconUnique(text);
                        this.m_dwBuffIcon.SetTexture(battleSkillBuffIconTexture);
                        this.m_lbBuffText.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBuffIconDESC));
                        base.AllHideLayer();
                        base.SetShowLayer(this.BUFFSKILLTEXT_LAYER_1, true);
                        this.m_fBuffIconTime = Time.time;
                    }
                    else
                    {
                        base.AllHideLayer();
                        base.SetShowLayer(this.BUFFSKILLTEXT_LAYER_1, false);
                    }
                    return;
                }
            }
        }
    }
示例#9
0
    private void GridInputMouse()
    {
        if (this.m_Battle.CastedTarget == null)
        {
            return;
        }
        if (this.m_Battle.CastedTarget.InputControlTrigger)
        {
            return;
        }
        if (NrTSingleton <FormsManager> .Instance.IsMouseOverForm())
        {
            return;
        }
        if (!this.m_Battle.CastedTarget.IsEnableMouseInput())
        {
            return;
        }
        NmBattleGrid nmBattleGrid   = null;
        bool         mouseButtonUp  = NkInputManager.GetMouseButtonUp(0);
        bool         mouseButtonUp2 = NkInputManager.GetMouseButtonUp(1);

        if (NkRaycast.Raycast(this.mc_kBattlePickLayer))
        {
            GameObject gameObject = NkRaycast.HIT.transform.gameObject;
            if (null != gameObject)
            {
                nmBattleGrid = gameObject.GetComponent <NmBattleGrid>();
                if (null != nmBattleGrid)
                {
                    eBATTLE_ALLY aLLY           = nmBattleGrid.ALLY;
                    short        sTARTPOS_INDEX = nmBattleGrid.STARTPOS_INDEX;
                    int          iNDEX          = nmBattleGrid.INDEX;
                    short        bUID           = nmBattleGrid.BUID;
                    NkBattleChar charByBUID     = NrTSingleton <NkBattleCharManager> .Instance.GetCharByBUID(bUID);

                    Vector3          pOINT            = NkRaycast.POINT;
                    BATTLESKILL_BASE bATTLESKILL_BASE = null;
                    int num = 0;
                    if (this.m_Battle.CastedTarget.m_iBattleSkillIndex >= 0 && this.m_Battle.CastedTarget.REQUEST_ORDER == eBATTLE_ORDER.eBATTLE_ORDER_SKILL)
                    {
                        NkBattleChar nkBattleChar = this.m_Battle.CastedTarget.SelectBattleSkillChar();
                        if (nkBattleChar == null)
                        {
                            return;
                        }
                        int skillUnique = nkBattleChar.GetSoldierInfo().SelectBattleSkillByWeapon(this.m_Battle.CastedTarget.m_iBattleSkillIndex);
                        bATTLESKILL_BASE = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(skillUnique);

                        if (bATTLESKILL_BASE == null)
                        {
                            return;
                        }
                        this.m_Battle.CastedTarget.GRID_MANAGER.SetSelectBattleSkillGrid();
                        if (bATTLESKILL_BASE.m_nSkillTargetType == 1 || bATTLESKILL_BASE.m_nSkillTargetType == 2)
                        {
                            num = 1;
                        }
                        else if (bATTLESKILL_BASE.m_nSkillTargetType == 3)
                        {
                            num = 2;
                        }
                        else if (bATTLESKILL_BASE.m_nSkillTargetType == 4)
                        {
                            num = 3;
                        }
                    }
                    if (this.m_Battle.CastedTarget.MyAlly != aLLY)
                    {
                        if (bATTLESKILL_BASE != null)
                        {
                            if ((num == 2 || num == 3) && bUID >= 0)
                            {
                                this.m_Battle.CastedTarget.GRID_MANAGER.ActiveBattleSkillGrid(aLLY, sTARTPOS_INDEX, iNDEX, bATTLESKILL_BASE.m_nSkillUnique);
                            }
                        }
                        if (mouseButtonUp)
                        {
                            if (this.m_Battle.CastedTarget.IsEmotionSet)
                            {
                                this.m_Battle.CastedTarget.Send_GS_BATTLE_EMOTICON_REQ(bUID);
                            }
                            else if (this.m_Battle.CastedTarget.REQUEST_ORDER == eBATTLE_ORDER.eBATTLE_ORDER_ATTACK_LAND)
                            {
                                this.m_Battle.CastedTarget.Send_AttackLand_Order(pOINT);
                                this.m_Battle.CastedTarget.REQUEST_ORDER = eBATTLE_ORDER.eBATTLE_ORDER_NONE;
                            }
                            else if (this.m_Battle.CastedTarget.m_iBattleSkillIndex >= 0 && this.m_Battle.CastedTarget.REQUEST_ORDER == eBATTLE_ORDER.eBATTLE_ORDER_SKILL)
                            {
                                if (num == 2 || num == 3)
                                {
                                    this.m_Battle.CastedTarget.GRID_MANAGER.ActiveBattleSkillGrid(aLLY, sTARTPOS_INDEX, iNDEX, bATTLESKILL_BASE.m_nSkillUnique);
                                    this.m_Battle.CastedTarget.Send_BattleSkill_Order(this.m_Battle.CastedTarget.m_iBattleSkillIndex, this.m_Battle.CastedTarget.SelectBattleSkillChar(), charByBUID, pOINT, (short)iNDEX);
                                    this.m_Battle.CastedTarget.Init_BattleSkill_Input(false);
                                    this.m_Battle.CastedTarget.REQUEST_ORDER = eBATTLE_ORDER.eBATTLE_ORDER_NONE;
                                }
                                else
                                {
                                    Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("578"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
                                }
                            }
                            else if (this.m_Battle.CastedTarget.REQUEST_ORDER == eBATTLE_ORDER.eBATTLE_ORDER_SEARCH)
                            {
                                NkBattleChar currentSelectChar = this.m_Battle.CastedTarget.GetCurrentSelectChar();
                                if (currentSelectChar != null)
                                {
                                }
                                this.m_Battle.CastedTarget.REQUEST_ORDER = eBATTLE_ORDER.eBATTLE_ORDER_NONE;
                            }
                            else
                            {
                                if (Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_PLUNDER || Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_INFINITY)
                                {
                                    if (Battle.BATTLE.GetCheckTargetBt() && charByBUID != null && charByBUID.GetSoldierInfo().GetHP() > 0 && charByBUID.GetCharKindInfo().GetCharKind() != 916)
                                    {
                                        Battle.BATTLE.Send_GS_BATTLE_PLUNDER_AGGROADD_REQ(charByBUID.GetBUID());
                                        Battle.BATTLE.ClickCheckTargetBt();
                                        Battle.BATTLE.SetTargetBtDisCount();
                                        NrTSingleton <NkEffectManager> .Instance.AddEffect("FX_ATTACK_TARGET", charByBUID);
                                    }
                                }
                                else
                                {
                                    NkBattleChar currentSelectChar2 = this.m_Battle.CastedTarget.GetCurrentSelectChar();
                                    if (currentSelectChar2 != null && charByBUID != null)
                                    {
                                        this.m_Battle.CastedTarget.GRID_MANAGER.ActiveAttack(aLLY, sTARTPOS_INDEX, iNDEX, charByBUID);
                                        if (charByBUID.GetSoldierInfo().GetHP() > 0)
                                        {
                                            currentSelectChar2.OrderAttackReq(charByBUID, (short)iNDEX, nmBattleGrid.GetCenter());
                                        }
                                    }
                                }
                                this.m_Battle.CastedTarget.REQUEST_ORDER = eBATTLE_ORDER.eBATTLE_ORDER_NONE;
                            }
                        }
                    }
                    else
                    {
                        if (bATTLESKILL_BASE != null && (num == 1 || num == 3) && bUID >= 0)
                        {
                            this.m_Battle.CastedTarget.GRID_MANAGER.ActiveBattleSkillGrid(aLLY, sTARTPOS_INDEX, iNDEX, bATTLESKILL_BASE.m_nSkillUnique);
                        }
                        if (mouseButtonUp)
                        {
                            if (this.m_Battle.CastedTarget.IsEmotionSet)
                            {
                                this.m_Battle.CastedTarget.Send_GS_BATTLE_EMOTICON_REQ(bUID);
                            }
                            else if (this.m_Battle.CastedTarget.m_iBattleSkillIndex >= 0 && this.m_Battle.CastedTarget.REQUEST_ORDER == eBATTLE_ORDER.eBATTLE_ORDER_SKILL)
                            {
                                if (num == 1 || num == 3)
                                {
                                    this.m_Battle.CastedTarget.GRID_MANAGER.ActiveBattleSkillGrid(aLLY, sTARTPOS_INDEX, iNDEX, bATTLESKILL_BASE.m_nSkillUnique);
                                    this.m_Battle.CastedTarget.Send_BattleSkill_Order(this.m_Battle.CastedTarget.m_iBattleSkillIndex, this.m_Battle.CastedTarget.SelectBattleSkillChar(), charByBUID, pOINT, (short)iNDEX);
                                    this.m_Battle.CastedTarget.Init_BattleSkill_Input(false);
                                    this.m_Battle.CastedTarget.REQUEST_ORDER = eBATTLE_ORDER.eBATTLE_ORDER_NONE;
                                }
                            }
                            else if (this.m_Battle.CastedTarget.REQUEST_ORDER == eBATTLE_ORDER.eBATTLE_ORDER_CHANGEPOS)
                            {
                                NkBattleChar currentSelectChar3 = this.m_Battle.CastedTarget.GetCurrentSelectChar();
                                if (currentSelectChar3 != null)
                                {
                                    int num2 = currentSelectChar3.OrderChangePosReq(sTARTPOS_INDEX, (short)iNDEX);
                                    if (num2 < 0)
                                    {
                                        if (num2 < -1)
                                        {
                                            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("176"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
                                        }
                                        else
                                        {
                                            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("404"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
                                        }
                                    }
                                }
                                this.m_Battle.CastedTarget.REQUEST_ORDER = eBATTLE_ORDER.eBATTLE_ORDER_NONE;
                            }
                            else if (charByBUID != null)
                            {
                                if (charByBUID.GetTurnState() == eBATTLE_TURN_STATE.eBATTLE_TURN_STATE_ENABLE)
                                {
                                    this.m_Battle.CastedTarget.SelectCharacter(bUID);
                                }
                                this.m_Battle.CastedTarget.REQUEST_ORDER = eBATTLE_ORDER.eBATTLE_ORDER_NONE;
                            }
                            else
                            {
                                this.m_Battle.CastedTarget.REQUEST_ORDER = eBATTLE_ORDER.eBATTLE_ORDER_NONE;
                            }
                        }
                        else if (this.m_Battle.CastedTarget.REQUEST_ORDER == eBATTLE_ORDER.eBATTLE_ORDER_CHANGEPOS)
                        {
                            NkBattleChar currentSelectChar4 = this.m_Battle.CastedTarget.GetCurrentSelectChar();
                            if (currentSelectChar4 != null)
                            {
                                this.m_Battle.CastedTarget.GRID_MANAGER.ActiveChangePos(nmBattleGrid.ALLY, nmBattleGrid.STARTPOS_INDEX, currentSelectChar4.GetBUID(), (short)iNDEX);
                            }
                        }
                        else
                        {
                            this.m_Battle.CastedTarget.GRID_MANAGER.SetOver(nmBattleGrid);
                        }
                    }
                }
            }
        }
        if (mouseButtonUp2)
        {
            if (this.m_Battle.CastedTarget.REQUEST_ORDER == eBATTLE_ORDER.eBATTLE_ORDER_CHANGEPOS)
            {
                this.m_Battle.CastedTarget.REQUEST_ORDER = eBATTLE_ORDER.eBATTLE_ORDER_NONE;
                Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("402"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            }
            else if (this.m_Battle.CastedTarget.REQUEST_ORDER == eBATTLE_ORDER.eBATTLE_ORDER_SKILL)
            {
                this.m_Battle.CastedTarget.REQUEST_ORDER = eBATTLE_ORDER.eBATTLE_ORDER_NONE;
                this.m_Battle.CastedTarget.Init_BattleSkill_Input(true);
            }
        }
        if (null == nmBattleGrid)
        {
            this.m_Battle.CastedTarget.GRID_MANAGER.SetOver(null);
            if (this.m_Battle.CastedTarget.m_iBattleSkillIndex < 0 && this.m_Battle.CastedTarget.REQUEST_ORDER != eBATTLE_ORDER.eBATTLE_ORDER_SKILL && this.m_Battle.CastedTarget.GetCurrentSelectChar() == null)
            {
                this.m_Battle.CastedTarget.GRID_MANAGER.InitAll();
            }
        }
    }
    public void SetMagic(NkBattleChar pkTarget, int BattleSkillUnique, bool bRival)
    {
        if (pkTarget == null)
        {
            return;
        }
        if (this.m_TargetChar != null && this.m_TargetChar.CastedTarget.GetBUID() == pkTarget.GetBUID())
        {
            return;
        }
        BATTLESKILL_BASE battleSkillBase = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(BattleSkillUnique);

        if (battleSkillBase != null && Battle.BATTLE.SkillDirecting != null)
        {
            this.m_bRival = false;
            if (this.m_goSkillDirecting != null)
            {
                UnityEngine.Object.Destroy(this.m_goSkillDirecting);
                this.m_goSkillDirecting = null;
            }
            if (bRival && Battle.BATTLE.SkillRivalDirecting != null)
            {
                this.m_goSkillDirecting = (GameObject)UnityEngine.Object.Instantiate(Battle.BATTLE.SkillRivalDirecting, Vector3.zero, Quaternion.identity);
                this.m_bRival           = true;
            }
            else
            {
                this.m_goSkillDirecting = (GameObject)UnityEngine.Object.Instantiate(Battle.BATTLE.SkillDirecting, Vector3.zero, Quaternion.identity);
            }
            NkUtil.SetAllChildLayer(this.m_goSkillDirecting, GUICamera.UILayer);
            Vector2 screenPos   = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2));
            Vector3 effectUIPos = base.GetEffectUIPos(screenPos);
            this.m_goSkillDirecting.transform.position = effectUIPos;
            string costumePortraitPath = this.GetCostumePortraitPath(pkTarget.GetSoldierInfo());
            if (UIDataManager.IsUse256Texture())
            {
                this.faceImageKey = pkTarget.GetCharKindInfo().GetPortraitFile1((int)pkTarget.GetSoldierInfo().GetGrade(), costumePortraitPath) + "_256";
            }
            else
            {
                this.faceImageKey = pkTarget.GetCharKindInfo().GetPortraitFile1((int)pkTarget.GetSoldierInfo().GetGrade(), costumePortraitPath) + "_512";
            }
            if (null == NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.faceImageKey))
            {
                NrTSingleton <UIImageBundleManager> .Instance.RequestCharImage(this.faceImageKey, eCharImageType.LARGE, new PostProcPerItem(this.SetBundleImage));
            }
            this.m_bSetFace = false;
            Animation componentInChildren = this.m_goSkillDirecting.GetComponentInChildren <Animation>();
            if (componentInChildren != null)
            {
                this.m_fEndTime = Time.time + 10f;
            }
            else
            {
                this.m_fEndTime = Time.time + 10f;
            }
            if (TsPlatform.IsMobile && TsPlatform.IsEditor)
            {
                NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.m_goSkillDirecting);
            }
            this.m_goSkillDirecting.SetActive(false);
        }
    }