Пример #1
0
 public override void Read(hsStream s, hsResMgr mgr)
 {
     plKey key = null;
     if (s.Version.IsMystOnline)
         key = mgr.ReadKey(s);
     else
         key = mgr.ReadUoid(s);
     fpKey = key;
 }
Пример #2
0
        public override void Read(hsStream s, hsResMgr mgr)
        {
            base.Read(s, mgr);

            fObjectHelper = mgr.ReadUoid(s); // Yes, ReadUoid. Not ReadKey.
            fIsPlayer = s.ReadBool();
            fIsLoading = s.ReadBool();
            fIsInitialState = s.ReadBool();
        }
Пример #3
0
        public override void Read(hsStream s, hsResMgr mgr)
        {
            base.Read(s, mgr);

            fInvisLevel = s.ReadInt();
            fLeavingAge = s.ReadBool();
            fLinkKey = mgr.ReadKey(s);
            fEffects = s.ReadInt();
            fLinkAnimKey = mgr.ReadKey(s);
        }
Пример #4
0
        public override void Read(hsStream s, hsResMgr mgr)
        {
            base.Read(s, mgr);

            fDrawInterface = mgr.ReadKey(s);
            fSimulationInterface = mgr.ReadKey(s);
            fCoordInterface = mgr.ReadKey(s);
            fAudioInterface = mgr.ReadKey(s);

            fInterfaces.Capacity = s.ReadInt();
            for (int i = 0; i < fInterfaces.Capacity; i++)
                fInterfaces.Add(mgr.ReadKey(s));

            fModifiers.Capacity = s.ReadInt();
            for (int i = 0; i < fModifiers.Capacity; i++)
                fModifiers.Add(mgr.ReadKey(s));

            fSceneNode = mgr.ReadKey(s);
        }
Пример #5
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();
        }
Пример #6
0
 protected override void IRead(hsStream s, hsResMgr mgr)
 {
     fSpawner = mgr.ReadKey(s);
     fSpawnee = mgr.ReadKey(s);
 }
Пример #7
0
 protected override void IRead(hsStream s, hsResMgr mgr)
 {
     fPicker = mgr.ReadKey(s);
     fPicked = mgr.ReadKey(s);
     fEnabled = s.ReadBool();
     fHitPoint.Read(s);
 }
Пример #8
0
 protected override void IRead(hsStream s, hsResMgr mgr)
 {
     fOfferer = mgr.ReadKey(s);
     fTargetAge = s.ReadInt();
     fOfferee = s.ReadInt();
 }
Пример #9
0
 public void WriteUoid(hsStream s, plKey uoid)
 {
     if (uoid == null) {
         plUoid nil = new plUoid();
         nil.Write(s);
     } else
         uoid.Uoid.Write(s);
 }
Пример #10
0
 public override void Read(hsStream s, hsResMgr mgr)
 {
     fSender = mgr.ReadKey(s);
     fReceivers.Capacity = s.ReadInt();
     for (int i = 0; i < fReceivers.Capacity; i++)
         fReceivers.Add(mgr.ReadKey(s));
     if (s.Version.IsPlasma20)
         fTimeStamp = s.ReadDouble();
     fBCastFlags = (plBCastFlags)s.ReadInt();
 }
Пример #11
0
 protected override void IRead(hsStream s, hsResMgr mgr)
 {
     fBlockerKey = mgr.ReadKey(s);
 }
Пример #12
0
 public void WriteKey(hsStream s, plKey key)
 {
     if (s.Version.IsPlasma20) {
         if (key == null) {
             s.WriteBool(false);
             return;
         } else {
             s.WriteBool(true);
             key.Uoid.Write(s);
         }
     } else {
         if (key == null)
             new plUoid().Write(s); // Invalid...
         else
             key.Uoid.Write(s);
     }
 }
Пример #13
0
        internal override plKey ReRegister(plUoid uoid)
        {
            plKey key = fKeyCollector.FindKey(uoid);
            if (key == null) {
                key = new plKey(uoid);
                fKeyCollector.AddKey(key);
            }

            return key;
        }
Пример #14
0
        /// <summary>
        /// Attempt to read in an object whose Key is being held by the ResManager
        /// </summary>
        /// <param name="key">The Key of the object to read</param>
        /// <returns>The object read in. NULL if the Key is not being held or is no longer in the collection.</returns>
        public hsKeyedObject ReadObject(plKey key)
        {
            if (fObjects.ContainsKey(key)) {
                plDebugLog.GetLog("ResManager").Warn("Redundant attempt to ReadObject: " + key.ToString());
                return fObjects[key];
            }

            for (int i = 0; i < fHeldKeys.Count; i++)
                if (fHeldKeys[i].fKey.Equals(key)) {
                    IReadHoldingKey(fHeldKeys[i]);
                    fHeldKeys.RemoveAt(i);
                    return fObjects[key];
                }

            // Still here?
            plDebugLog.GetLog("ResManager").Error("Tried to ReadObject whose key is not being held: " + key.ToString());
            return null;
        }
Пример #15
0
 protected override void IRead(hsStream s, hsResMgr mgr)
 {
     fName = s.ReadSafeString();
     fDataType = (DataType)s.ReadInt();
     fNumber = s.ReadFloat();
     fKey = mgr.ReadKey(s);
 }
Пример #16
0
 protected override void IRead(hsStream s, hsResMgr mgr)
 {
     fEnter = s.ReadBool();
     fHitter = mgr.ReadKey(s);
     fHittee = mgr.ReadKey(s);
 }
Пример #17
0
 protected override void IRead(hsStream s, hsResMgr mgr)
 {
     fContained = mgr.ReadKey(s);
     fContainer = mgr.ReadKey(s);
     fEntering = s.ReadBool();
 }
Пример #18
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)));
        }
Пример #19
0
 protected override void IRead(hsStream s, hsResMgr mgr)
 {
     fFacer = mgr.ReadKey(s);
     fFacee = mgr.ReadKey(s);
     fDot = s.ReadFloat();
     fEnabled = s.ReadBool();
 }
Пример #20
0
 public override void Read(hsStream s, hsResMgr mgr)
 {
     fFlags = s.ReadUInt();
     fClientGuid.Read(s, mgr);
     fAvatarUoid = mgr.ReadUoid(s);
 }
Пример #21
0
 protected override void IRead(hsStream s, hsResMgr mgr)
 {
     fStage = s.ReadInt();
     fEvent = s.ReadInt();
     fAvatar = mgr.ReadKey(s);
 }
Пример #22
0
 public plKey Clone(uint id, uint playerID)
 {
     plKey key = new plKey((plUoid)fKeyData.Clone());
     key.fKeyData.fCloneID = id;
     key.fKeyData.fClonePlayerID = playerID;
     return key;
 }
Пример #23
0
 public override void Read(hsStream s, hsResMgr mgr)
 {
     base.Read(s, mgr);
     fObjectHelper = mgr.ReadUoid(s);
 }