示例#1
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder("{");

            sb.Append(ZoneId.ToString() + ",");
            sb.Append(StartingPageId.ToString() + ",");
            sb.Append(ZoneName + "}");
            return(sb.ToString());
        }
示例#2
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder("{");

            sb.Append(ZoneId.ToString() + ",");
            sb.Append(UserRoleId.ToString() + ",");
            sb.Append(ReadAccess.ToString() + ",");
            sb.Append(WriteAccess.ToString() + "}");
            return(sb.ToString());
        }
示例#3
0
        public ZoneTreeNode(MapId map, ZoneId zone, List<Point2D> coords)
            : base(zone.ToString(), coords.TransformArray(coordss => new TileTreeNode(map, coordss)))
        {
            Zone = zone;
            Coordinates = coords;

            foreach (TileTreeNode child in Nodes)
            {
                if (!File.Exists(SimpleTileWriter.GetFileName(map, child.Coords.X, child.Coords.Y)))
                {
                    child.BackColor = TileTreeNode.NotLoadedColor;
                }
            }
        }
示例#4
0
        public ZoneTreeNode(MapId map, ZoneId zone, List <Point2D> coords) :
            base(zone.ToString(), coords.TransformArray(coordss => new TileTreeNode(map, coordss)))
        {
            Zone        = zone;
            Coordinates = coords;

            foreach (TileTreeNode child in Nodes)
            {
                if (!File.Exists(SimpleTileWriter.GetFileName(map, child.Coords.X, child.Coords.Y)))
                {
                    child.BackColor = TileTreeNode.NotLoadedColor;
                }
            }
        }
示例#5
0
        public List <NameValuePair> GetNameValuePairs()
        {
            Boolean flag   = BaseAddress != 0;
            var     nvList = new List <NameValuePair>();

            var aBase = new PPlayerUtils(BaseAddress);
            List <NameValuePair> baseNvList = aBase.GetNameValuePairs();

            nvList.AddRange(baseNvList);

            nvList.Add(new NameValuePair("", ""));
            nvList.Add(new NameValuePair("PPlayerSelf", ""));
            nvList.Add(new NameValuePair("ZoneId", ZoneId.ToString()));
            nvList.Add(new NameValuePair("Blood1", BloodRune1Ready.ToString()));
            nvList.Add(new NameValuePair("Blood2", BloodRune2Ready.ToString()));
            nvList.Add(new NameValuePair("Unholy1", UnholyRune1Ready.ToString()));
            nvList.Add(new NameValuePair("Unholy2", UnholyRune2Ready.ToString()));
            nvList.Add(new NameValuePair("Frost1", FrostRune1Ready.ToString()));
            nvList.Add(new NameValuePair("Frost2", FrostRune2Ready.ToString()));
            nvList.Add(new NameValuePair("Backspace", Inventory.FreeBagSlots.ToString()));

            return(nvList);
        }
示例#6
0
        protected void JoinRoom(Guid sessionId, RoomId newRoomId, Hangout.Shared.Action userJoinedRoomCallback)
        {
            GetRoomFromRoomId(newRoomId,
                              delegate(IServerDistributedRoom serverDistributedRoomToJoin)
            {
                if (serverDistributedRoomToJoin != null)
                {
                    if (!mRoomIdToRoomDistributedObject.ContainsKey(serverDistributedRoomToJoin.RoomId))
                    {
                        AddRoomToRoomManager(serverDistributedRoomToJoin);
                    }
                    List <DistributedObjectId> distributedObjectsAssociatedWithSession = mServerStateMachine.ServerObjectRepository.GetDistributedObjectIdsOwnedBySessionId(sessionId);

                    //find the zone for the new room the client wants to join
                    ZoneId zoneIdToJoin = mServerStateMachine.ServerObjectRepository.GetZone(serverDistributedRoomToJoin);

                    SendMessageToClient(BeginLoadingRoomMessage(newRoomId), sessionId);

                    //open interest in the zones that the new room belongs to
                    AddUserSessionToRoom(sessionId, serverDistributedRoomToJoin);

                    //move any distributed objects belonging to the client from the old zone to the new zone
                    foreach (DistributedObjectId distributedObjectId in distributedObjectsAssociatedWithSession)
                    {
                        mServerStateMachine.ServerEngine.ProcessZoneChange((ServerDistributedObject)mServerStateMachine.ServerObjectRepository.GetObject(distributedObjectId), zoneIdToJoin);
                    }

                    // Save room id as LastRoomId for account
                    ServerAccount account = mServerStateMachine.SessionManager.GetServerAccountFromSessionId(sessionId);
                    account.LastRoomId    = newRoomId;
                    if (account != null)
                    {
                        account.UserProperties.SetProperty(UserAccountProperties.LastRoomId, newRoomId);
                        account.SaveCurrentAccountData(delegate(XmlDocument returnedXml) { });
                    }
                    BossServerAPI.UpdateSession(account.AccountId, sessionId.ToString(), "1", zoneIdToJoin.ToString(), mServerStateMachine.StateServerId, delegate(XmlDocument xmlDocument) { });
                }
                userJoinedRoomCallback();
            }
                              );
        }
示例#7
0
    /// <summary>
    /// Wakes the zone. If the zone is not yet instantiated will spawn a new zone and wake that.
    /// </summary>
    /// <param name='id'>
    /// Identifier of the zone. If a new zone is needed this will also define it's center.
    /// </param>
    /// <param name='zoneEnterer'>
    /// Zone enterer that triggered the zone's awakening.
    /// </param>
    public void WakeZone(ZoneId id, Collider zoneEnterer)
    {
        Zone zone = GetZoneById(id, true);

        if (zone != null)
        {
            zone.WakeUp(zoneEnterer);
        }
        else
        {
            Debug.LogError("Zone creation failed when attempting to wake the zone at:\n" + id.ToString());
        }
    }
示例#8
0
 internal static OffsetTime DefaultTime(ZoneId zoneId)
 {
     return(OffsetTime.of(TemporalFields.Hour.defaultValue, TemporalFields.Minute.defaultValue, TemporalFields.Second.defaultValue, TemporalFields.Nanosecond.defaultValue, AssertValidZone(() => ZoneOffset.of(zoneId.ToString()))));
 }
示例#9
0
        protected override Composite CreateBehavior()
        {
            return(new PrioritySelector(
                       CommonBehaviors.HandleLoading,

                       //new Decorator(r => !_generatedNodes, new ActionRunCoroutine(r => GenerateNodes())),
                       //NavGraph.NavGraphConsumer(r => FinalizedPath)
                       new Decorator(r => !_generatedNodes, new ActionRunCoroutine(t => Lisbeth.TravelTo(ZoneId.ToString(), XYZ)))
                       ));
        }