Beispiel #1
0
        private void Update()
        {
            PlayerTrade pt = new PlayerTrade(PlayerTags.Black, PlayerTags.Red, Direction.Right,
                                             null, 2, null, Random.Range(0, 10000));


            /*if (Input.GetKeyDown(KeyCode.A))
             * {
             *  AddElement(pt);
             * }
             *
             * if (Input.GetKeyDown(KeyCode.R))
             * {
             *  int i = 0;
             *  int randomNumber = Random.Range(0, Elements.Count-1);
             *  PlayerTrade trade = null;
             *  foreach (KeyValuePair<PlayerTrade,GameObject> pair in ElementDictionary)
             *  {
             *      if (i == randomNumber)
             *      {
             *          trade = pair.Key;
             *      }
             *
             *      i++;
             *  }
             *
             *  RemoveElement(trade);
             * }*/
        }
Beispiel #2
0
        public void OnNewTradeActivity(PlayerTrade playerTrade, TradeActions tradeAction)
        {
            if (playerTrade.ReceivingPlayerTags == _playerController.playerTag)
            {
                switch (tradeAction)
                {
                case TradeActions.TradeOffered:
                    AddIncomingTrade(playerTrade);
                    break;

                default:
                    RemoveIncomingTrade(playerTrade);
                    break;
                }
            }

            if (playerTrade.OfferingPlayerTags == _playerController.playerTag)
            {
                switch (tradeAction)
                {
                case TradeActions.TradeOffered:
                    AddOutgoingTrade(playerTrade);
                    break;

                default:
                    RemoveOutgoingTrade(playerTrade);
                    break;
                }
            }
        }
        public void RemoveTrade(TradeActions tradeAction, PlayerTrade trade)
        {
            if (tradeAction == TradeActions.TradeAccepted)
            {
                LeanTween.moveLocalX(arrow.gameObject, 43, 0.3f).setEase(LeanTweenType.easeInOutQuad);
                LeanTween.moveLocalX(counterMove.gameObject, 90, 0.5f).setEase(LeanTweenType.easeInQuad);
                counterMove.color = ColorPalette.current.GetPlayerColor(trade.ReceivingPlayerTags);
                LeanTween.rotateLocal(counterMove.gameObject,
                                      new Vector3(0, 0, GlobalMethods.GetDirectionRotation(trade.DirectionCounterOffer)), 0);

                LeanTween.color(GetComponent <Image>().rectTransform, new Color32(120, 224, 143, 255), 0.5f)
                .setEase(LeanTweenType.easeInOutBounce).setRepeat(3).setRecursive(false).setOnComplete(() =>
                {
                    LeanTween.moveLocalX(gameObject, -400, 0.4f).setEase(LeanTweenType.easeInQuad).setOnComplete(() => Destroy(gameObject));
                });
            }
            else
            {
                LeanTween.color(GetComponent <Image>().rectTransform, new Color32(229, 80, 57, 255), 0.5f)
                .setEase(LeanTweenType.easeInOutBounce).setRepeat(3).setRecursive(false).setOnComplete(() =>
                {
                    LeanTween.moveLocalX(gameObject, -400, 0.4f).setEase(LeanTweenType.easeInQuad).setOnComplete(() => Destroy(gameObject));
                });
            }
        }
