summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2019-01-04 17:25:39 +0100
committernsensfel <SpamShield0@noot-noot.org>2019-01-04 17:25:39 +0100
commit83cd7ce064b8a46a106dc855d748b1bd7e45af01 (patch)
treecee5d4e3d21936925f8108940c35533f9f6484f5 /src/bounty/bnt_join_battle.erl
parent895a5348f521b16b3a6e32d921f7f23ec8f3036e (diff)
Removes 'id' field from ataxia entry values.
While sometimes usefull as a way to retrieve the object's ID, they were both redundant (you can't get the object without its ID anyway) and bothersome to maintain (insert + update, which would have required setting up a bounty for any insert).
Diffstat (limited to 'src/bounty/bnt_join_battle.erl')
-rw-r--r--src/bounty/bnt_join_battle.erl7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/bounty/bnt_join_battle.erl b/src/bounty/bnt_join_battle.erl
index f97b20b..5daa548 100644
--- a/src/bounty/bnt_join_battle.erl
+++ b/src/bounty/bnt_join_battle.erl
@@ -413,13 +413,12 @@ generate_battle (PlayerID, MapID) ->
map_map:id(),
list(non_neg_integer())
)
- -> btl_pending_battle:type().
+ -> {btl_pending_battle:id(), btl_pending_battle:type()}.
generate (PlayerID, MapID, SelectedRosterCharacterIXs) ->
Battle = generate_battle(PlayerID, MapID),
PendingBattle =
btl_pending_battle:new
(
- <<"">>,
% TODO: More options than 1 vs N.
(length(SelectedRosterCharacterIXs) * 2),
Battle
@@ -433,7 +432,7 @@ generate (PlayerID, MapID, SelectedRosterCharacterIXs) ->
list(non_neg_integer()),
btl_pending_battle:type()
)
- -> btl_pending_battle:type().
+ -> {btl_pending_battle:id(), btl_pending_battle:type()}.
attempt (PlayerID, SelectedRosterCharacterIXs, PendingBattle) ->
Battle = btl_pending_battle:get_battle(PendingBattle),
RemainingSlots =
@@ -476,7 +475,7 @@ attempt (PlayerID, SelectedRosterCharacterIXs, PendingBattle) ->
{S1PendingBattle, Update},
- S1PendingBattle.
+ {ataxia_id:null(), S1PendingBattle}.
% TODO:
% if RemainingSlots = 0 -> del this, new Battle.