Exemplo n.º 1
0
 // Same as GetRecipient, but for NPCs. Used in combat, trades, conversation.
 public static NPC GetTarget(int room, string a, MapBuild WorldMap)
 {
     foreach (var i in WorldMap.Rooms[room].NPCs)
     {
         if (FuzzyEquals(i.Actual.Name, a))
         {
             return(i.Actual);
         }
     }
     return(null);
 }
Exemplo n.º 2
0
 // Utility func for finding if a room has Containers
 public static bool HasContainers(User sender, MapBuild WorldMap)
 {
     return(WorldMap.Rooms[GetCurrentRoomId(sender, WorldMap)].Containers.Count != 0);
 }
Exemplo n.º 3
0
 // Utility func for getting the user's current room ID
 public static int GetCurrentRoomId(User sender, MapBuild WorldMap)
 {
     return(WorldMap.Rooms.FindIndex(a => a.Id == sender.CurrRoomId));
 }