public static AbstractQuestObjective FromRecord(QuestObjectiveDAO record)
 {
     switch ((QuestObjectiveType)record.Type)
     {
         case QuestObjectiveType.GENERIC: return new GenericObjective(record);
         case QuestObjectiveType.FIND_NPC: return new FindNpcObjective(record);
         case QuestObjectiveType.KILL_MONSTER: return new KillMonsterObjective(record);
     }
     throw new Exception("AbstractQuestObjective::FromType unknow typeId=" + record.Type);
 }
 public FindNpcObjective(QuestObjectiveDAO record) : base(record)
 {
     try
     {
         NpcTemplateId = int.Parse(record.Parameters);
     }
     catch(Exception e)
     {
         Logger.Warn("Quest::FindNpcObjective wrong parameter type, param=" + record.Parameters);
     }
 }
Example #3
0
 public FindNpcObjective(QuestObjectiveDAO record) : base(record)
 {
     try
     {
         NpcTemplateId = int.Parse(record.Parameters);
     }
     catch (Exception e)
     {
         Logger.Warn("Quest::FindNpcObjective wrong parameter type, param=" + record.Parameters);
     }
 }
Example #4
0
 public KillMonsterObjective(QuestObjectiveDAO record) : base(record)
 {
     try
     {
         MonsterTemplateId = int.Parse(record.Parameters.Split(',')[0]);
         Count             = int.Parse(record.Parameters.Split(',')[1]);
     }
     catch (Exception e)
     {
         Logger.Warn("Quest::KillMonsterObjective wrong parameter type, param=" + record.Parameters);
     }
 }
Example #5
0
        public static AbstractQuestObjective FromRecord(QuestObjectiveDAO record)
        {
            switch ((QuestObjectiveType)record.Type)
            {
            case QuestObjectiveType.GENERIC: return(new GenericObjective(record));

            case QuestObjectiveType.FIND_NPC: return(new FindNpcObjective(record));

            case QuestObjectiveType.KILL_MONSTER: return(new KillMonsterObjective(record));
            }
            throw new Exception("AbstractQuestObjective::FromType unknow typeId=" + record.Type);
        }
 public KillMonsterObjective(QuestObjectiveDAO record) : base(record)
 {
     try
     {
         MonsterTemplateId = int.Parse(record.Parameters.Split(',')[0]);
         Count = int.Parse(record.Parameters.Split(',')[1]);
     }
     catch (Exception e)
     {
         Logger.Warn("Quest::KillMonsterObjective wrong parameter type, param=" + record.Parameters);
     }
 }
Example #7
0
 public GenericObjective(QuestObjectiveDAO record) : base(record)
 {
 }
Example #8
0
 protected AbstractQuestObjective(QuestObjectiveDAO record)
 {
     m_record = record;
 }
 public GenericObjective(QuestObjectiveDAO record)
     : base(record)
 {
 }
 protected AbstractQuestObjective(QuestObjectiveDAO record)
 {
     m_record = record;
 }