Exemple #1
0
        public override void Encode()
        {
            int TimeStamp = (int)DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1)).TotalSeconds;

            Avatar = Device.Player;
            Data.AddRange(Avatar.Component.ToBytes);


            //Profile stuff
            Data.AddVLong(Avatar.UserId);
            Data.AddVLong(Avatar.UserId);
            Data.AddVLong(Avatar.UserId);
            Data.AddString(Avatar.Name);
            Data.AddVInt(1);                              //Name Change?
            Data.AddVInt(Arenas.Get("Arena9").Index + 1); //Current arena?
            Data.AddVInt(2603);                           //Trohpy
            Data.AddVInt(300);                            //Unknown
            Data.AddVInt(9999);                           //Highest Trohpy
            Data.AddHexa("B20E000AA38909BC330022919133B82E00000008");
            Data.AddVInt(18);
            Data.AddSCID(new SCID(5, (int)Resource.Gold));
            Data.AddVInt(999999999);
            Data.AddHexa("05028B0E05030405040005058D68050CBF13050D00050E00050FAF1005109E010511B8010512A8010513A1010516811605199BEFFF8601051A0B051C00051D9788D544001E3C003B3C019DC5023C029DC5023C039DC5023C040B3C050B3C060B3C0780013C0880013C0980013C0A013C0B88283C0C88283C0D88283C0E013C0F013C10013C11A5013C12083C13083C14083C150D3C160D3C170D3C18043C19043C1A043C1B9DC5023C1C9DC5023C1D9DC502173C00013C01013C02013C03013C04013C05013C06013C07013C08013C09013C0A013C0B013C0E013C11013C12013C13013C15013C16013C17013C18013C19013C1B013C1C010905068B3E0507B20505088001050995EAE518050A9DC502050B220514080515A307051B0B3D1A00001A01001A02001A03001A04001A05001A06001A07001A08001A09001A0A001A0B001A0C001A0D001A0E001A0F001A10001A11001A12001A13001A14001A15001A16001A17001A18001A19001A1A001A1B001A1C001A1D001A1E001A1F001A20001A22001A23001A25001A27001A2A0E1B00001B01001B02001B03001B04001B05001B06001B07001B08001B09001B0A001C00001C01001C02001C03001C04001C05001C06001C07001C08001C09001C0A001C0B00010517000093019301BEBB020A94E8020932B1A93A0000000D42617262617269616E6C616E64B101029331AB10BF0194179D157EB90122000103DFD2410001000000A7A3EAAD02A5B7F3990B9AE874");
            //Data.AddHexa("00 0A 83 09 00 00 00 19 44 65 6D 6F 20 41 63 63 6F 75 6E 74 20 32 76 32 20 46 72 69 65 6E 64 6C 79 05 A8 C0 D3 94 0B A8 86 C7 A4 0B A8 C0 D3 94 0B 00 00 00 00 00 00 00 00 00 00 00 19 44 65 6D 6F 20 41 63 63 6F 75 6E 74 20 32 76 32 20 46 72 69 65 6E 64 6C 79 00 00 00 4D 7B 22 54 61 72 67 65 74 5F 41 63 63 6F 75 6E 74 54 79 70 65 22 3A 22 44 65 6D 6F 41 63 63 6F 75 6E 74 22 2C 22 48 69 64 65 54 69 6D 65 72 22 3A 74 72 75 65 2C 22 47 61 6D 65 4D 6F 64 65 22 3A 22 54 65 61 6D 56 73 54 65 61 6D 22 7D 84 09 00 00 00 1F 44 65 6D 6F 20 41 63 63 6F 75 6E 74 20 32 76 32 20 44 72 61 66 74 20 46 72 69 65 6E 64 6C 79 05 A8 C0 D3 94 0B A8 86 C7 A4 0B A8 C0 D3 94 0B 00 00 00 00 00 00 00 00 00 00 00 1F 44 65 6D 6F 20 41 63 63 6F 75 6E 74 20 32 76 32 20 44 72 61 66 74 20 46 72 69 65 6E 64 6C 79 00 00 00 5B 7B 22 47 61 6D 65 4D 6F 64 65 22 3A 22 54 65 61 6D 56 73 54 65 61 6D 44 72 61 66 74 43 68 61 6C 6C 65 6E 67 65 22 2C 22 48 69 64 65 54 69 6D 65 72 22 3A 74 72 75 65 2C 22 54 61 72 67 65 74 5F 41 63 63 6F 75 6E 74 54 79 70 65 22 3A 22 44 65 6D 6F 41 63 63 6F 75 6E 74 22 7D 85 09 00 00 00 1F 44 65 6D 6F 20 41 63 63 6F 75 6E 74 20 31 76 31 20 44 72 61 66 74 20 46 72 69 65 6E 64 6C 79 05 A8 C0 D3 94 0B A8 86 C7 A4 0B A8 C0 D3 94 0B 00 00 00 00 00 00 00 00 00 00 00 1F 44 65 6D 6F 20 41 63 63 6F 75 6E 74 20 31 76 31 20 44 72 61 66 74 20 46 72 69 65 6E 64 6C 79 00 00 00 4C 7B 22 48 69 64 65 54 69 6D 65 72 22 3A 74 72 75 65 2C 22 54 61 72 67 65 74 5F 41 63 63 6F 75 6E 74 54 79 70 65 22 3A 22 44 65 6D 6F 41 63 63 6F 75 6E 74 22 2C 22 47 61 6D 65 4D 6F 64 65 22 3A 22 44 72 61 66 74 4D 6F 64 65 22 7D 93 11 00 00 00 2D 43 72 6F 77 6E 20 43 68 61 6D 70 69 6F 6E 73 68 69 70 20 32 30 20 57 69 6E 20 51 75 61 6C 69 66 69 65 72 20 43 68 61 6C 6C 65 6E 67 65 02 B0 B5 9F 99 0B B0 93 D4 99 0B 80 E2 8A 99 0B 00 00 00 00 00 00 00 00 00 00 00 2D 43 72 6F 77 6E 20 43 68 61 6D 70 69 6F 6E 73 68 69 70 20 32 30 20 57 69 6E 20 51 75 61 6C 69 66 69 65 72 20 43 68 61 6C 6C 65 6E 67 65 00 00 06 2F 7B 22 47 61 6D 65 4D 6F 64 65 22 3A 22 43 68 61 6C 6C 65 6E 67 65 22 2C 22 54 69 74 6C 65 22 3A 22 43 72 6F 77 6E 20 43 68 61 6D 70 69 6F 6E 73 68 69 70 20 43 68 61 6C 6C 65 6E 67 65 22 2C 22 46 72 65 65 50 61 73 73 22 3A 33 2C 22 4A 6F 69 6E 43 6F 73 74 22 3A 31 30 2C 22 4A 6F 69 6E 43 6F 73 74 52 65 73 6F 75 72 63 65 22 3A 22 47 65 6D 73 22 2C 22 4D 61 78 4C 6F 73 73 65 73 22 3A 33 2C 22 52 65 77 61 72 64 73 22 3A 5B 7B 22 47 6F 6C 64 22 3A 32 30 2C 22 43 61 72 64 73 22 3A 32 7D 2C 7B 22 47 6F 6C 64 22 3A 33 30 2C 22 43 61 72 64 73 22 3A 33 7D 2C 7B 22 47 6F 6C 64 22 3A 35 30 2C 22 4D 69 6C 65 73 74 6F 6E 65 22 3A 7B 22 54 79 70 65 22 3A 22 47 6F 6C 64 22 2C 22 41 6D 6F 75 6E 74 22 3A 32 35 30 30 7D 2C 22 43 61 72 64 73 22 3A 35 7D 2C 7B 22 47 6F 6C 64 22 3A 38 30 2C 22 43 61 72 64 73 22 3A 38 7D 2C 7B 22 47 6F 6C 64 22 3A 31 32 30 2C 22 43 61 72 64 73 22 3A 31 32 7D 2C 7B 22 47 6F 6C 64 22 3A 31 37 30 2C 22 4D 69 6C 65 73 74 6F 6E 65 22 3A 7B 22 43 68 65 73 74 22 3A 22 47 69 61 6E 74 5F 3C 63 75 72 72 65 6E 74 5F 61 72 65 6E 61 3E 22 2C 22 54 79 70 65 22 3A 22 43 68 65 73 74 22 7D 2C 22 43 61 72 64 73 22 3A 31 37 7D 2C 7B 22 47 6F 6C 64 22 3A 32 33 30 2C 22 43 61 72 64 73 22 3A 32 33 7D 2C 7B 22 47 6F 6C 64 22 3A 33 30 30 2C 22 43 61 72 64 73 22 3A 33 30 7D 2C 7B 22 47 6F 6C 64 22 3A 33 38 30 2C 22 43 61 72 64 73 22 3A 33 38 7D 2C 7B 22 47 6F 6C 64 22 3A 34 37 30 2C 22 4D 69 6C 65 73 74 6F 6E 65 22 3A 7B 22 43 68 65 73 74 22 3A 22 4D 61 67 69 63 5F 3C 63 75 72 72 65 6E 74 5F 61 72 65 6E 61 3E 22 2C 22 54 79 70 65 22 3A 22 43 68 65 73 74 22 7D 2C 22 43 61 72 64 73 22 3A 34 37 7D 2C 7B 22 47 6F 6C 64 22 3A 35 37 30 2C 22 43 61 72 64 73 22 3A 35 37 7D 2C 7B 22 47 6F 6C 64 22 3A 36 38 30 2C 22 43 61 72 64 73 22 3A 36 38 7D 2C 7B 22 47 6F 6C 64 22 3A 38 30 30 2C 22 43 61 72 64 73 22 3A 38 30 7D 2C 7B 22 47 6F 6C 64 22 3A 39 33 30 2C 22 43 61 72 64 73 22 3A 39 33 7D 2C 7B 22 47 6F 6C 64 22 3A 31 30 37 30 2C 22 4D 69 6C 65 73 74 6F 6E 65 22 3A 7B 22 43 68 65 73 74 22 3A 22 4C 65 67 65 6E 64 61 72 79 22 2C 22 54 79 70 65 22 3A 22 43 68 65 73 74 22 7D 2C 22 43 61 72 64 73 22 3A 31 30 37 7D 2C 7B 22 47 6F 6C 64 22 3A 31 32 32 30 2C 22 43 61 72 64 73 22 3A 31 32 32 7D 2C 7B 22 47 6F 6C 64 22 3A 31 34 30 30 2C 22 43 61 72 64 73 22 3A 31 34 30 7D 2C 7B 22 47 6F 6C 64 22 3A 31 36 35 30 2C 22 43 61 72 64 73 22 3A 31 36 35 7D 2C 7B 22 47 6F 6C 64 22 3A 32 30 30 30 2C 22 43 61 72 64 73 22 3A 32 30 30 7D 2C 7B 22 47 6F 6C 64 22 3A 32 34 35 30 2C 22 43 61 72 64 73 22 3A 32 34 35 7D 2C 7B 22 47 6F 6C 64 22 3A 33 30 30 30 2C 22 4D 69 6C 65 73 74 6F 6E 65 22 3A 7B 22 54 79 70 65 22 3A 22 47 6F 6C 64 22 2C 22 41 6D 6F 75 6E 74 22 3A 32 35 30 30 30 30 7D 2C 22 43 61 72 64 73 22 3A 33 30 30 7D 5D 2C 22 49 63 6F 6E 45 78 70 6F 72 74 4E 61 6D 65 22 3A 22 69 63 6F 6E 5F 74 6F 75 72 6E 61 6D 65 6E 74 5F 73 70 65 63 69 61 6C 5F 67 72 61 6E 64 22 2C 22 57 69 6E 49 63 6F 6E 45 78 70 6F 72 74 4E 61 6D 65 22 3A 22 74 6F 75 72 6E 61 6D 65 6E 74 5F 6F 70 65 6E 5F 77 69 6E 73 5F 62 61 64 67 65 5F 67 6F 6C 64 22 2C 22 41 72 65 6E 61 22 3A 22 41 6C 6C 22 2C 22 4D 69 6C 65 73 74 6F 6E 65 48 69 67 68 6C 69 67 68 74 49 6E 55 49 22 3A 32 30 2C 22 44 65 73 63 72 69 70 74 69 6F 6E 22 3A 22 42 61 74 74 6C 65 20 66 6F 72 20 67 6C 6F 72 79 20 61 6E 64 20 65 61 72 6E 20 61 20 70 6C 61 63 65 20 69 6E 20 74 68 65 20 43 72 6F 77 6E 20 43 68 61 6D 70 69 6F 6E 73 68 69 70 20 61 74 20 32 30 20 77 69 6E 73 21 20 57 69 6E 6E 65 72 73 20 77 69 6C 6C 20 72 65 63 65 69 76 65 20 74 6F 75 72 6E 61 6D 65 6E 74 20 69 6E 76 69 74 61 74 69 6F 6E 73 20 74 6F 20 74 68 65 69 72 20 69 6E 62 6F 78 20 6F 6E 63 65 20 74 68 65 20 43 68 61 6C 6C 65 6E 67 65 20 68 61 73 20 65 6E 64 65 64 2E 20 43 68 65 63 6B 20 79 6F 75 72 20 69 6E 62 6F 78 20 66 6F 72 20 43 68 61 6C 6C 65 6E 67 65 20 72 75 6C 65 73 21 22 2C 22 53 75 62 74 69 74 6C 65 22 3A 22 42 65 63 6F 6D 65 20 74 68 65 20 57 6F 72 6C 64 E2 80 99 73 20 42 65 73 74 20 43 6C 61 73 68 20 52 6F 79 61 6C 65 20 50 6C 61 79 65 72 21 22 2C 22 53 74 61 72 74 4E 6F 74 69 66 69 63 61 74 69 6F 6E 22 3A 22 43 72 6F 77 6E 20 43 68 61 6D 70 69 6F 6E 73 68 69 70 20 43 68 61 6C 6C 65 6E 67 65 20 68 61 73 20 62 65 67 75 6E 21 20 57 69 6E 20 62 69 67 20 72 65 77 61 72 64 73 20 61 6E 64 20 65 61 72 6E 20 79 6F 75 72 20 73 70 6F 74 20 61 74 20 74 68 65 20 43 72 6F 77 6E 20 43 68 61 6D 70 69 6F 6E 73 68 69 70 20 74 6F 75 72 6E 61 6D 65 6E 74 21 20 50 6C 61 79 20 6E 6F 77 21 22 2C 22 45 6E 64 4E 6F 74 69 66 69 63 61 74 69 6F 6E 22 3A 22 43 72 6F 77 6E 20 43 68 61 6D 70 69 6F 6E 73 68 69 70 20 43 68 61 6C 6C 65 6E 67 65 20 65 6E 64 73 20 69 6E 20 74 77 6F 20 68 6F 75 72 73 21 20 53 74 69 6C 6C 20 74 69 6D 65 20 74 6F 20 77 69 6E 20 62 69 67 20 72 65 77 61 72 64 73 21 20 50 6C 61 79 20 6E 6F 77 21 22 7D 95 11 00 00 00 0A 32 76 32 20 42 75 74 74 6F 6E 08 B0 93 D4 99 0B B0 E1 DD B7 0B B0 A9 8A 99 0B 00 00 00 00 00 00 00 00 00 00 00 0A 32 76 32 20 42 75 74 74 6F 6E 00 00 00 28 7B 22 48 69 64 65 54 69 6D 65 72 22 3A 74 72 75 65 2C 22 48 69 64 65 50 6F 70 75 70 54 69 6D 65 72 22 3A 74 72 75 65 7D 96 11 00 00 00 18 43 72 6F 77 6E 20 43 68 61 6D 70 69 6F 6E 73 68 69 70 20 4F 66 66 65 72 01 B0 B5 9F 99 0B B0 93 D4 99 0B B0 B5 9F 99 0B 00 00 00 00 00 00 00 00 00 00 00 18 43 72 6F 77 6E 20 43 68 61 6D 70 69 6F 6E 73 68 69 70 20 4F 66 66 65 72 00 00 02 95 7B 22 54 69 74 6C 65 22 3A 22 43 72 6F 77 6E 20 43 68 61 6D 70 69 6F 6E 73 68 69 70 20 47 65 6D 73 22 2C 22 53 75 62 74 69 74 6C 65 22 3A 22 50 72 6F 62 61 62 6C 79 20 74 68 65 20 62 69 67 67 65 73 74 20 65 73 70 6F 72 74 73 20 71 75 61 6C 69 66 69 65 72 20 69 6E 20 74 68 65 20 68 69 73 74 6F 72 79 20 6F 66 20 65 76 65 72 21 22 2C 22 53 68 6F 70 4F 66 66 65 72 73 22 3A 5B 7B 22 50 75 72 63 68 61 73 65 64 49 6D 61 67 65 22 3A 7B 22 50 61 74 68 22 3A 22 2F 36 39 35 32 65 37 64 39 36 65 38 66 64 34 35 34 32 36 38 64 65 63 66 34 64 62 64 38 36 65 34 63 5F 43 72 6F 77 6E 43 68 61 6D 70 69 6F 6E 73 68 69 70 73 52 65 76 65 61 6C 49 6D 61 67 65 2E 70 6E 67 22 2C 22 43 68 65 63 6B 73 75 6D 22 3A 22 36 39 35 32 65 37 64 39 36 65 38 66 64 34 35 34 32 36 38 64 65 63 66 34 64 62 64 38 36 65 34 63 22 2C 22 46 69 6C 65 22 3A 22 43 72 6F 77 6E 43 68 61 6D 70 69 6F 6E 73 68 69 70 73 52 65 76 65 61 6C 49 6D 61 67 65 2E 70 6E 67 22 7D 2C 22 4E 75 6D 54 69 6D 65 73 50 75 72 63 68 61 73 61 62 6C 65 22 3A 35 2C 22 52 65 77 61 72 64 73 22 3A 5B 7B 22 54 79 70 65 22 3A 22 47 65 6D 73 22 2C 22 41 6D 6F 75 6E 74 22 3A 32 30 30 7D 5D 2C 22 4D 75 6C 74 69 70 6C 69 65 72 22 3A 32 2C 22 54 69 74 6C 65 22 3A 5B 5D 2C 22 49 6D 61 67 65 22 3A 7B 22 50 61 74 68 22 3A 22 2F 37 63 63 61 30 36 36 34 37 38 64 62 30 36 38 36 36 39 39 65 30 31 37 36 39 33 35 37 37 35 63 32 5F 63 72 6F 77 6E 5F 63 68 61 6D 70 2E 70 6E 67 22 2C 22 43 68 65 63 6B 73 75 6D 22 3A 22 37 63 63 61 30 36 36 34 37 38 64 62 30 36 38 36 36 39 39 65 30 31 37 36 39 33 35 37 37 35 63 32 22 2C 22 46 69 6C 65 22 3A 22 63 72 6F 77 6E 5F 63 68 61 6D 70 2E 70 6E 67 22 7D 2C 22 43 6F 73 74 54 79 70 65 22 3A 22 49 41 50 22 2C 22 43 6F 73 74 49 41 50 22 3A 22 63 6F 6D 2E 73 75 70 65 72 63 65 6C 6C 2E 73 63 72 6F 6C 6C 2E 73 70 65 63 69 61 6C 6F 66 66 65 72 74 69 65 72 31 22 2C 22 54 65 6D 70 6C 61 74 65 22 3A 22 73 68 6F 70 5F 69 74 65 6D 31 5F 6E 6F 5F 74 65 78 74 22 7D 5D 2C 22 49 73 53 70 65 63 69 61 6C 22 3A 74 72 75 65 7D 97 11 00 00 00 13 32 76 32 20 46 72 69 65 6E 64 6C 79 20 42 61 74 74 6C 65 05 B0 93 D4 99 0B B0 E1 DD B7 0B B0 93 D4 99 0B 00 00 00 00 00 00 00 00 00 00 00 13 32 76 32 20 46 72 69 65 6E 64 6C 79 20 42 61 74 74 6C 65 00 00 00 2A 7B 22 47 61 6D 65 4D 6F 64 65 22 3A 22 54 65 61 6D 56 73 54 65 61 6D 22 2C 22 48 69 64 65 54 69 6D 65 72 22 3A 74 72 75 65 7D 98 11 00 00 00 0F 32 76 32 20 46 52 45 45 20 43 48 45 53 54 53 01 B0 93 D4 99 0B B0 AB FE 99 0B B0 93 D4 99 0B 00 00 00 00 00 00 00 00 00 00 00 0F 32 76 32 20 46 52 45 45 20 43 48 45 53 54 53 00 00 04 25 7B 22 54 69 74 6C 65 22 3A 22 32 76 32 20 69 73 20 42 61 63 6B 22 2C 22 53 75 62 74 69 74 6C 65 22 3A 22 47 65 74 20 79 6F 75 72 20 64 72 65 61 6D 20 74 65 61 6D 20 62 61 63 6B 20 74 6F 67 65 74 68 65 72 20 61 67 61 69 6E 21 22 2C 22 53 68 6F 70 4F 66 66 65 72 73 22 3A 5B 7B 22 50 75 72 63 68 61 73 65 64 49 6D 61 67 65 22 3A 7B 22 50 61 74 68 22 3A 22 2F 65 32 31 33 36 38 30 33 63 66 31 65 34 62 32 36 35 35 62 34 35 36 65 35 33 30 38 64 32 65 66 66 5F 32 76 32 5F 66 72 65 65 5F 63 68 65 73 74 5F 30 31 5F 72 65 76 65 61 6C 2E 70 6E 67 22 2C 22 43 68 65 63 6B 73 75 6D 22 3A 22 65 32 31 33 36 38 30 33 63 66 31 65 34 62 32 36 35 35 62 34 35 36 65 35 33 30 38 64 32 65 66 66 22 2C 22 46 69 6C 65 22 3A 22 32 76 32 5F 66 72 65 65 5F 63 68 65 73 74 5F 30 31 5F 72 65 76 65 61 6C 2E 70 6E 67 22 7D 2C 22 4E 75 6D 54 69 6D 65 73 50 75 72 63 68 61 73 61 62 6C 65 22 3A 31 2C 22 52 65 77 61 72 64 73 22 3A 5B 7B 22 43 68 65 73 74 22 3A 22 4D 61 67 69 63 5F 3C 63 75 72 72 65 6E 74 5F 61 72 65 6E 61 3E 22 2C 22 54 79 70 65 22 3A 22 43 68 65 73 74 22 7D 5D 2C 22 49 6D 61 67 65 22 3A 7B 22 50 61 74 68 22 3A 22 2F 66 32 63 65 31 61 61 66 65 64 32 35 30 34 38 64 64 37 63 33 35 66 61 63 38 30 34 32 66 62 34 63 5F 32 76 32 5F 66 72 65 65 5F 63 68 65 73 74 5F 30 31 2E 70 6E 67 22 2C 22 43 68 65 63 6B 73 75 6D 22 3A 22 66 32 63 65 31 61 61 66 65 64 32 35 30 34 38 64 64 37 63 33 35 66 61 63 38 30 34 32 66 62 34 63 22 2C 22 46 69 6C 65 22 3A 22 32 76 32 5F 66 72 65 65 5F 63 68 65 73 74 5F 30 31 2E 70 6E 67 22 7D 2C 22 43 6F 73 74 54 79 70 65 22 3A 22 46 72 65 65 22 2C 22 54 65 6D 70 6C 61 74 65 22 3A 22 73 68 6F 70 5F 69 74 65 6D 32 5F 74 65 78 74 5F 63 68 65 73 74 22 7D 2C 7B 22 50 75 72 63 68 61 73 65 64 49 6D 61 67 65 22 3A 7B 22 50 61 74 68 22 3A 22 2F 30 38 39 33 39 33 33 66 33 66 61 63 64 33 64 36 65 32 32 37 38 63 61 39 66 39 32 61 61 63 39 37 5F 32 76 32 5F 66 72 65 65 5F 63 68 65 73 74 5F 30 32 5F 72 65 76 65 61 6C 2E 70 6E 67 22 2C 22 43 68 65 63 6B 73 75 6D 22 3A 22 30 38 39 33 39 33 33 66 33 66 61 63 64 33 64 36 65 32 32 37 38 63 61 39 66 39 32 61 61 63 39 37 22 2C 22 46 69 6C 65 22 3A 22 32 76 32 5F 66 72 65 65 5F 63 68 65 73 74 5F 30 32 5F 72 65 76 65 61 6C 2E 70 6E 67 22 7D 2C 22 4E 75 6D 54 69 6D 65 73 50 75 72 63 68 61 73 61 62 6C 65 22 3A 31 2C 22 52 65 77 61 72 64 73 22 3A 5B 7B 22 43 68 65 73 74 22 3A 22 4D 61 67 69 63 5F 3C 63 75 72 72 65 6E 74 5F 61 72 65 6E 61 3E 22 2C 22 54 79 70 65 22 3A 22 43 68 65 73 74 22 7D 5D 2C 22 49 6D 61 67 65 22 3A 7B 22 50 61 74 68 22 3A 22 2F 35 63 63 31 61 37 34 33 39 33 30 31 61 65 61 62 30 30 36 34 30 33 61 35 39 33 35 66 65 64 62 33 5F 32 76 32 5F 66 72 65 65 5F 63 68 65 73 74 5F 30 32 2E 70 6E 67 22 2C 22 43 68 65 63 6B 73 75 6D 22 3A 22 35 63 63 31 61 37 34 33 39 33 30 31 61 65 61 62 30 30 36 34 30 33 61 35 39 33 35 66 65 64 62 33 22 2C 22 46 69 6C 65 22 3A 22 32 76 32 5F 66 72 65 65 5F 63 68 65 73 74 5F 30 32 2E 70 6E 67 22 7D 2C 22 43 6F 73 74 54 79 70 65 22 3A 22 46 72 65 65 22 2C 22 54 65 6D 70 6C 61 74 65 22 3A 22 73 68 6F 70 5F 69 74 65 6D 32 5F 74 65 78 74 5F 63 68 65 73 74 22 7D 5D 2C 22 49 73 53 70 65 63 69 61 6C 22 3A 74 72 75 65 2C 22 48 69 64 65 54 69 6D 65 72 22 3A 66 61 6C 73 65 7D 99 11 00 00 00 19 49 63 65 20 53 70 69 72 69 74 20 43 61 72 64 20 43 68 61 6C 6C 65 6E 67 65 02 B0 9F E9 99 0B B0 E5 F3 99 0B B0 9F E9 99 0B 00 00 00 00 00 00 00 00 00 00 00 19 49 63 65 20 53 70 69 72 69 74 20 43 61 72 64 20 43 68 61 6C 6C 65 6E 67 65 00 00 03 91 7B 22 47 61 6D 65 4D 6F 64 65 22 3A 22 43 61 72 64 52 65 6C 65 61 73 65 22 2C 22 54 69 74 6C 65 22 3A 22 49 63 65 20 53 70 69 72 69 74 20 43 68 61 6C 6C 65 6E 67 65 22 2C 22 4A 6F 69 6E 43 6F 73 74 22 3A 31 30 2C 22 4A 6F 69 6E 43 6F 73 74 52 65 73 6F 75 72 63 65 22 3A 22 47 65 6D 73 22 2C 22 4D 61 78 4C 6F 73 73 65 73 22 3A 33 2C 22 52 65 77 61 72 64 73 22 3A 5B 7B 22 47 6F 6C 64 22 3A 31 33 30 2C 22 43 61 72 64 73 22 3A 32 7D 2C 7B 22 47 6F 6C 64 22 3A 31 38 30 2C 22 43 61 72 64 73 22 3A 33 7D 2C 7B 22 47 6F 6C 64 22 3A 32 34 30 2C 22 4D 69 6C 65 73 74 6F 6E 65 22 3A 7B 22 54 79 70 65 22 3A 22 53 70 65 6C 6C 22 2C 22 41 6D 6F 75 6E 74 22 3A 35 30 2C 22 53 70 65 6C 6C 22 3A 22 49 63 65 53 70 69 72 69 74 73 22 7D 2C 22 43 61 72 64 73 22 3A 35 7D 2C 7B 22 47 6F 6C 64 22 3A 33 31 30 2C 22 43 61 72 64 73 22 3A 38 7D 2C 7B 22 47 6F 6C 64 22 3A 33 39 30 2C 22 4D 69 6C 65 73 74 6F 6E 65 22 3A 7B 22 54 79 70 65 22 3A 22 53 70 65 6C 6C 22 2C 22 41 6D 6F 75 6E 74 22 3A 31 30 30 2C 22 53 70 65 6C 6C 22 3A 22 49 63 65 53 70 69 72 69 74 73 22 7D 2C 22 43 61 72 64 73 22 3A 31 32 7D 2C 7B 22 47 6F 6C 64 22 3A 34 38 30 2C 22 43 61 72 64 73 22 3A 31 37 7D 2C 7B 22 47 6F 6C 64 22 3A 36 30 30 2C 22 4D 69 6C 65 73 74 6F 6E 65 22 3A 7B 22 54 79 70 65 22 3A 22 53 70 65 6C 6C 22 2C 22 41 6D 6F 75 6E 74 22 3A 31 35 30 2C 22 53 70 65 6C 6C 22 3A 22 49 63 65 53 70 69 72 69 74 73 22 7D 2C 22 43 61 72 64 73 22 3A 32 33 7D 5D 2C 22 49 63 6F 6E 45 78 70 6F 72 74 4E 61 6D 65 22 3A 22 69 63 6F 6E 5F 74 6F 75 72 6E 61 6D 65 6E 74 5F 63 61 72 64 5F 72 65 6C 65 61 73 65 22 2C 22 57 69 6E 49 63 6F 6E 45 78 70 6F 72 74 4E 61 6D 65 22 3A 22 74 6F 75 72 6E 61 6D 65 6E 74 5F 6F 70 65 6E 5F 77 69 6E 73 5F 62 61 64 67 65 5F 62 72 6F 6E 7A 65 22 2C 22 41 72 65 6E 61 22 3A 22 41 6C 6C 22 2C 22 4D 69 6C 65 73 74 6F 6E 65 48 69 67 68 6C 69 67 68 74 49 6E 55 49 22 3A 36 2C 22 53 75 62 74 69 74 6C 65 22 3A 22 57 69 6E 20 49 63 65 20 53 70 69 72 69 74 73 21 22 2C 22 44 65 73 63 72 69 70 74 69 6F 6E 22 3A 22 57 69 6E 20 49 63 65 20 53 70 69 72 69 74 73 20 74 68 72 6F 75 67 68 20 6F 6E 65 20 74 69 6D 65 20 72 65 77 61 72 64 73 20 61 6E 64 20 63 6F 6D 70 6C 65 74 65 20 74 68 69 73 20 43 61 72 64 20 43 68 61 6C 6C 65 6E 67 65 20 61 74 20 36 20 77 69 6E 73 21 22 2C 22 53 74 61 72 74 4E 6F 74 69 66 69 63 61 74 69 6F 6E 22 3A 22 50 6C 61 79 20 32 34 68 20 43 61 72 64 20 43 68 61 6C 6C 65 6E 67 65 20 61 6E 64 20 77 69 6E 20 63 61 72 64 73 21 22 2C 22 45 6E 64 4E 6F 74 69 66 69 63 61 74 69 6F 6E 22 3A 22 54 77 6F 20 68 6F 75 72 73 20 6C 65 66 74 20 74 6F 20 70 6C 61 79 20 74 68 65 20 43 61 72 64 20 43 68 61 6C 6C 65 6E 67 65 21 22 2C 22 43 61 72 64 54 68 65 6D 65 22 3A 22 49 63 65 53 70 69 72 69 74 73 22 2C 22 46 72 65 65 50 61 73 73 22 3A 30 7D 9A 11 00 00 00 15 4D 65 67 61 20 4B 6E 69 67 68 74 20 43 68 61 6C 6C 65 6E 67 65 02 B0 AB FE 99 0B B0 FD 9D 9A 0B B0 9F E9 99 0B 00 00 00 00 00 00 00 00 00 00 00 15 4D 65 67 61 20 4B 6E 69 67 68 74 20 43 68 61 6C 6C 65 6E 67 65 00 00 04 F8 7B 22 47 61 6D 65 4D 6F 64 65 22 3A 22 43 61 72 64 52 65 6C 65 61 73 65 22 2C 22 54 69 74 6C 65 22 3A 22 4D 65 67 61 20 4B 6E 69 67 68 74 20 43 68 61 6C 6C 65 6E 67 65 22 2C 22 46 72 65 65 50 61 73 73 22 3A 31 2C 22 4A 6F 69 6E 43 6F 73 74 22 3A 31 30 30 2C 22 4A 6F 69 6E 43 6F 73 74 52 65 73 6F 75 72 63 65 22 3A 22 47 65 6D 73 22 2C 22 4D 61 78 4C 6F 73 73 65 73 22 3A 33 2C 22 52 65 77 61 72 64 73 22 3A 5B 7B 22 47 6F 6C 64 22 3A 37 30 30 2C 22 43 61 72 64 73 22 3A 31 30 7D 2C 7B 22 47 6F 6C 64 22 3A 39 35 30 2C 22 43 61 72 64 73 22 3A 31 35 7D 2C 7B 22 47 6F 6C 64 22 3A 31 32 35 30 2C 22 4D 69 6C 65 73 74 6F 6E 65 22 3A 7B 22 54 79 70 65 22 3A 22 47 6F 6C 64 22 2C 22 41 6D 6F 75 6E 74 22 3A 31 35 30 30 7D 2C 22 43 61 72 64 73 22 3A 32 35 7D 2C 7B 22 47 6F 6C 64 22 3A 31 36 30 30 2C 22 43 61 72 64 73 22 3A 34 33 7D 2C 7B 22 47 6F 6C 64 22 3A 32 30 30 30 2C 22 43 61 72 64 73 22 3A 36 35 7D 2C 7B 22 47 6F 6C 64 22 3A 32 35 30 30 2C 22 4D 69 6C 65 73 74 6F 6E 65 22 3A 7B 22 54 79 70 65 22 3A 22 47 65 6D 73 22 2C 22 41 6D 6F 75 6E 74 22 3A 31 30 30 7D 2C 22 43 61 72 64 73 22 3A 39 33 7D 2C 7B 22 47 6F 6C 64 22 3A 33 31 30 30 2C 22 43 61 72 64 73 22 3A 31 32 35 7D 2C 7B 22 47 6F 6C 64 22 3A 33 38 30 30 2C 22 43 61 72 64 73 22 3A 31 36 35 7D 2C 7B 22 47 6F 6C 64 22 3A 34 36 35 30 2C 22 4D 69 6C 65 73 74 6F 6E 65 22 3A 7B 22 43 68 65 73 74 22 3A 22 47 69 61 6E 74 5F 3C 63 75 72 72 65 6E 74 5F 61 72 65 6E 61 3E 22 2C 22 54 79 70 65 22 3A 22 43 68 65 73 74 22 7D 2C 22 43 61 72 64 73 22 3A 32 31 30 7D 2C 7B 22 47 6F 6C 64 22 3A 35 37 35 30 2C 22 43 61 72 64 73 22 3A 32 36 35 7D 2C 7B 22 47 6F 6C 64 22 3A 37 31 30 30 2C 22 4D 69 6C 65 73 74 6F 6E 65 22 3A 7B 22 54 79 70 65 22 3A 22 47 6F 6C 64 22 2C 22 41 6D 6F 75 6E 74 22 3A 31 35 30 30 30 7D 2C 22 43 61 72 64 73 22 3A 33 33 35 7D 2C 7B 22 47 6F 6C 64 22 3A 38 37 35 30 2C 22 43 61 72 64 73 22 3A 34 33 30 7D 2C 7B 22 47 6F 6C 64 22 3A 31 31 30 30 30 2C 22 4D 69 6C 65 73 74 6F 6E 65 22 3A 7B 22 54 79 70 65 22 3A 22 53 70 65 6C 6C 22 2C 22 41 6D 6F 75 6E 74 22 3A 31 2C 22 53 70 65 6C 6C 22 3A 22 4D 65 67 61 4B 6E 69 67 68 74 22 7D 2C 22 43 61 72 64 73 22 3A 35 35 30 7D 5D 2C 22 49 63 6F 6E 45 78 70 6F 72 74 4E 61 6D 65 22 3A 22 69 63 6F 6E 5F 74 6F 75 72 6E 61 6D 65 6E 74 5F 63 61 72 64 5F 72 65 6C 65 61 73 65 5F 67 72 61 6E 64 22 2C 22 43 61 72 64 54 68 65 6D 65 22 3A 22 4D 65 67 61 4B 6E 69 67 68 74 22 2C 22 57 69 6E 49 63 6F 6E 45 78 70 6F 72 74 4E 61 6D 65 22 3A 22 74 6F 75 72 6E 61 6D 65 6E 74 5F 6F 70 65 6E 5F 77 69 6E 73 5F 62 61 64 67 65 5F 6C 65 67 65 6E 64 61 72 79 22 2C 22 41 72 65 6E 61 22 3A 22 41 6C 6C 22 2C 22 53 75 62 74 69 74 6C 65 22 3A 22 55 6E 6C 6F 63 6B 20 61 20 4E 65 77 20 4C 65 67 65 6E 64 61 72 79 20 43 61 72 64 21 22 2C 22 44 65 73 63 72 69 70 74 69 6F 6E 22 3A 22 43 72 65 61 74 65 20 79 6F 75 72 20 64 65 63 6B 20 61 72 6F 75 6E 64 20 74 68 65 20 6E 65 77 20 4C 65 67 65 6E 64 61 72 79 20 63 61 72 64 20 4D 65 67 61 20 4B 6E 69 67 68 74 21 20 43 6F 6C 6C 65 63 74 20 6F 6E 65 20 74 69 6D 65 20 72 65 77 61 72 64 73 20 61 73 20 79 6F 75 20 70 72 6F 67 72 65 73 73 20 61 6E 64 20 75 6E 6C 6F 63 6B 20 74 68 69 73 20 6E 65 77 20 63 61 72 64 20 65 61 72 6C 79 21 22 2C 22 4D 69 6C 65 73 74 6F 6E 65 48 69 67 68 6C 69 67 68 74 49 6E 55 49 22 3A 31 32 2C 22 45 6E 64 4E 6F 74 69 66 69 63 61 74 69 6F 6E 22 3A 22 4D 65 67 61 20 4B 6E 69 67 68 74 20 43 68 61 6C 6C 65 6E 67 65 20 65 6E 64 73 20 69 6E 20 74 77 6F 20 68 6F 75 72 73 21 20 4C 61 73 74 20 63 68 61 6E 63 65 20 74 6F 20 75 6E 6C 6F 63 6B 20 74 68 69 73 20 6E 65 77 20 63 61 72 64 20 65 61 72 6C 79 21 22 2C 22 53 74 61 72 74 4E 6F 74 69 66 69 63 61 74 69 6F 6E 22 3A 22 4D 65 67 61 20 4B 6E 69 67 68 74 20 43 68 61 6C 6C 65 6E 67 65 20 68 61 73 20 62 65 67 75 6E 21 20 55 6E 6C 6F 63 6B 20 61 20 6E 65 77 20 63 61 72 64 20 65 61 72 6C 79 21 22 7D 00 00 00 00 04 00 80 B6 92 85 0B 00 00 00 0A 83 09 00 84 09 00 85 09 00 93 11 01 95 11 01 96 11 01 97 11 01 98 11 01 99 11 01 9A 11 01 07 93 11 03 95 11 02 96 11 03 97 11 02 98 11 02 99 11 02 9A 11 01 02 00 00 00 64 7B 22 49 44 22 3A 22 43 41 52 44 5F 52 45 4C 45 41 53 45 22 2C 22 50 61 72 61 6D 73 22 3A 7B 22 42 61 74 73 22 3A 22 32 30 31 37 30 37 30 37 22 2C 22 4D 6F 76 69 6E 67 43 61 6E 6E 6F 6E 22 3A 22 32 30 31 37 30 38 30 35 22 2C 22 4D 65 67 61 4B 6E 69 67 68 74 22 3A 22 32 30 31 37 30 39 30 38 22 7D 7D 04 00 00 00 92 7B 22 49 44 22 3A 22 43 4C 41 4E 5F 43 48 45 53 54 22 2C 22 50 61 72 61 6D 73 22 3A 7B 22 53 74 61 72 74 54 69 6D 65 22 3A 22 32 30 31 37 30 33 31 37 54 30 37 30 30 30 30 2E 30 30 30 5A 22 2C 22 41 63 74 69 76 65 44 75 72 61 74 69 6F 6E 22 3A 22 50 33 64 54 30 68 22 2C 22 49 6E 61 63 74 69 76 65 44 75 72 61 74 69 6F 6E 22 3A 22 50 34 64 54 30 68 22 2C 22 43 68 65 73 74 54 79 70 65 22 3A 5B 22 43 6C 61 6E 43 72 6F 77 6E 73 22 5D 7D 7D 04 01 13 BC 02 00 BB 4B 01 00 00 00 08 13 BB 02 00 BD 4B 01 01 00 00 08 13 BC 02 00 81 4C 01 02 00 00 08 13 BB 02 00 83 4C 01 03 00 00 00 00 00 7F 00 00 7F 01 13 BF 02 01 BF 4B 00 7F 00 00 00 00 00 00 00 00 00 00 0A 00 00 00 00 00 7F A4 9C 3D B0 CB 51 9A BF F6 99 0B 01 13 89 01 01 85 4C 00 7F 00 00 00 00 00 7F 03 00 00 00 00 00 00 00 02 0A 36 09 F9 90 E0 CA 03 05 05 88 8D 5F 88 8D 5F 8F 98 F8 99 0B 03 01 82 01 02 00 00 00 00 00 00 1A 02 00 01 82 01 02 00 00 00 00 00 00 1C 03 01 01 82 01 02 00 00 00 00 00 00 1C 02 02 00 00 00 7F 00 00 7F 00 00 7F 12 13 93 31 AB 10 BF 01 02 A6 22 07 00 01 1A 00 01 0A 00 88 28 00 00 FA 07 16 05 95 DA 92 17 A2 03 01 07 00 3E 06 AB D4 92 17 8C 01 04 02 00 04 06 00 0E 04 04 00 17 09 AB D4 92 17 9E 0A 90 02 05 00 0E 07 00 86 20 00 04 00 09 09 9C F9 91 17 0B 00 03 00 1B 01 AE D6 9E 17 03 00 05 00 89 01 07 00 02 01 05 00 02 1A 31 1A 36 05 1A 2E 1C 10 1A 30 1A 31 1A 36 00 01 03 DF D2 41 00 01 00 01 8E D2 F8 3E 03 8F D2 F8 3E 8E D2 F8 3E B1 D2 F8 3E 00 01 91 D2 F8 3E 01 90 81 A1 FE 0B 00 0D 01 01 8A E6 BF 33 02 01 B2 D4 1C 01 59 8D 59 19 59 91 4D 99 85 D3 AC 03 00 00 00 00 00 00 00 00 00 00 00 00 B9 01 0B 83 C9 04 0B 83 C9 04 0B 83 C9 04 00 00 00 0C 44 72 61 67 6F 6E 48 75 6E 74 65 72 01 0A A9 24 AC 04 98 31 B2 0E 00 0A A3 89 09 BC 33 00 22 91 91 33 B8 2E 00 00 00 08 12 05 01 8D 68 05 02 8B 0E 05 03 04 05 04 00 05 05 8D 68 05 0C BF 13 05 0D 00 05 0E 00 05 0F AF 10 05 10 9E 01 05 11 B8 01 05 12 A8 01 05 13 A1 01 05 16 81 16 05 19 9B EF FF 86 01 05 1A 0B 05 1C 00 05 1D 97 88 D5 44 00 1E 3C 00 3B 3C 01 9D C5 02 3C 02 9D C5 02 3C 03 9D C5 02 3C 04 0B 3C 05 0B 3C 06 0B 3C 07 80 01 3C 08 80 01 3C 09 80 01 3C 0A 01 3C 0B 88 28 3C 0C 88 28 3C 0D 88 28 3C 0E 01 3C 0F 01 3C 10 01 3C 11 A5 01 3C 12 08 3C 13 08 3C 14 08 3C 15 0D 3C 16 0D 3C 17 0D 3C 18 04 3C 19 04 3C 1A 04 3C 1B 9D C5 02 3C 1C 9D C5 02 3C 1D 9D C5 02 17 3C 00 01 3C 01 01 3C 02 01 3C 03 01 3C 04 01 3C 05 01 3C 06 01 3C 07 01 3C 08 01 3C 09 01 3C 0A 01 3C 0B 01 3C 0E 01 3C 11 01 3C 12 01 3C 13 01 3C 15 01 3C 16 01 3C 17 01 3C 18 01 3C 19 01 3C 1B 01 3C 1C 01 09 05 06 8B 3E 05 07 B2 05 05 08 80 01 05 09 95 EA E5 18 05 0A 9D C5 02 05 0B 22 05 14 08 05 15 A3 07 05 1B 0B 3D 1A 00 00 1A 01 00 1A 02 00 1A 03 00 1A 04 00 1A 05 00 1A 06 00 1A 07 00 1A 08 00 1A 09 00 1A 0A 00 1A 0B 00 1A 0C 00 1A 0D 00 1A 0E 00 1A 0F 00 1A 10 00 1A 11 00 1A 12 00 1A 13 00 1A 14 00 1A 15 00 1A 16 00 1A 17 00 1A 18 00 1A 19 00 1A 1A 00 1A 1B 00 1A 1C 00 1A 1D 00 1A 1E 00 1A 1F 00 1A 20 00 1A 22 00 1A 23 00 1A 25 00 1A 27 00 1A 2A 0E 1B 00 00 1B 01 00 1B 02 00 1B 03 00 1B 04 00 1B 05 00 1B 06 00 1B 07 00 1B 08 00 1B 09 00 1B 0A 00 1C 00 00 1C 01 00 1C 02 00 1C 03 00 1C 04 00 1C 05 00 1C 06 00 1C 07 00 1C 08 00 1C 09 00 1C 0A 00 1C 0B 00 01 05 17 00 00 93 01 93 01 BE BB 02 0A 94 E8 02 09 32 B1 A9 3A 00 00 00 0D 42 61 72 62 61 72 69 61 6E 6C 61 6E 64 B1 01 02 93 31 AB 10 BF 01 94 17 9D 15 7E B9 01 22 00 01 03 DF D2 41 00 01 00 00 00 A7 A3 EA AD 02 A5 B7 F3 99 0B 9A E8 74");
        }