Beispiel #4
0
    /// <summary>Disconnects the client and stops all network traffic.</summary>
    public void Disconnect()
    {
        ThreadManager.ExecuteOnMainThread(() =>
        {
            UnityEngine.Object.Destroy(player.gameObject);
            Destroy(player.playerInstance);
            lastInputSequenceNumber = 0;
            inputBuffer.Clear();
            player.TransferGroupOwner();
            player.RemoveGroupIfEmpty();

            int groupId = 0;
            if (player.group != null)
            {
                groupId = player.group.groupId;
            }

            if (NetworkManager.trades.ContainsKey(player.id))
            {
                PlayerTrade trade = NetworkManager.trades[player.id];
                int otherPlayer   = GameServer.FindPlayerByUsername(trade.player2.username).id;

                if (GameServer.clients.ContainsKey(otherPlayer))
                {
                    ServerSend.PlayerTradeCanceled(otherPlayer);
                }
                NetworkManager.trades.Remove(player.id);
                NetworkManager.trades.Remove(otherPlayer);
            }

            for (int i = 0; i < GameServer.clients.Count; i++)
            {
                if (GameServer.clients[i + 1].player)
                {
                    Player p = GameServer.clients[i + 1].player;
                    if (GameServer.clients[i + 1].player.playerMovement.player && GameServer.clients[i + 1].player.playerMovement.player.id == player.id)
                    {
                        GameServer.clients[i + 1].player.playerMovement.DisableAgent();
                    }
                }
            }

            GameServer.StoreLoot(player.dbid, GameServer.playerLoot[player.id]);
            GameServer.StoreBuffs(player.dbid, player.playerCharacter.buffManager.buffs);

            player = null;

            if (groupId != 0)
            {
                ServerSend.GroupMembers(groupId);
            }
        });

        NetworkManager.PlayerDisconnected(id);
        ServerSend.PlayerDisconnected(id);
        //TODO: disconnect client
        //session.Disconnect();
    }
Beispiel #5
0
        /*
         * Class specific methods
         */
        public void OnNewTradeActivity(PlayerTrade playerTrade, TradeActions tradeAction)
        {
            if (tradeAction == TradeActions.TradeOffered)
            {
                return;
            }

            MyNetworkedAgent.OnNewTradeActivity(playerTrade, tradeAction);
        }
Beispiel #6
0
 public void OnNewTradeActivity(PlayerTrade playerTrade, TradeActions tradeAction)
 {
     if (tradeAction == TradeActions.TradeOffered)
     {
         AddTradeElement(playerTrade);
     }
     else
     {
         RemoveTradeElement(playerTrade, tradeAction);
     }
 }
        public void SetInfo(PlayerTrade playerTrade)
        {
            TradeId              = playerTrade.TradeID;
            offeringPlayer.text  = playerTrade.OfferingPlayerTags.ToString();
            receivingPlayer.text = playerTrade.ReceivingPlayerTags.ToString();

            offeringPlayerColor.color  = ColorPalette.current.GetPlayerColor(playerTrade.OfferingPlayerTags);
            receivingPlayerColor.color = ColorPalette.current.GetPlayerColor(playerTrade.ReceivingPlayerTags);

            arrow.color = ColorPalette.current.GetPlayerColor(playerTrade.OfferingPlayerTags);
            RotateArrow(playerTrade.DirectionOffer);
        }
Beispiel #8
0
        /// <summary>
        /// Removes element from list
        /// </summary>
        /// <param name="trade"></param>
        protected void RemoveElement(PlayerTrade trade)
        {
            GameObject element = ElementDictionary[trade];

            Elements.Remove(trade);
            ElementDictionary.Remove(trade);


            LeanTween.moveLocalX(element, elementStartPos, animateOutTime).setEase(easeOutType).setOnComplete(() => Destroy(element.gameObject));


            UpdateElementPositions();
        }
Beispiel #9
0
        private void RemoveTradeElement(PlayerTrade trade, TradeActions tradeAction)
        {
            if (_trades.All(item => item.TradeID != trade.TradeID))
            {
                return;
            }

            _trades.Remove(trade);
            GameObject go = _tradeDictionary[trade];

            _tradeDictionary.Remove(trade);

            go.GetComponent <ObserverTradeElement>().RemoveTrade(tradeAction, trade);
        }
