Beispiel #1
0
        //just for the WMQ
        private bool OnWMQKillListener(uint monsterDynID, Map.World world)
        {
            while (true)
            {
                if (world.HasMonster(monsterDynID))
                {
                    //RAS
                }
                else
                {
                    Logger.Debug(" The wretched mother queen has been killed");

                    world.Game.Quests.NotifyQuest(87700, Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.EventReceived, -1);
                    foreach (var player in world.Players)
                    {
                        var dbQuestProgress = DBSessions.AccountSession.Get <DBProgressToon>(player.Value.Toon.PersistentID);
                        dbQuestProgress.ActiveQuest = 87700;
                        dbQuestProgress.StepOfQuest = 8;
                        DBSessions.AccountSession.SaveOrUpdate(dbQuestProgress);
                        DBSessions.AccountSession.Flush();
                    }
                    ;
                    //Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.KillMonster, 1);
                    break;
                }
            }
            return(true);
        }
Beispiel #2
0
        private bool OnKillListener(List <uint> monstersAlive, Map.World world)
        {
            Int32 monstersKilled = 0;
            var   monsterCount   = monstersAlive.Count; //Since we are removing values while iterating, this is set at the first real read of the mob counting.

            while (monstersKilled != monsterCount)
            {
                //Iterate through monstersAlive List, if found dead we start to remove em till all of em are dead and removed.
                for (int i = monstersAlive.Count - 1; i >= 0; i--)
                {
                    if (world.HasMonster(monstersAlive[i]))
                    {
                        //Alive: Nothing.
                    }
                    else
                    {
                        //If dead we remove it from the list and keep iterating.
                        Logger.Debug(monstersAlive[i] + " has been killed");
                        monstersAlive.RemoveAt(i);
                        monstersKilled++;
                    }
                }
            }
            return(true);
        }
Beispiel #3
0
        //just for the WMQ
        private bool OnWMQKillListener(uint monsterDynID, Map.World world)
        {
            while (true)
            {
                if (world.HasMonster(monsterDynID))
                {
                    //RAS
                }
                else
                {
                    Logger.Debug(" The wretched mother queen has been killed");

                    world.Game.Quests.NotifyQuest(87700, Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.EventReceived, -1);
                    //Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.KillMonster, 1);
                    break;
                }
            }
            return(true);
        }
Beispiel #4
0
        private bool OnKillListener(List <uint> monstersAlive, Map.World world)
        {
            Int32 monstersKilled = 0;
            var   monsterCount   = monstersAlive.Count; //Since we are removing values while iterating, this is set at the first real read of the mob counting.

            while (monstersKilled != monsterCount)
            {
                //Iterate through monstersAlive List, if found dead we start to remove em till all of em are dead and removed.
                for (int i = monstersAlive.Count - 1; i >= 0; i--)
                {
                    if (world.HasMonster(monstersAlive[i]))
                    {
                        //Alive: Nothing.
                    }
                    else
                    {
                        //If dead we remove it from the list and keep iterating.
                        Logger.Debug(monstersAlive[i] + " has been killed");
                        monstersAlive.RemoveAt(i);
                        monstersKilled++;
                    }
                }
            }
            // –егистраци¤ всех убийств = продвижение по квесту)
            if (monstersKilled == monsterCount)
            {
                if (killed == false)
                {
                    killed = true; world.Game.Quests.Advance(87700);
                    foreach (var player in world.Players)
                    {
                        var dbQuestProgress = DBSessions.AccountSession.Get <DBProgressToon>(player.Value.Toon.PersistentID);
                        dbQuestProgress.ActiveQuest = 87700;
                        dbQuestProgress.StepOfQuest = 4;
                        DBSessions.AccountSession.SaveOrUpdate(dbQuestProgress);
                        DBSessions.AccountSession.Flush();
                    }
                    ;
                }
            }
            return(true);
        }
Beispiel #5
0
        private bool OnKillListener(List <uint> monstersAlive, Map.World world)
        {
            Int32 monstersKilled = 0;
            var   monsterCount   = monstersAlive.Count; //Since we are removing values while iterating, this is set at the first real read of the mob counting.

            while (monstersKilled != monsterCount)
            {
                for (int i = monstersAlive.Count - 1; i >= 0; i--)
                {
                    if (world.HasMonster(monstersAlive[i]))
                    {
                    }
                    else
                    {
                        Logger.Debug(monstersAlive[i] + " has been killed");
                        monstersAlive.RemoveAt(i);
                        monstersKilled++;
                    }
                }
            }
            // –егистраци¤ всех убийств = продвижение по квесту)
            if (monstersKilled == monsterCount)
            {
                if (killed == false)
                {
                    killed = true;
                    //world.Game.Quests.Advance(87700);
                    world.Game.Quests.NotifyQuest(87700, QuestStepObjectiveType.KillGroup, -1);

                    foreach (var plr in world.Players.Values)
                    {
                        plr.Toon.ActiveQuest   = 87700;
                        plr.Toon.StepOfQuest   = 4;
                        plr.Toon.StepIDofQuest = 46;
                    }
                    ;
                }
            }
            return(true);
        }
