Пример #1
0
    public void showNums()
    {
        GameObject[] PlayerArray = GameObject.FindGameObjectsWithTag("Player");
        for (int i = 0; i < PlayerArray.Length; i++)
        {
            TeamTag tag  = PlayerArray[i].GetComponent <TeamSetup>().teamTag;
            bool    temp = !TeamCount[tag].Contains(PlayerArray[i]);
            if (Vector3.Distance(transform.position, PlayerArray[i].transform.position) < radius)
            {
                if (temp)
                {
                    TeamCount[tag].Add(PlayerArray[i]);
                }
            }
            else
            {
                if (!temp)
                {
                    TeamCount[tag].Remove(PlayerArray[i]);
                }
            }
        }
        TeamTag tempTag = TeamTag.red;

        for (int i = 0; i < teamTextList.Length; i++)
        {
            teamTextList[i].text  = TeamCount[tempTag].Count.ToString();
            teamTextList[i].color = TeamSetup.returnColor(tempTag);
            tempTag++;
        }
    }
Пример #2
0
        private void navTeamMngt_Click(object sender, EventArgs e)
        {
            TeamSetup curForm = new TeamSetup();

            mdiStatusMsg.Text = curForm.Name + " opening";

            // Set the Parent Form and display requested form
            curForm.MdiParent = this;
            curForm.Show();
            mdiStatusMsg.Text = curForm.Name + " open";
        }
Пример #3
0
    private void Update()
    {
        OccupyRate = Mathf.Clamp(OccupyRate, 0, 100);
        if (OccupyRate == 0)
        {
            precentOccTeam = lastOccTeam;
        }

        OccupySlider.value = OccupyRate / 100f;
        SliderBack.GetComponent <Image>().color = TeamSetup.returnColor(precentOccTeam);
        drawCircle();
        showNums();

        if ((Time.time - prevTime) > 1)
        {
            prevTime = Time.time;
            int     InAreaTeam     = 0;
            int     TeamNums       = 0;
            TeamTag InAreaTeamName = TeamTag.red;
            TeamTag tempTag        = TeamTag.red;
            for (int i = 0; i < TeamCount.Count; i++)
            {
                if (TeamCount[tempTag].Count != 0)
                {
                    InAreaTeam++;
                    if (TeamCount[tempTag].Count > TeamNums)
                    {
                        TeamNums = TeamCount[tempTag].Count;
                    }
                    InAreaTeamName = tempTag;
                }
                tempTag++;
            }
            if (InAreaTeam == 1)
            {
                lastOccTeam = InAreaTeamName;
                if (precentOccTeam != InAreaTeamName)
                {
                    OccupyRate -= teamNumAddRate[TeamNums];
                }
                else
                {
                    OccupyRate += teamNumAddRate[TeamNums];
                }
            }
        }
    }
Пример #4
0
 public static bool IsSuitableArenaTeam(this TeamSetup setup) => default;
Пример #5
0
 public AllianceBossAttackInfo(TeamSetup teamSetup, int givenDamage)
 {
 }