Beispiel #10
0
        private void OnTradeBtn(Button b, TradeActions action, Direction counterOffer)
        {
            PlayerTrade playerTrade = null;

            foreach (KeyValuePair <PlayerTrade, Button> valuePair in _incomingTradeDictionary)
            {
                if (valuePair.Value == b)
                {
                    playerTrade = valuePair.Key;
                }
            }

            foreach (KeyValuePair <PlayerTrade, Button> valuePair in _outgoingTradeDictionary)
            {
                if (valuePair.Value == b)
                {
                    playerTrade = valuePair.Key;
                }
            }

            if (playerTrade == null)
            {
                throw new Exception("We got a problem bois...");
            }


            switch (action)
            {
            case TradeActions.TradeRejected:
                playerTrade.RejectTrade(_playerController);
                break;

            case TradeActions.TradeAccepted:
                playerTrade.AcceptTrade(counterOffer, _playerController);
                break;

            case TradeActions.TradeCanceled:
                playerTrade.CancelTrade(_playerController.playerTag);
                break;

            case TradeActions.TradeCanceledByGameHandler:
                playerTrade.CancelTrade(GameHandler.Current);
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(action), action, null);
            }
        }
Beispiel #11
0
        /// <summary>
        /// Communicating new trade updates to all
        /// </summary>
        /// <param name="trade"></param>
        /// <param name="tradeAction"></param>
        public void OnNewTradeActivity(PlayerTrade trade, TradeActions tradeAction)
        {
            /*
             * When i contact the agent and tell it there is a change in one of the trades
             * it will find the trade and apply the change. This will in turn notify the local networkgamehandler,
             * which will contact all players with the new change, which will do the exact same. Basically it will just
             * loop forever. This if statement prevents that
             */
            if (_processingNewTradeAction)
            {
                _processingNewTradeAction = false;
                return;
            }

            photonView.RPC("RPC_OnNewTradeActivity", RpcTarget.Others, trade.TradeID, tradeAction, trade.OfferingPlayerTags, trade.ReceivingPlayerTags, trade.DirectionCounterOffer);
        }
Beispiel #12
0
    public static int GetOtherPlayer(PlayerTrade trade, int from)
    {
        int player1     = FindPlayerByUsername(trade.player1.username).id;
        int player2     = FindPlayerByUsername(trade.player2.username).id;
        int otherPlayer = 0;

        if (player1 == from)
        {
            otherPlayer = player2;
        }
        else
        {
            otherPlayer = player1;
        }
        return(otherPlayer);
    }
        public void OnNewTradeActivity(PlayerTrade playerTrade, TradeActions tradeAction)
        {
            if (playerTrade.OfferingPlayerTags == _playerController.playerTag)
            {
                switch (tradeAction)
                {
                case TradeActions.TradeOffered:
                    AddElement(playerTrade);
                    break;

                default:
                    RemoveElement(playerTrade);
                    break;
                }
            }
        }
Beispiel #14
0
        private void AddTradeElement(PlayerTrade trade)
        {
            if (_trades.Any(item => item.TradeID == trade.TradeID))
            {
                return;
            }

            GameObject go = Instantiate(tradePrefab, tradeElementsRect.transform, false);

            _trades.Add(trade);
            _tradeDictionary.Add(trade, go);

            ObserverTradeElement ote = go.GetComponent <ObserverTradeElement>();

            ote.SetInfo(trade);
        }
 public void OnNewTradeActivity(PlayerTrade playerTrade, TradeActions tradeAction)
 {
     if (tradeAction == TradeActions.TradeOffered)
     {
         _nrOfTrades++;
     }
     //Type | Time | ID | offering player | receiving player | direction | Status | Counter Offer (If Available)
     _textWriter.WriteLine("{0},{1},{2},{3},{4},{5},{6},{7}",
                           "Trade",
                           GetTimeReadable(),
                           playerTrade.TradeID,
                           playerTrade.OfferingPlayerTags,
                           playerTrade.ReceivingPlayerTags,
                           playerTrade.DirectionOffer,
                           tradeAction,
                           playerTrade.DirectionCounterOffer);
 }
