Exemplo n.º 1
0
 void AddNewRide(GameCmd.RideData data)
 {
     table.RideDataBase tabledata = GameTableManager.Instance.GetTableItem <table.RideDataBase>(data.base_id);
     if (tabledata != null)
     {
         m_lstRides.Add(new RideData()
         {
             id = data.id,
             // level = data.level,
             //life = data.life,
             // exp = data.exp,
             // fight_power = data.fight_power,
             // repletion = data.repletion,
             // skill_ids = data.skill_list,
             baseid       = data.base_id,
             name         = tabledata.name,
             icon         = tabledata.icon.ToString(),
             modelid      = tabledata.viewresid, // 使用观察ID
             spellTime    = tabledata.spellTime,
             quality      = tabledata.quality,
             maxRepletion = tabledata.maxRepletion,
             subLife      = tabledata.subLife,
             modelScale   = tabledata.modelScale * 0.01f,
         });
     }
     else
     {
         Engine.Utility.Log.Error("Not Found ride data id:{0}", data.id);
     }
 }
Exemplo n.º 2
0
    public void AddRide(GameCmd.RideData data, GameCmd.AddRideAction action)
    {
        if (!m_lstOwnRide.Contains(data.base_id))
        {
            m_lstOwnRide.Add(data.base_id);
        }

        AddNewRide(data);
        UpdateRideList();
    }
Exemplo n.º 3
0
    public void RefreshRideAttr(GameCmd.RideData data)
    {
        RideData rdata = m_lstRides.Find(C => C.id == data.id);

        if (rdata == null)
        {
            Engine.Utility.Log.Error("Can Not Found ride id:{0}", data.id);
            return;
        }
        // rdata.level = data.level;
        // rdata.life = data.life;
        //rdata.repletion = data.repletion;
        //rdata.exp = data.exp;
        // rdata.fight_power = data.fight_power;
        //rdata.skill_ids = data.skill_list;

        if (RidePropUpdateCallback != null)
        {
            RidePropUpdateCallback(rdata);
        }
    }