Ejemplo n.º 1
0
    /// <summary>
    /// 买树处理返回的消息
    /// </summary>
    public void OnBuyTree(stBuyTreeHomeUserCmd_CS cmd)
    {
        uint   treeid = (uint)cmd.tree;
        string msg    = "";

        if (treeUI != null)
        {
            if (treeid < MaxTreeID)
            {
                TreeIDs.Add(treeid);
            }
            else
            {
                MaxTreeID = treeid;
                TreeIDs.Add(treeid);
            }
        }
        //TipsManager.Instance.ShowTips("成功购买许愿树");
        if (treeid == 502)
        {
            msg = "铜·许愿树";
        }
        if (treeid == 503)
        {
            msg = "银·许愿树";
        }
        if (treeid == 504)
        {
            msg = "金·许愿树";
        }
        TipsManager.Instance.ShowTipsById(114527, msg);
        treeUI.RefreshTreeState();
        Engine.Utility.EventEngine.Instance().DispatchEvent((int)Client.GameEventID.HOME_BUYTREE, null);
    }
Ejemplo n.º 2
0
 public void BuyTree(int treeId)
 {
     if (treeId != null)
     {
         stBuyTreeHomeUserCmd_CS cmd = new stBuyTreeHomeUserCmd_CS()
         {
             tree = treeId
         };
         NetService.Instance.Send(cmd);
     }
 }
Ejemplo n.º 3
0
 public void OnBuyTree(stBuyTreeHomeUserCmd_CS cmd)
 {
     DataManager.Manager <HomeDataManager>().OnBuyTree(cmd);
 }