Check-in [e1e4d20ee2]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:update protocol definition
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | trunk
Files: files | file ages | folders
SHA1: e1e4d20ee2d14a7f5c9140dab895bd9d1e106c01
User & Date: linnaea 2017-02-14 07:29:17
Context
2017-02-14
07:29
update protocol definition Leaf check-in: e1e4d20ee2 user: linnaea tags: trunk
2017-02-07
17:33
prune dependencies check-in: 2bb1f0460c user: linna tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to WarshipGirlsRSniffer/Protocol/Response/Api/InitGame.cs.

21
22
23
24
25
26
27


28
29
30
31
32
        public Vo.CurrentPve currentPveVo;
        public int[] shipSkinVo;
        public Vo.Friend friendVo;
        public int[] marryShipVo;
        public int secretary;
        public int[] guardShipList;
        public int guardFight;


        public int systime;

        public short eid;
    }
}







>
>





21
22
23
24
25
26
27
28
29
30
31
32
33
34
        public Vo.CurrentPve currentPveVo;
        public int[] shipSkinVo;
        public Vo.Friend friendVo;
        public int[] marryShipVo;
        public int secretary;
        public int[] guardShipList;
        public int guardFight;
        public int buildNum;
        public int buildEquipmentNum;
        public int systime;

        public short eid;
    }
}

Changes to WarshipGirlsRSniffer/Protocol/Response/Boat/SupplyAll.cs.

1
2
3
4
5
6
7
8
9
10
11
12
13
using Newtonsoft.Json;

namespace WarshipGirlsRSniffer.Protocol.Response.Boat
{
    [JsonObject] public struct SupplyAll
    {
        public Vo.UserResource userVo;
        public Vo.UserShip[] shipVO;
        public Vo.Task[] updateTaskVo;

        public short eid;
    }
}







|





1
2
3
4
5
6
7
8
9
10
11
12
13
using Newtonsoft.Json;

namespace WarshipGirlsRSniffer.Protocol.Response.Boat
{
    [JsonObject] public struct SupplyAll
    {
        public Vo.UserResource userVo;
        public Vo.MiniShip[] shipMiniVO;
        public Vo.Task[] updateTaskVo;

        public short eid;
    }
}

Changes to WarshipGirlsRSniffer/Protocol/Response/Dock/BuildBoat.cs.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
using Newtonsoft.Json;

namespace WarshipGirlsRSniffer.Protocol.Response.Dock
{
    [JsonObject] public struct BuildBoat
    {
        public Vo.Package[] packageVo;
        public Vo.UserResource userResVo;
        public Vo.BuildDock[] dockVo;
        public Vo.Task[] updateTaskVo;

        public int systime;
        public short eid;
    }
}











|



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
using Newtonsoft.Json;

namespace WarshipGirlsRSniffer.Protocol.Response.Dock
{
    [JsonObject] public struct BuildBoat
    {
        public Vo.Package[] packageVo;
        public Vo.UserResource userResVo;
        public Vo.BuildDock[] dockVo;
        public Vo.Task[] updateTaskVo;

        public int systime, buildNum;
        public short eid;
    }
}

Changes to WarshipGirlsRSniffer/Protocol/Response/Dock/BuildEquipment.cs.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
using Newtonsoft.Json;

namespace WarshipGirlsRSniffer.Protocol.Response.Dock
{
    [JsonObject] public struct BuildEquipment
    {
        public Vo.Package[] packageVo;
        public Vo.UserResource userResVo;
        public Vo.EquipmentDock[] equipmentDockVo;
        public Vo.Task[] updateTaskVo;

        public int systime;
        public short eid;
    }
}











|



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
using Newtonsoft.Json;

namespace WarshipGirlsRSniffer.Protocol.Response.Dock
{
    [JsonObject] public struct BuildEquipment
    {
        public Vo.Package[] packageVo;
        public Vo.UserResource userResVo;
        public Vo.EquipmentDock[] equipmentDockVo;
        public Vo.Task[] updateTaskVo;

        public int systime, buildEquipmentNum;
        public short eid;
    }
}

Changes to WarshipGirlsRSniffer/Vm/VmYard.cs.

