|
You last visited: Today at 11:43
Advertisement
[Help] ClanMember packet,
Discussion on [Help] ClanMember packet, within the CO2 Private Server forum part of the Conquer Online 2 category.
06/22/2012, 15:02
|
#1
|
elite*gold: 0
Join Date: Oct 2007
Posts: 37
Received Thanks: 6
|
[Help] ClanMember packet,
Hello,
Im doing the clan packets, got some features working, but i'm stuck now,,
So far what I got :
-Showing Clan name
-Players can join, donate etc,
Need help with:
-Memberlist, erhmm the donation is not displaying well..
Here I got the folowing:
Code:
uint membercount = (uint)client.Myclan.Members.Count;
buffer = new byte[56 + (36 * client.Myclan.Members.Count)];
Packets.WriteUInt16((ushort)(buffer.Length - 8), 0, buffer);
Packets.WriteUInt16(1312, 2, buffer);
buffer[4] = 4;
int Pos = 16;
foreach (Game.ClanMembers member in Kernel.ServerClans[client.Myclan.ClanId].Members.Values)
{
Packets.WriteUInt32(membercount, 0 + Pos, buffer);
Packets.WriteString(member.Name, 4 + Pos, buffer);
Packets.WriteUInt32(member.Level, 20 + Pos, buffer);
Packets.WriteUInt16((ushort)member.Rank, 24 + Pos, buffer);
if (Kernel.Clients.ContainsKey(member.UID))
Packets.WriteUInt16(1, 26 + Pos, buffer);
Packets.WriteUInt32(member.Class, 28 + Pos, buffer);
Packets.WriteUInt32(member.Donation, 32 + Pos, buffer);
membercount -= 1;
Pos += 36;
}
-When I look at other players, which are in the same clan their 'ClanName' will be white instead of yellow? (Like the guilds have, members of the same guild will show a yellow guild name)
At the PlayerSpawnPacket i got :
at position 155 the ClanID
at position 159 the ClanRank (leader etc,)
-ClanRanking, I know rank 100 is the ClanLeader, but what is the member? Seems I can't find it,, tried everything?
Someone who can help me out?
Would be appriciated.
|
|
|
06/22/2012, 23:31
|
#2
|
elite*gold: 0
Join Date: May 2008
Posts: 1,769
Received Thanks: 1,143
|
For the member list, if it's like the guild system which it should be, the member list is a string packet. For the clan name color, you have to send a string packet most likely, just like guilds, with the appropriate type for neutral/enemy/ally. If it's not displaying as yellow, the clan ID may be at the wrong offset or wrong itself, or they added another string type for that.
|
|
|
06/24/2012, 14:29
|
#3
|
elite*gold: 0
Join Date: Oct 2007
Posts: 37
Received Thanks: 6
|
Hmm well, still can't get the clan to work,,
I'm sending the right clan ID,
The member list is working well with one member, but if there are more members it will put the donation wrong, which I dont get..
|
|
|
06/24/2012, 19:09
|
#4
|
elite*gold: 0
Join Date: May 2008
Posts: 1,769
Received Thanks: 1,143
|
How is the donation wrong? Is it a small difference, i.e. an offset? Or is it literally wrong? Because if it's literally wrong, your offsets may be incorrect.
|
|
|
06/25/2012, 23:09
|
#5
|
elite*gold: 0
Join Date: Oct 2007
Posts: 37
Received Thanks: 6
|
Than I'll guess my offset is wrong,
Either I have not found why the clan name is not displaying yellow on clan members.
|
|
|
06/26/2012, 00:41
|
#6
|
elite*gold: 0
Join Date: May 2008
Posts: 1,769
Received Thanks: 1,143
|
Quote:
Originally Posted by vincentvdb
Than I'll guess my offset is wrong,
Either I have not found why the clan name is not displaying yellow on clan members.
|
Well, like I said before:
Quote:
Originally Posted by Zeroxelli
For the member list, if it's like the guild system which it should be, the member list is a string packet. For the clan name color, you have to send a string packet most likely, just like guilds, with the appropriate type for neutral/enemy/ally. If it's not displaying as yellow, the clan ID may be at the wrong offset or wrong itself, or they added another string type for that.
|
|
|
|
06/27/2012, 22:34
|
#7
|
elite*gold: 0
Join Date: Oct 2007
Posts: 37
Received Thanks: 6
|
I think the ClanRank is wrong, well, sending the wrong value i guess.
100 is the ClanLeader, but which one is the ClanMember?
You may know that?
|
|
|
06/28/2012, 00:08
|
#8
|
elite*gold: 0
Join Date: May 2008
Posts: 1,769
Received Thanks: 1,143
|
If it's the same as the old guild system, 100 = leader, 50 = member. Might want to try 90 and 75, too, though.
|
|
|
06/28/2012, 00:36
|
#9
|
elite*gold: 0
Join Date: Oct 2007
Posts: 37
Received Thanks: 6
|
Found out that it's 10, to be a clan member, but that does not fix the Clan color name,,
used breakpoints to check the values but from both characters they are the same, well the clanID's.
Need to check if there's another offset for the clan, but I don't think so,
Guilds is working the the ID and rank aswell,,
|
|
|
06/28/2012, 00:45
|
#10
|
elite*gold: 0
Join Date: May 2008
Posts: 1,769
Received Thanks: 1,143
|
Hmm, that is strange.. Must be a new string packet or something in the clan packet?
|
|
|
06/29/2012, 00:26
|
#11
|
elite*gold: 0
Join Date: Oct 2007
Posts: 37
Received Thanks: 6
|
Alright, I'm one step ahead. 
Fixed the packet for the Enemies and Allies. They now display as red and green name and are shown in the Enemies/Allies list
Just the Yellow clanname packet left, Got no idea, but I think its just the same as the ally/enemy packet with other values?
Correct me if im wrong
|
|
|
06/29/2012, 00:39
|
#12
|
elite*gold: 0
Join Date: May 2008
Posts: 1,769
Received Thanks: 1,143
|
Could be. Like I said, ally/enemy/neutral, so it could be just a different value for the type/subtype.
|
|
|
06/29/2012, 01:27
|
#13
|
elite*gold: 0
Join Date: Apr 2008
Posts: 1,152
Received Thanks: 321
|
Code:
public class Game_ClanMembers : IPacket
{
private Byte[] mData;
private Int32 Offset = 16;
public Game_ClanMembers(Clan clan)
{
mData = new Byte[56 + (36 * clan.Members.Count)];
PBuilder.Write((UInt16)mData.Length, 0, mData);
PBuilder.Write((UInt16)1312, 2, mData);
UInt32 Count = (UInt32)clan.Members.Count();
foreach (ClanMember member in clan.Members.ThreadSafeArray())
{
PBuilder.Write(Count, Offset, mData); Offset += 4;
PBuilder.WriteNoLength(member.Name, Offset, mData); Offset += 16;
PBuilder.Write((UInt32)member.Level, Offset, mData); Offset += 4;
PBuilder.Write(Convert.ToUInt16(member.Rank), Offset, mData); Offset += 2;
PBuilder.Write(Convert.ToUInt16(World.isOnline(member.Identifier)), Offset, mData); Offset += 2;
PBuilder.Write((UInt32)member.Class, Offset, mData); Offset += 4;
PBuilder.Write((UInt32)member.Donation, Offset, mData); Offset += 4;
Count -= 1;
}
Offset = 16;
}
public Clan.Types Type
{
get { return (Clan.Types)mData[4]; }
set { PBuilder.Write((Byte)value, 4, mData); }
}
public Byte[] Serialize { get { return this.mData; } }
public void Deserialize(Byte[] d)
{
this.mData = new Byte[d.Length];
d.CopyTo(this.mData, 0);
}
}
|
|
|
06/29/2012, 16:09
|
#14
|
elite*gold: 0
Join Date: Oct 2007
Posts: 37
Received Thanks: 6
|
@-Shunsui-, thanks for sharing  But it makes no difference at all ;( Still having the problem with the Donation not displaying well.
You may know how to show the 'Yellow' clanname from other clanmembers?
|
|
|
06/29/2012, 16:15
|
#15
|
elite*gold: 0
Join Date: May 2008
Posts: 1,769
Received Thanks: 1,143
|
As I said, it's probably a new packet or just another value and subtype for the strings packet..
|
|
|
 |
Similar Threads
|
[S] Clanmember [B] Paysafecard.
10/11/2011 - CrossFire Trading - 6 Replies
Hey Leute,
Da ich ein Clan gemacht habe und neue Member brauche . Wollte ich euch mal Fragen ob ihr bock habt zu mir zu kommen. Wenn ich nach ca 3-4 Wochen sehe ahh du spielst aktiv werde ich dir 10€ Paysafecard geben. (Unter der bedingung du bleibst auch aktiv).
Skype : s0rex111
Clanname : _Ghost.
Teamspeak daten : 178.238.228.58:1998
|
[Suchen] ClanMember
02/02/2011 - CrossFire - 2 Replies
Hallo,
Wir waren in letzter zeit unaktiv, und haben viele Members verloren nun suchen wir wieder neue Member wenn ihr lust habt macht apply.
Achtung: inaktive und Hacker werden gekickt.
Clan: Z8Games
|
Suche ClanMember!!!
01/30/2011 - CrossFire - 5 Replies
Hallo com,
ich habe in CrossFire™ einen clan aufgemacht
und suche member ,
wir haben bis jetzt 46 pionts und 6 member,
Der clan heißt : ST4R*
|
Clanmember gesucht!
11/01/2010 - League of Legends - 18 Replies
Hallo erstmal.
Ich habe diesen Sommer einen Clan aufgemacht, der hauptsächlich League of Legends spielt. Wir haben eine eigene Homepage, einen Ts3 Server und jeder hat Skype.
Wenn man beitreten will einfach mal auf der page vorbeischauen ;D
creative-aiming.tk
Vorraussetzung
|
Clanmember gesucht.
10/10/2010 - Browsergames - 3 Replies
Bei intresse melden.
|
All times are GMT +1. The time now is 11:43.
|
|