static int UpdateCharacterBaseInfo(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 2 && TypeChecker.CheckTypes(L, typeof(Logic.Character.Model.CharacterBaseInfo), typeof(Logic.Hero.Model.HeroData))) { Logic.Character.Model.CharacterBaseInfo obj = (Logic.Character.Model.CharacterBaseInfo)ToLua.ToObject(L, 1); Logic.Hero.Model.HeroData arg0 = (Logic.Hero.Model.HeroData)ToLua.ToObject(L, 2); Logic.Character.Model.CharacterBaseInfo o = obj.UpdateCharacterBaseInfo(arg0); ToLua.PushObject(L, o); return(1); } else if (count == 3 && TypeChecker.CheckTypes(L, typeof(Logic.Character.Model.CharacterBaseInfo), typeof(uint), typeof(uint))) { Logic.Character.Model.CharacterBaseInfo obj = (Logic.Character.Model.CharacterBaseInfo)ToLua.ToObject(L, 1); uint arg0 = (uint)LuaDLL.lua_tonumber(L, 2); uint arg1 = (uint)LuaDLL.lua_tonumber(L, 3); Logic.Character.Model.CharacterBaseInfo o = obj.UpdateCharacterBaseInfo(arg0, arg1); ToLua.PushObject(L, o); return(1); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: Logic.Character.Model.CharacterBaseInfo.UpdateCharacterBaseInfo")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
public HeroInfo(DrawCardDropProto drawDropCardProto) { this.instanceID = 0; this.heroData = HeroData.GetHeroDataByID(drawDropCardProto.no); this.breakthroughLevel = 0; this.strengthenLevel = 0; this.advanceLevel = drawDropCardProto.star; this.level = 1; }
public static HeroData GetHeroDataByID(int heroID) { HeroData heroData = null; if (HeroDataDictionary.ContainsKey(heroID) && HeroDataDictionary[heroID] != null) { heroData = HeroDataDictionary[heroID]; } return(heroData); }
//public int breakthroughLevel = 0; //public int strengthenLevel = 0; //public int advanceLevel = 0; //public int level = 1; //public int exp = 0; //public int strengthenExp = 0; //public int weaponID = 0; //public int armorID = 0; //public int accessoryID = 0; public HeroInfo(uint instanceID, int heroDataID, int breakthroughLevel, int strengthenLevel, int advanceLevel, int level = 1) { this.instanceID = instanceID; this.heroData = HeroData.GetHeroDataByID(heroDataID); if (this.heroData == null) { Debugger.LogError("heroData is null,can't find id :" + heroDataID); } this.breakthroughLevel = breakthroughLevel; this.strengthenLevel = strengthenLevel; this.advanceLevel = advanceLevel; this.level = level; UpdateHeroAttribute(); }
public HeroInfo(TeamHeroProtoData data) { this.instanceID = (uint)data.id; heroData = HeroData.GetHeroDataByID(data.heroNo); if (data.lv != 1) { level = data.lv; } if (data.star != 0) { advanceLevel = data.star; } if (data.aggrLv != -1) { strengthenLevel = data.aggrLv; } if (data.breakLayer != 0) { breakthroughLevel = data.breakLayer; } }
public HeroInfo(LuaTable heroInfoLuaTable) { this.instanceID = heroInfoLuaTable["instanceID"].ToString().ToUInt32(); LuaTable heroDataLuaTable = (LuaTable)heroInfoLuaTable["heroData"]; if (heroDataLuaTable == null) { Debugger.LogError("heroData is null,can't find "); } this.heroData = HeroData.GetHeroDataByID(heroDataLuaTable["id"].ToString().ToInt32()); this.breakthroughLevel = heroInfoLuaTable["breakthroughLevel"].ToString().ToInt32(); this.strengthenLevel = heroInfoLuaTable["strengthenLevel"].ToString().ToInt32(); this.advanceLevel = heroInfoLuaTable["advanceLevel"].ToString().ToInt32(); this.level = heroInfoLuaTable["level"].ToString().ToInt32(); this.exp = heroInfoLuaTable["exp"].ToString().ToInt32(); this.strengthenExp = heroInfoLuaTable["strengthenExp"].ToString().ToInt32(); this.weaponID = heroInfoLuaTable["weaponID"].ToString().ToInt32(); this.armorID = heroInfoLuaTable["armorID"].ToString().ToInt32(); this.accessoryID = heroInfoLuaTable["accessoryID"].ToString().ToInt32(); }
public HeroInfo(GameResData gameResData) { this.heroData = HeroData.GetHeroDataByID(gameResData.id); this.advanceLevel = gameResData.star; UpdateHeroAttribute(); }
public HeroInfo(HeroData heroData) { this.heroData = heroData; this.advanceLevel = 1;//召唤兽默认用1阶模型 UpdateHeroAttribute(); }