コード例 #1
0
 public override void BuildPacket()
 {
     PushIntoStack(trumpInfoArray.Length);
     foreach (var trumpInfo in trumpInfoArray)
     {
         isOpen = trumpLv >= trumpInfo.TrumpLv ? 1 : 0;
         SkillInfo skillInfo = TrumpHelper.GetSkillInfo(ContextUser.UserID, skillcount);
         if (skillInfo != null && skillInfo.AbilityLv >= GameConfigSet.MaxSkillLv)
         {
             isFull = 1;
         }
         else
         {
             isFull = 0;
         }
         AbilityInfo abilityInfo = TrumpHelper.GetAbilityInfo(ContextUser.UserID, skillcount);
         DataStruct  dsItem      = new DataStruct();
         dsItem.PushIntoStack(abilityInfo == null ? (short)0 : (short)abilityInfo.AbilityID);
         dsItem.PushIntoStack(abilityInfo == null ? string.Empty : abilityInfo.AbilityName.ToNotNullString());
         dsItem.PushIntoStack(abilityInfo == null ? string.Empty : abilityInfo.HeadID.ToNotNullString());
         dsItem.PushIntoStack(skillInfo == null ? (short)0 : skillInfo.AbilityLv);
         dsItem.PushIntoStack(abilityInfo == null ? string.Empty : abilityInfo.AbilityDesc.ToNotNullString());
         dsItem.PushIntoStack((short)isOpen);
         dsItem.PushIntoStack(trumpInfo.TrumpLv);
         dsItem.PushIntoStack(isFull);
         PushIntoStack(dsItem);
         skillcount++;
     }
 }