Ejemplo n.º 1
0
        private void UpdateSelectedTarget(Creature target)
        {
            if (selectedTarget != null)
            {
                var prevSelected = selectedTarget.TryGetWorldObject() as Creature;

                if (prevSelected != null)
                {
                    prevSelected.OnTargetDeselected(this);
                }
            }

            if (target != null)
            {
                selectedTarget    = new WorldObjectInfo(target);
                HealthQueryTarget = target.Guid.Full;

                target.OnTargetSelected(this);
            }
            else
            {
                selectedTarget    = null;
                HealthQueryTarget = null;
            }
        }
Ejemplo n.º 2
0
        public WeenieObject(WorldObject worldObject)
        {
            WorldObjectInfo = new WorldObjectInfo(worldObject);

            IsCombatPet = worldObject is CombatPet;

            IsMonster = worldObject is Creature creature && creature.IsMonster && !IsCombatPet;
        }
Ejemplo n.º 3
0
        public WeenieObject(WorldObject worldObject)
        {
            WorldObjectInfo = new WorldObjectInfo(worldObject);

            if (!(worldObject is Creature creature))
            {
                return;
            }

            IsCombatPet = worldObject is CombatPet;

            IsMonster = creature.IsMonster && !IsCombatPet;

            Faction1Bits = creature.Faction1Bits ?? FactionBits.None;

            IsFactionMob = IsMonster && Faction1Bits != FactionBits.None;
        }
Ejemplo n.º 4
0
 public WeenieObject(WorldObject worldObject)
 {
     WorldObjectInfo = new WorldObjectInfo(worldObject);
 }