Register for your free account! | Forgot your password?

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

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

Advertisement



Nobility problem, InfamousNoone Source.

Discussion on Nobility problem, InfamousNoone Source. within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
LordGragen.'s Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 606
Received Thanks: 67
Nobility problem, InfamousNoone Source.

hey guys since my collage classes are starting i need to start getting into more coding and learning stuff so i got InfamousNoone source and it was prty dam good source,

i have been fixing few bugs today garment,guard etc but i got this 1 problem i cannot figure out,

the nobility icon, i know the nobility work i can see the prince in my acc etc but i cannot see the nobility icon at the top so i can donate more or others.

and idk if i am correct or not but i think porblem is comming from here.

Code:
 public static implicit operator byte[](NobilityRankPacket packet)
        {
            int strings_length = 0;
            string[] strings = new string[packet.Ranks.Length];
            for (int i = 0; i < packet.Ranks.Length; i++)
            {
                if (packet.Type == NobilityRankType.Icon)
                    strings[i] = packet.Ranks[i].LocalString;
                else if (packet.Type == NobilityRankType.Listings)
                    strings[i] = packet.Ranks[i].ListingString;
                strings_length += strings[i].Length;
            }
            byte[] data = new byte[33 + strings_length + 8];
            fixed (byte* pData = data)
            {
                FormatHead(pData, data.Length - 8, packet.Type);
                *((uint*)(pData + 8)) = packet.Value;
                FormatStrings(pData, 28, strings);
                PacketBuilder.AppendTQServer(pData, data.Length);
            }
            return data;
        }
here is the full code about nobility but like i said i think the problem is from top and any kind of help will be nice.

Nobility.cs
Nobility rank
Rankings
Donate
LordGragen. is offline  
Old 05/24/2013, 03:18   #2
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,223
Received Thanks: 867
Do you know what "implicit operator byte[]" does? If not that's a great place to start.
_DreadNought_ is offline  
Old 05/24/2013, 03:22   #3
 
LordGragen.'s Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 606
Received Thanks: 67
Quote:
Originally Posted by _DreadNought_ View Post
Do you know what "implicit operator byte[]" does? If not that's a great place to start.
found this but no time to read atm


got class to teach after i am back i will read it, thx
LordGragen. is offline  
Old 05/24/2013, 03:45   #4
 
Super Aids's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 946
Basically an operator overload of implicit conversions.

Which means you can convert a type implicit into another type. This is different from explicit conversion where you need to specify the type.

Ex: (implicit)
Code:
sbyte signed_byte = 0;
short signed_int16 = signed_byte;
Ex: (explicit)
Code:
short signed_int16 = 0;
sbyte signed_byte = (sbyte)signed_int16 ;
In this case it's an overload of converting NobilityRank (class) into a byte array (byte[])
So you could do:
Code:
NobilityRank rank = new NobilityRank();
// rank.x
// ...
byte[] Packet = rank; // instead of ex. rank.ToArray();
Super Aids is offline  
Old 05/24/2013, 10:31   #5
 
InfamousNoone's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,882
the packet has changed since then afaik
InfamousNoone is offline  
Old 05/24/2013, 12:43   #6
 
Super Aids's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 946
Hybrid, I send him mine and it should work, unless it has changed since 5520+
Super Aids is offline  
Old 05/24/2013, 22:09   #7
 
LordGragen.'s Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 606
Received Thanks: 67
i remember that nobility changed, but not sure from what version it was.
LordGragen. is offline  
Reply


Similar Threads Similar Threads
[Help] Impulse Source Nobility Error.
09/14/2012 - CO2 Private Server - 8 Replies
Hey guys I'm finally back and staying. I've decided to learn the ropes of coding step by step so I took out a fresh copy of the impulse source and began coding on it(just recently). I coded nobility(parts from another reference), but the MySqlReader is giving me problems while I load up the console. These are my variables at the top: private DataSet _dataset; private DataRow _datarow; private int _row; const string Table = "table";
Nobility rank 12tails source
05/15/2011 - CO2 Private Server - 0 Replies
hey i want to add this message "Congratulations! <player name> promoted to <rank name>" when people promote Knight,Baron,Earl,Duke and King , I want to appear that message,here is the code I want to add,but I don't know exactly where to add it,I know i need to add it to Nobility.cs or NobilityInfo.cs but I don't know,here is the code: Network.GamePackets.Message FiveMinutes = new Network.GamePackets.Message("Congratulations! " + client.Entity.Name + "Promoted To" + client.Entity.NobilityRank...
Nobility Hybrids Source (5018+)
09/18/2010 - CO2 PServer Guides & Releases - 8 Replies
This is the nobility for hybrids source. Use the 5018+ arco released. Is converted from the 5165source. Go to Packets.cs and put: public class Packets { public static COPacket Donators(GameClient C) {
[RELEASE] COEMU 5095 SOURCE, WITH FLOWERS, NOBILITY, MANY MORE READ!
11/11/2009 - CO2 PServer Guides & Releases - 58 Replies
#closed.... -.-
[REQUEST] Nobility For Coemu Source
08/08/2009 - CO2 Programming - 0 Replies
I need to add Nobility to my Coemu Source, if someone could please help me...



All times are GMT +2. The time now is 15:13.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

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