[Request] SnowBanshe spell's id !

11/16/2011 13:30 Sp!!ke#1
Hi, can I ask for a list with all SnowBanshe spells? If anyone can share with me :) will thank him so much for help..


Second Problem :

Code:
  case _String.WhisperDetails:
                                {
                                    if (stringpacket.Texts.Count > 0)
                                    {
                                        foreach (var pClient in ServerBase.Kernel.GamePool.Values)
                                        {
                                            if (pClient.Entity.Name == stringpacket.Texts[0])
                                            {
                                                string otherstring = "";
                                                otherstring += pClient.Entity.UID + " ";
                                                otherstring += pClient.Entity.Level + " ";
                                                otherstring += pClient.Entity.BattlePower + " #";
                                                if (pClient.Entity.GuildID != 0)
                                                    otherstring += pClient.Guild.Name + " fNone# ";
                                                else
                                                    otherstring += "None fNone# ";
                                                otherstring += pClient.Entity.Spouse + " ";
                                                otherstring += (byte)(pClient.Entity.NobilityRank) + " ";
                                                if (pClient.Entity.Body % 10 < 3)
                                                    otherstring += "1";
                                                else
                                                    otherstring += "0";
                                                stringpacket.Texts.Add(otherstring);
                                                client.Send(stringpacket);
                                            }

                                        }
                                  break;
                                }
                         }

that my string packet for whisper details , but I got a problem with him , if player isn't in the same map with you can't see him gear....
11/16/2011 17:50 dego4ever#2
tha'ts skills

30013
30012
30011
30010
30014
10372
10373
11/16/2011 21:20 -GeniuS-#3
Quote:
Originally Posted by dego4ever View Post
tha'ts skills

30013
30012
30011
30010
30014
10372
10373
How did you knew them, cuz I need the LavaBeast spells.
11/16/2011 21:40 Sp!!ke#4
thanks dego, now If anyone can help me with that string packet...
11/17/2011 00:13 dego4ever#5
Quote:
Originally Posted by -GeniuS- View Post
How did you knew them, cuz I need the LavaBeast spells.
i got skills name from co online website & i got id for each skill from magictype.dat by skill name. ;)
11/18/2011 07:39 BaussHacker#6
Don't use:
string += string

Use a StringBuilder.
11/18/2011 18:43 pro4never#7
Quote:
Originally Posted by BaussHacker View Post
Don't use:
string += string

Use a StringBuilder.
Or better yet...

write a tostring overload for your client class which will build the string information for you so you can just do clientObject.ToString() in your packet.

You can do a similar thing with other types of classes that when sent in packets use portions of strings. Same with classes that have their data used in packets such as the nobilityranking, arenastats, etc. You can just return the structure as a byte array (implicitoperator to convert it to a byte[] or you could be all fancy and uses memory marshaling but that's a bit more advanced)
11/18/2011 22:37 -impulse-#8
Quote:
Originally Posted by pro4never View Post
Or better yet...

write a tostring overload for your client class which will build the string information for you so you can just do clientObject.ToString() in your packet.

You can do a similar thing with other types of classes that when sent in packets use portions of strings. Same with classes that have their data used in packets such as the nobilityranking, arenastats, etc. You can just return the structure as a byte array (implicitoperator to convert it to a byte[] or you could be all fancy and uses memory marshaling but that's a bit more advanced)
Even if u do it with implicit operators and w/e other things, you will still need to concatenate some strings and doing string1 += string2; it's not as good as using a StringBuilder(as long as you don't do more concatenations than 1 it's fine...but otherwise StringBuilder is what I recommend)
11/19/2011 02:41 pro4never#9
You're right. I was more thinking simplistic ways of getting the final string but I suppose the two could be combined easily enough.

I just kinda dislike having to always figure out "ok.. how is this packet/string combined?". I like to have it all done in one place and called simply from all over the source.