feat(ADAMU-CUSTOM): port remote-NPC (open NPC window from anywhere via 0x8000 marker)

This commit is contained in:
Acentech Dev
2026-07-14 21:35:25 +03:00
parent 7ff1e12f2a
commit 03521c3ef5
3 changed files with 61 additions and 0 deletions

View File

@@ -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>