Exemplo n.º 1
0
 /// <summary>
 /// 任务奖励物品
 /// </summary>
 /// <param name="info"></param>
 /// <returns></returns>
 public static XElement CreateQuestGoods(QuestAwardInfo info)
 {
     return new XElement("Item_Good", new XAttribute("QuestID", info.QuestID),
         new XAttribute("RewardItemID", info.RewardItemID),
         new XAttribute("IsSelect", info.IsSelect),
         new XAttribute("RewardItemValid", info.RewardItemValid),
         new XAttribute("RewardItemCount1", info.RewardItemCount1),
         new XAttribute("RewardItemCount2", info.RewardItemCount2),
         new XAttribute("RewardItemCount3", info.RewardItemCount3),
         new XAttribute("RewardItemCount4", info.RewardItemCount4),
         new XAttribute("RewardItemCount5", info.RewardItemCount5),
         new XAttribute("StrengthenLevel", info.StrengthenLevel),
         new XAttribute("AttackCompose", info.AttackCompose),
         new XAttribute("DefendCompose", info.DefendCompose),
         new XAttribute("AgilityCompose", info.AgilityCompose),
         new XAttribute("LuckCompose", info.LuckCompose),
         new XAttribute("IsCount", info.IsCount),
         new XAttribute("IsBind", info.IsBind));
     //IsBind="true"
 }
Exemplo n.º 2
0
 /// <summary>
 /// 从任务奖励表中读取数据
 /// </summary>
 /// <param name="reader">传入QuestGoods</param>
 /// <returns>任务奖励表</returns>
 public QuestAwardInfo InitQuestGoods(SqlDataReader reader)
 {
     QuestAwardInfo info = new QuestAwardInfo();
     info.QuestID = (int)reader["QuestID"];
     info.RewardItemID = (int)reader["RewardItemID"];
     info.IsSelect = (bool)reader["IsSelect"];
     info.RewardItemValid = (int)reader["RewardItemValid"];
     info.RewardItemCount1 = (int)reader["RewardItemCount1"];
     info.RewardItemCount2 = (int)reader["RewardItemCount2"];
     info.RewardItemCount3 = (int)reader["RewardItemCount3"];
     info.RewardItemCount4 = (int)reader["RewardItemCount4"];
     info.RewardItemCount5 = (int)reader["RewardItemCount5"];
     info.StrengthenLevel = (int)reader["StrengthenLevel"];
     info.AttackCompose = (int)reader["AttackCompose"];
     info.DefendCompose = (int)reader["DefendCompose"];
     info.AgilityCompose = (int)reader["AgilityCompose"];
     info.LuckCompose = (int)reader["LuckCompose"];
     info.IsCount = (bool)reader["IsCount"];
     info.IsBind = (bool)reader["IsBind"];
     return info;
 }