Example #1
0
        public static ChatMessage ParseExact(StrongString serverValueString)
        {
            ChatMessage message;

            StrongString[] myString = serverValueString.Split(CharSeparator);
            message = new ChatMessage(myString[0],                                   // 1
                                      myString[1],                                   // 2
                                      SocialPosition.GetSocialPosition(myString[2]), // 3
                                      Avatar.ConvertToAvatar(myString[3]),           // 4
                                      AvatarFrame.ParseToAvatarFrame(myString[4]),   // 5
                                      myString.Length > 5 ?
                                      ThereIsConstants.Actions.ToDateTime(myString[5]) :
                                      null);                        // 6
            return(message);
        }
Example #2
0
 private void SetParams(StrongString serverValue)
 {
     StrongString[] myStrings = serverValue.Split(CharSeparater);
     PlayerName          = myStrings[0];                                     // 1
     PlayerLevel         = myStrings[1].ToUInt16();                          // 2
     PlayerLVLRanking    = myStrings[2].ToUInt16();                          // 3
     PlayerPowerRanking  = myStrings[3].ToUInt16();                          // 4
     PlayerGuildName     = myStrings[4];                                     // 5
     GuildPosition       = (GuildPosition)myStrings[5].ToUInt16();           // 6
     LastSeen            = DateProvider.Parse(myStrings[6]);                 // 7
     PlayerPower         = Unit.ConvertToUnit(myStrings[7]);                 // 8
     PlayerIntro         = myStrings[8];                                     // 9
     PlayerAvatar        = Avatar.ConvertToAvatar(myStrings[9]);             // 10
     PlayerAvatarFrame   = AvatarFrame.ParseToAvatarFrame(myStrings[10]);    // 11
     PlayerVIPlvl        = myStrings[11].ToUInt16();                         // 12
     PlayerCurrentExp    = Unit.ConvertToUnit(myStrings[12]);                // 13
     PlayerTotalExp      = Unit.ConvertToUnit(myStrings[13]);                // 14
     PlayerCurrentVIPExp = Unit.ConvertToUnit(myStrings[14]);                // 15
     ThePlayerElement    = (PlayerElement)myStrings[15].ToUInt16();          // 16
     PlayerKingdom       = (LTW_Kingdoms)myStrings[16].ToInt32();            // 17
     SocialPosition      = SocialPosition.GetSocialPosition(myStrings[17]);  // 18
 }