Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 20:04

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Classic[4267] GuildMemeber List!

Discussion on Classic[4267] GuildMemeber List! within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
Mr_PoP's Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 759
Received Thanks: 285
Classic[4267] GuildMemeber List!

Code:
public void GuildMemebers(IEnumerable<WorldModel.Syndicate.IGuildMember> members)
        {
            List<string> mems = new List<string>(members.Count());
            foreach (IGuildMember mem in members)
            {
                if (world.Entities.BattleEntities.OnlineHeros.TryGetValue(mem.HeroId, out hero))
                {
                    mems.Add(hero.Name + " " + hero.Level + " 1");
                }
                else if ((hero = world.Database.HeroManager.GetHeroById(mem.HeroId)) != null)
                {
                    mems.Add(hero.Name + " " + hero.Level + " 0");
                }
            }
            Send(new StringPacket(mems) { strType = StringType.GuildList });

}
Code:
//string packet..
public StringPacket(List<string> list) :
            base(PacketType.Strings, (ushort)(11 + list.Sum(x => x.Length)))
        {
            WriteUInt32(4, (uint)list.Count + 1);
            WriteStringList(9, list);
        }
when I send it the client crashes , any clue what am doing wrong here?!
Mr_PoP is offline  
Old 10/02/2013, 14:06   #2


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
Lets see this method - WriteStringList
Korvacs is offline  
Old 10/02/2013, 14:39   #3
 
Mr_PoP's Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 759
Received Thanks: 285
Quote:
Originally Posted by Korvacs View Post
Lets see this method - WriteStringList
Code:
void WriteStringList(int location, List<String> list) {
            WriteByte(location++, (Byte)list.Count);
            foreach (var str in list) {
                WriteByte(location++, (Byte)str.Length);
                WriteString(location, str, str.Length);
                location += str.Length;
            }
#fixed that thread can be closed now
Mr_PoP is offline  
Reply


Similar Threads Similar Threads
Classic [4267] client crashes after sending chat packet
09/19/2013 - CO2 Private Server - 5 Replies
#Request Close fixed
[LIST] WarRock Privat Server List! [LIST]
07/27/2013 - WarRock - 46 Replies
http://archiv.so/images/2013/03/01/bQaXx.png Hallo elitepvpers Community! Da es in letzter Zeit viele unnötige Threads, mit Fragen zu guten Privat Servern gab, möchte ich es Neulingen (Newbies) etwas erleichern! Und das ganze soll durch diese Liste an mir bekannten WarRock P-Servern geschehen. Sollten euch noch weitere Server bekannt sein, schreibt den Thread-Link & Namen als Kommentar, damit ich diesen Server eventueller Weise auch noch rein editieren kann.



All times are GMT +2. The time now is 20:04.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.