GetActualCreature() 공개 메소드

If this creature is an RP character, it returns the player's character behind the RP character, if not it just returns itself.
Use in cases where you want to execute an action on the actual player character, but you don't know if you're working with an RP character or not. For example, maybe you want to give a player a quest item at the end of the dungeon, but the dungeon can be played as RP or non-RP. Using just the creature would give it to the RP character, with the player never getting it.
public GetActualCreature ( ) : Creature
리턴 Creature
예제 #1
0
		/// <summary>
		/// Called when a creature enters the lobby region.
		/// </summary>
		/// <param name="creature"></param>
		public void OnPlayerEntersLobby(Creature creature)
		{
			var actualCreature = creature.GetActualCreature();
			var isCreator = this.Creators.Contains(actualCreature.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");
			else
				msg = Localization.Get("This dungeon has been created by another player.");

			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);
				}
			}
		}