Exemplo n.º 1
0
        public plMessage GetMessage(hsResMgr mgr)
        {
            hsStream s = fHelper.Stream;
            if (s == null || s.BaseStream.Length == 0)
                return null;

            plCreatable pCre = mgr.ReadCreatable(s);
            s.Close();

            if (pCre is plMessage)
                return (plMessage)pCre;
            else
                return null;
        }
Exemplo n.º 2
0
        public override void Read(hsStream s, hsResMgr mgr)
        {
            base.Read(s, mgr);

            fIsPlayer = s.ReadBool();
            fSpawnPoint = mgr.ReadKey(s);

            if (s.ReadBool()) {
                plCreatable pCre = mgr.ReadCreatable(s);
                if (pCre is plAvTask)
                    fInitialTask = (plAvTask)pCre;
                else if (pCre != null)
                    plDebugLog.GetLog("ResManager").Warn(
                        String.Format("plLoadAvatarMsg: InitialTask should be a plAvTask, but we got a '{0}'",
                        plFactory.ClassName(pCre)));
            }

            if (s.Version.IsMystOnline)
                fUserStr = s.ReadSafeString();
        }
Exemplo n.º 3
0
        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)));
        }