Пример #6
0
 public static void AddPlayer(ClientInfo _cInfo)
 {
     if (!Teams.ContainsKey(_cInfo.playerId))
     {
         if (Teams.Count >= PlayerCount)
         {
             Phrases.Dict.TryGetValue(773, out string _phrase773);
             ChatHook.ChatMessage(_cInfo, LoadConfig.Chat_Response_Color + _phrase773 + "[-]", -1, LoadConfig.Server_Response_Name, EChatType.Whisper, null);
             return;
         }
         EntityPlayer _player = GameManager.Instance.World.Players.dict[_cInfo.entityId];
         if (_player != null)
         {
             Vector3 _position  = _player.GetPosition();
             int     x          = (int)_position.x;
             int     y          = (int)_position.y;
             int     z          = (int)_position.z;
             string  _sposition = x + "," + y + "," + z;
             PersistentContainer.Instance.Players[_cInfo.playerId].EventReturnPosition = _sposition;
             PersistentContainer.Instance.Save();
             Phrases.Dict.TryGetValue(774, out string _phrase774);
             ChatHook.ChatMessage(_cInfo, LoadConfig.Chat_Response_Color + _phrase774 + "[-]", -1, LoadConfig.Server_Response_Name, EChatType.Whisper, null);
         }
         EventCommandsConsole.Setup.TryGetValue(Operator, out List <string> _setup);
         Teams.Add(_cInfo.playerId, TeamSetup);
         Phrases.Dict.TryGetValue(775, out string _phrase775);
         _phrase775 = _phrase775.Replace("{Value}", TeamSetup.ToString());
         ChatHook.ChatMessage(_cInfo, LoadConfig.Chat_Response_Color + _phrase775 + "[-]", -1, LoadConfig.Server_Response_Name, EChatType.Whisper, null);
         TeamSetup--;
         if (TeamSetup == 0)
         {
             TeamSetup = TeamCount;
         }
         if (Teams.Count == PlayerCount)
         {
             Invited = false;
             foreach (var _teamPlayer in Teams)
             {
                 ClientInfo _eventClientInfo = ConnectionManager.Instance.Clients.ForPlayerId(_teamPlayer.Key);
                 if (_eventClientInfo != null)
                 {
                     EntityPlayer _eventPlayer = GameManager.Instance.World.Players.dict[_eventClientInfo.entityId];
                     if (_eventPlayer != null && _eventPlayer.IsAlive())
                     {
                         Teams.TryGetValue(_teamPlayer.Key, out int _teamNumber);
                         string   _spawnPosition = _setup[_teamNumber + 4];
                         int      _x, _y, _z;
                         string[] _cords = _spawnPosition.Split(',');
                         int.TryParse(_cords[0], out _x);
                         int.TryParse(_cords[1], out _y);
                         int.TryParse(_cords[2], out _z);
                         _eventClientInfo.SendPackage(NetPackageManager.GetPackage <NetPackageTeleportPlayer>().Setup(new Vector3(_x, _y, _z), null, false));
                     }
                     else
                     {
                         PersistentContainer.Instance.Players[_eventClientInfo.playerId].EventSpawn = true;
                         PersistentContainer.Instance.Save();
                     }
                 }
                 else
                 {
                     PersistentContainer.Instance.Players[_eventClientInfo.playerId].EventSpawn = true;
                     PersistentContainer.Instance.Save();
                 }
             }
             int _eventTime = Time * 60;
             Timers._eventTime = _eventTime;
             Open = true;
             Phrases.Dict.TryGetValue(776, out string _phrase776);
             _phrase776 = _phrase776.Replace("{EventName}", TeamSetup.ToString());
             ChatHook.ChatMessage(null, LoadConfig.Chat_Response_Color + _phrase776 + "[-]", -1, LoadConfig.Server_Response_Name, EChatType.Global, null);
         }
         else
         {
             Phrases.Dict.TryGetValue(777, out string _phrase777);
             _phrase777 = _phrase777.Replace("{EventName}", TeamSetup.ToString());
             _phrase777 = _phrase777.Replace("{CommandPrivate}", ChatHook.Command_Private);
             _phrase777 = _phrase777.Replace("{Command100}", Command100);
             ChatHook.ChatMessage(null, LoadConfig.Chat_Response_Color + _phrase777 + "[-]", -1, LoadConfig.Server_Response_Name, EChatType.Global, null);
             Phrases.Dict.TryGetValue(778, out string _phrase778);
             _phrase778 = _phrase778.Replace("{Value}", Teams.Count.ToString());
             _phrase778 = _phrase778.Replace("{PlayerTotal}", PlayerCount.ToString());
             ChatHook.ChatMessage(null, LoadConfig.Chat_Response_Color + _phrase778 + "[-]", -1, LoadConfig.Server_Response_Name, EChatType.Global, null);
         }
     }
     else
     {
         Phrases.Dict.TryGetValue(779, out string _phrase779);
         ChatHook.ChatMessage(_cInfo, LoadConfig.Chat_Response_Color + _phrase779 + "[-]", -1, LoadConfig.Server_Response_Name, EChatType.Whisper, null);
     }
 }
