示例#1
0
 /// <summary>
 /// 任务完成条件
 /// </summary>
 /// <param name="info"></param>
 /// <returns></returns>
 public static XElement CreateQuestCondiction(QuestConditionInfo info)
 {
     return(new XElement("Item_Condiction", new XAttribute("QuestID", info.QuestID),
                         new XAttribute("CondictionID", info.CondictionID),
                         new XAttribute("CondictionTitle", info.CondictionTitle),
                         new XAttribute("CondictionType", info.CondictionType),
                         new XAttribute("Para1", info.Para1),
                         new XAttribute("Para2", info.Para2)));
 }
示例#2
0
        /// <summary>
        /// 从任务条件表中读取数据
        /// </summary>
        /// <param name="reader">传入QuestGoods</param>
        /// <returns>任务条件表</returns>
        public QuestConditionInfo InitQuestCondiction(SqlDataReader reader)
        {
            QuestConditionInfo info = new QuestConditionInfo();

            info.QuestID         = (int)reader["QuestID"];
            info.CondictionID    = (int)reader["CondictionID"];
            info.CondictionTitle = reader["CondictionTitle"] == null ? "" : reader["CondictionTitle"].ToString();
            info.CondictionType  = (int)reader["CondictionType"];
            info.Para1           = (int)reader["Para1"];
            info.Para2           = (int)reader["Para2"];
            return(info);
        }
示例#3
0
 public ItemMountingCondition(BaseQuest quest, QuestConditionInfo info, int value) : base(quest, info, value)
 {
 }
示例#4
0
 public OwnConsortiaCondition(BaseQuest quest, QuestConditionInfo info, int value) : base(quest, info, value)
 {
 }
示例#5
0
 public ItemPropertyCondition(BaseQuest quest, QuestConditionInfo info, int value) : base(quest, info, value)
 {
 }
 public GameMonsterCondition(BaseQuest quest, QuestConditionInfo info, int value) : base(quest, info, value)
 {
 }
示例#7
0
 public FriendFarmCondition(BaseQuest quest, QuestConditionInfo info, int value) : base(quest, info, value)
 {
 }
 public ItemStrengthenCondition(BaseQuest quest, QuestConditionInfo info, int value) : base(quest, info, value)
 {
 }
示例#9
0
 public OwnGradeCondition(BaseQuest quest, QuestConditionInfo info, int value) : base(quest, info, value)
 {
 }
示例#10
0
 public ItemComposeCondition(BaseQuest quest, QuestConditionInfo info, int value) : base(quest, info, value)
 {
 }
示例#11
0
 public LoginMissionCondition(BaseQuest quest, QuestConditionInfo info, int value) : base(quest, info, value)
 {
 }
示例#12
0
 public RequestItemsCondition(QuestConditionInfo info, int value) : base(info, value)
 {
 }
 public GameFightWinByCouples(BaseQuest quest, QuestConditionInfo info, int value) : base(quest, info, value)
 {
 }
示例#14
0
 public ItemFusionCondition(BaseQuest quest, QuestConditionInfo info, int value) : base(quest, info, value)
 {
 }
示例#15
0
 public EnterSpaCondition(BaseQuest quest, QuestConditionInfo info, int value) : base(quest, info, value)
 {
 }
示例#16
0
 public FightWifeHusbandCondition(BaseQuest quest, QuestConditionInfo info, int value) : base(quest, info, value)
 {
 }
 public GameCopyPassCondition(BaseQuest quest, QuestConditionInfo info, int value) : base(quest, info, value)
 {
 }
示例#18
0
 public BaseCondition(BaseQuest quest, QuestConditionInfo info, int value)
 {
     m_quest = quest;
     m_info  = info;
     m_value = value;
 }
 public FightWithPetCondition(BaseQuest quest, QuestConditionInfo info, int value) : base(quest, info, value)
 {
 }
示例#20
0
        public static BaseCondition CreateCondition(BaseQuest quest, QuestConditionInfo info, int value)
        {
            switch (info.CondictionType)
            {
            case 1:
                return(new OwnGradeCondition(quest, info, value));           //1、升级/空/等级数

            case 2:
                return(new ItemMountingCondition(quest, info, value));       //2、使用物品

            case 3:
                return(new UsingItemCondition(quest, info, value));          //3、使用指定道具/道具ID/数量

            case 4:
                return(new GameKillByRoomCondition(quest, info, value));     //4、击杀玩家若干人次/房间模式(-1不限,0撮合,1自由,2练级,3副本)/数量

            case 5:
                return(new GameFightByRoomCondition(quest, info, value));    //5、完成战斗(无论胜败)/房间模式/数量

            case 6:
                return(new GameOverByRoomCondition(quest, info, value));     //6、战斗胜利/房间模式/数量

            case 7:
                return(new GameCopyOverCondition(quest, info, value));       //7、完成副本(无论胜败)/副本ID/次数

            case 8:
                return(new GameCopyPassCondition(quest, info, value));       //8、通关副本(要求胜利)/副本ID/次数

            case 9:
                return(new ItemStrengthenCondition(quest, info, value));     //9、强化/装备类型/强化等级

            case 10:
                return(new ShopCondition(quest, info, value));               //10、购买/货币类型/支付金额

            case 11:
                return(new ItemFusionCondition(quest, info, value));         //11、熔炼成功/熔炼类型/次数

            case 12:
                return(new ItemMeltCondition(quest, info, value));           //12、炼化/装备类型/炼化等级

            case 13:
                return(new GameMonsterCondition(quest, info, value));        //13、击杀怪物/怪物ID/数量

            case 14:
                return(new OwnPropertyCondition(quest, info, value));        //14、拥有道具(完成任务道具不消失)/道具ID/数量

            case 15:
                return(new TurnPropertyCondition(quest, info, value));       //15、上缴道具(完成任务道具消失)/道具ID/数量

            case 16:
                return(new DirectFinishCondition(quest, info, value));       //16、直接完成/空/1

            case 17:
                return(new OwnMarryCondition(quest, info, value));           //17、结婚/空/1

            case 18:
                return(new OwnConsortiaCondition(quest, info, value));       //18、公会人数/空/具体人数

            case 19:
                return(new ItemComposeCondition(quest, info, value));        //19、合成/合成类型/次数

            case 20:
                return(new ClientModifyCondition(quest, info, value));       //20、客户端请求

            case 21:
                return(new GameMissionOverCondition(quest, info, value));    //21、通关关卡/关卡ID/回合数

            case 22:
                return(new GameKillByGameCondition(quest, info, value));     //22、击杀玩家若干人次/游戏模式/数量

            case 23:
                return(new GameFightByGameCondition(quest, info, value));    //23、完成战斗(无论胜败)/游戏模式/数量

            case 24:
                return(new GameOverByGameCondition(quest, info, value));     //24、战斗胜利/游戏模式/数量

            default:
                if (log.IsErrorEnabled)
                {
                    log.Error(string.Format("Can't find quest condition : {0}", info.CondictionType));
                }
                return(null);
            }
        }
