Example #1
0
        private void BuyGoods(int nGoodsID)
        {
            if (m_responseData == null)
            {
                return;
            }

            foreach (var item in m_responseData.npcResp.NPCTopicList)
            {
                int goodsID;
                if (!Int32.TryParse(item.ParamList[4], out goodsID))
                {
                    return;
                }

                if (goodsID == nGoodsID)
                {
                    m_masterView.ParseURL(item.Link);
                }
            }

            //cmd_war_personbuygoods buyGoods = new cmd_war_personbuygoods();
            //buyGoods.nGoodID = nGoodsID;

            //IntPtrHelper helper = new IntPtrHelper();
            //IntPtr ptr = helper.toPtr<cmd_war_personbuygoods>(ref buyGoods);
            //int len = Marshal.SizeOf(buyGoods);
            //GameLogicAPI.onEntityEvent(EntityFactory.MainHeroID, (int)EntityLogicDef.ENTITY_CMD_WAR_BUY_GOOD, len, "", ptr, len);
        }
Example #2
0
 public void onClickNPCFunc(string url)
 {
     this.gameObject.SetActive(false);
     m_masterView.ParseURL(url);
 }