Exemple #2
0
        internal static void LoadCards(int type, ref int indexCounter)
        {
            var cardIndex = 0;
            var csv       = CSV.Tables.Get(type);

            foreach (var data in csv.Datas)
            {
                var card = new Card
                {
                    Type  = type,
                    Index = indexCounter,
                    Scid  = new SCID(type, cardIndex++)
                };

                if (type == TYPE_BUILDING)
                {
                    var info = (Spells_Buildings)csv.GetData(data.Row.Name);
                    card.Name        = info.Name;
                    card.Rarity      = Rarities.Get(info.Rarity);
                    card.ElixirCost  = info.ManaCost;
                    card.UnlockArena = Arenas.Get(info.UnlockArena);
                    card.NotInUse    = info.NotInUse;
                }
                else if (type == TYPE_CHARACTER)
                {
                    var info = (Spells_Characters)csv.GetData(data.Row.Name);
                    card.Name        = info.Name;
                    card.Rarity      = Rarities.Get(info.Rarity);
                    card.ElixirCost  = info.ManaCost;
                    card.UnlockArena = Arenas.Get(info.UnlockArena);
                    card.NotInUse    = info.NotInUse;
                }
                else if (type == TYPE_SPELL)
                {
                    var info = (Spells_Other)csv.GetData(data.Row.Name);
                    card.Name        = info.Name;
                    card.Rarity      = Rarities.Get(info.Rarity);
                    card.ElixirCost  = info.ManaCost;
                    card.UnlockArena = Arenas.Get(info.UnlockArena);
                    card.NotInUse    = info.NotInUse;
                }


                Card_List.Add(card);
                ++indexCounter;
            }
        }