Beispiel #16
0
        /// <summary>
        /// Adds element to the list
        /// </summary>
        /// <param name="trade"></param>
        protected virtual void AddElement(PlayerTrade trade)
        {
            GameObject listElement = Instantiate(listElementPrefab, transform, false);

            listElement.name = $"IncomingTrade {Random.Range(0,100000)}";

            IncomingTrade inTrade = listElement.GetComponent <IncomingTrade>();

            inTrade.SetInfo(trade, PlayerController);

            Elements.Add(trade);
            ElementDictionary.Add(trade, listElement);

            LeanTween.moveLocalX(listElement, elementStartPos, 0);
            LeanTween.moveLocalX(listElement, 0, animateInTime).setEase(easeInType);

            UpdateElementPositions();
        }
        private void RemoveElement(PlayerTrade trade)
        {
            GameObject element = ElementDictionary[trade];

            Elements.Remove(trade);
            ElementDictionary.Remove(trade);


            LeanTween.moveLocalX(element, elementStartPos, animateOutTime).setEase(easeOutType)
            .setOnComplete(() => Destroy(element.gameObject));

            if (_maxedOut)
            {
                _currentInLine.GetComponent <Button>().interactable = true;
            }

            UpdateElementPositions();
        }
Beispiel #18
0
        public void SetInfo(PlayerTrade trade, PlayerController playerController)
        {
            _trade            = trade;
            _playerController = playerController;
            GlobalMethods.UpdateArrows(arrowPanel.transform, _playerController);
            _playerController.AddInventoryObserver(this);

            text.text = $"{_trade.OfferingPlayerTags}\nTrading\n{_trade.DirectionOffer}";

            offeringPlayerBorder.color  = ColorPalette.current.GetPlayerColor(_trade.OfferingPlayerTags);
            receivingPlayerBorder.color = ColorPalette.current.GetPlayerColor(_trade.ReceivingPlayerTags);
            fadeController.SetPauseColor(ColorPalette.current.GetPlayerColor(trade.ReceivingPlayerTags));


            Vector3 rotation = new Vector3(0, 0, GlobalMethods.GetDirectionRotation(_trade.DirectionOffer));

            LeanTween.rotateLocal(incomingDirection.gameObject, rotation, 0.3f).setEase(LeanTweenType.easeOutSine);
        }
Beispiel #19
0
        private void AddIncomingTrade(PlayerTrade playerTrade)
        {
            //If no trades are active
            if (activeIncomingTrades == 0)
            {
                LeanTween.moveLocalX(incomingTradesTitle.gameObject, 0, animationSpeed).setEase(easeIn);
            }

            //Move already active trades
            for (int i = 0; i < activeIncomingTrades; i++)
            {
                Button btn = _incomingTradeButtons[i];

                float newYPos = -300 + _outgoingTradeHeightOffSet +
                                (elementHeight * (activeIncomingTrades - i)) +
                                (separationValue * (activeIncomingTrades - i));

                LeanTween.moveLocalY(btn.gameObject, newYPos, animationSpeed).setEase(moveIn);

                //Moving label the the correct spot
                if (i == 0)
                {
                    LeanTween.moveLocalY(incomingTradesTitle.gameObject, newYPos + elementHeight, animationSpeed).setEase(moveIn);
                }
            }

            //Getting btn to be added
            Button newBtn = _incomingTradeButtons[activeIncomingTrades];

            _incomingTradeDictionary.Add(playerTrade, newBtn);

            //Setting text on new btn
            TextMeshProUGUI t = newBtn.transform.GetChild(0).GetComponent <TextMeshProUGUI>();

            t.text = $"{playerTrade.OfferingPlayerTags} | {playerTrade.DirectionOffer}";

            //Moving new Btn in
            LeanTween.moveLocalX(newBtn.gameObject, 0, animationSpeed).setEase(easeIn);
            LeanTween.moveLocalY(newBtn.gameObject, -300 + _outgoingTradeHeightOffSet, animationSpeed).setEase(moveIn);

            //Adding one to active incoming trades
            //incomingTrades.Add(playerTrade);
            activeIncomingTrades++;
        }
