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); } }
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); } }
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); } }
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 GenericObjective(QuestObjectiveDAO record) : base(record) { }
protected AbstractQuestObjective(QuestObjectiveDAO record) { m_record = record; }