Exemple #1
0
func (gd *GlobalDataHelper) OnRemove(self datatype.Entityer, sender datatype.Entityer, index int) int {
	if !gd.isServer {
		return 1
	}
	sender.SetPropSyncer(nil)
	recs := sender.GetRecNames()
	for _, v := range recs {
		rec := sender.GetRec(v)
		if rec.IsVisible() {
			rec.SetSyncer(nil)
		}
	}
	return 1
}
Exemple #2
0
func (ts *TableSync) SyncTable(player datatype.Entityer) {

	recs := player.GetRecNames()
	for _, r := range recs {
		rec := player.GetRec(r)
		if !rec.IsVisible() {
			continue
		}

		out := tt.SyncTable(rec)
		if out == nil {
			continue
		}
		err := MailTo(nil, &ts.mailbox, "Entity.RecordInfo", out)
		if err != nil {
			log.LogError(err)
		}
	}
}