Exemple #1
0
    private void ProcessCharPartInfo(NrCharPartInfo pkCustomPartInfo, bool bChangeBase, bool bChangeEquip)
    {
        NrPersonInfoUser nrPersonInfoUser = base.GetPersonInfo() as NrPersonInfoUser;

        if (bChangeBase)
        {
            nrPersonInfoUser.SetBasePart(pkCustomPartInfo.m_kBasePart);
            this.ChangeBasePart();
        }
        if (bChangeEquip)
        {
            NkSoldierInfo soldierInfo = nrPersonInfoUser.GetSoldierInfo(0);
            if (soldierInfo != null)
            {
                soldierInfo.SetEquipItemInfo(pkCustomPartInfo.m_kEquipPart);
            }
            if (this.m_k3DChar != null)
            {
                this.ChangeEquipItem();
            }
            else
            {
                base.SetChangedItem(true);
            }
        }
    }
Exemple #2
0
 public void SetCharPartInfo(NrCharPartInfo pkPartInfo)
 {
     if (pkPartInfo != null)
     {
         this.SetBasePart(pkPartInfo.m_kBasePart);
         NkSoldierInfo soldierInfo = base.GetSoldierInfo(0);
         if (soldierInfo != null)
         {
             soldierInfo.SetEquipItemInfo(pkPartInfo.m_kEquipPart);
         }
     }
 }
Exemple #3
0
    public int SetChar(short charunique, short buid, int charkind, eCharKindType kindtype, NrPersonInfoBase kPersonInfo, float speed, ref NrCharPartInfo pkPartInfo, byte nsolidx)
    {
        int          num   = this.AddNewChar(charunique, buid);
        NkBattleChar @char = this.GetChar(num);

        if (@char != null)
        {
            @char.SetKindType(kindtype);
            @char.SetPersonInfo(kPersonInfo);
            NrCharBase char2 = NrTSingleton <NkCharManager> .Instance.GetChar(1);

            if (charunique == char2.GetCharUnique() && !NrTSingleton <NkBattleReplayManager> .Instance.IsReplay)
            {
                @char.MyChar = true;
                @char.SetSolIdx((short)nsolidx);
            }
            if (kindtype == eCharKindType.CKT_USER && charunique != char2.GetCharUnique())
            {
                @char.ChangeCharPartInfo(pkPartInfo, true, true);
                @char.SetReadyPartInfo();
            }
            if (speed > 0f)
            {
                NrPersonInfoBase personInfo = @char.GetPersonInfo();
                if (personInfo != null)
                {
                    personInfo.SetMoveSpeed(speed);
                }
            }
            if (kindtype == eCharKindType.CKT_NPC && @char.GetCurrentOrder() == eBATTLE_ORDER.eBATTLE_ORDER_MOVE)
            {
                @char.MoveTo(kPersonInfo.GetDirection().x, kPersonInfo.GetDirection().y, kPersonInfo.GetDirection().z, false);
            }
        }
        return(num);
    }
 public void SetPartInfo(NrCharPartInfo pkPartInfo)
 {
     this.m_kCharPartInfo.Set(pkPartInfo);
     this.m_bReadyPartInfo = true;
 }
 public NkCharPartControl()
 {
     this.m_kCharPartInfo = new NrCharPartInfo();
     this.Init();
 }
Exemple #6
0
 public void ChangeCharPartInfo(NrCharPartInfo pkCustomPartInfo, bool bChangeBase, bool bChangeEquip)
 {
     this.m_kPartControl.SetPartInfo(pkCustomPartInfo);
     this.ProcessCharPartInfo(pkCustomPartInfo, bChangeBase, bChangeEquip);
     this.SetSolEquipItemFromPartInfo(pkCustomPartInfo.m_kEquipPart);
 }