Exemple #1
0
        private void ParseClearTarget(Internal.CommunicationStream message)
        {
            uint creatureId = 0;

            if (OpenTibiaUnity.GameManager.GetFeature(GameFeature.GameAttackSeq))
            {
                creatureId = message.ReadUnsignedInt();
            }

            Creatures.Creature creature;
            if (!!(creature = CreatureStorage.AttackTarget) && (creature.Id == creatureId || creatureId == 0))
            {
                CreatureStorage.SetAttackTarget(null, false);
            }
            else if (!!(creature = CreatureStorage.FollowTarget) && (creature.Id == creatureId || creatureId == 0))
            {
                CreatureStorage.SetFollowTarget(null, false);
            }
        }