Пример #1
0
 public void SetHeroInfo(HeroProtoData heroProtoData)
 {
     this.instanceID = (uint)heroProtoData.id;
     if (heroProtoData.modelId != 0)
     {
         this.heroData = HeroData.GetHeroDataByID(heroProtoData.modelId);
     }
     if (heroProtoData.breakLayer != 0)
     {
         this.breakthroughLevel = heroProtoData.breakLayer;
     }
     if (heroProtoData.aggrLv != -1)
     {
         this.strengthenLevel = heroProtoData.aggrLv;
     }
     if (heroProtoData.star != 0)
     {
         this.advanceLevel = heroProtoData.star;
     }
     if (heroProtoData.exp != -1)
     {
         this.exp = heroProtoData.exp;
     }
     if (heroProtoData.lv != 0)
     {
         this.level = heroProtoData.lv;
     }
     if (heroProtoData.aggrExp != -1)
     {
         this.strengthenExp = heroProtoData.aggrExp;
     }
     UpdateHeroAttribute();
 }
Пример #2
0
 public HeroInfo(HeroProtoData heroProtoData)
 {
     SetHeroInfo(heroProtoData);
 }