public void SetMessage(plMessage msg, hsResMgr mgr) { hsStream s = new hsStream(new MemoryStream()); s.Version = mgr.Version; if (msg != null) mgr.WriteCreatable(s, msg); fHelper.Stream = s; s.Close(); // Fill in the flags // TODO: CCR -> AllPlayers InterAgeRouting = msg.InterAgeRouting; UseRelRegions = msg.UseRelRegions; }
public override void Read(hsStream s, hsResMgr mgr) { base.Read(s, mgr); fCloneKey = mgr.ReadKey(s); fRequestorKey = mgr.ReadKey(s); fOriginatingPlayerID = s.ReadUInt(); fUserData = s.ReadUInt(); fValidMsg = s.ReadBool(); fIsLoading = s.ReadBool(); plCreatable tMsg = mgr.ReadCreatable(s); if (tMsg is plMessage) fTriggerMsg = (plMessage)tMsg; else if (tMsg != null) plDebugLog.GetLog("ResManager").Warn( String.Format("plLoadCloneMsg: TriggerMsg should be a plMessage, but we got a '{0}'", plFactory.ClassName(tMsg))); }