JustNao / DofusHelper

Projet personnel pour apprendre Python, en créant un MITM pour Dofus.
MIT License
16 stars 4 forks source link

multicompte Module #10

Open Brotove opened 1 year ago

Brotove commented 1 year ago

Hi bro i hope you'r doing fine, recently i wanted to try the multicompte module but now it's not working i've updated protocol and other json files the problem is within for member in packet["team"]["teamMembers"] {'type':'GameFightUpdateTeamMessage', 'fightId': 171, 'team': {'__type__': 'FightTeamInformations', 'teamId': 1, 'leaderId': -20002.0, 'teamSide': -1, 'teamTypeId': 1, 'nbWaves': 0, 'teamMembers': None}} where teamMembers always None no info is added there wich make it non-iterable, thanks

JustNao commented 1 year ago

GameFightUpdateTeamMessage is received whenever any team is updated, including when first entering combat. It contains exclusively real players. When I mean any team, I mean your team when you start the combat, but also the enemy team, even if it's only monsters. In the latter case, the team will always be empty because players can't join a monster group. So you will always receive a GameFightUpdateTeamMessage with an empty teamMembers, you just need to skip it because what you want is the next GameFightUpdateTeamMessage you will receive, which would be your team.

However, keep in mind that I've stopped working on this module because the LaBot sniffer has trouble reading messages spanning multiples packets, which often happens in combat. I've only been able to make it work by hijacking the client connection, but it's unstable.

For reference I work on an upgraded version of this project, and you can see how I handle GameFightUpdateTeamMessage here.

Brotove commented 1 year ago

thank you for the clarification, with i get what you mean however the packets received doesn't contains any informations in teamMembers key, i've tried to recheck if teamMembers is None but doesn't work either i don't know if this has with read methode in protocol,

{'type': 'GameFightUpdateTeamMessage', 'fightId': 850, 'team': {'type': 'FightTeamInformations', 'teamId': 0, 'leaderId': 45474545634.0, 'teamSide': -1, 'teamTypeId': 0, 'nbWaves': 0, 'teamMembers': None}} {'type': 'GameFightUpdateTeamMessage', 'fightId': 850, 'team': {'type': 'FightTeamInformations', 'teamId': 1, 'leaderId': -20005.0, 'teamSide': -1, 'teamTypeId': 1, 'nbWaves': 0, 'teamMembers': None}}

i did another approche but require to invite members to party then store their id and name i only don't how to add invoc and companions to the list i can't find their packet. and there's something weird i've just found is that player classes inflict packet reading i guess because i capture other classes packet haven't tried all but for a panda i always get this weird packet found Error in packet data %s 8785 PartyJoinMessage Error in packet data %s 8785 PartyJoinMessage Weird packet found, flushing 9480 PartyNewMemberMessage i like this project i've learned many things thanks to you and this project thanks again