stage as a /internal/system

This commit is contained in:
stratic-dev
2024-10-17 20:22:53 +01:00
parent 674ac9bd47
commit 094855b984
10 changed files with 177 additions and 158 deletions

View File

@@ -146,11 +146,11 @@ func psn(s *Session, args []string) error {
func reload(s *Session, _ []string) error {
s.sendMessage(t("commands.reload", v{}))
var temp mhfpacket.MHFPacket
for _, object := range s.stage.objects {
if object.ownerCharID == s.CharID {
for _, object := range s.stage.Objects {
if object.OwnerCharID == s.CharID {
continue
}
temp = &mhfpacket.MsgSysDeleteObject{ObjID: object.id}
temp = &mhfpacket.MsgSysDeleteObject{ObjID: object.Id}
s.QueueSendMHF(temp)
}
for _, session := range s.Server.sessions {
@@ -175,17 +175,17 @@ func reload(s *Session, _ []string) error {
s.QueueSendMHF(temp)
}
}
for _, obj := range s.stage.objects {
if obj.ownerCharID == s.CharID {
for _, obj := range s.stage.Objects {
if obj.OwnerCharID == s.CharID {
continue
}
temp = &mhfpacket.MsgSysDuplicateObject{
ObjID: obj.id,
X: obj.x,
Y: obj.y,
Z: obj.z,
ObjID: obj.Id,
X: obj.X,
Y: obj.Y,
Z: obj.Z,
Unk0: 0,
OwnerCharID: obj.ownerCharID,
OwnerCharID: obj.OwnerCharID,
}
s.QueueSendMHF(temp)
}