Beispiel #6
0
        private bool OnKillListener(List <uint> monstersAlive, Map.World world)
        {
            Int32 monstersKilled = 0;
            var   monsterCount   = monstersAlive.Count;

            while (monstersKilled != monsterCount)
            {
                for (int i = monstersAlive.Count - 1; i >= 0; i--)
                {
                    if (world.HasMonster(monstersAlive[i]))
                    {
                    }
                    else
                    {
                        Logger.Debug(monstersAlive[i] + " has been killed");
                        monstersAlive.RemoveAt(i);
                        monstersKilled++;
                    }
                }
            }
            return(true);
        }
Beispiel #7
0
 private bool OnWMQKillListener(uint monsterDynID, Map.World world)
 {
     while (true)
     {
         if (world.HasMonster(monsterDynID))
         {
         }
         else
         {
             world.Game.Quests.NotifyQuest(87700, QuestStepObjectiveType.EventReceived, -1);
             foreach (var plr in world.Players.Values)
             {
                 plr.Toon.ActiveQuest    = 87700;
                 plr.Toon.StepOfQuest    = 8;
                 plr.Toon.StepIDofQuest  = 55;
                 plr.Toon.WayPointStatus = 3;
                 plr.UpdateHeroState();
             }
             ;
             break;
         }
     }
     return(true);
 }
Beispiel #8
0
        private bool OnKillListener(List <uint> monstersAlive, Map.World world)
        {
            Int32 monstersKilled = 0;
            var   monsterCount   = monstersAlive.Count;

            while (monstersKilled != monsterCount)
            {
                for (int i = monstersAlive.Count - 1; i >= 0; i--)
                {
                    if (world.HasMonster(monstersAlive[i]))
                    {
                        //Alive: Nothing.
                    }
                    else
                    {
                        //If dead we remove it from the list and keep iterating.
                        Logger.Debug(monstersAlive[i] + " has been killed");
                        monstersAlive.RemoveAt(i);
                        monstersKilled++;
                    }
                }
            }
            return(true);
        }
Beispiel #9
0
        private bool OnKillButcherListener(List <uint> monstersAlive, Map.World world)
        {
            System.Int32 monstersKilled = 0;
            //bool MidMidle_Active = false;
            var monsterCount = monstersAlive.Count; //Since we are removing values while iterating, this is set at the first real read of the mob counting.

            while (monstersKilled != monsterCount)
            {
                /*
                 * if (MidMidle_Active == false)
                 * {
                 *  MidMidle_Active = true;
                 *
                 *  var Panel_MidMiddle_Base = world.GetActorBySNO(201426);
                 *
                 *  if (Panel_MidMiddle_Base == null)
                 *  {
                 *      world.SpawnMonster(201426, new Vector3D(120.9595f, 121.6244f, -0.1068707f));
                 *      Panel_MidMiddle_Base = world.GetActorBySNO(201426);
                 *  }
                 *
                 *  TickTimer Timeout1 = new SecondsTickTimer(world.Game, 2f);
                 *  var TimeoutToReady = System.Threading.Tasks.Task<bool>.Factory.StartNew(() => WaitToSpawn(Timeout1));
                 *  TimeoutToReady.ContinueWith(delegate
                 *  {
                 *      world.SpawnMonster(201428, Panel_MidMiddle_Base.Position);
                 *      var Panel_MidMiddle_Ready = world.GetActorBySNO(201428);
                 *
                 *      TickTimer Timeout2 = new SecondsTickTimer(world.Game, 4f);
                 *      var TimeoutToActive = System.Threading.Tasks.Task<bool>.Factory.StartNew(() => WaitToSpawn(Timeout2));
                 *      TimeoutToActive.ContinueWith(delegate
                 *      {
                 *          Panel_MidMiddle_Ready.Destroy();
                 *          world.SpawnMonster(201430, Panel_MidMiddle_Base.Position);
                 *          var Panel_MidMiddle_Active = world.GetActorBySNO(201430);
                 *
                 *          TickTimer Timeout3 = new SecondsTickTimer(world.Game, 5f);
                 *          var TimeoutToOff = System.Threading.Tasks.Task<bool>.Factory.StartNew(() => WaitToSpawn(Timeout3));
                 *          TimeoutToOff.ContinueWith(delegate
                 *          {
                 *              Panel_MidMiddle_Active.Destroy();
                 *              MidMidle_Active = false;
                 *          });
                 *      });
                 *  });
                 * }
                 */
                //Iterate through monstersAlive List, if found dead we start to remove em till all of em are dead and removed.
                for (int i = monstersAlive.Count - 1; i >= 0; i--)
                {
                    if (world.HasMonster(monstersAlive[i]))
                    {
                        //Alive: Nothing.
                    }
                    else
                    {
                        //If dead we remove it from the list and keep iterating.
                        Logger.Debug(monstersAlive[i] + " has been killed");
                        monstersAlive.RemoveAt(i);
                        monstersKilled++;
                    }
                }
            }
            return(true);
        }