| summaryrefslogtreecommitdiff | 
diff options
| author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2019-01-16 23:04:20 +0100 | 
|---|---|---|
| committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2019-01-16 23:04:20 +0100 | 
| commit | 4b5e90af28503650c58046f5ce433cd979b945d4 (patch) | |
| tree | 1bdef6d16df18ded5b57f3f9b8917bd18e40b52a | |
| parent | c1042fca23c3a2a9775047a9c1efee5031ac4a1c (diff) | |
...
| -rw-r--r-- | src/shared/struct/shr_battle_summary.erl | 23 | 
1 files changed, 22 insertions, 1 deletions
| diff --git a/src/shared/struct/shr_battle_summary.erl b/src/shared/struct/shr_battle_summary.erl index f9fd412..1d9934a 100644 --- a/src/shared/struct/shr_battle_summary.erl +++ b/src/shared/struct/shr_battle_summary.erl @@ -192,11 +192,32 @@ encode ({IX, BattleSummary}) ->        [           {<<"ix">>, IX},           {<<"id">>, BattleSummary#battle_summary.id}, +         { +            <<"mod">>, +            ( +               case BattleSummary#battle_summary.mode of +                  attack -> <<"a">>; +                  defend -> <<"d">>; +                  none -> <<"n">> +               end +            ) +         }, +         { +            <<"cat">>, +            ( +               case BattleSummary#battle_summary.category of +                  invasion -> <<"i">>; +                  event -> <<"e">>; +                  campaign -> <<"c">> +               end +            ) +         },           {<<"nme">>, BattleSummary#battle_summary.name},           {              <<"dln">>,              ataxia_time:to_string(BattleSummary#battle_summary.deadline)           }, -         {<<"ipt">>, BattleSummary#battle_summary.is_players_turn} +         {<<"ipt">>, BattleSummary#battle_summary.is_players_turn}, +         {<<"ipd">>, BattleSummary#battle_summary.is_pending}        ]     }. | 


