public bool Instantiated(PhotonPlayer owner, GameResource type) { int num; if (this.TryGetPlayer(owner.ID, out num)) { if (this.players[num].IsThingExcessive(type)) { PhotonPlayer player = owner; if ((player != null) && PhotonNetwork.isMasterClient) { FengGameManagerMKII.instance.kickPlayerRC(player, true, "spamming instantiate (" + type.ToString() + ")."); } if ((player != null)) { if ((player != null) && !FengGameManagerMKII.instance.InternalIgnore.Contains(player)) { FengGameManagerMKII.instance.InternalIgnorePlayer(player, "Spawned repeat items of type: " + type.ToString()); } } RCextensions.RemoveAt <Player>(ref this.players, num); return(false); } } else { RCextensions.Add <Player>(ref this.players, new Player(owner.ID)); this.players[this.players.Length - 1].IsThingExcessive(type); } return(true); }
public bool Instantiated(PhotonPlayer owner, GameResource type) { int num; if (TryGetPlayer(owner.ID, out num)) { if (players[num].IsThingExcessive(type)) { var player = owner; if (player != null && PhotonNetwork.isMasterClient) { FengGameManagerMKII.FGM.kickPlayerRC(player, true, "spamming instantiate (" + type + ")."); } RCextensions.RemoveAt(ref players, num); return(false); } } else { RCextensions.Add(ref players, new Player(owner.ID)); players[players.Length - 1].IsThingExcessive(type); } return(true); }
public bool IsThingExcessive(InstantiateTracker.GameResource gr) { int thingToCheck = this.GetThingToCheck(gr); if (thingToCheck > -1) { return(this.thingsToCheck[thingToCheck].KickWorthy()); } RCextensions.Add <InstantiateTracker.ThingToCheck>(ref this.thingsToCheck, this.GameResourceToThing(gr)); return(false); }
public bool IsResourceExcessive(GameResource gr) { int thingToCheck = GetResourceData(gr); if (thingToCheck > -1) { return(Resources[thingToCheck].KickWorthy()); } RCextensions.Add(ref Resources, GameResourceToResourceData(gr)); return(false); }
public bool IsThingExcessive(GameResource gr) { int thingToCheck = GetThingToCheck(gr); if (thingToCheck > -1) { return(thingsToCheck[thingToCheck].KickWorthy()); } RCextensions.Add(ref thingsToCheck, GameResourceToThing(gr)); return(false); }
public bool PropertiesChanged(PhotonPlayer owner) { if (TryGetPlayer(owner.Id, out int result)) { if (Players[result].IsResourceExcessive(GameResource.Name)) { return(false); } } else { RCextensions.Add(ref Players, new Player(owner.Id)); Players[Players.Length - 1].IsResourceExcessive(GameResource.Name); } return(true); }
public bool PropertiesChanged(PhotonPlayer owner) { int num; if (this.TryGetPlayer(owner.ID, out num)) { if (this.players[num].IsThingExcessive(GameResource.name)) { return(false); } } else { RCextensions.Add <Player>(ref this.players, new Player(owner.ID)); this.players[this.players.Length - 1].IsThingExcessive(GameResource.name); } return(true); }
public bool Instantiated(PhotonPlayer owner, GameResource type) { if (TryGetPlayer(owner.Id, out int result)) { if (Players[result].IsResourceExcessive(type)) { if (owner != null && PhotonNetwork.isMasterClient) { FengGameManagerMKII.Instance.KickPlayer(owner, ban: true, "spamming instantiate (" + type.ToString() + ")."); } RCextensions.RemoveAt(ref Players, result); return(false); } } else { RCextensions.Add(ref Players, new Player(owner.Id)); Players[Players.Length - 1].IsResourceExcessive(type); } return(true); }