dota2 icon indicating copy to clipboard operation
dota2 copied to clipboard

Implement shared objects

Open rossengeorgiev opened this issue 9 years ago • 8 comments

  • [x] parse SO related messages from gc
  • [x] manage SOs state
    • [x] create
    • [x] update
    • [x] destroy
    • [x] cache subscribe/unsubscribe
    • [ ] track & set cache version in ClientHello (will need to persist cache to disk)
  • [ ] write docs

rossengeorgiev avatar Mar 27 '16 22:03 rossengeorgiev

Hi! Full implementation of parties require this part of create/update. Without this I could not make accept and decline event handling. Could I make a request without this part, just with bare features? And after help to finish this part and complete invite party module. TY.

m-bo-one avatar Oct 05 '16 17:10 m-bo-one

I wanted to make SOs easy to work with, but I didn't quite figure out how. Needs more investigation. If you want to do it, go for it. I'm happy to look over any code and help out

rossengeorgiev avatar Oct 06 '16 16:10 rossengeorgiev

How about this implementation? What you thinking about this? https://gist.github.com/DeV1doR/def8d11e1bc64d36614ca9494bfcbcf9

m-bo-one avatar Oct 14 '16 17:10 m-bo-one

Thank @DeV1doR, but I want to keep SOCache more general and not entangled with other parts of the code. I've refactored it on top of your changes. It will now track most of the SO types. See party branch

rossengeorgiev avatar Oct 15 '16 11:10 rossengeorgiev

@rossengeorgiev, now it become much difficult, and I don't understand how will be controlled the state, when GC is in the party, lobby etc.? And I think this is very bad https://github.com/ValvePython/dota2/blob/party/dota2/features/sharedobjects.py#L122 better do not complex data result and handle if something None with raising the exception.

m-bo-one avatar Oct 15 '16 11:10 m-bo-one

In Party you add handlers to listen for the appropriate events.

@client.socache.on(('new', CSODOTAPartyInvite))
def new_party_invite(message):
    pass

rossengeorgiev avatar Oct 15 '16 11:10 rossengeorgiev

@rossengeorgiev , could you give full example of code after this implementation? TY)

m-bo-one avatar Oct 15 '16 11:10 m-bo-one

Seems like there are a few more bits I need to figure out, before that. I will add some code for parties when its ready. Can't test right now since GC is acting up.

rossengeorgiev avatar Oct 15 '16 15:10 rossengeorgiev