private void ImportData_EAM()
        {
            var infos = _eamMatchInfos;

            var eqpArranges = _modelContext.EqpArrange;

            foreach (var it in eqpArranges)
            {
                if (CommonHelper.Equals(it.LIMIT_TYPE, "M") == false)
                {
                    continue;
                }

                string maskID = it.MASK_ID;
                if (string.IsNullOrEmpty(maskID))
                {
                    continue;
                }

                List <EAItem> list;
                if (infos.TryGetValue(maskID, out list) == false)
                {
                    infos.Add(maskID, list = new List <EAItem>());
                }

                EAItem item = new EAItem(it);
                list.Add(item);
            }
        }
Exemple #2
0
        private void ImportData_EA()
        {
            var infos = _eaInfos;
            var table = _modelContext.EqpArrange;

            if (table == null)
            {
                return;
            }

            foreach (var it in table)
            {
                string eqpID = it.EQP_ID;
                if (string.IsNullOrEmpty(eqpID))
                {
                    continue;
                }

                List <EAItem> list;
                if (infos.TryGetValue(eqpID, out list) == false)
                {
                    infos.Add(eqpID, list = new List <EAItem>());
                }

                EAItem item = new EAItem(it);
                list.Add(item);
            }
        }
Exemple #3
0
 public void SetLinkItem(EAItem pItem)
 {
     if (m_pLinkItem != pItem && pItem != null)
     {
         m_pLinkItem = pItem;
         m_pLinkItem.SetItemBase(this);
     }
 }
Exemple #4
0
    public override bool SetObjInfo(ObjectInfo ObjInfo)
    {
        m_ObjInfo.Copy(ObjInfo);

        switch (m_ObjInfo.m_eObjState)
        {
        case eObjectState.CS_DEAD:
        {
            if (m_pLinkItem != null)
            {
                m_pLinkItem.DeSpawnAction();
                m_pLinkItem.SetItemBase(null);
            }

            m_pLinkItem = null;
        }
        break;
        }

        base.SetObjInfo(ObjInfo);

        switch (m_ObjInfo.m_eObjState)
        {
        case eObjectState.CS_SETENTITY:
        {
            if (m_pLinkItem != null)
            {
                m_pLinkItem.SpawnAction();
            }
        }
        break;
        }


        return(true);
    }
Exemple #5
0
    public static bool EntitySetting(EA_CObjectBase pSetObject, ObjectInfo SetObjinfo)
    {
        if (null == pSetObject)
        {
            Debug.Log("EntitySetting pSetObject is null :" + SetObjinfo.m_strGameName);
            return(false);
        }

        if (eObjectState.CS_SETENTITY != SetObjinfo.m_eObjState)
        {
            return(false);
        }

        string poolType = SetObjinfo.m_ModelTypeIndex;

        GameObject pGameObject = CObjResourcePoolingManager.instance.Spwan(poolType);

        pSetObject.SetLinkEntity(pGameObject);

        if (pGameObject == null)
        {
            Debug.LogError("EntitySetting Game object is invalid. type : " + poolType + ", name : " + pSetObject.GetObjInfo().m_strGameName);
            return(false);
        }

        // Modify class creation logic [3/30/2018 puos]
        if (SetObjinfo.m_objClassType != default(Type))
        {
            if (pGameObject.GetComponent(SetObjinfo.m_objClassType) == null)
            {
                pGameObject.AddComponent(SetObjinfo.m_objClassType);
            }
        }

        //	Create around object table
        switch (SetObjinfo.m_eObjType)
        {
        case eObjectType.CT_NPC:
        case eObjectType.CT_MONSTER:
        case eObjectType.CT_PLAYER:
        case eObjectType.CT_MYPLAYER:
        {
            EAActor actor = pGameObject.GetComponent <EAActor>();

            if (actor == null)
            {
                actor = pGameObject.AddComponent <EAActor>();
                SetObjinfo.m_objClassType = typeof(EAActor);
            }

            ((EA_CCharBPlayer)pSetObject).SetLinkActor(actor);
        }
        break;

        case eObjectType.CT_MAPOBJECT:
        {
            EAMapObject mapObject = pGameObject.GetComponent <EAMapObject>();

            if (mapObject == null)
            {
                mapObject = pGameObject.AddComponent <EAMapObject>();
                SetObjinfo.m_objClassType = typeof(EAMapObject);
            }

            ((EA_CMapObject)pSetObject).SetLinkMapObject(mapObject);
        }
        break;

        case eObjectType.CT_ITEMOBJECT:
        {
            EAItem itemObject = pGameObject.GetComponent <EAItem>();

            if (itemObject == null)
            {
                itemObject = pGameObject.AddComponent <EAItem>();
                SetObjinfo.m_objClassType = typeof(EAItem);
            }

            ((EA_CItem)pSetObject).SetLinkItem(itemObject);
        }
        break;
        }

        //Debug.Log("EntitySetting pSetObject :" + SetObjinfo.m_ModelTypeIndex);

        return(true);
    }