Beispiel #20
0
        private void RemoveOutgoingTrade(PlayerTrade playerTrade)
        {
            _outgoingTradeHeightOffSet -= elementHeight + separationValue;
            Button b = _outgoingTradeDictionary[playerTrade];

            _outgoingTradeDictionary.Remove(playerTrade);
            b.transform.GetChild(0).GetComponent <TextMeshProUGUI>().text = "Deleted";

            _outgoingTradeButtons.Remove(b);
            _outgoingTradeButtons.Add(b);
            _activeOutgoingTrades--;
            //outgoingTrades.Remove(playerTrade);

            float removeYPos = -300;

            LeanTween.moveLocalX(b.gameObject, -500, animationSpeed).setOnComplete(DelayedAction).setEase(easeOut);

            void DelayedAction()
            {
                LeanTween.moveLocalY(b.gameObject, removeYPos, animationSpeed).setEase(easeOut);
            }

            for (int i = 0; i < _activeOutgoingTrades; i++)
            {
                Button btn     = _outgoingTradeButtons[i];
                float  newYPos = -300 + (elementHeight * (_activeOutgoingTrades - i - 1)) + (separationValue * (_activeOutgoingTrades - i));

                LeanTween.moveLocalY(btn.gameObject, newYPos, animationSpeed).setEase(moveOut);
                if (i == 0)
                {
                    LeanTween.moveLocalY(outgoingTradesTitle.gameObject, newYPos + elementHeight, animationSpeed).setEase(moveOut);
                }
            }

            if (_activeOutgoingTrades == 0)
            {
                LeanTween.moveLocalX(outgoingTradesTitle.gameObject, -500, animationSpeed).setEase(easeOut);
                _outgoingTradeHeightOffSet = 0;
            }

            OnOutgoingBtnChange(moveOut);
        }
Beispiel #21
0
        private void AddOutgoingTrade(PlayerTrade playerTrade)
        {
            if (_activeOutgoingTrades == 0)
            {
                LeanTween.moveLocalX(outgoingTradesTitle.gameObject, 0, animationSpeed).setEase(easeIn);
                _outgoingTradeHeightOffSet = elementHeight * 2 + separationValue;
            }
            else
            {
                _outgoingTradeHeightOffSet += elementHeight + separationValue;
            }

            for (int i = 0; i < _activeOutgoingTrades; i++)
            {
                Button btn = _outgoingTradeButtons[i];

                float newYPos = -300 + (elementHeight * (_activeOutgoingTrades - i)) + (separationValue * (_activeOutgoingTrades - i));

                LeanTween.moveLocalY(btn.gameObject, newYPos, animationSpeed).setEase(moveIn);

                if (i == 0)
                {
                    LeanTween.moveLocalY(outgoingTradesTitle.gameObject, newYPos + elementHeight, animationSpeed).setEase(moveIn);
                }
            }

            Button newBtn = _outgoingTradeButtons[_activeOutgoingTrades];

            _outgoingTradeDictionary.Add(playerTrade, newBtn);

            TextMeshProUGUI t = newBtn.transform.GetChild(0).GetComponent <TextMeshProUGUI>();

            t.text = $"{playerTrade.ReceivingPlayerTags} | {playerTrade.DirectionOffer}";

            LeanTween.moveLocalX(newBtn.gameObject, 0, animationSpeed).setEase(easeIn);
            LeanTween.moveLocalY(newBtn.gameObject, -300, animationSpeed).setEase(moveIn);

            _activeOutgoingTrades++;
            //outgoingTrades.Add(playerTrade);

            OnOutgoingBtnChange(moveIn);
        }