Exemple #3
0
        //Not working yet
        public OpeningChest GenerateChest(Avatar player, Chest chest, Random random)
        {
            var isDraft = chest.DraftChest;
            var builder = OpeningChest.Builder(isDraft);

            var common    = Rarities.Get("Common");
            var rare      = Rarities.Get("Rare");
            var epic      = Rarities.Get("Epic");
            var legendary = Rarities.Get("Legendary");

            float rewardMultiplier       = chest.Arena.ChestRewardMultiplier / 100f;
            int   minimumSpellsCount     = (int)(chest.RandomSpells * rewardMultiplier);
            int   minimumDifferentSpells = (int)(chest.DifferentSpells * rewardMultiplier);

            Console.WriteLine($"minimumSpellsCount {minimumSpellsCount}");
            Console.WriteLine($"minimumDifferentSpells {minimumDifferentSpells}");

            Console.WriteLine($"chest.RareChance {chest.RareChance}");
            Console.WriteLine($"chest.EpicChance {chest.EpicChance}");

            Console.WriteLine($"chest.LegendaryChance {chest.LegendaryChance}");

            float minimumRare      = (float)minimumSpellsCount / (float)chest.RareChance;
            float minimumEpic      = (float)minimumSpellsCount / (float)chest.EpicChance;
            float minimumLegendary = (float)minimumSpellsCount / (float)chest.LegendaryChance;

            Console.WriteLine($"minimumRare {minimumRare}");
            Console.WriteLine($"minimumEpic {minimumEpic}");
            Console.WriteLine($"minimumLegendary {minimumLegendary}");

            float rareCount      = minimumRare + player.RareChance;
            float epicCount      = minimumEpic + player.EpicChance;
            float legendaryCount = minimumLegendary + player.LegendaryChance;
            float commonCount    = minimumSpellsCount - rareCount - epicCount - legendaryCount;

            Console.WriteLine($"rareCount {rareCount}");
            Console.WriteLine($"epicCount {epicCount}");
            Console.WriteLine($"legendaryCount {legendaryCount}");
            Console.WriteLine($"commonCount {commonCount}");

            int differentRare      = CountDifferent(rareCount, minimumSpellsCount, minimumDifferentSpells);
            int differentEpic      = CountDifferent(epicCount, minimumSpellsCount, minimumDifferentSpells);
            int differentLegendary = CountDifferent(legendaryCount, minimumSpellsCount, minimumDifferentSpells);
            int differentCommon    = minimumDifferentSpells - differentRare - differentEpic - differentLegendary;

            Console.WriteLine($"differentRare {differentRare}");
            Console.WriteLine($"differentEpic {differentEpic}");
            Console.WriteLine($"differentLegendary {differentLegendary}");
            Console.WriteLine($"differentCommon {differentCommon}");

            int realSpellsCount = (int)(commonCount + rareCount + epicCount + legendaryCount);

            Dictionary <Rarity, List <Card> > candidates = Cards.Select(Arenas.Get("Arena9"));

            commonCount    -= GenerateCards(builder, candidates[common], differentCommon, (int)commonCount, random);
            rareCount      -= GenerateCards(builder, candidates[rare], differentRare, (int)rareCount, random);
            epicCount      -= GenerateCards(builder, candidates[epic], differentEpic, (int)epicCount, random);
            legendaryCount -= GenerateCards(builder, candidates[legendary], differentLegendary, (int)legendaryCount, random);

            player.RareChance      = rareCount;
            player.EpicChance      = epicCount;
            player.LegendaryChance = legendaryCount;

            int minGold = chest.MinGoldPerCard * realSpellsCount;
            int maxGold = chest.MaxGoldPerCard * realSpellsCount;

            builder.Gold = minGold + random.Next(maxGold - minGold);
            builder.Gems = 0; // TODO:

            return(builder.Build());
        }
