Exemplo n.º 1
0
 static int SetHeroInfo(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         HeroItem obj  = (HeroItem)ToLua.CheckObject(L, 1, typeof(HeroItem));
         HeroInfo arg0 = (HeroInfo)ToLua.CheckObject(L, 2, typeof(HeroInfo));
         obj.SetHeroInfo(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemplo n.º 2
0
    public override void Refresh()
    {
        base.Refresh();
        foreach (HeroInfo hero in Gamedata.me.userinfo.HeroList)
        {
            HeroItem heroItem = AddHero(ref OwnedHeros, ref ownedHeroCount);
            heroItem.SetHeroInfo(hero);
        }

        HeroTableData[] heros = Database.me.GetAll <HeroTableData>();
        foreach (HeroTableData hero in heros)
        {
            HeroItem heroItem = AddHero(ref NotOwnedHeros, ref notOwnedHeroCount);
            heroItem.SetHeroData(hero);
        }
    }