Beispiel #22
0
    public static void PlayerTrade(PlayerTrade trade, Inventory inventory)
    {
        using (Packet _packet = new Packet((int)ServerPackets.playerTrade))
        {
            _packet.Write(trade);

            List <SerializableObjects.InventorySlot> items = new List <SerializableObjects.InventorySlot>();

            foreach (InventorySlot slot in inventory.items)
            {
                if (slot.item != null)
                {
                    items.Add(NetworkManager.SlotToSerializable(slot));
                }
            }
            _packet.Write(items);

            SendTCPData(GameServer.FindPlayerByUsername(trade.player1.username).id, _packet);
        }
    }
        /*private void OnTradeBtn(Button button, TradeActions tradeAction, Direction direction)
         * {
         *  switch (tradeAction)
         *  {
         *      case TradeActions.TradeCanceled:
         *          foreach (KeyValuePair<PlayerTrade, GameObject> element in ElementDictionary)
         *          {
         *              if (element.Key.TradeID == button.GetComponent<OutgoingTradeElement>().GetTradeId())
         *              {
         *                  element.Key.CancelTrade(_playerController.playerTag);
         *                  return;
         *              }
         *          }
         *
         *          break;
         *      case TradeActions.TradeCanceledByGameHandler:
         *          foreach (KeyValuePair<PlayerTrade, GameObject> element in ElementDictionary)
         *          {
         *              if (element.Key.TradeID == button.GetComponent<IncomingTradeElement>().GetTradeId())
         *              {
         *                  element.Key.CancelTrade(GameHandler.Current);
         *                  return;
         *              }
         *          }
         *
         *          break;
         *      default:
         *          return;
         *  }
         * }*/

        private void AddElement(PlayerTrade trade)
        {
            _currentInLine.GetComponent <OutgoingTrade>().trade = trade;
            Elements.Add(trade);
            ElementDictionary.Add(trade, _currentInLine);

            GameObject listElement = Instantiate(OutGoingTradePrefab, transform, false);

            LeanTween.moveLocalX(listElement, elementStartPos, 0);
            LeanTween.moveLocalX(listElement, 0, animateInTime).setEase(easeInType);

            _currentInLine = listElement;
            _currentInLine.GetComponent <OutgoingTrade>().ManualSetup(_playerController);

            if (Elements.Count == 4)
            {
                _maxedOut = true;
                _currentInLine.GetComponent <Button>().interactable = false;
            }

            UpdateElementPositions();
        }
Beispiel #24
0
    public static void SendTradeRequest(Player player, Player sender)
    {
        if (player != null)
        {
            string acceptLink  = "trade_accept" + System.Guid.NewGuid().ToString();
            string declineLink = "trade_decline" + System.Guid.NewGuid().ToString();

            PlayerTrade trade = new PlayerTrade();
            trade.player1 = sender.data;
            trade.player2 = player.data;

            NetworkManager.tradeLinks.Add(acceptLink, trade);
            NetworkManager.tradeLinks.Add(declineLink, trade);

            string accept  = $"<link={acceptLink}><color=green><u>Accept</u></color></link>";
            string decline = $"<link={declineLink}><color=#FF0006><u>Decline</u></color></link>";

            Message msg = new Message();
            msg.messageType = Message.MessageType.privateMessage;
            msg.text        = $"{accept} or {decline} trade request from {sender.data.username}";
            ServerSend.ChatMessage(sender.id, msg, player.id);
        }
    }
        /// <summary>
        /// Creates new PlayerTrade
        /// </summary>
        /// <param name="direction"></param>
        /// <param name="directionIndex"></param>
        /// <param name="playerTagsReceiving"></param>
        /// <param name="playerTagsOffering"></param>
        /// <param name="tradeId"></param>
        public virtual void NewTrade(Direction direction, int directionIndex, PlayerTags playerTagsReceiving, PlayerTags playerTagsOffering, int tradeId)
        {
            PlayerController playerReceivingController = GetPlayerController(playerTagsReceiving);
            PlayerController playerOfferingController  = GetPlayerController(playerTagsOffering);

            List <ITradeObserver> combinedObserverList = new List <ITradeObserver>();
            List <ITradeObserver> offeringObservers    = playerOfferingController.GetTradeObservers();
            List <ITradeObserver> receivingObservers   = playerReceivingController.GetTradeObservers();

            combinedObserverList.AddRange(_tradeObservers);
            combinedObserverList.AddRange(offeringObservers);
            combinedObserverList.AddRange(receivingObservers);

            PlayerTrade trade = new PlayerTrade(playerTagsOffering, playerTagsReceiving, direction, this, directionIndex, combinedObserverList, tradeId);

            trades.Add(trade);

            playerReceivingController.AddIncomingTrade(trade);
            playerOfferingController.AddOutgoingTrade(trade);
            playerOfferingController.RemoveMove(directionIndex);

            trade.NotifyObservers(TradeActions.TradeOffered);
        }
