Exemplo n.º 1
0
    public void AddNpcPos(ECO kEco)
    {
        if (0f < kEco.kMovePos[0].x || 0f < kEco.kMovePos[0].z)
        {
            return;
        }
        if (0f < kEco.kRanPos.x || 0f < kEco.kRanPos.z)
        {
            return;
        }
        NrCharKindInfo charKindInfoFromCode = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfoFromCode(kEco.szCharCode[0]);

        if (charKindInfoFromCode == null)
        {
            return;
        }
        if (charKindInfoFromCode.IsATB(8L))
        {
            NrNpcPos nrNpcPos = new NrNpcPos();
            nrNpcPos.strKey = NrTSingleton <UIDataManager> .Instance.GetString(kEco.szCharCode[0], ((int)kEco.kFixPos.x).ToString(), ((int)kEco.kFixPos.z).ToString());

            charKindInfoFromCode.SetPosKey(nrNpcPos.strKey);
            nrNpcPos.strName   = charKindInfoFromCode.GetName();
            nrNpcPos.nCharKind = charKindInfoFromCode.GetCharKind();
            nrNpcPos.nMapIndex = kEco.MapIndex;
            nrNpcPos.kPos.x    = kEco.kFixPos.x;
            nrNpcPos.kPos.y    = kEco.kFixPos.y;
            nrNpcPos.kPos.z    = kEco.kFixPos.z;
            this.AddNpcPos(nrNpcPos);
        }
    }