示例#21
0
 public GameFightApprenticeshipCondition(BaseQuest quest, QuestConditionInfo info, int value) : base(quest, info, value)
 {
 }
示例#22
0
 public ClientModifyCondition(BaseQuest quest, QuestConditionInfo info, int value) : base(quest, info, value)
 {
 }
 public FinishGameCondition(BaseQuest quest, QuestConditionInfo info, int value) : base(quest, info, value)
 {
 }
示例#24
0
 /// <summary>
 ///  16、直接完成/空/1
 ///  触发条件:由客户端发出该任务。
 /// </summary>
 /// <param name="info"></param>
 /// <param name="value"></param>
 public DirectFinishCondition(BaseQuest quest, QuestConditionInfo info, int value) : base(quest, info, value)
 {
 }
示例#25
0
 public AccuontInfoCondition(BaseQuest quest, QuestConditionInfo info, int value) : base(quest, info, value)
 {
 }
 public SendGiftForFriendCondition(BaseQuest quest, QuestConditionInfo info, int value) : base(quest, info, value)
 {
 }
 public GameFightByGameCondition(BaseQuest quest, QuestConditionInfo info, int value) : base(quest, info, value)
 {
 }
示例#28
0
 public GameOverByRoomCondition(BaseQuest quest, QuestConditionInfo info, int value) : base(quest, info, value)
 {
 }
示例#29
0
 public ShopCondition(BaseQuest quest, QuestConditionInfo info, int value) : base(quest, info, value)
 {
 }
示例#30
0
        public static BaseCondition CreateCondition(BaseQuest quest, QuestConditionInfo info, int value)
        {
            BaseCondition result;

            switch (info.CondictionType)
            {
            case 1:
                result = new OwnGradeCondition(quest, info, value);
                break;

            case 2:
                result = new ItemMountingCondition(quest, info, value);
                break;

            case 3:
                result = new UsingItemCondition(quest, info, value);
                break;

            case 4:
                result = new GameKillByRoomCondition(quest, info, value);
                break;

            case 5:
                result = new GameFightByRoomCondition(quest, info, value);
                break;

            case 6:
                result = new GameOverByRoomCondition(quest, info, value);
                break;

            case 7:
                result = new GameCopyOverCondition(quest, info, value);
                break;

            case 8:
                result = new GameCopyPassCondition(quest, info, value);
                break;

            case 9:
                result = new ItemStrengthenCondition(quest, info, value);
                break;

            case 10:
                result = new ShopCondition(quest, info, value);
                break;

            case 11:
                result = new ItemFusionCondition(quest, info, value);
                break;

            case 12:
                result = new ItemMeltCondition(quest, info, value);
                break;

            case 13:
                result = new GameMonsterCondition(quest, info, value);
                break;

            case 14:
                result = new OwnPropertyCondition(quest, info, value);
                break;

            case 15:
                result = new TurnPropertyCondition(quest, info, value);
                break;

            case 16:
                result = new DirectFinishCondition(quest, info, value);
                break;

            case 17:
                result = new OwnMarryCondition(quest, info, value);
                break;

            case 18:
                result = new OwnConsortiaCondition(quest, info, value);
                break;

            case 19:
                result = new ItemComposeCondition(quest, info, value);
                break;

            case 20:
                result = new ClientModifyCondition(quest, info, value);
                break;

            case 21:
                result = new GameMissionOverCondition(quest, info, value);
                break;

            case 22:
                result = new GameKillByGameCondition(quest, info, value);
                break;

            case 23:
                result = new GameFightByGameCondition(quest, info, value);
                break;

            case 24:
                result = new GameOverByGameCondition(quest, info, value);
                break;

            case 25:
                result = new ItemInsertCondition(quest, info, value);
                break;

            case 26:
                result = new GameFightByCouples(quest, info, value);
                break;

            case 27:
                result = new OwnSpaCondition(quest, info, value);
                break;

            case 28:
                result = new GameFightWinByCouples(quest, info, value);
                break;

            default:
                //if (BaseCondition.log.IsErrorEnabled)
            {
                BaseCondition.log.Error(string.Format("Can't find quest condition : {0}", info.CondictionType));
            }
                result = null;
                break;
            }
            return(result);
        }