Exemplo n.º 1
0
        public static IACTWrapper GetInstance()
        {
            if (_actWrapper != null)
            {
                return(_actWrapper);
            }

            lock (Lock)
            {
                if (_actWrapper == null)
                {
                    _actWrapper = new ACTWrapper();
                }
            }

            return(_actWrapper);
        }
Exemplo n.º 2
0
        public Player GetCurrentPlayer()
        {
            var    combatant = _ffxivACTPluginWrapper.GetCurrentCombatant();
            Player player;

            if (combatant == null)
            {
                var importName = ACTWrapper.GetInstance().GetCharacterName();
                player = importName.Equals(string.Empty) || !importName.Contains(" ")
                                        ? new Player {
                    Name = "Your Character"
                }
                                        : new Player {
                    Name = ACTWrapper.GetInstance().GetCharacterName()
                };
            }
            else
            {
                player = MapToPlayer(combatant);
            }

            player.IsReporter = true;
            return(player);
        }