Beispiel #26
0
        private void RemoveIncomingTrade(PlayerTrade playerTrade)
        {
            Button b = _incomingTradeDictionary[playerTrade];

            _incomingTradeDictionary.Remove(playerTrade);
            b.transform.GetChild(0).GetComponent <TextMeshProUGUI>().text = "Deleted";

            _incomingTradeButtons.Remove(b);
            _incomingTradeButtons.Add(b);
            activeIncomingTrades--;

            float removeYPos = -300 + _outgoingTradeHeightOffSet;

            LeanTween.moveLocalX(b.gameObject, -500, animationSpeed).setOnComplete(doStuff).setEase(easeOut);

            void doStuff()
            {
                LeanTween.moveLocalY(b.gameObject, removeYPos, animationSpeed).setEase(easeOut);
            }

            for (int i = 0; i < activeIncomingTrades; i++)
            {
                Button btn     = _incomingTradeButtons[i];
                float  newYPos = -300 + _outgoingTradeHeightOffSet + (elementHeight * (activeIncomingTrades - i - 1)) + (separationValue * (activeIncomingTrades - i));

                LeanTween.moveLocalY(btn.gameObject, newYPos, animationSpeed).setEase(moveOut);
                if (i == 0)
                {
                    LeanTween.moveLocalY(incomingTradesTitle.gameObject, newYPos + elementHeight, animationSpeed).setEase(moveOut);
                }
            }

            if (activeIncomingTrades == 0)
            {
                LeanTween.moveLocalX(incomingTradesTitle.gameObject, -500, animationSpeed).setEase(easeOut);
            }
        }
 public static void SendExchangeStartedWithPodsMessage(IPacketReceiver client, PlayerTrade playerTrade)
 {
     client.Send(new ExchangeStartedWithPodsMessage(1, playerTrade.FirstTrader.Character.Id, (uint)playerTrade.FirstTrader.Character.Inventory.Weight, (uint)playerTrade.FirstTrader.Character.Inventory.WeightTotal, playerTrade.SecondTrader.Character.Id, (uint)playerTrade.SecondTrader.Character.Inventory.Weight, (uint)playerTrade.SecondTrader.Character.Inventory.WeightTotal));
 }
Beispiel #28
0
 public void OnNewTradeActivity(PlayerTrade playerTrade, TradeActions tradeAction)
 {
     throw new NotImplementedException();
 }
Beispiel #29
0
 public abstract void OnNewTradeActivity(PlayerTrade playerTrade, TradeActions tradeAction);
 public static void SendExchangeStartedWithPodsMessage(IPacketReceiver client, PlayerTrade playerTrade)
 {
     client.Send(new ExchangeStartedWithPodsMessage(
                     (sbyte)ExchangeTypeEnum.PLAYER_TRADE,
                     playerTrade.FirstTrader.Character.Id,
                     playerTrade.FirstTrader.Character.Inventory.Weight,
                     (int)playerTrade.FirstTrader.Character.Inventory.WeightTotal,
                     playerTrade.SecondTrader.Character.Id,
                     playerTrade.SecondTrader.Character.Inventory.Weight,
                     (int)playerTrade.SecondTrader.Character.Inventory.WeightTotal
                     ));
 }