예제 #1
0
        public bool AddJob(WonderMails.WonderMailJob job)
        {
            //if (HasJob(job) == false) {
            if (jobList.Count < Constants.MAX_JOB_LIST) {

                if (owner.Client.Player.GetDungeonCompletionCount(job.Mission.DungeonIndex) > 0) {
                    job.SendsRemaining = Constants.MAX_JOB_SENDS;
                    AddJobSimple(job);
                    Messenger.PlayerMsg(owner.Client, "You have accepted this job!", Text.BrightGreen);
                    return true;
                } else {
                    Messenger.PlayerMsg(owner.Client, "You haven't completed this dungeon yet.", Text.BrightRed);
                }
            } else {
                Messenger.PlayerMsg(owner.Client, "Your job list is full!", Text.BrightRed);
            }
            //} else {
            //    Messenger.PlayerMsg(owner.Client, "You already have accepted this job!", Text.BrightRed);
            //}
            return false;
        }
예제 #2
0
 public bool HasJob(WonderMails.WonderMailJob job)
 {
     if (job != null) {
         for (int i = 0; i < JobList.Count; i++) {
             if (JobList[i].Mission.MissionClientIndex == job.Mission.MissionClientIndex &&
                 JobList[i].Mission.TargetIndex == job.Mission.TargetIndex &&
                 JobList[i].Mission.RewardIndex == job.Mission.RewardIndex &&
                 JobList[i].Mission.MissionType == job.Mission.MissionType &&
                 JobList[i].Mission.Data1 == job.Mission.Data1 &&
                 JobList[i].Mission.Data2 == job.Mission.Data2 &&
                 JobList[i].Mission.DungeonIndex == job.Mission.DungeonIndex &&
                 JobList[i].Mission.GoalMapIndex == job.Mission.GoalMapIndex &&
                 JobList[i].Mission.RDungeon == job.Mission.RDungeon &&
                 JobList[i].Mission.StartStoryScript == job.Mission.StartStoryScript &&
                 JobList[i].Mission.WinStoryScript == job.Mission.WinStoryScript &&
                 JobList[i].Mission.LoseStoryScript == job.Mission.LoseStoryScript) {
                 return true;
             }
         }
     }
     return false;
 }
예제 #3
0
 public void AddJobSimple(WonderMails.WonderMailJob job)
 {
     job.Accepted = Enums.JobStatus.Obtained;
     JobList.Add(job);
 }