25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
            _disposable.Add(_.Session.Api_Boat_InstantRepairShips.Subscribe(p => p.Item2.shipVOs.ForEach(UpdateShip)));
            _disposable.Add(_.Session.Api_Boat_RemoveEquipment.Subscribe(p => UpdateShip(p.Item2.shipVO)));
            _disposable.Add(_.Session.Api_Boat_Repair.Subscribe(p => UpdateShip(p.Item2.shipVO)));
            _disposable.Add(_.Session.Api_Boat_RepairComplete.Subscribe(p => { UpdateShip(p.Item2.shipVO); }));
            _disposable.Add(_.Session.Api_Boat_Strengthen.Subscribe(p => UpdateShip(p.Item2.shipVO)));
            _disposable.Add(_.Session.Api_Boat_Strengthen.Subscribe(p => p.Item2.delShips.ForEach(x => Ships.Remove(x))));
            _disposable.Add(_.Session.Api_Boat_Supply.Subscribe(p => UpdateShip(p.Item2.shipVO)));
            _disposable.Add(_.Session.Api_Boat_SupplyAll.Subscribe(p => p.Item2.shipVO.ForEach(UpdateShip)));
            _disposable.Add(_.Session.Api_Boat_SupplyBoats.Subscribe(p => p.Item2.shipVO.ForEach(UpdateShip)));
            _disposable.Add(_.Session.Api_Boat_SupplyFleet.Subscribe(p => p.Item2.shipVO.ForEach(UpdateShip)));
            _disposable.Add(_.Session.Api_Campaign_GetWarResult.Subscribe(p => p.Item2.shipVO.ForEach(UpdateShip)));
            _disposable.Add(_.Session.Api_Dock_Evolution.Subscribe(p => p.Item2.shipVO.ForEach(UpdateShip)));
            _disposable.Add(_.Session.Api_Dock_GetBoat.Subscribe(p => UpdateShip(p.Item2.shipVO)));
            _disposable.Add(_.Session.Api_Pve_GetWarResult.Subscribe(p => p.Item2.shipVO.ForEach(UpdateShip)));
            _disposable.Add(_.Session.Api_Pve_GetWarResult.Subscribe(p => p.Item2.newShipVO?.ForEach(UpdateShip)));







|







25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
            _disposable.Add(_.Session.Api_Boat_InstantRepairShips.Subscribe(p => p.Item2.shipVOs.ForEach(UpdateShip)));
            _disposable.Add(_.Session.Api_Boat_RemoveEquipment.Subscribe(p => UpdateShip(p.Item2.shipVO)));
            _disposable.Add(_.Session.Api_Boat_Repair.Subscribe(p => UpdateShip(p.Item2.shipVO)));
            _disposable.Add(_.Session.Api_Boat_RepairComplete.Subscribe(p => { UpdateShip(p.Item2.shipVO); }));
            _disposable.Add(_.Session.Api_Boat_Strengthen.Subscribe(p => UpdateShip(p.Item2.shipVO)));
            _disposable.Add(_.Session.Api_Boat_Strengthen.Subscribe(p => p.Item2.delShips.ForEach(x => Ships.Remove(x))));
            _disposable.Add(_.Session.Api_Boat_Supply.Subscribe(p => UpdateShip(p.Item2.shipVO)));
            _disposable.Add(_.Session.Api_Boat_SupplyAll.Subscribe(p => p.Item2.shipMiniVO.ForEach(UpdateShip)));
            _disposable.Add(_.Session.Api_Boat_SupplyBoats.Subscribe(p => p.Item2.shipVO.ForEach(UpdateShip)));
            _disposable.Add(_.Session.Api_Boat_SupplyFleet.Subscribe(p => p.Item2.shipVO.ForEach(UpdateShip)));
            _disposable.Add(_.Session.Api_Campaign_GetWarResult.Subscribe(p => p.Item2.shipVO.ForEach(UpdateShip)));
            _disposable.Add(_.Session.Api_Dock_Evolution.Subscribe(p => p.Item2.shipVO.ForEach(UpdateShip)));
            _disposable.Add(_.Session.Api_Dock_GetBoat.Subscribe(p => UpdateShip(p.Item2.shipVO)));
            _disposable.Add(_.Session.Api_Pve_GetWarResult.Subscribe(p => p.Item2.shipVO.ForEach(UpdateShip)));
            _disposable.Add(_.Session.Api_Pve_GetWarResult.Subscribe(p => p.Item2.newShipVO?.ForEach(UpdateShip)));
