Server.EventSink.InvokeCreateGuild C# (CSharp) Méthode

InvokeCreateGuild() public static méthode

public static InvokeCreateGuild ( CreateGuildEventArgs e ) : BaseGuild
e CreateGuildEventArgs
Résultat Server.Guilds.BaseGuild
		public static BaseGuild InvokeCreateGuild( CreateGuildEventArgs e )
		{
			if ( CreateGuild != null )
				return CreateGuild( e );
			else
				return null;
		}

Usage Example

Exemple #1
0
        private static GuildEntry[] LoadGuildIndex(BinaryReader idxReader)
        {
            int count = idxReader.ReadInt32(), skipped = 0;

            GuildEntry[] entries = new GuildEntry[count];

            CreateGuildEventArgs createEventArgs = new CreateGuildEventArgs(-1);

            for (int i = 0; i < count; ++i)
            {
                idxReader.ReadInt32();                //no typeid for guilds
                int  id     = idxReader.ReadInt32();
                long pos    = idxReader.ReadInt64();
                int  length = idxReader.ReadInt32();

                createEventArgs.Id = id;
                BaseGuild guild = EventSink.InvokeCreateGuild(createEventArgs);
                if (guild == null)
                {
                    ++skipped;
                    continue;
                }

                entries[i] = new GuildEntry(guild, pos, length);
            }

            if (skipped > 0)
            {
                log.WarnFormat("{0} guilds were skipped", skipped);
                m_LoadErrors += skipped;
            }

            return(entries);
        }
All Usage Examples Of Server.EventSink::InvokeCreateGuild