mirror of
https://github.com/zoffline/zwift-offline.git
synced 2026-08-02 17:08:14 -07:00
+ unjoin event via zca
This commit is contained in:
@@ -7,6 +7,12 @@ message PlayerJoinedEvent {
|
||||
optional uint64 pje_f3 = 3;
|
||||
}
|
||||
|
||||
message PlayerLeftEvent { //didn't decompiled yet, just a guess
|
||||
required uint64 ev_sg_id = 1;
|
||||
required uint64 player_id = 2;
|
||||
optional uint64 ple_f3 = 3;
|
||||
}
|
||||
|
||||
message EventSubgroupProtobuf { //where is fieldLimit, signedUp, signupStatus, registered, registrationStatus, followeeEntrantCount
|
||||
//totalEntrantCount, followeeSignedUpCount, totalSignedUpCount, followeeJoinedCount, totalJoinedCount, rulesSet, workoutHash, overrideMapPreferences
|
||||
//qualificationRuleIds, accessValidationResult
|
||||
|
||||
+31
-21
File diff suppressed because one or more lines are too long
Executable → Regular
+13
-7
@@ -1142,24 +1142,30 @@ def api_events_search():
|
||||
else:
|
||||
return events.SerializeToString(), 200
|
||||
|
||||
@app.route('/api/events/subgroups/signup/<int:event_id>', methods=['POST']) # +DELETE
|
||||
@app.route('/api/events/subgroups/signup/<int:event_id>', methods=['POST'])
|
||||
@app.route('/api/events/signup/<int:event_id>', methods=['DELETE'])
|
||||
@jwt_to_session_cookie
|
||||
@login_required
|
||||
def api_events_subgroups_signup_id(event_id):
|
||||
if request.method == 'POST':
|
||||
wa_type = udp_node_msgs_pb2.WA_TYPE.WAT_JOIN_E
|
||||
pe = events_pb2.PlayerJoinedEvent()
|
||||
else:
|
||||
wa_type = udp_node_msgs_pb2.WA_TYPE.WAT_LEFT_E
|
||||
pe = events_pb2.PlayerLeftEvent()
|
||||
#empty request.data
|
||||
player_update = udp_node_msgs_pb2.WorldAttribute()
|
||||
player_update.server_realm = udp_node_msgs_pb2.ZofflineConstants.RealmID
|
||||
player_update.wa_type = udp_node_msgs_pb2.WA_TYPE.WAT_JOIN_E
|
||||
player_update.wa_type = wa_type
|
||||
player_update.world_time_born = world_time()
|
||||
player_update.world_time_expire = world_time() + 60000
|
||||
player_update.wa_f12 = 1
|
||||
player_update.timestamp = int(get_utc_time()*1000000)
|
||||
|
||||
pje = events_pb2.PlayerJoinedEvent()
|
||||
pje.ev_sg_id = event_id;
|
||||
pje.player_id = 0
|
||||
#optional uint64 pje_f3 = 3;
|
||||
player_update.payload = pje.SerializeToString()
|
||||
pe.ev_sg_id = event_id
|
||||
pe.player_id = current_user.player_id
|
||||
#optional uint64 pje_f3/ple_f3 = 3;
|
||||
player_update.payload = pe.SerializeToString()
|
||||
|
||||
for recieving_player_id in online.keys():
|
||||
if not recieving_player_id in player_update_queue:
|
||||
|
||||
Reference in New Issue
Block a user