94
95
96
97
98
99
100






























101
102
103
104
105
106
107
                if(Equipments.ContainsKey(cid)) return;

                App.BeginDispatcherInvoke(() => {
                    if(Equipments.ContainsKey(cid)) return;
                    Equipments[cid] = new EquipmentVm(new Vo.Equipment() { equipmentCid = cid, uid = vo.uid }, this);
                });
            });































            CampaignFleets.ForEach(x => x.UpdateShipStatus(vo.id));
        }

        private void UpdateFleet(Vo.Fleet vo)
        {
            var fleet = Fleets[vo.id];







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
                if(Equipments.ContainsKey(cid)) return;

                App.BeginDispatcherInvoke(() => {
                    if(Equipments.ContainsKey(cid)) return;
                    Equipments[cid] = new EquipmentVm(new Vo.Equipment() { equipmentCid = cid, uid = vo.uid }, this);
                });
            });

            CampaignFleets.ForEach(x => x.UpdateShipStatus(vo.id));
        }

        private void UpdateShip(Vo.MiniShip vo)
        {
            var ship = Ships[vo.id];
            Vo.UserShip fullVo;
            if(ship != null) {
                fullVo = ship.Vo;
            } else {
                fullVo = new Vo.UserShip();
            }

            fullVo.id = vo.id;
            fullVo.battleProps.oil = vo.oil;
            fullVo.battleProps.ammo = vo.ammo;
            fullVo.battleProps.aluminium = vo.aluminium;
            fullVo.oil_num = vo.oil_num;
            fullVo.ammo_num = vo.ammo_num;
            fullVo.aluminium_num = vo.aluminium_num;
            fullVo.capacitySlot = vo.capacitySlot;

            if(ship != null) {
                ship.Vo = fullVo;
            } else {
                App.BeginDispatcherInvoke(() => {
                    Ships[vo.id] = new ShipVm(fullVo, this);
                });
            }

            CampaignFleets.ForEach(x => x.UpdateShipStatus(vo.id));
        }

        private void UpdateFleet(Vo.Fleet vo)
        {
            var fleet = Fleets[vo.id];

Changes to WarshipGirlsRSniffer/Vo/MarketingDataVo.cs.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
using Newtonsoft.Json;

namespace WarshipGirlsRSniffer.Vo
{
    [JsonObject] public struct MarketingData
    {
        public FirstPayAward firstPayAward;
        public ContinueLoginAward continueLoginAward;
        public int[] reachLevelAward;
        public string pveEventTitle;
        public int pveEventOpen, pveEventIndex, isHasBuildEvent, isHasPVEEXPEvent, isHasPVEExploreEvent, isSpoilsShopEvent, isGuardEvent, isTwoYearEvent, spoilsShopStartTime, spoilsShopEndTime;
        public int hideBrokenImageInAndroid, showBrokenImageInIos, showRank, showCouponSetting, showForumLink, showWikiLink, showRecentMarketing, showIosBuyNotice, showBindingOtherPlatform, mustChangePwd, userRegStatus;
    }

    [JsonObject] public struct FirstPayAward
    {
        public int haveGet, canGet;
    }










|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
using Newtonsoft.Json;

namespace WarshipGirlsRSniffer.Vo
{
    [JsonObject] public struct MarketingData
    {
        public FirstPayAward firstPayAward;
        public ContinueLoginAward continueLoginAward;
        public int[] reachLevelAward;
        public string pveEventTitle;
        public int pveEventOpen, pveEventIndex, isHasBuildEvent, isHasPVEEXPEvent, isHasPVEExploreEvent, isSpoilsShopEvent, isGuardEvent, isTwoYearEvent, isBattleSeaEvent, spoilsShopStartTime, spoilsShopEndTime;
        public int hideBrokenImageInAndroid, showBrokenImageInIos, showRank, showCouponSetting, showForumLink, showWikiLink, showRecentMarketing, showIosBuyNotice, showBindingOtherPlatform, mustChangePwd, userRegStatus;
    }

    [JsonObject] public struct FirstPayAward
    {
        public int haveGet, canGet;
    }

Changes to WarshipGirlsRSniffer/Vo/PveExploreVo.cs.

12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
    {
        public int id, last_pve_level_id, pveId, needPveLevelId, pveLevelNum, needUserLevel;
        public string title;
    }

    [JsonObject] public struct PveLevel
    {
        public int id, type, difficulty, user_exp, boss_user_exp, ship_exp, boss_ship_exp, boss_bg, hp, hp_type, next_pve_id, task_cid, isRedPath, desc, position, arrow, is_support, support_id, initNodeId, nodeNum, pveId, bossId, mapId, needPveLevelId, needUserLevel;
        public string title, support_pre_desc, support_next_desc, support_open_desc, subTitle;
        public int[] pruductGoods;

        [JsonConverter(typeof(Data.JsonStringParseConverter))]
        public Dictionary<int, int> award;
    }








|







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
    {
        public int id, last_pve_level_id, pveId, needPveLevelId, pveLevelNum, needUserLevel;
        public string title;
    }

    [JsonObject] public struct PveLevel
    {
        public int id, type, difficulty, user_exp, boss_user_exp, ship_exp, boss_ship_exp, boss_bg, hp, hp_type, next_pve_id, task_cid, isRedPath, desc, position, arrow, is_support, support_id, initNodeId, nodeNum, pveId, bossId, mapId, needPveLevelId, needUserLevel, fleet_type;
        public string title, support_pre_desc, support_next_desc, support_open_desc, subTitle;
        public int[] pruductGoods;

        [JsonConverter(typeof(Data.JsonStringParseConverter))]
        public Dictionary<int, int> award;
    }

Changes to WarshipGirlsRSniffer/Vo/UserShipVo.cs.

1
2
3
4
5
6
7

8
9
10
11



12
13
14







15
16
17
18
19
20
21
using Newtonsoft.Json;

namespace WarshipGirlsRSniffer.Vo
{
    [JsonObject] public struct UserShip
    {
        public int id, uid, sink_num, create_time, skin_cid, exp, nextExp, shipCid, skillId, nextSkillId;

        public int[] capacitySlotMax, capacitySlot, capacitySlotExist, equipmentArr, equipment0, equipment1, equipment2;
        public BattleProps strengthenAttribute, battlePropsBasic, battleProps, battlePropsMax;
        public byte use_equipment, skillType, skillLevel, status, level, energy, married, love, loveMax, fleetId, isLocked;




        [JsonConverter(typeof(Data.ObjectToArrayConverter))]
        public int[] equipment;
    }








    [JsonObject] public struct Fleet
    {
        public int id, uid;
        public byte status, formation;
        public string title;
        public int[] ships;






|
>




>
>
>



>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using Newtonsoft.Json;

namespace WarshipGirlsRSniffer.Vo
{
    [JsonObject] public struct UserShip
    {
        public int id, uid, sink_num, marry_time, create_time, skin_cid, exp, nextExp, shipCid, skillId, nextSkillId;
        public int fight_num, hurt_ship_num, sink_ship_num, miss_num, pvp_win_num, repair_num, ammo_num, steel_num, oil_num, aluminium_num, build_boat_num;
        public int[] capacitySlotMax, capacitySlot, capacitySlotExist, equipmentArr, equipment0, equipment1, equipment2;
        public BattleProps strengthenAttribute, battlePropsBasic, battleProps, battlePropsMax;
        public byte use_equipment, skillType, skillLevel, status, level, energy, married, love, loveMax, fleetId, isLocked;

        public object team_medal;
        public object[] active_medal;

        [JsonConverter(typeof(Data.ObjectToArrayConverter))]
        public int[] equipment;
    }

    [JsonObject] public struct MiniShip
    {
        public int id, oil_num, aluminium_num, ammo_num;
        public short oil, ammo, aluminium;
        public int[] capacitySlot;
    }

    [JsonObject] public struct Fleet
    {
        public int id, uid;
        public byte status, formation;
        public string title;
        public int[] ships;