Пример #1
0
        public static QuestRequirement LoadFromDB(object[] row)
        {
            // 0: quest_id    int(10) unsigned
            // 1: type        tinyint(3) unsigned
            // 2: param   int(10) unsigned

            QuestRequirement qr = new QuestRequirement();
            qr._type = (Type)((byte)row[1]);
            qr._param = (uint)row[2];
            return qr;
        }
Пример #2
0
 public void AddRequirement(QuestRequirement qr)
 {
     if (_requirements != null)
     {
         List<QuestRequirement> nqr = new List<QuestRequirement>(_requirements);
         nqr.Add(qr);
         _requirements = nqr.ToArray();
     }
     else
     {
         _requirements = new QuestRequirement[1];
         _requirements[0] = qr;
     }
 }
Пример #3
0
 public void AddQuestRequirement(uint questID, QuestRequirement qr)
 {
     _quests[questID].AddRequirement(qr);
 }