Exemple #4
0
        public static void Initialize()
        {
            if (_initialized)
            {
                return;
            }

            var chestIndex = 0;
            var csv        = CSV.Tables.Get(Gamefile.Treasure_Chests);

            foreach (var data in csv.Datas)
            {
                Chest chest;
                var   info = (Treasure_Chests)csv.GetData(data.Row.Name);

                if (string.IsNullOrEmpty(info.BaseChest))
                {
                    chest = new Chest();
                }
                else
                {
                    chest = Get(info.BaseChest);
                    if (chest == null)
                    {
                        chest = new Chest();
                        //Logger.SayInfo($"Base chest {info.BaseChest} is not found for chest {info.Name}'");
                    }
                    else
                    {
#if DEBUG
                        //Logger.SayInfo($"Base chest {info.BaseChest} is found for chest {info.Name}'");
#endif
                    }
                }

                chest.Index            = chestIndex;
                chest.Scid             = new SCID(SCID_HIGH, chestIndex++);
                chest.Name             = info.Name;
                chest.Arena            = Arenas.Get(string.IsNullOrEmpty(info.Arena) ? "" : info.Arena);
                chest.InShop           = info.InShop;
                chest.InArenaInfo      = info.InArenaInfo;
                chest.TimeTakenDays    = info.TimeTakenDays;
                chest.TimeTakesHours   = info.TimeTakenHours;
                chest.TimeTakenMinutes = info.TimeTakenMinutes;
                chest.TimeTakenSeconds = info.TimeTakenSeconds;
                chest.RandomSpells     = info.RandomSpells;
                chest.DifferentSpells  = info.RandomSpells;
                chest.RareChance       = info.RareChance;
                chest.LegendaryChance  = info.LegendaryChance;

                string[] GuaranteedSpells = info.GuaranteedSpells;

                chest.GuaranteedSpells = new Card[GuaranteedSpells.Length];

                for (int i = 0; i < GuaranteedSpells.Length; i++)
                {
                    chest.GuaranteedSpells[i] = Cards.Get(GuaranteedSpells[i]);
                }

                chest.MinGoldPerCard = info.MinGoldPerCard;
                chest.MaxGoldPerCard = info.MaxGoldPerCard;
                chest.DraftChest     = info.DraftChest;

                Chests_List.Add(chest);
            }
            Logger.SayInfo(Chests_List.Count + " Chests, loaded and stored in memory.");
            _initialized = true;
        }