示例#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);
                }
            }
        }