Beispiel #1
0
 public void Load_HeroSelect_ChatTemplate()
 {
     if (this.selectHeroTemplateList.get_Count() == 0)
     {
         DatabinTable <ResHeroSelectTextData, uint> selectHeroChatDatabin = GameDataMgr.m_selectHeroChatDatabin;
         if (selectHeroChatDatabin == null)
         {
             return;
         }
         Dictionary <long, object> .Enumerator enumerator = selectHeroChatDatabin.GetEnumerator();
         while (enumerator.MoveNext())
         {
             KeyValuePair <long, object>     current = enumerator.get_Current();
             ResHeroSelectTextData           resHeroSelectTextData = (ResHeroSelectTextData)current.get_Value();
             CChatModel.HeroChatTemplateInfo heroChatTemplateInfo  = new CChatModel.HeroChatTemplateInfo(0);
             heroChatTemplateInfo.dwID           = (int)resHeroSelectTextData.dwID;
             heroChatTemplateInfo.dwGroupID      = (int)resHeroSelectTextData.dwGroupID;
             heroChatTemplateInfo.dwTag          = (int)resHeroSelectTextData.dwTag;
             heroChatTemplateInfo.templateString = StringHelper.UTF8BytesToString(ref resHeroSelectTextData.szContent);
             this.selectHeroTemplateList.Add(heroChatTemplateInfo);
         }
     }
 }
Beispiel #2
0
 public void Load_HeroSelect_ChatTemplate()
 {
     if (this.selectHeroTemplateList.Count == 0)
     {
         DatabinTable <ResHeroSelectTextData, uint> selectHeroChatDatabin = GameDataMgr.m_selectHeroChatDatabin;
         if (selectHeroChatDatabin != null)
         {
             Dictionary <long, object> .Enumerator enumerator = selectHeroChatDatabin.GetEnumerator();
             while (enumerator.MoveNext())
             {
                 KeyValuePair <long, object> current = enumerator.Current;
                 ResHeroSelectTextData       data    = (ResHeroSelectTextData)current.Value;
                 HeroChatTemplateInfo        item    = new HeroChatTemplateInfo(0)
                 {
                     dwID           = (int)data.dwID,
                     dwGroupID      = (int)data.dwGroupID,
                     dwTag          = (int)data.dwTag,
                     templateString = StringHelper.UTF8BytesToString(ref data.szContent)
                 };
                 this.selectHeroTemplateList.Add(item);
             }
         }
     }
 }