예제 #1
0
파일: Dungeon.cs 프로젝트: Vinna/aura
		/// <summary>
		/// Called when a creature enters the lobby region.
		/// </summary>
		/// <param name="creature"></param>
		private void OnPlayerEntersLobby(Creature creature)
		{
			// Save location
			// This happens whenever you enter the lobby.
			creature.DungeonSaveLocation = creature.GetLocation();
			Send.Notice(creature, Localization.Get("You have memorized this location."));

			// Notify player if dungeon was created by another party.
			if (!this.Party.Contains(creature))
				Send.MsgBox(creature, Localization.Get("This dungeon has been created by another player."));

			// Scroll message
			var msg = "";
			if (this.Party.Contains(creature))
				msg = Localization.Get("This dungeon has been created by you or your party.\t") + msg;
			else
				msg = Localization.Get("This dungeon has been created by another player.") + msg;

			Send.Notice(creature, NoticeType.Top, ScrollMessageDuration, msg + this.GetPlayerListScrollMessage());
		}
예제 #2
0
        /// <summary>
        /// Called when a creature enters the lobby region.
        /// </summary>
        /// <param name="creature"></param>
        public void OnPlayerEntersLobby(Creature creature)
        {
            var isCreator = this.Creators.Contains(creature.EntityId);

            // Save location
            // This happens whenever you enter the lobby.
            creature.DungeonSaveLocation = creature.GetLocation();
            Send.Notice(creature, Localization.Get("You have memorized this location."));

            // Notify player if dungeon was created by another party.
            if (!isCreator)
                Send.MsgBox(creature, Localization.Get("This dungeon has been created by another player."));

            // Scroll message
            var msg = "";
            if (isCreator)
                msg = Localization.Get("This dungeon has been created by you or your party.\t") + msg;
            else
                msg = Localization.Get("This dungeon has been created by another player.") + msg;

            Send.Notice(creature, NoticeType.Top, ScrollMessageDuration, msg + this.GetPlayerListScrollMessage());

            // Enter events
            this.Script.OnPlayerEntered(this, creature);
            lock (_partyEnterSyncLock)
            {
                if (!_partyEnterEventFired && this.CountPlayers() == this.Creators.Count)
                {
                    _partyEnterEventFired = true;
                    this.Script.OnPartyEntered(this, creature);
                }
            }
        }