Ejemplo n.º 1
0
        public void SwitchController(MapleCharacter newController, bool immediateAggro)
        {
            var controllers = GetController();

            if (controllers == newController)
            {
                return;
            }
            if (controllers != null)
            {
                controllers.StopControllingMonster(this);
                controllers.Client.Send(PacketCreator.StopControllingMonster(ObjectId));
            }
            newController.ControlMonster(this, immediateAggro);
            SetController(newController);
            if (immediateAggro)
            {
                ControllerHasAggro = true;
            }
            ControllerKnowsAboutAggro = false;
        }