Commit Graph

11 Commits

Author SHA1 Message Date
3abba0ca3c this should be CompareAndSwap oopsd D: 2023-11-27 21:34:39 -06:00
1f66acfd25 holy refactor
started out as me making a service abstraction..

- db.Player exists again, and entity.Player uses it as an embedded struct
- chunk.ForEachEntity() lets you add/remove entities during iteration now
- removed account related fields from CNPeer
- protocol/pool has been merged with protocol.
use protocol.GetBuffer() and protocol.PutBuffer().
- new protocol/internal/service!
service.Service is an abstraction layer to handle multiple CNPeer*
connections and allows you to associate each with an interface{} uData.
In the future it might also handle a task queue for jobs that
modify/interact with the player's uData, called from service.handleEvents()
- PacketHandler callback type has a new param! uData is passed as well now
- much of loginserver/shardserver is now handled by the shared service
abstraction
- SHARD: NPC_ENTER packets are now sent on player loading complete
rather than on enter.
2023-11-27 21:23:28 -06:00
81de857670 protocol_test: split TestPacketEncodeDecode 2023-11-26 16:58:33 -06:00
e8f5e5fc9c protocol_test: added TestDataEncrypt, TestDataDecrypt, TestCreateNewKey 2023-11-26 16:54:22 -06:00
bb50948935 minor styling fix 2023-11-25 23:15:47 -06:00
d32facf363 swithed to blackbox testing
just because i am lazy
2023-11-25 23:11:19 -06:00
4419260cd0 rename TestPacket -> TestPacketEncodeDecode
also, verify encoded bytes to a sample
2023-11-22 20:04:53 -06:00
9df5a3d0d5 start packet_test.go; minor packet.go refactoring 2023-11-22 18:18:22 -06:00
3e04103ae4 fix formatting 2023-09-18 21:09:20 -05:00
3559682d18 genstructs.py: generate PacketIDToString()
this will be nice to have for debugging
2023-09-18 20:46:37 -05:00
458e907c99 moved 'core' to 'internal' 2023-08-23 18:16:24 -05:00