Пример #7
0
 public static void AddPlayer(ClientInfo _cInfo)
 {
     if (!Teams.ContainsKey(_cInfo.playerId))
     {
         if (Teams.Count >= PlayerCount)
         {
             ChatHook.ChatMessage(_cInfo, "The event is full. Unable to join.[-]", -1, LoadConfig.Server_Response_Name, EChatType.Whisper, null);
             return;
         }
         EntityPlayer _player = GameManager.Instance.World.Players.dict[_cInfo.entityId];
         if (_player != null)
         {
             Vector3 _position  = _player.GetPosition();
             int     x          = (int)_position.x;
             int     y          = (int)_position.y;
             int     z          = (int)_position.z;
             string  _sposition = x + "," + y + "," + z;
             PersistentContainer.Instance.Players[_cInfo.playerId].EventReturnPosition = _sposition;
             PersistentContainer.Instance.Save();
             ChatHook.ChatMessage(_cInfo, "You have signed up for the event and your current location has been saved for return.[-]", -1, LoadConfig.Server_Response_Name, EChatType.Whisper, null);
         }
         EventCommandsConsole.Setup.TryGetValue(Operator, out List <string> _setup);
         Teams.Add(_cInfo.playerId, TeamSetup);
         string _message = "You are on team {Team}.";
         _message = _message.Replace("{Team}", TeamSetup.ToString());
         ChatHook.ChatMessage(_cInfo, _message + "[-]", -1, LoadConfig.Server_Response_Name, EChatType.Whisper, null);
         TeamSetup--;
         if (TeamSetup == 0)
         {
             TeamSetup = TeamCount;
         }
         if (Teams.Count == PlayerCount)
         {
             Invited = false;
             foreach (var _teamPlayer in Teams)
             {
                 ClientInfo _eventClientInfo = ConnectionManager.Instance.Clients.ForPlayerId(_teamPlayer.Key);
                 if (_eventClientInfo != null)
                 {
                     EntityPlayer _eventPlayer = GameManager.Instance.World.Players.dict[_eventClientInfo.entityId];
                     if (_eventPlayer != null && _eventPlayer.IsAlive())
                     {
                         Teams.TryGetValue(_teamPlayer.Key, out int _teamNumber);
                         string   _spawnPosition = _setup[_teamNumber + 4];
                         int      _x, _y, _z;
                         string[] _cords = _spawnPosition.Split(',');
                         int.TryParse(_cords[0], out _x);
                         int.TryParse(_cords[1], out _y);
                         int.TryParse(_cords[2], out _z);
                         _eventClientInfo.SendPackage(NetPackageManager.GetPackage <NetPackageTeleportPlayer>().Setup(new Vector3(_x, _y, _z), null, false));
                         ChatHook.ChatMessage(_eventClientInfo, LoadConfig.Chat_Response_Color + "You have been sent to your event spawn point.[-]", -1, LoadConfig.Server_Response_Name, EChatType.Whisper, null);
                     }
                     else
                     {
                         PersistentContainer.Instance.Players[_eventClientInfo.playerId].EventSpawn = true;
                         PersistentContainer.Instance.Save();
                     }
                 }
                 else
                 {
                     PersistentContainer.Instance.Players[_eventClientInfo.playerId].EventSpawn = true;
                     PersistentContainer.Instance.Save();
                 }
             }
             int _eventTime = Time * 60;
             Timers._eventTime = _eventTime;
             Open     = true;
             _message = "{EventName} has now started.";
             _message = _message.Replace("{EventName}", EventName);
             ChatHook.ChatMessage(null, LoadConfig.Chat_Response_Color + _message + "[-]", -1, LoadConfig.Server_Response_Name, EChatType.Global, null);
         }
         else
         {
             _message = "{EventName} still has space for more players. Type " + ChatHook.Command_Private + Command100 + ".";
             _message = _message.Replace("{EventName}", EventName);
             ChatHook.ChatMessage(null, LoadConfig.Chat_Response_Color + _message + "[-]", -1, LoadConfig.Server_Response_Name, EChatType.Global, null);
             _message = "{Count} of {PlayerTotal} have joined the event.";
             _message = _message.Replace("{Count}", Teams.Count.ToString());
             _message = _message.Replace("{PlayerTotal}", PlayerCount.ToString());
             ChatHook.ChatMessage(null, LoadConfig.Chat_Response_Color + _message + "[-]", -1, LoadConfig.Server_Response_Name, EChatType.Global, null);
         }
     }
     else
     {
         ChatHook.ChatMessage(_cInfo, LoadConfig.Chat_Response_Color + "You have already joined this event. It will start when enough players sign up.[-]", _cInfo.entityId, LoadConfig.Server_Response_Name, EChatType.Whisper, null);
     }
 }
Пример #8
0
 // Methods
 public void UpdateMostRecentAttack(TeamSetup setup, int givenDamage)
 {
 }
Пример #9
0
 public UserNote(long id, string socialId, DateTime registrationTime, long revision, int level, string name, UserAvatarId avatar, TeamSetup setup, double totalPower, long?allianceId, AllianceMemberRankId allianceRankId, int?subscriptionId, DateTime lastActivityTime, string localeName, int?battlePassLevel, int?battlePassId, ModeratorRole?moderatorRole, string customAvatarUrl = null, int?firstPlaceInPlatinumTimes = default)
 {
 }
Пример #10
0
 public AllianceBossShortInfo(TeamSetup setup, int givenDamage)
 {
 }
Пример #11
0
 private void Start()
 {
     infectColor = TeamSetup.returnColor(GetComponent <TeamSetup>().teamTag);
 }
Пример #12
0
 public ArenaOpponent(long userId, long arenaPoints, TeamSetup teamSetup, string name, InfluencerInfo influencerInfo = null, bool rated = true)
 {
 }
