Exemplo n.º 1
0
        public static void HandleActivateUnitCast(WorldSession session, ClientActivateUnitCast unit)
        {
            WorldEntity entity = session.Player.GetVisible <WorldEntity>(unit.ActivateUnitId);

            if (entity == null)
            {
                throw new InvalidPacketValueException();
            }

            // TODO: sanity check for range etc.

            entity.OnActivateCast(session.Player);
        }
Exemplo n.º 2
0
        public static void HandleActivateUnitCast(WorldSession session, ClientActivateUnitCast unit)
        {
            WorldEntity entity = session.Player.GetVisible <WorldEntity>(unit.ActivateUnitId);

            if (entity == null)
            {
                throw new InvalidPacketValueException();
            }

            // TODO: sanity check for range etc.

            session.Player.QuestManager.ObjectiveUpdate(QuestObjectiveType.ActivateEntity, entity.CreatureId, 1u);
            entity.OnActivateCast(session.Player);
        }
Exemplo n.º 3
0
        public static void HandleActivateUnitCast(WorldSession session, ClientActivateUnitCast unit)
        {
            WorldEntity entity = session.Player.GetVisible <WorldEntity>(unit.ActivateUnitId);

            if (entity == null)
            {
                throw new InvalidPacketValueException();
            }

            // TODO: sanity check for range etc.

            session.Player.QuestManager.ObjectiveUpdate(QuestObjectiveType.ActivateEntity, entity.CreatureId, 1u);
            foreach (uint targetGroupId in AssetManager.Instance.GetTargetGroupsForCreatureId(entity.CreatureId) ?? Enumerable.Empty <uint>())
            {
                session.Player.QuestManager.ObjectiveUpdate(QuestObjectiveType.ActivateTargetGroup, targetGroupId, 1u); // Updates the objective, but seems to disable all the other targets. TODO: Investigate
            }
            entity.OnActivateCast(session.Player);
        }