Abracted away broadcast utils

This commit is contained in:
stratic-dev
2024-10-13 18:23:04 +01:00
parent 5f975c97b5
commit 0af565a766
38 changed files with 479 additions and 434 deletions

View File

@@ -5,6 +5,7 @@ import (
"erupe-ce/config"
"erupe-ce/network/mhfpacket"
"erupe-ce/utils/broadcast"
"erupe-ce/utils/byteframe"
)
@@ -25,7 +26,7 @@ func handleMsgSysCreateObject(s *Session, p mhfpacket.MHFPacket) {
// Response to our requesting client.
resp := byteframe.NewByteFrame()
resp.WriteUint32(newObj.id) // New local obj handle.
DoAckSimpleSucceed(s, pkt.AckHandle, resp.Data())
broadcast.DoAckSimpleSucceed(s, pkt.AckHandle, resp.Data())
// Duplicate the object creation to all sessions in the same stage.
dupObjUpdate := &mhfpacket.MsgSysDuplicateObject{
ObjID: newObj.id,