Пример #13
0
 public static void AddPlayer(ClientInfo _cInfo)
 {
     if (!Teams.ContainsKey(_cInfo.CrossplatformId.CombinedString))
     {
         if (Teams.Count >= PlayerCount)
         {
             Phrases.Dict.TryGetValue("Event3", out string _phrase);
             ChatHook.ChatMessage(_cInfo, Config.Chat_Response_Color + _phrase + "[-]", -1, Config.Server_Response_Name, EChatType.Whisper, null);
             return;
         }
         EntityPlayer player = GameManager.Instance.World.Players.dict[_cInfo.entityId];
         if (player != null)
         {
             Vector3 _position = player.GetPosition();
             int     x         = (int)_position.x;
             int     y         = (int)_position.y;
             int     z         = (int)_position.z;
             string  sposition = x + "," + y + "," + z;
             PersistentContainer.Instance.Players[_cInfo.CrossplatformId.CombinedString].EventReturnPosition = sposition;
             PersistentContainer.DataChange = true;
             Phrases.Dict.TryGetValue("Event4", out string phrase);
             ChatHook.ChatMessage(_cInfo, Config.Chat_Response_Color + phrase + "[-]", -1, Config.Server_Response_Name, EChatType.Whisper, null);
         }
         EventCommandsConsole.Setup.TryGetValue(Operator, out List <string> setup);
         Teams.Add(_cInfo.CrossplatformId.CombinedString, TeamSetup);
         Phrases.Dict.TryGetValue("Event5", out string phrase1);
         phrase1 = phrase1.Replace("{Value}", TeamSetup.ToString());
         ChatHook.ChatMessage(_cInfo, Config.Chat_Response_Color + phrase1 + "[-]", -1, Config.Server_Response_Name, EChatType.Whisper, null);
         TeamSetup--;
         if (TeamSetup == 0)
         {
             TeamSetup = TeamCount;
         }
         if (Teams.Count == PlayerCount)
         {
             Invited = false;
             foreach (var teamPlayer in Teams)
             {
                 ClientInfo eventClientInfo = PersistentOperations.GetClientInfoFromNameOrId(teamPlayer.Key);
                 if (eventClientInfo != null)
                 {
                     EntityPlayer eventPlayer = GameManager.Instance.World.Players.dict[eventClientInfo.entityId];
                     if (eventPlayer != null && eventPlayer.IsAlive())
                     {
                         Teams.TryGetValue(teamPlayer.Key, out int _teamNumber);
                         string   spawnPosition = setup[_teamNumber + 4];
                         string[] cords         = spawnPosition.Split(',');
                         int.TryParse(cords[0], out int x);
                         int.TryParse(cords[1], out int y);
                         int.TryParse(cords[2], out int z);
                         eventClientInfo.SendPackage(NetPackageManager.GetPackage <NetPackageTeleportPlayer>().Setup(new Vector3(x, y, z), null, false));
                     }
                     else
                     {
                         PersistentContainer.Instance.Players[eventClientInfo.CrossplatformId.CombinedString].EventSpawn = true;
                         PersistentContainer.DataChange = true;
                     }
                 }
                 else
                 {
                     PersistentContainer.Instance.Players[eventClientInfo.CrossplatformId.CombinedString].EventSpawn = true;
                     PersistentContainer.DataChange = true;
                 }
             }
             int eventTime = Time * 60;
             Timers.eventTime = eventTime;
             Open             = true;
             Phrases.Dict.TryGetValue("Event6", out string _phrase);
             _phrase = _phrase.Replace("{EventName}", TeamSetup.ToString());
             ChatHook.ChatMessage(null, Config.Chat_Response_Color + _phrase + "[-]", -1, Config.Server_Response_Name, EChatType.Global, null);
         }
         else
         {
             Phrases.Dict.TryGetValue("Event7", out string _phrase);
             _phrase = _phrase.Replace("{EventName}", TeamSetup.ToString());
             _phrase = _phrase.Replace("{Command_Prefix1}", ChatHook.Chat_Command_Prefix1);
             _phrase = _phrase.Replace("{Command_join}", Command_join);
             ChatHook.ChatMessage(null, Config.Chat_Response_Color + _phrase + "[-]", -1, Config.Server_Response_Name, EChatType.Global, null);
             Phrases.Dict.TryGetValue("Event8", out _phrase);
             _phrase = _phrase.Replace("{Value}", Teams.Count.ToString());
             _phrase = _phrase.Replace("{PlayerTotal}", PlayerCount.ToString());
             ChatHook.ChatMessage(null, Config.Chat_Response_Color + _phrase + "[-]", -1, Config.Server_Response_Name, EChatType.Global, null);
         }
     }
     else
     {
         Phrases.Dict.TryGetValue("Event9", out string _phrase);
         ChatHook.ChatMessage(_cInfo, Config.Chat_Response_Color + _phrase + "[-]", -1, Config.Server_Response_Name, EChatType.Whisper, null);
     }
 }
Пример #14
0
 public ArenaLog(long userId, DateTime time, long opponentPoints, UserPrize prize, long pointsGained, TeamSetup opponentSetup, bool victory, string name, bool isOpponentInitiated, bool rated = true, InfluencerInfo influencerInfo = null)
 {
 }