Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix quest not saving to DB raw #1380

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mapadroid/db/DbPogoProtoSubmitRaw.py
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ async def quest(self, session: AsyncSession, quest_proto: pogoprotos.FortSearchO
condition: RepeatedCompositeFieldContainer[pogoprotos.QuestConditionProto] = goal.condition

# TODO: Json dumping protos...
json_condition: str = json.dumps(condition)
json_condition: str = ProtoHelper.to_json(condition)
task = await quest_gen.questtask(int(quest_type), json_condition, int(target), quest_template,
quest_title_resource_id)
quest: Optional[TrsQuest] = await TrsQuestHelper.get(session, fort_id, quest_layer)
Expand Down
6 changes: 3 additions & 3 deletions mapadroid/worker/strategy/quest/QuestStrategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,11 +578,11 @@ async def _ensure_stop_present(self, timestamp: float) -> PositionStopType:
async def _current_position_has_spinnable_stop(self, timestamp: float) -> PositionStopType:
type_received, data_received, time_received = await self._wait_for_data_after_moving(timestamp,
ProtoIdentifier.GMO, 35)
if (type_received != ReceivedType.GMO or data_received is None
or not isinstance(data_received, pogoprotos.GetMapObjectsOutProto)):
if type_received != ReceivedType.GMO or data_received is None:
await self._spinnable_data_failure()
return PositionStopType.GMO_NOT_AVAILABLE
latest_proto: pogoprotos.GetMapObjectsOutProto = data_received

latest_proto: pogoprotos.GetMapObjectsOutProto = ProtoHelper.parse(ProtoIdentifier.GMO, data_received)

if not latest_proto.map_cell:
logger.warning("Can't spin stop - no map info in GMO!")
Expand Down
Loading