Exemplo n.º 1
0
            protected void OnOpen()
            {
                _dispatcher.Subscribe("CombatData", this);
                _dispatcher.Subscribe("LogLine", this);
                _dispatcher.Subscribe("ChangeZone", this);
                _dispatcher.Subscribe("ChangePrimaryPlayer", this);

                _conn.Send(JsonConvert.SerializeObject(new
                {
                    type    = "broadcast",
                    msgtype = "SendCharName",
                    msg     = new
                    {
                        charName = _repository.GetPlayerName() ?? "YOU",
                        charID   = _repository.GetPlayerID()
                    }
                }));
            }
Exemplo n.º 2
0
            protected override void OnOpen()
            {
                base.OnOpen();

                EventDispatcher.Subscribe("CombatData", this);
                EventDispatcher.Subscribe("LogLine", this);
                EventDispatcher.Subscribe("ChangeZone", this);
                EventDispatcher.Subscribe("ChangePrimaryPlayer", this);

                Send(JsonConvert.SerializeObject(new
                {
                    type    = "broadcast",
                    msgtype = "SendCharName",
                    msg     = new
                    {
                        charName = FFXIVRepository.GetPlayerName() ?? "YOU",
                        charID   = FFXIVRepository.GetPlayerID()
                    }
                }));
            }