feat(ADAMU-CUSTOM): port remote-NPC (open NPC window from anywhere via 0x8000 marker)
This commit is contained in:
@@ -103,6 +103,23 @@ public class GameMap
|
||||
return result;
|
||||
}
|
||||
|
||||
// ADAMU-CUSTOM: remote NPC ("NPC list" mobile feature) — spawn olmuş NPC'yi definition number ile bul.
|
||||
/// <summary>
|
||||
/// Gets a spawned non-player-character on this map by its definition number.
|
||||
/// Used to open an NPC's window remotely (mobile "NPC list" feature), independent
|
||||
/// of the player's position.
|
||||
/// </summary>
|
||||
/// <param name="number">The <see cref="MUnique.OpenMU.DataModel.Configuration.MonsterDefinition.Number"/>.</param>
|
||||
/// <returns>The first matching non-player-character, or <c>null</c>.</returns>
|
||||
public NonPlayerCharacter? GetNpcByNumber(short number)
|
||||
{
|
||||
return this._objectsInMap.Values
|
||||
.OfType<NonPlayerCharacter>()
|
||||
.FirstOrDefault(npc => npc.Definition.Number == number);
|
||||
}
|
||||
|
||||
// ADAMU-CUSTOM end
|
||||
|
||||
/// <summary>
|
||||
/// Gets the attackables in range of the specified coordinates.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user