Server.Misc.ShardPoller.HasAlreadyVoted C# (CSharp) Méthode

HasAlreadyVoted() public méthode

public HasAlreadyVoted ( Server.Network.NetState ns ) : bool
ns Server.Network.NetState
Résultat bool
		public bool HasAlreadyVoted( NetState ns )
		{
			for ( int i = 0; i < m_Options.Length; ++i )
			{
				if ( m_Options[i].HasAlreadyVoted( ns ) )
					return true;
			}

			return false;
		}

Usage Example

Exemple #1
0
        private static void EventSink_Login_Callback(object state)
        {
            Mobile   from = (Mobile)state;
            NetState ns   = from.NetState;

            if (ns == null)
            {
                return;
            }

            ShardPollGump spg = null;

            for (int i = 0; i < m_ActivePollers.Count; ++i)
            {
                ShardPoller poller = m_ActivePollers[i];

                if (poller.Deleted || !poller.Active)
                {
                    continue;
                }

                if (poller.TimeRemaining > TimeSpan.Zero)
                {
                    if (poller.HasAlreadyVoted(ns))
                    {
                        continue;
                    }

                    if (spg == null)
                    {
                        spg = new ShardPollGump(from, poller, false, null);
                        from.SendGump(spg);
                    }
                    else
                    {
                        spg.QueuePoll(poller);
                    }
                }
                else
                {
                    poller.Active = false;
                }
            }
        }
All Usage Examples Of Server.Misc.ShardPoller::HasAlreadyVoted