public static int GetSlotUnlockTsEnd(this HideOut hideout, int level, int slot) { var _loc3_ = "room_slot_" + HideoutUtil.GetSlotIdFromLevelAndSlot(level, slot); var endslot = (int)hideout.GetType().GetProperty(_loc3_).GetValue(hideout); return(endslot * -1); }
public static HideOutRoom GetRoomBySlot(this HideOut hideout, string identifier) { var slotName = "room_slot_" + identifier; var slot = (int)hideout.GetType().GetProperty(slotName).GetValue(hideout); if (slot == 0) { return(null); } foreach (var room in hideout.Rooms) { if (room.id == slot) { return(room); } } return(null); }